SHAPER 9.16.0
GeomAlgoAPI_Box.h
1// Copyright (C) 2014-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef GEOMALGOAPI_BOX_H_
21#define GEOMALGOAPI_BOX_H_
22
23#include <GeomAPI_Pnt.h>
24#include <GeomAlgoAPI_MakeShape.h>
25
31{
32 public:
38 };
39
40 GEOMALGOAPI_EXPORT GeomAlgoAPI_Box();
41
46 GEOMALGOAPI_EXPORT GeomAlgoAPI_Box(const double theDx, const double theDy, const double theDz);
47
51 GEOMALGOAPI_EXPORT GeomAlgoAPI_Box(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
52 std::shared_ptr<GeomAPI_Pnt> theSecondPoint);
53
61 GEOMALGOAPI_EXPORT GeomAlgoAPI_Box(const double theOx, const double theOy, const double theOz,
62 const double theDx, const double theDy, const double theDz);
63
65 GEOMALGOAPI_EXPORT bool check();
66
68 GEOMALGOAPI_EXPORT void build();
69
71 GEOMALGOAPI_EXPORT void prepareNamingFaces();
72
73 private:
75 void buildWithDimensions();
77 void buildWithPoints();
79 void buildWithPointAndDims();
80
81 double myOx;
82 double myOy;
83 double myOz;
84 double myDx;
85 double myDy;
86 double myDz;
87 std::shared_ptr<GeomAPI_Pnt> myFirstPoint;
88 std::shared_ptr<GeomAPI_Pnt> mySecondPoint;
89 MethodType myMethodType;
90 std::string headError;
91};
92
93
94#endif // GEOMALGOAPI_BOX_H_
Allows to create Box Primitives.
Definition: GeomAlgoAPI_Box.h:31
GEOMALGOAPI_EXPORT bool check()
Checks if data for the box construction is OK.
Definition: GeomAlgoAPI_Box.cpp:65
GEOMALGOAPI_EXPORT void prepareNamingFaces()
Prepare the naming (redifined because it is specific for a box).
Definition: GeomAlgoAPI_Box.cpp:202
GEOMALGOAPI_EXPORT void build()
Builds the box.
Definition: GeomAlgoAPI_Box.cpp:109
MethodType
Type of box operation.
Definition: GeomAlgoAPI_Box.h:34
@ BOX_POINTS
Box with points.
Definition: GeomAlgoAPI_Box.h:36
@ BOX_DIM
Box with dimensions.
Definition: GeomAlgoAPI_Box.h:35
@ BOX_POINT_DIMS
Box with coordinates of a point and dimensions.
Definition: GeomAlgoAPI_Box.h:37
Interface to the root class of all topological shapes constructions.
Definition: GeomAlgoAPI_MakeShape.h:35