Hello everyone, I am a newbie to Grasshopper and I have a question about modeling.
In simple terms, this is a process of using two sections (cross sections) in a 3D curve to execute sweep1 to generate an underground tunnel model. However, the cross section cannot be perpendicular to the XY plane, resulting in a discontinuous cross section.
The entire underground tunnel model is divided into three types. Since the route is symmetrical in principle, the cross-sectional types on both sides are the same, and only the middle is different.
They are the middle section of the tunnel in the GH file, underpass type 1, and the approaches on both sides, a total of 5 units.
My idea is to divide the curve into 5 units, place the section on the curve using prep frame and orient, and use align frame to connect unit Y to ensure that the section is perpendicular to the XY plane.
But, something magical happened, the first units (0, 1, 2) were fine, but the 3rd and 4th were crooked. It would be fine if all the cross sections were not perpendicular to the XZ plane of the curve, but this situation only occurs in the partial cross sections.
I would like to know how to ensure that each section is perpendicular to the 3D curve so that no errors will occur when performing sweep1.
Sorry I have not been able to locate the relevant content in the file you’ve provided. Could you please provide the specific “problematic” Grasshopper file separately? Please ensure that all referenced geometry from Rhino is embedded into Grasshopper file via Internalise data. Thank you.
By the way, I think Z works better than Y for align plane. I added 7 white groups to this version that use Z instead of Y, then rotate plane by -0.5 * Pi(-90 degrees).
This version ‘c’ started with the idea that it’s better to have at least two perp frame sections per rail curve (one at the start and one at the end), aligned with Z to avoid twist. I started with this gray group to get pairs of planes, and only later added the white group to align them all with Z. Honestly, I see very little difference between aligned or not.
Going back to the original GH file in the first post, the tunnel sections are defined by sliders that use ‘t’ values, and more oddly, 1 is subtracted from all the slider values:
I’ve considered that a bad practice since my early days with GH because ‘t’ values change when Fit Curve or other rebuild curve methods are applied. So I’ve modified the code to use tunnel section lengths instead, which don’t change if the curve is rebuilt.