X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintHorizontal.cpp;h=545102700e937eb69f3d359d65d6fcfb1604221b;hb=6bd91d6692dfbfa6462e4b6463ff113ad51b3782;hp=0f7aa24926376731fc126ddd956c34badf04853c;hpb=5cd5c63e95c048ef98621e15929c1e95ad580b24;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp b/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp index 0f7aa2492..545102700 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintHorizontal.cpp @@ -1,8 +1,22 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D --> - -// File: SketchPlugin_ConstraintHorizontal.cpp -// Created: 16 Mar 2015 -// Author: Artem ZHIDKOV +// Copyright (C) 2014-2017 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 "SketchPlugin_ConstraintHorizontal.h" @@ -36,23 +50,8 @@ AISObjectPtr SketchPlugin_ConstraintHorizontal::getAISObject(AISObjectPtr thePre if (!sketch()) return thePrevious; - AISObjectPtr anAIS = thePrevious; - - if (!anAIS) { - anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane()); - /* - ObjectPtr aObj = SketcherPrs_Tools::getResult(this, SketchPlugin_Constraint::ENTITY_A()); - if (SketcherPrs_Tools::getShape(aObj).get() != NULL) { - anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch()->coordinatePlane()); - }*/ - } - /*else { - ObjectPtr aObj = SketcherPrs_Tools::getResult(this, SketchPlugin_Constraint::ENTITY_A()); - if (SketcherPrs_Tools::getShape(aObj).get() == NULL) { - anAIS = AISObjectPtr(); - } - }*/ + AISObjectPtr anAIS = SketcherPrs_Factory::horisontalConstraint(this, sketch(), + thePrevious); return anAIS; } -