Arch: Fixed placement of rebars in IFC export

This commit is contained in:
Yorik van Havre
2022-03-25 13:41:45 +01:00
parent ca9fb5400c
commit b704454e33
2 changed files with 4 additions and 3 deletions

View File

@@ -277,10 +277,10 @@ class _Rebar(ArchComponent.Component):
wire = DraftGeomUtils.filletWire(wire,radius)
wires = []
if obj.Amount == 1:
if size:
if size and father:
offset = DraftVecUtils.scaleTo(axis,size/2)
else:
offset = axis
offset = FreeCAD.Vector()
wire.translate(offset)
wires.append(wire)
else:

View File

@@ -1704,7 +1704,7 @@ def getIfcTypeFromObj(obj):
ifctype = obj.IfcType.replace(" ","")
elif dtype in ["App::Part","Part::Compound"]:
ifctype = "IfcElementAssembly"
elif dtype in ["App::DocumentObjctGroup"]:
elif dtype in ["App::DocumentObjectGroup"]:
ifctype = "IfcGroup"
else:
ifctype = dtype
@@ -2030,6 +2030,7 @@ def getRepresentation(
# convert to meters
r = rdata[1] * preferences['SCALE_FACTOR']
for w in rdata[0]:
w.Placement = w.Placement.multiply(obj.getGlobalPlacement())
w.scale(preferences['SCALE_FACTOR'])
cur = createCurve(ifcfile,w)
shape = ifcfile.createIfcSweptDiskSolid(cur,r)