return Standard_False;
Handle(Geom2d_Curve) gpcprol = BRep_Tool::CurveOnSurface(Eprol,Fprol,uf,ul);
+ if (gpcprol.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
Handle(Geom2dAdaptor_Curve) pcprol = new Geom2dAdaptor_Curve(gpcprol);
Standard_Real partemp = BRep_Tool::Parameter(Vtx,Eprol);
if (onsame) {
if (!CV1.IsOnArc() && !CV2.IsOnArc())
- throw Standard_Failure("Corner OnSame : no point on arc");
+ throw Standard_ConstructionError ("Corner OnSame : no point on arc");
else if (CV1.IsOnArc() && CV2.IsOnArc()) {
Standard_Boolean sur1 = 0, sur2 = 0;
for(ex.Init(CV1.Arc(),TopAbs_VERTEX); ex.More(); ex.Next()) {
if (onsame && IFopArc == 1) pfac1 = p2dbout;
else {
Hc1 = BRep_Tool::CurveOnSurface(CV1.Arc(),Fv,Ubid,Ubid);
+ if (Hc1.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pfac1 = Hc1->Value(CV1.ParameterOnArc());
}
if (onsame && IFopArc == 2) pfac2 = p2dbout;
else {
Hc2 = BRep_Tool::CurveOnSurface(CV2.Arc(),Fv,Ubid,Ubid);
+ if (Hc2.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pfac2 = Hc2->Value(CV2.ParameterOnArc());
}
if (Fi1.LineIndex() != 0) {
Standard_Real first, last, prm1, prm2;
Standard_Boolean onfirst, FirstToPar;
Handle(Geom2d_Curve) Hc = BRep_Tool::CurveOnSurface( CV[i].Arc(), Fv, first, last );
+ if (Hc.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pfac1 = Hc->Value( CV[i].ParameterOnArc() );
PcF = Pc->Value( Udeb );
PcL = Pc->Value( Ufin );
TopoDS_Edge aLocalEdge = CV[i].Arc();
aLocalEdge.Reverse();
Handle(Geom2d_Curve) HcR = BRep_Tool::CurveOnSurface( aLocalEdge, Fv, first, last );
+ if (HcR.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
Interfc = ChFi3d_FilCurveInDS( indcurv, indface, HcR, aLocalEdge.Orientation() );
DStr.ChangeShapeInterferences(indface).Append( Interfc );
//modify degenerated edge
{
Standard_Real fd, ld;
Handle(Geom2d_Curve) Cd = BRep_Tool::CurveOnSurface( Edeg, Fv, fd, ld );
+ if (Cd.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
Handle(Geom2d_TrimmedCurve) tCd = Handle(Geom2d_TrimmedCurve)::DownCast(Cd);
if (! tCd.IsNull())
Cd = tCd->BasisCurve();
const ChFiDS_FaceInterference& Fiop = Fd->Interference(IFopArc);
gp_Pnt2d pop1, pop2, pv1, pv2;
Hc = BRep_Tool::CurveOnSurface(Arcprol,Fop,Ubid,Ubid);
+ if (Hc.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pop1 = Hc->Value(parVtx);
pop2 = Fiop.PCurveOnFace()->Value(Fiop.Parameter(isfirst));
Hc = BRep_Tool::CurveOnSurface(Arcprol,Fv,Ubid,Ubid);
+ if (Hc.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pv1 = Hc->Value(parVtx);
pv2 = p2dbout;
ChFi3d_Recale(Bs,pv1,pv2,1);
}
}
}
+ if (F.IsNull()) {
+ throw Standard_ConstructionError ("Failed to find face.");
+ }
}
//=======================================================================
{Edge=Ecur1;trouve=Standard_True;}
}
}
+ if (Edge.IsNull()) {
+ throw Standard_ConstructionError ("Failed to find edge.");
+ }
}
//=======================================================================
paredge2=inters.Point(nbp).W();
if (!extend) {
cfacemoins1=BRep_Tool::CurveOnSurface(E2,F,u2,v2);
+ if (cfacemoins1.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
cface=BRep_Tool::CurveOnSurface(E2,Face[nb],u2,v2);
+ if (cface.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
cfacemoins1->D0(paredge2,pfac2);
cface->D0(paredge2,pint);
}
// Arcprol is an edge of tangency, ultimate adjustment by an extrema curve/curve is attempted.
Standard_Real ff,ll;
Handle(Geom2d_Curve) gpcprol = BRep_Tool::CurveOnSurface(Arcprol,Fv,ff,ll);
+ if (gpcprol.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
Handle(Geom2dAdaptor_Curve) pcprol = new Geom2dAdaptor_Curve(gpcprol);
Standard_Real partemp = BRep_Tool::Parameter(Vtx,Arcprol);
inters = Update(HBs,pcprol,HGs,FiopArc,CPopArc,p2dbout,
if( IFopArc == 1) pfac1 = p2dbout;
else {
Hc1 = BRep_Tool::CurveOnSurface(CV1.Arc(),Fv,Ubid,Ubid);
+ if (Hc1.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pfac1 = Hc1->Value(CV1.ParameterOnArc());
}
if(IFopArc == 2) pfac2 = p2dbout;
else {
Hc2 = BRep_Tool::CurveOnSurface(CV2.Arc(),Fv,Ubid,Ubid);
+ if (Hc2.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pfac2 = Hc2->Value(CV2.ParameterOnArc());
}
if(Fi1.LineIndex() != 0){
// Modified by skv - Thu Aug 21 11:55:58 2008 OCC20222 End
//fin modif
Hc = BRep_Tool::CurveOnSurface(Arcprolbis,Fop,Ubid,Ubid);
+ if (Hc.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
pop1 = Hc->Value(parVtx);
pop2 = Fiop.PCurveOnFace()->Value(Fiop.Parameter(isfirst));
Hc = BRep_Tool::CurveOnSurface(Arcprol,Fv,Ubid,Ubid);
+ if (Hc.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
//modif
parVtx = BRep_Tool::Parameter(Vtx,Arcprol);
//fin modif
{Edge=Ecur1;trouve=Standard_True;}
}
}
+ if (Edge.IsNull()) {
+ throw Standard_ConstructionError ("Failed to find edge");
+ }
}
//=======================================================================
else ilin=CDicplus->SetOfSurfData()->Value(icplus)->InterferenceOnS2().LineIndex();
c2=DStr.Curve(ilin ).Curve();
}
+ if (c1.IsNull())
+ throw Standard_ConstructionError ("Failed to get 3D curve of edge");
+ if (c2.IsNull())
+ throw Standard_ConstructionError ("Failed to get 3D curve of edge");
c1->D1(picmoins,p01,d11);
c2->D1(picplus,p02,d12);
Standard_Integer size = 4;
}
Eproj.Append(E1);
proj1=BRep_Tool::CurveOnSurface(E1,F,up1,up2);
+ if (proj1.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
proj2d.Append(new Geom2d_TrimmedCurve(proj1,up1,up2));
proj1c=BRep_Tool::Curve(E1,up1,up2);
+ if (proj1c.IsNull())
+ throw Standard_ConstructionError ("Failed to get 3D curve of edge");
cproj.Append(new Geom_TrimmedCurve(proj1c,up1,up2));
if (error>BRep_Tool::Tolerance(E1)) error=BRep_Tool::Tolerance(E1);
}
nbcouture++;
}
else ChFi3d_cherche_edge(V1,Evive,Fcur,Enext,VV);
- if (Enext.IsNull())throw Standard_Failure("PerformMoreThreeCorner: pb in the parsing of edges and faces");
+ if (Enext.IsNull())
+ throw Standard_ConstructionError ("PerformMoreThreeCorner: pb in the parsing of edges and faces");
if (Enext.IsSame(edgelibre1)|| Enext.IsSame(edgelibre2)) {
CD.SetValue(ii, cdbid);
Index.SetValue(ii, 0);
u1bid,u2bid);
else
Calcul_C2dOnFace(CD.Value(ic),jf.Value(ic),i.Value(ic,icplus),curv2d1);
+
+ if (curv2d1.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
p2d1 = curv2d1 ->Value(p.Value(ic,icplus));
// recuperation de la deuxieme courbe 2d
jfp = 3 - jf.Value(icplus);
Calcul_C2dOnFace(CD.Value(icplus),jfp,i.Value(icplus,ic),curv2d2);
}
+ if (curv2d2.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
p2d2 = curv2d2 ->Value(p.Value(icplus,ic));
Asurf = new GeomAdaptor_Surface(BRep_Tool::Surface(TopoDS::Face(Fvive.Value(ic,icplus))));
n3d++;
proj=BRep_Tool::CurveOnSurface(TopoDS::Edge(Eproj.Value(nb)),
TopoDS::Face(Fproj.Value(nb)),up1,up2);
+ if (proj.IsNull())
+ throw Standard_ConstructionError ("Failed to get p-curve of edge");
proj2d=new Geom2d_TrimmedCurve(proj,up1,up2);
projc=BRep_Tool::Curve(TopoDS::Edge(Eproj.Value(nb)),up1,up2);
+ if (projc.IsNull())
+ throw Standard_ConstructionError ("Failed to get 3D curve of edge");
cproj=new Geom_TrimmedCurve(projc,up1,up2);
pardeb=cproj->FirstParameter();
parfin=cproj->LastParameter();