Salome HOME
SALOME PAL V1_4_1
authorsmh <smh@opencascade.com>
Fri, 2 Apr 2004 13:23:30 +0000 (13:23 +0000)
committersmh <smh@opencascade.com>
Fri, 2 Apr 2004 13:23:30 +0000 (13:23 +0000)
57 files changed:
INSTALL
Makefile.in
adm_local/unix/make_commence.in
bin/VERSION
configure.in.base
doc/Makefile.in
idl/GEOM_Shape.idl
idl/Makefile.in
src/ARCHIMEDE/Archimede_VolumeSection.cxx
src/BasicGUI/BasicGUI_ArcDlg.cxx
src/BasicGUI/BasicGUI_CircleDlg.cxx
src/BasicGUI/BasicGUI_EllipseDlg.cxx
src/BasicGUI/BasicGUI_LineDlg.cxx
src/BasicGUI/BasicGUI_PlaneDlg.cxx
src/BasicGUI/BasicGUI_PointDlg.cxx
src/BasicGUI/BasicGUI_VectorDlg.cxx
src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx
src/BooleanGUI/BooleanGUI_CutDlg.cxx
src/DlgRef/DlgRef_4Sel1List_QTD.cxx
src/DlgRef/DlgRef_4Sel1List_QTD.h
src/EntityGUI/EntityGUI.cxx
src/GEOM/GEOM_Gen_i.cc
src/GEOM/GEOM_Shape_i.cc
src/GEOM/GEOM_Shape_i.hh
src/GEOMBase/GEOMBase.cxx
src/GEOMClient/GEOM_Client.cxx
src/GEOMClient/GEOM_Client.hxx
src/GEOMContext/GEOMContext.cxx
src/GEOMContext/GEOMContext.h
src/GEOMContext/GEOM_msg_en.po
src/GEOMContext/GEOM_msg_fr.po
src/GEOMGUI/GeometryGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_RevolDlg.cxx
src/MeasureGUI/MeasureGUI_WhatisDlg.cxx
src/OperationGUI/OperationGUI_ArchimedeDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.cxx
src/OperationGUI/OperationGUI_FilletDlg.cxx
src/OperationGUI/OperationGUI_PartitionDlg.cxx
src/PrimitiveGUI/PrimitiveGUI.cxx
src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx
src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx
src/RepairGUI/RepairGUI.cxx
src/RepairGUI/RepairGUI_OrientationDlg.cxx
src/RepairGUI/RepairGUI_SewingDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.cxx
src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx
src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.cxx
src/TransformationGUI/TransformationGUI_ScaleDlg.cxx
src/TransformationGUI/TransformationGUI_TranslationDlg.cxx

diff --git a/INSTALL b/INSTALL
index 6fe7d777b03dc2ab4a3a72294889ab54ad75b5c1..ce0c8eccd08673b49588ebaf14ef471df517c22a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,3 +1,3 @@
-This is the version 1.4.0 of GEOM
+This is the version 1.4.1 of GEOM
 Compatible with :
-       - KERNEL 1.4.0
+       - KERNEL 1.4.1
index 3657e224864d588aad9c663e5233a25a9529bf6c..d5c51e9cfe23eefd5605515ca262fdbc2ad3cc9b 100644 (file)
@@ -14,11 +14,12 @@ VPATH=.:@srcdir@:@top_srcdir@/bin:@top_srcdir@/resources:./bin:@top_srcdir@/idl
 
 @COMMENCE@
 
-SUBDIRS = idl src
+SUBDIRS = idl src doc
 
 RESOURCES_FILES = \
 GEOM_en.xml \
 GEOM_fr.xml \
+GEOM.config \
 GEOMCatalog.xml \
 GEOMDS_Resources \
 arc.png \
@@ -144,10 +145,10 @@ include/salome/SALOMEconfig.h: salome_adm/unix/SALOMEconfig.ref
 # test if SALOMEconfig.h has changed (contents)
 salome_adm/unix/SALOMEconfig.ref: salome_adm/unix/SALOMEconfig.h
        @if ! [ -a $@ ]; then \
-         cp -p $< $@;        \
+         cp -p -f $< $@;        \
        fi;                   \
        if ! cmp $< $@; then  \
-         cp -p $< $@;        \
+         cp -p -f $< $@;        \
        fi;                   \
 
 include/salome/sstream: salome_adm/unix/sstream
@@ -169,10 +170,10 @@ install-end:
 
 install-include: $(include_list)
        $(INSTALL) -d  $(includedir)
-       @for f in X $(include_list); do                         \
-          if test $$f != X; then                               \
-            ($(INSTALL_DATA) $$f $(includedir)/. || exit 1);   \
-          fi;                                                  \
+       @for f in X $(include_list); do                                 \
+          if test $$f != X; then                                       \
+            ($(INSTALL_DATA) -p $$f $(includedir)/. || exit 1);        \
+          fi;                                                          \
        done
 
 # install script in $(bindir) :
index 28f29a130694de441437e98da8d22b37ec38185a..e2d84afb8228f4f4f9fde926f9944c10c03d867c 100644 (file)
@@ -131,7 +131,7 @@ OMNIORB_CXXFLAGS    = @OMNIORB_CXXFLAGS@
 
 OMNIORB_IDL         = @OMNIORB_IDL@
 OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
