Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 155974 | Differences between
and this patch

Collapse All | Expand All

(-)GEOM_SRC_3.2.2/idl/GEOM_Gen.idl (-2 / +37 lines)
Lines 884-890 Link Here
884
884
885
    /*!
885
    /*!
886
     *  Create a face on the given wire.
886
     *  Create a face on the given wire.
887
     *  \param theWire Wire to build the face on.
887
     *  \param theWire closed Wire or Edge to build the face on.
888
     *  \param isPlanarWanted If TRUE, only planar face will be built.
888
     *  \param isPlanarWanted If TRUE, only planar face will be built.
889
     *                        If impossible, NULL object will be returned.
889
     *                        If impossible, NULL object will be returned.
890
     *  \return New GEOM_Object, containing the created face.
890
     *  \return New GEOM_Object, containing the created face.
Lines 893-899 Link Here
893
893
894
    /*!
894
    /*!
895
     *  Create a face on the given wires set.
895
     *  Create a face on the given wires set.
896
     *  \param theWires List of wires to build the face on.
896
     *  \param theWires List of closed wires or edges to build the face on.
897
     *  \param isPlanarWanted If TRUE, only planar face will be built.
897
     *  \param isPlanarWanted If TRUE, only planar face will be built.
898
     *                        If impossible, NULL object will be returned.
898
     *                        If impossible, NULL object will be returned.
899
     *  \return New GEOM_Object, containing the created face.
899
     *  \return New GEOM_Object, containing the created face.
Lines 1053-1058 Link Here
1053
			       in long        theShapeType,
1053
			       in long        theShapeType,
1054
			       in GEOM_Object theAx1,
1054
			       in GEOM_Object theAx1,
1055
			       in shape_state theState);
1055
			       in shape_state theState);
1056
    /*!
1057
     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1058
     *  the specified plane by the certain way, defined through \a theState parameter.
1059
     *  \param theShape Shape to find sub-shapes of.
1060
     *  \param theShapeType Type of sub-shapes to be retrieved.
1061
     *  \param theAx1 Vector (or line, or linear edge), specifying normal
1062
     *                direction of the plane to find shapes on.
1063
     *  \param thePnt Point specifying location of the plane to find shapes on.
1064
     *  \param theState The state of the subshapes to find.
1065
     *  \return List of all found sub-shapes.
1066
     */
1067
    ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape,
1068
					   in long        theShapeType,
1069
					   in GEOM_Object theAx1,
1070
					   in GEOM_Object thePnt,
1071
					   in shape_state theState);
1072
1073
1056
1074
1057
    /*!
1075
    /*!
1058
     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1076
     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
Lines 1121-1126 Link Here
1121
				    in long        theShapeType,
1139
				    in long        theShapeType,
1122
				    in GEOM_Object theAx1,
1140
				    in GEOM_Object theAx1,
1123
				    in shape_state theState);
1141
				    in shape_state theState);
1142
				    
1143
    /*!
1144
     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1145
     *  the specified plane by the certain way, defined through \a theState parameter.
1146
     *  \param theShape Shape to find sub-shapes of.
1147
     *  \param theShapeType Type of sub-shapes to be retrieved.
1148
     *  \param theAx1 Vector (or line, or linear edge), specifying normal
1149
     *                direction of the plane to find shapes on.
1150
     *  \param thePnt Point specifying location of the plane to find shapes on.     
1151
     *  \param theState The state of the subshapes to find.
1152
     *  \return List of IDs of all found sub-shapes.
1153
     */
1154
    ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape,
1155
						in long        theShapeType,
1156
						in GEOM_Object theAx1,
1157
						in GEOM_Object thePnt,
1158
						in shape_state theState);
1124
1159
1125
    /*!
1160
    /*!
1126
     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
1161
     *  Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
(-)GEOM_SRC_3.2.2/src/BuildGUI/BuildGUI_FaceDlg.cxx (-5 / +16 lines)
Lines 28-33 Link Here
28
28
29
#include "BuildGUI_FaceDlg.h"
29
#include "BuildGUI_FaceDlg.h"
30
#include "GEOMImpl_Types.hxx"
30
#include "GEOMImpl_Types.hxx"
31
#include "TColStd_MapOfInteger.hxx"
31
32
32
#include "SUIT_Session.h"
33
#include "SUIT_Session.h"
33
#include "SalomeApp_Application.h"
34
#include "SalomeApp_Application.h"
Lines 64-70 Link Here
64
65
65
  GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire");
66
  GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire");
66
  GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW"));
67
  GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW"));
67
  GroupWire->TextLabel1->setText(tr("GEOM_WIRES"));
68
  GroupWire->TextLabel1->setText(tr("GEOM_OBJECTS"));
68
  GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT"));
69
  GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT"));
69
  GroupWire->PushButton1->setPixmap(image1);
70
  GroupWire->PushButton1->setPixmap(image1);
70
71
Lines 100-106 Link Here
100
101
101
  GroupWire->CheckButton1->setChecked(TRUE);
102
  GroupWire->CheckButton1->setChecked(TRUE);
102
103
103
  globalSelection( GEOM_WIRE );
104
  TColStd_MapOfInteger aMap;
105
  aMap.Add( GEOM_EDGE );
106
  aMap.Add( GEOM_WIRE );
107
  globalSelection( aMap );
104
108
105
  /* signals and slots connections */
109
  /* signals and slots connections */
106
  connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
110
  connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
Lines 160-166 Link Here
160
  if (!myWires.length())
164
  if (!myWires.length())
161
    return;
165
    return;
162
  if(aNbSel != 1)
166
  if(aNbSel != 1)
163
    aName = tr("%1_wires").arg(aNbSel);
167
    aName = tr("%1_objects").arg(aNbSel);
164
  
168
  
165
  myEditCurrentArgument->setText( aName );
169
  myEditCurrentArgument->setText( aName );
166
  
170
  
Lines 178-184 Link Here
178
  if (send != GroupWire->PushButton1)
182
  if (send != GroupWire->PushButton1)
179
    return;
183
    return;
180
  
184
  
181
  globalSelection( GEOM_WIRE );
185
  TColStd_MapOfInteger aMap;
186
  aMap.Add( GEOM_EDGE );
187
  aMap.Add( GEOM_WIRE );
188
  globalSelection( aMap );
189
182
  myEditCurrentArgument = GroupWire->LineEdit1;
190
  myEditCurrentArgument = GroupWire->LineEdit1;
183
191
184
  myEditCurrentArgument->setFocus();
192
  myEditCurrentArgument->setFocus();
Lines 195-201 Link Here
195
  GEOMBase_Skeleton::ActivateThisDialog();
203
  GEOMBase_Skeleton::ActivateThisDialog();
196
  connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
204
  connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
197
	  SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
205
	  SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
198
  globalSelection( GEOM_WIRE );
206
  TColStd_MapOfInteger aMap;
207
  aMap.Add( GEOM_EDGE );
208
  aMap.Add( GEOM_WIRE );
209
  globalSelection( aMap );
199
}
210
}
200
211
201
212
(-)GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.cxx (-62 / +149 lines)
Lines 1-30 Link Here
1
//  GEOM GEOMGUI : GUI for Geometry component
1
//  GEOM GEOMGUI : GUI for Geometry component
2
//
2
//
3
//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
3
//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4
//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
4
//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5
// 
5
//
6
//  This library is free software; you can redistribute it and/or 
6
//  This library is free software; you can redistribute it and/or
7
//  modify it under the terms of the GNU Lesser General Public 
7
//  modify it under the terms of the GNU Lesser General Public
8
//  License as published by the Free Software Foundation; either 
8
//  License as published by the Free Software Foundation; either
9
//  version 2.1 of the License. 
9
//  version 2.1 of the License.
10
// 
10
//
11
//  This library is distributed in the hope that it will be useful, 
11
//  This library is distributed in the hope that it will be useful,
12
//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
//  Lesser General Public License for more details. 
14
//  Lesser General Public License for more details.
15
// 
15
//
16
//  You should have received a copy of the GNU Lesser General Public 
16
//  You should have received a copy of the GNU Lesser General Public
17
//  License along with this library; if not, write to the Free Software 
17
//  License along with this library; if not, write to the Free Software
18
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
// 
19
//
20
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
//
21
//
22
//
22
//
23
//
23
//
24
//  File   : EntityGUI_SketcherDlg.cxx
24
//  File   : EntityGUI_SketcherDlg.cxx
25
//  Author : Damien COQUERET
25
//  Author : Damien COQUERET
26
//  Module : GEOM
26
//  Module : GEOM
27
//  $Header: 
27
//  $Header$
28
28
29
#include "EntityGUI_SketcherDlg.h"
29
#include "EntityGUI_SketcherDlg.h"
30
#include "Sketcher_Profile.hxx"
30
#include "Sketcher_Profile.hxx"
Lines 58-64 Link Here
58
58
59
//=================================================================================
59
//=================================================================================
60
// class    : EntityGUI_SketcherDlg()
60
// class    : EntityGUI_SketcherDlg()
61
// purpose  : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the 
61
// purpose  : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the
62
//            name 'name' and widget flags set to 'f'.
62
//            name 'name' and widget flags set to 'f'.
63
//            The dialog will by default be modeless, unless you set 'modal' to
63
//            The dialog will by default be modeless, unless you set 'modal' to
64
//            TRUE to construct a modal dialog.
64
//            TRUE to construct a modal dialog.
Lines 80-86 Link Here
80
  buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH"));
80
  buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH"));
81
  buttonHelp->setText(tr("GEOM_BUT_HELP"));
81
  buttonHelp->setText(tr("GEOM_BUT_HELP"));
82
82
83
  GroupVal->close(TRUE);        
83
  GroupVal->close(TRUE);
84
  GroupDest2->close(TRUE);
84
  GroupDest2->close(TRUE);
85
  GroupDest3->close(TRUE);
85
  GroupDest3->close(TRUE);
86
86
Lines 132-155 Link Here
132
  Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
132
  Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
133
  Group1Spin->buttonUndo->setPixmap(image1);
133
  Group1Spin->buttonUndo->setPixmap(image1);
134
  Group1Spin->buttonRedo->setPixmap(image2);
134
  Group1Spin->buttonRedo->setPixmap(image2);
135
  QWidget::setTabOrder(Group1Spin->SpinBox_DX , Group1Spin->buttonApply);
136
  QWidget::setTabOrder(Group1Spin->buttonApply, Group1Spin->buttonUndo);
137
  QWidget::setTabOrder(Group1Spin->buttonUndo , Group1Spin->buttonRedo);
135
138
136
  Group2Spin = new EntityGUI_2Spin(this, "Group2Spin");
139
  Group2Spin = new EntityGUI_2Spin(this, "Group2Spin");
137
  Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
140
  Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
138
  Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
141
  Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
139
  Group2Spin->buttonUndo->setPixmap(image1);
142
  Group2Spin->buttonUndo->setPixmap(image1);
140
  Group2Spin->buttonRedo->setPixmap(image2);
143
  Group2Spin->buttonRedo->setPixmap(image2);
144
  QWidget::setTabOrder(Group2Spin->SpinBox_DX , Group2Spin->SpinBox_DY);
145
  QWidget::setTabOrder(Group2Spin->SpinBox_DY , Group2Spin->buttonApply);
146
  QWidget::setTabOrder(Group2Spin->buttonApply, Group2Spin->buttonUndo);
147
  QWidget::setTabOrder(Group2Spin->buttonUndo , Group2Spin->buttonRedo);
141
148
142
  Group3Spin = new EntityGUI_3Spin(this, "Group3Spin");
149
  Group3Spin = new EntityGUI_3Spin(this, "Group3Spin");
143
  Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
150
  Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
144
  Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
151
  Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
145
  Group3Spin->buttonUndo->setPixmap(image1);
152
  Group3Spin->buttonUndo->setPixmap(image1);
146
  Group3Spin->buttonRedo->setPixmap(image2);
153
  Group3Spin->buttonRedo->setPixmap(image2);
154
  QWidget::setTabOrder(Group3Spin->SpinBox_DX , Group3Spin->SpinBox_DY);
155
  QWidget::setTabOrder(Group3Spin->SpinBox_DY , Group3Spin->SpinBox_DZ);
156
  QWidget::setTabOrder(Group3Spin->SpinBox_DZ , Group3Spin->buttonApply);
157
  QWidget::setTabOrder(Group3Spin->buttonApply, Group3Spin->buttonUndo);
158
  QWidget::setTabOrder(Group3Spin->buttonUndo , Group3Spin->buttonRedo);
147
159
148
  Group4Spin = new EntityGUI_4Spin(this, "Group4Spin");
160
  Group4Spin = new EntityGUI_4Spin(this, "Group4Spin");
149
  Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
161
  Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES"));
150
  Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
162
  Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY"));
151
  Group4Spin->buttonUndo->setPixmap(image1);
163
  Group4Spin->buttonUndo->setPixmap(image1);
152
  Group4Spin->buttonRedo->setPixmap(image2);
164
  Group4Spin->buttonRedo->setPixmap(image2);
165
  QWidget::setTabOrder(Group4Spin->SpinBox_DX , Group4Spin->SpinBox_DY);
166
  QWidget::setTabOrder(Group4Spin->SpinBox_DY , Group4Spin->SpinBox_DZ);
167
  QWidget::setTabOrder(Group4Spin->SpinBox_DZ , Group4Spin->SpinBox_DS);
168
  QWidget::setTabOrder(Group4Spin->SpinBox_DS , Group4Spin->buttonApply);
169
  QWidget::setTabOrder(Group4Spin->buttonApply, Group4Spin->buttonUndo);
170
  QWidget::setTabOrder(Group4Spin->buttonUndo , Group4Spin->buttonRedo);
153
171
154
  Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1);
172
  Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1);
155
  Layout5->addWidget(GroupD1, 1, 0);
173
  Layout5->addWidget(GroupD1, 1, 0);
Lines 217-223 Link Here
217
235
218
  connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
236
  connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
219
  connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
237
  connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
220
  
238
239
  // install event filter on spin-boxes to provide Apply action on Return pressed
240
  Group1Spin->SpinBox_DX->installEventFilter(this);
241
  Group2Spin->SpinBox_DX->installEventFilter(this);
242
  Group2Spin->SpinBox_DY->installEventFilter(this);
243
  Group3Spin->SpinBox_DX->installEventFilter(this);
244
  Group3Spin->SpinBox_DY->installEventFilter(this);
245
  Group3Spin->SpinBox_DZ->installEventFilter(this);
246
  Group4Spin->SpinBox_DX->installEventFilter(this);
247
  Group4Spin->SpinBox_DY->installEventFilter(this);
248
  Group4Spin->SpinBox_DZ->installEventFilter(this);
249
  Group4Spin->SpinBox_DS->installEventFilter(this);
250
221
  Init();
251
  Init();
