I am inputting coordinates to create a polyline curve. I want to use ghpython to adjust the length of the curve connections as a percentage. What code should I write for this?
otamesi_1.gh (15.1 KB)
I am inputting coordinates to create a polyline curve. I want to use ghpython to adjust the length of the curve connections as a percentage. What code should I write for this?
Why Python instead of PLine
Are you applying the same percentage to all polyline segments or setting them separately?
Changing the length of polyline segments requires moving all but the first point, so a loop is needed. This uses Anemone.
P.S. The same thing can be achieved using Scale, on the PLine or on the points, using the start point as ‘C’ (Center) input.
P.P.S. Here is what happens using a Graph Mapper to apply different percentage length values to each segment of the polyline. Can’t do this with Scale.
I guess I did not communicate it well.
I want to create a G-code simulation.
So I want to create a gh that uses a slider to connect the coordinate points from the top of the list with a polyline.
I don’t know what that means? An MD Slider? (two-dimensional)
I want to connect the coordinates in the list with a polyline curve from the top row.
You want to add a slider with the same number of rows as the list and have the curve connect to an arbitrary location.
For example, the list contains 10 rows of coordinates.
I want to connect the coordinates up to the 5th row with a polyline curve, so I want to use a slider with the same number of rows as the list to do that.
O I get what you are saying. First you are just trying to do a dot by dot connection essentially. And you want to simulate that with a slider. Thus “Growing” the polyline “Path”
I see no “top row” when the whole set of points is skewed in top view, as the images I posted show.
The only thing I want is clarity, which I’m not getting. Oh well.
yes, That’s true
Thanks for taking the time to answer my questions. I appreciate it.
I’ll give it some more thought.
I’d like to be able to do something similar with one of my lifelong projects.
Hence,
Ok Just a thought if I am understanding right.
Adjust the “Slider” to do your percentage.
Path.gh (9.2 KB)