Splitting a 3d curve

Technical discussions
Post Reply
Abhinav R S
Posts: 1
Joined: Thu Apr 21, 2022 7:46 pm

Splitting a 3d curve

Post 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!

Posts: 2
Joined: Mon Dec 22, 2014 10:25 pm

Re: Splitting a 3d curve

Post by VJay »


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;

Post Reply