Re: [Pythonocc-users] Wireframe/solid generation

2011-12-08 Thread Jayesh Salvi
After more investigation of why NotDone is thrown, I have found some info. The Fuse operation has ErrorStatus() function on it. I found that it returns the error code 110. Then I looked into OCC code to find out what 110 stands for. I think these two locations in code can throw that error [1

[Pythonocc-users] RE : Re: Wireframe/solid generation

2011-12-08 Thread Thomas Paviot
Did you try to cast the compound to a TopoDS-Solid? Thomas - sent from my Android phone Le 8 déc. 2011, 10:07 AM, "Jayesh Salvi" a écrit : After more investigation of why NotDone is thrown, I have found some info. The Fuse operation has ErrorStatus() function on it. I found that it returns the

Re: [Pythonocc-users] RE : Re: Wireframe/solid generation

2011-12-08 Thread Jayesh Salvi
Thomas, I guess the way to do "cast" in pythonOCC is as follows: unionop = BRepAlgoAPI_Fuse(TopoDS().solid(aShape), box) [as seen in the routine ShapeToTopology that you have written somewhere] But that doesn't help either. I get. RuntimeError: Standard_TypeMismatch TopoDS::Solid Did you mean

Re: [Pythonocc-users] RE : Re: Wireframe/solid generation

2011-12-08 Thread Frank Conradie
Hi Jayesh If I remember correctly, the sewing tool only creates shells, and you have to manually "wrap" them in solids. Here is some code I've used to do this in the past: # Note that shells is a Python list of shell(s), and it is assumed that if there # are more than 1 shells, the 1st is th

Re: [Pythonocc-users] RE : Re: Wireframe/solid generation

2011-12-08 Thread Jayesh Salvi
Hi Frank, That sounds right, but sewing tools doesn't exactly create TopoDS_SHELL. >From the documentation it can create a Shape object or as in the code I've written (derived from STLReader code), it can create a Compound. I don't know how to create Shell from these objects. -- Jayesh On Thu,

Re: [Pythonocc-users] RE : Re: Wireframe/solid generation

2011-12-08 Thread Frank Conradie
If you check the COMPOUND it is likely to contain one or more shells. If it only contains faces, you will have to construct SHELL(s) from these first, then SOLID(s). - Frank On 08/12/2011 5:43 PM, Jayesh Salvi wrote: Hi Frank, That sounds right, but sewing tools doesn't exactly create TopoDS