Hi Frank,
Well, if I'd use your method in Topo._loop_topo that would be pretty
need, right?
Cheers,
-jelle
On Apr 21, 2009, at 4:25 PM, Frank Conradie wrote:
Ah, fantastic! I was going to post the same issue here, but have
been just swamped at work. My work-around was to add all found
shapes temporarily to a TopTools_SequenceOfShape, but the ReInit()
way is much less of a hack.
By the way, the same issue happens when using TopoDS_Iterator, but
it does not seem to have a ReInit method? E.g. here is how I
currently work around this issue:
def GetShapeChildren(s):
children = {}
it = TopoDS_Iterator(s)
totChildren = 0
aSeq = TopTools_SequenceOfShape()
while it.More():
totChildren += 1
ss = it.Value()
aSeq.Append(ss)
ss = aSeq.Value(aSeq.Length())
stChildren = children.setdefault(subType, [])
if ss not in stChildren:
stChildren.append(ss)
it.Next()
return children
_______________________________________________
Pythonocc-users mailing list
Pythonocc-users@gna.org
https://mail.gna.org/listinfo/pythonocc-users