Reply To: Railing Panel info

Péter Baksa

Sorry, I didn’t notice the name of the global. It’s the set of global variables starting with RAILINGPANEL_ that you need.

With somewhat custom settings, it is possible that a panel has more than four sides (panels connecting with different heights at a landing, or columns offset from the end of the landing: the corners might be cut off with horizontal planes). To handle these cases too, there is RAILINGPANEL_GEOMETRY that is the contour polygon, and RAILINGPANEL_UNCUT_GEOMETRY that is a four-sided polygon before the cuts.

RAILINGPANEL_FLAGS[i][2] tells which side of the panel is the i-th edge (1 – bottom, 2 – end, 3 – top, 4 – start) You can derive the height from RAILINGPANEL_UNCUT_GEOMETRY start/end edge.

The slope can vary on a winding stair. RAILINGPANEL_GEOMETRY can have multiple segments on the top/bottom sides. For wires, the average slope can be computed from the first point of the bottom side and the first point of the end side of RAILINGPANEL_UNCUT_GEOMETRY.

Slanted/skewed railings (RAILINGPANEL_SLANT_ANGLE, RAILINGPANEL_SKEW_ANGLE) need to be handled carefully.
Curved panels are also special: RAILINGPANEL_TYPE tells the overall shape of the railing. You might not want to handle curved panels at all.
Curves are given in a format similar to PolyOperations: start x, y, central angle.

Péter Baksa
Library Platform, Software Engineer