From: nds Date: Wed, 25 Mar 2015 09:32:35 +0000 (+0300) Subject: Union of validator and filter functionalities. X-Git-Tag: V_1.1.0~85^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c718dcd8bb6878379c16412d461d9ba41c7dcd22;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_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 4e1f21b91..0e643036f 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -86,7 +86,15 @@ void Model_AttributeSelection::setValue(const ResultPtr& theContext, TDF_Label aSelLab = selectionLabel(); aSelLab.ForgetAttribute(kSIMPLE_REF_ID); aSelLab.ForgetAttribute(kCONSTUCTION_SIMPLE_REF_ID); - if (!theContext.get()) { + + bool isDegeneratedEdge = false; + // do not use the degenerated edge as a shape, a null context and shape is used in the case + if (theSubShape.get() && !theSubShape->isNull() && theSubShape->isEdge()) { + const TopoDS_Shape& aSubShape = theSubShape->impl(); + if (aSubShape.ShapeType() == TopAbs_EDGE) + isDegeneratedEdge = BRep_Tool::Degenerated(TopoDS::Edge(aSubShape)); + } + if (!theContext.get() || isDegeneratedEdge) { // to keep the reference attribute label TDF_Label aRefLab = myRef.myRef->Label(); aSelLab.ForgetAllAttributes(true);