Skip to content

Commit

Permalink
Arch: updated OBJ/DAE exporters to export groups
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jun 16, 2016
1 parent dce4695 commit 95195e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Arch/importDAE.py
Expand Up @@ -21,7 +21,7 @@
#* *
#***************************************************************************

import FreeCAD, Mesh, os, numpy, MeshPart
import FreeCAD, Mesh, os, numpy, MeshPart, Arch, Draft
if FreeCAD.GuiUp:
from DraftTools import translate
else:
Expand Down Expand Up @@ -145,7 +145,9 @@ def export(exportList,filename,tessellation=1):
colmesh.materials.append(mat)
objind = 0
scenenodes = []
for obj in exportList:
objectslist = Draft.getGroupContents(exportList,walls=True,addgroups=True)
objectslist = Arch.pruneIncluded(objectslist)
for obj in objectslist:
vindex = []
nindex = []
findex = []
Expand Down
6 changes: 4 additions & 2 deletions src/Mod/Arch/importOBJ.py
Expand Up @@ -21,7 +21,7 @@
#* *
#***************************************************************************

import FreeCAD, DraftGeomUtils, Part, Draft
import FreeCAD, DraftGeomUtils, Part, Draft, Arch
if FreeCAD.GuiUp:
from DraftTools import translate
else:
Expand Down Expand Up @@ -108,7 +108,9 @@ def export(exportList,filename):
outfile.write("# FreeCAD v" + ver[0] + "." + ver[1] + " build" + ver[2] + " Arch module\n")
outfile.write("# http://www.freecadweb.org\n")
offset = 1
for obj in exportList:
objectslist = Draft.getGroupContents(exportList,walls=True,addgroups=True)
objectslist = Arch.pruneIncluded(objectslist)
for obj in objectslist:
if obj.isDerivedFrom("Part::Feature"):
if obj.ViewObject.isVisible():
vlist,elist,flist = getIndices(obj.Shape,offset)
Expand Down

0 comments on commit 95195e3

Please sign in to comment.