// Created: 30 May 2014
// Author: Vitaly SMETANNIKOV
-#include "FeaturesPlugin_Extrusion.h"
+#include <FeaturesPlugin_Extrusion.h>
+
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
#include <ModelAPI_Document.h>
#include <ModelAPI_AttributeBoolean.h>
#include <ModelAPI_AttributeString.h>
#include <ModelAPI_AttributeReference.h>
-#include <GeomAlgoAPI_Extrusion.h>
-#include <GeomAlgoAPI_FaceBuilder.h>
+
#include <GeomAlgoAPI_Prism.h>
-using namespace std;
#define _LATERAL_TAG 1
#define _FIRST_TAG 2
#define _LAST_TAG 3
#define EDGE 6
+//=================================================================================================
FeaturesPlugin_Extrusion::FeaturesPlugin_Extrusion()
{
}
+//=================================================================================================
void FeaturesPlugin_Extrusion::initAttributes()
{
AttributeSelectionListPtr aSelection =
std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
- FeaturesPlugin_Extrusion::LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
+ LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
// extrusion works with faces always
aSelection->setSelectionType("FACE");
- data()->addAttribute(FeaturesPlugin_Extrusion::TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
+
+ data()->addAttribute(TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FeaturesPlugin_Extrusion::TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_Extrusion::TO_OBJECT_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), TO_OBJECT_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
}
+//=================================================================================================
void FeaturesPlugin_Extrusion::execute()
{
- AttributeSelectionListPtr aFaceRefs = selectionList(FeaturesPlugin_Extrusion::LIST_ID());
+ AttributeSelectionListPtr aFaceRefs = selectionList(LIST_ID());
+
+ // Getting sizes.
+ double aFromSize = real(FROM_SIZE_ID())->value();
+ double aToSize = real(TO_SIZE_ID())->value();
// Getting bounding planes.
std::shared_ptr<GeomAPI_Shape> aFromShape;
std::shared_ptr<GeomAPI_Shape> aToShape;
- std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FeaturesPlugin_Extrusion::FROM_OBJECT_ID());
- if(anObjRef.get() != NULL) {
- aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
- aFromShape = anObjRef->context()->shape();
+ if(string(CREATION_METHOD())->value() == "ByPlanesAndOffsets") {
+ std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FROM_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aFromShape = anObjRef->context()->shape();
+ }
}
- }
- anObjRef = selection(FeaturesPlugin_Extrusion::TO_OBJECT_ID());
- if(anObjRef.get() != NULL) {
- aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
- aToShape = anObjRef->context()->shape();
+ anObjRef = selection(TO_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aToShape = anObjRef->context()->shape();
+ }
}
}
- // Getting sizes.
- double aFromSize = real(FeaturesPlugin_Extrusion::FROM_SIZE_ID())->value();
- double aToSize = real(FeaturesPlugin_Extrusion::TO_SIZE_ID())->value();
-
// for each selected face generate a result
int anIndex = 0, aResultIndex = 0;
for(; anIndex < aFaceRefs->size(); anIndex++) {
aBaseShape = std::dynamic_pointer_cast<GeomAPI_Shape>(aConstruction->face(aFaceIndex));
}
- GeomAlgoAPI_Prism aFeature(aBaseShape, aFromShape, aFromSize, aToShape, aToSize);
+ GeomAlgoAPI_Prism aFeature(aBaseShape, aToShape, aToSize, aFromShape, aFromSize);
if(!aFeature.isDone()) {
static const std::string aFeatureError = "Extrusion algorithm failed";
setError(aFeatureError);
removeResults(aResultIndex);
}
-//============================================================================
+//=================================================================================================
void FeaturesPlugin_Extrusion::LoadNamingDS(GeomAlgoAPI_Prism& theFeature,
std::shared_ptr<ModelAPI_ResultBody> theResultBody,
std::shared_ptr<GeomAPI_Shape> theBasis,
return MY_TO_OBJECT_ID;
}
+ /// attribute name for creation method
+ inline static const std::string& CREATION_METHOD()
+ {
+ static const std::string METHOD_ATTR("CreationMethod");
+ return METHOD_ATTR;
+ }
+
/// attribute name of extrusion size
inline static const std::string& TO_SIZE_ID()
{
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeString.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
//=================================================================================================
void FeaturesPlugin_ExtrusionBoolean::initMakeSolidsAttributes()
{
- data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(TO_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_SIZE_ID(), ModelAPI_AttributeDouble::typeId());
+
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), TO_OBJECT_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
}
//=================================================================================================
ListOfShape FeaturesPlugin_ExtrusionBoolean::MakeSolids(const ListOfShape& theFaces)
{
+ // Getting extrusion sizes.
+ double aFromSize = real(FROM_SIZE_ID())->value();
+ double aToSize = real(TO_SIZE_ID())->value();
+
// Getting extrusion bounding planes.
std::shared_ptr<GeomAPI_Shape> aFromShape;
std::shared_ptr<GeomAPI_Shape> aToShape;
- std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FROM_OBJECT_ID());
- if(anObjRef.get() != NULL) {
- aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
- aFromShape = anObjRef->context()->shape();
+
+ if(string(CREATION_METHOD())->value() == "ByPlanesAndOffsets") {
+ std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FROM_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aFromShape = anObjRef->context()->shape();
+ }
}
- }
- anObjRef = selection(TO_OBJECT_ID());
- if(anObjRef.get() != NULL) {
- aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
- aToShape = anObjRef->context()->shape();
+ anObjRef = selection(TO_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aToShape = anObjRef->context()->shape();
+ }
}
}
- // Getting extrusion sizes.
- double aFromSize = real(FROM_SIZE_ID())->value();
- double aToSize = real(TO_SIZE_ID())->value();
-
// Extrude faces.
ListOfShape anExtrusionList;
for(ListOfShape::const_iterator aFacesIt = theFaces.begin(); aFacesIt != theFaces.end(); aFacesIt++) {
std::shared_ptr<GeomAPI_Shape> aBaseShape = *aFacesIt;
- GeomAlgoAPI_Prism aPrismAlgo(aBaseShape, aFromShape, aFromSize, aToShape, aToSize);
+ GeomAlgoAPI_Prism aPrismAlgo(aBaseShape, aToShape, aToSize, aFromShape, aFromSize);
// Checking that the algorithm worked properly.
if(!aPrismAlgo.isDone() || aPrismAlgo.shape()->isNull() || !aPrismAlgo.isValid()) {
class FeaturesPlugin_ExtrusionBoolean : public FeaturesPlugin_CompositeBoolean
{
public:
+
+ /// attribute name for creation method
+ inline static const std::string& CREATION_METHOD()
+ {
+ static const std::string METHOD_ATTR("CreationMethod");
+ return METHOD_ATTR;
+ }
+
/// Attribute name of an object from which the extrusion grows.
inline static const std::string& FROM_OBJECT_ID()
{
#include <FeaturesPlugin_Revolution.h>
-#include <GeomAlgoAPI_FaceBuilder.h>
-#include <GeomAlgoAPI_Rotation.h>
-#include <GeomAPI_Ax3.h>
-#include <GeomAPI_Edge.h>
-#include <GeomAPI_Lin.h>
-#include <GeomAPI_Pln.h>
-#include <GeomAPI_XYZ.h>
-
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeSelectionList.h>
+#include <ModelAPI_AttributeString.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
#include <ModelAPI_ResultConstruction.h>
#include <ModelAPI_ResultBody.h>
+#include <GeomAPI_Edge.h>
+#include <GeomAPI_Lin.h>
+
#define FACE 4
#define EDGE 6
#define _LATERAL_TAG 1
{
AttributeSelectionListPtr aSelection =
std::dynamic_pointer_cast<ModelAPI_AttributeSelectionList>(data()->addAttribute(
- FeaturesPlugin_Revolution::LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
+ LIST_ID(), ModelAPI_AttributeSelectionList::typeId()));
// revolution works with faces always
aSelection->setSelectionType("FACE");
- data()->addAttribute(FeaturesPlugin_Revolution::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
- data()->addAttribute(FeaturesPlugin_Revolution::FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FeaturesPlugin_Revolution::FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(FeaturesPlugin_Revolution::TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FeaturesPlugin_Revolution::TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_Revolution::FROM_OBJECT_ID());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FeaturesPlugin_Revolution::TO_OBJECT_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), TO_OBJECT_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
}
//=================================================================================================
void FeaturesPlugin_Revolution::execute()
{
- AttributeSelectionListPtr aFaceRefs = selectionList(FeaturesPlugin_Revolution::LIST_ID());
+ AttributeSelectionListPtr aFaceRefs = selectionList(LIST_ID());
//Getting axis.
std::shared_ptr<GeomAPI_Ax1> anAxis;
std::shared_ptr<GeomAPI_Edge> anEdge;
- std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FeaturesPlugin_Revolution::AXIS_OBJECT_ID());
+ std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(AXIS_OBJECT_ID());
if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
- anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
+ anEdge = std::make_shared<GeomAPI_Edge>(anObjRef->value());
+ } else if(anObjRef->context() && anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
+ anEdge = std::make_shared<GeomAPI_Edge>(anObjRef->context()->shape());
}
if(anEdge) {
- anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(), anEdge->line()->direction()));
+ anAxis = std::make_shared<GeomAPI_Ax1>(anEdge->line()->location(), anEdge->line()->direction());
}
- // Getting bounding planes.
- std::shared_ptr<GeomAPI_Shape> aFromShape(new GeomAPI_Shape());
- std::shared_ptr<GeomAPI_Shape> aToShape(new GeomAPI_Shape());
+ // Getting angles.
+ double aFromAngle = real(FROM_ANGLE_ID())->value();
+ double aToAngle = real(TO_ANGLE_ID())->value();
- anObjRef = selection(FeaturesPlugin_Revolution::FROM_OBJECT_ID());
- if(anObjRef) {
- aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- }
- anObjRef = selection(FeaturesPlugin_Revolution::TO_OBJECT_ID());
- if(anObjRef) {
- aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ // Getting bounding planes.
+ std::shared_ptr<GeomAPI_Shape> aFromShape;
+ std::shared_ptr<GeomAPI_Shape> aToShape;
+
+ if(string(CREATION_METHOD())->value() == "ByPlanesAndOffsets") {
+ anObjRef = selection(FROM_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aFromShape = anObjRef->context()->shape();
+ }
+ }
+ anObjRef = selection(TO_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aToShape = anObjRef->context()->shape();
+ }
+ }
}
- // Getting angles.
- double aFromAngle = real(FeaturesPlugin_Revolution::FROM_ANGLE_ID())->value();
- double aToAngle = real(FeaturesPlugin_Revolution::TO_ANGLE_ID())->value();
-
// for each selected face generate a result
int anIndex = 0, aResultIndex = 0;
for(; anIndex < aFaceRefs->size(); anIndex++) {
aBaseShape = std::dynamic_pointer_cast<GeomAPI_Shape>(aConstruction->face(aFaceIndex));
}
- GeomAlgoAPI_Revolution aFeature(aBaseShape, anAxis, aFromShape, aFromAngle, aToShape, aToAngle);
+ GeomAlgoAPI_Revolution aFeature(aBaseShape, anAxis, aToShape, aToAngle, aFromShape, aFromAngle);
if(!aFeature.isDone()) {
static const std::string aFeatureError = "Revolution algorithm failed";
setError(aFeatureError);
return MY_AXIS_ID;
}
+ /// attribute name for creation method
+ inline static const std::string& CREATION_METHOD()
+ {
+ static const std::string METHOD_ATTR("CreationMethod");
+ return METHOD_ATTR;
+ }
+
/// Attribute name of revolution angle.
inline static const std::string& TO_ANGLE_ID()
{
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeSelection.h>
+#include <ModelAPI_AttributeString.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_Validator.h>
{
data()->addAttribute(FeaturesPlugin_RevolutionBoolean::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
- data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
data()->addAttribute(TO_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
data()->addAttribute(TO_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
- ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
+ data()->addAttribute(FROM_OBJECT_ID(), ModelAPI_AttributeSelection::typeId());
+ data()->addAttribute(FROM_ANGLE_ID(), ModelAPI_AttributeDouble::typeId());
+
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), TO_OBJECT_ID());
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), FROM_OBJECT_ID());
}
//=================================================================================================
std::shared_ptr<ModelAPI_AttributeSelection> anObjRef = selection(FeaturesPlugin_RevolutionBoolean::AXIS_OBJECT_ID());
if(anObjRef && anObjRef->value() && anObjRef->value()->isEdge()) {
anEdge = std::shared_ptr<GeomAPI_Edge>(new GeomAPI_Edge(anObjRef->value()));
+ } else if(anObjRef->context() && anObjRef->context()->shape() && anObjRef->context()->shape()->isEdge()) {
+ anEdge = std::make_shared<GeomAPI_Edge>(anObjRef->context()->shape());
}
if(anEdge) {
anAxis = std::shared_ptr<GeomAPI_Ax1>(new GeomAPI_Ax1(anEdge->line()->location(), anEdge->line()->direction()));
}
+ // Getting revolution angles.
+ double aFromAngle = real(FROM_ANGLE_ID())->value();
+ double aToAngle = real(TO_ANGLE_ID())->value();
+
// Getting revolution bounding planes.
std::shared_ptr<GeomAPI_Shape> aFromShape;
std::shared_ptr<GeomAPI_Shape> aToShape;
- anObjRef = selection(FROM_OBJECT_ID());
- if(anObjRef.get() != NULL) {
- aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
- aFromShape = anObjRef->context()->shape();
+
+ if(string(CREATION_METHOD())->value() == "ByPlanesAndOffsets") {
+ anObjRef = selection(FROM_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aFromShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aFromShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aFromShape = anObjRef->context()->shape();
+ }
}
- }
- anObjRef = selection(TO_OBJECT_ID());
- if(anObjRef.get() != NULL) {
- aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
- if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
- aToShape = anObjRef->context()->shape();
+ anObjRef = selection(TO_OBJECT_ID());
+ if(anObjRef.get() != NULL) {
+ aToShape = std::dynamic_pointer_cast<GeomAPI_Shape>(anObjRef->value());
+ if(aToShape.get() == NULL && anObjRef->context().get() != NULL) {
+ aToShape = anObjRef->context()->shape();
+ }
}
}
- // Getting revolution angles.
- double aFromAngle = real(FROM_ANGLE_ID())->value();
- double aToAngle = real(TO_ANGLE_ID())->value();
-
// Revol faces.
ListOfShape aRevolutionList;
for(ListOfShape::const_iterator aFacesIt = theFaces.begin(); aFacesIt != theFaces.end(); aFacesIt++) {
std::shared_ptr<GeomAPI_Shape> aBaseShape = *aFacesIt;
- GeomAlgoAPI_Revolution aRevolAlgo(aBaseShape, anAxis, aFromShape, aFromAngle, aToShape, aToAngle);
+ GeomAlgoAPI_Revolution aRevolAlgo(aBaseShape, anAxis, aToShape, aToAngle, aFromShape, aFromAngle);
// Checking that the algorithm worked properly.
if(!aRevolAlgo.isDone() || aRevolAlgo.shape()->isNull() || !aRevolAlgo.isValid()) {
return MY_AXIS_ID;
}
+ /// attribute name for creation method
+ inline static const std::string& CREATION_METHOD()
+ {
+ static const std::string METHOD_ATTR("CreationMethod");
+ return METHOD_ATTR;
+ }
+
/// Attribute name of an object from which the revolution grows.
inline static const std::string& FROM_OBJECT_ID()
{
type_choice="Faces Compound">
<validator id="PartSet_SketchEntityValidator" parameters="Sketch"/>
</multi_selector>
- <groupbox title="From">
- <shape_selector id="from_object"
- icon=":icons/plane.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue
- id="from_size"
- label="Size"
- min="0"
- step="1.0"
- default="0"
- icon=":icons/dimension_down.png"
- tooltip="Height">
- </doublevalue>
- </groupbox>
- <groupbox title="To">
- <shape_selector id="to_object"
- icon=":icons/plane_inverted.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue
- id="to_size"
- label="Size"
- min="0"
- step="1.0"
- default="10"
- icon=":icons/dimension_up.png"
- tooltip="Height">
- </doublevalue>
- </groupbox>
+ <toolbox id="CreationMethod">
+ <box id="ByOffsets" title="By offsets">
+ <groupbox>
+ <doublevalue
+ id="to_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="10"
+ icon=":icons/dimension_up.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ <groupbox>
+ <doublevalue
+ id="from_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/dimension_down.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ </box>
+ <box id="ByPlanesAndOffsets" title="By bounding planes and offsets">
+ <groupbox title="To">
+ <shape_selector id="to_object"
+ icon=":icons/plane_inverted.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue
+ id="to_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="10"
+ icon=":icons/dimension_up.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ <groupbox title="From">
+ <shape_selector id="from_object"
+ icon=":icons/plane.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue
+ id="from_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/dimension_down.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ </box>
+ </toolbox>
<validator id="GeomValidators_ZeroOffset" parameters="from_object,to_object,from_size,to_size"/>
</source>
<sketch_launcher id="sketch"
label="Sketch"
icon=":icons/sketch.png"
- tooltip="Create or edit a sketch">/>
+ tooltip="Create or edit a sketch">
</sketch_launcher>
- <groupbox title="From">
- <shape_selector id="from_object"
- icon=":icons/plane.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="from_size" label="Size"
- min="0" step="1.0" default="10"
- icon=":icons/dimension_down.png"
- tooltip="Height">
- </doublevalue>
- </groupbox>
- <groupbox title="To">
- <shape_selector id="to_object"
- icon=":icons/plane_inverted.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="to_size"
- label="Size" min="0" step="1.0" default="0"
- icon=":icons/dimension_up.png"
- tooltip="Height">
- </doublevalue>
- </groupbox>
+ <toolbox id="CreationMethod">
+ <box id="ByOffsets" title="By offsets">
+ <groupbox>
+ <doublevalue
+ id="to_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="10"
+ icon=":icons/dimension_up.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ <groupbox>
+ <doublevalue
+ id="from_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/dimension_down.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ </box>
+ <box id="ByPlanesAndOffsets" title="By bounding planes and offsets">
+ <groupbox title="To">
+ <shape_selector id="to_object"
+ icon=":icons/plane_inverted.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="to_size"
+ label="Size" min="0" step="1.0" default="0"
+ icon=":icons/dimension_up.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ <groupbox title="From">
+ <shape_selector id="from_object"
+ icon=":icons/plane.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="from_size" label="Size"
+ min="0" step="1.0" default="10"
+ icon=":icons/dimension_down.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ </box>
+ </toolbox>
</groupbox>
<multi_selector id="boolean_objects"
label="Cut from:"
<sketch_launcher id="sketch"
label="Sketch"
icon=":icons/sketch.png"
- tooltip="Create or edit a sketch">/>
+ tooltip="Create or edit a sketch">
</sketch_launcher>
- <groupbox title="From">
- <shape_selector id="from_object"
- icon=":icons/plane.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="from_size" label="Size"
- min="0" step="1.0" default="0"
- icon=":icons/dimension_down.png"
- tooltip="Height">
- </doublevalue>
- </groupbox>
- <groupbox title="To">
- <shape_selector id="to_object"
- icon=":icons/plane_inverted.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="to_size"
- label="Size" min="0" step="1.0" default="0"
- icon=":icons/dimension_up.png"
- tooltip="Height">
- </doublevalue>
- </groupbox>
+ <toolbox id="CreationMethod">
+ <box id="ByOffsets" title="By offsets">
+ <groupbox>
+ <doublevalue
+ id="to_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="10"
+ icon=":icons/dimension_up.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ <groupbox>
+ <doublevalue
+ id="from_size"
+ label="Size"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/dimension_down.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ </box>
+ <box id="ByPlanesAndOffsets" title="By bounding planes and offsets">
+ <groupbox title="To">
+ <shape_selector id="to_object"
+ icon=":icons/plane_inverted.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="to_size"
+ label="Size" min="0" step="1.0" default="0"
+ icon=":icons/dimension_up.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ <groupbox title="From">
+ <shape_selector id="from_object"
+ icon=":icons/plane.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="from_size" label="Size"
+ min="0" step="1.0" default="10"
+ icon=":icons/dimension_down.png"
+ tooltip="Size">
+ </doublevalue>
+ </groupbox>
+ </box>
+ </toolbox>
</groupbox>
<multi_selector id="boolean_objects"
label="Fuse with:"
default="">
<validator id="GeomValidators_ShapeType" parameters="line"/>
</shape_selector>
- <groupbox title="From">
- <shape_selector id="from_object"
- icon=":icons/plane.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue
- id="from_angle"
- label="Angle"
- min="0"
- step="1.0"
- default="0"
- icon=":icons/angle_down.png"
- tooltip="Angle">
- </doublevalue>
- </groupbox>
- <groupbox title="To">
- <shape_selector id="to_object"
- icon=":icons/plane_inverted.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue
- id="to_angle"
- label="Angle"
- min="0"
- step="1.0"
- default="360"
- icon=":icons/angle_up.png"
- tooltip="Angle">
- </doublevalue>
- </groupbox>
+ <toolbox id="CreationMethod">
+ <box id="ByOffsets" title="By offsets">
+ <groupbox>
+ <doublevalue
+ id="to_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="360"
+ icon=":icons/angle_up.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ <groupbox>
+ <doublevalue
+ id="from_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/angle_down.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ </box>
+ <box id="ByPlanesAndOffsets" title="By bounding planes and offsets">
+ <groupbox title="To">
+ <shape_selector id="to_object"
+ icon=":icons/plane_inverted.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue
+ id="to_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="360"
+ icon=":icons/angle_up.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ <groupbox title="From">
+ <shape_selector id="from_object"
+ icon=":icons/plane.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<base sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue
+ id="from_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/angle_down.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ </box>
+ </toolbox>
<validator id="GeomValidators_ZeroOffset" parameters="from_object,to_object,from_angle,to_angle"/>
</source>
\ No newline at end of file
<sketch_launcher id="sketch"
label="Sketch"
icon=":icons/sketch.png"
- tooltip="Create or edit a sketch">/>
+ tooltip="Create or edit a sketch">
</sketch_launcher>
<shape_selector id="axis_object"
icon=":icons/axis.png"
default="">
<validator id="GeomValidators_ShapeType" parameters="line"/>
</shape_selector>
- <groupbox title="From">
- <shape_selector id="from_object"
- icon=":icons/plane.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="from_angle" label="Angle"
- min="0" step="1.0" default="0"
- icon=":icons/angle_down.png"
- tooltip="Angle">
- </doublevalue>
- </groupbox>
- <groupbox title="To">
- <shape_selector id="to_object"
- icon=":icons/plane_inverted.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="to_angle" label="Angle"
- min="0" step="1.0" default="0"
- icon=":icons/angle_up.png"
- tooltip="Angle">
- </doublevalue>
- </groupbox>
+ <toolbox id="CreationMethod">
+ <box id="ByOffsets" title="By offsets">
+ <groupbox>
+ <doublevalue
+ id="to_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="360"
+ icon=":icons/angle_up.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ <groupbox>
+ <doublevalue
+ id="from_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/angle_down.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ </box>
+ <box id="ByPlanesAndOffsets" title="By bounding planes and offsets">
+ <groupbox title="To">
+ <shape_selector id="to_object"
+ icon=":icons/plane_inverted.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="to_angle" label="Angle"
+ min="0" step="1.0" default="0"
+ icon=":icons/angle_up.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ <groupbox title="From">
+ <shape_selector id="from_object"
+ icon=":icons/plane.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="from_angle" label="Angle"
+ min="0" step="1.0" default="0"
+ icon=":icons/angle_down.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ </box>
+ </toolbox>
</groupbox>
<multi_selector id="boolean_objects"
label="Cut from:"
<sketch_launcher id="sketch"
label="Sketch"
icon=":icons/sketch.png"
- tooltip="Create or edit a sketch">/>
+ tooltip="Create or edit a sketch">
</sketch_launcher>
<shape_selector id="axis_object"
icon=":icons/axis.png"
default="">
<validator id="GeomValidators_ShapeType" parameters="line"/>
</shape_selector>
- <groupbox title="From">
- <shape_selector id="from_object"
- icon=":icons/plane.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="from_angle" label="Angle"
- min="0" step="1.0" default="0"
- icon=":icons/angle_down.png"
- tooltip="Angle">
- </doublevalue>
- </groupbox>
- <groupbox title="To">
- <shape_selector id="to_object"
- icon=":icons/plane_inverted.png"
- label="Plane face"
- tooltip="Select a planar face"
- shape_types="face"
- default="<sketch>">
- <validator id="GeomValidators_Face" parameters="plane"/>
- </shape_selector>
- <doublevalue id="to_angle" label="Angle"
- min="0" step="1.0" default="0"
- icon=":icons/angle_up.png"
- tooltip="Angle">
- </doublevalue>
- </groupbox>
+ <toolbox id="CreationMethod">
+ <box id="ByOffsets" title="By offsets">
+ <groupbox>
+ <doublevalue
+ id="to_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="360"
+ icon=":icons/angle_up.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ <groupbox>
+ <doublevalue
+ id="from_angle"
+ label="Angle"
+ min="0"
+ step="1.0"
+ default="0"
+ icon=":icons/angle_down.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ </box>
+ <box id="ByPlanesAndOffsets" title="By bounding planes and offsets">
+ <groupbox title="To">
+ <shape_selector id="to_object"
+ icon=":icons/plane_inverted.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="to_angle" label="Angle"
+ min="0" step="1.0" default="0"
+ icon=":icons/angle_up.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ <groupbox title="From">
+ <shape_selector id="from_object"
+ icon=":icons/plane.png"
+ label="Plane face"
+ tooltip="Select a planar face"
+ shape_types="face"
+ default="<sketch>">
+ <validator id="GeomValidators_Face" parameters="plane"/>
+ </shape_selector>
+ <doublevalue id="from_angle" label="Angle"
+ min="0" step="1.0" default="0"
+ icon=":icons/angle_down.png"
+ tooltip="Angle">
+ </doublevalue>
+ </groupbox>
+ </box>
+ </toolbox>
</groupbox>
<multi_selector id="boolean_objects"
label="Fuse with:"
//=================================================================================================
GeomAlgoAPI_Prism::GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBasis,
- double theFromSize,
- double theToSize)
+ double theToSize,
+ double theFromSize)
: myDone(false)
{
- build(theBasis, std::shared_ptr<GeomAPI_Shape>(), theFromSize, std::shared_ptr<GeomAPI_Shape>(), theToSize);
+ build(theBasis, std::shared_ptr<GeomAPI_Shape>(), theToSize, std::shared_ptr<GeomAPI_Shape>(), theFromSize);
}
//=================================================================================================
GeomAlgoAPI_Prism::GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBasis,
- std::shared_ptr<GeomAPI_Shape> theFromShape,
- double theFromSize,
std::shared_ptr<GeomAPI_Shape> theToShape,
- double theToSize)
+ double theToSize,
+ std::shared_ptr<GeomAPI_Shape> theFromShape,
+ double theFromSize)
: myDone(false)
{
- build(theBasis, theFromShape, theFromSize, theToShape, theToSize);
+ build(theBasis, theToShape, theToSize, theFromShape, theFromSize);
}
//=================================================================================================
void GeomAlgoAPI_Prism::build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
- const std::shared_ptr<GeomAPI_Shape>& theFromShape,
- double theFromSize,
const std::shared_ptr<GeomAPI_Shape>& theToShape,
- double theToSize)
+ double theToSize,
+ const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+ double theFromSize)
{
if(!theBasis ||
(((!theFromShape && !theToShape) || (theFromShape && theToShape && theFromShape->isEqual(theToShape)))
public:
/** \brief Creates extrusion for the given shape along the normal for this shape.
* \param[in] theBasis face or wire to be extruded.
- * \param[in] theFromSize offset for "from" plane.
* \param[in] theToSize offset for "to" plane.
+ * \param[in] theFromSize offset for "from" plane.
*/
GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBasis,
- double theFromSize,
- double theToSize);
+ double theToSize,
+ double theFromSize);
/** \brief Creates extrusion for the given shape along the normal for this shape.
* \param[in] theBasis face or wire to be extruded.
- * \param[in] theFromShape bottom bounding shape. Can be empty. In this case offset will be applied to the basis.
- * \param[in] theFromSize offset for "from" plane.
* \param[in] theToShape top bounding shape. Can be empty. In this case offset will be applied to the basis.
* \param[in] theToSize offset for "to" plane.
+ * \param[in] theFromShape bottom bounding shape. Can be empty. In this case offset will be applied to the basis.
+ * \param[in] theFromSize offset for "from" plane.
*/
GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(std::shared_ptr<GeomAPI_Shape> theBasis,
- std::shared_ptr<GeomAPI_Shape> theFromShape,
- double theFromSize,
std::shared_ptr<GeomAPI_Shape> theToShape,
- double theToSize);
+ double theToSize,
+ std::shared_ptr<GeomAPI_Shape> theFromShape,
+ double theFromSize);
/// \return true if algorithm succeed.
GEOMALGOAPI_EXPORT bool isDone() const;
private:
/// Builds resulting shape.
void build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
- const std::shared_ptr<GeomAPI_Shape>& theFromShape,
- double theFromSize,
const std::shared_ptr<GeomAPI_Shape>& theToShape,
- double theToSize);
+ double theToSize,
+ const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+ double theFromSize);
private:
/// Fields.
//=================================================================================================
GeomAlgoAPI_Revolution::GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBasis,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- double theFromAngle,
- double theToAngle)
+ double theToAngle,
+ double theFromAngle)
: myDone(false)
{
- build(theBasis, theAxis, std::shared_ptr<GeomAPI_Shape>(), theFromAngle, std::shared_ptr<GeomAPI_Shape>(), theToAngle);
+ build(theBasis, theAxis, std::shared_ptr<GeomAPI_Shape>(), theToAngle, std::shared_ptr<GeomAPI_Shape>(), theFromAngle);
}
//=================================================================================================
GeomAlgoAPI_Revolution::GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBasis,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- std::shared_ptr<GeomAPI_Shape> theFromShape,
- double theFromAngle,
std::shared_ptr<GeomAPI_Shape> theToShape,
- double theToAngle)
+ double theToAngle,
+ std::shared_ptr<GeomAPI_Shape> theFromShape,
+ double theFromAngle)
: myDone(false)
{
- build(theBasis, theAxis, theFromShape, theFromAngle, theToShape, theToAngle);
+ build(theBasis, theAxis, theToShape, theToAngle, theFromShape, theFromAngle);
}
//=================================================================================================
//=================================================================================================
void GeomAlgoAPI_Revolution::build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
const std::shared_ptr<GeomAPI_Ax1>& theAxis,
- const std::shared_ptr<GeomAPI_Shape>& theFromShape,
- double theFromAngle,
const std::shared_ptr<GeomAPI_Shape>& theToShape,
- double theToAngle)
+ double theToAngle,
+ const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+ double theFromAngle)
{
if(!theBasis || !theAxis ||
(((!theFromShape && !theToShape) || (theFromShape && theToShape && theFromShape->isEqual(theToShape)))
public:
/** \brief Creates revolution for the given shape.
* \param[in] theBasis face for revolution.
- * \param[in] theFromAngle from angle.
* \param[in] theToAngle to angle.
+ * \param[in] theFromAngle from angle.
*/
GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBasis,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- double theFromAngle,
- double theToAngle);
+ double theToAngle,
+ double theFromAngle);
/** \brief Creates revolution for the given shape.
* \param[in] theBasis face for revolution.
- * \param[in] theFromShape from bounding shape. Can be empty. In this case offset will be applied to the basis.
- * \param[in] theFromAngle from angle.
* \param[in] theToShape to bounding shape. Can be empty. In this case offset will be applied to the basis.
* \param[in] theToAngle to angle.
+ * \param[in] theFromShape from bounding shape. Can be empty. In this case offset will be applied to the basis.
+ * \param[in] theFromAngle from angle.
*/
GEOMALGOAPI_EXPORT GeomAlgoAPI_Revolution(std::shared_ptr<GeomAPI_Shape> theBasis,
std::shared_ptr<GeomAPI_Ax1> theAxis,
- std::shared_ptr<GeomAPI_Shape> theFromShape,
- double theFromAngle,
std::shared_ptr<GeomAPI_Shape> theToShape,
- double theToAngle);
+ double theToAngle,
+ std::shared_ptr<GeomAPI_Shape> theFromShape,
+ double theFromAngle);
/// \return true if algorithm succeed.
GEOMALGOAPI_EXPORT const bool isDone() const;
/// Builds resulting shape.
void build(const std::shared_ptr<GeomAPI_Shape>& theBasis,
const std::shared_ptr<GeomAPI_Ax1>& theAxis,
- const std::shared_ptr<GeomAPI_Shape>& theFromShape,
- double theFromAngle,
const std::shared_ptr<GeomAPI_Shape>& theToShape,
- double theToAngle);
+ double theToAngle,
+ const std::shared_ptr<GeomAPI_Shape>& theFromShape,
+ double theFromAngle);
private:
/// Fields.