Skip to content

Commit

Permalink
Merge pull request #290 from kbwbe/devel
Browse files Browse the repository at this point in the history
fix missing clone basefeatures
  • Loading branch information
kbwbe authored Jul 21, 2019
2 parents 9968cdf + 815480d commit 9daba67
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion InitGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
__title__ = 'A2plus assembly Workbench - InitGui file'
__author__ = 'kbwbe'

A2P_VERSION = 'V0.4.25'
A2P_VERSION = 'V0.4.26'



Expand Down
33 changes: 17 additions & 16 deletions a2p_topomapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ def getTopLevelObjects(self):
inList,dummy = self.treeNodes[objName]
if len(inList) == 0:
self.topLevelShapes.append(objName)
elif len(inList) == 1 and inList[0].Name.startswith("Clone"):
self.topLevelShapes.append(objName)
elif len(inList) == 1 and inList[0].Name.startswith("Part__Mirroring"):
self.topLevelShapes.append(objName)
else:
#-------------------------------------------
# search for missing non top-level clone-basefeatures
Expand All @@ -433,18 +437,20 @@ def getTopLevelObjects(self):

#-------------------------------------------
# search for missing clone-basefeatures
# (now obsolete as this is done above, KB 2019-07-21)
#-------------------------------------------
addList = []
for n in self.topLevelShapes:
if (
n.startswith('Clone') or
n.startswith('Part__Mirroring')
):
dummy,outList = self.treeNodes[n]
if len(outList) == 1:
addList.append(outList[0].Name)
if len(addList) > 0:
self.topLevelShapes.extend(addList)
#addList = []
#for n in self.topLevelShapes:
# if (
# n.startswith('Clone') or
# n.startswith('Part__Mirroring')
# ):
# dummy,outList = self.treeNodes[n]
# if len(outList) == 1:
# addList.append(outList[0].Name)
#if len(addList) > 0:
# self.topLevelShapes.extend(addList)

#-------------------------------------------
# Got some shapes created by PathWB? filter out...
# also filter out invisible shapes...
Expand Down Expand Up @@ -535,11 +541,6 @@ def createTopoNames(self, desiredShapeLabel = None):
faceColors.extend(diffuseCol) #let python libs extend faceColors, much faster
faces.extend(tempShape.Faces) #let python libs extend faces, much faster


#if len(faces) == 1:
# shell = Part.makeShell([faces])
#else:
# shell = Part.makeShell(faces)
shell = Part.makeShell(faces)

try:
Expand Down

0 comments on commit 9daba67

Please sign in to comment.