From: Artem Zhidkov Date: Thu, 30 Jul 2020 20:52:35 +0000 (+0300) Subject: Issue #3236: Generalization of extrusion X-Git-Tag: V9_6_0a1~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=47ee8cc9aac0bef34d6d2ef58816334c32781827;p=modules%2Fshaper.git Issue #3236: Generalization of extrusion Allow construction points as a base for extrusion and revolution. --- diff --git a/src/ConstructionPlugin/ConstructionPlugin_Point.cpp b/src/ConstructionPlugin/ConstructionPlugin_Point.cpp index 30802732b..9b1744d32 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Point.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Point.cpp @@ -143,7 +143,7 @@ void ConstructionPlugin_Point::execute() removeResults(1); // for case the point type was switched from multi-results type std::shared_ptr aConstr = document()->createConstruction(data()); - aConstr->setInfinite(false); + aConstr->setInfinite(true); aConstr->setShape(aShape); setResult(aConstr); } diff --git a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp index 163ed998d..9235d933e 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp @@ -459,7 +459,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute aConstruction = std::dynamic_pointer_cast(aContext); if(aConstruction.get()) { // Construction selected. Check that it is not infinite. - if(aConstruction->isInfinite()) { + if(aConstruction->isInfinite() && !aConstruction->shape()->isVertex()) { theError = "Error: Infinite constructions is not allowed as base."; return false; }