Page 1 of 1

Splitting a 3d curve

Posted: Wed Sep 21, 2022 7:42 am
by Abhinav R S
Hi everyone,
I have a problem at the moment of dividing a curve in two parts of equal curve length. Is there dgk 7.0 functionality to do that?
Thank you in advance!
Abhinav

Re: Splitting a 3d curve

Posted: Fri Sep 23, 2022 12:13 am
by VJay
Hello

ICurve_DG.SetParameterRange() should work. Use ICurve_DG.GetLength() and ICurve_DG.GetParameterAtLength() to figure out what is the parameter in the middle.

If you need to keep the original curve, clone it first as

Code: Select all

ICurve_DG iCurv; 
IObject_DG objCurv = iCurv as IObject_DG;
ICurve_DG iCurvClone = objCurv.Clone() as ICurve_DG;
Cheers