//purpose :
//=======================================================================
-static void ProjCurve3d (TopoDS_Edge& E,
+static bool ProjCurve3d (TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
TopLoc_Location& L)
{
TopLoc_Location LE;
Standard_Real f,l;
Handle(Geom_Curve) C = BRep_Tool::Curve(E,LE,f,l);
+ if (C.IsNull())
+ {
+ return false;
+ }
Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(C,f,l);
TopLoc_Location LL = L.Inverted().Multiplied(LE);
Handle(Geom2d_Curve) C2 = GeomProjLib::Curve2d (CT,S);
BB.UpdateEdge(E,C2,S,L,Precision::Confusion());
+ return true;
}
//=======================================================================
// no pcurve on the reference surface.
if (modeProj) {
// Projection of the 3D curve on surface.
- ProjCurve3d ( E, S, L);
+ if (!ProjCurve3d(E, S, L))
+ {
+ return;
+ }
}
else {
// return the first pcurve glued on <S>
Standard_Boolean YaPCurve = ChangePCurve (E, S, L);
if (!YaPCurve) {
- ProjCurve3d (E, S, L);
+ if (!ProjCurve3d(E, S, L))
+ {
+ return;
+ }
}
}
}
--- /dev/null
+puts "========================================================="
+puts "0033383: Modeling Algorithms - Wire/Face creation problem"
+puts "========================================================="
+puts ""
+
+pload MODELING
+restore [locate_data_file bug33383.brep] a
+connectedges res a 1e-07 0
+explode res
+mkplane pln1 res_1 1
+
+if ![catch { buildfaces rebf pln1 res_2 }] then {
+ puts "Error: buildfaces command should be failed"
+}