Hello,
Can i create a dynamic line (spline whatever)…?
It starts as line and at the end it is a circle?
driven by a slider…
alternativly it can be points
Hello,
Can i create a dynamic line (spline whatever)…?
It starts as line and at the end it is a circle?
driven by a slider…
alternativly it can be points
Like this?
rd = 6;
ct = 100;
cr = Circle.ByCenterPointRadius(Point.ByCoordinates(0,rd),rd);
ln = Line.ByStartPointDirectionLength(Point.Origin(), Vector.XAxis(), cr.Length);
p1 = cr.PointAtParameter(0..1..#ct).Rotate(cr.CenterPoint,Vector.ZAxis(),-90);
p2 = List.Flatten([p1,ln.PointAtParameter(0..1..#ct)],-1);
cv = NurbsCurve.ByPoints(List.TakeItems(List.ShiftIndices(p2,-sh),ct));
Thats exactly what i am looking for… when the points just move(translate) i could host elements on it!
I have still this syntex issue
rd = 6;
ct = 100;
cr = Circle.ByCenterPointRadius(Autodesk.Point.ByCoordinates(0,rd),rd);
ln = Line.ByStartPointDirectionLength(Autodesk.Point.Origin(),Autodesk.Vector.XAxis(), cr.Length);
p1 = cr.PointAtParameter(0..1..#ct).Rotate(cr.CenterPoint,Autodesk.Vector.ZAxis(),-90);
p2 = List.Flatten([p1,ln.PointAtParameter(0..1..#ct)],-1);
cv = NurbsCurve.ByPoints(List.TakeItems(List.ShiftIndices(p2,-sh),ct));
Prefix Autodesk …
Prefix Point with Autodesk.DesignScript.Geometry.
Since you seem to have installed packages that create conflicts you will need to do something like this
rd = 6;
ct = 100;
cr = Autodesk.DesignScript.Geometry.Circle.ByCenterPointRadius(Autodesk.DesignScript.Geometry.Point.ByCoordinates(0,rd),rd);
ln = Autodesk.DesignScript.Geometry.Line.ByStartPointDirectionLength(Autodesk.DesignScript.Geometry.Point.Origin(), Autodesk.DesignScript.Geometry.Vector.XAxis(), cr.Length);
p1 = Autodesk.DesignScript.Geometry.Curve.PointAtParameter(cr,0..1..#ct).Rotate(cr.CenterPoint,Autodesk.DesignScript.Geometry.Vector.ZAxis(),-90);
p2 = DSCore.List.Flatten([p1,Autodesk.DesignScript.Geometry.Curve.PointAtParameter(ln,0..1..#ct)],-1);
cv = Autodesk.DesignScript.Geometry.NurbsCurve.ByPoints(List.TakeItems(DSCore.List.ShiftIndices(p2,-sh),ct));