SHAPER  9.12.0
XAO::Geometry Class Referenceabstract

Base class for geometries. More...

Inheritance diagram for XAO::Geometry:
Inheritance graph

Static Public Member Functions

static GeometrycreateGeometry (XAO::Format format)
 Creates a geometry. More...
 

Protected Member Functions

 Geometry (const std::string &name)
 Constructor. More...
 

name the name of the geometry.

Constructor.

Creates a geometry.

Returns
the created geometry.
std::string m_name
 
GeometricElementList m_vertices
 
GeometricElementList m_edges
 
GeometricElementList m_faces
 
GeometricElementList m_solids
 
bool m_readOnly
 
void checkReadOnly ()
 
static GeometrycreateGeometry (XAO::Format format, const std::string &name)
 
virtual ~Geometry ()
 Destructor. More...
 
const std::string getName ()
 Gets the name of the geometry. More...
 
void setName (const std::string &name)
 Sets the name of the geometry. More...
 
virtual XAO::Format getFormat ()=0
 Gets the format of the geometry. More...
 
virtual const std::string getShapeString ()=0
 
virtual void setShapeString (const std::string &shape)=0
 
virtual void writeShapeFile (const std::string &fileName)=0
 
virtual void readShapeFile (const std::string &fileName)=0
 
int countElements (XAO::Dimension dim) const
 
int countVertices () const
 
int countEdges () const
 
int countFaces () const
 
int countSolids () const
 
void setCountVertices (int nb)
 
void setCountEdges (int nb)
 
void setCountFaces (int nb)
 
void setCountSolids (int nb)
 
const std::string getVertexName (int index)
 
const std::string getEdgeName (int index)
 
const std::string getFaceName (int index)
 
const std::string getSolidName (int index)
 
void setVertexName (int index, const std::string &name)
 
void setEdgeName (int index, const std::string &name)
 
void setFaceName (int index, const std::string &name)
 
void setSolidName (int index, const std::string &name)
 
bool hasVertexName (int index)
 
bool hasEdgeName (int index)
 
bool hasFaceName (int index)
 
bool hasSolidName (int index)
 
const std::string getVertexReference (int index)
 
const std::string getEdgeReference (int index)
 
const std::string getFaceReference (int index)
 
const std::string getSolidReference (int index)
 
const std::string getElementReference (XAO::Dimension dim, int index)
 
void setVertexReference (int index, const std::string &reference)
 
void setEdgeReference (int index, const std::string &reference)
 
void setFaceReference (int index, const std::string &reference)
 
void setSolidReference (int index, const std::string &reference)
 
void setVertex (int index, const std::string &name, const std::string &reference)
 
void setEdge (int index, const std::string &name, const std::string &reference)
 
void setFace (int index, const std::string &name, const std::string &reference)
 
void setSolid (int index, const std::string &name, const std::string &reference)
 
int getVertexIndexByReference (const std::string &reference)
 
int getEdgeIndexByReference (const std::string &reference)
 
int getFaceIndexByReference (const std::string &reference)
 
int getSolidIndexByReference (const std::string &reference)
 
int getElementIndexByReference (XAO::Dimension dim, const std::string &reference)
 
GeometricElementList::iterator begin (XAO::Dimension dim)
 
GeometricElementList::iterator end (XAO::Dimension dim)
 
bool isReadOnly ()
 Verifies if the geometry is read only. More...
 
void setReadOnly ()
 Sets the geometry read only. More...
 

Detailed Description

Base class for geometries.

Constructor & Destructor Documentation

◆ Geometry()

Geometry::Geometry ( const std::string &  name)
protected

Constructor.

Parameters
namethe name of the Geometry.

◆ ~Geometry()

Geometry::~Geometry ( )
virtual

Destructor.

Member Function Documentation

◆ createGeometry()

Geometry * Geometry::createGeometry ( XAO::Format  format)
static

Creates a geometry.

Parameters
formatthe format of the geometry.
Returns
the created geometry.

◆ getName()

const std::string XAO::Geometry::getName ( )
inline

Gets the name of the geometry.

Returns
the name of the geometry.

◆ setName()

void XAO::Geometry::setName ( const std::string &  name)
inline

Sets the name of the geometry.

Parameters
namethe name to set.

◆ getFormat()

virtual XAO::Format XAO::Geometry::getFormat ( )
pure virtual

Gets the format of the geometry.

Returns
the format of the geometry.

Implemented in XAO::BrepGeometry.

◆ isReadOnly()

bool XAO::Geometry::isReadOnly ( )
inline

Verifies if the geometry is read only.

Returns
true if the geometry is read only.

◆ setReadOnly()

void XAO::Geometry::setReadOnly ( )
inline

Sets the geometry read only.