Skip to content

Commit

Permalink
Arch: small bugfixes and optimisations
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Aug 3, 2014
1 parent b32b227 commit c7bfaf2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 32 deletions.
13 changes: 7 additions & 6 deletions src/Mod/Arch/ArchComponent.py
Expand Up @@ -335,12 +335,13 @@ def getAxis(self,obj):
if not obj.Base.Shape.Wires[0].isClosed():
return obj.Base.Shape.copy()
elif not(obj.Base.Shape.Solids):
p1 = obj.Base.Shape.CenterOfMass
v = self.getExtrusionVector(obj)
if v:
p2 = p1.add(v)
import Part
return Part.Line(p1,p2).toShape()
if hasattr(obj.Base.Shape,"CenterOfMass"):
p1 = obj.Base.Shape.CenterOfMass
v = self.getExtrusionVector(obj)
if v:
p2 = p1.add(v)
import Part
return Part.Line(p1,p2).toShape()
else:
p1 = FreeCAD.Vector()
v = self.getExtrusionVector(obj)
Expand Down
1 change: 1 addition & 0 deletions src/Mod/Arch/ArchSpace.py
Expand Up @@ -144,6 +144,7 @@ def getShape(self,obj):
if obj.Base.isDerivedFrom("Part::Feature"):
if obj.Base.Shape.Solids:
shape = obj.Base.Shape.Solids[0].copy()
shape = shape.removeSplitter()

# 2: if not, add all bounding boxes of considered objects and build a first shape
if shape:
Expand Down
4 changes: 1 addition & 3 deletions src/Mod/Arch/ArchWindow.py
Expand Up @@ -682,9 +682,7 @@ def execute(self,obj):
print "Arch: Bad formatting of window parts definitions"

base = self.processSubShapes(obj,base)
if base:
if not base.isNull():
obj.Shape = base
self.applyShape(obj,base,pl)

def getSubVolume(self,obj,plac=None):
"returns a subvolume for cutting in a base object"
Expand Down
6 changes: 3 additions & 3 deletions src/Mod/Arch/Arch_rc.py

Large diffs are not rendered by default.

20 changes: 0 additions & 20 deletions src/Mod/Arch/Resources/ui/archprefs-import.ui
Expand Up @@ -161,26 +161,6 @@
<string>IFC export</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_3">
<property name="toolTip">
<string>If this is checked, a text file will be exported together with the ifc file, containing the list of exported objects, for verification purposes.</string>
</property>
<property name="text">
<string>Save a list of exported objects</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>IfcExportList</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
Expand Down

0 comments on commit c7bfaf2

Please sign in to comment.