222
}
252
}
223
253
Lines 228-234 Link Here
228
//=================================================================================
258
//=================================================================================
229
EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg()
259
EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg()
230
{
260
{
231
	myGeometryGUI->SetActiveDialogBox( 0 );
261
  myGeometryGUI->SetActiveDialogBox( 0 );
262
}
263
264
265
//=================================================================================
266
// function : eventFilter()
267
// purpose  : event filter for spin-boxes to provide Apply action on Return pressed
268
//=================================================================================
269
bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event)
270
{
271
  if (event->type() == QEvent::KeyPress) {
272
    QKeyEvent* ke = (QKeyEvent*)event;
273
    if (ke->key() == Key_Return) {
274
      if (object == Group1Spin->SpinBox_DX) {
275
        Group1Spin->buttonApply->animateClick();
276
        return true;
277
      } else if (object == Group2Spin->SpinBox_DX ||
278
                 object == Group2Spin->SpinBox_DY) {
279
        Group2Spin->buttonApply->animateClick();
280
        return true;
281
      } else if (object == Group3Spin->SpinBox_DX ||
282
                 object == Group3Spin->SpinBox_DY ||
283
                 object == Group3Spin->SpinBox_DZ) {
284
        Group3Spin->buttonApply->animateClick();
285
        return true;
286
      } else if (object == Group4Spin->SpinBox_DX ||
287
                 object == Group4Spin->SpinBox_DY ||
288
                 object == Group4Spin->SpinBox_DZ ||
289
                 object == Group4Spin->SpinBox_DS) {
290
        Group4Spin->buttonApply->animateClick();
291
        return true;
292
      }
293
    }
294
  }
295
296
  return EntityGUI_Skeleton_QTD::eventFilter(object, event);
232
}
297
}
233
298
234
299
Lines 289-295 Link Here
289
//=================================================================================
354
//=================================================================================
290
void EntityGUI_SketcherDlg::InitClick()
355
void EntityGUI_SketcherDlg::InitClick()
291
{
356
{
292
  disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
357
  disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0);
293
358
294
  Group1Sel->hide();
359
  Group1Sel->hide();
295
  Group1Spin->hide();
360
  Group1Spin->hide();
Lines 359-371 Link Here
359
{
424
{
360
  InitClick();
425
  InitClick();
361
426
427
  // Get setting of step value from file configuration
428
  double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0);
429
362
  if ( myConstructorId == 0 )
430
  if ( myConstructorId == 0 )
363
  {  // SEGMENT
431
  {  // SEGMENT
364
    if ( constructorId == 1 )
432
    if ( constructorId == 1 )
365
    {  // XY
433
    {  // XY
366
      mySketchType = PT_ABS;
434
      mySketchType = PT_ABS;
367
      Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
435
      Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
368
      Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
436
      Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
369
      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
437
      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2"));
370
      Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
438
      Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2"));
371
      myX = 0.0;
439
      myX = 0.0;
Lines 380-387 Link Here
380
    else if ( constructorId == 0 )
448
    else if ( constructorId == 0 )
381
    {  // DXDY
449
    {  // DXDY
382
      mySketchType = PT_RELATIVE;
450
      mySketchType = PT_RELATIVE;
383
      Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
451
      Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
384
      Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
452
      Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
385
      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
453
      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2"));
386
      Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
454
      Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2"));
387
      myDX = 0.0;
455
      myDX = 0.0;
Lines 397-404 Link Here
397
    {  // Selection
465
    {  // Selection
398
      mySketchType = PT_SEL;
466
      mySketchType = PT_SEL;
399
      myEditCurrentArgument = Group1Sel->LineEdit1;
467
      myEditCurrentArgument = Group1Sel->LineEdit1;
400
      connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
468
      connect(myGeometryGUI->getApp()->selectionMgr(),
401
	      SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
469
	      SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
402
      Group1Sel->show();
470
      Group1Sel->show();
403
      Group1Sel->buttonApply->setFocus();
471
      Group1Sel->buttonApply->setFocus();
404
      SelectionIntoArgument();
472
      SelectionIntoArgument();
Lines 428-433 Link Here
428
  InitClick();
496
  InitClick();
429
  myAngle = 0.0;
497
  myAngle = 0.0;
430
498
499
  // Get setting of step value from file configuration
500
  double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0);
501
431
  if ( myConstructorId == 0 )
502
  if ( myConstructorId == 0 )
432
  {  // SEGMENT
503
  {  // SEGMENT
433
    myX = 0.0;
504
    myX = 0.0;
Lines 436-442 Link Here
436
    if ( myConstructorDirId == 2 )
507
    if ( myConstructorDirId == 2 )
437
    {  // Angle
508
    {  // Angle
438
      Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
509
      Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
439
      Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
510
      Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
440
      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
511
      Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
441
      Group2Spin->SpinBox_DX->SetValue(myAngle);
512
      Group2Spin->SpinBox_DX->SetValue(myAngle);
442
      Group2Spin->buttonApply->setFocus();
513
      Group2Spin->buttonApply->setFocus();
Lines 460-466 Link Here
460
				Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3"));
531
				Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3"));
461
				Group2Spin->SpinBox_DY->SetValue(myY);
532
				Group2Spin->SpinBox_DY->SetValue(myY);
462
      }
533
      }
463
    }                   
534
    }
464
    else if ( myConstructorDirId == 0 )
535
    else if ( myConstructorDirId == 0 )
465
    {  // Perpendicular
536
    {  // Perpendicular
466
      Group1Spin->show();
537
      Group1Spin->show();
Lines 513-519 Link Here
513
    {  // DXDY
584
    {  // DXDY
514
      Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
585
      Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
515
      Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
586
      Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3);
516
      Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
587
      Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
517
      Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
588
      Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2"));
518
      Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
589
      Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2"));
519
      myDX = 0.0;
590
      myDX = 0.0;
Lines 551-557 Link Here
551
      {  // Length
622
      {  // Length
552
				mySketchType = DIR_ANGLE_LENGTH;
623
				mySketchType = DIR_ANGLE_LENGTH;
553
				Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
624
				Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
554
				Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
625
				Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
555
				Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
626
				Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
556
				Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
627
				Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2"));
557
				Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
628
				Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2"));
Lines 570-576 Link Here
570
      if ( constructorId == 2 )
641
      if ( constructorId == 2 )
571
      {  // Length
642
      {  // Length
572
				mySketchType = DIR_PER_LENGTH;
643
				mySketchType = DIR_PER_LENGTH;
573
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
644
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
574
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
645
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
575
				Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
646
				Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
576
				Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
647
				Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
Lines 587-593 Link Here
587
      if ( constructorId == 2 )
658
      if ( constructorId == 2 )
588
      {  // Length
659
      {  // Length
589
				mySketchType = DIR_TAN_LENGTH;
660
				mySketchType = DIR_TAN_LENGTH;
590
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3);
661
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3);
591
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
662
				Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3);
592
				Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
663
				Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2"));
593
				Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
664
				Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2"));
Lines 651-657 Link Here
651
			       tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) );
722
			       tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) );
652
      return;
723
      return;
653
    }
724
    }
654
    
725
655
    QString Command = myCommand.join( "" ) + GetNewCommand();
726
    QString Command = myCommand.join( "" ) + GetNewCommand();
656
    Sketcher_Profile aProfile (Command.ascii());
727
    Sketcher_Profile aProfile (Command.ascii());
657
728
Lines 660-670 Link Here
660
    TopoDS_Shape myShape;
731
    TopoDS_Shape myShape;
661
    if ( aProfile.IsDone() )
732
    if ( aProfile.IsDone() )
662
      myShape = aProfile.GetShape();
733
      myShape = aProfile.GetShape();
663
      
734
664
    if(myShape.ShapeType() != TopAbs_VERTEX)
735
    if(myShape.ShapeType() != TopAbs_VERTEX)
665
      myCommand.append( ":WW" );
736
      myCommand.append( ":WW" );
666
  }
737
  }
667
  else 
738
  else
668
    myIsAllAdded = true;
739
    myIsAllAdded = true;
669
740
670
  if( myCommand.size() > 2 )
741
  if( myCommand.size() > 2 )
Lines 680-686 Link Here
680
//=================================================================================
751
//=================================================================================
681
bool EntityGUI_SketcherDlg::ClickOnApply()
752
bool EntityGUI_SketcherDlg::ClickOnApply()
682
{
753
{
683
  ((QPushButton*)sender())->setFocus();
754
  ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948)
684
755
685
  myCommand.append( GetNewCommand() );
756
  myCommand.append( GetNewCommand() );
686
  mySketchState = NEXT_POINT;
757
  mySketchState = NEXT_POINT;
Lines 695-700 Link Here
695
766
696
  GEOMBase_Helper::displayPreview();
767
  GEOMBase_Helper::displayPreview();
697
768
769
  // Set focus to SpinBox_DX
770
  if (sender() == Group1Spin->buttonApply) {
771
    (Group1Spin->SpinBox_DX)->setFocus();
772
    (Group1Spin->SpinBox_DX)->selectAll();
773
  }
774
  else if (sender() == Group2Spin->buttonApply) {
775
    (Group2Spin->SpinBox_DX)->setFocus();
776
    (Group2Spin->SpinBox_DX)->selectAll();
777
  }
778
  else if (sender() == Group3Spin->buttonApply) {
779
    (Group3Spin->SpinBox_DX)->setFocus();
780
    (Group3Spin->SpinBox_DX)->selectAll();
781
  }
782
  else if (sender() == Group4Spin->buttonApply) {
783
    (Group4Spin->SpinBox_DX)->setFocus();
784
    (Group4Spin->SpinBox_DX)->selectAll();
785
  }
786
698
  return true;
787
  return true;
699
}
788
}
700
789
Lines 705-711 Link Here
705
void EntityGUI_SketcherDlg::ClickOnHelp()
794
void EntityGUI_SketcherDlg::ClickOnHelp()
706
{
795
{
707
  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
796
  LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
708
  if (app) 
797
  if (app)
709
    app->onHelpContextModule(myGeometryGUI ? app->moduleName(myGeometryGUI->moduleName()) : QString(""), myHelpFileName);
798
    app->onHelpContextModule(myGeometryGUI ? app->moduleName(myGeometryGUI->moduleName()) : QString(""), myHelpFileName);
710
  else {
799
  else {
711
    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
800
    SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
Lines 726-732 Link Here
726
815
727
  if(myCommand.count() == 1) {
816
  if(myCommand.count() == 1) {
728
    mySketchState = FIRST_POINT;
817
    mySketchState = FIRST_POINT;
729
    
818
730
    RadioButton1->setChecked(true);
819
    RadioButton1->setChecked(true);
731
    TypeClicked(0);
820
    TypeClicked(0);
732
821
Lines 872-878 Link Here
872
961
873
  setEnabled( false );
962
  setEnabled( false );
874
  globalSelection();
963
  globalSelection();
875
  disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
964
  disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0);
876
  myGeometryGUI->SetActiveDialogBox(0);
965
  myGeometryGUI->SetActiveDialogBox(0);
877
}
966
}
878
967
Lines 887-894 Link Here
887
  setEnabled(true);
976
  setEnabled(true);
888
  myGeometryGUI->SetActiveDialogBox((QDialog*)this);
977
  myGeometryGUI->SetActiveDialogBox((QDialog*)this);
889
978
890
  connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 
979
  connect(myGeometryGUI->getApp()->selectionMgr(),
891
	  SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ;
980
	  SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
892
981
893
  //myGeometryGUI->SetState( 0 );
982
  //myGeometryGUI->SetState( 0 );
894
  globalSelection( GEOM_POINT );
983
  globalSelection( GEOM_POINT );
Lines 918-924 Link Here
918
void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e)
1007
void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e)
919
{
1008
{
920
  //myGeometryGUI->SetState( -1 );
1009
  //myGeometryGUI->SetState( -1 );
921
  disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0);
1010
  disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0);
922
  QDialog::closeEvent( e );
1011
  QDialog::closeEvent( e );
923
}
1012
}
924
1013
Lines 1265-1292 Link Here
1265
  }
1354
  }
1266
1355
1267
  QString cmd;
1356
  QString cmd;
1268
  if( ( mySketchState != FIRST_POINT && myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
1357
  if( ( mySketchState != FIRST_POINT &&
1358
        myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) {
1269
    cmd = myCommand.join( "" );
1359
    cmd = myCommand.join( "" );
1270
1360
1271
    if ( Group1Sel->isVisible() ) {
1361
    if ( Group1Sel->isVisible() ) {
1272
      Group1Sel->buttonApply->setEnabled(false);
1362
      Group1Sel->buttonApply->setEnabled(false);
1273
      Group1Sel->buttonApply->setFocus();
1363
      //Group1Sel->buttonApply->setFocus();
1274
    }
1364
    }
1275
    if ( Group1Spin->isVisible() ) {
1365
    if ( Group1Spin->isVisible() ) {
1276
      Group1Spin->buttonApply->setEnabled(false);
1366
      Group1Spin->buttonApply->setEnabled(false);
1277
      Group1Spin->buttonApply->setFocus();
1367
      //Group1Spin->buttonApply->setFocus();
1278
    }
1368
    }
1279
    if ( Group2Spin->isVisible() ) {
1369
    if ( Group2Spin->isVisible() ) {
1280
      Group2Spin->buttonApply->setEnabled(false);
1370
      Group2Spin->buttonApply->setEnabled(false);
1281
      Group2Spin->buttonApply->setFocus();
1371
      //Group2Spin->buttonApply->setFocus();
1282
    }
1372
    }
1283
    if ( Group3Spin->isVisible() ) {
1373
    if ( Group3Spin->isVisible() ) {
1284
      Group3Spin->buttonApply->setEnabled(false);
1374
      Group3Spin->buttonApply->setEnabled(false);
1285
      Group3Spin->buttonApply->setFocus();
1375
      //Group3Spin->buttonApply->setFocus();
1286
    }
1376
    }
1287
    if ( Group4Spin->isVisible() ) {
1377
    if ( Group4Spin->isVisible() ) {
1288
      Group4Spin->buttonApply->setEnabled(false);
1378
      Group4Spin->buttonApply->setEnabled(false);
1289
      Group4Spin->buttonApply->setFocus();
1379
      //Group4Spin->buttonApply->setFocus();
1290
    }
1380
    }
1291
  }
1381
  }
1292
  else {
1382
  else {
Lines 1294-1319 Link Here
1294
1384
1295
    if ( Group1Sel->isVisible() ) {
1385
    if ( Group1Sel->isVisible() ) {
1296
      Group1Sel->buttonApply->setEnabled(true);
1386
      Group1Sel->buttonApply->setEnabled(true);
1297
      Group1Sel->buttonApply->setFocus();
1387
      //Group1Sel->buttonApply->setFocus();
1298
    }
1388
    }
1299
    if ( Group1Spin->isVisible() ) {
1389
    if ( Group1Spin->isVisible() ) {
1300
      Group1Spin->buttonApply->setEnabled(true);
1390
      Group1Spin->buttonApply->setEnabled(true);
1301
      Group1Spin->buttonApply->setFocus();
1391
      //Group1Spin->buttonApply->setFocus();
1302
    }
1392
    }
1303
    if ( Group2Spin->isVisible() ) {
1393
    if ( Group2Spin->isVisible() ) {
1304
      Group2Spin->buttonApply->setEnabled(true);
1394
      Group2Spin->buttonApply->setEnabled(true);
1305
      Group2Spin->buttonApply->setFocus();
1395
      //Group2Spin->buttonApply->setFocus();
1306
    }
1396
    }
1307
    if ( Group3Spin->isVisible() ) {
1397
    if ( Group3Spin->isVisible() ) {
1308
      Group3Spin->buttonApply->setEnabled(true);
1398
      Group3Spin->buttonApply->setEnabled(true);
1309
      Group3Spin->buttonApply->setFocus();
1399
      //Group3Spin->buttonApply->setFocus();
1310
    }
1400
    }
1311
    if ( Group4Spin->isVisible() ) {
1401
    if ( Group4Spin->isVisible() ) {
1312
      Group4Spin->buttonApply->setEnabled(true);
1402
      Group4Spin->buttonApply->setEnabled(true);
1313
      Group4Spin->buttonApply->setFocus();
1403
      //Group4Spin->buttonApply->setFocus();
1314
    }
1404
    }
1315
  }
1405
  }
1316
    
1406
1317
  gp_Ax3 myWPlane = myGeometryGUI->GetWorkingPlane();
1407
  gp_Ax3 myWPlane = myGeometryGUI->GetWorkingPlane();
1318
  GEOM::ListOfDouble_var WPlane = new GEOM::ListOfDouble;
1408
  GEOM::ListOfDouble_var WPlane = new GEOM::ListOfDouble;
1319
  WPlane->length(9);
1409
  WPlane->length(9);
Lines 1329-1335 Link Here
1329
  WPlane[7] = myWPlane.XDirection().Y();
1419
  WPlane[7] = myWPlane.XDirection().Y();
1330
  WPlane[8] = myWPlane.XDirection().Z();
1420
  WPlane[8] = myWPlane.XDirection().Z();
1331
1421
1332
  GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane );
1422
  GEOM::GEOM_Object_var anObj =
1423
    GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane );
1333
1424
1334
  if ( !anObj->_is_nil() )
1425
  if ( !anObj->_is_nil() )
1335
    objects.push_back( anObj._retn() );
1426
    objects.push_back( anObj._retn() );
Lines 1441-1447 Link Here
1441
      ClickOnHelp();
1532
      ClickOnHelp();
1442
    }
1533
    }
1443
}
1534
}
1444
1445
1446
1447
(-)GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.h (-19 / +21 lines)
Lines 1-23 Link Here
1
//  GEOM GEOMGUI : GUI for Geometry component
1
//  GEOM GEOMGUI : GUI for Geometry component
2
//
2
//
3
//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
3
//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4
//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
4
//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5
// 
5
//
6
//  This library is free software; you can redistribute it and/or 
6
//  This library is free software; you can redistribute it and/or
7
//  modify it under the terms of the GNU Lesser General Public 
7
//  modify it under the terms of the GNU Lesser General Public
8
//  License as published by the Free Software Foundation; either 
8
//  License as published by the Free Software Foundation; either
9
//  version 2.1 of the License. 
9
//  version 2.1 of the License.
10
// 
10
//
11
//  This library is distributed in the hope that it will be useful, 
11
//  This library is distributed in the hope that it will be useful,
12
//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
//  Lesser General Public License for more details. 
14
//  Lesser General Public License for more details.
15
// 
15
//
16
//  You should have received a copy of the GNU Lesser General Public 
16
//  You should have received a copy of the GNU Lesser General Public
17
//  License along with this library; if not, write to the Free Software 
17
//  License along with this library; if not, write to the Free Software
18
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
// 
19
//
20
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
//
21
//
22
//
22
//
23
//
23
//
Lines 58-64 Link Here
58
// purpose  :
58
// purpose  :
59
//=================================================================================
59
//=================================================================================
60
class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper
60
class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper
61
{ 
61
{
62
    Q_OBJECT
62
    Q_OBJECT
63
63
64
public:
64
public:
Lines 66-71 Link Here
66
			  const char* name = 0, bool modal = FALSE, WFlags fl = 0);
66
			  const char* name = 0, bool modal = FALSE, WFlags fl = 0);
67
    ~EntityGUI_SketcherDlg();
67
    ~EntityGUI_SketcherDlg();
68
68
69
    bool eventFilter (QObject* object, QEvent* event);
70
69
protected:
71
protected:
70
    // redefined from GEOMBase_Helper
72
    // redefined from GEOMBase_Helper
71
    virtual GEOM::GEOM_IOperations_ptr createOperation();
73
    virtual GEOM::GEOM_IOperations_ptr createOperation();
Lines 73-79 Link Here
73
    virtual bool execute( ObjectList& objects );
75
    virtual bool execute( ObjectList& objects );
74
76
75
    void closeEvent( QCloseEvent* e );
77
    void closeEvent( QCloseEvent* e );
76
    void keyPressEvent( QKeyEvent* e );    
78
    void keyPressEvent( QKeyEvent* e );
77
79
78
private :
80
private :
79
    void Init();
81
    void Init();
(-)GEOM_SRC_3.2.2/src/GEOMBase/Makefile.in (+1 lines)
Lines 57-62 Link Here
57
		 SALOMEDS.idl \
57
		 SALOMEDS.idl \
58
		 SALOMEDS_Attributes.idl \
58
		 SALOMEDS_Attributes.idl \
59
                 SALOME_GenericObj.idl \
59
                 SALOME_GenericObj.idl \
60
		 SALOME_Component.idl \
60
		 GEOM_Gen.idl
61
		 GEOM_Gen.idl
61
62
62
LIB_SERVER_IDL = 
63
LIB_SERVER_IDL = 
(-)GEOM_SRC_3.2.2/src/GEOMGUI/GEOM_msg_en.po (-1 / +7 lines)
Lines 903-909 Link Here
903
903
904
#: GeometryGUI_FaceDlg.cxx:78
904
#: GeometryGUI_FaceDlg.cxx:78
905
msgid "GEOM_FACE_FFW"
905
msgid "GEOM_FACE_FFW"
906
msgstr "Face from a wire"
906
msgstr "Face from a closed wire and edge"
907
907
908
#: GeometryGUI_FaceDlg.cxx:103
908
#: GeometryGUI_FaceDlg.cxx:103
909
msgid "GEOM_FACE_OPT"
909
msgid "GEOM_FACE_OPT"
Lines 2958-2960 Link Here
2958
2958
2959
msgid "PREF_TAB_SETTINGS"
2959
msgid "PREF_TAB_SETTINGS"
2960
msgstr "Settings"
2960
msgstr "Settings"
2961
2962
msgid "ERROR_SHAPE_TYPE"
2963
msgstr "Object of incorrect type selected!\nPlease, select face, shell or solid and try again"
2964
2965
msgid "DEP_OBJECT"
2966
msgstr "Selected object has been used to create another one\n It can't be deleted "
(-)GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI.cxx (-131 / +138 lines)
Lines 17-23 Link Here
17
//  License along with this library; if not, write to the Free Software
17
//  License along with this library; if not, write to the Free Software
18
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19
//
19
//
20
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20
//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21
//
21
//
22
//
22
//
23
//
23
//
Lines 96-102 Link Here
96
96
97
//=======================================================================
97
//=======================================================================
98
// function : ClientSObjectToObject
98
// function : ClientSObjectToObject
99
// purpose  : 
99
// purpose  :
100
//=======================================================================
100
//=======================================================================
101
CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject)
101
CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject)
102
{
102
{
Lines 116-122 Link Here
116
116
117
//=======================================================================
117
//=======================================================================
118
// function : ClientStudyToStudy
118
// function : ClientStudyToStudy
119
// purpose  : 
119
// purpose  :
120
//=======================================================================
120
//=======================================================================
121
SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
121
SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy)
122
{
122
{
Lines 171-182 Link Here
171
  SalomeApp_Module( "GEOM" )
171
  SalomeApp_Module( "GEOM" )
172
{
172
{
173
  if ( CORBA::is_nil( myComponentGeom ) )
173
  if ( CORBA::is_nil( myComponentGeom ) )
174
  { 
174
  {
175
    SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() );
175
    SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() );
176
    Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" );
176
    Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" );
177
    myComponentGeom  = GEOM::GEOM_Gen::_narrow( comp );
177
    myComponentGeom  = GEOM::GEOM_Gen::_narrow( comp );
178
  }
178
  }
179
  
179
180
  myState           = -1;
180
  myState           = -1;
181
  myActiveDialogBox = 0;
181
  myActiveDialogBox = 0;
182
  myFatherior       = "";
182
  myFatherior       = "";
Lines 350-356 Link Here
350
  bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
350
  bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() );
351
  // if current viewframe is not of OCC and not of VTK type - return immediately
351
  // if current viewframe is not of OCC and not of VTK type - return immediately
352
  // fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
352
  // fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example)
353
  bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); 
353
  bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 );
