]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3236: Generalization of extrusion
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Thu, 30 Jul 2020 20:52:35 +0000 (23:52 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Thu, 30 Jul 2020 20:52:35 +0000 (23:52 +0300)
Allow construction points as a base for extrusion and revolution.

src/ConstructionPlugin/ConstructionPlugin_Point.cpp
src/FeaturesPlugin/FeaturesPlugin_Validators.cpp

index 30802732baecc15032ece662210a0116d3e0e5e1..9b1744d325f2f3c66fc1c06994a6cadd938772b9 100644 (file)
@@ -143,7 +143,7 @@ void ConstructionPlugin_Point::execute()
 
   removeResults(1); // for case the point type was switched from multi-results type
   std::shared_ptr<ModelAPI_ResultConstruction> aConstr = document()->createConstruction(data());
-  aConstr->setInfinite(false);
+  aConstr->setInfinite(true);
   aConstr->setShape(aShape);
   setResult(aConstr);
 }
index 163ed998da1c5c79c86144a9a23113ade9ac656c..9235d933e78d40e886dc4902e2f84649f016f7e3 100644 (file)
@@ -459,7 +459,7 @@ bool FeaturesPlugin_ValidatorBaseForGeneration::isValidAttribute(const Attribute
       aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(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;
       }