X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGDMLAPI%2FGDMLAPI_ConeSegment.cpp;h=3492f7449025de96c57ca861503b3b1929bb31a6;hb=97917d3698f5a2f7fc9596e7c755ff8f6751e373;hp=f37e931bd62342444c73aaef36f44d65a870477b;hpb=616cdb9e722efb11caa1bcfcbd02eed1d6695105;p=modules%2Fshaper.git diff --git a/src/GDMLAPI/GDMLAPI_ConeSegment.cpp b/src/GDMLAPI/GDMLAPI_ConeSegment.cpp index f37e931bd..3492f7449 100644 --- a/src/GDMLAPI/GDMLAPI_ConeSegment.cpp +++ b/src/GDMLAPI/GDMLAPI_ConeSegment.cpp @@ -1,11 +1,25 @@ -// Copyright (C) 2014-2016 CEA/DEN, EDF R&D --> - -// File: GDMLAPI_ConeSegment.cpp -// Created: 29 Nov. 2016 -// Author: Clarisse Genrault +// Copyright (C) 2014-2019 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 "GDMLAPI_ConeSegment.h" +#include #include //================================================================================================== @@ -33,7 +47,6 @@ GDMLAPI_ConeSegment::GDMLAPI_ConeSegment(const std::shared_ptr //================================================================================================== GDMLAPI_ConeSegment::~GDMLAPI_ConeSegment() { - } //================================================================================================== @@ -56,6 +69,28 @@ void GDMLAPI_ConeSegment::setAttributes(const ModelHighAPI_Double& theRMin1, execute(); } +//================================================================================================== +void GDMLAPI_ConeSegment::dump(ModelHighAPI_Dumper& theDumper) const +{ + FeaturePtr aBase = feature(); + const std::string& aDocName = theDumper.name(aBase->document()); + + theDumper << aBase << " = model.addConeSegment(" << aDocName; + + AttributeDoublePtr anAttrRMin1 = aBase->real(GDMLPlugin_ConeSegment::RMIN1_ID()); + AttributeDoublePtr anAttrRMax1 = aBase->real(GDMLPlugin_ConeSegment::RMAX1_ID()); + AttributeDoublePtr anAttrRMin2 = aBase->real(GDMLPlugin_ConeSegment::RMIN2_ID()); + AttributeDoublePtr anAttrRMax2 = aBase->real(GDMLPlugin_ConeSegment::RMAX2_ID()); + AttributeDoublePtr anAttrZ = aBase->real(GDMLPlugin_ConeSegment::Z_ID()); + AttributeDoublePtr anAttrStartPhi = aBase->real(GDMLPlugin_ConeSegment::STARTPHI_ID()); + AttributeDoublePtr anAttrDeltaPhi = aBase->real(GDMLPlugin_ConeSegment::DELTAPHI_ID()); + theDumper << ", " << anAttrRMin1 << ", " << anAttrRMax1; + theDumper << ", " << anAttrRMin2 << ", " << anAttrRMax2; + theDumper << ", " << anAttrZ << ", " << anAttrStartPhi << ", " << anAttrDeltaPhi; + + theDumper << ")" << std::endl; +} + //================================================================================================== ConeSegmentPtr addConeSegment(const std::shared_ptr& thePart, const ModelHighAPI_Double& theRMin1,