Sun, 07/01/2007 - 16:11
Hello,
I'm trying to triangulate a shape. This shape I want to read out of a STEP file by BRepTools::Read(TopoDS_Shape & Sh, const Standard_CString File, const BRep_Builder & B) respectively by the same mathod provided by jCAE the Java interface for OCC (thanks to Patrik Mueller for this hint).
My first problem is, that I'm getting an IO or file format error when reading the file. Do I have to transform the STEP files in order to instantiate the shape? Patrik stated in this thread (http://www.opencascade.org/org/forum/thread_11550/) that there has to be done some transformation...
My second problem is, that I'm a bit confused about what Methods and classes to use to implement my task.
Is this the right procedure?
1. read out the STEP file & applying it to a new shape
2. iterate over the faces of the shape by TopExp_Explorer
3. triangulate every face during the iteration by BRep_Tool.triangulation
What is the business of TopLoc_Location in step 3? Do I have to make use of BRepMesh? What's the function of BRepMesh?
I know that's a bunch of questions but I hope there is someone of you who has pity with me :)
Thanks for help!
Best regards,
Patrick
Sun, 07/01/2007 - 17:09
Oh, I've found the STEPControl_Reader to read STEP files and translate them into Open CASCADE models. My first problem should be solved so far...
Wed, 07/11/2007 - 17:16
I'm Becomming desperate. The Transformation of a STEP file into an OCC model works very well now. It's much easier than I thought :)
Hope someone of you can help me with my triangulation problem. What do I have to do, to triangulate the OCC model? Which classes and methodes do I need to do so?
Greets,
Patrick
Wed, 07/11/2007 - 21:33
Triangulation is performed primarily with the BRepMesh class. You can search for BRepMesh on the forum for multiple threads on the subject. A good example is contained in:
http://www.opencascade.org/org/forum/thread_9607/
Sorry, I did not notice any Java examples.
Rob
Tue, 08/12/2008 - 14:59
Pretty typical of OCC in general. About 8 ways to do anything, they all confuse you and there arent any clear cut examples!
Stephen