X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchAPI%2FSketchAPI_Mirror.cpp;h=73f13635d9f67e51c5193374021b197da88b3723;hb=b06cf1477fb1ee46d7ae260c234cac5d0000abf2;hp=b13e94f03abc6cc5a233985f818d0e65fe86db20;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/SketchAPI/SketchAPI_Mirror.cpp b/src/SketchAPI/SketchAPI_Mirror.cpp index b13e94f03..73f13635d 100644 --- a/src/SketchAPI/SketchAPI_Mirror.cpp +++ b/src/SketchAPI/SketchAPI_Mirror.cpp @@ -70,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;