BRepAlog/BRepAlgo.cxx 69 147 in BRepAlgo::ConcatenateWire
@@@ Original @@@
tab(index) = GeomConvert::CurveToBSplineCurve(new //storage in a array
Geom_TrimmedCurve(BRep_Tool::Curve(edge,L,First,Last),First,Last));
@@@ Fixed @@@
Handle(Geom_Curve) tmpC = BRep_Tool::Curve(edge,L,First,Last);
tab(index) = GeomConvert::CurveToBSplineCurve(new Geom_TrimmedCurve(tmpC, First,Last));
For the purpose of converting wire (lines and arcs are connected) into BSpline, I use this function BRepAlgo::ConcatenateWire.
but it always raise exception at the constructor of Geom_TrimmedCurve as U1 and U2 are equal to zero.
if (U1 == U2)
Standard_ConstructionError::Raise("Geom_TrimmedCurve::U1 == U2");
so I finally understand that the First and Last parameter which BRep_Tool::Curve calculated are not passed to Geom_TrimmedCurve constructor.
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
Hmmm, really interesting. I assume this can be compiler-specific and those on which this code was initially tested ensured that arguments to a function are computed from left to right. Debugging in VS2005 I noticed that arguments are computed from right to left. That's why I think. So, yes, your observation and fix seem correct. Thanks !