354
  if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand )
354
  if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand )
355
      return;
355
      return;
356
356
Lines 486-492 Link Here
486
  else if( id == 503 ||   // MENU OPERATION - PARTITION
486
  else if( id == 503 ||   // MENU OPERATION - PARTITION
487
	   id == 504 ||   // MENU OPERATION - ARCHIMEDE
487
	   id == 504 ||   // MENU OPERATION - ARCHIMEDE
488
	   id == 505 ||   // MENU OPERATION - FILLET
488
	   id == 505 ||   // MENU OPERATION - FILLET
489
	   id == 506 ||   // MENU OPERATION - CHAMFER  
489
	   id == 506 ||   // MENU OPERATION - CHAMFER
490
	   id == 507 ) {  // MENU OPERATION - CLIPPING RANGE
490
	   id == 507 ) {  // MENU OPERATION - CLIPPING RANGE
491
#ifndef WNT
491
#ifndef WNT
492
	library = getLibrary( "libOperationGUI.so" );
492
	library = getLibrary( "libOperationGUI.so" );
Lines 549-557 Link Here
549
  }
549
  }
550
550
551
  // call method of corresponding GUI library
551
  // call method of corresponding GUI library
552
  if ( library ) 
552
  if ( library )
553
    library->OnGUIEvent( id, desk );
553
    library->OnGUIEvent( id, desk );
554
  else 
554
  else
555
    SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) );
555
    SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) );
556
}
556
}
557
557
Lines 578-584 Link Here
578
// purpose  : Manages mouse move events [static]
578
// purpose  : Manages mouse move events [static]
579
//=================================================================================
579
//=================================================================================
580
void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe )
580
void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe )
581
{  
581
{
582
  GUIMap::Iterator it;
582
  GUIMap::Iterator it;
583
  bool bOk = true;
583
  bool bOk = true;
584
  for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) {
584
  for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) {
Lines 637-643 Link Here
637
{
637
{
638
  QMenuBar*     Mb = parent->getMainMenuBar();
638
  QMenuBar*     Mb = parent->getMainMenuBar();
639
  SUIT_Study*   ActiveStudy = application()->activeStudy();
639
  SUIT_Study*   ActiveStudy = application()->activeStudy();
640
    
640
641
// Wireframe or Shading
641
// Wireframe or Shading
642
  int DisplayMode = 0;
642
  int DisplayMode = 0;
643
  SUIT_ViewWindow* window = application()->desktop()->activeWindow();
643
  SUIT_ViewWindow* window = application()->desktop()->activeWindow();
Lines 671-686 Link Here
671
  //  if(!AddInStudy.isEmpty())
671
  //  if(!AddInStudy.isEmpty())
672
  //    Settings_AddInStudy = AddInStudy.toInt();
672
  //    Settings_AddInStudy = AddInStudy.toInt();
673
  //  else
673
  //  else
674
  
674
675
  Settings_AddInStudy = 1;
675
  Settings_AddInStudy = 1;
676
  Mb->setItemChecked(411, Settings_AddInStudy);
676
  Mb->setItemChecked(411, Settings_AddInStudy);
677
677
678
  // step value 
678
  // step value
679
  QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
679
  QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep");
680
  if(S.isEmpty())
680
  if(S.isEmpty())
681
    QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100");
681
    QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100");
682
682
683
  // isos 
683
  // isos
684
  int count = ActiveStudy->getStudyFramesCount();
684
  int count = ActiveStudy->getStudyFramesCount();
685
  for(int i = 0; i < count; i++) {
685
  for(int i = 0; i < count; i++) {
686
    if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
686
    if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) {
Lines 704-725 Link Here
704
  GUIMap::Iterator it;
704
  GUIMap::Iterator it;
705
  for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it )
705
  for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it )
706
    bOk = bOk && it.data()->SetSettings( parent );
706
    bOk = bOk && it.data()->SetSettings( parent );
707
    
707
708
  // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable)	
708
  // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable)
709
  if (getenv( "GEOM_CLIPPING" ) == NULL)
709
  if (getenv( "GEOM_CLIPPING" ) == NULL)
710
    {
710
    {
711
      QMenuItem* mi = Mb->findItem(50);
711
      QMenuItem* mi = Mb->findItem(50);
712
      if (mi && mi->popup())
712
      if (mi && mi->popup())
713
      mi->popup()->removeItem(507);    	
713
      mi->popup()->removeItem(507);
714
    } 
714
    }
715
    
715
716
  return bOk;
716
  return bOk;
717
}
717
}
718
*/
718
*/
719
719
720
//=======================================================================
720
//=======================================================================
721
// function : createGeomAction
721
// function : createGeomAction
722
// purpose  : 
722
// purpose  :
723
//=======================================================================
723
//=======================================================================
724
void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle  )
724
void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle  )
725
{
725
{
Lines 727-733 Link Here
727
  QWidget* parent = application()->desktop();
727
  QWidget* parent = application()->desktop();
728
  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
728
  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
729
  QPixmap pix;
729
  QPixmap pix;
730
  if ( icon_id.length() ) 
730
  if ( icon_id.length() )
731
    pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) );
731
    pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) );
732
  else
732
  else
733
    pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false );
733
    pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false );
Lines 831-837 Link Here
831
  createGeomAction( 609, "CHECK_FREE_BNDS" );
831
  createGeomAction( 609, "CHECK_FREE_BNDS" );
832
  createGeomAction( 610, "CHECK_FREE_FACES" );
832
  createGeomAction( 610, "CHECK_FREE_FACES" );
833
  createGeomAction( 611, "CHANGE_ORIENTATION" );
833
  createGeomAction( 611, "CHANGE_ORIENTATION" );
834
  
834
835
  createGeomAction( 708, "POINT_COORDS" );
835
  createGeomAction( 708, "POINT_COORDS" );
836
  createGeomAction( 701, "BASIC_PROPS" );
836
  createGeomAction( 701, "BASIC_PROPS" );
837
  createGeomAction( 702, "MASS_CENTER" );
837
  createGeomAction( 702, "MASS_CENTER" );
Lines 845-851 Link Here
845
  createGeomAction( 7072, "CHECK_COMPOUND" );
845
  createGeomAction( 7072, "CHECK_COMPOUND" );
846
846
847
  createGeomAction( 5103, "CHECK_GEOMETRY" );
847
  createGeomAction( 5103, "CHECK_GEOMETRY" );
848
  
848
849
  createGeomAction( 412, "SHADING_COLOR" );
849
  createGeomAction( 412, "SHADING_COLOR" );
850
  createGeomAction( 413, "ISOS" );
850
  createGeomAction( 413, "ISOS" );
851
  createGeomAction( 414, "STEP_VALUE" );
851
  createGeomAction( 414, "STEP_VALUE" );
Lines 896-1020 Link Here
896
  createMenu( 4020, basicId, -1 );
896
  createMenu( 4020, basicId, -1 );
897
897
898
  int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 );
898
  int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 );
899
  createMenu( 4021, primId, -1 );  
899
  createMenu( 4021, primId, -1 );
900
  createMenu( 4022, primId, -1 );  
900
  createMenu( 4022, primId, -1 );
901
  createMenu( 4023, primId, -1 );  
901
  createMenu( 4023, primId, -1 );
902
  createMenu( 4024, primId, -1 );  
902
  createMenu( 4024, primId, -1 );
903
  createMenu( 4025, primId, -1 );  
903
  createMenu( 4025, primId, -1 );
904
904
905
  int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 );
905
  int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 );
906
  createMenu( 4031, genId, -1 );  
906
  createMenu( 4031, genId, -1 );
907
  createMenu( 4032, genId, -1 );  
907
  createMenu( 4032, genId, -1 );
908
  createMenu( 4033, genId, -1 );  
908
  createMenu( 4033, genId, -1 );
909
  createMenu( 4034, genId, -1 );  
909
  createMenu( 4034, genId, -1 );
910
  createMenu( separator(), newEntId, -1 );
910
  createMenu( separator(), newEntId, -1 );
911
911
912
  int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 );
912
  int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 );
913
  createMenu( 800, groupId, -1 );  
913
  createMenu( 800, groupId, -1 );
914
  createMenu( 801, groupId, -1 );  
914
  createMenu( 801, groupId, -1 );
915
  createMenu( separator(), newEntId, -1 );
915
  createMenu( separator(), newEntId, -1 );
916
916
917
  int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 );
917
  int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 );
918
  createMenu( 9997, blocksId, -1 );  
918
  createMenu( 9997, blocksId, -1 );
919
  createMenu( 9999, blocksId, -1 );  
919
  createMenu( 9999, blocksId, -1 );
920
920
921
  createMenu( separator(), newEntId, -1 );
921
  createMenu( separator(), newEntId, -1 );
922
  createMenu( 404, newEntId, -1 );  
922
  createMenu( 404, newEntId, -1 );
923
  createMenu( separator(), newEntId, -1 );
923
  createMenu( separator(), newEntId, -1 );
924
  createMenu( 407, newEntId, -1 );  
924
  createMenu( 407, newEntId, -1 );
925
925
926
  int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 );
926
  int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 );
927
  createMenu( 4081, buildId, -1 );  
927
  createMenu( 4081, buildId, -1 );
928
  createMenu( 4082, buildId, -1 );  
928
  createMenu( 4082, buildId, -1 );
929
  createMenu( 4083, buildId, -1 );  
929
  createMenu( 4083, buildId, -1 );
930
  createMenu( 4084, buildId, -1 );  
930
  createMenu( 4084, buildId, -1 );
931
  createMenu( 4085, buildId, -1 );  
931
  createMenu( 4085, buildId, -1 );
932
  createMenu( 4086, buildId, -1 );  
932
  createMenu( 4086, buildId, -1 );
933
933
934
  int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 );
934
  int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 );
935
935
936
  int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 );
936
  int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 );
937
  createMenu( 5011, boolId, -1 );  
937
  createMenu( 5011, boolId, -1 );
938
  createMenu( 5012, boolId, -1 );  
938
  createMenu( 5012, boolId, -1 );
939
  createMenu( 5013, boolId, -1 );  
939
  createMenu( 5013, boolId, -1 );
940
  createMenu( 5014, boolId, -1 );  
940
  createMenu( 5014, boolId, -1 );
941
941
942
  int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 );
942
  int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 );
943
  createMenu( 5021, transId, -1 );  
943
  createMenu( 5021, transId, -1 );
944
  createMenu( 5022, transId, -1 );  
944
  createMenu( 5022, transId, -1 );
945
  createMenu( 5023, transId, -1 );  
945
  createMenu( 5023, transId, -1 );
