FeaturesAPI.h
FeaturesAPI_Boolean.h
FeaturesAPI_Extrusion.h
+ FeaturesAPI_ExtrusionBoolean.h
FeaturesAPI_Group.h
FeaturesAPI_Placement.h
FeaturesAPI_Revolution.h
SET(PROJECT_SOURCES
FeaturesAPI_Boolean.cpp
FeaturesAPI_Extrusion.cpp
+ FeaturesAPI_ExtrusionBoolean.cpp
FeaturesAPI_Group.cpp
FeaturesAPI_Placement.cpp
FeaturesAPI_Rotation.cpp
// shared pointers
%shared_ptr(FeaturesAPI_Boolean)
%shared_ptr(FeaturesAPI_Extrusion)
+%shared_ptr(FeaturesAPI_ExtrusionBoolean)
+%shared_ptr(FeaturesAPI_ExtrusionCut)
+%shared_ptr(FeaturesAPI_ExtrusionFuse)
%shared_ptr(FeaturesAPI_Group)
%shared_ptr(FeaturesAPI_Placement)
%shared_ptr(FeaturesAPI_Revolution)
// all supported interfaces
%include "FeaturesAPI_Boolean.h"
%include "FeaturesAPI_Extrusion.h"
+%include "FeaturesAPI_ExtrusionBoolean.h"
%include "FeaturesAPI_Group.h"
%include "FeaturesAPI_Placement.h"
%include "FeaturesAPI_Revolution.h"
virtual ~FeaturesAPI_Extrusion();
INTERFACE_10(FeaturesPlugin_Extrusion::ID(),
- baseObjects, FeaturesPlugin_CompositeSketch::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
+ baseObjects, FeaturesPlugin_Extrusion::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
creationMethod, FeaturesPlugin_Extrusion::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
toSize, FeaturesPlugin_Extrusion::TO_SIZE_ID(), ModelAPI_AttributeDouble, /** To size */,
fromSize, FeaturesPlugin_Extrusion::FROM_SIZE_ID(), ModelAPI_AttributeDouble, /** From size */,
fromObject, FeaturesPlugin_Extrusion::FROM_OBJECT_ID(), ModelAPI_AttributeSelection, /** From object */,
fromOffset, FeaturesPlugin_Extrusion::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */,
direction, FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID(), ModelAPI_AttributeSelection, /** Direction */,
- sketchLauncher, FeaturesPlugin_CompositeSketch::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */)
+ sketchLauncher, FeaturesPlugin_Extrusion::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */)
/// Modify base attribute of the feature.
FEATURESAPI_EXPORT
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
+// File: FeaturesAPI_Extrusion.cpp
+// Created: 09 June 2016
+// Author: Dmitry Bobylev
+
+#include "FeaturesAPI_ExtrusionBoolean.h"
+
+#include <ModelHighAPI_Double.h>
+#include <ModelHighAPI_Tools.h>
+
+//==================================================================================================
+FeaturesAPI_ExtrusionBoolean::FeaturesAPI_ExtrusionBoolean(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: ModelHighAPI_Interface(theFeature)
+{
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionBoolean::~FeaturesAPI_ExtrusionBoolean()
+{
+}
+
+//==================================================================================================
+void FeaturesAPI_ExtrusionBoolean::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
+{
+ fillAttribute(theBaseObjects, mybaseObjects);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_ExtrusionBoolean::setDirection(const ModelHighAPI_Selection& theDirection)
+{
+ fillAttribute(theDirection, mydirection);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_ExtrusionBoolean::setSizes(const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize)
+{
+ fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
+ fillAttribute(theToSize, mytoSize);
+ fillAttribute(theFromSize, myfromSize);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_ExtrusionBoolean::setSize(const ModelHighAPI_Double& theSize)
+{
+ fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_SIZES(), mycreationMethod);
+ fillAttribute(theSize, mytoSize);
+ fillAttribute(ModelHighAPI_Double(), myfromSize);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_ExtrusionBoolean::setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset)
+{
+ fillAttribute(FeaturesPlugin_Extrusion::CREATION_METHOD_BY_PLANES(), mycreationMethod);
+ fillAttribute(theToObject, mytoObject);
+ fillAttribute(theToOffset, mytoOffset);
+ fillAttribute(theFromObject, myfromObject);
+ fillAttribute(theFromOffset, myfromOffset);
+
+ execute();
+}
+
+//==================================================================================================
+void FeaturesAPI_ExtrusionBoolean::setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ fillAttribute(theBooleanObjects, mybooleanObjects);
+
+ execute();
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ initialize();
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theSize, mytoSize);
+ fillAttribute(ModelHighAPI_Double(), myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theDirection, mydirection);
+ fillAttribute(theSize, mytoSize);
+ fillAttribute(ModelHighAPI_Double(), myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theToSize, mytoSize);
+ fillAttribute(theFromSize, myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theDirection, mydirection);
+ fillAttribute(theToSize, mytoSize);
+ fillAttribute(theFromSize, myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theToObject, mytoObject);
+ fillAttribute(theToOffset, mytoOffset);
+ fillAttribute(theFromObject, myfromObject);
+ fillAttribute(theFromOffset, myfromOffset);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionCut::FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theDirection, mydirection);
+ fillAttribute(theToObject, mytoObject);
+ fillAttribute(theToOffset, mytoOffset);
+ fillAttribute(theFromObject, myfromObject);
+ fillAttribute(theFromOffset, myfromOffset);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+// TODO(spo): make add* as static functions of the class
+//==================================================================================================
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
+ return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theSize, theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
+ return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
+ return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
+ return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
+ theBaseObjects,
+ theDirection,
+ theToSize,
+ theFromSize,
+ theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
+ return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
+ theBaseObjects,
+ theToObject,
+ theToOffset,
+ theFromObject,
+ theFromOffset,
+ theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionCut::ID());
+ return ExtrusionCutPtr(new FeaturesAPI_ExtrusionCut(aFeature,
+ theBaseObjects,
+ theDirection,
+ theToObject,
+ theToOffset,
+ theFromObject,
+ theFromOffset,
+ theBooleanObjects));
+}
+
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ initialize();
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theSize, mytoSize);
+ fillAttribute(ModelHighAPI_Double(), myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theDirection, mydirection);
+ fillAttribute(theSize, mytoSize);
+ fillAttribute(ModelHighAPI_Double(), myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theToSize, mytoSize);
+ fillAttribute(theFromSize, myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theDirection, mydirection);
+ fillAttribute(theToSize, mytoSize);
+ fillAttribute(theFromSize, myfromSize);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theToObject, mytoObject);
+ fillAttribute(theToOffset, mytoOffset);
+ fillAttribute(theFromObject, myfromObject);
+ fillAttribute(theFromOffset, myfromOffset);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+//==================================================================================================
+FeaturesAPI_ExtrusionFuse::FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+: FeaturesAPI_ExtrusionBoolean(theFeature)
+{
+ if(initialize()) {
+ fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theDirection, mydirection);
+ fillAttribute(theToObject, mytoObject);
+ fillAttribute(theToOffset, mytoOffset);
+ fillAttribute(theFromObject, myfromObject);
+ fillAttribute(theFromOffset, myfromOffset);
+ setBooleanObjects(theBooleanObjects);
+ }
+}
+
+// TODO(spo): make add* as static functions of the class
+//==================================================================================================
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
+ return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theSize, theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
+ return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theDirection, theSize, theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
+ return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature, theBaseObjects, theToSize, theFromSize, theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
+ return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
+ theBaseObjects,
+ theDirection,
+ theToSize,
+ theFromSize,
+ theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
+ return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
+ theBaseObjects,
+ theToObject,
+ theToOffset,
+ theFromObject,
+ theFromOffset,
+ theBooleanObjects));
+}
+
+//==================================================================================================
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesPlugin_ExtrusionFuse::ID());
+ return ExtrusionFusePtr(new FeaturesAPI_ExtrusionFuse(aFeature,
+ theBaseObjects,
+ theDirection,
+ theToObject,
+ theToOffset,
+ theFromObject,
+ theFromOffset,
+ theBooleanObjects));
+}
--- /dev/null
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
+// File: FeaturesAPI_ExtrusionBoolean.h
+// Created: 09 June 2016
+// Author: Dmitry Bobylev
+
+#ifndef FeaturesAPI_ExtrusionBoolean_H_
+#define FeaturesAPI_ExtrusionBoolean_H_
+
+#include "FeaturesAPI.h"
+
+#include <FeaturesPlugin_CompositeBoolean.h>
+#include <FeaturesPlugin_ExtrusionCut.h>
+#include <FeaturesPlugin_ExtrusionFuse.h>
+
+#include <ModelHighAPI_Interface.h>
+#include <ModelHighAPI_Macro.h>
+
+class ModelHighAPI_Double;
+class ModelHighAPI_Selection;
+
+/// \class FeaturesAPI_ExtrusionBoolean
+/// \ingroup CPPHighAPI
+/// \brief Interface for ExtrusionBoolean feature.
+class FeaturesAPI_ExtrusionBoolean: public ModelHighAPI_Interface
+{
+public:
+ /// Destructor.
+ FEATURESAPI_EXPORT
+ virtual ~FeaturesAPI_ExtrusionBoolean();
+
+ INTERFACE_11("",
+ sketchLauncher, FeaturesPlugin_Extrusion::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */,
+ baseObjects, FeaturesPlugin_Extrusion::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
+ direction, FeaturesPlugin_Extrusion::DIRECTION_OBJECT_ID(), ModelAPI_AttributeSelection, /** Direction */,
+ creationMethod, FeaturesPlugin_Extrusion::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
+ toSize, FeaturesPlugin_Extrusion::TO_SIZE_ID(), ModelAPI_AttributeDouble, /** To size */,
+ fromSize, FeaturesPlugin_Extrusion::FROM_SIZE_ID(), ModelAPI_AttributeDouble, /** From size */,
+ toObject, FeaturesPlugin_Extrusion::TO_OBJECT_ID(), ModelAPI_AttributeSelection, /** To object */,
+ toOffset, FeaturesPlugin_Extrusion::TO_OFFSET_ID(), ModelAPI_AttributeDouble, /** To offset */,
+ fromObject, FeaturesPlugin_Extrusion::FROM_OBJECT_ID(), ModelAPI_AttributeSelection, /** From object */,
+ fromOffset, FeaturesPlugin_Extrusion::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */,
+ booleanObjects, FeaturesPlugin_CompositeBoolean::OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Boolean objects */)
+
+ /// Modify base attribute of the feature.
+ FEATURESAPI_EXPORT
+ void setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects);
+
+ /// Modify direction_object attribute of the feature.
+ FEATURESAPI_EXPORT
+ void setDirection(const ModelHighAPI_Selection& theDirection);
+
+ /// Modify CreationMethod, to_size, from_size attributes of the feature.
+ FEATURESAPI_EXPORT
+ void setSizes(const ModelHighAPI_Double& theToSize, const ModelHighAPI_Double& theFromSize);
+
+ /// Modify creation_method, to_size, from_size attributes of the feature.
+ FEATURESAPI_EXPORT
+ void setSize(const ModelHighAPI_Double& theSize);
+
+ /// Modify creation_method, to_object, to_offset, from_object, from_offset attributes of the feature.
+ FEATURESAPI_EXPORT
+ void setPlanesAndOffsets(const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset);
+
+ /// Modiyfy main_objects attribute of the feature.
+ FEATURESAPI_EXPORT
+ void setBooleanObjects(const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+protected:
+ /// Constructor without values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionBoolean(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+};
+
+class FeaturesAPI_ExtrusionCut: public FeaturesAPI_ExtrusionBoolean
+{
+public:
+ FEATURESAPI_EXPORT
+ virtual std::string getID() {
+ return FeaturesPlugin_ExtrusionCut::ID();
+ }
+
+ /// Constructor without values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionCut(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+};
+
+/// Pointer on ExtrusionCut object.
+typedef std::shared_ptr<FeaturesAPI_ExtrusionCut> ExtrusionCutPtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionCut feature.
+FEATURESAPI_EXPORT
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionCut feature.
+FEATURESAPI_EXPORT
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionCut feature.
+FEATURESAPI_EXPORT
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionCut feature.
+FEATURESAPI_EXPORT
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionCut feature.
+FEATURESAPI_EXPORT
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionCut feature.
+FEATURESAPI_EXPORT
+ExtrusionCutPtr addExtrusionCut(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+class FeaturesAPI_ExtrusionFuse: public FeaturesAPI_ExtrusionBoolean
+{
+public:
+ FEATURESAPI_EXPORT
+ virtual std::string getID() {
+ return FeaturesPlugin_ExtrusionFuse::ID();
+ }
+
+ /// Constructor without values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+ /// Constructor with values.
+ FEATURESAPI_EXPORT
+ explicit FeaturesAPI_ExtrusionFuse(const std::shared_ptr<ModelAPI_Feature>& theFeature,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+};
+
+/// Pointer on ExtrusionFuse object.
+typedef std::shared_ptr<FeaturesAPI_ExtrusionFuse> ExtrusionFusePtr;
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionFuse feature.
+FEATURESAPI_EXPORT
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionFuse feature.
+FEATURESAPI_EXPORT
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionFuse feature.
+FEATURESAPI_EXPORT
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionFuse feature.
+FEATURESAPI_EXPORT
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Double& theToSize,
+ const ModelHighAPI_Double& theFromSize,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionFuse feature.
+FEATURESAPI_EXPORT
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+/// \ingroup CPPHighAPI
+/// \brief Create ExtrusionFuse feature.
+FEATURESAPI_EXPORT
+ExtrusionFusePtr addExtrusionFuse(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const ModelHighAPI_Selection& theDirection,
+ const ModelHighAPI_Selection& theToObject,
+ const ModelHighAPI_Double& theToOffset,
+ const ModelHighAPI_Selection& theFromObject,
+ const ModelHighAPI_Double& theFromOffset,
+ const std::list<ModelHighAPI_Selection>& theBooleanObjects);
+
+#endif // FeaturesAPI_ExtrusionBoolean_H_
virtual ~FeaturesAPI_Revolution();
INTERFACE_10(FeaturesPlugin_Revolution::ID(),
- baseObjects, FeaturesPlugin_CompositeSketch::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
+ baseObjects, FeaturesPlugin_Revolution::BASE_OBJECTS_ID(), ModelAPI_AttributeSelectionList, /** Base objects */,
axis, FeaturesPlugin_Revolution::AXIS_OBJECT_ID(), ModelAPI_AttributeSelection, /** Axis */,
creationMethod, FeaturesPlugin_Revolution::CREATION_METHOD(), ModelAPI_AttributeString, /** Creation method */,
toAngle, FeaturesPlugin_Revolution::TO_ANGLE_ID(), ModelAPI_AttributeDouble, /** To angle */,
toOffset, FeaturesPlugin_Revolution::TO_OFFSET_ID(), ModelAPI_AttributeDouble, /** To offset */,
fromObject, FeaturesPlugin_Revolution::FROM_OBJECT_ID(), ModelAPI_AttributeSelection, /** From object */,
fromOffset, FeaturesPlugin_Revolution::FROM_OFFSET_ID(), ModelAPI_AttributeDouble, /** From offset */,
- sketchLauncher, FeaturesPlugin_CompositeSketch::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */)
+ sketchLauncher, FeaturesPlugin_Revolution::SKETCH_ID(), ModelAPI_AttributeReference, /** Sketch launcher */)
/// Modify base attribute of the feature.
FEATURESAPI_EXPORT
#include "FeaturesAPI.h"
#include "FeaturesAPI_Boolean.h"
#include "FeaturesAPI_Extrusion.h"
+ #include "FeaturesAPI_ExtrusionBoolean.h"
#include "FeaturesAPI_Group.h"
#include "FeaturesAPI_Placement.h"
#include "FeaturesAPI_Revolution.h"
#include <list>
#include <memory>
#include <string>
+#include <iostream>
//--------------------------------------------------------------------------------------
class ModelAPI_Feature;
class ModelAPI_Result;
//--------------------------------------------------------------------------------------
#define INTERFACE_COMMON(KIND) \
- static std::string ID() { return KIND; }
+ static std::string ID() { return KIND; }\
+ virtual std::string getID() { return ID(); }
//--------------------------------------------------------------------------------------
#define START_INIT() \
throwException(ID() + " exception: The feature is NULL."); \
return false; \
} \
- if (getKind() != ID()) { \
+ if (getKind() != getID()) { \
throwException(ID() + " exception: Wrong feature kind."); \
return false; \
}
END_INIT() \
public:
+//--------------------------------------------------------------------------------------
+#define INTERFACE_11(KIND, \
+ N_0, AN_0, T_0, C_0, \
+ N_1, AN_1, T_1, C_1, \
+ N_2, AN_2, T_2, C_2, \
+ N_3, AN_3, T_3, C_3, \
+ N_4, AN_4, T_4, C_4, \
+ N_5, AN_5, T_5, C_5, \
+ N_6, AN_6, T_6, C_6, \
+ N_7, AN_7, T_7, C_7, \
+ N_8, AN_8, T_8, C_8, \
+ N_9, AN_9, T_9, C_9, \
+ N_10, AN_10, T_10, C_10) \
+ public: \
+ INTERFACE_COMMON(KIND) \
+ DEFINE_ATTRIBUTE(N_0, T_0, C_0) \
+ DEFINE_ATTRIBUTE(N_1, T_1, C_1) \
+ DEFINE_ATTRIBUTE(N_2, T_2, C_2) \
+ DEFINE_ATTRIBUTE(N_3, T_3, C_3) \
+ DEFINE_ATTRIBUTE(N_4, T_4, C_4) \
+ DEFINE_ATTRIBUTE(N_5, T_5, C_5) \
+ DEFINE_ATTRIBUTE(N_6, T_6, C_6) \
+ DEFINE_ATTRIBUTE(N_7, T_7, C_7) \
+ DEFINE_ATTRIBUTE(N_8, T_8, C_8) \
+ DEFINE_ATTRIBUTE(N_9, T_9, C_9) \
+ DEFINE_ATTRIBUTE(N_10, T_10, C_10) \
+ protected: \
+ START_INIT() \
+ SET_ATTRIBUTE(N_0, T_0, AN_0) \
+ SET_ATTRIBUTE(N_1, T_1, AN_1) \
+ SET_ATTRIBUTE(N_2, T_2, AN_2) \
+ SET_ATTRIBUTE(N_3, T_3, AN_3) \
+ SET_ATTRIBUTE(N_4, T_4, AN_4) \
+ SET_ATTRIBUTE(N_5, T_5, AN_5) \
+ SET_ATTRIBUTE(N_6, T_6, AN_6) \
+ SET_ATTRIBUTE(N_7, T_7, AN_7) \
+ SET_ATTRIBUTE(N_8, T_8, AN_8) \
+ SET_ATTRIBUTE(N_9, T_9, AN_9) \
+ SET_ATTRIBUTE(N_10, T_10, AN_10) \
+ END_INIT() \
+ public:
+
//--------------------------------------------------------------------------------------
#endif /* SRC_MODELHIGHAPI_MODELHIGHAPI_MACRO_H_ */
import FeaturesAPI
FeaturesAPI.FeaturesAPI_Boolean(self.part.addFeature("Boolean"))
FeaturesAPI.FeaturesAPI_Extrusion(self.part.addFeature("Extrusion"))
- # model.features.extrusion_boolean.ExtrusionBoolean(self.part.addFeature("ExtrusionCut"))
- # model.features.extrusion_boolean.ExtrusionBoolean(self.part.addFeature("ExtrusionFuse"))
+ FeaturesAPI.FeaturesAPI_ExtrusionCut(self.part.addFeature("ExtrusionCut"))
+ FeaturesAPI.FeaturesAPI_ExtrusionFuse(self.part.addFeature("ExtrusionFuse"))
FeaturesAPI.FeaturesAPI_Revolution(self.part.addFeature("Revolution"))
# model.features.revolution_boolean.RevolutionBoolean(self.part.addFeature("RevolutionCut"))
# model.features.revolution_boolean.RevolutionBoolean(self.part.addFeature("RevolutionFuse"))
"""Package for Features plugin for the Parametric Geometry API of the Modeler.
"""
+from FeaturesAPI import addPlacement, addRotation, addTranslation
+
from FeaturesAPI import addFuse, addCut, addCommon
from partition import addPartition
-from FeaturesAPI import addExtrusion, addRevolution
-from extrusion_boolean import addExtrusionCut, addExtrusionFuse
+from FeaturesAPI import addExtrusion, addExtrusionCut, addExtrusionFuse
+from FeaturesAPI import addRevolution
from revolution_boolean import addRevolutionCut, addRevolutionFuse
-from placement import addPlacement
-from rotation import addRotation
-from translation import addTranslation
-
from group import addGroup