X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Mirror.cpp;h=73f13635d9f67e51c5193374021b197da88b3723;hb=b06cf1477fb1ee46d7ae260c234cac5d0000abf2;hp=2105d45f82707f513e3658d8e63f95e1ec485418;hpb=2532fb2df83ee1ddd9ff3e8b381d3788eaa15b69;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Mirror.cpp b/src/SketchAPI/SketchAPI_Mirror.cpp index 2105d45f8..73f13635d 100644 --- a/src/SketchAPI/SketchAPI_Mirror.cpp +++ b/src/SketchAPI/SketchAPI_Mirror.cpp @@ -14,7 +14,8 @@ // 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 +// See http://www.salome-platform.org/ or +// email : webmaster.salome@opencascade.com // #include "SketchAPI_Mirror.h" @@ -69,8 +70,16 @@ void SketchAPI_Mirror::dump(ModelHighAPI_Dumper& theDumper) const FeaturePtr aBase = feature(); const std::string& aSketchName = theDumper.parentName(aBase); + AttributeRefAttrPtr aMirrorLine = mirrorLine(); AttributeRefListPtr aMirrorObjects = mirrorList(); + + // Check all attributes are already dumped. If not, store the constraint as postponed. + if (!theDumper.isDumped(aMirrorLine) || !theDumper.isDumped(aMirrorObjects)) { + theDumper.postpone(aBase); + return; + } + theDumper << aBase << " = " << aSketchName << ".addMirror(" << aMirrorLine << ", " << aMirrorObjects << ")" << std::endl;