Hi everybody,
First time posting on the forum. Regular user of Dynamo but somewhat newish to GH and it’s own terminology. I want to orient a simple curve along another curve preserving the normals of this curve perpendicular to the rail curve. The intent is to loft along this curve and change the individual cross sections parametrically. I’m sure this is rather simple but as I mentioned I’m new on the platform. I’d appreciate your help. View on the left is Top in my 3d environment, see sketch on the right for desired result.
Thank you
The attached should get you started, you were almost there. I think this is what you are after?
pFrames.gh (15.7 KB)
Excellent Lando. Thank you so much for your help. My only other question would be how to control the insertion point of my curve along this other curve? Say right now it is orienting along the corner of my rectangle as opposed to its center or any other point in its perimeter. Thoughts? I appreciate your help!
This question has been answered hundreds of times on the forums. Searching is worthwhile.
There is an error in your code that causes the rectangle to be off center and the wrong size. Your ‘A’ inputs to Construct Domain are the full slider values while the ‘B’ inputs are 1/2 the slider values. ‘A’ and ‘B’ inputs are also reversed from conventional use but that isn’t a problem. I think this is what you wanted?
pFrames_2019Jul25a.gh (11.5 KB)
It’s a common pattern and can also be accomplished with two copies of Construct Domain that have the following “Expressions” on their ‘A’ and ‘B’ inputs:
pFrames_2019Jul25b.gh (9.0 KB)
1 Like
Thank you Joseph. Appreciate the input. Interesting trick with creating domains for the rectangle, it creates the object from the center of this domain as opposed to the origin.
You can do it either way. If you don’t want it centered, just skip the Domain components:
I gess we should also mention that Sweep1 can be used instead of Loft in this case, and that it will follow the curve with very few stations (1), while Loft will take shortcuts. There are many hidden issues like twist that have been covered ad nauseam in other threads on this basic topic, so doing some searching is worth your while - and avoids needless repetition.
1 Like
Yes, but the loft method is one that is more applicable to the task at hand. The project is a bench with multiple cross sections that I will either manually draw or define in a graph. Gotta learn to walk before I run. But I appreciate your suggestions, keep em coming!
How so? Sweep isn’t more advanced than lofting, just a different tool. Depending on the curve you are trying to follow, it can work better. Either method will use as many “station curves” (cross sections) as you want. It’s extremely easy to compare the two.