* \brief Interface for AIS_InteractiveObject
*/
-class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
+class GeomAPI_AISObject : public GeomAPI_Interface
{
public:
/// \brief Creation of empty AIS object
+ GEOMAPI_EXPORT
GeomAPI_AISObject();
+ GEOMAPI_EXPORT
~GeomAPI_AISObject();
/// \brief Creates AIS_Shape object using specified shape
+ GEOMAPI_EXPORT
void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
/** \brief Creates AIS_LengthDimension object
* \param[in] thePlane the plane which contains all points above
* \param[in] theDistance value of the distance to be shown
*/
+ GEOMAPI_EXPORT
void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
std::shared_ptr<GeomAPI_Pnt> theEndPoint,
std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
* \param[in] theFlyoutPoint the flyout of dimension
* \param[in] theRadius value of the radius to be shown
*/
+ GEOMAPI_EXPORT
void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
* \param[in] theFlyoutPoint the flyout point for relation
* \param[in] thePlane the plane which contains the lines
*/
+ GEOMAPI_EXPORT
void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
std::shared_ptr<GeomAPI_Shape> theLine2,
std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
* \param[in] theLine2 second parallel line
* \param[in] thePlane the plane which contains the lines
*/
+ GEOMAPI_EXPORT
void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
std::shared_ptr<GeomAPI_Shape> theLine2,
std::shared_ptr<GeomAPI_Pln> thePlane);
* \param[in] theShape the object
* \param[in] thePlane the plane which contains the lines
*/
+ GEOMAPI_EXPORT
void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
std::shared_ptr<GeomAPI_Pln> thePlane);
/** \brief Assigns the color for the shape
* \param[in] theColor index of the color
*/
+ GEOMAPI_EXPORT
void setColor(const int& theColor);
/** \brief Assigns the color for the shape
* \param[in] theB value of the blue component
* \returns true if the presentation color is changed
*/
+ GEOMAPI_EXPORT
bool setColor(int theR, int theG, int theB);
/** \brief Returns the color for the shape
* \param[in] theG value of the green component
* \param[in] theB value of the blue component
*/
+ GEOMAPI_EXPORT
void getColor(int& theR, int& theG, int& theB);
/// \brief Assigns the width of the lines of shape
+ GEOMAPI_EXPORT
bool setWidth(const double& theWidth);
/// \brief Checks if the object is empty
+ GEOMAPI_EXPORT
bool empty() const;
/// Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape
/// Otherwise returns -1
+ GEOMAPI_EXPORT
int getShapeType() const;
/// Sets marker type for vertex.
/// The type has to be defined according to Acpect_TypeOfMarker
+ GEOMAPI_EXPORT
void setPointMarker(int theType, double theScale);
/// Set line type of edges
/// Has to be defined according to Aspect_TypeOfLine
/// \returns true if the object value differs from the current
+ GEOMAPI_EXPORT
bool setLineStyle(int theStyle);
/// Set transparency of the presentation (theVal = 0 ... 1)
/// \returns true if the object value differs from the current
+ GEOMAPI_EXPORT
bool setTransparensy(double theVal);
};
/** \ingroup DataModel
* \brief The class represents an axis in 3D space.
*/
-class GEOMAPI_EXPORT GeomAPI_Ax1 : public GeomAPI_Interface
+class GeomAPI_Ax1 : public GeomAPI_Interface
{
public:
/// Default constructor.
+ GEOMAPI_EXPORT
GeomAPI_Ax1();
/** \brief Ñonstructor.
* \param[in] theOrigin point of origin.
* \param[in] theDir direction of axis.
*/
+ GEOMAPI_EXPORT
GeomAPI_Ax1(std::shared_ptr<GeomAPI_Pnt> theOrigin,
std::shared_ptr<GeomAPI_Dir> theDir);
/// Sets origin point.
+ GEOMAPI_EXPORT
void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
/// \return the plane origin point.
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> origin() const;
/// Sets direction vector.
+ GEOMAPI_EXPORT
void setDir(const std::shared_ptr<GeomAPI_Dir>& theDir);
/// \return direction vector.
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir> dir() const;
/// Reverses the unit vector of this axis and assigns the result to this axis.
+ GEOMAPI_EXPORT
void reverse();
/// \return reversed unit vector of this axis.
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Ax1> reversed();
};
* \brief The class represents a coordinate plane which is 2d plane with X and Y directions
* and origin
*/
-class GEOMAPI_EXPORT GeomAPI_Ax3 : public GeomAPI_Interface
+class GeomAPI_Ax3 : public GeomAPI_Interface
{
public:
/// Default constructor
+ GEOMAPI_EXPORT
GeomAPI_Ax3();
/// Ñonstructor
/// \param theOrigin point of origin
/// \param theDirX direction of X axis
/// \param theNorm direction of normal vector
+ GEOMAPI_EXPORT
GeomAPI_Ax3(std::shared_ptr<GeomAPI_Pnt> theOrigin,
std::shared_ptr<GeomAPI_Dir> theDirX,
std::shared_ptr<GeomAPI_Dir> theNorm);
/// Sets origin point
+ GEOMAPI_EXPORT
void setOrigin(const std::shared_ptr<GeomAPI_Pnt>& theOrigin);
/// Returns the plane origin point
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> origin() const;
/// Sets X direction vector
+ GEOMAPI_EXPORT
void setDirX(const std::shared_ptr<GeomAPI_Dir>& theDirX);
/// Returns X direction vector
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir> dirX() const;
/// Sets Y direction vector
+ GEOMAPI_EXPORT
void setDirY(const std::shared_ptr<GeomAPI_Dir>& theDirY);
/// Returns Y direction vector
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir> dirY() const;
/// Sets Z direction vector
+ GEOMAPI_EXPORT
void setNorm(const std::shared_ptr<GeomAPI_Dir>& theNorm);
/// Returns Z direction vector
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir> norm() const;
/// Converts 2d coordinates from the plane to 3d space point
/// \param theX X coordinate
/// \param theY Y coordinate
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> to3D(double theX, double theY) const;
/// Converts 3d to 2d coordinates of the plane
/// \param theX X coordinate
/// \param theY Y coordinate
/// \param theZ Z coordinate
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt2d> to2D(double theX, double theY, double theZ) const;
};
* \brief Circle in 2D
*/
-class GEOMAPI_EXPORT GeomAPI_Circ2d : public GeomAPI_Interface
+class GeomAPI_Circ2d : public GeomAPI_Interface
{
public:
/// Creation of circle defined by center point and circle radius
+ GEOMAPI_EXPORT
GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
const std::shared_ptr<GeomAPI_Pnt2d>& theCirclePoint);
/// Creation of circle defined by center point, direction and circle radius
+ GEOMAPI_EXPORT
GeomAPI_Circ2d(const std::shared_ptr<GeomAPI_Pnt2d>& theCenter,
const std::shared_ptr<GeomAPI_Dir2d>& theDir, double theRadius);
/// Return center of the circle
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Pnt2d> center() const;
/// Return radius of the circle
+ GEOMAPI_EXPORT
double radius() const;
/// Project point on line
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Pnt2d> project(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
};
* \brief Interface to the generic curve object
*/
-class GEOMAPI_EXPORT GeomAPI_Curve : public GeomAPI_Interface
+class GeomAPI_Curve : public GeomAPI_Interface
{
public:
/// Creation of empty (null) shape
+ GEOMAPI_EXPORT
GeomAPI_Curve();
/// Creates a curve from the shape (edge)
+ GEOMAPI_EXPORT
GeomAPI_Curve(const std::shared_ptr<GeomAPI_Shape>& theShape);
/// Returns true if curve is not initialized
+ GEOMAPI_EXPORT
bool isNull() const;
/// Returns whether the curve is linear
+ GEOMAPI_EXPORT
virtual bool isLine() const;
/// Returns whether the curve is circular
+ GEOMAPI_EXPORT
virtual bool isCircle() const;
/// Returns start parameter of the curve
+ GEOMAPI_EXPORT
double startParam() const { return myStart; }
/// Returns end parameter of the curve
+ GEOMAPI_EXPORT
double endParam() const { return myEnd; }
/// Returns point on the curve by parameter
/// \param theParam parameter on the curve
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> getPoint(double theParam);
private:
* \ingroup DataModel
* \brief DataMap of Shape - Shape defined by TopoDS_Shapes
*/
-class GEOMAPI_EXPORT GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
+class GeomAPI_DataMapOfShapeShape : public GeomAPI_Interface
{
public:
/// Creation of plane by the point and normal
+ GEOMAPI_EXPORT
GeomAPI_DataMapOfShapeShape();
/// Clear
+ GEOMAPI_EXPORT
void clear();
/// Size of the map
+ GEOMAPI_EXPORT
int size();
/// Adds \a theKey to me with \a theItem. Returns True if the Key was not already in the map
+ GEOMAPI_EXPORT
bool bind (std::shared_ptr<GeomAPI_Shape> theKey, std::shared_ptr<GeomAPI_Shape> theItem);
/// Returns true if theKey is stored in the map.
+ GEOMAPI_EXPORT
bool isBound (std::shared_ptr<GeomAPI_Shape> theKey);
/// Returns the Item stored with the Key in the Map.
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Shape> find(std::shared_ptr<GeomAPI_Shape> theKey);
/// Removes the Key from the map. Returns true if the Key was in the Map
+ GEOMAPI_EXPORT
bool unBind(std::shared_ptr<GeomAPI_Shape> theKey);
/// Destructor
+ GEOMAPI_EXPORT
~GeomAPI_DataMapOfShapeShape();
};
* \brief 3D direction defined by three normalized coordinates
*/
-class GEOMAPI_EXPORT GeomAPI_Dir : public GeomAPI_Interface
+class GeomAPI_Dir : public GeomAPI_Interface
{
public:
/// Creation of direction by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Dir(const double theX, const double theY, const double theZ);
/// Creation of direction by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Dir(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
/// returns X coordinate
+ GEOMAPI_EXPORT
double x() const;
/// returns Y coordinate
+ GEOMAPI_EXPORT
double y() const;
/// returns Z coordinate
+ GEOMAPI_EXPORT
double z() const;
/// returns coordinates of the direction
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> xyz();
/// result is a scalar product of directions
+ GEOMAPI_EXPORT
double dot(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
/// result is a cross product of two directions
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
/// calculates angle between two directions
+ GEOMAPI_EXPORT
double angle(const std::shared_ptr<GeomAPI_Dir>& theArg) const;
};
* \brief 2D direction defined by three normalized coordinates
*/
-class GEOMAPI_EXPORT GeomAPI_Dir2d : public GeomAPI_Interface
+class GeomAPI_Dir2d : public GeomAPI_Interface
{
public:
/// Creation of direction by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Dir2d(const double theX, const double theY);
/// Creation of direction by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Dir2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
/// returns X coordinate
+ GEOMAPI_EXPORT
double x() const;
/// returns Y coordinate
+ GEOMAPI_EXPORT
double y() const;
/// returns coordinates of the direction
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XY> xy();
/// result is a scalar product of directions
+ GEOMAPI_EXPORT
double dot(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
/// result is a cross product of two directions
+ GEOMAPI_EXPORT
double cross(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
/// calculates angle between two directions
+ GEOMAPI_EXPORT
double angle(const std::shared_ptr<GeomAPI_Dir2d>& theArg) const;
};
* \brief Interface to the edge object
*/
-class GEOMAPI_EXPORT GeomAPI_Edge : public GeomAPI_Shape
+class GeomAPI_Edge : public GeomAPI_Shape
{
public:
/// Creation of empty (null) shape
+ GEOMAPI_EXPORT
GeomAPI_Edge();
/// Creation of edge by the edge-shape
+ GEOMAPI_EXPORT
GeomAPI_Edge(const std::shared_ptr<GeomAPI_Shape>& theShape);
/// Verifies that the edge is a line
+ GEOMAPI_EXPORT
bool isLine() const;
/// Verifies that the edge is a circle
+ GEOMAPI_EXPORT
bool isCircle() const;
/// Verifies that the edge is an arc of circle
+ GEOMAPI_EXPORT
bool isArc() const;
/// Returns the first vertex coordinates of the edge
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> firstPoint();
/// Returns the Last vertex coordinates of the edge
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> lastPoint();
/// Returns a circle if edge is based on the circle curve
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Circ> circle();
/// Returns a line if edge is based on the linear curve
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Lin> line();
/// Returns true if the current edge is geometrically equal to the given edge
+ GEOMAPI_EXPORT
bool isEqual(const std::shared_ptr<GeomAPI_Shape> theEdge) const;
};
* \ingroup DataModel
* \brief Interface to the face object
*/
-class GEOMAPI_EXPORT GeomAPI_Face : public GeomAPI_Shape
+class GeomAPI_Face : public GeomAPI_Shape
{
public:
/// Creation of empty (null) shape
+ GEOMAPI_EXPORT
GeomAPI_Face();
/// Creation of face by the face-shape
+ GEOMAPI_EXPORT
GeomAPI_Face(const std::shared_ptr<GeomAPI_Shape>& theShape);
/// Returns true if the current face is geometrically equal to the given face
+ GEOMAPI_EXPORT
virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theFace) const;
/// Returns true if the face is a planar face
+ GEOMAPI_EXPORT
bool isPlanar() const;
/// Returns true if the face is a cylindrical face
+ GEOMAPI_EXPORT
bool isCylindrical() const;
/// Returns the base plane of the face (if it is planar) with location in the center of the face
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pln> getPlane() const;
};
* \brief Line in 3D
*/
-class GEOMAPI_EXPORT GeomAPI_Lin : public GeomAPI_Interface
+class GeomAPI_Lin : public GeomAPI_Interface
{
public:
/// Creation of line defined by cordinates of start and end points
+ GEOMAPI_EXPORT
GeomAPI_Lin(const double theStartX, const double theStartY, const double theStartZ,
const double theEndX, const double theEndY, const double theEndZ);
/// Creation of line defined by start and end points
+ GEOMAPI_EXPORT
GeomAPI_Lin(const std::shared_ptr<GeomAPI_Pnt>& theStart,
const std::shared_ptr<GeomAPI_Pnt>& theEnd);
/// Returns point on the line (first point)
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> location();
/// Returns a line direction
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir> direction();
/// Distance between two points
+ GEOMAPI_EXPORT
double distance(const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
/// Intersection of two lines
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Pnt> intersect(
const std::shared_ptr<GeomAPI_Lin>& theLine) const;
/// Project point on line
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Pnt> project(
const std::shared_ptr<GeomAPI_Pnt>& thePoint) const;
};
* \brief Line in 2D
*/
-class GEOMAPI_EXPORT GeomAPI_Lin2d : public GeomAPI_Interface
+class GeomAPI_Lin2d : public GeomAPI_Interface
{
public:
/// Creation of line defined by cordinates of start and end points
+ GEOMAPI_EXPORT
GeomAPI_Lin2d(const double theStartX, const double theStartY, const double theEndX,
const double theEndY);
/// Creation of line defined by start and end points
+ GEOMAPI_EXPORT
GeomAPI_Lin2d(const std::shared_ptr<GeomAPI_Pnt2d>& theStart,
const std::shared_ptr<GeomAPI_Pnt2d>& theEnd);
/// Returns point on the line (first point)
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt2d> location();
/// Returns a line direction
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir2d> direction();
/// Distance between two points
+ GEOMAPI_EXPORT
double distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
/// Intersection of two lines
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Pnt2d> intersect(
const std::shared_ptr<GeomAPI_Lin2d>& theLine) const;
/// Project point on line
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_Pnt2d> project(
const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
/// Computes the cross product of the line direction and a vector from the line start point to the point
+ GEOMAPI_EXPORT
bool isRight(const std::shared_ptr<GeomAPI_Pnt2d>& thePoint) const;
/// Returns a location point shifted on theShift in perpendicular direction
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt2d> shiftedLocation(double theShift) const;
};
* \brief 3D point defined by three coordinates
*/
-class GEOMAPI_EXPORT GeomAPI_Pln : public GeomAPI_Interface
+class GeomAPI_Pln : public GeomAPI_Interface
{
public:
/// Creation of plane by the axis placement
+ GEOMAPI_EXPORT
GeomAPI_Pln(const std::shared_ptr<GeomAPI_Ax3>& theAxis);
/// Creation of plane by the point and normal
+ GEOMAPI_EXPORT
GeomAPI_Pln(const std::shared_ptr<GeomAPI_Pnt>& thePoint,
const std::shared_ptr<GeomAPI_Dir>& theNormal);
/// Creation of plane by coefficients (Ax+By+Cz+D=0)
+ GEOMAPI_EXPORT
GeomAPI_Pln(const double theA, const double theB, const double theC, const double theD);
/// Returns a point of this plane
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> location();
/// Returns a plane normal
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Dir> direction();
/// Returns the plane coefficients (Ax+By+Cz+D=0)
+ GEOMAPI_EXPORT
void coefficients(double& theA, double& theB, double& theC, double& theD);
};
* \brief 3D point defined by three coordinates
*/
-class GEOMAPI_EXPORT GeomAPI_Pnt : public GeomAPI_Interface
+class GeomAPI_Pnt : public GeomAPI_Interface
{
public:
/// Creation of point by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Pnt(const double theX, const double theY, const double theZ);
/// Creation of point by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Pnt(const std::shared_ptr<GeomAPI_XYZ>& theCoords);
/// returns X coordinate
+ GEOMAPI_EXPORT
double x() const;
/// returns Y coordinate
+ GEOMAPI_EXPORT
double y() const;
/// returns Z coordinate
+ GEOMAPI_EXPORT
double z() const;
/// sets X coordinate
+ GEOMAPI_EXPORT
void setX(const double theX);
/// sets Y coordinate
+ GEOMAPI_EXPORT
void setY(const double theY);
/// sets Z coordinate
+ GEOMAPI_EXPORT
void setZ(const double theZ);
/// returns coordinates of the point
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> xyz();
/// Distance between two points
+ GEOMAPI_EXPORT
double distance(const std::shared_ptr<GeomAPI_Pnt>& theOther) const;
/// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
const std::shared_ptr<GeomAPI_Dir>& theDirX,
const std::shared_ptr<GeomAPI_Dir>& theDirY);
/// Projects a point to the plane defined by the origin and 2 axes vectors in this plane
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt2d> to2D(const std::shared_ptr<GeomAPI_Pln>& thePln) const;
/// Translates the point along direction theDir on distance theDist
+ GEOMAPI_EXPORT
void translate(const std::shared_ptr<GeomAPI_Dir>& theDir, double theDist);
};
* \brief 2D point defined by two coordinates
*/
-class GEOMAPI_EXPORT GeomAPI_Pnt2d : public GeomAPI_Interface
+class GeomAPI_Pnt2d : public GeomAPI_Interface
{
public:
/// Creation of point by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Pnt2d(const double theX, const double theY);
/// Creation of point by coordinates
+ GEOMAPI_EXPORT
GeomAPI_Pnt2d(const std::shared_ptr<GeomAPI_XY>& theCoords);
/// returns X coordinate
+ GEOMAPI_EXPORT
double x() const;
/// returns Y coordinate
+ GEOMAPI_EXPORT
double y() const;
/// sets X coordinate
+ GEOMAPI_EXPORT
void setX(const double theX);
/// sets Y coordinate
+ GEOMAPI_EXPORT
void setY(const double theY);
/// Returns the 3D point
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> to3D(const std::shared_ptr<GeomAPI_Pnt>& theOrigin,
const std::shared_ptr<GeomAPI_Dir>& theDirX,
const std::shared_ptr<GeomAPI_Dir>& theDirY);
/// returns coordinates of the point
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XY> xy();
/// Distance between two points
+ GEOMAPI_EXPORT
double distance(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
/// Returns whether the distance between two points is less then precision confusion
+ GEOMAPI_EXPORT
bool isEqual(const std::shared_ptr<GeomAPI_Pnt2d>& theOther) const;
};
* \ingroup DataModel
* \brief Interface to the topological shape object
*/
-class GEOMAPI_EXPORT GeomAPI_Shape : public GeomAPI_Interface
+class GeomAPI_Shape : public GeomAPI_Interface
{
public:
/// Shape type enum
public:
/// Creation of empty (null) shape
+ GEOMAPI_EXPORT
GeomAPI_Shape();
/// Returns true if the underlied shape is null
+ GEOMAPI_EXPORT
bool isNull() const;
/// Returns whether the shapes are equal
+ GEOMAPI_EXPORT
virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
/// Returns whether the shape is a vertex
+ GEOMAPI_EXPORT
virtual bool isVertex() const;
/// Returns whether the shape is an edge
+ GEOMAPI_EXPORT
virtual bool isEdge() const;
/// Returns whether the shape is a face
+ GEOMAPI_EXPORT
virtual bool isFace() const;
/// Returns whether the shape is a compound
+ GEOMAPI_EXPORT
virtual bool isCompound() const;
/// Returns whether the shape is a compound of solids
+ GEOMAPI_EXPORT
virtual bool isCompoundOfSolids() const;
/// Returns whether the shape is a solid
+ GEOMAPI_EXPORT
virtual bool isSolid() const;
/// Computes boundary dimensions of the shape
/// Returns False if it is not possible
+ GEOMAPI_EXPORT
bool computeSize(double& theXmin, double& theYmin, double& theZmin,
double& theXmax, double& theYmax, double& theZmax) const;
/// Returns the shape as BRep stream
+ GEOMAPI_EXPORT
std::string getShapeStream() const;
};
* \brief This class is used to explore subshapes on shape.
*/
-class GEOMAPI_EXPORT GeomAPI_ShapeExplorer : public GeomAPI_Interface
+class GeomAPI_ShapeExplorer : public GeomAPI_Interface
{
public:
/// Default constructor. Creates an empty explorer, becomes usefull after Init.
+ GEOMAPI_EXPORT
GeomAPI_ShapeExplorer();
/** \brief Constructs an explorer to search on theShape, for shapes of type toFind,
\param[in] toFind shape type to find.
\param[in] toAvoid shape type to avoid.
*/
+ GEOMAPI_EXPORT
GeomAPI_ShapeExplorer(const std::shared_ptr<GeomAPI_Shape>& theShape,
const GeomAPI_Shape::ShapeType toFind,
const GeomAPI_Shape::ShapeType toAvoid = GeomAPI_Shape::SHAPE);
\param[in] toFind shape type to find.
\param[in] toAvoid shape type to avoid.
*/
+ GEOMAPI_EXPORT
void init(const std::shared_ptr<GeomAPI_Shape>& theShape,
const GeomAPI_Shape::ShapeType toFind,
const GeomAPI_Shape::ShapeType toAvoid = GeomAPI_Shape::SHAPE);
/// \return true if there are more shapes in the exploration.
+ GEOMAPI_EXPORT
bool more() const;
/// Moves to the next Shape in the exploration or do nothing if there are no more shapes to explore.
+ GEOMAPI_EXPORT
void next();
/// Returns the current shape in the exploration or empty pointer if this explorer has no more shapes to explore.
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Shape> current();
/// Reinitialize the exploration with the original arguments.
+ GEOMAPI_EXPORT
void reinit();
/// Returns the current depth of the exploration. 0 is the shape to explore itself.
+ GEOMAPI_EXPORT
int depth() const;
/// Clears the content of the explorer. It will return False on more().
+ GEOMAPI_EXPORT
void clear();
};
* \brief Interface to the vertex object
*/
-class GEOMAPI_EXPORT GeomAPI_Vertex : public GeomAPI_Shape
+class GeomAPI_Vertex : public GeomAPI_Shape
{
public:
/// Creation of empty (null) shape
+ GEOMAPI_EXPORT
GeomAPI_Vertex();
/// Creation of edge by the edge-shape
+ GEOMAPI_EXPORT
GeomAPI_Vertex(const std::shared_ptr<GeomAPI_Shape>& theShape);
/// Returns the first vertex coordinates of the edge
+ GEOMAPI_EXPORT
std::shared_ptr<GeomAPI_Pnt> point();
/// Returns true if the current edge is geometrically equal to the given edge
+ GEOMAPI_EXPORT
bool isEqual(const std::shared_ptr<GeomAPI_Shape> theVert) const;
};
* \brief 2 coordinates: they may represent vector or point or something else
*/
-class GEOMAPI_EXPORT GeomAPI_XY : public GeomAPI_Interface
+class GeomAPI_XY : public GeomAPI_Interface
{
public:
/// Creation by coordinates
+ GEOMAPI_EXPORT
GeomAPI_XY(const double theX, const double theY);
/// returns X coordinate
+ GEOMAPI_EXPORT
double x() const;
/// returns Y coordinate
+ GEOMAPI_EXPORT
double y() const;
/// sets X coordinate
+ GEOMAPI_EXPORT
void setX(const double theX);
/// sets Y coordinate
+ GEOMAPI_EXPORT
void setY(const double theY);
/// result is sum of coordinates of this and the given argument
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XY> added(const std::shared_ptr<GeomAPI_XY>& theArg);
/// result is difference between coordinates of this and the given argument
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XY> decreased(const std::shared_ptr<GeomAPI_XY>& theArg);
/// result is coordinates multiplied by the argument
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XY> multiplied(const double theArg);
/// result is a scalar product of two triplets
+ GEOMAPI_EXPORT
double dot(const std::shared_ptr<GeomAPI_XY>& theArg) const;
/// result is a cross product of two triplets
+ GEOMAPI_EXPORT
double cross(const std::shared_ptr<GeomAPI_XY>& theArg) const;
/// Distance between two pairs
+ GEOMAPI_EXPORT
double distance(const std::shared_ptr<GeomAPI_XY>& theOther) const;
};
* \brief 3 coordinates: they may represent vector or point or something else
*/
-class GEOMAPI_EXPORT GeomAPI_XYZ : public GeomAPI_Interface
+class GeomAPI_XYZ : public GeomAPI_Interface
{
public:
/// Creation by coordinates
+ GEOMAPI_EXPORT
GeomAPI_XYZ(const double theX, const double theY, const double theZ);
/// returns X coordinate
+ GEOMAPI_EXPORT
double x() const;
/// returns Y coordinate
+ GEOMAPI_EXPORT
double y() const;
/// returns Z coordinate
+ GEOMAPI_EXPORT
double z() const;
/// sets X coordinate
+ GEOMAPI_EXPORT
void setX(const double theX);
/// sets Y coordinate
+ GEOMAPI_EXPORT
void setY(const double theY);
/// sets Z coordinate
+ GEOMAPI_EXPORT
void setZ(const double theZ);
/// result is sum of coordinates of this and the given argument
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> added(const std::shared_ptr<GeomAPI_XYZ>& theArg);
/// result is difference between coordinates of this and the given argument
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> decreased(const std::shared_ptr<GeomAPI_XYZ>& theArg);
/// result is coordinates multiplied by the argument
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> multiplied(const double theArg);
/// result is a scalar product of two triplets
+ GEOMAPI_EXPORT
double dot(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
/// result is a cross product of two triplets
+ GEOMAPI_EXPORT
const std::shared_ptr<GeomAPI_XYZ> cross(const std::shared_ptr<GeomAPI_XYZ>& theArg) const;
/// Distance between two triplets
+ GEOMAPI_EXPORT
double distance(const std::shared_ptr<GeomAPI_XYZ>& theOther) const;
};