Merge branch 'master' of ssh://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad

This commit is contained in:
wmayer 2013-02-17 08:28:23 +01:00
commit 374370d3f4
17 changed files with 32954 additions and 38064 deletions

View File

@ -21,6 +21,8 @@
#* *
#***************************************************************************
#### WARNING: CELL OBJECT IS OBSOLETED
import FreeCAD,FreeCADGui,Draft,ArchComponent,ArchCommands
from FreeCAD import Vector
from PyQt4 import QtCore

View File

@ -78,7 +78,7 @@ def addComponents(objectsList,host):
if not o in c:
c.append(o)
host.Group = c
elif tp in ["Wall","Structure"]:
elif tp in ["Wall","Structure","Window","Roof"]:
a = host.Additions
if hasattr(host,"Axes"):
x = host.Axes

View File

@ -37,7 +37,7 @@ def addToComponent(compobject,addobject,mod=None):
to override the default.'''
import Draft
if compobject == addobject: return
# first check is already there
# first check zis already there
found = False
attribs = ["Additions","Objects","Components","Subtractions","Base"]
for a in attribs:
@ -266,13 +266,120 @@ class Component:
self.Type = "Component"
self.Subvolume = None
def __getstate__(self):
return self.Type
def __setstate__(self,state):
if state:
self.Type = state
def getSubVolume(self,base,width,plac=None):
"returns a subvolume from a base object"
import Part,DraftVecUtils
# finding biggest wire in the base shape
max_length = 0
f = None
for w in base.Shape.Wires:
if w.BoundBox.DiagonalLength > max_length:
max_length = w.BoundBox.DiagonalLength
f = w
if f:
f = Part.Face(f)
n = f.normalAt(0,0)
v1 = DraftVecUtils.scaleTo(n,width*1.1) # we extrude a little more to avoid face-on-face
f.translate(v1)
v2 = DraftVecUtils.neg(v1)
v2 = DraftVecUtils.scale(v1,-2)
f = f.extrude(v2)
if plac:
f.Placement = plac
return f
return None
def hideSubobjects(self,obj,prop):
"Hides subobjects when a subobject lists change"
if prop in ["Additions","Subtractions"]:
if hasattr(obj,prop):
for o in getattr(obj,prop):
o.ViewObject.hide()
def processSubShapes(self,obj,base):
"Adds additions and subtractions to a base shape"
import Draft
# treat additions
for o in obj.Additions:
if base:
if base.isNull():
base = None
if (Draft.getType(o) == "Window") or (Draft.isClone(o,"Window")):
if base:
# windows can be additions or subtractions, treated the same way
if hasattr(self,"Width"):
width = self.Width
else:
b = base.BoundBox
width = max(b.XLength,b.YLength,b.ZLength)
if Draft.isClone(o,"Window"):
window = o.Objects[0]
else:
window = o
if window.Base and width:
f = self.getSubVolume(window.Base,width)
if f:
if base.Solids and f.Solids:
base = base.cut(f)
elif o.isDerivedFrom("Part::Feature"):
if o.Shape:
if not o.Shape.isNull():
if o.Shape.Solids:
if base:
if base.Solids:
base = base.fuse(o.Shape)
else:
base = o.Shape
# treat subtractions
for o in obj.Subtractions:
if base:
if base.isNull():
base = None
if base:
if (Draft.getType(o) == "Window") or (Draft.isClone(o,"Window")):
# windows can be additions or subtractions, treated the same way
if hasattr(self,"Width"):
width = self.Width
else:
b = base.BoundBox
width = max(b.XLength,b.YLength,b.ZLength)
if Draft.isClone(o,"Window"):
window = o.Objects[0]
else:
window = o
if window.Base and width:
f = self.getSubVolume(window.Base,width)
if f:
if base.Solids and f.Solids:
base = base.cut(f)
elif o.isDerivedFrom("Part::Feature"):
if o.Shape:
if not o.Shape.isNull():
if o.Shape.Solids and base.Solids:
base = base.cut(o.Shape)
return base
class ViewProviderComponent:
"A default View Provider for Component objects"
def __init__(self,vobj):

View File

@ -30,7 +30,7 @@ __title__="FreeCAD Roof"
__author__ = "Yorik van Havre"
__url__ = "http://free-cad.sourceforge.net"
def makeRoof(baseobj,facenr=1,angle=45,name=str(translate("Arch","Roof"))):
def makeRoof(baseobj=None,facenr=1,angle=45,name=str(translate("Arch","Roof"))):
'''makeRoof(baseobj,[facenr],[angle],[name]) : Makes a roof based on a
face from an existing object. You can provide the number of the face
to build the roof on (default = 1), the angle (default=45) and a name (default
@ -38,7 +38,8 @@ def makeRoof(baseobj,facenr=1,angle=45,name=str(translate("Arch","Roof"))):
obj = FreeCAD.ActiveDocument.addObject("Part::FeaturePython",name)
_Roof(obj)
_ViewProviderRoof(obj.ViewObject)
obj.Base = baseobj
if baseobj:
obj.Base = baseobj
obj.Face = facenr
obj.Angle = angle
return obj
@ -92,12 +93,13 @@ class _Roof(ArchComponent.Component):
str(translate("Arch","The angle of this roof")))
obj.addProperty("App::PropertyInteger","Face","Base",
str(translate("Arch","The face number of the base object used to build this roof")))
self.Type = "Structure"
self.Type = "Roof"
def execute(self,obj):
self.createGeometry(obj)
def onChanged(self,obj,prop):
self.hideSubobjects(obj,prop)
if prop in ["Base","Face","Angle","Additions","Subtractions"]:
self.createGeometry(obj)
@ -105,6 +107,7 @@ class _Roof(ArchComponent.Component):
import Part, math, DraftGeomUtils
pl = obj.Placement
base = None
if obj.Base and obj.Angle:
w = None
if obj.Base.isDerivedFrom("Part::Feature"):
@ -133,14 +136,18 @@ class _Roof(ArchComponent.Component):
dv.normalize()
dv.scale(d,d,d)
shps.append(f.extrude(dv))
c = shps.pop()
base = shps.pop()
for s in shps:
c = c.common(s)
c = c.removeSplitter()
if not c.isNull():
obj.Shape = c
base = base.common(s)
base = base.removeSplitter()
if not base.isNull():
if not DraftGeomUtils.isNull(pl):
obj.Placement = pl
base.Placement = pl
base = self.processSubShapes(obj,base)
if base:
if not base.isNull():
obj.Shape = base
class _ViewProviderRoof(ArchComponent.ViewProviderComponent):
"A View Provider for the Roof object"

View File

@ -108,6 +108,7 @@ class _Structure(ArchComponent.Component):
self.createGeometry(obj)
def onChanged(self,obj,prop):
self.hideSubobjects(obj,prop)
if prop in ["Base","Length","Width","Height","Normal","Additions","Subtractions","Axes"]:
self.createGeometry(obj)
@ -189,20 +190,9 @@ class _Structure(ArchComponent.Component):
base = Part.Face(base)
base = base.extrude(normal)
base = self.processSubShapes(obj,base)
if base:
# applying adds and subs
if not base.isNull():
for app in obj.Additions:
if hasattr(app,"Shape"):
if not app.Shape.isNull():
base = base.fuse(app.Shape)
app.ViewObject.hide() # to be removed
for hole in obj.Subtractions:
if hasattr(hole,"Shape"):
if not hole.Shape.isNull():
base = base.cut(hole.Shape)
hole.ViewObject.hide() # to be removed
# applying axes
pts = self.getAxisPoints(obj)
apl = self.getAxisPlacement(obj)
@ -220,6 +210,7 @@ class _Structure(ArchComponent.Component):
obj.Shape = Part.makeCompound(fsh)
# finalizing
else:
if base:
if not base.isNull():

View File

