I am trying to design a Parametric Railing on stairs and ramp, however the prep frames are always perpendicular to the curve and not to C Plane. I tried to fix it after reading multiple forums and discussions but could not crack it. Would be great if someone could me guide me and help in resolving this issue.
PARAMETRIC RAILING_06012026.3dm (78.9 KB)
PARAMETRIC RAILING.gh (25.8 KB)
One of the problems in your definition is due to the brep | plane intersection not only creating the sections right at the plane origin but also at all other places where the plane has an intersection with the brep. To get just one intersection curve per plane, one option is to first create a rectangle on each plane and intersect that with the brep.
A second problem is how you created the brep with a sweep1. There is a self intersection. This can cause problems.
PARAMETRIC RAILING.gh (29.1 KB)
PS¹: nice array of sliders.
PS²: It’s ‘perp’ not ‘prep’ frames. ‘Perp’ for perpendicular. I fixed the topic title for you…
Oh yes it should be ‘Perp’ not ‘Prep’ thanks a lot Martin. I am trying to rotate the ones on steps and ramps perpendicular to C Plane. I tried using z vector>rotate plan>A(Align Perpframes) but didnt work. I also tried the attaching the Z Vector>XY plane >A (Align Perpframes) but still it failed. Any idea what might work?
So all Y axis should be aligned with Z world?
You can use the cross product to align the planes.
PARAMETRIC RAILING.gh (23.1 KB)
Pls see attached screenshot, I am trying to rotate the frames perpendicular to C Plane.
Oh thats perfect. Amazing, thank you so much Martin. You saved my day…