Arch: small fix in Arch Frame
This commit is contained in:
parent
b2a341540e
commit
46b1987fb9
|
@ -109,12 +109,15 @@ class _Frame(ArchComponent.Component):
|
||||||
baseprofile = Part.makeCompound(f)
|
baseprofile = Part.makeCompound(f)
|
||||||
shapes = []
|
shapes = []
|
||||||
normal = DraftGeomUtils.getNormal(obj.Base.Shape)
|
normal = DraftGeomUtils.getNormal(obj.Base.Shape)
|
||||||
for wire in obj.Base.Shape.Wires:
|
#for wire in obj.Base.Shape.Wires:
|
||||||
e = wire.Edges[0]
|
for e in obj.Base.Shape.Edges:
|
||||||
|
#e = wire.Edges[0]
|
||||||
bvec = DraftGeomUtils.vec(e)
|
bvec = DraftGeomUtils.vec(e)
|
||||||
bpoint = e.Vertexes[0].Point
|
bpoint = e.Vertexes[0].Point
|
||||||
profile = baseprofile.copy()
|
profile = baseprofile.copy()
|
||||||
profile.translate(bpoint.sub(profile.Placement.Base))
|
#basepoint = profile.Placement.Base
|
||||||
|
basepoint = profile.CenterOfMass
|
||||||
|
profile.translate(bpoint.sub(basepoint))
|
||||||
if obj.Align:
|
if obj.Align:
|
||||||
axis = profile.Placement.Rotation.multVec(FreeCAD.Vector(0,0,1))
|
axis = profile.Placement.Rotation.multVec(FreeCAD.Vector(0,0,1))
|
||||||
angle = bvec.getAngle(axis)
|
angle = bvec.getAngle(axis)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user