-OMNIORB_IDLPYFLAGS  = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
+OMNIORB_IDLPYFLAGS  = @OMNIORB_IDLPYFLAGS@ -I$(top_srcdir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
 
 OMNIORB_IDL_CLN_H   = @OMNIORB_IDL_CLN_H@
 OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
@@ -148,7 +148,7 @@ CORBA_INCLUDES    = @CORBA_INCLUDES@
 CORBA_LIBS        = @CORBA_LIBS@
 CORBA_CXXFLAGS    = @CORBA_CXXFLAGS@
 
-IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(top_builddir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
+IDLCXXFLAGS = -bcxx @IDLCXXFLAGS@ -I$(top_srcdir)/idl -I$(KERNEL_ROOT_DIR)/idl/salome
 IDLPYFLAGS  = @IDLPYFLAGS@
 
 IDL = @IDL@
@@ -202,13 +202,13 @@ idldir=${prefix}/idl/salome
 sharedpydir=@libdir@/python$(PYTHON_VERSION)/site-packages/salome/shared_modules
 incmakedir=${prefix}/salome_adm/unix
 
-docdir=$(datadir)/doc
+docdir=${prefix}/doc/salome
 
 #
 # begin of package rules
 #
 
-.PHONY: all lib bin inc resources data doc tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
+.PHONY: all lib bin inc resources data docs tests install uninstall dep depend depend_idl cleandep mostlyclean clean distclean
 
 .SUFFIXES: .cxx .cc .c .f .o .lo .idl .py .i .ui .po .qm
 
index 1b77509ae9fa169ecd3024b136427408fccc474e..767c202597f87792fa63b59391f15b869385da05 100755 (executable)
@@ -1 +1 @@
-THIS IS SALOME - GEOM VERSION: 1.4.0
+THIS IS SALOME - GEOM VERSION: 1.4.1
index 212a37556a24f2ab891e0a58eac3a6c89761778b..2057690b27a0809762f05c3b49f43d63f8d5148c 100644 (file)
@@ -15,6 +15,7 @@
 # Created from configure.in.base
 #
 
+
 AC_INIT(src)
 AC_CONFIG_AUX_DIR(${KERNEL_ROOT_DIR}/salome_adm/unix/config_files)
 AC_CANONICAL_HOST
@@ -294,7 +295,7 @@ else
 fi
 
 # make other build directories
-for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources share/salome/doc idl
+for rep in salome_adm adm_local doc bin/salome include/salome lib/salome share/salome/resources idl
 do
 #   if test ! -d $rep ; then
 #      eval mkdir $rep
@@ -327,14 +328,16 @@ dnl copy shells and utilities contained in the bin directory
 dnl excluding .in files (treated in AC-OUTPUT below) and CVS 
 dnl directory
 
-cd bin
+mkdir -p bin/salome
+cd bin/salome
+
 for i in $ROOT_SRCDIR/bin/*
 do
   local_bin=`echo $i | sed -e "s,$ROOT_SRCDIR,.,"`
   case "$local_bin" in
         *.in | *~)                    ;;
-        ./bin/CVS)                    ;;
-        *) ln -fs $i; echo $local_bin ;;
+        ./bin/CVS | ./bin/salome)                    ;;
+        *) /usr/bin/install -C $i .; echo $local_bin ;;
   esac
 done
 cd $ROOT_BUILDDIR
index 01901597158e9cc36fca315a781abd5d150fc032..7295ede75128e9e51b474f63ed9f8d7a128bb3df 100644 (file)
@@ -11,9 +11,11 @@ top_builddir=..
 srcdir=@srcdir@
 VPATH=.:@srcdir@
 
-SUBDIRS=html 
+SUBDIRS= salome
 
-doc:
+@COMMENCE@
+
+docs:
        @@SETX@; for d in $(SUBDIRS); do        \
           (cd $$d && $(MAKE) $@) || exit 1;    \
        done
@@ -31,3 +33,8 @@ install:
        @@SETX@; for d in $(SUBDIRS); do        \
           (cd $$d && $(MAKE) $@) || exit 1;    \
        done
+
+uninstall:
+       @@SETX@; for d in $(SUBDIRS); do        \
+          (cd $$d && $(MAKE) $@) || exit 1;    \
+       done
index b9091a0ed936185a414de3db717efdb636012add..a75c3486c38384b73e71cbc3776b97ed2444f1cf 100644 (file)
@@ -78,6 +78,8 @@ module GEOM
     // the generator engine
     GEOM_Gen Engine();
    
+    // Get the TopoDS_Shape, for colocated case only
+    long getShape();
   };
 };
 #endif
index 1d0b5c6cc71f0d4e2cffe4ec8cf75ab721edf484..d7d1cae797ce702283a19671828d1957b6c29c66 100644 (file)
@@ -6,7 +6,7 @@
 top_srcdir=@top_srcdir@
 top_builddir=..
 srcdir=@srcdir@
-VPATH=.:$(srcdir):${KERNEL_ROOT_DIR}/idl/salome
+VPATH=.:${KERNEL_ROOT_DIR}/idl/salome
 
 @COMMENCE@
 
@@ -17,11 +17,14 @@ IDL_FILES = \
 PY_CLIENT_IDL = $(IDL_FILES)
 
 # we copy all idl file in $(top_builddir)/idl
-inc: $(IDL_FILES:%=$(top_builddir)/idl/%)
+inc: $(top_builddir)/idl/salome $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
 
-$(IDL_FILES:%=$(top_builddir)/idl/%):$(top_builddir)/idl/%:%
+$(top_builddir)/idl/salome:
+       mkdir $@
+
+$(IDL_FILES:%=$(top_builddir)/idl/salome/%):$(IDL_FILES:%=$(top_srcdir)/idl/%)
 #      $(CP) $< $@
-       cp -f $< $@
+       cp -f $^ $(top_builddir)/idl/salome
 
 
 lib: pyidl
@@ -33,7 +36,7 @@ pyidl: $(PYTHON_BUILD_SITE) $(IDL_FILES:%.idl=$(PYTHON_BUILD_SITE)/%_idl.py)
 $(PYTHON_BUILD_SITE):
        $(INSTALL) -d  $@
 
-$(PYTHON_BUILD_SITE)/%_idl.py: %.idl
+$(PYTHON_BUILD_SITE)/%_idl.py: $(top_builddir)/idl/salome/%.idl
        $(OMNIORB_IDL) $(OMNIORB_IDLPYFLAGS) -C$(PYTHON_BUILD_SITE) $<
 
 
@@ -41,12 +44,12 @@ $(PYTHON_BUILD_SITE)/%_idl.py: %.idl
 install: install-pyidl install-idl
 
 # create directory $(idldir) and copy idl files into it
-install-idl: $(IDL_FILES)
+install-idl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
        $(INSTALL) -d  $(idldir)
        $(INSTALL_DATA) $^ $(idldir)
 
 
-install-pyidl: $(IDL_FILES)
+install-pyidl: $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
        $(INSTALL) -d  $(PYTHON_SITE_INSTALL)
        @for file in $^ dummy; do \
          if [ $$file != "dummy" ]; then \
@@ -61,6 +64,6 @@ cleandep:
 
 distclean:
        -$(RM) *.py
-       -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/%)
+       -$(RM) $(IDL_FILES:%=$(top_builddir)/idl/salome/%)
        -$(RM) Makefile
 
index 86d058af3edb6146c072744914e7f1f4446eee42..d354c1f55960f3fcca97e402df23a30fd2ee810a 100644 (file)
@@ -406,3 +406,4 @@ void VolumeSection::getZ( double& min, double& max)
   min = Zmin;
   max = Zmax;
 }
+
index 33f929e3d3044a05a647818a4e78446e11a646ab..751a6e686a41b6e0e668093429b760edd779b2a2 100644 (file)
@@ -137,6 +137,7 @@ void BasicGUI_ArcDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_ArcDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index b29e778fe2fbb0f8ff47d23026fd770857a46658..14b866419329f212910b0677e64ef756ede94700 100644 (file)
@@ -147,6 +147,7 @@ void BasicGUI_CircleDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_CircleDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 6093d492b59d09feea8cab9de6724fe1c53d6ce8..e7ea7199f855cbbd644afc635afe3f042867d86c 100644 (file)
@@ -153,6 +153,7 @@ void BasicGUI_EllipseDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_EllipseDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index b5b6498214c2e17164512a244a2503285e25959c..fe9f75b50a70b7960bec368bf33633660f949ee8 100644 (file)
@@ -135,6 +135,7 @@ void BasicGUI_LineDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_LineDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index cd429b1bcbe60a7c30042259ac9c4883784cb597..b280bfeae37fec572ecb52a33e2141df68adb4f3 100644 (file)
@@ -273,6 +273,7 @@ void BasicGUI_PlaneDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_PlaneDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 51b287dd25b73c6d78ec7bfd6fc5bf72b9702cf4..52128eeac78095bad0b0d0aae258fe034b232eee 100644 (file)
@@ -259,6 +259,7 @@ void BasicGUI_PointDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_PointDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if(mySimulationTopoDs.IsNull())
     return;
index 6d4eb0d24e861e0004ccda39a7e48f52bbce0a3f..03baf4300601573d889b7ac8628d9f39d04e52e0 100644 (file)
@@ -237,6 +237,7 @@ void BasicGUI_VectorDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_VectorDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 1403f8f02c915234e7a64d58532671ce09a4d866..51526930295a3b13e778220676670e6ec1ffed2c 100644 (file)
@@ -127,6 +127,7 @@ void BasicGUI_WorkingPlaneDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_WorkingPlaneDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if(myOkPlane)
     myBasicGUI->MakeWorkingPlane(myLoc, myDir);
index 1cc08269d418ae5e35046e0bb73dda0dc8b4293e..4123fed7242a2407107c7a53576cd764efbe9f78 100644 (file)
@@ -52,8 +52,8 @@ BooleanGUI_CutDlg::BooleanGUI_CutDlg(QWidget* parent, const char* name, BooleanG
 
   GroupCut = new DlgRef_2Sel_QTD(this, "GroupCut");
   GroupCut->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
-  GroupCut->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1"));
-  GroupCut->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2"));
+  GroupCut->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
+  GroupCut->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
   GroupCut->PushButton1->setPixmap(image1);
   GroupCut->PushButton2->setPixmap(image1);
 
index 62582e40bb569393bcb5dcce8b9ea15f31ddbbc2..04b28ef157f652a945e456da147c5c500b0262df 100644 (file)
@@ -41,86 +41,105 @@ DlgRef_4Sel1List_QTD::DlgRef_4Sel1List_QTD( QWidget* parent,  const char* name,
 
     Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
 
-    LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
-
-    Layout1->addWidget( LineEdit2, 1, 2 );
-
-    PushButton4 = new QPushButton( GroupBox1, "PushButton4" );
-    PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) );
-    PushButton4->setText( trUtf8( "" ) );
+    TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
+    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
+    TextLabel1->setText( trUtf8( "TL1" ) );
 
-    Layout1->addWidget( PushButton4, 4, 1 );
+    Layout1->addWidget( TextLabel1, 0, 0 );
 
     PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
     PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
     PushButton1->setText( trUtf8( "" ) );
 
     Layout1->addWidget( PushButton1, 0, 1 );
+    
+    LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
 
-    LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" );
-
-    Layout1->addWidget( LineEdit4, 4, 2 );
+    Layout1->addWidget( LineEdit1, 0, 2 );
+   
 
-    PushButton3 = new QPushButton( GroupBox1, "PushButton3" );
-    PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
-    PushButton3->setText( trUtf8( "" ) );
+    TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
+    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
+    TextLabel2->setText( trUtf8( "TL2" ) );
 
-    Layout1->addWidget( PushButton3, 3, 1 );
+    Layout1->addWidget( TextLabel2, 1, 0 );
 
     PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
     PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
     PushButton2->setText( trUtf8( "" ) );
 
     Layout1->addWidget( PushButton2, 1, 1 );
+    
+    LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
 
-    TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
-    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );
-    TextLabel1->setText( trUtf8( "TL1" ) );
+    Layout1->addWidget( LineEdit2, 1, 2 );
 
-    Layout1->addWidget( TextLabel1, 0, 0 );
+    
+    TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+    TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+    TextLabel3->setText( trUtf8( "TL3" ) );
+
+    Layout1->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
+    
+    ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
+    ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
 
-    TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
+    Layout1->addWidget( ComboBox1, 2, 2 );
+   
+
+    GroupBox1Layout->addLayout( Layout1, 0, 0 );
+    
+    DlgRef_4Sel1List_QTDLayout->addWidget( GroupBox1, 0, 0 );
+
+    
+    GroupBox2 = new QGroupBox( this, "GroupBox2" );
+    GroupBox2->setTitle( trUtf8( "" ) );
+    GroupBox2->setColumnLayout(0, Qt::Vertical );
+    GroupBox2->layout()->setSpacing( 6 );
+    GroupBox2->layout()->setMargin( 11 );
+    GroupBox2Layout = new QGridLayout( GroupBox2->layout() );
+    GroupBox2Layout->setAlignment( Qt::AlignTop );
+
+    Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); 
+    
+    TextLabel4 = new QLabel( GroupBox2, "TextLabel4" );
     TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
     TextLabel4->setText( trUtf8( "TL4" ) );
-
-    Layout1->addWidget( TextLabel4, 3, 0 );
+    
+    Layout2->addWidget( TextLabel4, 0, 0 );
     QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding );
     Layout1->addItem( spacer, 5, 2 );
 
-    LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
-
-    Layout1->addWidget( LineEdit1, 0, 2 );
+    PushButton3 = new QPushButton( GroupBox2, "PushButton3" );
+    PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) );
+    PushButton3->setText( trUtf8( "" ) );
 
-    TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
-    TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
-    TextLabel5->setText( trUtf8( "TL5" ) );
+    Layout2->addWidget( PushButton3, 0, 1 );
 
-    Layout1->addWidget( TextLabel5, 4, 0 );
+    LineEdit3 = new QLineEdit( GroupBox2, "LineEdit3" );
 
-    LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
+    Layout2->addWidget( LineEdit3, 0, 2 );
 
-    Layout1->addWidget( LineEdit3, 3, 2 );
 
-    TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
-    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
-    TextLabel2->setText( trUtf8( "TL2" ) );
-
-    Layout1->addWidget( TextLabel2, 1, 0 );
+    TextLabel5 = new QLabel( GroupBox2, "TextLabel5" );
+    TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
+    TextLabel5->setText( trUtf8( "TL5" ) );
 
-    ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" );
-    ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) );
+    Layout2->addWidget( TextLabel5, 1, 0 );
 
-    Layout1->addWidget( ComboBox1, 2, 2 );
+    PushButton4 = new QPushButton( GroupBox2, "PushButton4" );
+    PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) );
+    PushButton4->setText( trUtf8( "" ) );
 
-    TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
-    TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
-    TextLabel3->setText( trUtf8( "TL3" ) );
+    Layout2->addWidget( PushButton4, 1, 1 );
 
-    Layout1->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 );
+    LineEdit4 = new QLineEdit( GroupBox2, "LineEdit4" );
 
-    GroupBox1Layout->addLayout( Layout1, 0, 0 );
+    Layout2->addWidget( LineEdit4, 1, 2 );
 
-    DlgRef_4Sel1List_QTDLayout->addWidget( GroupBox1, 0, 0 );
+    GroupBox2Layout->addLayout( Layout2, 0, 0 );
+    
+    DlgRef_4Sel1List_QTDLayout->addWidget( GroupBox2, 1, 0 );
 }
 
 /*  
index f09d2729d29aec735a3024a7f70d89af51d8bc69..d8390e2a24ff113f01d496705f0357c74bfcf971 100644 (file)
@@ -29,6 +29,7 @@ public:
     ~DlgRef_4Sel1List_QTD();
 
     QGroupBox* GroupBox1;
+    QGroupBox* GroupBox2;
     QLineEdit* LineEdit2;
     QPushButton* PushButton4;
     QPushButton* PushButton1;
@@ -48,7 +49,9 @@ public:
 protected:
     QGridLayout* DlgRef_4Sel1List_QTDLayout;
     QGridLayout* GroupBox1Layout;
+    QGridLayout* GroupBox2Layout;
     QGridLayout* Layout1;
+    QGridLayout* Layout2;
 };
 
 #endif // DLGREF_4SEL1LIST_QTD_H
index 4234a8477415a9d9a98bd3bca83bda3962a680b2..f83cec33cf86f12a8a6cf7950addeb200ddaf4a8 100644 (file)
@@ -579,7 +579,7 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap
     } 
     else {
       aResult->NameType(tr("GEOM_SHAPE"));
-      sprintf(nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
+      sprintf(nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
     }
     SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name());
 
@@ -814,7 +814,7 @@ bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char*
       } 
       else {
        aResult->NameType(tr("GEOM_SHAPE"));
-       sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
+       sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
       }
       result = new GEOM_AISShape(Exp.Current(), nameG);
       IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
@@ -823,10 +823,10 @@ bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char*
   else {
     if ( myGeomBase->GetShapeTypeString(compound,Type)) {
       aResult->NameType(Type);
-      sprintf (nameG, "%s_%d", Type, myGeomGUI->GetNbGeom()++);
+      sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++);
     } else {
       aResult->NameType(tr("GEOM_SHAPE"));
-      sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
+      sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
     }
     result = new GEOM_AISShape(compound, nameG);
     IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM");
index c5b9bf2a7b4265fd7864b71a6e11979b5abe9dae..529b2b87d0174d047b3f0e2ad9e3c226816f7bed 100644 (file)
@@ -158,6 +158,8 @@ using namespace std;
 
 #include CORBA_SERVER_HEADER(SALOMEDS_Attributes)
 
+#include "Utils_ExceptHandlers.hxx"
+
 Standard_EXPORT static Standard_Boolean IsValid(const TopoDS_Shape& S) {
 #if OCC_VERSION_MAJOR >= 5
   return BRepAlgo::IsValid(S);
@@ -362,6 +364,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
                                                 CORBA::Object_ptr theObject,
                                                 const char* theName) throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   SALOMEDS::SObject_var aResultSO;
   if(CORBA::is_nil(theObject)) return aResultSO;
 
@@ -613,7 +616,7 @@ CORBA::Boolean GEOM_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) {
 //============================================================================
 SALOMEDS::TMPFile* GEOM_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID) {
   // Declare a sequence of the byte to store the copied object
-  SALOMEDS::TMPFile_var aStreamFile;
+  SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile;
 
   // Try to get GEOM_Shape object by given SObject
   SALOMEDS::GenericAttribute_var anAttr;
@@ -910,7 +913,15 @@ void GEOM_Gen_i::InsertInLabelMoreArguments(TopoDS_Shape main_topo,
 //=================================================================================
 CORBA::Short GEOM_Gen_i::NbLabels()
 {
-  return TDF_Tool::NbLabels( myCurrentOCAFDoc->Main() );
+  TDF_ChildIterator ChildIterator(myCurrentOCAFDoc->Main());
+  unsigned int i = 1;
+  
+  while (ChildIterator.More()) {
+    i++;
+    ChildIterator.Next();
+  }
+  return i;
+  //  return TDF_Tool::NbLabels( myCurrentOCAFDoc->Main() );
 }
 
 
@@ -1014,6 +1025,7 @@ int GEOM_Gen_i::SuppressFacesGlue( const TopoDS_Shape& S,
                                   TopoDS_Shape& aCompoundOfShells )
   throw (SALOME::SALOME_Exception)
 {  
+  Unexpect aCatch(SALOME_SalomeException);
   BRepTools_Quilt Glue;
   aCompoundOfShells.Nullify() ;
   
@@ -1102,6 +1114,7 @@ GEOM::GEOM_Shape::ListOfSubShapeID* GEOM_Gen_i::IndexOfFacesOfSubShell( const To
   throw (SALOME::SALOME_Exception)
 {
 
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
   ListOfID->length(0) ;
   if( subShell.IsNull() || subShell.ShapeType() != TopAbs_SHELL ) {
@@ -1218,6 +1231,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SuppressFaces( GEOM::GEOM_Shape_pt
                                                                const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID ) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Gen::ListOfGeomShapes_var listOfGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes;
   listOfGeomShapes->length(0) ;
 
@@ -1366,6 +1380,7 @@ void GEOM_Gen_i::SuppressHoleSubRoutine( const TopoDS_Shape& mainShape,
                                         TopTools_MapOfShape& MSwireEndEdges )
   throw (SALOME::SALOME_Exception)
 {  
+  Unexpect aCatch(SALOME_SalomeException);
   TopTools_MapOfShape MS ;
   TopTools_SequenceOfShape SU ;
   FreeEdgesFromMapOfFace(MSfaces, MS) ;        /* MS = free edges of MSfaces */
@@ -1466,6 +1481,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SuppressHolesInFaceOrShell( GEOM::GEOM_Shape_pt
                                                       const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdWires )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
 
   if( ListIdWires.length() < 1 )
@@ -1628,6 +1644,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SuppressHole( GEOM::GEOM_Shape_ptr shape,
                                         const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdEndFace )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Face aFace ;
   TopoDS_Wire aWire ;  
@@ -1917,6 +1934,7 @@ bool GEOM_Gen_i::BuildShapeHoleNotTraversing( const TopoDS_Shape& aShape,
                                              TopoDS_Shape& resultTds )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   BRep_Builder B;
   TopExp_Explorer exp ;
   TopoDS_Face newFace ;
@@ -1975,6 +1993,7 @@ bool GEOM_Gen_i::BuildShapeHoleTraversing( const TopoDS_Shape& aShape,
                                           TopoDS_Shape& resultTds )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   BRep_Builder B;
   TopExp_Explorer exp ;
   TopoDS_Face newFace ;
@@ -2114,6 +2133,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShape(GEOM::GEOM_Shape_ptr shape,
                                          const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
      throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   return SubShapesOne(shape, (TopAbs_ShapeEnum) ShapeType, ListOfID);
 }
 
@@ -2127,6 +2147,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShapeSorted(GEOM::GEOM_Shape_ptr shape,
                                                const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID)
      throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   return SubShapesOne(shape, (TopAbs_ShapeEnum) ShapeType, ListOfID, Standard_True);
 }
 
@@ -2141,6 +2162,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShapesOne( GEOM::GEOM_Shape_ptr shape,
                                              const Standard_Boolean Sort)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape mainShape;
   TopoDS_Shape mainTopo = GetTopoShape(shape);
@@ -2221,6 +2243,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapeAll(GEOM::GEOM_Shape_ptr s
                                                          CORBA::Short ShapeType)
      throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   return SubShapesAll(shape, (TopAbs_ShapeEnum) ShapeType);
 }
 
