Simple task - made a lengthy scripts. want to shorten it

Divided the curve(13) and moved every 4th of it and interpolated the point. To make the point list i used list item for every point and merged to make the order.so if i want to move every 5th and interpolate i has to changes all list item. help me out to fix this.

script.gh (30.2 KB)

Anyone who uses the phrase “Simple task” or “quick question” deserves to be ignored because they have NO IDEA how much work is required to formulate an adequate reply.

1 Like

@Joseph_Oster SORRY FOR THE WORD, BUT I HAVE DONE IT BEFORE, NOW I FORGOT, DONT KNOW HOW TO DO. PLEASE HELP ME OUT.

Please internalise the curves inside your srcipt.gh file.
Regards, Eef

whats that means?

If you refer to my qestion:
a grasshopper file (*.gh) works with the geometry in your Rhino file (curves, points, lines, etc).
If you want it to use it with these geometry you have to internalise these before uploading to the forum:
See images: Right click; scroll down to internalise. When done; save ; and upload.


Regards, Eef

1 Like

Or post the Rhino file the GH refers to. Internalizing geometry works best when the geometry doesn’t substantially increase the size of the GH file. On the other hand, HUGE GH files that consist mostly of internalized (complex) geometry don’t make sense on the forum because the geometry doesn’t change while the relatively small code may change many times. In those cases, a separate Rhino file makes more sense.

Yes, you can simplify this immensely by using the List commands in the Set tab of the toolbar.

In this case, use Replace to re-insert the moved points back into the list at the same sequence from where they were selected. The panel is linked to both the Item component and the Replace component, so one change to the numbers in the panel immediately updates both. (If you have many points to move, on a longer curve, for example, this can be even more streamlined using a Series component to generate the numbers).

script-REPLACE.gh (11.6 KB)

The exception that tests the rule… this actually was very simple, even without the request being formulated well.

How much total time did you spend? Including creating the geometry (which was missing), creating the image and composing your reply?

I haven’t looked at any of the code here, the word “simple” in the title was enough to dissuade me. Unless you can do a thing yourself (as you apparently did), the assumption that it’s “simple” is inappropriate. Hardly a day goes by on this forum without someone saying “I know it’s simple but… (I can’t do it)”.

Yes, yes. Most of the suupposedly ‘simple’ tasks are not, I agree.

This took a minute or two, including screenshot and posting.
The missing geometry was only a line segment parallel to the X-axis.

Five or ten minutes would be a “quick question”, “a minute or two” sounds exaggerated. I admit that “simple” and “quick question” trigger me - for good reason.

2 Likes