946
  createMenu( 5024, transId, -1 );  
946
  createMenu( 5024, transId, -1 );
947
  createMenu( 5025, transId, -1 );  
947
  createMenu( 5025, transId, -1 );
948
  createMenu( 5026, transId, -1 );  
948
  createMenu( 5026, transId, -1 );
949
  createMenu( separator(), transId, -1 );
949
  createMenu( separator(), transId, -1 );
950
  createMenu( 5027, transId, -1 );  
950
  createMenu( 5027, transId, -1 );
951
  createMenu( 5028, transId, -1 );  
951
  createMenu( 5028, transId, -1 );
952
952
953
  createMenu( 503, operId, -1 );  
953
  createMenu( 503, operId, -1 );
954
  createMenu( 504, operId, -1 );  
954
  createMenu( 504, operId, -1 );
955
  createMenu( separator(), operId, -1 );
955
  createMenu( separator(), operId, -1 );
956
  createMenu( 505, transId, -1 );  
956
  createMenu( 505, transId, -1 );
957
  createMenu( 506, transId, -1 );  
957
  createMenu( 506, transId, -1 );
958
  //createMenu( 507, transId, -1 );  
958
  //createMenu( 507, transId, -1 );
959
959
960
  int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 );
960
  int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 );
961
  createMenu( 9998, blockId, -1 );  
961
  createMenu( 9998, blockId, -1 );
962
  createMenu( 9995, blockId, -1 );  
962
  createMenu( 9995, blockId, -1 );
963
  createMenu( 99991, blockId, -1 );  
963
  createMenu( 99991, blockId, -1 );
964
964
965
  int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 );
965
  int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 );
966
  createMenu( 605, repairId, -1 );  
966
  createMenu( 605, repairId, -1 );
967
  createMenu( 603, repairId, -1 );  
967
  createMenu( 603, repairId, -1 );
968
  createMenu( 606, repairId, -1 );  
968
  createMenu( 606, repairId, -1 );
969
  createMenu( 607, repairId, -1 );  
969
  createMenu( 607, repairId, -1 );
970
  createMenu( 604, repairId, -1 );  
970
  createMenu( 604, repairId, -1 );
971
  createMenu( 601, repairId, -1 );  
971
  createMenu( 601, repairId, -1 );
972
  createMenu( 602, repairId, -1 );  
972
  createMenu( 602, repairId, -1 );
973
  createMenu( 608, repairId, -1 );  
973
  createMenu( 608, repairId, -1 );
974
  createMenu( 609, repairId, -1 );  
974
  createMenu( 609, repairId, -1 );
975
  createMenu( 610, repairId, -1 );  
975
  createMenu( 610, repairId, -1 );
976
  createMenu( 611, repairId, -1 );  
976
  createMenu( 611, repairId, -1 );
977
977
978
  int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 );
978
  int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 );
979
  createMenu( 708, measurId, -1 );  
979
  createMenu( 708, measurId, -1 );
980
  createMenu( 701, measurId, -1 );  
980
  createMenu( 701, measurId, -1 );
981
  createMenu( separator(), measurId, -1 );
981
  createMenu( separator(), measurId, -1 );
982
  createMenu( 702, measurId, -1 );  
982
  createMenu( 702, measurId, -1 );
983
  createMenu( 703, measurId, -1 );  
983
  createMenu( 703, measurId, -1 );
984
  createMenu( separator(), measurId, -1 );
984
  createMenu( separator(), measurId, -1 );
985
985
986
  int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 );
986
  int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 );
987
  createMenu( 7041, dimId, -1 );  
987
  createMenu( 7041, dimId, -1 );
988
  createMenu( 7042, dimId, -1 );
988
  createMenu( 7042, dimId, -1 );
989
  createMenu( separator(), measurId, -1 );
989
  createMenu( separator(), measurId, -1 );
990
  
990
991
  createMenu( 705, measurId, -1 );  
991
  createMenu( 705, measurId, -1 );
992
  createMenu( separator(), measurId, -1 );
992
  createMenu( separator(), measurId, -1 );
993
  createMenu( 706, measurId, -1 );  
993
  createMenu( 706, measurId, -1 );
994
  createMenu( 707, measurId, -1 );  
994
  createMenu( 707, measurId, -1 );
995
  createMenu( 7072, measurId, -1 );  
995
  createMenu( 7072, measurId, -1 );
996
996
997
  int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
997
  int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 );
998
  createMenu( separator(), toolsId, -1 );
998
  createMenu( separator(), toolsId, -1 );
999
  createMenu( 5103, toolsId, -1 );  
999
  createMenu( 5103, toolsId, -1 );
1000
  
1000
1001
  //int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 );
1001
  //int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 );
1002
  //createMenu( separator(), prefId, -1 );
1002
  //createMenu( separator(), prefId, -1 );
1003
  //int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 );
1003
  //int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 );
1004
  //createMenu( 412, geomId, -1 );  
1004
  //createMenu( 412, geomId, -1 );
1005
  //createMenu( 413, geomId, -1 );  
1005
  //createMenu( 413, geomId, -1 );
1006
  //createMenu( 414, geomId, -1 );  
1006
  //createMenu( 414, geomId, -1 );
1007
  //createMenu( separator(), prefId, -1 );
1007
  //createMenu( separator(), prefId, -1 );
1008
1008
1009
  int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 );
1009
  int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 );
1010
  createMenu( separator(), viewId, -1 );
1010
  createMenu( separator(), viewId, -1 );
1011
1011
1012
  int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 );
1012
  int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 );
1013
  createMenu( 211, dispmodeId, -1 );  
1013
  createMenu( 211, dispmodeId, -1 );
1014
  
1014
1015
  createMenu( separator(), viewId, -1 );
1015
  createMenu( separator(), viewId, -1 );
1016
  createMenu( 212, viewId, -1 );  
1016
  createMenu( 212, viewId, -1 );
1017
  createMenu( 214, viewId, -1 );  
1017
  createMenu( 214, viewId, -1 );
1018
  createMenu( separator(), viewId, -1 );
1018
  createMenu( separator(), viewId, -1 );
1019
1019
1020
/*
1020
/*
Lines 1022-1029 Link Here
1022
  because of these items are accessible through object browser and viewers
1022
  because of these items are accessible through object browser and viewers
1023
  we have removed they from main menu
1023
  we have removed they from main menu
1024
1024
1025
  createMenu( 216, viewId, -1 );  
1025
  createMenu( 216, viewId, -1 );
1026
  createMenu( 213, viewId, -1 );  
1026
  createMenu( 213, viewId, -1 );
1027
  createMenu( 215, viewId, -1 );
1027
  createMenu( 215, viewId, -1 );
1028
*/
1028
*/
1029
1029
Lines 1042-1074 Link Here
1042
  createTool( 4020, basicTbId );
1042
  createTool( 4020, basicTbId );
1043
1043
1044
  int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) );
1044
  int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) );
1045
  createTool( 4021, primTbId );  
1045
  createTool( 4021, primTbId );
1046
  createTool( 4022, primTbId );  
1046
  createTool( 4022, primTbId );
1047
  createTool( 4023, primTbId );  
1047
  createTool( 4023, primTbId );
1048
  createTool( 4024, primTbId );  
1048
  createTool( 4024, primTbId );
1049
  createTool( 4025, primTbId );  
1049
  createTool( 4025, primTbId );
1050
1050
1051
  int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) );
1051
  int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) );
1052
  createTool( 5011, boolTbId );  
1052
  createTool( 5011, boolTbId );
1053
  createTool( 5012, boolTbId );  
1053
  createTool( 5012, boolTbId );
1054
  createTool( 5013, boolTbId );  
1054
  createTool( 5013, boolTbId );
1055
  createTool( 5014, boolTbId );  
1055
  createTool( 5014, boolTbId );
1056
1056
1057
  int genTbId = createTool( tr( "TOOL_GENERATION" ) );
1057
  int genTbId = createTool( tr( "TOOL_GENERATION" ) );
1058
  createTool( 4031, genTbId );  
1058
  createTool( 4031, genTbId );
1059
  createTool( 4032, genTbId );  
1059
  createTool( 4032, genTbId );
1060
  createTool( 4033, genTbId );  
1060
  createTool( 4033, genTbId );
1061
  createTool( 4034, genTbId );  
1061
  createTool( 4034, genTbId );
1062
1062
1063
  int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) );
1063
  int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) );
1064
  createTool( 5021, transTbId );  
1064
  createTool( 5021, transTbId );
1065
  createTool( 5022, transTbId );  
1065
  createTool( 5022, transTbId );
1066
  createTool( 5023, transTbId );  
1066
  createTool( 5023, transTbId );
1067
  createTool( 5024, transTbId );  
1067
  createTool( 5024, transTbId );
1068
  createTool( 5025, transTbId );  
1068
  createTool( 5025, transTbId );
1069
  createTool( 5026, transTbId );  
1069
  createTool( 5026, transTbId );
1070
  createTool( separator(), transTbId );
1070
  createTool( separator(), transTbId );
1071
  createTool( 5027, transTbId );  
1071
  createTool( 5027, transTbId );
1072
  createTool( 5028, transTbId );
1072
  createTool( 5028, transTbId );
1073
1073
1074
  // ---- create popup menus --------------------------
1074
  // ---- create popup menus --------------------------
Lines 1185-1198 Link Here
1185
  setMenuShown( false );
1185
  setMenuShown( false );
1186
  setToolShown( false );
1186
  setToolShown( false );
1187
1187
1188
  disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), 
1188
  disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ),
1189
	     this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
1189
	     this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) );
1190
1190
1191
  EmitSignalCloseAllDialogs();
1191
  EmitSignalCloseAllDialogs();
1192
1192
1193
  GUIMap::Iterator it;
1193
  GUIMap::Iterator it;
1194
  for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it )
1194
  for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it )
1195
    it.data()->deactivate();  
1195
    it.data()->deactivate();
1196
1196
1197
  // Unset actions accelerator keys
1197
  // Unset actions accelerator keys
1198
  //action(111)->setAccel(QKeySequence()); // Import
1198
  //action(111)->setAccel(QKeySequence()); // Import
Lines 1286-1292 Link Here
1286
  if( nbSel == 0 ) {
1286
  if( nbSel == 0 ) {
1287
    ////// NOTHING SELECTED
1287
    ////// NOTHING SELECTED
1288
    popup->clear();
1288
    popup->clear();
1289
  } 
1289
  }
1290
  else if ( nbSel == 1 ) {
1290
  else if ( nbSel == 1 ) {
1291
    ////// SINGLE OBJECT SELECTION
1291
    ////// SINGLE OBJECT SELECTION
1292
    if ( parentComponent != parent->getActiveComponent() )  {
1292
    if ( parentComponent != parent->getActiveComponent() )  {
Lines 1513-1519 Link Here
1513
1513
1514
//=======================================================================
1514
//=======================================================================
1515
// function : GeometryGUI::BuildPresentation()
1515
// function : GeometryGUI::BuildPresentation()
1516
// purpose  : 
1516
// purpose  :
1517
//=======================================================================
1517
//=======================================================================
1518
void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win )
1518
void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win )
1519
{
1519
{
Lines 1531-1537 Link Here
1531
1531
1532
  const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() );
1532
  const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() );
1533
//  const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() );
1533
//  const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() );
1534
  
1534
1535
  // disable non-OCC viewframe menu commands
1535
  // disable non-OCC viewframe menu commands
1536
//  action( 404 )->setEnabled( ViewOCC ); // SKETCHER
1536
//  action( 404 )->setEnabled( ViewOCC ); // SKETCHER
1537
  action( 603 )->setEnabled( ViewOCC ); // SuppressFace
1537
  action( 603 )->setEnabled( ViewOCC ); // SuppressFace
Lines 1654-1675 Link Here
1654
1654
1655
  addPreference( tr( "PREF_SHADING_COLOR" ), genGroup,
1655
  addPreference( tr( "PREF_SHADING_COLOR" ), genGroup,
1656
		 LightApp_Preferences::Color, "Geometry", "shading_color" );
1656
		 LightApp_Preferences::Color, "Geometry", "shading_color" );
1657
  
1657
1658
  addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup,
1658
  addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup,
1659
		 LightApp_Preferences::Color, "Geometry", "wireframe_color" );
1659
		 LightApp_Preferences::Color, "Geometry", "wireframe_color" );
1660
  
1660
1661
  addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup,
1661
  addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup,
1662
		 LightApp_Preferences::Color, "Geometry", "free_bound_color" );
1662
		 LightApp_Preferences::Color, "Geometry", "free_bound_color" );
1663
  
1663
1664
  addPreference( tr( "PREF_LINE_COLOR"), genGroup,
1664
  addPreference( tr( "PREF_LINE_COLOR"), genGroup,
1665
		 LightApp_Preferences::Color, "Geometry", "line_color" );
1665
		 LightApp_Preferences::Color, "Geometry", "line_color" );
1666
  
1666
1667
  addPreference( tr( "PREF_POINT_COLOR"), genGroup,
1667
  addPreference( tr( "PREF_POINT_COLOR"), genGroup,
1668
		 LightApp_Preferences::Color, "Geometry", "point_color" );
1668
		 LightApp_Preferences::Color, "Geometry", "point_color" );
1669
  
1669
1670
  addPreference( tr( "PREF_ISOS_COLOR" ), genGroup,
1670
  addPreference( tr( "PREF_ISOS_COLOR" ), genGroup,
1671
		 LightApp_Preferences::Color, "Geometry", "isos_color" );
1671
		 LightApp_Preferences::Color, "Geometry", "isos_color" );
1672
  
1672
1673
  int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
1673
  int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup,
1674
			    LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
1674
			    LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" );
1675
1675
Lines 1677-1699 Link Here
1677
  QStringList aModesList;
1677
  QStringList aModesList;
1678
  aModesList.append( tr("MEN_WIREFRAME") );
1678
  aModesList.append( tr("MEN_WIREFRAME") );
1679
  aModesList.append( tr("MEN_SHADING") );
1679
  aModesList.append( tr("MEN_SHADING") );
1680
  
1680
1681
  QValueList<QVariant> anIndexesList;
1681
  QValueList<QVariant> anIndexesList;
1682
  anIndexesList.append(0);
1682
  anIndexesList.append(0);
1683
  anIndexesList.append(1);
1683
  anIndexesList.append(1);
1684
  
1684
1685
  setPreferenceProperty( dispmode, "strings", aModesList );
1685
  setPreferenceProperty( dispmode, "strings", aModesList );
1686
  setPreferenceProperty( dispmode, "indexes", anIndexesList );
1686
  setPreferenceProperty( dispmode, "indexes", anIndexesList );
1687
  
1687
1688
  // Set property for step value for spinboxes
1688
  // Set property for step value for spinboxes
1689
  setPreferenceProperty( step, "min", 0.001 );
1689
  setPreferenceProperty( step, "min", 0.001 );
1690
  setPreferenceProperty( step, "max", 10000 );
1690
  setPreferenceProperty( step, "max", 10000 );
1691
  setPreferenceProperty( step, "precision", 3 );
1691
  setPreferenceProperty( step, "precision", 3 );
1692
  
1692
1693
}
1693
}
1694
1694
1695
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )
1695
void GeometryGUI::preferencesChanged( const QString& section, const QString& param )
1696
{
1696
{
1697
  if (section == "Geometry") {
1698
    SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
1699
    if (param == QString("SettingsGeomStep")) {
1700
      double spin_step = aResourceMgr->doubleValue(section, param, 100.);
1701
      EmitSignalDefaultStepValueChanged(spin_step);
1702
    }
1703
  }
1697
}
1704
}
1698
1705
1699
LightApp_Displayer* GeometryGUI::displayer()
1706
LightApp_Displayer* GeometryGUI::displayer()
(-)GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI_Swig.cxx (-1 / +1 lines)
Lines 439-445 Link Here
439
	    ite.Value()->SetColor(CSFColor);
439
	    ite.Value()->SetColor(CSFColor);
440
	    if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape)))
440
	    if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape)))
441
	      Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor);
441
	      Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor);
442
	    ite.Value()->Redisplay(Standard_True);
442
	    ic->Redisplay(ite.Value(), true, true);
443
	    if (myUpdateViewer)
443
	    if (myUpdateViewer)
444
	      occViewer->update();
444
	      occViewer->update();
445
	    break;
445
	    break;
