From: nds Date: Wed, 25 Mar 2015 14:54:10 +0000 (+0300) Subject: Union of validator and filter functionalities. X-Git-Tag: V_1.1.0~85^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7950265ea35234dcef0e19b986076b661fefe1f5;p=modules%2Fshaper.git Union of validator and filter functionalities. Checking for edge is degenerated is performed inside attribute selection. Filters are not used anymore, but validators could not check the degenerated shape state because the attribute selection returns a compound shape for a degenerative edge set. --- diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index 000ba2b0d..24a9efca5 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -13,11 +13,24 @@ #include #include +#include +#include +#include +#include + using namespace std; void Model_AttributeSelectionList::append( const ResultPtr& theContext, const std::shared_ptr& theSubShape) { + // do not use the degenerated edge as a shape, a list is not incremented in this case + if (theSubShape.get() && !theSubShape->isNull() && theSubShape->isEdge()) { + const TopoDS_Shape& aSubShape = theSubShape->impl(); + if (aSubShape.ShapeType() == TopAbs_EDGE && BRep_Tool::Degenerated(TopoDS::Edge(aSubShape))) { + return; + } + } + int aNewTag = mySize->Get() + 1; TDF_Label aNewLab = mySize->Label().FindChild(aNewTag);