
Thu, 02/10/2005 - 15:10
Forums:
Hi everyone,
I am currently confronted with the task of splitting a curve in two parts of equal arc length. Is there any native OpenCascade functionality that can help me in this? I just found the topic http://www.opencascade.org/org/forum/thread_4351/ which shows me how to get the actual length of a curve, but I can see no way of finding the point that splits my curve in two like I said.
Thank you in advance for your help!
Regards, Tom
Wed, 02/23/2005 - 00:22
Hi Tom,
Consider use of GCPnts_AbscissaPoint, for example:
Adaptor3d_Curve AC = …;
GCPnts_AbscissaPoint anAP (AC, GCPnts_AbscissaPoint::Length(AC) / 2, AC.FirstParameter());
gp_Pnt aPnt = AC.Value (anAP.Parameter());
HTH.
Roman
Tue, 01/31/2012 - 22:27
Hi Roman and all,
the title (not the body) of this topic is just what I need: given a Geom_Curve, creating a new one which is arc-length parameterized and approximates it with a given tolerance.
A solution would be to define an AdvApprox_EvaluatorFunction, which calls GCPnts_AbscissaPoint at every evaluation,
and pass it to AdvApprox_ApproxAFunction, but this would be extremely slow, I guess.
I wonder if there is something ready.
Regards.
Mauro
Wed, 02/01/2012 - 18:36
Maybe I have found it:
Approx_CurvilinearParameter,
"approximation of a Curve to make its parameter be its curvilinear abscissa"
Wed, 02/01/2012 - 18:57
Iterating over the GCPnts_AbscissaPoint results would give you the parameters at the given curve length, just use those to make a number of Geom_TrimmedCurve's?