BIM: fixes stirrups placement in ifc export

Fixes: https://github.com/amrit3701/FreeCAD-Reinforcement/issues/223
This commit is contained in:
SurajDadral
2025-01-03 00:24:17 +05:30
committed by Yorik van Havre
parent 03c167ec47
commit e15285ae41

View File

@@ -158,13 +158,13 @@ class _Rebar(ArchComponent.Component):
axis = DraftGeomUtils.getNormal(obj.Base.Shape)
if not axis:
axis = obj.Base.Placement.Rotation.multVec(FreeCAD.Vector(0,0,-1))
size = 0
if father:
size = (ArchCommands.projectToVector(father.Shape.copy(),axis)).Length
if hasattr(obj,"Direction"):
if not DraftVecUtils.isNull(obj.Direction):
axis = FreeCAD.Vector(obj.Direction)
axis.normalize()
size = 0
if father:
size = (ArchCommands.projectToVector(father.Shape.copy(),axis)).Length
if hasattr(obj,"Distance"):
if obj.Distance.Value:
size = obj.Distance.Value