how use length to get gp_pnt in curve of edge

hi,
i meet a question i want discrete curves ,but GCPnts_UniformAbscissa is not enough,because i want discrete curves .for example there are tow lines ,and i want to divide into tow parts,and only 3 points.like picture.

best regards.

Attachments: 
Mikhail Sazonov's picture

Hi,

You can use the class BRepAdaptor_CompCurve that allows using a TopoDS_Wire object in the context where an adaptor curve is needed. Then you can use GCPnts_AbscissaPoint to get a point on a given distance from the start of the curve, as well as to measure the length of the entire composite curve.

BR,
Mikhail

Yellow sponge's picture

thank you ,
this is a good method,it solved my problem .
and i also want know if has a function can use length to get point
BR,

Mikhail Sazonov's picture

As I already wrote, you can use GCPnts_AbscissaPoint to get a point on a given distance from the start of the curve. Please study the comments in the file GCPnts_AbscissaPoint.hxx.