From bff7674ef537374729c36187d79b0e2039450c78 Mon Sep 17 00:00:00 2001 From: skv Date: Tue, 28 Oct 2014 13:19:15 +0300 Subject: [PATCH] 0022754: [EDF] Surface of a face --- doc/salome/examples/CMakeLists.txt | 1 + doc/salome/examples/basic_geom_objs_ex10.py | 37 +++ .../gui/GEOM/images/surface_from_face1.png | Bin 0 -> 19836 bytes .../GEOM/images/surface_from_face_example.png | Bin 0 -> 1300 bytes .../gui/GEOM/input/creating_basic_go.doc | 1 + .../GEOM/input/creating_surface_from_face.doc | 27 +++ .../gui/GEOM/input/tui_basic_geom_objs.doc | 4 + idl/GEOM_Gen.idl | 11 + resources/CMakeLists.txt | 1 + resources/facetosurface.png | Bin 0 -> 643 bytes src/EntityGUI/CMakeLists.txt | 3 + src/EntityGUI/EntityGUI.cxx | 4 + src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx | 225 ++++++++++++++++++ src/EntityGUI/EntityGUI_SurfFromFaceDlg.h | 75 ++++++ src/GEOMGUI/GEOM_images.ts | 8 + src/GEOMGUI/GEOM_msg_en.ts | 27 +++ src/GEOMGUI/GeometryGUI.cxx | 5 +- src/GEOMGUI/GeometryGUI_Operations.h | 1 + src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 61 +++++ src/GEOMImpl/GEOMImpl_IShapesOperations.hxx | 3 + src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 49 ++++ src/GEOMImpl/GEOMImpl_Types.hxx | 1 + src/GEOM_I/GEOM_IShapesOperations_i.cc | 30 +++ src/GEOM_I/GEOM_IShapesOperations_i.hh | 2 + src/GEOM_SWIG/GEOM_TestAll.py | 2 + src/GEOM_SWIG/geomBuilder.py | 33 +++ 26 files changed, 610 insertions(+), 1 deletion(-) create mode 100644 doc/salome/examples/basic_geom_objs_ex10.py create mode 100644 doc/salome/gui/GEOM/images/surface_from_face1.png create mode 100644 doc/salome/gui/GEOM/images/surface_from_face_example.png create mode 100644 doc/salome/gui/GEOM/input/creating_surface_from_face.doc create mode 100644 resources/facetosurface.png create mode 100644 src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx create mode 100644 src/EntityGUI/EntityGUI_SurfFromFaceDlg.h diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 67721de68..76c3883e1 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -37,6 +37,7 @@ SET(GOOD_TESTS basic_geom_objs_ex07.py basic_geom_objs_ex08.py basic_geom_objs_ex09.py + basic_geom_objs_ex10.py basic_operations_ex01.py basic_operations_ex02.py basic_operations_ex03.py diff --git a/doc/salome/examples/basic_geom_objs_ex10.py b/doc/salome/examples/basic_geom_objs_ex10.py new file mode 100644 index 000000000..f9f7f0165 --- /dev/null +++ b/doc/salome/examples/basic_geom_objs_ex10.py @@ -0,0 +1,37 @@ +# Creation of a Surface From Face + +import salome +salome.salome_init() +import GEOM +from salome.geom import geomBuilder +geompy = geomBuilder.New(salome.myStudy) +import math +import SALOMEDS + +# Create Vertices, Edges, Wire, Face and Disk +Vertex_1 = geompy.MakeVertex(0, 0, 0) +Vertex_2 = geompy.MakeVertex(100, 0, 0) +Vertex_3 = geompy.MakeVertex(50, 100, 0) +Edge_1 = geompy.MakeEdge(Vertex_1, Vertex_2) +Edge_2 = geompy.MakeEdge(Vertex_2, Vertex_3) +Edge_3 = geompy.MakeEdge(Vertex_3, Vertex_1) +Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3]) +Face_1 = geompy.MakeFace(Wire_1, True) +Disk_1 = geompy.MakeDiskR(100, 1) + +# Create Surfaces From Faces. +SurfaceFromFace_1 = geompy.MakeSurfaceFromFace(Face_1) +SurfaceFromFace_2 = geompy.MakeSurfaceFromFace(Disk_1) + +#Add created object to study +geompy.addToStudy( Vertex_1, "Vertex_1" ) +geompy.addToStudy( Vertex_2, "Vertex_2" ) +geompy.addToStudy( Vertex_3, "Vertex_3" ) +geompy.addToStudy( Edge_1, "Edge_1" ) +geompy.addToStudy( Edge_2, "Edge_2" ) +geompy.addToStudy( Edge_3, "Edge_3" ) +geompy.addToStudy( Wire_1, "Wire_1" ) +geompy.addToStudy( Face_1, "Face_1" ) +geompy.addToStudy( Disk_1, "Disk_1" ) +geompy.addToStudy( SurfaceFromFace_1, "SurfaceFromFace_1" ) +geompy.addToStudy( SurfaceFromFace_2, "SurfaceFromFace_2" ) diff --git a/doc/salome/gui/GEOM/images/surface_from_face1.png b/doc/salome/gui/GEOM/images/surface_from_face1.png new file mode 100644 index 0000000000000000000000000000000000000000..ba039fd9181f76fd8bea881c8ea2c081033b695b GIT binary patch literal 19836 zcmb5W1z1(vzBi1bppEuAwZr~Ail#>+0$(CJOUa2L zE+7%3;h|~sWh{fQ2%N<DDd6OpGv=&?|;g)kZ5`OZh*6o^K6WD?UyO!xkhqSj!6)% zxy9P=NvLBF)!w8fB$=zZpHq?*gM9jlBCbhljh`PnRvX$UWZ#sCuDfqub^AMwrb!pt z7o1KJbbF43D_IOm=pxU^ZHF5pbX9W@(2@%{Y!<{JqR+_NQR@=!sUdLwX$r8zcMae4 zF~FHEuL97|WPIRn2<=uJ3AY8T&>1?@UwP=x8#j2lEN|6d**n;VOGB3zofcm*35gMk za}X|iV<0u}UghzSCDODwRy_?l)wrK1&tZH&KsqGs>DJLHK2%{j?qA zvq#rnE?KI5rr6lHM_o0-)5k5bx416%G36sz?+Yl`y_anqb|ZwZQdR>-iEj-B!b^{1bHW9_y6m;$mM~doI5UpDN^($1DdJ{TPI<&ADTlv*Op=nik(JetgJ1 z*0#;6oo7Hhm(!?vjjoO-fr%M8-RMINDIgRU7KZTWTpo43v)YrVe9Om~x(JzW14wP6yYMQ)CusID;@t1n zFOO-EetxLXeVe7~l>H&~wQpV4XKTz%Lz9>#l3}i}AVI8|`?>z-4w&qIu1TDj;W$j^4r(^JjIZ)joh)^x(fmlv}m!OiV^ zyvIQKVw@s;JjcR|3$8)@Q1QVIZR5du{n6{sUDs?Dx9E_%%GK*LZQsi+o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8^q%kQmY~|KNtx~ceT71)D&p8mp$aZxhf=m5WOh45!W#S)yag2~<1L zWpdMzkgT8yF6S=&1!c_uS3p8{fv5RopVB`wj{CtP^w4YRU%#i?l<+RPHp_b> zG~PjR-B{rJ%h^LFcHgx!S-1zJq6%sGYAo(+pLzYv~jB`}`GeAgSS!u4(ioEeuwq<~5kOf$7EF3~ZZG;4}#(-oDbD@#_g_@27t zkrgzJBWN-ZEfX@)^j2Q!8L8yqdn#zctP;)?O(09i5vT&FT1Rk+S}KY_s^*EQJbDK| z=@e^fE{$5fTG7LI+oV)4&FM;~pPJUio16T+ad67g$}3BX*C?2F7O(ldN^NfP*~Myw zeWFW%thwPAmmCaPtoE2Mt;Oi-3eVJ4fs-|YduN3#lQQiD3Y`3qDrb88`Ahc8S5}-9 zNR@l~`Fx6OV literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/input/creating_basic_go.doc b/doc/salome/gui/GEOM/input/creating_basic_go.doc index efdff9511..cebd3be5c 100644 --- a/doc/salome/gui/GEOM/input/creating_basic_go.doc +++ b/doc/salome/gui/GEOM/input/creating_basic_go.doc @@ -16,6 +16,7 @@ geometrical objects as:
  • \subpage create_sketcher_page
  • \subpage create_3dsketcher_page
  • \subpage create_polyline_page
  • +
  • \subpage create_surface_from_face_page
  • \subpage create_vector_page
  • \subpage create_plane_page
  • \subpage create_lcs_page
  • diff --git a/doc/salome/gui/GEOM/input/creating_surface_from_face.doc b/doc/salome/gui/GEOM/input/creating_surface_from_face.doc new file mode 100644 index 000000000..6034ed5e3 --- /dev/null +++ b/doc/salome/gui/GEOM/input/creating_surface_from_face.doc @@ -0,0 +1,27 @@ +/*! + +\page create_surface_from_face_page Surface From Face + +To create a Surface From Face in the Main Menu select New Entity - > Basic - > Surface From Face + +\n This function takes some face as input parameter and creates new +GEOM_Object, i.e. topological shape by extracting underlying surface +of the source face and limiting it by the Umin, Umax, Vmin, Vmax +parameters of the source face (in the parametrical space). +\n +\ref restore_presentation_parameters_page "Advanced options". + +\n TUI Command: geompy.MakeSurfaceFromFace(theFace), +where \em theFace the input face. +\n Arguments: Name + Object (Face). + +\image html surface_from_face1.png "Surface From Face" + +\n Example: + +\image html surface_from_face_example.png "Original Face (white) and Created Surface" + +Our TUI Scripts provide you with useful examples of the use of +\ref tui_creation_surface "Surface From Face" creation. + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc index 89be6f64b..2083bcc46 100644 --- a/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc +++ b/doc/salome/gui/GEOM/input/tui_basic_geom_objs.doc @@ -38,4 +38,8 @@

    Creation of a Local Coordinate System

    \tui_script{basic_geom_objs_ex09.py} +\anchor tui_creation_surface +

    Creation of a Surface From Face

    +\tui_script{basic_geom_objs_ex10.py} + */ diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 1440b1dca..72504d151 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -2575,6 +2575,17 @@ module GEOM in double theVMin, in double theVMax); + /*! + * \brief Make a surface from a face. This function takes some face as + * input parameter and creates new GEOM_Object, i.e. topological shape + * by extracting underlying surface of the source face and limiting it + * by the Umin, Umax, Vmin, Vmax parameters of the source face (in the + * parametrical space). + * \param theFace the input face. + * \return a newly created face. + */ + GEOM_Object MakeSurfaceFromFace(in GEOM_Object theFace); + }; // # GEOM_IBlocksOperations: diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index f2e64385a..7a6644562 100755 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -94,6 +94,7 @@ SET( _res_files eraseall.png extruded_boss.png extruded_cut.png + facetosurface.png faceextension.png face_hw.png face_vechw.png diff --git a/resources/facetosurface.png b/resources/facetosurface.png new file mode 100644 index 0000000000000000000000000000000000000000..ecd57cfba0a95b7a52519516c34e0d71bad9fc0a GIT binary patch literal 643 zcmV-}0(||6P)Px#24YJ`L;&0X8vq+GP^?-2000SaNLh0L01FZT01FZU(%pXi00007bV*G`2i^)B z4-OkP^1Pn_00IL^L_t(I%dJ$eZ&P6uJs+u=Mv%~D6UAbN+0s@as9* zpj=&D3To%_(zTp(n6=yJbi3(b)H{Ss5CxHt2_#|iZ;7CUlZ$ccDW_97=WyfSTVD19 zm|`QLI+zKRKY!fWUSQb(9Q6)y{P{H`LGuhC$pb4hm4u?4V7NZ`Kj0`Zd$IWxufDzk z%>#&;WqOk+W)lq81|W%tx9>MY0T7zKoM-o*;OEEVR8&>fg0x}xAV~K=0I&ui=|c$2 z0N_^tIYi-R2toACi6au}pPt0}Tj-|#RVN(M@(sw#yb z5v0G&#B7mr`Ux;jbQ}eeFtWzl%QeP8B76UTyf6W}2pH0f08w&II(q1v;|2BlM#@(A zFt9MGmL!}0TJ}5EH^+tsi?bJ+#z%YC?roHBriSE}?e3zSPC=Weu_($3hTQ{fZ|$d~ zlb=EMr(fUDTiHm;vWKUq0DzN=w~&aUoM30|K{DOK+W7#o%>K#-zWn|Uk~sTwz9<<0 zit;^n)(6RK3m|nXeBvH>vvn6|^YiOJ4gm1($A^@h(kLnIaNKE93t(|uFl)D$@`1f` db>*<^=PzVHUifH!2#Npz002ovPDHLkV1htj9PR)B literal 0 HcmV?d00001 diff --git a/src/EntityGUI/CMakeLists.txt b/src/EntityGUI/CMakeLists.txt index 79668add1..3bb8e56f8 100755 --- a/src/EntityGUI/CMakeLists.txt +++ b/src/EntityGUI/CMakeLists.txt @@ -108,6 +108,7 @@ SET(EntityGUI_HEADERS EntityGUI_PolylineDlg.h EntityGUI_3DSketcherDlg.h EntityGUI_IsolineDlg.h + EntityGUI_SurfFromFaceDlg.h EntityGUI_SubShapeDlg.h EntityGUI_FeatureDetectorDlg.h EntityGUI_PictureImportDlg.h @@ -121,6 +122,7 @@ SET(_moc_HEADERS EntityGUI_PolylineDlg.h EntityGUI_3DSketcherDlg.h EntityGUI_IsolineDlg.h + EntityGUI_SurfFromFaceDlg.h EntityGUI_SubShapeDlg.h EntityGUI_PictureImportDlg.h ${FeatureDetectorDlg_moc_h} @@ -142,6 +144,7 @@ SET(EntityGUI_SOURCES EntityGUI_PolylineDlg.cxx EntityGUI_3DSketcherDlg.cxx EntityGUI_IsolineDlg.cxx + EntityGUI_SurfFromFaceDlg.cxx EntityGUI_SubShapeDlg.cxx EntityGUI_PictureImportDlg.cxx ${FeatureDetectorDlg_Sources} diff --git a/src/EntityGUI/EntityGUI.cxx b/src/EntityGUI/EntityGUI.cxx index 95e5f1565..55d928930 100644 --- a/src/EntityGUI/EntityGUI.cxx +++ b/src/EntityGUI/EntityGUI.cxx @@ -55,6 +55,7 @@ #include "EntityGUI_SketcherDlg.h" // Sketcher #include "EntityGUI_3DSketcherDlg.h" // Sketcher #include "EntityGUI_IsolineDlg.h" // Isoline +#include "EntityGUI_SurfFromFaceDlg.h" // Surface From Face #include "EntityGUI_SubShapeDlg.h" // Method SUBSHAPE #include "EntityGUI_FeatureDetectorDlg.h" // Feature Detection #include "EntityGUI_PictureImportDlg.h" // Import Picture in viewer @@ -106,6 +107,9 @@ bool EntityGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) case GEOMOp::OpIsoline: // ISOLINE aDlg = new EntityGUI_IsolineDlg( getGeometryGUI(), parent ); break; + case GEOMOp::OpSurfaceFromFace: // SURFACE FROM FACE + aDlg = new EntityGUI_SurfFromFaceDlg( getGeometryGUI(), parent ); + break; case GEOMOp::OpExplode: // EXPLODE aDlg = new EntityGUI_SubShapeDlg( getGeometryGUI(), parent ); break; diff --git a/src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx b/src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx new file mode 100644 index 000000000..3d217e4dd --- /dev/null +++ b/src/EntityGUI/EntityGUI_SurfFromFaceDlg.cxx @@ -0,0 +1,225 @@ +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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, or (at your option) any later version. +// +// 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 +// + +// GEOM GEOMGUI : GUI for Geometry component +// File : EntityGUI_SurfFromFaceDlg.cxx + +#include "EntityGUI_SurfFromFaceDlg.h" +#include +#include +#include + +#include +#include +#include +#include + + +//================================================================================= +// class : EntityGUI_SurfFromFaceDlg +// purpose : +//================================================================================= +EntityGUI_SurfFromFaceDlg::EntityGUI_SurfFromFaceDlg + (GeometryGUI *theGeometryGUI, + QWidget *parent, + bool modal, + Qt::WindowFlags fl) + : GEOMBase_Skeleton (theGeometryGUI, parent, modal, fl), + myGroup (0) +{ + QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SURFACE_FROM_FACE"))); + QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); + + setWindowTitle(tr("GEOM_SURF_FROM_FACE_TITLE")); + + /***************************************************************/ + + mainFrame()->GroupConstructors->setTitle(tr("GEOM_SURF_FROM_FACE")); + mainFrame()->RadioButton1->setIcon(image0); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->close(); + + // Construct a group. + myGroup = new DlgRef_1Sel(centralWidget()); + myGroup->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + myGroup->TextLabel1->setText(tr("GEOM_FACE")); + myGroup->PushButton1->setIcon(image1); + myGroup->LineEdit1->setReadOnly(true); + + QVBoxLayout* layout = new QVBoxLayout(centralWidget()); + layout->setMargin(0); layout->setSpacing(6); + layout->addWidget(myGroup); + + setHelpFileName("create_surface_from_face_page.html"); + + Init(); +} + +//================================================================================= +// function : ~EntityGUI_SurfFromFaceDlg() +// purpose : +//================================================================================= +EntityGUI_SurfFromFaceDlg::~EntityGUI_SurfFromFaceDlg() +{ +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void EntityGUI_SurfFromFaceDlg::Init() +{ + initName(tr("GEOM_SURF_FROM_FACE_NAME")); + showOnlyPreviewControl(); + + /* signals and slots connections */ + connect(myGroup->PushButton1, SIGNAL(clicked()), + this, SLOT(SetEditCurrentArgument())); + connect(myGeomGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), + this, SLOT(DeactivateActiveDialog())); + connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), + this, SLOT(ClickOnCancel())); + connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + myEditCurrentArgument = myGroup->LineEdit1; + myGroup->LineEdit1->setReadOnly(true); + SelectionIntoArgument(); +} + +//================================================================================= +// function : SelectionIntoArgument +// purpose : Called when selection is changed +//================================================================================= +void EntityGUI_SurfFromFaceDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText(""); + myFace.nullify(); + + GEOM::GeomObjPtr aSelectedObject = getSelected(TopAbs_FACE); + + if (aSelectedObject) { + myEditCurrentArgument->setText(GEOMBase::GetName(aSelectedObject.get())); + myFace = aSelectedObject; + } + + processPreview(); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void EntityGUI_SurfFromFaceDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if (send == myGroup->PushButton1) { + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + +//================================================================================= +// function : ActivateThisDialog +// purpose : +//================================================================================= +void EntityGUI_SurfFromFaceDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(myGeomGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + SelectionIntoArgument(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void EntityGUI_SurfFromFaceDlg::enterEvent (QEvent*) +{ + if (!mainFrame()->GroupConstructors->isEnabled()) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr EntityGUI_SurfFromFaceDlg::createOperation() +{ + return myGeomGUI->GetGeomGen()->GetIShapesOperations(getStudyId()); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool EntityGUI_SurfFromFaceDlg::isValid (QString& msg) +{ + return myFace; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool EntityGUI_SurfFromFaceDlg::execute (ObjectList& objects) +{ + GEOM::GEOM_IShapesOperations_var anOper = + GEOM::GEOM_IShapesOperations::_narrow(getOperation()); + GEOM::GEOM_Object_var anObj = anOper->MakeSurfaceFromFace(myFace.get()); + + if (!anObj->_is_nil()) { + objects.push_back(anObj._retn()); + } + + return true; +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void EntityGUI_SurfFromFaceDlg::ClickOnOk() +{ + setIsApplyAndClose(true); + + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool EntityGUI_SurfFromFaceDlg::ClickOnApply() +{ + if (!onAccept()) + return false; + + initName(); + + return true; +} diff --git a/src/EntityGUI/EntityGUI_SurfFromFaceDlg.h b/src/EntityGUI/EntityGUI_SurfFromFaceDlg.h new file mode 100644 index 000000000..130a4d284 --- /dev/null +++ b/src/EntityGUI/EntityGUI_SurfFromFaceDlg.h @@ -0,0 +1,75 @@ +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// +// 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, or (at your option) any later version. +// +// 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 +// + +// GEOM GEOMGUI : GUI for Geometry component +// File : EntityGUI_SurfFromFaceDlg.h + +#ifndef ENTITYGUI_SURFFROMFACEDLG_H +#define ENTITYGUI_SURFFROMFACEDLG_H + + +#include + +class DlgRef_1Sel; + +//================================================================================= +// class : EntityGUI_SurfFromFaceDlg +// purpose : +//================================================================================= +class EntityGUI_SurfFromFaceDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + + EntityGUI_SurfFromFaceDlg (GeometryGUI *theGeometryGUI, + QWidget *parent = 0, + bool modal = false, + Qt::WindowFlags fl = 0); + + ~EntityGUI_SurfFromFaceDlg(); + +protected: + + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& ); + +private: + + void Init(); + void enterEvent( QEvent* ); + +private: + + DlgRef_1Sel *myGroup; + GEOM::GeomObjPtr myFace; + +private slots: + + void ClickOnOk(); + bool ClickOnApply(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void ActivateThisDialog(); + +}; + +#endif // ENTITYGUI_SURFFROMFACEDLG_H diff --git a/src/GEOMGUI/GEOM_images.ts b/src/GEOMGUI/GEOM_images.ts index 2e5d49e1e..67ed0460e 100644 --- a/src/GEOMGUI/GEOM_images.ts +++ b/src/GEOMGUI/GEOM_images.ts @@ -819,6 +819,10 @@ ICON_VERTEX_MARKER_13 marker_13.png + + ICON_SURFACE_FROM_FACE + facetosurface.png + ICO_ARC arc.png @@ -1255,6 +1259,10 @@ ICO_ISOLINE_V isoline_v.png + + ICO_SURFACE_FROM_FACE + facetosurface.png + ICO_SOLID build_solid.png diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index 0ec8db329..6f80399af 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -2996,6 +2996,10 @@ Please, select face, shell or solid and try again MEN_ISOLINE Isoline + + MEN_SURFACE_FROM_FACE + Surface From Face + MEN_SOLID Solid @@ -3880,6 +3884,10 @@ Please, select face, shell or solid and try again STB_ISOLINE Create U- or V-Isoline + + STB_SURFACE_FROM_FACE + Create a Surface From Face + STB_SOLID Build a solid @@ -4444,6 +4452,10 @@ Please, select face, shell or solid and try again TOP_ISOLINE Isoline + + TOP_SURFACE_FROM_FACE + Surface From Face + TOP_SOLID Build solid @@ -7053,4 +7065,19 @@ Do you want to create new material? ExtendedFace + + EntityGUI_SurfFromFaceDlg + + GEOM_SURF_FROM_FACE_TITLE + Surface From Face Construction + + + GEOM_SURF_FROM_FACE + Surface From Face + + + GEOM_SURF_FROM_FACE_NAME + SurfaceFromFace + + diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index 76af3e5c6..be77999a9 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -553,6 +553,7 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam ) case GEOMOp::Op3dSketcher: // MENU ENTITY - 3D SKETCHER case GEOMOp::OpIsoline: // MENU BASIC - ISOLINE case GEOMOp::OpExplode: // MENU ENTITY - EXPLODE + case GEOMOp::OpSurfaceFromFace: // MENU ENTITY - SURFACE FROM FACE #ifdef WITH_OPENCV case GEOMOp::OpFeatureDetect: // MENU ENTITY - FEATURE DETECTION #endif @@ -901,6 +902,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( GEOMOp::OpPlane, "PLANE" ); createGeomAction( GEOMOp::OpLCS, "LOCAL_CS" ); createGeomAction( GEOMOp::OpOriginAndVectors, "ORIGIN_AND_VECTORS" ); + createGeomAction( GEOMOp::OpSurfaceFromFace, "SURFACE_FROM_FACE" ); createGeomAction( GEOMOp::OpBox, "BOX" ); createGeomAction( GEOMOp::OpCylinder, "CYLINDER" ); @@ -932,7 +934,6 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( GEOMOp::Op2dSketcher, "SKETCH" ); createGeomAction( GEOMOp::Op3dSketcher, "3DSKETCH" ); - createGeomAction( GEOMOp::OpIsoline, "ISOLINE" ); createGeomAction( GEOMOp::OpExplode, "EXPLODE" ); #ifdef WITH_OPENCV createGeomAction( GEOMOp::OpFeatureDetect,"FEATURE_DETECTION" ); @@ -1111,6 +1112,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( GEOMOp::Op2dPolylineEditor, basicId, -1 ); createMenu( GEOMOp::Op3dSketcher, basicId, -1 ); createMenu( GEOMOp::OpIsoline, basicId, -1 ); + createMenu( GEOMOp::OpSurfaceFromFace, basicId, -1 ); createMenu( separator(), basicId, -1 ); createMenu( GEOMOp::OpVector, basicId, -1 ); createMenu( GEOMOp::OpPlane, basicId, -1 ); @@ -1322,6 +1324,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createTool( GEOMOp::Op2dPolylineEditor, basicTbId ); createTool( GEOMOp::Op3dSketcher, basicTbId ); //rnc createTool( GEOMOp::OpIsoline, basicTbId ); + createTool( GEOMOp::OpSurfaceFromFace, basicTbId ); createTool( GEOMOp::OpPlane, basicTbId ); createTool( GEOMOp::OpLCS, basicTbId ); createTool( GEOMOp::OpOriginAndVectors, basicTbId ); diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h index ac13135cf..9a1e4fd40 100644 --- a/src/GEOMGUI/GeometryGUI_Operations.h +++ b/src/GEOMGUI/GeometryGUI_Operations.h @@ -94,6 +94,7 @@ namespace GEOMOp { OpLCS = 3008, // MENU NEW ENTITY - BASIC - LOCAL COORDINATE SYSTEM OpOriginAndVectors = 3009, // MENU NEW ENTITY - BASIC - ORIGIN AND BASE VECTORS OpIsoline = 3010, // MENU NEW ENTITY - BASIC - ISOLINE + OpSurfaceFromFace = 3011, // MENU NEW ENTITY - BASIC - SURFACE FROM FACE // PrimitiveGUI ----------------//-------------------------------- OpBox = 3100, // MENU NEW ENTITY - PRIMITIVES - BOX OpCylinder = 3101, // MENU NEW ENTITY - PRIMITIVES - CYLINDER diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx index ce0fa360f..a68e3dbc4 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -4921,3 +4921,64 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendFace return aResFace; } + +//======================================================================= +//function : MakeSurfaceFromFace +//purpose : +//======================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSurfaceFromFace + (const Handle(GEOM_Object) &theFace) +{ + SetErrorCode(KO); + + if (theFace.IsNull()) { + return NULL; + } + + //Add a new Face object + Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE); + + //Add a new Vector function + Handle(GEOM_Function) aFunction = + aResFace->AddFunction(GEOMImpl_ShapeDriver::GetID(), SURFACE_FROM_FACE); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) { + return NULL; + } + + GEOMImpl_IShapeExtend aCI (aFunction); + + Handle(GEOM_Function) aFace = theFace->GetLastFunction(); + + if (aFace.IsNull()) { + return NULL; + } + + aCI.SetShape(aFace); + + //Compute the Face value + try { + OCC_CATCH_SIGNALS; + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Shape driver failed"); + + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + + return NULL; + } + + //Make a Python command + GEOM::TPythonDump(aFunction) + << aResFace << " = geompy.MakeSurfaceFromFace(" + << theFace << ")"; + + SetErrorCode(OK); + + return aResFace; +} diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx index 22b3211ec..025646331 100644 --- a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx @@ -396,6 +396,9 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations const Standard_Real theVMin, const Standard_Real theVMax); + Standard_EXPORT Handle(GEOM_Object) + MakeSurfaceFromFace(const Handle(GEOM_Object) &theFace); + private: Handle(GEOM_Object) MakeShape (std::list theShapes, const Standard_Integer theObjectType, diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 868a33bd2..c220237e9 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -603,6 +603,47 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const aShape = ExtendFace(aFace, aSE.GetUMin(), aSE.GetUMax(), aSE.GetVMin(), aSE.GetVMax()); } + } else if (aType == SURFACE_FROM_FACE) { +#ifdef RESULT_TYPE_CHECK + anExpectedType = TopAbs_FACE; +#endif + + GEOMImpl_IShapeExtend aSE (aFunction); + Handle(GEOM_Function) aRefFace = aSE.GetShape(); + TopoDS_Shape aShapeFace = aRefFace->GetValue(); + + if (aShapeFace.ShapeType() == TopAbs_FACE) { + TopoDS_Face aFace = TopoDS::Face(aShapeFace); + Handle(Geom_Surface) aSurface = BRep_Tool::Surface(aFace); + + if (aSurface.IsNull() == Standard_False) { + Handle(Standard_Type) aType = aSurface->DynamicType(); + Standard_Real aU1; + Standard_Real aU2; + Standard_Real aV1; + Standard_Real aV2; + + // Get U, V bounds of the face. + aFace.Orientation(TopAbs_FORWARD); + ShapeAnalysis::GetFaceUVBounds(aFace, aU1, aU2, aV1, aV2); + + // Get the surface of original type + while (aType == STANDARD_TYPE(Geom_RectangularTrimmedSurface)) { + Handle(Geom_RectangularTrimmedSurface) aTrSurface = + Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurface); + + aSurface = aTrSurface->BasisSurface(); + aType = aSurface->DynamicType(); + } + + const Standard_Real aTol = BRep_Tool::Tolerance(aFace); + BRepBuilderAPI_MakeFace aMF(aSurface, aU1, aU2, aV1, aV2, aTol); + + if (aMF.IsDone()) { + aShape = aMF.Shape(); + } + } + } } else { } @@ -1538,6 +1579,14 @@ GetCreationInformation(std::string& theOperationName, AddParam(theParams, "VMax", aSE.GetVMax()); break; } + case SURFACE_FROM_FACE: + { + GEOMImpl_IShapeExtend aSE (function); + + theOperationName = "SURFACE_FROM_FACE"; + AddParam(theParams, "Face", aSE.GetShape()); + break; + } default: return false; } diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx index 293deb108..d79349d39 100644 --- a/src/GEOMImpl/GEOMImpl_Types.hxx +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -306,6 +306,7 @@ #define FACE_FROM_SURFACE 15 #define EDGE_UV 16 #define FACE_UV 17 +#define SURFACE_FROM_FACE 18 #define ARCHIMEDE_TYPE 1 diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc index b2fae9ae4..4e619573c 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.cc +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -2000,3 +2000,33 @@ GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ExtendFace return GetObject(aNewFace); } + +//============================================================================= +/*! + * MakeSurfaceFromFace + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSurfaceFromFace + (GEOM::GEOM_Object_ptr theFace) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the reference object + Handle(GEOM_Object) aFace = GetObjectImpl(theFace); + + if (aFace.IsNull()) { + return aGEOMObject._retn(); + } + + //Get Shapes in place of aShapeWhat + Handle(GEOM_Object) aNewFace = GetOperations()->MakeSurfaceFromFace(aFace); + + if (!GetOperations()->IsDone() || aNewFace.IsNull()) { + return aGEOMObject._retn(); + } + + return GetObject(aNewFace); +} diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.hh b/src/GEOM_I/GEOM_IShapesOperations_i.hh index 72ac7b074..7587a6a2d 100644 --- a/src/GEOM_I/GEOM_IShapesOperations_i.hh +++ b/src/GEOM_I/GEOM_IShapesOperations_i.hh @@ -284,6 +284,8 @@ class GEOM_I_EXPORT GEOM_IShapesOperations_i : CORBA::Double theVMin, CORBA::Double theVMax); + GEOM::GEOM_Object_ptr MakeSurfaceFromFace(GEOM::GEOM_Object_ptr theFace); + ::GEOMImpl_IShapesOperations* GetOperations() { return (::GEOMImpl_IShapesOperations*)GetImpl(); } }; diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py index 9766171a1..cb9a9720a 100644 --- a/src/GEOM_SWIG/GEOM_TestAll.py +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -257,6 +257,7 @@ def TestAll (geompy, math): ProjOnWire = geompy.MakeProjectionOnWire(p0, Wire) ExtEdge = geompy.ExtendEdge(Edge1, -0.3, 1.3) ExtFace = geompy.ExtendFace(Face5, -0.3, 1.3, -0.1, 1.1) + Surface = geompy.MakeSurfaceFromFace(Face5) #IDList for Fillet/Chamfer prism_edges = geompy.ExtractShapes(Prism, geompy.ShapeType["EDGE"], True) @@ -473,6 +474,7 @@ def TestAll (geompy, math): id_ProjOnWire = geompy.addToStudy(ProjOnWire[1], "ProjOnWire") id_ExtEdge = geompy.addToStudy(ExtEdge, "ExtendedEdge") id_ExtFace = geompy.addToStudy(ExtFace, "ExtendedFace") + id_Surface = geompy.addToStudy(Surface, "Surface From Face") id_Fillet = geompy.addToStudy(Fillet, "Fillet") id_Fillet2 = geompy.addToStudy(Fillet2, "Fillet2") diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 46cfb23a9..a50216635 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -5774,6 +5774,39 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen): self._autoPublish(anObj, theName, "face") return anObj + ## This function takes some face as input parameter and creates new + # GEOM_Object, i.e. topological shape by extracting underlying surface + # of the source face and limiting it by the Umin, Umax, Vmin, Vmax + # parameters of the source face (in the parametrical space). + # @param theFace the input face. + # @param theName Object name; when specified, this parameter is used + # for result publication in the study. Otherwise, if automatic + # publication is switched on, default value is used for result name. + # @return New GEOM.GEOM_Object, containing the created face. + # + # @ref tui_creation_surface "Example" + @ManageTransactions("ShapesOp") + def MakeSurfaceFromFace(self, theFace, theName=None): + """ + This function takes some face as input parameter and creates new + GEOM_Object, i.e. topological shape by extracting underlying surface + of the source face and limiting it by the Umin, Umax, Vmin, Vmax + parameters of the source face (in the parametrical space). + + Parameters: + theFace the input face. + theName Object name; when specified, this parameter is used + for result publication in the study. Otherwise, if automatic + publication is switched on, default value is used for result name. + + Returns: + New GEOM.GEOM_Object, containing the created face. + """ + anObj = self.ShapesOp.MakeSurfaceFromFace(theFace) + RaiseIfFailed("MakeSurfaceFromFace", self.ShapesOp) + self._autoPublish(anObj, theName, "surface") + return anObj + # end of l4_obtain ## @} -- 2.39.2