X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPrimitivesAPI%2FPrimitivesAPI_Sphere.h;h=6991210209a663a7053a7db61e467bd58d2808e7;hb=06e7f5859095193fc7f498bd89a7d28009794f53;hp=57197dfa32787f1e277a6003f38f9ead3a21fef0;hpb=97917d3698f5a2f7fc9596e7c755ff8f6751e373;p=modules%2Fshaper.git diff --git a/src/PrimitivesAPI/PrimitivesAPI_Sphere.h b/src/PrimitivesAPI/PrimitivesAPI_Sphere.h index 57197dfa3..699121020 100644 --- a/src/PrimitivesAPI/PrimitivesAPI_Sphere.h +++ b/src/PrimitivesAPI/PrimitivesAPI_Sphere.h @@ -1,4 +1,4 @@ -// Copyright (C) 2017-2019 CEA/DEN, EDF R&D +// Copyright (C) 2017-2023 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -50,15 +50,39 @@ public: const ModelHighAPI_Selection& theCenterPoint, const ModelHighAPI_Double& theRadius); + /// Constructor with values. + PRIMITIVESAPI_EXPORT + explicit PrimitivesAPI_Sphere(const std::shared_ptr& theFeature, + const ModelHighAPI_Double& theRMin, + const ModelHighAPI_Double& theRMax, + const ModelHighAPI_Double& thePhiMin, + const ModelHighAPI_Double& thePhiMax, + const ModelHighAPI_Double& theThetaMin, + const ModelHighAPI_Double& theThetaMax); + /// Destructor. PRIMITIVESAPI_EXPORT virtual ~PrimitivesAPI_Sphere(); - INTERFACE_2(PrimitivesPlugin_Sphere::ID(), + INTERFACE_9(PrimitivesPlugin_Sphere::ID(), + creationMethod, PrimitivesPlugin_Sphere::CREATION_METHOD(), + ModelAPI_AttributeString, /** Creation method */, centerPoint, PrimitivesPlugin_Sphere::CENTER_POINT_ID(), ModelAPI_AttributeSelection, /** Center point */, radius, PrimitivesPlugin_Sphere::RADIUS_ID(), - ModelAPI_AttributeDouble, /** Radius */) + ModelAPI_AttributeDouble, /** Radius */, + rmin, PrimitivesPlugin_Sphere::RMIN_ID(), + ModelAPI_AttributeDouble, /** The minimum radius*/, + rmax, PrimitivesPlugin_Sphere::RMAX_ID(), + ModelAPI_AttributeDouble, /** The maximum radius*/, + phimin, PrimitivesPlugin_Sphere::PHIMIN_ID(), + ModelAPI_AttributeDouble, /** The minimum phi*/, + phimax, PrimitivesPlugin_Sphere::PHIMAX_ID(), + ModelAPI_AttributeDouble, /** The maximum phi*/, + thetamin, PrimitivesPlugin_Sphere::THETAMIN_ID(), + ModelAPI_AttributeDouble, /** The minimum theta*/, + thetamax,PrimitivesPlugin_Sphere::THETAMAX_ID(), + ModelAPI_AttributeDouble, /** The maximum theta*/) /// Set center point PRIMITIVESAPI_EXPORT @@ -68,6 +92,18 @@ public: PRIMITIVESAPI_EXPORT void setRadius(const ModelHighAPI_Double& theRadius); + /// Set minimum and maximum radius + PRIMITIVESAPI_EXPORT + void setRadius(const ModelHighAPI_Double& theRMin, const ModelHighAPI_Double& theRMax); + + /// Set minimum and maximum phi + PRIMITIVESAPI_EXPORT + void setPhi(const ModelHighAPI_Double& thePhiMin, const ModelHighAPI_Double& thePhiMax); + + /// Set minimum and maximum theta + PRIMITIVESAPI_EXPORT + void setTheta(const ModelHighAPI_Double& theThetaMin, const ModelHighAPI_Double& theThetaMax); + /// Dump wrapped feature PRIMITIVESAPI_EXPORT virtual void dump(ModelHighAPI_Dumper& theDumper) const; @@ -89,4 +125,15 @@ PRIMITIVESAPI_EXPORT SpherePtr addSphere(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRadius); +/// \ingroup CPPHighAPI +/// \brief Create primitive Sphere feature. +PRIMITIVESAPI_EXPORT +SpherePtr addSphere(const std::shared_ptr& thePart, + const ModelHighAPI_Double& theRMin, + const ModelHighAPI_Double& theRMax, + const ModelHighAPI_Double& thePhiMin, + const ModelHighAPI_Double& thePhiMax, + const ModelHighAPI_Double& theThetaMin, + const ModelHighAPI_Double& theThetaMax); + #endif // PRIMITIVESAPI_SPHERE_H_