mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-11 12:53:09 +05:00
0021394: EDF 1637 GEOM: Function 'MinDistance' with creation of vertices
This commit is contained in:
parent
330c6c3a5b
commit
44e3e406af
@ -1080,12 +1080,20 @@ Please, select face, shell or solid and try again</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_MINDIST_NO_SOL</source>
|
<source>GEOM_MINDIST_NO_SOL</source>
|
||||||
<translation>No solution found</translation>
|
<translation type="unfinished">No solution found</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_MINDIST_OBJ</source>
|
<source>GEOM_MINDIST_OBJ</source>
|
||||||
<translation>Objects And Results</translation>
|
<translation>Objects And Results</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_MINDIST_PUBLISH_TITLE</source>
|
||||||
|
<translation type="unfinished">Multiple solutions found</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_MINDIST_PUBLISH_TEXT</source>
|
||||||
|
<translation type="unfinished">Do you want to publish in the study all found solutions? If No, only the currently selected solution will be published.</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_MINDIST_TITLE</source>
|
<source>GEOM_MINDIST_TITLE</source>
|
||||||
<translation>Minimun Distance Between Two Objects</translation>
|
<translation>Minimun Distance Between Two Objects</translation>
|
||||||
|
@ -1070,10 +1070,26 @@ Choisissez une face, une coque ou un solide et essayez de nouveau</translation>
|
|||||||
<source>GEOM_MIN</source>
|
<source>GEOM_MIN</source>
|
||||||
<translation>Min :</translation>
|
<translation>Min :</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_MINDIST_NAME</source>
|
||||||
|
<translation type="unfinished">MinDist</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_MINDIST_NO_SOL</source>
|
||||||
|
<translation type="unfinished">No solution found</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_MINDIST_OBJ</source>
|
<source>GEOM_MINDIST_OBJ</source>
|
||||||
<translation>Objets et résultats</translation>
|
<translation>Objets et résultats</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_MINDIST_PUBLISH_TITLE</source>
|
||||||
|
<translation type="unfinished">Multiple solutions found</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>GEOM_MINDIST_PUBLISH_TEXT</source>
|
||||||
|
<translation type="unfinished">Do you want to publish in the study all found solutions? If No, only the currently selected solution will be published.</translation>
|
||||||
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>GEOM_MINDIST_TITLE</source>
|
<source>GEOM_MINDIST_TITLE</source>
|
||||||
<translation>Distance minimale entre deux objets</translation>
|
<translation>Distance minimale entre deux objets</translation>
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <SUIT_ViewWindow.h>
|
#include <SUIT_ViewWindow.h>
|
||||||
#include <SUIT_ViewManager.h>
|
#include <SUIT_ViewManager.h>
|
||||||
#include <SUIT_OverrideCursor.h>
|
#include <SUIT_OverrideCursor.h>
|
||||||
|
#include <SUIT_MessageBox.h>
|
||||||
#include <SOCC_Prs.h>
|
#include <SOCC_Prs.h>
|
||||||
#include <SOCC_ViewModel.h>
|
#include <SOCC_ViewModel.h>
|
||||||
#include <SalomeApp_Tools.h>
|
#include <SalomeApp_Tools.h>
|
||||||
@ -433,9 +434,37 @@ bool MeasureGUI_DistanceDlg::execute (ObjectList& objects)
|
|||||||
int nbSols = anOper->ClosestPoints(myObj1, myObj2, aDbls);
|
int nbSols = anOper->ClosestPoints(myObj1, myObj2, aDbls);
|
||||||
|
|
||||||
if (anOper->IsDone()) {
|
if (anOper->IsDone()) {
|
||||||
|
bool doPublishAll = true;
|
||||||
|
if (nbSols > 1) {
|
||||||
|
QMessageBox::StandardButton anAnswer =
|
||||||
|
SUIT_MessageBox::question(this, tr("GEOM_MINDIST_PUBLISH_TITLE"),
|
||||||
|
tr("GEOM_MINDIST_PUBLISH_TEXT"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
|
||||||
|
QMessageBox::No);
|
||||||
|
if (anAnswer == QMessageBox::No)
|
||||||
|
doPublishAll = false;
|
||||||
|
else if (anAnswer != QMessageBox::Yes)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (doPublishAll) {
|
||||||
for (int i = 0; i < nbSols; i++) {
|
for (int i = 0; i < nbSols; i++) {
|
||||||
GEOM::GEOM_Object_var anObj1 = aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]);
|
GEOM::GEOM_Object_var anObj1 =
|
||||||
GEOM::GEOM_Object_var anObj2 = aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]);
|
aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]);
|
||||||
|
GEOM::GEOM_Object_var anObj2 =
|
||||||
|
aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]);
|
||||||
|
|
||||||
|
if (!anObj1->_is_nil() && !anObj2->_is_nil()) {
|
||||||
|
objects.push_back(anObj1._retn());
|
||||||
|
objects.push_back(anObj2._retn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
int i = myGrp->ComboBox1->currentIndex();
|
||||||
|
GEOM::GEOM_Object_var anObj1 =
|
||||||
|
aBasicOper->MakePointXYZ(aDbls[i*6 + 0], aDbls[i*6 + 1], aDbls[i*6 + 2]);
|
||||||
|
GEOM::GEOM_Object_var anObj2 =
|
||||||
|
aBasicOper->MakePointXYZ(aDbls[i*6 + 3], aDbls[i*6 + 4], aDbls[i*6 + 5]);
|
||||||
|
|
||||||
if (!anObj1->_is_nil() && !anObj2->_is_nil()) {
|
if (!anObj1->_is_nil() && !anObj2->_is_nil()) {
|
||||||
objects.push_back(anObj1._retn());
|
objects.push_back(anObj1._retn());
|
||||||
|
Loading…
Reference in New Issue
Block a user