
Fri, 01/15/2010 - 03:00
Forums:
Hi,
can anybody tell me a suitable method to reduce the point cound of a wire. the wire is a polyline with many lines as edges. I want to input this wire and define a tolerance and get a new lwire with a lower point count and thus fewer linear segments...
Thanks
Regards Simon
Fri, 01/15/2010 - 11:19
Hi Simon,
you can try:
- GeomAPI_Interpolate or
- GeomAPI_PointsToBSpline
Pawel
Fri, 01/15/2010 - 13:36
Thanks, but it seems to me that this methods produce BSpline curves. I have a polyline as input and I need a polyline with reduced segment count as output. Thus I need a function with C0 continuity...
Regards
Simon
Fri, 01/15/2010 - 21:39
Hi Simon,
take the first point and create a line to the second-next. If the distance between the skipped point and the line is smaller than the tolerance filter the point and go to the 'new second-next' to repeat. If not go to the skipped point.
This should work
Pawel