Notifications
Clear all
[Closed] Detecting faces that are pointing up
Mar 16, 2015 10:45 am
What kind of calculus should you perform to select the faces of a geometry (say a cube) whose normals are pointing in a specific direction (say z axis)?
4 Replies
Mar 16, 2015 10:45 am
(
axis = [0,0,1]
for j = 1 to $.numfaces do
(
normal = polyop.getfacenormal $ j
format "face:% dot:%
" j (dot normal axis)
)
)
1 = face parallel to the axis.
-1 = face parallel to the axis in opposite direction.
0 = face perpendicular to the axis
>0 = face pointing in the axis direction (angle >0 and <90 degrees)
<0 = face pointing opposite to the axis
Mar 16, 2015 10:45 am
You can reach the graphite modelling tools too…
<bool>PolyToolsSelect.Normal <integer>axis <float>value <bool>invert