X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_FilterInfinite.cpp;h=7fb9383c3bb6775fcd456a1ecf63acfb4d460004;hb=50a8df0c6a66da8067b16155e5ae39f8f26a7ebc;hp=ce873e62e98affbbff489c2dee0036dde6a56d72;hpb=2469ecd08c3b16def494626928ff81e575bdfe3d;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_FilterInfinite.cpp b/src/PartSet/PartSet_FilterInfinite.cpp old mode 100755 new mode 100644 index ce873e62e..7fb9383c3 --- a/src/PartSet/PartSet_FilterInfinite.cpp +++ b/src/PartSet/PartSet_FilterInfinite.cpp @@ -1,13 +1,28 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: PartSet_Filters.cpp -// Created: 19 Jun 2015 -// Author: Natalia ERMOLAEVA +// Copyright (C) 2014-2020 CEA/DEN, EDF R&D +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include "PartSet_FilterInfinite.h" #include #include +#include + #include #include @@ -15,7 +30,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(PartSet_FilterInfinite, SelectMgr_Filter); IMPLEMENT_STANDARD_RTTIEXT(PartSet_FilterInfinite, SelectMgr_Filter); PartSet_FilterInfinite::PartSet_FilterInfinite(ModuleBase_IWorkshop* theWorkshop) @@ -32,7 +46,8 @@ Standard_Boolean PartSet_FilterInfinite::IsOk(const Handle(SelectMgr_EntityOwner ResultPtr aResult = myWorkshop->selection()->getResult(aPrs); // to filter infinite construction results if (aResult.get() && aResult->groupName() == ModelAPI_ResultConstruction::group()) { - ResultConstructionPtr aConstruction = std::dynamic_pointer_cast(aResult); + ResultConstructionPtr aConstruction = + std::dynamic_pointer_cast(aResult); if (aConstruction.get() && aConstruction->isInfinite()) { Handle(StdSelect_BRepOwner) aBRepOwner = Handle(StdSelect_BRepOwner)::DownCast(theOwner); if (!aBRepOwner.IsNull() && aBRepOwner->HasShape()) { @@ -45,9 +60,12 @@ Standard_Boolean PartSet_FilterInfinite::IsOk(const Handle(SelectMgr_EntityOwner TopoDS_Shape aResultTopoShape = aResultShape->impl(); aResultShapeType = aResultTopoShape.ShapeType(); } - // for infinite object, the selection is possible only for shapes of owners, which are coincide - // to the shape of corresponded AIS object. In other words, for axis, only edge can be selected - // (vertices are not selectable), for planes, only faces can be selected (not edges or vertices) + // for infinite object, the selection is possible only + // for shapes of owners, which are coincide + // to the shape of corresponded AIS object. + // In other words, for axis, only edge can be selected + // (vertices are not selectable), for planes, + // only faces can be selected (not edges or vertices) aValid = anOwnerShapeType == aResultShapeType; } }