: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_SIMPLE(), mycreationMethod);
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyValue);
+ fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_SIMPLE(), VAR_NAME(creationMethod));
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_ADVANCED(), mycreationMethod);
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(theToolObjects, mytoolObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyValue);
+ fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_ADVANCED(), VAR_NAME(creationMethod));
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
void FeaturesAPI_BooleanCommon::setMainObjects(
const std::list<ModelHighAPI_Selection>& theMainObjects)
{
- fillAttribute(theMainObjects, mymainObjects);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
execute();
}
void FeaturesAPI_BooleanCommon::setToolObjects(
const std::list<ModelHighAPI_Selection>& theToolObjects)
{
- fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_ADVANCED(), mycreationMethod);
- fillAttribute(theToolObjects, mytoolObjects);
+ fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_ADVANCED(), VAR_NAME(creationMethod));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanCommon::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanCommon::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyValue);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
void FeaturesAPI_BooleanCommon::setAdvancedMode(const bool theMode)
{
if (theMode) {
- fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_ADVANCED(), mycreationMethod);
+ fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_ADVANCED(), VAR_NAME(creationMethod));
} else {
- fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_SIMPLE(), mycreationMethod);
+ fillAttribute(FeaturesPlugin_BooleanCommon::CREATION_METHOD_SIMPLE(), VAR_NAME(creationMethod));
}
execute();
BooleanCommonPtr addCommon(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
const std::list<ModelHighAPI_Selection>& theToolObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanCommon::ID());
aFeature->data()->setVersion("");
BooleanCommonPtr aCommon;
if (theToolObjects.empty())
- aCommon.reset(new FeaturesAPI_BooleanCommon(aFeature, theMainObjects, fuzzyParam));
+ aCommon.reset(new FeaturesAPI_BooleanCommon(aFeature, theMainObjects, theFuzzy));
else
- aCommon.reset(new FeaturesAPI_BooleanCommon(aFeature, theMainObjects, theToolObjects, fuzzyParam));
+ aCommon.reset(new FeaturesAPI_BooleanCommon(aFeature, theMainObjects, theToolObjects, theFuzzy));
return aCommon;
}
ModelAPI_AttributeSelectionList, /** Tool objects*/,
useFuzzy, FeaturesPlugin_BooleanCommon::USE_FUZZY_ID(),
ModelAPI_AttributeBoolean, /** Use Fuzzy parameter*/,
- fuzzyValue, FeaturesPlugin_BooleanCommon::FUZZY_PARAM_ID(),
+ fuzzyParam, FeaturesPlugin_BooleanCommon::FUZZY_PARAM_ID(),
ModelAPI_AttributeDouble, /** Fuzzy parameter*/)
/// Set main objects.
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(theToolObjects, mytoolObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
//==================================================================================================
void FeaturesAPI_BooleanCut::setMainObjects(const std::list<ModelHighAPI_Selection>& theMainObjects)
{
- fillAttribute(theMainObjects, mymainObjects);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanCut::setToolObjects(const std::list<ModelHighAPI_Selection>& theToolObjects)
{
- fillAttribute(theToolObjects, mytoolObjects);
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanCut::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanCut::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
BooleanCutPtr addCut(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
const std::list<ModelHighAPI_Selection>& theToolObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanCut::ID());
if (!keepSubResults)
aFeature->data()->setVersion("");
- return BooleanCutPtr(new FeaturesAPI_BooleanCut(aFeature, theMainObjects, theToolObjects, fuzzyParam));
+ return BooleanCutPtr(new FeaturesAPI_BooleanCut(aFeature, theMainObjects, theToolObjects, theFuzzy));
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(theToolObjects, mytoolObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
void FeaturesAPI_BooleanFill::setMainObjects(
const std::list<ModelHighAPI_Selection>& theMainObjects)
{
- fillAttribute(theMainObjects, mymainObjects);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
execute();
}
void FeaturesAPI_BooleanFill::setToolObjects(
const std::list<ModelHighAPI_Selection>& theToolObjects)
{
- fillAttribute(theToolObjects, mytoolObjects);
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanFill::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanFill::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
BooleanFillPtr addSplit(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
const std::list<ModelHighAPI_Selection>& theToolObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanFill::ID());
if (!keepSubResults)
aFeature->data()->setVersion("");
- return BooleanFillPtr(new FeaturesAPI_BooleanFill(aFeature, theMainObjects, theToolObjects, fuzzyParam));
+ return BooleanFillPtr(new FeaturesAPI_BooleanFill(aFeature, theMainObjects, theToolObjects, theFuzzy));
}
: ModelHighAPI_Interface(theFeature)
{
if (initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_SIMPLE(), mycreationMethod);
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(theRemoveEdges, myremoveEdges);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_SIMPLE(), VAR_NAME(creationMethod));
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theRemoveEdges, VAR_NAME(removeEdges));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_ADVANCED(), mycreationMethod);
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(theToolObjects, mytoolObjects);
- fillAttribute(theRemoveEdges, myremoveEdges);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_ADVANCED(), VAR_NAME(creationMethod));
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
+ fillAttribute(theRemoveEdges, VAR_NAME(removeEdges));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
void FeaturesAPI_BooleanFuse::setMainObjects(
const std::list<ModelHighAPI_Selection>& theMainObjects)
{
- fillAttribute(theMainObjects, mymainObjects);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
execute();
}
void FeaturesAPI_BooleanFuse::setToolObjects(
const std::list<ModelHighAPI_Selection>& theToolObjects)
{
- fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_ADVANCED(), mycreationMethod);
- fillAttribute(theToolObjects, mytoolObjects);
+ fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_ADVANCED(), VAR_NAME(creationMethod));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanFuse::setRemoveEdges(const bool theRemoveEdges)
{
- fillAttribute(theRemoveEdges, myremoveEdges);
+ fillAttribute(theRemoveEdges, VAR_NAME(removeEdges));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanFuse::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanFuse::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
void FeaturesAPI_BooleanFuse::setAdvancedMode(const bool theMode)
{
if (theMode) {
- fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_ADVANCED(), mycreationMethod);
+ fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_ADVANCED(), VAR_NAME(creationMethod));
} else {
- fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_SIMPLE(), mycreationMethod);
+ fillAttribute(FeaturesPlugin_BooleanFuse::CREATION_METHOD_SIMPLE(), VAR_NAME(creationMethod));
}
execute();
const std::list<ModelHighAPI_Selection>& theMainObjects,
const std::pair<std::list<ModelHighAPI_Selection>, bool>& theToolObjects,
const bool theRemoveEdges,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanFuse::ID());
BooleanFusePtr aFuse;
if (theToolObjects.first.empty())
- aFuse.reset(new FeaturesAPI_BooleanFuse(aFeature, theMainObjects, aRemoveEdges, fuzzyParam));
+ aFuse.reset(new FeaturesAPI_BooleanFuse(aFeature, theMainObjects, aRemoveEdges, theFuzzy));
else {
aFuse.reset(new FeaturesAPI_BooleanFuse(aFeature, theMainObjects, theToolObjects.first,
- aRemoveEdges, fuzzyParam));
+ aRemoveEdges, theFuzzy));
}
return aFuse;
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(theMainObjects, mymainObjects);
- fillAttribute(theToolObjects, mytoolObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute(false);
}
void FeaturesAPI_BooleanSmash::setMainObjects(
const std::list<ModelHighAPI_Selection>& theMainObjects)
{
- fillAttribute(theMainObjects, mymainObjects);
+ fillAttribute(theMainObjects, VAR_NAME(mainObjects));
execute();
}
void FeaturesAPI_BooleanSmash::setToolObjects(
const std::list<ModelHighAPI_Selection>& theToolObjects)
{
- fillAttribute(theToolObjects, mytoolObjects);
+ fillAttribute(theToolObjects, VAR_NAME(toolObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanSmash::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_BooleanSmash::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
BooleanSmashPtr addSmash(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theMainObjects,
const std::list<ModelHighAPI_Selection>& theToolObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_BooleanSmash::ID());
if (!keepSubResults)
aFeature->data()->setVersion("");
- return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects, theToolObjects, fuzzyParam));
+ return BooleanSmashPtr(new FeaturesAPI_BooleanSmash(aFeature, theMainObjects, theToolObjects, theFuzzy));
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(theObjects, myobjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(theObjects, VAR_NAME(objects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute();
}
//==================================================================================================
void FeaturesAPI_Intersection::setObjects(const std::list<ModelHighAPI_Selection>& theObjects)
{
- fillAttribute(theObjects, myobjects);
+ fillAttribute(theObjects, VAR_NAME(objects));
execute();
}
//==================================================================================================
void FeaturesAPI_Intersection::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_Intersection::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
//==================================================================================================
IntersectionPtr addIntersection(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Intersection::ID());
if (!keepSubResults)
aFeature->data()->setVersion("");
- return IntersectionPtr(new FeaturesAPI_Intersection(aFeature, theObjects, fuzzyParam));
+ return IntersectionPtr(new FeaturesAPI_Intersection(aFeature, theObjects, theFuzzy));
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(theBaseObjects, mybaseObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(theBaseObjects, VAR_NAME(baseObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
+
execute();
}
}
//==================================================================================================
void FeaturesAPI_Partition::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
{
- fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theBaseObjects, VAR_NAME(baseObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_Partition::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_Partition::setFuzzy(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
//==================================================================================================
PartitionPtr addPartition(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theBaseObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Partition::ID());
if (!keepSubResults)
aFeature->data()->setVersion("");
- return PartitionPtr(new FeaturesAPI_Partition(aFeature, theBaseObjects, fuzzyParam));
+ return PartitionPtr(new FeaturesAPI_Partition(aFeature, theBaseObjects, theFuzzy));
}
: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
- bool aUseFuzzy = (theFuzzy.value() > 0);
- ModelHighAPI_Double aFuzzy = (aUseFuzzy ? theFuzzy : ModelHighAPI_Double(DEFAULT_FUZZY));
- fillAttribute(theBaseObjects, mybaseObjects);
- fillAttribute(aUseFuzzy, myuseFuzzy);
- fillAttribute(aFuzzy, myfuzzyParam);
+ fillAttribute(theBaseObjects, VAR_NAME(baseObjects));
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
+
+ // Get the evaluated fuzzy parameter from the attribute!!
+ bool aUseFuzzy = (fuzzyParam()->value() > 0);
+ fillAttribute(aUseFuzzy, VAR_NAME(useFuzzy));
+ if (!aUseFuzzy) {
+ ModelHighAPI_Double aFuzzy(DEFAULT_FUZZY);
+ fillAttribute(aFuzzy, VAR_NAME(fuzzyParam));
+ }
execute();
}
//==================================================================================================
void FeaturesAPI_Union::setBase(const std::list<ModelHighAPI_Selection>& theBaseObjects)
{
- fillAttribute(theBaseObjects, mybaseObjects);
+ fillAttribute(theBaseObjects, VAR_NAME(baseObjects));
execute();
}
//==================================================================================================
void FeaturesAPI_Union::setUseFuzzy(bool theUseFuzzy)
{
- fillAttribute(theUseFuzzy, myuseFuzzy);
+ fillAttribute(theUseFuzzy, VAR_NAME(useFuzzy));
execute();
}
//==================================================================================================
void FeaturesAPI_Union::setFuzzyValue(const ModelHighAPI_Double& theFuzzy)
{
- fillAttribute(theFuzzy, myfuzzyParam);
+ fillAttribute(theFuzzy, VAR_NAME(fuzzyParam));
execute();
}
//==================================================================================================
UnionPtr addUnion(const std::shared_ptr<ModelAPI_Document>& thePart,
const std::list<ModelHighAPI_Selection>& theBaseObjects,
- const ModelHighAPI_Double& fuzzyParam,
+ const ModelHighAPI_Double& theFuzzy,
const bool keepSubResults)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(FeaturesAPI_Union::ID());
if (!keepSubResults)
aFeature->data()->setVersion("");
- return UnionPtr(new FeaturesAPI_Union(aFeature, theBaseObjects, fuzzyParam));
+ return UnionPtr(new FeaturesAPI_Union(aFeature, theBaseObjects, theFuzzy));
}