GeomAlgoAPI_Exception.h
GeomAlgoAPI_Box.h
GeomAlgoAPI_Cylinder.h
+ GeomAlgoAPI_Sphere.h
GeomAlgoAPI_XAOExport.h
GeomAlgoAPI_XAOImport.h
GeomAlgoAPI_Copy.h
GeomAlgoAPI_Exception.cpp
GeomAlgoAPI_Box.cpp
GeomAlgoAPI_Cylinder.cpp
+ GeomAlgoAPI_Sphere.cpp
GeomAlgoAPI_XAOExport.cpp
GeomAlgoAPI_XAOImport.cpp
GeomAlgoAPI_Copy.cpp
#include "GeomAlgoAPI_ShapeAPI.h"
#include <GeomAlgoAPI_Box.h>
-#include <GeomAlgoAPI_Cylinder.h>
#include <GeomAlgoAPI_CompoundBuilder.h>
#include <GeomAlgoAPI_ConeSegment.h>
+#include <GeomAlgoAPI_Cylinder.h>
#include <GeomAlgoAPI_EdgeBuilder.h>
#include <GeomAlgoAPI_Rotation.h>
#include <GeomAlgoAPI_Scale.h>
+#include <GeomAlgoAPI_Sphere.h>
#include <GeomAlgoAPI_Symmetry.h>
#include <GeomAlgoAPI_Translation.h>
return aCylinderAlgo.shape();
}
+ //===============================================================================================
+ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSphere(
+ std::shared_ptr<GeomAPI_Pnt> theCenterPoint, double theRadius) throw (GeomAlgoAPI_Exception)
+ {
+ GeomAlgoAPI_Sphere aSphereAlgo(theCenterPoint, theRadius);
+
+ if (!aSphereAlgo.check()) {
+ throw GeomAlgoAPI_Exception(aSphereAlgo.getError());
+ }
+
+ aSphereAlgo.build();
+
+ if(!aSphereAlgo.isDone()) {
+ throw GeomAlgoAPI_Exception(aSphereAlgo.getError());
+ }
+
+ if (!aSphereAlgo.checkValid("Sphere builder")) {
+ throw GeomAlgoAPI_Exception(aSphereAlgo.getError());
+ }
+ return aSphereAlgo.shape();
+ }
+
+ //===============================================================================================
+ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeSphere(double theRadius)
+ throw (GeomAlgoAPI_Exception)
+ {
+ std::shared_ptr<GeomAPI_Pnt> aCenterPoint =
+ std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
+
+ GeomAlgoAPI_Sphere aSphereAlgo(aCenterPoint, theRadius);
+
+ if (!aSphereAlgo.check()) {
+ throw GeomAlgoAPI_Exception(aSphereAlgo.getError());
+ }
+
+ aSphereAlgo.build();
+
+ if(!aSphereAlgo.isDone()) {
+ throw GeomAlgoAPI_Exception(aSphereAlgo.getError());
+ }
+
+ if (!aSphereAlgo.checkValid("Sphere builder")) {
+ throw GeomAlgoAPI_Exception(aSphereAlgo.getError());
+ }
+ return aSphereAlgo.shape();
+ }
+
//===============================================================================================
std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeTranslation(
std::shared_ptr<GeomAPI_Shape> theSourceShape,
static std::shared_ptr<GeomAPI_Shape> makeCylinder(double theRadius, double theHeight,
double theAngle) throw (GeomAlgoAPI_Exception);
+ /// Creates a sphere using a center and a radius.
+ /// \param theCenterPoint The center of the sphere
+ /// \param theRadius The radius of the sphere
+ static std::shared_ptr<GeomAPI_Shape> makeSphere(std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
+ double theRadius) throw (GeomAlgoAPI_Exception);
+
+ /// Creates a sphere using the origin and a radius.
+ /// \param theRadius The radius of the cylinder
+ static std::shared_ptr<GeomAPI_Shape> makeSphere(double theRadius)
+ throw (GeomAlgoAPI_Exception);
+
/// Performs a translation from an axis and a distance.
/// \param theSourceShape Shape to be moved
/// \param theAxis Movement axis
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File: GeomAlgoAPI_Sphere.h
+// Created: 16 Mar 2017
+// Author: Clarisse Genrault (CEA)
+
+#include <GeomAlgoAPI_Sphere.h>
+
+#include <BRepPrimAPI_MakeSphere.hxx>
+
+//=================================================================================================
+GeomAlgoAPI_Sphere::GeomAlgoAPI_Sphere()
+{
+}
+
+//=================================================================================================
+GeomAlgoAPI_Sphere::GeomAlgoAPI_Sphere(std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
+ const double theRadius)
+{
+ myCenterPoint = theCenterPoint;
+ myRadius = theRadius;
+}
+
+//=================================================================================================
+bool GeomAlgoAPI_Sphere::check()
+{
+ if (!myCenterPoint) {
+ myError = "Sphere builder :: center is not valid.";
+ return false;
+ }
+ if (myRadius < Precision::Confusion()) {
+ myError = "Sphere builder :: radius is negative or null.";
+ return false;
+ }
+ return true;
+}
+
+//=================================================================================================
+void GeomAlgoAPI_Sphere::build()
+{
+ myCreatedFaces.clear();
+
+ const gp_Pnt& aCenterPoint = myCenterPoint->impl<gp_Pnt>();
+
+ // Construct the sphere
+ BRepPrimAPI_MakeSphere *aSphereMaker = new BRepPrimAPI_MakeSphere(aCenterPoint, myRadius);
+
+ aSphereMaker->Build();
+
+ if (!aSphereMaker->IsDone()) {
+ return;
+ }
+
+ TopoDS_Shape aResult = aSphereMaker->Shape();
+ std::shared_ptr<GeomAPI_Shape> aShape(new GeomAPI_Shape());
+ aShape->setImpl(new TopoDS_Shape(aResult));
+ setShape(aShape);
+
+ // Test on the shapes
+ if (!aShape.get() || aShape->isNull()) {
+ myError = "Sphere builder :: resulting shape is null.";
+ return;
+ }
+
+ setImpl(aSphereMaker);
+
+ setDone(true);
+}
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File: GeomAlgoAPI_Sphere.h
+// Created: 16 Mar 2017
+// Author: Clarisse Genrault (CEA)
+
+#ifndef GEOMALGOAPI_SPHERE_H_
+#define GEOMALGOAPI_SPHERE_H_
+
+#include <GeomAlgoAPI_MakeShape.h>
+
+#include <GeomAPI_Pnt.h>
+
+/**\class GeomAlgoAPI_Sphere
+ * \ingroup DataAlgo
+ * \brief Allows to create Sphere Primitives
+ */
+class GeomAlgoAPI_Sphere : public GeomAlgoAPI_MakeShape
+{
+ public:
+ GEOMALGOAPI_EXPORT GeomAlgoAPI_Sphere();
+
+ /// Creates a sphere.
+ /// \param theCenterPoint The center point of the sphere
+ /// \param theRadius The radius of the sphere
+ GEOMALGOAPI_EXPORT GeomAlgoAPI_Sphere(std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
+ const double theRadius);
+
+ /// Checks if data for the sphere construction is OK.
+ GEOMALGOAPI_EXPORT bool check();
+
+ /// Builds the sphere.
+ GEOMALGOAPI_EXPORT void build();
+
+ private:
+ std::shared_ptr<GeomAPI_Pnt> myCenterPoint; /// Center of the sphere.
+ double myRadius;
+};
+
+#endif // GEOMALGOAPI_SPHERE_H_
PrimitivesAPI.h
PrimitivesAPI_Box.h
PrimitivesAPI_Cylinder.h
+ PrimitivesAPI_Sphere.h
)
SET(PROJECT_SOURCES
PrimitivesAPI_Box.cpp
PrimitivesAPI_Cylinder.cpp
+ PrimitivesAPI_Sphere.cpp
)
SET(PROJECT_LIBRARIES
// shared pointers
%shared_ptr(PrimitivesAPI_Box)
%shared_ptr(PrimitivesAPI_Cylinder)
+%shared_ptr(PrimitivesAPI_Sphere)
// all supported interfaces
%include "PrimitivesAPI_Box.h"
%include "PrimitivesAPI_Cylinder.h"
+%include "PrimitivesAPI_Sphere.h"
--- /dev/null
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
+
+// File: PrimitivesAPI_Sphere.h
+// Created: 16 Mar 2017
+// Author: Clarisse Genrault
+
+#include "PrimitivesAPI_Sphere.h"
+
+#include <ModelHighAPI_Dumper.h>
+#include <ModelHighAPI_Selection.h>
+#include <ModelHighAPI_Tools.h>
+
+//==================================================================================================
+PrimitivesAPI_Sphere::PrimitivesAPI_Sphere(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: ModelHighAPI_Interface(theFeature)
+{
+ initialize();
+}
+
+//==================================================================================================
+PrimitivesAPI_Sphere::PrimitivesAPI_Sphere(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Selection& theCenterPoint,
+ const ModelHighAPI_Double& theRadius)
+: ModelHighAPI_Interface(theFeature)
+{
+ if (initialize()) {
+ fillAttribute(theCenterPoint, centerPoint());
+ setRadius(theRadius);
+ }
+}
+
+//==================================================================================================
+PrimitivesAPI_Sphere::~PrimitivesAPI_Sphere()
+{
+}
+
+//==================================================================================================
+void PrimitivesAPI_Sphere::setCenterPoint(const ModelHighAPI_Selection& theCenterPoint)
+{
+ fillAttribute(theCenterPoint, centerPoint());
+ execute();
+}
+
+//==================================================================================================
+void PrimitivesAPI_Sphere::setRadius(const ModelHighAPI_Double& theRadius)
+{
+ fillAttribute(theRadius, radius());
+ execute();
+}
+
+//==================================================================================================
+void PrimitivesAPI_Sphere::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+
+ theDumper << aBase << " = model.addSphere(" << aDocName;
+
+ AttributeSelectionPtr anAttrCenterPoint =
+ aBase->selection(PrimitivesPlugin_Sphere::CENTER_POINT_ID());
+ AttributeDoublePtr anAttrRadius = aBase->real(PrimitivesPlugin_Sphere::RADIUS_ID());
+ theDumper << ", " << anAttrCenterPoint << ", " << anAttrRadius;
+
+ theDumper << ")" << std::endl;
+}
+
+//==================================================================================================
+SpherePtr addSphere(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theCenterPoint,
+ const ModelHighAPI_Double& theRadius)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(PrimitivesAPI_Sphere::ID());
+ return SpherePtr(new PrimitivesAPI_Sphere(aFeature, theCenterPoint, theRadius));
+}
+
+//==================================================================================================
+SpherePtr addSphere(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theRadius)
+{
+ ModelHighAPI_Selection aCenterPoint("VERTEX", "PartSet/Origin");
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(PrimitivesAPI_Sphere::ID());
+ return SpherePtr(new PrimitivesAPI_Sphere(aFeature, aCenterPoint, theRadius));
+}
--- /dev/null
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
+
+// File: PrimitivesAPI_Sphere.h
+// Created: 16 Mar 2017
+// Author: Clarisse Genrault
+
+#ifndef PRIMITIVESAPI_SPHERE_H_
+#define PRIMITIVESAPI_SPHERE_H_
+
+#include "PrimitivesAPI.h"
+
+#include <PrimitivesPlugin_Sphere.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Double;
+class ModelHighAPI_Selection;
+
+/// \class PrimitivesAPI_Sphere
+/// \ingroup CPPHighAPI
+/// \brief Interface for primitive Sphere feature.
+class PrimitivesAPI_Sphere: public ModelHighAPI_Interface
+{
+public:
+ /// Constructor without values.
+ PRIMITIVESAPI_EXPORT
+ explicit PrimitivesAPI_Sphere(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ /// Constructor with values.
+ PRIMITIVESAPI_EXPORT
+ explicit PrimitivesAPI_Sphere(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const ModelHighAPI_Selection& theCenterPoint,
+ const ModelHighAPI_Double& theRadius);
+
+ /// Destructor.
+ PRIMITIVESAPI_EXPORT
+ virtual ~PrimitivesAPI_Sphere();
+
+ INTERFACE_2(PrimitivesPlugin_Sphere::ID(),
+ centerPoint, PrimitivesPlugin_Sphere::CENTER_POINT_ID(),
+ ModelAPI_AttributeSelection, /** Center point */,
+ radius, PrimitivesPlugin_Sphere::RADIUS_ID(),
+ ModelAPI_AttributeDouble, /** Radius */)
+
+ /// Set center point
+ PRIMITIVESAPI_EXPORT
+ void setCenterPoint(const ModelHighAPI_Selection& theCenterPoint);
+
+ /// Set radius
+ PRIMITIVESAPI_EXPORT
+ void setRadius(const ModelHighAPI_Double& theRadius);
+
+ /// Dump wrapped feature
+ PRIMITIVESAPI_EXPORT
+ virtual void dump(ModelHighAPI_Dumper& theDumper) const;
+};
+
+/// Pointer on primitive Sphere object
+typedef std::shared_ptr<PrimitivesAPI_Sphere> SpherePtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create primitive Sphere feature.
+PRIMITIVESAPI_EXPORT
+SpherePtr addSphere(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Selection& theCenterPoint,
+ const ModelHighAPI_Double& theRadius);
+
+/// \ingroup CPPHighAPI
+/// \brief Create primitive Sphere feature.
+PRIMITIVESAPI_EXPORT
+SpherePtr addSphere(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const ModelHighAPI_Double& theRadius);
+
+#endif // PRIMITIVESAPI_SPHERE_H_
#include "PrimitivesAPI.h"
#include "PrimitivesAPI_Box.h"
#include "PrimitivesAPI_Cylinder.h"
+ #include "PrimitivesAPI_Sphere.h"
#endif // PRIMITIVESAPI_SWIG_H_
PrimitivesPlugin_Plugin.h
PrimitivesPlugin_Box.h
PrimitivesPlugin_Cylinder.h
+ PrimitivesPlugin_Sphere.h
)
SET(PROJECT_SOURCES
PrimitivesPlugin_Plugin.cpp
PrimitivesPlugin_Box.cpp
PrimitivesPlugin_Cylinder.cpp
+ PrimitivesPlugin_Sphere.cpp
)
SET(XML_RESOURCES
plugin-Primitives.xml
box_widget.xml
cylinder_widget.xml
+ sphere_widget.xml
)
INCLUDE_DIRECTORIES(
#include <PrimitivesPlugin_Box.h>
#include <PrimitivesPlugin_Cylinder.h>
+#include <PrimitivesPlugin_Sphere.h>
+
#include <ModelAPI_Session.h>
#include <string>
return FeaturePtr(new PrimitivesPlugin_Box);
} else if (theFeatureID == PrimitivesPlugin_Cylinder::ID()) {
return FeaturePtr(new PrimitivesPlugin_Cylinder);
+ } else if (theFeatureID == PrimitivesPlugin_Sphere::ID()) {
+ return FeaturePtr(new PrimitivesPlugin_Sphere);
}
// feature of such kind is not found
return FeaturePtr();
--- /dev/null
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+// File: PrimitivesPlugin_Sphere.h
+// Created: 15 Mar 2017
+// Author: Clarisse Genrault (CEA)
+
+#include <PrimitivesPlugin_Sphere.h>
+
+#include <GeomAlgoAPI_PointBuilder.h>
+
+#include <ModelAPI_AttributeDouble.h>
+#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_ResultBody.h>
+#include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_Session.h>
+
+//=================================================================================================
+PrimitivesPlugin_Sphere::PrimitivesPlugin_Sphere()
+{
+}
+
+//=================================================================================================
+void PrimitivesPlugin_Sphere::initAttributes()
+{
+ data()->addAttribute(PrimitivesPlugin_Sphere::CENTER_POINT_ID(),
+ ModelAPI_AttributeSelection::typeId());
+
+ data()->addAttribute(PrimitivesPlugin_Sphere::RADIUS_ID(),
+ ModelAPI_AttributeDouble::typeId());
+
+ // Initialize the center point of the sphere at the origin if the center point is not filled.
+ AttributeSelectionPtr aCenterPoint =
+ data()->selection(PrimitivesPlugin_Sphere::CENTER_POINT_ID());
+ if (!aCenterPoint->isInitialized()) {
+ ObjectPtr aPointObj = ModelAPI_Session::get()->moduleDocument()
+ ->objectByName(ModelAPI_ResultConstruction::group(), "Origin");
+ if (aPointObj.get()) {
+ ResultPtr aPointRes = std::dynamic_pointer_cast<ModelAPI_Result>(aPointObj);
+ aCenterPoint->setValue(aPointRes, std::shared_ptr<GeomAPI_Shape>());
+ }
+ }
+}
+
+//=================================================================================================
+void PrimitivesPlugin_Sphere::execute()
+{
+ // Getting point.
+ std::shared_ptr<GeomAPI_Pnt> aCenterPoint;
+ std::shared_ptr<ModelAPI_AttributeSelection> aPointRef =
+ selection(PrimitivesPlugin_Sphere::CENTER_POINT_ID());
+ if (aPointRef.get() != NULL) {
+ GeomShapePtr aShape1 = aPointRef->value();
+ if (!aShape1.get()) {
+ aShape1 = aPointRef->context()->shape();
+ }
+ if (aShape1) {
+ aCenterPoint = GeomAlgoAPI_PointBuilder::point(aShape1);
+ }
+ }
+
+ // Getting radius
+ double aRadius = real(PrimitivesPlugin_Sphere::RADIUS_ID())->value();
+
+ std::shared_ptr<GeomAlgoAPI_Sphere> aSphereAlgo =
+ std::shared_ptr<GeomAlgoAPI_Sphere>(new GeomAlgoAPI_Sphere(aCenterPoint, aRadius));
+
+ // These checks should be made to the GUI for the feature but
+ // the corresponding validator does not exist yet.
+ if (!aSphereAlgo->check()) {
+ setError(aSphereAlgo->getError());
+ return;
+ }
+
+ // Build the sphere
+ aSphereAlgo->build();
+
+ // Check if the creation of the cylinder
+ if(!aSphereAlgo->isDone()) {
+ setError(aSphereAlgo->getError());
+ return;
+ }
+ if(!aSphereAlgo->checkValid("Sphere builder")) {
+ setError(aSphereAlgo->getError());
+ return;
+ }
+
+ int aResultIndex = 0;
+ ResultBodyPtr aResultBox = document()->createBody(data(), aResultIndex);
+ loadNamingDS(aSphereAlgo, aResultBox);
+ setResult(aResultBox, aResultIndex);
+}
+
+//=================================================================================================
+void PrimitivesPlugin_Sphere::loadNamingDS(std::shared_ptr<GeomAlgoAPI_Sphere> theSphereAlgo,
+ std::shared_ptr<ModelAPI_ResultBody> theResultSphere)
+{
+ // Load the result
+ theResultSphere->store(theSphereAlgo->shape());
+
+ // Prepare the naming
+ theSphereAlgo->prepareNamingFaces();
+
+ // Insert to faces
+ int num = 1;
+ std::map< std::string, std::shared_ptr<GeomAPI_Shape> > listOfFaces =
+ theSphereAlgo->getCreatedFaces();
+ for (std::map< std::string, std::shared_ptr<GeomAPI_Shape> >::iterator
+ it=listOfFaces.begin(); it!=listOfFaces.end(); ++it) {
+ std::shared_ptr<GeomAPI_Shape> aFace = (*it).second;
+ theResultSphere->generated(aFace, (*it).first, num++);
+ }
+}
--- /dev/null
+// Copyright (C) 2014-201x CEA/DEN, EDF R&D
+
+// File: PrimitivesPlugin_Sphere.h
+// Created: 15 Mar 2017
+// Author: Clarisse Genrault (CEA)
+
+#ifndef PRIMITIVESPLUGIN_SPHERE_H_
+#define PRIMITIVESPLUGIN_SPHERE_H_
+
+#include <PrimitivesPlugin.h>
+#include <ModelAPI_Feature.h>
+#include <GeomAlgoAPI_Sphere.h>
+
+/**\class PrimitivesPlugin_Sphere
+ * \ingroup Plugins
+ * \brief Feature for creation of a sphere.
+ *
+ * Creates a sphere from a radius and a center point defaulting to the origin
+ */
+class PrimitivesPlugin_Sphere : public ModelAPI_Feature
+{
+ public:
+ /// Sphere kind
+ inline static const std::string& ID()
+ {
+ static const std::string MY_SPHERE_ID("Sphere");
+ return MY_SPHERE_ID;
+ }
+
+ /// Attribute name of the base point
+ inline static const std::string& CENTER_POINT_ID()
+ {
+ static const std::string MY_CENTER_POINT_ID("center_point");
+ return MY_CENTER_POINT_ID;
+ }
+
+ /// Attribute name of the radius
+ inline static const std::string& RADIUS_ID()
+ {
+ static const std::string MY_RADIUS_ID("radius");
+ return MY_RADIUS_ID;
+ }
+
+ /// Returns the kind of a feature
+ PRIMITIVESPLUGIN_EXPORT virtual const std::string& getKind()
+ {
+ static std::string MY_KIND = PrimitivesPlugin_Sphere::ID();
+ return MY_KIND;
+ }
+
+ /// Creates a new part document if needed
+ PRIMITIVESPLUGIN_EXPORT virtual void execute();
+
+ /// Request for initialization of data model of the feature: adding all attributes
+ PRIMITIVESPLUGIN_EXPORT virtual void initAttributes();
+
+ /// Use plugin manager for features creation
+ PrimitivesPlugin_Sphere();
+
+ private:
+ /// Load Naming data structure of the feature to the document
+ void loadNamingDS(std::shared_ptr<GeomAlgoAPI_Sphere> theSphereAlgo,
+ std::shared_ptr<ModelAPI_ResultBody> theResultSphere);
+
+};
+
+#endif // PRIMITIVESPLUGIN_SPHERE_H_
<source path="cylinder_widget.xml"/>
</feature>
</group>
+ <group id="Primitives">
+ <feature id="Sphere" title="Sphere" tooltip="Create a sphere" icon="icons/Primitives/sphere.png">
+ <source path="sphere_widget.xml"/>
+ </feature>
+ </group>
</workbench>
</plugin>
--- /dev/null
+<!-- Copyright (C) 2014-201x CEA/DEN, EDF R&D -->
+
+<source>
+ <shape_selector id="center_point"
+ label="Center point"
+ icon="icons/Primitives/point.png"
+ tooltip="Select a center point"
+ shape_types="vertex">
+ </shape_selector>
+ <doublevalue id="radius"
+ label="Radius"
+ icon="icons/Primitives/radius.png"
+ tooltip="Enter a radius"
+ step="1."
+ default="10.">
+ </doublevalue>
+</source>
\ No newline at end of file
"""Package for Primitives plugin for the Parametric Geometry API of the Modeler.
"""
-from PrimitivesAPI import addBox, addCylinder
+from PrimitivesAPI import addBox, addCylinder, addSphere