From 47ee8cc9aac0bef34d6d2ef58816334c32781827 Mon Sep 17 00:00:00 2001 From: Artem Zhidkov Date: Thu, 30 Jul 2020 23:52:35 +0300 Subject: [PATCH] Issue #3236: Generalization of extrusion Allow construction points as a base for extrusion and revolution. --- src/ConstructionPlugin/ConstructionPlugin_Point.cpp | 2 +- src/FeaturesPlugin/FeaturesPlugin_Validators.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.39.2