Automatic arch wall extrusion direction
Re: Automatic arch wall extrusion direction
The calculated normal is correct IMO.
- Attachments
-
- Test_ DraftLine_ Rotation_ 01_normal.FCStd
- (17.35 KiB) Downloaded 11 times
Re: Automatic arch wall extrusion direction
OK, noted, thanks mentoring 
On get_normal(), I would somehow skip checking view direction for the purpose discussed in this thread.

On get_normal(), I would somehow skip checking view direction for the purpose discussed in this thread.
Code: Select all
def get_normal(shape, tol=-1):
...
Default behaviour :
If the Gui is up the normal is checked against the current view direction.
If it points away from the viewer it is reversed.
...
if App.GuiUp:
v_dir = gui_utils.get_3d_view().getViewDirection()
# TODO < math.pi/2 or < 0.78
if normal.getAngle(v_dir) < math.pi/2:
normal = normal.negative()
Re: Automatic arch wall extrusion direction
Just use get_shape_normal instead of get_normal then.
Re: Automatic arch wall extrusion direction
Would someone please test before I make a PR 
EDIT - Thanks, Roy_043, basically your codes.

EDIT - Thanks, Roy_043, basically your codes.