20 #ifndef GeomAPI_Shape_H_
21 #define GeomAPI_Shape_H_
23 #include "GeomAPI_Dir.h"
25 #include <GeomAPI_Interface.h>
47 COMPOUND, COMPSOLID, SOLID, SHELL,
48 FACE, WIRE, EDGE, VERTEX,
67 GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape>
emptyCopied()
const;
75 virtual bool isEqual(
const std::shared_ptr<GeomAPI_Shape> theShape)
const;
79 virtual bool isSame(
const std::shared_ptr<GeomAPI_Shape> theShape)
const;
83 virtual bool isSameGeometry(
const std::shared_ptr<GeomAPI_Shape> theShape)
const;
91 virtual bool isEdge()
const;
95 virtual bool isWire()
const;
99 virtual bool isFace()
const;
136 std::shared_ptr<GeomAPI_Vertex>
vertex()
const;
140 std::shared_ptr<GeomAPI_Edge>
edge()
const;
144 std::shared_ptr<GeomAPI_Wire>
wire()
const;
148 std::shared_ptr<GeomAPI_Face>
face()
const;
152 std::shared_ptr<GeomAPI_Shell>
shell()
const;
156 std::shared_ptr<GeomAPI_Solid>
solid()
const;
163 std::list< std::shared_ptr<GeomAPI_Shape> >
subShapes(
const ShapeType theSubShapeType,
164 const bool theOnlyUnique =
false)
const;
184 GEOMAPI_EXPORT
virtual void reverse();
189 GEOMAPI_EXPORT
virtual bool isSubShape(
const std::shared_ptr<GeomAPI_Shape> theShape,
190 const bool theCheckOrientation =
true)
const;
195 bool computeSize(
double& theXmin,
double& theYmin,
double& theZmin,
196 double& theXmax,
double& theYmax,
double& theZmax)
const;
200 virtual std::shared_ptr<GeomAPI_Pnt>
middlePoint()
const;
204 std::string
getShapeStream(
const bool theWithTriangulation =
true)
const;
208 std::shared_ptr<GeomAPI_Shape>
intersect(
const std::shared_ptr<GeomAPI_Shape> theShape)
const;
212 bool isIntersect(
const std::shared_ptr<GeomAPI_Shape> theShape)
const;
216 void translate(
const std::shared_ptr<GeomAPI_Dir> theDir,
const double theOffset);
220 void move(
const std::shared_ptr<GeomAPI_Trsf> theTransformation);
247 bool operator ()(
const std::shared_ptr<GeomAPI_Shape>& theShape1,
248 const std::shared_ptr<GeomAPI_Shape>& theShape2)
const;
258 bool operator ()(
const std::shared_ptr<GeomAPI_Shape>& theShape1,
259 const std::shared_ptr<GeomAPI_Shape>& theShape2)
const;
268 int operator ()(
const std::shared_ptr<GeomAPI_Shape>& theShape)
const;
277 bool operator ()(
const std::shared_ptr<GeomAPI_Shape>& theShape1,
278 const std::shared_ptr<GeomAPI_Shape>& theShape2)
const;
283 typedef std::list<std::shared_ptr<GeomAPI_Shape> > ListOfShape;
286 typedef std::shared_ptr<GeomAPI_Shape> GeomShapePtr;
Interface to the edge object.
Definition: GeomAPI_Edge.h:38
Interface to the face object.
Definition: GeomAPI_Face.h:36
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Compare addresses of shapes with respect to orientation of shapes.
Definition: GeomAPI_Shape.h:254
GEOMAPI_EXPORT bool operator()(const std::shared_ptr< GeomAPI_Shape > &theShape1, const std::shared_ptr< GeomAPI_Shape > &theShape2) const
Return true if the address of the first shape is less than the address of the second.
Definition: GeomAPI_Shape.cpp:825
Compare addresses of shapes.
Definition: GeomAPI_Shape.h:243
GEOMAPI_EXPORT bool operator()(const std::shared_ptr< GeomAPI_Shape > &theShape1, const std::shared_ptr< GeomAPI_Shape > &theShape2) const
Return true if the address of the first shape is less than the address of the second.
Definition: GeomAPI_Shape.cpp:806
Compare addresses of shapes.
Definition: GeomAPI_Shape.h:273
GEOMAPI_EXPORT bool operator()(const std::shared_ptr< GeomAPI_Shape > &theShape1, const std::shared_ptr< GeomAPI_Shape > &theShape2) const
Return true if the address of the shapes are equal.
Definition: GeomAPI_Shape.cpp:856
Hash code for the shape.
Definition: GeomAPI_Shape.h:264
GEOMAPI_EXPORT int operator()(const std::shared_ptr< GeomAPI_Shape > &theShape) const
Return Hash value according to the address of the shape.
Definition: GeomAPI_Shape.cpp:846
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43
virtual GEOMAPI_EXPORT bool isSubShape(const std::shared_ptr< GeomAPI_Shape > theShape, const bool theCheckOrientation=true) const
Definition: GeomAPI_Shape.cpp:627
virtual GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Pnt > middlePoint() const
Return middle point on the shape.
Definition: GeomAPI_Shape.cpp:675
static GEOMAPI_EXPORT ShapeType shapeTypeByStr(std::string theType)
Returns the type enumeration by the string-type.
Definition: GeomAPI_Shape.cpp:529
GEOMAPI_EXPORT bool isSelfIntersected(const int theLevelOfCheck=9) const
Returns true if shape have self-intersections.
Definition: GeomAPI_Shape.cpp:790
virtual GEOMAPI_EXPORT bool isSame(const std::shared_ptr< GeomAPI_Shape > theShape) const
Returns whether the shapes are same.
Definition: GeomAPI_Shape.cpp:96
ShapeType
Shape type enum.
Definition: GeomAPI_Shape.h:46
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shape > emptyCopied() const
Definition: GeomAPI_Shape.cpp:72
GEOMAPI_EXPORT std::string getShapeStream(const bool theWithTriangulation=true) const
Returns the shape as BRep stream.
Definition: GeomAPI_Shape.cpp:711
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Face > face() const
Returns face or empty shape.
Definition: GeomAPI_Shape.cpp:415
virtual GEOMAPI_EXPORT bool isPlanar() const
Returns whether the shape is planar.
Definition: GeomAPI_Shape.cpp:293
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Solid > solid() const
Returns solid or empty shape.
Definition: GeomAPI_Shape.cpp:437
virtual GEOMAPI_EXPORT bool isEdge() const
Returns whether the shape is an edge.
Definition: GeomAPI_Shape.cpp:122
virtual GEOMAPI_EXPORT bool isConnectedTopology() const
Returns whether the shape is a compound where all elements are topologically connected.
Definition: GeomAPI_Shape.cpp:225
virtual GEOMAPI_EXPORT std::string shapeTypeStr() const
Definition: GeomAPI_Shape.cpp:552
virtual GEOMAPI_EXPORT ShapeType shapeType() const
Returns the shape type.
Definition: GeomAPI_Shape.cpp:488
GEOMAPI_EXPORT ShapeType typeOfCompoundShapes() const
Returns type of shapes in the compound.
Definition: GeomAPI_Shape.cpp:193
virtual GEOMAPI_EXPORT bool isCompoundOfSolids() const
Returns whether the shape is a compound of solids.
Definition: GeomAPI_Shape.cpp:178
virtual GEOMAPI_EXPORT bool isCompound() const
Returns whether the shape is a compound.
Definition: GeomAPI_Shape.cpp:146
GEOMAPI_EXPORT GeomAPI_Shape()
Creation of empty (null) shape.
Definition: GeomAPI_Shape.cpp:67
virtual GEOMAPI_EXPORT bool isWire() const
Returns whether the shape is a wire.
Definition: GeomAPI_Shape.cpp:128
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shape > intersect(const std::shared_ptr< GeomAPI_Shape > theShape) const
Returns intersection of shapes.
Definition: GeomAPI_Shape.cpp:731
virtual GEOMAPI_EXPORT void setOrientation(const Orientation theOrientation)
Sets the shape orientation.
Definition: GeomAPI_Shape.cpp:612
virtual GEOMAPI_EXPORT bool isVertex() const
Returns whether the shape is a vertex.
Definition: GeomAPI_Shape.cpp:116
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Wire > wire() const
Returns wire or empty shape.
Definition: GeomAPI_Shape.cpp:404
GEOMAPI_EXPORT bool computeSize(double &theXmin, double &theYmin, double &theZmin, double &theXmax, double &theYmax, double &theZmax) const
Computes boundary dimensions of the shape Returns False if it is not possible.
Definition: GeomAPI_Shape.cpp:649
virtual GEOMAPI_EXPORT bool isSolid() const
Returns whether the shape is a solid.
Definition: GeomAPI_Shape.cpp:281
GEOMAPI_EXPORT void translate(const std::shared_ptr< GeomAPI_Dir > theDir, const double theOffset)
Translates the shape along the direction for the given offset.
Definition: GeomAPI_Shape.cpp:774
virtual GEOMAPI_EXPORT bool isShell() const
Returns whether the shape is a shell.
Definition: GeomAPI_Shape.cpp:140
GEOMAPI_EXPORT std::list< std::shared_ptr< GeomAPI_Shape > > subShapes(const ShapeType theSubShapeType, const bool theOnlyUnique=false) const
Returns list of sub-shapes of the given type.
Definition: GeomAPI_Shape.cpp:449
virtual GEOMAPI_EXPORT bool isFace() const
Returns whether the shape is a face.
Definition: GeomAPI_Shape.cpp:134
GEOMAPI_EXPORT bool isNull() const
Returns true if the underlied shape is null.
Definition: GeomAPI_Shape.cpp:79
virtual GEOMAPI_EXPORT bool isEqual(const std::shared_ptr< GeomAPI_Shape > theShape) const
Returns whether the shapes are equal.
Definition: GeomAPI_Shape.cpp:84
virtual GEOMAPI_EXPORT void reverse()
Reverse shape.
Definition: GeomAPI_Shape.cpp:622
virtual GEOMAPI_EXPORT bool isCompSolid() const
Returns whether the shape is a compsolid.
Definition: GeomAPI_Shape.cpp:287
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Edge > edge() const
Returns edge or empty shape.
Definition: GeomAPI_Shape.cpp:393
virtual GEOMAPI_EXPORT bool isCollectionOfSolids() const
Returns true, if the shape contains only solids, compsolids and compounds of solids and compsolids of...
Definition: GeomAPI_Shape.cpp:152
Orientation
Shape orientation.
Definition: GeomAPI_Shape.h:53
virtual GEOMAPI_EXPORT bool isSameGeometry(const std::shared_ptr< GeomAPI_Shape > theShape) const
Returns true if shapes have same underlying geometry.
Definition: GeomAPI_Shape.cpp:107
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Vertex > vertex() const
Returns vertex or empty shape.
Definition: GeomAPI_Shape.cpp:382
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shell > shell() const
Returns shell or empty shape.
Definition: GeomAPI_Shape.cpp:426
GEOMAPI_EXPORT bool isIntersect(const std::shared_ptr< GeomAPI_Shape > theShape) const
Returns true if min distance between shapes < tolerance.
Definition: GeomAPI_Shape.cpp:756
GEOMAPI_EXPORT void move(const std::shared_ptr< GeomAPI_Trsf > theTransformation)
Moves the shape with the given transformation matrix.
Definition: GeomAPI_Shape.cpp:784
virtual GEOMAPI_EXPORT Orientation orientation() const
Definition: GeomAPI_Shape.cpp:599
Interface to the shell object.
Definition: GeomAPI_Shell.h:35
Interface to the solid object.
Definition: GeomAPI_Solid.h:35
Keep the transformation matrix coefficients.
Definition: GeomAPI_Trsf.h:36
Interface to the vertex object.
Definition: GeomAPI_Vertex.h:31
Interface to the wire object.
Definition: GeomAPI_Wire.h:31