algorithmic modeling for Rhino
Please would you spare some time to put together the following definition as an experiment in GH text notation. The file of times is attached and the curve can be anything. Note that there is only one instance of component on the canvas.
[Curve] set one Curve
[Path] = "%USERPROFILE%\Downloads\times.txt"
[Path]-->[Read File]
[Read File]-->(T)[Text Split]
[Panel = :]-->(C)[Text Split]
[Text Split]-->(L)[List Item]
[List Item](i)-->(A)[Multiplication]
[Slider=60]-->(B)[Multiplication]
[Multiplication]-->(A)[Addition]
[List Item](+1)-->(B)[Addition]
[Addition]--><Flatten>(V)[Relative Differences]
[Relative Differences]-->[Mass Addition]
[Mass Addition](Pr)-->[Bounds]
[Mass Addition](Pr)-->(V)[ReMap]
[Bounds]-->(S)[ReMap]
[Curve]--><Reparameterize>(C)[Evaluate Curve]
[ReMap](R)-->(t)[Evaluate Curve]
[Evaluate Curve](P)-->(L)[Text Tag 3D]
[Read File]-->(T)[Text Tag 3D]
Please post an image of the definition that you create.
More the merrier and please feel free to comment on your experience.
Tags:
May I suggest that the names of outputs and inputs are both included on either side of a connecting wire in case of components:
[Point=SetMultiplePoints]-->[V][Polyline]
[Polyline][Pl]-->[C][Fillet Distance]
[Slider=0..1..10]-->[D][Fillet Distance]
[Slider=1..5..20]-->[F][Unit Z]
[Fillet Distance][C]-->[B][Extrude]
[Unit Z][V]-->[D][Extrude]
This still leaves the problem of having more than one of a single component on the canvas. Referral can be made unambiguous by simply picking the most recent component with the same name. But how do you indicate you want a second Polyline component?
Possible solutions:
(2) is a lot more flexible and (1) may not work at all as it will prevent any reuse above and below the separator.
--
David Rutten
david@mcneel.com
Hi David, thanks for the input
May I suggest that the names of outputs and inputs are both included on either side of a connecting wire
Is this just to remove ambiguity?
Also my logic was to have [] as components () as parameters and <> as modifiers. Is there a reason to have [] for both components and parameters in your example?
I think option 2 for new components is a good one.
@Ángel thanks for the support! :)
One of the problems is that there is no restriction on what a component can be called. Every character is allowed, even ones not typically found on western keyboards. Parenthesis are used in several places already, so I'd prefer to not have them be meaningful in this notation. Curly and Square brackets seem less common and are thus better choices for a new language like this.
From programming you could even take the dot notation to separate out component and parameter names. So instead of:
[Polyline][Pl]-->[C][Fillet Distance]
You'd get:
[Polyline.Pl] --> [Fillet Distance.C]
I actually like that better, as it even allows one to remove the brackets altogether, giving even more compact notation:
Polyline.Pl --> Fillet Distance.C
In this case only the "-->" string has meaning so the chances of this notation colliding with existing names is even smaller.
If the parameters can be implied (for example because there only is one, or because the types are identical) then you can leave the parameter names off, but that would be shorthand.
Concerning modifiers, they could be written in a very similar notation if you're willing to have them on separate lines:
Polyline.Pl --> Fillet Distance.C
Polyline.Pl <-- Simplify, Reparameterize
What do you think?
--
David Rutten
david@mcneel.com
I had considered the dot notation to be contained within the [] but as sometimes I write a simple problem on one line I thought this could be simplified by having Inputs prefixed and outputs postfixed.
But if its always Left of --> is outputs and Right of --> inputs then it wouldn't matter.
The Modifiers i wanted to distinguish between the components of the same name.
<Expression> vs [Expression]
<Flatten> vs [Flatten]
<Graft> vs [Graft]
etc.
therefore there wouldn't be a confusion for eg.
Polyline.Pl --> Fillet Distance.C
Polyline.Pl <-- Simplify
and
Polyline.Pl --> Fillet Distance.C
Polyline.Pl --> Simplify
After a discussion with the resident language expert I have some other suggestions:
Does this approach violate some of the goals you had in mind originally?
--
David Rutten
david@mcneel.com
Create: Divide Curve, Circle[1], Circle[2]
fits in really well with Shift + Component Selection
I cannot see why the Equals sign doesn't fit well for this purpose. The only alternative I can think of is "@" to stand for assign but I still don't like that in case of (a). Also @user seems to be established in meta sense.
It seems to be gaining speed :) Thank you for your help and thank K for her linguistic prowess. When will we hear from the owl herself? Or is she trying to stay sanitized to stay on top of her game for the Help Topics
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by