From: spo Date: Fri, 3 Jul 2015 08:58:09 +0000 (+0300) Subject: Use GEOMAPI_EXPORT not for the class but for class members. X-Git-Tag: V_1.3.0~115 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a3508b5b0db5dd5857049f3f046bd628030d9bb9;p=modules%2Fshaper.git Use GEOMAPI_EXPORT not for the class but for class members. --- diff --git a/src/GeomAPI/GeomAPI_AISObject.h b/src/GeomAPI/GeomAPI_AISObject.h index 06bc2e905..6d0a3f2e5 100644 --- a/src/GeomAPI/GeomAPI_AISObject.h +++ b/src/GeomAPI/GeomAPI_AISObject.h @@ -22,15 +22,18 @@ class GeomAPI_Shape; * \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 theShape); /** \brief Creates AIS_LengthDimension object @@ -40,6 +43,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \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 theStartPoint, std::shared_ptr theEndPoint, std::shared_ptr theFlyoutPoint, @@ -50,6 +54,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \param[in] theFlyoutPoint the flyout of dimension * \param[in] theRadius value of the radius to be shown */ + GEOMAPI_EXPORT void createRadius(std::shared_ptr theCircle, std::shared_ptr theFlyoutPoint, double theRadius); @@ -59,6 +64,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \param[in] theFlyoutPoint the flyout point for relation * \param[in] thePlane the plane which contains the lines */ + GEOMAPI_EXPORT void createParallel(std::shared_ptr theLine1, std::shared_ptr theLine2, std::shared_ptr theFlyoutPoint, @@ -69,6 +75,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \param[in] theLine2 second parallel line * \param[in] thePlane the plane which contains the lines */ + GEOMAPI_EXPORT void createPerpendicular(std::shared_ptr theLine1, std::shared_ptr theLine2, std::shared_ptr thePlane); @@ -77,12 +84,14 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \param[in] theShape the object * \param[in] thePlane the plane which contains the lines */ + GEOMAPI_EXPORT void createFixed(std::shared_ptr theShape, std::shared_ptr 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 @@ -91,6 +100,7 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \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 @@ -98,29 +108,36 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface * \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); }; diff --git a/src/GeomAPI/GeomAPI_Ax1.h b/src/GeomAPI/GeomAPI_Ax1.h index dbd9bd539..f21f0deeb 100644 --- a/src/GeomAPI/GeomAPI_Ax1.h +++ b/src/GeomAPI/GeomAPI_Ax1.h @@ -14,35 +14,43 @@ /** \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 theOrigin, std::shared_ptr theDir); /// Sets origin point. + GEOMAPI_EXPORT void setOrigin(const std::shared_ptr& theOrigin); /// \return the plane origin point. + GEOMAPI_EXPORT std::shared_ptr origin() const; /// Sets direction vector. + GEOMAPI_EXPORT void setDir(const std::shared_ptr& theDir); /// \return direction vector. + GEOMAPI_EXPORT std::shared_ptr 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 reversed(); }; diff --git a/src/GeomAPI/GeomAPI_Ax3.h b/src/GeomAPI/GeomAPI_Ax3.h index bd66173a1..df7ef774d 100644 --- a/src/GeomAPI/GeomAPI_Ax3.h +++ b/src/GeomAPI/GeomAPI_Ax3.h @@ -16,53 +16,65 @@ * \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 theOrigin, std::shared_ptr theDirX, std::shared_ptr theNorm); /// Sets origin point + GEOMAPI_EXPORT void setOrigin(const std::shared_ptr& theOrigin); /// Returns the plane origin point + GEOMAPI_EXPORT std::shared_ptr origin() const; /// Sets X direction vector + GEOMAPI_EXPORT void setDirX(const std::shared_ptr& theDirX); /// Returns X direction vector + GEOMAPI_EXPORT std::shared_ptr dirX() const; /// Sets Y direction vector + GEOMAPI_EXPORT void setDirY(const std::shared_ptr& theDirY); /// Returns Y direction vector + GEOMAPI_EXPORT std::shared_ptr dirY() const; /// Sets Z direction vector + GEOMAPI_EXPORT void setNorm(const std::shared_ptr& theNorm); /// Returns Z direction vector + GEOMAPI_EXPORT std::shared_ptr 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 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 to2D(double theX, double theY, double theZ) const; }; diff --git a/src/GeomAPI/GeomAPI_Circ2d.h b/src/GeomAPI/GeomAPI_Circ2d.h index 9761c8829..1226a5f78 100644 --- a/src/GeomAPI/GeomAPI_Circ2d.h +++ b/src/GeomAPI/GeomAPI_Circ2d.h @@ -18,24 +18,29 @@ class GeomAPI_Dir2d; * \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& theCenter, const std::shared_ptr& theCirclePoint); /// Creation of circle defined by center point, direction and circle radius + GEOMAPI_EXPORT GeomAPI_Circ2d(const std::shared_ptr& theCenter, const std::shared_ptr& theDir, double theRadius); /// Return center of the circle + GEOMAPI_EXPORT const std::shared_ptr center() const; /// Return radius of the circle + GEOMAPI_EXPORT double radius() const; /// Project point on line + GEOMAPI_EXPORT const std::shared_ptr project( const std::shared_ptr& thePoint) const; }; diff --git a/src/GeomAPI/GeomAPI_Curve.h b/src/GeomAPI/GeomAPI_Curve.h index 20e0f0a46..ecb8a79f8 100644 --- a/src/GeomAPI/GeomAPI_Curve.h +++ b/src/GeomAPI/GeomAPI_Curve.h @@ -17,32 +17,40 @@ class GeomAPI_Pnt; * \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& 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 getPoint(double theParam); private: diff --git a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h index 24d3db14e..cbc5f113c 100644 --- a/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h +++ b/src/GeomAPI/GeomAPI_DataMapOfShapeShape.h @@ -17,31 +17,39 @@ class GeomAPI_Dir; * \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 theKey, std::shared_ptr theItem); /// Returns true if theKey is stored in the map. + GEOMAPI_EXPORT bool isBound (std::shared_ptr theKey); /// Returns the Item stored with the Key in the Map. + GEOMAPI_EXPORT const std::shared_ptr find(std::shared_ptr theKey); /// Removes the Key from the map. Returns true if the Key was in the Map + GEOMAPI_EXPORT bool unBind(std::shared_ptr theKey); /// Destructor + GEOMAPI_EXPORT ~GeomAPI_DataMapOfShapeShape(); }; diff --git a/src/GeomAPI/GeomAPI_Dir.h b/src/GeomAPI/GeomAPI_Dir.h index fa0cdcb6b..4c4c007af 100644 --- a/src/GeomAPI/GeomAPI_Dir.h +++ b/src/GeomAPI/GeomAPI_Dir.h @@ -17,30 +17,39 @@ class GeomAPI_XYZ; * \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& 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 xyz(); /// result is a scalar product of directions + GEOMAPI_EXPORT double dot(const std::shared_ptr& theArg) const; /// result is a cross product of two directions + GEOMAPI_EXPORT const std::shared_ptr cross(const std::shared_ptr& theArg) const; /// calculates angle between two directions + GEOMAPI_EXPORT double angle(const std::shared_ptr& theArg) const; }; diff --git a/src/GeomAPI/GeomAPI_Dir2d.h b/src/GeomAPI/GeomAPI_Dir2d.h index afea83723..aafe267ce 100644 --- a/src/GeomAPI/GeomAPI_Dir2d.h +++ b/src/GeomAPI/GeomAPI_Dir2d.h @@ -17,28 +17,36 @@ class GeomAPI_XY; * \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& 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 xy(); /// result is a scalar product of directions + GEOMAPI_EXPORT double dot(const std::shared_ptr& theArg) const; /// result is a cross product of two directions + GEOMAPI_EXPORT double cross(const std::shared_ptr& theArg) const; /// calculates angle between two directions + GEOMAPI_EXPORT double angle(const std::shared_ptr& theArg) const; }; diff --git a/src/GeomAPI/GeomAPI_Edge.h b/src/GeomAPI/GeomAPI_Edge.h index 1ecbde0fc..c5c62a9e9 100644 --- a/src/GeomAPI/GeomAPI_Edge.h +++ b/src/GeomAPI/GeomAPI_Edge.h @@ -18,37 +18,47 @@ class GeomAPI_Lin; * \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& 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 firstPoint(); /// Returns the Last vertex coordinates of the edge + GEOMAPI_EXPORT std::shared_ptr lastPoint(); /// Returns a circle if edge is based on the circle curve + GEOMAPI_EXPORT std::shared_ptr circle(); /// Returns a line if edge is based on the linear curve + GEOMAPI_EXPORT std::shared_ptr line(); /// Returns true if the current edge is geometrically equal to the given edge + GEOMAPI_EXPORT bool isEqual(const std::shared_ptr theEdge) const; }; diff --git a/src/GeomAPI/GeomAPI_Face.h b/src/GeomAPI/GeomAPI_Face.h index 7a22c9429..413c03b81 100644 --- a/src/GeomAPI/GeomAPI_Face.h +++ b/src/GeomAPI/GeomAPI_Face.h @@ -15,25 +15,31 @@ class GeomAPI_Pln; * \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& theShape); /// Returns true if the current face is geometrically equal to the given face + GEOMAPI_EXPORT virtual bool isEqual(const std::shared_ptr 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 getPlane() const; }; diff --git a/src/GeomAPI/GeomAPI_Lin.h b/src/GeomAPI/GeomAPI_Lin.h index cb7a73847..b9323c856 100644 --- a/src/GeomAPI/GeomAPI_Lin.h +++ b/src/GeomAPI/GeomAPI_Lin.h @@ -18,28 +18,35 @@ class GeomAPI_Pnt; * \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& theStart, const std::shared_ptr& theEnd); /// Returns point on the line (first point) + GEOMAPI_EXPORT std::shared_ptr location(); /// Returns a line direction + GEOMAPI_EXPORT std::shared_ptr direction(); /// Distance between two points + GEOMAPI_EXPORT double distance(const std::shared_ptr& thePoint) const; /// Intersection of two lines + GEOMAPI_EXPORT const std::shared_ptr intersect( const std::shared_ptr& theLine) const; /// Project point on line + GEOMAPI_EXPORT const std::shared_ptr project( const std::shared_ptr& thePoint) const; }; diff --git a/src/GeomAPI/GeomAPI_Lin2d.h b/src/GeomAPI/GeomAPI_Lin2d.h index abb04bba8..e5556ec9f 100644 --- a/src/GeomAPI/GeomAPI_Lin2d.h +++ b/src/GeomAPI/GeomAPI_Lin2d.h @@ -18,34 +18,43 @@ class GeomAPI_Pnt2d; * \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& theStart, const std::shared_ptr& theEnd); /// Returns point on the line (first point) + GEOMAPI_EXPORT std::shared_ptr location(); /// Returns a line direction + GEOMAPI_EXPORT std::shared_ptr direction(); /// Distance between two points + GEOMAPI_EXPORT double distance(const std::shared_ptr& theOther) const; /// Intersection of two lines + GEOMAPI_EXPORT const std::shared_ptr intersect( const std::shared_ptr& theLine) const; /// Project point on line + GEOMAPI_EXPORT const std::shared_ptr project( const std::shared_ptr& 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& thePoint) const; /// Returns a location point shifted on theShift in perpendicular direction + GEOMAPI_EXPORT std::shared_ptr shiftedLocation(double theShift) const; }; diff --git a/src/GeomAPI/GeomAPI_Pln.h b/src/GeomAPI/GeomAPI_Pln.h index 8d9b6e5c1..405cc7e98 100644 --- a/src/GeomAPI/GeomAPI_Pln.h +++ b/src/GeomAPI/GeomAPI_Pln.h @@ -19,26 +19,32 @@ class GeomAPI_Dir; * \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& theAxis); /// Creation of plane by the point and normal + GEOMAPI_EXPORT GeomAPI_Pln(const std::shared_ptr& thePoint, const std::shared_ptr& 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 location(); /// Returns a plane normal + GEOMAPI_EXPORT std::shared_ptr direction(); /// Returns the plane coefficients (Ax+By+Cz+D=0) + GEOMAPI_EXPORT void coefficients(double& theA, double& theB, double& theC, double& theD); }; diff --git a/src/GeomAPI/GeomAPI_Pnt.h b/src/GeomAPI/GeomAPI_Pnt.h index 44f203a77..a3016b943 100644 --- a/src/GeomAPI/GeomAPI_Pnt.h +++ b/src/GeomAPI/GeomAPI_Pnt.h @@ -20,43 +20,56 @@ class GeomAPI_Pln; * \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& 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 xyz(); /// Distance between two points + GEOMAPI_EXPORT double distance(const std::shared_ptr& theOther) const; /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane + GEOMAPI_EXPORT std::shared_ptr to2D(const std::shared_ptr& theOrigin, const std::shared_ptr& theDirX, const std::shared_ptr& theDirY); /// Projects a point to the plane defined by the origin and 2 axes vectors in this plane + GEOMAPI_EXPORT std::shared_ptr to2D(const std::shared_ptr& thePln) const; /// Translates the point along direction theDir on distance theDist + GEOMAPI_EXPORT void translate(const std::shared_ptr& theDir, double theDist); }; diff --git a/src/GeomAPI/GeomAPI_Pnt2d.h b/src/GeomAPI/GeomAPI_Pnt2d.h index bd0000fdb..d3b3426cd 100644 --- a/src/GeomAPI/GeomAPI_Pnt2d.h +++ b/src/GeomAPI/GeomAPI_Pnt2d.h @@ -19,36 +19,46 @@ class GeomAPI_Dir; * \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& 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 to3D(const std::shared_ptr& theOrigin, const std::shared_ptr& theDirX, const std::shared_ptr& theDirY); /// returns coordinates of the point + GEOMAPI_EXPORT const std::shared_ptr xy(); /// Distance between two points + GEOMAPI_EXPORT double distance(const std::shared_ptr& theOther) const; /// Returns whether the distance between two points is less then precision confusion + GEOMAPI_EXPORT bool isEqual(const std::shared_ptr& theOther) const; }; diff --git a/src/GeomAPI/GeomAPI_Shape.h b/src/GeomAPI/GeomAPI_Shape.h index 2df3b015b..22362e710 100644 --- a/src/GeomAPI/GeomAPI_Shape.h +++ b/src/GeomAPI/GeomAPI_Shape.h @@ -15,7 +15,7 @@ * \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 @@ -27,38 +27,49 @@ public: 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 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; }; diff --git a/src/GeomAPI/GeomAPI_ShapeExplorer.h b/src/GeomAPI/GeomAPI_ShapeExplorer.h index f83d4c6f5..fac506fd1 100644 --- a/src/GeomAPI/GeomAPI_ShapeExplorer.h +++ b/src/GeomAPI/GeomAPI_ShapeExplorer.h @@ -15,10 +15,11 @@ * \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, @@ -27,6 +28,7 @@ public: \param[in] toFind shape type to find. \param[in] toAvoid shape type to avoid. */ + GEOMAPI_EXPORT GeomAPI_ShapeExplorer(const std::shared_ptr& theShape, const GeomAPI_Shape::ShapeType toFind, const GeomAPI_Shape::ShapeType toAvoid = GeomAPI_Shape::SHAPE); @@ -37,26 +39,33 @@ public: \param[in] toFind shape type to find. \param[in] toAvoid shape type to avoid. */ + GEOMAPI_EXPORT void init(const std::shared_ptr& 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 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(); }; diff --git a/src/GeomAPI/GeomAPI_Vertex.h b/src/GeomAPI/GeomAPI_Vertex.h index 3b517a863..9baf0dcdc 100644 --- a/src/GeomAPI/GeomAPI_Vertex.h +++ b/src/GeomAPI/GeomAPI_Vertex.h @@ -16,19 +16,23 @@ class GeomAPI_Pnt; * \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& theShape); /// Returns the first vertex coordinates of the edge + GEOMAPI_EXPORT std::shared_ptr point(); /// Returns true if the current edge is geometrically equal to the given edge + GEOMAPI_EXPORT bool isEqual(const std::shared_ptr theVert) const; }; diff --git a/src/GeomAPI/GeomAPI_XY.h b/src/GeomAPI/GeomAPI_XY.h index 0438b3c38..8fdf2853e 100644 --- a/src/GeomAPI/GeomAPI_XY.h +++ b/src/GeomAPI/GeomAPI_XY.h @@ -15,35 +15,46 @@ * \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 added(const std::shared_ptr& theArg); /// result is difference between coordinates of this and the given argument + GEOMAPI_EXPORT const std::shared_ptr decreased(const std::shared_ptr& theArg); /// result is coordinates multiplied by the argument + GEOMAPI_EXPORT const std::shared_ptr multiplied(const double theArg); /// result is a scalar product of two triplets + GEOMAPI_EXPORT double dot(const std::shared_ptr& theArg) const; /// result is a cross product of two triplets + GEOMAPI_EXPORT double cross(const std::shared_ptr& theArg) const; /// Distance between two pairs + GEOMAPI_EXPORT double distance(const std::shared_ptr& theOther) const; }; diff --git a/src/GeomAPI/GeomAPI_XYZ.h b/src/GeomAPI/GeomAPI_XYZ.h index 12cf7d04a..38f189db6 100644 --- a/src/GeomAPI/GeomAPI_XYZ.h +++ b/src/GeomAPI/GeomAPI_XYZ.h @@ -15,39 +15,52 @@ * \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 added(const std::shared_ptr& theArg); /// result is difference between coordinates of this and the given argument + GEOMAPI_EXPORT const std::shared_ptr decreased(const std::shared_ptr& theArg); /// result is coordinates multiplied by the argument + GEOMAPI_EXPORT const std::shared_ptr multiplied(const double theArg); /// result is a scalar product of two triplets + GEOMAPI_EXPORT double dot(const std::shared_ptr& theArg) const; /// result is a cross product of two triplets + GEOMAPI_EXPORT const std::shared_ptr cross(const std::shared_ptr& theArg) const; /// Distance between two triplets + GEOMAPI_EXPORT double distance(const std::shared_ptr& theOther) const; };