Hi Dave.
With display.DisplayMessage( gp_Pnt, "hello world" ) you could perhaps annotate
a drawing so we could see what you mean?
Thanks!
-jelle
On Feb 15, 2010, at 1:42 AM, Dave Cowden wrote:
> Hello, all:
>
> I'm writing a routine that sorts the wires in a compound. I think i have it
> right, but I'm not getting the results I'm after.
>
> Here's my code ( this is a consolidated version of other code that is
> sprinkled around ):
>
> compound = { do some code that returns a compound containing two
> wires: }
> dumpTopology(compound);
>
> sf = ShapeAnalysis_FreeBounds();
>
> inputwires = TopTools.TopTools_HSequenceOfShape();
>
> print "Sorting Wires..."
>
> #add all the wires in the compound to the input wires
> texp = TopExp.TopExp_Explorer();
> texp.Init(compound,TopAbs.TopAbs_WIRE);
>
> while ( texp.More() ):
> wire = ts.Wire(texp.Current());
> inputwires.Append(wire);
> texp.Next();
>
> #free memory
> texp.Clear();
> texp.Destroy();
>
> print "There are ",inputwires.Length()," wires."
> outputwires = TopTools.TopTools_HSequenceOfShape();
> print "New list has",outputwires.Length()," wires."
>
>
>
> sf.ConnectWiresToWires(inputwires.GetHandle(),0.0001,False,outputwires.GetHandle()
> );
> return outputwires;
>
> The output of the above print statements is:
> " Sorting Wires...
> There are 2 wires.
> New list has 0 wires.
>
> So apparently I'm not doing something right. I'd expect at a minimum to get a
> list of two wires out. My code crashes later on ( hard crash) but i think
> that's a side affect of this somehow..
>
> There is another version of ConnectWiresToWires, but it requires a
> complicated looking map of something to something that i dont wnat to
> provide. ShapeAnalysis_WireOrder seems even more pointless, requiring a list
> of vertices instead of wires.
>
> thanks for the ideas!
>
> _______________________________________________
> Pythonocc-users mailing list
> [email protected]
> https://mail.gna.org/listinfo/pythonocc-users
_______________________________________________
Pythonocc-users mailing list
[email protected]
https://mail.gna.org/listinfo/pythonocc-users