Cross-Sections

Hi everybody!
I am fairly recent user of Rhino and Grasshopper, for the following reason :slight_smile:
I have imported a spline in Rhino and I would like to place cross-section curves “from centroid” (i.e squares of defined dimensions) along this spline, as shown in the attached image.

Can this be achieved through Grasshopper?Is there some scripting capability to achieve that?

Thanks a lot!
Screen Shot 2021-01-25 at 20.59.15

Yes.

Could you help me out a please? Can I have some more clues? I really lack some intuition as I just started using the software…

Thanks a lot for a lightning fast response!

Curve | Division | Perp Frames

Without posting a file, what more do you expect? Are all the squares the same size? Do you want them oriented in any particular manner?

Hello again!
Yes, @Joseph_Oster you are correct. I was just creating/morphing my curve in HyperMesh.
I tried importing in iges format in rhino and started playing around with the instruction you suggested.
Indeed I was able to create a couple of perpendicular planes, nevertheless this didn;t go as expected.
I am attaching a .gh file with the curves as internalized data.
There are cases that the square sizes are not the same, but this brings in more work, as I would have to split the curve at the points where different sizes are expected.
Let’s just try the simple case as I am just learning how to proceed.
One thing that bothers me is the view panel where my curve is barely visible.

Thanks, more than a lot!

ring internalised.gh (21.9 KB)


ring_2021Jan26a.gh (20.8 KB)

I didn’t realize until after posting that you have two identical curves superimposed on each other? Why? That causes two sets (branches) or frames and two sets (branches) of rectangles.

No you don’t, it’s possible to control the rectangle sizes individually using one curve and one set of frames (planes).

I don’t know why that happened. Probably when I was moving stuff around. This is not even the whole shape that I need these operations to occur.
I will try to have a full case with consistent rectangular dimensions to begin with. I will update this post, probably tomorrow. The general idea behind that is to loft all this curves to get a solid body.

Anyhow, this is a great deal of help to me. No words to describe. Many many thanks!

In this case you probably want to use Sweep 1 instead of Loft but there are complications.

P.S. Especially because your curve is not “fair”.


ring_2021Jan26b.gh (27.0 KB)

This particular curve is not really “fair”, since this is the product of experimentation in HyperMesh and imports and exports of geometries in order to have a full procedural interlinking of different softwares (HM, Ansys, Rhino/Gh).
I believe the next one is going to be more “fair”. Let’s see. I will try your solutions alongside with a new curve/set of curves. I will update back!

Your experience makes it seem A LOT easier. A million thanks for getting involved, I would have been stuck.

You can rebuild the curve to make it more fair and use smaller rectangles to avoid kinks in the sweep.


ring_2021Jan26c.gh (28.9 KB)

Play with the ‘Count’ slider to ReB (Rebuild Curve)

Amazing information. Actually, rebuilding the curve is what I also needed and I had no idea that I could implement this in Grasshopper.
I will run the files tomorrow and hopefully I can report back the progress with awesome results.

@Joseph_Oster, you raise the standards for all the online communities. I really appreciate the information and the hands-on example that you cared to engage with.

1 Like

Hi everybody! Sorry for being a bit late to answer, @Joseph_Oster
I was finding information on the modules used in the scripts as well as trying out trying them out.
What I have done is that I have created another curve, this time not by hand, but from the extract midline instruction in HM. I imported the curve in rhino/gh and tried some combinations on some modules of the script such as the rebuild curve and the number of steps for the planar frames.
I am also investigating a couple more things where this post is probably going to over.
i) I need to input my own specific dimensions for the rectangles. I have done that by two panels and connected this submodule to the rectangle. Seems to be working, although now I think that the center of each frame does not reside on the curve (trial file attached).
ii) In my import there are 5 curves. One that is closed and another four that I will eventually need to connect to other sketch. When I try to run the script for all of the curves together only one curve gets generated and I have no idea why. I will eventually fix the curves’ connectivity (see below).
iii) Finally, I though of bringing in a csv pointcloud instead of preparing my curves to other CAD software and connecting in order to get the curve, as fitted by the respective slider and not rebuild the curve. I have tried to accomplish this but some points get connected in places that I didn’t want them to. How can I achieve this too? (trial_points file attached)

Thanks a lot!
ring_2021Jan28_trial.gh (12.2 KB) ring_2021Jan28_trial_points.gh (19.7 KB)

You did not internalize the curve in ring_2021Jan28_trial.gh

The points in ring_2021Jan28_trial_points.gh are a mess. There are duplicate points and extra points that appear to be out of sequence and not part of the curve. You might want to use IntCrv instead of Nurbs but the messy points are still a problem. And you should disconnect the slider from Nurbs ‘D’ (Degree) input.

Sorry for that. I think now both files are fixed. Can you check them out, please?
Regarding point (ii) above, do you think that this would be fixed if I had one curve instead of multiple curves as input?
Although I set the boolean parameter to false, the curve feels the urge to be closed as I understand, right?
ring_2021Jan28_trial.gh (37.5 KB) ring_2021Jan28_trial_points.gh (19.1 KB)

Rectangle dimensions are specified as a domain. If you use a slider or panel, the domains will be 0 to that value. To center the rectangle you need to create a domain using expressions on the inputs: “-x/2” on ‘A’ and “x/2” on ‘B’.


ring_2021Jan28a.gh (31.7 KB)

P.S. Your points in ring_2021Jan28_trial_points.gh are still garbage. The curve is following them but the extra points are messing up the result. GIGO (Garbage In, Garbage Out).

Without seeing a file, I have no idea why either. Please try to be more careful about posting files, I don’t like to waste my time looking at a problem over and over.

1 Like

It is obvious that I lack some basic knowledge :slight_smile: I have to go through more examples on this beautiful piece of software!
Probably I have done something wrong, since in the manage curve collections there can be seen a set of curves which are not really displayed. I apologize for that.
Also, you are right as I looked really really close to see the duplicate points. I don’t know why this happened as the points came by meshing the respective line body. I will investigate further on that, the creation of the curve based on the points and the rest of the model and will come back to you.

A million thanks!

Hi again!
There were some other issues that I needed to deal with, but I’m back again at this task.
I am trying really hard to understand what’s happening in this case. I have been searching around the forums and saw that many people face this issue. Nevertheless, trying out some of the stuff proposed did not really work.
The issue is that the frames that I am creating do not align for the different curves that I have declared, i.e., there seem to be flipped x,y dimensions and if I switch them manually, the still seem a bit rotated.
I attach the system (which is pretty much the same as the last time, didn’t include any of the failed trial since they would just clutter the system) with internalised curves. People doing similar things with what I’m trying to do loft instead of sweep but that’s the least of the issue.
Could you kindly take a look @Joseph_Oster, and of course anyone else willing to help?
Thanks a lot!
image|317x275
ring_2021Mar23a.gh (78.7 KB)


ring_2021Mar23b.gh (81.1 KB)