@ -110,7 +110,8 @@ class _CommandWall:
self.Height = 1
self.Align = "Center"
self.continueCmd = False
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
self.JOIN_WALLS = p.GetBool("joinWallSketches")
sel = FreeCADGui.Selection.getSelection()
done = False
self.existing = []
@ -145,7 +146,6 @@ class _CommandWall:
FreeCADGui.Snapper.getPoint(last=self.points[0],callback=self.getPoint,movecallback=self.update,extradlg=self.taskbox())
elif len(self.points) == 2:
import Part
add = False
l = Part.Line(self.points[0],self.points[1])
self.tracker.finalize()
FreeCAD.ActiveDocument.openTransaction(str(translate("Arch","Create Wall")))
@ -153,19 +153,25 @@ class _CommandWall:
FreeCADGui.doCommand('import Part')
FreeCADGui.doCommand('trace=Part.Line(FreeCAD.'+str(l.StartPoint)+',FreeCAD.'+str(l.EndPoint)+')')
if not self.existing:
# no existing wall snapped, just add a default wall
self.addDefault(l)
else:
w = joinWalls(self.existing)
if w:
if areSameWallTypes([w,self]):
FreeCADGui.doCommand('FreeCAD.ActiveDocument.'+w.Name+'.Base.addGeometry(trace)')
if self.JOIN_WALLS:
# join existing subwalls first if possible, then add the new one
w = joinWalls(self.existing)
if w:
if areSameWallTypes([w,self]):
FreeCADGui.doCommand('FreeCAD.ActiveDocument.'+w.Name+'.Base.addGeometry(trace)')
else:
# if not possible, add new wall as addition to the existing one
self.addDefault(l)
FreeCADGui.doCommand('Arch.addComponents(FreeCAD.ActiveDocument.'+FreeCAD.ActiveDocument.Objects[-1].Name+',FreeCAD.ActiveDocument.'+w.Name+')')
else:
self.addDefault(l)
add = True
else:
# add new wall as addition to the first existing one
self.addDefault(l)
if add:
FreeCADGui.doCommand('Arch.addComponents(FreeCAD.ActiveDocument.'+FreeCAD.ActiveDocument.Objects[-1].Name+',FreeCAD.ActiveDocument.'+w.Name+')')
FreeCADGui.doCommand('Arch.addComponents(FreeCAD.ActiveDocument.'+FreeCAD.ActiveDocument.Objects[-1].Name+',FreeCAD.ActiveDocument.'+self.existing[0].Name+')')
FreeCAD.ActiveDocument.commitTransaction()
FreeCAD.ActiveDocument.recompute()
if self.continueCmd:
@ -267,31 +273,10 @@ class _Wall(ArchComponent.Component):
self.createGeometry(obj)
def onChanged(self,obj,prop):
self.hideSubobjects(obj,prop)
if prop in ["Base","Height","Width","Align","Additions","Subtractions"]:
self.createGeometry(obj)
def getSubVolume(self,base,width,plac=None):
"returns a subvolume from a base object"
import Part
max_length = 0
f = None
for w in base.Shape.Wires:
if w.BoundBox.DiagonalLength > max_length:
max_length = w.BoundBox.DiagonalLength
f = w
if f:
f = Part.Face(f)
n = f.normalAt(0,0)
v1 = DraftVecUtils.scaleTo(n,width)
f.translate(v1)
v2 = DraftVecUtils.neg(v1)
v2 = DraftVecUtils.scale(v1,-2)
f = f.extrude(v2)
if plac:
f.Placement = plac
return f
return None
def createGeometry(self,obj):
"builds the wall shape"
@ -361,11 +346,11 @@ class _Wall(ArchComponent.Component):
base = obj.Base.Shape.copy()
if base.Solids:
pass
elif base.Faces and (not obj.ForceWire):
elif (len(base.Faces) == 1) and (not obj.ForceWire):
if height:
norm = normal.multiply(height)
base = base.extrude(norm)
elif base.Wires:
elif len(base.Wires) == 1:
temp = None
for wire in obj.Base.Shape.Wires:
sh = getbase(wire)
@ -376,9 +361,10 @@ class _Wall(ArchComponent.Component):
base = temp
elif base.Edges:
wire = Part.Wire(base.Edges)
sh = getbase(wire)
if sh:
base = sh
if wire:
sh = getbase(wire)
if sh:
base = sh
else:
base = None
FreeCAD.Console.PrintError(str(translate("Arch","Error: Invalid base object")))
@ -392,44 +378,10 @@ class _Wall(ArchComponent.Component):
else:
FreeCAD.Console.PrintWarning(str(translate("Arch","This mesh is an invalid solid")))
obj.Base.ViewObject.show()
base = self.processSubShapes(obj,base)
if base:
for app in obj.Additions:
if Draft.getType(app) == "Window":
# window
if app.Base and obj.Width:
f = self.getSubVolume(app.Base,width)
if f:
base = base.cut(f)
elif Draft.isClone(app,"Window"):
if app.Objects[0].Base and width:
f = self.getSubVolume(app.Objects[0].Base,width,app.Placement)
if f:
base = base.cut(f)
elif app.isDerivedFrom("Part::Feature"):
if app.Shape:
if not app.Shape.isNull():
base = base.fuse(app.Shape)
app.ViewObject.hide() #to be removed
for hole in obj.Subtractions:
if Draft.getType(hole) == "Window":
# window
if hole.Base and obj.Width:
f = self.getSubVolume(hole.Base,width)
if f:
base = base.cut(f)
elif Draft.isClone(hole,"Window"):
if hole.Objects[0].Base and width:
f = self.getSubVolume(hole.Objects[0].Base,width,hole.Placement)
if f:
base = base.cut(f)
elif hole.isDerivedFrom("Part::Feature"):
if hole.Shape:
if not hole.Shape.isNull():
base = base.cut(hole.Shape)
hole.ViewObject.hide() # to be removed
if not base.isNull():
if base.isValid() and base.Solids:
if base.Volume < 0:

View File

@ -120,12 +120,14 @@ class _Window(ArchComponent.Component):
self.createGeometry(obj)
def onChanged(self,obj,prop):
self.hideSubobjects(obj,prop)
if prop in ["Base","WindowParts"]:
self.createGeometry(obj)
def createGeometry(self,obj):
import Part, DraftGeomUtils
pl = obj.Placement
base = None
if obj.Base:
if obj.Base.isDerivedFrom("Part::Feature"):
if hasattr(obj,"WindowParts"):
@ -163,9 +165,14 @@ class _Window(ArchComponent.Component):
shape.translate(zov)
shapes.append(shape)
if shapes:
obj.Shape = Part.makeCompound(shapes)
base = Part.makeCompound(shapes)
if not DraftGeomUtils.isNull(pl):
obj.Placement = pl
base.Placement = pl
base = self.processSubShapes(obj,base)
if base:
if not base.isNull():
obj.Shape = base
class _ViewProviderWindow(ArchComponent.ViewProviderComponent):
"A View Provider for the Window object"

File diff suppressed because it is too large Load Diff

View File