(-)GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx (-6 / +55 lines)
Lines 127-134 Link Here
127
          if (!BO.IsDone()) {
127
          if (!BO.IsDone()) {
128
            StdFail_NotDone::Raise("Common operation can not be performed on the given shapes");
128
            StdFail_NotDone::Raise("Common operation can not be performed on the given shapes");
129
          }
129
          }
130
          if (isCompound)
130
          if (isCompound) {
131
            B.Add(C, BO.Shape());
131
            TopoDS_Shape aStepResult = BO.Shape();
132
133
            // check result of this step: if it is a compound (boolean operations
134
            // allways return a compound), we add all sub-shapes of it.
135
            // This allows to avoid adding empty compounds,
136
            // resulting from COMMON on two non-intersecting shapes.
137
            if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
138
              TopoDS_Iterator aCompIter (aStepResult);
139
              for (; aCompIter.More(); aCompIter.Next()) {
140
                // add shape in a result
141
                B.Add(C, aCompIter.Value());
142
              }
143
            }
144
            else {
145
              // add shape in a result
146
              B.Add(C, aStepResult);
147
            }
148
          }
132
          else
149
          else
133
            aShape = BO.Shape();
150
            aShape = BO.Shape();
134
        }
151
        }
Lines 175-182 Link Here
175
          }
192
          }
176
          aCut = BO.Shape();
193
          aCut = BO.Shape();
177
        }
194
        }
178
        if (isCompound)
195
        if (isCompound) {
179
          B.Add(C, aCut);
196
          // check result of this step: if it is a compound (boolean operations
197
          // allways return a compound), we add all sub-shapes of it.
198
          // This allows to avoid adding empty compounds,
199
          // resulting from CUT of parts
200
          if (aCut.ShapeType() == TopAbs_COMPOUND) {
201
            TopoDS_Iterator aCompIter (aCut);
202
            for (; aCompIter.More(); aCompIter.Next()) {
203
              // add shape in a result
204
              B.Add(C, aCompIter.Value());
205
            }
206
          }
207
          else {
208
            // add shape in a result
209
            B.Add(C, aCut);
210
          }
211
        }
180
        else
212
        else
181
          aShape = aCut;
213
          aShape = aCut;
182
      }
214
      }
Lines 229-236 Link Here
229
          if (!BO.IsDone()) {
261
          if (!BO.IsDone()) {
230
            StdFail_NotDone::Raise("Section operation can not be performed on the given shapes");
262
            StdFail_NotDone::Raise("Section operation can not be performed on the given shapes");
231
          }
263
          }
232
          if (isCompound)
264
          if (isCompound) {
233
            B.Add(C, BO.Shape());
265
            TopoDS_Shape aStepResult = BO.Shape();
266
267
            // check result of this step: if it is a compound (boolean operations
268
            // allways return a compound), we add all sub-shapes of it.
269
            // This allows to avoid adding empty compounds,
270
            // resulting from SECTION on two non-intersecting shapes.
271
            if (aStepResult.ShapeType() == TopAbs_COMPOUND) {
272
              TopoDS_Iterator aCompIter (aStepResult);
273
              for (; aCompIter.More(); aCompIter.Next()) {
274
                // add shape in a result
275
                B.Add(C, aCompIter.Value());
276
              }
277
            }
278
            else {
279
              // add shape in a result
280
              B.Add(C, aStepResult);
281
            }
282
          }
234
          else
283
          else
235
            aShape = BO.Shape();
284
            aShape = BO.Shape();
236
        }
285
        }
(-)GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx (+141 lines)
Lines 1419-1424 Link Here
1419
1419
1420
//=============================================================================
1420
//=============================================================================
1421
/*!
1421
/*!
1422
 *  GetShapesOnPlaneWithLocation
1423
 */
1424
//=============================================================================
1425
Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocation
1426
                                        (const Handle(GEOM_Object)& theShape,
1427
                                         const Standard_Integer     theShapeType,
1428
                                         const Handle(GEOM_Object)& theAx1,
1429
					 const Handle(GEOM_Object)& thePnt,
1430
                                         const GEOMAlgo_State       theState)
1431
{
1432
  SetErrorCode(KO);
1433
1434
  if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL;
1435
1436
  TopoDS_Shape aShape = theShape->GetValue();
1437
  TopoDS_Shape anAx1  = theAx1->GetValue();
1438
  TopoDS_Shape anPnt = thePnt->GetValue();
1439
1440
  if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL;
1441
1442
  TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType);
1443
  if ( !checkTypeShapesOn( theShapeType ))
1444
    return NULL;
1445
1446
  // Create plane
1447
  if ( anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX ) return NULL;
1448
  TopoDS_Vertex V1, V2, V3;
1449
  TopoDS_Edge anEdge = TopoDS::Edge(anAx1);
1450
  TopExp::Vertices(anEdge, V1, V2, Standard_True);
1451
1452
  if (V1.IsNull() || V2.IsNull()) {
1453
    SetErrorCode("Bad edge given for the plane normal vector");
1454
    return NULL;
1455
  }
1456
  V3 = TopoDS::Vertex(anPnt);
1457
1458
  if(V3.IsNull()) {
1459
    SetErrorCode("Bad vertex given for the plane location");
1460
      return NULL;
1461
  }
1462
  gp_Pnt aLoc = BRep_Tool::Pnt(V3);
1463
  gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2));
1464
1465
  if (aVec.Magnitude() < Precision::Confusion()) {
1466
     SetErrorCode("Vector with null magnitude given");
1467
    return NULL;
1468
  }
1469
  Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec);
1470
1471
  if ( aPlane.IsNull() )
1472
    return NULL;
1473
  
1474
  // Find objects
1475
  TCollection_AsciiString anAsciiList;
1476
  Handle(TColStd_HSequenceOfTransient) aSeq;
1477
  aSeq = getShapesOnSurface( aPlane, theShape, aShapeType, theState, anAsciiList );
1478
  if ( aSeq.IsNull() || aSeq->Length() == 0 )
1479
    return NULL;
1480
1481
  // Make a Python command
1482
1483
  Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 ));
1484
  Handle(GEOM_Function) aFunction = anObj->GetLastFunction();
1485
1486
  GEOM::TPythonDump(aFunction) << "[" << anAsciiList.ToCString()
1487
    << "] = geompy.GetShapesOnPlaneWithLocation(" << theShape << ", "
1488
    << aShapeType << ", " << theAx1 << ", "<< thePnt <<", " << theState << ")";
1489
1490
  SetErrorCode(OK);
1491
  return aSeq;
1492
}
1493
1494
//=============================================================================
1495
/*!
1422
 *  GetShapesOnCylinder
1496
 *  GetShapesOnCylinder
1423
 */
1497
 */
1424
//=============================================================================
1498
//=============================================================================
Lines 1567-1572 Link Here
1567
1641
1568
//=============================================================================
1642
//=============================================================================
1569
/*!
1643
/*!
1644
 *  GetShapesOnPlaneWithLocationIDs
1645
 */
1646
//=============================================================================
1647
Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocationIDs
1648
                                        (const Handle(GEOM_Object)& theShape,
1649
                                         const Standard_Integer     theShapeType,
1650
                                         const Handle(GEOM_Object)& theAx1,
1651
					 const Handle(GEOM_Object)& thePnt,
1652
                                         const GEOMAlgo_State       theState)
1653
{
1654
  SetErrorCode(KO);
1655
1656
  if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL;
1657
1658
  TopoDS_Shape aShape = theShape->GetValue();
1659
  TopoDS_Shape anAx1  = theAx1->GetValue();
1660
  TopoDS_Shape anPnt  = thePnt->GetValue();
1661
1662
  if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL;
1663
1664
  TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType);
1665
  if ( !checkTypeShapesOn( aShapeType ))
1666
    return NULL;
1667
1668
  // Create plane
1669
  if (anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX) return NULL;
1670
  TopoDS_Edge anEdge = TopoDS::Edge(anAx1);
1671
  TopoDS_Vertex V1, V2, V3;
1672
  TopExp::Vertices(anEdge, V1, V2, Standard_True);
1673
  if (V1.IsNull() || V2.IsNull()) {
1674
    SetErrorCode("Bad edge given for the plane normal vector");
1675
    return NULL;
1676
  }
1677
  V3 = TopoDS::Vertex(anPnt);
1678
  if(V3.IsNull()) {
1679
    SetErrorCode("Bad vertex given for the plane location");
1680
      return NULL;
1681
  }
1682
  gp_Pnt aLoc = BRep_Tool::Pnt(V3);
1683
  gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2));
1684
  if (aVec.Magnitude() < Precision::Confusion()) {
1685
    SetErrorCode("Vector with null magnitude given");
1686
    return NULL;
1687
  }
1688
  
1689
  Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec);  
1690
  if ( aPlane.IsNull() )
1691
    return NULL;
1692
1693
  // Find object IDs
1694
  Handle(TColStd_HSequenceOfInteger) aSeq;
1695
  aSeq = getShapesOnSurfaceIDs( aPlane, aShape, aShapeType, theState );
1696
1697
  // The GetShapesOnPlaneIDs() doesn't change object so no new function is required.
1698
  Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAx1)->GetLastFunction();
1699
1700
  // Make a Python command
1701
  GEOM::TPythonDump(aFunction, /*append=*/true)
1702
    << "listShapesOnPlane = geompy.GetShapesOnPlaneWithLocationIDs"
1703
    << "(" << theShape << ", " << aShapeType << ", " << theAx1 << ", "<< thePnt << ", "  << theState << ")";
1704
1705
  SetErrorCode(OK);
1706
  return aSeq;
1707
}
1708
1709
//=============================================================================
1710
/*!
1570
 *  GetShapesOnCylinderIDs
1711
 *  GetShapesOnCylinderIDs
1571
 */
1712
 */
1572
//=============================================================================
1713
//=============================================================================
(-)GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx (+13 lines)
Lines 97-102 Link Here
97
                                                         const Handle(GEOM_Object)& theAx1,
97
                                                         const Handle(GEOM_Object)& theAx1,
98
                                                         const GEOMAlgo_State       theState);
98
                                                         const GEOMAlgo_State       theState);
99
99
100
  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape,
101
								     const Standard_Integer     theShapeType,
102
								     const Handle(GEOM_Object)& theAx1,
103
								     const Handle(GEOM_Object)& thePnt,
104
								     const GEOMAlgo_State       theState);
105
106
100
  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
107
  Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape,
101
                                                            const Standard_Integer     theShapeType,
108
                                                            const Standard_Integer     theShapeType,
102
                                                            const Handle(GEOM_Object)& theAxis,
109
                                                            const Handle(GEOM_Object)& theAxis,
Lines 114-119 Link Here
114
                                                          const Handle(GEOM_Object)& theAx1,
121
                                                          const Handle(GEOM_Object)& theAx1,
115
                                                          const GEOMAlgo_State       theState);
122
                                                          const GEOMAlgo_State       theState);
116
123
124
  Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape,
125
						      const Standard_Integer     theShapeType,
126
                                                          const Handle(GEOM_Object)& theAx1,
127
							  const Handle(GEOM_Object)& thePnt,
128
                                                          const GEOMAlgo_State       theState);
129
117
  Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
130
  Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape,
118
                                                             const Standard_Integer     theShapeType,
131
                                                             const Standard_Integer     theShapeType,
119
                                                             const Handle(GEOM_Object)& theAxis,
132
                                                             const Handle(GEOM_Object)& theAxis,
(-)GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx (-12 / +37 lines)
Lines 170-177 Link Here
170
      if (!MW.IsDone()) {
170
      if (!MW.IsDone()) {
171
        Standard_ConstructionError::Raise("Wire construction failed");
171
        Standard_ConstructionError::Raise("Wire construction failed");
172
      }
172
      }
173
      //W = TopoDS::Wire(aShapeBase);
173
          W = MW;
174
      W = MW;
175
    }
174
    }
176
    else {
175
    else {
177
      Standard_NullObject::Raise
176
      Standard_NullObject::Raise
Lines 189-205 Link Here
189
      Standard_ConstructionError::Raise("No wires given");
188
      Standard_ConstructionError::Raise("No wires given");
190
    }
189
    }
191
190
192
    // first wire
191
    // first wire or edge
193
    Handle(GEOM_Function) aRefWire = Handle(GEOM_Function)::DownCast(aShapes->Value(1));
192
    Handle(GEOM_Function) aRefWire = Handle(GEOM_Function)::DownCast(aShapes->Value(1));
194
    TopoDS_Shape aWire = aRefWire->GetValue();
193
    TopoDS_Shape aWire = aRefWire->GetValue();
195
    if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE) {
194
    if (aWire.IsNull()) Standard_NullObject::Raise("Argument Shape is null");
196
      Standard_NullObject::Raise("Shape for face construction is null or not a wire");
195
    TopoDS_Wire W1;
196
    if(aWire.ShapeType() == TopAbs_WIRE) {
197
      W1 = TopoDS::Wire(aWire);
198
    }
199
    else if(aWire.ShapeType() == TopAbs_EDGE && aWire.Closed()) {
200
      BRepBuilderAPI_MakeWire MW;
201
      MW.Add(TopoDS::Edge(aWire));
202
      if (!MW.IsDone()) {
203
        Standard_ConstructionError::Raise("Wire construction failed");
204
      }
205
          W1 = MW;
206
    }
207
    else {
208
      Standard_NullObject::Raise
209
        ("Shape for face construction is neither a wire nor closed edge");
197
    }
210
    }
198
    TopoDS_Wire W = TopoDS::Wire(aWire);
199
211
200
    // basic face
212
    // basic face
201
    TopoDS_Shape FFace;
213
    TopoDS_Shape FFace;
202
    GEOMImpl_Block6Explorer::MakeFace(W, aCI.GetIsPlanar(), FFace);
214
    GEOMImpl_Block6Explorer::MakeFace(W1, aCI.GetIsPlanar(), FFace);
203
    if (FFace.IsNull()) {
215
    if (FFace.IsNull()) {
204
      Standard_ConstructionError::Raise("Face construction failed");
216
      Standard_ConstructionError::Raise("Face construction failed");
205
    }
217
    }
Lines 221-231 Link Here
221
        Handle(GEOM_Function) aRefWire_i =
233
        Handle(GEOM_Function) aRefWire_i =
222
          Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
234
          Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
223
        TopoDS_Shape aWire_i = aRefWire_i->GetValue();
235
        TopoDS_Shape aWire_i = aRefWire_i->GetValue();
224
        if (aWire_i.IsNull() || aWire_i.ShapeType() != TopAbs_WIRE) {
236
        if (aWire_i.IsNull()) Standard_NullObject::Raise("Argument Shape is null");
225
          Standard_NullObject::Raise("Shape for face construction is null or not a wire");
237
	TopoDS_Wire W_i;
226
        }
238
	if(aWire_i.ShapeType() == TopAbs_WIRE) {
227
239
	  W_i = TopoDS::Wire(aWire_i);
228
        FR.Add(TopoDS::Wire(aWire_i));
240
	}
241
	else if(aWire_i.ShapeType() == TopAbs_EDGE && aWire_i.Closed()) {
242
	  BRepBuilderAPI_MakeWire MW1;
243
	  MW1.Add(TopoDS::Edge(aWire_i));
244
	  if (!MW1.IsDone()) {
245
	    Standard_ConstructionError::Raise("Wire construction failed");
246
	  }
247
          W_i = MW1;  
248
	}
249
	else {
250
	  Standard_NullObject::Raise
251
	    ("Shape for face construction is neither a wire nor closed edges");
252
	}
253
	FR.Add(W_i);
229
      }
254
      }
230
255
231
      FR.Perform();
256
      FR.Perform();
(-)GEOM_SRC_3.2.2/src/GEOMToolsGUI/GEOMToolsGUI.cxx (+27 lines)
Lines 288-293 Link Here
288
	_PTR(GenericAttribute) anAttr;
288
	_PTR(GenericAttribute) anAttr;
289
	GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
289
	GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
290
290
291
        _PTR(SComponent) aGeom ( aStudy->FindComponent("GEOM") );
292
          if ( !aGeom )
293
            return;	
294
291
	// MAIN LOOP OF SELECTED OBJECTS
295
	// MAIN LOOP OF SELECTED OBJECTS
292
	for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
296
	for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) {
293
297
Lines 301-306 Link Here
301
	  if ( !strcmp( obj->GetIOR().c_str(), geomIOR ) )
305
	  if ( !strcmp( obj->GetIOR().c_str(), geomIOR ) )
302
	    continue;
306
	    continue;
303
307
308
          //If the object has been used to create another one,then it can't be deleted 
309
          _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeom));
310
          for ( it->InitEx( true ); it->More(); it->Next() ) {
311
             _PTR(SObject) chobj (it->Value());
312
             CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(chobj);
313
             GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
314
             if( CORBA::is_nil(geomObj) ) 
315
                continue;
316
             GEOM::ListOfGO_var list = geomObj->GetDependency();
317
             if( list->length() > 1 )
318
               for(int i = 0; i < list->length(); i++ ){
319
                 CORBA::Object_var corbaObj_rem = GeometryGUI::ClientSObjectToObject(obj);
320
                 GEOM::GEOM_Object_var geomObj_rem = GEOM::GEOM_Object::_narrow( corbaObj_rem );
321
	         if( list[i]->_is_equivalent( geomObj_rem ) ){
322
                   SUIT_MessageBox::warn1 ( app->desktop(),
323
					    QObject::tr("WRN_WARNING"),
324
					    QObject::tr("DEP_OBJECT"),
325
					    QObject::tr("BUT_OK") );
326
		   return;
327
		}
328
              }
329
	   }
330
304
          RemoveObjectWithChildren(obj, aStudy, views, disp);
331
          RemoveObjectWithChildren(obj, aStudy, views, disp);
305
332
306
	  // Remove objects from Study
333
	  // Remove objects from Study
(-)GEOM_SRC_3.2.2/src/GEOM_I/GEOM_Gen_i.cc (-26 / +36 lines)
Lines 1-18 Link Here
1
// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1
// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3
// 
3
//
4
// This library is free software; you can redistribute it and/or
4
// This library is free software; you can redistribute it and/or
5
// modify it under the terms of the GNU Lesser General Public
5
// modify it under the terms of the GNU Lesser General Public
6
// License as published by the Free Software Foundation; either 
6
// License as published by the Free Software Foundation; either
7
// version 2.1 of the License.
7
// version 2.1 of the License.
8
// 
8
//
9
// This library is distributed in the hope that it will be useful 
9
// This library is distributed in the hope that it will be useful
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of 
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
// Lesser General Public License for more details.
12
// Lesser General Public License for more details.
13
//
13
//
14
// You should have received a copy of the GNU Lesser General Public  
14
// You should have received a copy of the GNU Lesser General Public
15
// License along with this library; if not, write to the Free Software 
15
// License along with this library; if not, write to the Free Software
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17
//
17
//
18
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
Lines 68-85 Link Here
68
68
69
  _impl = new ::GEOMImpl_Gen;
69
  _impl = new ::GEOMImpl_Gen;
70
70
71
  //work around PAL12004, PAL12628
71
  //PAL10867: disable signals catching with "noexcepthandler" option
72
  //OSD::SetSignal( true );
72
  char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS");
73
  bool raiseFPE;
73
  if (!envNoCatchSignals || !atoi(envNoCatchSignals))
74
  {
75
    //work around PAL12004, PAL12628
76
    //OSD::SetSignal( true );
77
    bool raiseFPE;
74
#ifdef _DEBUG_
78
#ifdef _DEBUG_
75
  raiseFPE = true;
79
    raiseFPE = true;
76
  char* envDisableFPE = getenv("DISABLE_FPE");
80
    char* envDisableFPE = getenv("DISABLE_FPE");
77
  if (envDisableFPE && atoi(envDisableFPE))
81
    if (envDisableFPE && atoi(envDisableFPE))
78
    raiseFPE = false;
82
      raiseFPE = false;
79
#else
83
#else
80
  raiseFPE = false;
84
    raiseFPE = false;
81
#endif
85
#endif
82
  OSD::SetSignal( raiseFPE );
86
    OSD::SetSignal( raiseFPE );
87
  }
83
}
88
}
84
89
85
//============================================================================
90
//============================================================================
Lines 103-109 Link Here
103
{
108
{
104
  GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(IORString));
109
  GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(IORString));
105
  if (!CORBA::is_nil(anObject)) {
110
  if (!CORBA::is_nil(anObject)) {
106
    return strdup(anObject->GetEntry());
111
    return CORBA::string_dup(anObject->GetEntry());
107
  }
112
  }
108
  return 0;
113
  return 0;
109
}
114
}
Lines 128-134 Link Here
128
  GEOM::GEOM_Object_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
133
  GEOM::GEOM_Object_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
129
134
130
  CORBA::String_var aPersRefString = _orb->object_to_string(obj);
135
  CORBA::String_var aPersRefString = _orb->object_to_string(obj);
131
  return strdup(aPersRefString);
136
  return CORBA::string_dup(aPersRefString);
132
}
137
}
133
138
134
//============================================================================
139
//============================================================================
Lines 182-189 Link Here
182
  }
187
  }
183
  anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR");
188
  anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR");
184
  SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
189
  SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
185
  char *aGeomObjIOR = _orb->object_to_string(theObject);
190
  //char *aGeomObjIOR = _orb->object_to_string(theObject);
186
  anIOR->SetValue(strdup(aGeomObjIOR));
191
   CORBA::String_var aGeomObjIOR = _orb->object_to_string(theObject);
192
  //anIOR->SetValue(CORBA::string_dup(aGeomObjIOR));
193
  anIOR->SetValue(aGeomObjIOR);
187
194
188
  anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributePixMap");
195
  anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributePixMap");
189
  SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
196
  SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
Lines 238-244 Link Here
238
    aShapeName = "Vertex_";
245
    aShapeName = "Vertex_";
239
  }
246
  }
240
  //if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag());
247
  //if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag());
241
  //else aShapeName = TCollection_AsciiString(strdup(theName));
248
  //else aShapeName = TCollection_AsciiString(CORBA::string_dup(theName));
242
249
243
  // asv : 11.11.04 Introducing a more sofisticated method of name creation, just as
250
  // asv : 11.11.04 Introducing a more sofisticated method of name creation, just as
244
  //       it is done in GUI in GEOMBase::GetDefaultName() - not just add a Tag() == number
251
  //       it is done in GUI in GEOMBase::GetDefaultName() - not just add a Tag() == number
Lines 256-262 Link Here
256
    aShapeName = aNewShapeName;
263
    aShapeName = aNewShapeName;
257
  }
264
  }
258
  else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME)
265
  else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME)
259
    aShapeName = TCollection_AsciiString(strdup(theName));
266
    aShapeName = TCollection_AsciiString((char*)theName);
260
267
261
  //Set the study entry as a name of  the published GEOM_Object
268
  //Set the study entry as a name of  the published GEOM_Object
262
  aShape->SetStudyEntry(aResultSO->GetID());
269
  aShape->SetStudyEntry(aResultSO->GetID());
Lines 348-354 Link Here
348
  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
355
  if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true);
349
356
350
  SALOMEDS::Study_var Study = theComponent->GetStudy();
357
  SALOMEDS::Study_var Study = theComponent->GetStudy();
351
  TCollection_AsciiString name( strdup(Study->Name()) );
358
  TCollection_AsciiString name (Study->Name());
352
359
353
  return true;
360
  return true;
354
}
361
}
Lines 463-468 Link Here
463
  TDF_Tool::Entry(anObj->GetEntry(), anEntry);
470
  TDF_Tool::Entry(anObj->GetEntry(), anEntry);
464
  GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
471
  GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
465
472
473
  //Set the study entry of the published GEOM_Object
474
  obj->SetStudyEntry(aNewSO->GetID());
475
466
  // Add IORAttribute to the Study and set IOR of the created GEOM_Object to it
476
  // Add IORAttribute to the Study and set IOR of the created GEOM_Object to it
467
  SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aNewSO, "AttributeIOR");
477
  SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aNewSO, "AttributeIOR");
468
  SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
478
  SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
Lines 478-484 Link Here
478
//============================================================================
488
//============================================================================
479
char* GEOM_Gen_i::ComponentDataType()
489
char* GEOM_Gen_i::ComponentDataType()
480
{
490
{
481
  return strdup("GEOM");
491
  return CORBA::string_dup("GEOM");
482
}
492
}
483
493
484
//============================================================================
494
//============================================================================
Lines 529-535 Link Here
529
void GEOM_Gen_i::register_name(char * name)
539
void GEOM_Gen_i::register_name(char * name)
530
{
540
{
531
  GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this());
541
  GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this());
532
  name_service->Register(g, strdup(name));
542
  name_service->Register(g, CORBA::string_dup(name));
533
}
543
}
534
544
535
//============================================================================
545
//============================================================================
(-)GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.cc (+86 lines)
Lines 708-713 Link Here
708
708
709
//=============================================================================
709
//=============================================================================
710
/*!
710
/*!
711
 *  GetShapesOnPlaneWithLocation
712
 */
713
//=============================================================================
714
GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocation
715
                                                (GEOM::GEOM_Object_ptr   theShape,
716
						 const CORBA::Long       theShapeType,
717
						 GEOM::GEOM_Object_ptr   theAx1,
718
						 GEOM::GEOM_Object_ptr   thePnt,
719
						 const GEOM::shape_state theState)
720
{
721
  GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO;
722
723
  //Set a not done flag
724
  GetOperations()->SetNotDone();
725
726
  if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
727
728
  //Get the reference objects
729
  Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
730
    (theShape->GetStudyID(), theShape->GetEntry());
731
  Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
732
    (theAx1->GetStudyID(), theAx1->GetEntry());
733
  Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
734
    (thePnt->GetStudyID(), thePnt->GetEntry());
735
736
  if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
737
738
  //Get Shapes On Plane
739
  Handle(TColStd_HSequenceOfTransient) aHSeq =
740
    GetOperations()->GetShapesOnPlaneWithLocation(aShape, theShapeType, anAx1, anPnt, ShapeState(theState));
741
  if (!GetOperations()->IsDone() || aHSeq.IsNull())
742
    return aSeq._retn();
743
744
  Standard_Integer aLength = aHSeq->Length();
745
  aSeq->length(aLength);
746
  for (Standard_Integer i = 1; i <= aLength; i++)
747
    aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i)));
748
749
  return aSeq._retn();
750
}
751
752
//=============================================================================
753
/*!
711
 *  GetShapesOnCylinder
754
 *  GetShapesOnCylinder
712
 */
755
 */
713
//=============================================================================
756
//=============================================================================
Lines 891-896 Link Here
891
934
892
//=============================================================================
935
//=============================================================================
893
/*!
936
/*!
937
 *  GetShapesOnPlaneWithLocationIDs
938
 */
939
//=============================================================================
940
GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocationIDs
941
                                                (GEOM::GEOM_Object_ptr   theShape,
942
						 const CORBA::Long       theShapeType,
943
						 GEOM::GEOM_Object_ptr   theAx1,
944
						 GEOM::GEOM_Object_ptr   thePnt,
945
						 const GEOM::shape_state theState)
946
{
947
  GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong;
948
949
  //Set a not done flag
950
  GetOperations()->SetNotDone();
951
952
  if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn();
953
954
  //Get the reference objects
955
  Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
956
    (theShape->GetStudyID(), theShape->GetEntry());
957
  Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject
958
    (theAx1->GetStudyID(), theAx1->GetEntry());
959
  Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject
960
    (thePnt->GetStudyID(), thePnt->GetEntry());
961
962
  if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn();
963
964
  //Get Shapes On Plane
965
  Handle(TColStd_HSequenceOfInteger) aHSeq =
966
    GetOperations()->GetShapesOnPlaneWithLocationIDs(aShape, theShapeType, anAx1, anPnt, ShapeState(theState));
967
  if (!GetOperations()->IsDone() || aHSeq.IsNull())
968
    return aSeq._retn();
969
970
  Standard_Integer aLength = aHSeq->Length();
971
  aSeq->length(aLength);
972
  for (Standard_Integer i = 1; i <= aLength; i++)
973
    aSeq[i-1] = aHSeq->Value(i);
974
975
  return aSeq._retn();
976
}
977
978
//=============================================================================
979
/*!
894
 *  GetShapesOnCylinderIDs
980
 *  GetShapesOnCylinderIDs
895
 */
981
 */
896
//=============================================================================
982
//=============================================================================
(-)GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.hh (+12 lines)
Lines 97-102 Link Here
97
				    GEOM::GEOM_Object_ptr theAx1,
97
				    GEOM::GEOM_Object_ptr theAx1,
98
				    GEOM::shape_state     theState);
98
				    GEOM::shape_state     theState);
99
99
100
  GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape,
101
					       CORBA::Long           theShapeType,
102
					       GEOM::GEOM_Object_ptr theAx1,
103
					       GEOM::GEOM_Object_ptr thePnt,
104
					       GEOM::shape_state     theState);
105
100
  GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
106
  GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape,
101
				       CORBA::Long           theShapeType,
107
				       CORBA::Long           theShapeType,
102
				       GEOM::GEOM_Object_ptr theAxis,
108
				       GEOM::GEOM_Object_ptr theAxis,
Lines 122-127 Link Here
122
					 GEOM::GEOM_Object_ptr theAx1,
128
					 GEOM::GEOM_Object_ptr theAx1,
123
					 GEOM::shape_state     theState);
129
					 GEOM::shape_state     theState);
124
130
131
  GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape,
132
						     CORBA::Long           theShapeType,
133
						     GEOM::GEOM_Object_ptr theAx1,
134
						     GEOM::GEOM_Object_ptr thePnt,
135
						     GEOM::shape_state     theState);
136
125
  GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
137
  GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape,
126
					    CORBA::Long           theShapeType,
138
					    CORBA::Long           theShapeType,
127
					    GEOM::GEOM_Object_ptr theAxis,
139
					    GEOM::GEOM_Object_ptr theAxis,
(-)GEOM_SRC_3.2.2/src/GEOM_I/Makefile.in (-1 / +1 lines)
Lines 55-61 Link Here
55
	GEOM_DumpPython.cc
55
	GEOM_DumpPython.cc
56
56
57
# SALOME_Component.idl
57
# SALOME_Component.idl
58
LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl
58
LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl SALOME_GenericObj.idl
59
                 #SALOME_Exception.idl SALOME_GenericObj.idl
59
                 #SALOME_Exception.idl SALOME_GenericObj.idl
60
60
61
LIB_SERVER_IDL = GEOM_Gen.idl
61
LIB_SERVER_IDL = GEOM_Gen.idl
(-)GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_Spanner.py (-92 / +42 lines)
Lines 27-33 Link Here
27
27
28
############# MakeSpanner #############
28
############# MakeSpanner #############
29
29
30
def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None, hasGUI = 0):
30
def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None):
31
31
32
  ### Variables ###
32
  ### Variables ###
33
33
Lines 355-365 Link Here
355
    Block_new = geompy.MakeHexa2Faces(Face_g_1, Face_g_1_tr)
355
    Block_new = geompy.MakeHexa2Faces(Face_g_1, Face_g_1_tr)
356
    id_block_new = geompy.addToStudy(Block_new, "Block New")
356
    id_block_new = geompy.addToStudy(Block_new, "Block New")
357
357
358
  if isMeshTest == 1:
358
  if isMeshTest == 1 and smesh is not None:
359
359
360
    print "##################### Build Mesh #####################"
360
    print "##################### Build Mesh #####################"
361
361
362
    import StdMeshers
363
362
364
    # ---- add a middle block of spanner handle in study
363
    # ---- add a middle block of spanner handle in study
365
364
Lines 380-496 Link Here
380
    Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1")
379
    Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1")
381
    Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2")
380
    Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2")
382
381
383
    # ---- launch SMESH
382
    print "-------------------------- Algorithm and Hypothesis"
384
383
385
    smeshgui = None
384
    print "---- Init a Mesh with the Spanner"
386
    if hasGUI == 1:
387
      smeshgui = salome.ImportComponentGUI("SMESH")
388
      smeshgui.Init(salome.myStudyId)
389
390
    print "-------------------------- create Hypothesis"
391
392
    print "-------------------------- NumberOfSegments"
393
394
    hypNbSeg3 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
395
    hypNbSeg3.SetNumberOfSegments(3)
396
    print hypNbSeg3.GetName()
397
    print hypNbSeg3.GetId()
398
    print hypNbSeg3.GetNumberOfSegments()
399
400
    if hasGUI == 1:
401
      idseg = salome.ObjectToID(hypNbSeg3)
402
      smeshgui.SetName(idseg, "NumberOfSegments_3");
403
404
    print "-------------------------- LocalLength"
405
406
    hypLen1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so")
407
    hypLen1.SetLength(10)
408
    print hypLen1.GetName()
409
    print hypLen1.GetId()
410
    print hypLen1.GetLength()
411
385
412
    if hasGUI == 1:
386
    mesh = smesh.Mesh(Spanner, "Meshed Spanner")
413
      idlength = salome.ObjectToID(hypLen1)
414
      smeshgui.SetName(idlength, "Local_Length_10");
415
416
    print "-------------------------- Propagation"
417
418
    hypProp = smesh.CreateHypothesis("Propagation", "libStdMeshersEngine.so")
419
    print hypProp.GetName()
420
    print hypProp.GetId()
421
422
    if hasGUI == 1:
423
      idprop = salome.ObjectToID(hypProp)
424
      smeshgui.SetName(idprop, "Propagation hypothesis");
425
426
    #print "-------------------------- NumberOfSegments"
427
    #
428
    #hypNbSeg15 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so")
429
    #hypNbSeg15.SetNumberOfSegments(15)
430
    #print hypNbSeg15.GetName()
431
    #print hypNbSeg15.GetId()
432
    #print hypNbSeg15.GetNumberOfSegments()
433
    #
434
    #if hasGUI == 1:
435
    #  idseg15 = salome.ObjectToID(hypNbSeg15)
436
    #  smeshgui.SetName(idseg15, "NumberOfSegments_15");
437
387
438
    print "-------------------------- Regular_1D"
388
    print "-------------------------- add hypothesis to Spanner"
439
389
440
    algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so")
390
    print "-------------------------- NumberOfSegments"
391
    algoReg = mesh.Segment()
441
    listHyp = algoReg.GetCompatibleHypothesis()
392
    listHyp = algoReg.GetCompatibleHypothesis()
442
    for hyp in listHyp:
393
    for hyp in listHyp:
443
        print hyp
394
      print hyp
444
    print algoReg.GetName()
395
    print algoReg.GetName()
445
    print algoReg.GetId()
396
    print algoReg.GetId()
446
397
    algoReg.SetName("Regular_1D")
447
    if hasGUI == 1:
398
      
448
      idreg = salome.ObjectToID(algoReg)
399
      
449
      smeshgui.SetName(idreg, "Regular_1D");
400
    hypNbSeg3 = algoReg.NumberOfSegments(3)
401
    print hypNbSeg3.GetName()
402
    print hypNbSeg3.GetId()
403
    print hypNbSeg3.GetNumberOfSegments()
404
    smesh.SetName(hypNbSeg3, "NumberOfSegments_3")
450
405
451
    print "-------------------------- Quadrangle_2D"
406
    print "-------------------------- Quadrangle_2D"
452
407
453
    algoQuad = smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so")
408
    algoQuad = mesh.Quadrangle()
454
    listHyp = algoQuad.GetCompatibleHypothesis()
409
    listHyp = algoQuad.GetCompatibleHypothesis()
455
    for hyp in listHyp:
410
    for hyp in listHyp:
456
        print hyp
411
        print hyp
457
    print algoQuad.GetName()
412
    print algoQuad.GetName()
458
    print algoQuad.GetId()
413
    print algoQuad.GetId()
459
414
    algoQuad.SetName("Quadrangle_2D")
460
    if hasGUI == 1:
461
      idquad = salome.ObjectToID(algoQuad)
462
      smeshgui.SetName(idquad, "Quadrangle_2D");
463
464
    print "---- Init a Mesh with the Spanner"
465
466
    mesh = smesh.CreateMesh(Spanner)
467
    if hasGUI == 1:
468
      idmesh = salome.ObjectToID(mesh)
469
      smeshgui.SetName(idmesh, "Meshed Spanner");
470
471
    print "-------------------------- add hypothesis to Spanner"
472
473
    mesh.AddHypothesis(Spanner, algoReg)
474
    mesh.AddHypothesis(Spanner, hypNbSeg3)
475
    mesh.AddHypothesis(Spanner, algoQuad)
476
415
477
    print "-------------------------- add hypothesis to the Middle Block"
416
    print "-------------------------- add hypothesis to the Middle Block"
478
417
    
479
    submesh_bl = mesh.GetSubMesh(BlockMh, "SubMesh Middle Block")
418
    print "-------------------------- LocalLength"
480
    mesh.AddHypothesis(BlockMh, hypLen1)
419
    algoRegMb = mesh.Segment(BlockMh)
420
    hypLen1 = algoRegMb.LocalLength(10)
421
    print hypLen1.GetName()
422
    print hypLen1.GetId()
423
    print hypLen1.GetLength()
424
    smesh.SetName(hypLen1, "Local_Length_10")
481
425
482
    print "-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block"
426
    print "-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block"
483
427
484
    submesh_e1 = mesh.GetSubMesh(Edge1, "SubMesh Edge 1 of Top Face")
428
    algoRegE1 = mesh.Segment(Edge1)
485
    mesh.AddHypothesis(Edge1, hypProp)
429
    hypPropE1 = algoRegE1.Propagation()
486
    #mesh.AddHypothesis(Edge1, hypNbSeg15)
430
    print hypPropE1.GetName()
487
431
    print hypPropE1.GetId()
488
    submesh_e2 = mesh.GetSubMesh(Edge2, "SubMesh Edge 2 of Top Face")
432
    smesh.SetName(hypPropE1, "Propagation hypothesis")
489
    mesh.AddHypothesis(Edge2, hypProp)
433
    smesh.SetName(algoRegE1.GetSubMesh(), "SubMesh Edge 1 of Top Face")
490
    #mesh.AddHypothesis(Edge2, hypNbSeg15)
434
    
491
435
    algoRegE2 = mesh.Segment(Edge2)
436
    hypPropE2 = algoRegE2.Propagation()
437
    print hypPropE2.GetName()
438
    print hypPropE2.GetId()
439
    smesh.SetName(hypPropE2, "Propagation hypothesis")
440
    smesh.SetName(algoRegE2.GetSubMesh(), "SubMesh Edge 2 of Top Face")
441
    
492
    print "-------------------------- compute the mesh"
442
    print "-------------------------- compute the mesh"
493
    smesh.Compute(mesh, Spanner)
443
    mesh.Compute()
494
444
495
    print "Information about the Mesh:"
445
    print "Information about the Mesh:"
496
    print "Number of nodes       : ", mesh.NbNodes()
446
    print "Number of nodes       : ", mesh.NbNodes()
(-)GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_TestOthers.py (+15 lines)
Lines 303-308 Link Here
303
  v_n0p = geompy.MakeVectorDXDYDZ(-1,  0,  1)
303
  v_n0p = geompy.MakeVectorDXDYDZ(-1,  0,  1)
304
  v_pp0 = geompy.MakeVectorDXDYDZ( 1,  1,  0)
304
  v_pp0 = geompy.MakeVectorDXDYDZ( 1,  1,  0)
305
  v_np0 = geompy.MakeVectorDXDYDZ(-1,  1,  0)
305
  v_np0 = geompy.MakeVectorDXDYDZ(-1,  1,  0)
306
  v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1,  0)
306
307
307
  pln_0pp = geompy.MakePlane(p0, v_0pp, 300)
308
  pln_0pp = geompy.MakePlane(p0, v_0pp, 300)
308
  pln_0np = geompy.MakePlane(p0, v_0np, 300)
309
  pln_0np = geompy.MakePlane(p0, v_0np, 300)
Lines 418-423 Link Here
418
  geompy.UnionIDs(faces_above, faces_above_pln_ids)
419
  geompy.UnionIDs(faces_above, faces_above_pln_ids)
419
  geompy.addToStudy(faces_above, "Group of faces above Plane (N = (0, 1, 1))")
420
  geompy.addToStudy(faces_above, "Group of faces above Plane (N = (0, 1, 1))")
420
421
422
  # GetShapesOnPlaneWithLocation
423
  Loc = geompy.MakeVertex(0, -50, 0)
424
  edges_on_pln = geompy.GetShapesOnPlaneWithLocation(blocksComp, geompy.ShapeType["EDGE"],
425
                                                     v_0n0, Loc, geompy.GEOM.ST_ON)
426
  for edge_i in edges_on_pln:
427
    geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)")
428
    
429
  # GetShapesOnPlaneWithLocationIDs
430
  edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"],
431
                                                            v_0n0, Loc, geompy.GEOM.ST_ON)
432
  group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"])
433
  geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids)
434
  geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))")
435
  
421
  # GetShapesOnCylinder
436
  # GetShapesOnCylinder
422
  edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"],
437
  edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"],
423
                                             vy, 55, geompy.GEOM.ST_OUT)
438
                                             vy, 55, geompy.GEOM.ST_OUT)
(-)GEOM_SRC_3.2.2/src/GEOM_SWIG/geompy.py (-2 / +29 lines)
Lines 744-750 Link Here
744
    return anObj
744
    return anObj
745
745
746
## Create a face on the given wire.
746
## Create a face on the given wire.
747
#  @param theWire Wire to build the face on.
747
#  @param theWire closed Wire or Edge to build the face on.
748
#  @param isPlanarWanted If TRUE, only planar face will be built.
748
#  @param isPlanarWanted If TRUE, only planar face will be built.
749
#                        If impossible, NULL object will be returned.
749
#                        If impossible, NULL object will be returned.
750
#  @return New GEOM_Object, containing the created face.
750
#  @return New GEOM_Object, containing the created face.
Lines 757-763 Link Here
757
    return anObj
757
    return anObj
758
758
759
## Create a face on the given wires set.
759
## Create a face on the given wires set.
760
#  @param theWires List of wires to build the face on.
760
#  @param theWires List of closed wires or edges to build the face on.
761
#  @param isPlanarWanted If TRUE, only planar face will be built.
761
#  @param isPlanarWanted If TRUE, only planar face will be built.
762
#                        If impossible, NULL object will be returned.
762
#                        If impossible, NULL object will be returned.
763
#  @return New GEOM_Object, containing the created face.
763
#  @return New GEOM_Object, containing the created face.
Lines 901-906 Link Here
901
    return aList
901
    return aList
902
902
903
## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
903
## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
904
#  the specified plane by the certain way, defined through \a theState parameter.
905
#  @param theShape Shape to find sub-shapes of.
906
#  @param theShapeType Type of sub-shapes to be retrieved.
907
#  @param theAx1 Vector (or line, or linear edge), specifying normal
908
#                direction of the plane to find shapes on.
909
#  @param thePnt Point specifying location of the plane to find shapes on.
910
#  @param theState The state of the subshapes to find. It can be one of
911
#   ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
912
#  @return List of all found sub-shapes.
913
#
914
#  Example: see GEOM_TestOthers.py
915
def GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState):
916
    aList = ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState)
917
    if ShapesOp.IsDone() == 0:
918
      print "GetShapesOnPlaneWithLocation : ", ShapesOp.GetErrorCode()
919
    return aList
920
921
## Works like the above method, but returns list of sub-shapes indices
922
#
923
#  Example: see GEOM_TestOthers.py
924
def GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState):
925
    aList = ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState)
926
    if ShapesOp.IsDone() == 0:
927
        print "GetShapesOnPlaneWithLocationIDs : ", ShapesOp.GetErrorCode()
928
    return aList
929
930
## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively
904
#  the specified cylinder by the certain way, defined through \a theState parameter.
931
#  the specified cylinder by the certain way, defined through \a theState parameter.
905
#  @param theShape Shape to find sub-shapes of.
932
#  @param theShape Shape to find sub-shapes of.
906
#  @param theShapeType Type of sub-shapes to be retrieved.
933
#  @param theShapeType Type of sub-shapes to be retrieved.
(-)GEOM_SRC_3.2.2/src/NMTTools/NMTTools_DEProcessor.cxx (-7 / +7 lines)
Lines 137-150 Link Here
137
  aNb=myDS->NumberOfShapesOfTheObject();
137
  aNb=myDS->NumberOfShapesOfTheObject();
138
  //
138
  //
139
  for (i=1; i<=aNb; i++) {
139
  for (i=1; i<=aNb; i++) {
140
    const TopoDS_Shape& aF=myDS->Shape(i);
140
    const TopoDS_Shape aF=myDS->Shape(i);
141
    if (aF.ShapeType()==TopAbs_FACE) {
141
    if (aF.ShapeType()==TopAbs_FACE) {
142
      TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
142
      TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF);
143
    }
143
    }
144
  }
144
  }
145
  //
145
  //
146
  for (i=1; i<=aNb; i++) {
146
  for (i=1; i<=aNb; i++) {
147
    const TopoDS_Shape& aS=myDS->Shape(i);
147
    const TopoDS_Shape aS=myDS->Shape(i);
148
    if (aS.ShapeType()==TopAbs_EDGE) {
148
    if (aS.ShapeType()==TopAbs_EDGE) {
149
      const TopoDS_Edge& aE=TopoDS::Edge(aS);
149
      const TopoDS_Edge& aE=TopoDS::Edge(aS);
150
      
150
      
Lines 306-313 Link Here
306
  // Clear aPaveSet, aSplitEdges
306
  // Clear aPaveSet, aSplitEdges
307
  aPaveSet.ChangeSet().Clear();
307
  aPaveSet.ChangeSet().Clear();
308
  //
308
  //
309
  const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED));
309
  const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));
310
  const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD));
310
  const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));
311
  //
311
  //
312
  // 2D Curve of degenerated edge on the face aDF
312
  // 2D Curve of degenerated edge on the face aDF
313
  Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
313
  Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2);
Lines 333-339 Link Here
333
  for (; anIt.More(); anIt.Next()) {
333
  for (; anIt.More(); anIt.Next()) {
334
    const BOPTools_PaveBlock& aPB=anIt.Value();
334
    const BOPTools_PaveBlock& aPB=anIt.Value();
335
    nE=aPB.Edge();
335
    nE=aPB.Edge();
336
    const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
336
    const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
337
    
337
    
338
    Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2);
338
    Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2);
339
    //
339
    //
Lines 427-434 Link Here
427
  TopoDS_Edge aE, aESplit;
427
  TopoDS_Edge aE, aESplit;
428
  TopoDS_Vertex aV1, aV2;
428
  TopoDS_Vertex aV1, aV2;
429
429
430
  const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED));
430
  const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));
431
  const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD));
431
  const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));
432
432
433
  BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
433
  BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
434
434
(-)GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_1.cxx (-3 / +3 lines)
Lines 78-85 Link Here
78
      aWith=n2;
78
      aWith=n2;
79
      SortTypes(aWhat, aWith);
79
      SortTypes(aWhat, aWith);
80
      if (!bJustAddInterference) {
80
      if (!bJustAddInterference) {
81
	const TopoDS_Shape& aS1=myDS->GetShape(aWhat);
81
	const TopoDS_Shape aS1=myDS->GetShape(aWhat);
82
	const TopoDS_Shape& aS2=myDS->GetShape(aWith);
82
	const TopoDS_Shape aS2=myDS->GetShape(aWith);
83
	//
83
	//
84
	const TopoDS_Vertex& aV1=TopoDS::Vertex(aS1);
84
	const TopoDS_Vertex& aV1=TopoDS::Vertex(aS1);
85
	const TopoDS_Vertex& aV2=TopoDS::Vertex(aS2);
85
	const TopoDS_Vertex& aV2=TopoDS::Vertex(aS2);
Lines 127-133 Link Here
127
    aNbV=aChain.Extent();
127
    aNbV=aChain.Extent();
128
    for (j=1; j<=aNbV; ++j) {
128
    for (j=1; j<=aNbV; ++j) {
129
      aIdV=aChain(j);
129
      aIdV=aChain(j);
130
      const TopoDS_Shape& aV=myDS->Shape(aIdV);
130
      const TopoDS_Shape aV=myDS->Shape(aIdV);
131
      if (!aM.Contains(aV)) {
131
      if (!aM.Contains(aV)) {
132
	aM.Add(aV);
132
	aM.Add(aV);
133
	aLV.Append(aV);
133
	aLV.Append(aV);
(-)GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_4.cxx (-7 / +7 lines)
Lines 145-152 Link Here
145
      continue;
145
      continue;
146
    }
146
    }
147
    //
147
    //
148
    const TopoDS_Edge& aE1=TopoDS::Edge(myDS->Shape(nE1));
148
    const TopoDS_Edge aE1=TopoDS::Edge(myDS->Shape(nE1));
149
    const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2));
149
    const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2));
150
    //
150
    //
