Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 114651 Details for
Bug 155974
[science overlay] sci-misc/salome-* (New packages)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for GEOM
GEOM-3.2.2.patch (text/plain), 104.27 KB, created by
Daniel Tourde
on 2007-03-27 18:22:56 UTC
(
hide
)
Description:
Patch for GEOM
Filename:
MIME Type:
Creator:
Daniel Tourde
Created:
2007-03-27 18:22:56 UTC
Size:
104.27 KB
patch
obsolete
>? GEOM_SRC_3.2.2/aclocal.m4 >? GEOM_SRC_3.2.2/autom4te.cache >? GEOM_SRC_3.2.2/configure >? GEOM_SRC_3.2.2/configure.in >? GEOM_SRC_3.2.2/configure.in_new >? GEOM_SRC_3.2.2/configure.in_old >Index: GEOM_SRC_3.2.2/idl/GEOM_Gen.idl >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/idl/GEOM_Gen.idl,v >retrieving revision 1.18.2.3 >retrieving revision 1.18.2.4 >diff -c -u -r1.18.2.3 -r1.18.2.4 >--- GEOM_SRC_3.2.2/idl/GEOM_Gen.idl 28 Jul 2006 12:53:15 -0000 1.18.2.3 >+++ GEOM_SRC_3.2.2/idl/GEOM_Gen.idl 27 Sep 2006 10:57:12 -0000 1.18.2.4 >@@ -884,7 +884,7 @@ > > /*! > * Create a face on the given wire. >- * \param theWire Wire to build the face on. >+ * \param theWire closed Wire or Edge to build the face on. > * \param isPlanarWanted If TRUE, only planar face will be built. > * If impossible, NULL object will be returned. > * \return New GEOM_Object, containing the created face. >@@ -893,7 +893,7 @@ > > /*! > * Create a face on the given wires set. >- * \param theWires List of wires to build the face on. >+ * \param theWires List of closed wires or edges to build the face on. > * \param isPlanarWanted If TRUE, only planar face will be built. > * If impossible, NULL object will be returned. > * \return New GEOM_Object, containing the created face. >@@ -1053,6 +1053,24 @@ > in long theShapeType, > in GEOM_Object theAx1, > in shape_state theState); >+ /*! >+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively >+ * the specified plane by the certain way, defined through \a theState parameter. >+ * \param theShape Shape to find sub-shapes of. >+ * \param theShapeType Type of sub-shapes to be retrieved. >+ * \param theAx1 Vector (or line, or linear edge), specifying normal >+ * direction of the plane to find shapes on. >+ * \param thePnt Point specifying location of the plane to find shapes on. >+ * \param theState The state of the subshapes to find. >+ * \return List of all found sub-shapes. >+ */ >+ ListOfGO GetShapesOnPlaneWithLocation (in GEOM_Object theShape, >+ in long theShapeType, >+ in GEOM_Object theAx1, >+ in GEOM_Object thePnt, >+ in shape_state theState); >+ >+ > > /*! > * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively >@@ -1121,6 +1139,23 @@ > in long theShapeType, > in GEOM_Object theAx1, > in shape_state theState); >+ >+ /*! >+ * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively >+ * the specified plane by the certain way, defined through \a theState parameter. >+ * \param theShape Shape to find sub-shapes of. >+ * \param theShapeType Type of sub-shapes to be retrieved. >+ * \param theAx1 Vector (or line, or linear edge), specifying normal >+ * direction of the plane to find shapes on. >+ * \param thePnt Point specifying location of the plane to find shapes on. >+ * \param theState The state of the subshapes to find. >+ * \return List of IDs of all found sub-shapes. >+ */ >+ ListOfLong GetShapesOnPlaneWithLocationIDs (in GEOM_Object theShape, >+ in long theShapeType, >+ in GEOM_Object theAx1, >+ in GEOM_Object thePnt, >+ in shape_state theState); > > /*! > * Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively >Index: GEOM_SRC_3.2.2/src/BuildGUI/BuildGUI_FaceDlg.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/BuildGUI/BuildGUI_FaceDlg.cxx,v >retrieving revision 1.11 >retrieving revision 1.11.2.1 >diff -c -u -r1.11 -r1.11.2.1 >--- GEOM_SRC_3.2.2/src/BuildGUI/BuildGUI_FaceDlg.cxx 1 Jun 2006 11:32:33 -0000 1.11 >+++ GEOM_SRC_3.2.2/src/BuildGUI/BuildGUI_FaceDlg.cxx 27 Sep 2006 11:13:44 -0000 1.11.2.1 >@@ -28,6 +28,7 @@ > > #include "BuildGUI_FaceDlg.h" > #include "GEOMImpl_Types.hxx" >+#include "TColStd_MapOfInteger.hxx" > > #include "SUIT_Session.h" > #include "SalomeApp_Application.h" >@@ -64,7 +65,7 @@ > > GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire"); > GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW")); >- GroupWire->TextLabel1->setText(tr("GEOM_WIRES")); >+ GroupWire->TextLabel1->setText(tr("GEOM_OBJECTS")); > GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT")); > GroupWire->PushButton1->setPixmap(image1); > >@@ -100,7 +101,10 @@ > > GroupWire->CheckButton1->setChecked(TRUE); > >- globalSelection( GEOM_WIRE ); >+ TColStd_MapOfInteger aMap; >+ aMap.Add( GEOM_EDGE ); >+ aMap.Add( GEOM_WIRE ); >+ globalSelection( aMap ); > > /* signals and slots connections */ > connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); >@@ -160,7 +164,7 @@ > if (!myWires.length()) > return; > if(aNbSel != 1) >- aName = tr("%1_wires").arg(aNbSel); >+ aName = tr("%1_objects").arg(aNbSel); > > myEditCurrentArgument->setText( aName ); > >@@ -178,7 +182,11 @@ > if (send != GroupWire->PushButton1) > return; > >- globalSelection( GEOM_WIRE ); >+ TColStd_MapOfInteger aMap; >+ aMap.Add( GEOM_EDGE ); >+ aMap.Add( GEOM_WIRE ); >+ globalSelection( aMap ); >+ > myEditCurrentArgument = GroupWire->LineEdit1; > > myEditCurrentArgument->setFocus(); >@@ -195,7 +203,10 @@ > GEOMBase_Skeleton::ActivateThisDialog(); > connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), > SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; >- globalSelection( GEOM_WIRE ); >+ TColStd_MapOfInteger aMap; >+ aMap.Add( GEOM_EDGE ); >+ aMap.Add( GEOM_WIRE ); >+ globalSelection( aMap ); > } > > >Index: GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.cxx,v >retrieving revision 1.8.2.2 >retrieving revision 1.8.2.3 >diff -c -u -r1.8.2.2 -r1.8.2.3 >--- GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.cxx 27 Jun 2006 10:55:21 -0000 1.8.2.2 >+++ GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.cxx 19 Sep 2006 13:41:11 -0000 1.8.2.3 >@@ -1,30 +1,30 @@ > // GEOM GEOMGUI : GUI for Geometry component > // > // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, >-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS >-// >-// This library is free software; you can redistribute it and/or >-// modify it under the terms of the GNU Lesser General Public >-// License as published by the Free Software Foundation; either >-// version 2.1 of the License. >-// >-// This library is distributed in the hope that it will be useful, >-// but WITHOUT ANY WARRANTY; without even the implied warranty of >-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >-// Lesser General Public License for more details. >-// >-// You should have received a copy of the GNU Lesser General Public >-// License along with this library; if not, write to the Free Software >-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA >-// >-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com >+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS >+// >+// This library is free software; you can redistribute it and/or >+// modify it under the terms of the GNU Lesser General Public >+// License as published by the Free Software Foundation; either >+// version 2.1 of the License. >+// >+// This library is distributed in the hope that it will be useful, >+// but WITHOUT ANY WARRANTY; without even the implied warranty of >+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+// Lesser General Public License for more details. >+// >+// You should have received a copy of the GNU Lesser General Public >+// License along with this library; if not, write to the Free Software >+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA >+// >+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com > // > // > // > // File : EntityGUI_SketcherDlg.cxx > // Author : Damien COQUERET > // Module : GEOM >-// $Header: >+// $Header$ > > #include "EntityGUI_SketcherDlg.h" > #include "Sketcher_Profile.hxx" >@@ -58,7 +58,7 @@ > > //================================================================================= > // class : EntityGUI_SketcherDlg() >-// purpose : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the >+// purpose : Constructs a EntityGUI_SketcherDlg which is a child of 'parent', with the > // name 'name' and widget flags set to 'f'. > // The dialog will by default be modeless, unless you set 'modal' to > // TRUE to construct a modal dialog. >@@ -80,7 +80,7 @@ > buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH")); > buttonHelp->setText(tr("GEOM_BUT_HELP")); > >- GroupVal->close(TRUE); >+ GroupVal->close(TRUE); > GroupDest2->close(TRUE); > GroupDest3->close(TRUE); > >@@ -132,24 +132,42 @@ > Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); > Group1Spin->buttonUndo->setPixmap(image1); > Group1Spin->buttonRedo->setPixmap(image2); >+ QWidget::setTabOrder(Group1Spin->SpinBox_DX , Group1Spin->buttonApply); >+ QWidget::setTabOrder(Group1Spin->buttonApply, Group1Spin->buttonUndo); >+ QWidget::setTabOrder(Group1Spin->buttonUndo , Group1Spin->buttonRedo); > > Group2Spin = new EntityGUI_2Spin(this, "Group2Spin"); > Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); > Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); > Group2Spin->buttonUndo->setPixmap(image1); > Group2Spin->buttonRedo->setPixmap(image2); >+ QWidget::setTabOrder(Group2Spin->SpinBox_DX , Group2Spin->SpinBox_DY); >+ QWidget::setTabOrder(Group2Spin->SpinBox_DY , Group2Spin->buttonApply); >+ QWidget::setTabOrder(Group2Spin->buttonApply, Group2Spin->buttonUndo); >+ QWidget::setTabOrder(Group2Spin->buttonUndo , Group2Spin->buttonRedo); > > Group3Spin = new EntityGUI_3Spin(this, "Group3Spin"); > Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); > Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); > Group3Spin->buttonUndo->setPixmap(image1); > Group3Spin->buttonRedo->setPixmap(image2); >+ QWidget::setTabOrder(Group3Spin->SpinBox_DX , Group3Spin->SpinBox_DY); >+ QWidget::setTabOrder(Group3Spin->SpinBox_DY , Group3Spin->SpinBox_DZ); >+ QWidget::setTabOrder(Group3Spin->SpinBox_DZ , Group3Spin->buttonApply); >+ QWidget::setTabOrder(Group3Spin->buttonApply, Group3Spin->buttonUndo); >+ QWidget::setTabOrder(Group3Spin->buttonUndo , Group3Spin->buttonRedo); > > Group4Spin = new EntityGUI_4Spin(this, "Group4Spin"); > Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); > Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); > Group4Spin->buttonUndo->setPixmap(image1); > Group4Spin->buttonRedo->setPixmap(image2); >+ QWidget::setTabOrder(Group4Spin->SpinBox_DX , Group4Spin->SpinBox_DY); >+ QWidget::setTabOrder(Group4Spin->SpinBox_DY , Group4Spin->SpinBox_DZ); >+ QWidget::setTabOrder(Group4Spin->SpinBox_DZ , Group4Spin->SpinBox_DS); >+ QWidget::setTabOrder(Group4Spin->SpinBox_DS , Group4Spin->buttonApply); >+ QWidget::setTabOrder(Group4Spin->buttonApply, Group4Spin->buttonUndo); >+ QWidget::setTabOrder(Group4Spin->buttonUndo , Group4Spin->buttonRedo); > > Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1); > Layout5->addWidget(GroupD1, 1, 0); >@@ -217,7 +235,19 @@ > > connect(myGeometryGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); > connect(myGeometryGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); >- >+ >+ // install event filter on spin-boxes to provide Apply action on Return pressed >+ Group1Spin->SpinBox_DX->installEventFilter(this); >+ Group2Spin->SpinBox_DX->installEventFilter(this); >+ Group2Spin->SpinBox_DY->installEventFilter(this); >+ Group3Spin->SpinBox_DX->installEventFilter(this); >+ Group3Spin->SpinBox_DY->installEventFilter(this); >+ Group3Spin->SpinBox_DZ->installEventFilter(this); >+ Group4Spin->SpinBox_DX->installEventFilter(this); >+ Group4Spin->SpinBox_DY->installEventFilter(this); >+ Group4Spin->SpinBox_DZ->installEventFilter(this); >+ Group4Spin->SpinBox_DS->installEventFilter(this); >+ > Init(); > } > >@@ -228,7 +258,42 @@ > //================================================================================= > EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg() > { >- myGeometryGUI->SetActiveDialogBox( 0 ); >+ myGeometryGUI->SetActiveDialogBox( 0 ); >+} >+ >+ >+//================================================================================= >+// function : eventFilter() >+// purpose : event filter for spin-boxes to provide Apply action on Return pressed >+//================================================================================= >+bool EntityGUI_SketcherDlg::eventFilter (QObject* object, QEvent* event) >+{ >+ if (event->type() == QEvent::KeyPress) { >+ QKeyEvent* ke = (QKeyEvent*)event; >+ if (ke->key() == Key_Return) { >+ if (object == Group1Spin->SpinBox_DX) { >+ Group1Spin->buttonApply->animateClick(); >+ return true; >+ } else if (object == Group2Spin->SpinBox_DX || >+ object == Group2Spin->SpinBox_DY) { >+ Group2Spin->buttonApply->animateClick(); >+ return true; >+ } else if (object == Group3Spin->SpinBox_DX || >+ object == Group3Spin->SpinBox_DY || >+ object == Group3Spin->SpinBox_DZ) { >+ Group3Spin->buttonApply->animateClick(); >+ return true; >+ } else if (object == Group4Spin->SpinBox_DX || >+ object == Group4Spin->SpinBox_DY || >+ object == Group4Spin->SpinBox_DZ || >+ object == Group4Spin->SpinBox_DS) { >+ Group4Spin->buttonApply->animateClick(); >+ return true; >+ } >+ } >+ } >+ >+ return EntityGUI_Skeleton_QTD::eventFilter(object, event); > } > > >@@ -289,7 +354,7 @@ > //================================================================================= > void EntityGUI_SketcherDlg::InitClick() > { >- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); >+ disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0); > > Group1Sel->hide(); > Group1Spin->hide(); >@@ -359,13 +424,16 @@ > { > InitClick(); > >+ // Get setting of step value from file configuration >+ double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0); >+ > if ( myConstructorId == 0 ) > { // SEGMENT > if ( constructorId == 1 ) > { // XY > mySketchType = PT_ABS; >- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); >+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2")); > Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2")); > myX = 0.0; >@@ -380,8 +448,8 @@ > else if ( constructorId == 0 ) > { // DXDY > mySketchType = PT_RELATIVE; >- Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); >+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2")); > Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2")); > myDX = 0.0; >@@ -397,8 +465,8 @@ > { // Selection > mySketchType = PT_SEL; > myEditCurrentArgument = Group1Sel->LineEdit1; >- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), >- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; >+ connect(myGeometryGUI->getApp()->selectionMgr(), >+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); > Group1Sel->show(); > Group1Sel->buttonApply->setFocus(); > SelectionIntoArgument(); >@@ -428,6 +496,9 @@ > InitClick(); > myAngle = 0.0; > >+ // Get setting of step value from file configuration >+ double step = SUIT_Session::session()->resourceMgr()->doubleValue("Geometry", "SettingsGeomStep", 100.0); >+ > if ( myConstructorId == 0 ) > { // SEGMENT > myX = 0.0; >@@ -436,7 +507,7 @@ > if ( myConstructorDirId == 2 ) > { // Angle > Group2Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); >- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); > Group2Spin->SpinBox_DX->SetValue(myAngle); > Group2Spin->buttonApply->setFocus(); >@@ -460,7 +531,7 @@ > Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3")); > Group2Spin->SpinBox_DY->SetValue(myY); > } >- } >+ } > else if ( myConstructorDirId == 0 ) > { // Perpendicular > Group1Spin->show(); >@@ -513,7 +584,7 @@ > { // DXDY > Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); > Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 0.1, 3); >- Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); > Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); > myDX = 0.0; >@@ -551,7 +622,7 @@ > { // Length > mySketchType = DIR_ANGLE_LENGTH; > Group3Spin->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); >- Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group3Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group3Spin->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); > Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); > Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2")); >@@ -570,7 +641,7 @@ > if ( constructorId == 2 ) > { // Length > mySketchType = DIR_PER_LENGTH; >- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); > Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); > Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); >@@ -587,7 +658,7 @@ > if ( constructorId == 2 ) > { // Length > mySketchType = DIR_TAN_LENGTH; >- Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 100., 3); >+ Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, 3); > Group2Spin->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, 5., 3); > Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); > Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); >@@ -651,7 +722,7 @@ > tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) ); > return; > } >- >+ > QString Command = myCommand.join( "" ) + GetNewCommand(); > Sketcher_Profile aProfile (Command.ascii()); > >@@ -660,11 +731,11 @@ > TopoDS_Shape myShape; > if ( aProfile.IsDone() ) > myShape = aProfile.GetShape(); >- >+ > if(myShape.ShapeType() != TopAbs_VERTEX) > myCommand.append( ":WW" ); > } >- else >+ else > myIsAllAdded = true; > > if( myCommand.size() > 2 ) >@@ -680,7 +751,7 @@ > //================================================================================= > bool EntityGUI_SketcherDlg::ClickOnApply() > { >- ((QPushButton*)sender())->setFocus(); >+ ((QPushButton*)sender())->setFocus(); // to update value of currently edited spin-box (PAL11948) > > myCommand.append( GetNewCommand() ); > mySketchState = NEXT_POINT; >@@ -695,6 +766,24 @@ > > GEOMBase_Helper::displayPreview(); > >+ // Set focus to SpinBox_DX >+ if (sender() == Group1Spin->buttonApply) { >+ (Group1Spin->SpinBox_DX)->setFocus(); >+ (Group1Spin->SpinBox_DX)->selectAll(); >+ } >+ else if (sender() == Group2Spin->buttonApply) { >+ (Group2Spin->SpinBox_DX)->setFocus(); >+ (Group2Spin->SpinBox_DX)->selectAll(); >+ } >+ else if (sender() == Group3Spin->buttonApply) { >+ (Group3Spin->SpinBox_DX)->setFocus(); >+ (Group3Spin->SpinBox_DX)->selectAll(); >+ } >+ else if (sender() == Group4Spin->buttonApply) { >+ (Group4Spin->SpinBox_DX)->setFocus(); >+ (Group4Spin->SpinBox_DX)->selectAll(); >+ } >+ > return true; > } > >@@ -705,7 +794,7 @@ > void EntityGUI_SketcherDlg::ClickOnHelp() > { > LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); >- if (app) >+ if (app) > app->onHelpContextModule(myGeometryGUI ? app->moduleName(myGeometryGUI->moduleName()) : QString(""), myHelpFileName); > else { > SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), >@@ -726,7 +815,7 @@ > > if(myCommand.count() == 1) { > mySketchState = FIRST_POINT; >- >+ > RadioButton1->setChecked(true); > TypeClicked(0); > >@@ -872,7 +961,7 @@ > > setEnabled( false ); > globalSelection(); >- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); >+ disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0); > myGeometryGUI->SetActiveDialogBox(0); > } > >@@ -887,8 +976,8 @@ > setEnabled(true); > myGeometryGUI->SetActiveDialogBox((QDialog*)this); > >- connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), >- SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; >+ connect(myGeometryGUI->getApp()->selectionMgr(), >+ SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); > > //myGeometryGUI->SetState( 0 ); > globalSelection( GEOM_POINT ); >@@ -918,7 +1007,7 @@ > void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e) > { > //myGeometryGUI->SetState( -1 ); >- disconnect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), 0, this, 0); >+ disconnect(myGeometryGUI->getApp()->selectionMgr(), 0, this, 0); > QDialog::closeEvent( e ); > } > >@@ -1265,28 +1354,29 @@ > } > > QString cmd; >- if( ( mySketchState != FIRST_POINT && myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { >+ if( ( mySketchState != FIRST_POINT && >+ myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { > cmd = myCommand.join( "" ); > > if ( Group1Sel->isVisible() ) { > Group1Sel->buttonApply->setEnabled(false); >- Group1Sel->buttonApply->setFocus(); >+ //Group1Sel->buttonApply->setFocus(); > } > if ( Group1Spin->isVisible() ) { > Group1Spin->buttonApply->setEnabled(false); >- Group1Spin->buttonApply->setFocus(); >+ //Group1Spin->buttonApply->setFocus(); > } > if ( Group2Spin->isVisible() ) { > Group2Spin->buttonApply->setEnabled(false); >- Group2Spin->buttonApply->setFocus(); >+ //Group2Spin->buttonApply->setFocus(); > } > if ( Group3Spin->isVisible() ) { > Group3Spin->buttonApply->setEnabled(false); >- Group3Spin->buttonApply->setFocus(); >+ //Group3Spin->buttonApply->setFocus(); > } > if ( Group4Spin->isVisible() ) { > Group4Spin->buttonApply->setEnabled(false); >- Group4Spin->buttonApply->setFocus(); >+ //Group4Spin->buttonApply->setFocus(); > } > } > else { >@@ -1294,26 +1384,26 @@ > > if ( Group1Sel->isVisible() ) { > Group1Sel->buttonApply->setEnabled(true); >- Group1Sel->buttonApply->setFocus(); >+ //Group1Sel->buttonApply->setFocus(); > } > if ( Group1Spin->isVisible() ) { > Group1Spin->buttonApply->setEnabled(true); >- Group1Spin->buttonApply->setFocus(); >+ //Group1Spin->buttonApply->setFocus(); > } > if ( Group2Spin->isVisible() ) { > Group2Spin->buttonApply->setEnabled(true); >- Group2Spin->buttonApply->setFocus(); >+ //Group2Spin->buttonApply->setFocus(); > } > if ( Group3Spin->isVisible() ) { > Group3Spin->buttonApply->setEnabled(true); >- Group3Spin->buttonApply->setFocus(); >+ //Group3Spin->buttonApply->setFocus(); > } > if ( Group4Spin->isVisible() ) { > Group4Spin->buttonApply->setEnabled(true); >- Group4Spin->buttonApply->setFocus(); >+ //Group4Spin->buttonApply->setFocus(); > } > } >- >+ > gp_Ax3 myWPlane = myGeometryGUI->GetWorkingPlane(); > GEOM::ListOfDouble_var WPlane = new GEOM::ListOfDouble; > WPlane->length(9); >@@ -1329,7 +1419,8 @@ > WPlane[7] = myWPlane.XDirection().Y(); > WPlane[8] = myWPlane.XDirection().Z(); > >- GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane ); >+ GEOM::GEOM_Object_var anObj = >+ GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane ); > > if ( !anObj->_is_nil() ) > objects.push_back( anObj._retn() ); >@@ -1441,7 +1532,3 @@ > ClickOnHelp(); > } > } >- >- >- >- >Index: GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.h >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.h,v >retrieving revision 1.7.2.1 >retrieving revision 1.7.2.2 >diff -c -u -r1.7.2.1 -r1.7.2.2 >--- GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.h 23 Jun 2006 12:47:09 -0000 1.7.2.1 >+++ GEOM_SRC_3.2.2/src/EntityGUI/EntityGUI_SketcherDlg.h 19 Sep 2006 13:41:11 -0000 1.7.2.2 >@@ -1,23 +1,23 @@ > // GEOM GEOMGUI : GUI for Geometry component > // > // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, >-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS >-// >-// This library is free software; you can redistribute it and/or >-// modify it under the terms of the GNU Lesser General Public >-// License as published by the Free Software Foundation; either >-// version 2.1 of the License. >-// >-// This library is distributed in the hope that it will be useful, >-// but WITHOUT ANY WARRANTY; without even the implied warranty of >-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >-// Lesser General Public License for more details. >-// >-// You should have received a copy of the GNU Lesser General Public >-// License along with this library; if not, write to the Free Software >-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA >-// >-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com >+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS >+// >+// This library is free software; you can redistribute it and/or >+// modify it under the terms of the GNU Lesser General Public >+// License as published by the Free Software Foundation; either >+// version 2.1 of the License. >+// >+// This library is distributed in the hope that it will be useful, >+// but WITHOUT ANY WARRANTY; without even the implied warranty of >+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+// Lesser General Public License for more details. >+// >+// You should have received a copy of the GNU Lesser General Public >+// License along with this library; if not, write to the Free Software >+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA >+// >+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com > // > // > // >@@ -58,7 +58,7 @@ > // purpose : > //================================================================================= > class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper >-{ >+{ > Q_OBJECT > > public: >@@ -66,6 +66,8 @@ > const char* name = 0, bool modal = FALSE, WFlags fl = 0); > ~EntityGUI_SketcherDlg(); > >+ bool eventFilter (QObject* object, QEvent* event); >+ > protected: > // redefined from GEOMBase_Helper > virtual GEOM::GEOM_IOperations_ptr createOperation(); >@@ -73,7 +75,7 @@ > virtual bool execute( ObjectList& objects ); > > void closeEvent( QCloseEvent* e ); >- void keyPressEvent( QKeyEvent* e ); >+ void keyPressEvent( QKeyEvent* e ); > > private : > void Init(); >Index: GEOM_SRC_3.2.2/src/GEOMBase/Makefile.in >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMBase/Makefile.in,v >retrieving revision 1.9 >retrieving revision 1.9.2.1 >diff -c -u -r1.9 -r1.9.2.1 >--- GEOM_SRC_3.2.2/src/GEOMBase/Makefile.in 1 Jun 2006 11:32:34 -0000 1.9 >+++ GEOM_SRC_3.2.2/src/GEOMBase/Makefile.in 29 Sep 2006 11:52:08 -0000 1.9.2.1 >@@ -57,6 +57,7 @@ > SALOMEDS.idl \ > SALOMEDS_Attributes.idl \ > SALOME_GenericObj.idl \ >+ SALOME_Component.idl \ > GEOM_Gen.idl > > LIB_SERVER_IDL = >Index: GEOM_SRC_3.2.2/src/GEOMGUI/GEOM_msg_en.po >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMGUI/GEOM_msg_en.po,v >retrieving revision 1.25.2.9 >retrieving revision 1.25.2.12 >diff -c -u -r1.25.2.9 -r1.25.2.12 >--- GEOM_SRC_3.2.2/src/GEOMGUI/GEOM_msg_en.po 29 Aug 2006 12:08:05 -0000 1.25.2.9 >+++ GEOM_SRC_3.2.2/src/GEOMGUI/GEOM_msg_en.po 9 Oct 2006 07:07:32 -0000 1.25.2.12 >@@ -903,7 +903,7 @@ > > #: GeometryGUI_FaceDlg.cxx:78 > msgid "GEOM_FACE_FFW" >-msgstr "Face from a wire" >+msgstr "Face from a closed wire and edge" > > #: GeometryGUI_FaceDlg.cxx:103 > msgid "GEOM_FACE_OPT" >@@ -2958,3 +2958,9 @@ > > msgid "PREF_TAB_SETTINGS" > msgstr "Settings" >+ >+msgid "ERROR_SHAPE_TYPE" >+msgstr "Object of incorrect type selected!\nPlease, select face, shell or solid and try again" >+ >+msgid "DEP_OBJECT" >+msgstr "Selected object has been used to create another one\n It can't be deleted " >Index: GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI.cxx,v >retrieving revision 1.49.2.4 >retrieving revision 1.49.2.5 >diff -c -u -r1.49.2.4 -r1.49.2.5 >--- GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI.cxx 29 Aug 2006 12:04:48 -0000 1.49.2.4 >+++ GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI.cxx 19 Sep 2006 13:38:56 -0000 1.49.2.5 >@@ -17,7 +17,7 @@ > // License along with this library; if not, write to the Free Software > // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > // >-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com >+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com > // > // > // >@@ -96,7 +96,7 @@ > > //======================================================================= > // function : ClientSObjectToObject >-// purpose : >+// purpose : > //======================================================================= > CORBA::Object_var GeometryGUI::ClientSObjectToObject (_PTR(SObject) theSObject) > { >@@ -116,7 +116,7 @@ > > //======================================================================= > // function : ClientStudyToStudy >-// purpose : >+// purpose : > //======================================================================= > SALOMEDS::Study_var GeometryGUI::ClientStudyToStudy (_PTR(Study) theStudy) > { >@@ -171,12 +171,12 @@ > SalomeApp_Module( "GEOM" ) > { > if ( CORBA::is_nil( myComponentGeom ) ) >- { >+ { > SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( getApp()->namingService() ); > Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" ); > myComponentGeom = GEOM::GEOM_Gen::_narrow( comp ); > } >- >+ > myState = -1; > myActiveDialogBox = 0; > myFatherior = ""; >@@ -350,7 +350,7 @@ > bool ViewVTK = ( window && window->getViewManager()->getType() == SVTK_Viewer::Type() ); > // if current viewframe is not of OCC and not of VTK type - return immediately > // fix for IPAL8958 - allow some commands to execute even when NO viewer is active (rename for example) >- bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); >+ bool NotViewerDependentCommand = ( id == 901 || id == 216 || id == 213 ); > if ( !ViewOCC && !ViewVTK && !NotViewerDependentCommand ) > return; > >@@ -486,7 +486,7 @@ > else if( id == 503 || // MENU OPERATION - PARTITION > id == 504 || // MENU OPERATION - ARCHIMEDE > id == 505 || // MENU OPERATION - FILLET >- id == 506 || // MENU OPERATION - CHAMFER >+ id == 506 || // MENU OPERATION - CHAMFER > id == 507 ) { // MENU OPERATION - CLIPPING RANGE > #ifndef WNT > library = getLibrary( "libOperationGUI.so" ); >@@ -549,9 +549,9 @@ > } > > // call method of corresponding GUI library >- if ( library ) >+ if ( library ) > library->OnGUIEvent( id, desk ); >- else >+ else > SUIT_MessageBox::error1( desk, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) ); > } > >@@ -578,7 +578,7 @@ > // purpose : Manages mouse move events [static] > //================================================================================= > void GeometryGUI::OnMouseMove( SUIT_ViewWindow* win, QMouseEvent* pe ) >-{ >+{ > GUIMap::Iterator it; > bool bOk = true; > for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) { >@@ -637,7 +637,7 @@ > { > QMenuBar* Mb = parent->getMainMenuBar(); > SUIT_Study* ActiveStudy = application()->activeStudy(); >- >+ > // Wireframe or Shading > int DisplayMode = 0; > SUIT_ViewWindow* window = application()->desktop()->activeWindow(); >@@ -671,16 +671,16 @@ > // if(!AddInStudy.isEmpty()) > // Settings_AddInStudy = AddInStudy.toInt(); > // else >- >+ > Settings_AddInStudy = 1; > Mb->setItemChecked(411, Settings_AddInStudy); > >- // step value >+ // step value > QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); > if(S.isEmpty()) > QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100"); > >- // isos >+ // isos > int count = ActiveStudy->getStudyFramesCount(); > for(int i = 0; i < count; i++) { > if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) { >@@ -704,22 +704,22 @@ > GUIMap::Iterator it; > for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) > bOk = bOk && it.data()->SetSettings( parent ); >- >- // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable) >+ >+ // MZN: Enable/disable "Clipping range" menu item(from GEOM_CLIPPING variable) > if (getenv( "GEOM_CLIPPING" ) == NULL) > { > QMenuItem* mi = Mb->findItem(50); > if (mi && mi->popup()) >- mi->popup()->removeItem(507); >- } >- >+ mi->popup()->removeItem(507); >+ } >+ > return bOk; > } > */ > > //======================================================================= > // function : createGeomAction >-// purpose : >+// purpose : > //======================================================================= > void GeometryGUI::createGeomAction( const int id, const QString& po_id, const QString& icon_id, const int key, const bool toggle ) > { >@@ -727,7 +727,7 @@ > QWidget* parent = application()->desktop(); > SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr(); > QPixmap pix; >- if ( icon_id.length() ) >+ if ( icon_id.length() ) > pix = resMgr->loadPixmap( "GEOM", tr( icon_id ) ); > else > pix = resMgr->loadPixmap( "GEOM", tr( QString( "ICO_" )+po_id ), false ); >@@ -831,7 +831,7 @@ > createGeomAction( 609, "CHECK_FREE_BNDS" ); > createGeomAction( 610, "CHECK_FREE_FACES" ); > createGeomAction( 611, "CHANGE_ORIENTATION" ); >- >+ > createGeomAction( 708, "POINT_COORDS" ); > createGeomAction( 701, "BASIC_PROPS" ); > createGeomAction( 702, "MASS_CENTER" ); >@@ -845,7 +845,7 @@ > createGeomAction( 7072, "CHECK_COMPOUND" ); > > createGeomAction( 5103, "CHECK_GEOMETRY" ); >- >+ > createGeomAction( 412, "SHADING_COLOR" ); > createGeomAction( 413, "ISOS" ); > createGeomAction( 414, "STEP_VALUE" ); >@@ -896,125 +896,125 @@ > createMenu( 4020, basicId, -1 ); > > int primId = createMenu( tr( "MEN_PRIMITIVES" ), newEntId, -1 ); >- createMenu( 4021, primId, -1 ); >- createMenu( 4022, primId, -1 ); >- createMenu( 4023, primId, -1 ); >- createMenu( 4024, primId, -1 ); >- createMenu( 4025, primId, -1 ); >+ createMenu( 4021, primId, -1 ); >+ createMenu( 4022, primId, -1 ); >+ createMenu( 4023, primId, -1 ); >+ createMenu( 4024, primId, -1 ); >+ createMenu( 4025, primId, -1 ); > > int genId = createMenu( tr( "MEN_GENERATION" ), newEntId, -1 ); >- createMenu( 4031, genId, -1 ); >- createMenu( 4032, genId, -1 ); >- createMenu( 4033, genId, -1 ); >- createMenu( 4034, genId, -1 ); >+ createMenu( 4031, genId, -1 ); >+ createMenu( 4032, genId, -1 ); >+ createMenu( 4033, genId, -1 ); >+ createMenu( 4034, genId, -1 ); > createMenu( separator(), newEntId, -1 ); > > int groupId = createMenu( tr( "MEN_GROUP" ), newEntId, -1 ); >- createMenu( 800, groupId, -1 ); >- createMenu( 801, groupId, -1 ); >+ createMenu( 800, groupId, -1 ); >+ createMenu( 801, groupId, -1 ); > createMenu( separator(), newEntId, -1 ); > > int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 ); >- createMenu( 9997, blocksId, -1 ); >- createMenu( 9999, blocksId, -1 ); >+ createMenu( 9997, blocksId, -1 ); >+ createMenu( 9999, blocksId, -1 ); > > createMenu( separator(), newEntId, -1 ); >- createMenu( 404, newEntId, -1 ); >+ createMenu( 404, newEntId, -1 ); > createMenu( separator(), newEntId, -1 ); >- createMenu( 407, newEntId, -1 ); >+ createMenu( 407, newEntId, -1 ); > > int buildId = createMenu( tr( "MEN_BUILD" ), newEntId, -1 ); >- createMenu( 4081, buildId, -1 ); >- createMenu( 4082, buildId, -1 ); >- createMenu( 4083, buildId, -1 ); >- createMenu( 4084, buildId, -1 ); >- createMenu( 4085, buildId, -1 ); >- createMenu( 4086, buildId, -1 ); >+ createMenu( 4081, buildId, -1 ); >+ createMenu( 4082, buildId, -1 ); >+ createMenu( 4083, buildId, -1 ); >+ createMenu( 4084, buildId, -1 ); >+ createMenu( 4085, buildId, -1 ); >+ createMenu( 4086, buildId, -1 ); > > int operId = createMenu( tr( "MEN_OPERATIONS" ), -1, -1, 10 ); > > int boolId = createMenu( tr( "MEN_BOOLEAN" ), operId, -1 ); >- createMenu( 5011, boolId, -1 ); >- createMenu( 5012, boolId, -1 ); >- createMenu( 5013, boolId, -1 ); >- createMenu( 5014, boolId, -1 ); >+ createMenu( 5011, boolId, -1 ); >+ createMenu( 5012, boolId, -1 ); >+ createMenu( 5013, boolId, -1 ); >+ createMenu( 5014, boolId, -1 ); > > int transId = createMenu( tr( "MEN_TRANSFORMATION" ), operId, -1 ); >- createMenu( 5021, transId, -1 ); >- createMenu( 5022, transId, -1 ); >- createMenu( 5023, transId, -1 ); >- createMenu( 5024, transId, -1 ); >- createMenu( 5025, transId, -1 ); >- createMenu( 5026, transId, -1 ); >+ createMenu( 5021, transId, -1 ); >+ createMenu( 5022, transId, -1 ); >+ createMenu( 5023, transId, -1 ); >+ createMenu( 5024, transId, -1 ); >+ createMenu( 5025, transId, -1 ); >+ createMenu( 5026, transId, -1 ); > createMenu( separator(), transId, -1 ); >- createMenu( 5027, transId, -1 ); >- createMenu( 5028, transId, -1 ); >+ createMenu( 5027, transId, -1 ); >+ createMenu( 5028, transId, -1 ); > >- createMenu( 503, operId, -1 ); >- createMenu( 504, operId, -1 ); >+ createMenu( 503, operId, -1 ); >+ createMenu( 504, operId, -1 ); > createMenu( separator(), operId, -1 ); >- createMenu( 505, transId, -1 ); >- createMenu( 506, transId, -1 ); >- //createMenu( 507, transId, -1 ); >+ createMenu( 505, transId, -1 ); >+ createMenu( 506, transId, -1 ); >+ //createMenu( 507, transId, -1 ); > > int blockId = createMenu( tr( "MEN_BLOCKS" ), operId, -1 ); >- createMenu( 9998, blockId, -1 ); >- createMenu( 9995, blockId, -1 ); >- createMenu( 99991, blockId, -1 ); >+ createMenu( 9998, blockId, -1 ); >+ createMenu( 9995, blockId, -1 ); >+ createMenu( 99991, blockId, -1 ); > > int repairId = createMenu( tr( "MEN_REPAIR" ), -1, -1, 10 ); >- createMenu( 605, repairId, -1 ); >- createMenu( 603, repairId, -1 ); >- createMenu( 606, repairId, -1 ); >- createMenu( 607, repairId, -1 ); >- createMenu( 604, repairId, -1 ); >- createMenu( 601, repairId, -1 ); >- createMenu( 602, repairId, -1 ); >- createMenu( 608, repairId, -1 ); >- createMenu( 609, repairId, -1 ); >- createMenu( 610, repairId, -1 ); >- createMenu( 611, repairId, -1 ); >+ createMenu( 605, repairId, -1 ); >+ createMenu( 603, repairId, -1 ); >+ createMenu( 606, repairId, -1 ); >+ createMenu( 607, repairId, -1 ); >+ createMenu( 604, repairId, -1 ); >+ createMenu( 601, repairId, -1 ); >+ createMenu( 602, repairId, -1 ); >+ createMenu( 608, repairId, -1 ); >+ createMenu( 609, repairId, -1 ); >+ createMenu( 610, repairId, -1 ); >+ createMenu( 611, repairId, -1 ); > > int measurId = createMenu( tr( "MEN_MEASURES" ), -1, -1, 10 ); >- createMenu( 708, measurId, -1 ); >- createMenu( 701, measurId, -1 ); >+ createMenu( 708, measurId, -1 ); >+ createMenu( 701, measurId, -1 ); > createMenu( separator(), measurId, -1 ); >- createMenu( 702, measurId, -1 ); >- createMenu( 703, measurId, -1 ); >+ createMenu( 702, measurId, -1 ); >+ createMenu( 703, measurId, -1 ); > createMenu( separator(), measurId, -1 ); > > int dimId = createMenu( tr( "MEN_DIMENSIONS" ), measurId, -1 ); >- createMenu( 7041, dimId, -1 ); >+ createMenu( 7041, dimId, -1 ); > createMenu( 7042, dimId, -1 ); > createMenu( separator(), measurId, -1 ); >- >- createMenu( 705, measurId, -1 ); >+ >+ createMenu( 705, measurId, -1 ); > createMenu( separator(), measurId, -1 ); >- createMenu( 706, measurId, -1 ); >- createMenu( 707, measurId, -1 ); >- createMenu( 7072, measurId, -1 ); >+ createMenu( 706, measurId, -1 ); >+ createMenu( 707, measurId, -1 ); >+ createMenu( 7072, measurId, -1 ); > > int toolsId = createMenu( tr( "MEN_TOOLS" ), -1, -1, 50 ); > createMenu( separator(), toolsId, -1 ); >- createMenu( 5103, toolsId, -1 ); >- >+ createMenu( 5103, toolsId, -1 ); >+ > //int prefId = createMenu( tr( "MEN_PREFERENCES" ), -1, -1, 50 ); > //createMenu( separator(), prefId, -1 ); > //int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 ); >- //createMenu( 412, geomId, -1 ); >- //createMenu( 413, geomId, -1 ); >- //createMenu( 414, geomId, -1 ); >+ //createMenu( 412, geomId, -1 ); >+ //createMenu( 413, geomId, -1 ); >+ //createMenu( 414, geomId, -1 ); > //createMenu( separator(), prefId, -1 ); > > int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 ); > createMenu( separator(), viewId, -1 ); > > int dispmodeId = createMenu( tr( "MEN_DISPLAY_MODE" ), viewId, -1 ); >- createMenu( 211, dispmodeId, -1 ); >- >+ createMenu( 211, dispmodeId, -1 ); >+ > createMenu( separator(), viewId, -1 ); >- createMenu( 212, viewId, -1 ); >- createMenu( 214, viewId, -1 ); >+ createMenu( 212, viewId, -1 ); >+ createMenu( 214, viewId, -1 ); > createMenu( separator(), viewId, -1 ); > > /* >@@ -1022,8 +1022,8 @@ > because of these items are accessible through object browser and viewers > we have removed they from main menu > >- createMenu( 216, viewId, -1 ); >- createMenu( 213, viewId, -1 ); >+ createMenu( 216, viewId, -1 ); >+ createMenu( 213, viewId, -1 ); > createMenu( 215, viewId, -1 ); > */ > >@@ -1042,33 +1042,33 @@ > createTool( 4020, basicTbId ); > > int primTbId = createTool( tr( "TOOL_PRIMITIVES" ) ); >- createTool( 4021, primTbId ); >- createTool( 4022, primTbId ); >- createTool( 4023, primTbId ); >- createTool( 4024, primTbId ); >- createTool( 4025, primTbId ); >+ createTool( 4021, primTbId ); >+ createTool( 4022, primTbId ); >+ createTool( 4023, primTbId ); >+ createTool( 4024, primTbId ); >+ createTool( 4025, primTbId ); > > int boolTbId = createTool( tr( "TOOL_BOOLEAN" ) ); >- createTool( 5011, boolTbId ); >- createTool( 5012, boolTbId ); >- createTool( 5013, boolTbId ); >- createTool( 5014, boolTbId ); >+ createTool( 5011, boolTbId ); >+ createTool( 5012, boolTbId ); >+ createTool( 5013, boolTbId ); >+ createTool( 5014, boolTbId ); > > int genTbId = createTool( tr( "TOOL_GENERATION" ) ); >- createTool( 4031, genTbId ); >- createTool( 4032, genTbId ); >- createTool( 4033, genTbId ); >- createTool( 4034, genTbId ); >+ createTool( 4031, genTbId ); >+ createTool( 4032, genTbId ); >+ createTool( 4033, genTbId ); >+ createTool( 4034, genTbId ); > > int transTbId = createTool( tr( "TOOL_TRANSFORMATION" ) ); >- createTool( 5021, transTbId ); >- createTool( 5022, transTbId ); >- createTool( 5023, transTbId ); >- createTool( 5024, transTbId ); >- createTool( 5025, transTbId ); >- createTool( 5026, transTbId ); >+ createTool( 5021, transTbId ); >+ createTool( 5022, transTbId ); >+ createTool( 5023, transTbId ); >+ createTool( 5024, transTbId ); >+ createTool( 5025, transTbId ); >+ createTool( 5026, transTbId ); > createTool( separator(), transTbId ); >- createTool( 5027, transTbId ); >+ createTool( 5027, transTbId ); > createTool( 5028, transTbId ); > > // ---- create popup menus -------------------------- >@@ -1185,14 +1185,14 @@ > setMenuShown( false ); > setToolShown( false ); > >- disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), >+ disconnect( application()->desktop(), SIGNAL( windowActivated( SUIT_ViewWindow* ) ), > this, SLOT( onWindowActivated( SUIT_ViewWindow* ) ) ); > > EmitSignalCloseAllDialogs(); > > GUIMap::Iterator it; > for ( it = myGUIMap.begin(); it != myGUIMap.end(); ++it ) >- it.data()->deactivate(); >+ it.data()->deactivate(); > > // Unset actions accelerator keys > //action(111)->setAccel(QKeySequence()); // Import >@@ -1286,7 +1286,7 @@ > if( nbSel == 0 ) { > ////// NOTHING SELECTED > popup->clear(); >- } >+ } > else if ( nbSel == 1 ) { > ////// SINGLE OBJECT SELECTION > if ( parentComponent != parent->getActiveComponent() ) { >@@ -1513,7 +1513,7 @@ > > //======================================================================= > // function : GeometryGUI::BuildPresentation() >-// purpose : >+// purpose : > //======================================================================= > void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& io, SUIT_ViewWindow* win ) > { >@@ -1531,7 +1531,7 @@ > > const bool ViewOCC = ( win->getViewManager()->getType() == OCCViewer_Viewer::Type() ); > // const bool ViewVTK = ( win->getViewManager()->getType() == SVTK_Viewer::Type() ); >- >+ > // disable non-OCC viewframe menu commands > // action( 404 )->setEnabled( ViewOCC ); // SKETCHER > action( 603 )->setEnabled( ViewOCC ); // SuppressFace >@@ -1654,22 +1654,22 @@ > > addPreference( tr( "PREF_SHADING_COLOR" ), genGroup, > LightApp_Preferences::Color, "Geometry", "shading_color" ); >- >+ > addPreference( tr( "PREF_WIREFRAME_COLOR" ), genGroup, > LightApp_Preferences::Color, "Geometry", "wireframe_color" ); >- >+ > addPreference( tr( "PREF_FREE_BOUND_COLOR" ), genGroup, > LightApp_Preferences::Color, "Geometry", "free_bound_color" ); >- >+ > addPreference( tr( "PREF_LINE_COLOR"), genGroup, > LightApp_Preferences::Color, "Geometry", "line_color" ); >- >+ > addPreference( tr( "PREF_POINT_COLOR"), genGroup, > LightApp_Preferences::Color, "Geometry", "point_color" ); >- >+ > addPreference( tr( "PREF_ISOS_COLOR" ), genGroup, > LightApp_Preferences::Color, "Geometry", "isos_color" ); >- >+ > int step = addPreference( tr( "PREF_STEP_VALUE" ), genGroup, > LightApp_Preferences::IntSpin, "Geometry", "SettingsGeomStep" ); > >@@ -1677,23 +1677,30 @@ > QStringList aModesList; > aModesList.append( tr("MEN_WIREFRAME") ); > aModesList.append( tr("MEN_SHADING") ); >- >+ > QValueList<QVariant> anIndexesList; > anIndexesList.append(0); > anIndexesList.append(1); >- >+ > setPreferenceProperty( dispmode, "strings", aModesList ); > setPreferenceProperty( dispmode, "indexes", anIndexesList ); >- >+ > // Set property for step value for spinboxes > setPreferenceProperty( step, "min", 0.001 ); > setPreferenceProperty( step, "max", 10000 ); > setPreferenceProperty( step, "precision", 3 ); >- >+ > } > > void GeometryGUI::preferencesChanged( const QString& section, const QString& param ) > { >+ if (section == "Geometry") { >+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); >+ if (param == QString("SettingsGeomStep")) { >+ double spin_step = aResourceMgr->doubleValue(section, param, 100.); >+ EmitSignalDefaultStepValueChanged(spin_step); >+ } >+ } > } > > LightApp_Displayer* GeometryGUI::displayer() >Index: GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI_Swig.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI_Swig.cxx,v >retrieving revision 1.19.2.3 >retrieving revision 1.19.2.4 >diff -c -u -r1.19.2.3 -r1.19.2.4 >--- GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI_Swig.cxx 5 Sep 2006 13:06:07 -0000 1.19.2.3 >+++ GEOM_SRC_3.2.2/src/GEOMGUI/GeometryGUI_Swig.cxx 21 Sep 2006 13:16:53 -0000 1.19.2.4 >@@ -439,7 +439,7 @@ > ite.Value()->SetColor(CSFColor); > if (ite.Value()->IsKind(STANDARD_TYPE(GEOM_AISShape))) > Handle(GEOM_AISShape)::DownCast(ite.Value())->SetShadingColor(CSFColor); >- ite.Value()->Redisplay(Standard_True); >+ ic->Redisplay(ite.Value(), true, true); > if (myUpdateViewer) > occViewer->update(); > break; >Index: GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx,v >retrieving revision 1.5.2.3 >retrieving revision 1.5.2.4 >diff -c -u -r1.5.2.3 -r1.5.2.4 >--- GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx 7 Sep 2006 08:59:04 -0000 1.5.2.3 >+++ GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx 26 Sep 2006 11:35:38 -0000 1.5.2.4 >@@ -127,8 +127,25 @@ > if (!BO.IsDone()) { > StdFail_NotDone::Raise("Common operation can not be performed on the given shapes"); > } >- if (isCompound) >- B.Add(C, BO.Shape()); >+ if (isCompound) { >+ TopoDS_Shape aStepResult = BO.Shape(); >+ >+ // check result of this step: if it is a compound (boolean operations >+ // allways return a compound), we add all sub-shapes of it. >+ // This allows to avoid adding empty compounds, >+ // resulting from COMMON on two non-intersecting shapes. >+ if (aStepResult.ShapeType() == TopAbs_COMPOUND) { >+ TopoDS_Iterator aCompIter (aStepResult); >+ for (; aCompIter.More(); aCompIter.Next()) { >+ // add shape in a result >+ B.Add(C, aCompIter.Value()); >+ } >+ } >+ else { >+ // add shape in a result >+ B.Add(C, aStepResult); >+ } >+ } > else > aShape = BO.Shape(); > } >@@ -175,8 +192,23 @@ > } > aCut = BO.Shape(); > } >- if (isCompound) >- B.Add(C, aCut); >+ if (isCompound) { >+ // check result of this step: if it is a compound (boolean operations >+ // allways return a compound), we add all sub-shapes of it. >+ // This allows to avoid adding empty compounds, >+ // resulting from CUT of parts >+ if (aCut.ShapeType() == TopAbs_COMPOUND) { >+ TopoDS_Iterator aCompIter (aCut); >+ for (; aCompIter.More(); aCompIter.Next()) { >+ // add shape in a result >+ B.Add(C, aCompIter.Value()); >+ } >+ } >+ else { >+ // add shape in a result >+ B.Add(C, aCut); >+ } >+ } > else > aShape = aCut; > } >@@ -229,8 +261,25 @@ > if (!BO.IsDone()) { > StdFail_NotDone::Raise("Section operation can not be performed on the given shapes"); > } >- if (isCompound) >- B.Add(C, BO.Shape()); >+ if (isCompound) { >+ TopoDS_Shape aStepResult = BO.Shape(); >+ >+ // check result of this step: if it is a compound (boolean operations >+ // allways return a compound), we add all sub-shapes of it. >+ // This allows to avoid adding empty compounds, >+ // resulting from SECTION on two non-intersecting shapes. >+ if (aStepResult.ShapeType() == TopAbs_COMPOUND) { >+ TopoDS_Iterator aCompIter (aStepResult); >+ for (; aCompIter.More(); aCompIter.Next()) { >+ // add shape in a result >+ B.Add(C, aCompIter.Value()); >+ } >+ } >+ else { >+ // add shape in a result >+ B.Add(C, aStepResult); >+ } >+ } > else > aShape = BO.Shape(); > } >Index: GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx,v >retrieving revision 1.20.2.1 >retrieving revision 1.20.2.2 >diff -c -u -r1.20.2.1 -r1.20.2.2 >--- GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx 4 Sep 2006 11:33:22 -0000 1.20.2.1 >+++ GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx 27 Sep 2006 10:59:18 -0000 1.20.2.2 >@@ -1419,6 +1419,80 @@ > > //============================================================================= > /*! >+ * GetShapesOnPlaneWithLocation >+ */ >+//============================================================================= >+Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocation >+ (const Handle(GEOM_Object)& theShape, >+ const Standard_Integer theShapeType, >+ const Handle(GEOM_Object)& theAx1, >+ const Handle(GEOM_Object)& thePnt, >+ const GEOMAlgo_State theState) >+{ >+ SetErrorCode(KO); >+ >+ if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL; >+ >+ TopoDS_Shape aShape = theShape->GetValue(); >+ TopoDS_Shape anAx1 = theAx1->GetValue(); >+ TopoDS_Shape anPnt = thePnt->GetValue(); >+ >+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL; >+ >+ TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); >+ if ( !checkTypeShapesOn( theShapeType )) >+ return NULL; >+ >+ // Create plane >+ if ( anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX ) return NULL; >+ TopoDS_Vertex V1, V2, V3; >+ TopoDS_Edge anEdge = TopoDS::Edge(anAx1); >+ TopExp::Vertices(anEdge, V1, V2, Standard_True); >+ >+ if (V1.IsNull() || V2.IsNull()) { >+ SetErrorCode("Bad edge given for the plane normal vector"); >+ return NULL; >+ } >+ V3 = TopoDS::Vertex(anPnt); >+ >+ if(V3.IsNull()) { >+ SetErrorCode("Bad vertex given for the plane location"); >+ return NULL; >+ } >+ gp_Pnt aLoc = BRep_Tool::Pnt(V3); >+ gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2)); >+ >+ if (aVec.Magnitude() < Precision::Confusion()) { >+ SetErrorCode("Vector with null magnitude given"); >+ return NULL; >+ } >+ Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec); >+ >+ if ( aPlane.IsNull() ) >+ return NULL; >+ >+ // Find objects >+ TCollection_AsciiString anAsciiList; >+ Handle(TColStd_HSequenceOfTransient) aSeq; >+ aSeq = getShapesOnSurface( aPlane, theShape, aShapeType, theState, anAsciiList ); >+ if ( aSeq.IsNull() || aSeq->Length() == 0 ) >+ return NULL; >+ >+ // Make a Python command >+ >+ Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast( aSeq->Value( 1 )); >+ Handle(GEOM_Function) aFunction = anObj->GetLastFunction(); >+ >+ GEOM::TPythonDump(aFunction) << "[" << anAsciiList.ToCString() >+ << "] = geompy.GetShapesOnPlaneWithLocation(" << theShape << ", " >+ << aShapeType << ", " << theAx1 << ", "<< thePnt <<", " << theState << ")"; >+ >+ SetErrorCode(OK); >+ return aSeq; >+} >+ >+//============================================================================= >+/*! > * GetShapesOnCylinder > */ > //============================================================================= >@@ -1567,6 +1641,73 @@ > > //============================================================================= > /*! >+ * GetShapesOnPlaneWithLocationIDs >+ */ >+//============================================================================= >+Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::GetShapesOnPlaneWithLocationIDs >+ (const Handle(GEOM_Object)& theShape, >+ const Standard_Integer theShapeType, >+ const Handle(GEOM_Object)& theAx1, >+ const Handle(GEOM_Object)& thePnt, >+ const GEOMAlgo_State theState) >+{ >+ SetErrorCode(KO); >+ >+ if (theShape.IsNull() || theAx1.IsNull() || thePnt.IsNull()) return NULL; >+ >+ TopoDS_Shape aShape = theShape->GetValue(); >+ TopoDS_Shape anAx1 = theAx1->GetValue(); >+ TopoDS_Shape anPnt = thePnt->GetValue(); >+ >+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return NULL; >+ >+ TopAbs_ShapeEnum aShapeType = TopAbs_ShapeEnum(theShapeType); >+ if ( !checkTypeShapesOn( aShapeType )) >+ return NULL; >+ >+ // Create plane >+ if (anAx1.ShapeType() != TopAbs_EDGE || anPnt.ShapeType() != TopAbs_VERTEX) return NULL; >+ TopoDS_Edge anEdge = TopoDS::Edge(anAx1); >+ TopoDS_Vertex V1, V2, V3; >+ TopExp::Vertices(anEdge, V1, V2, Standard_True); >+ if (V1.IsNull() || V2.IsNull()) { >+ SetErrorCode("Bad edge given for the plane normal vector"); >+ return NULL; >+ } >+ V3 = TopoDS::Vertex(anPnt); >+ if(V3.IsNull()) { >+ SetErrorCode("Bad vertex given for the plane location"); >+ return NULL; >+ } >+ gp_Pnt aLoc = BRep_Tool::Pnt(V3); >+ gp_Vec aVec(BRep_Tool::Pnt(V1),BRep_Tool::Pnt(V2)); >+ if (aVec.Magnitude() < Precision::Confusion()) { >+ SetErrorCode("Vector with null magnitude given"); >+ return NULL; >+ } >+ >+ Handle(Geom_Surface) aPlane = new Geom_Plane(aLoc, aVec); >+ if ( aPlane.IsNull() ) >+ return NULL; >+ >+ // Find object IDs >+ Handle(TColStd_HSequenceOfInteger) aSeq; >+ aSeq = getShapesOnSurfaceIDs( aPlane, aShape, aShapeType, theState ); >+ >+ // The GetShapesOnPlaneIDs() doesn't change object so no new function is required. >+ Handle(GEOM_Function) aFunction = GEOM::GetCreatedLast(theShape,theAx1)->GetLastFunction(); >+ >+ // Make a Python command >+ GEOM::TPythonDump(aFunction, /*append=*/true) >+ << "listShapesOnPlane = geompy.GetShapesOnPlaneWithLocationIDs" >+ << "(" << theShape << ", " << aShapeType << ", " << theAx1 << ", "<< thePnt << ", " << theState << ")"; >+ >+ SetErrorCode(OK); >+ return aSeq; >+} >+ >+//============================================================================= >+/*! > * GetShapesOnCylinderIDs > */ > //============================================================================= >Index: GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx,v >retrieving revision 1.12 >retrieving revision 1.12.2.1 >diff -c -u -r1.12 -r1.12.2.1 >--- GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx 1 Jun 2006 11:32:35 -0000 1.12 >+++ GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx 27 Sep 2006 10:59:18 -0000 1.12.2.1 >@@ -97,6 +97,13 @@ > const Handle(GEOM_Object)& theAx1, > const GEOMAlgo_State theState); > >+ Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnPlaneWithLocation (const Handle(GEOM_Object)& theShape, >+ const Standard_Integer theShapeType, >+ const Handle(GEOM_Object)& theAx1, >+ const Handle(GEOM_Object)& thePnt, >+ const GEOMAlgo_State theState); >+ >+ > Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetShapesOnCylinder (const Handle(GEOM_Object)& theShape, > const Standard_Integer theShapeType, > const Handle(GEOM_Object)& theAxis, >@@ -114,6 +121,12 @@ > const Handle(GEOM_Object)& theAx1, > const GEOMAlgo_State theState); > >+ Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnPlaneWithLocationIDs (const Handle(GEOM_Object)& theShape, >+ const Standard_Integer theShapeType, >+ const Handle(GEOM_Object)& theAx1, >+ const Handle(GEOM_Object)& thePnt, >+ const GEOMAlgo_State theState); >+ > Standard_EXPORT Handle(TColStd_HSequenceOfInteger) GetShapesOnCylinderIDs (const Handle(GEOM_Object)& theShape, > const Standard_Integer theShapeType, > const Handle(GEOM_Object)& theAxis, >Index: GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx,v >retrieving revision 1.11.2.3 >retrieving revision 1.11.2.4 >diff -c -u -r1.11.2.3 -r1.11.2.4 >--- GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx 7 Sep 2006 08:59:04 -0000 1.11.2.3 >+++ GEOM_SRC_3.2.2/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx 27 Sep 2006 11:15:14 -0000 1.11.2.4 >@@ -170,8 +170,7 @@ > if (!MW.IsDone()) { > Standard_ConstructionError::Raise("Wire construction failed"); > } >- //W = TopoDS::Wire(aShapeBase); >- W = MW; >+ W = MW; > } > else { > Standard_NullObject::Raise >@@ -189,17 +188,30 @@ > Standard_ConstructionError::Raise("No wires given"); > } > >- // first wire >+ // first wire or edge > Handle(GEOM_Function) aRefWire = Handle(GEOM_Function)::DownCast(aShapes->Value(1)); > TopoDS_Shape aWire = aRefWire->GetValue(); >- if (aWire.IsNull() || aWire.ShapeType() != TopAbs_WIRE) { >- Standard_NullObject::Raise("Shape for face construction is null or not a wire"); >+ if (aWire.IsNull()) Standard_NullObject::Raise("Argument Shape is null"); >+ TopoDS_Wire W1; >+ if(aWire.ShapeType() == TopAbs_WIRE) { >+ W1 = TopoDS::Wire(aWire); >+ } >+ else if(aWire.ShapeType() == TopAbs_EDGE && aWire.Closed()) { >+ BRepBuilderAPI_MakeWire MW; >+ MW.Add(TopoDS::Edge(aWire)); >+ if (!MW.IsDone()) { >+ Standard_ConstructionError::Raise("Wire construction failed"); >+ } >+ W1 = MW; >+ } >+ else { >+ Standard_NullObject::Raise >+ ("Shape for face construction is neither a wire nor closed edge"); > } >- TopoDS_Wire W = TopoDS::Wire(aWire); > > // basic face > TopoDS_Shape FFace; >- GEOMImpl_Block6Explorer::MakeFace(W, aCI.GetIsPlanar(), FFace); >+ GEOMImpl_Block6Explorer::MakeFace(W1, aCI.GetIsPlanar(), FFace); > if (FFace.IsNull()) { > Standard_ConstructionError::Raise("Face construction failed"); > } >@@ -221,11 +233,24 @@ > Handle(GEOM_Function) aRefWire_i = > Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); > TopoDS_Shape aWire_i = aRefWire_i->GetValue(); >- if (aWire_i.IsNull() || aWire_i.ShapeType() != TopAbs_WIRE) { >- Standard_NullObject::Raise("Shape for face construction is null or not a wire"); >- } >- >- FR.Add(TopoDS::Wire(aWire_i)); >+ if (aWire_i.IsNull()) Standard_NullObject::Raise("Argument Shape is null"); >+ TopoDS_Wire W_i; >+ if(aWire_i.ShapeType() == TopAbs_WIRE) { >+ W_i = TopoDS::Wire(aWire_i); >+ } >+ else if(aWire_i.ShapeType() == TopAbs_EDGE && aWire_i.Closed()) { >+ BRepBuilderAPI_MakeWire MW1; >+ MW1.Add(TopoDS::Edge(aWire_i)); >+ if (!MW1.IsDone()) { >+ Standard_ConstructionError::Raise("Wire construction failed"); >+ } >+ W_i = MW1; >+ } >+ else { >+ Standard_NullObject::Raise >+ ("Shape for face construction is neither a wire nor closed edges"); >+ } >+ FR.Add(W_i); > } > > FR.Perform(); >Index: GEOM_SRC_3.2.2/src/GEOMToolsGUI/GEOMToolsGUI.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOMToolsGUI/GEOMToolsGUI.cxx,v >retrieving revision 1.21.2.2 >retrieving revision 1.21.2.3 >diff -c -u -r1.21.2.2 -r1.21.2.3 >--- GEOM_SRC_3.2.2/src/GEOMToolsGUI/GEOMToolsGUI.cxx 11 Aug 2006 11:33:49 -0000 1.21.2.2 >+++ GEOM_SRC_3.2.2/src/GEOMToolsGUI/GEOMToolsGUI.cxx 9 Oct 2006 07:06:05 -0000 1.21.2.3 >@@ -288,6 +288,10 @@ > _PTR(GenericAttribute) anAttr; > GEOM_Displayer* disp = new GEOM_Displayer( appStudy ); > >+ _PTR(SComponent) aGeom ( aStudy->FindComponent("GEOM") ); >+ if ( !aGeom ) >+ return; >+ > // MAIN LOOP OF SELECTED OBJECTS > for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { > >@@ -301,6 +305,29 @@ > if ( !strcmp( obj->GetIOR().c_str(), geomIOR ) ) > continue; > >+ //If the object has been used to create another one,then it can't be deleted >+ _PTR(ChildIterator) it (aStudy->NewChildIterator(aGeom)); >+ for ( it->InitEx( true ); it->More(); it->Next() ) { >+ _PTR(SObject) chobj (it->Value()); >+ CORBA::Object_var corbaObj = GeometryGUI::ClientSObjectToObject(chobj); >+ GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj ); >+ if( CORBA::is_nil(geomObj) ) >+ continue; >+ GEOM::ListOfGO_var list = geomObj->GetDependency(); >+ if( list->length() > 1 ) >+ for(int i = 0; i < list->length(); i++ ){ >+ CORBA::Object_var corbaObj_rem = GeometryGUI::ClientSObjectToObject(obj); >+ GEOM::GEOM_Object_var geomObj_rem = GEOM::GEOM_Object::_narrow( corbaObj_rem ); >+ if( list[i]->_is_equivalent( geomObj_rem ) ){ >+ SUIT_MessageBox::warn1 ( app->desktop(), >+ QObject::tr("WRN_WARNING"), >+ QObject::tr("DEP_OBJECT"), >+ QObject::tr("BUT_OK") ); >+ return; >+ } >+ } >+ } >+ > RemoveObjectWithChildren(obj, aStudy, views, disp); > > // Remove objects from Study >Index: GEOM_SRC_3.2.2/src/GEOM_I/GEOM_Gen_i.cc >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_I/GEOM_Gen_i.cc,v >retrieving revision 1.11.2.1 >retrieving revision 1.11.2.3 >diff -c -u -r1.11.2.1 -r1.11.2.3 >--- GEOM_SRC_3.2.2/src/GEOM_I/GEOM_Gen_i.cc 16 Jun 2006 11:14:24 -0000 1.11.2.1 >+++ GEOM_SRC_3.2.2/src/GEOM_I/GEOM_Gen_i.cc 4 Oct 2006 15:20:32 -0000 1.11.2.3 >@@ -1,18 +1,18 @@ > // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, > // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS >-// >+// > // This library is free software; you can redistribute it and/or > // modify it under the terms of the GNU Lesser General Public >-// License as published by the Free Software Foundation; either >+// License as published by the Free Software Foundation; either > // version 2.1 of the License. >-// >-// This library is distributed in the hope that it will be useful >-// but WITHOUT ANY WARRANTY; without even the implied warranty of >-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+// >+// This library is distributed in the hope that it will be useful >+// but WITHOUT ANY WARRANTY; without even the implied warranty of >+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > // Lesser General Public License for more details. > // >-// You should have received a copy of the GNU Lesser General Public >-// License along with this library; if not, write to the Free Software >+// You should have received a copy of the GNU Lesser General Public >+// License along with this library; if not, write to the Free Software > // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > // > // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com >@@ -68,18 +68,23 @@ > > _impl = new ::GEOMImpl_Gen; > >- //work around PAL12004, PAL12628 >- //OSD::SetSignal( true ); >- bool raiseFPE; >+ //PAL10867: disable signals catching with "noexcepthandler" option >+ char* envNoCatchSignals = getenv("NOT_INTERCEPT_SIGNALS"); >+ if (!envNoCatchSignals || !atoi(envNoCatchSignals)) >+ { >+ //work around PAL12004, PAL12628 >+ //OSD::SetSignal( true ); >+ bool raiseFPE; > #ifdef _DEBUG_ >- raiseFPE = true; >- char* envDisableFPE = getenv("DISABLE_FPE"); >- if (envDisableFPE && atoi(envDisableFPE)) >- raiseFPE = false; >+ raiseFPE = true; >+ char* envDisableFPE = getenv("DISABLE_FPE"); >+ if (envDisableFPE && atoi(envDisableFPE)) >+ raiseFPE = false; > #else >- raiseFPE = false; >+ raiseFPE = false; > #endif >- OSD::SetSignal( raiseFPE ); >+ OSD::SetSignal( raiseFPE ); >+ } > } > > //============================================================================ >@@ -103,7 +108,7 @@ > { > GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(IORString)); > if (!CORBA::is_nil(anObject)) { >- return strdup(anObject->GetEntry()); >+ return CORBA::string_dup(anObject->GetEntry()); > } > return 0; > } >@@ -128,7 +133,7 @@ > GEOM::GEOM_Object_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString()); > > CORBA::String_var aPersRefString = _orb->object_to_string(obj); >- return strdup(aPersRefString); >+ return CORBA::string_dup(aPersRefString); > } > > //============================================================================ >@@ -182,8 +187,10 @@ > } > anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR"); > SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); >- char *aGeomObjIOR = _orb->object_to_string(theObject); >- anIOR->SetValue(strdup(aGeomObjIOR)); >+ //char *aGeomObjIOR = _orb->object_to_string(theObject); >+ CORBA::String_var aGeomObjIOR = _orb->object_to_string(theObject); >+ //anIOR->SetValue(CORBA::string_dup(aGeomObjIOR)); >+ anIOR->SetValue(aGeomObjIOR); > > anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributePixMap"); > SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); >@@ -238,7 +245,7 @@ > aShapeName = "Vertex_"; > } > //if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag()); >- //else aShapeName = TCollection_AsciiString(strdup(theName)); >+ //else aShapeName = TCollection_AsciiString(CORBA::string_dup(theName)); > > // asv : 11.11.04 Introducing a more sofisticated method of name creation, just as > // it is done in GUI in GEOMBase::GetDefaultName() - not just add a Tag() == number >@@ -256,7 +263,7 @@ > aShapeName = aNewShapeName; > } > else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME) >- aShapeName = TCollection_AsciiString(strdup(theName)); >+ aShapeName = TCollection_AsciiString((char*)theName); > > //Set the study entry as a name of the published GEOM_Object > aShape->SetStudyEntry(aResultSO->GetID()); >@@ -348,7 +355,7 @@ > if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true); > > SALOMEDS::Study_var Study = theComponent->GetStudy(); >- TCollection_AsciiString name( strdup(Study->Name()) ); >+ TCollection_AsciiString name (Study->Name()); > > return true; > } >@@ -463,6 +470,9 @@ > TDF_Tool::Entry(anObj->GetEntry(), anEntry); > GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString()); > >+ //Set the study entry of the published GEOM_Object >+ obj->SetStudyEntry(aNewSO->GetID()); >+ > // Add IORAttribute to the Study and set IOR of the created GEOM_Object to it > SALOMEDS::GenericAttribute_var anAttr = aStudyBuilder->FindOrCreateAttribute(aNewSO, "AttributeIOR"); > SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); >@@ -478,7 +488,7 @@ > //============================================================================ > char* GEOM_Gen_i::ComponentDataType() > { >- return strdup("GEOM"); >+ return CORBA::string_dup("GEOM"); > } > > //============================================================================ >@@ -529,7 +539,7 @@ > void GEOM_Gen_i::register_name(char * name) > { > GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(_this()); >- name_service->Register(g, strdup(name)); >+ name_service->Register(g, CORBA::string_dup(name)); > } > > //============================================================================ >Index: GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.cc >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.cc,v >retrieving revision 1.11 >retrieving revision 1.11.2.1 >diff -c -u -r1.11 -r1.11.2.1 >--- GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.cc 1 Jun 2006 11:32:35 -0000 1.11 >+++ GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.cc 27 Sep 2006 11:01:37 -0000 1.11.2.1 >@@ -708,6 +708,49 @@ > > //============================================================================= > /*! >+ * GetShapesOnPlaneWithLocation >+ */ >+//============================================================================= >+GEOM::ListOfGO* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocation >+ (GEOM::GEOM_Object_ptr theShape, >+ const CORBA::Long theShapeType, >+ GEOM::GEOM_Object_ptr theAx1, >+ GEOM::GEOM_Object_ptr thePnt, >+ const GEOM::shape_state theState) >+{ >+ GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; >+ >+ //Set a not done flag >+ GetOperations()->SetNotDone(); >+ >+ if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn(); >+ >+ //Get the reference objects >+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject >+ (theShape->GetStudyID(), theShape->GetEntry()); >+ Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject >+ (theAx1->GetStudyID(), theAx1->GetEntry()); >+ Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject >+ (thePnt->GetStudyID(), thePnt->GetEntry()); >+ >+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn(); >+ >+ //Get Shapes On Plane >+ Handle(TColStd_HSequenceOfTransient) aHSeq = >+ GetOperations()->GetShapesOnPlaneWithLocation(aShape, theShapeType, anAx1, anPnt, ShapeState(theState)); >+ if (!GetOperations()->IsDone() || aHSeq.IsNull()) >+ return aSeq._retn(); >+ >+ Standard_Integer aLength = aHSeq->Length(); >+ aSeq->length(aLength); >+ for (Standard_Integer i = 1; i <= aLength; i++) >+ aSeq[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aHSeq->Value(i))); >+ >+ return aSeq._retn(); >+} >+ >+//============================================================================= >+/*! > * GetShapesOnCylinder > */ > //============================================================================= >@@ -891,6 +934,49 @@ > > //============================================================================= > /*! >+ * GetShapesOnPlaneWithLocationIDs >+ */ >+//============================================================================= >+GEOM::ListOfLong* GEOM_IShapesOperations_i::GetShapesOnPlaneWithLocationIDs >+ (GEOM::GEOM_Object_ptr theShape, >+ const CORBA::Long theShapeType, >+ GEOM::GEOM_Object_ptr theAx1, >+ GEOM::GEOM_Object_ptr thePnt, >+ const GEOM::shape_state theState) >+{ >+ GEOM::ListOfLong_var aSeq = new GEOM::ListOfLong; >+ >+ //Set a not done flag >+ GetOperations()->SetNotDone(); >+ >+ if (theShape == NULL || theAx1 == NULL || thePnt == NULL) return aSeq._retn(); >+ >+ //Get the reference objects >+ Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject >+ (theShape->GetStudyID(), theShape->GetEntry()); >+ Handle(GEOM_Object) anAx1 = GetOperations()->GetEngine()->GetObject >+ (theAx1->GetStudyID(), theAx1->GetEntry()); >+ Handle(GEOM_Object) anPnt = GetOperations()->GetEngine()->GetObject >+ (thePnt->GetStudyID(), thePnt->GetEntry()); >+ >+ if (aShape.IsNull() || anAx1.IsNull() || anPnt.IsNull()) return aSeq._retn(); >+ >+ //Get Shapes On Plane >+ Handle(TColStd_HSequenceOfInteger) aHSeq = >+ GetOperations()->GetShapesOnPlaneWithLocationIDs(aShape, theShapeType, anAx1, anPnt, ShapeState(theState)); >+ if (!GetOperations()->IsDone() || aHSeq.IsNull()) >+ return aSeq._retn(); >+ >+ Standard_Integer aLength = aHSeq->Length(); >+ aSeq->length(aLength); >+ for (Standard_Integer i = 1; i <= aLength; i++) >+ aSeq[i-1] = aHSeq->Value(i); >+ >+ return aSeq._retn(); >+} >+ >+//============================================================================= >+/*! > * GetShapesOnCylinderIDs > */ > //============================================================================= >Index: GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.hh >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.hh,v >retrieving revision 1.10 >retrieving revision 1.10.2.1 >diff -c -u -r1.10 -r1.10.2.1 >--- GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.hh 1 Jun 2006 11:32:35 -0000 1.10 >+++ GEOM_SRC_3.2.2/src/GEOM_I/GEOM_IShapesOperations_i.hh 27 Sep 2006 11:01:37 -0000 1.10.2.1 >@@ -97,6 +97,12 @@ > GEOM::GEOM_Object_ptr theAx1, > GEOM::shape_state theState); > >+ GEOM::ListOfGO* GetShapesOnPlaneWithLocation(GEOM::GEOM_Object_ptr theShape, >+ CORBA::Long theShapeType, >+ GEOM::GEOM_Object_ptr theAx1, >+ GEOM::GEOM_Object_ptr thePnt, >+ GEOM::shape_state theState); >+ > GEOM::ListOfGO* GetShapesOnCylinder (GEOM::GEOM_Object_ptr theShape, > CORBA::Long theShapeType, > GEOM::GEOM_Object_ptr theAxis, >@@ -122,6 +128,12 @@ > GEOM::GEOM_Object_ptr theAx1, > GEOM::shape_state theState); > >+ GEOM::ListOfLong* GetShapesOnPlaneWithLocationIDs (GEOM::GEOM_Object_ptr theShape, >+ CORBA::Long theShapeType, >+ GEOM::GEOM_Object_ptr theAx1, >+ GEOM::GEOM_Object_ptr thePnt, >+ GEOM::shape_state theState); >+ > GEOM::ListOfLong* GetShapesOnCylinderIDs (GEOM::GEOM_Object_ptr theShape, > CORBA::Long theShapeType, > GEOM::GEOM_Object_ptr theAxis, >Index: GEOM_SRC_3.2.2/src/GEOM_I/Makefile.in >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_I/Makefile.in,v >retrieving revision 1.10 >retrieving revision 1.10.2.1 >diff -c -u -r1.10 -r1.10.2.1 >--- GEOM_SRC_3.2.2/src/GEOM_I/Makefile.in 1 Jun 2006 11:32:35 -0000 1.10 >+++ GEOM_SRC_3.2.2/src/GEOM_I/Makefile.in 26 Sep 2006 07:58:38 -0000 1.10.2.1 >@@ -55,7 +55,7 @@ > GEOM_DumpPython.cc > > # SALOME_Component.idl >-LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl >+LIB_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl SALOME_GenericObj.idl > #SALOME_Exception.idl SALOME_GenericObj.idl > > LIB_SERVER_IDL = GEOM_Gen.idl >Index: GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_Spanner.py >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_Spanner.py,v >retrieving revision 1.6 >retrieving revision 1.6.2.1 >diff -c -u -r1.6 -r1.6.2.1 >--- GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_Spanner.py 1 Jun 2006 11:32:36 -0000 1.6 >+++ GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_Spanner.py 20 Oct 2006 12:04:02 -0000 1.6.2.1 >@@ -27,7 +27,7 @@ > > ############# MakeSpanner ############# > >-def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None, hasGUI = 0): >+def MakeSpanner (geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None): > > ### Variables ### > >@@ -355,11 +355,10 @@ > Block_new = geompy.MakeHexa2Faces(Face_g_1, Face_g_1_tr) > id_block_new = geompy.addToStudy(Block_new, "Block New") > >- if isMeshTest == 1: >+ if isMeshTest == 1 and smesh is not None: > > print "##################### Build Mesh #####################" > >- import StdMeshers > > # ---- add a middle block of spanner handle in study > >@@ -380,117 +379,68 @@ > Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1") > Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2") > >- # ---- launch SMESH >+ print "-------------------------- Algorithm and Hypothesis" > >- smeshgui = None >- if hasGUI == 1: >- smeshgui = salome.ImportComponentGUI("SMESH") >- smeshgui.Init(salome.myStudyId) >- >- print "-------------------------- create Hypothesis" >- >- print "-------------------------- NumberOfSegments" >- >- hypNbSeg3 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so") >- hypNbSeg3.SetNumberOfSegments(3) >- print hypNbSeg3.GetName() >- print hypNbSeg3.GetId() >- print hypNbSeg3.GetNumberOfSegments() >- >- if hasGUI == 1: >- idseg = salome.ObjectToID(hypNbSeg3) >- smeshgui.SetName(idseg, "NumberOfSegments_3"); >- >- print "-------------------------- LocalLength" >- >- hypLen1 = smesh.CreateHypothesis("LocalLength", "libStdMeshersEngine.so") >- hypLen1.SetLength(10) >- print hypLen1.GetName() >- print hypLen1.GetId() >- print hypLen1.GetLength() >+ print "---- Init a Mesh with the Spanner" > >- if hasGUI == 1: >- idlength = salome.ObjectToID(hypLen1) >- smeshgui.SetName(idlength, "Local_Length_10"); >- >- print "-------------------------- Propagation" >- >- hypProp = smesh.CreateHypothesis("Propagation", "libStdMeshersEngine.so") >- print hypProp.GetName() >- print hypProp.GetId() >- >- if hasGUI == 1: >- idprop = salome.ObjectToID(hypProp) >- smeshgui.SetName(idprop, "Propagation hypothesis"); >- >- #print "-------------------------- NumberOfSegments" >- # >- #hypNbSeg15 = smesh.CreateHypothesis("NumberOfSegments", "libStdMeshersEngine.so") >- #hypNbSeg15.SetNumberOfSegments(15) >- #print hypNbSeg15.GetName() >- #print hypNbSeg15.GetId() >- #print hypNbSeg15.GetNumberOfSegments() >- # >- #if hasGUI == 1: >- # idseg15 = salome.ObjectToID(hypNbSeg15) >- # smeshgui.SetName(idseg15, "NumberOfSegments_15"); >+ mesh = smesh.Mesh(Spanner, "Meshed Spanner") > >- print "-------------------------- Regular_1D" >+ print "-------------------------- add hypothesis to Spanner" > >- algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so") >+ print "-------------------------- NumberOfSegments" >+ algoReg = mesh.Segment() > listHyp = algoReg.GetCompatibleHypothesis() > for hyp in listHyp: >- print hyp >+ print hyp > print algoReg.GetName() > print algoReg.GetId() >- >- if hasGUI == 1: >- idreg = salome.ObjectToID(algoReg) >- smeshgui.SetName(idreg, "Regular_1D"); >+ algoReg.SetName("Regular_1D") >+ >+ >+ hypNbSeg3 = algoReg.NumberOfSegments(3) >+ print hypNbSeg3.GetName() >+ print hypNbSeg3.GetId() >+ print hypNbSeg3.GetNumberOfSegments() >+ smesh.SetName(hypNbSeg3, "NumberOfSegments_3") > > print "-------------------------- Quadrangle_2D" > >- algoQuad = smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so") >+ algoQuad = mesh.Quadrangle() > listHyp = algoQuad.GetCompatibleHypothesis() > for hyp in listHyp: > print hyp > print algoQuad.GetName() > print algoQuad.GetId() >- >- if hasGUI == 1: >- idquad = salome.ObjectToID(algoQuad) >- smeshgui.SetName(idquad, "Quadrangle_2D"); >- >- print "---- Init a Mesh with the Spanner" >- >- mesh = smesh.CreateMesh(Spanner) >- if hasGUI == 1: >- idmesh = salome.ObjectToID(mesh) >- smeshgui.SetName(idmesh, "Meshed Spanner"); >- >- print "-------------------------- add hypothesis to Spanner" >- >- mesh.AddHypothesis(Spanner, algoReg) >- mesh.AddHypothesis(Spanner, hypNbSeg3) >- mesh.AddHypothesis(Spanner, algoQuad) >+ algoQuad.SetName("Quadrangle_2D") > > print "-------------------------- add hypothesis to the Middle Block" >- >- submesh_bl = mesh.GetSubMesh(BlockMh, "SubMesh Middle Block") >- mesh.AddHypothesis(BlockMh, hypLen1) >+ >+ print "-------------------------- LocalLength" >+ algoRegMb = mesh.Segment(BlockMh) >+ hypLen1 = algoRegMb.LocalLength(10) >+ print hypLen1.GetName() >+ print hypLen1.GetId() >+ print hypLen1.GetLength() >+ smesh.SetName(hypLen1, "Local_Length_10") > > print "-------------------------- add hypothesis to the long edges of the Top Face of the Middle Block" > >- submesh_e1 = mesh.GetSubMesh(Edge1, "SubMesh Edge 1 of Top Face") >- mesh.AddHypothesis(Edge1, hypProp) >- #mesh.AddHypothesis(Edge1, hypNbSeg15) >- >- submesh_e2 = mesh.GetSubMesh(Edge2, "SubMesh Edge 2 of Top Face") >- mesh.AddHypothesis(Edge2, hypProp) >- #mesh.AddHypothesis(Edge2, hypNbSeg15) >- >+ algoRegE1 = mesh.Segment(Edge1) >+ hypPropE1 = algoRegE1.Propagation() >+ print hypPropE1.GetName() >+ print hypPropE1.GetId() >+ smesh.SetName(hypPropE1, "Propagation hypothesis") >+ smesh.SetName(algoRegE1.GetSubMesh(), "SubMesh Edge 1 of Top Face") >+ >+ algoRegE2 = mesh.Segment(Edge2) >+ hypPropE2 = algoRegE2.Propagation() >+ print hypPropE2.GetName() >+ print hypPropE2.GetId() >+ smesh.SetName(hypPropE2, "Propagation hypothesis") >+ smesh.SetName(algoRegE2.GetSubMesh(), "SubMesh Edge 2 of Top Face") >+ > print "-------------------------- compute the mesh" >- smesh.Compute(mesh, Spanner) >+ mesh.Compute() > > print "Information about the Mesh:" > print "Number of nodes : ", mesh.NbNodes() >Index: GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_TestOthers.py >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_TestOthers.py,v >retrieving revision 1.14 >retrieving revision 1.14.2.1 >diff -c -u -r1.14 -r1.14.2.1 >--- GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_TestOthers.py 1 Jun 2006 11:32:36 -0000 1.14 >+++ GEOM_SRC_3.2.2/src/GEOM_SWIG/GEOM_TestOthers.py 27 Sep 2006 11:04:58 -0000 1.14.2.1 >@@ -303,6 +303,7 @@ > v_n0p = geompy.MakeVectorDXDYDZ(-1, 0, 1) > v_pp0 = geompy.MakeVectorDXDYDZ( 1, 1, 0) > v_np0 = geompy.MakeVectorDXDYDZ(-1, 1, 0) >+ v_0n0 = geompy.MakeVectorDXDYDZ( 0, -1, 0) > > pln_0pp = geompy.MakePlane(p0, v_0pp, 300) > pln_0np = geompy.MakePlane(p0, v_0np, 300) >@@ -418,6 +419,20 @@ > geompy.UnionIDs(faces_above, faces_above_pln_ids) > geompy.addToStudy(faces_above, "Group of faces above Plane (N = (0, 1, 1))") > >+ # GetShapesOnPlaneWithLocation >+ Loc = geompy.MakeVertex(0, -50, 0) >+ edges_on_pln = geompy.GetShapesOnPlaneWithLocation(blocksComp, geompy.ShapeType["EDGE"], >+ v_0n0, Loc, geompy.GEOM.ST_ON) >+ for edge_i in edges_on_pln: >+ geompy.addToStudy(edge_i, "Edge on Plane (N = (0, -1, 0) & Location = (0, -50, 0)") >+ >+ # GetShapesOnPlaneWithLocationIDs >+ edges_on_pln_ids = geompy.GetShapesOnPlaneWithLocationIDs(blocksComp, geompy.ShapeType["EDGE"], >+ v_0n0, Loc, geompy.GEOM.ST_ON) >+ group_edges_on_pln = geompy.CreateGroup(blocksComp, geompy.ShapeType["EDGE"]) >+ geompy.UnionIDs(group_edges_on_pln, edges_on_pln_ids) >+ geompy.addToStudy(group_edges_on_pln, "Group of edges on Plane (N = (0, -1, 0) & Location = (0, -50, 0))") >+ > # GetShapesOnCylinder > edges_out_cyl = geompy.GetShapesOnCylinder(blocksComp, geompy.ShapeType["EDGE"], > vy, 55, geompy.GEOM.ST_OUT) >Index: GEOM_SRC_3.2.2/src/GEOM_SWIG/geompy.py >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/GEOM_SWIG/geompy.py,v >retrieving revision 1.24.2.9 >retrieving revision 1.24.2.10 >diff -c -u -r1.24.2.9 -r1.24.2.10 >--- GEOM_SRC_3.2.2/src/GEOM_SWIG/geompy.py 7 Sep 2006 06:33:53 -0000 1.24.2.9 >+++ GEOM_SRC_3.2.2/src/GEOM_SWIG/geompy.py 27 Sep 2006 11:04:58 -0000 1.24.2.10 >@@ -744,7 +744,7 @@ > return anObj > > ## Create a face on the given wire. >-# @param theWire Wire to build the face on. >+# @param theWire closed Wire or Edge to build the face on. > # @param isPlanarWanted If TRUE, only planar face will be built. > # If impossible, NULL object will be returned. > # @return New GEOM_Object, containing the created face. >@@ -757,7 +757,7 @@ > return anObj > > ## Create a face on the given wires set. >-# @param theWires List of wires to build the face on. >+# @param theWires List of closed wires or edges to build the face on. > # @param isPlanarWanted If TRUE, only planar face will be built. > # If impossible, NULL object will be returned. > # @return New GEOM_Object, containing the created face. >@@ -901,6 +901,33 @@ > return aList > > ## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively >+# the specified plane by the certain way, defined through \a theState parameter. >+# @param theShape Shape to find sub-shapes of. >+# @param theShapeType Type of sub-shapes to be retrieved. >+# @param theAx1 Vector (or line, or linear edge), specifying normal >+# direction of the plane to find shapes on. >+# @param thePnt Point specifying location of the plane to find shapes on. >+# @param theState The state of the subshapes to find. It can be one of >+# ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN. >+# @return List of all found sub-shapes. >+# >+# Example: see GEOM_TestOthers.py >+def GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState): >+ aList = ShapesOp.GetShapesOnPlaneWithLocation(theShape, theShapeType, theAx1, thePnt, theState) >+ if ShapesOp.IsDone() == 0: >+ print "GetShapesOnPlaneWithLocation : ", ShapesOp.GetErrorCode() >+ return aList >+ >+## Works like the above method, but returns list of sub-shapes indices >+# >+# Example: see GEOM_TestOthers.py >+def GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState): >+ aList = ShapesOp.GetShapesOnPlaneWithLocationIDs(theShape, theShapeType, theAx1, thePnt, theState) >+ if ShapesOp.IsDone() == 0: >+ print "GetShapesOnPlaneWithLocationIDs : ", ShapesOp.GetErrorCode() >+ return aList >+ >+## Find in \a theShape all sub-shapes of type \a theShapeType, situated relatively > # the specified cylinder by the certain way, defined through \a theState parameter. > # @param theShape Shape to find sub-shapes of. > # @param theShapeType Type of sub-shapes to be retrieved. >Index: GEOM_SRC_3.2.2/src/NMTTools/NMTTools_DEProcessor.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/NMTTools/NMTTools_DEProcessor.cxx,v >retrieving revision 1.4 >retrieving revision 1.4.2.1 >diff -c -u -r1.4 -r1.4.2.1 >--- GEOM_SRC_3.2.2/src/NMTTools/NMTTools_DEProcessor.cxx 1 Jun 2006 11:32:36 -0000 1.4 >+++ GEOM_SRC_3.2.2/src/NMTTools/NMTTools_DEProcessor.cxx 3 Oct 2006 08:52:10 -0000 1.4.2.1 >@@ -137,14 +137,14 @@ > aNb=myDS->NumberOfShapesOfTheObject(); > // > for (i=1; i<=aNb; i++) { >- const TopoDS_Shape& aF=myDS->Shape(i); >+ const TopoDS_Shape aF=myDS->Shape(i); > if (aF.ShapeType()==TopAbs_FACE) { > TopExp::MapShapesAndAncestors (aF, TopAbs_EDGE, TopAbs_FACE, aMEF); > } > } > // > for (i=1; i<=aNb; i++) { >- const TopoDS_Shape& aS=myDS->Shape(i); >+ const TopoDS_Shape aS=myDS->Shape(i); > if (aS.ShapeType()==TopAbs_EDGE) { > const TopoDS_Edge& aE=TopoDS::Edge(aS); > >@@ -306,8 +306,8 @@ > // Clear aPaveSet, aSplitEdges > aPaveSet.ChangeSet().Clear(); > // >- const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED)); >- const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD)); >+ const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED)); >+ const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD)); > // > // 2D Curve of degenerated edge on the face aDF > Handle(Geom2d_Curve) aC2DDE=BRep_Tool::CurveOnSurface(aDE, aDF, aTD1, aTD2); >@@ -333,7 +333,7 @@ > for (; anIt.More(); anIt.Next()) { > const BOPTools_PaveBlock& aPB=anIt.Value(); > nE=aPB.Edge(); >- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); >+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); > > Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2); > // >@@ -427,8 +427,8 @@ > TopoDS_Edge aE, aESplit; > TopoDS_Vertex aV1, aV2; > >- const TopoDS_Edge& aDE=TopoDS::Edge(myDS->Shape(nED)); >- const TopoDS_Face& aDF=TopoDS::Face(myDS->Shape(nFD)); >+ const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED)); >+ const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD)); > > BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges); > >Index: GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_1.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_1.cxx,v >retrieving revision 1.4 >retrieving revision 1.4.2.1 >diff -c -u -r1.4 -r1.4.2.1 >--- GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_1.cxx 1 Jun 2006 11:32:39 -0000 1.4 >+++ GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_1.cxx 3 Oct 2006 08:52:10 -0000 1.4.2.1 >@@ -78,8 +78,8 @@ > aWith=n2; > SortTypes(aWhat, aWith); > if (!bJustAddInterference) { >- const TopoDS_Shape& aS1=myDS->GetShape(aWhat); >- const TopoDS_Shape& aS2=myDS->GetShape(aWith); >+ const TopoDS_Shape aS1=myDS->GetShape(aWhat); >+ const TopoDS_Shape aS2=myDS->GetShape(aWith); > // > const TopoDS_Vertex& aV1=TopoDS::Vertex(aS1); > const TopoDS_Vertex& aV2=TopoDS::Vertex(aS2); >@@ -127,7 +127,7 @@ > aNbV=aChain.Extent(); > for (j=1; j<=aNbV; ++j) { > aIdV=aChain(j); >- const TopoDS_Shape& aV=myDS->Shape(aIdV); >+ const TopoDS_Shape aV=myDS->Shape(aIdV); > if (!aM.Contains(aV)) { > aM.Add(aV); > aLV.Append(aV); >Index: GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_4.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_4.cxx,v >retrieving revision 1.5 >retrieving revision 1.5.2.1 >diff -c -u -r1.5 -r1.5.2.1 >--- GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_4.cxx 1 Jun 2006 11:32:39 -0000 1.5 >+++ GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_4.cxx 3 Oct 2006 08:52:10 -0000 1.5.2.1 >@@ -145,8 +145,8 @@ > continue; > } > // >- const TopoDS_Edge& aE1=TopoDS::Edge(myDS->Shape(nE1)); >- const TopoDS_Edge& aE2=TopoDS::Edge(myDS->Shape(nE2)); >+ const TopoDS_Edge aE1=TopoDS::Edge(myDS->Shape(nE1)); >+ const TopoDS_Edge aE2=TopoDS::Edge(myDS->Shape(nE2)); > // > if (BRep_Tool::Degenerated(aE1) || BRep_Tool::Degenerated(aE2)){ > continue; >@@ -468,7 +468,7 @@ > aNbEdges=aME.Extent(); > for (j=1; j<=aNbEdges; ++j) { > nE=aME(j); >- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); >+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); > // > aFlag=myContext.ComputeVE (aNewVertex, aE, aT); > // >@@ -775,10 +775,10 @@ > Standard_Real d1121, d1122, d1222, d1221, aTolSum, aCoeff=1.05; > gp_Pnt aP11, aP12, aP21, aP22; > >- const TopoDS_Vertex& aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index())); >- const TopoDS_Vertex& aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index())); >- const TopoDS_Vertex& aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index())); >- const TopoDS_Vertex& aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index())); >+ const TopoDS_Vertex aV11=TopoDS::Vertex(myDS->Shape(aPB1.Pave1().Index())); >+ const TopoDS_Vertex aV12=TopoDS::Vertex(myDS->Shape(aPB1.Pave2().Index())); >+ const TopoDS_Vertex aV21=TopoDS::Vertex(myDS->Shape(aPB2.Pave1().Index())); >+ const TopoDS_Vertex aV22=TopoDS::Vertex(myDS->Shape(aPB2.Pave2().Index())); > > aTolV11=BRep_Tool::Tolerance(aV11); > aTolV12=BRep_Tool::Tolerance(aV12); >Index: GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_5.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_5.cxx,v >retrieving revision 1.4 >retrieving revision 1.4.2.1 >diff -c -u -r1.4 -r1.4.2.1 >--- GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_5.cxx 1 Jun 2006 11:32:39 -0000 1.4 >+++ GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_5.cxx 3 Oct 2006 08:52:10 -0000 1.4.2.1 >@@ -138,13 +138,13 @@ > continue; > } > // Edge >- const TopoDS_Edge& aE=TopoDS::Edge(myDS->GetShape(nE)); >+ const TopoDS_Edge aE=TopoDS::Edge(myDS->GetShape(nE)); > if (BRep_Tool::Degenerated(aE)){ > continue; > } > aTolE=BRep_Tool::Tolerance(aE); > // Face >- const TopoDS_Face& aF=TopoDS::Face(myDS->GetShape(nF)); >+ const TopoDS_Face aF=TopoDS::Face(myDS->GetShape(nF)); > aTolF=BRep_Tool::Tolerance(aF); > const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); > // >@@ -492,7 +492,7 @@ > aNbEdges=aME.Extent(); > for (j=1; j<=aNbEdges; ++j) { > nE=aME(j); >- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); >+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); > // > aFlag=myContext.ComputeVE (aNewVertex, aE, aT); > // >@@ -575,7 +575,7 @@ > aNbV=aMVF.Extent(); > for (i=1; i<=aNbV; ++i) { > nVF=aMVF(i); >- const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); >+ const TopoDS_Vertex aVF=TopoDS::Vertex(myDS->Shape(nVF)); > iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF); > if (!iFlag) { > return nVF; >Index: GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_6.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_6.cxx,v >retrieving revision 1.8 >retrieving revision 1.8.2.1 >diff -c -u -r1.8 -r1.8.2.1 >--- GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_6.cxx 1 Jun 2006 11:32:39 -0000 1.8 >+++ GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_6.cxx 3 Oct 2006 08:52:10 -0000 1.8.2.1 >@@ -165,8 +165,8 @@ > continue; > } > // >- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); >- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); >+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1)); >+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2)); > // > // FF > bToApproxC3d = mySectionAttribute.Approximation(); >@@ -254,8 +254,8 @@ > // > // Faces > aFFi.Indices(nF1, nF2); >- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); >- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); >+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1)); >+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2)); > // > BOPTools_ListOfPaveBlock aLPB, aLPBC; > // >@@ -377,8 +377,8 @@ > // Make Section Edge > TopoDS_Edge aES; > // >- const TopoDS_Vertex& aV1=TopoDS::Vertex(myDS->Shape(nV1)); >- const TopoDS_Vertex& aV2=TopoDS::Vertex(myDS->Shape(nV2)); >+ const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1)); >+ const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2)); > // > BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES); > // >@@ -489,13 +489,13 @@ > for (j=1; j<=aNbSE; ++j) { > const BOPTools_PaveBlock& aPBSE=aMEPB(j); > nV1=aPBSE.Pave1().Index(); >- const TopoDS_Shape& aV1=myDS->Shape(nV1); >+ const TopoDS_Shape aV1=myDS->Shape(nV1); > if (aV1.IsSame(aV)) { > aMNewOld.Add(i, nV1); > break; > } > nV2=aPBSE.Pave2().Index(); >- const TopoDS_Shape& aV2=myDS->Shape(nV2); >+ const TopoDS_Shape aV2=myDS->Shape(nV2); > if (aV2.IsSame(aV)) { > aMNewOld.Add(i, nV2); > break; >@@ -546,9 +546,9 @@ > BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; > // > nV1=aPBSE.Pave1().Index(); >- const TopoDS_Shape& aV1=myDS->Shape(nV1); >+ const TopoDS_Shape aV1=myDS->Shape(nV1); > nV2=aPBSE.Pave2().Index(); >- const TopoDS_Shape& aV2=myDS->Shape(nV2); >+ const TopoDS_Shape aV2=myDS->Shape(nV2); > // > anASSeq.SetNewSuccessor(nV1); > anASSeq.SetNewOrientation(aV1.Orientation()); >@@ -580,8 +580,8 @@ > BOPTools_PaveBlock aPB=aIt.Value(); > // > ////modified by NIZNHY-PKV Thu Jan 26 10:16:36 2006f >- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); >- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); >+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1)); >+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2)); > ////modified by NIZNHY-PKV Thu Jan 26 10:16:39 2006t > // > if (aCBAPI.IsCommonBlock(aPB)) { >@@ -617,13 +617,13 @@ > aT1=aPave1.Param(); > mV1=aPave1.Index(); // index in tDS > nV1=aMNewOld.FindFromKey(mV1); // index in myDS >- const TopoDS_Shape& aV1=myDS->Shape(nV1); >+ const TopoDS_Shape aV1=myDS->Shape(nV1); > // > const BOPTools_Pave& aPave2=aPB.Pave2(); > aT2=aPave2.Param(); > mV2=aPave2.Index(); > nV2=aMNewOld.FindFromKey(mV2); >- const TopoDS_Shape& aV2=myDS->Shape(nV2); >+ const TopoDS_Shape aV2=myDS->Shape(nV2); > // > if (!aMNewOld.Contains(mE)) { > // add new SE to the myDS >@@ -684,8 +684,8 @@ > BOPTools_SSInterference& aFF=aFFs(i); > aFF.Indices(nF1, nF2); > // >- const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); >- const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); >+ const TopoDS_Face aF1=TopoDS::Face(myDS->Shape(nF1)); >+ const TopoDS_Face aF2=TopoDS::Face(myDS->Shape(nF2)); > // > aF1FWD=aF1; > aF1FWD.Orientation(TopAbs_FORWARD); >@@ -699,7 +699,7 @@ > for (; anIt.More(); anIt.Next()) { > const BOPTools_PaveBlock& aPB=anIt.Value(); > nE=aPB.Edge(); >- const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); >+ const TopoDS_Edge aE=TopoDS::Edge(myDS->Shape(nE)); > > BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); > BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); >@@ -768,7 +768,7 @@ > // > //Edge > nE2=aPBR.Edge(); >- const TopoDS_Edge& aE2=TopoDS::Edge(myDS->GetShape(nE2)); >+ const TopoDS_Edge aE2=TopoDS::Edge(myDS->GetShape(nE2)); > // VE > iVM=myContext.ComputeVE(aVM, aE2, aTmp); > // >@@ -799,8 +799,8 @@ > aFFi.Indices(nF1, nF2); > aTolR3D=aFFi.TolR3D(); > // >- const TopoDS_Face& aF1=TopoDS::Face(myDS->GetShape(nF1)); >- const TopoDS_Face& aF2=TopoDS::Face(myDS->GetShape(nF2)); >+ const TopoDS_Face aF1=TopoDS::Face(myDS->GetShape(nF1)); >+ const TopoDS_Face aF2=TopoDS::Face(myDS->GetShape(nF2)); > // > bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D); > if (bVF) { >@@ -850,14 +850,13 @@ > TColStd_ListOfInteger& aTVs=aBC.TechnoVertices(); > aTVs.Append(nV); > } >- > if (bFound1 && !bFound2) { > nV=aPave1.Index(); > aPave.SetIndex(nV); > aPave.SetParam(aT); > aFFiPS.Append(aPave); > // >- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); >+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV)); > BOPTools_Tools::UpdateVertex (aIC, aT, aV); > } > >@@ -867,7 +866,7 @@ > aPave.SetParam(aT); > aCPS.Append(aPave); > // >- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); >+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV)); > BOPTools_Tools::UpdateVertex (aIC, aT, aV); > } > } >@@ -888,7 +887,7 @@ > for (; anIt.More(); anIt.Next()) { > const BOPTools_Pave& aPC=anIt.Value(); > nV=aPC.Index(); >- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); >+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV)); > bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV); > if (bIsVertex) { > aPave=aPC; >@@ -974,7 +973,7 @@ > const BOPTools_Pave& aPave=anIt.Value(); > // > nV=aPave.Index(); >- const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); >+ const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV)); > // > Bnd_Box aBBV; > BRepBndLib::Add(aV, aBBV); >Index: GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_7.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_7.cxx,v >retrieving revision 1.4 >retrieving revision 1.4.2.1 >diff -c -u -r1.4 -r1.4.2.1 >--- GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_7.cxx 1 Jun 2006 11:32:39 -0000 1.4 >+++ GEOM_SRC_3.2.2/src/NMTTools/NMTTools_PaveFiller_7.cxx 3 Oct 2006 08:52:10 -0000 1.4.2.1 >@@ -236,7 +236,7 @@ > for(i=1; i<=aNbF; ++i) { > nF=aMF(i); > iRankF=myDS->Rank(nF); >- const TopoDS_Shape& aF=myDS->Shape(nF); >+ const TopoDS_Shape aF=myDS->Shape(nF); > aExp.Init(aF, TopAbs_EDGE); > for(; aExp.More(); aExp.Next()) { > aE=TopoDS::Edge(aExp.Current()); >Index: GEOM_SRC_3.2.2/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx >=================================================================== >RCS file: /home/server/cvs/GEOM/GEOM_SRC_3.2.2/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx,v >retrieving revision 1.7.2.1 >retrieving revision 1.7.2.2 >diff -c -u -r1.7.2.1 -r1.7.2.2 >--- GEOM_SRC_3.2.2/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx 27 Jun 2006 10:55:20 -0000 1.7.2.1 >+++ GEOM_SRC_3.2.2/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx 20 Sep 2006 13:04:23 -0000 1.7.2.2 >@@ -270,7 +270,18 @@ > //================================================================================= > bool TransformationGUI_OffsetDlg::isValid( QString& msg ) > { >- return !(myObjects.length() == 0); >+ //return !(myObjects.length() == 0); >+ if (myObjects.length() == 0) return false; >+ >+ for (int i = 0; i < myObjects.length(); i++) >+ { >+ GEOM::shape_type aType = myObjects[i]->GetShapeType(); >+ if( aType != GEOM::FACE && aType != GEOM::SHELL && aType != GEOM::SOLID ){ >+ msg = tr("ERROR_SHAPE_TYPE"); >+ return false; >+ } >+ } >+ return true; > } > > >@@ -288,6 +299,7 @@ > if (GroupPoints->CheckButton1->isChecked() || IsPreview()) > for (int i = 0; i < myObjects.length(); i++) > { >+ > anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShapeCopy( myObjects[i], GetOffset() ); > if ( !anObj->_is_nil() ) > objects.push_back( anObj._retn() );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 155974
:
102571
|
102572
|
102573
|
114639
|
114650
|
114651
|
114653
|
114655
|
114657
|
114659
|
114660
|
114662
|
114664
|
120027
|
120226
|
131980
|
131981
|
131983
|
137331
|
137336
|
137338
|
137719
|
138048
|
138578
|
138580
|
138581
|
138582
|
138583
|
138584
|
138586
|
138588
|
138877
|
138896
|
138925
|
138960
|
139043
|
139045
|
139956
|
139958
|
139964
|
139965
|
139973
|
140002
|
140005
|
140007
|
140030
|
140032
|
140064
|
140066
|
140068
|
140071
|
140073
|
140086
|
140088
|
140280
|
140283
|
140301
|
140303
|
140366
|
140368
|
140373
|
140375
|
140378
|
140385
|
140386
|
140455
|
140466
|
140468
|
140472
|
140474
|
140637
|
141242
|
141243
|
141250
|
141252
|
141254
|
141256
|
141257
|
141462
|
141473
|
141474
|
141475
|
141565
|
141572
|
142892
|
142894
|
142905
|
143984
|
143986
|
144011
|
144061
|
144063
|
144084
|
144086
|
144089
|
144091
|
144093
|
144098
|
144105
|
144107
|
144117
|
144119
|
144182
|
144184
|
144185
|
144187
|
144188
|
144198
|
144223
|
144305
|
144306
|
144308
|
144310
|
144311
|
144313
|
144314
|
144316
|
144318
|
144320
|
144347
|
144348
|
144350
|
144352
|
144353
|
144354
|
144356
|
144357
|
144557
|
145883
|
145885
|
145887
|
146138
|
146414
|
147142
|
147146
|
148604
|
148606
|
148607
|
148609
|
148611
|
148613
|
148615
|
148617
|
148618
|
148619
|
150326
|
151031
|
151032
|
151034
|
151036
|
151038
|
151039
|
151040
|
151042
|
151044
|
151045
|
152339
|
152341
|
152343
|
152345
|
152347
|
152349
|
152351
|
152353
|
152355
|
152357
|
152359
|
152361
|
152363
|
152365
|
152369
|
152371
|
152979
|
153067
|
154323
|
154325
|
154327
|
154329
|
154331
|
154333
|
154335
|
158563
|
161347
|
163275
|
163841
|
163842
|
164412
|
164611
|
168552
|
168560
|
168624
|
168626
|
168724
|
168726
|
168734
|
168736
|
178432
|
178434
|
178739
|
179160
|
179161
|
179162
|
179237
|
179627
|
179628
|
183321
|
183323
|
183324
|
183325
|
183327
|
183329
|
183347
|
183348
|
189058
|
189059
|
189061
|
200799
|
200800
|
200802
|
200803
|
200805
|
200807
|
200809
|
200811
|
200812
|
200813
|
200815
|
200816
|
200818
|
200820
|
200821
|
200823
|
200825
|
204604
|
204699
|
204980
|
205339
|
223869
|
223871
|
232539
|
234261
|
253803
|
253805
|
254743
|
254751
|
254755
|
257260
|
257261
|
268839
|
268883
|
278009
|
286253
|
286255
|
286257
|
286259
|
286261
|
286263
|
286265
|
286267
|
286269
|
286271
|
286273
|
323878