@@ -2233,6 +2256,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapeAllSorted(GEOM::GEOM_Shape
                                                                CORBA::Short ShapeType)
      throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   return SubShapesAll(shape, (TopAbs_ShapeEnum) ShapeType, Standard_True);
 }
 
@@ -2247,6 +2271,7 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapesAll(GEOM::GEOM_Shape_ptr
   throw (SALOME::SALOME_Exception)
 {
   /* List of sub shapes returned */
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Gen::ListOfGeomShapes_var listOfGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes;
   listOfGeomShapes->length(0) ;
   
@@ -2333,7 +2358,6 @@ GEOM::GEOM_Gen::ListOfGeomShapes* GEOM_Gen_i::SubShapesAll(GEOM::GEOM_Shape_ptr
   return listOfGeomShapes._retn() ;
 }
 
-
 //=================================================================================
 // function : MakeBoolean()
 // purpose  : Boolean operation according to the type 'operation'
@@ -2343,11 +2367,12 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBoolean(GEOM::GEOM_Shape_ptr shape1,
                                       CORBA::Long operation) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape shape ;
   TopoDS_Shape aShape1  ;
   TopoDS_Shape aShape2  ;
-  
+
   try {
     aShape1 = GetTopoShape(shape1) ;
     aShape2 = GetTopoShape(shape2) ;
@@ -2419,6 +2444,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFuse(GEOM::GEOM_Shape_ptr shape1,
                                    GEOM::GEOM_Shape_ptr shape2)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape aShape1 = GetTopoShape(shape1) ;
   TopoDS_Shape aShape2 = GetTopoShape(shape2) ;
@@ -2476,6 +2502,7 @@ GEOM::AxisStruct GEOM_Gen_i::MakeAxisStruct(CORBA::Double x,
                                      CORBA::Double vy,
                                      CORBA::Double vz) 
 {
+  int a = 1; int b = 0; int c; c=a/b;
   GEOM::AxisStruct A ;
   A.x  = x ;   A.y  = y ;   A.z  = z ;
   A.vx = vx ;  A.vy = vy ;  A.vz = vz ;
@@ -2521,6 +2548,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBox(CORBA::Double x1,
                                         CORBA::Double z2) 
      throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   gp_Pnt P1(x1,y1,z1);
   gp_Pnt P2(x2,y2,z2);
   GEOM::GEOM_Shape_var result ;
@@ -2553,6 +2581,7 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeCylinder(const GEOM::PointStruct& pstruct,
                                               CORBA::Double height) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
   gp_Pnt p(pstruct.x, pstruct.y, pstruct.z) ;
@@ -2585,6 +2614,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSphere(CORBA::Double x1,
                                      CORBA::Double radius) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   try {
@@ -2613,6 +2643,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeTorus( const GEOM::PointStruct& pstruct,
                                      CORBA::Double minor_radius )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
   gp_Pnt p(pstruct.x, pstruct.y, pstruct.z) ;
@@ -2647,6 +2678,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCone(const GEOM::PointStruct& pstruct,
                                    CORBA::Double height)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
   gp_Pnt p(pstruct.x, pstruct.y, pstruct.z) ;
@@ -2685,6 +2717,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCone(const GEOM::PointStruct& pstruct,
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   //VRV: OCC 4.0 migration
   IGESControl_Reader aReader;  
@@ -2695,8 +2728,11 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename)
       THROW_SALOME_CORBA_EXCEPTION("Error in reading import file", SALOME::BAD_PARAM);    }
     
     MESSAGE("ImportIGES : all Geometry Transfer" << endl ) ;
-    aReader.Clear();
-    aReader.TransferRoots(false);
+    //OCC 5.1.2 porting
+//     aReader.Clear();
+//     aReader.TransferRoots(false);
+    aReader.ClearShapes();
+    aReader.TransferRoots();
 
     MESSAGE("ImportIGES : count of shapes produced = " << aReader.NbShapes() << endl );    
     TopoDS_Shape shape = aReader.OneShape();
@@ -2726,6 +2762,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportIGES(const char* filename)
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportSTEP(const char* filename)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   //VRV: OCC 4.0 migration
   STEPControl_Reader aReader;
@@ -2801,6 +2838,7 @@ GEOM::GEOM_Shape_ptr
                         const CORBA::Short               Limit)
 throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var aResult;  
   TopoDS_Shape tds ;
   //MESSAGE ("In Partition");
@@ -2970,6 +3008,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
                                       CORBA::Short nbiter)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Face tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -3166,6 +3205,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeGlueFaces(GEOM::GEOM_Shape_ptr myShape,
   // appliquer BRepTools_SameParameter au compshell
   // (rendre parametres 2D des edges identiques aux parametres 3D)
 
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -3304,6 +3344,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSewing( const GEOM::GEOM_Gen::ListOfIOR& Li
                                       CORBA::Double precision )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   BRepOffsetAPI_Sewing aMethod ;
@@ -3342,6 +3383,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSewingShape( GEOM::GEOM_Shape_ptr aShape,
                                            CORBA::Double precision )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds, S ;
   BRepOffsetAPI_Sewing aMethod ;
@@ -3385,6 +3427,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSewingShape( GEOM::GEOM_Shape_ptr aShape,
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::OrientationChange(GEOM::GEOM_Shape_ptr aShape)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;  
   BRep_Builder aBuilder;  
 
@@ -3527,6 +3570,7 @@ GEOM::GEOM_Gen::ListOfIOR* GEOM_Gen_i::GetObjects(GEOM::GEOM_Shape_ptr shape)
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::ImportBREP(const char* filename)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   TopoDS_Shape tds ;
   GEOM::GEOM_Shape_var result ;
   
@@ -3557,6 +3601,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePlane(const GEOM::PointStruct& pstruct,
                                     CORBA::Double trimsize) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
 
@@ -3590,13 +3635,14 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeVertex(CORBA::Double x,
                                      CORBA::Double z) 
   throw (SALOME::SALOME_Exception)
 {
-
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ; 
   gp_Pnt P(x,y,z);
   TopoDS_Shape tds = BRepBuilderAPI_MakeVertex(P).Shape();
   if (tds.IsNull()) {
     THROW_SALOME_CORBA_EXCEPTION("Make Vertex/Point aborted", SALOME::BAD_PARAM);
   }
+  tds.Infinite(true);
   result = CreateObject(tds) ;
   const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ;
   result->ShapeId(entry);
@@ -3612,6 +3658,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFace( GEOM::GEOM_Shape_ptr wire,
                                     CORBA::Boolean wantplanarface ) 
   throw (SALOME::SALOME_Exception) 
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape aShape;
   TopoDS_Shape tds;
@@ -3645,6 +3692,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFace( GEOM::GEOM_Shape_ptr wire,
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeShell( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   BRepTools_Quilt Glue;
   TopoDS_Shape C;
@@ -3686,6 +3734,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeShell( const GEOM::GEOM_Gen::ListOfIOR& Lis
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSolid( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   Standard_Integer ish = 0;
   TopoDS_Compound  Res;
@@ -3734,6 +3783,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeLine(const GEOM::PointStruct& pstruct,
                                    const GEOM::DirStruct& dstruct)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result  ;
   gp_Pnt P1(pstruct.x, pstruct.y, pstruct.z);
   gp_Pnt P2(dstruct.PS.x, dstruct.PS.y, dstruct.PS.z) ;  
@@ -3750,6 +3800,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeLine(const GEOM::PointStruct& pstruct,
     THROW_SALOME_CORBA_EXCEPTION("Make Line aborted : null shape", SALOME::BAD_PARAM);
   }
   else {
+    tds.Infinite(true);
     result = CreateObject(tds) ;
     const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ;
     result->ShapeId(entry);
@@ -3766,6 +3817,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeVector(const GEOM::PointStruct& pstruct1,
                                      const GEOM::PointStruct& pstruct2)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result  ;
   TopoDS_Shape tds ;
   
@@ -3799,6 +3851,7 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeCircle(const GEOM::PointStruct& pstruct,
                                       CORBA::Double radius)
   throw (SALOME::SALOME_Exception) 
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
 
@@ -3832,6 +3885,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeEllipse( const GEOM::PointStruct& pstruct,
                                              CORBA::Double radius_minor )
   throw (SALOME::SALOME_Exception) 
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
   
@@ -3866,6 +3920,7 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeArc(const GEOM::PointStruct& pInit,
                                    const GEOM::PointStruct& pEnd)
   throw (SALOME::SALOME_Exception) 
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   try {
     gp_Pnt pI(pInit.x, pInit.y, pInit.z) ;
@@ -3905,6 +3960,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeTranslation( GEOM::GEOM_Shape_ptr myShape,
                                            CORBA::Double z)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
   if( aShape.IsNull() ) {
@@ -3935,6 +3991,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiTranslation1D( GEOM::GEOM_Shape_ptr my
                                                   CORBA::Short nbtimes )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
 
@@ -3990,6 +4047,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiTranslation2D( GEOM::GEOM_Shape_ptr my
                                                   CORBA::Short nbtimes2 )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   
@@ -4047,6 +4105,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiRotation1D( GEOM::GEOM_Shape_ptr mySha
                                                CORBA::Short nbtimes)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -4100,6 +4159,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiRotation2D( GEOM::GEOM_Shape_ptr mySha
                                                CORBA::Short nbtimes2 )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -4184,6 +4244,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMultiRotation2D( GEOM::GEOM_Shape_ptr mySha
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCopy( GEOM::GEOM_Shape_ptr Shape)
   throw (SALOME::SALOME_Exception) 
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(Shape) ;
@@ -4209,6 +4270,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeMirrorByPlane(GEOM::GEOM_Shape_ptr myShape,
                                             GEOM::GEOM_Shape_ptr shapePlane) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ; 
   TopoDS_Shape tds ;
   TopoDS_Shape aShape      = GetTopoShape(myShape) ;
@@ -4261,6 +4323,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeRotation( GEOM::GEOM_Shape_ptr myShape,
                                         CORBA::Double angle)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -4299,6 +4362,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeScaleTransform(GEOM::GEOM_Shape_ptr myShape
                                              CORBA::Double factor)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -4332,6 +4396,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeScaleTransform(GEOM::GEOM_Shape_ptr myShape
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCompound( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Compound C;
   BRep_Builder aBuilder;
@@ -4365,6 +4430,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeEdge(const GEOM::PointStruct& pstruct1,
                                    const GEOM::PointStruct& pstruct2)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result  ;
   TopoDS_Shape tds ;
   
@@ -4395,6 +4461,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeEdge(const GEOM::PointStruct& pstruct1,
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeWire( const GEOM::GEOM_Gen::ListOfIOR& ListShapes )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   BRepBuilderAPI_MakeWire MW ;
   TopoDS_Shape tds, Shape ; 
@@ -4438,6 +4505,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeRevolution(GEOM::GEOM_Shape_ptr myShape,
                                          double angle)
   throw (SALOME::SALOME_Exception)
 { 
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -4471,6 +4539,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePipe( GEOM::GEOM_Shape_ptr pathShape,
                                     GEOM::GEOM_Shape_ptr baseShape )
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Wire aWire ;
@@ -4527,6 +4596,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePrism( GEOM::GEOM_Shape_ptr myShape,
                                           const GEOM::PointStruct& P2 )
   throw (SALOME::SALOME_Exception)
 {              
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(myShape) ;
@@ -4560,6 +4630,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePrism( GEOM::GEOM_Shape_ptr myShape,
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeCDG(GEOM::GEOM_Shape_ptr aShape) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape shape = GetTopoShape(aShape) ;
@@ -4614,6 +4685,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::Archimede(GEOM::GEOM_Shape_ptr aShape,
                                     CORBA::Double aMeshingDeflection)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
 
   double cste = -1;
@@ -4687,6 +4759,7 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape,
                                              const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID ) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
 
@@ -4706,7 +4779,7 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape,
        fill.Add(E);
       }
       for (int i = 1;i<=fill.NbContours();i++) {
-       fill.SetRadius(radius,i);
+       fill.SetRadius(radius,i,i);
       }
       tds = fill.Shape();
       
@@ -4721,7 +4794,7 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeFillet( GEOM::GEOM_Shape_ptr shape,
        }
       }
       for (int i = 1;i<=fill.NbContours();i++) {
-       fill.SetRadius(radius,i);
+       fill.SetRadius(radius,i,i);
       }
       tds = fill.Shape();
     }
@@ -4751,6 +4824,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeChamfer( GEOM::GEOM_Shape_ptr shape,
                                              const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID ) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result;
   TopoDS_Shape tds ;
 
@@ -4809,6 +4883,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeChamfer( GEOM::GEOM_Shape_ptr shape,
 CORBA::Boolean GEOM_Gen_i::CheckShape(GEOM::GEOM_Shape_ptr shape) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   TopoDS_Shape S = GetTopoShape(shape) ;
   if( S.IsNull() ) {
     THROW_SALOME_CORBA_EXCEPTION("Shape is null", SALOME::BAD_PARAM);
@@ -4829,6 +4904,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePlacedBox(CORBA::Double x1,  CORBA::Double
                                         CORBA::Double delta1, CORBA::Double delta2, CORBA::Double delta3)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
 
@@ -4868,6 +4944,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePanel(GEOM::GEOM_Shape_ptr shape,
                                     CORBA::Double delta)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   GEOM::GEOM_Shape_var result ;
   TopoDS_Shape tds ;
   TopoDS_Shape aShape = GetTopoShape(shape) ;
@@ -4944,6 +5021,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePanel(GEOM::GEOM_Shape_ptr shape,
 void GEOM_Gen_i::ExportIGES(const char* filename,GEOM::GEOM_Shape_ptr theShape) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   if (theShape->_is_nil()) 
     {
       THROW_SALOME_CORBA_EXCEPTION("Export IGES aborted", SALOME::BAD_PARAM);
@@ -4976,6 +5054,7 @@ void GEOM_Gen_i::ExportIGES(const char* filename,GEOM::GEOM_Shape_ptr theShape)
 void GEOM_Gen_i::ExportBREP(const char* filename,GEOM::GEOM_Shape_ptr theShape)
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   if (theShape->_is_nil()) 
     {
       THROW_SALOME_CORBA_EXCEPTION("Export BRep aborted", SALOME::BAD_PARAM);
@@ -5000,6 +5079,7 @@ void GEOM_Gen_i::ExportBREP(const char* filename,GEOM::GEOM_Shape_ptr theShape)
 void GEOM_Gen_i::ExportSTEP(const char* filename,GEOM::GEOM_Shape_ptr theShape) 
   throw (SALOME::SALOME_Exception)
 {
+  Unexpect aCatch(SALOME_SalomeException);
   if (theShape->_is_nil()) 
     {
       THROW_SALOME_CORBA_EXCEPTION("Export STEP aborted", SALOME::BAD_PARAM);
index bf7cdf062ded3df548390effb5ce62b5784b8049..60db998b4c1dc28f64c317740f5e7768afbd06b3 100644 (file)
@@ -246,3 +246,12 @@ GEOM::GEOM_Gen_ptr GEOM_Shape_i::Engine()
 {
   return _engine;
 }
+
+//=======================================================================
+//function : getShape
+//purpose  : return the TopoDS_Shape when client and servant are colocated, be careful
+//=======================================================================
+
+long GEOM_Shape_i::getShape() {
+    return((long)(&_geom));
+}
index a976b31c415c3d72c5f9ac34c04d67b0af56a4a3..bf114b937a2a60e8a3deb23e5132fd592e3b9876 100644 (file)
@@ -112,6 +112,8 @@ public:
   GEOM::GEOM_Shape::TMPFile* GetShapeStream();
 
   GEOM::GEOM_Gen_ptr Engine();
+
+  long getShape();
 };
   
 #endif
index fd8b537af27f2d2297e347d35fd2e26427f4f852..05992b8325d5ccbf3c84710ca42b8e34569db63e 100644 (file)
@@ -227,6 +227,7 @@ bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString
          needDisplay = true;
        SALOMEDS::SObject_var obj = ActiveStudy->getStudyDocument()->FindObjectID(anIObject->getEntry());
        if(!obj->_is_nil()) {
+         if (strcmp(obj->GetFatherComponent()->GetName(), "GEOM")) continue;
          GEOM::GEOM_Shape_var aShape;
          if(obj->FindAttribute(aTmpAttr, "AttributeIOR")) {
            char *str = SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value();
@@ -370,6 +371,7 @@ bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString
 
        SALOMEDS::SObject_var obj = ActiveStudy->getStudyDocument()->FindObjectID(anIObject->getEntry());
        if(!obj->_is_nil()) {
+         if (strcmp(obj->GetFatherComponent()->GetName(), "GEOM")) continue;
          GEOM::GEOM_Shape_var aShape;
          if(obj->FindAttribute(aTmpAttr, "AttributeIOR")) {
            char *str = SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value();
@@ -506,11 +508,11 @@ bool GEOMBase::Display(GEOM::GEOM_Shape_ptr aShape, Standard_CString name)
       Standard_CString type;
       GetShapeTypeString(shape,type);
       aShape->NameType(type);
-      nameG += TCollection_AsciiString(type) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
+      nameG += TCollection_AsciiString(type) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->myNbGeom++) + TCollection_AsciiString("\0");
     } 
     else
-      nameG += TCollection_AsciiString(aShape->NameType()) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->GetNbGeom()++) + TCollection_AsciiString("\0");
-  } 
+      nameG += TCollection_AsciiString(aShape->NameType()) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->myNbGeom++) + TCollection_AsciiString("\0");
+  }
   else 
     nameG = TCollection_AsciiString(name);
   
index e3fb21cb3e40323358987072ae22f8660b65b426..8c1345ff4eb0ee0741b3f48658895db7107d9eb6 100644 (file)
@@ -47,34 +47,58 @@ using namespace std;
 #include <TopTools_ListOfShape.hxx>
 
 
+#include <unistd.h>
+
+#define HST_CLIENT_LEN 256
+
 
 //=======================================================================
 // function : Load()
 // purpose  : 
 //=======================================================================
-static TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape )
+TopoDS_Shape GEOM_Client::Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape )
 {
-  TopoDS_Shape S;
-  /* get sequence of bytes of resulting brep shape from GEOM server */
-  GEOM::GEOM_Shape::TMPFile_var SeqFile = aShape->GetShapeStream();
-  int sizebuf = SeqFile->length();
-  char* buf;
-  buf = (char*) &SeqFile[0];
-  istrstream streamBrep(buf,sizebuf);
-  BRep_Builder aBuilder;
-  BRepTools::Read(S, streamBrep, aBuilder);
-  return S;
+    char hst_client[HST_CLIENT_LEN];
+    gethostname(hst_client, HST_CLIENT_LEN);
+
+    Engines::Container_var ctn_server = geom->GetContainerRef();
+    long                   pid_server = ctn_server->getPID();
+
+    if ( (pid_client==pid_server) && (strcmp(hst_client, ctn_server->getHostName())==0) ) {
+        TopoDS_Shape* S = (TopoDS_Shape*)(aShape->getShape());
+        return(*S);
+    } else {
+        /* get sequence of bytes of resulting brep shape from GEOM server */
+        TopoDS_Shape S;
+        GEOM::GEOM_Shape::TMPFile_var SeqFile = aShape->GetShapeStream();
+        int sizebuf = SeqFile->length();
+        char* buf;
+        buf = (char*) &SeqFile[0];
+        istrstream streamBrep(buf,sizebuf);
+        BRep_Builder aBuilder;
+        BRepTools::Read(S, streamBrep, aBuilder);
+        return(S);
+    };
 }
 
 
 //=======================================================================
 // function : Create()
-// purpose  : 
+// purpose  : Create in client not in a container
 //=======================================================================
 GEOM_Client::GEOM_Client()
 {
+  pid_client = (-1);
 }
 
+//=======================================================================
+// function : Create()
+// purpose  : 
+//=======================================================================
+GEOM_Client::GEOM_Client(Engines::Container_ptr client)
+{
+  pid_client = client->getPID();
+}
 
 //=======================================================================
 // function : Find()
@@ -151,7 +175,7 @@ unsigned int GEOM_Client::BufferLength()
 
 TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape ) 
 { 
-
+  
   TopoDS_Shape            S; 
   TCollection_AsciiString IOR(aShape->Name()); 
   Standard_Integer        anIndex = Find(IOR, S); 
index 09d4351b7d4782709bef7eae208dfd7103009bd4..0dbaddd6362459e75748c6082bdbb0b4d9679417 100644 (file)
@@ -75,18 +75,21 @@ public:
   // Methods PUBLIC
   // 
   Standard_EXPORT   GEOM_Client();
+  Standard_EXPORT   GEOM_Client(Engines::Container_ptr client);
   Standard_EXPORT   Standard_Integer Find( const TCollection_AsciiString& ShapeIOR, TopoDS_Shape& S ) ;
   Standard_EXPORT   void Bind( const TCollection_AsciiString& ShapeIOR, const TopoDS_Shape& S ) ;
   Standard_EXPORT   TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape );
   Standard_EXPORT   void RemoveShapeFromBuffer( const TCollection_AsciiString& shapeIOR ) ;
   Standard_EXPORT   void ClearClientBuffer() ;
   Standard_EXPORT   unsigned int BufferLength() ;
+                    TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape);
 
 private: 
   // Fields PRIVATE
   //
   TColStd_SequenceOfAsciiString myIORs ;
   TopTools_SequenceOfShape myShapes ;
+  long  pid_client;
 };
 
 
index 210807916b7d1389f1eee823fcc56348f896de37..12833ebc5aafac3362ed8e0a4985ba2ee2c85b02 100644 (file)
@@ -81,9 +81,16 @@ GEOMContext* GEOMContext::GetOrCreateGeomGUI(QAD_Desktop* desktop)
     /* GetCurrentStudy */
     int studyId = desktop->getActiveStudy()->getStudyId();
     GeomGUI->myComponentGeom->GetCurrentStudy(studyId);
+
     GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
   }
 
+  /* GetCurrentStudy */
+  int studyId = desktop->getActiveStudy()->getStudyId();
+  GeomGUI->myComponentGeom->GetCurrentStudy(studyId);
+
+  //GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
+
   return GeomGUI;
 }
 
index d31f1b6dc9ed135b1b59bbb31b3520f8c9403c71..f5746fc2ffcc310432dc4f6aaa99c68d50f355b9 100644 (file)
@@ -49,12 +49,13 @@ public :
 
 private :
   QDialog* myActiveDialogBox; /* Unique active dialog box */
-  int myNbGeom; /* Unique name for a geom entity */
   GEOM_Client myShapeReader;
   Standard_CString myFatherior;
   Sketch mySketcher;
 
 public :
+  int myNbGeom; /* Unique name for a geom entity */
+
   static GEOMContext* GetOrCreateGeomGUI(QAD_Desktop* desktop);
   static GEOMContext* GetGeomGUI();
 
index 1b91d57f8789fb6889ce6a65ed301cbcca51ec07..167a8b7e06f5e1bb9ad3e9ea4fcbd69da07abbf1 100644 (file)
@@ -937,6 +937,10 @@ msgstr "Keep Object"
 msgid "GEOM_PARTITION_ORIENTATION"
 msgstr "Change Orientation"
 
+#: GeometryGUI_PartitionDlg.cxx:45
+msgid "SUPPRESS_RESULT"
+msgstr "Suppress Result"
+
 #: GeometryGUI_PipeDlg.cxx:47
 msgid "GEOM_PIPE_TITLE"
 msgstr "Pipe Construction"
@@ -1299,3 +1303,10 @@ msgstr "Values"
 
 msgid "GEOM_SKETCHER_TYPE"
 msgstr "Type"
+
+msgid "GEOM_FILLET_ABORT"
+msgstr "Fillet can't be computed with radius %1"
+
+msgid "GEOM_CHAMFER_ABORT"
+msgstr "Chamfer can't be computed with %1 and %2"
+
index fdeb94661fd7e544336ae2ff31e896061e7e3595..f502017f4c8a460ac28493b7cce161ad223d3c7e 100644 (file)
@@ -49,7 +49,7 @@ msgstr "&Exploser"
 
 #: GeometryGUI.cxx:563
 msgid "GEOM_INF_LOADED"
-msgstr "Le fichier %1 est chargé."
+msgstr "Le fichier %1 est chargé."
 
 #
 #==============================================================================
@@ -57,15 +57,15 @@ msgstr "Le fichier %1 est charg
 
 #: GeometryGUI.cxx:3069
 msgid "GEOM_PRP_COMMAND"
-msgstr "Pas de commande associée Ã  l'id = %1."
+msgstr "Pas de commande associée Ã  l'id = %1."
 
 #: GeometryGUI.cxx:4977
 msgid "GEOM_PRP_ABORT"
-msgstr "L'opération a echoué"
+msgstr "L'opération a echoué"
 
 #: GeometryGUI.cxx:5058
 msgid "GEOM_PRP_DONE"
-msgstr "Opération effectuée"
+msgstr "Opération effectuée"
 
 #: GeometryGUI.cxx:3717
 msgid "GEOM_PRP_LOADING"
@@ -73,11 +73,11 @@ msgstr "Chargement de %1 ..."
 
 #: GeometryGUI.cxx:1412
 msgid "GEOM_PRP_NULLSHAPE"
-msgstr "Erreur, objet inconsistant ou inapproprié !"
+msgstr "Erreur, objet inconsistant ou inapproprié !"
 
 #: GeometryGUI.cxx:5072
 msgid "GEOM_PRP_READY"
-msgstr "Prêt..."
+msgstr "Prêt..."
 
 #: GeometryGUI.cxx:1690
 msgid "GEOM_PRP_SELECT_SUBSHAPES"
@@ -127,11 +127,11 @@ msgstr "Angle :"
 
 #: GeometryGUI.cxx:3941
 msgid "GEOM_MEN_COMPONENT"
-msgstr "Géometrie"
+msgstr "Géometrie"
 
 #: GeometryGUI.cxx:4389
 msgid "GEOM_MEN_ENTER_ANGLE"
-msgstr "Saisir un angle en degrés"
+msgstr "Saisir un angle en degrés"
 
 #: GeometryGUI.cxx:3758
 msgid "GEOM_MEN_EXPORT"
@@ -250,7 +250,7 @@ msgstr "Objet %1"
 
 #Object and result
 msgid "GEOM_OBJECT_RESULT"
-msgstr "Objet Et Résultat"
+msgstr "Objet Et Résultat"
 
 #Point
 msgid "GEOM_POINT"
@@ -310,7 +310,7 @@ msgstr "poids"
 
 #Coordinates
 msgid "GEOM_COORDINATES"
-msgstr "Coordonnées"
+msgstr "Coordonnées"
 
 #Coor.
 msgid "GEOM_COOR"
@@ -362,11 +362,11 @@ msgstr "Base"
 
 #Water Density
 msgid "GEOM_WATER_DENSITY"
-msgstr "Densité de l'eau :"
+msgstr "Densité de l'eau :"
 
 #Meshing Deflection
 msgid "GEOM_MESHING_DEFLECTION"
-msgstr "Déflection Du Maillage :"
+msgstr "Déflection Du Maillage :"
 
 #Dimensions
 msgid "GEOM_DIMENSIONS"
@@ -374,11 +374,11 @@ msgstr "Dimensions"
 
 #Precision
 msgid "GEOM_PRECISION"
-msgstr "Précision :"
+msgstr "Précision :"
 
 #Selection
 msgid "GEOM_SELECTION"
-msgstr "Sélection"
+msgstr "Sélection"
 
 #Nb. Times
 msgid "GEOM_NB_TIMES"
@@ -414,7 +414,7 @@ msgstr "Partition"
 
 #Tolerance
 msgid "GEOM_TOLERANCE"
-msgstr "Tolérance"
+msgstr "Tolérance"
 
 #Orientation
 msgid "GEOM_ORIENTATION"
@@ -426,7 +426,7 @@ msgstr "Pipe"
 
 #Revolution
 msgid "GEOM_REVOLUTION"
-msgstr "Révolution"
+msgstr "Révolution"
 
 #Rotation
 msgid "GEOM_ROTATION"
@@ -434,7 +434,7 @@ msgstr "Rotation"
 
 #Archimede
 msgid "GEOM_ARCHIMEDE"
-msgstr "Archimède"
+msgstr "Archimède"
 
 #Common
 msgid "GEOM_COMMON"
@@ -594,7 +594,7 @@ msgstr "Solide"
 
 #Sphere
 msgid "GEOM_SPHERE"
-msgstr "Sphère"
+msgstr "Sphère"
 
 #Conical Face
 msgid "GEOM_SURFCONE"
@@ -606,7 +606,7 @@ msgstr "Face Cylindrique"
 
 #Spherical Face
 msgid "GEOM_SURFSPHERE"
-msgstr "Face Sphèrique"
+msgstr "Face Sphèrique"
 
 #Toroidal Face
 msgid "GEOM_SURFTORUS"
@@ -638,7 +638,7 @@ msgstr "Wire"
        
 #Parameter
 msgid "GEOM_PARAMETER"
-msgstr "Paramètre :"
+msgstr "Paramètre :"
 
 
 #
@@ -691,7 +691,7 @@ msgstr "D2 :"
 
 #: GeometryGUI.cxx
 msgid "GEOM_STEP_TITLE"
-msgstr "Increment par défaut lors des constructions"
+msgstr "Increment par défaut lors des constructions"
 
 #: GeometryGUI_ArcDlg.cxx:45
 msgid "GEOM_ARC_TITLE"
@@ -699,7 +699,7 @@ msgstr "Construction d'un Arc"
 
 #: GeometryGUI_ArchimedeDlg.cxx:55
 msgid "GEOM_ARCHIMEDE_TITLE"
-msgstr "Construction d'Archimède"
+msgstr "Construction d'Archimède"
 
 #: GeometryGUI_BndBoxDlg.cxx:59
 msgid "GEOM_BNDBOX_TITLE"
@@ -739,7 +739,7 @@ msgstr "Construction d'un Cercle"
 
 #: GeometryGUI_CenterMassDlg.cxx:77
 msgid "GEOM_CMASS_TITLE"
-msgstr "Centre De Gravité"
+msgstr "Centre De Gravité"
 
 msgid "GEOM_PLANE_SIZE"
 msgstr "Taille du plan :"
@@ -750,7 +750,7 @@ msgstr "BOOLEEN : Jonction De Deux Objets"
 
 #: GeometryGUI_CompoundDlg.cxx:44
 msgid "GEOM_COMPOUND_TITLE"
-msgstr "Création d'un Compound"
+msgstr "Création d'un Compound"
 
 #: GeometryGUI_ConeDlg.cxx:49
 msgid "GEOM_CONE_TITLE"
@@ -782,27 +782,27 @@ msgstr "Objets Et Resultats"
 
 #: GeometryGUI_EdgeDlg.cxx:47
 msgid "GEOM_EDGE_TITLE"
-msgstr "Création d'un Edge"
+msgstr "Création d'un Edge"
 
 #: GeometryGUI_FilletDlg.cxx:58
 msgid "GEOM_FILLET_TITLE"
-msgstr "Construction d'un Congé"
+msgstr "Construction d'un Congé"
 
 #: GeometryGUI_FilletDlg.cxx:58
 msgid "GEOM_FILLET_ALL"
-msgstr "Congé sur toute la Shape"
+msgstr "Congé sur toute la Shape"
 
 #: GeometryGUI_FilletDlg.cxx:58
 msgid "GEOM_FILLET_EDGES"
-msgstr "Congé sur Edges de la Shape"
+msgstr "Congé sur Edges de la Shape"
 
 #: GeometryGUI_FilletDlg.cxx:58
 msgid "GEOM_FILLET_FACES"
-msgstr "Congé sur Faces de la Shape"
+msgstr "Congé sur Faces de la Shape"
 
 #: GeometryGUI_FaceDlg.cxx:49
 msgid "GEOM_FACE_TITLE"
-msgstr "Création d'une Face"
+msgstr "Création d'une Face"
 
 #: GeometryGUI_FaceDlg.cxx:78
 msgid "GEOM_FACE_FFW"
@@ -810,7 +810,7 @@ msgstr "Face a partir d'un wire"
 
 #: GeometryGUI_FaceDlg.cxx:103
 msgid "GEOM_FACE_OPT"
-msgstr "Création d'une Face plane"
+msgstr "Création d'une Face plane"
 
 #: GeometryGUI_FillingDlg.cxx:53
 msgid "GEOM_FILLING_TITLE"
@@ -912,6 +912,10 @@ msgstr "Objet garde"
 msgid "GEOM_PARTITION_ORIENTATION"
 msgstr "Change l'orientation"
 
+#: GeometryGUI_PartitionDlg.cxx:45
+msgid "SUPPRESS_RESULT"
+msgstr "Suppress Result"
+
 #: GeometryGUI_PipeDlg.cxx:47
 msgid "GEOM_PIPE_TITLE"
 msgstr "Construction d'une Pipe"
@@ -1115,7 +1119,7 @@ msgid "GEOM_MULTIROTATION_DOUBLE"
 msgstr "Multi Rotation Double"
 
 msgid "GEOM_PARAM_POINT"
-msgstr "Point paramétrique"
+msgstr "Point paramétrique"
 
 #
 #==============================================================================
@@ -1127,4 +1131,11 @@ msgstr "Filaire"
 
 #: GeometryGUI.cxx:4613
 msgid "GEOM_MEN_SHADING"
-msgstr "Ombré"
+msgstr "Ombré"
+
+msgid "GEOM_FILLET_ABORT"
+msgstr "Le congé ne peut-être realisé avec un rayon de %1 "
+
+msgid "GEOM_CHAMFER_ABORT"
+msgstr "Le chanfrein ne peut-être realisé avec %1 et %2 "
+
index 357507e17aef52a342c17ea19f8c2e5a60beea0d..961533df5f2db559da432cfad7b373a332a9eb76 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "GeometryGUI.h"
 
 // Open CASCADE Includes
@@ -40,9 +39,12 @@ using namespace std;
 #include "OCCViewer_Viewer3d.h"
 #include "OCCViewer_ViewPort3d.h"
 #include "VTKViewer_ViewFrame.h"
+#include "VTKViewer_InteractorStyleSALOME.h"
 
 #include "SALOME_Selection.h"
 
+using namespace std;
+
 /* The object itself created in the static method 'GetOrCreateGEOMBase()' */
 static GEOMContext* GeomGUI = 0;
 
@@ -336,6 +338,30 @@ bool GeometryGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFr
   return false;
 }
 
+static void UpdateVtkSelection(QAD_Desktop* parent)
+{
+  if (!parent->getActiveStudy()) return;
+
+  QList<QAD_StudyFrame> aFrameList = parent->getActiveStudy()->getStudyFrames();
+
+  for (QAD_StudyFrame* aStudyFrame = aFrameList.first(); aStudyFrame; aStudyFrame = aFrameList.next()) {
+    if (aStudyFrame->getTypeView() == VIEW_VTK) {
+      QAD_ViewFrame* aViewFrame = aStudyFrame->getRightFrame()->getViewFrame();
+      VTKViewer_ViewFrame* aVtkViewFrame = dynamic_cast<VTKViewer_ViewFrame*>(aViewFrame);
+      if (!aVtkViewFrame) continue;
+      VTKViewer_RenderWindowInteractor* anInteractor = aVtkViewFrame->getRWInteractor();
+      if (anInteractor) {
+       anInteractor->SetSelectionProp();
+       anInteractor->SetSelectionTolerance();
+       VTKViewer_InteractorStyleSALOME* aStyle = anInteractor->GetInteractorStyleSALOME();
+       if (aStyle) {
+         aStyle->setPreselectionProp();
+       }
+      }
+    }
+  }
+}
+
 
 //=================================================================================
 // function : SetSettings()
@@ -409,6 +435,9 @@ bool GeometryGUI::SetSettings(QAD_Desktop* parent)
   Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings
   Mb->setItemEnabled(414, ViewOCC);// Isos Settings
 
+  // PAL5356: update VTK selection
+  ::UpdateVtkSelection(parent);
+
   return true;
 }
 
@@ -507,6 +536,7 @@ void GeometryGUI::activeStudyChanged(QAD_Desktop* parent)
 
   if(GeomGUI != 0) {
     QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
+    GeomGUI->myNbGeom = GeomGUI->myComponentGeom->NbLabels();
     if(GeomGUI->myState == 2) {
       Mb->setItemEnabled(405, false);//SKETCHER
       GeomGUI->GetSketcher().Clear();
@@ -529,6 +559,10 @@ void GeometryGUI::activeStudyChanged(QAD_Desktop* parent)
     GeomGUI->EmitSignalCloseAllDialogs();
     GeomGUI = 0;
   }
+
+  // PAL5356: update VTK selection
+  ::UpdateVtkSelection(parent);
+
   return;
 }
 
@@ -594,4 +628,10 @@ extern "C"
     buffer[0] = (int)VIEW_OCC;
     if (--bufferSize) buffer[1] = (int)VIEW_VTK;
   }
+
+  void deactivate()
+  {
+    if ( GeomGUI )
+      GeomGUI->EmitSignalCloseAllDialogs();
+  }
 }
index a977323fc3e5b4b3445bec24033f3d119d2154f4..8984216697a47d2ea9be3bda03f17adf6442de5f 100644 (file)
@@ -150,7 +150,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
       {
        if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
          break;
-
+       
        OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
        Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
 
@@ -163,7 +163,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
        } 
        else {
          Quantity_Color Default = Quantity_Color();
-         color = QColor ((int)Default.Red()  * 255.0, (int)Default.Green()* 255.0, (int)Default.Blue() * 255.0);
+         color = QColor ((int)( Default.Red() * 255.0 ), (int)( Default.Green() * 255.0 ), (int)( Default.Blue() * 255.0 ) );
        }
        
        QColor c = QColorDialog::getColor(color, QAD_Application::getDesktop());
@@ -372,7 +372,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
            Quantity_Color CSFColor;
            Shape->Color(CSFColor);
            
-           QColor c = QColorDialog::getColor(QColor(CSFColor.Red()  * 255.0, CSFColor.Green()* 255.0, CSFColor.Blue() * 255.0), QAD_Application::getDesktop());
+           QColor c = QColorDialog::getColor(QColor((int)(CSFColor.Red() * 255.0), (int)(CSFColor.Green() * 255.0), (int)(CSFColor.Blue() * 255.0)), QAD_Application::getDesktop());
            
            if(c.isValid()) {
              CSFColor = Quantity_Color (c.red()/255., c.green()/255., c.blue()/255., Quantity_TOC_RGB);
@@ -478,13 +478,50 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
            while(useSubItems?anIter->More():!anAttr->_is_nil()) { 
              if(!obj->FindAttribute(anAttr, "AttributeIOR") &&
                  obj->FindAttribute(anAttr, "AttributePersistentRef")) {
-               // load
-               Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM");
-               if (!CORBA::is_nil(comp)) {
-                 SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp);
-                 SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
-                 aStudyBuilder->LoadWith(aStudy->FindComponent("GEOM"),driver);
-               } 
+               
+               SALOMEDS::SComponent_var FComp = obj->GetFatherComponent();
+               if (!CORBA::is_nil(FComp)) {
+                 if (FComp->FindAttribute(anAttr, "AttributeName")) {
+                   SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
+                   QString compName = parent->getComponentName(aName->Value());
+                   //              parent->loadComponentData(parent->getComponentName(aName->Value()));
+                   Engines::Component_var comp ;
+                   if ( compName.compare("SUPERV") == 0 ) {
+                     comp = parent->getEngine( "SuperVisionContainer", compName) ;
+                   }
+                   else {
+                     comp = parent->getEngine( "FactoryServer", compName);
+                     if ( comp->_is_nil() )
+                       comp = parent->getEngine( "FactoryServerPy", compName);
+                   }
+
+                   if (!CORBA::is_nil(comp)) {
+                     SALOMEDS::Driver_var   driver = SALOMEDS::Driver::_narrow(comp);
+                     if (!CORBA::is_nil(driver)) {
+                       SALOMEDS::StudyBuilder_var  B = aStudy->NewBuilder();
+                       if (!CORBA::is_nil(B)) {
+                         B->LoadWith(FComp,driver);
+                       } else {
+                         return false;
+                       }
+                     } else {
+                       MESSAGE("loadComponentData(): Driver is null");
+                       return false;
+                     }
+                   } else {
+                     MESSAGE("loadComponentData(): Engine is null");
+                     return false;
+                   }
+                   //          // load
+                   //          Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM");
+                   //          if (!CORBA::is_nil(comp)) {
+                   //            SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp);
+                   //            SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
+                   //            SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM");
+                   //            if (!CORBA::is_nil(SC))
+                   //              aStudyBuilder->LoadWith(SC,driver);
+                 } 
+               }
                else {
                  MESSAGE("Component is null");
                }
@@ -752,7 +789,7 @@ bool GEOMToolsGUI::Import(int aState)
 //      if (aLocked) return false;
     father->ComponentIOR(myGeomGUI->GetFatherior());
 
-    QString nameShape = QAD_Tools::getFileNameFromPath(file,false) +  QString("_%1").arg(myGeomGUI->GetNbGeom()++);
+    QString nameShape = QAD_Tools::getFileNameFromPath(file,false) +  QString("_%1").arg(myGeomGUI->myNbGeom++);
 
     if(myGeomBase->Display(aShape, strdup(nameShape.latin1()))) {
       QAD_Application::getDesktop()->getActiveStudy()->setMessage( tr("GEOM_INF_LOADED").arg(QAD_Tools::getFileNameFromPath( file )) );
index 968e4df57e8b74ec6d004d3dd9d49dc4d9ae7de8..fc32ef9806b878d94462c601ada321e4f798d93f 100644 (file)
@@ -172,6 +172,7 @@ void GenerationGUI_FillingDlg::ClickOnOk()
 //=================================================================================
 void GenerationGUI_FillingDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index dae7c23f6aa9033b51fcc686a88c8c44178e6a87..d1bc9969e0a6bdbf3df5392a7664e86d48366cc1 100644 (file)
@@ -187,7 +187,7 @@ void GenerationGUI_PipeDlg::SelectionIntoArgument()
   }
   else if(myEditCurrentArgument == GroupPoints->LineEdit2) {
     myOkShape2 = false;
-    if(S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE && S.ShapeType() != TopAbs_VERTEX) {
+    if(S.ShapeType() == TopAbs_WIRE || S.ShapeType() == TopAbs_EDGE ) {
       myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
       if(!testResult)
        return;
index f2b9ea58ff2e7c910447e6882bff91dbae183d7c..b9c8057ec3e3b509cc3d18a1efc73cf334655d3a 100644 (file)
@@ -146,6 +146,7 @@ void GenerationGUI_PrismDlg::ClickOnOk()
 //=================================================================================
 void GenerationGUI_PrismDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 79e7e1bac5bc58a4fa900720ed73701543b49c09..69d69205c3916b6fe683d8dee02cdf20b9e9caf6 100644 (file)
@@ -145,6 +145,7 @@ void GenerationGUI_RevolDlg::ClickOnOk()
 //=================================================================================
 void GenerationGUI_RevolDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 23c2895c3796403e0b035756c85729301bd5449a..6c3f1a91ca566f415a4909390e620631177fd424 100644 (file)
@@ -37,6 +37,8 @@ using namespace std;
 
 #include <qtextedit.h>
 
+#include <BRep_Tool.hxx>
+
 //=================================================================================
 // class    : MeasureGUI_WhatisDlg()
 // purpose  : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the 
@@ -211,8 +213,15 @@ void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
     return;
 
   TCollection_AsciiString Astr; 
-  Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n";
 
+  if ( S.ShapeType() == TopAbs_EDGE ) {
+    if( BRep_Tool::Degenerated(TopoDS::Edge(S)) ) {
+      Astr = Astr + " " + strdup(SelectedName.latin1()) + " is a degenerated edge \n";
+    }
+  }
+  
+  Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n";
+  
   try {
     int iType, nbTypes [TopAbs_SHAPE];
     for(iType = 0; iType < TopAbs_SHAPE; ++iType)
index 77468ea95ea3fade45d41d16b14a272360ea6263..7e272e91db9d02ee50b0ab36c24e3acf99dd9894 100644 (file)
@@ -152,6 +152,7 @@ void OperationGUI_ArchimedeDlg::ClickOnOk()
 //=================================================================================
 void OperationGUI_ArchimedeDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if(myOkIO)
     myOperationGUI->Archimede(myIO, myWeight, myWaterDensity, myMeshingDeflection);
index 92085d2290554577aa719305a9c841c691fc3589..ca7c5d0cda0a3b086f637d158cfb10868d492168 100644 (file)
@@ -30,6 +30,7 @@ using namespace std;
 #include "OperationGUI_ChamferDlg.h"
 
 #include "DisplayGUI.h"
+#include "QAD_MessageBox.h"
 
 #include <AIS_InteractiveContext.hxx>
 #include <BRepFilletAPI_MakeChamfer.hxx>
@@ -38,6 +39,9 @@ using namespace std;
 #include <TopExp.hxx>
 #include <Precision.hxx>
 
+#include <Standard_ErrorHandler.hxx> 
+#include <Standard_Failure.hxx>
+
 //=================================================================================
 // class    : OperationGUI_ChamferDlg()
 // purpose  : Constructs a OperationGUI_ChamferDlg which is a child of 'parent', with the 
@@ -200,6 +204,11 @@ void OperationGUI_ChamferDlg::ConstructorsClicked(int constructorId)
     myUseLocalContext = false;
   }
 
+  if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) {
+    myConstructorId = constructorId = 0; //No subshape selection if viewer is not OCC
+    RadioButton1->setChecked(TRUE);
+  }
+
   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
   switch (constructorId)
     {
@@ -271,6 +280,7 @@ void OperationGUI_ChamferDlg::ClickOnOk()
 //=================================================================================
 void OperationGUI_ChamferDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QApplication::setOverrideCursor(Qt::waitCursor);
   QAD_Application::getDesktop()->putInfo(tr(""));
   myGeomBase->EraseSimulationShape();
@@ -538,49 +548,45 @@ void OperationGUI_ChamferDlg::ResetStateOfDialog()
 //=================================================================================
 void OperationGUI_ChamferDlg::MakePreview()
 {
-  QApplication::setOverrideCursor(Qt::waitCursor);
-
-  if(!myOkShape) {
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-
-  GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
-  ListOfID->length(0);
-
-  SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
-  SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(myShapeIOR);
-  if(theObj->_is_nil()) {
-    QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-
-  try {
-    if(myD1 <= Precision::Confusion() || myD2 <= Precision::Confusion()) {
-      QApplication::restoreOverrideCursor();
-      return;
+  QApplication::setOverrideCursor( Qt::waitCursor );
+  TopoDS_Shape tds ;
+  try
+  {
+  BRepFilletAPI_MakeChamfer MC(myShape);
+  switch (myConstructorId)
+    {
+    case 0: /* Chamfer All */
+      {
+       TopTools_IndexedDataMapOfShapeListOfShape M;
+       TopExp::MapShapesAndAncestors(myShape,TopAbs_EDGE,TopAbs_FACE,M);
+       for (int i = 1;i<=M.Extent();i++) 
+         {
+           TopoDS_Edge E = TopoDS::Edge(M.FindKey(i));
+           TopoDS_Face F = TopoDS::Face(M.FindFromIndex(i).First());
+           if (!BRepTools::IsReallyClosed(E, F) && !BRep_Tool::Degenerated(E))
+             MC.Add(myD1, myD2,E,F);
+         }
+       tds = MC.Shape();
+       break;
+      }
+//    case 1: /* Chamfer edges */
+//    case 2: /* Chamfer Faces */
+    }
+   if (!tds.IsNull()) 
+    {
+      mySimulationTopoDs = tds;
+      myGeomBase->DisplaySimulationShape( mySimulationTopoDs ) ; 
     }
 
-    GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(myShapeIOR);
-    GEOM::GEOM_Shape_var result = myGeom->MakeChamfer(aShape, myD1, myD2, myShapeType, ListOfID);
-    if(result->_is_nil()) {
-      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
+  }  
+  catch(Standard_Failure)
+    {
+      QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_CHAMFER_ABORT").arg(myD1).arg(myD2), tr("GEOM_BUT_OK"));
+      Group1->SpinBox_DX->SetValue(5.0);
+      Group1->SpinBox_DY->SetValue(5.0);
+      myGeomBase->EraseSimulationShape() ; 
+      mySimulationTopoDs.Nullify() ;
       QApplication::restoreOverrideCursor();
-      return;
     }
-
-    TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result);
-
-    mySimulationTopoDs = S;
-    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
-  }
-  catch(Standard_Failure) {
-    MESSAGE("Exception catched in MakePreview");
-    QApplication::restoreOverrideCursor();
-    return;
-  }
   QApplication::restoreOverrideCursor();
-  return;
-
 }
index 746c9eb08d04493ad1155d791657e017f06de199..01913de90b16435652e013f642f58695bbe83f89 100644 (file)
@@ -30,12 +30,16 @@ using namespace std;
 #include "OperationGUI_FilletDlg.h"
 
 #include "DisplayGUI.h"
+#include "QAD_MessageBox.h"
 
 #include <AIS_InteractiveContext.hxx>
 #include <TopExp_Explorer.hxx>
 #include <BRepFilletAPI_MakeFillet.hxx>
 #include <Precision.hxx>
 
+#include <Standard_ErrorHandler.hxx> 
+#include <Standard_Failure.hxx>
+
 //=================================================================================
 // class    : OperationGUI_FilletDlg()
 // purpose  : Constructs a OperationGUI_FilletDlg which is a child of 'parent', with the 
@@ -181,6 +185,11 @@ void OperationGUI_FilletDlg::ConstructorsClicked(int constructorId)
     myUseLocalContext = false;
   }
 
+  if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) {
+    myConstructorId = constructorId = 0; //No subshape selection if viewer is not OCC
+    RadioButton1->setChecked(TRUE);
+  }
+  
   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
   switch (constructorId)
     {
@@ -249,6 +258,7 @@ void OperationGUI_FilletDlg::ClickOnOk()
 //=================================================================================
 void OperationGUI_FilletDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QApplication::setOverrideCursor(Qt::waitCursor);
   QAD_Application::getDesktop()->putInfo(tr(""));
   myGeomBase->EraseSimulationShape();
@@ -504,47 +514,56 @@ void OperationGUI_FilletDlg::ValueChangedInSpinBox(double newValue)
 //=================================================================================
 void OperationGUI_FilletDlg::MakePreview()
 {
-  QApplication::setOverrideCursor(Qt::waitCursor);
-
-  if(!myOkShape) {
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-
-  GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID;
-  ListOfID->length(0);
-
-  SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
-  SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(myShapeIOR);
-  if(theObj->_is_nil()) {
-    QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY"));
-    QApplication::restoreOverrideCursor();
-    return;
-  }
-  
-  try {
-    if(myRadius <= Precision::Confusion()) {
-      QApplication::restoreOverrideCursor();
-      return;
-    }
-
-    GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(myShapeIOR);
-    GEOM::GEOM_Shape_var result = myGeom->MakeFillet(aShape, myRadius, myShapeType, ListOfID);
-    if(result->_is_nil()) {
-      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
+  QApplication::setOverrideCursor( Qt::waitCursor );
+  TopoDS_Shape tds ;
+  try
+    {
+      BRepFilletAPI_MakeFillet fill(myShape);
+      switch (myConstructorId)
+       {
+       case 0: /* Fillet All */
+         {
+           TopExp_Explorer Exp ( myShape, TopAbs_EDGE );
+           for (Exp; Exp.More(); Exp.Next()) 
+             {
+               TopoDS_Edge E =TopoDS::Edge(Exp.Current());
+               fill.Add(E);
+             }
+           for (int i = 1;i<=fill.NbContours();i++) {
+             try
+               {
+                 fill.SetRadius(myRadius,i,i);
+               }  
+             catch(Standard_Failure)
+               {
+                 QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK"));
+                 Group1->SpinBox_DX->SetValue(5.0);
+                 myGeomBase->EraseSimulationShape() ; 
+                 mySimulationTopoDs.Nullify() ;
+                 QApplication::restoreOverrideCursor();
+                 return;
+               }
+           }
+           tds = fill.Shape();
+           break;
+         }
+         //    case 1: /* Fillet edges */
+         //    case 2: /* Fillet Faces */
+       }
+      if (!tds.IsNull()) 
+       {
+         mySimulationTopoDs = tds;
+         myGeomBase->DisplaySimulationShape( mySimulationTopoDs ) ; 
+       }
+    }  
+  catch(Standard_Failure)
+    {
+      QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK"));
+      Group1->SpinBox_DX->SetValue(5.0);
+      myGeomBase->EraseSimulationShape() ; 
+      mySimulationTopoDs.Nullify() ;
       QApplication::restoreOverrideCursor();
-      return;
+     
     }
-    TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result);
-
-    mySimulationTopoDs = S;
-    myGeomBase->DisplaySimulationShape(mySimulationTopoDs); 
-  }
-  catch(Standard_Failure) {
-    MESSAGE("Exception catched in MakePreview");
-    QApplication::restoreOverrideCursor();
-    return;
-  }
   QApplication::restoreOverrideCursor();
-  return;
 }
index fb93269ddc190ec8f57dcf72c1adfab4bc4e556e..3fbcb8705f60e0e015f43679f25259d5428c2be0 100644 (file)
@@ -52,6 +52,7 @@ OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(QWidget* parent, const char
 
   GroupPoints = new DlgRef_4Sel1List_QTD(this, "GroupPoints");
   GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
+  GroupPoints->GroupBox2->setTitle(tr("SUPPRESS_RESULT"));
   GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
   GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
   GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT"));
index 343759a6ab32a02093e93c1e8db0106a3e25dc2a..e28c3f6f67aa8e4110c81f137252991bab6844d0 100644 (file)
@@ -216,14 +216,17 @@ void PrimitiveGUI::MakeConeAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir,
                                     const double Radius1, const double Radius2, const double aHeight)
 {
   try {
-    if((Radius1 <= Precision::Confusion() && Radius2 <= Precision::Confusion()) || aHeight <= Precision::Confusion())
+    double myRadius2 = Radius2;
+    if(myRadius2 < Precision::Confusion())
+      myRadius2 = Precision::Confusion();
+    if(Radius1 <= Precision::Confusion() || aHeight <= Precision::Confusion())
       return;
 
     GEOM::PointStruct pstruct = myGeom->MakePointStruct(BasePoint.X(), BasePoint.Y(), BasePoint.Z());
     GEOM::PointStruct d = myGeom->MakePointStruct(aDir.X(), aDir.Y(), aDir.Z());
     GEOM::DirStruct dstruct = myGeom->MakeDirection(d);
 
-    GEOM::GEOM_Shape_var result = myGeom->MakeCone(pstruct, dstruct, Radius1, Radius2, aHeight);  
+    GEOM::GEOM_Shape_var result = myGeom->MakeCone(pstruct, dstruct, Radius1, myRadius2, aHeight);  
     if(result->_is_nil()) {
       QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
       return;
index 39e12f88c2064c8eea0680f1b25c8b75dadce8ba..24b638432fe06bbeaf396e4f0bddc7c4b608f036 100644 (file)
@@ -221,6 +221,7 @@ void PrimitiveGUI_BoxDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_BoxDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 480eca52d047196280f64861d36db8b9d31ca77b..641feabfea513232db7b9da948f4aa146d2a74d1 100644 (file)
@@ -120,11 +120,11 @@ void PrimitiveGUI_ConeDlg::Init()
   step = St.toDouble();
 
   /* min, max, step and decimals for spin boxes & initial values */
-  GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3);
-  GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3);
+  GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3);
+  GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3);
   GroupPoints->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
-  GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3);
-  GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3);
+  GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3);
+  GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3);
   GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
 
   GroupPoints->SpinBox_DX->SetValue(myRadius1);
@@ -247,6 +247,7 @@ void PrimitiveGUI_ConeDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_ConeDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 0826eef58ae79129147828a16e59754a1512726e..4eaf7d976092e76b8cccfc5bc118fdfb0fdd0e8a 100644 (file)
@@ -234,6 +234,7 @@ void PrimitiveGUI_CylinderDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_CylinderDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index a26177ca11e643dbc406b0861c76942d9f771e81..d13352dc208077696af7b51200c7815477850127 100644 (file)
@@ -205,6 +205,7 @@ void PrimitiveGUI_SphereDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_SphereDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if(mySimulationTopoDs.IsNull())
     return;
index e67d4ae54b19085b9f14831a9259dbcfb291a136..96eeb4d05e274ca4dd2727166031779fc701cdfb 100644 (file)
@@ -230,6 +230,7 @@ void PrimitiveGUI_TorusDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_TorusDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 0c456bdd721f84c4254d6a6c956b9d1e078c7c4e..b13756881d8701b45b7e67221a70ee501885f3b2 100644 (file)
@@ -311,11 +311,11 @@ bool RepairGUI::OnSuppressFaces(const TopoDS_Shape& ShapeTopo, const char* Shape
     Standard_CString Type;
     if(myGeomBase->GetShapeTypeString(S, Type)) {
       aShellOrFace->NameType(Type);
-      sprintf (nameG, "%s_%d", Type, myGeomGUI->GetNbGeom()++);
+      sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++);
     }
     else {
       aShellOrFace->NameType(tr("GEOM_SHAPE"));
-      sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->GetNbGeom()++);
+      sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++);
     }
     
     /* Display with name */
index 7b877f19e105b0ca40a13eae3eb62daf9165445a..6571d351c9ad4a4fbf9a7a4f1eb2bf0a7ad628dc 100644 (file)
@@ -140,6 +140,7 @@ void RepairGUI_OrientationDlg::ClickOnOk()
 //=================================================================================
 void RepairGUI_OrientationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 2cc0e2066b464148164a89f6e832204af2b9f8dd..d36dedea09ab436b0ca0ca8f3f09abcb85d1e3cc 100644 (file)
@@ -134,6 +134,7 @@ void RepairGUI_SewingDlg::ClickOnOk()
 //=================================================================================
 void RepairGUI_SewingDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if(myOkListShapes)  
     myRepairGUI->MakeSewingAndDisplay(myListShapes, myPrecision);
index 6a968659cb170893f1a5b78c73a5ee44136b38f3..ef5b63648f4b0474793f2379260eb0db39e4f073 100644 (file)
@@ -131,6 +131,7 @@ void TransformationGUI_MirrorDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_MirrorDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index c347d7256b5ea103732fa565688fdf089d7a7669..479bd01164850eef6d0565c57bd2ef5ab7bf0a1d 100644 (file)
@@ -258,6 +258,7 @@ void TransformationGUI_MultiRotationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_MultiRotationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
@@ -429,13 +430,13 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue)
   QObject* send = (QObject*)sender();
 
   if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1)
-    myNbTimes1 = newValue;
+    myNbTimes1 = (int)newValue;
   else if(send == GroupDimensions->SpinBox_DX1)
     myAng = newValue;
   else if(send == GroupDimensions->SpinBox_DX2)
     myStep = newValue;
   else if(send == GroupDimensions->SpinBox_DY2)
-    myNbTimes2 = newValue;
+    myNbTimes2 = (int)newValue;
 
   if(myOkBase && myOkDir)
     this->MakeMultiRotationSimulationAndDisplay();
index 5e89231e291ec731a754239d0bd7bb5fa12d09ff..39646b6e39b9e6b49aecb80b2c06fca314d58c4b 100644 (file)
@@ -269,6 +269,7 @@ void TransformationGUI_MultiTranslationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_MultiTranslationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
@@ -488,7 +489,7 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox(double newValu
        if(send == GroupPoints->SpinBox_DX)
          myStep1 = newValue;
        else if(send == GroupPoints->SpinBox_DY)
-         myNbTimes1 = newValue;
+         myNbTimes1 = (int)newValue;
        if(myOkBase && myOkDir1)
          this->MakeMultiTranslationSimulationAndDisplay();
        break;
@@ -498,11 +499,11 @@ void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox(double newValu
        if(send == GroupDimensions->SpinBox_DX1)
          myStep1 = newValue;
        else if(send == GroupDimensions->SpinBox_DY1)
-         myNbTimes1 = newValue;
+         myNbTimes1 = (int)newValue;
        else if(send == GroupDimensions->SpinBox_DX2)
          myStep2 = newValue;
        else if(send == GroupDimensions->SpinBox_DY2)
-         myNbTimes2 = newValue;
+         myNbTimes2 = (int)newValue;
        if(myOkBase && myOkDir1 && myOkDir2)
          this->MakeMultiTranslationSimulationAndDisplay();
        break;
index 4c410e4c492cd970ec4649bea75d6294809a78a2..6fefe1d7842a01917b8aa491ea07b0c50138a74d 100644 (file)
@@ -142,6 +142,7 @@ void TransformationGUI_RotationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_RotationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 6f408cff1afe319407dcda858ae5fccbd7de6dc8..3edcbf8b09a494d7ed4bd11f8bff69d8552801b5 100644 (file)
@@ -140,6 +140,7 @@ void TransformationGUI_ScaleDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_ScaleDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 46778b0c7bfe3f015bbce1973447dc0c7a35acb6..2a38b49eb1688b1a42f9f9a3cd325a5da7137c57 100644 (file)
@@ -148,6 +148,7 @@ void TransformationGUI_TranslationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_TranslationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;