21 #ifndef __XAO_BREPGEOMETRY_HXX__
22 #define __XAO_BREPGEOMETRY_HXX__
27 #include <TopoDS_Shape.hxx>
34 #pragma warning(disable:4290) // Warning Exception ...
70 virtual const std::string getShapeString();
76 virtual void setShapeString(
const std::string& shape);
82 virtual void writeShapeFile(
const std::string& fileName)
throw (
XAO_Exception);
88 virtual void readShapeFile(
const std::string& fileName)
throw (
XAO_Exception);
92 def setShape(
self, shape):
93 if shape is not None and
'GetShapeStream' in dir(shape):
94 self.setShapeString(shape.GetShapeStream())
104 TopoDS_Shape getTopoDS_Shape();
110 void setTopoDS_Shape(
const TopoDS_Shape& shape);
118 void getEdgeVertices(
const int& edgeIndex,
int& vertexA,
int& vertexB);
125 const int countFaceWires(
const int& faceIndex);
133 std::vector<int> getFaceEdges(
const int& faceIndex,
const int& wireIndex);
140 const int countSolidShells(
const int& solidIndex);
148 std::vector<int> getSolidFaces(
const int& solidIndex,
const int& shellIndex);
157 void getVertexXYZ(
const int& vertexIndex,
double& xCoord,
double& yCoord,
double& zCoord)
165 const double getEdgeLength(
const int& index);
172 const double getFaceArea(
const int& index);
179 const double getSolidVolume(
const int& index);
186 const int getVertexID(
const int& index);
193 const int getEdgeID(
const int& index);
200 const int getFaceID(
const int& index);
207 const int getSolidID(
const int& index);
214 void setVertexID(
const int& index,
const int&
id);
221 void setEdgeID(
const int& index,
const int&
id);
228 void setFaceID(
const int& index,
const int&
id);
235 void setSolidID(
const int& index,
const int&
id);
242 const int findVertex(
const int&
id);
249 const int findEdge(
const int&
id);
256 const int findFace(
const int&
id);
263 const int findSolid(
const int&
id);
270 const std::string findVertexName(
const int&
id);
277 const std::string findEdgeName(
const int&
id);
284 const std::string findFaceName(
const int&
id);
291 const std::string findSolidName(
const int&
id);
298 void changeVertexName(
const int&
id,
const std::string& name)
throw (
XAO_Exception);
305 void changeEdgeName(
const int&
id,
const std::string& name)
throw (
XAO_Exception);
312 void changeFaceName(
const int&
id,
const std::string& name)
throw (
XAO_Exception);
319 void changeSolidName(
const int&
id,
const std::string& name)
throw (
XAO_Exception);
324 TopoDS_Shape getSubShape(
const TopoDS_Shape& mainShape,
const TopAbs_ShapeEnum& shapeType,
const int& shapeIndex)
326 const int countGeometricalElements(
const TopoDS_Shape& shape,
const TopAbs_ShapeEnum& shapeType);
327 std::vector<int> getGeometricalElements(
const TopoDS_Shape& shape,
const TopAbs_ShapeEnum& shapeType,
const XAO::Dimension& dim);
336 #endif // __XAO_BREPGEOMETRY_HXX__