February the 1th 2010
The TGeo - CAD interface status was discussed.
C. Luzzi made a presentation of the interface status. The work did was discussed and the following conclusions were reached on the work to be done:
- The TGeo - CAD interface is a Root plugin library interfaced with the opencascade system;
- To use the interface, Opencascade must be installed; it's needs 4-5 hours to compile; Should be possible to build just the libraries used by GeoCAD.
- TGeo-CAD interface needs that a Root Geometry is loaded in memory;
- Open Cascade geometries are built on the TGeo ones and are written on a Step file that can be used in CATIA;
- GeoCAD is able to translate almost all shapes and to read the all geometry tree;
- TGeoPgon, TGeoPcon, TGeoComposite and TGeoHype shapes have to be translated, yet;
- It's important to know the execution time to translate a fully geometry and write it on the step file;
- It's, also, important the step file dimension for a fully geometry;
- The StepControl_Writer class from OpenCascade was used to create the step file. This class directly writes a step file from an OpenCascade geometry. Should can be just copy a shape's pointer on the step file when we have the same shape more times into the geometry. In this way we need less space and time for translation.
S. Belogurov asked how to create a shape as hierarchy of points, edges, wire, shell and solid. The follow example shows that:
1) BRepBuilderAPI_Sewing class allows to assemble contigous shapes into one shape. So I declared an empty object:
BRepBuilderAPI_Sewing shape;
2) Create the edge's points using gp_Pnt classe as follow:
gp_Pnt p1(x,y,z);
For box, of course, you need 4 points for each edge;
3) Create edges:
TopoDS_Edge edge=BRepBuilderAPI_MakeEdge(p1,p2);
4) Create a wire from 4 edges:
TopoDS_Wire wire = BRepBuilderAPI_MakeWire(edge1, edge2, edge3, edge4);
5) Create the first box face:
TopoDS_Face face = BRepBuilderAPI_MakeFace(wire);
6) Add the face to the shape declared above with:
shape.Add(face)
7) Repeat these steps for each face of your box;
8) Use Perform method of BRepAlgoAPI_Sewing class that allows to compute the shape;
9) Use SewedShape method of BRepAlgoAPI_Sewing class gives the TopoDS_Shape element created;
There are minutes attached to this event.
Show them.