How can I control the orientations of the sections at the ends of my polycurves for correct sweep objects?

I tried to create sweep objects via polycurves to build a structure system. However, as shown in my snippings, all the sections at the ends of my sweep objects just deviated.

It seemed that the orientations of these sections didn’t follow the tangent vectors on the second curve. And I just wanted the orientations of the sections at the ends of the sweep objects to follow the tangent vectors of the second curve as what I did for the first curve. How can I align or control the orientation of the sections at the ends of those polycurves (or sweep objects) in order to achieve the correct sweep objects?

I’ve uploaded my example .3dm file and .gh definition.

beams and columns.3dm (91.2 KB) beams and columns.gh (10.5 KB)beams and columns-v6.3dm (54.8 KB)

You can use the horizontal frames component

curve_horizontal_frames.gh (9.0 KB)

1 Like

It appears @benzmclaren did that on the other curve but without any GH file to examine, or even an image of the code, we have no way to know.

1 Like

I’ve uploaded my GH file. And I swept my sections via polycurves. So I just wanted to control the orientation of each segment of each polycurve in order to make the ends of those sweep objects follow the second curve.

Thank you for your advice. It seems that your code just confirm the beginning of a sweep object. And I’ve already finished it in my code. My problem is actually related to the end of polycurve which is located on the second curve(the curve where I drew a blue circle for one of the sweep objects on it)

Unable to open R7 .3dm file. Please either “File | Save as” R6 or internalize your geometry in the GH file.

Sorry, V6 file has been uploaded.

I see the problem but there are so many things about this file I would do differently, I’m afraid to start.

You need HFrames on both base curves, organized as pairs for each of your rail curves. But I’m not sure you’ll like the result, probably twisted from one end to the other.

P.S. Yup, it’s a twisted ugly mess, The section curve is oriented correctly along both base curves but the Sweep1 gets twisted. I’m not surprised it fails.


beams_columns_2020Dec24a.gh (11.4 KB)

Curves are internalized, no need for Rhino file.

This hack is a little better using HFrames on all four curves. The columns look correct, the cross beam at the top is the only part twisted? But if you consider that the pair of columns on each rail are not square to each other (or the same height), what do you really expect? A tapered beam section?


beams_columns_2020Dec24b.gh (8.6 KB)

Thank you for your try! Although these two GH files still didn’t meet the requirement of the correct sweep objects to create structure frames, your solution just gave me a clue that there could be more than one sectional curves to control the orientation of sweeping. There’s possibility to control the orientation of every section of a straight line (P.S.: it’s the line of beam, not the second curve on the ground I mentioned before) in order to correct the final sweep objects.

Here’s a simple diagram about what I’m going to correct for my next step.

It seems that in order to overcome the twisted sweep objects, I have to achieve the sections of all the straight lines. I guess this might achieve correct sweeping orientations.

Update: My idea for the next step failed, GH just gave me errors. I’m still considering how to achieve a consistent swep objects.

Here is my failed GH file.


beams_columns_2020Dec24a-revising.gh (17.4 KB)

I tried to define all the six sections of a polyline. But it seemed that GH didn’t support intersecting planes in a sweep.

One of the problems is the corner of your structure. Another problem is that most of the three segment “rails” first and last segment are not perpendicular to the XY plane so horizontal plane can’t be used, or your oriented (steel) section has an incorrect cross section.

One small detail is your internalized cross section. You had it in one quadrant of the coordinate system. I’d choose to align the section symmetric with the X axis. The midpoint of the longest side on the origin. Orienting the section onto another plane requires just minimal effort if you do it that way.

Attached is a different approach. I created split surfaces with local miter planes.
All parts are closed. Not sure what you want to do with the corners.

beams_columns_2020Dec24a-revising.gh (25.7 KB)

1 Like

Thank you for your brilliant solution! It really helps me to understand my GH file!

Actually I’m exploring an example of architecture structure. And I checked my architecture precedent related to this GH file again. I think my current approach is wrong. And I’m testing some new approaches which are different to my current GH file. I’ll try an approach related to Intersect - Contour in Grasshopper and see if I can generate some coplanar sweep objects.

Here are some pictures of my precedent by Kris Yao Artech:

Yes that’s much different. You can do this with section planes.

2 Likes

Grasshopper has its quirks but there are deeper problems with this geometry, based on at least two flawed assumptions.

  • Dividing four curves and connecting the dots does not guarantee the columns will be vertical.
  • Fixing the orientation issue creates a different problem - the columns are no longer square to each other, making the top beam connection between skewed columns problematic.


beams_columns_2020Dec25a.gh (16.5 KB)


beams_columns_2020Dec25b.gh (25.8 KB)

2 Likes

truly.

You should have posted those picture in the first post …
Those sections are parallel… use contour.

3 Likes

Thank you for your great idea! Actually I think these spatial polycurves may not be suitable for C-shaped steel components. So I’m going to explore some other approaches. BTW, you can browse the images of my architecture precedent above.

What about making the orientation symmetrical?


beams_columns_2020Dec25c.gh (16.0 KB)

Ho Ho Ho.

4 Likes

Fantastic!!! :heart_eyes: