Salome HOME
DCQ : Merge with Ecole_Ete_a6.
authordcq <dcq@opencascade.com>
Wed, 16 Jun 2004 15:24:55 +0000 (15:24 +0000)
committerdcq <dcq@opencascade.com>
Wed, 16 Jun 2004 15:24:55 +0000 (15:24 +0000)
137 files changed:
INSTALL
Makefile.in
adm_local/unix/make_commence.in
bin/VERSION
configure.in.base
doc/Makefile.in
doc/html/INPUT/doxyfile
doc/html/INPUT/sources/static/tree.js
doc/salome/GEOM_index.html [new file with mode: 0644]
doc/salome/Makefile.in [new file with mode: 0644]
doc/salome/gui/Makefile.in [new file with mode: 0644]
idl/GEOM_Gen.idl
idl/Makefile.in
resources/GEOM.config [new file with mode: 0644]
resources/GEOM_en.xml
resources/GEOM_fr.xml
src/ARCHIMEDE/Archimede_VolumeSection.cxx
src/BasicGUI/BasicGUI.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/BuildGUI/BuildGUI_EdgeDlg.cxx
src/BuildGUI/BuildGUI_FaceDlg.cxx
src/BuildGUI/BuildGUI_ShellDlg.cxx
src/BuildGUI/BuildGUI_ShellDlg.h
src/DisplayGUI/DisplayGUI.cxx
src/DlgRef/DlgRef_4Sel1List_QTD.cxx
src/DlgRef/DlgRef_4Sel1List_QTD.h
src/DlgRef/DlgRef_Skeleton_QTD.cxx
src/DlgRef/DlgRef_Skeleton_QTD.h
src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui
src/EntityGUI/EntityGUI.cxx
src/EntityGUI/EntityGUI.h
src/EntityGUI/EntityGUI_1Sel_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_1Sel_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_1Spin.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_1Spin.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_1Spin_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_1Spin_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_2Spin.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_2Spin.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_2Spin_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_2Spin_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_3Spin.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_3Spin.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_3Spin_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_3Spin_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_4Spin.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_4Spin.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_4Spin_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_4Spin_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_Dir1_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_Dir1_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_Dir2_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_Dir2_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_Point_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_Point_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_Skeleton_QTD.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_Skeleton_QTD.h [new file with mode: 0644]
src/EntityGUI/EntityGUI_SketcherDlg.cxx [new file with mode: 0644]
src/EntityGUI/EntityGUI_SketcherDlg.h [new file with mode: 0644]
src/EntityGUI/Makefile.in
src/GEOM/GEOM_Gen_i.cc
src/GEOM/GEOM_Gen_i.hh
src/GEOM/GEOM_Shape_i.cc
src/GEOM/Makefile.in
src/GEOMBase/GEOMBase.cxx
src/GEOMBase/GEOMBase.h
src/GEOMBase/GEOMBase_Skeleton.h
src/GEOMClient/GEOM_Client.cxx
src/GEOMContext/GEOMContext.cxx
src/GEOMContext/GEOMContext.h
src/GEOMContext/GEOM_msg_en.po
src/GEOMContext/GEOM_msg_fr.po
src/GEOMContext/Makefile.in
src/GEOMDS/GEOMDS_Commands.cxx
src/GEOMDS/GEOMDS_Commands.jxx
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMGUI/GeometryGUI_Swig.cxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h
src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h
src/GEOM_SWIG/GEOM_Sketcher.py [new file with mode: 0644]
src/GEOM_SWIG/Makefile.in
src/GEOM_SWIG/batchmode_geompy.py
src/GEOM_SWIG/geompy.py
src/GenerationGUI/GenerationGUI_FillingDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PrismDlg.cxx
src/GenerationGUI/GenerationGUI_RevolDlg.cxx
src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx
src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx
src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx
src/MeasureGUI/MeasureGUI_InertiaDlg.cxx
src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx
src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx
src/MeasureGUI/MeasureGUI_Skeleton.h
src/MeasureGUI/MeasureGUI_WhatisDlg.cxx
src/OBJECT/GEOM_AISShape.jxx
src/OperationGUI/OperationGUI_ArchimedeDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.cxx
src/OperationGUI/OperationGUI_ChamferDlg.h
src/OperationGUI/OperationGUI_FilletDlg.cxx
src/OperationGUI/OperationGUI_FilletDlg.h
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/PrimitiveGUI/PrimitiveGUI_TorusDlg.h
src/RepairGUI/RepairGUI.cxx
src/RepairGUI/RepairGUI_OrientationDlg.cxx
src/RepairGUI/RepairGUI_SewingDlg.cxx
src/SKETCHER/GEOM_Sketcher.cxx [deleted file]
src/SKETCHER/GEOM_Sketcher.h [deleted file]
src/SKETCHER/GEOM_SketcherStatus.h [deleted file]
src/SKETCHER/Makefile.in
src/SKETCHER/Sketcher_Profile.cxx [new file with mode: 0644]
src/SKETCHER/Sketcher_Profile.hxx [new file with mode: 0644]
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..cd622460bc60831652166b1e0543590292c2956a 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,3 +1,3 @@
-This is the version 1.4.0 of GEOM
+This is the version 2.0.0 of GEOM
 Compatible with :
-       - KERNEL 1.4.0
+       - KERNEL 2.0.0
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..4d758b99f35e2a61d2635cc2f59791f397adcee4 100644 (file)
@@ -31,7 +31,7 @@ C_DEPEND_FLAG = @C_DEPEND_FLAG@
 # C++
 
 CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@ 
+CXXFLAGS = @CXXFLAGS@ -Wparentheses -Wreturn-type -Wmissing-declarations -Winline 
 CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@
 
 # JAVA
@@ -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..1b4eeb6ebb176fce6e9ea3e940d5b2fc7efd29b8 100755 (executable)
@@ -1 +1 @@
-THIS IS SALOME - GEOM VERSION: 1.4.0
+THIS IS SALOME - GEOM VERSION: 2.0.0
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 2a891be10c76e4bad5a275e6644b7d24ed21c0b4..ce82f87d7d1711b06ac2fe98f6e474ff86f9df45 100755 (executable)
@@ -3,7 +3,7 @@
 #---------------------------------------------------------------------------
 # General configuration options
 #---------------------------------------------------------------------------
-PROJECT_NAME           = "SALOME - GEOM - v.1.4.0"
+PROJECT_NAME           = "SALOME - GEOM - v.2.0.0"
 PROJECT_NUMBER         = id#1.1
 OUTPUT_DIRECTORY       = ../
 OUTPUT_LANGUAGE        = English
index 3fb69102c66e4fe01a40f4fe97c3a63793e3cd48..fdfc5a03cb35f8b141e1928d07aa0e4300d6871e 100755 (executable)
@@ -1,4 +1,4 @@
-foldersTree = gFld("<b>SALOME v.1.4.0 </b>", "", "")
+foldersTree = gFld("<b>SALOME v.2.0.0 </b>", "", "")
      insDoc(foldersTree, gLnk("Main Page", "", "main.html"))
 
 aux1 = insFld(foldersTree, gFld("TUI Reference Guide", ""))
diff --git a/doc/salome/GEOM_index.html b/doc/salome/GEOM_index.html
new file mode 100644 (file)
index 0000000..7da8770
--- /dev/null
@@ -0,0 +1,95 @@
+<!DOCTYPE doctype PUBLIC "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head>
+                                            
+  <meta http-equiv="Content-Type"
+ content="text/html; charset=iso-8859-1">
+                                            
+  <meta name="GENERATOR"
+ content="Mozilla/4.73 [en] (WinNT; I) [Netscape]">
+  <title>Geometry Module Documentation</title>
+</head>
+  <body bgcolor="#cccccc" text="#000000" link="#0000ee" alink="#0000ee"
+ vlink="#551a8b">
+       
+<div align="center">    &nbsp;           
+<center>          
+<center>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
+ &nbsp;&nbsp;</center>
+       
+<table width="96%" align="center">
+           <tbody>
+              <tr>
+           <td><a href="http://www.opencascade.com"><img
+ src="tui/GEOM/sources/logocorp.gif" border="0" height="46" width="122">
+                </a></td>
+             <td>                                                       
+               
+      <div align="right"><a href="http://www.opencascade.org/SALOME/"><img
+ src="tui/GEOM/sources/application.gif" border="0" height="46" width="108">
+                </a></div>
+           </td>
+           </tr>
+                                                      
+  </tbody>    
+</table>
+       
+<div align="center">    
+<center>    
+<hr width="100%" size="2">   
+<h1>Geometry MODULE Documentation</h1>
+                                     </center>
+    </div>
+       
+<table width="96%">
+      <tbody>
+               
+  </tbody>    
+</table>
+    </center>
+       
+<div align="center">       
+<p> <img src="tui/GEOM/sources/Application-About.png"
+ alt="Application-About.png" width="30%" height="20%">
+    &nbsp; &nbsp;&nbsp;          </p>
+             </div>
+       
+<center>    
+<table width="96%">
+      <tbody>
+                 
+  </tbody>    
+</table>
+   <br>
+   <br>
+   <br>
+   </center>
+     
+<address> </address>
+   
+<center><big><a href="gui/GEOM/geom.html">GUI Documentation</a></big></center>
+      
+<address> </address>
+   
+<center></center>
+      
+<center><br>
+   </center>
+     
+<address> </address>
+   
+<center><big><a href="tui/GEOM/index.html">TUI Documentation</a></big></center>
+      
+<address> </address>
+   
+<center></center>
+      
+<center><br>
+   <br>
+    </center>
+    </div>
+     <br>
+  <br>
+ <br>
+</body>
+</html>
diff --git a/doc/salome/Makefile.in b/doc/salome/Makefile.in
new file mode 100644 (file)
index 0000000..69c40d6
--- /dev/null
@@ -0,0 +1,44 @@
+
+# -* Makefile *- 
+#
+# Author : Patrick GOLDBRONN (CEA)
+# Date : 30/11/2001
+# $Header$
+#
+# source path
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@
+
+SUBDIRS= tui gui
+
+@COMMENCE@
+
+docs:
+       @@SETX@; for d in $(SUBDIRS); do        \
+          (cd $$d && $(MAKE) $@) || exit 1;    \
+       done; \
+       cp -f $(srcdir)/GEOM_index.html GEOM_index.html
+
+clean:
+       @@SETX@; for d in $(SUBDIRS); do        \
+          (cd $$d && $(MAKE) $@) || exit 1;    \
+       done
+
+distclean: clean
+       @@SETX@; for d in $(SUBDIRS); do        \
+          (cd $$d && $(MAKE) $@) || exit 1;    \
+       done
+
+install:
+       $(MAKE) docs
+       (cd tui && $(MAKE) install);
+       (cd gui && $(MAKE) install);
+       cp -f GEOM_index.html $(docdir)
+
+uninstall:
+       @@SETX@; for d in $(SUBDIRS); do        \
+          (cd $$d && $(MAKE) $@) || exit 1;    \
+       done; \
+       rm -fr $(docdir)/GEOM_index.html
diff --git a/doc/salome/gui/Makefile.in b/doc/salome/gui/Makefile.in
new file mode 100644 (file)
index 0000000..a44228d
--- /dev/null
@@ -0,0 +1,33 @@
+#  Copyright (C) 2003  CEA/DEN, EDF R&D
+#
+#
+#
+#  File   : Makefile.in
+#  Author : Vasily Rusyaev (Open Cascade NN)
+#  Module : doc
+#  $Header: 
+
+top_srcdir=@top_srcdir@
+top_builddir=../../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@
+
+@COMMENCE@
+
+docs:
+       cp -fr $(srcdir)/GEOM ./
+       -find $(PWD) -name CVS -exec rm -rf {} \;
+
+clean:
+       rm -fr `ls | grep -v "Makefile"`
+
+distclean: clean
+       rm -fr GEOM
+
+install:
+       mkdir -p $(docdir)/gui
+       cp -rf GEOM $(docdir)/gui
+       -find $(PWD) -name CVS -exec rm -rf {} \;
+
+uninstall:
+       rm -rf $(docdir)/gui/GEOM
index 9b085c4038f5d012bc4a10dd5036aae625aa78e6..61b8afc20e3a4c1e4210939ace7465954f4c85b4 100644 (file)
@@ -190,7 +190,12 @@ module GEOM
                           in DirStruct dstruct,
                           in double major_radius,
                           in double minor_radius) raises (SALOME::SALOME_Exception) ;
-
+    
+    //-----------------------------------------------------------//
+    // Sketcher                                                  //
+    //-----------------------------------------------------------//  
+    GEOM_Shape MakeSketcher (in string Cmd) raises (SALOME::SALOME_Exception) ;
+    
     //-----------------------------------------------------------//
     // Primitives Construction                                   //
     //-----------------------------------------------------------//
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
 
diff --git a/resources/GEOM.config b/resources/GEOM.config
new file mode 100644 (file)
index 0000000..6925397
--- /dev/null
@@ -0,0 +1 @@
+language=en
\ No newline at end of file
index 1b6fdcc207444d1c45caad8ca7db0e6ebaa5dc89..aba68d130c415961c51e22aa60abd35ac0b6acfb 100644 (file)
    <endsubmenu />
    <separator pos-id=""/>
    <popup-item item-id="404" pos-id="" label-id="Sketch" icon-id="sketch.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <submenu label-id="Sketch Constraints" item-id="405" pos-id="">
-      <popup-item item-id="4051" pos-id="" label-id="Set Plane" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <separator pos-id=""/>
-      <popup-item item-id="4052" pos-id="" label-id="Tangent" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="4053" pos-id="" label-id="Perpendicular" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   </submenu>
-   <endsubmenu />
-   <submenu label-id="Sketch Options" item-id="406" pos-id="">
-      <popup-item item-id="4061" pos-id="" label-id="Length Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
-      <popup-item item-id="4062" pos-id="" label-id="Angle Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
-      <popup-item item-id="4063" pos-id="" label-id="Radius Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
-      <popup-item item-id="4064" pos-id="" label-id="X Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
-      <popup-item item-id="4065" pos-id="" label-id="Y Dimension" icon-id="" tooltip-id="" accel-id="" toggle-id="false" execute-action=""/>
-   </submenu>
-   <endsubmenu />
    <separator pos-id=""/>
    <popup-item item-id="407" pos-id="" label-id="Explode" icon-id="subshape.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    <submenu label-id="Build" item-id="408" pos-id="">
    <popup-item item-id="901" pos-id="" label-id="Rename" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </popupmenu>
 
-<popupmenu label-id="Sketch" context-id="Sketch" parent-id="Viewer" object-id="">
-   <popup-item item-id="4041" pos-id="" label-id="Segment" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
-   <popup-item item-id="4042" pos-id="" label-id="Arc" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <separator pos-id=""/>
-   <popup-item item-id="4043" pos-id="" label-id="Set Angle" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="4044" pos-id="" label-id="Set X" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="4045" pos-id="" label-id="Set Y" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <separator pos-id=""/>
-   <popup-item item-id="4046" pos-id="" label-id="Undo" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <separator pos-id=""/>
-   <popup-item item-id="4047" pos-id="" label-id="End" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="4048" pos-id="" label-id="Close" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-</popupmenu>
-
 </desktop>      <!--   DESKTOP END    -->  
 </application>  <!-- APPLICATION END  -->
index 855153c6f645d91a2388ee5985004877a8c07731..b5c4eb07e1eb29aaf567aadb36567650978f9a5c 100644 (file)
 </menu-item>
 
 <!-- ************************* New Entity  (menubar) ******************************* -->
-<menu-item label-id="Nouvelle entité" item-id="30" pos-id="3">
-   <submenu label-id="Construction basique" item-id="301" pos-id="1">
-       <popup-item item-id="3011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="3012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="3013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="3014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="3015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+<menu-item label-id="Nouvelle entité" item-id="40" pos-id="3">
+   <submenu label-id="Construction basique" item-id="401" pos-id="1">
+       <popup-item item-id="4011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
        <separator pos-id="6"/>
-       <popup-item item-id="3016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="3017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="3018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    </submenu>
    <endsubmenu />
-   <submenu label-id="Primitives" item-id="302" pos-id="2">
-   <popup-item item-id="3021" pos-id="" label-id="Boite" icon-id="box.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="3022" pos-id="" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="3023" pos-id="" label-id="Sphère" icon-id="sphere.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="3024" pos-id="" label-id="Tore" icon-id="torus.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-
+   <submenu label-id="Primitives" item-id="402" pos-id="2">
+      <popup-item item-id="4021" pos-id="" label-id="Boite" icon-id="box.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="4022" pos-id="" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="4023" pos-id="" label-id="Sphère" icon-id="sphere.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="4024" pos-id="" label-id="Tore" icon-id="torus.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="4025" pos-id="" label-id="Cone" icon-id="cone.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   </submenu>
+   <endsubmenu />
+   <submenu label-id="Generation" item-id="403" pos-id="3">
+       <popup-item item-id="4031" pos-id="" label-id="Extrusion" icon-id="prism.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="4032" pos-id="" label-id="Revolution" icon-id="revol.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>        
+       <popup-item item-id="4033" pos-id="" label-id="Filling" icon-id="filling.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
+       <popup-item item-id="4034" pos-id="" label-id="Pipe" icon-id="pipe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
    </submenu>
-   <popup-item item-id="303" pos-id="" label-id="Eclater" icon-id="subshape.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="309" pos-id="" label-id="Supprime des faces" icon-id="supressface.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="314" pos-id="" label-id="Supprime un trou" icon-id="supresshole.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <endsubmenu />
    <separator pos-id=""/>
-   <popup-item item-id="304" pos-id="" label-id="Arête" icon-id="build_edge.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
-   <popup-item item-id="305" pos-id="" label-id="Wire" icon-id="build_wire.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
-   <popup-item item-id="306" pos-id="" label-id="Face" icon-id="build_face.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
-   <popup-item item-id="308" pos-id="" label-id="Compound" icon-id="build_compound.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
+   <popup-item item-id="404" pos-id="" label-id="Sketch" icon-id="sketch.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <separator pos-id=""/>
+   <popup-item item-id="407" pos-id="" label-id="Eclater" icon-id="subshape.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <submenu label-id="Construction" item-id="408" pos-id="">
+      <popup-item item-id="4081" pos-id="" label-id="Arête" icon-id="build_edge.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
+      <popup-item item-id="4082" pos-id="" label-id="Wire" icon-id="build_wire.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
+      <popup-item item-id="4083" pos-id="" label-id="Face" icon-id="build_face.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
+      <popup-item item-id="4084" pos-id="" label-id="Shell" icon-id="build_shell.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="4085" pos-id="" label-id="Solid" icon-id="build_solid.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="4086" pos-id="" label-id="Compound" icon-id="build_compound.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>   
+   </submenu>
+   <endsubmenu />
 </menu-item>
 
 
 <!-- ************************ Operations  (menubar) *********************************** -->
-<menu-item label-id="Opérations" item-id="40" pos-id="4">
-   <submenu label-id="Booléennes" item-id="401" pos-id="1">
-      <popup-item item-id="4011" pos-id="" label-id="Union" icon-id="fuse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="4012" pos-id="" label-id="Commun" icon-id="common.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="4013" pos-id="" label-id="Couper" icon-id="cut.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="4014" pos-id="" label-id="Section" icon-id="section.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+<menu-item label-id="Opérations" item-id="50" pos-id="4">
+   <submenu label-id="Booléennes" item-id="501" pos-id="1">
+      <popup-item item-id="5011" pos-id="" label-id="Union" icon-id="fuse.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="5012" pos-id="" label-id="Commun" icon-id="common.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="5013" pos-id="" label-id="Couper" icon-id="cut.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="5014" pos-id="" label-id="Section" icon-id="section.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    </submenu>
    <endsubmenu />
-   <submenu label-id="Transformation" item-id="402" pos-id="2">
-       <popup-item item-id="4021" pos-id="" label-id="Translation" icon-id="translation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="4022" pos-id="" label-id="Rotation" icon-id="rotate.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="4023" pos-id="" label-id="Symétrie par un plan" icon-id="mirrorPlane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="4024" pos-id="" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
-       <separator pos-id=""/>\r
-       <popup-item item-id="4030" pos-id="" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>\r
-       <popup-item item-id="4040" pos-id="" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>\r
-   </submenu>
-   <endsubmenu />
-   <submenu label-id="Construction" item-id="403" pos-id="3">
-       <popup-item item-id="4031" pos-id="" label-id="Extrusion" icon-id="prism.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="4032" pos-id="" label-id="Révolution" icon-id="revol.png"tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="4033" pos-id="" label-id="Filling" icon-id="filling.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
-       <popup-item item-id="4034" pos-id="" label-id="Pipe création ?" icon-id="pipe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
+   <submenu label-id="Transformation" item-id="502" pos-id="2">
+       <popup-item item-id="5021" pos-id="" label-id="Translation" icon-id="translation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="5022" pos-id="" label-id="Rotation" icon-id="rotate.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="5023" pos-id="" label-id="Symétrie par un plan" icon-id="mirrorPlane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="5024" pos-id="" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/> 
+       <separator pos-id=""/>
+       <popup-item item-id="5025" pos-id="" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="5026" pos-id="" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    </submenu>
    <endsubmenu />
-   <popup-item item-id="4025" pos-id="" label-id="Partition" icon-id="partition.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
-   <popup-item item-id="4026" pos-id="" label-id="Archimede" icon-id="archimede.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
-   <popup-item item-id="4027" pos-id="" label-id="Congé" icon-id="fillet.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
-   <popup-item item-id="4028" pos-id="" label-id="Chanfrein" icon-id="chamfer.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
+   <popup-item item-id="503" pos-id="" label-id="Partition" icon-id="partition.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
+   <popup-item item-id="504" pos-id="" label-id="Archimede" icon-id="archimede.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
+   <separator pos-id=""/>
+   <popup-item item-id="505" pos-id="" label-id="Congé" icon-id="fillet.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
+   <popup-item item-id="506" pos-id="" label-id="Chanfrein" icon-id="chamfer.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>  
 </menu-item>
 
 
 <!-- ************************** Advanced  (menubar) ************************************** -->
-<menu-item label-id="Avancé" item-id="50" pos-id="5">
-   <popup-item item-id="501" pos-id="" label-id="Couture" icon-id="sewing.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="502" pos-id="" label-id="Orientation" icon-id="orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+<menu-item label-id="Avancé" item-id="60" pos-id="5">
+   <popup-item item-id="601" pos-id="" label-id="Couture" icon-id="sewing.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="602" pos-id="" label-id="Orientation" icon-id="orientation.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="603" pos-id="" label-id="Suppression de faces" icon-id="supressface.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="604" pos-id="" label-id="Suppression de trou" icon-id="supresshole.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </menu-item>
 
 
 <!-- ************************** Mesures  (menubar)  ************************************ -->
-<menu-item label-id="Mesures" item-id="60" pos-id="6">
-    <popup-item item-id="601" pos-id="" label-id="Fondamentales" icon-id="linear.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-    <separator pos-id="4"/>
-    <popup-item item-id="604" pos-id="" label-id="Centre de gravité" icon-id="centergravity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-    <popup-item item-id="605" pos-id="" label-id="Axes d'inertie" icon-id="axisinertia.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-    <separator pos-id="7"/>
-    <submenu label-id="Dimensions" item-id="606" pos-id="8">
-       <popup-item item-id="6060" pos-id="" label-id="Boite englobante" icon-id="bounding.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="6061" pos-id="" label-id="Distance minimale" icon-id="mindist.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-    </submenu>
+<menu-item label-id="Mesures" item-id="70" pos-id="6">
+   <popup-item item-id="701" pos-id="" label-id="Fondamentales" icon-id="linear.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <separator pos-id="4"/>
+   <popup-item item-id="702" pos-id="" label-id="Centre de gravité" icon-id="centergravity.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="703" pos-id="" label-id="Axes d'inertie" icon-id="axisinertia.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <separator pos-id="7"/>
+   <submenu label-id="Dimensions" item-id="704" pos-id="8">
+      <popup-item item-id="7041" pos-id="" label-id="Boite englobante" icon-id="bounding.png"  tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="7042" pos-id="" label-id="Distance minimale" icon-id="mindist.png"  tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   </submenu>
    <endsubmenu />
    <separator pos-id="9"/>
-   <popup-item item-id="607" pos-id="" label-id="Tolérance" icon-id="tolerance.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="705" pos-id="" label-id="Tolérance" icon-id="tolerance.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    <separator pos-id=""/>
-   <popup-item item-id="608" pos-id="" label-id="Whatis" icon-id="whatis.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="609" pos-id="" label-id="Check" icon-id="check.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="706" pos-id="" label-id="Whatis" icon-id="whatis.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="707" pos-id="" label-id="Check" icon-id="check.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
  </menu-item>
 
 <!-- ********************************* Tools  (menubar) ************************************ -->
 <menu-item label-id="Outils" item-id="5" pos-id="">
    <separator pos-id=""/>
-   <popup-item item-id="5001" pos-id="" label-id="Check Géométrie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="5103" pos-id="" label-id="Check Géométrie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="5104" pos-id="" label-id="Charger Script" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </menu-item>
 
 <!-- ********************************* Settings         (menubar) ********************************* -->
-<menu-item label-id="Préférences" item-id="4" pos-id="">
-   <submenu label-id="Géométry" item-id="40" pos-id="-1">
-      <popup-item item-id="701" pos-id="" label-id="Avec copie" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="702" pos-id="" label-id="Nommer/Ranger automatiquement" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="703" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="704" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="705" pos-id="" label-id="Valeur d'increment" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>     
+<menu-item label-id="Préférences" item-id="4" pos-id="">
+   <submenu label-id="Géométry" item-id="41" pos-id="-1">
+      <popup-item item-id="411" pos-id="" label-id="Nommer/Ranger automatiquement" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <separator pos-id=""/>
+      <popup-item item-id="412" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="413" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+      <popup-item item-id="414" pos-id="" label-id="Valeur d'increment" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>     
    </submenu>
    <endsubmenu />
    <separator pos-id="-1"/>
 
 <!-- ***************************** View (menubar) ************************************ -->
 <menu-item label-id="Affichage" item-id="2" pos-id="">
-   <submenu label-id="Mode d'affichage" item-id="21" pos-id="6">
-       <popup-item item-id="6021" pos-id="" label-id="Ombré" icon-id="shading.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <submenu label-id="Mode d'affichage" item-id="21" pos-id="5">
+       <popup-item item-id="211" pos-id="" label-id="Ombré" icon-id="shading.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
        <separator pos-id=""/>
-       <popup-item item-id="6022" pos-id="" label-id="Afficher tout" icon-id="displayall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="6023" pos-id="" label-id="Afficher seulement" icon-id="display.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="6024" pos-id="" label-id="Effacer tout" icon-id="eraseall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-       <popup-item item-id="6025" pos-id="" label-id="Effacer seulement" icon-id="erase.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="212" pos-id="" label-id="Afficher tout" icon-id="displayall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="213" pos-id="" label-id="Afficher seulement" icon-id="display.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="214" pos-id="" label-id="Effacer tout" icon-id="eraseall.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="215" pos-id="" label-id="Effacer seulement" icon-id="erase.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    </submenu>
    <endsubmenu />
-   <separator pos-id="7"/>
 </menu-item>
 
 </menubar> <!-- MENUBAR END  -->
 
 <!-- ///////////////////////////////////// TOOLBARS ////////////////////////////////////// -->
 <toolbar label-id="Construction basique">
-  <toolbutton-item item-id="3011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="Point" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="3012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="Ligne" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="3013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="Cercle" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="3014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="Ellipse" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="3015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="Arc" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="3016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="Vecteur" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="3017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="Plan" accel-id="" toggle-id="" execute-action=""/>         
-  <toolbutton-item item-id="3018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="Plan de travail" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4011" pos-id="" label-id="Point" icon-id="point2.png" tooltip-id="Point" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4012" pos-id="" label-id="Ligne" icon-id="line.png" tooltip-id="Ligne" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4013" pos-id="" label-id="Cercle" icon-id="circle.png" tooltip-id="Cercle" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4014" pos-id="" label-id="Ellipse" icon-id="ellipse.png" tooltip-id="Ellipse" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4015" pos-id="" label-id="Arc" icon-id="arc.png" tooltip-id="Arc" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4016" pos-id="" label-id="Vecteur" icon-id="vector.png" tooltip-id="Vecteur" accel-id="" toggle-id="" execute-action=""/>
+  <toolbutton-item item-id="4017" pos-id="" label-id="Plan" icon-id="plane.png" tooltip-id="Plan" accel-id="" toggle-id="" execute-action=""/>         
+  <toolbutton-item item-id="4018" pos-id="" label-id="Plan de travail" icon-id="planeWorking.png" tooltip-id="Plan de travail" accel-id="" toggle-id="" execute-action=""/>
 </toolbar>
 
 <toolbar label-id="Primitives">
-   <toolbutton-item item-id="3021" label-id="Boite" icon-id="box.png" tooltip-id="Construction d'une boite" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="3022" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="Construction d'un cylindre" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="3023" label-id="Sphère" icon-id="sphere.png" tooltip-id="Construction d'une sphère" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="3024" label-id="Tore" icon-id="torus.png" tooltip-id="Construction d'un tore" accel-id="" toggle-id="" execute-action=""/>  
+   <toolbutton-item item-id="4021" label-id="Boite" icon-id="box.png" tooltip-id="Construction d'une boite" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="4022" label-id="Cylindre" icon-id="cylinder.png" tooltip-id="Construction d'un cylindre" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="4023" label-id="Sphère" icon-id="sphere.png" tooltip-id="Construction d'une sphère" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="4024" label-id="Tore" icon-id="torus.png" tooltip-id="Construction d'un tore" accel-id="" toggle-id="" execute-action=""/> 
+   <toolbutton-item item-id="4025" label-id="Cone" icon-id="cone.png" tooltip-id="Cone" accel-id="" toggle-id="" execute-action=""/> 
 </toolbar>
 
-<toolbar label-id="Opé. Booléennes">
-   <toolbutton-item item-id="4011" label-id="Union" icon-id="fuse.png" tooltip-id="Union de deux shapes" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4012" label-id="Commun" icon-id="common.png" tooltip-id="Partie commune entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4013" label-id="Couper" icon-id="cut.png" tooltip-id="Coupe la première shape par la seconde" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4014" label-id="Section" icon-id="section.png" tooltip-id="Section entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
+<toolbar label-id="Opé. Booléennes">
+   <toolbutton-item item-id="5011" label-id="Union" icon-id="fuse.png" tooltip-id="Union de deux shapes" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5012" label-id="Commun" icon-id="common.png" tooltip-id="Partie commune entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5013" label-id="Couper" icon-id="cut.png" tooltip-id="Coupe la première shape par la seconde" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5014" label-id="Section" icon-id="section.png" tooltip-id="Section entre deux shapes" accel-id="" toggle-id="" execute-action=""/>
 </toolbar>
 
 <toolbar label-id="Construction">
    <toolbutton-item item-id="4031" label-id="Extrusion" icon-id="prism.png" tooltip-id="Shape construite par extrusion" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4032" label-id="Révolution" icon-id="revol.png" tooltip-id="Shape construite par révolution" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="4033" pos-id="" label-id="'Filling'" icon-id="filling.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="4034" pos-id="" label-id="'Pipe' création" icon-id="pipe.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="4032" label-id="Révolution" icon-id="revol.png" tooltip-id="Shape construite par révolution" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="4033" label-id="Filling" icon-id="filling.png" tooltip-id="Generation by filling" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="4034" label-id="Pipe" icon-id="pipe.png" tooltip-id="Pipe mode generation" accel-id="" toggle-id="" execute-action=""/>
 </toolbar>
 
 <toolbar label-id="Transformation">
-   <toolbutton-item item-id="4021" label-id="Translation" icon-id="translation.png" tooltip-id="Translation d'une shape"accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4022" label-id="Rotation" icon-id="rotate.png" tooltip-id="Rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4023" label-id="Symétrie" icon-id="mirrorPlane.png" tooltip-id="Symétrie" accel-id="" toggle-id="" execute-action=""/>
-   <toolbutton-item item-id="4024" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="Facteur d'échelle" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5021" label-id="Translation" icon-id="translation.png" tooltip-id="Translation d'une shape"accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5022" label-id="Rotation" icon-id="rotate.png" tooltip-id="Rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5023" label-id="Symétrie" icon-id="mirrorPlane.png" tooltip-id="Symétrie" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5024" label-id="Facteur d'échelle" icon-id="scale.png" tooltip-id="Facteur d'échelle" accel-id="" toggle-id="" execute-action=""/>
    <separatorTB/>
-   <toolbutton-item item-id="4030" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="Multi-translation d'une shape" accel-id="" toggle-id="" execute-action=""/>\r
-   <toolbutton-item item-id="4040" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="Multi-rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>\r
+   <toolbutton-item item-id="5025" label-id="Multi-Translation" icon-id="multitranslation.png" tooltip-id="Multi-translation d'une shape" accel-id="" toggle-id="" execute-action=""/>
+   <toolbutton-item item-id="5026" label-id="Multi-Rotation" icon-id="multirotation.png" tooltip-id="Multi-rotation d'une shape" accel-id="" toggle-id="" execute-action=""/>
 </toolbar>
 
 
 <!-- ################################# POPUP MENU #################################  -->
 <popupmenu label-id="Menu contextuel du Viewer" context-id="" parent-id="Viewer" object-id="">
-   <submenu label-id="Propriétés" item-id="803" pos-id="6">
-       <popup-item item-id="8021" pos-id="" label-id="Filaire/Ombré" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <submenu label-id="Propriétés" item-id="803" pos-id="6">
+       <popup-item item-id="8031" pos-id="" label-id="Filaire/Ombré" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
        <separator pos-id=""/>
-       <popup-item item-id="8031" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="8032" pos-id="" label-id="Transparence" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-      <popup-item item-id="8033" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="8032" pos-id="" label-id="Couleur" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="8033" pos-id="" label-id="Transparence" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+       <popup-item item-id="8034" pos-id="" label-id="Isos" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    </submenu>
    <endsubmenu />
    <separator pos-id=""/>
-   <popup-item item-id="801" pos-id="" label-id="Ajouter dans l'étude" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="804" pos-id="" label-id="Ajouter dans l'étude" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </popupmenu>
 
 <popupmenu label-id="Menu contextuel" context-id="" parent-id="ObjectBrowser" object-id="">
    <popup-item item-id="9024" pos-id="" label-id="Ouverture" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
    <separator pos-id=""/>
-   <popup-item item-id="901" pos-id="2" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-</popupmenu>
-
-<popupmenu label-id="Sketch" context-id="Sketch" parent-id="Viewer" object-id="">
-   <popup-item item-id="10000" pos-id="" label-id="Segment" icon-id="" tooltip-id="" accel-id="" toggle-id="true" execute-action=""/>
-   <popup-item item-id="10001" pos-id="" label-id="Arc" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <separator pos-id=""/>
-   <popup-item item-id="10002" pos-id="" label-id="Set Angle" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="10003" pos-id="" label-id="Set X" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="10004" pos-id="" label-id="Set Y" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <separator pos-id=""/>
-   <popup-item item-id="10006" pos-id="" label-id="Undo" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <separator pos-id=""/>
-   <popup-item item-id="10007" pos-id="" label-id="End" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-   <popup-item item-id="10008" pos-id="" label-id="Close" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+   <popup-item item-id="901" pos-id="" label-id="Renommer" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </popupmenu>
 
 </desktop>     <!--   DESKTOP END    -->
index 86d058af3edb6146c072744914e7f1f4446eee42..d354c1f55960f3fcca97e402df23a30fd2ee810a 100644 (file)
@@ -406,3 +406,4 @@ void VolumeSection::getZ( double& min, double& max)
   min = Zmin;
   max = Zmax;
 }
+
index 54e4116cb4a366d3de49bfd374d5aea0450870b4..aef6d70b024033bc9b47a2392233dbcd987d7f2f 100644 (file)
@@ -201,7 +201,7 @@ gp_Pnt BasicGUI::ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3
 
   gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir);
   Standard_Real X, Y, Z;
-  aView->Convert(x, y, X, Y, Z);
+  aView->Convert(int(x), int(y), X, Y, Z);
   gp_Pnt ConvertedPoint(X, Y, Z);
 
   gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView, ConvertedPoint);
index 33f929e3d3044a05a647818a4e78446e11a646ab..4c3bfaa9c9f6326efd4af72a4e8aea83465963ec 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BasicGUI_ArcDlg.h"
 
 #include <BRepBuilderAPI_MakeEdge.hxx>
@@ -34,6 +33,10 @@ using namespace std;
 #include <Geom_TrimmedCurve.hxx>
 #include <Precision.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : BasicGUI_ArcDlg()
 // purpose  : Constructs a BasicGUI_ArcDlg which is a child of 'parent', with the 
@@ -137,6 +140,7 @@ void BasicGUI_ArcDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_ArcDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index b29e778fe2fbb0f8ff47d23026fd770857a46658..a10e4049f33e9720f2a9b8490f5d5baa54f53e00 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BasicGUI_CircleDlg.h"
 
 #include <gp_Lin.hxx>
@@ -35,6 +34,10 @@ using namespace std;
 #include <BRepAdaptor_Curve.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : BasicGUI_CircleDlg()
 // purpose  : Constructs a BasicGUI_CircleDlg which is a child of 'parent', with the 
@@ -147,6 +150,7 @@ void BasicGUI_CircleDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_CircleDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 6093d492b59d09feea8cab9de6724fe1c53d6ce8..80321b426bfae379a0e8e8a973387770466f3d14 100644 (file)
@@ -25,7 +25,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BasicGUI_EllipseDlg.h"
 
 #include <gp_Lin.hxx>
@@ -34,6 +33,10 @@ using namespace std;
 #include <BRepAdaptor_Curve.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : BasicGUI_EllipseDlg()
 // purpose  : Constructs a BasicGUI_EllipseDlg which is a child of 'parent', with the 
@@ -153,6 +156,7 @@ void BasicGUI_EllipseDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_EllipseDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index b5b6498214c2e17164512a244a2503285e25959c..a146f4d8eaa2d7c4fcb1b60760d52e1dcb9e8df5 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BasicGUI_LineDlg.h"
 
 #include <BRepBuilderAPI_MakeEdge.hxx>
@@ -34,6 +33,10 @@ using namespace std;
 #include <BRep_Builder.hxx>
 #include <Precision.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : BasicGUI_LineDlg()
 // purpose  : Constructs a BasicGUI_LineDlg which is a child of 'parent', with the 
@@ -135,6 +138,7 @@ void BasicGUI_LineDlg::ClickOnOk()
 //=================================================================================
 void BasicGUI_LineDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index cd429b1bcbe60a7c30042259ac9c4883784cb597..6b3a77f8f5e9b6c25b3709192a3410d16b593601 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BasicGUI_PlaneDlg.h"
 
 #include <BRepBuilderAPI_MakeFace.hxx>
@@ -37,6 +36,10 @@ using namespace std;
 #include <Precision.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : BasicGUI_PlaneDlg()
 // purpose  : Constructs a BasicGUI_PlaneDlg which is a child of 'parent', with the 
@@ -273,6 +276,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 f5b403f0dc63bd542cfe390846ba6d9da686a642..770cc70b35a34a44c4eaa3bdfb2efcc563230497 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "BuildGUI_EdgeDlg.h"
 
 #include <BRepBuilderAPI_MakeEdge.hxx>
 #include <Precision.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : BuildGUI_EdgeDlg()
 // purpose  : Constructs a BuildGUI_EdgeDlg which is a child of 'parent', with the 
index 2edaf57b90e539f515949d54cbdd42ea4abd11d4..19723141452493df16cd84dcf6f89296eec7c93c 100644 (file)
@@ -52,7 +52,7 @@ BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, BuildGUI*
 
   GroupPoints = new DlgRef_1Sel1Check_QTD(this, "GroupPoints");
   GroupPoints->GroupBox1->setTitle(tr("GEOM_FACE_FFW"));
-  GroupPoints->TextLabel1->setText(tr("GEOM_WIRE"));
+  GroupPoints->TextLabel1->setText(tr("GEOM_WIRES"));
   GroupPoints->CheckButton1->setText(tr("GEOM_FACE_OPT"));
   GroupPoints->PushButton1->setPixmap(image1);
 
index 8a33f4cf62b112fc6300b830770e43ddf5d954f8..1f4df38cf183a5cb75d628286c391461b213da52 100644 (file)
@@ -87,7 +87,7 @@ void BuildGUI_ShellDlg::Init()
   myEditCurrentArgument = GroupShell->LineEdit1;
   myOkListShapes = false;
 
-  myFaceFilter = new GEOM_FaceFilter(StdSelect_Plane, myGeom);
+  myFaceFilter = new GEOM_ShapeTypeFilter(TopAbs_FACE, myGeom);
   /* Filter for the next selection */
   mySelection->AddFilter(myFaceFilter) ;
 
@@ -163,10 +163,8 @@ void BuildGUI_ShellDlg::SelectionIntoArgument()
 //=================================================================================
 void BuildGUI_ShellDlg::SetEditCurrentArgument()
 {
-  QPushButton* send = (QPushButton*)sender();
-  mySelection->ClearFilters() ;
+  mySelection->ClearFilters();
   GroupShell->LineEdit1->setFocus();
-  myEditCurrentArgument = GroupShell->LineEdit1;
   mySelection->AddFilter(myFaceFilter);
   this->SelectionIntoArgument();
   return;
index 87f3d428ec9ffb3f47da06a8683495558a462895..3bb8608572de9bac9075fde6345eb64af9f0aa6d 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "BuildGUI.h"
 
-#include "GEOM_FaceFilter.hxx"
+#include "GEOM_ShapeTypeFilter.hxx"
 
 //=================================================================================
 // class    : BuildGUI_ShellDlg
@@ -54,7 +54,7 @@ private:
 
     BuildGUI* myBuildGUI;
 
-    Handle(GEOM_FaceFilter) myFaceFilter;    /* Filters selection */
+    Handle(GEOM_ShapeTypeFilter) myFaceFilter;    /* Filters selection */
     GEOM::GEOM_Gen::ListOfIOR myListShapes;
     bool myOkListShapes;          /* to check when arguments is defined */
 
@@ -64,7 +64,6 @@ private slots:
     void ClickOnOk();
     void ClickOnApply();
     void SetEditCurrentArgument();
-    void LineEditReturnPressed();
     void SelectionIntoArgument();
     void ActivateThisDialog();
 
index 73235ed1b2638f44061cac6da7de74c624048df7..0ef6fcdfe14d03599d0bf493f0826012f7dbd1c0 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header: 
 
-using namespace std;
 #include "DisplayGUI.h"
 
 #include "QAD_RightFrame.h"
@@ -39,6 +38,10 @@ using namespace std;
 
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=======================================================================
 // function : DisplayGUI()
 // purpose  : Constructor
@@ -232,6 +235,11 @@ void DisplayGUI::BuildPresentation(const Handle(SALOME_InteractiveObject)& theIO
   if(theIO.IsNull())
     MESSAGE("BuildPresentation(): null SALOME_InteractiveObject passed")
 
+  Standard_Boolean testResult;
+  GEOM::GEOM_Shape_var myGeomShape = myDisplayGUI->myGeomBase->ConvertIOinGEOMShape(theIO, testResult);
+  if(!testResult)
+    return;
+
   if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
     // VTK
          
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 cb1100af37069b1cca0f7eaf023d77b4d6d06817..897e3f19c7804d1f1f8ea4ad4ac8c056cae8ffd0 100644 (file)
@@ -1,7 +1,7 @@
 /****************************************************************************
 ** Form implementation generated from reading ui file 'DlgRef_Skeleton_QTD.ui'
 **
-** Created: mar sep 23 15:06:58 2003
+** Created: Fri Apr 16 12:57:26 2004
 **      by:  The User Interface Compiler (uic)
 **
 ** WARNING! All changes made in this file will be lost!
@@ -11,6 +11,8 @@
 #include <qvariant.h>
 #include <qbuttongroup.h>
 #include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
 #include <qpushbutton.h>
 #include <qradiobutton.h>
 #include <qlayout.h>
@@ -29,7 +31,7 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent,  const char* name, bo
 {
     if ( !name )
        setName( "DlgRef_Skeleton_QTD" );
-    resize( 307, 147 ); 
+    resize( 321, 295 ); 
     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
     setCaption( trUtf8( "DlgRef_Skeleton_QTD" ) );
     setSizeGripEnabled( TRUE );
@@ -37,6 +39,12 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent,  const char* name, bo
 
     Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
 
+    GroupMedium = new QGroupBox( this, "GroupMedium" );
+    GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) );
+    GroupMedium->setTitle( trUtf8( "" ) );
+
+    Layout1->addWidget( GroupMedium, 2, 0 );
+
     GroupButtons = new QGroupBox( this, "GroupButtons" );
     GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) );
     GroupButtons->setTitle( trUtf8( "" ) );
@@ -63,7 +71,7 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent,  const char* name, bo
     Layout3->addWidget( buttonCancel );
     GroupButtonsLayout->addLayout( Layout3 );
 
-    Layout1->addWidget( GroupButtons, 2, 0 );
+    Layout1->addWidget( GroupButtons, 3, 0 );
 
     GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
     GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
@@ -92,11 +100,28 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent,  const char* name, bo
 
     Layout1->addWidget( GroupConstructors, 0, 0 );
 
-    GroupMedium = new QGroupBox( this, "GroupMedium" );
-    GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) );
-    GroupMedium->setTitle( trUtf8( "" ) );
+    GroupBoxName = new QGroupBox( this, "GroupBoxName" );
+    GroupBoxName->setTitle( trUtf8( "Result name" ) );
+    GroupBoxName->setColumnLayout(0, Qt::Vertical );
+    GroupBoxName->layout()->setSpacing( 6 );
+    GroupBoxName->layout()->setMargin( 11 );
+    GroupBoxNameLayout = new QGridLayout( GroupBoxName->layout() );
+    GroupBoxNameLayout->setAlignment( Qt::AlignTop );
+
+    Layout66 = new QGridLayout( 0, 1, 1, 0, 6, "Layout66"); 
+
+    ResultName = new QLineEdit( GroupBoxName, "ResultName" );
+
+    Layout66->addWidget( ResultName, 0, 1 );
+
+    NameLabel = new QLabel( GroupBoxName, "NameLabel" );
+    NameLabel->setText( trUtf8( "Name" ) );
+
+    Layout66->addWidget( NameLabel, 0, 0 );
+
+    GroupBoxNameLayout->addLayout( Layout66, 0, 0 );
 
-    Layout1->addWidget( GroupMedium, 1, 0 );
+    Layout1->addWidget( GroupBoxName, 1, 0 );
 
     DlgRef_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 );
 }
index f16363d60729a8718359a42c4adc407b3d10d8e2..38d6d83d65a197146d707002c65f1db4bd665157 100644 (file)
@@ -1,7 +1,7 @@
 /****************************************************************************
 ** Form interface generated from reading ui file 'DlgRef_Skeleton_QTD.ui'
 **
-** Created: mar sep 23 15:06:57 2003
+** Created: Fri Apr 16 12:57:26 2004
 **      by:  The User Interface Compiler (uic)
 **
 ** WARNING! All changes made in this file will be lost!
@@ -16,6 +16,8 @@ class QHBoxLayout;
 class QGridLayout; 
 class QButtonGroup;
 class QGroupBox;
+class QLabel;
+class QLineEdit;
 class QPushButton;
 class QRadioButton;
 
@@ -27,6 +29,7 @@ public:
     DlgRef_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
     ~DlgRef_Skeleton_QTD();
 
+    QGroupBox* GroupMedium;
     QGroupBox* GroupButtons;
     QPushButton* buttonOk;
     QPushButton* buttonApply;
@@ -35,7 +38,9 @@ public:
     QRadioButton* RadioButton1;
     QRadioButton* RadioButton2;
     QRadioButton* RadioButton3;
-    QGroupBox* GroupMedium;
+    QGroupBox* GroupBoxName;
+    QLineEdit* ResultName;
+    QLabel* NameLabel;
 
 
 protected:
@@ -45,6 +50,8 @@ protected:
     QHBoxLayout* Layout3;
     QGridLayout* GroupConstructorsLayout;
     QHBoxLayout* Layout2;
+    QGridLayout* GroupBoxNameLayout;
+    QGridLayout* Layout66;
 };
 
 #endif // DLGREF_SKELETON_QTD_H
index 0c6e57718d3794268f150a9f38d1995fccb85925..eed5c27f4e8f2f6a651c8df5d2d99f94db3b1df1 100644 (file)
@@ -8,8 +8,8 @@
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>307</width>
-            <height>147</height>
+            <width>321</width>
+            <height>295</height>
         </rect>
     </property>
     <property name="sizePolicy">
                     <number>6</number>
                 </property>
                 <widget class="QGroupBox" row="2" column="0">
+                    <property name="name">
+                        <cstring>GroupMedium</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>7</hsizetype>
+                            <vsizetype>7</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="title">
+                        <string></string>
+                    </property>
+                </widget>
+                <widget class="QGroupBox" row="3" column="0">
                     <property name="name">
                         <cstring>GroupButtons</cstring>
                     </property>
                 </widget>
                 <widget class="QGroupBox" row="1" column="0">
                     <property name="name">
-                        <cstring>GroupMedium</cstring>
-                    </property>
-                    <property name="sizePolicy">
-                        <sizepolicy>
-                            <hsizetype>7</hsizetype>
-                            <vsizetype>7</vsizetype>
-                            <horstretch>0</horstretch>
-                            <verstretch>0</verstretch>
-                        </sizepolicy>
+                        <cstring>GroupBoxName</cstring>
                     </property>
                     <property name="title">
-                        <string></string>
+                        <string>Result name</string>
                     </property>
+                    <grid>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <property name="margin">
+                            <number>11</number>
+                        </property>
+                        <property name="spacing">
+                            <number>6</number>
+                        </property>
+                        <widget class="QLayoutWidget" row="0" column="0">
+                            <property name="name">
+                                <cstring>Layout66</cstring>
+                            </property>
+                            <grid>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <property name="margin">
+                                    <number>0</number>
+                                </property>
+                                <property name="spacing">
+                                    <number>6</number>
+                                </property>
+                                <widget class="QLineEdit" row="0" column="1">
+                                    <property name="name">
+                                        <cstring>ResultName</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="0" column="0">
+                                    <property name="name">
+                                        <cstring>NameLabel</cstring>
+                                    </property>
+                                    <property name="text">
+                                        <string>Name</string>
+                                    </property>
+                                </widget>
+                            </grid>
+                        </widget>
+                    </grid>
                 </widget>
             </grid>
         </widget>
index 4234a8477415a9d9a98bd3bca83bda3962a680b2..049b4fe00c5bc9305afa60815282996d62bdbe6b 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header: 
 
-using namespace std;
 #include "EntityGUI.h"
 
 #include "QAD_RightFrame.h"
@@ -36,18 +35,18 @@ using namespace std;
 #include "SALOMEGUI_ImportOperation.h"
 #include "SALOMEGUI_QtCatchCorbaException.hxx"
 
-#include <BRepTools_WireExplorer.hxx>
-#include <TopoDS_Wire.hxx>
 #include <TopoDS_Compound.hxx>
-#include <BRep_Tool.hxx>
 #include <BRep_Builder.hxx>
-#include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
-#include <Geom_Circle.hxx>
-#include <Precision.hxx>
 
 #include "DisplayGUI.h"
-#include "EntityGUI_SubShapeDlg.h"   // Method SUBSHAPE
+
+#include "EntityGUI_SketcherDlg.h" // Sketcher
+#include "EntityGUI_SubShapeDlg.h" // Method SUBSHAPE
+
+#include "utilities.h"
+
+using namespace std;
 
 //=======================================================================
 // function : EntityGUI()
@@ -59,6 +58,9 @@ EntityGUI::EntityGUI() :
   myGeomBase = new GEOMBase();
   myGeomGUI = GEOMContext::GetGeomGUI();
   myGeom = myGeomGUI->myComponentGeom;
+
+  mySimulationShape1 = new AIS_Shape(TopoDS_Shape());
+  mySimulationShape2 = new AIS_Shape(TopoDS_Shape());
 }
 
 
@@ -81,126 +83,12 @@ bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
   myEntityGUI->myGeomGUI->EmitSignalDeactivateDialog();
   SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection());
 
-  QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-
   switch (theCommandID)
     {
     case 404: // SKETCHER
       {
        ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewTop(); // DCQ : 28/02/2002
-       
-       OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
-
-       myEntityGUI->myGeomGUI->GetSketcher() = Sketch(v3d->getViewer3d());
-       myEntityGUI->myGeomGUI->myState = 2;
-
-       Mb->setItemChecked(4052, false);
-       Mb->setItemChecked(4053, false);
-
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(LENGTH_PARAMETER, Mb->isItemChecked(4061));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(ANGLE_PARAMETER, Mb->isItemChecked(4062));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(RADIUS_PARAMETER, Mb->isItemChecked(4063));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(XVALUE_PARAMETER, Mb->isItemChecked(4064));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(YVALUE_PARAMETER, Mb->isItemChecked(4065));
-       
-       myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
-       break;
-      }
-    case 4041: // SKETCH Segment
-      {
-       myEntityGUI->myGeomGUI->GetSketcher().ChangeMode(SEGMENT);
-       break;
-      }
-    case 4042: // SKETCH Arc
-      {
-       myEntityGUI->myGeomGUI->GetSketcher().ChangeMode(ARC_CHORD);
-       break;
-      }
-    case 4043: // SKETCH Set Angle
-      {
-       myEntityGUI->OnSketchSetAngle();
-       break;
-      }
-    case 4044: // SKETCH Set X
-      {
-       myEntityGUI->OnSketchSetx();
-       break;
-      }
-    case 4045: // SKETCH Set Y
-      {
-       myEntityGUI->OnSketchSety();
-       break;
-      }
-    case 4046: // SKETCH Delete
-      {
-       myEntityGUI->OnSketchDelete();
-       break;
-      }
-    case 4047: // SKETCH End
-      {
-       myEntityGUI->OnSketchEnd();
-       break;
-      }
-    case 4048: // SKETCH Close
-      {
-       myEntityGUI->OnSketchClose();
-       break;
-      }
-    case 4051: // sketcher Set Plane
-      {
-       //TO DO
-       break;
-      }
-    case 4052: // sketcher TANGENT
-      { 
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       if(Mb->isItemChecked(theCommandID) == true) 
-         myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(TANGENT);
-       else
-         myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
-
-       Mb->setItemChecked(4053, false);
-       break;
-      }
-    case 4053: // sketcher PERPENDICULAR
-      {
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       if(Mb->isItemChecked(theCommandID) == true) 
-         myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(PERPENDICULAR);
-       else 
-         myEntityGUI->myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
-       
-       Mb->setItemChecked(4052, false);
-       break;
-      }
-    case 4061: // SKETCH OptionsOnofflengthdimension
-      {
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(LENGTH_PARAMETER, Mb->isItemChecked(theCommandID));
-       break;
-      }
-    case 4062: // SKETCH OptionsOnoffangledimension
-      {
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(ANGLE_PARAMETER, Mb->isItemChecked(theCommandID));
-       break;
-      }
-    case 4063: // SKETCH OptionsOnoffradiusdimension
-      {
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(RADIUS_PARAMETER, Mb->isItemChecked(theCommandID));
-       break;
-      }
-    case 4064: // SKETCH OptionsOnoffxdimension
-      {
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(XVALUE_PARAMETER, Mb->isItemChecked(theCommandID));
-       break;
-      }
-    case 4065: // SKETCH OptionsOnoffydimension
-      {
-       Mb->setItemChecked(theCommandID, !Mb->isItemChecked(theCommandID));
-       myEntityGUI->myGeomGUI->GetSketcher().SetParameterVisibility(YVALUE_PARAMETER, Mb->isItemChecked(theCommandID));
+       EntityGUI_SketcherDlg* aDlg = new EntityGUI_SketcherDlg(parent, "", myEntityGUI, Sel);
        break;
       }
     case 407: // EXPLODE : use ic
@@ -224,254 +112,97 @@ bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
 
 
 //=======================================================================
-// function : OnSketchSetAngle()
+// function : OnSketchEnd()
 // purpose  : 
 //=======================================================================
-void EntityGUI::OnSketchSetAngle()
+void EntityGUI::OnSketchEnd(const char *Cmd)
 {
-  Standard_Real anAngle = myGeomGUI->GetSketcher().GetSegmentAngle()/PI180;
-  Sketch::fitInResol(anAngle); 
-  Standard_Boolean res = false;
-  QString Value = QString("%1").arg(anAngle);
-  anAngle = myGeomBase->Parameter(res, Value, tr("GEOM_MEN_ANGLE"), tr("GEOM_MEN_ENTER_ANGLE"),
-                     -180.0, +180.0, 6) * PI180;
-
-  if(res) {
-    myGeomGUI->GetSketcher().SetSegmentAngle(anAngle);
-    QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-    Mb->setItemChecked(4052, false);
-    Mb->setItemChecked(4053, false);
+  try {
+    GEOM::GEOM_Shape_var result = myGeom->MakeSketcher(Cmd);
+    if(result->_is_nil()) {
+      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE"));
+      return;
+    }
+    result->NameType(tr("GEOM_WIRE"));
+    if(myGeomBase->Display(result))
+      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
   }
-  return;
-}
-
-
-//=======================================================================
-// function : OnSketchSetx()
-// purpose  : 
-//=======================================================================
-void EntityGUI::OnSketchSetx()
-{
-  Standard_Boolean res = false;
-  double X = myGeomBase->Parameter(res, "0.", tr("GEOM_MEN_X"), tr("GEOM_MEN_SKETCHER_X"),
-                      2.0 * Precision::Confusion(), 1E6, 6);
-  if(res)
-    myGeomGUI->GetSketcher().SetXDimension(X);
-  QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-  Mb->setItemChecked(4052, false);
-  Mb->setItemChecked(4053, false);
-  return;
-}
-
-
-//=======================================================================
-// function : OnSketchSety()
-// purpose  : 
-//=======================================================================
-void EntityGUI::OnSketchSety()
-{
-  Standard_Boolean res = false;
-  double Y = myGeomBase->Parameter(res, "0.", tr("GEOM_MEN_Y"), tr("GEOM_MEN_SKETCHER_Y"), 2.0 * Precision::Confusion(), 1E6, 6);
-  if(res)
-    myGeomGUI->GetSketcher().SetYDimension(Y);
-  QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-  Mb->setItemChecked(4052, false);
-  Mb->setItemChecked(4053, false);
-  return;
-}
-
-
-//=======================================================================
-// function : OnSketchDelete()
-// purpose  : 
-//=======================================================================
-void EntityGUI::OnSketchDelete()
-{
-  if(myGeomGUI->GetSketcher().GetmyEdgesNumber() == 1) {
-    QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-    Mb->setItemEnabled(405, false);  // SKETCH CONTRAINTS
-    myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
+  catch(const SALOME::SALOME_Exception& S_ex) {
+    QtCatchCorbaException(S_ex);
   }
-
-  if(myGeomGUI->GetSketcher().Delete())
-    myGeomGUI->myState = -1;
   return;
 }
 
 
-//=======================================================================
-// function : OnSketchClose()
-// purpose  : 
-//=======================================================================
-void EntityGUI::OnSketchClose()
+//=====================================================================================
+// function : DisplaySimulationShape() 
+// purpose  : Displays 'this->mySimulationShape' a pure graphical shape from a TopoDS_Shape
+//=====================================================================================
+void EntityGUI::DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2) 
 {
-  OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
-  Handle(AIS_InteractiveContext) myContext = v3d->getAISContext();
-
-  TopoDS_Wire W = myGeomGUI->GetSketcher().Close();
-  if(!W.IsNull()) {
-    GEOM::GEOM_Gen::ListOfIOR_var listShapes = new GEOM::GEOM_Gen::ListOfIOR;
-    listShapes->length(0);
-    unsigned int i = 0;
-
-    BRepTools_WireExplorer Ex(W);
-    while(Ex.More()) {
-      TopoDS_Edge E = Ex.Current();
-      gp_Pnt pt1, pt2;
-
-      pt1 = BRep_Tool::Pnt(TopExp::FirstVertex(E));
-      pt2 = BRep_Tool::Pnt(TopExp::LastVertex(E));
-
-      gp_Pnt CenterPoint;
-      Handle(Geom_Curve) Curve;
-      Handle(Geom_Circle) Circle;
-      gp_Circ Circ;
-      Standard_Real First,Last;
-
-      Curve = BRep_Tool::Curve(E,First,Last);
-      if(Curve->IsKind(STANDARD_TYPE(Geom_Circle))) {
-       Circle = Handle(Geom_Circle)::DownCast(Curve); // pointer on geom_circ
-       Circ = Circle->Circ();                         // gp_Circ
+  //NRI DEBUG : 14/02/2002
+  if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
+    return;
        
-       Curve->D0((First + Last) / 2., CenterPoint);
-
-       GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
-       GEOM::PointStruct pC = myGeom->MakePointStruct(CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z());
-       GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
-
-       GEOM::GEOM_Shape_var arc;
-
-       try {
-         arc = myGeom->MakeArc(pI, pC, pE);
-       }
-       catch (const SALOME::SALOME_Exception& S_ex) {
-         QtCatchCorbaException(S_ex);
-       }
+  OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
+  Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
+  try {
+    if(!S1.IsNull()) {
+      /* erase any previous */
+      ic->Erase(mySimulationShape1, Standard_True, Standard_False);
+      ic->ClearPrs(mySimulationShape1);
+      
+      mySimulationShape1 = new AIS_Shape(TopoDS_Shape());
+      mySimulationShape1->Set(S1);
+      mySimulationShape1->SetColor(Quantity_NOC_RED);
+    
+      ic->Deactivate(mySimulationShape1);
+      ic->Display(mySimulationShape1, Standard_False);
+      mySimulationShape1->UnsetColor();
+    }
+    if(!S2.IsNull()) {
+      ic->Erase(mySimulationShape2, Standard_True, Standard_False);
+      ic->ClearPrs(mySimulationShape2);
 
-       listShapes->length(i+1);
-       listShapes[i] = strdup(arc->Name());
-       i++;   
-      }
-      else {
-       GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
-       GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
-       GEOM::GEOM_Shape_var segment;
-
-       try {
-         segment = myGeom->MakeEdge(pI,pE);
-       }       
-       catch (const SALOME::SALOME_Exception& S_ex) {
-         QtCatchCorbaException(S_ex);
-       }
+      mySimulationShape2 = new AIS_Shape(TopoDS_Shape());
+      mySimulationShape2->Set(S2);
+      mySimulationShape2->SetColor(Quantity_NOC_VIOLET);
 
-       listShapes->length(i+1);
-       listShapes[i] = strdup(segment->Name());
-       i++;
-      }
-      Ex.Next();
+      ic->Deactivate(mySimulationShape2);
+      ic->Display(mySimulationShape2, Standard_False);
+      mySimulationShape2->UnsetColor();
     }
-    GEOM::GEOM_Shape_var Wire = myGeom->MakeWire(listShapes);
-    TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, Wire);
-    Standard_CString type;
-    myGeomBase->GetShapeTypeString(S,type);
-    Wire->NameType(type);
-
-    if(myGeomBase->Display(Wire))
-      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
+    ic->UpdateCurrentViewer();
   }
-  myGeomGUI->myState = -1;
-  QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-  Mb->setItemEnabled(405, false);  // SKETCH CONTRAINTS
-  myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
+  catch(Standard_Failure) {
+    MESSAGE("Exception catched in EntityGUI::DisplaySimulationShape ");
+  } 
   return;
 }
 
 
-//=======================================================================
-// function : OnSketchEnd()
-// purpose  : 
-//=======================================================================
-void EntityGUI::OnSketchEnd()
+//==================================================================================
+// function : EraseSimulationShape()
+// purpose  : Clears the display of 'mySimulationShape' a pure graphical shape
+//==================================================================================
+void EntityGUI::EraseSimulationShape(int Sh)
 {
-  OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
-  Handle (AIS_InteractiveContext) myContext = v3d->getAISContext();
-
-  TopoDS_Wire W = myGeomGUI->GetSketcher().End();
-  if(!W.IsNull()) {
-    GEOM::GEOM_Gen::ListOfIOR_var listShapes = new GEOM::GEOM_Gen::ListOfIOR;
-    listShapes->length(0);
-    unsigned int i = 0;
-
-    BRepTools_WireExplorer Ex(W);
-    while(Ex.More()) {
-      TopoDS_Edge E = TopoDS::Edge(Ex.Current());
-      
-      gp_Pnt pt1, pt2;
-      pt1 = BRep_Tool::Pnt(TopExp::FirstVertex(E));
-      pt2 = BRep_Tool::Pnt(TopExp::LastVertex(E));
-
-      gp_Pnt CenterPoint;
-      Handle(Geom_Curve) Curve;
-      Handle(Geom_Circle) Circle;
-      gp_Circ Circ;
-      Standard_Real First,Last;
-      
-      Curve = BRep_Tool::Curve(E,First,Last);
-      if(Curve->IsKind(STANDARD_TYPE(Geom_Circle))) {
-       Circle = Handle(Geom_Circle)::DownCast(Curve); // pointer on geom_circ
-       Circ = Circle->Circ();                         // gp_Circ
-       
-       Curve->D0((First + Last) / 2., CenterPoint);
-
-       GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
-       GEOM::PointStruct pC = myGeom->MakePointStruct(CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z());
-       GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
-
-       GEOM::GEOM_Shape_var arc;
-
-       try {
-         arc = myGeom->MakeArc(pI, pC, pE);
-       }
-       catch (const SALOME::SALOME_Exception& S_ex) {
-         QtCatchCorbaException(S_ex);
-       }
-               
-       listShapes->length(i+1);
-       listShapes[i] = strdup(arc->Name());
-       i++;   
-      } else {
-       GEOM::PointStruct pI = myGeom->MakePointStruct(pt1.X(), pt1.Y(), pt1.Z());
-       GEOM::PointStruct pE = myGeom->MakePointStruct(pt2.X(), pt2.Y(), pt2.Z());
-       GEOM::GEOM_Shape_var segment;
-       
-       try {
-         segment = myGeom->MakeEdge(pI,pE);
-       }
-       catch (const SALOME::SALOME_Exception& S_ex) {
-         QtCatchCorbaException(S_ex);
-       }
-       
-       listShapes->length(i+1);
-       listShapes[i] = strdup(segment->Name());
-       i++;
+  int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount();
+  for(int i = 0; i < count; i++) {
+    if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
+      OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
+      Handle(AIS_InteractiveContext) ic = v3d->getAISContext();
+      if(Sh < 1) {
+       ic->Erase(mySimulationShape1, Standard_True, Standard_False);
+       ic->ClearPrs(mySimulationShape1);
       }
-      Ex.Next();
-    }
-
-    GEOM::GEOM_Shape_var Wire = myGeom->MakeWire(listShapes);
-    TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, Wire);
-    Standard_CString type;
-    myGeomBase->GetShapeTypeString(S,type);
-    Wire->NameType(type);
-
-    if(myGeomBase->Display(Wire))
-      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
+      if(Sh <= 1) {
+       ic->Erase(mySimulationShape2, Standard_True, Standard_False);
+       ic->ClearPrs(mySimulationShape2);
+      }
+      ic->UpdateCurrentViewer();
+    } 
   }
-  myGeomGUI->myState = -1;
-  QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-  Mb->setItemEnabled(405, false);  // SKETCH CONTRAINTS
-  myGeomGUI->GetSketcher().SetTransitionStatus(NOCONSTRAINT);
-  return;
 }
 
 
@@ -579,7 +310,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 +545,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 +554,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 863e310ed0276a50ca24a16a9bc82a43211a100f..9ecb56744a70ece9df777705ed90a2ca1dccbc8f 100644 (file)
@@ -45,14 +45,10 @@ public :
 
   static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
 
-  /* Sketcher management */
-  void OnSketchSetAngle();
-  void OnSketchSetx();
-  void OnSketchSety();
-  
-  void OnSketchDelete();
-  void OnSketchClose();
-  void OnSketchEnd();
+  void OnSketchEnd(const char *Cmd);
+
+  void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2); 
+  void EraseSimulationShape(int Sh = 0);
 
     /* Methods for sub shapes explode */
   bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR);
@@ -60,6 +56,10 @@ public :
   bool OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType,
                             Standard_Integer& aLocalContextId, bool& myUseLocalContext);
 
+  /* AIS shape used only during topo/geom simulations */
+  Handle(AIS_Shape) mySimulationShape1;
+  Handle(AIS_Shape) mySimulationShape2;
+
   GEOMBase* myGeomBase;
   GEOMContext* myGeomGUI;
   GEOM::GEOM_Gen_var myGeom;   /* Current Geom Component */
diff --git a/src/EntityGUI/EntityGUI_1Sel_QTD.cxx b/src/EntityGUI/EntityGUI_1Sel_QTD.cxx
new file mode 100644 (file)
index 0000000..01584de
--- /dev/null
@@ -0,0 +1,94 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_1Sel_QTD.ui'
+**
+** Created: Fri Apr 30 11:23:36 2004
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_1Sel_QTD.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_1Sel_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_1Sel_QTD::EntityGUI_1Sel_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_1Sel_QTD" );
+    resize( 245, 110 ); 
+    setCaption( trUtf8( "EntityGUI_1Sel_QTD" ) );
+    EntityGUI_1Sel_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_1Sel_QTDLayout"); 
+
+    GroupBox1 = new QGroupBox( this, "GroupBox1" );
+    GroupBox1->setTitle( trUtf8( "Values" ) );
+    GroupBox1->setColumnLayout(0, Qt::Vertical );
+    GroupBox1->layout()->setSpacing( 6 );
+    GroupBox1->layout()->setMargin( 11 );
+    GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
+    GroupBox1Layout->setAlignment( Qt::AlignTop );
+
+    Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); 
+
+    Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); 
+
+    buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
+    buttonUndo->setText( trUtf8( "Undo" ) );
+
+    Layout2->addWidget( buttonUndo, 1, 0 );
+
+    buttonApply = new QPushButton( GroupBox1, "buttonApply" );
+    buttonApply->setText( trUtf8( "Create" ) );
+
+    Layout2->addWidget( buttonApply, 0, 0 );
+    QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout2->addItem( spacer, 2, 0 );
+
+    Layout3->addLayout( Layout2, 0, 1 );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    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( TextLabel1, 0, 0 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 0, 180, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( spacer_2, 1, 2 );
+
+    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" );
+    LineEdit1->setFocusPolicy( QLineEdit::NoFocus );
+
+    Layout1->addWidget( LineEdit1, 0, 2 );
+
+    Layout3->addLayout( Layout1, 0, 0 );
+
+    GroupBox1Layout->addLayout( Layout3, 0, 0 );
+
+    EntityGUI_1Sel_QTDLayout->addWidget( GroupBox1, 0, 0 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_1Sel_QTD::~EntityGUI_1Sel_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_1Sel_QTD.h b/src/EntityGUI/EntityGUI_1Sel_QTD.h
new file mode 100644 (file)
index 0000000..915cda9
--- /dev/null
@@ -0,0 +1,46 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_1Sel_QTD.ui'
+**
+** Created: Fri Apr 30 11:23:32 2004
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_1SEL_QTD_H
+#define ENTITYGUI_1SEL_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+
+class EntityGUI_1Sel_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_1Sel_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_1Sel_QTD();
+
+    QGroupBox* GroupBox1;
+    QPushButton* buttonUndo;
+    QPushButton* buttonApply;
+    QLabel* TextLabel1;
+    QPushButton* PushButton1;
+    QLineEdit* LineEdit1;
+
+
+protected:
+    QGridLayout* EntityGUI_1Sel_QTDLayout;
+    QGridLayout* GroupBox1Layout;
+    QGridLayout* Layout3;
+    QGridLayout* Layout2;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_1SEL_QTD_H
diff --git a/src/EntityGUI/EntityGUI_1Spin.cxx b/src/EntityGUI/EntityGUI_1Spin.cxx
new file mode 100644 (file)
index 0000000..131a455
--- /dev/null
@@ -0,0 +1,56 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_1Spin.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#include "EntityGUI_1Spin.h"
+
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qgroupbox.h>
+
+/* 
+ *  Constructs a EntityGUI_1Spin which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f' 
+ */
+EntityGUI_1Spin::EntityGUI_1Spin(QWidget* parent, const char* name, WFlags fl)
+  :EntityGUI_1Spin_QTD(parent, name, fl)
+{
+  SpinBox1->close(TRUE);
+
+  SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
+  Layout1->addWidget(SpinBox_DX, 0, 1);
+
+}
+
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_1Spin::~EntityGUI_1Spin()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
diff --git a/src/EntityGUI/EntityGUI_1Spin.h b/src/EntityGUI/EntityGUI_1Spin.h
new file mode 100644 (file)
index 0000000..fb5814c
--- /dev/null
@@ -0,0 +1,47 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_1Spin.h
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef ENTITYGUI_1SPIN_H
+#define ENTITYGUI_1SPIN_H
+
+#include "EntityGUI_1Spin_QTD.h"
+#include "DlgRef_SpinBox.h"
+
+class EntityGUI_1Spin : public EntityGUI_1Spin_QTD
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_1Spin(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+    ~EntityGUI_1Spin();
+
+    DlgRef_SpinBox* SpinBox_DX;
+
+};
+
+#endif // ENTITYGUI_1SPIN_H
diff --git a/src/EntityGUI/EntityGUI_1Spin_QTD.cxx b/src/EntityGUI/EntityGUI_1Spin_QTD.cxx
new file mode 100644 (file)
index 0000000..20f21d2
--- /dev/null
@@ -0,0 +1,88 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_1Spin_QTD.ui'
+**
+** Created: ven déc 12 11:17:10 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_1Spin_QTD.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_1Spin_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_1Spin_QTD::EntityGUI_1Spin_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_1Spin_QTD" );
+    resize( 154, 96 ); 
+    setCaption( trUtf8( "EntityGUI_1Spin_QTD" ) );
+    EntityGUI_1Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_1Spin_QTDLayout"); 
+
+    GroupBox1 = new QGroupBox( this, "GroupBox1" );
+    GroupBox1->setTitle( trUtf8( "Values" ) );
+    GroupBox1->setColumnLayout(0, Qt::Vertical );
+    GroupBox1->layout()->setSpacing( 6 );
+    GroupBox1->layout()->setMargin( 11 );
+    GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
+    GroupBox1Layout->setAlignment( Qt::AlignTop );
+
+    Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); 
+
+    Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); 
+
+    buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
+    buttonUndo->setText( trUtf8( "Undo" ) );
+
+    Layout2->addWidget( buttonUndo, 1, 0 );
+
+    buttonApply = new QPushButton( GroupBox1, "buttonApply" );
+    buttonApply->setText( trUtf8( "Create" ) );
+
+    Layout2->addWidget( buttonApply, 0, 0 );
+    QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout2->addItem( spacer, 2, 0 );
+
+    Layout3->addLayout( Layout2, 0, 1 );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    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( TextLabel1, 0, 0 );
+
+    SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
+    SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox1, 0, 1 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( spacer_2, 3, 1 );
+
+    Layout3->addLayout( Layout1, 0, 0 );
+
+    GroupBox1Layout->addLayout( Layout3, 0, 0 );
+
+    EntityGUI_1Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_1Spin_QTD::~EntityGUI_1Spin_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_1Spin_QTD.h b/src/EntityGUI/EntityGUI_1Spin_QTD.h
new file mode 100644 (file)
index 0000000..b442382
--- /dev/null
@@ -0,0 +1,45 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_1Spin_QTD.ui'
+**
+** Created: ven déc 12 11:17:10 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_1SPIN_QTD_H
+#define ENTITYGUI_1SPIN_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+
+class EntityGUI_1Spin_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_1Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_1Spin_QTD();
+
+    QGroupBox* GroupBox1;
+    QPushButton* buttonUndo;
+    QPushButton* buttonApply;
+    QLabel* TextLabel1;
+    QSpinBox* SpinBox1;
+
+
+protected:
+    QGridLayout* EntityGUI_1Spin_QTDLayout;
+    QGridLayout* GroupBox1Layout;
+    QGridLayout* Layout3;
+    QGridLayout* Layout2;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_1SPIN_QTD_H
diff --git a/src/EntityGUI/EntityGUI_2Spin.cxx b/src/EntityGUI/EntityGUI_2Spin.cxx
new file mode 100644 (file)
index 0000000..b71d731
--- /dev/null
@@ -0,0 +1,60 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_2Spin.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#include "EntityGUI_2Spin.h"
+
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qgroupbox.h>
+
+/* 
+ *  Constructs a EntityGUI_2Spin which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f' 
+ */
+EntityGUI_2Spin::EntityGUI_2Spin(QWidget* parent, const char* name, WFlags fl)
+  :EntityGUI_2Spin_QTD(parent, name, fl)
+{
+  SpinBox1->close(TRUE);
+  SpinBox2->close(TRUE);
+
+  SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
+  Layout1->addWidget(SpinBox_DX, 0, 1);
+
+  SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
+  Layout1->addWidget(SpinBox_DY, 1, 1);
+
+}
+
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_2Spin::~EntityGUI_2Spin()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
diff --git a/src/EntityGUI/EntityGUI_2Spin.h b/src/EntityGUI/EntityGUI_2Spin.h
new file mode 100644 (file)
index 0000000..4d0dd21
--- /dev/null
@@ -0,0 +1,48 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_2Spin.h
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef ENTITYGUI_2SPIN_H
+#define ENTITYGUI_2SPIN_H
+
+#include "EntityGUI_2Spin_QTD.h"
+#include "DlgRef_SpinBox.h"
+
+class EntityGUI_2Spin : public EntityGUI_2Spin_QTD
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_2Spin(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
+    ~EntityGUI_2Spin();
+
+    DlgRef_SpinBox* SpinBox_DX;
+    DlgRef_SpinBox* SpinBox_DY;
+
+};
+
+#endif // ENTITYGUI_2SPIN_H
diff --git a/src/EntityGUI/EntityGUI_2Spin_QTD.cxx b/src/EntityGUI/EntityGUI_2Spin_QTD.cxx
new file mode 100644 (file)
index 0000000..a01f2a7
--- /dev/null
@@ -0,0 +1,99 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_2Spin_QTD.ui'
+**
+** Created: ven déc 12 11:17:11 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_2Spin_QTD.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_2Spin_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_2Spin_QTD::EntityGUI_2Spin_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_2Spin_QTD" );
+    resize( 154, 96 ); 
+    setCaption( trUtf8( "EntityGUI_2Spin_QTD" ) );
+    EntityGUI_2Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_2Spin_QTDLayout"); 
+
+    GroupBox1 = new QGroupBox( this, "GroupBox1" );
+    GroupBox1->setTitle( trUtf8( "Values" ) );
+    GroupBox1->setColumnLayout(0, Qt::Vertical );
+    GroupBox1->layout()->setSpacing( 6 );
+    GroupBox1->layout()->setMargin( 11 );
+    GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
+    GroupBox1Layout->setAlignment( Qt::AlignTop );
+
+    Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); 
+
+    Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); 
+
+    buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
+    buttonUndo->setText( trUtf8( "Undo" ) );
+
+    Layout2->addWidget( buttonUndo, 1, 0 );
+
+    buttonApply = new QPushButton( GroupBox1, "buttonApply" );
+    buttonApply->setText( trUtf8( "Create" ) );
+
+    Layout2->addWidget( buttonApply, 0, 0 );
+    QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout2->addItem( spacer, 2, 0 );
+
+    Layout3->addLayout( Layout2, 0, 1 );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    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 );
+
+    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( TextLabel1, 0, 0 );
+
+    SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
+    SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox1, 0, 1 );
+
+    SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
+    SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox2, 1, 1 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( spacer_2, 3, 1 );
+
+    Layout3->addLayout( Layout1, 0, 0 );
+
+    GroupBox1Layout->addLayout( Layout3, 0, 0 );
+
+    EntityGUI_2Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_2Spin_QTD::~EntityGUI_2Spin_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_2Spin_QTD.h b/src/EntityGUI/EntityGUI_2Spin_QTD.h
new file mode 100644 (file)
index 0000000..4827aa8
--- /dev/null
@@ -0,0 +1,47 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_2Spin_QTD.ui'
+**
+** Created: ven déc 12 11:17:10 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_2SPIN_QTD_H
+#define ENTITYGUI_2SPIN_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+
+class EntityGUI_2Spin_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_2Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_2Spin_QTD();
+
+    QGroupBox* GroupBox1;
+    QPushButton* buttonUndo;
+    QPushButton* buttonApply;
+    QLabel* TextLabel2;
+    QLabel* TextLabel1;
+    QSpinBox* SpinBox1;
+    QSpinBox* SpinBox2;
+
+
+protected:
+    QGridLayout* EntityGUI_2Spin_QTDLayout;
+    QGridLayout* GroupBox1Layout;
+    QGridLayout* Layout3;
+    QGridLayout* Layout2;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_2SPIN_QTD_H
diff --git a/src/EntityGUI/EntityGUI_3Spin.cxx b/src/EntityGUI/EntityGUI_3Spin.cxx
new file mode 100644 (file)
index 0000000..fe73aeb
--- /dev/null
@@ -0,0 +1,63 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_3Spin.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#include "EntityGUI_3Spin.h"
+
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qgroupbox.h>
+
+/* 
+ *  Constructs a EntityGUI_3Spin which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f' 
+ */
+EntityGUI_3Spin::EntityGUI_3Spin(QWidget* parent,  const char* name, WFlags fl)
+  :EntityGUI_3Spin_QTD(parent, name, fl)
+{
+  SpinBox1->close(TRUE);
+  SpinBox2->close(TRUE);
+  SpinBox3->close(TRUE);
+
+  SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
+  Layout1->addWidget(SpinBox_DX, 0, 1);
+
+  SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
+  Layout1->addWidget(SpinBox_DY, 1, 1);
+
+  SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ");
+  Layout1->addWidget(SpinBox_DZ, 2, 1);
+}
+
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_3Spin::~EntityGUI_3Spin()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
diff --git a/src/EntityGUI/EntityGUI_3Spin.h b/src/EntityGUI/EntityGUI_3Spin.h
new file mode 100644 (file)
index 0000000..58b732d
--- /dev/null
@@ -0,0 +1,49 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_3Spin.h
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef ENTITYGUI_3SPIN_H
+#define ENTITYGUI_3SPIN_H
+
+#include "EntityGUI_3Spin_QTD.h"
+#include "DlgRef_SpinBox.h"
+
+class EntityGUI_3Spin : public EntityGUI_3Spin_QTD
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_3Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_3Spin();
+
+    DlgRef_SpinBox* SpinBox_DX;
+    DlgRef_SpinBox* SpinBox_DY;
+    DlgRef_SpinBox* SpinBox_DZ;
+
+};
+
+#endif // ENTITYGUI_3SPIN_H
diff --git a/src/EntityGUI/EntityGUI_3Spin_QTD.cxx b/src/EntityGUI/EntityGUI_3Spin_QTD.cxx
new file mode 100644 (file)
index 0000000..8fa5053
--- /dev/null
@@ -0,0 +1,110 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_3Spin_QTD.ui'
+**
+** Created: ven déc 12 11:17:11 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_3Spin_QTD.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_3Spin_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_3Spin_QTD::EntityGUI_3Spin_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_3Spin_QTD" );
+    resize( 154, 120 ); 
+    setCaption( trUtf8( "EntityGUI_3Spin_QTD" ) );
+    EntityGUI_3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_3Spin_QTDLayout"); 
+
+    GroupBox1 = new QGroupBox( this, "GroupBox1" );
+    GroupBox1->setTitle( trUtf8( "Values" ) );
+    GroupBox1->setColumnLayout(0, Qt::Vertical );
+    GroupBox1->layout()->setSpacing( 6 );
+    GroupBox1->layout()->setMargin( 11 );
+    GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
+    GroupBox1Layout->setAlignment( Qt::AlignTop );
+
+    Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); 
+
+    Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); 
+
+    buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
+    buttonUndo->setText( trUtf8( "Undo" ) );
+
+    Layout2->addWidget( buttonUndo, 1, 0 );
+
+    buttonApply = new QPushButton( GroupBox1, "buttonApply" );
+    buttonApply->setText( trUtf8( "Create" ) );
+
+    Layout2->addWidget( buttonApply, 0, 0 );
+    QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout2->addItem( spacer, 2, 0 );
+
+    Layout3->addLayout( Layout2, 0, 1 );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    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 );
+
+    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( TextLabel1, 0, 0 );
+
+    SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
+    SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox1, 0, 1 );
+
+    SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
+    SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox2, 1, 1 );
+
+    TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+    TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+    TextLabel3->setText( trUtf8( "TL3" ) );
+
+    Layout1->addWidget( TextLabel3, 2, 0 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( spacer_2, 3, 1 );
+
+    SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
+    SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox3, 2, 1 );
+
+    Layout3->addLayout( Layout1, 0, 0 );
+
+    GroupBox1Layout->addLayout( Layout3, 0, 0 );
+
+    EntityGUI_3Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_3Spin_QTD::~EntityGUI_3Spin_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_3Spin_QTD.h b/src/EntityGUI/EntityGUI_3Spin_QTD.h
new file mode 100644 (file)
index 0000000..1efc3a5
--- /dev/null
@@ -0,0 +1,49 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_3Spin_QTD.ui'
+**
+** Created: ven déc 12 11:17:11 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_3SPIN_QTD_H
+#define ENTITYGUI_3SPIN_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+
+class EntityGUI_3Spin_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_3Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_3Spin_QTD();
+
+    QGroupBox* GroupBox1;
+    QPushButton* buttonUndo;
+    QPushButton* buttonApply;
+    QLabel* TextLabel2;
+    QLabel* TextLabel1;
+    QSpinBox* SpinBox1;
+    QSpinBox* SpinBox2;
+    QLabel* TextLabel3;
+    QSpinBox* SpinBox3;
+
+
+protected:
+    QGridLayout* EntityGUI_3Spin_QTDLayout;
+    QGridLayout* GroupBox1Layout;
+    QGridLayout* Layout3;
+    QGridLayout* Layout2;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_3SPIN_QTD_H
diff --git a/src/EntityGUI/EntityGUI_4Spin.cxx b/src/EntityGUI/EntityGUI_4Spin.cxx
new file mode 100644 (file)
index 0000000..29aa398
--- /dev/null
@@ -0,0 +1,67 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_4Spin.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#include "EntityGUI_4Spin.h"
+
+#include <qlayout.h>
+#include <qspinbox.h>
+#include <qgroupbox.h>
+
+/* 
+ *  Constructs a EntityGUI_4Spin which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f' 
+ */
+EntityGUI_4Spin::EntityGUI_4Spin(QWidget* parent,  const char* name, WFlags fl)
+  :EntityGUI_4Spin_QTD(parent, name, fl)
+{
+  SpinBox1->close(TRUE);
+  SpinBox2->close(TRUE);
+  SpinBox3->close(TRUE);
+  SpinBox4->close(TRUE);
+
+  SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX");
+  Layout1->addWidget(SpinBox_DX, 0, 1);
+
+  SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY");
+  Layout1->addWidget(SpinBox_DY, 1, 1);
+
+  SpinBox_DZ = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ");
+  Layout1->addWidget(SpinBox_DZ, 2, 1);
+
+  SpinBox_DS = new DlgRef_SpinBox(GroupBox1, "SpinBox_DS");
+  Layout1->addWidget(SpinBox_DS, 3, 1);
+}
+
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_4Spin::~EntityGUI_4Spin()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
diff --git a/src/EntityGUI/EntityGUI_4Spin.h b/src/EntityGUI/EntityGUI_4Spin.h
new file mode 100644 (file)
index 0000000..9a97fff
--- /dev/null
@@ -0,0 +1,50 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_4Spin.h
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef ENTITYGUI_4SPIN_H
+#define ENTITYGUI_4SPIN_H
+
+#include "EntityGUI_4Spin_QTD.h"
+#include "DlgRef_SpinBox.h"
+
+class EntityGUI_4Spin : public EntityGUI_4Spin_QTD
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_4Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_4Spin();
+
+    DlgRef_SpinBox* SpinBox_DX;
+    DlgRef_SpinBox* SpinBox_DY;
+    DlgRef_SpinBox* SpinBox_DZ;
+    DlgRef_SpinBox* SpinBox_DS;
+
+};
+
+#endif // ENTITYGUI_4SPIN_H
diff --git a/src/EntityGUI/EntityGUI_4Spin_QTD.cxx b/src/EntityGUI/EntityGUI_4Spin_QTD.cxx
new file mode 100644 (file)
index 0000000..428da7d
--- /dev/null
@@ -0,0 +1,128 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_4Spin_QTD.ui'
+**
+** Created: Fri Apr 30 10:56:21 2004
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_4Spin_QTD.h"
+
+#include <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qspinbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_4Spin_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_4Spin_QTD::EntityGUI_4Spin_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_4Spin_QTD" );
+    resize( 176, 154 ); 
+    setCaption( trUtf8( "EntityGUI_4Spin_QTD" ) );
+    EntityGUI_4Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_4Spin_QTDLayout"); 
+
+    GroupBox1 = new QGroupBox( this, "GroupBox1" );
+    GroupBox1->setTitle( trUtf8( "Values" ) );
+    GroupBox1->setColumnLayout(0, Qt::Vertical );
+    GroupBox1->layout()->setSpacing( 6 );
+    GroupBox1->layout()->setMargin( 11 );
+    GroupBox1Layout = new QGridLayout( GroupBox1->layout() );
+    GroupBox1Layout->setAlignment( Qt::AlignTop );
+
+    Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); 
+
+    Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); 
+
+    buttonUndo = new QPushButton( GroupBox1, "buttonUndo" );
+    buttonUndo->setText( trUtf8( "Undo" ) );
+
+    Layout2->addWidget( buttonUndo, 1, 0 );
+
+    buttonApply = new QPushButton( GroupBox1, "buttonApply" );
+    buttonApply->setText( trUtf8( "Create" ) );
+
+    Layout2->addWidget( buttonApply, 0, 0 );
+    QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout2->addItem( spacer, 2, 0 );
+
+    Layout3->addLayout( Layout2, 0, 1 );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" );
+    SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox3, 2, 1 );
+
+    SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" );
+    SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox2, 1, 1 );
+
+    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 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 0, 70, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( spacer_2, 4, 1 );
+
+    SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" );
+    SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox4, 3, 1 );
+
+    TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+    TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+    TextLabel3->setText( trUtf8( "TL3" ) );
+
+    Layout1->addWidget( TextLabel3, 2, 0 );
+
+    SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" );
+    SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( SpinBox1, 0, 1 );
+
+    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( TextLabel1, 0, 0 );
+
+    TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
+    TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
+    TextLabel4->setText( trUtf8( "TL4" ) );
+
+    Layout1->addWidget( TextLabel4, 3, 0 );
+
+    Layout3->addLayout( Layout1, 0, 0 );
+
+    GroupBox1Layout->addLayout( Layout3, 0, 0 );
+
+    EntityGUI_4Spin_QTDLayout->addWidget( GroupBox1, 0, 0 );
+
+    // tab order
+    setTabOrder( buttonUndo, buttonApply );
+    setTabOrder( buttonApply, SpinBox1 );
+    setTabOrder( SpinBox1, SpinBox2 );
+    setTabOrder( SpinBox2, SpinBox3 );
+    setTabOrder( SpinBox3, SpinBox4 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_4Spin_QTD::~EntityGUI_4Spin_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_4Spin_QTD.h b/src/EntityGUI/EntityGUI_4Spin_QTD.h
new file mode 100644 (file)
index 0000000..4aa3717
--- /dev/null
@@ -0,0 +1,51 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_4Spin_QTD.ui'
+**
+** Created: Fri Apr 30 10:56:17 2004
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_4SPIN_QTD_H
+#define ENTITYGUI_4SPIN_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+
+class EntityGUI_4Spin_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_4Spin_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_4Spin_QTD();
+
+    QGroupBox* GroupBox1;
+    QPushButton* buttonUndo;
+    QPushButton* buttonApply;
+    QSpinBox* SpinBox3;
+    QSpinBox* SpinBox2;
+    QLabel* TextLabel2;
+    QSpinBox* SpinBox4;
+    QLabel* TextLabel3;
+    QSpinBox* SpinBox1;
+    QLabel* TextLabel1;
+    QLabel* TextLabel4;
+
+
+protected:
+    QGridLayout* EntityGUI_4Spin_QTDLayout;
+    QGridLayout* GroupBox1Layout;
+    QGridLayout* Layout3;
+    QGridLayout* Layout2;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_4SPIN_QTD_H
diff --git a/src/EntityGUI/EntityGUI_Dir1_QTD.cxx b/src/EntityGUI/EntityGUI_Dir1_QTD.cxx
new file mode 100644 (file)
index 0000000..40b070b
--- /dev/null
@@ -0,0 +1,80 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_Dir1_QTD.ui'
+**
+** Created: ven déc 12 11:17:09 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_Dir1_QTD.h"
+
+#include <qvariant.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_Dir1_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_Dir1_QTD::EntityGUI_Dir1_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_Dir1_QTD" );
+    resize( 131, 123 ); 
+    setCaption( trUtf8( "EntityGUI_Dir1_QTD" ) );
+    EntityGUI_Dir1_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_Dir1_QTDLayout"); 
+
+    GroupDir1 = new QButtonGroup( this, "GroupDir1" );
+    GroupDir1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDir1->sizePolicy().hasHeightForWidth() ) );
+    GroupDir1->setTitle( trUtf8( "Direction" ) );
+    GroupDir1->setColumnLayout(0, Qt::Vertical );
+    GroupDir1->layout()->setSpacing( 6 );
+    GroupDir1->layout()->setMargin( 11 );
+    GroupDir1Layout = new QGridLayout( GroupDir1->layout() );
+    GroupDir1Layout->setAlignment( Qt::AlignTop );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    RB_Dir12 = new QRadioButton( GroupDir1, "RB_Dir12" );
+    RB_Dir12->setText( trUtf8( "Perpendicular" ) );
+
+    Layout1->addWidget( RB_Dir12, 1, 0 );
+
+    RB_Dir13 = new QRadioButton( GroupDir1, "RB_Dir13" );
+    RB_Dir13->setText( trUtf8( "Tangent" ) );
+
+    Layout1->addWidget( RB_Dir13, 2, 0 );
+
+    RB_Dir11 = new QRadioButton( GroupDir1, "RB_Dir11" );
+    RB_Dir11->setText( trUtf8( "Angle" ) );
+
+    Layout1->addWidget( RB_Dir11, 0, 0 );
+
+    RB_Dir14 = new QRadioButton( GroupDir1, "RB_Dir14" );
+    RB_Dir14->setText( trUtf8( "VX-VY" ) );
+
+    Layout1->addWidget( RB_Dir14, 3, 0 );
+
+    GroupDir1Layout->addLayout( Layout1, 0, 0 );
+
+    EntityGUI_Dir1_QTDLayout->addWidget( GroupDir1, 0, 0 );
+
+    // tab order
+    setTabOrder( RB_Dir11, RB_Dir12 );
+    setTabOrder( RB_Dir12, RB_Dir13 );
+    setTabOrder( RB_Dir13, RB_Dir14 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_Dir1_QTD::~EntityGUI_Dir1_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_Dir1_QTD.h b/src/EntityGUI/EntityGUI_Dir1_QTD.h
new file mode 100644 (file)
index 0000000..31a85e8
--- /dev/null
@@ -0,0 +1,41 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_Dir1_QTD.ui'
+**
+** Created: ven déc 12 11:17:09 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_DIR1_QTD_H
+#define ENTITYGUI_DIR1_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QButtonGroup;
+class QRadioButton;
+
+class EntityGUI_Dir1_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_Dir1_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_Dir1_QTD();
+
+    QButtonGroup* GroupDir1;
+    QRadioButton* RB_Dir12;
+    QRadioButton* RB_Dir13;
+    QRadioButton* RB_Dir11;
+    QRadioButton* RB_Dir14;
+
+
+protected:
+    QGridLayout* EntityGUI_Dir1_QTDLayout;
+    QGridLayout* GroupDir1Layout;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_DIR1_QTD_H
diff --git a/src/EntityGUI/EntityGUI_Dir2_QTD.cxx b/src/EntityGUI/EntityGUI_Dir2_QTD.cxx
new file mode 100644 (file)
index 0000000..6fee081
--- /dev/null
@@ -0,0 +1,76 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_Dir2_QTD.ui'
+**
+** Created: ven déc 12 11:17:10 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_Dir2_QTD.h"
+
+#include <qvariant.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_Dir2_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_Dir2_QTD::EntityGUI_Dir2_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_Dir2_QTD" );
+    resize( 124, 106 ); 
+    setCaption( trUtf8( "EntityGUI_Dir2_QTD" ) );
+    EntityGUI_Dir2_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_Dir2_QTDLayout"); 
+
+    GroupDir2 = new QButtonGroup( this, "GroupDir2" );
+    GroupDir2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDir2->sizePolicy().hasHeightForWidth() ) );
+    GroupDir2->setTitle( trUtf8( "Direction" ) );
+    GroupDir2->setColumnLayout(0, Qt::Vertical );
+    GroupDir2->layout()->setSpacing( 6 );
+    GroupDir2->layout()->setMargin( 11 );
+    GroupDir2Layout = new QGridLayout( GroupDir2->layout() );
+    GroupDir2Layout->setAlignment( Qt::AlignTop );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    RB_Dir22 = new QRadioButton( GroupDir2, "RB_Dir22" );
+    RB_Dir22->setText( trUtf8( "X" ) );
+
+    Layout1->addWidget( RB_Dir22, 1, 0 );
+
+    RB_Dir23 = new QRadioButton( GroupDir2, "RB_Dir23" );
+    RB_Dir23->setText( trUtf8( "Y" ) );
+
+    Layout1->addWidget( RB_Dir23, 2, 0 );
+    QSpacerItem* spacer = new QSpacerItem( 0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( spacer, 3, 0 );
+
+    RB_Dir21 = new QRadioButton( GroupDir2, "RB_Dir21" );
+    RB_Dir21->setText( trUtf8( "Length" ) );
+
+    Layout1->addWidget( RB_Dir21, 0, 0 );
+
+    GroupDir2Layout->addLayout( Layout1, 0, 0 );
+
+    EntityGUI_Dir2_QTDLayout->addWidget( GroupDir2, 0, 0 );
+
+    // tab order
+    setTabOrder( RB_Dir21, RB_Dir22 );
+    setTabOrder( RB_Dir22, RB_Dir23 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_Dir2_QTD::~EntityGUI_Dir2_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_Dir2_QTD.h b/src/EntityGUI/EntityGUI_Dir2_QTD.h
new file mode 100644 (file)
index 0000000..04ae738
--- /dev/null
@@ -0,0 +1,40 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_Dir2_QTD.ui'
+**
+** Created: ven déc 12 11:17:09 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_DIR2_QTD_H
+#define ENTITYGUI_DIR2_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QButtonGroup;
+class QRadioButton;
+
+class EntityGUI_Dir2_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_Dir2_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_Dir2_QTD();
+
+    QButtonGroup* GroupDir2;
+    QRadioButton* RB_Dir22;
+    QRadioButton* RB_Dir23;
+    QRadioButton* RB_Dir21;
+
+
+protected:
+    QGridLayout* EntityGUI_Dir2_QTDLayout;
+    QGridLayout* GroupDir2Layout;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_DIR2_QTD_H
diff --git a/src/EntityGUI/EntityGUI_Point_QTD.cxx b/src/EntityGUI/EntityGUI_Point_QTD.cxx
new file mode 100644 (file)
index 0000000..901a14f
--- /dev/null
@@ -0,0 +1,74 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_Point_QTD.ui'
+**
+** Created: ven déc 12 11:17:08 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_Point_QTD.h"
+
+#include <qvariant.h>
+#include <qbuttongroup.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_Point_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ */
+EntityGUI_Point_QTD::EntityGUI_Point_QTD( QWidget* parent,  const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_Point_QTD" );
+    resize( 124, 106 ); 
+    setCaption( trUtf8( "EntityGUI_Point_QTD" ) );
+    EntityGUI_Point_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_Point_QTDLayout"); 
+
+    GroupPoint = new QButtonGroup( this, "GroupPoint" );
+    GroupPoint->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupPoint->sizePolicy().hasHeightForWidth() ) );
+    GroupPoint->setTitle( trUtf8( "Point" ) );
+    GroupPoint->setColumnLayout(0, Qt::Vertical );
+    GroupPoint->layout()->setSpacing( 6 );
+    GroupPoint->layout()->setMargin( 11 );
+    GroupPointLayout = new QGridLayout( GroupPoint->layout() );
+    GroupPointLayout->setAlignment( Qt::AlignTop );
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    RB_Point2 = new QRadioButton( GroupPoint, "RB_Point2" );
+    RB_Point2->setText( trUtf8( "Relative" ) );
+
+    Layout1->addWidget( RB_Point2, 1, 0 );
+
+    RB_Point1 = new QRadioButton( GroupPoint, "RB_Point1" );
+    RB_Point1->setText( trUtf8( "Absolute" ) );
+
+    Layout1->addWidget( RB_Point1, 0, 0 );
+
+    RB_Point3 = new QRadioButton( GroupPoint, "RB_Point3" );
+    RB_Point3->setText( trUtf8( "Selection" ) );
+
+    Layout1->addWidget( RB_Point3, 2, 0 );
+
+    GroupPointLayout->addLayout( Layout1, 0, 0 );
+
+    EntityGUI_Point_QTDLayout->addWidget( GroupPoint, 0, 0 );
+
+    // tab order
+    setTabOrder( RB_Point1, RB_Point2 );
+    setTabOrder( RB_Point2, RB_Point3 );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_Point_QTD::~EntityGUI_Point_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_Point_QTD.h b/src/EntityGUI/EntityGUI_Point_QTD.h
new file mode 100644 (file)
index 0000000..8b58ee2
--- /dev/null
@@ -0,0 +1,40 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_Point_QTD.ui'
+**
+** Created: ven déc 12 11:17:08 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_POINT_QTD_H
+#define ENTITYGUI_POINT_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QButtonGroup;
+class QRadioButton;
+
+class EntityGUI_Point_QTD : public QWidget
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_Point_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~EntityGUI_Point_QTD();
+
+    QButtonGroup* GroupPoint;
+    QRadioButton* RB_Point2;
+    QRadioButton* RB_Point1;
+    QRadioButton* RB_Point3;
+
+
+protected:
+    QGridLayout* EntityGUI_Point_QTDLayout;
+    QGridLayout* GroupPointLayout;
+    QGridLayout* Layout1;
+};
+
+#endif // ENTITYGUI_POINT_QTD_H
diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx b/src/EntityGUI/EntityGUI_Skeleton_QTD.cxx
new file mode 100644 (file)
index 0000000..8298731
--- /dev/null
@@ -0,0 +1,176 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'EntityGUI_Skeleton_QTD.ui'
+**
+** Created: ven déc 12 11:17:08 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "EntityGUI_Skeleton_QTD.h"
+
+#include <qvariant.h>
+#include <qbuttongroup.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a EntityGUI_Skeleton_QTD which is a child of 'parent', with the 
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  TRUE to construct a modal dialog.
+ */
+EntityGUI_Skeleton_QTD::EntityGUI_Skeleton_QTD( QWidget* parent,  const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name )
+       setName( "EntityGUI_Skeleton_QTD" );
+    resize( 317, 276 ); 
+    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
+    setCaption( trUtf8( "EntityGUI_Skeleton_QTD" ) );
+    EntityGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "EntityGUI_Skeleton_QTDLayout"); 
+
+    Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); 
+
+    GroupVal = new QGroupBox( this, "GroupVal" );
+    GroupVal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupVal->sizePolicy().hasHeightForWidth() ) );
+    GroupVal->setTitle( trUtf8( "" ) );
+
+    Layout1->addWidget( GroupVal, 2, 0 );
+
+    GroupConstructors = new QButtonGroup( this, "GroupConstructors" );
+    GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) );
+    GroupConstructors->setTitle( trUtf8( "Element Type" ) );
+    GroupConstructors->setColumnLayout(0, Qt::Vertical );
+    GroupConstructors->layout()->setSpacing( 6 );
+    GroupConstructors->layout()->setMargin( 11 );
+    GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() );
+    GroupConstructorsLayout->setAlignment( Qt::AlignTop );
+
+    Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); 
+
+    RadioButton1 = new QRadioButton( GroupConstructors, "RadioButton1" );
+    RadioButton1->setText( trUtf8( "Segment" ) );
+    Layout2->addWidget( RadioButton1 );
+
+    RadioButton2 = new QRadioButton( GroupConstructors, "RadioButton2" );
+    RadioButton2->setText( trUtf8( "Arc" ) );
+    Layout2->addWidget( RadioButton2 );
+
+    GroupConstructorsLayout->addLayout( Layout2, 0, 0 );
+
+    Layout1->addWidget( GroupConstructors, 0, 0 );
+
+    GroupDest = new QGroupBox( this, "GroupDest" );
+    GroupDest->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDest->sizePolicy().hasHeightForWidth() ) );
+    GroupDest->setTitle( trUtf8( "Destination" ) );
+    GroupDest->setColumnLayout(0, Qt::Vertical );
+    GroupDest->layout()->setSpacing( 6 );
+    GroupDest->layout()->setMargin( 11 );
+    GroupDestLayout = new QGridLayout( GroupDest->layout() );
+    GroupDestLayout->setAlignment( Qt::AlignTop );
+
+    Layout5 = new QGridLayout( 0, 1, 1, 0, 6, "Layout5"); 
+
+    GroupDest1 = new QButtonGroup( GroupDest, "GroupDest1" );
+    GroupDest1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupDest1->sizePolicy().hasHeightForWidth() ) );
+    GroupDest1->setTitle( trUtf8( "Type" ) );
+    GroupDest1->setColumnLayout(0, Qt::Vertical );
+    GroupDest1->layout()->setSpacing( 6 );
+    GroupDest1->layout()->setMargin( 11 );
+    GroupDest1Layout = new QGridLayout( GroupDest1->layout() );
+    GroupDest1Layout->setAlignment( Qt::AlignTop );
+
+    Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); 
+
+    RB_Dest2 = new QRadioButton( GroupDest1, "RB_Dest2" );
+    RB_Dest2->setText( trUtf8( "Direction" ) );
+
+    Layout4->addWidget( RB_Dest2, 0, 1 );
+
+    RB_Dest1 = new QRadioButton( GroupDest1, "RB_Dest1" );
+    RB_Dest1->setText( trUtf8( "Point" ) );
+
+    Layout4->addWidget( RB_Dest1, 0, 0 );
+
+    GroupDest1Layout->addLayout( Layout4, 0, 0 );
+
+    Layout5->addMultiCellWidget( GroupDest1, 0, 0, 0, 1 );
+
+    GroupDest2 = new QButtonGroup( GroupDest, "GroupDest2" );
+    GroupDest2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest2->sizePolicy().hasHeightForWidth() ) );
+    GroupDest2->setTitle( trUtf8( "" ) );
+    GroupDest2->setColumnLayout(0, Qt::Vertical );
+    GroupDest2->layout()->setSpacing( 6 );
+    GroupDest2->layout()->setMargin( 11 );
+    GroupDest2Layout = new QGridLayout( GroupDest2->layout() );
+    GroupDest2Layout->setAlignment( Qt::AlignTop );
+
+    Layout5->addWidget( GroupDest2, 1, 0 );
+
+    GroupDest3 = new QButtonGroup( GroupDest, "GroupDest3" );
+    GroupDest3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupDest3->sizePolicy().hasHeightForWidth() ) );
+    GroupDest3->setTitle( trUtf8( "" ) );
+    GroupDest3->setColumnLayout(0, Qt::Vertical );
+    GroupDest3->layout()->setSpacing( 6 );
+    GroupDest3->layout()->setMargin( 11 );
+    GroupDest3Layout = new QGridLayout( GroupDest3->layout() );
+    GroupDest3Layout->setAlignment( Qt::AlignTop );
+
+    Layout5->addWidget( GroupDest3, 1, 1 );
+
+    GroupDestLayout->addLayout( Layout5, 0, 0 );
+
+    Layout1->addWidget( GroupDest, 1, 0 );
+
+    GroupButtons = new QGroupBox( this, "GroupButtons" );
+    GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) );
+    GroupButtons->setTitle( trUtf8( "" ) );
+    GroupButtons->setColumnLayout(0, Qt::Vertical );
+    GroupButtons->layout()->setSpacing( 6 );
+    GroupButtons->layout()->setMargin( 11 );
+    GroupButtonsLayout = new QHBoxLayout( GroupButtons->layout() );
+    GroupButtonsLayout->setAlignment( Qt::AlignTop );
+
+    Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3"); 
+
+    buttonEnd = new QPushButton( GroupButtons, "buttonEnd" );
+    buttonEnd->setText( trUtf8( "End Sketch" ) );
+    Layout3->addWidget( buttonEnd );
+
+    buttonClose = new QPushButton( GroupButtons, "buttonClose" );
+    buttonClose->setText( trUtf8( "Close Sketch" ) );
+    Layout3->addWidget( buttonClose );
+    QSpacerItem* spacer = new QSpacerItem( 91, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout3->addItem( spacer );
+
+    buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
+    buttonCancel->setText( trUtf8( "&Cancel" ) );
+    Layout3->addWidget( buttonCancel );
+    GroupButtonsLayout->addLayout( Layout3 );
+
+    Layout1->addWidget( GroupButtons, 3, 0 );
+
+    EntityGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 );
+
+    // tab order
+    setTabOrder( RadioButton1, RadioButton2 );
+    setTabOrder( RadioButton2, RB_Dest1 );
+    setTabOrder( RB_Dest1, RB_Dest2 );
+    setTabOrder( RB_Dest2, buttonEnd );
+    setTabOrder( buttonEnd, buttonClose );
+    setTabOrder( buttonClose, buttonCancel );
+}
+
+/*  
+ *  Destroys the object and frees any allocated resources
+ */
+EntityGUI_Skeleton_QTD::~EntityGUI_Skeleton_QTD()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
diff --git a/src/EntityGUI/EntityGUI_Skeleton_QTD.h b/src/EntityGUI/EntityGUI_Skeleton_QTD.h
new file mode 100644 (file)
index 0000000..534f52c
--- /dev/null
@@ -0,0 +1,61 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'EntityGUI_Skeleton_QTD.ui'
+**
+** Created: ven déc 12 11:17:07 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef ENTITYGUI_SKELETON_QTD_H
+#define ENTITYGUI_SKELETON_QTD_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QButtonGroup;
+class QGroupBox;
+class QPushButton;
+class QRadioButton;
+
+class EntityGUI_Skeleton_QTD : public QDialog
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~EntityGUI_Skeleton_QTD();
+
+    QGroupBox* GroupVal;
+    QButtonGroup* GroupConstructors;
+    QRadioButton* RadioButton1;
+    QRadioButton* RadioButton2;
+    QGroupBox* GroupDest;
+    QButtonGroup* GroupDest1;
+    QRadioButton* RB_Dest2;
+    QRadioButton* RB_Dest1;
+    QButtonGroup* GroupDest2;
+    QButtonGroup* GroupDest3;
+    QGroupBox* GroupButtons;
+    QPushButton* buttonEnd;
+    QPushButton* buttonClose;
+    QPushButton* buttonCancel;
+
+
+protected:
+    QGridLayout* EntityGUI_Skeleton_QTDLayout;
+    QGridLayout* Layout1;
+    QGridLayout* GroupConstructorsLayout;
+    QHBoxLayout* Layout2;
+    QGridLayout* GroupDestLayout;
+    QGridLayout* Layout5;
+    QGridLayout* GroupDest1Layout;
+    QGridLayout* Layout4;
+    QGridLayout* GroupDest2Layout;
+    QGridLayout* GroupDest3Layout;
+    QHBoxLayout* GroupButtonsLayout;
+    QHBoxLayout* Layout3;
+};
+
+#endif // ENTITYGUI_SKELETON_QTD_H
diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx
new file mode 100644 (file)
index 0000000..d91c245
--- /dev/null
@@ -0,0 +1,1168 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_SketcherDlg.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+using namespace std;
+#include "EntityGUI_SketcherDlg.h"
+#include "Sketcher_Profile.hxx"
+#include "utilities.h"
+
+#include <BRep_Tool.hxx>
+#include <TopExp.hxx>
+#include <TopoDS_Vertex.hxx>
+
+#include <qpushbutton.h>
+
+//=================================================================================
+// class    : EntityGUI_SketcherDlg()
+// purpose  : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the 
+//            name 'name' and widget flags set to 'f'.
+//            The dialog will by default be modeless, unless you set 'modal' to
+//            TRUE to construct a modal dialog.
+//=================================================================================
+EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, EntityGUI* theEntityGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :EntityGUI_Skeleton_QTD(parent, name, modal, fl)
+{
+  if (!name)
+    setName("EntityGUI_SketcherDlg");
+
+  buttonCancel->setText(tr("GEOM_BUT_CANCEL"));
+  buttonEnd->setText(tr("GEOM_BUT_END_SKETCH"));
+  buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH"));
+  GroupVal->close(TRUE);
+  GroupDest2->close(TRUE);
+  GroupDest3->close(TRUE);
+  resize(0, 0);
+
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_SKETCHER_TITLE"));
+
+  GroupConstructors->setTitle(tr("GEOM_SKETCHER_EL"));
+  RadioButton1->setText(tr("GEOM_SKETCHER_SEGMENT"));
+  RadioButton2->setText(tr("GEOM_SKETCHER_ARC"));
+  GroupDest->setTitle(tr("GEOM_SKETCHER_DEST"));
+  GroupDest1->setTitle(tr("GEOM_SKETCHER_TYPE"));
+  RB_Dest1->setText(tr("GEOM_SKETCHER_POINT"));
+  RB_Dest2->setText(tr("GEOM_SKETCHER_DIR"));
+
+  /***************************************************************/
+  GroupPt = new EntityGUI_Point_QTD(GroupDest, "GroupPt");
+  GroupPt->GroupPoint->setTitle(tr("GEOM_SKETCHER_POINT"));
+  GroupPt->RB_Point1->setText(tr("GEOM_SKETCHER_ABS"));
+  GroupPt->RB_Point2->setText(tr("GEOM_SKETCHER_REL"));
+  GroupPt->RB_Point3->setText(tr("GEOM_SKETCHER_SEL"));
+
+  GroupD1 = new EntityGUI_Dir1_QTD(GroupDest, "GroupD1");
+  GroupD1->GroupDir1->setTitle(tr("GEOM_SKETCHER_DIR"));
+  GroupD1->RB_Dir11->setText(tr("GEOM_SKETCHER_ANGLE"));
+  GroupD1->RB_Dir12->setText(tr("GEOM_SKETCHER_PER"));
+  GroupD1->RB_Dir13->setText(tr("GEOM_SKETCHER_TAN"));
+  GroupD1->RB_Dir14->setText(tr("GEOM_SKETCHER_VXVY"));
+
+  GroupD2 = new EntityGUI_Dir2_QTD(GroupDest, "GroupD2");
+  GroupD2->GroupDir2->setTitle(tr("GEOM_SKETCHER_DIR"));
+  GroupD2->RB_Dir21->setText(tr("GEOM_SKETCHER_LENGTH"));
+  GroupD2->RB_Dir22->setText(tr("GEOM_SKETCHER_X"));
+  GroupD2->RB_Dir23->setText(tr("GEOM_SKETCHER_Y"));
+
+  Group1Sel = new EntityGUI_1Sel_QTD(this, "Group1Sel");
+  Group1Sel->TextLabel1->setText(tr("GEOM_SKETCHER_POINT2"));
+  Group1Sel->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
+  Group1Sel->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO"));
+  Group1Sel->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
+  Group1Sel->PushButton1->setPixmap(image0);
+
+  Group1Spin = new EntityGUI_1Spin(this, "Group1Spin");
+  Group1Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
+  Group1Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO"));
+  Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
+
+  Group2Spin = new EntityGUI_2Spin(this, "Group2Spin");
+  Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
+  Group2Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO"));
+  Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
+
+  Group3Spin = new EntityGUI_3Spin(this, "Group3Spin");
+  Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
+  Group3Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO"));
+  Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
+
+  Group4Spin = new EntityGUI_4Spin(this, "Group4Spin");
+  Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
+  Group4Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO"));
+  Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
+
+  Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1);
+  Layout5->addWidget(GroupD1, 1, 0);
+  Layout5->addWidget(GroupD2, 1, 1);
+
+  Layout1->addWidget(Group1Sel, 2, 0);
+  Layout1->addWidget(Group1Spin, 2, 0);
+  Layout1->addWidget(Group2Spin, 2, 0);
+  Layout1->addWidget(Group3Spin, 2, 0);
+  Layout1->addWidget(Group4Spin, 2, 0);
+  /***************************************************************/
+
+  mySelection = Sel;
+  mySimulationTopoDs1.Nullify();
+  mySimulationTopoDs2.Nullify();
+  myEntityGUI = theEntityGUI;
+
+  /* Get setting of step value from file configuration */
+  QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
+  step = St.toDouble();
+
+  myGeomBase = new GEOMBase();
+  myGeomGUI = GEOMContext::GetGeomGUI();
+  myGeomGUI->SetActiveDialogBox((QDialog*)this);
+  myGeom = myGeomGUI->myComponentGeom;
+
+  myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom);
+  mySelection->AddFilter(myVertexFilter);
+
+  /* signals and slots connections */
+  connect(buttonEnd, SIGNAL(clicked()), this, SLOT(ClickOnEnd()));
+  connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnClose()));
+  connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+
+  connect(Group1Sel->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(Group1Sel->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo()));
+  connect(Group1Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(Group1Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo()));
+  connect(Group2Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(Group2Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo()));
+  connect(Group3Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(Group3Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo()));
+  connect(Group4Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+  connect(Group4Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo()));
+
+  connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(TypeClicked(int)));
+  connect(GroupDest1, SIGNAL(clicked(int)), this, SLOT(DestClicked(int)));
+  connect(GroupPt->GroupPoint, SIGNAL(clicked(int)), this, SLOT(PointClicked(int)));
+  connect(GroupD1->GroupDir1, SIGNAL(clicked(int)), this, SLOT(Dir1Clicked(int)));
+  connect(GroupD2->GroupDir2, SIGNAL(clicked(int)), this, SLOT(Dir2Clicked(int)));
+
+  connect(Group1Sel->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(Group1Sel->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(Group1Spin->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group2Spin->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group2Spin->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group3Spin->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group3Spin->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group3Spin->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group4Spin->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group4Spin->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group4Spin->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+  connect(Group4Spin->SpinBox_DS, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
+
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1Spin->SpinBox_DX, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2Spin->SpinBox_DX, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2Spin->SpinBox_DY, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DX, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DY, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DZ, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DX, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DY, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DZ, SLOT(SetStep(double)));
+  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DS, SLOT(SetStep(double)));
+
+  connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+  connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+
+  /* Move widget on the botton right corner of main widget */
+//   int x, y;
+//   myGeomBase->DefineDlgPosition( this, x, y );
+
+  myEntityGUI = theEntityGUI;
+  this->Init();
+  this->show();
+}
+
+
+//=================================================================================
+// function : ~EntityGUI_SketcherDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+  this->destroy(TRUE, TRUE);
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = Group1Sel->LineEdit1;
+
+  /* min, max, step and decimals for spin boxes */
+  Group1Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group2Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group3Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group4Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 0.1, 3);
+  Group4Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 0.1, 3);
+  Group4Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group4Spin->SpinBox_DS->RangeStepAndValidator(-999.999, 999.999, 5., 3);
+
+  Group1Spin->SpinBox_DX->SetValue(0.0);
+  Group2Spin->SpinBox_DX->SetValue(0.0);
+  Group2Spin->SpinBox_DY->SetValue(0.0);
+  Group3Spin->SpinBox_DX->SetValue(0.0);
+  Group3Spin->SpinBox_DY->SetValue(0.0);
+  Group3Spin->SpinBox_DZ->SetValue(0.0);
+  Group4Spin->SpinBox_DX->SetValue(0.0);
+  Group4Spin->SpinBox_DY->SetValue(0.0);
+  Group4Spin->SpinBox_DZ->SetValue(0.0);
+  Group4Spin->SpinBox_DS->SetValue(0.0);
+
+  /* displays Dialog */
+  Group1Sel->buttonUndo->setEnabled(false);
+  Group1Spin->buttonUndo->setEnabled(false);
+  Group2Spin->buttonUndo->setEnabled(false);
+  Group3Spin->buttonUndo->setEnabled(false);
+  Group4Spin->buttonUndo->setEnabled(false);
+
+  RadioButton1->setChecked(true);
+
+  myLastOp = 0;
+  myLastX1 = 0.0;
+  myLastY1 = 0.0;
+  myLastX2 = 0.0;
+  myLastY2 = 0.0;
+
+  mySketchState = FIRST_POINT;
+  this->TypeClicked(0);
+
+  return;
+}
+
+
+//=================================================================================
+// function : InitClick()
+// purpose  : 
+//=================================================================================
+void EntityGUI_SketcherDlg::InitClick()
+{
+  disconnect(mySelection, 0, this, 0);
+
+  Group2Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group3Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3);
+  Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3);
+
+  Group1Sel->hide();
+  Group1Spin->hide();
+  Group2Spin->hide();
+  Group3Spin->hide();
+  Group4Spin->hide();
+
+  resize(0, 0);
+
+  return;
+}
+
+
+//=================================================================================
+// function : TypeClicked()
+// purpose  : Radio button management
+//=================================================================================
+void EntityGUI_SketcherDlg::TypeClicked(int constructorId)
+{
+  myConstructorId = constructorId;
+  if(myConstructorId == 0) {  // SEGMENT
+    GroupD2->setEnabled(true);
+    RB_Dest1->setEnabled(true);
+    RB_Dest1->setChecked(true);
+    this->DestClicked(1);
+  }
+  else if(myConstructorId == 1) {  // ARC
+    GroupD2->setEnabled(false);
+    RB_Dest1->setEnabled(false);
+    RB_Dest2->setChecked(true);
+    this->DestClicked(0);
+  }
+  return;
+}
+
+
+//=================================================================================
+// function : DestClicked()
+// purpose  : Radio button management
+//=================================================================================
+void EntityGUI_SketcherDlg::DestClicked(int constructorId)
+{
+  GroupPt->hide();
+  GroupD1->hide();
+  GroupD2->hide();
+
+  if(constructorId == 1) {  // Point
+    GroupPt->RB_Point1->setChecked(true);
+    GroupPt->show();
+    this->PointClicked(1);  // XY
+  }
+  else if(constructorId == 0) {  // Direction
+    GroupD1->RB_Dir11->setChecked(true);
+    GroupD1->show();
+    GroupD2->show();
+    this->Dir1Clicked(2);  // Angle
+  }
+  return;
+}
+
+
+//=================================================================================
+// function : PointClicked()
+// purpose  : Radio button management
+//=================================================================================
+void EntityGUI_SketcherDlg::PointClicked(int constructorId)
+{
+  this->InitClick();
+
+  if(myConstructorId == 0) {  // SEGMENT
+    if(constructorId == 1) {  // XY
+      mySketchType = PT_ABS;
+      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
+      Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
+      myX = 0.0;
+      Group2Spin->SpinBox_DX->SetValue(myX);
+      myY = 0.0;
+      Group2Spin->SpinBox_DY->SetValue(myY);
+      Group2Spin->show();
+      Group2Spin->buttonApply->setFocus();
+      this->MakeSimulationAndDisplay();
+    }
+    else if(constructorId == 0) {  // DXDY
+      mySketchType = PT_RELATIVE;
+      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
+      Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
+      myDX = 0.0;
+      Group2Spin->SpinBox_DX->SetValue(myDX);
+      myDY = 0.0;
+      Group2Spin->SpinBox_DY->SetValue(myDY);
+      Group2Spin->show();
+      Group2Spin->buttonApply->setFocus();
+      this->MakeSimulationAndDisplay();
+    }
+    else if(constructorId == 2) {  // Selection
+      mySketchType = PT_SEL;
+      myEditCurrentArgument = Group1Sel->LineEdit1;
+      connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+      Group1Sel->show();
+      Group1Sel->buttonApply->setFocus();
+      this->SelectionIntoArgument();
+    }
+  }
+
+  return;
+}
+
+
+//=================================================================================
+// function : Dir1Clicked()
+// purpose  : Radio button management
+//=================================================================================
+void EntityGUI_SketcherDlg::Dir1Clicked(int constructorId)
+{
+  myConstructorDirId = constructorId;
+  GroupD2->RB_Dir21->setChecked(true);
+  this->Dir2Clicked(2);
+  return;
+}
+
+
+//=================================================================================
+// function : Dir2Clicked()
+// purpose  : Radio button management
+//=================================================================================
+void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId)
+{
+  this->InitClick();
+  myAngle = 0.0;
+
+  if(myConstructorId == 0) {  // SEGMENT
+    myX = 0.0;
+    myY = 0.0;
+    myLength = 100.0;
+    if(myConstructorDirId == 2) {  // Angle
+      Group2Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 5., 3);
+      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
+      Group2Spin->SpinBox_DX->SetValue(myAngle);
+      Group2Spin->buttonApply->setFocus();
+      Group2Spin->show();
+
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_ANGLE_LENGTH;
+       Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_LENGTH2"));
+       Group2Spin->SpinBox_DY->SetValue(myLength);
+      }
+      else if(constructorId == 0) {  // X
+       mySketchType = DIR_ANGLE_X;
+       Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_X3"));
+       Group2Spin->SpinBox_DY->SetValue(myX);
+      }
+      else if(constructorId == 1) {  // Y
+       mySketchType = DIR_ANGLE_Y;
+       Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3"));
+       Group2Spin->SpinBox_DY->SetValue(myY);
+      }
+    }
+    else if(myConstructorDirId == 0) {  // Perpendicular
+      Group1Spin->show();
+      Group1Spin->buttonApply->setFocus();
+
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_PER_LENGTH;
+       Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_LENGTH2"));
+       Group1Spin->SpinBox_DX->SetValue(myLength);
+      }
+      else if(constructorId == 0) {  // X
+       mySketchType = DIR_PER_X;
+       Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X3"));
+       Group1Spin->SpinBox_DX->SetValue(myX);
+      }
+      else if(constructorId == 1) {  // Y
+       mySketchType = DIR_PER_Y;
+       Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_Y3"));
+       Group1Spin->SpinBox_DX->SetValue(myY);
+      }
+    }
+    else if(myConstructorDirId == 1) {  // Tangent
+      Group1Spin->show();
+      Group1Spin->buttonApply->setFocus();
+
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_TAN_LENGTH;
+       Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_LENGTH2"));
+       Group1Spin->SpinBox_DX->SetValue(myLength);
+      }
+      else if(constructorId == 0) {  // X
+       mySketchType = DIR_TAN_X;
+       Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X3"));
+       Group1Spin->SpinBox_DX->SetValue(myX);
+      }
+      else if(constructorId == 1) {  // Y
+       mySketchType = DIR_TAN_Y;
+       Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_Y3"));
+       Group1Spin->SpinBox_DX->SetValue(myY);
+      }
+    }
+    else if(myConstructorDirId == 3) {  // DXDY
+      Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 0.1, 3);
+      Group3Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 0.1, 3);
+      Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
+      Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
+      myDX = 0.0;
+      Group3Spin->SpinBox_DX->SetValue(myDX);
+      myDY = 0.0;
+      Group3Spin->SpinBox_DY->SetValue(myDY);
+      Group3Spin->show();
+      Group3Spin->buttonApply->setFocus();
+
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_DXDY_LENGTH;
+       Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_LENGTH2"));
+       Group3Spin->SpinBox_DZ->SetValue(myLength);
+      }
+      else if(constructorId == 0) {  // X
+       mySketchType = DIR_DXDY_X;
+       Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_X3"));
+       Group3Spin->SpinBox_DZ->SetValue(myX);
+      }
+      else if(constructorId == 1) {  // Y
+       mySketchType = DIR_DXDY_Y;
+       Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_Y3"));
+       Group3Spin->SpinBox_DZ->SetValue(myY);
+      }
+    }
+  }
+  else if(myConstructorId == 1) {  // ARC
+    if(myConstructorDirId == 2) {  // Angle
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_ANGLE_LENGTH;
+       Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 5., 3);
+       Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, 5., 3);
+       Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
+       Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
+       Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2"));
+       Group3Spin->SpinBox_DX->SetValue(myAngle);
+       myRadius = 100.0;
+       Group3Spin->SpinBox_DY->SetValue(myRadius);
+       myLength = 30.0;
+       Group3Spin->SpinBox_DZ->SetValue(myLength);
+       Group3Spin->show();
+       Group3Spin->buttonApply->setFocus();
+      }
+    }
+    else if(myConstructorDirId == 0) {  // Perpendicular
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_PER_LENGTH;
+       Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 5., 3);
+       Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
+       Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
+       myRadius = 100.0;
+       Group2Spin->SpinBox_DX->SetValue(myRadius);
+       myLength = 30.0;
+       Group2Spin->SpinBox_DY->SetValue(myLength);
+       Group2Spin->show();
+       Group2Spin->buttonApply->setFocus();
+      }
+    }
+    else if(myConstructorDirId == 1) {  // Tangent
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_TAN_LENGTH;
+       Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 5., 3);
+       Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
+       Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
+       myRadius = 100.0;
+       Group2Spin->SpinBox_DX->SetValue(myRadius);
+       myLength = 30.0;
+       Group2Spin->SpinBox_DY->SetValue(myLength);
+       Group2Spin->show();
+       Group2Spin->buttonApply->setFocus();
+      }
+    }
+    else if(myConstructorDirId == 3) {  // DXDY
+      if(constructorId == 2) {  // Length
+       mySketchType = DIR_DXDY_LENGTH;
+       Group4Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
+       Group4Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
+       Group4Spin->TextLabel3->setText(tr("GEOM_SKETCHER_RADIUS2"));
+       Group4Spin->TextLabel4->setText(tr("GEOM_SKETCHER_ANGLE2"));
+       myDX = 0.0;
+       Group4Spin->SpinBox_DX->SetValue(myDX);
+       myDY = 0.0;
+       Group4Spin->SpinBox_DY->SetValue(myDY);
+       myRadius = 100.0;
+       Group4Spin->SpinBox_DZ->SetValue(myRadius);
+       myLength = 30.0;
+       Group4Spin->SpinBox_DS->SetValue(myLength);
+       Group4Spin->show();
+       Group4Spin->buttonApply->setFocus();
+      }
+    }
+  }
+
+  this->MakeSimulationAndDisplay();
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnCancel()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ClickOnCancel()
+{
+  QAD_Application::getDesktop()->putInfo(tr(""));
+  myEntityGUI->EraseSimulationShape();
+  mySimulationTopoDs1.Nullify();
+  mySimulationTopoDs2.Nullify();
+
+  mySelection->ClearFilters();
+  disconnect(mySelection, 0, this, 0);
+
+  reject();
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnEnd()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ClickOnEnd()
+{
+  if(mySketchState != FIRST_POINT && mySketchState != SECOND_POINT)
+    myEntityGUI->OnSketchEnd(myCommand.ascii());
+
+  this->ClickOnCancel();
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnClose()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ClickOnClose()
+{
+  if(mySketchState != FIRST_POINT && mySketchState != SECOND_POINT) {
+    myCommand = myCommand + ":WW";
+    myEntityGUI->OnSketchEnd(myCommand.ascii());
+  }
+
+  this->ClickOnCancel();
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ClickOnApply()
+{
+  if(mySketchState == FIRST_POINT) {
+    mySketchState = SECOND_POINT;
+    myLastX2 = myLastX1;
+    myLastY2 = myLastY1;
+  }
+  else {
+    if(mySketchState != SECOND_POINT) {
+      Group1Sel->buttonUndo->setEnabled(true);
+      Group1Spin->buttonUndo->setEnabled(true);
+      Group2Spin->buttonUndo->setEnabled(true);
+      Group3Spin->buttonUndo->setEnabled(true);
+      Group4Spin->buttonUndo->setEnabled(true);
+    }
+
+    QString myNewCommand = this->GetNewCommand();
+    QString myCommandTemp = myCommand + myNewCommand;
+
+    Sketcher_Profile aProfile (myCommandTemp.ascii());
+
+    if(aProfile.IsDone()) {
+      myLastCommand = myCommand;
+      myCommand = myCommandTemp;
+      myLastX2 = myLastX1;
+      myLastY2 = myLastY1;
+      mySketchState = NEXT_POINT;
+    }
+  }
+
+  myLastOp = myConstructorId;
+  this->MakeSimulationAndDisplay();
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnUndo()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ClickOnUndo()
+{
+  Group1Sel->buttonUndo->setEnabled(false);
+  Group1Spin->buttonUndo->setEnabled(false);
+  Group2Spin->buttonUndo->setEnabled(false);
+  Group3Spin->buttonUndo->setEnabled(false);
+  Group4Spin->buttonUndo->setEnabled(false);
+
+  myCommand = myLastCommand;
+  this->MakeSimulationAndDisplay();
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed
+//=================================================================================
+void EntityGUI_SketcherDlg::SelectionIntoArgument()
+{
+  myEntityGUI->EraseSimulationShape(1); //Juste Shape2!!
+
+  Group1Sel->buttonApply->setEnabled(false);
+  Group1Sel->buttonApply->setFocus();
+
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  myX = 0.0;
+  myY = 0.0;
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  gp_Pnt myPoint1;
+  Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+    return;
+
+  if(myEditCurrentArgument == Group1Sel->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) {
+    myX = myPoint1.X();
+    myY = myPoint1.Y();
+    Group1Sel->LineEdit1->setText(aString);
+
+    Group1Sel->buttonApply->setEnabled(true);
+    Group1Sel->buttonApply->setFocus();
+    this->MakeSimulationAndDisplay();
+  }
+
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  mySelection->ClearFilters();
+  if(send == Group1Sel->PushButton1) {
+    //Group1Sel->LineEdit1->setFocus();
+    myEditCurrentArgument = Group1Sel->LineEdit1;
+  }
+  mySelection->AddFilter(myVertexFilter);
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::LineEditReturnPressed()
+{
+  /* User name of object input management                          */
+  /* If successfull the selection is changed and signal emitted... */
+  /* so SelectionIntoArgument() is automatically called.           */
+  const QString objectUserName = myEditCurrentArgument->text();
+  QWidget* thisWidget = (QWidget*)this;
+  if(myGeomBase->SelectionByNameInDialogs(thisWidget, objectUserName, mySelection))
+    myEditCurrentArgument->setText(objectUserName);
+
+  return;
+}
+
+
+//=================================================================================
+// function : DeactivateActiveDialog()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::DeactivateActiveDialog()
+{
+  this->setEnabled(false);
+  mySelection->ClearFilters();
+  disconnect(mySelection, 0, this, 0);
+  myEntityGUI->EraseSimulationShape();
+  myGeomGUI->SetActiveDialogBox(0);
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ActivateThisDialog()
+{
+  /* Emit a signal to deactivate the active dialog */
+  myGeomGUI->EmitSignalDeactivateDialog();
+  this->setEnabled(true);
+  myGeomGUI->SetActiveDialogBox((QDialog*)this);
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  mySelection->AddFilter(myVertexFilter);
+  myEntityGUI->DisplaySimulationShape(mySimulationTopoDs1, mySimulationTopoDs2);
+
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent [REDEFINED]
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : closeEvent()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e)
+{
+  /* same than click on cancel button */
+  this->ClickOnCancel();
+  return;
+}
+
+
+//=================================================================================
+// function : ValueChangedInSpinBox()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::ValueChangedInSpinBox(double newValue)
+{
+  QObject* send = (QObject*)sender();
+  Standard_Real vx, vy, vz, vs;
+  vx = vy = vz = vs = 0.0;
+
+  if(send == Group1Spin->SpinBox_DX) {
+    vx = newValue;
+    Group1Spin->buttonApply->setFocus();
+  }
+  else if(send == Group2Spin->SpinBox_DX) {
+    vx = newValue;
+    vy = Group2Spin->SpinBox_DY->GetValue();
+    Group2Spin->buttonApply->setFocus();
+  }
+  else if(send == Group2Spin->SpinBox_DY) {
+    vx = Group2Spin->SpinBox_DX->GetValue();
+    vy = newValue;
+    Group2Spin->buttonApply->setFocus();
+  }
+  else if(send == Group3Spin->SpinBox_DX) {
+    vx = newValue;
+    vy = Group3Spin->SpinBox_DY->GetValue();
+    vz = Group3Spin->SpinBox_DZ->GetValue();
+    Group3Spin->buttonApply->setFocus();
+  }
+  else if(send == Group3Spin->SpinBox_DY) {
+    vx = Group3Spin->SpinBox_DX->GetValue();
+    vy = newValue;
+    vz = Group3Spin->SpinBox_DZ->GetValue();
+    Group3Spin->buttonApply->setFocus();
+  }
+  else if(send == Group3Spin->SpinBox_DZ) {
+    vx = Group3Spin->SpinBox_DX->GetValue();
+    vy = Group3Spin->SpinBox_DY->GetValue();
+    vz = newValue;
+    Group3Spin->buttonApply->setFocus();
+  }
+  else if(send == Group4Spin->SpinBox_DX) {
+    vx = newValue;
+    vy = Group4Spin->SpinBox_DY->GetValue();
+    vz = Group4Spin->SpinBox_DZ->GetValue();
+    vs = Group4Spin->SpinBox_DS->GetValue();
+    Group4Spin->buttonApply->setFocus();
+  }
+  else if(send == Group4Spin->SpinBox_DY) {
+    vx = Group4Spin->SpinBox_DX->GetValue();
+    vy = newValue;
+    vz = Group4Spin->SpinBox_DZ->GetValue();
+    vs = Group4Spin->SpinBox_DS->GetValue();
+    Group4Spin->buttonApply->setFocus();
+  }
+  else if(send == Group4Spin->SpinBox_DZ) {
+    vx = Group4Spin->SpinBox_DX->GetValue();
+    vy = Group4Spin->SpinBox_DY->GetValue();
+    vz = newValue;
+    vs = Group4Spin->SpinBox_DS->GetValue();
+    Group4Spin->buttonApply->setFocus();
+  }
+  else if(send == Group4Spin->SpinBox_DS) {
+    vx = Group4Spin->SpinBox_DX->GetValue();
+    vy = Group4Spin->SpinBox_DY->GetValue();
+    vz = Group4Spin->SpinBox_DZ->GetValue();
+    vs = newValue;
+    Group4Spin->buttonApply->setFocus();
+  }
+
+  if(myConstructorId == 0) {  // SEGMENT
+    if(mySketchType == PT_ABS) {
+      myX = vx;
+      myY = vy;
+    }
+    else if(mySketchType == PT_RELATIVE) {
+      myDX = vx;
+      myDY = vy;
+    }
+    else if(mySketchType == DIR_ANGLE_LENGTH) {
+      myAngle = vx;
+      myLength = vy;
+    }
+    else if(mySketchType == DIR_ANGLE_X) {
+      myAngle = vx;
+      myX = vy;
+    }
+    else if(mySketchType == DIR_ANGLE_Y) {
+      myAngle = vx;
+      myY = vy;
+    }
+    else if(mySketchType == DIR_PER_LENGTH) {
+      myLength = vx;
+    }
+    else if(mySketchType == DIR_PER_X) {
+      myX = vx;
+    }
+    else if(mySketchType == DIR_PER_Y) {
+      myY = vx;
+    }
+    else if(mySketchType == DIR_TAN_LENGTH) {
+      myLength = vx;
+    }
+    else if(mySketchType == DIR_TAN_X) {
+      myX = vx;
+    }
+    else if(mySketchType == DIR_TAN_Y) {
+      myY = vx;
+    }
+    else if(mySketchType == DIR_DXDY_LENGTH) {
+      myDX = vx;
+      myDY = vy;
+      myLength = vz;
+    }
+    else if(mySketchType == DIR_DXDY_X) {
+      myDX = vx;
+      myDY = vy;
+      myX = vz;
+    }
+    else if(mySketchType == DIR_DXDY_Y) {
+      myDX = vx;
+      myDY = vy;
+      myY = vz;
+    }
+  }
+  else if(myConstructorId == 1) {  // ARC
+    if(mySketchType == DIR_ANGLE_LENGTH) {
+      myAngle = vx;
+      myRadius = vy;
+      myLength = vz;
+    }
+    else if(mySketchType == DIR_PER_LENGTH) {
+      myRadius = vx;
+      myLength = vy;
+    }
+    else if(mySketchType == DIR_TAN_LENGTH) {
+      myRadius = vx;
+      myLength = vy;
+    }
+    else if(mySketchType == DIR_DXDY_LENGTH) {
+      myDX = vx;
+      myDY = vy;
+      myRadius = vz;
+      myLength = vs;
+    }
+  }
+
+  this->MakeSimulationAndDisplay();
+  return;
+}
+
+
+//=================================================================================
+// function : GetNewCommand()
+// purpose  :
+//=================================================================================
+QString EntityGUI_SketcherDlg::GetNewCommand()
+{
+  QString myNewCommand = "";
+  if(mySketchState == FIRST_POINT)
+    return myNewCommand;
+
+  myNewCommand = ":";
+  if(myConstructorId == 0) {  // SEGMENT
+    if(mySketchType == PT_ABS || mySketchType == PT_SEL)
+      myNewCommand = myNewCommand + "TT " + QString::number(myX) + " " + QString::number(myY);
+    if(mySketchType == PT_RELATIVE)
+      myNewCommand = myNewCommand + "T " + QString::number(myDX) + " " + QString::number(myDY);
+    if(mySketchType == DIR_ANGLE_LENGTH) {
+      myNewCommand = myNewCommand + "R " + QString::number(myAngle);
+      myNewCommand = myNewCommand + ":" + "L " + QString::number(myLength);
+    }
+    if(mySketchType == DIR_ANGLE_X) {
+      myNewCommand = myNewCommand + "R " + QString::number(myAngle);
+      myNewCommand = myNewCommand + ":" + "IX " + QString::number(myX);
+    }
+    if(mySketchType == DIR_ANGLE_Y) {
+      myNewCommand = myNewCommand + "R " + QString::number(myAngle);
+      myNewCommand = myNewCommand + ":" + "IY " + QString::number(myY);
+    }
+    if(mySketchType == DIR_PER_LENGTH) {
+      myNewCommand = myNewCommand + "R " + QString::number(90.0);
+      myNewCommand = myNewCommand + ":" + "L " + QString::number(myLength);
+    }
+    if(mySketchType == DIR_PER_X) {
+      myNewCommand = myNewCommand + "R " + QString::number(90.0);
+      myNewCommand = myNewCommand + ":" + "IX " + QString::number(myX);
+    }
+    if(mySketchType == DIR_PER_Y) {
+      myNewCommand = myNewCommand + "R " + QString::number(90.0);
+      myNewCommand = myNewCommand + ":" + "IY " + QString::number(myY);
+    }
+    if(mySketchType == DIR_TAN_LENGTH)
+      myNewCommand = myNewCommand + "L " + QString::number(myLength);
+    if(mySketchType == DIR_TAN_X)
+      myNewCommand = myNewCommand + "IX " + QString::number(myX);
+    if(mySketchType == DIR_TAN_Y)
+      myNewCommand = myNewCommand + "IY " + QString::number(myY);
+    if(mySketchType == DIR_DXDY_LENGTH) {
+      myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY);
+      myNewCommand = myNewCommand + ":" + "L " + QString::number(myLength);
+    }
+    if(mySketchType == DIR_DXDY_X) {
+      myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY);
+      myNewCommand = myNewCommand + ":" + "IX " + QString::number(myX);
+    }
+    if(mySketchType == DIR_DXDY_Y) {
+      myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY);
+      myNewCommand = myNewCommand + ":" + "IY " + QString::number(myY);
+    }
+  }
+  else if(myConstructorId == 1) {  // ARC
+    if(mySketchType == DIR_ANGLE_LENGTH) {
+      myNewCommand = myNewCommand + "R " + QString::number(myAngle);
+      myNewCommand = myNewCommand + ":" + "C " + QString::number(myRadius) + " " + QString::number(myLength);
+    }
+    if(mySketchType == DIR_PER_LENGTH) {
+      myNewCommand = myNewCommand + "R " + QString::number(90.0);
+      myNewCommand = myNewCommand + ":" + "C " + QString::number(myRadius) + " " + QString::number(myLength);
+    }
+    if(mySketchType == DIR_TAN_LENGTH) {
+      myNewCommand = myNewCommand + "C " + QString::number(myRadius) + " " + QString::number(myLength);
+    }
+    if(mySketchType == DIR_DXDY_LENGTH) {
+      myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY);
+      myNewCommand = myNewCommand + ":" + "C " + QString::number(myRadius) + " " + QString::number(myLength);
+    }
+  }
+  return myNewCommand;
+}
+
+
+//=================================================================================
+// function : MakeSimulationAndDisplay()
+// purpose  :
+//=================================================================================
+void EntityGUI_SketcherDlg::MakeSimulationAndDisplay()
+{
+  myEntityGUI->EraseSimulationShape();
+  mySimulationTopoDs1.Nullify();
+  mySimulationTopoDs2.Nullify();
+  
+  try {
+    if(mySketchState == FIRST_POINT) {
+      myCommand = "Sketch ";
+      myCommand = myCommand + ":" + "F " + QString::number(myX) + " " + QString::number(myY);
+
+      myLastX1 = myX;
+      myLastY1 = myY;
+
+    }
+
+    Sketcher_Profile aProfile1 (myCommand.ascii());
+
+    if(aProfile1.IsDone()) {
+      myShape = aProfile1.GetShape();
+      mySimulationTopoDs1 = myShape;
+    }
+
+    if(mySketchState != FIRST_POINT) {
+      if(mySketchState == SECOND_POINT) {
+       gp_Pnt pt = BRep_Tool::Pnt(TopoDS::Vertex(myShape));
+       myLastX1 = pt.X();
+       myLastY1 = pt.Y();
+      }
+      else {
+       TopoDS_Vertex V1, V2;
+       TopExp::Vertices(TopoDS::Wire(myShape), V1, V2);
+       gp_Pnt pt = BRep_Tool::Pnt(V2);
+       myLastX1 = pt.X();
+       myLastY1 = pt.Y();
+       if(myLastOp == 1) {   // ARC
+         myLastDir = aProfile1.GetLastDir();
+         myLastX2 = myLastX1 - myLastDir.X();
+         myLastY2 = myLastY1 - myLastDir.Y();
+       }
+      }
+      QString myNewCommand = "Sketch ";
+      myNewCommand = myNewCommand + ":" + "F " + QString::number(myLastX1) + " " + QString::number(myLastY1);
+      if(mySketchState != SECOND_POINT && !((myLastX1 - myLastX2) == 0 && (myLastY1 - myLastY2) == 0))
+       myNewCommand = myNewCommand + ":" + "D " + QString::number(myLastX1 - myLastX2) + " " + QString::number(myLastY1 - myLastY2);
+      myNewCommand = myNewCommand + this->GetNewCommand();
+      Sketcher_Profile aProfile2 (myNewCommand.ascii());
+      if(aProfile2.IsDone())
+       mySimulationTopoDs2 = aProfile2.GetShape();
+
+      if ( mySimulationTopoDs2.IsNull() ) {
+       if ( Group1Sel->isVisible() ) {
+         Group1Sel->buttonApply->setEnabled(false);
+         Group1Sel->buttonApply->setFocus();
+       }
+       if ( Group1Spin->isVisible() ) {
+         Group1Spin->buttonApply->setEnabled(false);
+         Group1Spin->buttonApply->setFocus();
+       }
+       if ( Group2Spin->isVisible() ) {
+         Group2Spin->buttonApply->setEnabled(false);
+         Group2Spin->buttonApply->setFocus();
+       }
+       if ( Group3Spin->isVisible() ) {
+         Group3Spin->buttonApply->setEnabled(false);
+         Group3Spin->buttonApply->setFocus();
+       }
+       if ( Group4Spin->isVisible() ) {
+         Group4Spin->buttonApply->setEnabled(false);
+         Group4Spin->buttonApply->setFocus();
+       }
+      } else {
+       if ( Group1Sel->isVisible() ) {
+         Group1Sel->buttonApply->setEnabled(true);
+         Group1Sel->buttonApply->setFocus();
+       }
+       if ( Group1Spin->isVisible() ) {
+         Group1Spin->buttonApply->setEnabled(true);
+         Group1Spin->buttonApply->setFocus();
+       }
+       if ( Group2Spin->isVisible() ) {
+         Group2Spin->buttonApply->setEnabled(true);
+         Group2Spin->buttonApply->setFocus();
+       }
+       if ( Group3Spin->isVisible() ) {
+         Group3Spin->buttonApply->setEnabled(true);
+         Group3Spin->buttonApply->setFocus();
+       }
+       if ( Group4Spin->isVisible() ) {
+         Group4Spin->buttonApply->setEnabled(true);
+         Group4Spin->buttonApply->setFocus();
+       }
+      }
+    }
+
+    myEntityGUI->DisplaySimulationShape(mySimulationTopoDs1, mySimulationTopoDs2);
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Exception catched in MakeSimulationAndDisplay");
+    return;
+  }
+  return;
+}
diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h
new file mode 100644 (file)
index 0000000..2da62fe
--- /dev/null
@@ -0,0 +1,149 @@
+//  GEOM GEOMGUI : GUI for Geometry component
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : EntityGUI_SketcherDlg.h
+//  Author : Damine COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef ENTITYGUI_SKETCHERDLG_H
+#define ENTITYGUI_SKETCHERDLG_H
+
+#include "EntityGUI_Skeleton_QTD.h"
+#include "EntityGUI_Point_QTD.h"
+#include "EntityGUI_Dir1_QTD.h"
+#include "EntityGUI_Dir2_QTD.h"
+
+#include "EntityGUI_1Sel_QTD.h"
+#include "EntityGUI_1Spin.h"
+#include "EntityGUI_2Spin.h"
+#include "EntityGUI_3Spin.h"
+#include "EntityGUI_4Spin.h"
+
+#include "EntityGUI.h"
+
+#include "GEOM_ShapeTypeFilter.hxx"
+
+#include <gp_Dir.hxx>
+
+#include <qwidget.h>
+#include <qgroupbox.h>
+#include <qlineedit.h>
+#include <qlayout.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+
+//=================================================================================
+// class    : EntityGUI_Dlg
+// purpose  :
+//=================================================================================
+class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD
+{ 
+    Q_OBJECT
+
+public:
+    EntityGUI_SketcherDlg(QWidget* parent = 0, const char* name = 0, EntityGUI* theEntityGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~EntityGUI_SketcherDlg();
+
+private :
+    void Init();
+    void enterEvent(QEvent* e);
+    void closeEvent(QCloseEvent* e);
+    void InitClick();
+    void MakeSimulationAndDisplay();
+    QString GetNewCommand();
+
+    EntityGUI* myEntityGUI;
+
+    double step;
+    int myConstructorId;
+    int myConstructorDirId;
+    int mySketchType;
+    int mySketchState;
+    Handle(GEOM_ShapeTypeFilter) myVertexFilter;
+
+    TopoDS_Shape mySimulationTopoDs1;    /* Shape used for simulation display */
+    TopoDS_Shape mySimulationTopoDs2;    /* Shape used for simulation display */
+    QLineEdit* myEditCurrentArgument;   /* Current LineEdit */
+    SALOME_Selection* mySelection;      /* User shape selection */
+    GEOM::GEOM_Gen_var myGeom;          /* Current GeomI object */
+    GEOMBase* myGeomBase;
+    GEOMContext* myGeomGUI;  /* Current GeomGUI object */
+
+    int myLastOp;
+    QString myCommand;
+    QString myLastCommand;
+    TopoDS_Shape myShape;
+    gp_Dir myLastDir;
+
+    Standard_Real myX;
+    Standard_Real myY;
+    Standard_Real myDX;
+    Standard_Real myDY;
+    Standard_Real myLastX1;
+    Standard_Real myLastY1;
+    Standard_Real myLastX2;
+    Standard_Real myLastY2;
+    Standard_Real myLength;
+    Standard_Real myAngle;
+    Standard_Real myRadius;
+
+    EntityGUI_Point_QTD* GroupPt;
+    EntityGUI_Dir1_QTD* GroupD1;
+    EntityGUI_Dir2_QTD* GroupD2;
+
+    EntityGUI_1Sel_QTD* Group1Sel;
+    EntityGUI_1Spin* Group1Spin;
+    EntityGUI_2Spin* Group2Spin;
+    EntityGUI_3Spin* Group3Spin;
+    EntityGUI_4Spin* Group4Spin;
+
+    enum SketchState {FIRST_POINT, SECOND_POINT, NEXT_POINT};
+
+    enum SketchType {PT_ABS, PT_RELATIVE, PT_SEL,
+                    DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y,
+                    DIR_PER_LENGTH, DIR_PER_X, DIR_PER_Y,
+                    DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y,
+                    DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y};
+
+private slots:
+    void ClickOnEnd();
+    void ClickOnClose();
+    void ClickOnCancel();
+    void ClickOnApply();
+    void ClickOnUndo();
+    void LineEditReturnPressed();
+    void SelectionIntoArgument();
+    void SetEditCurrentArgument();
+    void DeactivateActiveDialog();
+    void ActivateThisDialog();
+    void TypeClicked(int constructorId);
+    void DestClicked(int constructorId);
+    void PointClicked(int constructorId);
+    void Dir1Clicked(int constructorId);
+    void Dir2Clicked(int constructorId);
+    void ValueChangedInSpinBox(double newValue);
+
+};
+
+#endif // ENTITYGUI_SKETCHERDLG_H
index 3883eebab7aca3d9325357b6901b82e2327d981b..2f22e88c23df440c3e120fd24c6f86efdd561681 100644 (file)
@@ -41,10 +41,38 @@ LIB = libEntityGUI.la
 EXPORT_HEADERS= 
 
 LIB_SRC =      EntityGUI.cxx \
+               EntityGUI_Skeleton_QTD.cxx \
+               EntityGUI_Point_QTD.cxx \
+               EntityGUI_Dir1_QTD.cxx \
+               EntityGUI_Dir2_QTD.cxx \
+               EntityGUI_1Sel_QTD.cxx \
+               EntityGUI_1Spin_QTD.cxx \
+               EntityGUI_2Spin_QTD.cxx \
+               EntityGUI_3Spin_QTD.cxx \
+               EntityGUI_4Spin_QTD.cxx \
+               EntityGUI_1Spin.cxx \
+               EntityGUI_2Spin.cxx \
+               EntityGUI_3Spin.cxx \
+               EntityGUI_4Spin.cxx \
+               EntityGUI_SketcherDlg.cxx \
                EntityGUI_SubShapeDlg.cxx
 
 LIB_MOC = \
                EntityGUI.h \
+               EntityGUI_Skeleton_QTD.h \
+               EntityGUI_Point_QTD.h \
+               EntityGUI_Dir1_QTD.h \
+               EntityGUI_Dir2_QTD.h \
+               EntityGUI_1Sel_QTD.h \
+               EntityGUI_1Spin_QTD.h \
+               EntityGUI_2Spin_QTD.h \
+               EntityGUI_3Spin_QTD.h \
+               EntityGUI_4Spin_QTD.h \
+               EntityGUI_1Spin.h \
+               EntityGUI_2Spin.h \
+               EntityGUI_3Spin.h \
+               EntityGUI_4Spin.h \
+               EntityGUI_SketcherDlg.h \
                EntityGUI_SubShapeDlg.h
 
 LIB_CLIENT_IDL = 
@@ -56,6 +84,6 @@ LIB_SERVER_IDL =
 CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
 
-LDFLAGS += -lGEOMFiltersSelection -lDisplayGUI
+LDFLAGS += -lGEOMFiltersSelection -lDisplayGUI -lGEOMSketcher
 
 @CONCLUDE@
index 4bf747c5a82175e055d0f64c8f7a9b5174a62b11..41506b1e73e2ee029b424e40eac7747507275edc 100644 (file)
@@ -31,6 +31,7 @@ using namespace std;
 
 #include "Partition_Spliter.hxx"
 #include "Archimede_VolumeSection.hxx"
+#include "Sketcher_Profile.hxx"
 
 #include "Utils_CorbaException.hxx"
 #include "utilities.h"
@@ -159,6 +160,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);
@@ -209,7 +212,7 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
 {
   GEOM::GEOM_Shape_var aShape = GEOM::GEOM_Shape::_narrow(_orb->string_to_object(IORString));
   if (!CORBA::is_nil(aShape)) {
-    return strdup(aShape->ShapeId());
+    return CORBA::string_dup(aShape->ShapeId());
   }
   return 0;
 }
@@ -235,6 +238,12 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
   TCollection_ExtendedString MainIOR;
   TDF_Label Lab;
   TDF_Tool::Label(aDoc->GetData(), aPersRefString, Lab );
+
+  if (Lab.IsNull()) {
+    MESSAGE("Can not find label "<<aPersRefString<<" for study "<<myStudy->StudyId());
+    THROW_SALOME_CORBA_EXCEPTION("Incorrect GEOM data loaded",SALOME::BAD_PARAM);
+    //return ""; empty IORs raise new problem: "display" in popup crashes
+  }
   
   Handle(TNaming_NamedShape) NS;
   Lab.FindAttribute( TNaming_NamedShape::GetID(), NS );
@@ -259,7 +268,7 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
       
       TCollection_AsciiString entry;
       TDF_Tool::Entry(mainLabel,entry);
-      CORBA::String_var ent = strdup(entry.ToCString());
+      CORBA::String_var ent = CORBA::string_dup(entry.ToCString());
       
       /* Create the main object recursively */
       MainIOR = LocalPersistentIDToIOR(theSObject, ent, isMultiFile, isASCII) ;
@@ -363,6 +372,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;
 
@@ -426,7 +436,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy,
     aShapeName = "Vertex_";
   }                                          
   if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag());
-  else aShapeName = TCollection_AsciiString(strdup(theName));
+  else aShapeName = TCollection_AsciiString((char*)theName);
 
   //Set a name of the added shape
   anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeName");
@@ -509,7 +519,7 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
   if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.ToCString(), aSeq.in(), true);
 
   SALOMEDS::Study_var Study = theComponent->GetStudy();
-  TCollection_AsciiString name( strdup(Study->Name()) );
+  TCollection_AsciiString name( Study->Name() );
 
   int StudyID = Study->StudyId();
   myStudyIDToDoc.Bind( StudyID, myCurrentOCAFDoc );  
@@ -537,7 +547,7 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 //  void GEOM_Gen_i::Save(const char *IORSComponent, const char *aUrlOfFile) 
 //  {
 
-//    TCollection_ExtendedString path(strdup(aUrlOfFile));
+//    TCollection_ExtendedString path((char*)aUrlOfFile);
 //    TCollection_ExtendedString pathWithExt = path + TCollection_ExtendedString(".sgd");
 //    myOCAFApp->SaveAs(myCurrentOCAFDoc,pathWithExt);
 //  }
@@ -550,14 +560,14 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 //  void GEOM_Gen_i::Load(const char *IORSComponent, const char *aUrlOfFile) 
 //  {
 
-//    TCollection_ExtendedString path(strdup(aUrlOfFile));
+//    TCollection_ExtendedString path((char*)aUrlOfFile);
 //    TCollection_ExtendedString pathWithExt = path + TCollection_ExtendedString(".sgd");
 
 //    myOCAFApp->Open(pathWithExt,myCurrentOCAFDoc);
 
 //    SALOMEDS::SComponent_var SC = SALOMEDS::SComponent::_narrow(_orb->string_to_object(IORSComponent));
 //    SALOMEDS::Study_var Study = SC->GetStudy();
-//    TCollection_AsciiString name( strdup(Study->Name()) );
+//    TCollection_AsciiString name( Study->Name() );
 
 //    int StudyID = Study->StudyId();
 //    myStudyIDToDoc.Bind( StudyID, myCurrentOCAFDoc );  
@@ -614,7 +624,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;
@@ -704,7 +714,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
 //============================================================================
 char* GEOM_Gen_i::ComponentDataType()
 {
-  return strdup("GEOM");
+  return CORBA::string_dup("GEOM");
 }
 
 //============================================================================
@@ -714,7 +724,7 @@ char* GEOM_Gen_i::ComponentDataType()
 void GEOM_Gen_i::register_name(char * name)
 {
   GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(POA_GEOM::GEOM_Gen::_this());
-  name_service->Register(g, strdup(name)); 
+  name_service->Register(g, name); 
 }
 
 
@@ -753,7 +763,7 @@ TopoDS_Shape GEOM_Gen_i::GetTopoShape(GEOM::GEOM_Shape_ptr shape_ptr)
 
   TDF_Label lab ;
   Handle(TDF_Data) D = myCurrentOCAFDoc->GetData() ;
-  TDF_Tool::Label( D, strdup(shape_ptr->ShapeId()), lab, true ) ;
+  TDF_Tool::Label( D, shape_ptr->ShapeId(), lab, true ) ;
   Handle(TNaming_NamedShape) NamedShape ;  
   bool res = lab.FindAttribute(TNaming_NamedShape::GetID(), NamedShape) ;
 
@@ -803,7 +813,7 @@ const char * GEOM_Gen_i::InsertInLabel(TopoDS_Shape S, const char *mystr, Handle
 {
   GEOMDS_Commands GC(OCAFDoc->Main());
   /* add attributs S and mystr in a new label */
-  TDF_Label Lab = GC.AddShape (S, strdup(mystr));
+  TDF_Label Lab = GC.AddShape (S, (char*)mystr);
 
   TCollection_AsciiString entry;
   TDF_Tool::Entry(Lab,entry);
@@ -831,7 +841,7 @@ const char * GEOM_Gen_i::InsertInLabelDependentShape( TopoDS_Shape S,
   TDF_Tool::Label(OCAFDoc->GetData(), mainshape_ptr->ShapeId(), mainRefLab);
 
   /* add attributs : S, nameIor and ref to main */
-  TDF_Label Lab = GC.AddDependentShape(S, strdup(nameIor), mainRefLab);
+  TDF_Label Lab = GC.AddDependentShape(S, (char*)nameIor, mainRefLab);
 
   TCollection_AsciiString entry;
   TDF_Tool::Entry(Lab, entry);
@@ -911,7 +921,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() );
 }
 
 
@@ -1015,6 +1033,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() ;
   
@@ -1103,6 +1122,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 ) {
@@ -1219,6 +1239,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) ;
 
@@ -1367,6 +1388,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 */
@@ -1467,6 +1489,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 )
@@ -1629,6 +1652,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 ;  
@@ -1918,6 +1942,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 ;
@@ -1976,6 +2001,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 ;
@@ -2115,6 +2141,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);
 }
 
@@ -2128,6 +2155,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);
 }
 
@@ -2142,6 +2170,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);
@@ -2222,6 +2251,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);
 }
 
@@ -2234,6 +2264,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);
 }
 
@@ -2248,6 +2279,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) ;
   
@@ -2334,21 +2366,21 @@ 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'
 //=================================================================================
 GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBoolean(GEOM::GEOM_Shape_ptr shape1,
-                                      GEOM::GEOM_Shape_ptr shape2,
-                                      CORBA::Long operation) 
+                                            GEOM::GEOM_Shape_ptr shape2,
+                                            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) ;
@@ -2420,6 +2452,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) ;
@@ -2506,9 +2539,9 @@ GEOM::PointStruct GEOM_Gen_i::MakePointStruct(CORBA::Double x,
 GEOM::DirStruct GEOM_Gen_i::MakeDirection(const GEOM::PointStruct& p)
 { 
   GEOM::DirStruct d ;
-    d.PS.x = p.x ;  d.PS.y = p.y ;  d.PS.z = p.z ;
-    return d ;
-  }
+  d.PS.x = p.x ;  d.PS.y = p.y ;  d.PS.z = p.z ;
+  return d ;
+}
 
 //=================================================================================
 // function : MakeBox()
@@ -2522,6 +2555,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 ;
@@ -2554,6 +2588,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) ;
@@ -2586,6 +2621,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 {
@@ -2614,6 +2650,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) ;
@@ -2648,6 +2685,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) ;
@@ -2686,6 +2724,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;  
@@ -2696,8 +2735,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();
@@ -2727,6 +2769,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;
@@ -2802,6 +2845,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");
@@ -2833,7 +2877,6 @@ throw (SALOME::SALOME_Exception)
       GEOM::GEOM_Shape_var aShape = GetIORFromString( ListTools[ind] );
       TopoDS_Shape Shape = GetTopoShape(aShape);
       if(Shape.IsNull() ) {
-        //MESSAGE ( "In Partition a tool shape is null" );
        THROW_SALOME_CORBA_EXCEPTION("In Partition a shape is null", SALOME::BAD_PARAM);
       }
       if ( !ShapesMap.Contains( Shape ) && ToolsMap.Add( Shape ))
@@ -2868,7 +2911,9 @@ throw (SALOME::SALOME_Exception)
         PS.AddShape(Shape);
     }
     
+    //MESSAGE ( "Partition::Compute() " );
     PS.Compute ((TopAbs_ShapeEnum) Limit);
+    //MESSAGE ( "Partition::Compute() - END" );
 
     // suppress result outside of shapes in KInsideMap
     for (ind = 0; ind < ListKeepInside.length(); ind++) {
@@ -2971,6 +3016,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) ;
@@ -2993,6 +3039,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFilling(GEOM::GEOM_Shape_ptr myShape,
        THROW_SALOME_CORBA_EXCEPTION("Initial shape doesn't contain only edges !", SALOME::BAD_PARAM);
       }
       C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last);
+      if (C.IsNull()) continue;
       C = new Geom_TrimmedCurve(C, First, Last);
       Section.AddCurve(C) ;
       i++ ;
@@ -3167,6 +3214,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) ;
@@ -3305,6 +3353,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 ;
@@ -3343,6 +3392,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 ;
@@ -3386,6 +3436,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;  
 
@@ -3462,7 +3513,7 @@ GEOM::GEOM_Gen::ListOfIOR* GEOM_Gen_i::GetReferencedObjects(GEOM::GEOM_Shape_ptr
          Handle(TDataStd_Name) Att;
          L.FindAttribute(TDataStd_Name::GetID(),Att);
          TCollection_AsciiString nameIOR (Att->Get()) ;
-         aList[i] = strdup( nameIOR.ToCString() );
+         aList[i] = CORBA::string_dup( nameIOR.ToCString() );
          i++;
        }
    
@@ -3512,7 +3563,7 @@ GEOM::GEOM_Gen::ListOfIOR* GEOM_Gen_i::GetObjects(GEOM::GEOM_Shape_ptr shape)
 
     if (!Att->Get().IsEqual(TCollection_ExtendedString("Arguments")) ) {
       TCollection_AsciiString nameIOR (Att->Get());
-      aList[i] = strdup( nameIOR.ToCString() );
+      aList[i] = CORBA::string_dup( nameIOR.ToCString() );
       i++;
     }
     ChildIterator1.Next();
@@ -3528,12 +3579,15 @@ 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 ;
   
   try {
-    BRep_Builder aBuilder;  
-    BRepTools::Read(tds, strdup(filename), aBuilder) ;    
+    BRep_Builder aBuilder;
+    char* aCopyfilename = strdup(filename);
+    BRepTools::Read(tds, aCopyfilename, aBuilder) ;
+    free(aCopyfilename);
     if (tds.IsNull()) {
       THROW_SALOME_CORBA_EXCEPTION("Import BRep aborted", SALOME::BAD_PARAM);
     } 
@@ -3558,6 +3612,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 ;
 
@@ -3591,13 +3646,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);
@@ -3613,6 +3669,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;
@@ -3684,10 +3741,21 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFaces(const GEOM::GEOM_Gen::ListOfIOR& List
        FR.Perform();
     
        if(FR.IsDone()) {
-         for(; FR.More(); FR.Next())
-           aBuilder.Add(C, FR.Current().Oriented(OriF));
-         result = CreateObject(C);
-         InsertInLabelMoreArguments(C, result, ListShapes, myCurrentOCAFDoc);
+         int k = 0;
+         TopoDS_Shape aFace;
+         for(; FR.More(); FR.Next()) {
+           aFace = FR.Current().Oriented(OriF);
+           aBuilder.Add(C, aFace);
+           k++;
+         }
+         if(k == 1) {
+           result = CreateObject(aFace);
+           InsertInLabelMoreArguments(aFace, result, ListShapes, myCurrentOCAFDoc);
+         }
+         else {
+           result = CreateObject(C);
+           InsertInLabelMoreArguments(C, result, ListShapes, myCurrentOCAFDoc);
+         }
        }
       }
     }
@@ -3709,6 +3777,7 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeFaces(const GEOM::GEOM_Gen::ListOfIOR& List
 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;
@@ -3750,6 +3819,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;
@@ -3798,6 +3868,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) ;  
@@ -3814,6 +3885,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);
@@ -3830,6 +3902,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 ;
   
@@ -3863,6 +3936,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 ;
 
@@ -3896,6 +3970,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 ;
   
@@ -3930,6 +4005,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) ;
@@ -3957,7 +4033,34 @@ GEOM::GEOM_Shape_ptr  GEOM_Gen_i::MakeArc(const GEOM::PointStruct& pInit,
   return result ;
 }
 
-
+//=================================================================================
+ // function : MakeSketcher()
+ // purpose  : Make a wire from a list containing many points
+ //=================================================================================
+ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSketcher( const char *Cmd )
+   throw (SALOME::SALOME_Exception)
+ {
+   GEOM::GEOM_Shape_var result ;
+   TopoDS_Shape tds ;
+   try {
+     Sketcher_Profile aProfile (Cmd);
+     if(aProfile.IsDone())
+       tds = aProfile.GetShape();
+   }
+   catch(Standard_Failure) {
+     THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::MakeSketcher", SALOME::BAD_PARAM);
+   }
+   if (tds.IsNull()) {
+     THROW_SALOME_CORBA_EXCEPTION("MakeSketcher aborted : null shape", SALOME::BAD_PARAM);
+   } 
+   else {
+     result = CreateObject(tds);
+     const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ;
+     result->ShapeId(entry) ;
+   }
+   return result;
+ }
 
 //=================================================================================
 // function : MakeTranslation()
@@ -3969,6 +4072,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() ) {
@@ -3999,6 +4103,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 ;
 
@@ -4054,6 +4159,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 ;
   
@@ -4111,6 +4217,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) ;
@@ -4164,6 +4271,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) ;
@@ -4248,6 +4356,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) ;
@@ -4273,6 +4382,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) ;
@@ -4325,6 +4435,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) ;
@@ -4363,6 +4474,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) ;
@@ -4396,6 +4508,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;
@@ -4429,6 +4542,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 ;
   
@@ -4459,6 +4573,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 ; 
@@ -4502,6 +4617,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) ;
@@ -4535,6 +4651,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 ;
@@ -4591,6 +4708,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) ;
@@ -4624,6 +4742,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) ;
@@ -4678,6 +4797,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;
@@ -4751,6 +4871,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 ;
 
@@ -4770,7 +4891,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();
       
@@ -4785,7 +4906,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();
     }
@@ -4815,6 +4936,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 ;
 
@@ -4873,6 +4995,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);
@@ -4893,6 +5016,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 ;
 
@@ -4932,6 +5056,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) ;
@@ -4979,10 +5104,10 @@ GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakePanel(GEOM::GEOM_Shape_ptr shape,
     
     GEOM::GEOM_Gen::ListOfIOR_var aList = new GEOM::GEOM_Gen::ListOfIOR;
     aList->length(4);
-    aList[0]=strdup(Edge1->Name());
-    aList[1]=strdup(Edge2->Name());
-    aList[2]=strdup(Edge3->Name());
-    aList[3]=strdup(Edge4->Name());
+    aList[0]=CORBA::string_dup(Edge1->Name());
+    aList[1]=CORBA::string_dup(Edge2->Name());
+    aList[2]=CORBA::string_dup(Edge3->Name());
+    aList[3]=CORBA::string_dup(Edge4->Name());
     
     GEOM::GEOM_Shape_ptr aWire = MakeWire( aList );
     GEOM::GEOM_Shape_ptr aFace = MakeFace( aWire, true ) ;
@@ -5008,6 +5133,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);
@@ -5040,6 +5166,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);
@@ -5064,6 +5191,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 6d74fa198cf9708c5fa0ad995b77430ff80bd6d9..ff910b897af571b821bc69964778b67edce46a32 100644 (file)
@@ -388,6 +388,7 @@ class GEOM_Gen_i: public POA_GEOM::GEOM_Gen,
   GEOM::GEOM_Shape_ptr MakePlacedBox(CORBA::Double x1,  CORBA::Double y1,  CORBA::Double z1,
                                     CORBA::Double delta1, CORBA::Double delta2, CORBA::Double delta3)
     throw (SALOME::SALOME_Exception) ;
+
   GEOM::GEOM_Shape_ptr MakePanel(GEOM::GEOM_Shape_ptr shape,
                                 CORBA::Short directiontype,
                                 CORBA::Double delta)
@@ -576,6 +577,14 @@ class GEOM_Gen_i: public POA_GEOM::GEOM_Gen,
                                  const  GEOM::PointStruct& pEnd)
     throw (SALOME::SALOME_Exception) ;
 
+  //-------------------------------------------------------------------//
+  // Specific method Sketcher                                           //
+  //-------------------------------------------------------------------//
+  GEOM::GEOM_Shape_ptr MakeSketcher   (const char* Cmd)
+    throw (SALOME::SALOME_Exception) ;
+  
+  //-------------------------------------------------------------------//
+
   GEOM::GEOM_Shape_ptr MakeCompound (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
     throw (SALOME::SALOME_Exception) ;
   GEOM::GEOM_Shape_ptr MakeWire     (const GEOM::GEOM_Gen::ListOfIOR& ListShapes)
index 60db998b4c1dc28f64c317740f5e7768afbd06b3..bd2110d50c10eab46c0ecc10b8452b413712c448 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
+#include <fstream.h>
+#include <strstream>
+
 #include <BRepTools_ShapeSet.hxx>
+#include <BRepTools.hxx>
+
 #include "GEOM_Shape_i.hh"
 #include "SALOME_NamingService.hxx"
-#include <fstream.h>
-#include <BRepTools.hxx>
 
+using namespace std;
 
 
 //=================================================================================
@@ -84,7 +87,7 @@ GEOM_Shape_i::~GEOM_Shape_i() { delete &_geom; }
 //          : WARNING : Register to naming service actually removed !
 //=================================================================================
 void GEOM_Shape_i::Name(const char* name) {
-  _name = strdup(name);
+  _name = CORBA::string_dup(name);
   GEOM::GEOM_Shape_ptr g = GEOM::GEOM_Shape::_narrow(_this());
 
   // Removed declaration of shapes to naming service
@@ -97,14 +100,14 @@ void GEOM_Shape_i::Name(const char* name) {
 // function : Name (get method)
 // purpose  : to get the attribute 'name' of this shape
 //=================================================================================
-char* GEOM_Shape_i::Name() { return strdup(_name); }
+char* GEOM_Shape_i::Name() { return CORBA::string_dup(_name); }
 
 //=================================================================================
 // function : MainName (set method)
 // purpose  : to set the attribute 'name' of this mainshape. 
 //=================================================================================
 void GEOM_Shape_i::MainName(const char* name) {
-  _mainname = strdup(name);
+  _mainname = CORBA::string_dup(name);
 }
 
 
@@ -112,7 +115,7 @@ void GEOM_Shape_i::MainName(const char* name) {
 // function : MainName (get method)
 // purpose  : to get the attribute 'name' of this shape
 //=================================================================================
-char* GEOM_Shape_i::MainName() { return strdup(_mainname); }
+char* GEOM_Shape_i::MainName() { return CORBA::string_dup(_mainname); }
 
 //=================================================================================
 // function : IsMainShape (get method)
@@ -132,14 +135,14 @@ void GEOM_Shape_i::IsMainShape(const bool abool) { _ismain = abool ; }
 // function : ShapeId
 // purpose  : to get the id of this shape from GEOM (OCAF entry)
 //=================================================================================
-char* GEOM_Shape_i::ShapeId() { return strdup(_shapeid) ; }
+char* GEOM_Shape_i::ShapeId() { return CORBA::string_dup(_shapeid) ; }
 
 
 //=================================================================================
 // function : ShapeId (set method) 
 // purpose  : to set the id of this shape in GEOM/OCAF doc
 //=================================================================================
-void GEOM_Shape_i::ShapeId(const char * shapeid) { _shapeid = strdup(shapeid) ; }
+void GEOM_Shape_i::ShapeId(const char * shapeid) { _shapeid = CORBA::string_dup(shapeid) ; }
 
 
 
@@ -147,7 +150,7 @@ void GEOM_Shape_i::ShapeId(const char * shapeid) { _shapeid = strdup(shapeid) ;
 // function : StudyShapeId (get method)
 // purpose  : to get the id of this shape from the study document (OCAF entry)
 //=================================================================================
-char* GEOM_Shape_i::StudyShapeId() { return strdup(_studyshapeid) ; }
+char* GEOM_Shape_i::StudyShapeId() { return CORBA::string_dup(_studyshapeid) ; }
 
 
 //=================================================================================
@@ -155,7 +158,7 @@ char* GEOM_Shape_i::StudyShapeId() { return strdup(_studyshapeid) ; }
 // purpose  : to set the id of this shape in the Study document (OCAF entry)
 //=================================================================================
 void GEOM_Shape_i::StudyShapeId(const char * studyshapeid)
-{ _studyshapeid = strdup(studyshapeid) ; }
+{ _studyshapeid = CORBA::string_dup(studyshapeid) ; }
 
 
 
@@ -209,7 +212,7 @@ void GEOM_Shape_i::NameType(const char* name) {
 // function : NameType (get method)
 // purpose  : to get the attribute 'nametype' of this shape
 //=================================================================================
-char* GEOM_Shape_i::NameType() { return strdup(_nametype); }
+char* GEOM_Shape_i::NameType() { return CORBA::string_dup(_nametype); }
 
 //=================================================================================
 // function : GetShapeStream
index 738e9ae649be5aeff5dde623fb0e5af10c45715c..a15b57b8bfaaea480754d036b2a13aad1995c019 100644 (file)
@@ -51,7 +51,7 @@ EXPORT_HEADERS =
 # additionnal information to compil and link file
 CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
-LDFLAGS  += -lGEOMDS -lTOOLSDS -lSalomeNS -lSalomeContainer -lGEOMPartition -lGEOMArchimede $(CAS_LDPATH) -lTKIGES -lTKSTEP -lTKFillet -lTKOffset -L${KERNEL_ROOT_DIR}/lib/salome
+LDFLAGS  += -lGEOMDS -lTOOLSDS -lSalomeNS -lSalomeContainer -lGEOMPartition -lGEOMArchimede $(CAS_LDPATH) -lTKIGES -lTKSTEP -lTKFillet -lTKOffset -lGEOMSketcher -L${KERNEL_ROOT_DIR}/lib/salome
 
 # additional file to be cleaned
 MOSTLYCLEAN =
index fd8b537af27f2d2297e347d35fd2e26427f4f852..9e7925e683d0eb01c7eac9dc9dd7979a9e361ccc 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);
   
@@ -673,11 +675,17 @@ bool GEOMBase::AddInStudy(bool selection, const Handle(SALOME_InteractiveObject)
     QString Name = SALOMEGUI_NameDlg::getName(QAD_Application::getDesktop(), anIO->getName());
     if(!Name.isEmpty()) {
       // VTK
-      if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK)
-       GActor->setName(strdup(Name.latin1()));
+      if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
+       char* aCopy = CORBA::string_dup(Name.latin1());
+       GActor->setName(aCopy);
+       delete(aCopy);
+      }
       // OCC
-      else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC)
-       GAISShape->setName(strdup(Name.latin1()));
+      else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
+       char* aCopy = CORBA::string_dup(Name.latin1());
+       GAISShape->setName(aCopy);
+       delete(aCopy);
+      }
     } 
     else
       return false;
@@ -914,55 +922,55 @@ bool GEOMBase::GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString&
     {
     case TopAbs_COMPOUND:
       {
-       aTypeString = strdup(tr("GEOM_COMPOUND"));
+       aTypeString = CORBA::string_dup(tr("GEOM_COMPOUND"));
        return true;
       }
     case  TopAbs_COMPSOLID:
       {
-       aTypeString = strdup(tr("GEOM_COMPOUNDSOLID")) ; 
+       aTypeString = CORBA::string_dup(tr("GEOM_COMPOUNDSOLID")) ; 
        return true ;
       }
     case TopAbs_SOLID:
       {
-       aTypeString = strdup(tr("GEOM_SOLID")) ; 
+       aTypeString = CORBA::string_dup(tr("GEOM_SOLID")) ; 
        return true ;
       }
     case TopAbs_SHELL:
       {
-       aTypeString = strdup(tr("GEOM_SHELL")) ; 
+       aTypeString = CORBA::string_dup(tr("GEOM_SHELL")) ; 
        return true ;
       }
     case TopAbs_FACE:
       { 
        BRepAdaptor_Surface surf(TopoDS::Face(aShape));
        if(surf.GetType() == GeomAbs_Plane) {
-         aTypeString = strdup(tr("GEOM_PLANE"));
+         aTypeString = CORBA::string_dup(tr("GEOM_PLANE"));
          return true;
        }
        else if(surf.GetType() == GeomAbs_Cylinder) {
-         aTypeString = strdup(tr("GEOM_SURFCYLINDER"));
+         aTypeString = CORBA::string_dup(tr("GEOM_SURFCYLINDER"));
          return true;
        }
        else if(surf.GetType() == GeomAbs_Sphere) {
-         aTypeString = strdup(tr("GEOM_SURFSPHERE"));
+         aTypeString = CORBA::string_dup(tr("GEOM_SURFSPHERE"));
          return true ;
        }
        else if(surf.GetType() == GeomAbs_Torus) {
-         aTypeString = strdup(tr("GEOM_SURFTORUS"));
+         aTypeString = CORBA::string_dup(tr("GEOM_SURFTORUS"));
          return true ;
        }
        else if(surf.GetType() == GeomAbs_Cone) {
-         aTypeString = strdup(tr("GEOM_SURFCONE"));
+         aTypeString = CORBA::string_dup(tr("GEOM_SURFCONE"));
          return true ;
        }
        else {
-         aTypeString = strdup(tr("GEOM_FACE"));
+         aTypeString = CORBA::string_dup(tr("GEOM_FACE"));
          return true;
        }
       }
     case TopAbs_WIRE:
       {
-       aTypeString = strdup(tr("GEOM_WIRE")); 
+       aTypeString = CORBA::string_dup(tr("GEOM_WIRE")); 
        return true;
       }
     case TopAbs_EDGE:
@@ -970,31 +978,31 @@ bool GEOMBase::GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString&
        BRepAdaptor_Curve curv(TopoDS::Edge(aShape));
        if(curv.GetType() == GeomAbs_Line) {
          if((Abs(curv.FirstParameter()) >= 1E6) || (Abs(curv.LastParameter()) >= 1E6))
-           aTypeString = strdup(tr("GEOM_LINE"));
+           aTypeString = CORBA::string_dup(tr("GEOM_LINE"));
          else
-           aTypeString = strdup(tr("GEOM_EDGE"));
+           aTypeString = CORBA::string_dup(tr("GEOM_EDGE"));
          return true;
        }
        else if(curv.GetType() == GeomAbs_Circle) {
          if(curv.IsClosed())
-           aTypeString = strdup(tr("GEOM_CIRCLE"));
+           aTypeString = CORBA::string_dup(tr("GEOM_CIRCLE"));
          else
-           aTypeString = strdup(tr("GEOM_ARC"));
+           aTypeString = CORBA::string_dup(tr("GEOM_ARC"));
        return true;
       } 
        else {
-         aTypeString = strdup(tr("GEOM_EDGE"));
+         aTypeString = CORBA::string_dup(tr("GEOM_EDGE"));
          return true;
        }
       }
     case TopAbs_VERTEX:
       {
-       aTypeString = strdup(tr("GEOM_VERTEX"));
+       aTypeString = CORBA::string_dup(tr("GEOM_VERTEX"));
        return true;
       }
     case TopAbs_SHAPE:
       {
-       aTypeString = strdup(tr("GEOM_SHAPE"));
+       aTypeString = CORBA::string_dup(tr("GEOM_SHAPE"));
        return true;
       }
     }
@@ -1209,7 +1217,7 @@ void GEOMBase::ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, GEOM::GEOM
        CORBA::String_var theValue = anIOR->Value();
        CORBA::Object_var theObj = _orb->string_to_object(theValue);
        if(theObj->_is_a("IDL:GEOM/GEOM_Shape:1.0")) {
-         listIOR[j] = strdup(theValue);
+         listIOR[j] = CORBA::string_dup(theValue);
          j++;
        }
       }
@@ -1217,7 +1225,7 @@ void GEOMBase::ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, GEOM::GEOM
     else if(IObject->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) {
       Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IObject);
       Standard_CString ior = GIObject->getIOR();
-      listIOR[j] = strdup(ior);
+      listIOR[j] = CORBA::string_dup(ior);
       j++;
     }
   }
@@ -1453,7 +1461,9 @@ bool GEOMBase::SelectionByNameInDialogs(QWidget* aWidget, const QString& objectU
   SALOMEDS::SObject_var theObj = listSO[0];
   /* Create a SALOME_InteractiveObject with a SALOME::SObject */
   Standard_CString anEntry = theObj->GetID();
-  Handle(SALOME_InteractiveObject) SI = new SALOME_InteractiveObject(anEntry, "GEOM", strdup(objectUserName));
+  char* aCopyobjectUserName = CORBA::string_dup(objectUserName);
+  Handle(SALOME_InteractiveObject) SI = new SALOME_InteractiveObject(anEntry, "GEOM", aCopyobjectUserName);
+  delete(aCopyobjectUserName);
 
   /* Add as a selected object       */
   /* Clear any previous selection : */
@@ -1477,6 +1487,23 @@ bool GEOMBase::DefineDlgPosition(QWidget* aDlg, int& x, int& y)
   return true;  
 }
 
+QString GEOMBase::GetDefaultName(const QString& theOperation)
+{
+  SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument();
+  int aNumber = 0;
+  QString aName;
+  SALOMEDS::SObject_var obj;
+
+  do 
+    {
+      aName = theOperation+"_"+QString::number(++aNumber);
+      obj = aStudy->FindObject(aName);
+    } 
+  while (!obj->_is_nil());
+
+  return aName;
+}
+
 
 //=====================================================================================
 // EXPORTED METHODS
index db3bb1daa8b22993527ad4a14ccf6df6d67a0c57..b6de381c5f7a1f41451be93982c0d7cdc252502a 100644 (file)
@@ -110,6 +110,9 @@ public :
   bool SelectionByNameInDialogs(QWidget* aWidget, const QString& userObjectName, SALOME_Selection *Sel);
   bool DefineDlgPosition(QWidget* aDlg, int& x, int& y);
 
+  /* This method generates default names for results of geometrical operations */
+  static QString GetDefaultName(const QString& theOperation);   
+
   GEOMContext* myGeomGUI;
   GEOM::GEOM_Gen_var myGeom;   /* Current Geom Component */
 
index 0ec58c1256c87c1b5fae02feda166a5edde82287..cfeb6ea45fa9bf5663dedc178439601df4060015 100644 (file)
@@ -39,6 +39,7 @@
 #include <qlayout.h>
 #include <qradiobutton.h>
 #include <qbuttongroup.h>
+#include <qpushbutton.h>
 
 class GEOMBase_Skeleton : public DlgRef_Skeleton_QTD
 { 
index b5ee8f58e84bbedff4fc74dbba4e00caf7c6ee89..8c1345ff4eb0ee0741b3f48658895db7107d9eb6 100644 (file)
@@ -175,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 210807916b7d1389f1eee823fcc56348f896de37..fcd33c80fe35c0c7099627b304e1e73915a52ab3 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..e83a9328868487b3df9bb43b4e90cfb790cd69db 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "QAD_Desktop.h"
 #include "GEOM_Client.hxx"
-#include "GEOM_Sketcher.h"
 #include <OSD_SharedLibrary.hxx>
 #include <qapplication.h>
 
@@ -49,12 +48,12 @@ 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();
 
@@ -67,7 +66,6 @@ public :
   int& GetNbGeom(){return myNbGeom;};
   GEOM_Client& GetShapeReader(){return myShapeReader;};
   Standard_CString& GetFatherior(){return myFatherior;};
-  Sketch& GetSketcher(){return mySketcher;};
 
   bool LoadLibrary(QString GUILibrary);
 
index 1b91d57f8789fb6889ce6a65ed301cbcca51ec07..5d07378e1ffdcda289fc0f50c5be8f3097116af5 100644 (file)
@@ -662,6 +662,10 @@ msgstr "Vertex"
 msgid "GEOM_WIRE"
 msgstr "Wire"
 
+#Wire(s)
+msgid "GEOM_WIRES"
+msgstr "Wire(s)"
+
 #Parameter
 msgid "GEOM_PARAMETER"
 msgstr "Parameter :"
@@ -937,6 +941,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"
@@ -1199,13 +1207,13 @@ msgid "GEOM_SKETCHER_EL"
 msgstr "Element Type"
 
 msgid "GEOM_BUT_CLOSE_SKETCH"
-msgstr "Close Sketcher"
+msgstr "Close Sketch"
 
 msgid "GEOM_BUT_END_SKETCH"
-msgstr "End Sketcher"
+msgstr "End Sketch"
 
 msgid "GEOM_SKETCHER_TITLE"
-msgstr "Spline Construction"
+msgstr "Sketch Construction"
 
 msgid "GEOM_SKETCHER_POINT"
 msgstr "Point"
@@ -1299,3 +1307,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..f0ba8041c31eb12e20be998c03504c7c9abf6e9b 100644 (file)
@@ -34,6 +34,10 @@ msgstr "&Ok"
 msgid "GEOM_BUT_YES"
 msgstr "&Oui"
 
+#Button No
+msgid "GEOM_BUT_NO"
+msgstr "&Non"
+
 #Button Help
 msgid "GEOM_BUT_HELP"
 msgstr "&Aide"
@@ -49,7 +53,7 @@ msgstr "&Exploser"
 
 #: GeometryGUI.cxx:563
 msgid "GEOM_INF_LOADED"
-msgstr "Le fichier %1 est chargé."
+msgstr "Le fichier %1 est chargé."
 
 #
 #==============================================================================
@@ -57,15 +61,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 +77,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 +131,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"
@@ -153,6 +157,10 @@ msgstr "Fichiers IGES ( *.iges *.igs )"
 msgid "GEOM_MEN_IMPORT_STEP"
 msgstr "Fichiers STEP ( *.step *.stp )"
 
+#: GeometryGUI.cxx:3763
+msgid "GEOM_MEN_LOAD_SCRIPT"
+msgstr "Fichiers PYTHON ( *.py )"
+
 #: GeometryGUI.cxx:2931
 msgid "GEOM_MEN_ISOS"
 msgstr "Choisir un nombre d'isos"
@@ -216,6 +224,10 @@ msgstr "Le rayon est nul"
 msgid "GEOM_WRN_WARNING"
 msgstr "Avertissement"
 
+#: GeometryGUI.cxx:3854
+msgid "GEOM_REALLY_DELETE"
+msgstr "Voulez-vous supprimer l'object(s) ?"
+
 #
 #==============================================================================
 #
@@ -250,7 +262,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"
@@ -265,7 +277,7 @@ msgid "GEOM_CENTER_POINT"
 msgstr "Point Centre"
 
 #Diagonal Points
-msgid "GEOM__DIAGONAL_POINTS"
+msgid "GEOM_DIAGONAL_POINTS"
 msgstr "Points Diagonaux"
 
 #Central Point
@@ -310,7 +322,7 @@ msgstr "poids"
 
 #Coordinates
 msgid "GEOM_COORDINATES"
-msgstr "Coordonnées"
+msgstr "Coordonnées"
 
 #Coor.
 msgid "GEOM_COOR"
@@ -362,11 +374,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 +386,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 +426,7 @@ msgstr "Partition"
 
 #Tolerance
 msgid "GEOM_TOLERANCE"
-msgstr "Tolérance"
+msgstr "Tolérance"
 
 #Orientation
 msgid "GEOM_ORIENTATION"
@@ -426,7 +438,7 @@ msgstr "Pipe"
 
 #Revolution
 msgid "GEOM_REVOLUTION"
-msgstr "Révolution"
+msgstr "Révolution"
 
 #Rotation
 msgid "GEOM_ROTATION"
@@ -434,7 +446,7 @@ msgstr "Rotation"
 
 #Archimede
 msgid "GEOM_ARCHIMEDE"
-msgstr "Archimède"
+msgstr "Archimède"
 
 #Common
 msgid "GEOM_COMMON"
@@ -544,6 +556,21 @@ msgstr "Boite"
 msgid "GEOM_CIRCLE"
 msgstr "Cercle"
 
+#Ellipse
+msgid "GEOM_ELLIPSE"
+msgstr "Ellipse"
+
+msgid "GEOM_ELLIPSE_TITLE"
+msgstr "Construction d'Ellipses"
+
+#Radius major
+msgid "GEOM_RADIUS_MAJOR"
+msgstr "Rayon max. :"
+
+#Radius minor
+msgid "GEOM_RADIUS_MINOR"
+msgstr "Rayon min. :"
+
 #Compound
 msgid "GEOM_COMPOUND"
 msgstr "Compound"
@@ -594,7 +621,7 @@ msgstr "Solide"
 
 #Sphere
 msgid "GEOM_SPHERE"
-msgstr "Sphère"
+msgstr "Sphère"
 
 #Conical Face
 msgid "GEOM_SURFCONE"
@@ -606,7 +633,7 @@ msgstr "Face Cylindrique"
 
 #Spherical Face
 msgid "GEOM_SURFSPHERE"
-msgstr "Face Sphèrique"
+msgstr "Face Sphèrique"
 
 #Toroidal Face
 msgid "GEOM_SURFTORUS"
@@ -635,10 +662,14 @@ msgstr "Vertex"
 #Wire
 msgid "GEOM_WIRE"
 msgstr "Wire"
+
+#Wire(s)
+msgid "GEOM_WIRES"
+msgstr "Wire(s)"
        
 #Parameter
 msgid "GEOM_PARAMETER"
-msgstr "Paramètre :"
+msgstr "Paramètre :"
 
 
 #
@@ -691,7 +722,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 +730,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 +770,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 +781,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 +813,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 +841,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 +943,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"
@@ -984,9 +1019,9 @@ msgstr "Coudre des Topologies"
 msgid "GEOM_SHELL_TITLE"
 msgstr "Construction d'une Shell"
 
-#: GeometryGUI_ShellDlg.cxx:74
-msgid "GEOM_SHELL_LIST"
-msgstr "List de Faces Connectees"
+#: GeometryGUI_SolidDlg.cxx:74
+msgid "GEOM_SOLID_TITLE"
+msgstr "Construction d'un Solid"
 
 #: GeometryGUI_SphereDlg.cxx:50
 msgid "GEOM_SPHERE_TITLE"
@@ -1083,11 +1118,11 @@ msgid "GEOM_WIRE_CONNECT"
 msgstr "Creation d'un Wire a partir de wires/edges connectes"
 
 #: GeometryGUI_WorkingPlaneDlg.cxx:50
-msgid "GEOM_WPALNE_TITLE"
+msgid "GEOM_WPLANE_TITLE"
 msgstr "plan de travail"
 
 #: GeometryGUI_WorkingPlaneDlg.cxx:107
-msgid "GEOM_WPALNE_FACE"
+msgid "GEOM_WPLANE_FACE"
 msgstr "Plan Ou Face plane"
 
 #: GeometryGUI_multiTranslationDlg.cxx:107
@@ -1115,7 +1150,7 @@ msgid "GEOM_MULTIROTATION_DOUBLE"
 msgstr "Multi Rotation Double"
 
 msgid "GEOM_PARAM_POINT"
-msgstr "Point paramétrique"
+msgstr "Point paramétrique"
 
 #
 #==============================================================================
@@ -1127,4 +1162,155 @@ msgstr "Filaire"
 
 #: GeometryGUI.cxx:4613
 msgid "GEOM_MEN_SHADING"
-msgstr "Ombré"
+msgstr "Ombré"
+
+msgid "GEOM_RECONSTRUCTION_LIMIT"
+msgstr "Limite de Reconstruction"
+
+msgid "GEOM_SUPPRESS_RESULT"
+msgstr "Supprimer le Resultat"
+
+msgid "GEOM_SUPPRESS_RESULT_INSIDE"
+msgstr "Intérieur"
+
+msgid "GEOM_SUPPRESS_RESULT_OUTSIDE"
+msgstr "Extérieur"
+
+msgid "GEOM_RECONSTRUCTION_LIMIT_SHAPE"
+msgstr "Shape"
+msgid "GEOM_RECONSTRUCTION_LIMIT_SOLID"
+msgstr "Solid"
+msgid "GEOM_RECONSTRUCTION_LIMIT_SHELL"
+msgstr "Shell"
+msgid "GEOM_RECONSTRUCTION_LIMIT_FACE"
+msgstr "Face"
+msgid "GEOM_RECONSTRUCTION_LIMIT_WIRE"
+msgstr "Wire"
+msgid "GEOM_RECONSTRUCTION_LIMIT_EDGE"
+msgstr "Edge"
+msgid "GEOM_RECONSTRUCTION_LIMIT_VERTEX"
+msgstr "Vertex"
+
+msgid "GEOM_SPLINE_TITLE"
+msgstr "Construction de Splines"
+msgid "GEOM_SPLINE"
+msgstr "Spline"
+msgid "GEOM_BEZIER"
+msgstr "Bezier"
+msgid "GEOM_INTERPOL"
+msgstr "Interpolation"
+
+#
+#==============================================================================
+#
+
+msgid "GEOM_SKETCHER_EL"
+msgstr "Type d'Element"
+
+msgid "GEOM_BUT_CLOSE_SKETCH"
+msgstr "Fermer Sketch"
+
+msgid "GEOM_BUT_END_SKETCH"
+msgstr "Terminer Sketch"
+
+msgid "GEOM_SKETCHER_TITLE"
+msgstr "Construction de Sketch"
+
+msgid "GEOM_SKETCHER_POINT"
+msgstr "Point"
+
+msgid "GEOM_SKETCHER_SEGMENT"
+msgstr "Sègment"
+
+msgid "GEOM_SKETCHER_ARC"
+msgstr "Arc"
+
+msgid "GEOM_SKETCHER_DIR"
+msgstr "Direction"
+
+msgid "GEOM_SKETCHER_POINT2"
+msgstr "Point :"
+
+msgid "GEOM_SKETCHER_DEST"
+msgstr "Destination"
+
+msgid "GEOM_SKETCHER_ABS"
+msgstr "Absolu"
+
+msgid "GEOM_SKETCHER_REL"
+msgstr "Relative"
+
+msgid "GEOM_SKETCHER_SEL"
+msgstr "Sélection"
+
+msgid "GEOM_SKETCHER_ANGLE"
+msgstr "Angle"
+
+msgid "GEOM_SKETCHER_PER"
+msgstr "Perpendiculaire"
+
+msgid "GEOM_SKETCHER_TAN"
+msgstr "Tangent"
+
+msgid "GEOM_SKETCHER_VXVY"
+msgstr "VX-VY"
+
+msgid "GEOM_SKETCHER_LENGTH"
+msgstr "Longueur"
+
+msgid "GEOM_SKETCHER_X"
+msgstr "X"
+
+msgid "GEOM_SKETCHER_Y"
+msgstr "Y"
+
+msgid "GEOM_SKETCHER_X2"
+msgstr "X :"
+
+msgid "GEOM_SKETCHER_Y2"
+msgstr "Y :"
+
+msgid "GEOM_SKETCHER_X3"
+msgstr "Abs. X :"
+
+msgid "GEOM_SKETCHER_Y3"
+msgstr "Abs. Y :"
+
+msgid "GEOM_SKETCHER_DX2"
+msgstr "DX :"
+
+msgid "GEOM_SKETCHER_DY2"
+msgstr "DY :"
+
+msgid "GEOM_SKETCHER_VX2"
+msgstr "VX :"
+
+msgid "GEOM_SKETCHER_VY2"
+msgstr "VY :"
+
+msgid "GEOM_SKETCHER_LENGTH2"
+msgstr "Longueur :"
+
+msgid "GEOM_SKETCHER_ANGLE2"
+msgstr "Angle :"
+
+msgid "GEOM_SKETCHER_RADIUS2"
+msgstr "Radius :"
+
+msgid "GEOM_SKETCHER_UNDO"
+msgstr "Undo"
+
+msgid "GEOM_SKETCHER_APPLY"
+msgstr "Appliquer"
+
+msgid "GEOM_SKETCHER_VALUES"
+msgstr "Valeurs"
+
+msgid "GEOM_SKETCHER_TYPE"
+msgstr "Type"
+
+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 ffb2730154c1d2a036bb942bb4f7ec057885093d..991d7480e692cc0b92f26c8149e74ed340e0d555 100644 (file)
@@ -60,6 +60,6 @@ LIB_SERVER_IDL =
 CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
 CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
 
-LDFLAGS += -lOCCViewer -lVTKViewer -lSalomeObject -lSalomeGUI -lGEOMClient -lGEOMObject -lGEOMSketcher -L${KERNEL_ROOT_DIR}/lib/salome
+LDFLAGS += -lOCCViewer -lVTKViewer -lSalomeObject -lSalomeGUI -lGEOMClient -lGEOMObject -L${KERNEL_ROOT_DIR}/lib/salome
 
 @CONCLUDE@
index 17f7e5764e4f3f0181b77776cbd0f34973c4c7e0..d2fa1c38e4fd122c633c64bed56965e02f7430e4 100644 (file)
@@ -264,9 +264,10 @@ Standard_Boolean GEOMDS_Commands::ClearAllIOR(const TDF_Label& aLabel)
     TDF_Label L = it.Value() ;
     if( L.FindAttribute(TDataStd_Name::GetID(), anAttName) ) {
       notTested = L.ForgetAttribute(TDataStd_Name::GetID()) ;
+      if(notTested)
+       MESSAGE("in GEOMDS_Commands::ClearAllIOR : IOR CLEARED" )
+    ClearAllIOR(L);
     }
-    if(notTested)
-      MESSAGE("in GEOMDS_Commands::ClearAllIOR : IOR CLEARED" )
   }
   return true ;
 }
index 017dcd32977b2aa0e363f6494349062a04175b8e..8d4cccf10133d892d8c69a5ac517a528def57809 100644 (file)
@@ -35,4 +35,4 @@
 #endif
 #ifndef _GEOMDS_Commands_HeaderFile
 #include "GEOMDS_Commands.hxx"
-#endif
\ No newline at end of file
+#endif
index 357507e17aef52a342c17ea19f8c2e5a60beea0d..fd961ec3d91328879476452a65a49ab74078edf0 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;
 
@@ -56,10 +58,9 @@ typedef bool CP(QAD_Desktop*, QPopupMenu*, const QString&,
 // function : GeometryGUI()
 // purpose  : Constructor
 //=======================================================================
-GeometryGUI::GeometryGUI() :
-  QObject()
-{
-}
+GeometryGUI::GeometryGUI( const QString& theName, QObject* theParent ) :
+  SALOMEGUI( theName, theParent )
+{}
 
 
 //=======================================================================
@@ -102,7 +103,6 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
     return false;
 
   Mb->setItemEnabled(404, ViewOCC);//SKETCHER
-  Mb->setItemEnabled(406, ViewOCC);//SKETCHER
 
   Mb->setItemEnabled(603, ViewOCC);//SuppressFace
   Mb->setItemEnabled(604, ViewOCC);//SuppressHole
@@ -110,149 +110,122 @@ bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
   Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings
   Mb->setItemEnabled(414, ViewOCC);// Isos Settings
 
-  if(theCommandID == 4041 || // SKETCHER - POPUP VIEWER - SEGMENT
-     theCommandID == 4042 || // SKETCHER - POPUP VIEWER - ARC
-     theCommandID == 4043 || // SKETCHER - POPUP VIEWER - SET ANGLE
-     theCommandID == 4044 || // SKETCHER - POPUP VIEWER - SET X
-     theCommandID == 4045 || // SKETCHER - POPUP VIEWER - SET Y
-     theCommandID == 4046 || // SKETCHER - POPUP VIEWER - DELETE
-     theCommandID == 4047 || // SKETCHER - POPUP VIEWER - END
-     theCommandID == 4048 || // SKETCHER - POPUP VIEWER - CLOSE
-     theCommandID == 4051 || // SKETCHER - MENU - SET PLANE
-     theCommandID == 4052 || // SKETCHER - MENU - TANGENT
-     theCommandID == 4053 || // SKETCHER - MENU - PERPENDICULAR
-     theCommandID == 4061 || // SKETCHER - MENU - LENGTH
-     theCommandID == 4062 || // SKETCHER - MENU - ANGLE
-     theCommandID == 4063 || // SKETCHER - MENU - RADIUS
-     theCommandID == 4064 || // SKETCHER - MENU - X
-     theCommandID == 4065) {  // SKETCHER - MENU - Y
+  if(theCommandID == 111 ||  // MENU FILE - IMPORT BREP
+     theCommandID == 112 ||  // MENU FILE - IMPORT IGES
+     theCommandID == 113 ||  // MENU FILE - IMPORT STEP
+     theCommandID == 121 ||  // MENU FILE - EXPORT BREP
+     theCommandID == 122 ||  // MENU FILE - EXPORT IGES
+     theCommandID == 123 ||  // MENU FILE - EXPORT STEP
+     theCommandID == 31 ||   // MENU EDIT - COPY
+     theCommandID == 33 ||   // MENU EDIT - DELETE
+     theCommandID == 411 ||  // MENU SETTINGS - ADD IN STUDY
+     theCommandID == 412 ||  // MENU SETTINGS - SHADING COLOR
+     theCommandID == 413 ||  // MENU SETTINGS - ISOS
+     theCommandID == 414 ||  // MENU SETTINGS - STEP VALUE FOR SPIN BOXES
+     theCommandID == 5103 || // MENU TOOLS - CHECK GEOMETRY
+     theCommandID == 5104 || // MENU TOOLS - LOAD SCRIPT
+     theCommandID == 8032 || // POPUP VIEWER - COLOR
+     theCommandID == 8033 || // POPUP VIEWER - TRANSPARENCY
+     theCommandID == 8034 || // POPUP VIEWER - ISOS
+     theCommandID == 804 ||  // POPUP VIEWER - ADD IN STUDY
+     theCommandID == 901 ||  // OBJECT BROWSER - RENAME
+     theCommandID == 9024) { // OBJECT BROWSER - OPEN
+    if(!GeomGUI->LoadLibrary("libGEOMToolsGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 211 ||  // MENU VIEW - WIREFRAME/SHADING
+         theCommandID == 212 ||  // MENU VIEW - DISPLAY ALL
+         theCommandID == 213 ||  // MENU VIEW - DISPLAY ONLY
+         theCommandID == 214 ||  // MENU VIEW - ERASE ALL
+         theCommandID == 215 ||  // MENU VIEW - ERASE ONLY
+         theCommandID == 8031) { // POPUP VIEWER - WIREFRAME/SHADING
+    if(!GeomGUI->LoadLibrary("libDisplayGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 4011 || // MENU BASIC - POINT
+         theCommandID == 4012 || // MENU BASIC - LINE
+         theCommandID == 4013 || // MENU BASIC - CIRCLE
+         theCommandID == 4014 || // MENU BASIC - ELLIPSE
+         theCommandID == 4015 || // MENU BASIC - ARC
+         theCommandID == 4016 || // MENU BASIC - VECTOR
+         theCommandID == 4017 || // MENU BASIC - PLANE
+         theCommandID == 4018) { // MENU BASIC - WPLANE
+    if(!GeomGUI->LoadLibrary("libBasicGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 4021 || // MENU PRIMITIVE - BOX
+         theCommandID == 4022 || // MENU PRIMITIVE - CYLINDER
+         theCommandID == 4023 || // MENU PRIMITIVE - SPHERE
+         theCommandID == 4024 || // MENU PRIMITIVE - TORUS
+         theCommandID == 4025) { // MENU PRIMITIVE - CONE
+    if(!GeomGUI->LoadLibrary("libPrimitiveGUI.so"))
+      return false;
+  }
+  else if(theCommandID == 4031 || // MENU GENERATION - PRISM
+         theCommandID == 4032 || // MENU GENERATION - REVOLUTION
+         theCommandID == 4033 || // MENU GENERATION - FILLING
+         theCommandID == 4034) { // MENU GENERATION - PIPE
+    if(!GeomGUI->LoadLibrary("libGenerationGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 404 ||  // MENU ENTITY - SKETCHER
+         theCommandID == 407) {  // MENU ENTITY - EXPLODE
     if(!GeomGUI->LoadLibrary("libEntityGUI.so")) 
       return false;
   }
-  else {
-    if(GeomGUI->myState == 2) {
-      Mb->setItemEnabled(405, false);//SKETCHER
-      GeomGUI->GetSketcher().Clear();
-      GeomGUI->myState = -1;
-    }
-
-    if(theCommandID == 111 ||  // MENU FILE - IMPORT BREP
-       theCommandID == 112 ||  // MENU FILE - IMPORT IGES
-       theCommandID == 113 ||  // MENU FILE - IMPORT STEP
-       theCommandID == 121 ||  // MENU FILE - EXPORT BREP
-       theCommandID == 122 ||  // MENU FILE - EXPORT IGES
-       theCommandID == 123 ||  // MENU FILE - EXPORT STEP
-       theCommandID == 31 ||   // MENU EDIT - COPY
-       theCommandID == 33 ||   // MENU EDIT - DELETE
-       theCommandID == 411 ||  // MENU SETTINGS - ADD IN STUDY
-       theCommandID == 412 ||  // MENU SETTINGS - SHADING COLOR
-       theCommandID == 413 ||  // MENU SETTINGS - ISOS
-       theCommandID == 414 ||  // MENU SETTINGS - STEP VALUE FOR SPIN BOXES
-       theCommandID == 5103 || // MENU TOOLS - CHECK GEOMETRY
-       theCommandID == 5104 || // MENU TOOLS - LOAD SCRIPT
-       theCommandID == 8032 || // POPUP VIEWER - COLOR
-       theCommandID == 8033 || // POPUP VIEWER - TRANSPARENCY
-       theCommandID == 8034 || // POPUP VIEWER - ISOS
-       theCommandID == 804 ||  // POPUP VIEWER - ADD IN STUDY
-       theCommandID == 901 ||  // OBJECT BROWSER - RENAME
-       theCommandID == 9024) { // OBJECT BROWSER - OPEN
-      if(!GeomGUI->LoadLibrary("libGEOMToolsGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 211 ||  // MENU VIEW - WIREFRAME/SHADING
-           theCommandID == 212 ||  // MENU VIEW - DISPLAY ALL
-           theCommandID == 213 ||  // MENU VIEW - DISPLAY ONLY
-           theCommandID == 214 ||  // MENU VIEW - ERASE ALL
-           theCommandID == 215 ||  // MENU VIEW - ERASE ONLY
-           theCommandID == 8031) { // POPUP VIEWER - WIREFRAME/SHADING
-      if(!GeomGUI->LoadLibrary("libDisplayGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 4011 || // MENU BASIC - POINT
-           theCommandID == 4012 || // MENU BASIC - LINE
-           theCommandID == 4013 || // MENU BASIC - CIRCLE
-           theCommandID == 4014 || // MENU BASIC - ELLIPSE
-           theCommandID == 4015 || // MENU BASIC - ARC
-           theCommandID == 4016 || // MENU BASIC - VECTOR
-           theCommandID == 4017 || // MENU BASIC - PLANE
-           theCommandID == 4018) { // MENU BASIC - WPLANE
-      if(!GeomGUI->LoadLibrary("libBasicGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 4021 || // MENU PRIMITIVE - BOX
-           theCommandID == 4022 || // MENU PRIMITIVE - CYLINDER
-           theCommandID == 4023 || // MENU PRIMITIVE - SPHERE
-           theCommandID == 4024 || // MENU PRIMITIVE - TORUS
-           theCommandID == 4025) { // MENU PRIMITIVE - CONE
-      if(!GeomGUI->LoadLibrary("libPrimitiveGUI.so"))
-       return false;
-    }
-    else if(theCommandID == 4031 || // MENU GENERATION - PRISM
-           theCommandID == 4032 || // MENU GENERATION - REVOLUTION
-           theCommandID == 4033 || // MENU GENERATION - FILLING
-           theCommandID == 4034) { // MENU GENERATION - PIPE
-      if(!GeomGUI->LoadLibrary("libGenerationGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 404 ||  // SKETCHER
-           theCommandID == 407) {  // MENU ENTITY - EXPLODE
-      if(!GeomGUI->LoadLibrary("libEntityGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 4081 || // MENU BUILD - EDGE
-           theCommandID == 4082 || // MENU BUILD - WIRE
-           theCommandID == 4083 || // MENU BUILD - FACE
-           theCommandID == 4084 || // MENU BUILD - SHELL
-           theCommandID == 4085 || // MENU BUILD - SOLID
-           theCommandID == 4086) { // MENU BUILD - COMPUND
-      if(!GeomGUI->LoadLibrary("libBuildGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 5011 || // MENU BOOLEAN - FUSE
-           theCommandID == 5012 || // MENU BOOLEAN - COMMON
-           theCommandID == 5013 || // MENU BOOLEAN - CUT
-           theCommandID == 5014) { // MENU BOOLEAN - SECTION
-      if(!GeomGUI->LoadLibrary("libBooleanGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 5021 || // MENU TRANSFORMATION - TRANSLATION
-           theCommandID == 5022 || // MENU TRANSFORMATION - ROTATION
-           theCommandID == 5023 || // MENU TRANSFORMATION - MIRROR
-           theCommandID == 5024 || // MENU TRANSFORMATION - SCALE
-           theCommandID == 5025 || // MENU TRANSFORMATION - MULTI-TRANSLATION
-           theCommandID == 5026) { // MENU TRANSFORMATION - MULTI-ROTATION
-      if(!GeomGUI->LoadLibrary("libTransformationGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 503 ||  // MENU OPERATION - PARTITION
-           theCommandID == 504 ||  // MENU OPERATION - ARCHIMEDE
-           theCommandID == 505 ||  // MENU OPERATION - FILLET
-           theCommandID == 506) {  // MENU OPERATION - CHAMFER
-      if(!GeomGUI->LoadLibrary("libOperationGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 601 ||  // MENU REPAIR - SEWING
-           theCommandID == 602 ||  // MENU REPAIR - ORIENTATION
-           theCommandID == 603 ||  // MENU REPAIR - SUPPRESS FACES
-           theCommandID == 604) {  // MENU REPAIR - SUPPRESS HOLE
-      if(!GeomGUI->LoadLibrary("libRepairGUI.so")) 
-       return false;
-    }
-    else if(theCommandID == 701 ||  // MENU MEASURE - PROPERTIES
-           theCommandID == 702 ||  // MENU MEASURE - CDG
-           theCommandID == 703 ||  // MENU MEASURE - INERTIA
-           theCommandID == 7041 || // MENU MEASURE - BOUNDING BOX
-           theCommandID == 7042 || // MENU MEASURE - MIN DISTANCE
-           theCommandID == 705 ||  // MENU MEASURE - TOLERANCE
-           theCommandID == 706 ||  // MENU MEASURE - WHATIS
-           theCommandID == 707) {  // MENU MEASURE - CHECK
-      if(!GeomGUI->LoadLibrary("libMeasureGUI.so")) 
-       return false;
-    }
-    else
+  else if(theCommandID == 4081 || // MENU BUILD - EDGE
+         theCommandID == 4082 || // MENU BUILD - WIRE
+         theCommandID == 4083 || // MENU BUILD - FACE
+         theCommandID == 4084 || // MENU BUILD - SHELL
+         theCommandID == 4085 || // MENU BUILD - SOLID
+         theCommandID == 4086) { // MENU BUILD - COMPUND
+    if(!GeomGUI->LoadLibrary("libBuildGUI.so")) 
       return false;
   }
-  
+  else if(theCommandID == 5011 || // MENU BOOLEAN - FUSE
+         theCommandID == 5012 || // MENU BOOLEAN - COMMON
+         theCommandID == 5013 || // MENU BOOLEAN - CUT
+         theCommandID == 5014) { // MENU BOOLEAN - SECTION
+    if(!GeomGUI->LoadLibrary("libBooleanGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 5021 || // MENU TRANSFORMATION - TRANSLATION
+         theCommandID == 5022 || // MENU TRANSFORMATION - ROTATION
+         theCommandID == 5023 || // MENU TRANSFORMATION - MIRROR
+         theCommandID == 5024 || // MENU TRANSFORMATION - SCALE
+         theCommandID == 5025 || // MENU TRANSFORMATION - MULTI-TRANSLATION
+         theCommandID == 5026) { // MENU TRANSFORMATION - MULTI-ROTATION
+    if(!GeomGUI->LoadLibrary("libTransformationGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 503 ||  // MENU OPERATION - PARTITION
+         theCommandID == 504 ||  // MENU OPERATION - ARCHIMEDE
+         theCommandID == 505 ||  // MENU OPERATION - FILLET
+         theCommandID == 506) {  // MENU OPERATION - CHAMFER
+    if(!GeomGUI->LoadLibrary("libOperationGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 601 ||  // MENU REPAIR - SEWING
+         theCommandID == 602 ||  // MENU REPAIR - ORIENTATION
+         theCommandID == 603 ||  // MENU REPAIR - SUPPRESS FACES
+         theCommandID == 604) {  // MENU REPAIR - SUPPRESS HOLE
+    if(!GeomGUI->LoadLibrary("libRepairGUI.so")) 
+      return false;
+  }
+  else if(theCommandID == 701 ||  // MENU MEASURE - PROPERTIES
+         theCommandID == 702 ||  // MENU MEASURE - CDG
+         theCommandID == 703 ||  // MENU MEASURE - INERTIA
+         theCommandID == 7041 || // MENU MEASURE - BOUNDING BOX
+         theCommandID == 7042 || // MENU MEASURE - MIN DISTANCE
+         theCommandID == 705 ||  // MENU MEASURE - TOLERANCE
+         theCommandID == 706 ||  // MENU MEASURE - WHATIS
+         theCommandID == 707) {  // MENU MEASURE - CHECK
+    if(!GeomGUI->LoadLibrary("libMeasureGUI.so")) 
+      return false;
+  }
+  else
+    return false;
+
   //Load Function OnGUIEvent
   OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("OnGUIEvent");
   OGE (*f1) = NULL;
@@ -292,12 +265,7 @@ bool GeometryGUI::OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFra
 
   if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
     return false;
-
-  if(GeomGUI->myState == 2) {
-    OCCViewer_ViewPort* vp = ((OCCViewer_ViewFrame*)studyFrame->getRightFrame()->getViewFrame())->getViewPort();
-    GeomGUI->GetSketcher().MakeCurrentEdge(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView());
-  }
-
+  else
   return true;
 }
 
@@ -313,14 +281,7 @@ bool GeometryGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFr
   if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC)
     return false;
 
-  if(GeomGUI->myState == 2) {
-    GeomGUI->GetSketcher().ValidateEdge();
-    if(GeomGUI->GetSketcher().GetmyEdgesNumber() == 1) {
-      QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-      Mb->setItemEnabled(405, true);  // SKETCH CONTRAINTS
-    }
-  }
-  else if(GeomGUI->myState == 0) {
+  if(GeomGUI->myState == 0) {
     if(!GeomGUI->LoadLibrary("libBasicGUI.so")) 
       return false;
 
@@ -336,6 +297,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()
@@ -400,8 +385,6 @@ bool GeometryGUI::SetSettings(QAD_Desktop* parent)
   }
 
   Mb->setItemEnabled(404, ViewOCC);//SKETCHER
-  Mb->setItemEnabled(405, false);//SKETCHER
-  Mb->setItemEnabled(406, ViewOCC);//SKETCHER
 
   Mb->setItemEnabled(603, ViewOCC);//SuppressFace
   Mb->setItemEnabled(604, ViewOCC);//SuppressHole
@@ -409,6 +392,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;
 }
 
@@ -426,11 +412,8 @@ void GeometryGUI::DefinePopup(QString & theContext, QString & theParent, QString
   theObject = "";
   theContext = "";
 
-
   if((theParent.compare("Viewer") == 0)) {
-    if(GeomGUI->myState == 2) 
-      theContext = "Sketch";
-    else if(Sel->IObjectCount() == 0)
+    if(Sel->IObjectCount() == 0)
       theContext = "NothingSelected";
   }
 
@@ -461,24 +444,6 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr
 {
   GeometryGUI::GetOrCreateGeometryGUI(parent);
 
-  if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
-    if(theParent.compare("Viewer") == 0) {
-      if(theContext.compare("Sketch") == 0) {
-       SketchStatus myCS = GeomGUI->GetSketcher().GetCurrentStatus();
-       popup->setCheckable(TRUE);
-       if(myCS == SEGMENT) {
-         popup->setItemChecked(4041, true);  //Sketch Segment Menu
-         popup->setItemChecked(4042, false); //Sketch Arc Menu
-       }
-       else if(myCS == ARC_CHORD) {
-         popup->setItemChecked(4041, false); //Sketch Segment Menu
-         popup->setItemChecked(4042, true);  //Sketch Arc Menu
-       }   
-       return true;
-      }
-    }
-  }
-
   if(!GeomGUI->LoadLibrary("libGEOMBase.so")) 
     return false;
 
@@ -501,24 +466,17 @@ bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QStr
 // function : activeStudyChanged()
 // purpose  : static
 //=================================================================================
-void GeometryGUI::activeStudyChanged(QAD_Desktop* parent)
+bool GeometryGUI::ActiveStudyChanged(QAD_Desktop* parent)
 {
   GeometryGUI::GetOrCreateGeometryGUI(parent); 
 
   if(GeomGUI != 0) {
     QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar();
-    if(GeomGUI->myState == 2) {
-      Mb->setItemEnabled(405, false);//SKETCHER
-      GeomGUI->GetSketcher().Clear();
-      GeomGUI->myState = -1;
-    }
-
     bool ViewOCC = false;
     if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) 
       ViewOCC = true;
 
     Mb->setItemEnabled(404, ViewOCC);//SKETCHER
-    Mb->setItemEnabled(406, ViewOCC);//SKETCHER
 
     Mb->setItemEnabled(603, ViewOCC);//SuppressFace
     Mb->setItemEnabled(604, ViewOCC);//SuppressHole
@@ -529,7 +487,11 @@ void GeometryGUI::activeStudyChanged(QAD_Desktop* parent)
     GeomGUI->EmitSignalCloseAllDialogs();
     GeomGUI = 0;
   }
-  return;
+
+  // PAL5356: update VTK selection
+  ::UpdateVtkSelection(parent);
+
+  return true;
 }
 
 
@@ -555,43 +517,23 @@ void GeometryGUI::BuildPresentation(const Handle(SALOME_InteractiveObject)& theI
 }
 
 
-//=================================================================================
-// EXPORTED METHODS
-//=================================================================================
-extern "C"
+void GeometryGUI::SupportedViewType(int* buffer, int bufferSize)
 {
-  bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
-  {return GeometryGUI::OnGUIEvent(theCommandID, parent);}
-
-  bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
-  {return GeometryGUI::OnKeyPress(pe, parent, studyFrame);}
-
-  bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
-  {return GeometryGUI::OnMousePress(pe, parent, studyFrame);}
-
-  bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame)
-  {return GeometryGUI::OnMouseMove(pe, parent, studyFrame);}
-
-  bool SetSettings(QAD_Desktop* parent)
-  {return GeometryGUI::SetSettings(parent);}
-
-  bool customPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext,
-                    const QString & theParent, const QString & theObject)
-  {return GeometryGUI::CustomPopup(parent, popup, theContext, theParent, theObject);}
-
-  void definePopup(QString & theContext, QString & parent, QString & theObject)
-  {GeometryGUI::DefinePopup(theContext, parent, theObject);}
-  
-  bool activeStudyChanged(QAD_Desktop* parent)
-  {GeometryGUI::activeStudyChanged(parent);}
+  if(!buffer || !bufferSize) return;
+  buffer[0] = (int)VIEW_OCC;
+  if (--bufferSize) buffer[1] = (int)VIEW_VTK;
+}
 
-  void buildPresentation(const Handle(SALOME_InteractiveObject)& theIO)
-  {GeometryGUI::BuildPresentation(theIO);}
+void GeometryGUI::Deactivate()
+{
+  if ( GeomGUI )
+    GeomGUI->EmitSignalCloseAllDialogs();
+}
 
-  void supportedViewType(int* buffer, int bufferSize)
-  {
-    if(!buffer || !bufferSize) return;
-    buffer[0] = (int)VIEW_OCC;
-    if (--bufferSize) buffer[1] = (int)VIEW_VTK;
+static GeometryGUI aGUI("");
+extern "C"
+{
+  Standard_EXPORT SALOMEGUI* GetComponentGUI() {
+    return &aGUI;
   }
 }
index dd133add00a47904bb455d68e856c270db56d1f7..06649f6226f723d8552b4a2b3597109eda8726d1 100644 (file)
 #ifndef GEOMETRYGUI_H
 #define GEOMETRYGUI_H
 
+#include "SALOMEGUI.h"
 #include "GEOMContext.h"
 
 //=================================================================================
 // class    : GeometryGUI
 // purpose  :
 //=================================================================================
-class GeometryGUI : public QObject
+class GeometryGUI : public SALOMEGUI
 {
   Q_OBJECT /* for QT compatibility */
 
 public :
-    GeometryGUI();
-    ~GeometryGUI();
-
-    static GEOMContext* GetOrCreateGeometryGUI(QAD_Desktop* desktop);
-
-    /* Managed by IAPP */
-    Standard_EXPORT static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
-    Standard_EXPORT static bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
-    Standard_EXPORT static bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
-    Standard_EXPORT static bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
-    Standard_EXPORT static bool SetSettings(QAD_Desktop* parent);
-    Standard_EXPORT static void activeStudyChanged(QAD_Desktop* parent);
-    Standard_EXPORT static void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
-    Standard_EXPORT static void DefinePopup(QString & theContext, QString & theParent, QString & theObject);
-    Standard_EXPORT static bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext,
-                                           const QString& theParent, const QString& theObject);
-
+  GeometryGUI( const QString& name = "", QObject* parent = 0 );
+  ~GeometryGUI();
+  
+  static GEOMContext* GetOrCreateGeometryGUI(QAD_Desktop* desktop);
+  
+  /* Managed by IAPP */
+  virtual bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
+  virtual bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
+  virtual bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
+  virtual bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame);
+  virtual bool SetSettings(QAD_Desktop* parent);
+  virtual bool ActiveStudyChanged(QAD_Desktop* parent);
+  virtual void BuildPresentation(const Handle(SALOME_InteractiveObject)&);
+  virtual void DefinePopup(QString & theContext, QString & theParent, QString & theObject);
+  virtual bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext,
+                          const QString& theParent, const QString& theObject);
+  virtual void SupportedViewType (int* buffer, int bufferSize);
+  virtual void Deactivate        ();
 };
 
 #endif
index 55727f9099936b9f827d6860f72fb4a8ff02be84..bb7159bbbfbedc62252ab27305be82da77d38733 100644 (file)
@@ -40,6 +40,8 @@ using namespace std;
 #include "OCCViewer_Viewer3d.h"
 #include <TopExp_Explorer.hxx>
 #include <TopTools_MapOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepAdaptor_Curve.hxx>
 #include <GeomAbs_CurveType.hxx>
@@ -47,6 +49,7 @@ using namespace std;
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Face.hxx>
+#include <TopoDS_Iterator.hxx>
 
 #include "VTKViewer_RenderWindowInteractor.h"
 #include "VTKViewer_ViewFrame.h"
@@ -164,17 +167,36 @@ int  GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
   GEOM::GEOM_Shape_var aSubShape = Geom->GetIORFromString(SubIOR);
   TopoDS_Shape subshape    = ShapeReader.GetShape(Geom, aSubShape);
 
-  TopExp_Explorer Exp ( shape, subshape.ShapeType() );
   int index = 1;
-  TopTools_MapOfShape M;
-  while ( Exp.More() ) {
-    if ( M.Add(Exp.Current()) ) {
-      if ( Exp.Current().IsSame(subshape) )
-       return index;
-      index++;
-    }
-    Exp.Next();
-  }
+  if(subshape.ShapeType() == TopAbs_COMPOUND) { 
+    TopoDS_Iterator it; 
+    TopTools_ListOfShape CL; 
+    CL.Append(shape); 
+    TopTools_ListIteratorOfListOfShape itC; 
+    for(itC.Initialize(CL); itC.More(); itC.Next()) {
+      for(it.Initialize(itC.Value()); it.More(); it.Next()) { 
+       if (it.Value().ShapeType() == TopAbs_COMPOUND) {
+         if (it.Value().IsSame(subshape))
+           return index; 
+         else 
+           index++; 
+         CL.Append(it.Value()); 
+       }
+      } 
+    } 
+  } 
+  else { 
+    TopExp_Explorer Exp(shape, subshape.ShapeType()); 
+    TopTools_MapOfShape M; 
+    while(Exp.More()) { 
+      if(M.Add(Exp.Current())) {
+       if(Exp.Current().IsSame(subshape)) 
+         return index; 
+       index++; 
+      } 
+      Exp.Next(); 
+    } 
+  } 
   return -1;
 }
 
@@ -242,6 +264,7 @@ const char* GEOM_Swig::getShapeTypeString(const char* IOR)
   case TopAbs_SHAPE:
     { return "Shape" ;}
   }
+  return 0;
 }
 
 
index a977323fc3e5b4b3445bec24033f3d119d2154f4..e4aab67065924a01d7c15ce3d335ff6e9acd06da 100644 (file)
 //
 //
 //
-//  File   : GEOMBase_Tools.cxx
+//  File   : GEOMToolsGUI.cxx
 //  Author : Damien COQUERET
 //  Module : GEOM
 //  $Header: 
 
-using namespace std;
 #include "GEOMToolsGUI.h"
 
 #include "QAD_Config.h"
@@ -34,6 +33,7 @@ using namespace std;
 #include "QAD_Tools.h"
 #include "QAD_MessageBox.h"
 #include "QAD_RightFrame.h"
+#include "QAD_PyEditor.h"
 
 #include "OCCViewer_Viewer3d.h"
 #include "VTKViewer_ViewFrame.h"
@@ -60,6 +60,10 @@ using namespace std;
 #include "GEOMToolsGUI_NbIsosDlg.h"        // Method ISOS adjustement
 #include "GEOMToolsGUI_TransparencyDlg.h"  // Method TRANSPARENCY adjustement
 
+#include "utilities.h"
+
+using namespace std;
+
 //=======================================================================
 // function : GEOMToolsGUI()
 // purpose  : Constructor
@@ -150,7 +154,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 +167,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());
@@ -213,7 +217,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
        else
          IsoV = "1";
        
-       GEOMBase_NbIsosDlg* NbIsosDlg = new GEOMBase_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);       
+       GEOMToolsGUI_NbIsosDlg* NbIsosDlg = new GEOMToolsGUI_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);       
        int UIso = IsoU.toInt();
        int VIso = IsoV.toInt();
        
@@ -372,7 +376,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);
@@ -401,7 +405,7 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
          OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
          ic = v3d->getAISContext();
        }
-       GEOMBase_TransparencyDlg *aDlg = new GEOMBase_TransparencyDlg(parent, "", Sel, ic);
+       GEOMToolsGUI_TransparencyDlg *aDlg = new GEOMToolsGUI_TransparencyDlg(parent, "", Sel, ic);
        break;
       }
     case 8034: // ISOS - POPUP VIEWER
@@ -427,8 +431,8 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
          else
            IsoV = "1";
            
-         GEOMBase_NbIsosDlg * NbIsosDlg =
-           new GEOMBase_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);
+         GEOMToolsGUI_NbIsosDlg * NbIsosDlg =
+           new GEOMToolsGUI_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE);
     
          NbIsosDlg->SpinBoxU->setValue(IsoU.toInt());
          NbIsosDlg->SpinBoxV->setValue(IsoV.toInt());
@@ -478,13 +482,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,9 +793,9 @@ 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()))) {
+    if(myGeomBase->Display(aShape, (char*)nameShape.latin1())) {
       QAD_Application::getDesktop()->getActiveStudy()->setMessage( tr("GEOM_INF_LOADED").arg(QAD_Tools::getFileNameFromPath( file )) );
       QAD_Application::getDesktop()->putInfo( tr("GEOM_PRP_READY"));
     }
@@ -802,7 +843,7 @@ bool GEOMToolsGUI::Export(int aState)
              QApplication::setOverrideCursor( Qt::waitCursor );
              //      Standard_Boolean result = BRepTools::Write(Shape->Shape(), strdup(file.latin1()) );
              try {
-               myGeom->ExportBREP(strdup( file.latin1()), aShape);
+               myGeom->ExportBREP((char*)file.latin1(), aShape);
              }  
              catch (const SALOME::SALOME_Exception& S_ex) {
                QtCatchCorbaException(S_ex);
@@ -829,7 +870,7 @@ bool GEOMToolsGUI::Export(int aState)
            if ( !file.isEmpty() && !aShape->_is_nil() ) {
              QApplication::setOverrideCursor( Qt::waitCursor );
              try {
-               myGeom->ExportIGES(strdup( file.latin1()), aShape);
+               myGeom->ExportIGES((char*)file.latin1(), aShape);
              }  
              catch (const SALOME::SALOME_Exception& S_ex) {
                QtCatchCorbaException(S_ex);
@@ -875,7 +916,7 @@ bool GEOMToolsGUI::Export(int aState)
 
              QApplication::setOverrideCursor( Qt::waitCursor ) ;       
              try {   
-               myGeom->ExportSTEP(strdup( file.latin1()), aShape);   
+               myGeom->ExportSTEP((char*)file.latin1(), aShape);   
              }  
              catch (const SALOME::SALOME_Exception& S_ex) {
                QtCatchCorbaException(S_ex);
@@ -901,6 +942,7 @@ bool GEOMToolsGUI::Export(int aState)
 
     }
   QApplication::restoreOverrideCursor() ;
+  return true;
 }
 
 
index 5ef80f650da355d8e4ead29c0427aed93f03abe7..842332015e77f594e5d97bf67b9b6115c97337a8 100644 (file)
@@ -21,7 +21,7 @@
 //
 //
 //
-//  File   : GEOMBase_NbIsosDlg.cxx
+//  File   : GEOMToolsGUI_NbIsosDlg.cxx
 //  Author : 
 //  Module : GEOM
 //  $Header: 
@@ -37,17 +37,17 @@ using namespace std;
 #include <qspinbox.h>
 
 //=================================================================================
-// class    : GEOMBase_NbIsosDlg()
-// purpose  : Constructs a GEOMBase_NbIsosDlg which is a child of 'parent', with the 
+// class    : GEOMToolsGUI_NbIsosDlg()
+// purpose  : Constructs a GEOMToolsGUI_NbIsosDlg which is a child of 'parent', with the 
 //            name 'name' and widget flags set to 'f'.
 //            The dialog will by default be modeless, unless you set 'modal' to
 //            TRUE to construct a modal dialog.
 //=================================================================================
-GEOMBase_NbIsosDlg::GEOMBase_NbIsosDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
+GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent, const char* name, bool modal, WFlags fl)
   :QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
   if( !name )
-    setName("GEOMBase_NbIsosDlg");
+    setName("GEOMToolsGUI_NbIsosDlg");
   setCaption(name);
   setSizeGripEnabled(TRUE);
   QGridLayout* MyDialogLayout = new QGridLayout(this); 
@@ -122,10 +122,10 @@ GEOMBase_NbIsosDlg::GEOMBase_NbIsosDlg(QWidget* parent, const char* name, bool m
 
 
 //=================================================================================
-// function : ~GEOMBase_NbIsosDlg()
+// function : ~GEOMToolsGUI_NbIsosDlg()
 // purpose  : Destroys the object and frees any allocated resources
 //=================================================================================
-GEOMBase_NbIsosDlg::~GEOMBase_NbIsosDlg()
+GEOMToolsGUI_NbIsosDlg::~GEOMToolsGUI_NbIsosDlg()
 {
     // no need to delete child widgets, Qt does it all for us
 }
index 48c70c5635bc6ace1e870294b91c9b3e9d2c9afe..07e471200ef111e1adc188dd915c26940bcc9320 100644 (file)
 //
 //
 //
-//  File   : GEOMBase_NbIsosDlg.h
+//  File   : GEOMToolsGUI_NbIsosDlg.h
 //  Author : 
 //  Module : GEOM
 //  $Header: 
 
-#ifndef GEOMBASE_NBISOSDLG_H
-#define GEOMBASE_NBISOSDLG_H
+#ifndef GEOMTOOLSGUI_NBISOSDLG_H
+#define GEOMTOOLSGUI_NBISOSDLG_H
 
 #include <qdialog.h>
 
@@ -36,16 +36,16 @@ class QSpinBox;
 class QPushButton;
 
 //=================================================================================
-// class    : GEOMBase_NbIsosDlg
+// class    : GEOMToolsGUI_NbIsosDlg
 // purpose  :
 //=================================================================================
-class GEOMBase_NbIsosDlg : public QDialog
+class GEOMToolsGUI_NbIsosDlg : public QDialog
 { 
     Q_OBJECT
 
 public:
-    GEOMBase_NbIsosDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
-    ~GEOMBase_NbIsosDlg();
+    GEOMToolsGUI_NbIsosDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
+    ~GEOMToolsGUI_NbIsosDlg();
 
     QPushButton* buttonOk;
     QPushButton* buttonCancel;
@@ -56,4 +56,4 @@ public:
 
 };
 
-#endif // GEOMETRYGUI_NBISOSDLG_H
+#endif // GEOMTOOLSGUI_NBISOSDLG_H
index 122cc9848e9abec8a74f0d28fab9f15726743786..12beaaaa52b974cb187dc54a61824d811ce2b1fd 100644 (file)
@@ -21,7 +21,7 @@
 //
 //
 //
-//  File   : GEOMBase_TransparencyDlg.cxx
+//  File   : GEOMToolsGUI_TransparencyDlg.cxx
 //  Author : Lucien PIGNOLONI
 //  Module : GEOM
 
@@ -48,24 +48,24 @@ using namespace std;
 #include "VTKViewer_RenderWindowInteractor.h"
 
 //=================================================================================
-// class    : GEOMBase_TransparencyDlg()
+// class    : GEOMToolsGUI_TransparencyDlg()
 // purpose  : Constructs a GEOMBase_SUBSHAPE which is a child of 'parent', with the
 //            name 'name' and widget flags set to 'f'.
 //
 //          : WARNING : this dialog is modal !
 //
 //=================================================================================
-GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, const Handle(AIS_InteractiveContext)& ic, bool modal, WFlags fl)
+GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, const Handle(AIS_InteractiveContext)& ic, bool modal, WFlags fl)
   :QDialog(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
   if(!name)
-    setName("GEOMBase_TransparencyDlg");
+    setName("GEOMToolsGUI_TransparencyDlg");
   resize(152, 107); 
   setCaption(tr("GEOM_TRANSPARENCY_TITLE"));
   setSizeGripEnabled(TRUE);
-  GEOMBase_TransparencyDlgLayout = new QGridLayout(this); 
-  GEOMBase_TransparencyDlgLayout->setSpacing(6);
-  GEOMBase_TransparencyDlgLayout->setMargin(11);
+  GEOMToolsGUI_TransparencyDlgLayout = new QGridLayout(this); 
+  GEOMToolsGUI_TransparencyDlgLayout->setSpacing(6);
+  GEOMToolsGUI_TransparencyDlgLayout->setMargin(11);
 
   /*************************************************************************/
   QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
@@ -112,8 +112,8 @@ GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char*
   GroupC1Layout->addMultiCellWidget( Slider1, 1, 1, 0, 2 );
   /*************************************************************************/
   
-  GEOMBase_TransparencyDlgLayout->addWidget(GroupC1, 0,  0);
-  GEOMBase_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
+  GEOMToolsGUI_TransparencyDlgLayout->addWidget(GroupC1, 0,  0);
+  GEOMToolsGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
   
   /* Initialisations */
   this->myGeomGUI = GEOMContext::GetGeomGUI();
@@ -133,18 +133,18 @@ GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char*
   connect(Slider1, SIGNAL(valueChanged(int)), this, SLOT(ValueHasChanged(int)));
   
   /* Move widget on the botton right corner of main widget */
-  int x, y ;
-  myGeomBase->DefineDlgPosition(this, x, y);
-  this->move(x, y) ;
+//   int x, y ;
+//   myGeomBase->DefineDlgPosition(this, x, y);
+//   this->move(x, y) ;
   this->show() ; /* Displays this Dialog */
 }
 
 
 //=================================================================================
-// function : ~GEOMBase_TransparencyDlg()
+// function : ~GEOMToolsGUI_TransparencyDlg()
 // purpose  :
 //=================================================================================
-GEOMBase_TransparencyDlg::~GEOMBase_TransparencyDlg()
+GEOMToolsGUI_TransparencyDlg::~GEOMToolsGUI_TransparencyDlg()
 {
     // no need to delete child widgets, Qt does it all for us
 }
@@ -154,7 +154,7 @@ GEOMBase_TransparencyDlg::~GEOMBase_TransparencyDlg()
 // function : ClickOnOk()
 // purpose  :
 //=======================================================================
-void GEOMBase_TransparencyDlg::ClickOnOk()
+void GEOMToolsGUI_TransparencyDlg::ClickOnOk()
 {
   accept();
   return;
@@ -165,7 +165,7 @@ void GEOMBase_TransparencyDlg::ClickOnOk()
 // function : ClickOnClose()
 // purpose  :
 //=======================================================================
-void GEOMBase_TransparencyDlg::ClickOnClose()
+void GEOMToolsGUI_TransparencyDlg::ClickOnClose()
 {
   accept();
   return;
@@ -177,7 +177,7 @@ void GEOMBase_TransparencyDlg::ClickOnClose()
 // purpose  : Called when value of slider change
 //          : or the first time as initilisation
 //=================================================================================
-void GEOMBase_TransparencyDlg::ValueHasChanged(int newValue)
+void GEOMToolsGUI_TransparencyDlg::ValueHasChanged(int newValue)
 {
   if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) {
     // VTK
index fbcc4efcd0b73514bcabb2f6ac8225d93273ff5f..8ae122d1bea3ae723ed79f6a2d5ad215eacc7a02 100644 (file)
@@ -21,7 +21,7 @@
 //
 //
 //
-//  File   : GEOMBase_TransparencyDlg.h
+//  File   : GEOMToolsGUI_TransparencyDlg.h
 //  Author : Lucien PIGNOLONI
 //  Module : GEOM
 //  $Header$
@@ -51,23 +51,23 @@ class QSlider;
 
 
 //=================================================================================
-// class    : GEOMBase_TransparencyDlg
+// class    : GEOMToolsGUI_TransparencyDlg
 // purpose  :
 //          : WARNING : that is a MODAL dialog.
 //=================================================================================
-class GEOMBase_TransparencyDlg : public QDialog
+class GEOMToolsGUI_TransparencyDlg : public QDialog
 { 
     Q_OBJECT
 
 public:
-    GEOMBase_TransparencyDlg( QWidget* parent = 0,
+    GEOMToolsGUI_TransparencyDlg( QWidget* parent = 0,
                                 const char* name = 0,
                                 SALOME_Selection* Sel = 0,
                                 const Handle(AIS_InteractiveContext)& ic = 0,
                                 bool modal = TRUE,
                                 WFlags fl = 0 );
 
-    ~GEOMBase_TransparencyDlg();
+    ~GEOMToolsGUI_TransparencyDlg();
 
 private :
 
@@ -89,7 +89,7 @@ public slots:
     void ValueHasChanged( int newValue ) ;
     
 protected:
-    QGridLayout* GEOMBase_TransparencyDlgLayout;
+    QGridLayout* GEOMToolsGUI_TransparencyDlgLayout;
     QHBoxLayout* Layout1;
     QHBoxLayout* Layout2;
 };
diff --git a/src/GEOM_SWIG/GEOM_Sketcher.py b/src/GEOM_SWIG/GEOM_Sketcher.py
new file mode 100644 (file)
index 0000000..fbdb7fb
--- /dev/null
@@ -0,0 +1,58 @@
+#  GEOM GEOM_SWIG : binding of C++ omplementaion with Python\r
+#\r
+#  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,\r
+#  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS \r
+# \r
+#  This library is free software; you can redistribute it and/or \r
+#  modify it under the terms of the GNU Lesser General Public \r
+#  License as published by the Free Software Foundation; either \r
+#  version 2.1 of the License. \r
+# \r
+#  This library is distributed in the hope that it will be useful, \r
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of \r
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU \r
+#  Lesser General Public License for more details. \r
+# \r
+#  You should have received a copy of the GNU Lesser General Public \r
+#  License along with this library; if not, write to the Free Software \r
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA \r
+# \r
+#  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org \r
+#\r
+#\r
+#\r
+#  File   : GEOM_Sketcher.py\r
+#  Author : Damien COQUERET, Open CASCADE\r
+#  Module : GEOM\r
+#  $Header$\r
+\r
+import geompy\r
+\r
+#SKETCHER INFOS\r
+#Init Sketcher\r
+#Create a string beginning by :"Sketcher:"\r
+#Each command must be separated by ":"\r
+#"F x y" : Create first point at X & Y\r
+\r
+#To Make Segment\r
+#"R angle" : Set the direction by angle\r
+#"D dx dy" : Set the direction by DX & DY\r
+\r
+#"TT x y" : Create by point at X & Y\r
+#"T dx dy" : Create by point with DX & DY\r
+#"L length" : Create by direction & Length\r
+#"IX x" : Create by direction & Intersect. X\r
+#"IY y" : Create by direction & Intersect. Y\r
+\r
+#To Make Arc\r
+#"C radius length" : Create by direction, radius and length(in degree)\r
+\r
+#To finish\r
+#"WW" : Close Wire\r
+\r
+#Create Sketcher\r
+Cmd = "Sketch:F 0 0:TT 0 100:C 100 180:WW"\r
+Sketcher = geompy.MakeSketcher(Cmd) #(string)->GEOM_Shape_ptr\r
+\r
+#Add In Study\r
+id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher")\r
index 6ea27169e5a6c5df7004bcd6b1824540c6a7c841..a053a12a1af808e11612ed332f28f97d9d61942d 100644 (file)
@@ -51,7 +51,8 @@ EXPORT_PYSCRIPTS = libGEOM_Swig.py geompy.py batchmode_geompy.py \
                 GEOM_Partition2.py \
                 GEOM_Partition3.py \
                 GEOM_Partition4.py \
-                GEOM_Partition5.py
+                GEOM_Partition5.py \
+                GEOM_Sketcher.py
 
 LIB_CLIENT_IDL = SALOMEDS.idl \
                  SALOMEDS_Attributes.idl \
index 4bb742a89b03e65578fd8d0ee18313e3508cd679..041330f6a6c624f44cc208ace2450a4f7eb2289c 100644 (file)
@@ -152,12 +152,24 @@ def MakeCircle(p1,d1,radius):
     anObj._set_Name(ior)
     return anObj
 
+def MakeEllipse(p1,d1,radiusMaj,radiusMin):  
+    anObj = geom.MakeEllipse(p1,d1,radiusMaj, radiusMin)
+    ior = orb.object_to_string(anObj)
+    anObj._set_Name(ior)
+    return anObj
+
 def MakePlane(p1,d1,trimsize): 
     anObj = geom.MakePlane(p1,d1,trimsize)
     ior = orb.object_to_string(anObj)
     anObj._set_Name(ior)
     return anObj
 
+def MakeSketcher(Cmd): 
+    anObj = geom.MakeSketcher(Cmd)
+    ior = orb.object_to_string(anObj)
+    anObj._set_Name(ior)
+    return anObj
+
 # -----------------------------------------------------------------------------
 # Create Geometry 3D
 # -----------------------------------------------------------------------------
@@ -214,6 +226,12 @@ def MakeFace(aShapeWire,WantPlanarFace):
     anObj._set_Name(ior)
     return anObj
 
+def MakeFaces(ListShape,WantPlanarFace):
+    anObj = geom.MakeFaces(ListShape,WantPlanarFace)
+    ior = orb.object_to_string(anObj)
+    anObj._set_Name(ior)
+    return anObj
+
 def MakeCompound(ListShape):
     anObj = geom.MakeCompound(ListShape)
     ior = orb.object_to_string(anObj)
@@ -356,10 +374,11 @@ def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
     return anObj
 
 def SuppressFaces(aShape,ListOfId):
-    anObj = geom.SuppressFaces(aShape,ListOfId)
-    ior = orb.object_to_string(anObj)
-    anObj._set_Name(ior)
-    return anObj
+    ListObj = geom.SuppressFaces(aShape,ListOfId)
+    for anObj in ListObj :
+           ior = orb.object_to_string(anObj)
+           anObj._set_Name(ior)
+    return ListObj
 
 def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace):
     anObj = geom.SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace)
index 4746e7d62039381e3d9e76879018d26b7d545ba3..6d0fca32abb907660ab4de4296b2088fc2103b67 100644 (file)
@@ -178,12 +178,24 @@ def MakeCircle(p1,d1,radius):
     anObj._set_Name(ior)
     return anObj
 
+def MakeEllipse(p1,d1,radiusMaj,radiusMin):  
+    anObj = geom.MakeEllipse(p1,d1,radiusMaj, radiusMin)
+    ior = salome.orb.object_to_string(anObj)
+    anObj._set_Name(ior)
+    return anObj
+
 def MakePlane(p1,d1,trimsize): 
     anObj = geom.MakePlane(p1,d1,trimsize)
     ior = salome.orb.object_to_string(anObj)
     anObj._set_Name(ior)
     return anObj
 
+def MakeSketcher(Cmd): 
+    anObj = geom.MakeSketcher(Cmd)
+    ior = salome.orb.object_to_string(anObj)
+    anObj._set_Name(ior)
+    return anObj
+
 # -----------------------------------------------------------------------------
 # Create Geometry 3D
 # -----------------------------------------------------------------------------
@@ -388,10 +400,11 @@ def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[],
     return anObj
 
 def SuppressFaces(aShape,ListOfId):
-    anObj = geom.SuppressFaces(aShape,ListOfId)
-    ior = salome.orb.object_to_string(anObj)
-    anObj._set_Name(ior)
-    return anObj
+    ListObj = geom.SuppressFaces(aShape,ListOfId)
+    for anObj in ListObj :
+           ior = salome.orb.object_to_string(anObj)
+           anObj._set_Name(ior)
+    return ListObj
 
 def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace):
     anObj = geom.SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace)
index 968e4df57e8b74ec6d004d3dd9d49dc4d9ae7de8..85d0203b82c6cfa78e130db405ff798ee4e3b209 100644 (file)
@@ -26,9 +26,9 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "GenerationGUI_FillingDlg.h"
 
+#include "QAD_WaitCursor.h"
 #include "QAD_Config.h"
 
 #include <GeomFill_SectionGenerator.hxx>
@@ -38,8 +38,14 @@ using namespace std;
 #include <Geom_TrimmedCurve.hxx>
 #include <BRepBuilderAPI_MakeFace.hxx>
 #include <TopExp_Explorer.hxx>
+#include <TopoDS_Iterator.hxx>
 #include <BRep_Tool.hxx>
 #include <Precision.hxx>
+#include <Standard_ErrorHandler.hxx>
+
+#include "utilities.h"
+
+using namespace std;
 
 //=================================================================================
 // class    : GenerationGUI_FillingDlg()
@@ -172,6 +178,7 @@ void GenerationGUI_FillingDlg::ClickOnOk()
 //=================================================================================
 void GenerationGUI_FillingDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
@@ -209,10 +216,14 @@ void GenerationGUI_FillingDlg::SelectionIntoArgument()
     return;
   
   if(myEditCurrentArgument == GroupPoints->LineEdit1 && mySectionShape.ShapeType() == TopAbs_COMPOUND) {
-    myEditCurrentArgument->setText(aString);
     myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
     if(!testResult)
       return;
+    // mySectionShape should be a compound of edges
+    for ( TopoDS_Iterator it( mySectionShape ); it.More(); it.Next() )
+      if ( it.Value().ShapeType() != TopAbs_EDGE )
+        return;
+    myEditCurrentArgument->setText(aString);
     myOkSectionShape = true;
   }
 
@@ -318,6 +329,8 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox(double newValue)
 //=================================================================================
 void GenerationGUI_FillingDlg::MakeFillingSimulationAndDisplay()
 {
+  QAD_WaitCursor wc;
+
   myGeomBase->EraseSimulationShape();
   mySimulationTopoDs.Nullify();
 
@@ -335,6 +348,7 @@ void GenerationGUI_FillingDlg::MakeFillingSimulationAndDisplay()
       if( Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE)
        return;
       C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last);
+      if (C.IsNull()) continue;
       C = new Geom_TrimmedCurve(C, First, Last);
       Section.AddCurve(C) ;
       i++ ;
index dae7c23f6aa9033b51fcc686a88c8c44178e6a87..adb21593b410145adf1f0e8feb3318ab5dd36f76 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "GenerationGUI_PipeDlg.h"
 
 #include <TopoDS_Edge.hxx>
@@ -38,6 +37,10 @@ using namespace std;
 #include <BRepAlgoAPI.hxx>
 #endif
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : GenerationGUI_PipeDlg()
 // purpose  : Constructs a GenerationGUI_PipeDlg which is a child of 'parent', with the 
@@ -187,7 +190,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..90fc67b702bc9be7e1406354da0a6d3ea953e1bb 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "GenerationGUI_PrismDlg.h"
 
 #include <BRepPrimAPI_MakePrism.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : GenerationGUI_PrismDlg()
 // purpose  : Constructs a GenerationGUI_PrismDlg which is a child of 'parent', with the 
@@ -146,6 +149,7 @@ void GenerationGUI_PrismDlg::ClickOnOk()
 //=================================================================================
 void GenerationGUI_PrismDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 79e7e1bac5bc58a4fa900720ed73701543b49c09..0aa52712c9ba7579ab1ff49b4e94bc0cdfeb00de 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "GenerationGUI_RevolDlg.h"
 
 #include <gp_Lin.hxx>
 #include <BRepAdaptor_Curve.hxx>
 #include <BRepPrimAPI_MakeRevol.hxx>
 #include "QAD_Config.h"
+#include <TopExp_Explorer.hxx>
+#include <Standard_ErrorHandler.hxx>
+
+#include "utilities.h"
+
+using namespace std;
 
 //=================================================================================
 // class    : GenerationGUI_RevolDlg()
@@ -145,6 +150,7 @@ void GenerationGUI_RevolDlg::ClickOnOk()
 //=================================================================================
 void GenerationGUI_RevolDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
@@ -156,6 +162,32 @@ void GenerationGUI_RevolDlg::ClickOnApply()
   return;
 }
 
+//=======================================================================
+//function : isAcceptableBase
+//purpose  : return true if theBase can be used as algo argument
+//=======================================================================
+
+static bool isAcceptableBase(const TopoDS_Shape& theBase)
+{
+  switch ( theBase.ShapeType() ) {
+  case TopAbs_VERTEX:
+  case TopAbs_EDGE:
+  case TopAbs_WIRE:
+  case TopAbs_FACE:
+  case TopAbs_SHELL:
+    return true;
+  case TopAbs_SOLID:
+  case TopAbs_COMPSOLID:
+    return false;
+  case TopAbs_COMPOUND: {
+    TopExp_Explorer exp( theBase, TopAbs_SOLID);
+    return !exp.More();
+  }
+  default:
+    return false;
+  }
+  return false;
+}
 
 //=================================================================================
 // function : SelectionIntoArgument()
@@ -188,8 +220,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument()
     myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
     if(!testResult)
       return;
-    TopAbs_ShapeEnum aType = S.ShapeType();
-    if(aType != TopAbs_VERTEX && aType != TopAbs_EDGE && aType != TopAbs_WIRE && aType != TopAbs_FACE && aType != TopAbs_SHELL && aType != TopAbs_COMPOUND)
+    if( !isAcceptableBase( S ))
       return;
     myEditCurrentArgument->setText(aString);
     myOkBase = true;
@@ -317,8 +348,7 @@ void GenerationGUI_RevolDlg::MakeRevolutionSimulationAndDisplay()
   myGeomBase->EraseSimulationShape();
   mySimulationTopoDs.Nullify();
 
-  TopAbs_ShapeEnum aType = myBase.ShapeType();
-  if(aType != TopAbs_VERTEX && aType != TopAbs_EDGE && aType != TopAbs_WIRE && aType != TopAbs_FACE && aType != TopAbs_SHELL && aType !=TopAbs_COMPOUND)
+  if (!isAcceptableBase( myBase ))
     return;
 
   try {
index fc9feffb69b5dce97217f1eea714d843ca54c869..838f140e7d8d3cfb3944a67a40148955e0739a03 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_BndBoxDlg.h"
 
 #include <BRepPrimAPI_MakeBox.hxx>
 #include <BRepBndLib.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_BndBoxDlg()
 // purpose  : Constructs a MeasureGUI_BndBoxDlg which is a child of 'parent', with the 
index 691fd86942482e299baf219db03450dc7e360ef8..2ddbc82f04438c4cd74d08a004428bdfa4ed4b0c 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_CenterMassDlg.h"
 
 #include <BRepBuilderAPI_MakeVertex.hxx>
@@ -34,6 +33,10 @@ using namespace std;
 #include <GProp_GProps.hxx>
 #include <GProp_PrincipalProps.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_CenterMassDlg()
 // purpose  : Constructs a MeasureGUI_CenterMassDlg which is a child of 'parent', with the 
index fa6d776ca3ab67150d0b6708b646ddf37fdac25a..407824be7705c9b825acbce81850f89e0f490866 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_CheckShapeDlg.h"
 
 #include <BRepCheck_Analyzer.hxx>
 
 #include <qtextedit.h>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_CheckShapeDlg()
 // purpose  : Constructs a MeasureGUI_CheckShapeDlg which is a child of 'parent', with the 
index d527eee7fa8d4566cafb0bc075f1c10222a29a21..f33a3415bddb389c9d85e78d2bb1111bed87155b 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_DistanceDlg.h"
 
 #include "QAD_RightFrame.h"
@@ -42,6 +41,10 @@ using namespace std;
 #include <gce_MakePln.hxx>
 #include <Precision.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_DistanceDlg()
 // purpose  : Constructs a MeasureGUI_DistanceDlg which is a child of 'parent', with the 
@@ -322,7 +325,9 @@ void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape
        gp_Pln gp_P = gce_MP.Value();
        Handle(Geom_Plane) P = new Geom_Plane(gp_P);
 
-       Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(strdup(S)));
+       char* aCopyS = CORBA::string_dup(S);
+       Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(aCopyS));
+       delete(aCopyS);
 
        GroupC1->LineEdit3->setText(S);
 
index e8c796ad81f9935915e85353fdcaaea8367b2b3f..8ceaea0538622c579f6f268ee1af2021e4667daf 100644 (file)
 //  Author : Lucien PIGNOLONI
 //  Module : GEOM
 
-using namespace std;
 #include "MeasureGUI_InertiaDlg.h"
 
 #include <BRepGProp.hxx>
 #include <GProp_GProps.hxx>
 #include <GProp_PrincipalProps.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_InertiaDlg()
 // purpose  : Constructs a MeasureGUI_InertiaDlg which is a child of 'parent', with the 
index 93f2da25f1ab34a4d54581cbf2e8da1f08e43ad0..04b810b891241a9d926406b0d565ee882dc78187 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_MaxToleranceDlg.h"
 
 #include <TopoDS_Vertex.hxx>
@@ -35,6 +34,10 @@ using namespace std;
 #include <TopExp_Explorer.hxx>
 #include <BRep_Tool.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_MaxToleranceDlg()
 // purpose  : Constructs a MeasureGUI_MaxToleranceDlg which is a child of 'parent', with the 
index 934551b8475de3b19aa57b667d892f0d86b288f9..ede6403fa4c68bfba7d3c7ce5a97a897ac30484f 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_PropertiesDlg.h"
 
 #include <TopExp_Explorer.hxx>
@@ -34,6 +33,10 @@ using namespace std;
 #include <GProp_GProps.hxx>
 #include <GProp_PrincipalProps.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_PropertiesDlg()
 // purpose  : Constructs a MeasureGUI_PropertiesDlg which is a child of 'parent', with the 
index 015951864065e23d4e1aad8688bdebaf0dd17177..299c51a85132f79819efc2cd57c9067deef19b1b 100644 (file)
@@ -39,6 +39,7 @@
 #include <qlayout.h>
 #include <qradiobutton.h>
 #include <qbuttongroup.h>
+#include <qpushbutton.h>
 
 class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD
 { 
index 23c2895c3796403e0b035756c85729301bd5449a..3fddd8492f54b33e27faf0efbfd94dc88c833b73 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "MeasureGUI_WhatisDlg.h"
 
 #include <TopTools_MapOfShape.hxx>
@@ -37,6 +36,12 @@ using namespace std;
 
 #include <qtextedit.h>
 
+#include <BRep_Tool.hxx>
+
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : MeasureGUI_WhatisDlg()
 // purpose  : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the 
@@ -211,8 +216,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 + " " + CORBA::string_dup(SelectedName.latin1()) + " is a degenerated edge \n";
+    }
+  }
+  
+  Astr = Astr + " Number of shapes in " + CORBA::string_dup(SelectedName.latin1()) + " : \n";
+  
   try {
     int iType, nbTypes [TopAbs_SHAPE];
     for(iType = 0; iType < TopAbs_SHAPE; ++iType)
index 8f66299fd0189184a4e39657e9e408fb118f57ec..c3d2a67e95abbb26d758dcf1b078a70005e2ae79 100644 (file)
@@ -38,4 +38,4 @@
 #endif
 #ifndef _Prs3d_Presentation_HeaderFile
 #include <Prs3d_Presentation.hxx>
-#endif
\ No newline at end of file
+#endif
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..b4a171f409589cd68f8110f1d73c7097e41f9ee2 100644 (file)
@@ -30,7 +30,10 @@ using namespace std;
 #include "OperationGUI_ChamferDlg.h"
 
 #include "DisplayGUI.h"
+#include "QAD_MessageBox.h"
 
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
 #include <AIS_InteractiveContext.hxx>
 #include <BRepFilletAPI_MakeChamfer.hxx>
 #include <BRepTools.hxx>
@@ -38,6 +41,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 
@@ -68,23 +74,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(QWidget* parent, const char* na
   Group1->TextLabel3->setText(tr("GEOM_D2"));
   Group1->PushButton1->setPixmap(image3);
 
-  Group2 = new DlgRef_1Sel2Spin(this, "Group2");
-  Group2->GroupBox1->setTitle(tr("GEOM_CHAMFER_EDGES"));
-  Group2->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
-  Group2->TextLabel2->setText(tr("GEOM_D1"));
-  Group2->TextLabel3->setText(tr("GEOM_D2"));
-  Group2->PushButton1->setPixmap(image3);
-
-  Group3 = new DlgRef_1Sel2Spin(this, "Group3");
-  Group3->GroupBox1->setTitle(tr("GEOM_CHAMFER_FACES"));
-  Group3->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
-  Group3->TextLabel2->setText(tr("GEOM_D1"));
-  Group3->TextLabel3->setText(tr("GEOM_D2"));
-  Group3->PushButton1->setPixmap(image3);
-
   Layout1->addWidget(Group1, 1, 0);
-  Layout1->addWidget(Group2, 1, 0);
-  Layout1->addWidget(Group3, 1, 0);
   /***************************************************************/
 
   /* Initialisations */
@@ -123,18 +113,10 @@ void OperationGUI_ChamferDlg::Init(Handle (AIS_InteractiveContext) ic)
   double SpecificStep = 10.0;
   /* min, max, step and decimals for spin boxes */
   Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-  Group2->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-  Group3->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
   Group1->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-  Group2->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-  Group3->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
 
   Group1->SpinBox_DX->SetValue(myD1);
-  Group2->SpinBox_DX->SetValue(myD1);
-  Group3->SpinBox_DX->SetValue(myD1);
   Group1->SpinBox_DY->SetValue(myD2);
-  Group2->SpinBox_DY->SetValue(myD2);
-  Group3->SpinBox_DY->SetValue(myD2);
 
   /* signals and slots connections */
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
@@ -146,32 +128,16 @@ void OperationGUI_ChamferDlg::Init(Handle (AIS_InteractiveContext) ic)
   connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
 
   connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-  connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-  connect(Group3->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-
   connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-  connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-  connect(Group3->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
 
   connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
   connect(Group1->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  connect(Group2->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  connect(Group3->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  
   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double)));
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2->SpinBox_DX, SLOT(SetStep(double)));
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3->SpinBox_DX, SLOT(SetStep(double)));
   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DY, SLOT(SetStep(double)));
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2->SpinBox_DY, SLOT(SetStep(double)));
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3->SpinBox_DY, SLOT(SetStep(double)));
 
   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   /* displays Dialog */
-  Group2->hide();
-  Group3->hide();
   Group1->show();
   this->show();
 
@@ -200,52 +166,33 @@ 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()));
+  Group1->LineEdit1->setText("");
+  Group1->SpinBox_DX->SetValue(myD1);
+  Group1->SpinBox_DY->SetValue(myD2);
   switch (constructorId)
     {
     case 0: /* Chamfer All */
       {
-       Group2->hide();
-       Group3->hide();
-       resize(0, 0);
-       Group1->show();
-
-       myEditCurrentArgument = Group1->LineEdit1;
-       Group1->LineEdit1->setText("");
+       Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_ALL"));
        myShapeType = -1;
-
-       Group1->SpinBox_DX->SetValue(myD1);
-       Group1->SpinBox_DY->SetValue(myD2);
        break;
       }
     case 1: /* Chamfer edges */
       {
-       Group1->hide();
-       Group3->hide();
-       resize(0, 0);
-       Group2->show();
-
-       myEditCurrentArgument = Group2->LineEdit1;
-       Group2->LineEdit1->setText("");
+       Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_EDGES"));
        myShapeType = 6;
-
-       Group2->SpinBox_DX->SetValue(myD1);
-       Group2->SpinBox_DY->SetValue(myD2);
        break;
       }
     case 2: /* Chamfer Faces */
       {
-       Group1->hide();
-       Group2->hide();
-       resize(0, 0);
-       Group3->show();
-
-       myEditCurrentArgument = Group3->LineEdit1;
-       Group3->LineEdit1->setText("");
+       Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_FACES"));
        myShapeType = 4;
-
-       Group3->SpinBox_DX->SetValue(myD1);
-       Group3->SpinBox_DY->SetValue(myD2);
        break;
       }
     }
@@ -271,6 +218,7 @@ void OperationGUI_ChamferDlg::ClickOnOk()
 //=================================================================================
 void OperationGUI_ChamferDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QApplication::setOverrideCursor(Qt::waitCursor);
   QAD_Application::getDesktop()->putInfo(tr(""));
   myGeomBase->EraseSimulationShape();
@@ -372,7 +320,7 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
        }
       }
     }
-    if(myConstructorId == 0)
+    if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0)
       this->MakePreview();
 
   }
@@ -388,27 +336,6 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
 }
 
 
-//=================================================================================
-// function : LineEditReturnPressed()
-// purpose  :
-//=================================================================================
-void OperationGUI_ChamferDlg::LineEditReturnPressed()
-{
-  QLineEdit* send = (QLineEdit*)sender();
-  if(send == Group1->LineEdit1)
-    myEditCurrentArgument = Group1->LineEdit1;
-  else if (send == Group2->LineEdit1)
-    myEditCurrentArgument = Group2->LineEdit1;
-  else if (send == Group3->LineEdit1)
-    myEditCurrentArgument = Group3->LineEdit1;
-  else
-    return;
-
-  GEOMBase_Skeleton::LineEditReturnPressed();
-  return;
-}
-
-
 //=================================================================================
 // function : SetEditCurrentArgument()
 // purpose  :
@@ -417,18 +344,9 @@ void OperationGUI_ChamferDlg::SetEditCurrentArgument()
 {
   QPushButton* send = (QPushButton*)sender();  
 
-  if(send == Group1->PushButton1) {
+  if(send == Group1->PushButton1)
     Group1->LineEdit1->setFocus();
-    myEditCurrentArgument = Group1->LineEdit1;
-  }
-  else if(send == Group2->PushButton1) {
-    Group2->LineEdit1->setFocus();
-    myEditCurrentArgument = Group2->LineEdit1;
-  }
-  else if(send == Group3->PushButton1) {
-    Group3->LineEdit1->setFocus();
-    myEditCurrentArgument = Group3->LineEdit1;
-  }
+
   this->SelectionIntoArgument();
   return;
 }
@@ -489,24 +407,20 @@ void OperationGUI_ChamferDlg::closeEvent(QCloseEvent* e)
 // function : ValueChangedInSpinBox()
 // purpose  :
 //=================================================================================
-void OperationGUI_ChamferDlg::ValueChangedInSpinBox( double newValue )
+void OperationGUI_ChamferDlg::ValueChangedInSpinBox(double newValue)
 {
   myGeomBase->EraseSimulationShape(); 
   mySimulationTopoDs.Nullify();
 
   QObject* send = (QObject*)sender();
-  if(send == Group1->SpinBox_DX || send == Group2->SpinBox_DX || send == Group3->SpinBox_DX) { /* D1 */
+  if(send == Group1->SpinBox_DX /* D1 */
     myD1 = newValue;
-    if(myConstructorId == 0)
-      this->MakePreview();
-    return ;
-  } 
-  else if(send == Group1->SpinBox_DY || send == Group2->SpinBox_DY || send == Group3->SpinBox_DY) { /* D2 */
+  else if(send == Group1->SpinBox_DY)  /* D2 */
     myD2 = newValue;
-    if(myConstructorId == 0)
-      this->MakePreview();
-    return;
-  }
+
+  if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0)
+    this->MakePreview();
+
   return;
 }
 
@@ -539,48 +453,44 @@ 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;
-  }
+  TopoDS_Shape tds;
 
   try {
-    if(myD1 <= Precision::Confusion() || myD2 <= Precision::Confusion()) {
-      QApplication::restoreOverrideCursor();
-      return;
-    }
+    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 */
+      }
 
-    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"));
-      QApplication::restoreOverrideCursor();
-      return;
+    if(!tds.IsNull()) {
+      mySimulationTopoDs = tds;
+      myGeomBase->DisplaySimulationShape(mySimulationTopoDs); 
     }
-
-    TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result);
-
-    mySimulationTopoDs = S;
-    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
   }
   catch(Standard_Failure) {
-    MESSAGE("Exception catched in MakePreview");
     QApplication::restoreOverrideCursor();
-    return;
+    QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_CHAMFER_ABORT").arg(myD1).arg(myD2), tr("GEOM_BUT_OK"));
+    QApplication::setOverrideCursor(Qt::waitCursor);
+    myGeomBase->EraseSimulationShape(); 
+    mySimulationTopoDs.Nullify();
+    Group1->SpinBox_DX->SetValue(5.0);
+    Group1->SpinBox_DY->SetValue(5.0);
   }
+
   QApplication::restoreOverrideCursor();
   return;
-
 }
index 46e114443b51c2cc63d83ad6ef5f9e8d1b9f4f3a..320bc37c9a19c446097e42d122d0e8703c52026c 100644 (file)
@@ -72,8 +72,6 @@ private :
     double myD2;
     
     DlgRef_1Sel2Spin* Group1;
-    DlgRef_1Sel2Spin* Group2;
-    DlgRef_1Sel2Spin* Group3;
 
 private slots:
     void ClickOnOk();
@@ -81,7 +79,6 @@ private slots:
     void ClickOnCancel();
     void ActivateThisDialog();
     void DeactivateActiveDialog();
-    void LineEditReturnPressed();
     void SelectionIntoArgument();
     void SetEditCurrentArgument();
     void ValueChangedInSpinBox(double newValue);
index 746c9eb08d04493ad1155d791657e017f06de199..6f81cae0fd59cc268836c753bbae815cc7f24402 100644 (file)
@@ -30,12 +30,17 @@ using namespace std;
 #include "OperationGUI_FilletDlg.h"
 
 #include "DisplayGUI.h"
+#include "QAD_MessageBox.h"
 
+#include <TopoDS_Edge.hxx>
 #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 
@@ -65,21 +70,7 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(QWidget* parent, const char* name
   Group1->TextLabel2->setText(tr("GEOM_RADIUS"));
   Group1->PushButton1->setPixmap(image3);
 
-  Group2 = new DlgRef_1Sel1Spin(this, "Group2");
-  Group2->GroupBox1->setTitle(tr("GEOM_FILLET_EDGES"));
-  Group2->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
-  Group2->TextLabel2->setText(tr("GEOM_RADIUS"));
-  Group2->PushButton1->setPixmap(image3);
-
-  Group3 = new DlgRef_1Sel1Spin(this, "Group3");
-  Group3->GroupBox1->setTitle(tr("GEOM_FILLET_FACES"));
-  Group3->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
-  Group3->TextLabel2->setText(tr("GEOM_RADIUS"));
-  Group3->PushButton1->setPixmap(image3);
-
   Layout1->addWidget(Group1, 1, 0);
-  Layout1->addWidget(Group2, 1, 0);
-  Layout1->addWidget(Group3, 1, 0);
   /***************************************************************/
 
   /* Initialisations */
@@ -117,12 +108,7 @@ void OperationGUI_FilletDlg::Init(Handle(AIS_InteractiveContext) ic)
   double SpecificStep = 10.0;
   /* min, max, step and decimals for spin boxes */
   Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-  Group2->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-  Group3->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3);
-
   Group1->SpinBox_DX->SetValue(myRadius);
-  Group2->SpinBox_DX->SetValue(myRadius);
-  Group3->SpinBox_DX->SetValue(myRadius);
 
   /* signals and slots connections */
   connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
@@ -134,26 +120,14 @@ void OperationGUI_FilletDlg::Init(Handle(AIS_InteractiveContext) ic)
   connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
 
   connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-  connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-  connect(Group3->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
-
   connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-  connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
-  connect(Group3->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
 
   connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
-  
   connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double)));
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2->SpinBox_DX, SLOT(SetStep(double)));
-  connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3->SpinBox_DX, SLOT(SetStep(double)));
 
   connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
 
   /* displays Dialog */
-  Group2->hide();
-  Group3->hide();
   Group1->show();
   this->show();
 
@@ -181,49 +155,32 @@ 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()));
+  Group1->LineEdit1->setText("");
+  Group1->SpinBox_DX->SetValue(myRadius);
   switch (constructorId)
     {
     case 0: /* Fillet All */
       {
-       Group2->hide();
-       Group3->hide();
-       resize(0, 0);
-       Group1->show();
-
-       myEditCurrentArgument = Group1->LineEdit1;
-       Group1->LineEdit1->setText("");
+       Group1->GroupBox1->setTitle(tr("GEOM_FILLET_ALL"));
        myShapeType = -1;
-
-       Group1->SpinBox_DX->SetValue(myRadius);
        break;
       }
     case 1: /* Fillet edges */
       {
-       Group1->hide();
-       Group3->hide();
-       resize(0, 0);
-       Group2->show();
-
-       myEditCurrentArgument = Group2->LineEdit1;
-       Group2->LineEdit1->setText("");
+       Group1->GroupBox1->setTitle(tr("GEOM_FILLET_EDGES"));
        myShapeType = 6;
-
-       Group2->SpinBox_DX->SetValue(myRadius);
        break;
       }
     case 2: /* Fillet Faces */
       {
-       Group1->hide();
-       Group2->hide();
-       resize(0, 0);
-       Group3->show();
-
-       myEditCurrentArgument = Group3->LineEdit1;
-       Group3->LineEdit1->setText("");
+       Group1->GroupBox1->setTitle(tr("GEOM_FILLET_FACES"));
        myShapeType = 4;
-
-       Group3->SpinBox_DX->SetValue(myRadius);
        break;
       }
     }
@@ -249,6 +206,7 @@ void OperationGUI_FilletDlg::ClickOnOk()
 //=================================================================================
 void OperationGUI_FilletDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QApplication::setOverrideCursor(Qt::waitCursor);
   QAD_Application::getDesktop()->putInfo(tr(""));
   myGeomBase->EraseSimulationShape();
@@ -348,7 +306,7 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
        }
       }
     }
-    if(myConstructorId == 0)
+    if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0)
       this->MakePreview();
   }
   else 
@@ -363,27 +321,6 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
 }
 
 
-//=================================================================================
-// function : LineEditReturnPressed()
-// purpose  :
-//=================================================================================
-void OperationGUI_FilletDlg::LineEditReturnPressed()
-{
-  QLineEdit* send = (QLineEdit*)sender();
-  if(send == Group1->LineEdit1)
-    myEditCurrentArgument = Group1->LineEdit1;
-  else if (send == Group2->LineEdit1)
-    myEditCurrentArgument = Group2->LineEdit1;
-  else if (send == Group3->LineEdit1)
-    myEditCurrentArgument = Group3->LineEdit1;
-  else
-    return;
-
-  GEOMBase_Skeleton::LineEditReturnPressed();
-  return;
-}
-
-
 //=================================================================================
 // function : SetEditCurrentArgument()
 // purpose  :
@@ -392,18 +329,9 @@ void OperationGUI_FilletDlg::SetEditCurrentArgument()
 {
   QPushButton* send = (QPushButton*)sender();  
 
-  if(send == Group1->PushButton1) {
+  if(send == Group1->PushButton1)
     Group1->LineEdit1->setFocus();
-    myEditCurrentArgument = Group1->LineEdit1;
-  }
-  else if(send == Group2->PushButton1) {
-    Group2->LineEdit1->setFocus();
-    myEditCurrentArgument = Group2->LineEdit1;
-  }
-  else if(send == Group3->PushButton1) {
-    Group3->LineEdit1->setFocus();
-    myEditCurrentArgument = Group3->LineEdit1;
-  }
+
   this->SelectionIntoArgument();
   return;
 }
@@ -492,7 +420,7 @@ void OperationGUI_FilletDlg::ValueChangedInSpinBox(double newValue)
 
   myRadius = newValue;
 
-  if(myConstructorId == 0)
+  if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0)
     this->MakePreview();
   return;
 }
@@ -505,46 +433,56 @@ void OperationGUI_FilletDlg::ValueChangedInSpinBox(double newValue)
 void OperationGUI_FilletDlg::MakePreview()
 {
   QApplication::setOverrideCursor(Qt::waitCursor);
+  TopoDS_Shape tds;
 
-  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;
-    }
+    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) {
+             QApplication::restoreOverrideCursor();
+             QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK"));
+             QApplication::setOverrideCursor(Qt::waitCursor);
+             myGeomBase->EraseSimulationShape(); 
+             mySimulationTopoDs.Nullify();
+             Group1->SpinBox_DX->SetValue(5.0);
+             QApplication::restoreOverrideCursor();
+             return;
+           }
+         }
+         tds = fill.Shape();
+         break;
+       }
+      //    case 1: /* Fillet edges */
+      //    case 2: /* Fillet Faces */
+      }
 
-    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::restoreOverrideCursor();
-      return;
+    if(!tds.IsNull()) {
+      mySimulationTopoDs = tds;
+      myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
     }
-    TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result);
-
-    mySimulationTopoDs = S;
-    myGeomBase->DisplaySimulationShape(mySimulationTopoDs); 
-  }
+  }  
   catch(Standard_Failure) {
-    MESSAGE("Exception catched in MakePreview");
     QApplication::restoreOverrideCursor();
-    return;
+    QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK"));
+    QApplication::setOverrideCursor(Qt::waitCursor);
+    myGeomBase->EraseSimulationShape(); 
+    mySimulationTopoDs.Nullify();
+    Group1->SpinBox_DX->SetValue(5.0);
   }
+
   QApplication::restoreOverrideCursor();
   return;
 }
index 76fbab6f5ca368bdc84d03771d905b00fb059f4b..3756f82b2825a27253f6c18dc95f7d8cc430070a 100644 (file)
@@ -71,8 +71,6 @@ private :
     double myRadius;
     
     DlgRef_1Sel1Spin* Group1;
-    DlgRef_1Sel1Spin* Group2;
-    DlgRef_1Sel1Spin* Group3;
 
 private slots:
     void ClickOnOk();
@@ -80,7 +78,6 @@ private slots:
     void ClickOnCancel();
     void ActivateThisDialog();
     void DeactivateActiveDialog();
-    void LineEditReturnPressed();
     void SelectionIntoArgument();
     void SetEditCurrentArgument();
     void ValueChangedInSpinBox(double newValue);
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..f9af4748de9a503a28ec4547259ed1a965c190e2 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "PrimitiveGUI_ConeDlg.h"
 
 #include <gp_Lin.hxx>
@@ -36,6 +35,10 @@ using namespace std;
 #include <Precision.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : PrimitiveGUI_ConeDlg()
 // purpose  : Constructs a PrimitiveGUI_ConeDlg which is a child of 'parent', with the 
@@ -120,11 +123,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 +250,7 @@ void PrimitiveGUI_ConeDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_ConeDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 0826eef58ae79129147828a16e59754a1512726e..d12e8dc42542962f7f14b5b05a4a0402e8cf8997 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "PrimitiveGUI_CylinderDlg.h"
 
 #include <gp_Lin.hxx>
@@ -35,6 +34,10 @@ using namespace std;
 #include <Precision.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : PrimitiveGUI_CylinderDlg()
 // purpose  : Constructs a PrimitiveGUI_CylinderDlg which is a child of 'parent', with the 
@@ -234,6 +237,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..90aa6db8b943e6f2cd074b66af564bb4ff06d6cd 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "PrimitiveGUI_TorusDlg.h"
 
 #include <gp_Lin.hxx>
@@ -34,6 +33,10 @@ using namespace std;
 #include <BRepAdaptor_Curve.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : PrimitiveGUI_TorusDlg()
 // purpose  : Constructs a PrimitiveGUI_TorusDlg which is a child of 'parent', with the 
@@ -102,7 +105,6 @@ void PrimitiveGUI_TorusDlg::Init()
 
   myRadius1 = 300.0;
   myRadius2 = 100.0;
-  myOkRadius1 = myOkRadius2 = true;
   myOkPoint1 = myOkDir = false;
 
   myEdgeFilter = new GEOM_EdgeFilter(StdSelect_Line, myGeom);
@@ -167,7 +169,6 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId)
   mySelection->ClearFilters();
   myGeomBase->EraseSimulationShape();
   disconnect(mySelection, 0, this, 0);
-  myOkRadius1 = myOkRadius2 = true;
   myRadius1 = 300.0;
   myRadius2 = 100.0;
 
@@ -230,13 +231,14 @@ void PrimitiveGUI_TorusDlg::ClickOnOk()
 //=================================================================================
 void PrimitiveGUI_TorusDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
   myGeomBase->EraseSimulationShape();
   mySimulationTopoDs.Nullify();
 
-  if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2 )       
+  if(myOkPoint1 && myOkDir)      
     myPrimitiveGUI->MakeTorusAndDisplay(myPoint1, myDir, myRadius1, myRadius2); 
   return ;
 }
@@ -278,7 +280,7 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument()
     myOkDir = true;
   }
 
-  if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2)
+  if(myOkPoint1 && myOkDir)
     MakeTorusSimulationAndDisplay();
   return;
 }
@@ -374,15 +376,23 @@ void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox(double newValue)
   QObject* send = (QObject*)sender();
   
   if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DX) {
-    myRadius1 = newValue;
-    myOkRadius1 = true;
+    if(newValue > myRadius2)
+      myRadius1 = newValue;
+    else {
+      GroupPoints->SpinBox_DX->SetValue(myRadius1);
+      GroupDimensions->SpinBox_DX->SetValue(myRadius1);
+    }
   }
   else if(send == GroupPoints->SpinBox_DY || send == GroupDimensions->SpinBox_DY) {
-    myRadius2 = newValue;
-    myOkRadius2 = true;
+    if(newValue < myRadius1)
+      myRadius2 = newValue;
+    else {
+      GroupPoints->SpinBox_DY->SetValue(myRadius2);
+      GroupDimensions->SpinBox_DY->SetValue(myRadius2);
+    }
   }
   
-  if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2)
+  if(myOkPoint1 && myOkDir)
     MakeTorusSimulationAndDisplay();
   return;
 }
index 2eb3b32b5b213537cfbffb6fe8d0a07a9f43171f..84068f432b75fdb395cc394bc7fcc1d54ceafcd9 100644 (file)
@@ -72,8 +72,6 @@ private:
 
     Standard_Real myRadius1;
     Standard_Real myRadius2;
-    bool myOkRadius1;
-    bool myOkRadius2;
 
     DlgRef_2Sel2Spin* GroupPoints;
     DlgRef_2Spin* GroupDimensions;
index 0c456bdd721f84c4254d6a6c956b9d1e078c7c4e..ab9be2e20347f8431c50e5e469db051afcb1eca9 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header: 
 
-using namespace std;
 #include "RepairGUI.h"
 
 #include "QAD_RightFrame.h"
@@ -38,6 +37,10 @@ using namespace std;
 #include "RepairGUI_SuppressFacesDlg.h" // Method SUPPRESS FACES
 #include "RepairGUI_SuppressHoleDlg.h"  // Method SUPPRESS HOLE
 
+#include "utilities.h"
+
+using namespace std;
+
 //=======================================================================
 // function : RepairGUI()
 // purpose  : Constructor
@@ -311,11 +314,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..fd88ba8abfc5f204185de9815937e4a127b8c775 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "RepairGUI_OrientationDlg.h"
 
 #include <Precision.hxx>
@@ -36,6 +35,10 @@ using namespace std;
 #include <BRepAdaptor_Surface.hxx>
 #include <TopExp_Explorer.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : RepairGUI_OrientationDlg()
 // purpose  : Constructs a RepairGUI_OrientationDlg which is a child of 'parent', with the 
@@ -140,6 +143,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);
diff --git a/src/SKETCHER/GEOM_Sketcher.cxx b/src/SKETCHER/GEOM_Sketcher.cxx
deleted file mode 100644 (file)
index 7734c2b..0000000
+++ /dev/null
@@ -1,1389 +0,0 @@
-//  GEOM SKETCHER : basic sketcher
-//
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-//
-//
-//
-//  File   : GEOM_Sketcher.cxx
-//  Author : Nicolas REJNERI
-//  Module : GEOM
-//  $Header$
-
-using namespace std;
-#include "GEOM_Sketcher.h"
-#include "utilities.h"
-
-#include <qstring.h> 
-
-#include <Geom_Axis1Placement.hxx>
-#include <Geom_Circle.hxx>
-#include <Geom_Line.hxx>
-#include <Geom_CartesianPoint.hxx>
-#include <BRep_Tool.hxx>
-#include <BRepBuilderAPI_MakeEdge2d.hxx>
-#include <BRepBuilderAPI_MakeEdge.hxx>
-#include <BRepBuilderAPI_MakeVertex.hxx>
-#include <gp_Lin2d.hxx>
-#include <gp_Pln.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Dir.hxx>
-#include <gp_Circ2d.hxx>
-#include <gp_Vec2d.hxx>
-#include <IntAna_IntConicQuad.hxx>
-#include <BRepLib.hxx>
-#include <TopExp.hxx>
-#include <ProjLib.hxx>
-#include <Precision.hxx>
-#include <ElSLib.hxx>
-#include <BRepTools_WireExplorer.hxx>
-#include <GccAna_Pnt2dBisec.hxx>
-#include <GeomAPI.hxx>
-#include <Geom2dAPI_ProjectPointOnCurve.hxx>
-#include <Geom2d_TrimmedCurve.hxx>
-#include <Geom2d_Circle.hxx>
-#include <gce_MakeCirc2d.hxx>
-#include <GccAna_Circ2d2TanRad.hxx>
-#include <GccAna_Circ2d2TanOn.hxx>
-#include <GccEnt.hxx>
-#include <GccEnt_QualifiedLin.hxx>
-#include <GccEnt_QualifiedCirc.hxx>
-#include <GccAna_Lin2dTanPer.hxx>
-#include <GccAna_Lin2dTanObl.hxx>
-#include <gce_MakeLin2d.hxx>
-#include <GCE2d_MakeArcOfCircle.hxx>
-#include <Precision.hxx>
-#include <ElCLib.hxx>
-#include <AIS_Point.hxx>
-#include <TColgp_HArray1OfPnt2d.hxx>
-#include <Geom2dAPI_Interpolate.hxx>
-#include <TColgp_Array1OfVec2d.hxx>
-#include <TColStd_HArray1OfBoolean.hxx>
-#include <GeomAPI_ProjectPointOnCurve.hxx>
-#include <DsgPrs_ArrowSide.hxx>
-#include <BRepBuilderAPI_Transform.hxx>
-
-#include <AIS_Drawer.hxx>
-#include <Prs3d_TextAspect.hxx>
-#include <Prs3d_LineAspect.hxx>
-#include <Graphic3d_NameOfFont.hxx>
-
-#include <TopoDS_Wire.hxx>
-
-/*!
-  \class GEOM_Sketcher GEOM_Sketcher.h
-  \brief ...
-*/
-
-Standard_Real resol = 1.0;    
-
-/*!
-  Constructor.
-*/
-Sketch::Sketch()
-{
-
-}
-
-/*!
-  Destructor.
-*/
-Sketch::~Sketch()
-{
-
-}
-
-
-/*!
-  Constructor.
-
-  \param V3d_Viewer
-*/
-Sketch::Sketch(const Handle(V3d_Viewer)& aViewer) :
-myInteractiveContext(new AIS_InteractiveContext(aViewer)),
-myAxisColor(Quantity_Color(Quantity_NOC_YELLOW)),
-myCurrentColor(Quantity_Color(Quantity_NOC_GREEN)),
-myWireColor(Quantity_Color(Quantity_NOC_RED))
-{
-       Init();
-}
-
-/*!
-  Constructor.
-
-  \param V3d_Viewer
-  \param Quantity_Color
-  \param Quantity_Color
-  \param Quantity_Color
-*/
-Sketch::Sketch(const Handle(V3d_Viewer)& aViewer,
-              const Quantity_Color& anAxisColor,
-              const Quantity_Color& aCurrentColor,
-              const Quantity_Color& aWireColor):
-myInteractiveContext(new AIS_InteractiveContext(aViewer)),
-myAxisColor(anAxisColor),
-myCurrentColor(aCurrentColor),
-myWireColor(aWireColor)
-{
-       Init();
-}
-
-/*!
-  Build the current edge in a graphic mode.
-  The first signature with view coordinates is used to connect to the move event from the user interface.
-  The second signature is used when the current point is known by 2d real coordinates.
-
-  \param Xp     
-  \param Yp     
-  \param V3d_View       
-*/
-void Sketch::MakeCurrentEdge(const Standard_Integer  Xp   ,
-                            const Standard_Integer  Yp   ,
-                            const Handle(V3d_View)& aView )
-{
-  /* 3d coordinates of the picked point */
-  Standard_Real Xv,Yv,Zv;
-  aView->Convert(Xp,Yp,Xv,Yv,Zv);
-  /* computation of real 2d coordinates in plane of sketch */
-  Standard_Real Vx,Vy,Vz;
-  aView->Proj(Vx,Vy,Vz);
-  gp_Dir D(Vx,Vy,Vz);
-  gp_Pnt P(Xv,Yv,Zv);
-  gp_Lin L(P,D);
-  Standard_Real X,Y;
-  gp_Pnt Sol;
-  IntAna_IntConicQuad Int(L,myPlane->Pln(),Precision::Angular());
-  if (Int.IsDone()) {
-    if (!Int.IsParallel()) {
-      if (Int.NbPoints() > 0 ) {
-       Sol = Int.Point(1);
-       ElSLib::Parameters(myPlane->Pln(),Sol,X,Y);
-      }
-    }
-  }
-  MakeCurrentEdge(X,Y);
-}
-
-/*!
-  Build the current edge in a graphic mode.
-  The first signature with view coordinates is used to connect to the move event from the user interface.
-  The second signature is used when the current point is known by 2d real coordinates.
-
-  \param X      
-  \param Y      
-*/
-void Sketch::MakeCurrentEdge(const Standard_Real  X, const Standard_Real Y)
-{
-  /* Create the current edge depending on the active mode */
-  switch (myCurrentStatus) {
-  case BEGIN_SKETCH:
-    myCurrentEdge = BRepBuilderAPI_MakeVertex(ElCLib::To3d(myPlane->Pln().Position().Ax2(),gp_Pnt2d(X,Y)));
-    break;
-  case SEGMENT:
-    MakeCurrentSegment(X,Y);
-    break;
-  case ARC_CHORD:
-    MakeCurrentSegment(X,Y);
-    break;
-  case ARC_CHORD_END:
-    MakeCurrentArc(X,Y);
-    break;
-  }
-  DisplayCurrentEdge();
-}
-
-/*!
-  Build the current edge in a graphic mode.
-  Function to connect to the input event from the user interface.
-*/
-void Sketch::ValidateEdge()
-{
-  gp_Pnt pt;
-  gp_Pnt2d pt2d;
-  switch (myCurrentStatus) {
-  case BEGIN_SKETCH:
-    {
-      myFirstPointSketch = TopoDS::Vertex(myCurrentEdge);
-      myPresentableWire = new AIS_Shape(myFirstPointSketch);
-      myPresentableWire->SetColor(myWireColor.Name());
-      myInteractiveContext->Display(myPresentableWire);
-      pt = BRep_Tool::Pnt(myFirstPointSketch);
-      pt2d = ProjLib::Project(myPlane->Pln(),pt);
-      myLastX = pt2d.X();
-      myLastY = pt2d.Y();
-      myCurrentStatus = SEGMENT;
-      break;   
-    }
-  case SEGMENT:
-    {
-      Standard_Real first,last;
-      TopLoc_Location L;
-      Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(TopoDS::Edge(myCurrentEdge),myPlane,L,first,last);
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(Handle(Geom2d_Line)::DownCast(C)->Lin2d(),0.,myLengthDimension->Value());
-      if (myTransitionStatus == ANGLE || 
-         myTransitionStatus == LENGTH_FIXED ||
-         myTransitionStatus == X_FIXED ||
-         myTransitionStatus == Y_FIXED) 
-       myTransitionStatus = NOCONSTRAINT;
-      AddEdgeToWire();
-      break;
-    }
-  case ARC_CHORD:
-    {
-      myInteractiveContext->CloseLocalContext();
-      myInteractiveContext->OpenLocalContext();
-      gp_Pnt2d p1 (myLastX,myLastY);
-      pt = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(myCurrentEdge)));
-      gp_Pnt2d p2 = ProjLib::Project(myPlane->Pln(),pt);
-      GccAna_Pnt2dBisec ComputeMediatrice(p1,p2);
-      if (ComputeMediatrice.HasSolution()) {
-       myMediatrice = new Geom2d_Line(ComputeMediatrice.ThisSolution());
-       Handle(Geom_Curve) aMediatrice3d = GeomAPI::To3d(myMediatrice,myPlane->Pln());
-       myPresentableMediatrice = new AIS_Axis(Handle(Geom_Line)::DownCast(aMediatrice3d));
-       myInteractiveContext->Display(myPresentableMediatrice);
-      }
-      TopoDS_Edge e = BRepBuilderAPI_MakeEdge2d(gce_MakeCirc2d(gp_Pnt2d(0.,0),1.));
-      BRepLib::BuildCurve3d(e);
-      myLengthDimension->SetText(TCollection_ExtendedString());
-      myInteractiveContext->Redisplay(myLengthDimension,Standard_False);
-      if (myEdgesNumber == 0)
-       myPreviousEdge = TopoDS::Edge(myCurrentEdge);
-      pt2d = ProjLib::Project(myPlane->Pln(),pt);
-      myLastX = pt2d.X();
-      myLastY = pt2d.Y();
-      myTransitionStatus = NOCONSTRAINT;
-      myCurrentStatus = ARC_CHORD_END;
-      break;
-    }
-  case ARC_CHORD_END:
-    myCurrentStatus = ARC_CHORD;
-    AddEdgeToWire();   
-    break;
-  }
-}
-
-/*!
-  Add edge to current wire on an edge validation .
-*/
-void Sketch::AddEdgeToWire()
-{
-  myPreviousEdge = TopoDS::Edge(myCurrentEdge);
-  BRepLib::BuildCurve3d(myPreviousEdge);
-  myCurrentWire.Add(TopoDS::Edge(myPreviousEdge));
-  myEdgesNumber++;
-  myPresentableWire->Set( myCurrentWire.Wire() );
-  myInteractiveContext->Redisplay(myPresentableWire);
-  myConstructionMode.Append(myCurrentStatus);
-  myConstraintMode.Append(myTransitionStatus);
-  myInteractiveContext->CloseLocalContext();
-  gp_Pnt pt;
-  if (myPreviousEdge.Orientation() == TopAbs_FORWARD )
-    pt = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(myPreviousEdge)));
-  else 
-    pt = BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(myPreviousEdge)));
-  gp_Pnt2d pt2d= ProjLib::Project(myPlane->Pln(),pt);
-  myLastX = pt2d.X();
-  myLastY = pt2d.Y();
-}
-
-/*!
-  Set the numeric dimension for the current edge and validate creation.
-
-  \param aValue 
-  \return Standard_Boolean
-*/
-Standard_Boolean Sketch::SetDimension(Standard_Real& aValue)
-{
-  fitInResol(aValue); 
-  if (myCurrentStatus == SEGMENT ||
-      myCurrentStatus == ARC_CHORD){
-    Standard_Real first,last;
-    TopLoc_Location L;
-    Handle(Geom2d_Curve) C = 
-      BRep_Tool::CurveOnSurface(TopoDS::Edge(myCurrentEdge),myPlane,L,first,last);
-    myCurrentEdge = 
-      BRepBuilderAPI_MakeEdge2d(Handle(Geom2d_Line)::DownCast(C)->Lin2d(),0.,aValue);
-    DisplayCurrentEdge();
-    if (myTransitionStatus == NOCONSTRAINT) {
-      mySegmentLength = aValue;
-      myTransitionStatus = LENGTH_FIXED;
-    }
-    else
-      ValidateEdge();
-    return Standard_True;
-  }
-  
-  else if( myCurrentStatus == ARC_CHORD_END){
-    if (myTransitionStatus == TANGENT) return Standard_False;
-    gp_Pnt2d p;
-    if (myEdgesNumber > 0) {
-      if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-       p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopExp::LastVertex(myPreviousEdge)));
-      else
-       p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopExp::FirstVertex(myPreviousEdge)));
-    }
-    else
-      p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(myFirstPointSketch));
-    GccAna_Circ2d2TanRad aSol(p, gp_Pnt2d(myLastX,myLastY),aValue,Precision::Confusion());
-    Standard_Real dist = RealLast();
-    if (aSol.NbSolutions() > 0) {
-      gp_Circ2d CirSol;
-      gp_Pnt2d pc = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopoDS::Vertex(myCenterCircle->Shape())));
-      for (Standard_Integer i =1; i<= aSol.NbSolutions(); i++) {
-       if (pc.Distance(aSol.ThisSolution(i).Location()) < dist)
-         CirSol = aSol.ThisSolution(i);
-      }
-      if (myCurrentEdge.Orientation() == TopAbs_FORWARD)
-       myCurrentEdge = BRepBuilderAPI_MakeEdge2d(aSol.ThisSolution(1),p,gp_Pnt2d(myLastX,myLastY));
-      else {   
-       myCurrentEdge = BRepBuilderAPI_MakeEdge2d(aSol.ThisSolution(1),gp_Pnt2d(myLastX,myLastY),p);
-       myCurrentEdge.Reverse();
-      }        
-      DisplayCurrentEdge();
-      ValidateEdge();  
-      return Standard_True;
-    }
-  }
-  
-  return Standard_False;
-}
-
-/*!
-  Set the numeric dimension for the current edge and validate creation.
-  
-  \param deltaX 
-  \param deltaY 
-*/
-void Sketch::SetDimension(Standard_Real& deltaX, Standard_Real& deltaY)
-{
-  fitInResol(deltaX); 
-  fitInResol(deltaY);
-  Standard_Real X = myLastX + deltaX;
-  Standard_Real Y = myLastY + deltaY;
-  MakeCurrentEdge(X,Y);
-  ValidateEdge();
-}
-
-/*!
-  Set the numeric value of the X coordinate of current point giving a deltaX relative to previous point.
-
-  \param deltaX 
-*/
-void Sketch::SetXDimension(Standard_Real& deltaX)
-{
-  fitInResol(deltaX); 
-  Standard_Real X = myLastX + deltaX;
-  Standard_Real Y = myLastY;
-  if ( deltaX == 0. )
-    Y = Y + 100.0 * Precision::Confusion();
-
-  if (myTransitionStatus == NOCONSTRAINT) {
-    MakeCurrentEdge(X,Y);
-    myTransitionStatus = X_FIXED;
-    mySegmentX = X;
-  }
-  else if (myTransitionStatus == Y_FIXED) {
-    myTransitionStatus = NOCONSTRAINT;
-    MakeCurrentEdge(X,mySegmentY);
-    ValidateEdge();
-  }
-  else if (myTransitionStatus == ANGLE) {
-    myTransitionStatus = NOCONSTRAINT;
-    Standard_Real angle;
-    if (0 <= mySegmentAngle &&  mySegmentAngle<= PI )
-      angle = PI - mySegmentAngle;
-    else
-      angle = mySegmentAngle - PI;
-    Y = X*Tan(angle);
-    MakeCurrentEdge(X,Y);
-    ValidateEdge();
-  }
-  else
-    myTransitionStatus = NOCONSTRAINT;
-}
-
-/*!
-  Set the numeric value of the Y coordinate of current point giving a deltaY relative to previous point.
-
-  \param deltaY 
-*/
-void Sketch::SetYDimension(Standard_Real& deltaY)
-{
-  fitInResol(deltaY); 
-  Standard_Real X = myLastX;
-  Standard_Real Y = myLastY + deltaY;
-
-  if ( deltaY == 0. )
-    X = X + 100.0 * Precision::Confusion();
-
-  if (myTransitionStatus == NOCONSTRAINT) {
-    MakeCurrentEdge(X,Y);
-    myTransitionStatus = Y_FIXED;
-    mySegmentY = Y;
-  }
-  else if (myTransitionStatus == X_FIXED) {
-    myTransitionStatus = NOCONSTRAINT;
-    MakeCurrentEdge(mySegmentX,Y);
-    ValidateEdge();
-  }
-  else if (myTransitionStatus == ANGLE) {
-    myTransitionStatus = NOCONSTRAINT;
-    Standard_Real angle;
-    if (0 <= mySegmentAngle &&  mySegmentAngle<= PI )
-      angle = PI - mySegmentAngle;
-    else
-      angle = mySegmentAngle - PI;
-    X = Y/Tan(angle);
-    MakeCurrentEdge(X,Y);
-    ValidateEdge();
-  }
-  else
-    myTransitionStatus = NOCONSTRAINT;
-}
-
-/*!
-  Set the numeric value of angle between 2 segments.
-
-  \param aValue 
-*/
-void Sketch::SetSegmentAngle(Standard_Real& aValue)
-{
-  if (myEdgesNumber > 0) {
-    Standard_Real First,Last;
-    TopLoc_Location L;
-    Standard_Real angle;
-    if (0 <= aValue &&  aValue<= PI )
-      angle = PI - aValue;
-    else
-      angle = aValue - PI;
-    Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,First,Last);
-    if (PreviousCurve->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(TopoDS::Edge(myPreviousEdge),myPlane,L,First,Last);
-      
-      GccAna_Lin2dTanObl aSol(gp_Pnt2d(myLastX,myLastY),Handle(Geom2d_Line)::DownCast(PreviousCurve)->Lin2d(),angle);
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(aSol.ThisSolution(1),0.,myLengthDimension->Value());
-    }
-    if (myTransitionStatus == LENGTH_FIXED)  {
-      ValidateEdge();
-    }
-    else if (myTransitionStatus == X_FIXED)  {
-      Standard_Real length = mySegmentX/Cos(angle);
-      SetDimension(length);
-      ValidateEdge();
-    }
-    else if (myTransitionStatus == Y_FIXED)  {
-      Standard_Real length = mySegmentY/Sin(angle);
-      SetDimension(length);
-      ValidateEdge();
-    }
-    else {
-      mySegmentAngle = aValue;
-      myTransitionStatus = ANGLE;
-    }
-  }
-}
-
-/*!
-  Get the angle value between 2 segments.
-
-  \return Standard_Real
-*/
-Standard_Real Sketch::GetSegmentAngle()
-{
-  return mySegmentAngle;
-}
-
-/*!
-  Close automatically an open sketch.
-
-  \return TopoDS_Wire.  Return null shape if not possible.
-*/
-TopoDS_Wire Sketch::Close()
-{ 
-  myCurrentStatus = END_SKETCH;
-  myInteractiveContext->CloseAllContexts();
-  myInteractiveContext->EraseAll(Standard_False);
-  if (myEdgesNumber >= 2) {
-    BRepTools_WireExplorer Ex(myCurrentWire.Wire());
-    TopoDS_Vertex V1;
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-      V1 = TopExp::LastVertex(myPreviousEdge);
-    else
-      V1 = TopExp::FirstVertex(myPreviousEdge);
-    myCurrentWire.Add(BRepBuilderAPI_MakeEdge(V1,myFirstPointSketch).Edge());
-    myEdgesNumber++;
-    return myCurrentWire.Wire();
-  }
-  else
-    return TopoDS_Wire();
-}
-
-
-
-/*!
-  Clear sketch presentation.
-*/
-void Sketch::Clear()
-{
-  myCurrentStatus = END_SKETCH;
-  myInteractiveContext->CloseAllContexts();
-  myInteractiveContext->EraseAll(Standard_False);
-}
-
-/*!
-  Terminate sketch without closing.
-
-  \return TopoDS_Wire. Return null shape if not possible.
-*/
-TopoDS_Wire Sketch::End()
-{
-  myCurrentStatus = END_SKETCH;
-  myInteractiveContext->CloseAllContexts();
-  myInteractiveContext->EraseAll(Standard_False);
-  if (myCurrentWire.IsDone()) {
-    return myCurrentWire.Wire();
-  }
-  else
-    return TopoDS_Wire();
-}
-
-
-/*!
-  Delete current edge.
-*/
-Standard_Boolean Sketch::Delete()
-{
-  myInteractiveContext->Erase(myAngleDimension,Standard_True,Standard_False);
-  myInteractiveContext->Erase(myLengthDimension,Standard_True,Standard_False);
-  myInteractiveContext->Erase(myRadiusDimension,Standard_True,Standard_False);
-  myInteractiveContext->Erase(myCenterCircle,Standard_True,Standard_False);
-  myInteractiveContext->Erase(myXDimension,Standard_True,Standard_False);
-  myInteractiveContext->Erase(myYDimension,Standard_True,Standard_False);
-  
-  if (myCurrentStatus == BEGIN_SKETCH) {
-    myCurrentStatus = END_SKETCH;
-    myInteractiveContext->CloseAllContexts();
-    myInteractiveContext->EraseAll(Standard_False);
-    return true;
-  }
-  else if(myCurrentStatus == SEGMENT   ||
-         myCurrentStatus == ARC_CHORD ) {
-    RemoveLastEdge();
-  }
-  else if(myCurrentStatus ==  ARC_CHORD_END) {
-    myCurrentStatus = ARC_CHORD;
-    myInteractiveContext->CloseAllContexts();
-  }
-  gp_Pnt pt;
-  if (myEdgesNumber == 0) {
-    //myInteractiveContext->EraseAll(Standard_False);
-    ChangeMode(BEGIN_SKETCH); // DCQ
-    pt = BRep_Tool::Pnt(myFirstPointSketch);
-  }
-  else {
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD )
-      pt = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(myPreviousEdge)));
-    else 
-      pt = BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(myPreviousEdge)));
-  }
-  gp_Pnt2d pt2d= ProjLib::Project(myPlane->Pln(),pt);
-  myLastX = pt2d.X();
-  myLastY = pt2d.Y();
-
-  return false;
-}
-
-/*!
-  Set a specific plane for sketch.
-
-  \param GeomyPlane     
-*/
-void Sketch::SetPlane(const Handle(Geom_Plane)& aPlane)
-{
-  myPlane = aPlane;
-}
-
-/*!
-  Set display parameters.
-
-  \param aColor 
-*/
-void Sketch::SetWireColor(const Quantity_Color& aColor)
-{
-  myWireColor = aColor;
-}
-
-/*!
-  Set display parameters.
-
-  \param aColor 
-*/
-void Sketch::SetCurrentColor(const Quantity_Color& aColor)
-{
-  myCurrentColor = aColor;
-}
-
-/*!
-  Set display parameters.
-  
-  \param aColor 
-*/
-void Sketch::SetAxisColor(const Quantity_Color& aColor)
-{
-  myAxisColor = aColor;
-}
-
-
-/*!
-  Change mode of construction line.
-
-  \param aMode : SEGMENT, ARC_CHORD.
-*/
-void Sketch::ChangeMode(const SketchStatus aMode)
-{
-  gp_Pnt2d p;
-  if (myEdgesNumber > 0) {
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-      p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopExp::LastVertex(myPreviousEdge)));
-    else
-      p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopExp::FirstVertex(myPreviousEdge)));
-    myLastX = p.X();
-    myLastY = p.Y();
-    myInteractiveContext->CloseLocalContext(myInteractiveContext->IndexOfCurrentLocal());
-  }
-  if (!myCurrentStatus == BEGIN_SKETCH) 
-    myCurrentStatus = aMode; /* change the mode only when the sketch is not in state BEGIN_SKETCH, i.d. fist point has been fixed */
-
-}
-
-/*!
-  Set transition constraint between consecutive edges.
-
-  \param aStatus : NOCONSTRAINT, TANGENT, PERPENDICULAR, ANGLE, LENGTH_FIXED, X_FIXED, Y_FIXED.
-*/
-void Sketch::SetTransitionStatus(const TransitionStatus aStatus)
-{
-  myTransitionStatus = aStatus;
-}
-
-/*!
-  Set or unset the display of dimensions.
-
-  \param atype  
-  \param OnOff  
-*/
-void Sketch::SetParameterVisibility(const TypeOfParameter atype, const Standard_Boolean OnOff)
-{
-  switch (atype) {
-  case ANGLE_PARAMETER:
-    myIsAngleDimensionVisible = OnOff;
-    if (!myIsAngleDimensionVisible && !myAngleDimension.IsNull())
-      myInteractiveContext->Erase(myAngleDimension,Standard_True,Standard_False);
-    //else DCQ
-    //  DisplayCurrentEdge();
-    break;
-  case LENGTH_PARAMETER:
-    myIsLengthDimensionVisible = OnOff;
-    if (!myIsLengthDimensionVisible&& !myLengthDimension.IsNull())
-      myInteractiveContext->Erase(myLengthDimension,Standard_True,Standard_False);
-    //else DCQ
-    //  DisplayCurrentEdge();
-    break;
-  case RADIUS_PARAMETER:
-    myIsRadiusDimensionVisible = OnOff;
-    if (!myIsRadiusDimensionVisible&& !myRadiusDimension.IsNull()){
-      myInteractiveContext->Erase(myRadiusDimension,Standard_True,Standard_False);
-      myInteractiveContext->Erase(myCenterCircle,Standard_True,Standard_False);
-    }
-    //else DCQ
-    //  DisplayCurrentEdge();
-    break;
-  case XVALUE_PARAMETER:
-    myIsXDimensionVisible = OnOff;
-    if (!myIsXDimensionVisible&& !myXDimension.IsNull())
-      myInteractiveContext->Erase(myXDimension,Standard_True,Standard_False);
-    break;
-  case YVALUE_PARAMETER:
-    myIsYDimensionVisible = OnOff;
-    if (!myIsYDimensionVisible&& !myYDimension.IsNull())
-      myInteractiveContext->Erase(myYDimension,Standard_True,Standard_False);
-    break;
-  }
-}
-
-/*!
-  Hilight parameters.
-
-  \param atype  
-  \param acolor 
-*/
-void Sketch::HiligthWithColor(const TypeOfParameter atype, const Quantity_NameOfColor acolor)
-{
-  switch (atype) {
-  case ANGLE_PARAMETER:
-    myInteractiveContext->HilightWithColor(myAngleDimension, acolor);
-    break;
-  case LENGTH_PARAMETER:
-    myInteractiveContext->HilightWithColor(myLengthDimension, acolor);
-    break;
-  case RADIUS_PARAMETER:
-    myInteractiveContext->HilightWithColor(myRadiusDimension, acolor);
-    break;
-  case XVALUE_PARAMETER:
-    myInteractiveContext->HilightWithColor(myXDimension, acolor);
-    break;
-  case YVALUE_PARAMETER:
-    myInteractiveContext->HilightWithColor(myYDimension, acolor);
-    break;
-  }
-}
-
-       
-/*!
-  Unhilight parameters.
-
-  \param atype  
-*/
-void Sketch::Unhiligth(const TypeOfParameter atype)
-{
-  switch (atype) {
-  case ANGLE_PARAMETER:
-    myInteractiveContext->Unhilight(myAngleDimension);
-    break;
-  case LENGTH_PARAMETER:
-    myInteractiveContext->Unhilight(myLengthDimension);
-    break;
-  case RADIUS_PARAMETER:
-    myInteractiveContext->Unhilight(myRadiusDimension);
-    break;
-  case XVALUE_PARAMETER:
-    myInteractiveContext->Unhilight(myXDimension);
-    break;
-  case YVALUE_PARAMETER:
-    myInteractiveContext->Unhilight(myYDimension);
-    break;
-  }
-}
-
-/*!
-  Check if the edition of a type of parameter is relevant depending on sketch current status.
-
-  \param atype  
-  \return Standard_Boolean
-*/
-Standard_Boolean Sketch::IsValidCurrentParameter(const TypeOfParameter atype)
-{
-  switch (atype) {
-  case ANGLE_PARAMETER:
-    if (myCurrentStatus != SEGMENT && myCurrentStatus != ARC_CHORD) 
-      return Standard_False;
-    else if (myTransitionStatus == TANGENT || myTransitionStatus == PERPENDICULAR)  
-      return Standard_False;
-    else if (myEdgesNumber < 1)
-      return Standard_False;
-    else  {
-      TopLoc_Location L;
-      Standard_Real First,Last;
-      Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,First,Last);
-      if (!PreviousCurve->IsKind(STANDARD_TYPE(Geom2d_Line))) 
-       return Standard_False;
-    }
-    break;
-  case LENGTH_PARAMETER:
-    if (myCurrentStatus != SEGMENT   && 
-       myCurrentStatus != ARC_CHORD /*&&
-                                         myCurrentStatus != CURVE_POINTS*/
-       ) 
-      return Standard_False;
-    else if (myTransitionStatus == LENGTH_FIXED) 
-      return Standard_False;
-    break;
-  case RADIUS_PARAMETER:
-    if (myCurrentStatus != ARC_CHORD_END)
-      return Standard_False;
-    break;
-  case XVALUE_PARAMETER:
-    if (myCurrentStatus != SEGMENT   && 
-       myCurrentStatus != ARC_CHORD /*&&
-                                         myCurrentStatus != CURVE_POINTS*/
-       ) 
-      return Standard_False;
-    else if (myTransitionStatus == X_FIXED) 
-      return Standard_False;
-    break;
-  case YVALUE_PARAMETER:
-    if (myCurrentStatus != SEGMENT   && 
-       myCurrentStatus != ARC_CHORD /*&&
-                                         myCurrentStatus != CURVE_POINTS*/
-       ) 
-      return Standard_False;
-    else if (myTransitionStatus == Y_FIXED) 
-      return Standard_False;
-    break;
-  }
-  return Standard_True;
-}
-
-/*!
-  Set a parameter value.
-
-  \param atype  
-  \param aValue 
-*/
-void Sketch::SetParameterValue(const TypeOfParameter atype, Standard_Real aValue)
-{
-  switch (atype) {
-  case ANGLE_PARAMETER:
-    SetSegmentAngle(aValue);
-    break;
-  case LENGTH_PARAMETER:
-    SetDimension(aValue);
-    break;
-  case RADIUS_PARAMETER:
-    SetDimension(aValue);
-    break;
-  case XVALUE_PARAMETER:
-    SetXDimension(aValue);
-    break;
-  case YVALUE_PARAMETER:
-    SetYDimension(aValue);
-    break;
-  }
-}
-
-/*!
-  Initialisation of sketch parameters or options.
-*/
-void Sketch::Init()
-{
-  myPlane = new Geom_Plane (0.,0.,1.,0.);
-  CreateConstraints();
-  BRepLib::Plane(myPlane);
-  myEdgesNumber = 0;
-  myCurrentStatus = BEGIN_SKETCH;
-  /* In order to update the visulisation of current objects by using Redisplay method from InteractiveContext */
-  myCurrentEdge = BRepBuilderAPI_MakeVertex(gp_Pnt(0.,0.,0.));         
-  myPresentableEdge = new AIS_Shape(myCurrentEdge);
-  myPresentableEdge->SetColor(myCurrentColor.Name());
-  myInteractiveContext->Display(myPresentableEdge);
-  myTransitionStatus = NOCONSTRAINT;
-  /* Init for display objects */
-  TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(gp_Pnt(0.,0.,0.));
-  TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(gp_Pnt(10.,0.,0.));
-  myLengthDimension = new AIS_LengthDimension (V1,V2,myPlane,0.,TCollection_ExtendedString());
-  myXDimension = new AIS_LengthDimension (V1,V2,myPlane,0.,TCollection_ExtendedString(),gp_Pnt(),DsgPrs_AS_NONE,
-                                         AIS_TOD_Horizontal);
-  myYDimension = new AIS_LengthDimension (V1,V2,myPlane,0.,TCollection_ExtendedString(),gp_Pnt(),DsgPrs_AS_NONE,
-                                         AIS_TOD_Vertical);
-  myRadiusDimension = new AIS_LengthDimension (V1,V2,myPlane,0.,TCollection_ExtendedString());
-  myCenterCircle = new AIS_Shape(V1);
-  myIsLengthDimensionVisible = Standard_False;
-  myIsXDimensionVisible = Standard_False;
-  myIsYDimensionVisible = Standard_False;
-  myIsRadiusDimensionVisible = Standard_False;
-}
-
-/*!
-  Build the current segment.
-
-  \param X      
-  \param Y      
-*/
-void Sketch::MakeCurrentSegment(Standard_Real X, Standard_Real Y)
-{
-  if (myTransitionStatus == NOCONSTRAINT) 
-    myCurrentEdge = BRepBuilderAPI_MakeEdge2d(gp_Pnt2d(myLastX,myLastY), gp_Pnt2d(X,Y));
-  else if (myTransitionStatus == X_FIXED) 
-    myCurrentEdge = BRepBuilderAPI_MakeEdge2d(gp_Pnt2d(myLastX,myLastY),gp_Pnt2d(mySegmentX,Y));
-  else if (myTransitionStatus == Y_FIXED) 
-    myCurrentEdge = BRepBuilderAPI_MakeEdge2d(gp_Pnt2d(myLastX,myLastY),gp_Pnt2d(X,mySegmentY));
-  else if (myTransitionStatus == TANGENT && myEdgesNumber > 0) {
-    Standard_Real first,last;
-    TopLoc_Location L;
-    Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,first,last);
-    gp_Pnt2d p1;
-    gp_Vec2d Vt;
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-      C->D1(last,p1,Vt);
-    else 
-      C->D1(first,p1,Vt);
-    gp_Lin2d aline(p1,Vt);
-    Geom2dAPI_ProjectPointOnCurve proj(gp_Pnt2d(X,Y),new Geom2d_Line(aline));
-    if (proj.NbPoints() > 0)
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(p1,proj.Point(1));
-  }
-  else if (myTransitionStatus == PERPENDICULAR && myEdgesNumber > 0) {
-    Standard_Real first,last;
-    TopLoc_Location L;
-    Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,first,last);
-    gp_Pnt2d p1;
-    gp_Lin2d perpen;
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-      C->D0(last,p1);
-    else 
-      C->D0(first,p1);
-    if (C->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      GccAna_Lin2dTanPer aSol(p1,Handle(Geom2d_Line)::DownCast(C)->Lin2d());
-      perpen = aSol.ThisSolution(1);
-    }
-    else if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) {
-      GccAna_Lin2dTanPer aSol(p1,Handle(Geom2d_Circle)::DownCast(C)->Circ2d());
-      perpen = aSol.ThisSolution(1);
-    }
-    Geom2dAPI_ProjectPointOnCurve proj(gp_Pnt2d(X,Y),new Geom2d_Line(perpen));
-    if (proj.NbPoints() > 0)
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(p1,proj.Point(1));
-  }
-  else if (myTransitionStatus == ANGLE && myEdgesNumber > 0) {
-    Standard_Real First,Last;
-    TopLoc_Location L;
-    Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,First,Last);
-    if (PreviousCurve->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(TopoDS::Edge(myPreviousEdge),myPlane,L,First,Last);
-      Standard_Real angle;
-      if (0 <= mySegmentAngle &&  mySegmentAngle<= PI )
-       angle = PI - mySegmentAngle;
-      else
-       angle = mySegmentAngle - PI;
-      GccAna_Lin2dTanObl aSol(gp_Pnt2d(myLastX,myLastY),Handle(Geom2d_Line)::DownCast(PreviousCurve)->Lin2d(),angle);
-      Standard_Real dist = RealLast();
-      gp_Pnt2d pt(X,Y),ptproj;
-      for (Standard_Integer i =1; i<=aSol.NbSolutions(); i++) {
-       Geom2dAPI_ProjectPointOnCurve proj(pt,new Geom2d_Line(aSol.ThisSolution(i)));
-       if (pt.Distance(proj.Point(1)) < dist) {
-         dist = pt.Distance(proj.Point(1));
-         ptproj = proj.Point(1);
-       }
-      }
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(gp_Pnt2d(myLastX,myLastY),ptproj);
-    }
-  }
-  else if (myTransitionStatus == LENGTH_FIXED && myEdgesNumber > 0) {
-    Standard_Real First,Last;
-    TopLoc_Location L;
-    Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,First,Last);
-    if (PreviousCurve->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(TopoDS::Edge(myPreviousEdge),myPlane,L,First,Last);
-      gp_Lin2d aline = gce_MakeLin2d(gp_Pnt2d(myLastX,myLastY), gp_Pnt2d(X,Y));
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(aline,0.,mySegmentLength);
-    }
-  }
-}
-
-/*!
-  Build the current arc.
-
-  \param X      
-  \param Y      
-*/
-void Sketch::MakeCurrentArc(Standard_Real X, Standard_Real Y)
-{
-  gp_Circ2d CircSol;
-  Standard_Boolean OK(Standard_False);
-
-  if (myTransitionStatus == NOCONSTRAINT) {
-    GccAna_Circ2d2TanOn aSol(gp_Pnt2d(myLastX,myLastY), gp_Pnt2d(X,Y),myMediatrice->Lin2d(),Precision::Confusion());
-    if (aSol.NbSolutions() > 0){
-      CircSol = aSol.ThisSolution(1);
-      OK = Standard_True;
-    }
-  }
-  /* Tangency with previous edge */
-  else if (myTransitionStatus == TANGENT && myEdgesNumber > 0) {
-    Standard_Real first,last;
-    TopLoc_Location L;
-    Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,first,last);
-    if (C->IsKind(STANDARD_TYPE(Geom2d_Line))){
-      GccAna_Circ2d2TanOn aSol(GccEnt::Unqualified(Handle(Geom2d_Line)::DownCast(C)->Lin2d()), gp_Pnt2d(myLastX,myLastY),myMediatrice->Lin2d(),Precision::Confusion());
-      if (aSol.NbSolutions() > 0){
-       CircSol = aSol.ThisSolution(1);
-       OK = Standard_True;
-      }
-    }
-    else if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) {
-      GccAna_Circ2d2TanOn aSol(GccEnt::Unqualified(Handle(Geom2d_Circle)::DownCast(C)->Circ2d()), gp_Pnt2d(myLastX,myLastY),myMediatrice->Lin2d(),Precision::Confusion());
-      if (aSol.NbSolutions() > 0){
-       CircSol = aSol.ThisSolution(1);
-       OK = Standard_True;
-      }
-    }
-    else if(C->IsKind(STANDARD_TYPE(Geom2d_BSplineCurve))) {
-      gp_Pnt2d pc;
-      gp_Vec2d Vt;
-      C->D1(last,pc,Vt);
-      gp_Lin2d alin2d(pc,gp_Dir2d(Vt));
-      GccAna_Circ2d2TanOn aSol(GccEnt::Unqualified(alin2d), gp_Pnt2d(myLastX,myLastY),myMediatrice->Lin2d(),Precision::Confusion());
-      if (aSol.NbSolutions() > 0){
-       CircSol = aSol.ThisSolution(1);
-       OK = Standard_True;
-      }
-    }
-  }
-  /* Tangency with the perpendicular to the previous edge */
-  else if (myTransitionStatus == PERPENDICULAR && myEdgesNumber > 0) {
-    Standard_Real first,last;
-    TopLoc_Location L;
-    Handle(Geom2d_Curve) C = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,first,last);
-    gp_Pnt2d p1;
-    gp_Lin2d perpen;
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-      C->D0(last,p1);
-    else 
-      C->D0(first,p1);
-    if (C->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      GccAna_Lin2dTanPer aSol(p1,Handle(Geom2d_Line)::DownCast(C)->Lin2d());
-      perpen = aSol.ThisSolution(1);
-    }
-    else if (C->IsKind(STANDARD_TYPE(Geom2d_Circle))) {
-      GccAna_Lin2dTanPer aSol(p1,Handle(Geom2d_Circle)::DownCast(C)->Circ2d());
-      perpen = aSol.ThisSolution(1);
-    }
-    GccAna_Circ2d2TanOn aSol(GccEnt::Unqualified(perpen), gp_Pnt2d(myLastX,myLastY),myMediatrice->Lin2d(),Precision::Confusion());
-    if (aSol.NbSolutions() > 0){
-      CircSol = aSol.ThisSolution(1);
-      OK = Standard_True;
-    }
-  }
-
-  gp_Pnt2d p;
-  if (myEdgesNumber > 0) {
-    if (myPreviousEdge.Orientation() == TopAbs_FORWARD)
-      p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopExp::LastVertex(myPreviousEdge)));
-    else
-      p = ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(TopExp::FirstVertex(myPreviousEdge)));
-  }
-  else
-    p =  ProjLib::Project(myPlane->Pln(),BRep_Tool::Pnt(myFirstPointSketch));
-  if (OK){
-    gp_Vec2d V1(p,gp_Pnt2d(X,Y));
-    gp_Vec2d V2(p,gp_Pnt2d(myLastX,myLastY));
-    if (V1.Angle(V2) > 0 )
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(CircSol,p,gp_Pnt2d(myLastX,myLastY));
-    else {     
-      myCurrentEdge = BRepBuilderAPI_MakeEdge2d(CircSol,gp_Pnt2d(myLastX,myLastY),p);
-      myCurrentEdge.Reverse();
-    }
-  }
-  else {
-    myCurrentStatus = ARC_CHORD;
-    myLastX = p.X();
-    myLastY = p.Y();
-    myInteractiveContext->CloseLocalContext();
-  }
-
-}
-
-/*!
-  Display the current edge under construction with it's dimension.
-*/
-void Sketch::DisplayCurrentEdge()
-{
-  myPresentableEdge->Set(myCurrentEdge);
-  myInteractiveContext->Redisplay(myPresentableEdge);
-  if (myCurrentStatus == SEGMENT ||
-      myCurrentStatus == ARC_CHORD ) {
-    /* Length dimension */
-    TopoDS_Vertex V1 = TopExp::FirstVertex(TopoDS::Edge(myCurrentEdge));
-    TopoDS_Vertex V2 = TopExp::LastVertex(TopoDS::Edge(myCurrentEdge));
-    DisplayLengthDimension(V1,V2);
-    /* Angular dimension */
-    DisplayAngleDimension();
-    DisplayXDimension(V1,V2);
-    DisplayYDimension(V1,V2);
-  }
-  else if (myCurrentStatus == ARC_CHORD_END ) 
-    DisplayRadiusDimension();
-  else {
-    TopoDS_Vertex V1 = TopoDS::Vertex(myCurrentEdge);
-    TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(gp_Pnt(0.,0.,0.));
-    DisplayXDimension(V1,V2);
-    DisplayYDimension(V1,V2);
-  }
-    
-}
-
-/*!
-  Display the current length dimension.
-
-  \param V1     
-  \param V2     
-*/
-void Sketch::DisplayLengthDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2)
-{
-  gp_Pnt p1 = BRep_Tool::Pnt(TopoDS::Vertex(V1));
-  gp_Pnt p2 = BRep_Tool::Pnt(TopoDS::Vertex(V2));
-  Standard_Real length = p1.Distance(p2);
-  if (length <= Precision::Confusion()) return;
-  myLengthDimension->SetFirstShape(V1);
-  myLengthDimension->SetSecondShape(V2);
-  fitInResol(length);
-  myLengthDimension->SetValue(length);
-  QString S;
-  S.sprintf("%.1f",length);
-  myLengthDimension->SetText(TCollection_ExtendedString(strdup(S)));
-  if (myIsLengthDimensionVisible) {
-    if (myInteractiveContext->IsDisplayed(myLengthDimension))
-      myInteractiveContext->Redisplay(myLengthDimension);
-    else
-      myInteractiveContext->Display(myLengthDimension);
-  }
-}
-
-/*!
-  Display the current X dimension.
-
-  \param V1     
-  \param V2     
-*/
-void Sketch::DisplayXDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2)
-{
-  if (myTransitionStatus != X_FIXED) {
-  gp_Pnt p1 = BRep_Tool::Pnt(TopoDS::Vertex(V1));
-  gp_Pnt p2 = BRep_Tool::Pnt(TopoDS::Vertex(V2));
-
-  gp_Lin aline(p1,myPlane->Pln().XAxis().Direction());
-  GeomAPI_ProjectPointOnCurve proj(p2,new Geom_Line(aline));
-
-  gp_Pnt pb = p1;
-
-  if (proj.NbPoints() > 0) {
-    Standard_Real length = p1.Distance(proj.Point(1));
-    if (length <= Precision::Confusion()) return;
-    myXDimension->SetFirstShape(V1);
-    myXDimension->SetSecondShape(V2);
-    fitInResol(length);
-    myXDimension->SetValue(length);
-    QString S;
-    S.sprintf("%.1f",length);
-    myXDimension->SetText(TCollection_ExtendedString(strdup(S)));
-    //    myXDimension->SetPosition(proj.Point(1));
-    pb.BaryCenter(5,proj.Point(1),5);
-    myXDimension->SetPosition(pb);
-    if (myIsXDimensionVisible) {
-      if (myInteractiveContext->IsDisplayed(myXDimension))
-       myInteractiveContext->Redisplay(myXDimension);
-      else
-       myInteractiveContext->Display(myXDimension);
-    }
-  }
-  } else
-    myInteractiveContext->Erase(myXDimension,Standard_True,Standard_False);
-}
-
-/*!
-  Display the current Y dimension.
-
-  \param V1     
-  \param V2     
-*/
-void Sketch::DisplayYDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2)
-{
-  if (myTransitionStatus != Y_FIXED) {
-
-  gp_Pnt p1 = BRep_Tool::Pnt(TopoDS::Vertex(V1));
-  gp_Pnt p2 = BRep_Tool::Pnt(TopoDS::Vertex(V2));
-  gp_Lin aline(p2 /*p1*/, myPlane->Pln().YAxis().Direction());
-  gp_Pnt pb = p2 /*p1*/;
-  GeomAPI_ProjectPointOnCurve proj(p1 /*p2*/,new Geom_Line(aline));
-  if (proj.NbPoints() > 0) {
-    Standard_Real length = /*p1*/ p2.Distance(proj.Point(1));
-    if (length <= Precision::Confusion()) return;
-    myYDimension->SetFirstShape(V1);
-    myYDimension->SetSecondShape(V2);
-    fitInResol(length);
-    myYDimension->SetValue(length);
-    QString S;
-    S.sprintf("%.1f",length);
-    myYDimension->SetText(TCollection_ExtendedString(strdup(S)));
-    pb.BaryCenter(5,proj.Point(1),5);
-    myYDimension->SetPosition(pb);
-    //    myYDimension->SetPosition(p2);
-    if (myIsYDimensionVisible) {
-      if (myInteractiveContext->IsDisplayed(myYDimension))
-       myInteractiveContext->Redisplay(myYDimension);
-      else
-       myInteractiveContext->Display(myYDimension);
-    }
-  }
-  } else
-    myInteractiveContext->Erase(myYDimension,Standard_True,Standard_False);
-}
-
-/*!
-  Display the current angle dimension.
-*/
-void Sketch::DisplayAngleDimension()
-{
-  if (!myIsAngleDimensionVisible)
-    return;
-  if (myEdgesNumber > 0) {
-    Standard_Real First,Last;
-    TopLoc_Location L;
-    Handle (Geom2d_Curve) PreviousCurve = BRep_Tool::CurveOnSurface(myPreviousEdge,myPlane,L,First,Last);
-    Handle (Geom2d_Curve) CurrentCurve = BRep_Tool::CurveOnSurface(TopoDS::Edge(myCurrentEdge),myPlane,L,First,Last);
-    if (PreviousCurve->IsKind(STANDARD_TYPE(Geom2d_Line)) && CurrentCurve->IsKind(STANDARD_TYPE(Geom2d_Line))) {
-      Standard_Real angle = Handle(Geom2d_Line)::DownCast(PreviousCurve)->Lin2d().Angle(Handle(Geom2d_Line)::DownCast(CurrentCurve)->Lin2d());
-      gp_Pnt2d apos;
-      if (0 <= angle && angle<= PI) 
-       angle = PI - angle;
-      else 
-       angle = PI + angle;
-      CurrentCurve->D0((First+Last)/5.,apos);
-      gp_Pnt apos3d = ElCLib::To3d(myPlane->Pln().Position().Ax2(),apos);
-      Standard_Real angtext = angle*180./PI;
-      mySegmentAngle = angle;
-      BRepLib::BuildCurve3d(TopoDS::Edge(myCurrentEdge));
-      fitInResol(angtext);
-                       
-      QString S;
-      S.sprintf("%.1f",angtext);
-      if (myInteractiveContext->IndexOfCurrentLocal() == 0) {
-       myInteractiveContext->OpenLocalContext();
-       myAngleDimension = new AIS_AngleDimension(myPreviousEdge,TopoDS::Edge(myCurrentEdge),myPlane,angle,
-                                                 TCollection_ExtendedString(strdup(S)));
-       myInteractiveContext->Display(myAngleDimension);
-      }
-      else {
-       myAngleDimension->SetSecondShape(myCurrentEdge);
-       myAngleDimension->SetValue(angle);
-       myAngleDimension->SetPosition(apos3d);
-       myAngleDimension->SetText(TCollection_ExtendedString(strdup(S)));
-       myInteractiveContext->Redisplay(myAngleDimension);
-      }
-    }
-  }
-}
-
-/*!
-  Display the current radius dimension.
-*/
-void Sketch::DisplayRadiusDimension()
-{
-  if (! myIsRadiusDimensionVisible)
-    return;
-  BRepLib::BuildCurve3d(TopoDS::Edge(myCurrentEdge));
-  Standard_Real First,Last;
-  Handle (Geom_Circle) C = Handle (Geom_Circle)::DownCast(BRep_Tool::Curve(TopoDS::Edge(myCurrentEdge),First,Last));
-  if (!C.IsNull()) {
-    Standard_Real R = C->Radius();
-    TopoDS_Shape V1 = BRepBuilderAPI_MakeVertex(C->Location());
-    gp_Pnt MidlePoint ;
-    C->D0((First+Last)/2.,MidlePoint);
-    TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(MidlePoint);
-    myRadiusDimension->SetFirstShape(V1);
-    myRadiusDimension->SetSecondShape(V2);
-    myRadiusDimension->SetValue(R);
-    fitInResol(R);
-    QString S;
-    S.sprintf("%.1f",R);
-    myRadiusDimension->SetText(TCollection_ExtendedString(strdup(S)));
-    if (myInteractiveContext->IsDisplayed(myRadiusDimension))
-      myInteractiveContext->Redisplay(myRadiusDimension);
-    else
-      myInteractiveContext->Display(myRadiusDimension);
-    myCenterCircle->Set(V1);
-    if (myInteractiveContext->IsDisplayed(myCenterCircle))
-      myInteractiveContext->Redisplay(myCenterCircle);
-    else
-      myInteractiveContext->Display(myCenterCircle);
-  }
-}
-
-/*!
-  Remove last edge from the current wire.
-*/
-void Sketch::RemoveLastEdge()
-{
-  if (myEdgesNumber == 0) {
-    myCurrentStatus = END_SKETCH;
-    myInteractiveContext->CloseAllContexts();
-    myInteractiveContext->EraseAll(Standard_False);
-    return;
-  }
-  else {
-    BRepTools_WireExplorer Ex;
-    BRepBuilderAPI_MakeWire MW;
-    Standard_Integer index = 1;
-    myCurrentEdge = myPreviousEdge;
-    for (Ex.Init(myCurrentWire.Wire());Ex.More();Ex.Next()){
-      if (index <= myEdgesNumber-1) {
-       MW.Add(Ex.Current());
-       myPreviousEdge = Ex.Current();
-       index++;
-      }
-    }
-    myCurrentWire = MW;
-    myCurrentStatus = (SketchStatus)myConstructionMode(myEdgesNumber);
-    myTransitionStatus = (TransitionStatus)myConstraintMode(myEdgesNumber);
-    myEdgesNumber--;
-    myConstructionMode.Remove(index);
-    myConstraintMode.Remove(index);
-    if (myEdgesNumber == 0) 
-      myPresentableWire->Set(myFirstPointSketch);
-    else
-      myPresentableWire->Set(myCurrentWire.Wire());
-    myInteractiveContext->Redisplay(myPresentableWire);
-    myInteractiveContext->CloseLocalContext();
-    myPresentableEdge->Set(myCurrentEdge);
-    myInteractiveContext->Redisplay(myPresentableEdge);
-  }
-}
-
-/*!
-  Create initial constraints.
-*/
-void Sketch::CreateConstraints()
-{
-  Handle(Geom_Axis1Placement) xAxis = new Geom_Axis1Placement(myPlane->Pln().XAxis());
-  Handle(Geom_Axis1Placement) yAxis = new Geom_Axis1Placement(myPlane->Pln().YAxis());
-  myHAxis = new AIS_Axis(xAxis);
-  myVAxis = new AIS_Axis(yAxis);
-  myAngularAxis = myVAxis;
-  myHAxis->SetColor(myAxisColor.Name());
-  myVAxis->SetColor(myAxisColor.Name());
-  myAngularAxis->SetColor(myAxisColor.Name());
-}
-
-/*!
-  fitInResol.
-
-  \param toFit  
-  \param minIsResol     
-*/
-void Sketch::fitInResol(Standard_Real &toFit, Standard_Boolean minIsResol)
-{ 
-  Standard_Real sign =  (toFit < 0) ? -1. : +1.;
-  Standard_Real value = toFit + sign * resol/2.0; /* why "+ resol/2.0" ? because if resol = 0.5, 3.3 is rounded to 3.5 */
-  int nTimesResol = int(value/resol);
-  if ((nTimesResol == 0) &&  (minIsResol)) nTimesResol = 1;
-  toFit = nTimesResol*resol;
-}
-
-SketchStatus Sketch::GetCurrentStatus()
-{
-  return myCurrentStatus;
-}
-
-Standard_Integer Sketch::GetmyEdgesNumber()
-{
-  return myEdgesNumber;
-}
-
-
-
diff --git a/src/SKETCHER/GEOM_Sketcher.h b/src/SKETCHER/GEOM_Sketcher.h
deleted file mode 100644 (file)
index 89b12c0..0000000
+++ /dev/null
@@ -1,201 +0,0 @@
-//  GEOM SKETCHER : basic sketcher
-//
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-//
-//
-//
-//  File   : GEOM_Sketcher.h
-//  Author : Nicolas REJNERI
-//  Module : GEOM
-//  $Header$
-
-#include "GEOM_SketcherStatus.h"
-
-#include <V3d_Viewer.hxx>
-#include <V3d_View.hxx>
-#include <BRepBuilderAPI_MakeWire.hxx>
-#include <Geom_Plane.hxx>
-#include <AIS_InteractiveContext.hxx>
-#include <AIS_Shape.hxx>
-#include <AIS_Axis.hxx>
-#include <TopoDS_Edge.hxx>
-#include <AIS_LengthDimension.hxx>
-#include <AIS_RadiusDimension.hxx>
-#include <AIS_AngleDimension.hxx>
-#include <Geom2d_Line.hxx>
-#include <TColStd_SequenceOfInteger.hxx>
-#include <TColgp_SequenceOfPnt2d.hxx>
-#include <gp_Vec2d.hxx>
-
-class Sketch  
-{
-public:
-        Sketch();
-       ~Sketch();
-       Sketch(const Handle(V3d_Viewer)& aViewer);
-        Sketch(const Handle(V3d_Viewer)& aViewer, 
-                      const Quantity_Color& anAxisColor,
-                      const Quantity_Color& aCurrentColor,
-                      const Quantity_Color& aWireColor);
-
-       static void fitInResol(Standard_Real &toFit, 
-                              Standard_Boolean minIsResol = Standard_False);
-
-       void MakeCurrentEdge(const Standard_Integer  Xp   ,
-                                    const Standard_Integer  Yp   ,
-                                    const Handle(V3d_View)& aView );
-       
-       void MakeCurrentEdge(const Standard_Real  X, const Standard_Real Y);
-
-       Standard_Boolean SetDimension(Standard_Real& aValue); 
-       void SetDimension(Standard_Real& deltaX,Standard_Real& deltaY);
-
-       void SetXDimension(Standard_Real& deltaX);
-       void SetYDimension(Standard_Real& deltaY);
-
-       void SetSegmentAngle(Standard_Real& aValue); 
-       Standard_Real GetSegmentAngle();
-
-       void ValidateEdge();
-
-       TopoDS_Wire Close();
-       TopoDS_Wire End();
-
-       void Clear();
-
-       Standard_Boolean Delete();
-
-       void SetPlane(const Handle(Geom_Plane)& aPlane);
-
-       void SetWireColor(const Quantity_Color& aColor);
-       void SetCurrentColor(const Quantity_Color& aColor);
-       void SetAxisColor(const Quantity_Color& aColor);
-
-       void SetParameterVisibility(const TypeOfParameter atype, 
-                                           const Standard_Boolean OnOff);
-
-       void HiligthWithColor(const TypeOfParameter atype, 
-                                     const Quantity_NameOfColor acolor);
-       void Unhiligth(const TypeOfParameter atype);
-
-       Standard_Boolean IsValidCurrentParameter(const TypeOfParameter atype);
-
-       void SetParameterValue(const TypeOfParameter atype, Standard_Real aValue);
-
-       void ChangeMode(const SketchStatus aMode);
-
-       void SetTransitionStatus(const TransitionStatus aStatus);
-
-       SketchStatus GetCurrentStatus(); 
-       Standard_Integer GetmyEdgesNumber();
-
-private :
-       
-       void Init();
-
-       void MakeCurrentSegment(Standard_Real X, Standard_Real Y);
-
-       void MakeCurrentArc(Standard_Real X, Standard_Real Y);
-
-       void DisplayCurrentEdge();
-
-       void DisplayLengthDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
-       void DisplayXDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
-       void DisplayYDimension(const TopoDS_Vertex& V1,const TopoDS_Vertex& V2);
-       void DisplayAngleDimension();
-       void DisplayRadiusDimension();
-
-       void AddEdgeToWire();
-
-       void RemoveLastEdge();
-
-       void CreateConstraints();
-
-private:
-       // Current status of construction
-       SketchStatus myCurrentStatus; 
-       // Transition status between arcs and segments
-       TransitionStatus myTransitionStatus;  
-       // Current wire
-       BRepBuilderAPI_MakeWire myCurrentWire;
-       // Current presentable wire
-       Handle_AIS_Shape myPresentableWire;   
-       // Number of edges into the current wire
-       Standard_Integer myEdgesNumber;       
-       // Store for each edge how it has been built i.d the value of myCurrentStatus
-       TColStd_SequenceOfInteger myConstructionMode; 
-       // Store for each edge how it has been built i.d the value of myTransitionStatus
-       TColStd_SequenceOfInteger myConstraintMode;  
-       // Current edge 
-       TopoDS_Shape myCurrentEdge; 
-       // Previous edge
-       TopoDS_Edge myPreviousEdge; 
-       // List of points to interpolate when computing a curve by interpolation
-       TColgp_SequenceOfPnt2d myPointsToInterpolate; 
-       // Tangent vector at beginning of curve
-       gp_Vec2d myTangentVector;         
-       // Tangent flag at beginning og curve
-       Standard_Boolean myTangentFlag;   
-       
-       // Origin of sketch
-       TopoDS_Vertex myFirstPointSketch; 
-       // Last x coordinate of end point of previous edge or picked point
-       Standard_Real myLastX; 
-       // Last y coordinate of end point of previous edge or picked point
-       Standard_Real myLastY; 
-       // angle between 2 segments when an ANGLE TransitionStatus is set.
-       Standard_Real mySegmentAngle;  
-       // Length of segment when the length of the segment is fixed before the angle
-       Standard_Real mySegmentLength; 
-       // Value of X fixed coordinate 
-       Standard_Real mySegmentX;                    
-       // Value of Y fixed Coordinate
-       Standard_Real mySegmentY;                    
-       Handle_AIS_Shape myPresentableEdge;          // Current presentable edge
-       Handle_AIS_LengthDimension myLengthDimension;// For display of current length segment dimension
-       Handle_AIS_LengthDimension myXDimension;     // For display of current X segment dimension
-       Handle_AIS_LengthDimension myYDimension;     // For display of current Y segment dimension
-       Handle_AIS_LengthDimension myRadiusDimension;// For display of current radius dimension
-       Handle_AIS_AngleDimension myAngleDimension;  // For display of current angle dimension
-       Standard_Boolean myIsLengthDimensionVisible; // Visibility flag for LengthDimension
-       Standard_Boolean myIsXDimensionVisible;      // Visibility flag for X Dimension
-       Standard_Boolean myIsYDimensionVisible;      // Visibility flag for Y Dimension
-       Standard_Boolean myIsRadiusDimensionVisible; // Visibility flag for RadiusDimension
-       Standard_Boolean myIsAngleDimensionVisible;  // Visibility flag for AngleDimension
-       Handle_AIS_Axis myPresentableMediatrice;     // Chord mediatrice of current circle as a presentable object
-       Handle_Geom2d_Line myMediatrice; // Chord mediatrice of current circle as a 2d line
-       Handle_AIS_Shape myCenterCircle; // to visualise center of current arc
-
-       Handle_AIS_Axis myHAxis;         // Horizontal axis
-       Handle_AIS_Axis myVAxis;         // Vertical axis
-       Handle_AIS_Axis myAngularAxis;   // Axis making a predefined angle with the previous edge
-
-       Quantity_Color myWireColor;      // Color of wire and of build edges
-       Quantity_Color myCurrentColor;   // Color of edge under construction
-       Quantity_Color myAxisColor;      // Color for axis
-       Handle_AIS_InteractiveContext myInteractiveContext; // Interactive context for display management
-       
-       Handle_Geom_Plane myPlane;       // Plane of sketch
-
-       BRepBuilderAPI_MakeWire myPasteWire;                                            
-       Standard_Integer myPasteEdgesNumber;
-       TColStd_SequenceOfInteger myPasteConstructionMode;
-       TColStd_SequenceOfInteger myPasteConstraintMode;        
-};
diff --git a/src/SKETCHER/GEOM_SketcherStatus.h b/src/SKETCHER/GEOM_SketcherStatus.h
deleted file mode 100644 (file)
index 4e3adbc..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//  GEOM SKETCHER : basic sketcher
-//
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-//  This library is free software; you can redistribute it and/or 
-//  modify it under the terms of the GNU Lesser General Public 
-//  License as published by the Free Software Foundation; either 
-//  version 2.1 of the License. 
-// 
-//  This library is distributed in the hope that it will be useful, 
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-//  Lesser General Public License for more details. 
-// 
-//  You should have received a copy of the GNU Lesser General Public 
-//  License along with this library; if not, write to the Free Software 
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
-//
-//
-//
-//  File   : GEOM_SketcherStatus.h
-//  Author : Nicolas REJNERI
-//  Module : GEOM
-//  $Header$
-
-enum TransitionStatus {
-       NOCONSTRAINT, // no constraint between consecutive edges
-       TANGENT,      // arc and segment are tangent
-       PERPENDICULAR,// arc is tangent to the perpendicular to the segment
-       ANGLE,        // Angular constraint between 2 segments
-       LENGTH_FIXED, // Length of segment has been fixed 
-       X_FIXED,      // X coordinate for segment has been fixed
-       Y_FIXED       // Y coordinate for segment has been fixed
-       };
-
-enum TypeOfParameter {
-       ANGLE_PARAMETER,
-       LENGTH_PARAMETER,
-       RADIUS_PARAMETER,
-       XVALUE_PARAMETER,
-       YVALUE_PARAMETER
-       };
-
-enum SketchStatus {
-       BEGIN_SKETCH, // Begin sketch; no edges created yet
-       SEGMENT,      // Current mode for creation is segment
-       ARC_CHORD,    // Current mode for creation is arc by chord
-       ARC_CHORD_END,// Chord validated, waiting for radius or center
-       END_SKETCH    // End sketch
-};
index 3e988eb32831aca57b2f92958018e9b542f142c6..82c1e52e9af6e546ce096fbefd1163cc55e5ca54 100644 (file)
@@ -36,22 +36,16 @@ VPATH=.:@srcdir@:@top_srcdir@/idl
 
 # Libraries targets
 LIB = libGEOMSketcher.la 
-LIB_SRC = GEOM_Sketcher.cxx
-LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl
+LIB_SRC = Sketcher_Profile.cxx
+LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl
 
 # header files 
-EXPORT_HEADERS= GEOM_Sketcher.h \
-               GEOM_SketcherStatus.h
+EXPORT_HEADERS= Sketcher_Profile.hxx
 
 # additionnal information to compil and link file
-CPPFLAGS += $(OCC_INCLUDES) $(QT_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
-CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome
-LDFLAGS  += $(QT_LIBS) $(CAS_LDPATH) -lTKTopAlgo -L${KERNEL_ROOT_DIR}/lib/salome
-
-# additional file to be cleaned
-MOSTLYCLEAN =
-CLEAN =
-DISTCLEAN =
+CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
+CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
+LDFLAGS  += $(OCC_KERNEL_LIBS) $(OCC_MODELER_LIBS) -L${KERNEL_ROOT_DIR}/lib/salome
 
 @CONCLUDE@
 
diff --git a/src/SKETCHER/Sketcher_Profile.cxx b/src/SKETCHER/Sketcher_Profile.cxx
new file mode 100644 (file)
index 0000000..4df75a7
--- /dev/null
@@ -0,0 +1,382 @@
+//  GEOM SKETCHER : basic sketcher
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : Sketcher_Profile.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+using namespace std;
+#include "Sketcher_Profile.hxx"
+
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Face.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Ax2.hxx>
+#include <BRepLib.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeWire.hxx>
+#include <BRepBuilderAPI_MakeFace.hxx>
+#include <Geom2d_Line.hxx>
+#include <Geom2d_Circle.hxx>
+#include <Geom_Surface.hxx>
+#include <Precision.hxx>
+#include <GeomAPI.hxx>
+
+#include <TCollection_AsciiString.hxx>
+
+#include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SALOMEDS)
+
+//=======================================================================
+// profile
+// command to build a profile
+//=======================================================================
+Sketcher_Profile::Sketcher_Profile()
+{
+}
+
+
+//=======================================================================
+// profile
+// command to build a profile
+//=======================================================================
+Sketcher_Profile::Sketcher_Profile(const char* aCmd)
+{
+  enum {line, circle, point, none} move;
+
+  Standard_Integer i = 1;
+  Standard_Real x0, y0, x, y, dx, dy;
+  x0 = y0 = x = y = dy = 0;
+  dx = 1;
+
+  Standard_Boolean first, stayfirst, face, close;
+  first = Standard_True;
+  stayfirst = face = close = Standard_False;
+
+  TopoDS_Shape S;
+  TopoDS_Vertex MP;
+  BRepBuilderAPI_MakeWire MW;
+  gp_Ax3 DummyHP(gp::XOY());
+  gp_Pln P(DummyHP);
+  TopLoc_Location TheLocation;
+  Handle(Geom_Surface) Surface;
+
+  myOK = Standard_False;
+
+  TCollection_AsciiString aCommand(CORBA::string_dup(aCmd));
+  TCollection_AsciiString aToken = aCommand.Token(":", 1);
+  int n = 0;
+  TCollection_AsciiString aTab[aCommand.Length()];
+  while(aToken.Length() != 0) {
+    if(aCommand.Token(":", n + 1).Length() > 0)
+      aTab[n] = aCommand.Token(":", n + 1);
+    aToken = aCommand.Token(":", ++n);
+  }
+  n = n - 1;
+  
+  while(i < n) {
+    Standard_Real length = 0, radius = 0, angle = 0;
+    move = point;
+
+    int n1 = 0;
+    TCollection_AsciiString a[aTab[0].Length()];
+    aToken = aTab[i].Token(" ", 1);
+    while(aToken.Length() != 0) {
+      if(aTab[i].Token(" ", n1 + 1).Length() > 0)
+       a[n1] = aTab[i].Token(" ", n1 + 1);
+      aToken = aTab[i].Token(" ", ++n1);
+    }
+    n1 = n1 - 1;
+
+    switch(a[0].Value(1))
+    {
+    case 'F':
+      {
+       if (n1 != 3) goto badargs;
+       if (!first) {
+         cout<<"profile : The F instruction must precede all moves"<<endl;
+         return;
+       }
+       x0 = x = a[1].RealValue();
+       y0 = y = a[2].RealValue();
+       stayfirst = Standard_True;
+       break;
+      }
+    case 'O':
+      {
+       if (n1 != 4) goto badargs;
+       P.SetLocation(gp_Pnt(a[1].RealValue(), a[2].RealValue(), a[3].RealValue()));
+       stayfirst = Standard_True;
+       break;
+      }
+    case 'P':
+      {
+       if (n1 != 7) goto badargs;
+       gp_Vec vn(a[1].RealValue(), a[2].RealValue(), a[3].RealValue());
+       gp_Vec vx(a[4].RealValue(), a[5].RealValue(), a[6].RealValue());
+       if (vn.Magnitude() <= Precision::Confusion() || vx.Magnitude() <= Precision::Confusion()) {
+         cout<<"profile : null direction"<<endl;
+         return;
+       }
+       gp_Ax2 ax(P.Location(), vn, vx);
+       P.SetPosition(ax);
+       stayfirst = Standard_True;
+       break;
+      }
+    case 'X':
+      {
+       if (n1 != 2) goto badargs;
+       length = a[1].RealValue();
+       if (a[0] == "XX")
+         length -= x;
+       dx = 1; dy = 0;
+       move = line;
+       break;
+      }
+    case 'Y':
+      {
+       if (n1 != 2) goto badargs;
+       length = a[1].RealValue();
+       if (a[0] == "YY")
+         length -= y;
+       dx = 0; dy = 1;
+       move = line;
+       break;
+      }
+    case 'L':
+      {
+       if (n1 != 2) goto badargs;
+       length = a[1].RealValue();
+       if (Abs(length) > Precision::Confusion())
+         move = line;
+       else
+         move = none;
+       break;
+      }
+    case 'T':
+      {
+       if (n1 != 3) goto badargs;
+       Standard_Real vx = a[1].RealValue();
+       Standard_Real vy = a[2].RealValue();
+       if (a[0] == "TT") {
+         vx -= x;
+         vy -= y;
+       }
+       length = Sqrt(vx * vx + vy * vy);
+       if (length > Precision::Confusion()) {
+         move = line;
+         dx = vx / length;
+         dy = vy / length;
+       }
+       else
+         move = none;
+       break;
+      }
+    case 'R':
+      {
+       if (n1 != 2) goto badargs;
+       angle = a[1].RealValue() * PI180;
+       if (a[0] == "RR") {
+         dx = Cos(angle);
+         dy = Sin(angle);
+       }
+       else {
+         Standard_Real c = Cos(angle);
+         Standard_Real s = Sin(angle);
+         Standard_Real t = c * dx - s * dy;
+         dy = s * dx + c * dy;
+         dx = t;
+       }
+       break;
+      }
+    case 'D':
+      {
+       if (n1 != 3) goto badargs;
+       Standard_Real vx = a[1].RealValue();
+       Standard_Real vy = a[2].RealValue();
+       length = Sqrt(vx * vx + vy * vy);
+       if (length > Precision::Confusion()) {
+         dx = vx / length;
+         dy = vy / length;
+       }
+       else
+         move = none;
+       break;
+      }
+    case 'C':
+      {
+       if (n1 != 3) goto badargs;
+       radius = a[1].RealValue();
+       if (Abs(radius) > Precision::Confusion()) {
+         angle = a[2].RealValue() * PI180;
+         move = circle;
+       }
+       else
+         move = none;
+       break;
+      }
+    case 'I':
+      {
+       if (n1 != 2) goto badargs;
+       length = a[1].RealValue();
+       if (a[0] == "IX") {
+         if (Abs(dx) < Precision::Confusion()) {
+           cout<<"profile : cannot intersect, arg "<<i-1<<endl;
+           return;
+         }
+         length = (length - x) / dx;
+       }
+       else if (a[0] == "IY") {
+         if (Abs(dy) < Precision::Confusion()) {
+           cout<<"profile : cannot intersect, arg "<<i-1<<endl;
+           return;
+         }
+         length = (length - y) / dy;
+       }
+       if (Abs(length) > Precision::Confusion())
+         move = line;
+       else
+         move = none;
+       break;
+      }
+    case 'W':
+      {
+       if (a[0] == "WW")
+         close = Standard_True;
+       else if(a[0] == "WF") {
+         close = Standard_True;
+         face = Standard_True;
+       }
+       i = n - 1;
+       break;
+      }
+    default:
+      {
+       cout<<"profile : unknown code "<<a[i]<<endl;
+       return;
+      }
+    }
+
+  again :
+    switch (move) 
+    {
+    case line :
+      {
+       if (length < 0) {
+         length = -length;
+         dx = -dx;
+         dy = -dy;
+       }
+       Handle(Geom2d_Line) l = new Geom2d_Line(gp_Pnt2d(x,y),gp_Dir2d(dx,dy));
+       MW.Add(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(l,P),0,length));
+       x += length*dx;
+       y += length*dy;
+       break;
+      }
+    case circle :
+      {
+       Standard_Boolean sense = Standard_True;
+       if (radius < 0) {
+         radius = -radius;
+         sense = !sense;
+         dx = -dx;
+         dy = -dy;
+       }
+       gp_Ax2d ax(gp_Pnt2d(x-radius*dy,y+radius*dx),gp_Dir2d(dy,-dx));
+       if (angle < 0) {
+         angle = -angle;
+         sense = !sense;
+       }
+       Handle(Geom2d_Circle) c = new Geom2d_Circle(ax,radius,sense);
+       MW.Add(BRepBuilderAPI_MakeEdge(GeomAPI::To3d(c,P),0,angle));
+       gp_Pnt2d p;
+       gp_Vec2d v;
+       c->D1(angle,p,v);
+       x = p.X();
+       y = p.Y();
+       dx = v.X() / radius;
+       dy = v.Y() / radius;
+       break;
+      }
+    case point:
+      {
+       MP = BRepBuilderAPI_MakeVertex(gp_Pnt(x, y, 0.0));
+       break;
+      }
+    case none:
+      {
+       i = n - 1;
+       break;
+      }
+    }
+
+    // update first
+    first = stayfirst;
+    stayfirst = Standard_False;
+
+    if(!(dx == 0 && dy == 0))
+      myLastDir.SetCoord(dx, dy, 0.0);
+    else
+      return;
+    myLastPoint.SetX(x);
+    myLastPoint.SetY(y);
+
+    // next segment....
+    i++;
+    if ((i == n) && close) {
+      // the closing segment
+      dx = x0 - x;
+      dy = y0 - y;
+      length = Sqrt(dx * dx + dy * dy);
+      move = line;
+      if (length > Precision::Confusion()) {
+       dx = dx / length;
+       dy = dy / length;
+       goto again;
+      }
+    }
+  }
+
+  // get the result, face or wire
+  if (move == none)
+    return;
+  else if (move == point)
+    S = MP;
+  else if (face)
+    S = BRepBuilderAPI_MakeFace(P, MW.Wire());
+  else
+    S = MW;
+  
+  if(!TheLocation.IsIdentity())
+    S.Move(TheLocation);
+
+  myShape = S;
+  myOK = true;
+  return;
+
+  badargs :
+    cout<<"profile : bad number of arguments"<<endl;
+    return;
+}
diff --git a/src/SKETCHER/Sketcher_Profile.hxx b/src/SKETCHER/Sketcher_Profile.hxx
new file mode 100644 (file)
index 0000000..f8389f3
--- /dev/null
@@ -0,0 +1,54 @@
+//  GEOM SKETCHER : basic sketcher
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : Sketcher_Profile.h
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#include <gp_Pnt.hxx>
+#include <gp_Dir.hxx>
+#include <TopoDS_Shape.hxx>
+
+class Sketcher_Profile
+{
+
+public:
+  Sketcher_Profile();
+  Sketcher_Profile(const char* aCmd);
+
+private:
+  gp_Pnt myLastPoint;
+  gp_Dir myLastDir;
+
+  TopoDS_Shape myShape;
+  bool myOK;
+
+public:
+  gp_Pnt GetLastPoint(){return myLastPoint;};
+  gp_Dir GetLastDir(){return myLastDir;};
+
+  const TopoDS_Shape& GetShape(){return myShape;};
+  bool IsDone(){return myOK;};
+
+};
index 6a968659cb170893f1a5b78c73a5ee44136b38f3..5b9d8126f56b8c087e65d4a8800b00491fac0bea 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "TransformationGUI_MirrorDlg.h"
 
 #include <BRepBuilderAPI_Transform.hxx>
 #include <Geom_Plane.hxx>
 #include <BRep_Tool.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : TransformationGUI_MirrorDlg()
 // purpose  : Constructs a TransformationGUI_MirrorDlg which is a child of 'parent', with the 
@@ -131,6 +134,7 @@ void TransformationGUI_MirrorDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_MirrorDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index c347d7256b5ea103732fa565688fdf089d7a7669..2d7b5aae1dd7fbb7d64d1eb0fa99867e8364c723 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "TransformationGUI_MultiRotationDlg.h"
 
 #include <gp_Lin.hxx>
@@ -42,6 +41,10 @@ using namespace std;
 #include <BRepBuilderAPI_Transform.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : TransformationGUI_MultiRotationDlg()
 // purpose  : Constructs a TransformationGUI_MultiRotationDlg which is a child of 'parent', with the 
@@ -258,6 +261,7 @@ void TransformationGUI_MultiRotationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_MultiRotationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
@@ -429,13 +433,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..9a78c2ecbe4c7d0fee086ef57e8a9cda6ec3b56a 100644 (file)
@@ -26,7 +26,6 @@
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "TransformationGUI_MultiTranslationDlg.h"
 
 #include <gp_Lin.hxx>
@@ -39,6 +38,10 @@ using namespace std;
 #include <TopoDS_Compound.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : TransformationGUI_MultiTranslationDlg()
 // purpose  : Constructs a TransformationGUI_MultiTranslationDlg which is a child of 'parent', with the 
@@ -269,6 +272,7 @@ void TransformationGUI_MultiTranslationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_MultiTranslationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
@@ -488,7 +492,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 +502,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..6d61325c3ef205a1785781048e67dbd160c53ed3 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "TransformationGUI_RotationDlg.h"
 
 #include <gp_Lin.hxx>
 #include <BRepBuilderAPI_Transform.hxx>
 #include <BRepAdaptor_Curve.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : TransformationGUI_RotationDlg()
 // purpose  : Constructs a TransformationGUI_RotationDlg which is a child of 'parent', with the 
@@ -142,6 +145,7 @@ void TransformationGUI_RotationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_RotationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 6f408cff1afe319407dcda858ae5fccbd7de6dc8..96b875d8b974192eff4032ba2bd2368f18ec80ec 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "TransformationGUI_ScaleDlg.h"
 
 #include <BRepBuilderAPI_Transform.hxx>
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : TransformationGUI_ScaleDlg()
 // purpose  : Constructs a TransformationGUI_ScaleDlg which is a child of 'parent', with the 
@@ -140,6 +143,7 @@ void TransformationGUI_ScaleDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_ScaleDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;
index 46778b0c7bfe3f015bbce1973447dc0c7a35acb6..59f6e60d142b87ea58f8fb3dcc11264af28dfa53 100644 (file)
 //  Module : GEOM
 //  $Header$
 
-using namespace std;
 #include "TransformationGUI_TranslationDlg.h"
 
 #include <BRepBuilderAPI_Transform.hxx>
 #include "QAD_Config.h"
 
+#include "utilities.h"
+
+using namespace std;
+
 //=================================================================================
 // class    : TransformationGUI_TranslationDlg()
 // purpose  : Constructs a TransformationGUI_TranslationDlg which is a child of 'parent', with the 
@@ -148,6 +151,7 @@ void TransformationGUI_TranslationDlg::ClickOnOk()
 //=================================================================================
 void TransformationGUI_TranslationDlg::ClickOnApply()
 {
+  buttonApply->setFocus();
   QAD_Application::getDesktop()->putInfo(tr(""));
   if (mySimulationTopoDs.IsNull())
     return;