Hello,
To get the normal automatically my workflow is the following :
Draw a Draft/Dwire on whatever working plane.
Set the Make Face property of the Dwire to true.
Select the face and use Draft/Trim to make an extrude (the extrude will be normal to the face and you can choose the direction).
Then I create a structure from the Extrude object.
Structure in xz-plane
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Structure in xz-plane
Formations - Assistance - Développement : https://freecad-france.com
Re: Structure in xz-plane
Ok!
Now Structures work for Circles, Rectangles. Polygons and also b-splines and closed DWires in the same way. Extruding normal to the face by default.
Might be useful for others as well. (If there’s no adverse effects that pops up!)
That gave me an idea. I checked the code for Draft extrude and then I changed the line 607 in ArchStructure.py to replicate the one that is used in DraftTools, normal=obj.Base.Shape.Faces[0].normalAt(.5,.5) :Select the face and use Draft/Trim to make an extrude (the extrude will be normal to the face and you can choose the direction).
Code: Select all
if not base:
if not height:
return
if obj.Normal == Vector(0,0,0):
#Old line p = FreeCAD.Placement(obj.Base.Placement)
#Old line normal = p.Rotation.multVec(normal)
normal=obj.Base.Shape.Faces[0].normalAt(.5,.5)
else:
normal = Vector(obj.Normal)
Might be useful for others as well. (If there’s no adverse effects that pops up!)