Arch: small bugfixes and optimisations
This commit is contained in:
parent
b32b227733
commit
c7bfaf2ed7
|
@ -335,12 +335,13 @@ class Component:
|
||||||
if not obj.Base.Shape.Wires[0].isClosed():
|
if not obj.Base.Shape.Wires[0].isClosed():
|
||||||
return obj.Base.Shape.copy()
|
return obj.Base.Shape.copy()
|
||||||
elif not(obj.Base.Shape.Solids):
|
elif not(obj.Base.Shape.Solids):
|
||||||
p1 = obj.Base.Shape.CenterOfMass
|
if hasattr(obj.Base.Shape,"CenterOfMass"):
|
||||||
v = self.getExtrusionVector(obj)
|
p1 = obj.Base.Shape.CenterOfMass
|
||||||
if v:
|
v = self.getExtrusionVector(obj)
|
||||||
p2 = p1.add(v)
|
if v:
|
||||||
import Part
|
p2 = p1.add(v)
|
||||||
return Part.Line(p1,p2).toShape()
|
import Part
|
||||||
|
return Part.Line(p1,p2).toShape()
|
||||||
else:
|
else:
|
||||||
p1 = FreeCAD.Vector()
|
p1 = FreeCAD.Vector()
|
||||||
v = self.getExtrusionVector(obj)
|
v = self.getExtrusionVector(obj)
|
||||||
|
|
|
@ -144,6 +144,7 @@ class _Space(ArchComponent.Component):
|
||||||
if obj.Base.isDerivedFrom("Part::Feature"):
|
if obj.Base.isDerivedFrom("Part::Feature"):
|
||||||
if obj.Base.Shape.Solids:
|
if obj.Base.Shape.Solids:
|
||||||
shape = obj.Base.Shape.Solids[0].copy()
|
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
|
# 2: if not, add all bounding boxes of considered objects and build a first shape
|
||||||
if shape:
|
if shape:
|
||||||
|
|
|
@ -682,9 +682,7 @@ class _Window(ArchComponent.Component):
|
||||||
print "Arch: Bad formatting of window parts definitions"
|
print "Arch: Bad formatting of window parts definitions"
|
||||||
|
|
||||||
base = self.processSubShapes(obj,base)
|
base = self.processSubShapes(obj,base)
|
||||||
if base:
|
self.applyShape(obj,base,pl)
|
||||||
if not base.isNull():
|
|
||||||
obj.Shape = base
|
|
||||||
|
|
||||||
def getSubVolume(self,obj,plac=None):
|
def getSubVolume(self,obj,plac=None):
|
||||||
"returns a subvolume for cutting in a base object"
|
"returns a subvolume for cutting in a base object"
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -161,26 +161,6 @@
|
||||||
<string>IFC export</string>
|
<string>IFC export</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<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>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user