I have a polygon, i explode it, evaluate each segment and want to stroke a line(closedPolyline) throw the points.
I didnt found a solution searching on the web, but i read in the help, that Polylines are closed if start and end points coincide, so i am a litte bit confused why it isnt closed.
Also i think there is something wrong in the first loop, i dont adds more than one curve to the list. Not sure why
thanks for your reply, suspected something like this, but didnt knew you can add to the list in this way:)
Thanks for showing somethhing really important!
I also try since yesterday to figure out why the iteration stops after 1 step. I thought it would go so on.
It is taking just the first Polyline in the list?
Hope not to bother, it will be the last thing on this, not triyng to make somebody doing my homework its just my own interest;)
thanks for your help, i looked at it closer now and have 2 questions maybe you could explain me:
i simplified a the function so that i am getting less confused.
in line 4: how to set up this parameters, values?
in line 5 how to skip this? i am trying to the most possible in rhinocommon instead of rs.
first, that line has a small typo, change steps into loops. You are setting these values up in the function call (line 24). Basically the function can be called with just the id as parameter, like so:
a = DoSomething(curve)
If it is called like that, it uses the default paramters (steps=1, parameter=0.5`) specified in line 4. In line 24 the function call is done with the inputs from GH, so you can access them with sliders.
Line 5: Somehow you must convert the object residing in the Rhino document to a RhinoCommon object. This is what this line does using RhinoScript (rs). If you want to get rid of it, you can do the same using 3 lines of code:
like the way setting the curve as type hint.
Probably there comes the time i need to coerce some geometry fot that case i now should know how it works;)
Dear Clement.
May I ask you a Question about the GH example?
Why the PolylineDividerTest.gh with HoopSnake the output Polyline Curves are duplicated, I mean curve over the same curve for each interaction, how could I remove the duplicated Polyline Curves?
Thanks
Andres.
not sure how to get rid of that, i guess the fist item in each loop is required for the hoopsnake component to work.
Why not use my second (python) example component from above ? It’s a single component and does not have to explode the input polyline or starting / resetting the hoopsnake loop.