From 7950265ea35234dcef0e19b986076b661fefe1f5 Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 25 Mar 2015 17:54:10 +0300 Subject: [PATCH] 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. --- src/Model/Model_AttributeSelectionList.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); -- 2.39.2