cad.net generate a new code segment spline curve in accordance with the old data spline. spline generation

                        Spline spl Spline = entity as; // get the old spline primitives ...
                        // spline curve generation condition 
                        var controlPoints = new new Point3dCollection ();
                         for ( int I = 0 ; I <spl.NumControlPoints; I ++)   // control points 
                        { 
                            controlPoints.Add (spl.GetControlPointAt (I));                            
                        } 
                         
                        NurbsData NU spl.NurbsData =; 
                        entnew = new new Spline (spl.Degree, spl.IsRational, spl.Closed, 
                            spl.IsPeriodic,   // periodic   
                            controlPoints,   // control point 
                            nu.GetKnots (),    // node 
                            nu.GetWeights (), // weight 
                            nu.ControlPointTolerance,   // the control point tolerances 
                            nu.KnotTolerance            // node tolerance 
                            );

 

After the above steps can generate exactly the same one spline of ...

However, you can also directly spl.Clone () Yeah!

 

Guess you like

Origin www.cnblogs.com/JJBox/p/11464794.html