Hi all, i have a wire and i want to know the length of each the edges contained therein. Here's my code:
eExp = TopExp_Explorer(wire, TopAbs_EDGE) while eExp.More(): ch, first, last = BRep_Tool.Curve(TopoDS_edge(eExp.Current())) adapt = GeomAdaptor_Curve(ch) length = GCPnts_AbscissaPoint_Length(adapt) print first, last, length eExp.Next() This is the output: 0.0 23.004116816 23.0011101003 0.0 3238.42627855 3239.83453621 2.596964863 30.1666351069 27.539651501 0.0 3.34739451039 3.3279245656 0.0 3219.86594156 3217.1657437 0.0 4.7325584593 4.71071056854 >From what I read in the docs, i would have expected length == last - first but it is not. What do first and last mean in the code above? The code above is part of a program to identify some given points along a wire. Input data: a wire a set of points on the wire. All of the points are on the wire, but the wire can have additional vertices. Desired output: A parameter for each point from the set on the wire so i can use BRepAdaptor_Curve.Value(parameter) and/or split the wire at the location of each point. Does anyone know of a better approach to this than to sum up edge parameters? Best regards, Uwe _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users