@ -26,33 +26,41 @@ class ArchWorkbench(Workbench):
Icon = """
/* XPM */
static char * arch_xpm[] = {
"16 16 9 1",
"16 16 17 1",
" c None",
". c #543016",
"+ c #6D2F08",
"@ c #954109",
"# c #874C24",
"$ c #AE6331",
"% c #C86423",
"& c #FD7C26",
"* c #F5924F",
". c #373936",
"+ c #464845",
"@ c #545553",
"# c #626461",
"$ c #6B6D6A",
"% c #727471",
"& c #7E807D",
"* c #8A8C89",
"= c #949693",
"- c #A1A3A0",
"; c #ADAFAC",
"> c #BEC1BD",
", c #C9CBC8",
"' c #D9DCD8",
") c #E4E6E3",
"! c #FDFFFC",
" ",
" ",
" # ",
" ***$# ",
" .*******. ",
" *##$****#+ ",
" #**%&&##$#@@ ",
".$**%&&&&+@@+ ",
"@&@#$$%&&@@+.. ",
"@&&&%#.#$#+..#$.",
" %&&&&+%#.$**$@+",
" @%&+&&&$##@@+",
" @.&&&&&@@@ ",
" @%&&@@ ",
" @+ ",
" "};
"""
" & ",
" >)'-% ",
" #,))))),@ ",
" >%*-))))*# ",
" $')>!)**>%*% ",
"@=')>!!!!$==# ",
"=!=**;'!!&=$++ ",
"=!!!)*@&-%#@#&-.",
" ,!!!!#>&#=,'=%@",
" ;)!#!!!-*$&=@",
" *@!!!!!$=* ",
" =>!!$& ",
" -+ ",
" "};"""
MenuText = "Arch"
ToolTip = "Architecture workbench"

View File

@ -13,7 +13,7 @@
height="64px"
id="svg2816"
version="1.1"
inkscape:version="0.47 r22583"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="Arch_Wall.svg">
<defs
id="defs2818">
@ -172,9 +172,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.9445436"
inkscape:cx="61.084031"
inkscape:cy="29.484142"
inkscape:zoom="5.4999999"
inkscape:cx="12.067807"
inkscape:cy="34.07063"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
@ -186,11 +186,13 @@
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:object-nodes="true"
inkscape:window-width="1280"
inkscape:window-height="758"
inkscape:window-width="1920"
inkscape:window-height="1057"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="0" />
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-nodes="false"
inkscape:snap-global="false" />
<metadata
id="metadata2821">
<rdf:RDF>
@ -208,72 +210,158 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<rect
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-8"
width="15.936329"
height="12.585408"
x="32.997906"
y="59.61282"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
width="15.022249"
height="10.832717"
x="31.222485"
y="61.948494"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840"
width="24.362967"
height="12.482594"
x="2.3111296"
y="28.888771"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
width="23.956503"
height="10.744221"
x="2.3714659"
y="35.403149"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-9"
width="24.362967"
height="12.482594"
x="28.963516"
y="28.866888"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
width="23.956503"
height="10.744221"
x="28.579195"
y="35.384312"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<path
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 14.241527,19.294108 37.07818,27.781829 25.002993,38.181657 2.1663398,29.693936 14.241527,19.294108 z"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 14.322436,27.174833 37.137803,34.480522 25.073871,43.432031 2.2585043,36.126342 14.322436,27.174833 z"
id="rect2840-3-5-3-5"
sodipodi:nodetypes="ccccc" />
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-6-8"
width="12.321729"
height="10.849375"
x="2.5293117"
y="22.506136"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<path
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 39.224174,28.454727 62.060827,36.942448 49.98564,47.342276 27.148987,38.854555 39.224174,28.454727 z"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 39.281797,35.05971 62.097164,42.365399 50.033232,51.316908 27.217865,44.011219 39.281797,35.05971 z"
id="rect2840-3-5-3"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.60305344"
d="m 39.510988,41.014833 13.307194,-1.651197 4.898989,-4.035599 -20.638992,-7.649023 -8.324649,7.169655 10.757458,6.166164 z"
id="path3849"
sodipodi:nodetypes="cccccc" />
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287752999999993;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-5-6"
width="15.022249"
height="10.832717"
x="17.611925"
y="37.546371"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3"
width="24.362967"
height="12.482594"
x="17.78878"
y="13.847153"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
width="23.956503"
height="10.744221"
x="17.590893"
y="22.456282"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4"
width="15.936329"
height="12.585408"
x="65.968956"
y="90.392708"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
width="15.022249"
height="10.832717"
x="62.302372"
y="88.441856"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727000000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0"
width="15.936329"
height="12.585408"
x="52.144951"
y="62.458496"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
width="15.022249"
height="10.832717"
x="49.27129"
y="64.397865"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<path
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 28.74952,9.541872 51.586172,18.029593 39.510985,28.429421 16.674332,19.9417 28.74952,9.541872 z"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 28.816906,18.78073 51.632272,26.086419 39.568341,35.037928 16.752974,27.732239 28.816906,18.78073 z"
id="rect2840-3-5"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 14.563589,14.315707 26.20756,18.100203 14.143628,27.051712 2.4996565,23.267217 z"
id="rect2840-3-5-4-1"
sodipodi:nodetypes="ccccc" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-6"
width="8.2209435"
height="10.769706"
x="44.096127"
y="22.607765"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-5"
width="15.022249"
height="10.832717"
x="62.043102"
y="75.469635"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 54.0596,27.093403 7.829347,2.454267 -12.063932,8.951509 -7.829348,-2.454266 z"
id="rect2840-3-5-4"
sodipodi:nodetypes="ccccc" />
<rect
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-8-7"
width="15.022249"
height="10.832717"
x="31.137732"
y="36.13694"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-2"
width="23.956503"
height="10.744221"
x="2.2999978"
y="9.6638966"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffaf00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.02470295;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-9-2"
width="23.956503"
height="10.744221"
x="28.507727"
y="9.6450615"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 14.254372,1.4137861 37.069739,8.7194752 25.005807,17.670984 2.1904396,10.365295 14.254372,1.4137861 z"
id="rect2840-3-5-3-5-1"
sodipodi:nodetypes="ccccc" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#ffdd27;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 39.213732,9.2986629 62.029099,16.604352 49.965168,25.555861 27.149801,18.250172 39.213732,9.2986629 z"
id="rect2840-3-5-3-1"
sodipodi:nodetypes="ccccc" />
<rect
style="color:#000000;fill:#aa7200;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.11589425;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-04"
width="15.022249"
height="10.832717"
x="62.217617"
y="62.630302"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -117,8 +117,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5000001"
inkscape:cx="45.025641"
inkscape:cy="27.819016"
inkscape:cx="16.555064"
inkscape:cy="36.41599"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
@ -130,11 +130,11 @@
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:object-nodes="true"
inkscape:window-width="1280"
inkscape:window-height="758"
inkscape:window-width="1920"
inkscape:window-height="1057"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="0" />
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2821">
<rdf:RDF>
@ -152,72 +152,158 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<rect
style="color:#000000;fill:#aa4400;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.44642201;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-8"
width="15.936329"
height="12.585408"
x="32.997906"
y="59.61282"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-8-5"
width="15.022249"
height="10.832717"
x="31.222485"
y="61.948494"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.09863277999999998;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840"
width="24.362967"
height="12.482594"
x="2.3111296"
y="28.888771"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-7"
width="23.956503"
height="10.744221"
x="2.3714659"
y="35.403145"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.09863277999999998;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-9"
width="24.362967"
height="12.482594"
x="28.963516"
y="28.866888"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-9-6"
width="23.956503"
height="10.744221"
x="28.579195"
y="35.384308"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<path
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 14.241527,19.294108 37.07818,27.781829 25.002993,38.181657 2.1663398,29.693936 14.241527,19.294108 z"
id="rect2840-3-5-3-5"
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 14.322436,27.174833 37.137803,34.480522 25.073871,43.432031 2.2585043,36.126342 14.322436,27.174833 z"
id="rect2840-3-5-3-5-0"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-6-8"
width="12.321729"
height="10.849375"
x="2.5293117"
y="22.506136"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<path
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 39.281797,35.05971 62.097164,42.365399 50.033232,51.316908 27.217865,44.011219 39.281797,35.05971 z"
id="rect2840-3-5-3-0"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-5-6"
width="15.022249"
height="10.832717"
x="17.611925"
y="37.546371"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-2"
width="23.956503"
height="10.744221"
x="17.590893"
y="22.456282"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-5"
width="15.022249"
height="10.832717"
x="62.302372"
y="88.441849"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-7"
width="15.022249"
height="10.832717"
x="49.27129"
y="64.397865"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<path
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 28.816906,18.78073 51.632272,26.086419 39.568341,35.037928 16.752974,27.732239 28.816906,18.78073 z"
id="rect2840-3-5-2"
sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 14.563589,14.315707 26.20756,18.100203 14.143628,27.051712 2.4996565,23.267217 z"
id="rect2840-3-5-4-1"
sodipodi:nodetypes="ccccc" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-6"
width="8.2209435"
height="10.769706"
x="44.096127"
y="22.607765"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-5"
width="15.022249"
height="10.832717"
x="62.043102"
y="75.469627"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m 54.0596,27.093403 7.829347,2.454267 -12.063932,8.951509 -7.829348,-2.454266 z"
id="rect2840-3-5-4"
sodipodi:nodetypes="ccccc" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-8-7"
width="15.022249"
height="10.832717"
x="31.137732"
y="36.13694"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-2"
width="23.956503"
height="10.744221"
x="2.2999978"
y="9.6638966"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.07410886;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-9-2"
width="23.956503"
height="10.744221"
x="28.507727"
y="9.6450615"
transform="matrix(0.95236631,0.3049564,0,1,0,0)" />
<path
inkscape:connector-curvature="0"
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 14.254372,1.413786 37.069739,8.7194751 25.005807,17.670984 2.1904396,10.365295 14.254372,1.413786 z"
id="rect2840-3-5-3-5-1"
sodipodi:nodetypes="ccccc" />
<path
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 39.224174,28.454727 62.060827,36.942448 49.98564,47.342276 27.148987,38.854555 39.224174,28.454727 z"
id="rect2840-3-5-3"
inkscape:connector-curvature="0"
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 39.213732,9.2986628 62.029099,16.604352 49.965168,25.555861 27.149801,18.250172 39.213732,9.2986628 z"
id="rect2840-3-5-3-1"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;opacity:0.60305344000000005;stroke-miterlimit:4;stroke-dasharray:none"
d="m 39.510988,41.014833 13.307194,-1.651197 4.898989,-4.035599 -20.638992,-7.649023 -8.324649,7.169655 10.757458,6.166164 z"
id="path3849"
sodipodi:nodetypes="cccccc" />
<rect
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.09863277999999998;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-3"
width="24.362967"
height="12.482594"
x="17.78878"
y="13.847153"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.44642201000000004;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-3-4"
width="15.936329"
height="12.585408"
x="65.968956"
y="90.392708"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
<rect
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.44642201000000004;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-3-4-0"
width="15.936329"
height="12.585408"
x="52.144951"
y="62.458496"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
<path
style="color:#000000;fill:#c7c7c7;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 28.74952,9.541872 51.586172,18.029593 39.510985,28.429421 16.674332,19.9417 28.74952,9.541872 z"
id="rect2840-3-5"
sodipodi:nodetypes="ccccc" />
style="color:#000000;fill:#7a7a7a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:3.34768275;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-04"
width="15.022249"
height="10.832717"
x="62.217617"
y="62.630302"
transform="matrix(0.80307096,-0.59588341,0,1,0,0)" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -13,8 +13,8 @@
height="64px"
id="svg2816"
version="1.1"
inkscape:version="0.47 r22583"
sodipodi:docname="New document 2">
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="preferences-arch.svg">
<defs
id="defs2818">
<inkscape:perspective
@ -116,9 +116,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="33.685487"
inkscape:cy="28.119326"
inkscape:zoom="2.75"
inkscape:cx="29.770815"
inkscape:cy="15.617924"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
@ -130,11 +130,11 @@
inkscape:snap-bbox-midpoints="true"
inkscape:object-paths="true"
inkscape:object-nodes="true"
inkscape:window-width="1280"
inkscape:window-height="758"
inkscape:window-width="1920"
inkscape:window-height="1057"
inkscape:window-x="0"
inkscape:window-y="19"
inkscape:window-maximized="0" />
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2821">
<rdf:RDF>
@ -143,7 +143,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@ -152,7 +152,7 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<rect
style="color:#000000;fill:#aa4400;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880729;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
style="color:#000000;fill:#969696;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
id="rect2840-3-4-0-8"
width="15.936329"
height="12.585408"
@ -160,7 +160,7 @@
y="59.61282"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
<rect
style="color:#000000;fill:#ff7f2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840"
width="24.362967"
height="12.482594"
@ -168,7 +168,7 @@
y="28.888771"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
<rect
style="color:#000000;fill:#ff7f2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-9"
width="24.362967"
height="12.482594"
@ -176,12 +176,12 @@
y="28.866888"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
<path
style="color:#000000;fill:#ff9955;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
style="color:#000000;fill:#e6e6e6;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 14.241527,19.294108 37.07818,27.781829 25.002993,38.181657 2.1663398,29.693936 14.241527,19.294108 z"
id="rect2840-3-5-3-5"
sodipodi:nodetypes="ccccc" />
<path
style="color:#000000;fill:#ff9955;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
style="color:#000000;fill:#e6e6e6;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 39.224174,28.454727 62.060827,36.942448 49.98564,47.342276 27.148987,38.854555 39.224174,28.454727 z"
id="rect2840-3-5-3"
sodipodi:nodetypes="ccccc" />
@ -191,7 +191,7 @@
id="path3849"
sodipodi:nodetypes="cccccc" />
<rect
style="color:#000000;fill:#ff7f2a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287753;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.03287752999999993;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-3"
width="24.362967"
height="12.482594"
@ -199,7 +199,7 @@
y="13.847153"
transform="matrix(0.93735109,0.34838619,0,1,0,0)" />
<rect
style="color:#000000;fill:#aa4400;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727000000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#969696;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-3-4"
width="15.936329"
height="12.585408"
@ -207,7 +207,7 @@
y="90.392708"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
<rect
style="color:#000000;fill:#aa4400;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
style="color:#000000;fill:#969696;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.14880727000000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dashoffset:0"
id="rect2840-3-4-0"
width="15.936329"
height="12.585408"
@ -215,7 +215,7 @@
y="62.458496"
transform="matrix(0.7577145,-0.65258619,0,1,0,0)" />
<path
style="color:#000000;fill:#ff9955;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
style="color:#000000;fill:#e6e6e6;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.99999994000000003;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-linecap:butt;stroke-dasharray:none;stroke-dashoffset:0"
d="M 28.74952,9.541872 51.586172,18.029593 39.510985,28.429421 16.674332,19.9417 28.74952,9.541872 z"
id="rect2840-3-5"
sodipodi:nodetypes="ccccc" />

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -155,6 +155,26 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_8">
<property name="toolTip">
<string>If this is checked, when 2 similar walls are being connected, their underlying sketches will be joined into one, and the two walls will become one</string>
</property>
<property name="text">
<string>Join walls base sketches when possible</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>joinWallSketches</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -164,18 +184,38 @@
<string>IFC import</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_5">
<property name="toolTip">
<string>Check this to display debug messages while importing IFC files</string>
</property>
<property name="text">
<string>Show debug messages</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>ifcDebug</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox">
<property name="toolTip">
<string>If this is checked, the IFCOpenShell importer will be used, allowing to import more IFC types</string>
<string>If this is checked, IFC files will always be imported with the internal python parser, even if IfcOpenShell is installed</string>
</property>
<property name="text">
<string>Use IFCOpenShell if available</string>
<string>Force python parser</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>useIfcOpenShell</cstring>
<cstring>forceIfcPythonParser</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
@ -221,6 +261,76 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_6">
<property name="toolTip">
<string>If this is checked, openings will be imported as subtractions, otherwise wall shapes will already have their openings subtracted</string>
</property>
<property name="text">
<string>Separate openings</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>ifcSeparateOpenings</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="Gui::PrefCheckBox" name="gui::prefcheckbox_7">
<property name="toolTip">
<string>If this is checked, object names will be prefixed with the IFC ID number</string>
</property>
<property name="text">
<string>Prefix names with ID number</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>ifcPrefixNumbers</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Exclude list: </string>
</property>
</widget>
</item>
<item>
<widget class="Gui::PrefLineEdit" name="gui::preflineedit">
<property name="toolTip">
<string>A comma-separated list of Ifc entities to exclude from import</string>
</property>
<property name="text">
<string/>
</property>
<property name="placeholderText">
<string>IfcSpace,IfcBuildingElementProxy,IfcFlowTerminal</string>
</property>
<property name="prefEntry" stdset="0">
<cstring>ifcSkip</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>Mod/Arch</cstring>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
@ -326,6 +436,11 @@
<extends>QCheckBox</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefLineEdit</class>
<extends>QLineEdit</extends>
<header>Gui/PrefWidgets.h</header>
</customwidget>
<customwidget>
<class>Gui::PrefDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>

View File

@ -29,9 +29,8 @@ __author__ = "Yorik van Havre"
__url__ = "http://free-cad.sourceforge.net"
# config
DEBUG = True
subtractiveTypes = ["IfcOpeningElement"] # elements that must be subtracted from their parents
SCHEMA = "http://www.steptools.com/support/stdev_docs/express/ifc2x3/ifc2x3_tc1.exp"
SKIP = ["IfcOpeningElement","IfcSpace"]
# end config
if open.__module__ == '__builtin__':
@ -43,14 +42,7 @@ def open(filename):
doc = FreeCAD.newDocument(docname)
doc.Label = decode(docname)
FreeCAD.ActiveDocument = doc
global createIfcGroups, useIfcOpenShell, importIfcFurniture
createIfcGroups = useIfcOpenShell = importIfcFurniture = False
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
useIfcOpenShell = p.GetBool("useIfcOpenShell")
createIfcGroups = p.GetBool("createIfcGroups")
importIfcFurniture = p.GetBool("importIfcFurniture")
if not importIfcFurniture:
SKIP.append("IfcFurnishingElement")
getConfig()
read(filename)
return doc
@ -61,17 +53,451 @@ def insert(filename,docname):
except:
doc = FreeCAD.newDocument(docname)
FreeCAD.ActiveDocument = doc
global createIfcGroups, useIfcOpenShell, importIfcFurniture
createIfcGroups = useIfcOpenShell = importIfcFurniture = False
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
useIfcOpenShell = p.GetBool("useIfcOpenShell")
createIfcGroups = p.GetBool("createIfcGroups")
importIfcFurniture = p.GetBool("importIfcFurniture")
if not importIfcFurniture:
SKIP.append("IfcFurnishingElement")
getConfig()
read(filename)
return doc
def getConfig():
"Gets Arch IFC import preferences"
global CREATE_IFC_GROUPS, IMPORT_IFC_FURNITURE, DEBUG, SKIP, PREFIX_NUMBERS, FORCE_PYTHON_PARSER, SEPARATE_OPENINGS
CREATE_IFC_GROUPS = False
IMPORT_IFC_FURNITURE = False
DEBUG = False
SKIP = ["IfcSpace","IfcBuildingElementProxy","IfcFlowTerminal"]
PREFIX_NUMBERS = False
FORCE_PYTHON_PARSER = False
SEPARATE_OPENINGS = False
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
CREATE_IFC_GROUPS = p.GetBool("createIfcGroups")
IMPORT_IFC_FURNITURE = p.GetBool("importIfcFurniture")
FORCE_PYTHON_PARSER = p.GetBool("forceIfcPythonParser")
DEBUG = p.GetBool("ifcDebug")
SEPARATE_OPENINGS = p.GetBool("ifcSeparateOpenings")
PREFIX_NUMBERS = p.GetBool("ifcPrefixNumbers")
skiplist = p.GetString("ifcSkip")
if skiplist:
SKIP = skiplist.split(",")
def getIfcOpenShell():
"locates and imports ifcopenshell"
try:
global IfcImport
import IfcImport
except:
FreeCAD.Console.PrintMessage(str(translate("Arch","Couldn't locate IfcOpenShell\n")))
return False
else:
return True
def read(filename):
"Parses an IFC file"
# parsing the IFC file
t1 = time.time()
num_lines = sum(1 for line in pyopen(filename))
if getIfcOpenShell() and not FORCE_PYTHON_PARSER:
# use the IfcOpenShell parser
# preparing IfcOpenShell
if DEBUG: global ifcObjects,ifcParents
ifcObjects = {} # a table to relate ifc id with freecad object
ifcParents = {} # a table to relate ifc id with parent id
if not IMPORT_IFC_FURNITURE:
SKIP.append("IfcFurnishingElement")
if hasattr(IfcImport,"DISABLE_OPENING_SUBTRACTIONS") and SEPARATE_OPENINGS:
IfcImport.Settings(IfcImport.DISABLE_OPENING_SUBTRACTIONS,True)
else:
SKIP.append("IfcOpeningElement")
useShapes = False
if hasattr(IfcImport,"USE_BREP_DATA"):
IfcImport.Settings(IfcImport.USE_BREP_DATA,True)
useShapes = True
else:
if DEBUG: print "Warning: IfcOpenShell version very old, unable to handle Brep data"
# processing geometry
if IfcImport.Init(filename):
while True:
obj = IfcImport.Get()
if DEBUG: print "["+str(int((float(obj.id)/num_lines)*100))+"%] parsing ",obj.id,": ",obj.name," of type ",obj.type
meshdata = []
# retrieving name
n = getName(obj)
# skip types
if obj.type in SKIP:
if DEBUG: print "skipping because type is in skip list"
nobj = None
else:
# build shape
shape = None
if useShapes:
shape = getShape(obj)
# walls
if obj.type in ["IfcWallStandardCase","IfcWall"]:
nobj = makeWall(obj.id,shape,n)
# windows
elif obj.type in ["IfcWindow","IfcDoor"]:
nobj = makeWindow(obj.id,shape,n)
# structs
elif obj.type in ["IfcBeam","IfcColumn","IfcSlab","IfcFooting"]:
nobj = makeStructure(obj.id,shape,n)
# roofs
elif obj.type in ["IfcRoof"]:
nobj = makeRoof(obj.id,shape,n)
# furniture
elif obj.type in ["IfcFurnishingElement"]:
nobj = FreeCAD.ActiveDocument.addObject("Part::Feature",n)
nobj.Shape = shape
# sites
elif obj.type in ["IfcSite"]:
nobj = makeSite(obj.id,shape,n)
elif shape:
# treat as dumb parts
#if DEBUG: print "Fixme: Shape-containing object not handled: ",obj.id, " ", obj.type
nobj = FreeCAD.ActiveDocument.addObject("Part::Feature",n)
nobj.Shape = shape
else:
# treat as meshes
if DEBUG: print "Warning: Object without shape: ",obj.id, " ", obj.type
me,pl = getMesh(obj)
nobj = FreeCAD.ActiveDocument.addObject("Mesh::Feature",n)
nobj.Mesh = me
nobj.Placement = pl
# registering object number and parent
if obj.parent_id > 0:
ifcParents[obj.id] = [obj.parent_id,not (obj.type in subtractiveTypes)]
ifcObjects[obj.id] = nobj
if not IfcImport.Next():
break
# processing non-geometry and relationships
parents_temp = dict(ifcParents)
import ArchCommands
while parents_temp:
id, c = parents_temp.popitem()
parent_id = c[0]
additive = c[1]
if (id <= 0) or (parent_id <= 0):
# root dummy object
parent = None
elif parent_id in ifcObjects:
parent = ifcObjects[parent_id]
# check if parent is a subtraction, if yes parent to grandparent
if parent_id in ifcParents:
if ifcParents[parent_id][1] == False:
grandparent_id = ifcParents[parent_id][0]
if grandparent_id in ifcObjects:
parent = ifcObjects[grandparent_id]
else:
# creating parent if needed
parent_ifcobj = IfcImport.GetObject(parent_id)
if DEBUG: print "["+str(int((float(parent_ifcobj.id)/num_lines)*100))+"%] parsing ",parent_ifcobj.id,": ",parent_ifcobj.name," of type ",parent_ifcobj.type
n = getName(parent_ifcobj)
if parent_ifcobj.id <= 0:
parent = None
elif parent_ifcobj.type == "IfcBuildingStorey":
parent = Arch.makeFloor(name=n)
elif parent_ifcobj.type == "IfcBuilding":
parent = Arch.makeBuilding(name=n)
elif parent_ifcobj.type == "IfcSite":
parent = Arch.makeSite(name=n)
elif parent_ifcobj.type == "IfcWindow":
parent = Arch.makeWindow(name=n)
else:
if DEBUG: print "Fixme: skipping unhandled parent: ", parent_ifcobj.id, " ", parent_ifcobj.type
parent = None
# registering object number and parent
if parent_ifcobj.parent_id > 0:
ifcParents[parent_ifcobj.id] = [parent_ifcobj.parent_id,True]
parents_temp[parent_ifcobj.id] = [parent_ifcobj.parent_id,True]
if parent and (not parent_ifcobj.id in ifcObjects):
ifcObjects[parent_ifcobj.id] = parent
# attributing parent
if parent and (id in ifcObjects):
if ifcObjects[id]:
if additive:
ArchCommands.addComponents(ifcObjects[id],parent)
else:
ArchCommands.removeComponents(ifcObjects[id],parent)
IfcImport.CleanUp()
else:
# use only the internal python parser
FreeCAD.Console.PrintWarning(str(translate("Arch","IfcOpenShell not found, falling back on internal parser.\n")))
schema=getSchema()
if schema:
if DEBUG: global ifc
if DEBUG: print "opening",filename,"..."
ifc = ifcReader.IfcDocument(filename,schema=schema,debug=DEBUG)
else:
FreeCAD.Console.PrintWarning(str(translate("Arch","IFC Schema not found, IFC import disabled.\n")))
return None
t2 = time.time()
if DEBUG: print "Successfully loaded",ifc,"in %s s" % ((t2-t1))
# getting walls
for w in ifc.getEnt("IfcWallStandardCase"):
nobj = makeWall(w)
# getting windows and doors
for w in (ifc.getEnt("IfcWindow") + ifc.getEnt("IfcDoor")):
nobj = makeWindow(w)
# getting structs
for w in (ifc.getEnt("IfcSlab") + ifc.getEnt("IfcBeam") + ifc.getEnt("IfcColumn") \
+ ifc.getEnt("IfcFooting")):
nobj = makeStructure(w)
# getting floors
for f in ifc.getEnt("IfcBuildingStorey"):
group(f,ifc,"Floor")
# getting buildings
for b in ifc.getEnt("IfcBuilding"):
group(b,ifc,"Building")
# getting sites
for s in ifc.getEnt("IfcSite"):
group(s,ifc,"Site")
if DEBUG: print "done parsing. Recomputing..."
FreeCAD.ActiveDocument.recompute()
t3 = time.time()
if DEBUG: print "done processing IFC file in %s s" % ((t3-t1))
return None
def getName(ifcobj):
"Get a clean name from an ifc object"
n = ifcobj.name
if not n:
n = ifcobj.type
if PREFIX_NUMBERS:
n = "ID"+str(ifcobj.id)+" "+n
#for c in ",.!?;:":
# n = n.replace(c,"_")
return n
def makeWall(entity,shape=None,name="Wall"):
"makes a wall in the freecad document"
try:
if shape:
# use ifcopenshell
body = FreeCAD.ActiveDocument.addObject("Part::Feature","WallBody")
body.Shape = shape
wall = Arch.makeWall(body,name=name)
wall.Label = name
if DEBUG: print "made wall object ",entity,":",wall
return wall
# use internal parser
if DEBUG: print "=====> making wall",entity.id
placement = wall = wire = body = width = height = None
placement = getPlacement(entity.ObjectPlacement)
if DEBUG: print "got wall placement",entity.id,":",placement
width = entity.getProperty("Width")
height = entity.getProperty("Height")
if width and height:
if DEBUG: print "got width, height ",entity.id,":",width,"/",height
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Axis":
wire = getWire(r.Items,placement)
wall = Arch.makeWall(wire,width,height,align="Center",name="Wall"+str(entity.id))
else:
if DEBUG: print "no height or width properties found..."
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Body":
for b in r.Items:
if b.type == "IFCEXTRUDEDAREASOLID":
norm = getVector(b.ExtrudedDirection)
norm.normalize()
wire = getWire(b.SweptArea,placement)
wall = Arch.makeWall(wire,width=0,height=b.Depth,name="Wall"+str(entity.id))
wall.Normal = norm
if wall:
if DEBUG: print "made wall object ",entity.id,":",wall
return wall
if DEBUG: print "error: skipping wall",entity.id
return None
except:
if DEBUG: print "error: skipping wall",entity.id
return None
def makeWindow(entity,shape=None,name="Window"):
"makes a window in the freecad document"
try:
if shape:
# use ifcopenshell
window = Arch.makeWindow(name=name)
window.Shape = shape
window.Label = name
if DEBUG: print "made window object ",entity,":",window
return window
# use internal parser
if DEBUG: print "=====> making window",entity.id
placement = window = wire = body = width = height = None
placement = getPlacement(entity.ObjectPlacement)
if DEBUG: print "got window placement",entity.id,":",placement
width = entity.getProperty("Width")
height = entity.getProperty("Height")
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Body":
for b in r.Items:
if b.type == "IFCEXTRUDEDAREASOLID":
wire = getWire(b.SweptArea,placement)
window = Arch.makeWindow(wire,width=b.Depth,name=objtype+str(entity.id))
if window:
if DEBUG: print "made window object ",entity.id,":",window
return window
if DEBUG: print "error: skipping window",entity.id
return None
except:
if DEBUG: print "error: skipping window",entity.id
return None
def makeStructure(entity,shape=None,name="Structure"):
"makes a structure in the freecad document"
try:
if shape:
# use ifcopenshell
sh = FreeCAD.ActiveDocument.addObject("Part::Feature","StructureBody")
sh.Shape = shape
structure = Arch.makeStructure(sh,name=name)
structure.Label = name
if DEBUG: print "made structure object ",entity,":",structure
return structure
# use internal parser
if DEBUG: print "=====> making struct",entity.id
placement = structure = wire = body = width = height = None
placement = getPlacement(entity.ObjectPlacement)
if DEBUG: print "got window placement",entity.id,":",placement
width = entity.getProperty("Width")
height = entity.getProperty("Height")
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Body":
for b in r.Items:
if b.type == "IFCEXTRUDEDAREASOLID":
wire = getWire(b.SweptArea,placement)
structure = Arch.makeStructure(wire,height=b.Depth,name=objtype+str(entity.id))
if structure:
if DEBUG: print "made structure object ",entity.id,":",structure
return structure
if DEBUG: print "error: skipping structure",entity.id
return None
except:
if DEBUG: print "error: skipping structure",entity.id
return None
def makeSite(entity,shape=None,name="Site"):
"makes a site in the freecad document"
try:
if shape:
# use ifcopenshell
site = Arch.makeSite(name=name)
site.Label = name
body = FreeCAD.ActiveDocument.addObject("Part::Feature",name+"_body")
body.Shape = shape
site.Terrain = body
if DEBUG: print "made site object ",entity,":",site
return site
except:
return None
def makeRoof(entity,shape=None,name="Roof"):
"makes a roof in the freecad document"
try:
if shape:
# use ifcopenshell
roof = Arch.makeRoof(name=name)
roof.Label = name
roof.Shape = shape
if DEBUG: print "made roof object ",entity,":",roof
return roof
except:
return None
# geometry helpers ###################################################################
def getMesh(obj):
"gets mesh and placement from an IfcOpenShell object"
import Mesh
f = obj.mesh.faces
v = obj.mesh.verts
for i in range(0, len(f), 3):
face = []
for j in range(3):
vi = f[i+j]*3
face.append([v[vi],v[vi+1],v[vi+2]])
meshdata.append(face)
me = Mesh.Mesh(meshdata)
# get transformation matrix
m = obj.matrix
mat = FreeCAD.Matrix(m[0], m[3], m[6], m[9],
m[1], m[4], m[7], m[10],
m[2], m[5], m[8], m[11],
0, 0, 0, 1)
pl = FreeCAD.Placement(mat)
return me,pl
def getShape(obj):
"gets a shape from an IfcOpenShell object"
import StringIO,Part
sh=Part.Shape()
sh.importBrep(StringIO.StringIO(obj.mesh.brep_data))
if not sh.Solids:
# try to extract a solid shape
if sh.Faces:
try:
if DEBUG: print "Malformed solid. Attempting to fix..."
shell = Part.makeShell(sh.Faces)
if shell:
solid = Part.makeSolid(shell)
if solid:
sh = solid
except:
if DEBUG: print "failed to retrieve solid from object ",obj.id
else:
if DEBUG: print "object ", obj.id, " doesn't contain any face"
m = obj.matrix
mat = FreeCAD.Matrix(m[0], m[3], m[6], m[9],
m[1], m[4], m[7], m[10],
m[2], m[5], m[8], m[11],
0, 0, 0, 1)
sh.Placement = FreeCAD.Placement(mat)
# if DEBUG: print "getting Shape from ",obj
return sh
# below is only used by the internal parser #########################################
def decode(name):
"decodes encoded strings"
try:
@ -94,151 +520,11 @@ def getSchema():
p = ArchCommands.download(SCHEMA)
if p:
return p
return None
def getIfcOpenShell():
"locates and imports ifcopenshell"
try:
global IfcImport
import IfcImport
except:
FreeCAD.Console.PrintMessage(str(translate("Arch","Couldn't locate IfcOpenShell\n")))
return False
else:
return True
def read(filename):
"Parses an IFC file"
# parsing the IFC file
t1 = time.time()
schema=getSchema()
ifcRel = {}
if schema:
if DEBUG: global ifc
if DEBUG: print "opening",filename,"..."
ifc = ifcReader.IfcDocument(filename,schema=schema,debug=DEBUG)
else:
FreeCAD.Console.PrintWarning(str(translate("Arch","IFC Schema not found, IFC import disabled.\n")))
return None
t2 = time.time()
if DEBUG: print "Successfully loaded",ifc,"in %s s" % ((t2-t1))
return None
if useIfcOpenShell and getIfcOpenShell():
# use the IfcOpenShell parser
useShapes = False
if hasattr(IfcImport,"USE_BREP_DATA"):
IfcImport.Settings(IfcImport.USE_BREP_DATA,True)
useShapes = True
if IfcImport.Init(filename):
while True:
obj = IfcImport.Get()
if DEBUG: print "parsing ",obj.id,": ",obj.name," of type ",obj.type
meshdata = []
# retrieving name
n = obj.name
if not n:
n = ""
# build shape
shape = None
if useShapes:
shape = getShape(obj)
# skip types
if obj.type in SKIP:
pass
# walls
elif obj.type == "IfcWallStandardCase":
nobj = makeWall(ifc.Entities[obj.id],shape,n)
# windows
elif obj.type in ["IfcWindow","IfcDoor"]:
nobj = makeWindow(ifc.Entities[obj.id],shape,n)
# structs
elif obj.type in ["IfcBeam","IfcColumn","IfcSlab","IfcFooting"]:
nobj = makeStructure(ifc.Entities[obj.id],shape,n)
# furniture
elif obj.type == "IfcFurnishingElement":
nobj = FreeCAD.ActiveDocument.addObject("Part::Feature",n)
nobj.Shape = shape
elif shape:
# treat as dumb parts
if not n:
n = "Unnamed"
nobj = FreeCAD.ActiveDocument.addObject("Part::Feature",n)
nobj.Shape = shape
else:
# treat as meshes
if not n:
n = "Unnamed"
me,pl = getMesh(obj)
nobj = FreeCAD.ActiveDocument.addObject("Mesh::Feature",n)
nobj.Mesh = me
nobj.Placement = pl
ifcRel[obj.id] = nobj
# mark terrain objects so they can be associated to sites
if obj.type == "IfcSite":
if not "terrains" in ifcRel:
ifcRel["terrains"] = []
ifcRel["terrains"].append([obj.id,nobj])
if not IfcImport.Next():
break
IfcImport.CleanUp()
else:
# use only the internal python parser
# getting walls
for w in ifc.getEnt("IfcWallStandardCase"):
nobj = makeWall(w)
ifcRel[w.id] = nobj
# getting windows and doors
for w in (ifc.getEnt("IfcWindow") + ifc.getEnt("IfcDoor")):
nobj = makeWindow(w)
ifcRel[w.id] = nobj
# getting structs
for w in (ifc.getEnt("IfcSlab") + ifc.getEnt("IfcBeam") + ifc.getEnt("IfcColumn") \
+ ifc.getEnt("IfcFooting")):
nobj = makeStructure(w)
ifcRel[w.id] = nobj
order(ifc,ifcRel)
FreeCAD.ActiveDocument.recompute()
t3 = time.time()
if DEBUG: print "done processing",ifc,"in %s s" % ((t3-t1))
return None
def order(ifc,ifcRel):
"orders the already generated elements by building and by floor"
# getting floors
for f in ifc.getEnt("IfcBuildingStorey"):
group(f,ifcRel,"Floor")
# getting buildings
for b in ifc.getEnt("IfcBuilding"):
group(b,ifcRel,"Building")
# getting sites
for s in ifc.getEnt("IfcSite"):
group(s,ifcRel,"Site")
def group(entity,ifcRel,mode=None):
def group(entity,ifc,mode=None):
"gathers the children of the given entity"
# only used by internal parser
try:
if DEBUG: print "=====> making group",entity.id
@ -274,14 +560,12 @@ def group(entity,ifcRel,mode=None):
for g in groups:
for t in g[1]:
if e.type.upper() == t.upper():
if e.id in ifcRel:
g[2].append(ifcRel[e.id])
elif hasattr(FreeCAD.ActiveDocument,g[0]+str(e.id)):
if hasattr(FreeCAD.ActiveDocument,g[0]+str(e.id)):
g[2].append(FreeCAD.ActiveDocument.getObject(g[0]+str(e.id)))
print "groups:",groups
comps = []
if createIfcGroups:
if CREATE_IFC_GROUPS:
if DEBUG: print "creating subgroups"
for g in groups:
if g[2]:
@ -301,12 +585,6 @@ def group(entity,ifcRel,mode=None):
cell = None
if mode == "Site":
cell = Arch.makeSite(comps,name=name)
# add terrain object
if "terrains" in ifcRel:
for t in ifcRel["terrains"]:
if t[0] == entity.id:
if not t[1] in comps:
cell.Terrain = t[1]
elif mode == "Floor":
cell = Arch.makeFloor(comps,name=name)
elif mode == "Building":
@ -314,171 +592,11 @@ def group(entity,ifcRel,mode=None):
if label and cell:
cell.Label = label
except:
if DEBUG: print "error: skipping group ",entity.id
def makeWall(entity,shape=None,name=None):
"makes a wall in the freecad document"
try:
if DEBUG: print "=====> making wall",entity.id
if shape:
# use ifcopenshell
sh = FreeCAD.ActiveDocument.addObject("Part::Feature","WallBody")
sh.Shape = shape
wall = Arch.makeWall(sh,name="Wall"+str(entity.id))
wall.Label = name
if DEBUG: print "made wall object ",entity.id,":",wall
return wall
# use internal parser
placement = wall = wire = body = width = height = None
placement = getPlacement(entity.ObjectPlacement)
if DEBUG: print "got wall placement",entity.id,":",placement
width = entity.getProperty("Width")
height = entity.getProperty("Height")
if width and height:
if DEBUG: print "got width, height ",entity.id,":",width,"/",height
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Axis":
wire = getWire(r.Items,placement)
wall = Arch.makeWall(wire,width,height,align="Center",name="Wall"+str(entity.id))
if name:
wall.Label = name
else:
if DEBUG: print "no height or width properties found..."
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Body":
for b in r.Items:
if b.type == "IFCEXTRUDEDAREASOLID":
norm = getVector(b.ExtrudedDirection)
norm.normalize()
wire = getWire(b.SweptArea,placement)
wall = Arch.makeWall(wire,width=0,height=b.Depth,name="Wall"+str(entity.id))
wall.Normal = norm
if wall:
if DEBUG: print "made wall object ",entity.id,":",wall
return wall
if DEBUG: print "error: skipping wall",entity.id
return None
except:
if DEBUG: print "error: skipping wall",entity.id
return None
def makeWindow(entity,shape=None,name=""):
"makes a window in the freecad document"
try:
typ = "Window" if entity.type == "IFCWINDOW" else "Door"
if DEBUG: print "=====> making window",entity.id
if shape:
# use ifcopenshell
window = Arch.makeWindow(name=typ+str(entity.id))
window.Shape = shape
if name:
window.Label = name
if DEBUG: print "made window object ",entity.id,":",window
return window
# use internal parser
placement = window = wire = body = width = height = None
placement = getPlacement(entity.ObjectPlacement)
if DEBUG: print "got window placement",entity.id,":",placement
width = entity.getProperty("Width")
height = entity.getProperty("Height")
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Body":
for b in r.Items:
if b.type == "IFCEXTRUDEDAREASOLID":
wire = getWire(b.SweptArea,placement)
window = Arch.makeWindow(wire,width=b.Depth,name=typ+str(entity.id))
if window:
if DEBUG: print "made window object ",entity.id,":",window
return window
if DEBUG: print "error: skipping window",entity.id
return None
except:
if DEBUG: print "error: skipping window",entity.id
return None
def makeStructure(entity,shape=None,name=""):
"makes a structure in the freecad document"
try:
if entity.type == "IFCSLAB":
typ = "Slab"
elif entity.type == "IFCBEAM":
typ = "Beam"
elif entity.type == "IFCFOOTING":
typ = "Footing"
else:
typ = "Column"
if DEBUG: print "=====> making struct",entity.id
if shape:
# use ifcopenshell
sh = FreeCAD.ActiveDocument.addObject("Part::Feature","StructureBody")
sh.Shape = shape
structure = Arch.makeStructure(sh,name=typ+str(entity.id))
if name:
structure.Label = name
if DEBUG: print "made structure object ",entity.id,":",structure
return structure
# use internal parser
placement = structure = wire = body = width = height = None
placement = getPlacement(entity.ObjectPlacement)
if DEBUG: print "got window placement",entity.id,":",placement
width = entity.getProperty("Width")
height = entity.getProperty("Height")
for r in entity.Representation.Representations:
if r.RepresentationIdentifier == "Body":
for b in r.Items:
if b.type == "IFCEXTRUDEDAREASOLID":
wire = getWire(b.SweptArea,placement)
structure = Arch.makeStructure(wire,height=b.Depth,name=typ+str(entity.id))
if structure:
if DEBUG: print "made structure object ",entity.id,":",structure
return structure
if DEBUG: print "error: skipping structure",entity.id
return None
except:
if DEBUG: print "error: skipping structure",entity.id
return None
# geometry helpers ###################################################################
def getMesh(obj):
"gets mesh and placement from an IfcOpenShell object"
import Mesh
f = obj.mesh.faces
v = obj.mesh.verts
for i in range(0, len(f), 3):
face = []
for j in range(3):
vi = f[i+j]*3
face.append([v[vi],v[vi+1],v[vi+2]])
meshdata.append(face)
me = Mesh.Mesh(meshdata)
# get transformation matrix
m = obj.matrix
mat = FreeCAD.Matrix(m[0], m[3], m[6], m[9],
m[1], m[4], m[7], m[10],
m[2], m[5], m[8], m[11],
0, 0, 0, 1)
pl = FreeCAD.Placement(mat)
return me,pl
def getShape(obj):
"gets a shape from an IfcOpenShell object"
import StringIO
sh=Part.Shape()
sh.importBrep(StringIO.StringIO(obj.mesh.brep_data))
m = obj.matrix
mat = FreeCAD.Matrix(m[0], m[3], m[6], m[9],
m[1], m[4], m[7], m[10],
m[2], m[5], m[8], m[11],
0, 0, 0, 1)
sh.Placement = FreeCAD.Placement(mat)
if DEBUG: print "getting Shape from ",obj
return sh
if DEBUG: print "error: skipping group ",entity.id
def getWire(entity,placement=None):
"returns a wire (created in the freecad document) from the given entity"
# only used by internal parser
if DEBUG: print "making Wire from :",entity
if not entity: return None
if entity.type == "IFCPOLYLINE":
@ -494,6 +612,7 @@ def getWire(entity,placement=None):
def getPlacement(entity):
"returns a placement from the given entity"
# only used by internal parser
if DEBUG: print "getting placement ",entity
if not entity: return None
pl = None
@ -521,6 +640,7 @@ def getPlacement(entity):
def getVector(entity):
"returns a vector from the given entity"
# only used by internal parser
if DEBUG: print "getting point from",entity
if entity.type == "IFCDIRECTION":
if len(entity.DirectionRatios) == 3:

File diff suppressed because it is too large Load Diff

View File

@ -29,121 +29,41 @@ class DraftWorkbench (Workbench):
Icon = """
/* XPM */
static char * draft_xpm[] = {
"14 16 96 2",
" c None",
". c #584605",
"+ c #513E03",
"@ c #E6B50D",
"# c #C29F0E",
"$ c #6E5004",
"% c #F7BD0B",
"& c #8F7008",
"* c #F3C711",
"= c #B1950F",
"- c #785402",
"; c #946C05",
"> c #FABF0B",
", c #F7C20E",
"' c #8D740A",
") c #F8D115",
"! c #9F8A0F",
"~ c #593D00",
"{ c #FEB304",
"] c #F3B208",
"^ c #987407",
"/ c #FDC70E",
"( c #EFC311",
"_ c #8F790C",
": c #FBDA18",
"< c #8B7C0F",
"[ c #B88203",
"} c #FEBA08",
"| c #E7B00A",
"1 c #A17E09",
"2 c #FCCE12",
"3 c #E6C213",
"4 c #96830E",
"5 c #FBE11C",
"6 c #786F0F",
"7 c #CA9406",
"8 c #FDC10B",
"9 c #D8AA0C",
"0 c #AE8E0C",
"a c #FCD415",
"b c #DBBF15",
"c c #A09012",
"d c #F9E61F",
"e c #69650E",
"f c #4B3702",
"g c #DAA609",
"h c #CAA50E",
"i c #BB9D10",
"j c #FCDB18",
"k c #CEB817",
"l c #AB9E15",
"m c #F2E821",
"n c #5E5C0E",
"o c #503D03",
"p c #E8B60D",
"q c #CAAF13",
"r c #C1B218",
"s c #B6AE19",
"t c #EAE625",
"u c #575723",
"v c #594605",
"w c #F1C511",
"x c #AB9510",
"y c #D7C018",
"z c #FBE81F",
"A c #B3AC18",
"B c #BCB81D",
"C c #7F8051",
"D c #645207",
"E c #9D8C11",
"F c #E4D31C",
"G c #BEB62F",
"H c #6C6A3F",
"I c #E1E1E1",
"J c #73610A",
"K c #7C720F",
"L c #A1A084",
"M c #FFFFFF",
"N c #565656",
"O c #887921",
"P c #988F44",
"Q c #BFBEB7",
"R c #EEEEEC",
"S c #C0C0C0",
"T c #323232",
"U c #4D4B39",
"V c #C7C7C7",
"W c #FBFBFB",
"X c #BFBFBF",
"Y c #141414",
"Z c #222222",
"` c #303030",
" . c #313131",
".. c #282828",
"+. c #121212",
"@. c #000000",
" . ",
" + @ # ",
" $ % & * = ",
" - ; > , ' ) ! ",
"~ { ] ^ / ( _ : < ",
" [ } | 1 2 3 4 5 6 ",
" 7 8 9 0 a b c d e ",
" f g / h i j k l m n ",
" o p 2 i q 5 r s t u ",
" v w a x y z A B C ",
" D ) j E F G H I ",
" J : 5 K L M M N ",
" O P Q R M S T ",
" U V W X Y Z ",
" ` ...+.",
" @.@.@.@.@.@.@.@. "};
"""
"16 16 17 1",
" c None",
". c #5F4A1C",
"+ c #5A4E36",
"@ c #8A4D00",
"# c #835A04",
"$ c #7E711F",
"% c #847954",
"& c #C27400",
"* c #817D74",
"= c #E79300",
"- c #BFAB0C",
"; c #ADA791",
"> c #B3AE87",
", c #B0B2AE",
"' c #ECD200",
") c #D6D8D5",
"! c #FCFEFA",
" ,!!)!!!!!!!!!",
" ,!!>;!!!!!!!!",
" ,!!>-,!!!!!!!",
" ,!!>'$)!!!!!!",
" ,!!>-'%!!!!!!",
" ,!!>-$-;!!!!!",
" ,!!>-*-$)!!!!",
" @&+!!>-*;-%!!!!",
"@&=+)!;'-''-*!!!",
".@@.;;%%....+;;!",
".&&===========$,",
".&&=====&&####.,",
".&&.++***,,)))!!",
"#==+)!!!!!!!!!!!",
" ##+)!!!!!!!!!!!",
" *,,,,,,,,,,,,"};"""
MenuText = "Draft"
ToolTip = "The Draft module is used for basic 2D CAD Drafting"

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@ -11,25 +13,54 @@
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg5821"
id="svg2980"
sodipodi:version="0.32"
inkscape:version="0.46"
sodipodi:docname="preferences-Draft.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="Draft_Workbench_Idea2.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1"
inkscape:export-filename="/home/yorik/Draft_Workbench_Idea16.png"
inkscape:export-xdpi="22.5"
inkscape:export-ydpi="22.5">
<defs
id="defs5823">
id="defs2982">
<linearGradient
inkscape:collect="always"
id="linearGradient6349">
id="linearGradient3855">
<stop
style="stop-color:#000000;stop-opacity:1;"
style="stop-color:#d07200;stop-opacity:1;"
offset="0"
id="stop6351" />
id="stop3857" />
<stop
style="stop-color:#000000;stop-opacity:0;"
style="stop-color:#fcb200;stop-opacity:1;"
offset="1"
id="stop6353" />
id="stop3859" />
</linearGradient>
<linearGradient
id="linearGradient3786"
osb:paint="solid">
<stop
style="stop-color:#a0eb07;stop-opacity:1;"
offset="0"
id="stop3788" />
</linearGradient>
<linearGradient
id="linearGradient3864">
<stop
id="stop3866"
offset="0"
style="stop-color:#71b2f8;stop-opacity:1;" />
<stop
id="stop3868"
offset="1"
style="stop-color:#002795;stop-opacity:1;" />
</linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective2988" />
<linearGradient
id="linearGradient3377">
<stop
@ -43,31 +74,85 @@
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3377"
id="linearGradient3383"
x1="901.1875"
y1="1190.875"
x2="1267.9062"
y2="1190.875"
gradientUnits="userSpaceOnUse" />
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 32 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="64 : 32 : 1"
inkscape:persp3d-origin="32 : 21.333333 : 1"
id="perspective5829" />
<radialGradient
xlink:href="#linearGradient3855"
id="linearGradient3861"
x1="3.9825215"
y1="31.552309"
x2="60.769054"
y2="51.094166"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.95198975,0,0,0.91651928,0.07298588,1.7291139)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient6349"
id="radialGradient6355"
cx="1103.6399"
cy="1424.4465"
fx="1103.6399"
fy="1424.4465"
r="194.40614"
gradientTransform="matrix(1.4307499,-1.3605156e-7,1.202713e-8,0.1264801,-475.3928,1244.2826)"
xlink:href="#linearGradient3855"
id="linearGradient3863"
x1="3.9825215"
y1="31.552309"
x2="23.852976"
y2="45.686504"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.95198975,0,0,0.91651928,0.07298588,1.7291139)" />
<linearGradient
gradientTransform="translate(63.406413,58.258077)"
inkscape:collect="always"
xlink:href="#linearGradient3855-2"
id="linearGradient3861-4"
x1="3.9825215"
y1="31.552309"
x2="60.769054"
y2="51.094166"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3855-2">
<stop
style="stop-color:#d07200;stop-opacity:1;"
offset="0"
id="stop3857-1" />
<stop
style="stop-color:#fcb200;stop-opacity:1;"
offset="1"
id="stop3859-6" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3855-2"
id="linearGradient3863-2"
x1="3.9825215"
y1="31.552309"
x2="23.852976"
y2="45.686504"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3880">
<stop
style="stop-color:#d07200;stop-opacity:1;"
offset="0"
id="stop3882" />
<stop
style="stop-color:#fcb200;stop-opacity:1;"
offset="1"
id="stop3884" />
</linearGradient>
<linearGradient
gradientTransform="translate(63.406413,58.258077)"
y2="45.686504"
x2="23.852976"
y1="31.552309"
x1="3.9825215"
gradientUnits="userSpaceOnUse"
id="linearGradient3889"
xlink:href="#linearGradient3855-2"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3855-2"
id="linearGradient3921"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(63.406413,58.258077)"
x1="3.9825215"
y1="31.552309"
x2="23.852976"
y2="45.686504" />
</defs>
<sodipodi:namedview
id="base"
@ -76,25 +161,30 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="5.5"
inkscape:cx="13.770759"
inkscape:cy="33.3857"
inkscape:current-layer="g3360"
inkscape:zoom="3.8890873"
inkscape:cx="40.657951"
inkscape:cy="30.318818"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:document-units="px"
inkscape:grid-bbox="true"
inkscape:window-width="1278"
inkscape:window-height="723"
inkscape:window-width="1920"
inkscape:window-height="1057"
inkscape:window-x="0"
inkscape:window-y="19" />
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-nodes="false"
inkscape:object-paths="true"
inkscape:object-nodes="true" />
<metadata
id="metadata5826">
id="metadata2985">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
@ -102,56 +192,44 @@
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<g
id="g3360"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
inkscape:export-xdpi="3.2478156"
inkscape:export-ydpi="3.2478156"
transform="matrix(0.1367863,0,0,0.1367863,-119.15519,-134.86962)">
<path
inkscape:export-ydpi="6.2926431"
inkscape:export-xdpi="6.2926431"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
sodipodi:nodetypes="ccccc"
id="path3385"
d="M 1242.2722,1225.5972 L 1267.0061,1252.4449 L 1293.1685,1414.2927 L 1139.29,1378.3753 L 1103.2685,1339.6008"
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#333333;stroke-width:10.00100156000000062;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:export-ydpi="6.2926431"
inkscape:export-xdpi="6.2926431"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
id="rect2390"
d="M 1038.5,1003.9062 L 906.1875,1125.9375 L 1138.5312,1377.8438 C 1136.5381,1373.6971 1135.4375,1369.1125 1135.4375,1364.2812 C 1135.4374,1345.8803 1151.5176,1330.9688 1171.3125,1330.9688 C 1176.6723,1330.9688 1181.7449,1332.0701 1186.3125,1334.0312 L 1188.4688,1332.0312 C 1187.8006,1329.4882 1187.4375,1326.8233 1187.4375,1324.0938 C 1187.4375,1305.6928 1203.4863,1290.75 1223.2812,1290.75 C 1226.3231,1290.75 1229.2726,1291.1148 1232.0938,1291.7812 L 1239.5938,1284.875 C 1239.1763,1282.8514 1238.9375,1280.7597 1238.9375,1278.625 C 1238.9375,1264.1088 1248.9625,1251.784 1262.9062,1247.2188 L 1038.5,1003.9062 z"
style="opacity:1;fill:url(#linearGradient3383);fill-opacity:1;fill-rule:evenodd;stroke:#7b5600;stroke-width:10.00100156000000062;stroke-linecap:butt;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
inkscape:export-ydpi="6.2926431"
inkscape:export-xdpi="6.2926431"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
id="path3373"
d="M 1236.4267,1288.7379 L 1005.1018,1040.2404"
style="fill:none;fill-rule:evenodd;stroke:#7b5600;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:export-ydpi="6.2926431"
inkscape:export-xdpi="6.2926431"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
id="path3375"
d="M 1185.9191,1331.1643 L 958.63474,1081.6566"
style="fill:none;fill-rule:evenodd;stroke:#7b5600;stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
inkscape:export-ydpi="6.2926431"
inkscape:export-xdpi="6.2926431"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
id="path3387"
d="M 1279.8632,1334.1947 L 1216.2236,1393.7937 L 1296.0257,1413.9968 L 1279.8632,1334.1947 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
inkscape:export-ydpi="6.2926431"
inkscape:export-xdpi="6.2926431"
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/draft.png"
id="path3389"
d="M 1298.046,1418.0374 C 1232.5494,1435.5504 1193.8334,1438.6328 1148.5434,1442.2811 C 1078.4638,1447.9264 1026.2959,1454.1271 914.18803,1442.2811 C 890.51576,1439.7798 958.08047,1399.9848 981.86825,1400.8648 C 1035.4438,1402.8469 1102.1666,1397.8186 1153.5942,1400.8648 C 1197.1585,1403.4452 1234.647,1414.2829 1298.046,1418.0374 z"
style="fill:url(#radialGradient6355);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
sodipodi:nodetypes="cssssc" />
</g>
<rect
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none"
id="rect3924"
width="50.65456"
height="62.482525"
x="12.856487"
y="0.48895457" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 12.856487,0.48895457 0,62.48252643"
id="path3926"
inkscape:connector-curvature="0" />
<path
style="opacity:0.63876654;fill:#000000;fill-opacity:1;stroke:none"
d="m 30.471844,5.6253174 0.535494,33.0519766 22.609757,0 L 30.471844,5.6253174 z M 34.964045,20.375549 44.75169,33.69372 35.321041,33.92285 34.964045,20.375549 z m -24.573235,9.451605 -4.8491983,3.207818 0.2974968,23.829501 4.5517015,4.095696 6.098684,-0.200488 0.08925,-9.566171 44.59477,-2.921405 1.636233,-7.246231 -46.141754,-0.343694 0.118999,-10.855026 -6.396181,0 z"
id="path3010-7"
inkscape:connector-curvature="0" />
<path
style="fill:url(#linearGradient3863);fill-opacity:1;stroke:#000000;stroke-width:1.16431034;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="M 6.7484353,28.04146 1.8898368,31.242417 2.1934992,55.07178 6.7484353,59.161894 12.821683,58.984063 13.125346,28.04146 z"
id="path3010"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:url(#linearGradient3861);fill-opacity:1;stroke:#000000;stroke-width:1.16431034;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 59.162002,39.234097 -1.641628,7.255521 -54.2816054,3.546854 0,-11.205391 z"
id="path3012"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffe400;fill-opacity:1;stroke:#000000;stroke-width:1.16431034;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 26.808896,3.8396874 0.555024,33.0451956 22.60454,0 L 26.808896,3.8396874 z m 4.490635,14.7446996 9.788573,13.322381 -9.435378,0.237054 -0.353195,-13.559435 z"
id="path3782"
inkscape:connector-curvature="0" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 12.856487,62.971481 50.65456,0"
id="path3928"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB