From 45ea4b0ea4a0d15133b47d8e2bc55c8a24ed402e Mon Sep 17 00:00:00 2001 From: Clarisse Genrault Date: Fri, 13 Jan 2017 13:38:39 +0100 Subject: [PATCH] Adding the "Cylinder" primitive (the following). --- src/GeomAlgoAPI/CMakeLists.txt | 1 + src/GeomAlgoAPI/GeomAlgoAPI_Box.cpp | 2 +- src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.cpp | 19 +- src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h | 9 +- src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp | 129 +++++++++++- src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h | 66 ++++-- src/GeomAlgoAPI/Test/TestAPI_Cylinder.py | 41 ++++ src/PrimitivesAPI/PrimitivesAPI.i | 2 +- src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp | 82 ++++---- src/PrimitivesAPI/PrimitivesAPI_Cylinder.h | 81 ++++---- src/PrimitivesAPI/Test/TestCylinder.py | 44 ++++ .../PrimitivesPlugin_Cylinder.cpp | 21 +- .../PrimitivesPlugin_Cylinder.h | 4 +- src/PrimitivesPlugin/icons/SVG/cylinder.svg | 120 +++++++++++ .../icons/SVG/cylinder_32x32.svg | 121 +++++++++++ .../icons/SVG/cylinder_portion_32x32.svg | 195 ++++++++++++++++++ src/PrimitivesPlugin/icons/cylinder_32x32.png | Bin 873 -> 1108 bytes .../icons/cylinder_portion_32x32.png | Bin 1159 -> 1432 bytes src/PythonAPI/model/primitives/__init__.py | 2 +- 19 files changed, 796 insertions(+), 143 deletions(-) create mode 100644 src/GeomAlgoAPI/Test/TestAPI_Cylinder.py create mode 100644 src/PrimitivesAPI/Test/TestCylinder.py create mode 100644 src/PrimitivesPlugin/icons/SVG/cylinder.svg create mode 100644 src/PrimitivesPlugin/icons/SVG/cylinder_32x32.svg create mode 100644 src/PrimitivesPlugin/icons/SVG/cylinder_portion_32x32.svg diff --git a/src/GeomAlgoAPI/CMakeLists.txt b/src/GeomAlgoAPI/CMakeLists.txt index aabc35d11..68048d8e9 100644 --- a/src/GeomAlgoAPI/CMakeLists.txt +++ b/src/GeomAlgoAPI/CMakeLists.txt @@ -159,6 +159,7 @@ INSTALL(TARGETS GeomAlgoAPI DESTINATION ${SHAPER_INSTALL_BIN}) INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG}) ADD_UNIT_TESTS(TestAPI_Box.py + TestAPI_Cylinder.py TestAPI_GDMLConeSegment.py TestAPI_Symmetry.py TestAPI_Translation.py) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Box.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Box.cpp index 04c730e63..97c13ddde 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Box.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Box.cpp @@ -65,7 +65,7 @@ bool GeomAlgoAPI_Box::check() if (fabs(aDiffX) < Precision::Confusion() || fabs(aDiffY) < Precision::Confusion() || fabs(aDiffZ) < Precision::Confusion()) { - myError = + myError = "Box builder with points :: the points belong both to one of the OXY, OYZ or OZX planes"; return false; } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.cpp index 4ee724e50..e487b6a55 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.cpp @@ -77,20 +77,21 @@ bool GeomAlgoAPI_Cylinder::check() void GeomAlgoAPI_Cylinder::build() { myCreatedFaces.clear(); - + const gp_Ax2& anAxis = myAxis->impl(); - + // Construct the cylinder BRepPrimAPI_MakeCylinder *aCylinderMaker; - + if (withAngle) { - aCylinderMaker = new BRepPrimAPI_MakeCylinder(anAxis, myRadius, myHeight, myAngle * M_PI / 180.); + aCylinderMaker = + new BRepPrimAPI_MakeCylinder(anAxis, myRadius, myHeight, myAngle * M_PI / 180.); } else { - aCylinderMaker = new BRepPrimAPI_MakeCylinder(anAxis, myRadius, myHeight); + aCylinderMaker = new BRepPrimAPI_MakeCylinder(anAxis, myRadius, myHeight); } - + aCylinderMaker->Build(); - + if (!aCylinderMaker->IsDone()) { return; } @@ -105,8 +106,8 @@ void GeomAlgoAPI_Cylinder::build() myError = "Cylinder builder :: resulting shape is null."; return; } - + setImpl(aCylinderMaker); - + setDone(true); } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h b/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h index b0f91e27c..6bffee998 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Cylinder.h @@ -21,16 +21,15 @@ class GeomAlgoAPI_Cylinder : public GeomAlgoAPI_MakeShape public: GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder(); - /// Creates a cylinder + /// Creates a cylinder. /// \param theAxis The axis of the cylinder /// \param theRadius The radius of the cylinder /// \param theHeight The height of the cylinder - /// \param theAngle The covering angle of the cylinder GEOMALGOAPI_EXPORT GeomAlgoAPI_Cylinder(std::shared_ptr theAxis, const double theRadius, const double theHeight); - /// Creates a cylinder + /// Creates a cylinder. /// \param theAxis The axis of the cylinder /// \param theRadius The radius of the cylinder /// \param theHeight The height of the cylinder @@ -47,8 +46,8 @@ class GeomAlgoAPI_Cylinder : public GeomAlgoAPI_MakeShape GEOMALGOAPI_EXPORT void build(); private: - bool withAngle; - std::shared_ptr myBasePoint; + bool withAngle; /// Boolean indicating if the type of cylinder (full or portion). + std::shared_ptr myBasePoint; /// Center of the lower base of the cylinder. std::shared_ptr myAxis; /// Axis of the cylinder. double myRadius; /// Radius of the cylinder. double myHeight; /// Height of the cylinder. diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp index f738e5c41..223517a4a 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.cpp @@ -7,14 +7,17 @@ #include "GeomAlgoAPI_ShapeAPI.h" #include +#include #include #include #include #include +#include + namespace GeomAlgoAPI_ShapeAPI { - //======================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeBox( const double theDx, const double theDy, const double theDz) throw (GeomAlgoAPI_Exception) @@ -36,7 +39,7 @@ namespace GeomAlgoAPI_ShapeAPI return aBoxAlgo.shape(); } - //====================================================================================== + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeBox( std::shared_ptr theFirstPoint, std::shared_ptr theSecondPoint) throw (GeomAlgoAPI_Exception) @@ -58,7 +61,115 @@ namespace GeomAlgoAPI_ShapeAPI return aBoxAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== + std::shared_ptr GeomAlgoAPI_ShapeAPI::makeCylinder( + std::shared_ptr theBasePoint, std::shared_ptr theEdge, + double theRadius, double theHeight) throw (GeomAlgoAPI_Exception) + { + std::shared_ptr anAxis; + anAxis = std::shared_ptr(new GeomAPI_Ax2(theBasePoint, + theEdge->line()->direction())); + + GeomAlgoAPI_Cylinder aCylinderAlgo(anAxis, theRadius, theHeight); + + if (!aCylinderAlgo.check()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + + aCylinderAlgo.build(); + + if(!aCylinderAlgo.isDone()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + if (!aCylinderAlgo.checkValid("Cylinder builder")) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + return aCylinderAlgo.shape(); + } + + //=============================================================================================== + std::shared_ptr GeomAlgoAPI_ShapeAPI::makeCylinder( + std::shared_ptr theBasePoint, std::shared_ptr theEdge, + double theRadius, double theHeight, double theAngle) throw (GeomAlgoAPI_Exception) + { + std::shared_ptr anAxis; + anAxis = std::shared_ptr(new GeomAPI_Ax2(theBasePoint, + theEdge->line()->direction())); + + GeomAlgoAPI_Cylinder aCylinderAlgo(anAxis, theRadius, theHeight, theAngle); + + if (!aCylinderAlgo.check()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + + aCylinderAlgo.build(); + + if(!aCylinderAlgo.isDone()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + if (!aCylinderAlgo.checkValid("Cylinder portion builder")) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + return aCylinderAlgo.shape(); + } + + //=============================================================================================== + std::shared_ptr GeomAlgoAPI_ShapeAPI::makeCylinder( + double theRadius, double theHeight) throw (GeomAlgoAPI_Exception) + { + std::shared_ptr aBasePoint = + std::shared_ptr(new GeomAPI_Pnt(0.,0.,0.)); + std::shared_ptr aEdge = GeomAlgoAPI_EdgeBuilder::line(0., 0., 1.); + std::shared_ptr anAxis; + anAxis = std::shared_ptr(new GeomAPI_Ax2(aBasePoint, + aEdge->line()->direction())); + + GeomAlgoAPI_Cylinder aCylinderAlgo(anAxis, theRadius, theHeight); + + if (!aCylinderAlgo.check()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + + aCylinderAlgo.build(); + + if(!aCylinderAlgo.isDone()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + if (!aCylinderAlgo.checkValid("Cylinder builder")) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + return aCylinderAlgo.shape(); + } + + //=============================================================================================== + std::shared_ptr GeomAlgoAPI_ShapeAPI::makeCylinder( + double theRadius, double theHeight, double theAngle) throw (GeomAlgoAPI_Exception) + { + std::shared_ptr aBasePoint = + std::shared_ptr(new GeomAPI_Pnt(0.,0.,0.)); + std::shared_ptr aEdge = GeomAlgoAPI_EdgeBuilder::line(0., 0., 1.); + std::shared_ptr anAxis; + anAxis = std::shared_ptr(new GeomAPI_Ax2(aBasePoint, + aEdge->line()->direction())); + + GeomAlgoAPI_Cylinder aCylinderAlgo(anAxis, theRadius, theHeight, theAngle); + + if (!aCylinderAlgo.check()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + + aCylinderAlgo.build(); + + if(!aCylinderAlgo.isDone()) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + if (!aCylinderAlgo.checkValid("Cylinder portion builder")) { + throw GeomAlgoAPI_Exception(aCylinderAlgo.getError()); + } + return aCylinderAlgo.shape(); + } + + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeTranslation( std::shared_ptr theSourceShape, std::shared_ptr theAxis, @@ -81,7 +192,7 @@ namespace GeomAlgoAPI_ShapeAPI return aTranslationAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeTranslation( std::shared_ptr theSourceShape, const double theDx, @@ -105,7 +216,7 @@ namespace GeomAlgoAPI_ShapeAPI return aTranslationAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeTranslation( std::shared_ptr theSourceShape, std::shared_ptr theStartPoint, @@ -128,7 +239,7 @@ namespace GeomAlgoAPI_ShapeAPI return aTranslationAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeSymmetry( std::shared_ptr theSourceShape, std::shared_ptr thePoint) throw (GeomAlgoAPI_Exception) @@ -150,7 +261,7 @@ namespace GeomAlgoAPI_ShapeAPI return aSymmetryAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeSymmetry( std::shared_ptr theSourceShape, std::shared_ptr theAxis) throw (GeomAlgoAPI_Exception) @@ -172,7 +283,7 @@ namespace GeomAlgoAPI_ShapeAPI return aSymmetryAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeSymmetry( std::shared_ptr theSourceShape, std::shared_ptr thePlane) throw (GeomAlgoAPI_Exception) @@ -194,7 +305,7 @@ namespace GeomAlgoAPI_ShapeAPI return aSymmetryAlgo.shape(); } - //========================================================================================================= + //=============================================================================================== std::shared_ptr GeomAlgoAPI_ShapeAPI::makeConeSegment( const double theRMin1, const double theRMax1, const double theRMin2, const double theRMax2, diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h index fbed6c1cc..454f88495 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h @@ -39,10 +39,42 @@ public: static std::shared_ptr makeBox(std::shared_ptr theFirstPoint, std::shared_ptr theSecondPoint) throw (GeomAlgoAPI_Exception); + /// Creates a cylinder using a center, an axis, a radius and a height. + /// \param theBasePoint The center of the lower base of the cylinder + /// \param theEdge The axis of the cylinder + /// \param theRadius The radius of the cylinder + /// \param theHeight The heigth of the cylinder + static std::shared_ptr makeCylinder(std::shared_ptr theBasePoint, + std::shared_ptr theEdge, double theRadius, double theHeight) + throw (GeomAlgoAPI_Exception); + + /// Creates a portion of cylinder using a center, an axis, a radius, a height and an angle. + /// \param theBasePoint The center of the lower base of the cylinder + /// \param theEdge The axis of the cylinder + /// \param theRadius The radius of the cylinder + /// \param theHeight The heigth of the cylinder + /// \param theAngle The angle defining the portion + static std::shared_ptr makeCylinder(std::shared_ptr theBasePoint, + std::shared_ptr theEdge, double theRadius, double theHeight, + double theAngle) throw (GeomAlgoAPI_Exception); + + /// Creates a cylinder using the origin, the OZ axis, a radius and a height. + /// \param theRadius The radius of the cylinder + /// \param theHeight The heigth of the cylinder + static std::shared_ptr makeCylinder(double theRadius, double theHeight) + throw (GeomAlgoAPI_Exception); + + /// Creates a portion of cylinder using the origin, the OZ axis, a radius, a height and an angle. + /// \param theRadius The radius of the cylinder + /// \param theHeight The heigth of the cylinder + /// \param theAngle The angle defining the portion + static std::shared_ptr makeCylinder(double theRadius, double theHeight, + double theAngle) throw (GeomAlgoAPI_Exception); + /// Performs a translation from an axis and a distance. - /// \param theSourceShape Shape to be moved. - /// \param theAxis Movement axis. - /// \param theDistance Movement distance. + /// \param theSourceShape Shape to be moved + /// \param theAxis Movement axis + /// \param theDistance Movement distance /// \return a shape static std::shared_ptr makeTranslation( std::shared_ptr theSourceShape, @@ -50,10 +82,10 @@ public: const double theDistance) throw (GeomAlgoAPI_Exception); /// Performs a translation from dimensions. - /// \param theSourceShape Shape to be moved. - /// \param theDx Movement dimension on X. - /// \param theDy Movement dimension on Y. - /// \param theDz Movement dimension on Z. + /// \param theSourceShape Shape to be moved + /// \param theDx Movement dimension on X + /// \param theDy Movement dimension on Y + /// \param theDz Movement dimension on Z /// \return a shape static std::shared_ptr makeTranslation( std::shared_ptr theSourceShape, @@ -62,31 +94,37 @@ public: const double theDz) throw (GeomAlgoAPI_Exception); /// Performs a translation from two points. - /// \param theSourceShape Shape to be moved. - /// \param theStartPoint Movement start point. - /// \param theEndPoint Movement end point. + /// \param theSourceShape Shape to be moved + /// \param theStartPoint Movement start point + /// \param theEndPoint Movement end point /// \return a shape static std::shared_ptr makeTranslation( std::shared_ptr theSourceShape, std::shared_ptr theStartPoint, std::shared_ptr theEndPoint) throw (GeomAlgoAPI_Exception); - /// Performs a symmetry by a point + /// Performs a symmetry by a point. + /// \param theSourceShape Shape be symmetrized + /// \param thePoint Point of symmetry static std::shared_ptr makeSymmetry( std::shared_ptr theSourceShape, std::shared_ptr thePoint) throw (GeomAlgoAPI_Exception); - /// Performs a symmetry by an axis + /// Performs a symmetry by an axis. + /// \param theSourceShape Shape be symmetrized + /// \param theAxis Axis of symmetry static std::shared_ptr makeSymmetry( std::shared_ptr theSourceShape, std::shared_ptr theAxis) throw (GeomAlgoAPI_Exception); - /// Performs a symmetry by a plane + /// Performs a symmetry by a plane. + /// \param theSourceShape Shape be symmetrized + /// \param thePlane Plane of symmetry static std::shared_ptr makeSymmetry( std::shared_ptr theSourceShape, std::shared_ptr thePlane) throw (GeomAlgoAPI_Exception); - /// Creates a cone segment using standard GDML parameters + /// Creates a cone segment using standard GDML parameters. /// \param theRMin1 Inner radius at base of cone /// \param theRMax1 Outer radius at base of cone /// \param theRMin2 Inner radius at top of cone diff --git a/src/GeomAlgoAPI/Test/TestAPI_Cylinder.py b/src/GeomAlgoAPI/Test/TestAPI_Cylinder.py new file mode 100644 index 000000000..50a4b877d --- /dev/null +++ b/src/GeomAlgoAPI/Test/TestAPI_Cylinder.py @@ -0,0 +1,41 @@ +# Copyright (C) 2014-201x CEA/DEN, EDF R&D + +# File: TestAPI_Cylinder.py +# Created: 13 Jan 2017 +# Author: Clarisse Genrault (CEA) + +from GeomAlgoAPI import GeomAlgoAPI_ShapeAPI as shaperpy +from GeomAlgoAPI import GeomAlgoAPI_Exception as myExcept +from GeomAlgoAPI import GeomAlgoAPI_EdgeBuilder as edgeBuilder +from GeomAPI import GeomAPI_Pnt as pnt + +aPoint = pnt(10.,5.,0.) +anEdge = edgeBuilder.line(1.,0.,0.) + +# Create a cylinder +try : + cylinder1 = shaperpy.makeCylinder(5., 20.) + +except myExcept,ec: + print ec.what() + +# Create a cylinder +try : + cylinder2 = shaperpy.makeCylinder(5., 20., 100.) + +except myExcept,ec: + print ec.what() + +# Create a cylinder +try : + cylinder3 = shaperpy.makeCylinder(aPoint, anEdge, 5., 20.) + +except myExcept,ec: + print ec.what() + +# Create a cylinder +try : + cylinder4 = shaperpy.makeCylinder(aPoint, anEdge, 5., 20., 180.) + +except myExcept,ec: + print ec.what() \ No newline at end of file diff --git a/src/PrimitivesAPI/PrimitivesAPI.i b/src/PrimitivesAPI/PrimitivesAPI.i index 28b92e235..3bea92c00 100644 --- a/src/PrimitivesAPI/PrimitivesAPI.i +++ b/src/PrimitivesAPI/PrimitivesAPI.i @@ -20,7 +20,7 @@ // shared pointers %shared_ptr(PrimitivesAPI_Box) - %shared_ptr(PrimitivesAPI_Cylinder) +%shared_ptr(PrimitivesAPI_Cylinder) // all supported interfaces %include "PrimitivesAPI_Box.h" diff --git a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp index 42c10aed1..debf4b054 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp +++ b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.cpp @@ -1,8 +1,8 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> +// Copyright (C) 2014-201x CEA/DEN, EDF R&D --> -// File: PrimitivesAPI_Cylinder.h +// File: PrimitivesAPI_Cylinder.cpp // Created: 12 Jan 2017 -// Author: Clarisse Genrault (CEA) +// Author: Clarisse Genrault #include "PrimitivesAPI_Cylinder.h" @@ -19,44 +19,40 @@ PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis, - const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight) + const ModelHighAPI_Selection& theBasePoint, + const ModelHighAPI_Selection& theAxis, + const ModelHighAPI_Double& theRadius, + const ModelHighAPI_Double& theHeight) : ModelHighAPI_Interface(theFeature) { if (initialize()) { - fillAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER(), creationMethod()); - setObjects(theBasePoint, theAxis); + fillAttribute(theBasePoint, basePoint()); + fillAttribute(theAxis, axis()); setSizes(theRadius, theHeight); } } //================================================================================================== PrimitivesAPI_Cylinder::PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis, - const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle) + const ModelHighAPI_Selection& theBasePoint, + const ModelHighAPI_Selection& theAxis, + const ModelHighAPI_Double& theRadius, + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle) : ModelHighAPI_Interface(theFeature) { if (initialize()) { - fillAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER_PORTION(), creationMethod()); - setObjects(theBasePoint, theAxis); + fillAttribute(theBasePoint, basePoint()); + fillAttribute(theAxis, axis()); + fillAttribute(theAngle, angle()); setSizes(theRadius, theHeight); - setAngle(theAngle); } } //================================================================================================== -void PrimitivesAPI_Cylinder::setObjects(const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis) +PrimitivesAPI_Cylinder::~PrimitivesAPI_Cylinder() { - fillAttribute(theBasePoint, basePoint()); - fillAttribute(theAxis, axis()); - execute(); } //================================================================================================== @@ -65,15 +61,6 @@ void PrimitivesAPI_Cylinder::setSizes(const ModelHighAPI_Double& theRadius, { fillAttribute(theRadius, radius()); fillAttribute(theHeight, height()); - - execute(); -} - -//================================================================================================== -void PrimitivesAPI_Cylinder::setAngle(const ModelHighAPI_Double& theAngle) -{ - fillAttribute(theAngle, angle()); - execute(); } @@ -85,17 +72,18 @@ void PrimitivesAPI_Cylinder::dump(ModelHighAPI_Dumper& theDumper) const theDumper << aBase << " = model.addCylinder(" << aDocName; - std::string aCreationMethod = aBase->string(PrimitivesPlugin_Cylinder::CREATION_METHOD())->value(); - AttributeSelectionPtr anAttrBasePoint = aBase->selection(PrimitivesPlugin_Cylinder::BASE_POINT_ID()); AttributeSelectionPtr anAttrAxis = aBase->selection(PrimitivesPlugin_Cylinder::AXIS_ID()); + theDumper << ", " << anAttrBasePoint << ", " << anAttrAxis; + AttributeDoublePtr anAttrRadius = aBase->real(PrimitivesPlugin_Cylinder::RADIUS_ID()); AttributeDoublePtr anAttrHeight = aBase->real(PrimitivesPlugin_Cylinder::HEIGHT_ID()); - - theDumper << ", " << anAttrBasePoint << ", " << anAttrAxis; theDumper << ", " << anAttrRadius << ", " << anAttrHeight; - + + std::string aCreationMethod = + aBase->string(PrimitivesPlugin_Cylinder::CREATION_METHOD())->value(); + if (aCreationMethod == PrimitivesPlugin_Cylinder::CREATION_METHOD_CYLINDER_PORTION()) { AttributeDoublePtr anAttrAngle = aBase->real(PrimitivesPlugin_Cylinder::ANGLE_ID()); theDumper << ", " << anAttrAngle; @@ -109,12 +97,11 @@ CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle) + const ModelHighAPI_Double& theHeight) { std::shared_ptr aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID()); return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, theBasePoint, theAxis, - theRadius, theHeight, theAngle)); + theRadius, theHeight)); } //================================================================================================== @@ -122,34 +109,35 @@ CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight) + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle) { std::shared_ptr aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID()); return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, theBasePoint, theAxis, - theRadius, theHeight)); + theRadius, theHeight, theAngle)); } //================================================================================================== CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle) + const ModelHighAPI_Double& theHeight) { - std::shared_ptr aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID()); ModelHighAPI_Selection aBasePoint("VERT", "Origin"); ModelHighAPI_Selection anAxis("EDGE", "OZ"); + std::shared_ptr aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID()); return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, aBasePoint, anAxis, - theRadius, theHeight, theAngle)); + theRadius, theHeight)); } //================================================================================================== CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight) + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle) { - std::shared_ptr aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID()); ModelHighAPI_Selection aBasePoint("VERT", "Origin"); ModelHighAPI_Selection anAxis("EDGE", "OZ"); + std::shared_ptr aFeature = thePart->addFeature(PrimitivesAPI_Cylinder::ID()); return CylinderPtr(new PrimitivesAPI_Cylinder(aFeature, aBasePoint, anAxis, theRadius, theHeight)); } \ No newline at end of file diff --git a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h index 3e16d41c8..3d473798b 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h +++ b/src/PrimitivesAPI/PrimitivesAPI_Cylinder.h @@ -1,8 +1,8 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> +// Copyright (C) 2014-201x CEA/DEN, EDF R&D --> // File: PrimitivesAPI_Cylinder.h // Created: 12 Jan 2017 -// Author: Clarisse Genrault (CEA) +// Author: Clarisse Genrault #ifndef PRIMITIVESAPI_CYLINDER_H_ #define PRIMITIVESAPI_CYLINDER_H_ @@ -17,9 +17,9 @@ class ModelHighAPI_Double; class ModelHighAPI_Selection; -/// \class PrimitivesAPI_Cylinder +/// \class PrimitivesAPI_Box /// \ingroup CPPHighAPI -/// \brief Interface for primitive Cylinder feature. +/// \brief Interface for primitive Box feature. class PrimitivesAPI_Cylinder: public ModelHighAPI_Interface { public: @@ -27,6 +27,13 @@ public: PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature); + /// Constructor with values. + /*PRIMITIVESAPI_EXPORT + explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, + const ModelHighAPI_Double& theDx, + const ModelHighAPI_Double& theDy, + const ModelHighAPI_Double& theDz);*/ + /// Constructor with values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, @@ -34,6 +41,8 @@ public: const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, const ModelHighAPI_Double& theHeight); + + /// Constructor with values. PRIMITIVESAPI_EXPORT explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, const ModelHighAPI_Selection& theBasePoint, @@ -42,44 +51,29 @@ public: const ModelHighAPI_Double& theHeight, const ModelHighAPI_Double& theAngle); - /// Constructor with values. - /*PRIMITIVESAPI_EXPORT - explicit PrimitivesAPI_Cylinder(const std::shared_ptr& theFeature, - const ModelHighAPI_Selection& theFirstPoint, - const ModelHighAPI_Selection& theSecondPoint);*/ - /// Destructor. PRIMITIVESAPI_EXPORT virtual ~PrimitivesAPI_Cylinder(); INTERFACE_6(PrimitivesPlugin_Cylinder::ID(), - creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(), - ModelAPI_AttributeString, /** Creation method */, - basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(), - ModelAPI_AttributeSelection, /** Base point */, - axis, PrimitivesPlugin_Cylinder::AXIS_ID(), - ModelAPI_AttributeSelection, /** Axis */, - radius, PrimitivesPlugin_Cylinder::RADIUS_ID(), - ModelAPI_AttributeDouble, /** Radius */, - height, PrimitivesPlugin_Cylinder::HEIGHT_ID(), - ModelAPI_AttributeDouble, /** Height */, - angle, PrimitivesPlugin_Cylinder::ANGLE_ID(), - ModelAPI_AttributeDouble, /** Angle */) - - /// Set base point and axis - PRIMITIVESAPI_EXPORT - void setObjects(const ModelHighAPI_Selection& theBasePoint, - const ModelHighAPI_Selection& theAxis); - - /// Set radius and height + creationMethod, PrimitivesPlugin_Cylinder::CREATION_METHOD(), + ModelAPI_AttributeString, /** Creation method */, + basePoint, PrimitivesPlugin_Cylinder::BASE_POINT_ID(), + ModelAPI_AttributeSelection, /** Dimension in X */, + axis, PrimitivesPlugin_Cylinder::AXIS_ID(), + ModelAPI_AttributeSelection, /** Dimension in Y */, + radius, PrimitivesPlugin_Cylinder::RADIUS_ID(), + ModelAPI_AttributeDouble, /** Dimension in Z */, + height, PrimitivesPlugin_Cylinder::HEIGHT_ID(), + ModelAPI_AttributeDouble, /** First point */, + angle, PrimitivesPlugin_Cylinder::ANGLE_ID(), + ModelAPI_AttributeDouble, /** Second point */) + + /// Set dimensions PRIMITIVESAPI_EXPORT void setSizes(const ModelHighAPI_Double& theRadius, const ModelHighAPI_Double& theHeight); - /// Set angle - PRIMITIVESAPI_EXPORT - void setAngle(const ModelHighAPI_Double& theAngle); - /// Dump wrapped feature PRIMITIVESAPI_EXPORT virtual void dump(ModelHighAPI_Dumper& theDumper) const; @@ -89,36 +83,37 @@ public: typedef std::shared_ptr CylinderPtr; /// \ingroup CPPHighAPI -/// \brief Create primitive Cylinder feature. +/// \brief Create primitive Box feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle); + const ModelHighAPI_Double& theHeight); /// \ingroup CPPHighAPI -/// \brief Create primitive Cylinder feature. +/// \brief Create primitive Box feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Selection& theBasePoint, const ModelHighAPI_Selection& theAxis, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight); + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle); + /// \ingroup CPPHighAPI -/// \brief Create primitive Cylinder feature. +/// \brief Create primitive Box feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight, - const ModelHighAPI_Double& theAngle); + const ModelHighAPI_Double& theHeight); /// \ingroup CPPHighAPI -/// \brief Create primitive Cylinder feature. +/// \brief Create primitive Box feature. PRIMITIVESAPI_EXPORT CylinderPtr addCylinder(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius, - const ModelHighAPI_Double& theHeight); + const ModelHighAPI_Double& theHeight, + const ModelHighAPI_Double& theAngle); #endif // PRIMITIVESAPI_CYLINDER_H_ \ No newline at end of file diff --git a/src/PrimitivesAPI/Test/TestCylinder.py b/src/PrimitivesAPI/Test/TestCylinder.py new file mode 100644 index 000000000..38e6d260b --- /dev/null +++ b/src/PrimitivesAPI/Test/TestCylinder.py @@ -0,0 +1,44 @@ +""" +Test case for Primitive Cylinder feature. +Written on High API. +""" +from ModelAPI import * +from GeomAPI import * + +from salome.shaper import model + +# Get session +aSession = ModelAPI_Session.get() + +# Create a part +aDocument = aSession.activeDocument() +aSession.startOperation() +model.addPart(aDocument) +aDocument = aSession.activeDocument() +aSession.finishOperation() + +aSession.startOperation() +aBasePoint = model.addPoint(aDocument, 0, 0, 0).result() +anAxis = model.addAxis(aDocument, 10, 0, 0).result() +aSession.finishOperation() + +aSession.startOperation() +aCylinder1 = model.addCylinder(aDocument, aBasePoint, anAxis, 5., 20.) +assert (aCylinder1 is not None) +aSession.finishOperation() + +aSession.startOperation() +aCylinder2 = model.addCylinder(aDocument, aBasePoint, anAxis, 5., 20., 100.) +assert (aCylinder2 is not None) +aSession.finishOperation() + +aSession.startOperation() +aCylinder3 = model.addCylinder(aDocument, 5., 20.) +assert (aCylinder3 is not None) +aSession.finishOperation() + +aSession.startOperation() +aCylinder4 = model.addCylinder(aDocument, 5., 20., 100.) +assert (aCylinder4 is not None) +aSession.finishOperation() + diff --git a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp index fd336ae8b..63236482b 100644 --- a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp +++ b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp @@ -31,19 +31,19 @@ void PrimitivesPlugin_Cylinder::initAttributes() { data()->addAttribute(PrimitivesPlugin_Cylinder::CREATION_METHOD(), ModelAPI_AttributeString::typeId()); - + data()->addAttribute(PrimitivesPlugin_Cylinder::BASE_POINT_ID(), ModelAPI_AttributeSelection::typeId()); data()->addAttribute(PrimitivesPlugin_Cylinder::AXIS_ID(), ModelAPI_AttributeSelection::typeId()); - + data()->addAttribute(PrimitivesPlugin_Cylinder::RADIUS_ID(), ModelAPI_AttributeDouble::typeId()); data()->addAttribute(PrimitivesPlugin_Cylinder::HEIGHT_ID(), ModelAPI_AttributeDouble::typeId()); data()->addAttribute(PrimitivesPlugin_Cylinder::ANGLE_ID(), ModelAPI_AttributeDouble::typeId()); - + // Initialize the base point of the cylinder at the origin if the base point is not filled. AttributeSelectionPtr aBasePoint = data()->selection(BASE_POINT_ID()); if (!aBasePoint->isInitialized()) { @@ -54,10 +54,10 @@ void PrimitivesPlugin_Cylinder::initAttributes() aBasePoint->setValue(aPointRes, std::shared_ptr()); } } - + // Initialize the axis at the OZ axis if the axis is not filled. AttributeSelectionPtr anAxis = data()->selection(AXIS_ID()); - if (!anAxis->isInitialized()) { + if (!anAxis->isInitialized()) { ObjectPtr anAxisObj = ModelAPI_Session::get()->moduleDocument() ->objectByName(ModelAPI_ResultConstruction::group(), "OZ"); if (anAxisObj.get()) { @@ -98,7 +98,7 @@ void PrimitivesPlugin_Cylinder::createCylinder(bool withAngle) aBasePoint = GeomAlgoAPI_PointBuilder::point(aShape1); } } - + // Getting axis. std::shared_ptr anAxis; std::shared_ptr anEdge; @@ -114,21 +114,21 @@ void PrimitivesPlugin_Cylinder::createCylinder(bool withAngle) anAxis = std::shared_ptr(new GeomAPI_Ax2(aBasePoint, anEdge->line()->direction())); } - + // Getting radius and height double aRadius = real(PrimitivesPlugin_Cylinder::RADIUS_ID())->value(); double aHeight = real(PrimitivesPlugin_Cylinder::HEIGHT_ID())->value(); - + std::shared_ptr aCylinderAlgo; if (withAngle) { // Getting angle double anAngle = real(PrimitivesPlugin_Cylinder::ANGLE_ID())->value(); - aCylinderAlgo = + aCylinderAlgo = std::shared_ptr(new GeomAlgoAPI_Cylinder(anAxis, aRadius, aHeight, anAngle)); } else { - aCylinderAlgo = + aCylinderAlgo = std::shared_ptr(new GeomAlgoAPI_Cylinder(anAxis, aRadius, aHeight)); } @@ -165,7 +165,6 @@ void PrimitivesPlugin_Cylinder::createCylinder(bool withAngle) void PrimitivesPlugin_Cylinder::loadNamingDS(std::shared_ptr theCylinderAlgo, std::shared_ptr theResultCylinder) { - // Load the result theResultCylinder->store(theCylinderAlgo->shape()); diff --git a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.h b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.h index 1f3dce27c..250bf881b 100644 --- a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.h +++ b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.h @@ -37,14 +37,14 @@ class PrimitivesPlugin_Cylinder : public ModelAPI_Feature static const std::string MY_CREATION_METHOD_ID("CreationMethod"); return MY_CREATION_METHOD_ID; } - + /// Attribute name for creation method inline static const std::string& CREATION_METHOD_CYLINDER() { static const std::string MY_CREATION_METHOD_ID("Cylinder"); return MY_CREATION_METHOD_ID; } - + /// Attribute name for creation method inline static const std::string& CREATION_METHOD_CYLINDER_PORTION() { diff --git a/src/PrimitivesPlugin/icons/SVG/cylinder.svg b/src/PrimitivesPlugin/icons/SVG/cylinder.svg new file mode 100644 index 000000000..e6365bd02 --- /dev/null +++ b/src/PrimitivesPlugin/icons/SVG/cylinder.svg @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/src/PrimitivesPlugin/icons/SVG/cylinder_32x32.svg b/src/PrimitivesPlugin/icons/SVG/cylinder_32x32.svg new file mode 100644 index 000000000..58007843e --- /dev/null +++ b/src/PrimitivesPlugin/icons/SVG/cylinder_32x32.svg @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/src/PrimitivesPlugin/icons/SVG/cylinder_portion_32x32.svg b/src/PrimitivesPlugin/icons/SVG/cylinder_portion_32x32.svg new file mode 100644 index 000000000..46351d570 --- /dev/null +++ b/src/PrimitivesPlugin/icons/SVG/cylinder_portion_32x32.svg @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/PrimitivesPlugin/icons/cylinder_32x32.png b/src/PrimitivesPlugin/icons/cylinder_32x32.png index 80a39989dbc692aca1a11a9040af18cb801e0d96..6de9c1c6b1ba34a3ae04400a2b79e57dd32c5267 100644 GIT binary patch delta 1013 zcmVmzB)f#5{4z&;LBP9e48X}1? zSSW?ImZ;T@x-@a)9%D2bS1wH0x$%*JX$sMr0u6;kBM^(hTKXE=f)JpOnJG=$d9~Bd zJuZg9X_-Ez4T+2XSLfdEyWjtJPR@68jwq$rsLBttWSh!O+S+0p0w`>Fr&=@3&w)C? zmFdhLDgstDp#niD|7usf00~VIaqR)M=kT(H5+uYRG9;BwK z8qYR&MpK`eongQ`#JP)I_yT?%r9PauQUM%TaRs&?YI#X%Tm?9^zn0hQ8!!xm%_ts^ z(|NIr_Rcd2!?-$p@BFFGWL!&4R+>5vV6)kHqp^9@=6?XXuG3IgPhL)L!b6vjQ{&pw zbO`}Oqfstj{bSSSN&R*GZ~Rk%~_oPj&>$}J|d9_J$=3O^et`W~B1(*gkO-non2J9jbZ_c3_G%iyq=o45ZV5{W#@NoQ=g*(fV1 zrKYl)nyP9F^9um@?aHOJJ}Uwwm7kkOer_JGy?^p5kZ7w=I7~PaCKw6<;B+`}IvhA0 z4lMebB{Kt9E?w8j&dMS?D=X7a(@I-A<;iLbU<+UiU<=@X1|ZtBh&DVwzv@YPLmIw0 zniwcmv?73*%CD4J*+0~;ZRWy~PN8rpIqY5$V8LAcRz&>$-XZPhvmKbGxoKmi6m9K4 z;eQ<&1`%^H&X1|_$Ly7#M~XtJNSL zH}MAo_yRtBfdCV}Nv;p{6P=3!U|1}(ac+^uyT6?LeYw|)S2Jm8(Tjq-i*O8hE~DxH zr*47oB3N4=oI5d_)@MDNt*EJ`m<8FViF(m;7RIV(JO~h*2Nw800000NkvXXu0mjfr!npn delta 777 zcmV+k1NQvX29hI6o#L3@9k~%H!YPaqJGA2N28(=5+M>n z2oe>Gt}Sgu#7ZSLEU>eYNUX$2M1(e^p$Uo^)cV%|bGGhlQqhZm%&e?rRd6NC0!t__ub{Z77=T1#m{>f{ zv##fKJnf(_76b4_*&A&QUHv9{o;*8A!EX!i)qQ&E1GA&~Q;G_$TF6b8$Uja{^J!}ac zv1q|UY|H+^n@T0=>h9)I$7Ak=9{`|Ww1{Z|zDdFNlAg4+-<7uZyX56Llopp#R#u8C z3=R!4oEXOQlHXE%z!FGJ3V@sEB+s5W^(xZUIS_sru77$GiPXgUm6=c7B~IYIwPgEA1)xb4gY;Cm%qj7(mde1yEHxvnz)H|G*AlTb6m* z983VsW`7TJ0RZUK0jQu^^v}UDRLP=!j($NlBbfXN2&y`T0A$fTCjh?sqpAvORy(aJ z5(;^s(NxNJ6Q4eIngYZJ2DUf@X*UhI1@mo$A5#&-nRER$PvH=5D}_pRrk4$`$;TK zjg5_!_Pl>TeZu06334pja`_YnH3789zZGQz7Nkl3$g6vuz}&C;2|bfzGsNKp|14T@B@LeoG| z0wM|mP9sK4O#~A^*bl~tA_a*A5d$VQVuGfLfMiTmRGOxxtq{OcC`+(qYk|_r65HuA zrOPbu`eBx~^JY42G4XtPdGDU(fB)y4d(RV6O8!sL57t1~?SHzl_ml}jm5)g&h0x(s zeZq^7U3#6Ns_yrF&4cn6iveM`>r!02qzYCEcoLWl#Pwrx4IwH8^0?7Wer>U%bw~h4 zEn8-Z^O$l#t_4#17zu$b!3uy+^`WXN9*>7^x4W-%Xj742dku!2cMtBrJ756g7TZTi zg~LE9fYE4VR)6Yr9-lag2b0H;JUSVp!Jx7Gr>T*;`kP$8S;vWrlepSlAs|vPui=p6 zTucDtGqX(|^Su*5YFu0#%b#CL`m8kK9r42@wOk+Fg9N|9dV}R{>B|R>Imf*(4{8*63Oj5|}-G28E@E5y+(Q zbqxa`Cjr#nxJLDrOPbXS7putq?9)(ifSV2VY}v7mV<-RA=r=l>s5pBjxVt&w>ly~6 zl-Gq2X@9D!lDFp@=FLfGVdk?W47c#(uRl|A^bY`RRx657aJDp)V6il{xm+Xjf7naa zrHib|dKH~cz~IapYLv)LJN&h3~05Q+*CYl2m6ZEIDEkCah*>?qa*Ysk?vQ>U>e zYc<=x`~rY2>o?y1rQo-bWyg+k>TD%7*K6tSc7M~+*#SVj*-S@gCqP$B079q|DOmBs zi;5~GMP()2zIz8}vlD~C!0MHDGScSub)wht+Nvz3On!p=1AA$1X#v0#7bi33q>BlU zjAwWLx0<~|q#96#1W*(m8EJF*&iB=nlHk%i~ppSjkL;xUFfZhj` z2t1?R8d8Q-g6|>lg9jk}4AA?83_6N(Z-fIFjA#G|)IbV)fAjm7Q8*Ap1~32u`l*55 zDNq6c)c<~X(Ev~bUC;+p;2ACaKz2G{0DlNo!$8a$5Me0@)x;2rPzYtvU2s1Vp$oJO z1p8e2J2a*QZHLx|M5uxOGjLxrur3H781M)$2A(Z#4XD9h8~S!bDHsZX9tL`U(lQ{W zq^mn{yGA>qh5|q(b_$xDPCn1uMN6xH0{ z;AG`#MkggPLKAnbPC*nf5o0IP!EOePauU7=}83c(KRFgE<;@Ai1TMn8M(zcqWx>oPaDPd+0483`f8*d_K?1TssYEK#Lu z3M@4OSq%k_QY~|kvNS6bRqg}E^f==@s{HzIi`XL_4qr?L!exABw#jYocr{l@IYmfv y>I)st{`8XSQd11h72=xk-!)RwlFp+ zrGd8eeU2A>3tb0o*|^i^s_(}+|KD@|&pB`5zrLj4H$x#;O@CA$S78?_jld=#09e2T z!Z@m@ROQD@$2N_(Q~pF;PiM`XIm}_cdmyu8}6u3TLY?a zS6%(WecMiQ_=``O3Wovs^J!%Ol$Seg zXn#c0!f6W}^Ro|OS~!-7tpY$Wm~J@{=Oio$rYo?_P7{gwRRHMdSojzj6$4>Xbp zqO9ypRK7TMeHddM$n=iR5-wS~|8~#CfvhVcIwHGdq z4o_T}D4v=QSJ+9r3>Y>luZac5nEH{wFIG=Srf+jXRaM@c8T#Y*T=@%{oYhY}8$#p* zU}HvP*kCtZ{^6TZfa=GdS}R`Hb0BXiREp|5W5>Vh$d|j|(H#thyx|$$gYX7O5F*3A j@$Sy=3yuGOEw}y!z}}<8imZZN00000NkvXXu0mjfnRfwt diff --git a/src/PythonAPI/model/primitives/__init__.py b/src/PythonAPI/model/primitives/__init__.py index aeb61cd51..49d9adb32 100644 --- a/src/PythonAPI/model/primitives/__init__.py +++ b/src/PythonAPI/model/primitives/__init__.py @@ -1,4 +1,4 @@ """Package for Primitives plugin for the Parametric Geometry API of the Modeler. """ -from PrimitivesAPI import addBox +from PrimitivesAPI import addBox, addCylinder -- 2.30.2