Skip to content

Commit

Permalink
Calculate length of rebar derived from Part::Helix
Browse files Browse the repository at this point in the history
  • Loading branch information
SurajDadral authored and yorikvanhavre committed Sep 8, 2020
1 parent 3051b75 commit 03d273c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Mod/Arch/ArchRebar.py
Expand Up @@ -662,6 +662,8 @@ def getLengthOfRebar(rebar):
for geo in base.Geometry:
length += geo.length()
return length
elif base.isDerivedFrom("Part::Helix"):
return base.Shape.Wires[0].Length
else:
FreeCAD.Console.PrintError("Cannot calculate rebar length from its base object\n")
return None
Expand Down

0 comments on commit 03d273c

Please sign in to comment.