151
    if (BRep_Tool::Degenerated(aE1) || BRep_Tool::Degenerated(aE2)){
151
    if (BRep_Tool::Degenerated(aE1) || BRep_Tool::Degenerated(aE2)){
152
      continue;
152
      continue;
Lines 468-474 Link Here
468
    aNbEdges=aME.Extent();
468
    aNbEdges=aME.Extent();
469
    for (j=1; j<=aNbEdges; ++j) {
469
    for (j=1; j<=aNbEdges; ++j) {
470
      nE=aME(j);
470
      nE=aME(j);
471
      const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
471
      const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
472
      //
472
      //
473
      aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
473
      aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
474
      //
474
      //
Lines 775-784 Link Here
775
  Standard_Real d1121, d1122, d1222, d1221, aTolSum, aCoeff=1.05;
775
  Standard_Real d1121, d1122, d1222, d1221, aTolSum, aCoeff=1.05;
776
  gp_Pnt aP11, aP12, aP21, aP22;
776
  gp_Pnt aP11, aP12, aP21, aP22;
777
777
778
  const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index()));
778
  const TopoDS_Vertex aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index()));
779
  const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index()));
779
  const TopoDS_Vertex aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index()));
780
  const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index()));
780
  const TopoDS_Vertex aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index()));
781
  const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index()));
781
  const TopoDS_Vertex aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index()));
782
782
783
  aTolV11=BRep_Tool::Tolerance(aV11);
783
  aTolV11=BRep_Tool::Tolerance(aV11);
784
  aTolV12=BRep_Tool::Tolerance(aV12);
784
  aTolV12=BRep_Tool::Tolerance(aV12);
(-)GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_5.cxx (-4 / +4 lines)
Lines 138-150 Link Here
138
      continue;
138
      continue;
139
    }
139
    }
140
    // Edge
140
    // Edge
141
    const TopoDS_Edge& aE=TopoDS::Edge(myDS->GetShape(nE));
141
    const TopoDS_Edge aE=TopoDS::Edge(myDS->GetShape(nE));
142
    if (BRep_Tool::Degenerated(aE)){
142
    if (BRep_Tool::Degenerated(aE)){
143
      continue;
143
      continue;
144
    }
144
    }
145
    aTolE=BRep_Tool::Tolerance(aE);
145
    aTolE=BRep_Tool::Tolerance(aE);
146
    // Face
146
    // Face
147
    const TopoDS_Face& aF=TopoDS::Face(myDS->GetShape(nF));
147
    const TopoDS_Face aF=TopoDS::Face(myDS->GetShape(nF));
148
    aTolF=BRep_Tool::Tolerance(aF);
148
    aTolF=BRep_Tool::Tolerance(aF);
149
    const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); 
149
    const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); 
150
    //
150
    //
Lines 492-498 Link Here
492
    aNbEdges=aME.Extent();
492
    aNbEdges=aME.Extent();
493
    for (j=1; j<=aNbEdges; ++j) {
493
    for (j=1; j<=aNbEdges; ++j) {
494
      nE=aME(j);
494
      nE=aME(j);
495
      const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
495
      const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
496
      //
496
      //
497
      aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
497
      aFlag=myContext.ComputeVE (aNewVertex, aE, aT);
498
      //
498
      //
Lines 575-581 Link Here
575
  aNbV=aMVF.Extent();
575
  aNbV=aMVF.Extent();
576
  for (i=1; i<=aNbV; ++i) {
576
  for (i=1; i<=aNbV; ++i) {
577
    nVF=aMVF(i);
577
    nVF=aMVF(i);
578
    const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF));
578
    const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF));
579
    iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF);
579
    iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF);
580
    if (!iFlag) {
580
    if (!iFlag) {
581
      return nVF;
581
      return nVF;
(-)GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_6.cxx (-25 / +24 lines)
Lines 165-172 Link Here
165
      continue;
165
      continue;
166
    }
166
    }
167
    //
167
    //
168
    const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
168
    const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));
169
    const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
169
    const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));
170
    //
170
    //
171
    // FF
171
    // FF
172
    bToApproxC3d     = mySectionAttribute.Approximation();
172
    bToApproxC3d     = mySectionAttribute.Approximation();
Lines 254-261 Link Here
254
    // 
254
    // 
255
    // Faces
255
    // Faces
256
    aFFi.Indices(nF1, nF2);
256
    aFFi.Indices(nF1, nF2);
257
    const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
257
    const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));
258
    const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
258
    const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));
259
    //
259
    //
260
    BOPTools_ListOfPaveBlock aLPB, aLPBC;
260
    BOPTools_ListOfPaveBlock aLPB, aLPBC;
261
    //
261
    //
Lines 377-384 Link Here
377
	// Make Section Edge  
377
	// Make Section Edge  
378
	TopoDS_Edge aES;
378
	TopoDS_Edge aES;
379
	//
379
	//
380
	const TopoDS_Vertex& aV1=TopoDS::Vertex(myDS->Shape(nV1));
380
	const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));
381
	const TopoDS_Vertex& aV2=TopoDS::Vertex(myDS->Shape(nV2));
381
	const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));
382
	//
382
	//
383
	BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES);
383
	BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES);
384
	//
384
	//
Lines 489-501 Link Here
489
    for (j=1; j<=aNbSE; ++j) {
489
    for (j=1; j<=aNbSE; ++j) {
490
      const BOPTools_PaveBlock& aPBSE=aMEPB(j);
490
      const BOPTools_PaveBlock& aPBSE=aMEPB(j);
491
      nV1=aPBSE.Pave1().Index();
491
      nV1=aPBSE.Pave1().Index();
492
      const TopoDS_Shape& aV1=myDS->Shape(nV1);
492
      const TopoDS_Shape aV1=myDS->Shape(nV1);
493
      if (aV1.IsSame(aV)) {
493
      if (aV1.IsSame(aV)) {
494
	aMNewOld.Add(i, nV1);
494
	aMNewOld.Add(i, nV1);
495
	break;
495
	break;
496
      }
496
      }
497
      nV2=aPBSE.Pave2().Index();
497
      nV2=aPBSE.Pave2().Index();
498
      const TopoDS_Shape& aV2=myDS->Shape(nV2);
498
      const TopoDS_Shape aV2=myDS->Shape(nV2);
499
      if (aV2.IsSame(aV)) {
499
      if (aV2.IsSame(aV)) {
500
	aMNewOld.Add(i, nV2);
500
	aMNewOld.Add(i, nV2);
501
	break;
501
	break;
Lines 546-554 Link Here
546
      BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
546
      BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq;
547
      //
547
      //
548
      nV1=aPBSE.Pave1().Index();
548
      nV1=aPBSE.Pave1().Index();
549
      const TopoDS_Shape& aV1=myDS->Shape(nV1);
549
      const TopoDS_Shape aV1=myDS->Shape(nV1);
550
      nV2=aPBSE.Pave2().Index();
550
      nV2=aPBSE.Pave2().Index();
551
      const TopoDS_Shape& aV2=myDS->Shape(nV2);
551
      const TopoDS_Shape aV2=myDS->Shape(nV2);
552
      //
552
      //
553
      anASSeq.SetNewSuccessor(nV1);
553
      anASSeq.SetNewSuccessor(nV1);
554
      anASSeq.SetNewOrientation(aV1.Orientation());
554
      anASSeq.SetNewOrientation(aV1.Orientation());
Lines 580-587 Link Here
580
      BOPTools_PaveBlock aPB=aIt.Value();
580
      BOPTools_PaveBlock aPB=aIt.Value();
581
      //
581
      //
582
      ////modified by NIZNHY-PKV Thu Jan 26 10:16:36 2006f
582
      ////modified by NIZNHY-PKV Thu Jan 26 10:16:36 2006f
583
      const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
583
      const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));
584
      const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
584
      const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));
585
      ////modified by NIZNHY-PKV Thu Jan 26 10:16:39 2006t
585
      ////modified by NIZNHY-PKV Thu Jan 26 10:16:39 2006t
586
      //
586
      //
587
      if (aCBAPI.IsCommonBlock(aPB)) {
587
      if (aCBAPI.IsCommonBlock(aPB)) {
Lines 617-629 Link Here
617
      aT1=aPave1.Param();
617
      aT1=aPave1.Param();
618
      mV1=aPave1.Index();            // index in tDS
618
      mV1=aPave1.Index();            // index in tDS
619
      nV1=aMNewOld.FindFromKey(mV1); // index in myDS
619
      nV1=aMNewOld.FindFromKey(mV1); // index in myDS
620
      const TopoDS_Shape& aV1=myDS->Shape(nV1);
620
      const TopoDS_Shape aV1=myDS->Shape(nV1);
621
      //
621
      //
622
      const BOPTools_Pave& aPave2=aPB.Pave2();
622
      const BOPTools_Pave& aPave2=aPB.Pave2();
623
      aT2=aPave2.Param();
623
      aT2=aPave2.Param();
624
      mV2=aPave2.Index();
624
      mV2=aPave2.Index();
625
      nV2=aMNewOld.FindFromKey(mV2);
625
      nV2=aMNewOld.FindFromKey(mV2);
626
      const TopoDS_Shape& aV2=myDS->Shape(nV2);
626
      const TopoDS_Shape aV2=myDS->Shape(nV2);
627
      //
627
      //
628
      if (!aMNewOld.Contains(mE)) {
628
      if (!aMNewOld.Contains(mE)) {
629
	// add new SE to the myDS
629
	// add new SE to the myDS
Lines 684-691 Link Here
684
    BOPTools_SSInterference& aFF=aFFs(i);
684
    BOPTools_SSInterference& aFF=aFFs(i);
685
    aFF.Indices(nF1, nF2);
685
    aFF.Indices(nF1, nF2);
686
    //
686
    //
687
    const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1));
687
    const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1));
688
    const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2));
688
    const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2));
689
    //
689
    //
690
    aF1FWD=aF1;
690
    aF1FWD=aF1;
691
    aF1FWD.Orientation(TopAbs_FORWARD);
691
    aF1FWD.Orientation(TopAbs_FORWARD);
Lines 699-705 Link Here
699
    for (; anIt.More(); anIt.Next()) {
699
    for (; anIt.More(); anIt.Next()) {
700
      const BOPTools_PaveBlock& aPB=anIt.Value();
700
      const BOPTools_PaveBlock& aPB=anIt.Value();
701
      nE=aPB.Edge();
701
      nE=aPB.Edge();
702
      const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE));
702
      const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE));
703
      
703
      
704
      BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD);
704
      BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD);
705
      BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD);
705
      BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD);
Lines 768-774 Link Here
768
  //
768
  //
769
  //Edge
769
  //Edge
770
  nE2=aPBR.Edge();
770
  nE2=aPBR.Edge();
771
  const TopoDS_Edge& aE2=TopoDS::Edge(myDS->GetShape(nE2));
771
  const TopoDS_Edge aE2=TopoDS::Edge(myDS->GetShape(nE2));
772
  // VE
772
  // VE
773
  iVM=myContext.ComputeVE(aVM, aE2, aTmp); 
773
  iVM=myContext.ComputeVE(aVM, aE2, aTmp); 
774
  //
774
  //
Lines 799-806 Link Here
799
  aFFi.Indices(nF1, nF2);
799
  aFFi.Indices(nF1, nF2);
800
  aTolR3D=aFFi.TolR3D();
800
  aTolR3D=aFFi.TolR3D();
801
  //
801
  //
802
  const TopoDS_Face& aF1=TopoDS::Face(myDS->GetShape(nF1));
802
  const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1));
803
  const TopoDS_Face& aF2=TopoDS::Face(myDS->GetShape(nF2));
803
  const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2));
804
  //
804
  //
805
  bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D);
805
  bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D);
806
  if (bVF) {
806
  if (bVF) {
Lines 850-863 Link Here
850
    TColStd_ListOfInteger& aTVs=aBC.TechnoVertices();
850
    TColStd_ListOfInteger& aTVs=aBC.TechnoVertices();
851
    aTVs.Append(nV);
851
    aTVs.Append(nV);
852
  }
852
  }
853
  
854
  if (bFound1 && !bFound2) {
853
  if (bFound1 && !bFound2) {
855
    nV=aPave1.Index();
854
    nV=aPave1.Index();
856
    aPave.SetIndex(nV);
855
    aPave.SetIndex(nV);
857
    aPave.SetParam(aT);
856
    aPave.SetParam(aT);
858
    aFFiPS.Append(aPave);
857
    aFFiPS.Append(aPave);
859
    //
858
    //
860
    const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
859
    const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));
861
    BOPTools_Tools::UpdateVertex (aIC, aT, aV);
860
    BOPTools_Tools::UpdateVertex (aIC, aT, aV);
862
  }
861
  }
863
  
862
  
Lines 867-873 Link Here
867
    aPave.SetParam(aT);
866
    aPave.SetParam(aT);
868
    aCPS.Append(aPave);
867
    aCPS.Append(aPave);
869
    //
868
    //
870
    const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
869
    const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));
871
    BOPTools_Tools::UpdateVertex (aIC, aT, aV);
870
    BOPTools_Tools::UpdateVertex (aIC, aT, aV);
872
  }
871
  }
873
}
872
}
Lines 888-894 Link Here
888
  for (; anIt.More(); anIt.Next()) {
887
  for (; anIt.More(); anIt.Next()) {
889
    const BOPTools_Pave& aPC=anIt.Value();
888
    const BOPTools_Pave& aPC=anIt.Value();
890
    nV=aPC.Index();
889
    nV=aPC.Index();
891
    const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
890
    const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));
892
    bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV);
891
    bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV);
893
    if (bIsVertex) {
892
    if (bIsVertex) {
894
      aPave=aPC;
893
      aPave=aPC;
Lines 974-980 Link Here
974
    const BOPTools_Pave& aPave=anIt.Value();
973
    const BOPTools_Pave& aPave=anIt.Value();
975
    //
974
    //
976
    nV=aPave.Index();
975
    nV=aPave.Index();
977
    const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV));
976
    const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));
978
    //
977
    //
979
    Bnd_Box aBBV;
978
    Bnd_Box aBBV;
980
    BRepBndLib::Add(aV, aBBV);
979
    BRepBndLib::Add(aV, aBBV);
(-)GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_7.cxx (-1 / +1 lines)
Lines 236-242 Link Here
236
  for(i=1; i<=aNbF; ++i) {
236
  for(i=1; i<=aNbF; ++i) {
237
    nF=aMF(i);
237
    nF=aMF(i);
238
    iRankF=myDS->Rank(nF);
238
    iRankF=myDS->Rank(nF);
239
    const TopoDS_Shape& aF=myDS->Shape(nF);
239
    const TopoDS_Shape aF=myDS->Shape(nF);
240
    aExp.Init(aF, TopAbs_EDGE);
240
    aExp.Init(aF, TopAbs_EDGE);
241
    for(; aExp.More();  aExp.Next()) {
241
    for(; aExp.More();  aExp.Next()) {
242
      aE=TopoDS::Edge(aExp.Current());
242
      aE=TopoDS::Edge(aExp.Current());
(-)GEOM_SRC_3.2.2/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx (-1 / +13 lines)
Lines 270-276 Link Here
270
//=================================================================================
270
//=================================================================================
271
bool TransformationGUI_OffsetDlg::isValid( QString& msg )
271
bool TransformationGUI_OffsetDlg::isValid( QString& msg )
272
{
272
{
273
  return !(myObjects.length() == 0);
273
  //return !(myObjects.length() == 0);
274
  if (myObjects.length() == 0) return false;
275
276
  for (int i = 0; i < myObjects.length(); i++)
277
  {
278
    GEOM::shape_type aType = myObjects[i]->GetShapeType();
279
    if( aType != GEOM::FACE && aType != GEOM::SHELL && aType != GEOM::SOLID ){
280
       msg = tr("ERROR_SHAPE_TYPE");
281
       return false;
282
    }
283
  }
284
  return true;
274
}
285
}
275
286
276
287
Lines 288-293 Link Here
288
  if (GroupPoints->CheckButton1->isChecked() || IsPreview())
299
  if (GroupPoints->CheckButton1->isChecked() || IsPreview())
289
    for (int i = 0; i < myObjects.length(); i++)
300
    for (int i = 0; i < myObjects.length(); i++)
290
      {
301
      {
302
291
	anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() );
303
	anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() );
292
	if ( !anObj->_is_nil() )
304
	if ( !anObj->_is_nil() )
293
	  objects.push_back( anObj._retn() );
305
	  objects.push_back( anObj._retn() );

Return to bug 155974