From: Clarisse Genrault Date: Fri, 3 Mar 2017 08:37:52 +0000 (+0100) Subject: Correction following passing of unit tests. X-Git-Tag: V_2.7.0~254 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae9bdb15b7625d9fc17545a0951e2b7002ceabbc;p=modules%2Fshaper.git Correction following passing of unit tests. --- diff --git a/src/FeaturesPlugin/translation_widget.xml b/src/FeaturesPlugin/translation_widget.xml index a5b247dc6..cb83abb94 100644 --- a/src/FeaturesPlugin/translation_widget.xml +++ b/src/FeaturesPlugin/translation_widget.xml @@ -1,4 +1,4 @@ - + @@ -94,4 +94,4 @@ - \ No newline at end of file + diff --git a/src/GDMLAPI/GDMLAPI_ConeSegment.cpp b/src/GDMLAPI/GDMLAPI_ConeSegment.cpp index f37e931bd..3bdfa66da 100644 --- a/src/GDMLAPI/GDMLAPI_ConeSegment.cpp +++ b/src/GDMLAPI/GDMLAPI_ConeSegment.cpp @@ -6,6 +6,7 @@ #include "GDMLAPI_ConeSegment.h" +#include #include //================================================================================================== @@ -33,7 +34,6 @@ GDMLAPI_ConeSegment::GDMLAPI_ConeSegment(const std::shared_ptr //================================================================================================== GDMLAPI_ConeSegment::~GDMLAPI_ConeSegment() { - } //================================================================================================== @@ -56,6 +56,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, diff --git a/src/GDMLAPI/GDMLAPI_ConeSegment.h b/src/GDMLAPI/GDMLAPI_ConeSegment.h index bd0ea756e..af7c6d1d7 100644 --- a/src/GDMLAPI/GDMLAPI_ConeSegment.h +++ b/src/GDMLAPI/GDMLAPI_ConeSegment.h @@ -66,6 +66,10 @@ public: const ModelHighAPI_Double& theZ, const ModelHighAPI_Double& theStartPhi, const ModelHighAPI_Double& theDeltaPhi); + + /// Dump wrapped feature + GDMLAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const; }; /// Pointer on primitive ConeSegment object diff --git a/src/GDMLPlugin/conesegment_widget.xml b/src/GDMLPlugin/conesegment_widget.xml index 23a33b678..66b698c65 100644 --- a/src/GDMLPlugin/conesegment_widget.xml +++ b/src/GDMLPlugin/conesegment_widget.xml @@ -44,7 +44,6 @@ step="1.0" default="12.0" tooltip="Enter the height"> - -