From: bourcier Date: Tue, 8 Oct 2013 11:56:53 +0000 (+0000) Subject: Fix bug with dump study in PreCad periodicity without vertices set from GUI X-Git-Tag: V7_3_0a1~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=113760ae44df4b84fe712a9dd4bd694588a8a13c;p=plugins%2Fblsurfplugin.git Fix bug with dump study in PreCad periodicity without vertices set from GUI --- diff --git a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx index 8321191..f4d0d3b 100644 --- a/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx +++ b/src/GUI/BLSURFPluginGUI_HypothesisCreator.cxx @@ -2413,17 +2413,23 @@ bool BLSURFPluginGUI_HypothesisCreator::storeParamsToHypo( const BlsurfHypothesi bool onFace = (periodicity_i[PERIODICITY_SHAPE_TYPE]=="1") ? true : false; BLSURFPlugin::TEntryList_var sourceVertices = new BLSURFPlugin::TEntryList(); - sourceVertices->length(3); - sourceVertices[0]=CORBA::string_dup(p1Source.c_str()); - sourceVertices[1]=CORBA::string_dup(p2Source.c_str()); - sourceVertices[2]=CORBA::string_dup(p3Source.c_str()); + if (not p1Source.empty()) + { + sourceVertices->length(3); + sourceVertices[0]=CORBA::string_dup(p1Source.c_str()); + sourceVertices[1]=CORBA::string_dup(p2Source.c_str()); + sourceVertices[2]=CORBA::string_dup(p3Source.c_str()); + } BLSURFPlugin::TEntryList_var targetVertices = new BLSURFPlugin::TEntryList(); - targetVertices->length(3); - targetVertices[0]=CORBA::string_dup(p1Target.c_str()); - targetVertices[1]=CORBA::string_dup(p2Target.c_str()); - targetVertices[2]=CORBA::string_dup(p3Target.c_str()); + if (not p1Target.empty()) + { + targetVertices->length(3); + targetVertices[0]=CORBA::string_dup(p1Target.c_str()); + targetVertices[1]=CORBA::string_dup(p2Target.c_str()); + targetVertices[2]=CORBA::string_dup(p3Target.c_str()); + } if (onFace) h->AddPreCadFacesPeriodicityEntry(source.c_str(), target.c_str(), sourceVertices, targetVertices);