Skip to content

Commit

Permalink
Update ArchComponent.py
Browse files Browse the repository at this point in the history
Manual edit to avoid merge conflicts.
  • Loading branch information
Roy-043 committed Feb 11, 2023
1 parent 1527793 commit 0ebd66a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Mod/Arch/ArchComponent.py
Expand Up @@ -436,7 +436,7 @@ def clone(self,obj):
if obj.CloneOf:
if (Draft.getType(obj.CloneOf) == Draft.getType(obj)) or (Draft.getType(obj) in ["Component","BuildingPart"]):
pl = obj.Placement
## TODO use Part.Shape() instead ?
## TODO use Part.Shape() instead?
obj.Shape = obj.CloneOf.Shape.copy()
obj.Placement = pl
for prop in ["Length","Width","Height","Thickness","Area","PerimeterLength","HorizontalArea","VerticalArea"]:
Expand Down Expand Up @@ -634,7 +634,7 @@ def rebase(self,shape,hint=None):

shapes = []
for s in shape:
## TODO use Part.Shape() instead ?
## TODO use Part.Shape() instead?
s = s.copy()
s.translate(v.negative())
s.rotate(FreeCAD.Vector(0, 0, 0),
Expand Down Expand Up @@ -745,7 +745,7 @@ def processSubShapes(self,obj,base,placement=None):
base = base.fuse(add)
elif hasattr(o,'Shape'):
if o.Shape and not o.Shape.isNull() and o.Shape.Solids:
## TODO use Part.Shape() instead ?
## TODO use Part.Shape() instead?
s = o.Shape.copy()
if placement:
# see https://forum.freecadweb.org/viewtopic.php?p=579754#p579754
Expand Down Expand Up @@ -790,6 +790,7 @@ def processSubShapes(self,obj,base,placement=None):
if hasattr(o,"Placement"):
# see https://forum.freecadweb.org/viewtopic.php?p=579754#p579754
subvolume.Placement = o.Placement.multiply(subvolume.Placement)

if subvolume:
if base.Solids and subvolume.Solids:
if placement:
Expand All @@ -804,7 +805,7 @@ def processSubShapes(self,obj,base,placement=None):
if o.Shape:
if not o.Shape.isNull():
if o.Shape.Solids and base.Solids:
## TODO
## TODO use Part.Shape() instead?
s = o.Shape.copy()
if placement:
# see https://forum.freecadweb.org/viewtopic.php?p=579754#p579754
Expand Down Expand Up @@ -856,7 +857,7 @@ def spread(self,obj,shape,placement=None):
if points:
shps = []
for p in points:
## TODO use Part.Shape() instead ?
## TODO use Part.Shape() instead?
sh = shape.copy()
sh.translate(p)
shps.append(sh)
Expand Down

0 comments on commit 0ebd66a

Please sign in to comment.