From d3dd282390888d7dc091ba2c2ffe7923bd7458e6 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 1 Dec 2004 10:39:14 +0000 Subject: [PATCH] Merge with version on tag OCC-V2_1_0d --- INSTALL | 4 +- Makefile.in | 49 +- adm_local/unix/make_commence.in | 2 +- bin/VERSION | 2 +- build_configure | 1 - doc/html/INPUT/HTML/GEOM_Gen.html | 262 - doc/html/INPUT/HTML/GEOM_Shape.html | 18 - doc/html/INPUT/doxyfile | 201 - doc/html/INPUT/sources/Application-About.png | Bin 19226 -> 0 bytes doc/html/INPUT/sources/Application-About1.jpg | Bin 14327 -> 0 bytes doc/html/INPUT/sources/application.gif | Bin 2602 -> 0 bytes doc/html/INPUT/sources/application.jpg | Bin 792 -> 0 bytes doc/html/INPUT/sources/bg_salome.gif | Bin 17294 -> 0 bytes doc/html/INPUT/sources/logocorp.gif | Bin 1792 -> 0 bytes doc/html/INPUT/sources/myheader.html | 24 - doc/html/INPUT/sources/occ.gif | Bin 14790 -> 0 bytes doc/html/INPUT/sources/static/doxygen.css | 49 - doc/html/INPUT/sources/static/page2.html | 44 - doc/html/INPUT/sources/static/tree.js | 48 - doc/html/INPUT/sources/static/treeview.js | 505 -- doc/html/Makefile.in | 39 - doc/salome/gui/GEOM/GEOM.log | 363 +- doc/salome/gui/GEOM/blocks.htm | 144 + .../GEOM/changing_displaying_parameters.htm | 6 +- .../files/salome2_sp3_basicgui_functions.htm | 517 +- .../salome2_sp3_booleangui_functions.htm | 223 +- .../files/salome2_sp3_buildgui_functions.htm | 174 +- .../salome2_sp3_displaygui_functions.htm | 69 +- .../salome2_sp3_generationgui_functions.htm | 38 +- .../salome2_sp3_geomtoolsgui_functions.htm | 30 +- .../salome2_sp3_measuregui_functions.htm | 211 +- .../salome2_sp3_operationgui_functions.htm | 243 +- .../salome2_sp3_primitivegui_functions.htm | 44 +- .../files/salome2_sp3_repairgui_functions.htm | 655 ++- ...alome2_sp3_transformationgui_functions.htm | 232 +- doc/salome/gui/GEOM/geom_help.html | 150 + doc/salome/gui/GEOM/geom_help_csh.html | 100 + doc/salome/gui/GEOM/geom_help_rhc.html | 100 + doc/salome/gui/GEOM/image144.jpg | Bin 0 -> 22434 bytes doc/salome/gui/GEOM/image145.jpg | Bin 0 -> 10447 bytes doc/salome/gui/GEOM/image146.jpg | Bin 0 -> 11320 bytes doc/salome/gui/GEOM/image147.jpg | Bin 0 -> 4258 bytes doc/salome/gui/GEOM/image149.jpg | Bin 0 -> 3666 bytes doc/salome/gui/GEOM/image150.jpg | Bin 0 -> 4622 bytes doc/salome/gui/GEOM/image151.jpg | Bin 0 -> 10219 bytes doc/salome/gui/GEOM/image152.jpg | Bin 0 -> 9107 bytes doc/salome/gui/GEOM/image154.jpg | Bin 0 -> 15519 bytes doc/salome/gui/GEOM/image156.jpg | Bin 0 -> 13889 bytes doc/salome/gui/GEOM/image158.jpg | Bin 0 -> 18417 bytes doc/salome/gui/GEOM/image160.jpg | Bin 0 -> 16741 bytes doc/salome/gui/GEOM/image161.jpg | Bin 0 -> 13465 bytes doc/salome/gui/GEOM/image163.jpg | Bin 0 -> 6781 bytes doc/salome/gui/GEOM/image164.jpg | Bin 0 -> 5424 bytes doc/salome/gui/GEOM/image165.jpg | Bin 0 -> 9596 bytes doc/salome/gui/GEOM/image166.jpg | Bin 0 -> 9776 bytes doc/salome/gui/GEOM/image167.jpg | Bin 0 -> 5505 bytes doc/salome/gui/GEOM/image168.jpg | Bin 0 -> 6169 bytes doc/salome/gui/GEOM/image169.jpg | Bin 0 -> 12021 bytes doc/salome/gui/GEOM/image170.jpg | Bin 0 -> 8878 bytes doc/salome/gui/GEOM/image171.jpg | Bin 0 -> 8023 bytes doc/salome/gui/GEOM/image172.jpg | Bin 0 -> 7109 bytes doc/salome/gui/GEOM/image173.jpg | Bin 0 -> 9979 bytes doc/salome/gui/GEOM/image175.jpg | Bin 0 -> 9324 bytes doc/salome/gui/GEOM/image176.jpg | Bin 0 -> 13599 bytes doc/salome/gui/GEOM/image179.jpg | Bin 0 -> 18423 bytes doc/salome/gui/GEOM/image180.jpg | Bin 0 -> 10039 bytes doc/salome/gui/GEOM/image181.jpg | Bin 0 -> 8500 bytes doc/salome/gui/GEOM/image182.jpg | Bin 0 -> 16425 bytes doc/salome/gui/GEOM/image183.jpg | Bin 0 -> 14260 bytes doc/salome/gui/GEOM/image184.jpg | Bin 0 -> 16038 bytes doc/salome/gui/GEOM/image185.jpg | Bin 0 -> 6145 bytes doc/salome/gui/GEOM/image186.jpg | Bin 0 -> 16278 bytes doc/salome/gui/GEOM/image187.jpg | Bin 0 -> 20153 bytes doc/salome/gui/GEOM/image188.jpg | Bin 0 -> 18274 bytes doc/salome/gui/GEOM/image189.jpg | Bin 0 -> 24603 bytes doc/salome/gui/GEOM/image190.jpg | Bin 0 -> 15206 bytes doc/salome/gui/GEOM/image191.jpg | Bin 0 -> 20633 bytes doc/salome/gui/GEOM/image192.jpg | Bin 0 -> 13112 bytes doc/salome/gui/GEOM/image193.jpg | Bin 0 -> 9769 bytes doc/salome/gui/GEOM/image194.jpg | Bin 0 -> 12744 bytes doc/salome/gui/GEOM/image196.jpg | Bin 0 -> 12763 bytes doc/salome/gui/GEOM/image197.jpg | Bin 0 -> 9273 bytes doc/salome/gui/GEOM/image199.jpg | Bin 0 -> 13440 bytes doc/salome/gui/GEOM/image200.jpg | Bin 0 -> 13194 bytes doc/salome/gui/GEOM/image201.jpg | Bin 0 -> 5193 bytes doc/salome/gui/GEOM/image202.jpg | Bin 0 -> 6377 bytes doc/salome/gui/GEOM/image203.jpg | Bin 0 -> 14865 bytes doc/salome/gui/GEOM/image204.jpg | Bin 0 -> 5191 bytes doc/salome/gui/GEOM/image205.jpg | Bin 0 -> 13829 bytes doc/salome/gui/GEOM/image206.jpg | Bin 0 -> 4983 bytes doc/salome/gui/GEOM/image207.jpg | Bin 0 -> 13990 bytes doc/salome/gui/GEOM/image208.jpg | Bin 0 -> 10477 bytes doc/salome/gui/GEOM/image209.jpg | Bin 0 -> 11139 bytes doc/salome/gui/GEOM/image210.jpg | Bin 0 -> 12886 bytes doc/salome/gui/GEOM/image211.jpg | Bin 0 -> 12992 bytes doc/salome/gui/GEOM/image212.jpg | Bin 0 -> 11806 bytes doc/salome/gui/GEOM/image213.jpg | Bin 0 -> 12481 bytes doc/salome/gui/GEOM/image214.jpg | Bin 0 -> 12759 bytes doc/salome/gui/GEOM/image215.jpg | Bin 0 -> 10568 bytes doc/salome/gui/GEOM/image216.jpg | Bin 0 -> 12504 bytes doc/salome/gui/GEOM/image217.jpg | Bin 0 -> 11989 bytes doc/salome/gui/GEOM/image218.jpg | Bin 0 -> 13752 bytes doc/salome/gui/GEOM/image219.jpg | Bin 0 -> 12098 bytes doc/salome/gui/GEOM/image220.jpg | Bin 0 -> 18424 bytes doc/salome/gui/GEOM/image29.gif | Bin 0 -> 914 bytes doc/salome/gui/GEOM/image32.gif | Bin 0 -> 914 bytes doc/salome/gui/GEOM/image35.gif | Bin 0 -> 870 bytes doc/salome/gui/GEOM/image37.gif | Bin 0 -> 956 bytes doc/salome/gui/GEOM/image41.gif | Bin 0 -> 957 bytes doc/salome/gui/GEOM/image42.gif | Bin 0 -> 917 bytes doc/salome/gui/GEOM/image44.gif | Bin 0 -> 924 bytes doc/salome/gui/GEOM/image49.gif | Bin 0 -> 863 bytes doc/salome/gui/GEOM/image51.gif | Bin 0 -> 954 bytes doc/salome/gui/GEOM/image52.gif | Bin 0 -> 973 bytes doc/salome/gui/GEOM/image53.gif | Bin 0 -> 987 bytes doc/salome/gui/GEOM/image56.gif | Bin 0 -> 979 bytes doc/salome/gui/GEOM/image57.gif | Bin 0 -> 990 bytes doc/salome/gui/GEOM/image59.gif | Bin 0 -> 963 bytes doc/salome/gui/GEOM/image61.gif | Bin 0 -> 975 bytes doc/salome/gui/GEOM/newentity_blocks.htm | 347 ++ doc/salome/gui/GEOM/sketcher.htm | 225 + doc/salome/gui/GEOM/whdata/whftdata0.htm | 4 + doc/salome/gui/GEOM/whdata/whftdata0.xml | 4 + doc/salome/gui/GEOM/whdata/whfts.htm | 4 +- doc/salome/gui/GEOM/whdata/whfts.xml | 4 +- doc/salome/gui/GEOM/whdata/whfwdata0.htm | 1038 ++-- doc/salome/gui/GEOM/whdata/whfwdata0.xml | 1038 ++-- doc/salome/gui/GEOM/whdata/whtdata0.htm | 9 +- doc/salome/gui/GEOM/whdata/whtdata0.xml | 5 +- doc/salome/gui/GEOM/whgdata/whlstf0.htm | 14 +- doc/salome/gui/GEOM/whgdata/whlstf1.htm | 20 +- doc/salome/gui/GEOM/whgdata/whlstf2.htm | 19 +- doc/salome/gui/GEOM/whgdata/whlstf3.htm | 51 + doc/salome/gui/GEOM/whgdata/whlstf4.htm | 49 + doc/salome/gui/GEOM/whgdata/whlstf5.htm | 48 + doc/salome/gui/GEOM/whgdata/whlstfl0.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl1.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl10.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl11.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl12.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl13.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl14.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl15.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl16.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl17.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl18.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl19.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl2.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl20.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl21.htm | 45 + doc/salome/gui/GEOM/whgdata/whlstfl22.htm | 45 + doc/salome/gui/GEOM/whgdata/whlstfl3.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl4.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl5.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl6.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl7.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl8.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstfl9.htm | 2 +- doc/salome/gui/GEOM/whgdata/whlstt3.htm | 5 +- doc/salome/gui/GEOM/whgdata/whnvl32.htm | 10 +- doc/salome/gui/GEOM/whskin_info.htm | 2 +- doc/salome/gui/GEOM/working_with_groups.htm | 222 + doc/salome/tui/GEOM/HTML/GEOM_Gen.html | 794 ++- doc/salome/tui/GEOM/doxyfile | 5 +- doc/salome/tui/GEOM/sources/static/page2.html | 1 - doc/salome/tui/GEOM/sources/static/tree.js | 2 +- idl/GEOM_Gen.idl | 2090 ++++++-- idl/GEOM_Shape.idl | 85 - idl/GEOM_Superv.idl | 375 ++ idl/Makefile.in | 4 +- resources/GEOMCatalog.xml | 4412 +++++++++++++++-- resources/GEOM_en.xml | 162 +- resources/GEOM_fr.xml | 51 +- resources/ImportExport | 14 + resources/ShHealing | 251 + resources/bezier.png | Bin 0 -> 250 bytes resources/block_2f.png | Bin 0 -> 424 bytes resources/block_6f.png | Bin 0 -> 368 bytes resources/block_face_2e.png | Bin 0 -> 425 bytes resources/block_face_4e.png | Bin 0 -> 459 bytes resources/block_face_4v.png | Bin 0 -> 362 bytes resources/block_multitrsf_double.png | Bin 0 -> 604 bytes resources/block_multitrsf_simple.png | Bin 0 -> 587 bytes resources/circle3points.png | Bin 0 -> 439 bytes resources/closecontour.png | Bin 0 -> 368 bytes resources/coordsys.png | Bin 0 -> 1179 bytes resources/displayonly.png | Bin 0 -> 247 bytes resources/free_bound.png | Bin 0 -> 432 bytes resources/glue.png | Bin 0 -> 408 bytes resources/group_edit.png | Bin 0 -> 758 bytes resources/group_new.png | Bin 0 -> 718 bytes resources/interpol.png | Bin 0 -> 254 bytes resources/marker.png | Bin 0 -> 285 bytes resources/marker2.png | Bin 0 -> 309 bytes resources/marker3.png | Bin 0 -> 289 bytes resources/mirrorAxe.png | Bin 0 -> 436 bytes resources/mirrorPoint.png | Bin 0 -> 427 bytes resources/offset.png | Bin 0 -> 696 bytes resources/partitionplane.png | Bin 0 -> 493 bytes resources/plane3points.png | Bin 0 -> 336 bytes resources/planeworkingorigin.png | Bin 0 -> 270 bytes resources/planeworkingvector.png | Bin 0 -> 259 bytes resources/point3.png | Bin 0 -> 335 bytes resources/point_coord.png | Bin 0 -> 192 bytes resources/polyline.png | Bin 0 -> 547 bytes resources/position.png | Bin 0 -> 303 bytes resources/position2.png | Bin 0 -> 306 bytes resources/shapeprocess.png | Bin 0 -> 362 bytes resources/spline.png | Bin 0 -> 254 bytes resources/subblock.png | Bin 0 -> 461 bytes resources/suppressintwires.png | Bin 0 -> 368 bytes resources/translationDxyz.png | Bin 0 -> 416 bytes resources/translationPoints.png | Bin 0 -> 399 bytes resources/translationVector.png | Bin 0 -> 285 bytes resources/tree_block.png | Bin 0 -> 156 bytes resources/tree_group_edge.png | Bin 0 -> 257 bytes resources/tree_group_face.png | Bin 0 -> 258 bytes resources/tree_group_solid.png | Bin 0 -> 260 bytes resources/tree_group_vertex.png | Bin 0 -> 248 bytes resources/tree_lcs.png | Bin 0 -> 277 bytes src/BREPExport/BREPExport.cxx | 33 + src/BREPExport/Makefile.in | 47 + src/BREPImport/BREPImport.cxx | 37 + src/BREPImport/Makefile.in | 45 + src/BasicGUI/BasicGUI.cxx | 407 +- src/BasicGUI/BasicGUI.h | 33 +- src/BasicGUI/BasicGUI_ArcDlg.cxx | 290 +- src/BasicGUI/BasicGUI_ArcDlg.h | 32 +- src/BasicGUI/BasicGUI_CircleDlg.cxx | 376 +- src/BasicGUI/BasicGUI_CircleDlg.h | 44 +- src/BasicGUI/BasicGUI_CurveDlg.cxx | 318 ++ .../BasicGUI_CurveDlg.h} | 60 +- src/BasicGUI/BasicGUI_EllipseDlg.cxx | 263 +- src/BasicGUI/BasicGUI_EllipseDlg.h | 32 +- src/BasicGUI/BasicGUI_LineDlg.cxx | 225 +- src/BasicGUI/BasicGUI_LineDlg.h | 28 +- src/BasicGUI/BasicGUI_MarkerDlg.cxx | 669 +++ src/BasicGUI/BasicGUI_MarkerDlg.h | 90 + src/BasicGUI/BasicGUI_PlaneDlg.cxx | 657 ++- src/BasicGUI/BasicGUI_PlaneDlg.h | 50 +- src/BasicGUI/BasicGUI_PointDlg.cxx | 699 +-- src/BasicGUI/BasicGUI_PointDlg.h | 61 +- src/BasicGUI/BasicGUI_VectorDlg.cxx | 360 +- src/BasicGUI/BasicGUI_VectorDlg.h | 30 +- src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx | 421 +- src/BasicGUI/BasicGUI_WorkingPlaneDlg.h | 31 +- src/BasicGUI/Makefile.in | 13 +- src/BlocksGUI/BlocksGUI.cxx | 131 + src/BlocksGUI/BlocksGUI.h | 54 + src/BlocksGUI/BlocksGUI_BlockDlg.cxx | 394 ++ src/BlocksGUI/BlocksGUI_BlockDlg.h | 80 + src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx | 485 ++ src/BlocksGUI/BlocksGUI_ExplodeDlg.h | 104 + src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx | 409 ++ src/BlocksGUI/BlocksGUI_QuadFaceDlg.h | 90 + src/BlocksGUI/BlocksGUI_TrsfDlg.cxx | 513 ++ src/BlocksGUI/BlocksGUI_TrsfDlg.h | 92 + src/BlocksGUI/Makefile.in | 66 + src/BooleanGUI/BooleanGUI.cxx | 109 +- src/BooleanGUI/BooleanGUI.h | 27 +- src/BooleanGUI/BooleanGUI_CommonDlg.cxx | 245 - src/BooleanGUI/BooleanGUI_CutDlg.cxx | 243 - src/BooleanGUI/BooleanGUI_Dialog.cxx | 282 ++ ...eanGUI_CommonDlg.h => BooleanGUI_Dialog.h} | 43 +- src/BooleanGUI/BooleanGUI_FuseDlg.cxx | 243 - src/BooleanGUI/BooleanGUI_SectionDlg.cxx | 244 - src/BooleanGUI/Makefile.in | 15 +- src/BuildGUI/BuildGUI.cxx | 242 +- src/BuildGUI/BuildGUI.h | 28 +- src/BuildGUI/BuildGUI_CompoundDlg.cxx | 125 +- src/BuildGUI/BuildGUI_CompoundDlg.h | 24 +- src/BuildGUI/BuildGUI_EdgeDlg.cxx | 159 +- src/BuildGUI/BuildGUI_EdgeDlg.h | 25 +- src/BuildGUI/BuildGUI_FaceDlg.cxx | 145 +- src/BuildGUI/BuildGUI_FaceDlg.h | 28 +- src/BuildGUI/BuildGUI_ShellDlg.cxx | 131 +- src/BuildGUI/BuildGUI_ShellDlg.h | 22 +- src/BuildGUI/BuildGUI_SolidDlg.cxx | 145 +- src/BuildGUI/BuildGUI_SolidDlg.h | 27 +- src/BuildGUI/BuildGUI_WireDlg.cxx | 125 +- src/BuildGUI/BuildGUI_WireDlg.h | 18 +- src/BuildGUI/Makefile.in | 5 +- src/DisplayGUI/DisplayGUI.cxx | 1168 ++--- src/DisplayGUI/DisplayGUI.h | 52 +- src/DisplayGUI/Makefile.in | 7 +- src/DlgRef/DlgRef_1List1Spin1Btn_QTD.cxx | 73 + src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h | 44 + src/DlgRef/DlgRef_1Sel1Check_QTD.cxx | 32 +- src/DlgRef/DlgRef_1Sel1Check_QTD.h | 8 +- src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.cxx | 46 +- src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h | 12 +- src/DlgRef/DlgRef_1Sel3Check_QTD.cxx | 56 +- src/DlgRef/DlgRef_1Sel3Check_QTD.h | 16 +- src/DlgRef/DlgRef_1Sel_Ext.h | 28 + src/DlgRef/DlgRef_2Sel1Spin.cxx | 5 + ...n1Check.cxx => DlgRef_2Sel1Spin2Check.cxx} | 14 +- ...1Spin1Check.h => DlgRef_2Sel1Spin2Check.h} | 16 +- ...QTD.cxx => DlgRef_2Sel1Spin2Check_QTD.cxx} | 89 +- ...eck_QTD.h => DlgRef_2Sel1Spin2Check_QTD.h} | 32 +- src/DlgRef/DlgRef_2Sel1Spin_QTD.cxx | 12 +- src/DlgRef/DlgRef_2Sel1Spin_QTD.h | 2 +- src/DlgRef/DlgRef_2Sel2Spin1Check.cxx | 5 + src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.cxx | 52 +- src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h | 14 +- src/DlgRef/DlgRef_2Sel4Spin1Check.cxx | 5 + src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.cxx | 92 +- src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h | 18 +- src/DlgRef/DlgRef_3Check_QTD.cxx | 75 + src/DlgRef/DlgRef_3Check_QTD.h | 40 + src/DlgRef/DlgRef_3Sel1Spin.cxx | 55 + .../DlgRef_3Sel1Spin.h} | 58 +- src/DlgRef/DlgRef_3Sel3Spin1Check.cxx | 114 + .../DlgRef_3Sel3Spin1Check.h} | 35 +- src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.cxx | 158 + src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h | 57 + src/DlgRef/DlgRef_3Sel4Spin2Check.cxx | 6 + src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.cxx | 127 +- src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h | 26 +- src/DlgRef/DlgRef_4Sel1List1Check_QTD.cxx | 176 + src/DlgRef/DlgRef_4Sel1List1Check_QTD.h | 60 + src/DlgRef/DlgRef_6Sel_QTD.cxx | 152 + src/DlgRef/DlgRef_6Sel_QTD.h | 57 + src/DlgRef/DlgRef_Skeleton_QTD.cxx | 11 +- src/DlgRef/DlgRef_Skeleton_QTD.h | 5 +- src/DlgRef/Makefile.in | 27 +- .../UIFiles/DlgRef_1List1Spin1Btn_QTD.ui | 93 + src/DlgRef/UIFiles/DlgRef_1Sel1Check_QTD.ui | 57 +- .../UIFiles/DlgRef_1Sel1Spin1Check_QTD.ui | 112 +- src/DlgRef/UIFiles/DlgRef_1Sel3Check_QTD.ui | 99 +- ...k_QTD.ui => DlgRef_2Sel1Spin2Check_QTD.ui} | 149 +- src/DlgRef/UIFiles/DlgRef_2Sel1Spin_QTD.ui | 17 +- .../UIFiles/DlgRef_2Sel2Spin1Check_QTD.ui | 87 +- .../UIFiles/DlgRef_2Sel4Spin1Check_QTD.ui | 183 +- src/DlgRef/UIFiles/DlgRef_3Check_QTD.ui | 112 + .../UIFiles/DlgRef_3Sel3Spin1Check_QTD.ui | 317 ++ .../UIFiles/DlgRef_3Sel4Spin2Check_QTD.ui | 244 +- src/DlgRef/UIFiles/DlgRef_6Sel_QTD.ui | 296 ++ src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui | 18 +- src/DlgRef/UIFiles/ui_to_cxx | 17 +- src/EntityGUI/EntityGUI.cxx | 435 +- src/EntityGUI/EntityGUI.h | 22 +- src/EntityGUI/EntityGUI_1Sel_QTD.cxx | 35 +- src/EntityGUI/EntityGUI_1Sel_QTD.h | 6 +- src/EntityGUI/EntityGUI_1Spin_QTD.cxx | 55 +- src/EntityGUI/EntityGUI_1Spin_QTD.h | 10 +- src/EntityGUI/EntityGUI_2Spin_QTD.cxx | 55 +- src/EntityGUI/EntityGUI_2Spin_QTD.h | 10 +- src/EntityGUI/EntityGUI_3Spin_QTD.cxx | 31 +- src/EntityGUI/EntityGUI_3Spin_QTD.h | 6 +- src/EntityGUI/EntityGUI_4Spin_QTD.cxx | 34 +- src/EntityGUI/EntityGUI_4Spin_QTD.h | 4 +- src/EntityGUI/EntityGUI_SketcherDlg.cxx | 1304 +++-- src/EntityGUI/EntityGUI_SketcherDlg.h | 72 +- src/EntityGUI/EntityGUI_SubShapeDlg.cxx | 576 +-- src/EntityGUI/EntityGUI_SubShapeDlg.h | 72 +- src/EntityGUI/Makefile.in | 7 +- src/EntityGUI/UIFiles/EntityGUI_1Sel_QTD.ui | 218 + src/EntityGUI/UIFiles/EntityGUI_1Spin_QTD.ui | 201 + src/EntityGUI/UIFiles/EntityGUI_2Spin_QTD.ui | 230 + src/EntityGUI/UIFiles/EntityGUI_3Spin_QTD.ui | 259 + src/EntityGUI/UIFiles/EntityGUI_4Spin_QTD.ui | 288 ++ src/EntityGUI/UIFiles/EntityGUI_Dir1_QTD.ui | 112 + src/EntityGUI/UIFiles/EntityGUI_Dir2_QTD.ui | 120 + src/EntityGUI/UIFiles/EntityGUI_Point_QTD.ui | 103 + .../UIFiles/EntityGUI_Skeleton_QTD.ui | 379 ++ src/EntityGUI/UIFiles/ui_to_cxx | 28 + src/GEOM/GEOM_Application.cxx | 39 + src/GEOM/GEOM_Application.hxx | 89 + src/GEOM/GEOM_Application.ixx | 63 + src/GEOM/GEOM_Application.jxx | 9 + ...teratorOfDataMapOfAsciiStringTransient.hxx | 86 + ...ratorOfDataMapOfAsciiStringTransient_0.cxx | 36 + ...MapNodeOfDataMapOfAsciiStringTransient.hxx | 123 + ...pNodeOfDataMapOfAsciiStringTransient_0.cxx | 85 + .../GEOM_DataMapOfAsciiStringTransient.hxx | 118 + .../GEOM_DataMapOfAsciiStringTransient_0.cxx | 39 + src/GEOM/GEOM_Engine.cxx | 312 ++ src/GEOM/GEOM_Engine.hxx | 74 + src/GEOM/GEOM_Function.cxx | 631 +++ src/GEOM/GEOM_Function.hxx | 243 + src/GEOM/GEOM_Gen_i.cc | 155 +- src/GEOM/GEOM_Gen_i.hh | 617 --- src/GEOM/GEOM_IOperations.cxx | 84 + src/GEOM/GEOM_IOperations.hxx | 66 + src/GEOM/GEOM_ISubShape.hxx | 34 + src/GEOM/GEOM_Object.cxx | 404 ++ src/GEOM/GEOM_Object.hxx | 237 + src/GEOM/GEOM_Shape_i.cc | 260 - src/GEOM/GEOM_Shape_i.hh | 119 - src/GEOM/GEOM_Solver.cxx | 50 + src/GEOM/GEOM_Solver.hxx | 34 + src/GEOM/GEOM_SubShapeDriver.cxx | 150 + src/GEOM/GEOM_SubShapeDriver.hxx | 139 + src/GEOM/Handle_GEOM_Application.hxx | 77 + ...MapNodeOfDataMapOfAsciiStringTransient.hxx | 91 + src/GEOM/Makefile.in | 69 +- src/GEOM/geom.cxx | 2 +- src/GEOMBase/GEOMBase.cxx | 1314 ++--- src/GEOMBase/GEOMBase.h | 109 +- src/GEOMBase/GEOMBase_Helper.cxx | 863 ++++ src/GEOMBase/GEOMBase_Helper.h | 175 + src/GEOMBase/GEOMBase_Skeleton.cxx | 81 +- src/GEOMBase/GEOMBase_Skeleton.h | 18 +- src/GEOMBase/GEOM_Operation.cxx | 122 + src/GEOMBase/GEOM_Operation.h | 54 + src/GEOMBase/Makefile.in | 15 +- src/GEOMClient/GEOM_Client.cxx | 149 +- src/GEOMClient/GEOM_Client.hxx | 12 +- src/GEOMClient/Makefile.in | 4 +- src/GEOMDS/GEOMDS.cdl | 53 - src/GEOMDS/GEOMDS_Application.cdl | 49 - src/GEOMDS/GEOMDS_Application.ixx | 86 - src/GEOMDS/GEOMDS_Commands.cdl | 46 - src/GEOMDS/GEOMDS_Commands.hxx | 150 - ...MapIteratorOfDataMapOfIntegerTransient.hxx | 118 - ...pIteratorOfDataMapOfIntegerTransient_0.cxx | 62 - ...DataMapNodeOfDataMapOfIntegerTransient.hxx | 152 - ...taMapNodeOfDataMapOfIntegerTransient_0.cxx | 111 - .../GEOMDS_DataMapOfIntegerTransient.hxx | 140 - .../GEOMDS_DataMapOfIntegerTransient_0.cxx | 65 - src/GEOMDS/GEOMDS_Explorer.cdl | 52 - src/GEOMDS/GEOMDS_Explorer.cxx | 126 - src/GEOMDS/GEOMDS_Explorer.hxx | 101 - src/GEOMDS/GEOMDS_Explorer.jxx | 38 - ...DataMapNodeOfDataMapOfIntegerTransient.hxx | 100 - src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx | 114 +- src/GEOMFiltersSelection/GEOM_EdgeFilter.hxx | 19 +- src/GEOMFiltersSelection/GEOM_EdgeFilter.ixx | 6 +- src/GEOMFiltersSelection/GEOM_FaceFilter.cxx | 172 +- src/GEOMFiltersSelection/GEOM_FaceFilter.hxx | 17 +- src/GEOMFiltersSelection/GEOM_FaceFilter.ixx | 6 +- .../GEOM_LogicalFilter.cxx | 161 + .../GEOM_LogicalFilter.hxx | 103 + .../GEOM_PreviewFilter.cxx} | 19 +- .../GEOM_PreviewFilter.hxx} | 50 +- .../GEOM_PreviewFilter.ixx | 83 + .../GEOM_PreviewFilter.jxx} | 16 +- .../GEOM_ShapeTypeFilter.cxx | 189 +- .../GEOM_ShapeTypeFilter.hxx | 37 +- src/GEOMFiltersSelection/GEOM_TypeFilter.cxx | 145 + src/GEOMFiltersSelection/GEOM_TypeFilter.hxx | 90 + .../Handle_GEOM_EdgeFilter.hxx | 14 +- .../Handle_GEOM_FaceFilter.hxx | 14 +- .../Handle_GEOM_PreviewFilter.hxx} | 46 +- src/GEOMFiltersSelection/Makefile.in | 13 +- src/GEOMGUI/GEOMGUI.cxx | 115 + src/GEOMGUI/GEOMGUI.h | 62 + src/GEOMGUI/GEOM_Displayer.cxx | 1074 ++++ src/GEOMGUI/GEOM_Displayer.h | 173 + src/GEOMGUI/GEOM_icons.po | 488 ++ src/GEOMGUI/GEOM_msg_en.po | 1932 ++++++++ src/GEOMGUI/GEOM_msg_fr.po | 1350 +++++ src/GEOMGUI/GeometryGUI.cxx | 1099 ++-- src/GEOMGUI/GeometryGUI.h | 78 +- src/GEOMGUI/GeometryGUI_Swig.cxx | 248 +- src/GEOMGUI/Makefile.in | 24 +- src/GEOMImpl/GEOMImpl_ArcDriver.cxx | 132 + src/GEOMImpl/GEOMImpl_ArcDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx | 168 + src/GEOMImpl/GEOMImpl_ArchimedeDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_Block6Explorer.cxx | 1213 +++++ src/GEOMImpl/GEOMImpl_Block6Explorer.hxx | 207 + src/GEOMImpl/GEOMImpl_BlockDriver.cxx | 920 ++++ src/GEOMImpl/GEOMImpl_BlockDriver.hxx | 155 + src/GEOMImpl/GEOMImpl_BooleanDriver.cxx | 138 + src/GEOMImpl/GEOMImpl_BooleanDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_BoxDriver.cxx | 131 + src/GEOMImpl/GEOMImpl_BoxDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_ChamferDriver.cxx | 228 + src/GEOMImpl/GEOMImpl_ChamferDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_CircleDriver.cxx | 154 + src/GEOMImpl/GEOMImpl_CircleDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_ConeDriver.cxx | 165 + src/GEOMImpl/GEOMImpl_ConeDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_CopyDriver.cxx | 114 + src/GEOMImpl/GEOMImpl_CopyDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_CylinderDriver.cxx | 148 + src/GEOMImpl/GEOMImpl_CylinderDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_EllipseDriver.cxx | 124 + src/GEOMImpl/GEOMImpl_EllipseDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_ExportDriver.cxx | 139 + src/GEOMImpl/GEOMImpl_ExportDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_FilletDriver.cxx | 157 + src/GEOMImpl/GEOMImpl_FilletDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_FillingDriver.cxx | 167 + src/GEOMImpl/GEOMImpl_FillingDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_Gen.cxx | 352 ++ src/GEOMImpl/GEOMImpl_Gen.hxx | 67 + src/GEOMImpl/GEOMImpl_GlueDriver.cxx | 388 ++ src/GEOMImpl/GEOMImpl_GlueDriver.hxx | 142 + src/GEOMImpl/GEOMImpl_HealingDriver.cxx | 405 ++ src/GEOMImpl/GEOMImpl_HealingDriver.hxx | 152 + src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx | 1039 ++++ src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx | 59 + src/GEOMImpl/GEOMImpl_IArc.hxx | 27 + src/GEOMImpl/GEOMImpl_IArchimede.hxx | 36 + src/GEOMImpl/GEOMImpl_IBasicOperations.cxx | 704 +++ src/GEOMImpl/GEOMImpl_IBasicOperations.hxx | 56 + src/GEOMImpl/GEOMImpl_IBlockTrsf.hxx | 42 + src/GEOMImpl/GEOMImpl_IBlocks.hxx | 26 + src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx | 2694 ++++++++++ src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx | 136 + src/GEOMImpl/GEOMImpl_IBoolean.hxx | 24 + src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx | 351 ++ src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx | 36 + src/GEOMImpl/GEOMImpl_IBox.hxx | 41 + src/GEOMImpl/GEOMImpl_IChamfer.hxx | 48 + src/GEOMImpl/GEOMImpl_ICircle.hxx | 41 + src/GEOMImpl/GEOMImpl_ICone.hxx | 41 + src/GEOMImpl/GEOMImpl_ICopy.hxx | 21 + src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx | 596 +++ src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx | 40 + src/GEOMImpl/GEOMImpl_ICylinder.hxx | 36 + src/GEOMImpl/GEOMImpl_IEllipse.hxx | 32 + src/GEOMImpl/GEOMImpl_IFillet.hxx | 40 + src/GEOMImpl/GEOMImpl_IFilling.hxx | 37 + src/GEOMImpl/GEOMImpl_IGlue.hxx | 28 + src/GEOMImpl/GEOMImpl_IGroupOperations.cxx | 252 + src/GEOMImpl/GEOMImpl_IGroupOperations.hxx | 32 + src/GEOMImpl/GEOMImpl_IHealing.hxx | 61 + src/GEOMImpl/GEOMImpl_IHealingOperations.cxx | 638 +++ src/GEOMImpl/GEOMImpl_IHealingOperations.hxx | 62 + src/GEOMImpl/GEOMImpl_IImportExport.hxx | 32 + src/GEOMImpl/GEOMImpl_IInsertOperations.cxx | 393 ++ src/GEOMImpl/GEOMImpl_IInsertOperations.hxx | 45 + src/GEOMImpl/GEOMImpl_ILine.hxx | 24 + src/GEOMImpl/GEOMImpl_ILocalOperations.cxx | 554 +++ src/GEOMImpl/GEOMImpl_ILocalOperations.hxx | 44 + src/GEOMImpl/GEOMImpl_IMarker.hxx | 69 + src/GEOMImpl/GEOMImpl_IMeasure.hxx | 22 + src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 911 ++++ src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx | 74 + src/GEOMImpl/GEOMImpl_IMirror.hxx | 30 + src/GEOMImpl/GEOMImpl_IOffset.hxx | 26 + src/GEOMImpl/GEOMImpl_IPartition.hxx | 63 + src/GEOMImpl/GEOMImpl_IPipe.hxx | 24 + src/GEOMImpl/GEOMImpl_IPlane.hxx | 47 + src/GEOMImpl/GEOMImpl_IPoint.hxx | 44 + src/GEOMImpl/GEOMImpl_IPolyline.hxx | 26 + src/GEOMImpl/GEOMImpl_IPosition.hxx | 33 + src/GEOMImpl/GEOMImpl_IPrism.hxx | 35 + src/GEOMImpl/GEOMImpl_IRevolution.hxx | 31 + src/GEOMImpl/GEOMImpl_IRotate.hxx | 47 + src/GEOMImpl/GEOMImpl_IScale.hxx | 31 + src/GEOMImpl/GEOMImpl_IShapes.hxx | 55 + src/GEOMImpl/GEOMImpl_IShapesOperations.cxx | 821 +++ src/GEOMImpl/GEOMImpl_IShapesOperations.hxx | 62 + src/GEOMImpl/GEOMImpl_ISketcher.hxx | 28 + src/GEOMImpl/GEOMImpl_ISphere.hxx | 26 + src/GEOMImpl/GEOMImpl_ISpline.hxx | 26 + src/GEOMImpl/GEOMImpl_ITorus.hxx | 32 + .../GEOMImpl_ITransformOperations.cxx | 1465 ++++++ .../GEOMImpl_ITransformOperations.hxx | 93 + src/GEOMImpl/GEOMImpl_ITranslate.hxx | 82 + src/GEOMImpl/GEOMImpl_IVector.hxx | 36 + src/GEOMImpl/GEOMImpl_ImportDriver.cxx | 142 + src/GEOMImpl/GEOMImpl_ImportDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_LineDriver.cxx | 154 + src/GEOMImpl/GEOMImpl_LineDriver.hxx | 138 + src/GEOMImpl/GEOMImpl_MarkerDriver.cxx | 140 + src/GEOMImpl/GEOMImpl_MarkerDriver.hxx | 138 + src/GEOMImpl/GEOMImpl_MeasureDriver.cxx | 134 + src/GEOMImpl/GEOMImpl_MeasureDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_MirrorDriver.cxx | 166 + src/GEOMImpl/GEOMImpl_MirrorDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_OffsetDriver.cxx | 128 + src/GEOMImpl/GEOMImpl_OffsetDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_PartitionDriver.cxx | 224 + src/GEOMImpl/GEOMImpl_PartitionDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_PipeDriver.cxx | 139 + src/GEOMImpl/GEOMImpl_PipeDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_PlaneDriver.cxx | 163 + src/GEOMImpl/GEOMImpl_PlaneDriver.hxx | 138 + src/GEOMImpl/GEOMImpl_PointDriver.cxx | 138 + src/GEOMImpl/GEOMImpl_PointDriver.hxx | 138 + src/GEOMImpl/GEOMImpl_PolylineDriver.cxx | 124 + src/GEOMImpl/GEOMImpl_PolylineDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_PositionDriver.cxx | 173 + src/GEOMImpl/GEOMImpl_PositionDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_PrismDriver.cxx | 145 + src/GEOMImpl/GEOMImpl_PrismDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx | 135 + src/GEOMImpl/GEOMImpl_RevolutionDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_RotateDriver.cxx | 243 + src/GEOMImpl/GEOMImpl_RotateDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_ScaleDriver.cxx | 118 + src/GEOMImpl/GEOMImpl_ScaleDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 352 ++ src/GEOMImpl/GEOMImpl_ShapeDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_SketcherDriver.cxx | 129 + src/GEOMImpl/GEOMImpl_SketcherDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_SphereDriver.cxx | 113 + src/GEOMImpl/GEOMImpl_SphereDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_SplineDriver.cxx | 156 + src/GEOMImpl/GEOMImpl_SplineDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_Template.cxx | 87 + src/GEOMImpl/GEOMImpl_Template.hxx | 139 + src/GEOMImpl/GEOMImpl_TorusDriver.cxx | 142 + src/GEOMImpl/GEOMImpl_TorusDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_TranslateDriver.cxx | 223 + src/GEOMImpl/GEOMImpl_TranslateDriver.hxx | 139 + src/GEOMImpl/GEOMImpl_Types.hxx | 208 + src/GEOMImpl/GEOMImpl_VectorDriver.cxx | 134 + src/GEOMImpl/GEOMImpl_VectorDriver.hxx | 138 + src/GEOMImpl/GUID.txt | 69 + src/GEOMImpl/Makefile.in | 182 + src/GEOMToolsGUI/GEOMToolsGUI.cxx | 1018 ++-- src/GEOMToolsGUI/GEOMToolsGUI.h | 41 +- src/GEOMToolsGUI/GEOMToolsGUI_1.cxx | 451 ++ src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx | 14 +- src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h | 16 +- .../GEOMToolsGUI_TransparencyDlg.cxx | 39 +- .../GEOMToolsGUI_TransparencyDlg.h | 15 +- src/GEOMToolsGUI/Makefile.in | 3 +- src/GEOM_I/GEOM_Gen_i.cc | 839 ++++ src/GEOM_I/GEOM_Gen_i.hh | 191 + src/GEOM_I/GEOM_I3DPrimOperations_i.cc | 467 ++ src/GEOM_I/GEOM_I3DPrimOperations_i.hh | 82 + src/GEOM_I/GEOM_IBasicOperations_i.cc | 371 ++ src/GEOM_I/GEOM_IBasicOperations_i.hh | 68 + src/GEOM_I/GEOM_IBlocksOperations_i.cc | 939 ++++ src/GEOM_I/GEOM_IBlocksOperations_i.hh | 126 + src/GEOM_I/GEOM_IBooleanOperations_i.cc | 183 + src/GEOM_I/GEOM_IBooleanOperations_i.hh | 43 + src/GEOM_I/GEOM_ICurvesOperations_i.cc | 305 ++ src/GEOM_I/GEOM_ICurvesOperations_i.hh | 51 + src/GEOM_I/GEOM_IGroupOperations_i.cc | 179 + src/GEOM_I/GEOM_IGroupOperations_i.hh | 39 + src/GEOM_I/GEOM_IHealingOperations_i.cc | 401 ++ src/GEOM_I/GEOM_IHealingOperations_i.hh | 51 + src/GEOM_I/GEOM_IInsertOperations_i.cc | 194 + src/GEOM_I/GEOM_IInsertOperations_i.hh | 42 + src/GEOM_I/GEOM_ILocalOperations_i.cc | 275 + src/GEOM_I/GEOM_ILocalOperations_i.hh | 50 + src/GEOM_I/GEOM_IMeasureOperations_i.cc | 275 + src/GEOM_I/GEOM_IMeasureOperations_i.hh | 64 + src/GEOM_I/GEOM_IOperations_i.cc | 123 + src/GEOM_I/GEOM_IOperations_i.hh | 45 + src/GEOM_I/GEOM_IShapesOperations_i.cc | 451 ++ src/GEOM_I/GEOM_IShapesOperations_i.hh | 61 + src/GEOM_I/GEOM_ITransformOperations_i.cc | 944 ++++ src/GEOM_I/GEOM_ITransformOperations_i.hh | 111 + src/GEOM_I/GEOM_Object_i.cc | 292 ++ src/GEOM_I/GEOM_Object_i.hh | 62 + src/GEOM_I/Makefile.in | 93 + src/GEOM_I_Superv/GEOM_Superv_i.cc | 1747 +++++++ src/GEOM_I_Superv/GEOM_Superv_i.hh | 462 ++ src/{GEOMDS => GEOM_I_Superv}/Makefile.in | 36 +- src/GEOM_SWIG/GEOM_Partition1.py | 66 +- src/GEOM_SWIG/GEOM_Partition2.py | 59 +- src/GEOM_SWIG/GEOM_Partition3.py | 54 +- src/GEOM_SWIG/GEOM_Partition4.py | 52 +- src/GEOM_SWIG/GEOM_Partition5.py | 74 +- src/GEOM_SWIG/GEOM_Spanner.py | 533 ++ src/GEOM_SWIG/GEOM_TestAll.py | 327 ++ src/GEOM_SWIG/GEOM_TestHealing.py | 331 ++ src/GEOM_SWIG/GEOM_TestMeasures.py | 102 + src/GEOM_SWIG/GEOM_TestOthers.py | 209 + src/GEOM_SWIG/GEOM_blocks.py | 41 + src/GEOM_SWIG/GEOM_example.py | 13 +- src/GEOM_SWIG/GEOM_example2.py | 32 +- src/GEOM_SWIG/GEOM_example3.py | 32 +- src/GEOM_SWIG/GEOM_example4.py | 36 +- src/GEOM_SWIG/GEOM_example5.py | 54 + src/GEOM_SWIG/GEOM_moteur.py | 88 +- src/GEOM_SWIG/GEOM_usinggeom.py | 262 +- src/GEOM_SWIG/Makefile.in | 76 +- src/GEOM_SWIG/batchmode_geompy.py | 985 ++-- src/GEOM_SWIG/geompy.py | 1953 ++++++-- src/GenerationGUI/GenerationGUI.cxx | 204 +- src/GenerationGUI/GenerationGUI.h | 28 +- .../GenerationGUI_FillingDlg.cxx | 206 +- src/GenerationGUI/GenerationGUI_FillingDlg.h | 24 +- src/GenerationGUI/GenerationGUI_PipeDlg.cxx | 201 +- src/GenerationGUI/GenerationGUI_PipeDlg.h | 25 +- src/GenerationGUI/GenerationGUI_PrismDlg.cxx | 262 +- src/GenerationGUI/GenerationGUI_PrismDlg.h | 39 +- src/GenerationGUI/GenerationGUI_RevolDlg.cxx | 208 +- src/GenerationGUI/GenerationGUI_RevolDlg.h | 34 +- src/GenerationGUI/Makefile.in | 5 +- src/GroupGUI/GroupGUI.cxx | 134 + src/GroupGUI/GroupGUI.h | 57 + src/GroupGUI/GroupGUI_GroupDlg.cxx | 648 +++ src/GroupGUI/GroupGUI_GroupDlg.h | 103 + src/GroupGUI/Makefile.in | 60 + src/IGESExport/IGESExport.cxx | 48 + src/IGESExport/Makefile.in | 45 + src/IGESImport/IGESImport.cxx | 72 + src/IGESImport/Makefile.in | 45 + src/Makefile.in | 2 +- src/MeasureGUI/Makefile.in | 11 +- src/MeasureGUI/MeasureGUI.cxx | 111 +- src/MeasureGUI/MeasureGUI.h | 24 +- src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx | 271 +- src/MeasureGUI/MeasureGUI_BndBoxDlg.h | 42 +- src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx | 366 +- src/MeasureGUI/MeasureGUI_CenterMassDlg.h | 86 +- src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx | 237 +- src/MeasureGUI/MeasureGUI_CheckShapeDlg.h | 64 +- src/MeasureGUI/MeasureGUI_DistanceDlg.cxx | 459 +- src/MeasureGUI/MeasureGUI_DistanceDlg.h | 47 +- src/MeasureGUI/MeasureGUI_InertiaDlg.cxx | 328 +- src/MeasureGUI/MeasureGUI_InertiaDlg.h | 33 +- src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx | 304 +- src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h | 43 +- src/MeasureGUI/MeasureGUI_PointDlg.cxx | 219 + src/MeasureGUI/MeasureGUI_PointDlg.h | 79 + src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx | 288 +- src/MeasureGUI/MeasureGUI_PropertiesDlg.h | 48 +- src/MeasureGUI/MeasureGUI_Skeleton.cxx | 297 +- src/MeasureGUI/MeasureGUI_Skeleton.h | 79 +- src/MeasureGUI/MeasureGUI_WhatisDlg.cxx | 232 +- src/MeasureGUI/MeasureGUI_WhatisDlg.h | 28 +- src/NMTAlgo/Makefile.in | 70 + src/NMTAlgo/NMTAlgo.cdl | 40 + src/NMTAlgo/NMTAlgo_Algo.cdl | 59 + src/NMTAlgo/NMTAlgo_Algo.cxx | 119 + src/NMTAlgo/NMTAlgo_Algo.hxx | 109 + src/NMTAlgo/NMTAlgo_Algo.ixx | 19 + src/NMTAlgo/NMTAlgo_Algo.jxx | 9 + src/NMTAlgo/NMTAlgo_Builder.cdl | 79 + src/NMTAlgo/NMTAlgo_Builder.cxx | 637 +++ src/NMTAlgo/NMTAlgo_Builder.hxx | 119 + src/NMTAlgo/NMTAlgo_Builder.ixx | 19 + src/NMTAlgo/NMTAlgo_Builder.jxx | 12 + src/NMTAlgo/NMTAlgo_Loop3d.cdl | 66 + src/NMTAlgo/NMTAlgo_Loop3d.cxx | 330 ++ src/NMTAlgo/NMTAlgo_Loop3d.hxx | 107 + src/NMTAlgo/NMTAlgo_Loop3d.ixx | 19 + src/NMTAlgo/NMTAlgo_Loop3d.jxx | 21 + src/NMTAlgo/NMTAlgo_Splitter.cdl | 170 + src/NMTAlgo/NMTAlgo_Splitter.cxx | 573 +++ src/NMTAlgo/NMTAlgo_Splitter.hxx | 155 + src/NMTAlgo/NMTAlgo_Splitter.ixx | 19 + src/NMTAlgo/NMTAlgo_Splitter.jxx | 12 + src/NMTAlgo/NMTAlgo_Splitter1.cdl | 73 + src/NMTAlgo/NMTAlgo_Splitter1.cxx | 348 ++ src/NMTAlgo/NMTAlgo_Splitter1.hxx | 117 + src/NMTAlgo/NMTAlgo_Splitter1.ixx | 19 + src/NMTAlgo/NMTAlgo_Splitter1.jxx | 9 + src/NMTAlgo/NMTAlgo_Splitter_1.cxx | 689 +++ src/NMTAlgo/NMTAlgo_Splitter_2.cxx | 515 ++ src/NMTAlgo/NMTAlgo_Tools.cdl | 71 + src/NMTAlgo/NMTAlgo_Tools.cxx | 498 ++ src/NMTAlgo/NMTAlgo_Tools.hxx | 105 + src/NMTAlgo/NMTAlgo_Tools.ixx | 19 + src/NMTAlgo/NMTAlgo_Tools.jxx | 21 + ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 85 + ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 85 + src/NMTDS/Makefile.in | 72 + src/NMTDS/NMTDS.cdl | 39 + src/NMTDS/NMTDS_CArray1OfIndexRange.hxx | 132 + src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx | 33 + src/NMTDS/NMTDS_IndexRange.cdl | 39 + src/NMTDS/NMTDS_IndexRange.cxx | 57 + src/NMTDS/NMTDS_IndexRange.hxx | 94 + src/NMTDS/NMTDS_IndexRange.ixx | 19 + src/NMTDS/NMTDS_IndexRange.jxx | 3 + ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 136 + ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 93 + ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 133 + ...fIntegerIndexedDataMapOfShapeInteger_0.cxx | 50 + ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 124 + ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 45 + ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 123 + ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 91 + ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 150 + ...xedDataMapOfShapeAncestorsSuccessors_0.cxx | 42 + src/NMTDS/NMTDS_PShapesDataStructure.hxx | 22 + src/NMTDS/NMTDS_ShapesDataStructure.cdl | 56 + src/NMTDS/NMTDS_ShapesDataStructure.cxx | 226 + src/NMTDS/NMTDS_ShapesDataStructure.hxx | 108 + src/NMTDS/NMTDS_ShapesDataStructure.ixx | 19 + src/NMTDS/NMTDS_ShapesDataStructure.jxx | 9 + ...pOfIntegerIndexedDataMapOfShapeInteger.hxx | 85 + ...dexedDataMapOfShapeAncestorsSuccessors.hxx | 85 + ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 85 + ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 85 + ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 85 + ...e_NMTTools_ListNodeOfListOfCommonBlock.hxx | 85 + ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 85 + src/NMTTools/Makefile.in | 103 + src/NMTTools/NMTTools.cdl | 66 + src/NMTTools/NMTTools_CommonBlock.cdl | 88 + src/NMTTools/NMTTools_CommonBlock.cxx | 227 + src/NMTTools/NMTTools_CommonBlock.hxx | 110 + src/NMTTools/NMTTools_CommonBlock.ixx | 19 + src/NMTTools/NMTTools_CommonBlock.jxx | 12 + src/NMTTools/NMTTools_CommonBlockAPI.cdl | 54 + src/NMTTools/NMTTools_CommonBlockAPI.cxx | 114 + src/NMTTools/NMTTools_CommonBlockAPI.hxx | 103 + src/NMTTools/NMTTools_CommonBlockAPI.ixx | 19 + src/NMTTools/NMTTools_CommonBlockAPI.jxx | 15 + src/NMTTools/NMTTools_CommonBlockPool.hxx | 132 + src/NMTTools/NMTTools_CommonBlockPool_0.cxx | 33 + src/NMTTools/NMTTools_CoupleOfShape.cdl | 39 + src/NMTTools/NMTTools_CoupleOfShape.cxx | 45 + src/NMTTools/NMTTools_CoupleOfShape.hxx | 91 + src/NMTTools/NMTTools_CoupleOfShape.ixx | 19 + src/NMTTools/NMTTools_CoupleOfShape.jxx | 6 + src/NMTTools/NMTTools_DEProcessor.cdl | 105 + src/NMTTools/NMTTools_DEProcessor.cxx | 492 ++ src/NMTTools/NMTTools_DEProcessor.hxx | 117 + src/NMTTools/NMTTools_DEProcessor.ixx | 19 + src/NMTTools/NMTTools_DEProcessor.jxx | 18 + src/NMTTools/NMTTools_DSFiller.cdl | 80 + src/NMTTools/NMTTools_DSFiller.cxx | 149 + src/NMTTools/NMTTools_DSFiller.hxx | 123 + src/NMTTools/NMTTools_DSFiller.ixx | 19 + src/NMTTools/NMTTools_DSFiller.jxx | 15 + ...eOfIndexedDataMapOfIndexedMapOfInteger.hxx | 136 + ...fIndexedDataMapOfIndexedMapOfInteger_0.cxx | 93 + ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 140 + ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 96 + ...apNodeOfIndexedDataMapOfShapePaveBlock.hxx | 140 + ...NodeOfIndexedDataMapOfShapePaveBlock_0.cxx | 96 + ...ls_IndexedDataMapOfIndexedMapOfInteger.hxx | 133 + ..._IndexedDataMapOfIndexedMapOfInteger_0.cxx | 50 + ...IndexedDataMapOfShapeIndexedMapOfShape.hxx | 134 + ...dexedDataMapOfShapeIndexedMapOfShape_0.cxx | 53 + ...MTTools_IndexedDataMapOfShapePaveBlock.hxx | 134 + ...Tools_IndexedDataMapOfShapePaveBlock_0.cxx | 53 + .../NMTTools_IteratorOfCoupleOfShape.cdl | 55 + .../NMTTools_IteratorOfCoupleOfShape.cxx | 140 + .../NMTTools_IteratorOfCoupleOfShape.hxx | 111 + .../NMTTools_IteratorOfCoupleOfShape.ixx | 19 + .../NMTTools_IteratorOfCoupleOfShape.jxx | 9 + ...TTools_ListIteratorOfListOfCommonBlock.hxx | 124 + ...ools_ListIteratorOfListOfCommonBlock_0.cxx | 45 + ...ools_ListIteratorOfListOfCoupleOfShape.hxx | 124 + ...ls_ListIteratorOfListOfCoupleOfShape_0.cxx | 45 + .../NMTTools_ListNodeOfListOfCommonBlock.hxx | 123 + ...NMTTools_ListNodeOfListOfCommonBlock_0.cxx | 91 + ...NMTTools_ListNodeOfListOfCoupleOfShape.hxx | 123 + ...TTools_ListNodeOfListOfCoupleOfShape_0.cxx | 91 + src/NMTTools/NMTTools_ListOfCommonBlock.hxx | 150 + src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx | 42 + src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx | 150 + .../NMTTools_ListOfCoupleOfShape_0.cxx | 42 + src/NMTTools/NMTTools_PCurveMaker.cdl | 35 + src/NMTTools/NMTTools_PCurveMaker.cxx | 109 + src/NMTTools/NMTTools_PCurveMaker.hxx | 91 + src/NMTTools/NMTTools_PCurveMaker.ixx | 19 + src/NMTTools/NMTTools_PCurveMaker.jxx | 3 + src/NMTTools/NMTTools_PDSFiller.hxx | 22 + src/NMTTools/NMTTools_PPaveFiller.hxx | 22 + src/NMTTools/NMTTools_PaveFiller.cdl | 430 ++ src/NMTTools/NMTTools_PaveFiller.cxx | 211 + src/NMTTools/NMTTools_PaveFiller.hxx | 230 + src/NMTTools/NMTTools_PaveFiller.ixx | 19 + src/NMTTools/NMTTools_PaveFiller.jxx | 66 + src/NMTTools/NMTTools_PaveFiller_0.cxx | 118 + src/NMTTools/NMTTools_PaveFiller_1.cxx | 170 + src/NMTTools/NMTTools_PaveFiller_2.cxx | 211 + src/NMTTools/NMTTools_PaveFiller_3.cxx | 88 + src/NMTTools/NMTTools_PaveFiller_4.cxx | 1079 ++++ src/NMTTools/NMTTools_PaveFiller_5.cxx | 605 +++ src/NMTTools/NMTTools_PaveFiller_6.cxx | 1151 +++++ src/NMTTools/NMTTools_PaveFiller_7.cxx | 261 + src/NMTTools/NMTTools_PaveFiller_8.cxx | 595 +++ src/NMTTools/NMTTools_PaveFiller_9.cxx | 105 + src/NMTTools/NMTTools_Tools.cdl | 72 + src/NMTTools/NMTTools_Tools.cxx | 550 ++ src/NMTTools/NMTTools_Tools.hxx | 109 + src/NMTTools/NMTTools_Tools.ixx | 19 + src/NMTTools/NMTTools_Tools.jxx | 36 + src/OBJECT/GEOM_AISShape.cxx | 99 +- src/OBJECT/GEOM_AISShape.hxx | 1 + src/OBJECT/GEOM_AISShape.jxx | 2 +- src/OBJECT/GEOM_AISTrihedron.cxx | 72 + src/OBJECT/GEOM_AISTrihedron.hxx | 81 + src/OBJECT/GEOM_Actor.cxx | 44 +- src/OBJECT/GEOM_Actor.h | 15 +- src/OBJECT/GEOM_InteractiveObject.cxx | 27 +- src/OBJECT/GEOM_InteractiveObject.hxx | 20 +- src/OBJECT/GEOM_OCCReader.cxx | 17 +- src/OBJECT/GEOM_OCCReader.h | 7 +- src/OBJECT/GEOM_VTKTrihedron.cxx | 396 ++ src/OBJECT/GEOM_VTKTrihedron.hxx | 94 + src/OBJECT/Makefile.in | 13 +- src/OperationGUI/Makefile.in | 15 +- src/OperationGUI/OperationGUI.cxx | 418 +- src/OperationGUI/OperationGUI.h | 42 +- .../OperationGUI_ArchimedeDlg.cxx | 157 +- src/OperationGUI/OperationGUI_ArchimedeDlg.h | 48 +- src/OperationGUI/OperationGUI_ChamferDlg.cxx | 813 +-- src/OperationGUI/OperationGUI_ChamferDlg.h | 79 +- src/OperationGUI/OperationGUI_ClippingDlg.cxx | 392 ++ src/OperationGUI/OperationGUI_ClippingDlg.h | 81 + src/OperationGUI/OperationGUI_FilletDlg.cxx | 739 +-- src/OperationGUI/OperationGUI_FilletDlg.h | 73 +- src/OperationGUI/OperationGUI_MaterialDlg.cxx | 232 + src/OperationGUI/OperationGUI_MaterialDlg.h | 72 + .../OperationGUI_PartitionDlg.cxx | 514 +- src/OperationGUI/OperationGUI_PartitionDlg.h | 50 +- src/PARTITION/Partition_Inter2d.cxx | 2 +- src/PARTITION/Partition_Loop2d.cxx | 2 +- src/PARTITION/Partition_Spliter.cxx | 14 +- src/PrimitiveGUI/Makefile.in | 5 +- src/PrimitiveGUI/PrimitiveGUI.cxx | 193 +- src/PrimitiveGUI/PrimitiveGUI.h | 29 +- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 341 +- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h | 45 +- src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx | 396 +- src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h | 53 +- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 357 +- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h | 50 +- src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx | 271 +- src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h | 38 +- src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx | 351 +- src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h | 51 +- src/RepairGUI/Makefile.in | 27 +- src/RepairGUI/RepairGUI.cxx | 325 +- src/RepairGUI/RepairGUI.h | 33 +- src/RepairGUI/RepairGUI_CloseContourDlg.cxx | 392 ++ src/RepairGUI/RepairGUI_CloseContourDlg.h | 88 + src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx | 358 ++ .../RepairGUI_DivideEdgeDlg.h} | 59 +- src/RepairGUI/RepairGUI_FillingHoleDlg.cxx | 544 -- src/RepairGUI/RepairGUI_FillingHoleDlg.h | 133 - src/RepairGUI/RepairGUI_FreeBoundDlg.cxx | 289 ++ src/RepairGUI/RepairGUI_FreeBoundDlg.h | 93 + src/RepairGUI/RepairGUI_GlueDlg.cxx | 297 ++ src/RepairGUI/RepairGUI_GlueDlg.h | 79 + src/RepairGUI/RepairGUI_OrientationDlg.cxx | 404 -- src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx | 446 ++ src/RepairGUI/RepairGUI_RemoveHolesDlg.h | 95 + src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx | 388 ++ src/RepairGUI/RepairGUI_RemoveIntWiresDlg.h | 90 + src/RepairGUI/RepairGUI_SewingDlg.cxx | 318 +- src/RepairGUI/RepairGUI_SewingDlg.h | 86 +- src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx | 807 +++ src/RepairGUI/RepairGUI_ShapeProcessDlg.h | 141 + src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx | 306 +- src/RepairGUI/RepairGUI_SuppressFacesDlg.h | 45 +- src/RepairGUI/RepairGUI_SuppressHoleDlg.cxx | 748 --- src/RepairGUI/RepairGUI_SuppressHoleDlg.h | 112 - src/SKETCHER/Sketcher_Profile.cxx | 45 +- src/STEPExport/Makefile.in | 45 + src/STEPExport/STEPExport.cxx | 49 + src/STEPImport/Makefile.in | 45 + src/STEPImport/STEPImport.cxx | 110 + src/ShHealOper/Makefile.in | 80 + src/ShHealOper/ShHealOper_CloseContour.cxx | 407 ++ src/ShHealOper/ShHealOper_CloseContour.hxx | 140 + src/ShHealOper/ShHealOper_EdgeDivide.cxx | 256 + src/ShHealOper/ShHealOper_EdgeDivide.hxx | 94 + src/ShHealOper/ShHealOper_FillHoles.cxx | 468 ++ src/ShHealOper/ShHealOper_FillHoles.hxx | 119 + src/ShHealOper/ShHealOper_RemoveFace.cxx | 444 ++ src/ShHealOper/ShHealOper_RemoveFace.hxx | 86 + .../ShHealOper_RemoveInternalWires.cxx | 154 + .../ShHealOper_RemoveInternalWires.hxx | 83 + src/ShHealOper/ShHealOper_Sewing.cxx | 282 ++ src/ShHealOper/ShHealOper_Sewing.hxx | 152 + src/ShHealOper/ShHealOper_ShapeProcess.cxx | 161 + src/ShHealOper/ShHealOper_ShapeProcess.hxx | 131 + src/ShHealOper/ShHealOper_SpiltCurve2d.hxx | 66 + src/ShHealOper/ShHealOper_SplitCurve2d.cxx | 47 + src/ShHealOper/ShHealOper_SplitCurve2d.hxx | 66 + src/ShHealOper/ShHealOper_SplitCurve3d.cxx | 46 + src/ShHealOper/ShHealOper_SplitCurve3d.hxx | 66 + src/ShHealOper/ShHealOper_Tool.cxx | 60 + src/ShHealOper/ShHealOper_Tool.hxx | 108 + src/TransformationGUI/Makefile.in | 11 +- src/TransformationGUI/TransformationGUI.cxx | 279 +- src/TransformationGUI/TransformationGUI.h | 38 +- .../TransformationGUI_MirrorDlg.cxx | 424 +- .../TransformationGUI_MirrorDlg.h | 43 +- .../TransformationGUI_MultiRotationDlg.cxx | 378 +- .../TransformationGUI_MultiRotationDlg.h | 40 +- .../TransformationGUI_MultiTranslationDlg.cxx | 489 +- .../TransformationGUI_MultiTranslationDlg.h | 51 +- .../TransformationGUI_OffsetDlg.cxx | 346 ++ .../TransformationGUI_OffsetDlg.h} | 62 +- .../TransformationGUI_PositionDlg.cxx | 438 ++ .../TransformationGUI_PositionDlg.h} | 67 +- .../TransformationGUI_RotationDlg.cxx | 344 +- .../TransformationGUI_RotationDlg.h | 48 +- .../TransformationGUI_ScaleDlg.cxx | 329 +- .../TransformationGUI_ScaleDlg.h | 47 +- .../TransformationGUI_TranslationDlg.cxx | 500 +- .../TransformationGUI_TranslationDlg.h | 38 +- 983 files changed, 118713 insertions(+), 25845 deletions(-) delete mode 100644 doc/html/INPUT/HTML/GEOM_Gen.html delete mode 100644 doc/html/INPUT/HTML/GEOM_Shape.html delete mode 100755 doc/html/INPUT/doxyfile delete mode 100755 doc/html/INPUT/sources/Application-About.png delete mode 100755 doc/html/INPUT/sources/Application-About1.jpg delete mode 100644 doc/html/INPUT/sources/application.gif delete mode 100755 doc/html/INPUT/sources/application.jpg delete mode 100755 doc/html/INPUT/sources/bg_salome.gif delete mode 100755 doc/html/INPUT/sources/logocorp.gif delete mode 100755 doc/html/INPUT/sources/myheader.html delete mode 100755 doc/html/INPUT/sources/occ.gif delete mode 100755 doc/html/INPUT/sources/static/doxygen.css delete mode 100755 doc/html/INPUT/sources/static/page2.html delete mode 100755 doc/html/INPUT/sources/static/tree.js delete mode 100644 doc/html/INPUT/sources/static/treeview.js delete mode 100644 doc/html/Makefile.in create mode 100755 doc/salome/gui/GEOM/blocks.htm create mode 100755 doc/salome/gui/GEOM/geom_help.html create mode 100755 doc/salome/gui/GEOM/geom_help_csh.html create mode 100755 doc/salome/gui/GEOM/geom_help_rhc.html create mode 100755 doc/salome/gui/GEOM/image144.jpg create mode 100755 doc/salome/gui/GEOM/image145.jpg create mode 100755 doc/salome/gui/GEOM/image146.jpg create mode 100755 doc/salome/gui/GEOM/image147.jpg create mode 100755 doc/salome/gui/GEOM/image149.jpg create mode 100755 doc/salome/gui/GEOM/image150.jpg create mode 100755 doc/salome/gui/GEOM/image151.jpg create mode 100755 doc/salome/gui/GEOM/image152.jpg create mode 100755 doc/salome/gui/GEOM/image154.jpg create mode 100755 doc/salome/gui/GEOM/image156.jpg create mode 100755 doc/salome/gui/GEOM/image158.jpg create mode 100755 doc/salome/gui/GEOM/image160.jpg create mode 100755 doc/salome/gui/GEOM/image161.jpg create mode 100755 doc/salome/gui/GEOM/image163.jpg create mode 100755 doc/salome/gui/GEOM/image164.jpg create mode 100755 doc/salome/gui/GEOM/image165.jpg create mode 100755 doc/salome/gui/GEOM/image166.jpg create mode 100755 doc/salome/gui/GEOM/image167.jpg create mode 100755 doc/salome/gui/GEOM/image168.jpg create mode 100755 doc/salome/gui/GEOM/image169.jpg create mode 100755 doc/salome/gui/GEOM/image170.jpg create mode 100755 doc/salome/gui/GEOM/image171.jpg create mode 100755 doc/salome/gui/GEOM/image172.jpg create mode 100755 doc/salome/gui/GEOM/image173.jpg create mode 100755 doc/salome/gui/GEOM/image175.jpg create mode 100755 doc/salome/gui/GEOM/image176.jpg create mode 100755 doc/salome/gui/GEOM/image179.jpg create mode 100755 doc/salome/gui/GEOM/image180.jpg create mode 100755 doc/salome/gui/GEOM/image181.jpg create mode 100755 doc/salome/gui/GEOM/image182.jpg create mode 100755 doc/salome/gui/GEOM/image183.jpg create mode 100755 doc/salome/gui/GEOM/image184.jpg create mode 100755 doc/salome/gui/GEOM/image185.jpg create mode 100755 doc/salome/gui/GEOM/image186.jpg create mode 100755 doc/salome/gui/GEOM/image187.jpg create mode 100755 doc/salome/gui/GEOM/image188.jpg create mode 100755 doc/salome/gui/GEOM/image189.jpg create mode 100755 doc/salome/gui/GEOM/image190.jpg create mode 100755 doc/salome/gui/GEOM/image191.jpg create mode 100755 doc/salome/gui/GEOM/image192.jpg create mode 100755 doc/salome/gui/GEOM/image193.jpg create mode 100755 doc/salome/gui/GEOM/image194.jpg create mode 100755 doc/salome/gui/GEOM/image196.jpg create mode 100755 doc/salome/gui/GEOM/image197.jpg create mode 100755 doc/salome/gui/GEOM/image199.jpg create mode 100755 doc/salome/gui/GEOM/image200.jpg create mode 100755 doc/salome/gui/GEOM/image201.jpg create mode 100755 doc/salome/gui/GEOM/image202.jpg create mode 100755 doc/salome/gui/GEOM/image203.jpg create mode 100755 doc/salome/gui/GEOM/image204.jpg create mode 100755 doc/salome/gui/GEOM/image205.jpg create mode 100755 doc/salome/gui/GEOM/image206.jpg create mode 100755 doc/salome/gui/GEOM/image207.jpg create mode 100755 doc/salome/gui/GEOM/image208.jpg create mode 100755 doc/salome/gui/GEOM/image209.jpg create mode 100755 doc/salome/gui/GEOM/image210.jpg create mode 100755 doc/salome/gui/GEOM/image211.jpg create mode 100755 doc/salome/gui/GEOM/image212.jpg create mode 100755 doc/salome/gui/GEOM/image213.jpg create mode 100755 doc/salome/gui/GEOM/image214.jpg create mode 100755 doc/salome/gui/GEOM/image215.jpg create mode 100755 doc/salome/gui/GEOM/image216.jpg create mode 100755 doc/salome/gui/GEOM/image217.jpg create mode 100755 doc/salome/gui/GEOM/image218.jpg create mode 100755 doc/salome/gui/GEOM/image219.jpg create mode 100755 doc/salome/gui/GEOM/image220.jpg create mode 100755 doc/salome/gui/GEOM/image29.gif create mode 100755 doc/salome/gui/GEOM/image32.gif create mode 100755 doc/salome/gui/GEOM/image35.gif create mode 100755 doc/salome/gui/GEOM/image37.gif create mode 100755 doc/salome/gui/GEOM/image41.gif create mode 100755 doc/salome/gui/GEOM/image42.gif create mode 100755 doc/salome/gui/GEOM/image44.gif create mode 100755 doc/salome/gui/GEOM/image49.gif create mode 100755 doc/salome/gui/GEOM/image51.gif create mode 100755 doc/salome/gui/GEOM/image52.gif create mode 100755 doc/salome/gui/GEOM/image53.gif create mode 100755 doc/salome/gui/GEOM/image56.gif create mode 100755 doc/salome/gui/GEOM/image57.gif create mode 100755 doc/salome/gui/GEOM/image59.gif create mode 100755 doc/salome/gui/GEOM/image61.gif create mode 100755 doc/salome/gui/GEOM/newentity_blocks.htm create mode 100755 doc/salome/gui/GEOM/sketcher.htm create mode 100755 doc/salome/gui/GEOM/whgdata/whlstf3.htm create mode 100755 doc/salome/gui/GEOM/whgdata/whlstf4.htm create mode 100755 doc/salome/gui/GEOM/whgdata/whlstf5.htm create mode 100755 doc/salome/gui/GEOM/whgdata/whlstfl21.htm create mode 100755 doc/salome/gui/GEOM/whgdata/whlstfl22.htm create mode 100755 doc/salome/gui/GEOM/working_with_groups.htm delete mode 100644 idl/GEOM_Shape.idl create mode 100644 idl/GEOM_Superv.idl create mode 100644 resources/ImportExport create mode 100644 resources/ShHealing create mode 100644 resources/bezier.png create mode 100644 resources/block_2f.png create mode 100644 resources/block_6f.png create mode 100644 resources/block_face_2e.png create mode 100644 resources/block_face_4e.png create mode 100644 resources/block_face_4v.png create mode 100644 resources/block_multitrsf_double.png create mode 100644 resources/block_multitrsf_simple.png create mode 100644 resources/circle3points.png create mode 100644 resources/closecontour.png create mode 100755 resources/coordsys.png create mode 100644 resources/displayonly.png create mode 100755 resources/free_bound.png create mode 100644 resources/glue.png create mode 100644 resources/group_edit.png create mode 100644 resources/group_new.png create mode 100644 resources/interpol.png create mode 100644 resources/marker.png create mode 100644 resources/marker2.png create mode 100644 resources/marker3.png create mode 100644 resources/mirrorAxe.png create mode 100644 resources/mirrorPoint.png create mode 100644 resources/offset.png create mode 100644 resources/partitionplane.png create mode 100644 resources/plane3points.png create mode 100644 resources/planeworkingorigin.png create mode 100644 resources/planeworkingvector.png create mode 100644 resources/point3.png create mode 100644 resources/point_coord.png create mode 100644 resources/polyline.png create mode 100644 resources/position.png create mode 100644 resources/position2.png create mode 100644 resources/shapeprocess.png create mode 100644 resources/spline.png create mode 100755 resources/subblock.png create mode 100644 resources/suppressintwires.png create mode 100644 resources/translationDxyz.png create mode 100644 resources/translationPoints.png create mode 100644 resources/translationVector.png create mode 100644 resources/tree_block.png create mode 100644 resources/tree_group_edge.png create mode 100644 resources/tree_group_face.png create mode 100644 resources/tree_group_solid.png create mode 100644 resources/tree_group_vertex.png create mode 100644 resources/tree_lcs.png create mode 100644 src/BREPExport/BREPExport.cxx create mode 100644 src/BREPExport/Makefile.in create mode 100644 src/BREPImport/BREPImport.cxx create mode 100644 src/BREPImport/Makefile.in create mode 100644 src/BasicGUI/BasicGUI_CurveDlg.cxx rename src/{BooleanGUI/BooleanGUI_FuseDlg.h => BasicGUI/BasicGUI_CurveDlg.h} (58%) create mode 100644 src/BasicGUI/BasicGUI_MarkerDlg.cxx create mode 100644 src/BasicGUI/BasicGUI_MarkerDlg.h create mode 100644 src/BlocksGUI/BlocksGUI.cxx create mode 100644 src/BlocksGUI/BlocksGUI.h create mode 100644 src/BlocksGUI/BlocksGUI_BlockDlg.cxx create mode 100644 src/BlocksGUI/BlocksGUI_BlockDlg.h create mode 100644 src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx create mode 100644 src/BlocksGUI/BlocksGUI_ExplodeDlg.h create mode 100644 src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx create mode 100644 src/BlocksGUI/BlocksGUI_QuadFaceDlg.h create mode 100644 src/BlocksGUI/BlocksGUI_TrsfDlg.cxx create mode 100644 src/BlocksGUI/BlocksGUI_TrsfDlg.h create mode 100644 src/BlocksGUI/Makefile.in delete mode 100644 src/BooleanGUI/BooleanGUI_CommonDlg.cxx delete mode 100644 src/BooleanGUI/BooleanGUI_CutDlg.cxx create mode 100644 src/BooleanGUI/BooleanGUI_Dialog.cxx rename src/BooleanGUI/{BooleanGUI_CommonDlg.h => BooleanGUI_Dialog.h} (65%) delete mode 100644 src/BooleanGUI/BooleanGUI_FuseDlg.cxx delete mode 100644 src/BooleanGUI/BooleanGUI_SectionDlg.cxx create mode 100644 src/DlgRef/DlgRef_1List1Spin1Btn_QTD.cxx create mode 100644 src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h create mode 100644 src/DlgRef/DlgRef_1Sel_Ext.h rename src/DlgRef/{DlgRef_2Sel1Spin1Check.cxx => DlgRef_2Sel1Spin2Check.cxx} (79%) rename src/DlgRef/{DlgRef_2Sel1Spin1Check.h => DlgRef_2Sel1Spin2Check.h} (81%) rename src/DlgRef/{DlgRef_2Sel1Spin1Check_QTD.cxx => DlgRef_2Sel1Spin2Check_QTD.cxx} (67%) rename src/DlgRef/{DlgRef_2Sel1Spin1Check_QTD.h => DlgRef_2Sel1Spin2Check_QTD.h} (66%) create mode 100644 src/DlgRef/DlgRef_3Check_QTD.cxx create mode 100644 src/DlgRef/DlgRef_3Check_QTD.h create mode 100644 src/DlgRef/DlgRef_3Sel1Spin.cxx rename src/{GEOMDS/GEOMDS_Application.cxx => DlgRef/DlgRef_3Sel1Spin.h} (53%) create mode 100644 src/DlgRef/DlgRef_3Sel3Spin1Check.cxx rename src/{GEOMDS/GEOMDS_Application.jxx => DlgRef/DlgRef_3Sel3Spin1Check.h} (59%) create mode 100644 src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.cxx create mode 100644 src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h create mode 100644 src/DlgRef/DlgRef_4Sel1List1Check_QTD.cxx create mode 100644 src/DlgRef/DlgRef_4Sel1List1Check_QTD.h create mode 100644 src/DlgRef/DlgRef_6Sel_QTD.cxx create mode 100644 src/DlgRef/DlgRef_6Sel_QTD.h create mode 100644 src/DlgRef/UIFiles/DlgRef_1List1Spin1Btn_QTD.ui rename src/DlgRef/UIFiles/{DlgRef_2Sel1Spin1Check_QTD.ui => DlgRef_2Sel1Spin2Check_QTD.ui} (67%) create mode 100644 src/DlgRef/UIFiles/DlgRef_3Check_QTD.ui create mode 100644 src/DlgRef/UIFiles/DlgRef_3Sel3Spin1Check_QTD.ui create mode 100644 src/DlgRef/UIFiles/DlgRef_6Sel_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_1Sel_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_1Spin_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_2Spin_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_3Spin_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_4Spin_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_Dir1_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_Dir2_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_Point_QTD.ui create mode 100644 src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui create mode 100755 src/EntityGUI/UIFiles/ui_to_cxx create mode 100644 src/GEOM/GEOM_Application.cxx create mode 100644 src/GEOM/GEOM_Application.hxx create mode 100644 src/GEOM/GEOM_Application.ixx create mode 100644 src/GEOM/GEOM_Application.jxx create mode 100644 src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx create mode 100644 src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_0.cxx create mode 100644 src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx create mode 100644 src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_0.cxx create mode 100644 src/GEOM/GEOM_DataMapOfAsciiStringTransient.hxx create mode 100644 src/GEOM/GEOM_DataMapOfAsciiStringTransient_0.cxx create mode 100644 src/GEOM/GEOM_Engine.cxx create mode 100644 src/GEOM/GEOM_Engine.hxx create mode 100644 src/GEOM/GEOM_Function.cxx create mode 100644 src/GEOM/GEOM_Function.hxx delete mode 100644 src/GEOM/GEOM_Gen_i.hh create mode 100644 src/GEOM/GEOM_IOperations.cxx create mode 100644 src/GEOM/GEOM_IOperations.hxx create mode 100644 src/GEOM/GEOM_ISubShape.hxx create mode 100644 src/GEOM/GEOM_Object.cxx create mode 100644 src/GEOM/GEOM_Object.hxx delete mode 100644 src/GEOM/GEOM_Shape_i.cc delete mode 100644 src/GEOM/GEOM_Shape_i.hh create mode 100644 src/GEOM/GEOM_Solver.cxx create mode 100644 src/GEOM/GEOM_Solver.hxx create mode 100644 src/GEOM/GEOM_SubShapeDriver.cxx create mode 100644 src/GEOM/GEOM_SubShapeDriver.hxx create mode 100644 src/GEOM/Handle_GEOM_Application.hxx create mode 100644 src/GEOM/Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx create mode 100755 src/GEOMBase/GEOMBase_Helper.cxx create mode 100755 src/GEOMBase/GEOMBase_Helper.h create mode 100644 src/GEOMBase/GEOM_Operation.cxx create mode 100644 src/GEOMBase/GEOM_Operation.h delete mode 100644 src/GEOMDS/GEOMDS.cdl delete mode 100644 src/GEOMDS/GEOMDS_Application.cdl delete mode 100644 src/GEOMDS/GEOMDS_Application.ixx delete mode 100644 src/GEOMDS/GEOMDS_Commands.cdl delete mode 100644 src/GEOMDS/GEOMDS_Commands.hxx delete mode 100644 src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx delete mode 100644 src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_0.cxx delete mode 100644 src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx delete mode 100644 src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_0.cxx delete mode 100644 src/GEOMDS/GEOMDS_DataMapOfIntegerTransient.hxx delete mode 100644 src/GEOMDS/GEOMDS_DataMapOfIntegerTransient_0.cxx delete mode 100644 src/GEOMDS/GEOMDS_Explorer.cdl delete mode 100644 src/GEOMDS/GEOMDS_Explorer.cxx delete mode 100644 src/GEOMDS/GEOMDS_Explorer.hxx delete mode 100644 src/GEOMDS/GEOMDS_Explorer.jxx delete mode 100644 src/GEOMDS/Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx create mode 100644 src/GEOMFiltersSelection/GEOM_LogicalFilter.cxx create mode 100644 src/GEOMFiltersSelection/GEOM_LogicalFilter.hxx rename src/{GEOMDS/GEOMDS_Explorer.ixx => GEOMFiltersSelection/GEOM_PreviewFilter.cxx} (67%) rename src/{GEOMDS/GEOMDS_Application.hxx => GEOMFiltersSelection/GEOM_PreviewFilter.hxx} (57%) create mode 100644 src/GEOMFiltersSelection/GEOM_PreviewFilter.ixx rename src/{GEOMDS/GEOMDS_Commands.ixx => GEOMFiltersSelection/GEOM_PreviewFilter.jxx} (71%) create mode 100644 src/GEOMFiltersSelection/GEOM_TypeFilter.cxx create mode 100644 src/GEOMFiltersSelection/GEOM_TypeFilter.hxx rename src/{GEOMDS/Handle_GEOMDS_Application.hxx => GEOMFiltersSelection/Handle_GEOM_PreviewFilter.hxx} (55%) create mode 100644 src/GEOMGUI/GEOMGUI.cxx create mode 100644 src/GEOMGUI/GEOMGUI.h create mode 100644 src/GEOMGUI/GEOM_Displayer.cxx create mode 100644 src/GEOMGUI/GEOM_Displayer.h create mode 100644 src/GEOMGUI/GEOM_icons.po create mode 100644 src/GEOMGUI/GEOM_msg_en.po create mode 100644 src/GEOMGUI/GEOM_msg_fr.po create mode 100644 src/GEOMImpl/GEOMImpl_ArcDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ArcDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ArchimedeDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_Block6Explorer.cxx create mode 100644 src/GEOMImpl/GEOMImpl_Block6Explorer.hxx create mode 100644 src/GEOMImpl/GEOMImpl_BlockDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_BlockDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_BooleanDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_BooleanDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_BoxDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_BoxDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ChamferDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ChamferDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_CircleDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_CircleDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ConeDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ConeDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_CopyDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_CopyDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_CylinderDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_CylinderDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_EllipseDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_EllipseDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ExportDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ExportDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_FilletDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_FilletDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_FillingDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_FillingDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_Gen.cxx create mode 100644 src/GEOMImpl/GEOMImpl_Gen.hxx create mode 100644 src/GEOMImpl/GEOMImpl_GlueDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_GlueDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_HealingDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_HealingDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IArc.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IArchimede.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBasicOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IBasicOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBlockTrsf.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBlocks.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBoolean.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IBox.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IChamfer.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ICircle.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ICone.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ICopy.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ICylinder.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IEllipse.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IFillet.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IFilling.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IGlue.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IGroupOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IGroupOperations.hxx create mode 100755 src/GEOMImpl/GEOMImpl_IHealing.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IHealingOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IHealingOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IImportExport.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IInsertOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IInsertOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ILine.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ILocalOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ILocalOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IMarker.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IMeasure.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IMirror.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IOffset.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IPartition.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IPipe.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IPlane.hxx create mode 100755 src/GEOMImpl/GEOMImpl_IPoint.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IPolyline.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IPosition.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IPrism.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IRevolution.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IRotate.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IScale.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IShapes.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IShapesOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_IShapesOperations.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ISketcher.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ISphere.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ISpline.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ITorus.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ITransformOperations.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ITransformOperations.hxx create mode 100755 src/GEOMImpl/GEOMImpl_ITranslate.hxx create mode 100644 src/GEOMImpl/GEOMImpl_IVector.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ImportDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ImportDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_LineDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_LineDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_MarkerDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_MarkerDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_MeasureDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_MeasureDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_MirrorDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_MirrorDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_OffsetDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_OffsetDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PartitionDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PartitionDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PipeDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PipeDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PlaneDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PlaneDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PointDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PointDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PolylineDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PolylineDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PositionDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PositionDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_PrismDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_PrismDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_RevolutionDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_RotateDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_RotateDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ScaleDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ScaleDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_ShapeDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_ShapeDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_SketcherDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_SketcherDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_SphereDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_SphereDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_SplineDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_SplineDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_Template.cxx create mode 100644 src/GEOMImpl/GEOMImpl_Template.hxx create mode 100644 src/GEOMImpl/GEOMImpl_TorusDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_TorusDriver.hxx create mode 100644 src/GEOMImpl/GEOMImpl_TranslateDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_TranslateDriver.hxx create mode 100755 src/GEOMImpl/GEOMImpl_Types.hxx create mode 100644 src/GEOMImpl/GEOMImpl_VectorDriver.cxx create mode 100644 src/GEOMImpl/GEOMImpl_VectorDriver.hxx create mode 100755 src/GEOMImpl/GUID.txt create mode 100644 src/GEOMImpl/Makefile.in create mode 100644 src/GEOMToolsGUI/GEOMToolsGUI_1.cxx create mode 100644 src/GEOM_I/GEOM_Gen_i.cc create mode 100644 src/GEOM_I/GEOM_Gen_i.hh create mode 100644 src/GEOM_I/GEOM_I3DPrimOperations_i.cc create mode 100644 src/GEOM_I/GEOM_I3DPrimOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IBasicOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IBasicOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IBlocksOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IBlocksOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IBooleanOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IBooleanOperations_i.hh create mode 100644 src/GEOM_I/GEOM_ICurvesOperations_i.cc create mode 100644 src/GEOM_I/GEOM_ICurvesOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IGroupOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IGroupOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IHealingOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IHealingOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IInsertOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IInsertOperations_i.hh create mode 100644 src/GEOM_I/GEOM_ILocalOperations_i.cc create mode 100644 src/GEOM_I/GEOM_ILocalOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IMeasureOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IMeasureOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IOperations_i.hh create mode 100644 src/GEOM_I/GEOM_IShapesOperations_i.cc create mode 100644 src/GEOM_I/GEOM_IShapesOperations_i.hh create mode 100644 src/GEOM_I/GEOM_ITransformOperations_i.cc create mode 100644 src/GEOM_I/GEOM_ITransformOperations_i.hh create mode 100644 src/GEOM_I/GEOM_Object_i.cc create mode 100644 src/GEOM_I/GEOM_Object_i.hh create mode 100644 src/GEOM_I/Makefile.in create mode 100644 src/GEOM_I_Superv/GEOM_Superv_i.cc create mode 100644 src/GEOM_I_Superv/GEOM_Superv_i.hh rename src/{GEOMDS => GEOM_I_Superv}/Makefile.in (64%) create mode 100644 src/GEOM_SWIG/GEOM_Spanner.py create mode 100644 src/GEOM_SWIG/GEOM_TestAll.py create mode 100644 src/GEOM_SWIG/GEOM_TestHealing.py create mode 100644 src/GEOM_SWIG/GEOM_TestMeasures.py create mode 100644 src/GEOM_SWIG/GEOM_TestOthers.py create mode 100644 src/GEOM_SWIG/GEOM_blocks.py create mode 100644 src/GEOM_SWIG/GEOM_example5.py create mode 100644 src/GroupGUI/GroupGUI.cxx create mode 100644 src/GroupGUI/GroupGUI.h create mode 100644 src/GroupGUI/GroupGUI_GroupDlg.cxx create mode 100644 src/GroupGUI/GroupGUI_GroupDlg.h create mode 100755 src/GroupGUI/Makefile.in create mode 100644 src/IGESExport/IGESExport.cxx create mode 100644 src/IGESExport/Makefile.in create mode 100644 src/IGESImport/IGESImport.cxx create mode 100644 src/IGESImport/Makefile.in create mode 100644 src/MeasureGUI/MeasureGUI_PointDlg.cxx create mode 100644 src/MeasureGUI/MeasureGUI_PointDlg.h create mode 100644 src/NMTAlgo/Makefile.in create mode 100644 src/NMTAlgo/NMTAlgo.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Algo.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Algo.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Algo.hxx create mode 100644 src/NMTAlgo/NMTAlgo_Algo.ixx create mode 100644 src/NMTAlgo/NMTAlgo_Algo.jxx create mode 100644 src/NMTAlgo/NMTAlgo_Builder.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Builder.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Builder.hxx create mode 100644 src/NMTAlgo/NMTAlgo_Builder.ixx create mode 100644 src/NMTAlgo/NMTAlgo_Builder.jxx create mode 100644 src/NMTAlgo/NMTAlgo_Loop3d.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Loop3d.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Loop3d.hxx create mode 100644 src/NMTAlgo/NMTAlgo_Loop3d.ixx create mode 100644 src/NMTAlgo/NMTAlgo_Loop3d.jxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Splitter.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter.hxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter.ixx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter.jxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter1.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Splitter1.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter1.hxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter1.ixx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter1.jxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter_1.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Splitter_2.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Tools.cdl create mode 100644 src/NMTAlgo/NMTAlgo_Tools.cxx create mode 100644 src/NMTAlgo/NMTAlgo_Tools.hxx create mode 100644 src/NMTAlgo/NMTAlgo_Tools.ixx create mode 100644 src/NMTAlgo/NMTAlgo_Tools.jxx create mode 100644 src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx create mode 100644 src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx create mode 100644 src/NMTDS/Makefile.in create mode 100644 src/NMTDS/NMTDS.cdl create mode 100644 src/NMTDS/NMTDS_CArray1OfIndexRange.hxx create mode 100644 src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx create mode 100644 src/NMTDS/NMTDS_IndexRange.cdl create mode 100644 src/NMTDS/NMTDS_IndexRange.cxx create mode 100644 src/NMTDS/NMTDS_IndexRange.hxx create mode 100644 src/NMTDS/NMTDS_IndexRange.ixx create mode 100644 src/NMTDS/NMTDS_IndexRange.jxx create mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx create mode 100644 src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx create mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx create mode 100644 src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx create mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx create mode 100644 src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx create mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx create mode 100644 src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx create mode 100644 src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx create mode 100644 src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx create mode 100644 src/NMTDS/NMTDS_PShapesDataStructure.hxx create mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.cdl create mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.cxx create mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.hxx create mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.ixx create mode 100644 src/NMTDS/NMTDS_ShapesDataStructure.jxx create mode 100644 src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx create mode 100644 src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx create mode 100644 src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx create mode 100644 src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx create mode 100644 src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx create mode 100644 src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx create mode 100644 src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx create mode 100644 src/NMTTools/Makefile.in create mode 100644 src/NMTTools/NMTTools.cdl create mode 100644 src/NMTTools/NMTTools_CommonBlock.cdl create mode 100644 src/NMTTools/NMTTools_CommonBlock.cxx create mode 100644 src/NMTTools/NMTTools_CommonBlock.hxx create mode 100644 src/NMTTools/NMTTools_CommonBlock.ixx create mode 100644 src/NMTTools/NMTTools_CommonBlock.jxx create mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.cdl create mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.cxx create mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.hxx create mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.ixx create mode 100644 src/NMTTools/NMTTools_CommonBlockAPI.jxx create mode 100644 src/NMTTools/NMTTools_CommonBlockPool.hxx create mode 100644 src/NMTTools/NMTTools_CommonBlockPool_0.cxx create mode 100644 src/NMTTools/NMTTools_CoupleOfShape.cdl create mode 100644 src/NMTTools/NMTTools_CoupleOfShape.cxx create mode 100644 src/NMTTools/NMTTools_CoupleOfShape.hxx create mode 100644 src/NMTTools/NMTTools_CoupleOfShape.ixx create mode 100644 src/NMTTools/NMTTools_CoupleOfShape.jxx create mode 100644 src/NMTTools/NMTTools_DEProcessor.cdl create mode 100644 src/NMTTools/NMTTools_DEProcessor.cxx create mode 100644 src/NMTTools/NMTTools_DEProcessor.hxx create mode 100644 src/NMTTools/NMTTools_DEProcessor.ixx create mode 100644 src/NMTTools/NMTTools_DEProcessor.jxx create mode 100644 src/NMTTools/NMTTools_DSFiller.cdl create mode 100644 src/NMTTools/NMTTools_DSFiller.cxx create mode 100644 src/NMTTools/NMTTools_DSFiller.hxx create mode 100644 src/NMTTools/NMTTools_DSFiller.ixx create mode 100644 src/NMTTools/NMTTools_DSFiller.jxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx create mode 100644 src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx create mode 100644 src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl create mode 100644 src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx create mode 100644 src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx create mode 100644 src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx create mode 100644 src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx create mode 100644 src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx create mode 100644 src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx create mode 100644 src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx create mode 100644 src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx create mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx create mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx create mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx create mode 100644 src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx create mode 100644 src/NMTTools/NMTTools_ListOfCommonBlock.hxx create mode 100644 src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx create mode 100644 src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx create mode 100644 src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx create mode 100644 src/NMTTools/NMTTools_PCurveMaker.cdl create mode 100644 src/NMTTools/NMTTools_PCurveMaker.cxx create mode 100644 src/NMTTools/NMTTools_PCurveMaker.hxx create mode 100644 src/NMTTools/NMTTools_PCurveMaker.ixx create mode 100644 src/NMTTools/NMTTools_PCurveMaker.jxx create mode 100644 src/NMTTools/NMTTools_PDSFiller.hxx create mode 100644 src/NMTTools/NMTTools_PPaveFiller.hxx create mode 100644 src/NMTTools/NMTTools_PaveFiller.cdl create mode 100644 src/NMTTools/NMTTools_PaveFiller.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller.hxx create mode 100644 src/NMTTools/NMTTools_PaveFiller.ixx create mode 100644 src/NMTTools/NMTTools_PaveFiller.jxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_0.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_1.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_2.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_3.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_4.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_5.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_6.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_7.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_8.cxx create mode 100644 src/NMTTools/NMTTools_PaveFiller_9.cxx create mode 100644 src/NMTTools/NMTTools_Tools.cdl create mode 100644 src/NMTTools/NMTTools_Tools.cxx create mode 100644 src/NMTTools/NMTTools_Tools.hxx create mode 100644 src/NMTTools/NMTTools_Tools.ixx create mode 100644 src/NMTTools/NMTTools_Tools.jxx create mode 100755 src/OBJECT/GEOM_AISTrihedron.cxx create mode 100755 src/OBJECT/GEOM_AISTrihedron.hxx create mode 100644 src/OBJECT/GEOM_VTKTrihedron.cxx create mode 100644 src/OBJECT/GEOM_VTKTrihedron.hxx create mode 100644 src/OperationGUI/OperationGUI_ClippingDlg.cxx create mode 100644 src/OperationGUI/OperationGUI_ClippingDlg.h create mode 100644 src/OperationGUI/OperationGUI_MaterialDlg.cxx create mode 100644 src/OperationGUI/OperationGUI_MaterialDlg.h create mode 100644 src/RepairGUI/RepairGUI_CloseContourDlg.cxx create mode 100644 src/RepairGUI/RepairGUI_CloseContourDlg.h create mode 100644 src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx rename src/{BooleanGUI/BooleanGUI_CutDlg.h => RepairGUI/RepairGUI_DivideEdgeDlg.h} (58%) delete mode 100644 src/RepairGUI/RepairGUI_FillingHoleDlg.cxx delete mode 100644 src/RepairGUI/RepairGUI_FillingHoleDlg.h create mode 100644 src/RepairGUI/RepairGUI_FreeBoundDlg.cxx create mode 100644 src/RepairGUI/RepairGUI_FreeBoundDlg.h create mode 100644 src/RepairGUI/RepairGUI_GlueDlg.cxx create mode 100644 src/RepairGUI/RepairGUI_GlueDlg.h delete mode 100644 src/RepairGUI/RepairGUI_OrientationDlg.cxx create mode 100644 src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx create mode 100644 src/RepairGUI/RepairGUI_RemoveHolesDlg.h create mode 100644 src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx create mode 100644 src/RepairGUI/RepairGUI_RemoveIntWiresDlg.h create mode 100755 src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx create mode 100755 src/RepairGUI/RepairGUI_ShapeProcessDlg.h delete mode 100644 src/RepairGUI/RepairGUI_SuppressHoleDlg.cxx delete mode 100644 src/RepairGUI/RepairGUI_SuppressHoleDlg.h create mode 100644 src/STEPExport/Makefile.in create mode 100644 src/STEPExport/STEPExport.cxx create mode 100644 src/STEPImport/Makefile.in create mode 100644 src/STEPImport/STEPImport.cxx create mode 100644 src/ShHealOper/Makefile.in create mode 100644 src/ShHealOper/ShHealOper_CloseContour.cxx create mode 100644 src/ShHealOper/ShHealOper_CloseContour.hxx create mode 100644 src/ShHealOper/ShHealOper_EdgeDivide.cxx create mode 100644 src/ShHealOper/ShHealOper_EdgeDivide.hxx create mode 100644 src/ShHealOper/ShHealOper_FillHoles.cxx create mode 100644 src/ShHealOper/ShHealOper_FillHoles.hxx create mode 100644 src/ShHealOper/ShHealOper_RemoveFace.cxx create mode 100644 src/ShHealOper/ShHealOper_RemoveFace.hxx create mode 100644 src/ShHealOper/ShHealOper_RemoveInternalWires.cxx create mode 100644 src/ShHealOper/ShHealOper_RemoveInternalWires.hxx create mode 100644 src/ShHealOper/ShHealOper_Sewing.cxx create mode 100644 src/ShHealOper/ShHealOper_Sewing.hxx create mode 100644 src/ShHealOper/ShHealOper_ShapeProcess.cxx create mode 100644 src/ShHealOper/ShHealOper_ShapeProcess.hxx create mode 100644 src/ShHealOper/ShHealOper_SpiltCurve2d.hxx create mode 100644 src/ShHealOper/ShHealOper_SplitCurve2d.cxx create mode 100644 src/ShHealOper/ShHealOper_SplitCurve2d.hxx create mode 100644 src/ShHealOper/ShHealOper_SplitCurve3d.cxx create mode 100644 src/ShHealOper/ShHealOper_SplitCurve3d.hxx create mode 100644 src/ShHealOper/ShHealOper_Tool.cxx create mode 100644 src/ShHealOper/ShHealOper_Tool.hxx create mode 100644 src/TransformationGUI/TransformationGUI_OffsetDlg.cxx rename src/{RepairGUI/RepairGUI_OrientationDlg.h => TransformationGUI/TransformationGUI_OffsetDlg.h} (60%) create mode 100644 src/TransformationGUI/TransformationGUI_PositionDlg.cxx rename src/{BooleanGUI/BooleanGUI_SectionDlg.h => TransformationGUI/TransformationGUI_PositionDlg.h} (57%) diff --git a/INSTALL b/INSTALL index cd622460b..93cdd1b3f 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,3 @@ -This is the version 2.0.0 of GEOM +This is the version 2.1.0 of GEOM Compatible with : - - KERNEL 2.0.0 + - KERNEL 2.1.0 diff --git a/Makefile.in b/Makefile.in index d5c51e9cf..933016af0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -22,6 +22,8 @@ GEOM_fr.xml \ GEOM.config \ GEOMCatalog.xml \ GEOMDS_Resources \ +ImportExport \ +ShHealing \ arc.png \ archimede.png \ axisinertia.png \ @@ -44,6 +46,7 @@ chamferface.png \ check.png \ circle.png \ circlepointvector.png \ +circle3points.png \ common.png \ cone.png \ conedxyz.png \ @@ -54,6 +57,7 @@ cylinderdxyz.png \ cylinderpointvector.png \ delete.png \ display.png \ +displayonly.png \ displayall.png \ erase.png \ eraseall.png \ @@ -69,6 +73,8 @@ line2points.png \ lineedge.png \ linepointvector.png \ mindist.png \ +mirrorPoint.png \ +mirrorAxe.png \ mirrorPlane.png \ ModuleGeom.png \ multirotation.png \ @@ -77,18 +83,24 @@ multirotationsimple.png \ multitranslation.png \ multitranslationdouble.png \ multitranslationsimple.png \ +offset.png \ orientation.png \ partition.png \ partitionkeep.png \ +partitionplane.png \ pipe.png \ plane.png \ planeWorking.png \ planedxyz.png \ +plane3points.png \ planeface.png \ planepointvector.png \ planeworkingface.png \ +planeworkingvector.png \ +planeworkingorigin.png \ point2.png \ pointonedge.png \ +polyline.png \ prism.png \ revol.png \ rotate.png \ @@ -109,7 +121,9 @@ tolerance.png \ torus.png \ torusdxyz.png \ toruspointvector.png \ -translation.png \ +translationDxyz.png \ +translationPoints.png \ +translationVector.png \ tree_compound.png \ tree_compsolid.png \ tree_edge.png \ @@ -119,12 +133,43 @@ tree_shell.png \ tree_solid.png \ tree_vertex.png \ tree_wire.png \ +tree_group_vertex.png \ +tree_group_edge.png \ +tree_group_face.png \ +tree_group_solid.png \ +tree_lcs.png \ vector.png \ vector2points.png \ vectordxyz.png \ whatis.png \ ellipse.png \ -ellipsepointvector.png +ellipsepointvector.png \ +bezier.png \ +interpol.png \ +spline.png \ +closecontour.png \ +suppressintwires.png \ +marker.png \ +marker2.png \ +marker3.png \ +position.png \ +position2.png \ +free_bound.png \ +point_coord.png \ +point3.png \ +shapeprocess.png \ +block_2f.png \ +block_6f.png \ +block_face_2e.png \ +block_face_4e.png \ +block_face_4v.png \ +block_multitrsf_double.png \ +block_multitrsf_simple.png \ +tree_block.png \ +subblock.png \ +group_new.png \ +group_edit.png \ +glue.png BIN_SCRIPT= \ VERSION diff --git a/adm_local/unix/make_commence.in b/adm_local/unix/make_commence.in index 4d758b99f..3dd63a555 100644 --- a/adm_local/unix/make_commence.in +++ b/adm_local/unix/make_commence.in @@ -31,7 +31,7 @@ C_DEPEND_FLAG = @C_DEPEND_FLAG@ # C++ CXX = @CXX@ -CXXFLAGS = @CXXFLAGS@ -Wparentheses -Wreturn-type -Wmissing-declarations -Winline +CXXFLAGS = @CXXFLAGS@ CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@ # JAVA diff --git a/bin/VERSION b/bin/VERSION index 1b4eeb6eb..3a9335afe 100755 --- a/bin/VERSION +++ b/bin/VERSION @@ -1 +1 @@ -THIS IS SALOME - GEOM VERSION: 2.0.0 +THIS IS SALOME - GEOM VERSION: 2.1.0 diff --git a/build_configure b/build_configure index f2614b741..7d997f9e8 100755 --- a/build_configure +++ b/build_configure @@ -14,7 +14,6 @@ CONF_DIR=`echo $0 | sed -e "s,[^/]*$,,;s,/$,,;s,^$,.,"` ######################################################################## # Test if the KERNEL_ROOT_DIR is set correctly - if test ! -d "${KERNEL_ROOT_DIR}"; then echo "failed : KERNEL_ROOT_DIR variable is not correct !" exit diff --git a/doc/html/INPUT/HTML/GEOM_Gen.html b/doc/html/INPUT/HTML/GEOM_Gen.html deleted file mode 100644 index 4e9967c09..000000000 --- a/doc/html/INPUT/HTML/GEOM_Gen.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
interface GEOM_Gen
IDL file
Python
void GetCurrentStudy ( in long StudyID )
GetCurrentStudy ( StudyID )
short NbLabels ( )
return_value = NbLabels ( )
GEOM_Shape GetIORFromString ( in string ior )
return_value = GetIORFromString ( ior )
ListOfIOR GetReferencedObjects ( in GEOM_Shape shape )
return_value = GetReferencedObjects ( shape )
ListOfIOR GetObjects ( in GEOM_Shape shape )
return_value = GetObjects ( shape )
PointStruct MakePointStruct ( in double x, in double y, in double z )
return_value = MakePointStruct ( x, y, z )
DirStruct MakeDirection ( in PointStruct p )
return_value = MakeDirection ( p )
AxisStruct MakeAxisStruct ( in double x, in double y, in double z, in double vx, in double vy, in double vz )
return_value = MakeAxisStruct ( x, y, z, vx, vy, vz )
GEOM_Shape MakeBoolean ( in GEOM_Shape shape1, in GEOM_Shape shape2, in long operation )
return_value = MakeBoolean ( shape1, shape2, operation )
GEOM_Shape MakeFuse ( in GEOM_Shape shape1, in GEOM_Shape shape2 )
return_value = MakeFuse ( shape1, shape2 )
GEOM_Shape Partition ( in ListOfIOR ListShapes, in ListOfIOR ListTools, in ListOfIOR ListKeepInside, in ListOfIOR ListRemoveInside, in short Limit )
return_value = Partition ( ListShapes, ListTools, ListKeepInside, ListRemoveInside, Limit )
GEOM_Shape MakeFilling ( in GEOM_Shape shape, in short mindeg, in short maxdeg, in double tol3d, in double tol2d, in short nbiter )
return_value = MakeFilling ( shape, mindeg, maxdeg, tol3d, tol2d, nbiter )
GEOM_Shape MakeSewing ( in ListOfIOR ListShape, in double precision )
return_value = MakeSewing ( ListShape, precision )
GEOM_Shape MakeSewingShape ( in GEOM_Shape aShape, in double precision )
return_value = MakeSewingShape ( aShape, precision )
GEOM_Shape OrientationChange ( in GEOM_Shape shape )
return_value = OrientationChange ( shape )
GEOM_Shape MakePlacedBox ( in double x1, in double y1, in double z1, in double delta1, in double delta2, in double delta3 )
return_value = MakePlacedBox ( x1, y1, z1, delta1, delta2, delta3 )
GEOM_Shape MakePanel ( in GEOM_Shape shape, in short directiontype, in double delta )
return_value = MakePanel ( shape, directiontype, delta )
GEOM_Shape MakeGlueFaces ( in GEOM_Shape shape, in double tol3d )
return_value = MakeGlueFaces ( shape, tol3d )
GEOM_Shape MakeCopy ( in GEOM_Shape shape )
return_value = MakeCopy ( shape )
GEOM_Shape MakeTranslation ( in GEOM_Shape shape, in double x, in double y, in double z )
return_value = MakeTranslation ( shape, x, y, z )
GEOM_Shape MakeRotation ( in GEOM_Shape shape, in AxisStruct axis, in double angle )
return_value = MakeRotation ( shape, axis, angle )
GEOM_Shape MakeScaleTransform ( in GEOM_Shape shape, in PointStruct theCenterofScale, in double factor )
return_value = MakeScaleTransform ( shape, theCenterofScale, factor )
GEOM_Shape MakeMirrorByPlane ( in GEOM_Shape shape, in GEOM_Shape shapePlane )
return_value = MakeMirrorByPlane ( shape, shapePlane )
GEOM_Shape MakeRevolution ( in GEOM_Shape shape, in AxisStruct axis, in double angle )
return_value = MakeRevolution ( shape, axis, angle )
GEOM_Shape MakePrism ( in GEOM_Shape baseShape, in PointStruct P1, in PointStruct P2 )
return_value = MakePrism ( baseShape, P1, P2 )
GEOM_Shape MakePipe ( in GEOM_Shape pathShape, in GEOM_Shape baseShape )
return_value = MakePipe ( pathShape, baseShape )
GEOM_Shape MakeMultiTranslation1D ( in GEOM_Shape shape, in DirStruct dir, in double step, in short nbtimes )
return_value = MakeMultiTranslation1D ( shape, dir, step, nbtimes )
GEOM_Shape MakeMultiTranslation2D ( in GEOM_Shape shape, in DirStruct dir1, in double step1, in short nbtimes1, in DirStruct dir2, in double step2, in short nbtimes2 )
return_value = MakeMultiTranslation2D ( shape, dir1, step1, nbtimes1, dir2, step2, nbtimes2 )
GEOM_Shape MakeMultiRotation1D ( in GEOM_Shape shape, in DirStruct dir, in PointStruct loc, in short nbtimes )
return_value = MakeMultiRotation1D ( shape, dir, loc, nbtimes )
GEOM_Shape MakeMultiRotation2D ( in GEOM_Shape shape, in DirStruct dir, in PointStruct loc, in double ang, in short nbtimes1, in double step, in short nbtimes2 )
return_value = MakeMultiRotation2D ( shape, dir, loc, ang, nbtimes1, step, nbtimes2 )
GEOM_Shape MakeCDG ( in GEOM_Shape shape )
return_value = MakeCDG ( shape )
GEOM_Shape MakeVertex ( in double x, in double y, in double z )
return_value = MakeVertex ( x, y, z )
GEOM_Shape MakeVector ( in PointStruct pstruct1, in PointStruct pstruct2 )
return_value = MakeVector ( pstruct1, pstruct2 )
GEOM_Shape MakeLine ( in PointStruct pstruct, in DirStruct dstruct )
return_value = MakeLine ( pstruct, dstruct )
GEOM_Shape MakePlane ( in PointStruct pstruct, in DirStruct dstruct, in double trimsize )
return_value = MakePlane ( pstruct, dstruct, trimsize )
GEOM_Shape MakeCircle ( in PointStruct pstruct, in DirStruct dstruct, in double radius )
return_value = MakeCircle ( pstruct, dstruct, radius )
GEOM_Shape MakeArc ( in PointStruct pInit, in PointStruct pCircle, in PointStruct pEnd )
return_value = MakeArc ( pInit, pCircle, pEnd )
GEOM_Shape MakeBox ( in double x1, in double y1, in double z1, in double x2, in double y2, in double z2 )
return_value = MakeBox ( x1, y1, z1, x2, y2, z2 )
GEOM_Shape MakeCylinder ( in PointStruct pstruct, in DirStruct dstruct, in double radius, in double height )
return_value = MakeCylinder ( pstruct, dstruct, radius, height )
GEOM_Shape MakeSphere ( in double x1, in double y1, in double z1, in double radius )
return_value = MakeSphere ( x1, y1, z1, radius )
GEOM_Shape MakeTorus ( in PointStruct pstruct, in DirStruct dstruct, in double major_radius, in double minor_radius )
return_value = MakeTorus ( pstruct, dstruct, major_radius, minor_radius )
GEOM_Shape MakeCone ( in PointStruct pstruct, in DirStruct dstruct, in double radius1, in double radius2, in double height )
return_value = MakeCone ( pstruct, dstruct, radius1, radius2, height )
GEOM_Shape Archimede ( in GEOM_Shape shape, in double Weight, in double WaterDensity, in double MeshingDeflection )
return_value = Archimede ( shape, Weight, WaterDensity, MeshingDeflection )
GEOM_Shape MakeEdge ( in PointStruct pstruct1, in PointStruct pstruct2 )
return_value = MakeEdge ( pstruct1, pstruct2 )
GEOM_Shape MakeWire ( in ListOfIOR ListShape )
return_value = MakeWire ( ListShape )
GEOM_Shape MakeCompound ( in ListOfIOR ListShape )
return_value = MakeCompound ( ListShape )
GEOM_Shape MakeFace ( in GEOM_Shape shapeWire, in boolean wantplanarface )
return_value = MakeFace ( shapeWire, wantplanarface )
GEOM_Shape SubShape ( in GEOM_Shape shape, in short ShapeType, in ListOfSubShapeID ListOfID )
return_value = SubShape ( shape, ShapeType, ListOfID )
ListOfGeomShapes SubShapeAll ( in GEOM_Shape shape, in short ShapeType )
return_value = SubShapeAll ( shape, ShapeType )
GEOM_Shape SubShapeSorted ( in GEOM_Shape shape, in short ShapeType, in ListOfSubShapeID ListOfID )
return_value = SubShapeSorted ( shape, ShapeType, ListOfID )
ListOfGeomShapes SubShapeAllSorted ( in GEOM_Shape shape, in short ShapeType )
return_value = SubShapeAllSorted ( shape, ShapeType )
GEOM_Shape MakeFillet ( in GEOM_Shape shape, in double radius, in short ShapeType, in ListOfSubShapeID ListOfID )
return_value = MakeFillet ( shape, radius, ShapeType, ListOfID )
GEOM_Shape MakeChamfer ( in GEOM_Shape shape, in double d1, in double d2, in short ShapeType, in ListOfSubShapeID ListOfID )
return_value = MakeChamfer ( shape, d1, d2, ShapeType, ListOfID )
ListOfGeomShapes SuppressFaces ( in GEOM_Shape shape, in ListOfSubShapeID ListOfID )
return_value = SuppressFaces ( shape, ListOfID )
GEOM_Shape SuppressHole ( in GEOM_Shape shape, in ListOfSubShapeID ListOfIdFace, in ListOfSubShapeID ListOfIdWire, in ListOfSubShapeID ListOfIdEndFace )
return_value = SuppressHole ( shape, ListOfIdFace, ListOfIdWire, ListOfIdEndFace )
GEOM_Shape SuppressHolesInFaceOrShell ( in GEOM_Shape shapeFaceShell, in ListOfSubShapeID ListOfIdWires )
return_value = SuppressHolesInFaceOrShell ( shapeFaceShell, ListOfIdWires )
GEOM_Shape ImportIGES ( in string filename )
return_value = ImportIGES ( filename )
GEOM_Shape ImportBREP ( in string filename )
return_value = ImportBREP ( filename )
GEOM_Shape ImportSTEP ( in string filename )
return_value = ImportSTEP ( filename )
void ExportIGES ( in string filename, in GEOM_Shape theShape )
ExportIGES ( filename, theShape )
void ExportBREP ( in string filename, in GEOM_Shape theShape )
ExportBREP ( filename, theShape )
void ExportSTEP ( in string filename, in GEOM_Shape theShape )
ExportSTEP ( filename, theShape )
boolean CheckShape ( in GEOM_Shape shape )
return_value = CheckShape ( shape )

-
diff --git a/doc/html/INPUT/HTML/GEOM_Shape.html b/doc/html/INPUT/HTML/GEOM_Shape.html deleted file mode 100644 index bfee3cd70..000000000 --- a/doc/html/INPUT/HTML/GEOM_Shape.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - -
interface GEOM_Shape
IDL file
Python
TMPFile GetShapeStream ( )
return_value = GetShapeStream ( )
GEOM_Gen Engine ( )
return_value = Engine ( )

-
diff --git a/doc/html/INPUT/doxyfile b/doc/html/INPUT/doxyfile deleted file mode 100755 index ce82f87d7..000000000 --- a/doc/html/INPUT/doxyfile +++ /dev/null @@ -1,201 +0,0 @@ -# Doxyfile 1.3-rc1 - -#--------------------------------------------------------------------------- -# General configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME - GEOM - v.2.0.0" -PROJECT_NUMBER = id#1.1 -OUTPUT_DIRECTORY = ../ -OUTPUT_LANGUAGE = English -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = NO -ALWAYS_DETAILED_SEC = YES -INLINE_INHERITED_MEMB = YES -FULL_PATH_NAMES = NO -STRIP_FROM_PATH = -INTERNAL_DOCS = YES -CASE_SENSE_NAMES = YES -SHORT_NAMES = NO -HIDE_SCOPE_NAMES = NO -VERBATIM_HEADERS = YES -SHOW_INCLUDE_FILES = YES -JAVADOC_AUTOBRIEF = YES -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = NO -DISTRIBUTE_GROUP_DOC = NO -TAB_SIZE = 5 -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ALIASES = -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 25 -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = YES -SHOW_USED_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = log.txt -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = ../../../share/salome/idl/GEOM_Gen.idl \ - ../../../share/salome/idl/GEOM_Shape.idl -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = sources/ -INPUT_FILTER = -FILTER_SOURCE_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = sources/myheader.html -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = YES -TOC_EXPAND = YES -DISABLE_INDEX = YES -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_SCHEMA = -XML_DTD = -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = NO -#--------------------------------------------------------------------------- -# Configuration::addtions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = NO -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = NO -TEMPLATE_RELATIONS = YES -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DOT_IMAGE_FORMAT = jpg -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1200 -GENERATE_LEGEND = NO -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::addtions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO -CGI_NAME = search.cgi -CGI_URL = -DOC_URL = -DOC_ABSPATH = -BIN_ABSPATH = /usr/local/bin/ -EXT_DOC_PATHS = diff --git a/doc/html/INPUT/sources/Application-About.png b/doc/html/INPUT/sources/Application-About.png deleted file mode 100755 index 7b58330d50856e28562e8f9ed80dae72d6e6dda3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19226 zcmd3NW1D8nvTb*Dq06>y+g-M8+qP}nwr$(CZMk`Se*^t}dY$LT{`eujCnm_J=(>KDWfO|El5}c= zL){8uRT>QM7yv~P`-j@l78b=YcnNGu0GDeR5@#>SRJ50KEZ~yOPf%R<03Uaf4N{F9 zwlf`?=nQ%=63T*TfDy+F&gOxS4!c$klc*R3r3M7WF#xRn542V;Xb;EpcKc&bd-G1{Bck4UzwWpx-U|N7l#O<50w~*lYc`;1bSfyq{Gbf@YyniNxQfxEk|B2_ z-q$K-7OYQzIOyF;%6TVQt=4q8{Ya^rl8eu9_JE zxeQP*pLD=(=wT)*y1!bv#+veou|ADWb33!*rkOirf;mT~uD>4PDu)j61VYVNs=~Y% zzNrm-*gR@CJT)?JJJjjiA2qBW%b<>4a!aaw6?k85f2Lx7@91>vdDD3Hu+<$Sdpioq zFr>CRLJUJ}+|Wu@29eVV**lr+Xtv&!vL_=RCN`<;;%K$ox}P=GZC2ubdsMv*d4D`< zdSP!DrufK4w|uI)2LbwYE-+ibcyBXmW-@Yax)j13Bnu$x&-dRuIAw-E7{vO&-v=nh zrbTHGbC2Nu=Z-2gW7#{59LbztS(}^&30uc>zn3ik)NtwFEqYuxSLhV zHQ-!nEQ|=`SkaSF#p`HBeB?ygOxXqhdT{*+QekH`rbN#cJ?iQ%B&H$dqGr}qq zh~=jGXJy@Mf@;GWEgP4v#iL6>+9d5Uq$hsVT*uD)E({vAg-%Pe5BU1bY8FC3DUWG2 zFVJI`Cw~#UsV{vXiAZV+c?ZWxc`WMWu+D{<_tz(yg)x+P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2UOraz?wg1$RjIv(uOcsrk?zhG%_xg2S!XixkiJu0-X}R2;Nf zKaf26uCLJWRDGKLZqt0MeKtF)0=!joc05<7p%xhaU7@K`1Ee_P(+%wv)Ab)u&%5B2fN1QKPZgnrEbdu zFL24YSKO5LyG(pA_RigaV7Nz#5H6wpXk`~(@j7k~kROiL1Mx2YYR4C(qFv{u(*1GX zE;R-~G*QA&Sb#dO&$?v-V2qexDdS!K(H;NO!2ApL=wGn*|LU=*vHaqg2pFY`X{M+CS?^^C-7V#3hTvL$iSkEKN2v z8^mA*y!n+RU!UU5-`tE0w^lzc=KVsp?yIdkD5Nmd$+lYt^ZJ^1An_n?>f%ZoT1!C~ z3v2HA_6}APph+tlDFs$dkJxa>D04%Ucz8>b3#nW}my?|o-?T?tuvX(NjfmEbE==n<1hhxK?}0=sYm ze*C8%vj&GYwhaIfMg^k|n+NFVFBCW`Fe;3FL29gl8iArrj?9!>=J}s+&c_U8!yadte(hY)0=41tOU|6{<1sN%i>}kWjd{&j3;S2z3U4x!yQ)2(8e%%( z#Pc)w-LXc%kpH)k{~nY7wv+$Exl`^h6V;3(mXB3$`CC*vQ*s+UBBN`3^W)#dk#pia z^vKocrzgxxk$V?#5a`HKX^fM8^3-6k6@}P?s|FQm*7xZ{0~4wzPjmG3lR@rs$D5|1iGPqy+K@Y`1-m{|1HFzW=NeRx(y= z$Nrmx&Cqz`s#>k5A>H~Cf1n%_Zq~Udb+H8q+;-=LhNK&@ZK*x*|KVRRq}QeY0oL4} Ao&W#< diff --git a/doc/html/INPUT/sources/application.gif b/doc/html/INPUT/sources/application.gif deleted file mode 100644 index 0b05d5c18ee88779d283508781836e2b151f606f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2602 zcmWlYYgkeT1Aq?~180Wokt? zN9KjhIWkmc<;NP*DKDKA7nyU+ypY}4Dr5PykNJGt`{Vuj{(Dn4CbQzUOMtb&aR7z= zOe3y?;W~z4$R^1EZ7-aRUCqX8HO?WK`Y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TC9VfKD+s&O=r4T6dx~>x9e7&gdYvo8^51ls#!DPMamTK%`aPJ6?q?+ z%yVDxb^Z406Q4}q)Ma`pwL@9=KH2nE%g+j0$PN+6w!7WCc0S)@-fuIzZ#hkAx*44E xJV2p&e;fZ&&B#yDAuHbPYtLW(<#g|%_lh@oH9azfmdriy#cs<|Z3p)MHvxBP8gc*t diff --git a/doc/html/INPUT/sources/bg_salome.gif b/doc/html/INPUT/sources/bg_salome.gif deleted file mode 100755 index 677b70468f798fe4fbc20fac3d706e61179ff12b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17294 zcmWh!hc_FJ_pQBxgosd75MqnbqNPT}ZYB2KYPM#JE;J#;icRgkH$_n^HWhodwTsfC z+R{&3zwht;0q>mm&bjBk`|f?Z`eEFvNThr>lhMa9I#5D0|0xVVIb zgruaTl$4aTw6u(jjI6AzoSYmIiIkU@S5Qz;R8&+_Qo4Eb=B-<|l$DiLR8&+|Rd3(E zedo>{H8nMLb@jVgML=?(Xj4;ql^R4<9~y z^vK`eKOi6=FfcGEC@45MI3y(G@#Du&o;(Q+4Gjwm3l9%}`t<3uXV0ELfBxddilaom# zQc6lnYHDg)T3UK~dPYV@W@ctqR#tX)c1}*t>({Syb93|Z^78ZZ3knJf3k!>iii(Si zOG-*gOH0ej%F4^jD=I1~D=Vw2s;aB2Yieq0YisN3>gwz38yXrK8ylONnwp!NTUuIL zTU*=O+S=RO-@JL#(b3V_+1b_A_4e)C?(XiMo}S*`-gocb_4W1j_xBGB3=9qq4h;>F z$>ibT;gOM%(b3Vdv9a;-@rj9v$;rv7sj2Dd>G$v7&&lp-m6g@i)wQ*?_4V}+A3l8i`0>-HPa7K>o12?kTU*=P+dDfuySux4dwZWh zf8O8UKR7rzJUsmJ<;&60(ed%|*RNl{efxHDa&mfldUkg9{rmUx^Yb4+e*FCT^VhFm z7Z(?omzTeP|Nig4|Ni{>^Y`!HfB*hnU0q52KLY+A3mS}9*Pbx#=$vpj*mnmX=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deleted file mode 100755 index 83ca543cd..000000000 --- a/doc/html/INPUT/sources/myheader.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Main Page - - - -  -
- - - - - - -
-
-
- - - - diff --git a/doc/html/INPUT/sources/occ.gif b/doc/html/INPUT/sources/occ.gif deleted file mode 100755 index ce017c8ae11236ef5c52eee1723657cb8b08989f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14790 zcmV;%IXT8hNk%v~VRQkY0QUd@1_TBOg`<>&4T;4JdIT4h$I-{foOVg3n-^whzoZv-R!6wSgo zd8iFsVia^~2;Ql+iLnuX7c0ux+OKvLsTV=p$y2eac}|U*=;-JMXL)pSb1-6Xxy6^W zCQAt`F?R%0NJmH#pRnrm^vbOXz^tt#Moh4XfIU1t26&LQ+1mzHTeSl%+1kbS_4B2q zq`telsD>Q4cwFY##Prt%$cvX6sLmvYIYxw}ad>Dt^G85xj_IEO`C@9fY~nxy30jcu;KFQ2h`1}ymOq+WU$udJH>PJW^6oiI+KETwH(|REUokENkjXNP$Yd}>4`9wO@IwTw4!M79 za5;*nTqZcCot(c%XdG^QnU|P$j}(ZgEX1lLuhT!As$^t(G`HjA%(^j{mO{jeRN3e2 znZ3cBGIWm`T2`*SdBe>7w^lDj72SvhIr(&6Fuywje?BN{m>iPFIZ>ktXfH0Yz{X zefp$HldQY4>Z(&mjT#CR=K`N|C;={lvP9#X6L&umgDN=m@$AKe&`2ggH4J%OK;Oc49TrXP|qkar|^5)Nn z0)=pD)1HAwR8;{|R-k|gCdd?m2dQOU1{r+t0UZ?5amy_dUS-*8s&uHzcHfC1;)o=Y z7)d1c)H4%=G|&)CFl@D`g%*E#Hrjv*nUZL!4_S9H@&0}Z_BgAYIaaK{}D{RIdh+J38Tih(Zi*SDI21J1YV zb|Zoa0--cxr5i;yE=oiFg)O(8b}EP<++w@$PXZMgFF2ZNI%7+JIc&|rovyOV!7qmU zS3{9mjB&w;Ao6XBAF~wQxe;5Vt;Z-N^jEkqYO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F&p$}dgHOis4ogs5H1u+oA5EkQ|!Cu^j;{;6I zbCFydUgIXtp#Y*F=e47go#ODRqdQ(60j8Wi3Zga=19LIr?9Jj1besb&o`5lw(3RFR z`du%kpx3<`JhE3IUSUTx1wZfuauF3HCg4B%V?a^?6)061vZLieWUY;&DL!OEs*^9C zoJp=^G+G&3NEAP20Y)m|WVIO^utCz89fhGGD#F@H2471?<3;2{J}8(s&i`aaCLK^w z0wtK-L5kK>2BlP*RxT=}=@nid^Z^3;qa+d-N17ZiLSK~!VgID!r*y_+ zLsn;QMkj4frS@FJD#oQyE!#43)_b@QC~_xyrl)#-6+>y3P!UzqH6`PE&L@4=r;n*( g7YNmO(t&i@r+@w@fO3RVWu=3~W`G{3R0ae9JDa2X1poj5 diff --git a/doc/html/INPUT/sources/static/doxygen.css b/doc/html/INPUT/sources/static/doxygen.css deleted file mode 100755 index 0a8e93d50..000000000 --- a/doc/html/INPUT/sources/static/doxygen.css +++ /dev/null @@ -1,49 +0,0 @@ -H1 { text-align: center; } -CAPTION { font-weight: bold } -A.qindex {} -A.qindexRef {} -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #4444ee } -A.codeRef { font-weight: normal; color: #4444ee } -A:hover { text-decoration: none; background-color: lightblue } -DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #CCCCCC } -DIV.ah { background-color: #CCCCCC; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: lightblue; font-weight: bold; } -TD.mdname1 { background-color: lightblue; font-weight: bold; color: #602020; } -TD.mdname { background-color: lightblue; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { background: url(sources/bg_salome.gif) } -TD.indexkey { - background-color: #CCCCCC; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TD.indexvalue { - background-color: #CCCCCC; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -span.keyword { color: #008000 } -span.keywordtype { color: #604020 } -span.keywordflow { color: #e08000 } -span.comment { color: #800000 } -span.preprocessor { color: #806020 } -span.stringliteral { color: #002080 } -span.charliteral { color: #008080 } diff --git a/doc/html/INPUT/sources/static/page2.html b/doc/html/INPUT/sources/static/page2.html deleted file mode 100755 index 54dab3f8e..000000000 --- a/doc/html/INPUT/sources/static/page2.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - Main Page - - - - -   -
- - - - - - - - -
- - -
-
- - -
- - diff --git a/doc/html/INPUT/sources/static/tree.js b/doc/html/INPUT/sources/static/tree.js deleted file mode 100755 index fdfc5a03c..000000000 --- a/doc/html/INPUT/sources/static/tree.js +++ /dev/null @@ -1,48 +0,0 @@ -foldersTree = gFld("SALOME v.2.0.0 ", "", "") - insDoc(foldersTree, gLnk("Main Page", "", "main.html")) - -aux1 = insFld(foldersTree, gFld("TUI Reference Guide", "")) - aux2 = insFld(aux1, gFld("Modules", "")) - aux3 = insFld(aux2, gFld("SALOME GEOMETRY module", "")) -/*! insDoc(aux3, gLnk("Overview", "", "overview_Geometry.html"))*/ - aux4 = insFld(aux3, gFld("Packages", "")) - insDoc(aux4, gLnk("GEOM", "", "namespaceGEOM.html")) -/*! insDoc(aux3, gLnk("Examples", "", "examples_GEOM.html")) -*/ - -/*! Data structures -*/ - insDoc(aux1, gLnk("Data Structures", "", "annotated.html")) - -/*! insDoc(aux1, gLnk("GEOM::GEOM_Gen", "", "interfaceGEOM_1_1GEOM__Gen.html")) - insDoc(aux1, gLnk("GEOM::GEOM_Shape", "", "interfaceGEOM_1_1GEOM__Shape.html")) -*/ - insDoc(aux1, gLnk("Class Hierarchy", "", "hierarchy.html")) - -/*! - aux3 = insFld(aux2, gFld("GEOM::GEOM_Gen", "", "interfaceGEOM_1_1GEOM__Gen.html")) - aux3 = insFld(aux2, gFld("GEOM::GEOM_Shape", "", "interfaceGEOM_1_1GEOM__Shape.html")) - aux3 = insFld(aux2, gFld("GEOM::AxisStruct", "", "structGEOM_1_1AxisStruct.html")) - aux3 = insFld(aux2, gFld("GEOM::DirStruct", "", "structGEOM_1_1DirStruct.html")) - aux3 = insFld(aux2, gFld("GEOM::PointStruct", "", "structGEOM_1_1PointStruct.html")) -*/ - insDoc(aux1, gLnk("Class methods list", "", "functions.html")) -/*! -aux1 = insFld(foldersTree, gFld("Namespace List", "", "namespaces.html")) - insDoc(aux1, gLnk("GEOM", "", "namespaceGEOM.html")) -*/ - insDoc(aux1, gLnk("Namespace Members", "", "namespacemembers.html")) - - insDoc(aux1, gLnk("File List", "", "files.html")) - -/*! - - insDoc(aux1, gLnk("GEOM_Gen.idl", "", "GEOM__Gen_8idl.html")) - insDoc(aux1, gLnk("GEOM_Shape.idl", "", "GEOM__Shape_8idl.html")) -*/ - -aux1 = insFld(foldersTree, gFld("IDL/Python mapping", "")) - insDoc(aux1, gLnk("Mapping of GEOMETRY IDL definitions to Python language", "", "page2.html")) - -/*! insDoc(foldersTree, gLnk("Graphical Class Hierarchy", "", "inherits.html")) -*/ diff --git a/doc/html/INPUT/sources/static/treeview.js b/doc/html/INPUT/sources/static/treeview.js deleted file mode 100644 index 55eb43d07..000000000 --- a/doc/html/INPUT/sources/static/treeview.js +++ /dev/null @@ -1,505 +0,0 @@ -//**************************************************************** -// You are free to copy the "Folder-Tree" script as long as you -// keep this copyright notice: -// Script found in: http://www.geocities.com/Paris/LeftBank/2178/ -// Author: Marcelino Alves Martins (martins@hks.com) December '97. -//**************************************************************** - -//Log of changes: -// 17 Feb 98 - Fix initialization flashing problem with Netscape -// -// 27 Jan 98 - Root folder starts open; support for USETEXTLINKS; -// make the ftien4 a js file -// -// DvH: Dec 2000 - Made some minor changes to support external -// references - -// Definition of class Folder -// ***************************************************************** - -function Folder(folderDescription, tagName, hreference) //constructor -{ - //constant data - this.desc = folderDescription - this.tagName = tagName - this.hreference = hreference - this.id = -1 - this.navObj = 0 - this.iconImg = 0 - this.nodeImg = 0 - this.isLastNode = 0 - - //dynamic data - this.isOpen = true - this.iconSrc = "ftv2folderopen.png" - this.children = new Array - this.nChildren = 0 - - //methods - this.initialize = initializeFolder - this.setState = setStateFolder - this.addChild = addChild - this.createIndex = createEntryIndex - this.hide = hideFolder - this.display = display - this.renderOb = drawFolder - this.totalHeight = totalHeight - this.subEntries = folderSubEntries - this.outputLink = outputFolderLink -} - -function setStateFolder(isOpen) -{ - var subEntries - var totalHeight - var fIt = 0 - var i=0 - - if (isOpen == this.isOpen) - return - - if (browserVersion == 2) - { - totalHeight = 0 - for (i=0; i < this.nChildren; i++) - totalHeight = totalHeight + this.children[i].navObj.clip.height - subEntries = this.subEntries() - if (this.isOpen) - totalHeight = 0 - totalHeight - for (fIt = this.id + subEntries + 1; fIt < nEntries; fIt++) - indexOfEntries[fIt].navObj.moveBy(0, totalHeight) - } - this.isOpen = isOpen - propagateChangesInState(this) -} - -function propagateChangesInState(folder) -{ - var i=0 - - if (folder.isOpen) - { - if (folder.nodeImg) - if (folder.isLastNode) - folder.nodeImg.src = "ftv2mlastnode.png" - else - folder.nodeImg.src = "ftv2mnode.png" - folder.iconImg.src = "ftv2folderopen.png" - for (i=0; i 0) - auxEv = "" - else - auxEv = "" - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + auxEv + "") -// leftSide = leftSide + "" - this.isLastNode = 1 - } - else - { - this.renderOb(leftSide + auxEv + "") - leftSide = leftSide + "" - this.isLastNode = 0 - } - else - this.renderOb("") - - if (nc > 0) - { - level = level + 1 - for (i=0 ; i < this.nChildren; i++) - { - if (i == this.nChildren-1) - this.children[i].initialize(level, 1, leftSide) - else - this.children[i].initialize(level, 0, leftSide) - } - } -} - -function drawFolder(leftSide) -{ - if (browserVersion == 2) { - if (!doc.yPos) - doc.yPos=8 - doc.write("") - } - if (browserVersion == 3) - { - doc.write("
") - } - - doc.write("\n") - doc.write("\n\n") - doc.write("\n
") - doc.write(leftSide) - this.outputLink() - doc.write("") - doc.write("") - if (USETEXTLINKS) - { - this.outputLink() - doc.write(this.desc + "") - } - else - doc.write(this.desc) - -/*! - if (this.tagName!="") - { - doc.write(" [external]") - } -*/ - doc.write("
\n") - - if (browserVersion == 2) { - doc.write("") - } - if (browserVersion == 3) { - doc.write("
") - } - - if (browserVersion == 1) { - this.navObj = doc.all["folder"+this.id] - this.iconImg = doc.all["folderIcon"+this.id] - this.nodeImg = doc.all["nodeIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["folder"+this.id] - this.iconImg = this.navObj.document.images["folderIcon"+this.id] - this.nodeImg = this.navObj.document.images["nodeIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("folder"+this.id) - this.iconImg = doc.images.namedItem("folderIcon"+this.id) - this.nodeImg = doc.images.namedItem("nodeIcon"+this.id) - } -} - -function outputFolderLink() -{ - if (this.hreference) - { - doc.write(" 0) - doc.write("onClick='javascript:clickOnFolder("+this.id+")'") - doc.write(">") - } - else - doc.write("") -} - -function addChild(childNode) -{ - this.children[this.nChildren] = childNode - this.nChildren++ - return childNode -} - -function folderSubEntries() -{ - var i = 0 - var se = this.nChildren - - for (i=0; i < this.nChildren; i++){ - if (this.children[i].children) //is a folder - se = se + this.children[i].subEntries() - } - - return se -} - - -// Definition of class Item (a document or link inside a Folder) -// ************************************************************* - -function Item(itemDescription, tagName, itemLink) // Constructor -{ - // constant data - this.desc = itemDescription - this.tagName = tagName - this.link = itemLink - this.id = -1 //initialized in initalize() - this.navObj = 0 //initialized in render() - this.iconImg = 0 //initialized in render() - this.iconSrc = "ftv2doc.png" - - // methods - this.initialize = initializeItem - this.createIndex = createEntryIndex - this.hide = hideItem - this.display = display - this.renderOb = drawItem - this.totalHeight = totalHeight -} - -function hideItem() -{ - if (browserVersion == 1 || browserVersion == 3) { - if (this.navObj.style.display == "none") - return - this.navObj.style.display = "none" - } else { - if (this.navObj.visibility == "hidden") - return - this.navObj.visibility = "hidden" - } -} - -function initializeItem(level, lastNode, leftSide) -{ - this.createIndex() - - if (level>0) - if (lastNode) //the last 'brother' in the children array - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - { - this.renderOb(leftSide + "") - leftSide = leftSide + "" - } - else - this.renderOb("") -} - -function drawItem(leftSide) -{ - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
") - - doc.write("\n\n") - doc.write("\n
") - doc.write(leftSide) - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (this.link!="") - { - doc.write("") - } - doc.write("") - if (USETEXTLINKS && this.link!="") - doc.write("" + this.desc + "") - else - doc.write(this.desc) -/*! - if (this.tagName!="") - { - doc.write(" [external]"); - } -*/ - doc.write("\n
\n") - - if (browserVersion == 2) - doc.write("") - if (browserVersion == 3) - doc.write("
") - - if (browserVersion == 1) { - this.navObj = doc.all["item"+this.id] - this.iconImg = doc.all["itemIcon"+this.id] - } else if (browserVersion == 2) { - this.navObj = doc.layers["item"+this.id] - this.iconImg = this.navObj.document.images["itemIcon"+this.id] - doc.yPos=doc.yPos+this.navObj.clip.height - } else if (browserVersion == 3) { - this.navObj = doc.getElementById("item"+this.id) - this.iconImg = doc.images.namedItem("itemIcon"+this.id) - } -} - - -// Methods common to both objects (pseudo-inheritance) -// ******************************************************** - -function display() -{ - if (browserVersion == 1 || browserVersion == 3) - this.navObj.style.display = "block" - else - this.navObj.visibility = "show" -} - -function createEntryIndex() -{ - this.id = nEntries - indexOfEntries[nEntries] = this - nEntries++ -} - -// total height of subEntries open -function totalHeight() //used with browserVersion == 2 -{ - var h = this.navObj.clip.height - var i = 0 - - if (this.isOpen) //is a folder and _is_ open - for (i=0 ; i < this.nChildren; i++) - h = h + this.children[i].totalHeight() - - return h -} - - -// Events -// ********************************************************* - -function clickOnFolder(folderId) -{ - var clicked = indexOfEntries[folderId] - - if (!clicked.isOpen) - clickOnNode(folderId) - - return - - if (clicked.isSelected) - return -} - -function clickOnNode(folderId) -{ - var clickedFolder = 0 - var state = 0 - - clickedFolder = indexOfEntries[folderId] - state = clickedFolder.isOpen - - clickedFolder.setState(!state) //open<->close -} - -function initializeDocument() -{ - doc = document; - if (doc.all) - browserVersion = 1 //IE4 - else - if (doc.layers) - browserVersion = 2 //NS4 - else if(navigator.userAgent.toLowerCase().indexOf('gecko') != -1) - browserVersion = 3 //mozilla - else - browserVersion = 0 //other - - foldersTree.initialize(0, 1, "") - foldersTree.display() - - if (browserVersion > 0) - { - if(browserVersion != 3) - doc.write(" ") - - // close the whole tree - clickOnNode(0) - // open the root folder - clickOnNode(0) - } -} - -// Auxiliary Functions for Folder-Treee backward compatibility -// ********************************************************* - -function gFld(description, tagName, hreference) -{ - folder = new Folder(description, tagName, hreference) - return folder -} - -function gLnk(description, tagName, linkData) -{ - fullLink = "" - - if (linkData!="") - { - fullLink = "'"+linkData+"' target=\"basefrm\"" - } - - linkItem = new Item(description, tagName, fullLink) - return linkItem -} - -function insFld(parentFolder, childFolder) -{ - return parentFolder.addChild(childFolder) -} - -function insDoc(parentFolder, document) -{ - parentFolder.addChild(document) -} - -// Global variables -// **************** - -USETEXTLINKS = 1 -indexOfEntries = new Array -nEntries = 0 -doc = document -browserVersion = 0 -selectedFolder=0 diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in deleted file mode 100644 index 135b2daef..000000000 --- a/doc/html/Makefile.in +++ /dev/null @@ -1,39 +0,0 @@ -# -* Makefile *- -# -# Author : Vasily Rusyaev (Open Cascade NN) -# Date : 13/02/2003 -# $Header: -# -# source path -top_srcdir=@top_srcdir@ -root_srcdir=@ROOT_SRCDIR@ -top_builddir=../.. -srcdir=@srcdir@ -VPATH=.:@srcdir@ -doxygen=@DOXYGEN@ - -@COMMENCE@ - -doc: - cp -fr $(srcdir)/INPUT ./; \ - cd INPUT; \ - sed 's|../../../share/salome|$(root_srcdir)|' doxyfile > doxyfile1; \ - mv -f doxyfile1 doxyfile; \ - $(doxygen) ./doxyfile; \ - cd ..; \ - cp -fr $(srcdir)/INPUT/sources/static/*.* ./html/ - cp -fr $(srcdir)/INPUT/sources/ html/ - cp -fr $(srcdir)/INPUT/HTML/ html/ - -clean: - rm -rf html - -distclean: clean - rm -rf INPUT - -install: - $(INSTALL) -d $(docdir); \ - cp -rf html $(docdir) - -uninstall: - rm -rf $(docdir)/html diff --git a/doc/salome/gui/GEOM/GEOM.log b/doc/salome/gui/GEOM/GEOM.log index af9c2ab24..e17a2ed87 100755 --- a/doc/salome/gui/GEOM/GEOM.log +++ b/doc/salome/gui/GEOM/GEOM.log @@ -127,6 +127,7 @@ whskin_frmset01.htm geom_hha.hhk geom.hhc geom.hhk +blocks.htm changing_displaying_parameters.htm files\introduction_to_geom.htm files\salome2_sp3_basicgui_functions.htm @@ -140,200 +141,267 @@ files\salome2_sp3_operationgui_functions.htm files\salome2_sp3_primitivegui_functions.htm files\salome2_sp3_repairgui_functions.htm files\salome2_sp3_transformationgui_functions.htm +newentity_blocks.htm +sketcher.htm +working_with_groups.htm geom.glo default.css -image23.gif -image59.jpg -image26.jpg -image12.gif -image15.jpg -files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image119.gif -files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image99.gif -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image77.gif +image61.gif +image191.jpg +image180.jpg +image109.jpg +image97.jpg +image86.jpg +image75.jpg +image53.jpg +image20.jpg +files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image131.gif +files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image31.gif +image192.jpg +image181.jpg +image51.gif +image170.jpg +image98.jpg +image87.jpg +image76.jpg +image65.jpg +image54.jpg +image21.jpg +image10.jpg +files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image132.gif +files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image121.gif +files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image32.gif +image193.jpg +image182.jpg +image52.gif +image171.jpg +image160.jpg +image41.gif +image99.jpg +image88.jpg +image66.jpg +image55.jpg +image22.jpg +image11.jpg +files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image133.gif +files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image122.gif +files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image87.gif image3.jpg +files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image33.gif +image194.jpg +image183.jpg +image53.gif +image172.jpg +image42.gif +image161.jpg +image150.jpg +image89.jpg +image78.jpg +image20.gif +image67.jpg +image56.jpg +image23.jpg +image12.jpg +files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image88.gif +files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image1.gif files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image34.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image16.gif +image184.jpg +image173.jpg +image151.jpg +image32.gif image140.jpg -image24.gif -image27.jpg -image13.gif -image16.jpg -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image78.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image17.gif -image141.jpg -image25.gif -image130.jpg -image28.jpg -image14.gif -image17.jpg +image79.jpg +image21.gif +image68.jpg +image57.jpg +image24.jpg +image13.jpg image2.gif image5.jpg -files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image130.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image18.gif +files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image89.gif +files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image2.gif +image196.jpg +image185.jpg +image44.gif +image163.jpg +image152.jpg +image141.jpg +image130.jpg +image22.gif +image69.jpg +image58.jpg +files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image51.gif +image11.gif +image14.jpg +files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image56.gif +files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image3.gif +image197.jpg +image56.gif +image186.jpg +image175.jpg +image164.jpg image142.jpg image131.jpg +image23.gif image120.jpg -image15.gif -image29.jpg -image18.jpg -files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image131.gif -files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image100.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image19.gif +image59.jpg +image26.jpg +image12.gif +image15.jpg +image7.jpg +image4.gif +files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image57.gif +files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image52.gif +files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image4.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image13.gif +image57.gif +image187.jpg +image176.jpg +image165.jpg +image154.jpg +image35.gif image132.jpg +image24.gif image121.jpg image110.jpg -image90.jpg -image16.gif -image19.jpg -image7.jpg -image4.gif -files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image132.gif -files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image101.gif +image27.jpg +image13.gif +image16.jpg +image8.jpg +image5.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image71.gif +files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image58.gif +files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image53.gif files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image27.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image14.gif +image199.jpg +image188.jpg +image166.jpg +image144.jpg image133.jpg +image25.gif image122.jpg image111.jpg image100.jpg -image91.jpg -image80.jpg -image17.gif -image8.jpg -image5.gif -files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image133.gif -files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image102.gif +image28.jpg +image14.gif +image17.jpg +image9.jpg +image6.gif +files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image128.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image72.gif +files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image59.gif +files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image54.gif files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image28.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image15.gif +i_blue.jpg +image200.jpg +image59.gif +image189.jpg +image167.jpg +image156.jpg +image37.gif +image145.jpg image134.jpg image123.jpg image112.jpg image101.jpg -image92.jpg -image81.jpg -image70.jpg -image9.jpg -image6.gif -files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image103.gif +image15.gif +image29.jpg +image18.jpg +image7.gif +files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image129.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image73.gif +files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image55.gif files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image29.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image16.gif +image201.jpg +image179.jpg +image49.gif +image168.jpg +image146.jpg image135.jpg image124.jpg image113.jpg image102.jpg -image93.jpg -image82.jpg -image71.jpg -image19.gif -image60.jpg -image7.gif -files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image120.gif -files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image87.gif -i_blue.jpg +image90.jpg +image16.gif +image19.jpg +image8.gif +files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image119.gif +files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image100.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image74.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image17.gif +image202.jpg +image169.jpg +image158.jpg +image147.jpg image136.jpg image125.jpg -image114.jpg image103.jpg -image94.jpg -image83.jpg -image72.jpg -image61.jpg -image8.gif -files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image121.gif -files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image88.gif +image91.jpg +image80.jpg +image17.gif +image9.gif +files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image101.gif +files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image90.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image75.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image18.gif +image203.jpg +image29.gif image137.jpg image126.jpg image115.jpg image104.jpg -image95.jpg -image84.jpg -image73.jpg -image62.jpg -image51.jpg -files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image51.gif -image9.gif -files\salome2_sp3_repairgui_functions_salome2_sp3_repairgui_functions_image122.gif -files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image89.gif +image92.jpg +image81.jpg +image70.jpg +files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image102.gif +files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image99.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image76.gif +salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image19.gif +image204.jpg +image149.jpg image138.jpg image127.jpg image116.jpg image105.jpg -image96.jpg -image85.jpg -image74.jpg -image63.jpg -image52.jpg -files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image52.gif -files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image1.gif +image93.jpg +image82.jpg +image71.jpg +image19.gif +image60.jpg +files\salome2_sp3_primitivegui_functions_salome2_sp3_primitivegui_functions_image103.gif +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image77.gif +image205.jpg image139.jpg image128.jpg image117.jpg image106.jpg -image97.jpg -image86.jpg -image75.jpg -image53.jpg -image20.jpg -files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image128.gif -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image71.gif -files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image56.gif -files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image53.gif -files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image2.gif +image94.jpg +image83.jpg +image72.jpg +image61.jpg +files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image78.gif +image206.jpg image129.jpg image118.jpg image107.jpg -image98.jpg -image87.jpg -image76.jpg -image65.jpg -image54.jpg -image21.jpg -image10.jpg -files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image129.gif -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image72.gif -files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image57.gif -files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image54.gif -files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image3.gif +image95.jpg +image84.jpg +image73.jpg +image62.jpg +image51.jpg +image190.jpg image119.jpg image108.jpg -image99.jpg -image88.jpg -image77.jpg -image66.jpg -image55.jpg -image22.jpg -image11.jpg -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image73.gif -files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image58.gif -files\salome2_sp3_displaygui_functions_salome2_sp3_displaygui_functions_image55.gif -files\salome2_sp3_booleangui_functions_salome2_sp3_booleangui_functions_image4.gif +image96.jpg +image85.jpg +image74.jpg +image63.jpg +image52.jpg +files\salome2_sp3_transformationgui_functions_salome2_sp3_transformationgui_functions_image130.gif files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image30.gif -image109.jpg -image89.jpg -image78.jpg -image20.gif -image67.jpg -image56.jpg -image23.jpg -image12.jpg -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image74.gif -files\salome2_sp3_generationgui_functions_salome2_sp3_generationgui_functions_image59.gif -files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image31.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image13.gif -image79.jpg -image21.gif -image68.jpg -image57.jpg -image24.jpg -image13.jpg -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image75.gif -files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image32.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image14.gif -image22.gif -image69.jpg -image58.jpg -image11.gif -image14.jpg -files\salome2_sp3_operationgui_functions_salome2_sp3_operationgui_functions_image90.gif -files\salome2_sp3_measuregui_functions_salome2_sp3_measuregui_functions_image76.gif -files\salome2_sp3_basicgui_functions_salome2_sp3_basicgui_functions_image33.gif -salome2_sp3_buildgui_functions_salome2_sp3_buildgui_functions_image15.gif ehlpdhtm.js geom.ppf default_ns.css @@ -372,9 +440,14 @@ whgdata\whlstfl17.htm whgdata\whlstfl18.htm whgdata\whlstfl19.htm whgdata\whlstfl20.htm +whgdata\whlstfl21.htm +whgdata\whlstfl22.htm whgdata\whlstf0.htm whgdata\whlstf1.htm whgdata\whlstf2.htm +whgdata\whlstf3.htm +whgdata\whlstf4.htm +whgdata\whlstf5.htm whgdata\whlstg0.htm geom.html geom_csh.html diff --git a/doc/salome/gui/GEOM/blocks.htm b/doc/salome/gui/GEOM/blocks.htm new file mode 100755 index 000000000..ce53dbc61 --- /dev/null +++ b/doc/salome/gui/GEOM/blocks.htm @@ -0,0 +1,144 @@ + + + + + + + + + + +Building of blocks + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Building of blocks

+ +

 

+ +
+ +

 

+ +

 

+ +

To use these options:

+ +

 

+ +

In the main menu select Blocks + submenu.

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ +

 

+ + + + + diff --git a/doc/salome/gui/GEOM/changing_displaying_parameters.htm b/doc/salome/gui/GEOM/changing_displaying_parameters.htm index d6f8f8527..db074bc3b 100755 --- a/doc/salome/gui/GEOM/changing_displaying_parameters.htm +++ b/doc/salome/gui/GEOM/changing_displaying_parameters.htm @@ -19,8 +19,8 @@ - - + + @@ -131,7 +131,7 @@ else href="#Transparency">Transparency

  • Isos

  • + href="#Isos">Isos (in OCC viewer only)

     

    diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions.htm index bc3fb8856..dc3c7060b 100755 --- a/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions.htm +++ b/doc/salome/gui/GEOM/files/salome2_sp3_basicgui_functions.htm @@ -29,8 +29,8 @@ - - + + @@ -64,28 +64,82 @@ p.whs4 {font-size: 12pt;} p.whs5 {margin-left: 40px;} p.whs6 {font-family: 'Times New Roman', serif; font-size: 14pt;} img_whs7 {border-style: none; width: 20px; height: 20px;} -p.whs8 {font-size: 12pt; margin-left: 40px;} -img_whs9 {border-style: none; border: none; width: 200px; height: 176px;} -p.whs10 {color: #808080; font-size: 12pt;} -p.whs11 {font-size: 12pt; color: #000000;} -p.whs12 {color: #808080; font-size: 12pt; margin-left: 40px;} -img_whs13 {border-style: none; border: none; width: 150px; height: 140px;} -img_whs14 {border-style: none; border: none; width: 150px; height: 139px;} -img_whs15 {border-style: none; border: none; width: 200px; height: 193px;} -img_whs16 {border-style: none; border: none; width: 150px; height: 129px;} -img_whs17 {border-style: none; border: none; width: 200px; height: 211px;} -p.whs18 {font-size: 12pt; margin-left: 40px; font-weight: bold;} -img_whs19 {border-style: none; border: none; width: 150px; height: 154px;} -img_whs20 {border-style: none; border: none; width: 200px; height: 202px;} -img_whs21 {border-style: none; border: none; width: 150px; height: 123px;} -img_whs22 {border-style: none; border: none; width: 200px; height: 175px;} -img_whs23 {border-style: none; border: none; width: 150px; height: 128px;} -img_whs24 {border-style: none; border: none; width: 200px; height: 192px;} -p.whs25 {font-size: 12pt; font-weight: bold; color: #000000;} -img_whs26 {border-style: none; border: none; width: 150px; height: 131px;} -img_whs27 {border-style: none; border: none; width: 200px; height: 148px;} -p.whs28 {font-size: 12pt; margin-left: 0px;} -p.whs29 {font-size: 12pt; font-weight: bold; margin-left: 40px;} +table.whs8 {x-cell-content-align: top; border-spacing: 0; width: 84.306%; border-spacing: 0px;} +col.whs9 {width: 33.333%;} +col.whs10 {width: 28.501%;} +col.whs11 {width: 31.796%;} +tr.whs12 {x-cell-content-align: top;} +td.whs13 {width: 33.333%; padding-right: 10px; padding-left: 10px; border-right-style: none; border-left-style: none; border-top-style: none; border-bottom-style: none;} +img_whs14 {border-style: none; border: none; width: 218px; height: 250px;} +td.whs15 {width: 28.501%; padding-right: 10px; padding-left: 10px; border-right-style: none; border-top-style: none; border-bottom-style: none;} +p.whs16 {font-size: 12pt; margin-right: 0px;} +img_whs17 {border-style: none; border: none; width: 150px; height: 250px;} +td.whs18 {width: 31.796%; padding-right: 10px; padding-left: 10px; border-top-style: none; border-bottom-style: none; border-right-style: none;} +img_whs19 {border-style: none; border: none; width: 170px; height: 250px;} +p.whs20 {font-size: 12pt; margin-left: 40px;} +p.whs21 {color: #808080; font-size: 12pt;} +p.whs22 {font-size: 12pt; color: #000000;} +p.whs23 {color: #808080; font-size: 12pt; margin-left: 40px;} +img_whs24 {border-style: none; border: none; width: 150px; height: 140px;} +img_whs25 {border-style: none; border: none; width: 200px; height: 176px;} +img_whs26 {border-style: none; border: none; width: 150px; height: 139px;} +table.whs27 {x-cell-content-align: top; border-spacing: 0; width: 65.278%; border-spacing: 0px;} +col.whs28 {width: 50.213%;} +col.whs29 {width: 49.787%;} +td.whs30 {width: 50.213%; padding-right: 10px; padding-left: 10px; border-right-style: none; border-left-style: none; border-top-style: none; border-bottom-style: none;} +img_whs31 {border-style: none; border: none; width: 212px; height: 250px;} +td.whs32 {width: 49.787%; padding-right: 10px; padding-left: 10px; border-top-style: none; border-bottom-style: none; border-right-style: none;} +img_whs33 {border-style: none; border: none; width: 211px; height: 250px;} +img_whs34 {border-style: none; border: none; width: 150px; height: 129px;} +img_whs35 {border-style: none; border: none; width: 200px; height: 211px;} +p.whs36 {font-size: 12pt; margin-left: 40px; font-weight: bold;} +img_whs37 {border-style: none; border: none; width: 150px; height: 154px;} +img_whs38 {border-style: none; border: none; width: 200px; height: 202px;} +img_whs39 {border-style: none; border: none; width: 150px; height: 123px;} +p.whs40 {font-size: 14pt;} +img_whs41 {border-style: none; border: none; width: 20px; height: 20px;} +img_whs42 {border-style: none; border: none; width: 200px; height: 194px;} +p.whs43 {font-size: 12pt; font-weight: bold;} +p.whs44 {font-size: 12pt; font-weight: bold; font-style: italic; x-text-underline: off; /*begin!kadov{{*/ text-decoration: none; /*}}end!kadov*/ } +img_whs45 {border-style: none; border: none; width: 200px; height: 181px; float: none;} +img_whs46 {border-style: none; border: none; width: 175px; height: 181px;} +img_whs47 {border-style: none; border: none; width: 203px; height: 181px;} +img_whs48 {border-style: none; border: none; width: 200px; height: 175px;} +img_whs49 {border-style: none; border: none; width: 150px; height: 128px;} +table.whs50 {x-cell-content-align: top; border-spacing: 0; width: 94.306%; border-spacing: 0px;} +col.whs51 {width: 32.254%;} +col.whs52 {width: 32.547%;} +col.whs53 {width: 35.199%;} +td.whs54 {width: 32.254%; padding-right: 10px; padding-left: 10px; border-right-style: none; border-left-style: none; border-top-style: none; border-bottom-style: none;} +img_whs55 {border-style: none; border: none; width: 196px; height: 250px;} +td.whs56 {width: 32.547%; padding-right: 10px; padding-left: 10px; border-right-style: none; border-top-style: none; border-bottom-style: none;} +img_whs57 {border-style: none; border: none; width: 195px; height: 250px;} +td.whs58 {width: 35.199%; padding-right: 10px; padding-left: 10px; border-top-style: none; border-bottom-style: none; border-right-style: none;} +img_whs59 {border-style: none; border: none; width: 214px; height: 250px;} +p.whs60 {font-size: 12pt; font-weight: bold; color: #000000;} +img_whs61 {border-style: none; border: none; width: 150px; height: 131px;} +table.whs62 {x-cell-content-align: top; width: 100%; border-spacing: 0;} +td.whs63 {padding-right: 10px; padding-left: 10px; border-right-style: none; border-left-style: none; border-top-style: none; border-bottom-style: none;} +img_whs64 {border: none; width: 234px; height: 200px;} +td.whs65 {padding-right: 10px; padding-left: 10px; border-right-style: none; border-top-style: none; border-bottom-style: none;} +img_whs66 {border: none; width: 235px; height: 200px;} +td.whs67 {padding-right: 10px; padding-left: 10px; border-top-style: none; border-bottom-style: none; border-right-style: none;} +img_whs68 {border-style: none; border: none; width: 221px; height: 200px;} +p.whs69 {font-size: 12pt; margin-left: 0px;} +p.whs70 {font-size: 12pt; margin-left: 40px; font-weight: bold; text-indent: -40px;} +img_whs71 {border-style: none; border: none; width: 16px; height: 16px;} +table.whs72 {x-cell-content-align: top; border-spacing: 0; width: 81.667%;} +col.whs73 {width: 4.762%;} +p.whs74 {font-weight: bold; font-size: 14pt;} +img_whs75 {border: none; width: 272px; height: 250px;} +img_whs76 {border: none; width: 242px; height: 250px;} +p.whs77 {margin-left: 40px; font-weight: bold; text-indent: -40px; font-size: 14pt;} +p.whs78 {font-weight: bold; text-indent: -40px; font-size: 14pt; margin-left: 40px;} +img_whs79 {border: none; width: 257px; height: 250px;} +p.whs80 {font-weight: bold; text-indent: -40px; font-size: 14pt; margin-left: 80px;} +p.whs81 {font-weight: bold; margin-left: 80px; text-indent: -80px; font-size: 12pt;} +p.whs82 {font-weight: bold; text-indent: -80px; font-size: 12pt; margin-left: 120px;} +img_whs83 {border-style: none; border: none; width: 200px; height: 219px;} -->

    Displaying\hiding objects

    -

    Displaying\hiding different geometrical objects in the viewer - is possible using the following operations:

    +

    Visualization is available in both, OCC and VTK viewers. + These viewers work independently, i.e. visibility of objects and their + graphic attributes may differ in OCC and VTK viewer. It + is reasonable to use the OCC viewer for GEOM module.

    + +

     

    + +

    Displaying\hiding + different geometrical objects in the viewer is possible using the following + operations:

     

    @@ -125,13 +133,16 @@ else href="#DisplayAll">DisplayAll

  • DisplayOnly

  • + href="#EraseAll">EraseAll

  • EraseAll

  • + href="#Display">Display

  • EraseOnly

  • + href="#DisplayOnly">DisplayOnly

    + +
  • Erase

  •  

    @@ -141,9 +152,8 @@ else

     

    In the main menu select View - > Display mode or right-click on the necessary object in the - Object Browser and from the associated pop-up menu choose the required - operation.

    + or right-click on the necessary object in the Object Browser and + from the associated pop-up menu choose the required operation.

     

    @@ -169,39 +179,56 @@ else

     

    +

    EraseAll

    + +

     

    + +

    Description: + Erases all shapes displayed in the viewer.

    +

     

    -

    TUI + Command: sg.EraseAll()

    + +

     

    + +

     

    + +

    DisplayOnly

    + size=4> Display

     

    -

    Description: - Displays only the selected geometrical element.

    +

    Description: + Displays an object in 3D viewer.

     

    TUI - Command: sg.DisplayOnly(ID)

    + Command:

     

     

    -

    EraseAll

    +

    DisplayOnly

     

    Description: - Erases all shapes displayed in the viewer.

    + Displays only the selected geometrical element.

     

    TUI - Command: sg.EraseAll()

    + Command: sg.DisplayOnly(ID)

     

    @@ -209,7 +236,7 @@ else

    EraseOnly

    + size=4> Erase

     

    diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions.htm index 370347a64..260fc51a7 100755 --- a/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions.htm +++ b/doc/salome/gui/GEOM/files/salome2_sp3_generationgui_functions.htm @@ -29,8 +29,8 @@ - - + + @@ -143,13 +143,14 @@ else

     

    @@ -163,20 +164,22 @@ else

     

    -

    Prism

    +

    Extrusion

    Description: Creates an extruded shape.

     

    -

    Result: GEOM_Shape +

    Result: GEOM_Object (edge, face, solid or compsolid).

     

    TUI Command : - geompy.MakePrism(GEOM_Shape, PointStruct, PointStruct)

    +
    geompy.MakePrism(baseShape, Vector, + Height), where baseShape is a basis of the prism, Vector is a normal + of the prism and Height is a height of the prism.

     

    @@ -213,13 +216,16 @@ else

     

    -

    Result: GEOM_Shape +

    Result: GEOM_Object (edge, face, solid or compsolid).

     

    TUI Command: - geompy.MakeRevolution(GEOM_Shape, AxisStruct, Double)

    + geompy.MakeRevolution(Shape, Axis, + Angle), where Shape is a shape to rotate, Axis is the axis of the + revolution and Angle is an angle by which Shape has to be rotated around + Axis.

     

    @@ -254,13 +260,17 @@ else

     

    -

    Result: GEOM_Shape +

    Result: GEOM_Object (face).

     

    TUI Command: - geompy.MakeFilling(GEOM_Shape, Short, Short, Double, Double, Short)

    + geompy.MakeFilling(Shape, MinDegree, + MaxDegree, Tol2D, Tol3D, NbIter), where Shape is a shape to fill, + MinDegree and MaxDegree are correspondingly maximal and minimal degree, + Tol2D is a tolerance for 2D and Tol3D is a tolerance for 3D, NbIter is + a number of iterations.

     

    @@ -300,13 +310,15 @@ else

     

    -

    Result: GEOM_Shape +

    Result: GEOM_Object (edge, face, solid or compsolid).

     

    TUI Command: - geompy.MakePipe(GEOM_Shape, GEOM_Shape)

    + geompy.MakePipe(baseShape, pathShape), + where baseShape is a shape to be extruded, pathShape is a path along which + baseShape is extruded.

     

    diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm index 8c2a80c2f..c70dca7fa 100755 --- a/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm +++ b/doc/salome/gui/GEOM/files/salome2_sp3_geomtoolsgui_functions.htm @@ -30,8 +30,8 @@ - - + + @@ -137,10 +137,16 @@ else

     

    Select the required file and click OK. You file will be imported - into GEOM and its contents (geometrical objects) will be displayed in - the Object Browser. -

    + style="font-weight: bold;">OK. You file will be imported into GEOM + and its contents (geometrical objects) will be displayed in the Object Browser.

    + +

     

    + +

    TUI command: + geompy.Import(FileName, FormatName), + where FileName is a name of file which contains a shape, FormatName is + a string which describes a format of the file.

     

    @@ -160,8 +166,16 @@ else

     

    -

    Click OK - to confirm your exportation.  

    +

    Click OK + to confirm your exportation.  

    + +

     

    + +

    TUI command: + geompy.Export(Shape, FileName, FormatName), + where Shape is a shape to be exported, FileName is a name of a file to + which the shape is exported, FormatName is a string which describes the + file format.

     

    diff --git a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm index 58e90c34a..c85165ba1 100755 --- a/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm +++ b/doc/salome/gui/GEOM/files/salome2_sp3_measuregui_functions.htm @@ -29,8 +29,8 @@ - - + + @@ -64,17 +64,22 @@ A:link { p.whs1 {font-size: 12pt;} img_whs2 {border-style: none; border: none; float: none; width: 30px; height: 30px;} p.whs3 {margin-left: 40px;} -p.whs4 {font-family: 'Times New Roman', serif; font-size: 14pt;} -img_whs5 {border-style: none; width: 20px; height: 20px;} -p.whs6 {font-family: 'Times New Roman', serif; font-size: 12pt;} -img_whs7 {border-style: none; border: none; width: 200px; height: 161px;} -p.whs8 {font-size: 12pt; margin-left: 40px;} -img_whs9 {border-style: none; border: none; width: 200px; height: 190px;} -img_whs10 {border-style: none; border: none; width: 200px; height: 175px;} -img_whs11 {border-style: none; border: none; width: 200px; height: 171px;} -img_whs12 {border-style: none; border: none; width: 200px; height: 151px;} -img_whs13 {border-style: none; border: none; width: 200px; height: 193px;} -img_whs14 {border-style: none; border: none; width: 200px; height: 219px;} +img_whs4 {border-style: none; border: none; width: 21px; height: 19px;} +p.whs5 {font-size: 12pt; margin-left: 40px;} +img_whs6 {border-style: none; border: none; width: 200px; height: 221px;} +p.whs7 {font-family: 'Times New Roman', serif; font-size: 14pt;} +img_whs8 {border-style: none; width: 20px; height: 20px;} +p.whs9 {font-family: 'Times New Roman', serif; font-size: 12pt;} +img_whs10 {border-style: none; border: none; width: 200px; height: 161px;} +img_whs11 {border-style: none; border: none; width: 200px; height: 190px;} +p.whs12 {font-size: 12pt; margin-left: 400px;} +img_whs13 {border-style: none; border: none; width: 200px; height: 175px;} +p.whs14 {font-size: 12pt; font-weight: bold;} +img_whs15 {border-style: none; border: none; width: 200px; height: 171px;} +p.whs16 {font-size: 12pt; font-weight: normal;} +img_whs17 {border-style: none; border: none; width: 200px; height: 151px;} +img_whs18 {border-style: none; border: none; width: 200px; height: 193px;} +img_whs19 {border-style: none; border: none; width: 200px; height: 219px;} --> + + + + + +

    1 + +

    SplitAngle – + this operator is intended for splitting faces based on conical surfaces, + surfaces of revolution and cylindrical surfaces by angle

    +

    SplitAngle.Angle – angle (in radians) defining + size of result segments.

    +

    SplitAngle.MaxTolerance – maximal possible + tolerance on result shape + + + +

    2 + +

    SplitClosedFaces + – this operator is intended for dividing all closed faces in the shape + according to the number of points.

    +

    SplitClosedFaces.NbSplitPoints – number of + points for cutting each closed faces. + + + +

    3 + +

    FixFaceSize + – this operator is intended for removing small faces (case of the spot + face and strip face)

    +

    FixFaceSize.Tolerance – work tolerance defining + which faces will be removed. + + + +

    4 + +

    DropSmallEdges + – this operator is intended for removing small edges or merging with neigbour. +  

    +

    DropSmallEdges.Tolerance3d – work tolerance + for detection and removing small edges. + + + +

    5 + +

    BsplineRestriction + –this operator is intended for re-approximation BSplines curves and surfaces + or conversion of the curves and surfaces to BSplines with specified parameters. +

    +

    BSplineRestriction.SurfaceMode - mode of approximation + of surfaces if restriction is necessary

    +

    BSplineRestriction.Curve3dMode -mode of conversion + of any 3D curve to BSpline and approximation.

    +

    BSplineRestriction.Curve2dMode - mode of conversion + of any 2D curve to BSpline and approximation

    +

    BSplineRestriction.Tolerance3d – work tolerance + for definition of the possibility of the approximation of the surfaces + and 3D curves with specified parameters.

    +

    BSplineRestriction.Tolerance2d - work tolerance + for definition of the possibility of the approximation of the 2D curves + with specified parameters.

    +

    BSplineRestriction.Continuity3d – desired continuity + of the resultant surfaces and 3D curves.

    +

    BSplineRestriction.Continuity2d – desired continuity + of the resultant 2D curves.

    +

    BSplineRestriction.RequiredDegree - required + degree of the resultant BSplines

    +

    BSplineRestriction.RequiredNbSegments - required + maximum number of segments of resultant BSplines. + + + +

    6 + +

    SplitContinuity + – this operator is intended for splitting shapes to achieve continuities + of curves and surfaces less than specified ones.

    +

    SplitContinuity.Tolerance3d - 3D tolerance + for correction of geometry.

    +

    SplitContinuity.SurfaceContinuity - required + continuity for surfaces.

    +

    SplitContinuity.CurveContinuity - required + continuity for curves. + + + +

    7 + +

    ToBezier - this + operator is intended for conversion of the curves and surfaces of the + all types into Bezier curves and surfaces.

    +

    ToBezier.SurfaceMode - mode of conversion of + the surfaces.

    +

    ToBezier.Curve3dMode – mode for conversion + of the 3D curves.

    +

    ToBezier.Curve2dMode – mode for conversion + of the 2D curves.

    +

    ToBezier.MaxTolerance – max possible tolerance + on the resultant shape. + + + +

    8 + +

    FixShape – this + operator is intended for correction of the invalid shapes

    +

    FixShape.Tolerance3d – work tolerance for detection + of the problems and correction of them.

    +

    FixShape.MaxTolerance3d - maximal possible + tolerance of the shape after correction. + + + +

    9 + +

    SameParameter + – this operator is intended for fixing edges having not same parameter + 2D and 3D curves.

    +

    SameParameter.Tolerance3d – tolerance for detection + and fix problems. + + + +

     

     

    @@ -201,43 +420,57 @@ else

     

    -

    +

     

     

    Example:

    -

     

    +

     

    -

     

    +

    Shape before applying Shape Processing (FixShape + operator).

     

    -

     

    +

       

    -

    Orientation -

    +

     

    + +

    The + same shape after applying Shape Processing.

    + +

     

    + +

    + +

     

    -

     

    +

     

    + +

    Suppress faces

    + +

     

    Description: - Changes the orientation of the faces of a shape.

    + Suppresses a face of a shape.

     

    -

    Result: GEOM_Shape.

    +

    Result: GEOM_Object + (ListOfGeomShapes).

     

    TUI Command: - geompy.OrientationChange(GEOM_Shape)

    + geompy.SuppressFaces(Shape, ListOfID), + where Shape is a shape to be processed, ListOfID is a list of faces ID's + to be removed.

     

    Arguments: - 1 shape (face, shell, solid or compsolid) + 1 value (vector length).

    + 1 shape + 1 selection of a face (Local Context).

     

    @@ -245,35 +478,56 @@ else

     

    -

    +

    + +

     

    + +

    Example:

     

    +

     

    +

     

    -

    Suppress - faces

    +

    Close contour

    -

     

    +

     

    -

    Description: - Suppresses a face of a shape.

    +

    Description : + Closes an open contour and modifies the underlying face (if needed) in + accordance with user specified mode:

    + +
      + +
    • By common vertex – a + vertex is created between the end points of the contour and its tolerance + is increased to a value of the gap between the ends of the contour;

    • + +
    • By new edge – a new edge + is inserted between the end points of the contour.

    • +

     

    -

    Result: GEOM_Shape - (ListOfGeomShapes).

    +

    Result: GEOM_Object.

     

    TUI Command: - geompy.SuppressFaces(GEOM_Shape, ListOfID)

    + geompy.CloseContour(Shape, Wires, + IsCommonVertex), where Shape is a shape to be processed, Wires + is a list of edges or wires IDÂ’s which has to be closed within the shape + (if the list contains only one element = -1, the shape itself is considered + as a wire),  IsCommonVertex + if this parameter is True a closure has to be done by creation of a common + vertex, otherwise an edge is added between the end vertices.

     

    -

    Arguments: - 1 shape + 1 selection of a face (Local Context).

    +

    Arguments: Contour (Wire, + or a set of Edges) + mode of closure (by vertex or by edge)

     

    @@ -281,21 +535,75 @@ else

     

    -

    +

    -

     

    +

     

    -

    Example:

    +

    Example:

    + +

     

    + +

    Suppress + internal wires

    + +

     

    + +

    Description : + Removes all internal wires or specified internal wires from user specified + faces.

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command: + geompy.SuppressInternalWires(Shape, + Wires), where Shape is a shape where wires are to be removed, Wires + is a list of wires IDÂ’s to be removed; if the list is empty then all internal + wires are removed.

    + +

     

    + +

     

    + +

    Arguments:

    + +
      + +
    • User specified face

    • + +
    • User specified internal + wires (lying on this face except for its boundary), or, in case the "Remove + all internal wires" box is checked, all internal wires

    • +
    + +

     

    + +

    Dialog Box:

    + +

     

    + +

     

    -

     

    +

    Example:

    + +

     

    + +

       

    + +

     

     

    -

    Suppress - hole

    +

    Suppress + holes

     

    @@ -313,18 +621,15 @@ else

     

    -

    Result: GEOM_Shape.

    +

    Result: GEOM_Object.

     

    TUI Command: -

    - -

    geompy.SuppressHole(GEOM_Shape, - ListOfSubShapeID, ListOfSubShapeID, ListOfSubShapeID)

    - -

    geompy.SuppressHolesInFaceOrShell(GEOM_Shape, - ListOfSubShapeID)

    + geompy.SuppressHoles(Shape, + ListOfWireID), where Shape is a + shape where holes must be removed, ListOfWireID is a list of wire sub + shapes IDÂ’s. If it is empty, then all holes are removed.

     

    @@ -348,17 +653,217 @@ else

     

    -

     

    +

     

    -

      

    +

      

    Example:

    -

     

    +

     

    + +

       

    + +

     

    + +

     

    + +

     

    + +

    Sewing

    + +

     

    + +

    Description: + Sew several  shapes.

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command : + geompy.MakeSewing(ListOfShape, Precision), + where ListOfShape is list of shapes to be sewed, Precision is a precision + for sewing.

    + +

     

    + +

    Arguments: + 1 or more shapes + 1 value (sew precision).

    + +

     

    + +

    Dialog Box:

    + +

     

    + +

    + +

     

    + +

    Example:

    + +

     

    + +

     

    + +

     

    + +

     

    + +

     

    + +

    Add point on edge

    + +

     

    + +

    Description: + Splits an edge in two in accordance with the specified mode (by length + or by parameter) and a value specifying the position of the point on edge + (for example val =0.5; mode = Length).

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command : + geompy.DivideEdge(Shape, EdgeID, + Value, IsByParameter), where Shape is a shape which contains an + edge to be divided, EdgeID is the ID of the edge to be divided, if it + = -1, then Shape is an edge, Value is a paramter on the edge or a length. + IsByParameter if it is True then Value is the edge parameter in the range + [0:1] otherwise it is a length of the edge in the range [0:1]

    + +

     

    + +

    Arguments: + Edge, user-defined point

    + +

     

    + +

    Dialog + Box:

    + +

     

    + +

    + +

     

    + +

    Example:

    + +

     

    + +

         

    + +

     

    + +

     

    + +

     

    + +

    Glue faces

    + +

     

    + +

    Description: + Glues faces that are coincident with respect to the given tolerance

    + +

    value.

    + +

     

    + +

    Result: + GEOM_Object.

    + +

     

    + +

    TUI Command + : geompy.MakeGlueFaces(theShape, + theTolerance), where theShape is a compound of shapesto be glued, + theTolerance is a maximum distance between two faces, which can be considered + as coincident.

    + +

     

    + +

    Arguments: + 1 Compound + Tolerance Value

    + +

     

    + +

    Dialog Box:

    + +

     

    + +

    + +

     

    + +

    Example:

    + +

     

    + +

      

    + +

     

    + +

     

    + +

     

    + +

    Check free boundaries

    + +

     

    + +

    Description: + Detects wires and edges that correspond to the shape's boundary, and highlights + it

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command : (NoError, ClosedWires, OpenWires) = geompy.GetFreeBoundary(Shape), + where Shape is a shape to be checked, NoError is false if an error occurred + while checking free boundaries, ClosedWires is a list of closed free boundary + wires, OpenWires is a list of open free boundary wires.

    + +

     

    + +

    Arguments: + Shape

    + +

     

    + +

    Dialog + Box:

    + +

     

    + +

    + +

     

    + +

    Example:

    + +

     

    + +

      

    -

       

    +

     

    -

     

    +

     

    + GEOM reference manual + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/GEOM/geom_help_csh.html b/doc/salome/gui/GEOM/geom_help_csh.html new file mode 100755 index 000000000..e5123bbd5 --- /dev/null +++ b/doc/salome/gui/GEOM/geom_help_csh.html @@ -0,0 +1,100 @@ + + +GEOM reference manual + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/GEOM/geom_help_rhc.html b/doc/salome/gui/GEOM/geom_help_rhc.html new file mode 100755 index 000000000..26441d7b5 --- /dev/null +++ b/doc/salome/gui/GEOM/geom_help_rhc.html @@ -0,0 +1,100 @@ + + +GEOM reference manual + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/salome/gui/GEOM/image144.jpg b/doc/salome/gui/GEOM/image144.jpg new file mode 100755 index 0000000000000000000000000000000000000000..cecf915edd5bc89713cb52082ffd0034b6929b0f GIT binary patch literal 22434 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|0s-MH0jBTBP;6Pc{6*+Csol z_AeJzfo&WBjYjfE*o9agYgwK&{P4KoRjX*i;4NTd)>y}VuK-B2Vi}Q!YKNGU`Q(rV zkLK02cJ(8#@uOm48-X?9tS%sHSbctx9}g7O0_y-AGQaJ{jPyNwTVo^1u8c>ZA{5HH z_I?gL1VE5M1V#{2I$cb$J%eFRTpY92p}`hfld*X29VZOAjXli?<6&U0a8t1845Vwk zOZ#`Ojn6||Hl!R+M5 zF!?={Sh{{5D0C1E)gC#U*@tCL0JdK?g3gweTn(L32x5U^`>~fGRz!jI>;uJ))cGAl zzNVBvN;|Rw%o0?1cbk2N=tIgC*_3_?V}vD7Li-MdU0raL`b0L7wub@kO<`=f}v6gL;f{&&DIjrNJ}Eco6igz(2^0njHY9OfT!^ zv6dfu|BC$f&Hnwm8#%gh@vWmcRmo@)j`Umw%GrC<#Dm^jIolgC&&&|H5AD>Q&vwD4 zjw{<|)D~knwhz1-c}8OuacIi?K)}z;Aa8qyoAh0^rHkHtz*e118WCg?E0*^Hib;JD z5pQ_(|35heO*A54?Tl;NhA7N?suGKDH^|F+GyGckp=SXB-V^doDaNpXFVql!K2z{3`Y#?N=lyIX8reE$tQ&tL?zGD)}u9)Rd`k*yI>*=cO% zZ^&NYUs0?@4i)&^e+T@#TcJj&QT0kyg`O5c<=JU?&Va_7@d;@&1AF1E zfQ?@Xu2=teQv+^3-~wmECPdsKWyxlWk5HT18t_*H*Ud}So&~c@tr4;^7rTe0C=L+ApigX literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image145.jpg b/doc/salome/gui/GEOM/image145.jpg new file mode 100755 index 0000000000000000000000000000000000000000..a035c8d89190feca1f65546028452e071e92c63b GIT binary patch literal 10447 zcmd6NcT`i`y6-|zidaBEK#EH5(xk%{rEfrb2@otO5JK+=Q4mpj3n*2(0U=5!2vLz< z0)!Chy$hj-P?E>lr;L5hdFS5y-d}fStgNxdTx+i1{C?k@Ut5%)lxg6yzP6q=Ky~`# z2G{_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@b>w9hK*{yNaC)EeD zoa{=AFPmh}Lb>WQLA_>ZK9!iFK$4qDhHV4CG21(hmRUw!WUAaY=iJq~Rlg2lC>qU! z`fn|M8(Gf7#P5jYf&5ZEDe9sG}dUL143crPavA@WCKrV*;+>$%nR4IvyO*HE@+D?q$fBUc0-al+)9r6`%Ks7@Pzp;bA0K^L z=42U?=prKVe$GcB%7AMD%~YNH!K3B3Yx@9os?1yZbzWD;Q(wZEceUom}# z)8yTx-wyTArKFy{&CK00-A#Z_|1Z6o;;JOZzC{WdJNI$pEypN{ALq|n_f?1ScDIn08-Jf zm;E&>T&i!daeCHa8`J>Dl`M`?o#=CO(fPgHpD#96aYdxAzj!vyr@2Z+mZd zO|7#2$kux_*{%Lbddk{6KYj?21Fy(Zk+HUoj{N+mugUbBf0r`a zuKe5^9}k72v?o~+h}A82x&rI6lvU5}7 zh7ZT-sb`4}qr-$L&3sAd^PHI4J6^@jd&9s*41tnhLKI){m21uK4?v zGY5R#Glf57thu%xoqE<}rKl0$aiMZt{?{{Z4_c2K$$jhCs*FjRIN9VNt7GRM;FLuOo{S99nsPb)c?rCXwN_z`lAVPrM;M$RngNM58|Y z<0#ojQilb=f7<@zjADofqA5_KDGZc$q97TffL_1DLrZ~p_p_ogij485Kx@h@WHmG` zQ6w8fBm)5Yc7>nl50Zv~B3MfjFu!RCweua~UrPm8yg>k~8TlHs{vKpmk^S}DnxH^% zM+!834~WPH`)j(~NTvag-u_#d{a8 znGtr|W_)Cv{`1M24u*IdlN!zII9-!dFanwabr|VWpkh|c{E6yECHl#|L?t}(H|+cw zeg62y4puZd9`mIRGjC)wh)e*=oS@SVX1?%+8TZ~{VkAI=#pL2pA4P{k&fjxr%Qm8q VB&}(X^+Bch${O?ZOeLH${BL6%3orlx literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image147.jpg b/doc/salome/gui/GEOM/image147.jpg new file mode 100755 index 0000000000000000000000000000000000000000..e38c1dad25f83880f43beea80e0b4097b5db5361 GIT binary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zsE6Ujqt!4jb&|2l|l1BSE!}WB?83 zQ*vT=l}CyuEP?hjq8BT+kaGVerRA5xcX@FNbMe9}b{y!SBGYkOy!3L2cZ-RJ`aMUD!Kle7#{k8Uk&AOt48?&yQABt+Dn*a8N$6CtI=~GLJ zM{!~usjCU>=6l{^^8Hv^fE_QsMVh}o=ANW3JmTgJmMWj~SuT5bG?ESJ1Sb6bbw8Cg zf08#DH$?a6pUeMhOOq{I76ce$w`>{eyWR6)%fd>^4)wB#5*}ghAgcIVx((rwmo+&9 zMzOm^>-|U{E8iXWw=B6mAa0cj0SurTPSrlr0gx9Io3XltrJR^lRJlr76|qGR@)ckl zT2_z^<$}p%0M^m!wW$_A06J}!dwnj6Z9=Z}#C+l$@4#}ti$T-$=F~$WUuC9aXk~&( zFwsf~?zsokg)4+!o(!*gJn@ByY&p>DOypcZ`Bvo8Aa+VciwrrXu7go1IMF@C+eYswoMU(VS|M9QHAF6d3my{*3f2&OQxp|#X< zd-jaajG3mggNk;tarf*zKUYY4zzvZIEpf~Dbo-2aO^)ZtvsM;!>%KJBPXZC!il^-% z|7Z0LaIiYQ6bT=+fMn#J;DgDcuZws+1k(vP5UTxk)kp>d>z1c@QGKd8}h^GP_y2}Ju#l%;eF&$54!lhJ$T1U z7*CH&KH%3P2afygmSUyfuBOuDl9DP^U!zXMB_%&Bprb?KGS+I_lgD3qyv^vE&gH;4 z)tlw6C6RB*g9j}6M<-l&2xFS{5NEtbg45di-cXA>C~4JsT5bB3{UeE+AxSO_AP77m z-gp*k{tmYnyeL>@R)>cOs?)H^&P&lgTS#gqnzAMLzJmk^__)1>QBRj4kWF21@xiYPBH-VQ>m|s=U4vAWAD?3 WFzo=fJB9s6ul}Q}zrMsW`u+v8Z5C<( literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image149.jpg b/doc/salome/gui/GEOM/image149.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2332885cd10ed48e41c341904d84773434e51afc GIT binary patch literal 3666 zcmb_d2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y4R+m>LDDrAK83lq`6o)Wx#YS&t~eWH}+ z+xTjm^%56r+ndQ0o=#}?A4pZY;<_>?*b;cQ69Vll#A7m>WMlU*Yp4wweLuq(TP z*5GIV?|PYkby5G8{l5x8z&O5;EUq0`3_=4^ISLR1G&f}nFK^l!H|>9+e#n3K-8|k6 Jc9UMu{U1pY^eg}X literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image152.jpg b/doc/salome/gui/GEOM/image152.jpg new file mode 100755 index 0000000000000000000000000000000000000000..27ae4585cc5e033798ec8c41a579f3b586df17f0 GIT binary patch literal 9107 zcmeHs2UL^I*6xG=p-BMgT|hw;=}k%^N>{-`k&YlmdJ#lQ0w^NAtB3>y6_8@2DWD)7 z6ahg{Kso{{(tDEkfBii7obUVYIp?1LtoyHZ)?N2y0h!F6J$okeJp0)b=p!@^SPXRZ zbpQhX5dfS3KolT!Qv28m;q#XqTs*zpy_{Vy`3dWLIvf!;l|3RO3!q_e9nex!(@;~> z($LVLXlYUOEDZE?bo6_fnHgEQ*txkm**Q6R_{D^H_(b?PIfV}iiyRO?c<>;%pp?vE z2^leogW?EU6pEgXo{fQlO`MmLSNy;IK+T8;03c`(zdhhD4}uCwO+$;Kqi0}50OYSe z`0uaY-*vJ8Dg+WqMUA9^R{^^Th5Ge z$zSx1pl9IZ;^yJqe?VN~prnGLlCp~G(c>qyb#(Rg4bGi6F*P&4VBz3+$;sKp^|GJ; zm4LvjLDwR$--x;yeJdsiZQ3PU}S&v5{;nTgnqJ^gO(K z#A0CPY#;eVtmhzgXg6W=@>rmHTp-6rXEvfxQ+JbeYjgKbW_@#6oW+S&j3i@2((oIx zs!a1_mbWo;wN)!0ukZ(|lxCWre5G%DYG;Gvi&?+sp%B~m{Z>{o|+VUStn1czC%z=5&nh z+{-m$d`RN>Du=i$HNWZkr_UKuTpvHWO}Vq3f8Hw=!^1W?`e|*7e{g>W_n4uHs{vlm zSXYJVrG~cG`eCAV^@CL|g*UeeY+^dPguN++BUb&r^>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B!RuQ+mgC4`QPLGy5#eAA}a6x4-{iwm?UiPv4DDao5^z^E``}tNT;dd z)|L?m7nPjUZp6s6oL6{{Y_s9eV~2540Vk&KxXm3~iU=O9xl6&pMOFQK7+~xmXmf0J zSBOl3lUZ~QvKvlNgpY7ZwN_8k27;lRBnqs`aqt9_5@2<)es%-1OO}QJE4*;&|8qz~c{@A~{TjsRy{3=slj^SG@T;F|eW%OPXJ(fZ-jXKMbU1$G)Z1JLr1YG!|) zTPU((5^kyyFYiCE$ha%)76*dg8TxNjQ>!@U}f^)E2bfwCV3!goP4kUJBn}q7@e2sjt0;*B$2?qjGkJLUbl2H{M z9K!Qe4e!FG?HD6WxHMH1_@ZO8@wZCXqrM(PUV=FlVQJ@W;T_5#4KwfGj1dG}L6dWV z>%f`(1g}i(ku8Lhj%}4+)D>$XTzdY7>Oy3K3-VrN-xWUV(~M8} z#4Cwff!JXV{7SM_k>{a|OX}HmYbpweK{ok*V=BjMJt)yK2z2Nz1(Ln{F>7agP;TD3 z=^ovrXAt<5i5G5P&tVGn-E(&GOV9k=L#f2sw-Tx0*e}%ijcM`@_xJHaL8Fgih#Q2jzxpt|%cF=D1Tbw^hQt0E} zz`@GDbp7u`Ur$WO?2K->kx#D}dQi@ejL@1KuGMci^Nv1;k!#3(u(ViF-uy0` z><4b|-gn8@p7ed|cf)4v29Srda<>x%UYU_30GxzZKh-a$!{0XnB@Ai9Yj+0Mh~JY4 qmxuQ#+qO$N$p3e(g=_n6pNsu2-z6O5WIU`D*@S%ERta#>r~d+%9H)N( literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image154.jpg b/doc/salome/gui/GEOM/image154.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5129007a9ec5e782ad6e438783135a7d72e3ff94 GIT binary patch literal 15519 zcmc(`cT|&Y*CigLi;5r}Bq|^s1VK6xd;kFj0qG?oAiWDnjR=SoLArElB3)|ek=~^D z-g|EeDTKLsp102Ld%v0a%^wpMWM$opJJ*%#oU`}Y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jpg b/doc/salome/gui/GEOM/image156.jpg new file mode 100755 index 0000000000000000000000000000000000000000..f2d718579efefbc8e411fc251f63e03928938e3c GIT binary patch literal 13889 zcmbVy2UJrFvu+TOCL$tDlz<>09cfY{C?y~uD7{1pz4s1LQF`wkX(Cc0ND(7MrFZGQ z_YR?k6khP0`~T^(EzeDlqmkDbo}uBj=5l>tPApW6Ti0N@-C z06tMtc+B?P5^Ce*?BHx|Yw6Agc7h7B>4^vmivZ3i0dE19Nk~XZNG_9-l9FA%Oh$2y zl7gI^g6`^7s%wlln3x!DFfcIR;si3Y++ks0VB=%E!^M5?-aRH(0bza~VNRZV+(ehj z$SBAuu2WK8=f25sll%YqIBzD(2LOmjiT)gbzYn5I#3ZDb$;c@vsfYl?e_bQ|{p;#K zE?xs%A|fWfL_$nTcnZR80twduB($X0*+mpC(`mmXyW@J}{_FTWat_7HpY%HYdz_-? zZf__k85o(EZ{FqN=DEi!CN3fQKuY@2Vti!@?sH5|ffsQq$5i@(T)!J`{f}`Be3#x~8`7YyG!hP0cN>ZS5VM1A{}u zBco&E6Y~p;OUo;(YwH{PsDs0!GH{B`-`&5k`j657JDcD9e;NHRoBw6<`40ds zIbZ~ENK8bqo|cH1mgsx}aD|wN@PU{X00R7gdtkSC0Piooq6835)GVe>$2@wy#`P0F zqGJK>(Zv;Hn}%vx&fO`+k45Oz<2z8tsC!cnM+U{7JaUv3UTdmkZFbko9`3eeWHjf^ zSN!WXf8XtYbrOJ|ndbDN9UbZ+#|2CA=KvyE9K~T7o^iu*|JSts@;LxdYQz-&kQ8tO z@RaBuCnC;k>h3%tw}q_Vf>*drga_XfB-?5j(q<2 zC{5SkrnOb?aXWtlheT$GnVIhN`l*v)%p|zFwaeGp1a`a2LF*@D;%Qv~Ekq`K!6;$i zt-#6=%=OU6>1F}7J-Fl8Na#TD^iAu?fd<%-?aj=tW?gs%N4TPIzbY{qCFra1%VXX^ z`{7Q}dwQvrWxIS_xfSIBv7*vl?8=liOcQ*{NG>RFnRO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;DPqY41{Ezzn)cB|3Pb2?S{Il_YwAvVs?qWT?WMrXE4MDP_L{lA* z&S+-j0Pt<0$kjDA?x*t(g{cO0PwM0O6)V5uZ4hU=_<-<O|JPO+idZ9_=BcdIHk)nOqzU umRcQ|1l*`BDtr5`tgMuhu#2REo6*}N)6MqfSqa(5`edHDS1JJZ%l`q$Alt0~ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image160.jpg b/doc/salome/gui/GEOM/image160.jpg new file mode 100755 index 0000000000000000000000000000000000000000..a88429f793a658d8680738deb9dc094b3d9cae12 GIT binary patch literal 16741 zcmbWe2UJsUvpyP%f}kQuuS!RnARQs1bOfY#P>rILc;1ARLiM>qGk?ha0NUJumVY=j;diU>Ux0bI`jJ^^kL6W<^vzIo%u4U(HT zNp9UEyG2TR>;B!lP>FH^yX=xdlIoTMP*qLZ)AMih5=jP$#rR4P0D#~I!9N$^KQ978BH|l2Nl0&zkrM!j{^J?` z?|(e~Zx8PQ2nmRY2#JYq;NJrOHNp620Ak7;R1ZZIZr;~r)}A4^$Y|;485p^^d3gCAiHS={N=eJSP*hS@QB_md(>E|QGBz=_v9+^zaCCC^ z^7irdd+#3*`YG&lctm6rBrz#DB{eNQBR4M}R!~?}TvAh8SKrXs)ZFr`qqD2Krx(#T zIyOEriTpD)y|lcty0*TtxwU|{X8M3`sXcSM5cQ%Lo|1$btHvh}y z>mLA0Qotl&pNIf&JtYAVCBgMH;5HEf{)UJW00jJ~^v3M+0=^M`AOqk($Z5UuwMK@a zwS5wZj}STfz|cX(#I0tSG$%?BdU`=QOf>WIpcmjRB_&NV%eq`FHZdX^9bL;&p!$m7 z*$n_S;D3Iw-qa@iLWlB}d%pKj)Qo=d8jyWV$qYUpd(E0vYkpcS_HO&sHUSy_b6Mo> z__u|%^NdTQPv!1wfxZ)8wAUa7Qt?R@s-z4vZ2l3JH${J}e-DGcDKvu6xs-0g%PCyn z?LE}<%7g^dZb)*v-;QOD7-^v@D|@UT_YK(|G^Xj;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!|ef&(U^l1mn?{q@zLOwSK zu3Qapm=X9OD@H*|UF9_V<-Jp4eI@=)__VR2%Ua*7>%stnlkd^NeVFBs3yv;5z% zYrzw9C|=)(DCoTqY8de?NXG2CJ%f3E%fftg+`|Q9Al-xr!DJvf^$rTYp~r z*vuH(qtvi7?fOk9-i$aSz=rkDWZ>qEu>W}?M(=@lYJR78>f%uYm}`r;AvR=>9xkKA z8_+@3&e(6~cgHBDhlLTUPqs1k6+bhoW)&{BXsDMpgB;)vcnpEzB|g z!AyUi=qFeo|5zriFX_;O$K*w ze}TfUX9epy*% zl{G#K3u(?@hkOw`;~fuUk`xx^l0QSzI#_*3jTYkde-bw)h1O=QO=duxDY`C0COi+y zc56Uo3*S0mTNjNHYsdazrkat2DxlE}`4b&xK9JLJ@_-e9SVNA7EtJEaOg{+upy?1X z+}fcU2#4+ix5Ku9bnQ@3(0?1Vaf}Z$(~S8`3mQFYXZKgiqkmG;k(1&B|0qRuHYItV zO3!X*?LY;V;@d%(uf4th5Q6__Zt}qfP&en=UHD12DZ8qt=8N&dQbF zv7H!G*!$0hfxqmL;{}-iQ=p8Mr1A@xrb9JMafF7k8UuEX(@*U)8H9Z#VsmDM5z?Vb ncy?GAdcv4ONA^t5t?N09+KgD{ii3>eedKl*KLo8H$$kG16l3uY literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image163.jpg b/doc/salome/gui/GEOM/image163.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8f87e356ba1b35bea8269e0b66ede4fc381c6b90 GIT binary patch literal 6781 zcmcgwXIN9)w%rIw7r{_1lz{XOA}B<{m(4Hb266KBWUcf38lUEQ4hxV7&%igQDy#3iKw;uP=*I7vZ4NkMUvl9H0@ zq#~?dFPC&cVrlQ9w{gSXSfb>B&oD>+pFsZ|^WPy8-vLb2 zz!=a?PDVn{L`Kd;Mw|rb$;n7BCzvQ_3=oaq63f0BR1h>hdtsd7Qs9knjFW1q$5ZM5(q$vEd z@`pxA1w6f0lks%cT)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sk3DZ3$yq;)*!tC%;;}ziNU%$hI_#4bWp-u4=ls*ndN7 zMeUHY-+x}o;tOr(0qrw`;dj2}KSvHdDCzU#7maqwf+pON#g V{E@2S{}HYK`pciKen#TNe*q1-TLb_A literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image164.jpg b/doc/salome/gui/GEOM/image164.jpg new file mode 100755 index 0000000000000000000000000000000000000000..a180e04d1e35a7e4751bccc2e9947625475ac6da GIT binary patch literal 5424 zcmcIn2UJtpx;`NkDH5ZUASFtXDoqhV0Rcsdf*@@`L3$IA7C=f6q=*y&34)YS$b@2~ z2nLnjL7Fr{L_w+$iXjLIDK9#scV^zbcinf_di$)Ly>|9lXMgA0|Ng%Jr;pR8fqjO0 z26_O9aR~!_06?b!@C)a(&mJ;&adP+Zz3%Jg;SzAjz{g4ckfoBmq7p!#1a1SY%*-sz z%&aUdENrZ-Z0!3u*!S#VKfuk+xsRU*2IJ%5;}Z}PhYJXb3i9zCl077PL{eH>8YXg7 zQBF!xTuNFJ#LC9TzK4B32giQNgM0@i|Idxy26_wtAQsT~2K>=LOkidfR<=Ft9GoBk z{QDf^{`>5oCiekMATXGT8O*}?3dU<97;^wKlx6>6C2iINrVebPemu&z(jM&*)2VFc zHG8ume$3H7nw^7>A0}{6;)tY_w9Ijp6RIcG)OF9E(>t$kV0hWw!qUq67aJ#M7gslT z56^(WAVhFT=*^hhv2pPUcM{Vx?q{O19%Sb{E-XU-hAA#7t$J2n^Bh(f<|bpO}9_ zrZ)l5J-`@H0R}P9LqT9Di2e@X0)rR>Fci=Nn#uzycq!mlrYH{Jzvcy zJKde2^Cgl|8hvhNMbhW`eY%5O@0XZkRX99XiMmhmPvxB1Plp9_l`(NtY%$;PbRWam z2@%mja~9zmS5A{;I(nm@EB$*A7M2K((qHa00nQm`4vvvUTQ@zqyTWWclj*>Q7zJ)@ zQc<4Udu$nI+mh9&(0sFzpqZsGL*BV-jC%oZr@Rb*ja4GthCXfu)S%~E7Du)v-!C*k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CPvVAW_ME@m1yhw!ba;Ewkm5qywo&CWUlh z$wC(4p%AB~)mv`v`u#~pbrfAJo)3V<2iXyl1Th@rQPk^Hl4E=t?aPv8o~QhWj@(i$ z{`bnZS(!ROWrrH{*A{BTz>D898Q6?(TbzykJ$?Qe=zjqCSMd%ya{ygp0XY@ACsZ)L z_oFs7g!l9m)Kl2ySC#&DX`g(vd`>s{kC&;eS_jp_;x(#M3bI*Der(n7Vu$KT&qELpqe^glP8N?#ee=lWu{O z2qU>QmPSb&Z&JurYM69?)#p0YQ7|YnrpCr1}v)Ia_NdCCqD9Xw8~ zONz$`Gz)CuTgOLEt^|5w)(9F2bI+Yklwd~u+i!6r2rU~AqC_(~sPu5@p+C~If7bJF)ZGGOW;$z*T4hJ#ac^kM{>|dd?EC`rCYM^r ziN}Xc93}XLyFUL&0sq|^D8cyKJTUjkb-h*@&0n~unj7Uj9p0tUxh243U&yvsL0DfV;b(>WukrH=7hYRx|0R@J z2&#X;%iLt4-H%om>dUBoOhdFR;JuMGC%l}DT@>z`tW*k(t?yx;No!as>A{hRE9QCK z_pj)GPX7LnL`lpbElB+_R=~TE z0wV6#PKU)m&vZzRK9+gX>?YVGU$v%rC@1xpjp#QQ`E%&}g`yuwK*LLRM{6ppjD&SB z?q1+PtBOspil=krL+t0TWV#!gE!?gAJoBXj193Cs*Ll}IlM#CA{Atl4cSePeOPpMt zV-q{M+ZD>Z)x1?MrV_Gc4B;-C%P&1KcH(UWdQ3y1A$BO`K;H5To1yJDw6eyuUJ(pt WW~d?ddZ_5%g!-?t{r^6qPy7#f%8xPt literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image165.jpg b/doc/salome/gui/GEOM/image165.jpg new file mode 100755 index 0000000000000000000000000000000000000000..330b038b8ef0e9d86ade8ae7b8fef83a4e7a0428 GIT binary patch literal 9596 zcmdUV2UwHK*6yT0=uN7WAfO^mCUS}HEY(a_0Ic+-b)_>T!#%! z3;_)K69xPL&}jgD#6b5q@e|HYI8QHk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#?` zYNEDpO<`b)uetTl$PppzLg!H(&*j&1TIECf_fUv$B~ZxW~2~>kVwt)PYV6> znm3R;1pR?J=h%Yu@8poa43z$@5&88;5(O0nYW+>}_4X~7z}Wijf|1;{_2UGA%i}M4 XI<2lO%=0cIv3tZQVhfp<`SpJQb@kxg literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image167.jpg b/doc/salome/gui/GEOM/image167.jpg new file mode 100755 index 0000000000000000000000000000000000000000..775496ffc13ac02b1505376328b41a25b658e867 GIT binary patch literal 5505 zcmbVP2{@E%|9;2V$(F`$#Aq-PA|weJ2O-t9t02XDY&4ZAS<`9=xG5_n1CQ0L{33L zMM=d(P0a*nhp@x{=SFM;dW{_B+&US;wWOXk>V8q&~Y|H$Gjd$-% zyFEE6EIWD0WLso!cU+YVs(NZ-jo=8q13#{z(5;7V!hUr=GS<4sfHK)i#srMkm5v|L zwdhXxg>3sx(QEc8KArj{3o@#>s-y}hCL>r`uC#+*9J0=`E1~89s*~x>8u3q{$}r|% zzl+JdOI;$ax+LgGb#5ts|0Pzm{{p>(3+FwK7i&>`I@Gcm$?#ZoR%CyDip*g744ZMV z(jsO_^c}xi!$m7ke_7Rw^ULe@z3Mn_@7bsH6G#>S=?)_cE6fOx!>Kh>6(JAmiI;&Yc+nDb=M#C4P%GFZ;=`AcinQJx*DE+t`|E% z0Phy~C7!*Y%x)i3^|7%hAz{;CSZEI~BISp>OIsvEqCn`SSfAJRdpquaMi@F?GZ|MW zzNGbKEKj6A;O*wDdZsr{X9z#89ItoZ^?oq6l{DytUg?Vh{Ka0C?X$GbhId=!1K}K1 z7zl>Nx!=Id%gfIB{@(kIpYGl0x5|M(sWI+ebg;e=BT>v|F-UT$cTpGK4e2hV^DWx8 zRbNE=`n$SyF?S&;%}} ziEXoh%|xchZ9g0LaUW%u{i8l-WjG&Qgi;2G-9(SN7&CwtgOADr{^l6 z$6q#gjHAg=VZWj@puQpD5?mkJpv$t~aqmr9TT#VCxt3|;VdK6$P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y&t~#-;MKgRfW?q(b#s|I6?H z=m>(rj(Jj!lD$V;t(U| z7%feR^FXe({2`vg%(DvLUXM`zg-t;)diZ+oNrjD{Hv=DGqP3r}O2|U{t$7~0B1aAB zWrW@GI1HS#$uFFhi3-zzJ0+-aeA)EYhFfTGtlKKNbl+Lx z@Ngt3IOjY}-Qlw)-BGf?z!txwLaW9yY6NQo`jF`D1XN zwRWe8D{&4#G=D`YkU03MQ)R4+XiaK>yi8^jA%8-Q! z(N37B@#f>_VfhQs3WIw+L**76$RIRnt&LPuH|#DosPufgz5pkDzI$OHm;v8!e*`K$ z$MYe!t{Q4G=MXaZM-lFK^8zm899T0ucPz75So-~%X1OI8kUyAH4k_>%*3&eQ?^!Z? zN_l#2GVYYZv$hZG6*>QCWOm@A4;ws1Zu9Gj8iuPmM(75M_{&9=b+Kr4g+&v{Cq0^H zRP>b`oudmW%Bgz3swg5C-DbcR$ydLw867VdSy9T+C!(AZKHJ3p;V^N|yQ47cN+(0L zO3HIT;nausM4)V2^5`Z@xf`_3?uo$WRDE0KUPV)VSp4&@@}^ht>pNySPI1JeQrsys zzW7t8D%%o~=+ISS?yq&<9sCh#T_^Tpfy_QlNo|NxwJ@K}E|6>z%)%MEsOFS!Px)m4 zPgpsI*1)Xu$SLL${t*9!nUy9U`c!dSVq#?LjfxU?j8qq#@|%18y9=VZ(fgGg(u+L1 z(RETVUDSnB4Nsc#pd*eegj7*cTvXj^N^IsV_~ZH{OTihvw|8bpQ6UZ7YP!{Qr7VfFXpK+zVDbK{uFgH a2+dB^v0qx!tVK>2KFV?MD`m+sU;i5`{J%>8 literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image170.jpg b/doc/salome/gui/GEOM/image170.jpg new file mode 100755 index 0000000000000000000000000000000000000000..4e24375fa53c5d212c301f8b265470c93e5358a0 GIT binary patch literal 8878 zcmbW61ymftmWG?)gy0(7EjR>7kl+^FA%x&EI01qO2#}z`1Ho-@GQi*g0>PaD1{mDk z2bayhxBK?J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0y-{Fh)S_5RM4uYM+tCh~R#k^Br~@bb^f$w8k&V@)JLn6i2$Tb+DO zE~(BVL)3N6tC>0`C-0&wv+ao}R-jOu98om4XwYo>!QBnM`MXIR;>0}(H)3BY9R~vc{+rs#=EDa7C|jveSfO%r!T{eC zG-tAe!!NWdS1LcQQZ?8hscBnaMJeY@gkmiHg_HYv2hr$bRclm3Nu}V+Leo$>{Vvd8 zb4FIbOHSL&E*-hZ)Q|W{z1u0e5UapivuZq5e>L8olP67Y0<2mZr1rYw@h2ep3;6Su zher(1isZ|gJYYTgEIqgfnIt2fCy73<^s;9a?<{h3V4louREs=V)e|Pv= zKzHbhf?4JKp?p0LGNx9dCen1P!r@bFU&@`XoI^nw^3Ll4SbWkgg;T~>l904~u)p@U zdcq2%Cik-+oA1rR#LQQs<1~FgcFxy%-!shmos@-v);)bmc8E90-_SB??;hR zsnoUIx2^U%gPjQ1&O88+pc+rAU)3P0FU(}sM9d9O>O)=>vw0bwBZa@efvc8`son4x z4ZL5-G|CkD4CUa1%zd{@LN~1F?)oFxz04BrW6s*BkYVqF7oU5b31*}^4Xf6dQD;w; zcU^ti|7RpwvfPP7?$wiVFaAviW|WCQTs%%6Er)^xXdkg*x^TSyY&$kN=mE&>ImHbf zq0OP|h}G3Dh09+sfc0BuwZ+KLnJ7Yp4^CNT*Gyei$6u_?l literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image171.jpg b/doc/salome/gui/GEOM/image171.jpg new file mode 100755 index 0000000000000000000000000000000000000000..9e055888a111664e5d7f32e863062d25da56bebb GIT binary patch literal 8023 zcmbVx1yEekvh5ILfFQvKCrEI2w`67r!QFz(pc!0(YY0w&;O-LKCBX&@1Sf+9*9`6i ze(rns-Foj=-CzIz-gVBdQ@!id>gwIQclUZ+c>D!;_8P1N2B7^Nv;cAd;PC-K|K^qa zO9pLgOFL&5M;BX|wHt$yvn3CMEQ_?WgQ&KZhlan)WGBCbiWoKsx(Q)%}vGFmpv9qFK0f9K!IK;TP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|YOye?F{NPqAE5=`gO`yysl5;8fdw8M+yYp$oJOo}0S0+PqQ~eKg+Bd2X#o|?-qDeMpY=v`*LFvn(IS8h|kG{9He^veEOAA`Ub43;xXTGfsUgsBZkfA zZ31hJnAQvB27tdbzqp1>)TaLIc<&5{v$d954Xl_5G0Iy7V#s@F6?j(G({-ySnO}ul ze4XoV!g$eR;O+tLT!;OCSbZ)1^WKVf%ke)$8jMZl-_@`R;c6Pk)WJ`Ka9KnD>SF1x z*nq{4i(5GIxcqqjo!#h~BYaY%*XZ0p+zi%Fm#5@!TFJHun*?o+2Zq{PS4brxppmbA zyYu{;h5l67-|h2>d)02t`O0hsoK~-ND>V}#s~-h!uz1AO+7zKYWdBXI;V(-N|G&w= H+v)!RjKc%9 literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image173.jpg b/doc/salome/gui/GEOM/image173.jpg new file mode 100755 index 0000000000000000000000000000000000000000..c8f9126b5955a2dab490a4626db0635d36b3311e GIT binary patch literal 9979 zcmeHt2{_bk+xImy7+Yk?o{=R>mSoQ|)7@Q?L`d0^?1U&$;y;uY6(K1Vb62F0eF+(r zHCaMr3ngo^?=$oNuDb8Lr|$2)pW}I-<2{b={f_q?#~9~vUjOU7T-WdXoy#@oJG39H z-M!OjC&0j;^*{gslmQ5Pc5M4q!qUab-N*N+ubYRN=G~yWjfHQYBVN*ve@j@*Z>&P925TQk}=po_{Q-t zF>g?1;oY_m@94)Txh0I1|CgBGa-OqEshLl$JL3O_T|ioWKxX>us=qDzUt4qdzqRP^ zYyQ4uv;y$3f?iOI!@$+^U~oJbvz8Q? zl*vc+QTIRl;=LZ(jM^G+B<{{{WrKiYmYm}@gafDxGI$*p?Ugx;A;Q5pb zD<$dHA?f-H1#?9X=KWK5ON_N`FI*$BI!Xp?#3{stZ*>xDS%_Yl&v`??#Vl`gpeTS| zBa=t)9WWNs_%+hwQ}H=FBcJgiN5$-A@}PL~z^GB%$>ztWT!h;9#d+I5Y;~U%O4Pru zwdR!c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~nHJ4O#2;B(~t_5JXL8PpAei_{ZY*Zo6Ap#cQ1 zUr9^qp}-h?b_QgO`>>4f4mMXWlKnJV^AL4<|JuSk;gRq=vd&_sI=vo`h1?Ao{pgBh zN}`{|pZ427Qpaq<>Bq7weSOE$^|OVy>>LFn@&$}Hu4YCMjK_Xjs6Z$9EEpo}L5kx% z=L!>a)eR)52^h}LBlUAUFqnW;bUA{gWIgrp8tAqG*$aDs*=ksJl@kXAz>miPncjSO zpBl*}xQDh%0l!r6KYKuaU_OO_PQx0wkjVqJLvh(%D7eG=ApbYccmHd(U5)p4QLJ_a ze`l!O(qb{?;?AAWEf|Am3!@L72%qAEmv+UCvhP`6U|9ro$TK%Lu~b-KVz|JNc;9Xp z$>&&?D^m`C!YQjTWiZbpRme0K@0~&t>3w@VXw-zE{#3e^rDPEcqGGjkVYY`P0MB?7 zxMYkx2eQAaApT!&5dFRe=Ib)7DN2^*st&6MG0Va5eVEfwk0I!v{~yZprY-;g literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image180.jpg b/doc/salome/gui/GEOM/image180.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1c57ef013c07cff2a1794f19f08a1fed6fce3326 GIT binary patch literal 10039 zcmbt(2|QG7`~R^=A|WJ8B>NW0HYS7+Lbg#RTXvFt9kP}!dl8bDm>5EKQ^eRJTlS^w zW8cjfGr#G1pa1iFp5Oca-v9Id|7SjD&fMpmxzBZf@9*`!uKPN~QQ|CcR!37?6Cfjf zxPbEjKqLS>w>4C6^4_(#b#(V|^>A>q_u|!dx0T>Em6ni_28a_tBtT6`NkvIXO+`gT zLrqOXdzOy&)G1nK28PpT*;v@w&$FCA&vEfG4+ke7=lS!zqP%=p1cil#*}27~#Dt_S z3keI7QPa@So}xWRM|V!}!ubn=|M5orLiPp#$f(GE+koFUGI9z^Dr%Zjv~;J*0E&NH zBYpql>Ypy21<1)LD99-(s7RwAbrV9m22e6lox3EhO3iF&O~dEOay2|T{}jJk#b;Kd z{;kV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+jZTS`Ae4M*lPwVld-k3)f8K|y?VbaNtCwl(-F$bSg0WKLy&y1VuB7+T z{~uiB3bjnhpLc=2YA+kvJ1(JiNwy-v14w-cdQ5wwaQOZDly}e@ofYMO_ZSM|*na^5 CUU1U@ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image181.jpg b/doc/salome/gui/GEOM/image181.jpg new file mode 100755 index 0000000000000000000000000000000000000000..d0171dfc9fee2ffb9aa07eab03360ff480e03fbc GIT binary patch literal 8500 zcmbVx1yoes`|d$XkdTm)k`4hSq#2MHx@G85Y6umPt{Ib(kW`RP0bxKo1VMU`EHBM7Ud*}P^cimwwj-H%a_w7YF&8~}HyAI%{fM);+5fL#F5eYFdF)0ZNDcMDG zvh(N3=%}bJTx6tYVq&0YU|?qD;b6YZb(w*IQ<#&Bk6%zwkcnO7+EsyTJOYCJ1SF)S zWar6f$;oN?Sr}OO|DP{h8$mVz5D*jmx`4kff^&pK#3ZEW$;dAd0EEBi@V~!j|226L zI7dK8c#epW7{3erGQs#cfQW{e_R4h?5;~(hq+A~K;*Vpq&U4=^Z@FYVxXmMB_wWfB zIRhgTGYc;tzkr~Sq|^;*8Cf}1HFXWJrk1ve=`AyexrL>@gQFA7*~Qh<%iG7-&p+Vl zv*#h9Vc`*R@d=4ZuU;poWas4O1{ z%MPSsz1udBzag8qHY6RwUZw7*(yWHMcI0lEO2-iIH?e-2#L-t*ko>(6b1S>a`5QA_ z6hSE%+-uP&U1IgfambyXopjS22MAqB{$7yl2HsM++RR8Dkq&v`kGyzFRhyvPBF?vyGIGbB(Z2IztRaR6wQ33;|jO8{>v1 zGo!0L)fdxM^{M6*Um=$xj#GVUZ=BtI_-*a07DMqMxa-jpDXB7{;O_AFd^aNRcn~JAt1Bb4zQKE5ZpXe z9`dF*L+Vw(PT#oLza(3F!W<$-jS-52f(GVG9=DERc_p!6`9h4?U}=k+bV~avvHb83 zXx{dKF`~S(vM6EvD|R0X4iB4cZyX}WIzQXhBA8V?RXoK+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ui/GEOM/image182.jpg new file mode 100755 index 0000000000000000000000000000000000000000..3dcf6407ea55785399f6540c84683fe92ef577fc GIT binary patch literal 16425 zcmd_Q2UJvDzAt!+B4^1_kR%xilA#KfBoah&5D<_gAURV7Cb}Sx~IFp?mPFsp7rjmH}i@Gth4snp?3KH!hd6aV&(wy`%0=x00jJD250~P zg9cb0C@S1z)v>m;b#i{@Y-4Bb#;WRMDafiPEO<*8z)S)!09+Aq%D}&WDgB2+ zasUegg<@etalmf@HWL7r0od1YC~gQV;8H%cz+-cv5($d?fX{xXq={O4aF;{$iEA(c zAq_1ZJp(7#O>Q1uvD@Mjl2X!l?&E3P(%iG5{ zi%ZKZt842Ud;156N5?0pXXn?zA!A`VdLBo#-&hrh-cwK z$tDtnPjx5mLrD_>yQuaq^%K`YLK+USdCtAxqyA&i|8rvw{(m&+zm55CL&h`$*YJUJ zpc4uKM}G|hy#~Qd0K`xT_yD~Iz<_SxUG4bvjw?FlnTOxc!b0}SH&gdxCld)Ol%4=m9W25foBH&h z-*0W72XeW7>i!|~%~}71S+;>}IaNTRtoF6T@i3RSGu7lPPikdXoyu7g#hV|_l$jzD zjilX_#wMLNb2Z8M_diEY)%c{Kg;ZAondA@rSU7XBnhNWKK zu;;-(x|Y6%n)vH6vPUr}BT&JN@m-ESn4SGXw)NSkC{##LO|Ngtj&?C&=$-44w? zE;~D$Y;Z|EK^_T^%G9>l#@h{;b~z=y9T0sPmr1IhgA*Hhj;43tyyIyafTK^QoiHom+$1OH+_Fr_mY>I{Wf0h!5Jk6Xr@c9q*VAgW4wVo zp}@4S`b^;C9TnY{>ZYkPElG~(w=2ozs*hbNr+SV_HAa^Ge2YgSPw`CD`8U)*H^$~u z+fIKp)Cu=bc-!AA%tiIyB~Eivdu91bw)l+l$hWR;wm7Y#!F9@vxI9--a0}b_d0kme z=-^h$2rPxi9OYkyhV})fB4S~;Nc57QpPmQBlCS$O2i0#L`LosA*V*FTrx1@Kll67Zv^Ola zagK)kvLjrg^*ASd|bIC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u_3pT>3BxJrk4Pwu zMy*WAv>GC=ww5A{Z%4hse!-4AwV}{?S@IuDj9YT5W7|xfN6E+2&ogVK@vNbPP@Idr zpU~=XoX1?uCA|Rg|T2)V2FBH3eM4Pt7y9o$I4T;gpTBM*WU1ctPb= zPs{ZTmLl0Ih@5Y{%2@58=m^|a1uwSR{Rhi0c%&XUBqt9ewXgWJUAQDNm8HhO`yjeC z?uH!I@g|&^`m8VeGmGKV|C{aj=V&C{k~699X&x~c?-0T*(!1eOLi_OpdL2a|v4H^& zcCrz3_ZmR7AvtfjyjY(-y$0$9Miex#7|g1kd!eyG+;3k4X7fSZ`IZK9fZy_>2KYa_ zE(7bx&HA#`*!Y3UaBs5^nghehv?v1AEfbSF%@JL%{f#=3IE|_ zlZ3@yS{)m|#r{>yiHsBP<}&{!jU)>%TOr`zWVetO;Ao*ccAGp82?%BYkj70og~V&w zJ9&m4TPnBK6sJ;H3IS0xB@B$#108uFn|YS82$CDFKycze#OQ*nF%AP)oe>V&9+p24yW*OAU>@ZEk3%@xvw3A;wK)+d*)QP=&Kk!z bt}*NI#RQ`fX6E~)<-@T`($`V}%=rHR2pH>9 literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image183.jpg b/doc/salome/gui/GEOM/image183.jpg new file mode 100755 index 0000000000000000000000000000000000000000..4b5903a2d45bf1ffae1c19221ab183b92426ab66 GIT binary patch literal 14260 zcmd^m2UL{HmTol-G)a;~0UOCtqLQHz$s$35WEGGkAOaEunjm;Yf`9~xO_C%aN|Go_ z63HM)&Pb4)Q}_ElXWra%&Yiho)|)r8W|{@PYSmx0_g}ke@9*2Yz#*J0o+3F&zp~yvH5r7*7j{zY*J^?;HAprpa zf{+kFOi4maL_~a+oSc-Bo`!*ej)snok(mR@$i&7(N5{&~%Erab%gf7fUQk$oN0@_$ zmm5ZiKoAoVQ+uh?s;F2H?N-L4SYi z{aq&|z=Ofzc=&Jv=q;dW{GdL7Penj|K}3=8tnO_Dn=6fIU~~o%`<2p0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`|;#J(PGW^!VE>R8b@*c)d47>BVFk>S$mSsrHfoR>c;> zQ><^Pfals=>{t(B`d?Z9&bt24DtrIz#zLWk#qxxbVEfh5%eOd@wVlggy_PA< zKDT${|LxuQCufw!EFDocbeE`zk*i8HSfDGHiOPo$xt0WC{Y!8_{>T%H521vXMKDI^|AtXy zol0g6lv=dqWtWF!IvhFr*7X}d3F|b7Fi$b#`D~)jqi4+drp3<~E_mN!li`0!e6deP zOl4|I=YhXoccWF{RwiE$qJu7tcW7{s*4#~(BoE*%Z2)HSG8ntpyC%Mz1dD-S^2g?% zqmO#v3e#en3a4Z~C0N4GSaAs4*v_Dj70l)INc3l+h+{2`lWL>WLP8&-f!c5v-P8$#aap|cqH z799cQ3SJ(hV?*VPAZQMi^3Fl`s{Y5RKw(Me6%u;AF8^%!wkNc1c$za#4{xSPT`E%S S9Vp~Cm%_KoV8l@1hW`(E60V8> literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image184.jpg b/doc/salome/gui/GEOM/image184.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5bf046de2599294e5a8e5295bc518519bb8bfb23 GIT binary patch literal 16038 zcmeHt2Ut|wlJ0Jr41yv#HA>Ec)7KtRbsvLultNhE{N5+&y# zIZBi$nWp<~&zZS%&b>2tX70TFUh@$)Yp-6_Yp<&M|Gx_N4L1i|ysfOJ3_!py7JwE2 za999#N9o2bHeGX5OFMfTdkZUbXErrEQz5noB0|?h0Nf<-5+KCKC&0%iBp@IlA|xat zxkySvOiXf_f`aTK9W^~YEj2AI12YGVf$1s}EiD^A+f^=ZUS3{$R>5lmJl8mQc)1~j zL_{RSBvhoNRNRcTjNJd}7p?{J4geqokl$XwKfNG$P<#SHB4QF!G6(?ueGL5h`{*AA zF9LWFC=?GLN&tQe@NHgzV*vgo0;($_HwZ6lKOws6NG<9Yok`4ov$T;$XJCip`co%= z5>i?^dIm;LE^Z!PJ~43#NhxU=#al|sDynL?@9Exup!ZPUz|_qAnT4g5wX=(>o4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ddjKAVk0}PZ@cRlRmH}mLsq0X)Q8x#2qVAwn1D@t@|3@q!WYYd7s0|+~qT2ebTP?Gh$GQoX2+nUkIaAumR zQoT-}Wu)`!Mbc{e6C#_R2$Dk>9r(mF!A$&x7nC43foE|43I-vAwM`7y7gFDONZ%?cJx^)sGiUL!+;+n-=UN)8Y!Vg^1U_H4jrmU-Pv9|z=sIrFdj zKL0g|>|S=dgcUowE}-{Kd)Fm|=zYE8s6%a#Y1*LoX@`;9)#&4CuzMSPvwlO6b2Tjd zYS{sh&%kVb!&U`*2A-<$e#m)>@Hs&R>}*RIYzq2+d#-@NqscrA@2;+dS5@&bwKN28 z@}+d~cfj)5yf24GxH!vY?b1(^oSzJO`>yHCJh`N*pd&?0f9do2GJ&4#LlpTYbO9M8 zAQsBAu&WeiHqlsrXW;F%Kx`Ej8u%DX|S)OWsiyLsFlC{Nea0^2I+ z(DRlaaBT3oB=#&A)D}TyFcTDBPhtDBXIn5(QpC~*2Y^QcIRrk`Un=6U0W0XkU_byv zNyGea(&7Jqhks=sp!_<=Df21cxXKdR;x+LjbQ7P2h^|uJbbNblZjqS^Ob(_ktlT@M nt1^iJEpB6yFw;aOhMLd>kxv1E+P#ApAz!qpA6u}&aO3|Ci$6a_ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image185.jpg b/doc/salome/gui/GEOM/image185.jpg new file mode 100755 index 0000000000000000000000000000000000000000..7fb6ef62a95cca8a7dba1620c7be54a6730d7ef5 GIT binary patch literal 6145 zcmbVQ2{@E(+kVCvvXn6Pm~7c)Eo;aw*|L-{nCwN!8e=C*q)5q zRZ=-^XoIkKcDdZ+AWxjoSuP^iJAKh z4=*3TgygyNQqnTYDynMg8k$;H42_IUu3j@m+_15=vv+WGzvJQQp)69P!u4lNWu%W0K8D($#XCi`0HK9pSS1?UqSRAY5*s` zJaXi#EF-QV|JqZ_8C;YdOr@u;uO()nrSGN9>@ae_MUR9Rb6psf^Oy2j4wQ1h*J6|2XjoCSy z4o{l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MeiP&@R#QPK8Ax31=9YP;oK?4 zSb^r&*?v)>j~A9|iyNG9adxE7hMKs^?)EHg?}|Aool4SEYqrW!wbZqK!@QG%1k(nG zcyQ*VCJ)@~df7OG-O1Unb{bic)uVpv?@sAW{z!(mOOY{9p#PoQ`)Mo6%Qh<`3MMY? zb4kx^9b?SNT_*1C!Z&eIRjB$4yrPN}vAm$acVmQ> zf>|TvOJ&T1^Cz-n4kc$0ZgrB59^71Gj&Mig`gE1$Z>0n3v<5VB0u{wQNJNFXGqXvmrUG;g6$I` u&%yuGOz3aMKblTT{V1F*`u{x!{0F;%Y>@VUaZYkT)&R);Qvo3S$iDy?`l^cn literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image186.jpg b/doc/salome/gui/GEOM/image186.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1de5f1d37bb311ac3108c886b36a9949f47abf66 GIT binary patch literal 16278 zcmdVB2UHZ@wk}#t15HMPdYzM-o12D-Pmq^Oke!R0 z6M_qa;p5?x6A+Md(oxZI{+C~v4#*n-fZ#xWzkt8JAXrdr99$S4J^>*Ffc|j~{QJk* ze>!;uz=A-bSlCb;@F~FC1c2uNY%(13Yd7U_DegUjvAR$S1;)L`V^b(?y{i3Xhh5m* zH3*-8ikgO&j^jEf7dMZHsF=8fq?F>V+e*qRs(0?|JkZtCH!!rYw0dl9V{7N;?&0a> z?c@6_`1y;F(6I3MgqMj)$tkI6Z*tz|zRSyh|DmkBqOz*GrnauFy`!_MyQlZl@W|-c z_{7(5lk*FUOUo;(YwH`kd;156N5?0pXJnwuSlHN5Y}hZCAy{7EFO&=$=h{tNa`}6( zM=lhsLVRsyd=C15<@7&%{)fw$7Jv*7 zI0ky45YT%v2$T$hnFNTS5byv>2Ec(mza)F<8$Js`;?eAi?A!#&u~(tX5*zq~jRB&1 zJkF7GiHXI9F|n^{9=v)jHsV!YKeLh)@i=Wf&%qkM8sEc(f$R>MfyN49{X1v;OPB=lkN_#XJ`pwqlmu(8&6DsRT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M#v|wG{9SF69z}C<7{iCXA?6_Amo@ph| zvVamzUGR&Ed>?$NifKw7RlYl=W+xg!AE=^8i70EIrkkS}-sZt@z115_kW;9pjWz^k~ZI^W6M)%|PtZ^Vi5!Z6H^`N;>}6s5wl+`#@O1@%x%)D?xxRf>QnE^}RsafefqFImpO? zM&2|3Nt9>b3HRlQ;rxH$G#FoI!<=l`^$ohk+BRN%q`HM8$&o(JEB)HpDc~#MH5-0S z46nlO(dHU$X4#Y)e|gs{v+pW7!OyIiaCpOS6mooyCCMm3UGtofQDHase_TYL9U~wQ z&_Xv)AutMf)6`D2ObAk3@6B$`qAbh&J~wEVLQ$_oE37I=T%5-IUeEK_b`%J!|I-ir z;{pELJN)AT{#E;b`w9M42mW#UUpoX$h@Bu97rSDLme2r6DfpcXJDP2Jl^-8Y*~WJg T4pi8Oa5P`VBs;Q(qR0O)X>{wC literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image188.jpg b/doc/salome/gui/GEOM/image188.jpg new file mode 100755 index 0000000000000000000000000000000000000000..00f58a0457b8420f9c81d30aa778fa7f1dd60e10 GIT binary patch literal 18274 zcmbrm2UL^a+a(%6MX(?U(v%>*N05#XQ2_};=)EXKnxPk|K@^cLp-GKWq!Z~qvCw-* zdheakLJE`L|NqV0Z`Pe}&CI=FK^E&>D>>)9=RD7T_TJBX@%LgLa0{ZUt_q+a|J(!I z0RS#Y0N@K1Q$QCH*a3M#mvaUa)kZm*_7u+!t5Aa$DyWHJ3Z1#Jl)!SGk{* z|6wZ~gq=e+c^+{wX37k&u{_obn|#EjuSS?|XhhVNpe8Rdr2mU46svKP|0o z?H!$6L&GDZW8;4(CKnc$mRDBS);Bf}4zWkaC#Pq)b9(ZSDKA~3xIY1|1so?p8)!+6n6pVR21aV(^F8fB`>IZwc!HfUlGxw1EHr zZ#0~>X`4{7tG1~ZfJU}taGsrEwY>OhF)!0hW3ZhnLwc3L1nVV+tH16kZwf!#EsLOi z$q3M{RM=#gc zSjZ*>)-q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}LrrBIT(~Qv`A&!p%KZpo>R=i1fq_1;Lu1JPxLB-47rgzTrUt5_`2=o8zmLz)5Ev?!mB2ry1-A}g3V9_PzP3Uf>mhHKk2{wD~ z+X;F&>J9KzJEV!ZOS1yjgd|?d(YGM}63HjM?r#^Kp_HF;V_x66QCY8)a;YvlZG7|%dNh*Q8f7B{|9J$bBX`} literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image191.jpg b/doc/salome/gui/GEOM/image191.jpg new file mode 100755 index 0000000000000000000000000000000000000000..92144cc517158c8c062697da841e69212c01fd13 GIT binary patch literal 20633 zcmcG#2T+sYwl*3BL{LGH-Xa3hd#_QE5)dL?y7bAiz==@5D+ zAqhA8oO93JXZF4`=l(PIV<5wP8Cdz=^{(}-=Xu`SKevAYk5rYwN&r0E7ZZRQ0Jy~h zfUgx_yn3QzZE5G?>f~x`Z|(U6>|)9PL{ErcPzZ3l0Qd~JOF%$KKya6kkdWx^T_WN~ zB*gdb5kDp+z5j@Yl9ra5lA4;1kqt=4@RWg?`U%gIr_VUJxVUJU`2=}61=%>cIPmTg z5fR@brXV4q;Gn0b=lK78-FD&S0swe~c>i$${_DcKgHJ$sm*^fb$$dNk{(s)X{ru0n z|8(;a;0_)>{v85*Lfogo{h1)#JpchYAq9)ji@T3C&5546Qwo2K`*Dx;W%VyAt?^?v z5ett`#3a--v~=|B&p0@_xJAXpB_yS!6<#SSDXV~0wRLp$^xqm7T3T7#*xK1UczSvJ z_`dh^5BVJWCG2Z>M0`SGQgTXaT6%6?enDYTaY<=SZC!msV^ed>@6N97p5DIxfr-hf z>6zI-bMvcf>l>R}+dI36lhd>Fi_5EPB#Imt@*M&Kd;+3>gp7B`7x#@%PC&>abeH0V zCXu=O?Tx zV4EZPrzFTQ+crSdasNmE`#~d=z~0nAIvrnuU4c^cD@kkfPu!FHo^_M8tc6eh&pu3` z;GjEq=L1)^s4Gp%cqpFgCB1s<)04@kb)XZ$wrFZ5^AL*ub4eK;3}kgrc6N^bMh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61e+dvNj`$ny{!kI+u1a z{6oq>i1@;JRFu3hfc;@@5cq{%7fck~dx%B|u5s+tjFl-h@hc&-%cyY06ZEb&$eUzA ui({Ti1I`nN=w{GyL)93~*5^b3wZ^5V%vusoO_km+ar?^)_-haBjr<$#(KDm~ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image192.jpg b/doc/salome/gui/GEOM/image192.jpg new file mode 100755 index 0000000000000000000000000000000000000000..57493b9c3c3afcf3d8e67e07daac6b8da7342a45 GIT binary patch literal 13112 zcmdsd2Ut_vvi}MJLN$Q&77!GW4v`L_C`ArMlqyX@DN664CUgZ9X`+Y{MFbQ?kSa(N zkRl2Z5RfXp2+})A-uB%0?mOq)_uYHndG}xAC;9eXYtNe5nKkp9-z-W$b@&?4yQ85m&z{+BW6 z?_WlLGsps{U~o7UHJk>r0upl-8Uxgj-rn#DXXZe=^a0zZ(wM2^7I)?D{C8DI~Ugr7v0=FJOcuQ zfX!lPqicH+$VWY^9u@}mAxvjsI024dEL<1^uD>Jwe3S! zch8sJzW%QRW8)K(Q`0lEbMq^!YwH`ETiZLktdPo7)YNcl#7~uBR3XrRI4d=cuskiB z&MCw>zk`PqBI($5Qy!JRqZd)MSmrqI|CxbP6g_r$<)_xaD*eyt9QCJ^{;SS^RhjY@ zu+o8VpcM{-v}c9ESz(j`zyyau7jRa90YoDDeb33aw?)&8r2Oz<3`eJI(pt*;&hVQ5 zvb}Iz%$j{nVDzY6c}1d+k8bC6^r>9*OAYy=l)4Bii2^5|@>DDR zD1Me+VM-cJvFkReijWMOR#bGbKUQ~M>Pif(t##%OKa(%>>5(>W3yZ)BRa3_`58K5{ zSN9g5W=h+KTHblMx=JJJW1)QbagjWs-!II@M8&oDVvm7k+EA`|3`5P~Yy3O>V(#asG&& zr}z2v)@hBBWtKfteJmk_Oqly715ya{CmM_Bb@&Jr|zGWemYbeCT%s~^N4?hGgZYcLslfkIr-yd5vF9> zkM?d~up+vt15L*Cw)z&9J{PVL+CSEBY|-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iKEJpo+m{O;o)d7_2 z)4q`$KXfo2HEyHk>F;{3RQ69< z35A^wz`0X-AuY;F2`g%5LDVt>*;1TFmPRPo`0RsSIH-uJTENT-L%&QUBog*9bV2O; z!eX)4l29r-`1bV;x^t33+&9bKy(&-jm2c%w0Bvcy)%8YsuU9ydPCMG)6Fc$xuq8G$ zpeZ^aYJz(p*Ztc#P6^Fti1zXv|Mq>k^J1&(@raCRHB2hgDG5_*?gpWv__R%LFjCT6)5Hc}}@NtQYp*(caLH4qr`i`19Xs48Pb{#H0W#u=9U{Eip4I2F|k+C}#BAPzXLb5XiXnzYlq2 zzs_@R-p~j@N7nbLHoOz@n^q385JyXPBI8~>4f}zvwVevMlj~ZH;%5p%?H{Co&1XQXam;L&svjy-q4Kl>N}MPLERnN?0;nl~^bCi5 zxqX_9tHf-JQNZFE*s+4;jhOnNrw@EC$;G2 zTW?Omt+(r&ic_I}_dK{7-;lFTQwp(D7z*%&(vTMW&lH$Url){Ch$%j|oKJ#X#x6sZ z^*{mmz2?Zc(MF}NCqxgWl#?+E8sSD(7HTZV!)S3w>T-_v=rRr({%CM>uI_$lQuF=h z=j=c{!|2}=_dk0PTF(p44tu;Bd@B~_p!=B7HcUMp6^uh~gq$fS1YbDA`oUNpz@j_c zp>u1TxfhVJi!OJ5&<)$Zv${>C3xLr#fY zOhoO{L4XL`0-YEkl|sLr4mW0L`zKh$R7zoIMGzzkKuth}&HH2$wKLRVo`6o1ko%z* zi%&vr?PH;1jf0$+b=GKzb5DkjpzNJ*AxFt!M^}FC`v13UisBRg;^ pUf3q5!Im~0#6GM{HpWVea7ZP67~&N2w)Dy1nz>v9mEx4I{|5bwHNgM? literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image193.jpg b/doc/salome/gui/GEOM/image193.jpg new file mode 100755 index 0000000000000000000000000000000000000000..dc184f5fbd70e311606f153b6ee647e07711ca72 GIT binary patch literal 9769 zcmbVy1z1#F*Y=^M1*KD3x*LY>kP;;oq)P-Tfk8z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feB)E&Y5Gg5WOC5s|&@RN=NJ!3F*PXC#vn6=2{7{%H3)vLoRhR zI`p>4e-}WWXZ(26|6=?fzJPoc|K`}&`28sNVQVdES?F=Y;Y0!VSi0lnT8T^ zBEy{o^^2&D-csLfXn)U4g7={AosE*iHSXf#=}m#WlTs>`5Jn6}{WE3RPpc$}Xxz=q zhtr(mcEU5IO=cH0P#su{K7^S)b-ThmMym-e?I#@|Bl(Bp{~rSV#|Hj)uFVX95##?4 D3*vZp literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image194.jpg b/doc/salome/gui/GEOM/image194.jpg new file mode 100755 index 0000000000000000000000000000000000000000..3d374bf0e2714c6c106057400849945ed70d9298 GIT binary patch literal 12744 zcmeHt2{@HqyZ_oYwlPFzwopit2pQU&GUXNOEt!&3WXwFJXH!%%grXF7NgBy4g@jCH zPBM>CnTgHb``Ksd{mys2?|aVoo$ou>xxWAT|F8dc86N9dYu(R!)_vc<-|t?GZpIMc zJz!{J2r%$V0tf=YKmq<21HJuHzn*q-@$_={az1<7SIWfGX@}HNl^r`(0HYUN0<6r; zEX>TTEG#TIR#qH4F9$mt8$17o4V=6}0>Z+A0)m1f;<9)VF=;VDK`BKk>8)}K3JSuK zN;|j9@068Ski)RzaO`aC8#y>O%83e!%Kg(HMh)gZ02mg`&ky*^2g8JAW?{v#v2$=@ z0QR>w`17~c-!<|ACJYwK#EfNuPXUJsgKdDBk7eU#6+KpdOGlivx4^FOgnMi<`gv8G z4zzk)u|}tZkf5oj&92 za@N(?&p#kAC^+QerO2quSFT1UCf&H1oO0`S>ix_ISr4-xJ${m3P*_x4Qu?y&ZFNoU zySn;@#`ccRk6oX-KlcoejE;?enV9_gZGK^K>BsU4Wp#}Yn#{z^jAh2Hn~Y%!gx^>` zW|qw=tQ++#agN^n(!0Xh1oRW`7Vv&O{-8`Dqr3=+-ft@*m&&rfZIFys|%5b@GcE4Miwp>e- zKd}2$U*VwH^Z)~dd*a#I_tu*&MBe2p%OPr?(v)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5X+%R1frZ=3qZ89D#(7=LVI|2u7ev~-id xz1}T_ikDK?*>;u4bUX)UTi(wr7Wx{;gh$^z$#K);TKq4{jk-7qc`W1ezX6;-$9Mn$ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image196.jpg b/doc/salome/gui/GEOM/image196.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1f6dba3e623a6f74123fd5ec92c13d7376d4f9b4 GIT binary patch literal 12763 zcmd^l2UwHMw(f)gp(BVC0fQ7NiZp2o1}uOeMXGcaq$wap=_a6Hp-B;t8bm~?B2AjH zAVoxwPUyY&4k`EZFK+$!{r5R%KleQM+~Md8wchovkh{r4V2`HSIW+)- zes}>p0AvzCov$OLZ=HovkEGjC>c|ct9h=`=1 zh^R1(8iAmtp=G6`V-?=dzF+vi{36%Do&o@)g8lXaf4pE6a7rp_1Pv`6Jq*BqZ-f5- z-uhGH9zX$u!zn1?RM1mE!vsKWfRcrZ^`Mk0_1+7Y5&Uj!(t%OwGy1pE;|hu5nJ&z|hFp!RY4(y}+@6(2s^X5U0dJS+}hq@fmEiTq=Zuee70)1f43?bPQA1JGZao ze_Jjd5UVz!(J`rd+Yx^6V6X-3T_HvM(puQ zF_qei*4KQ!B=Fw)=IJ(k$uviu6TSS=IRdDoG7Sox>kVr!TY6v$cFFtWh}L(S!Hn1KY41|9kX&k*FjF z(vufDycc@)<77`5Do*=_F2vR1^5&d&xUv6WeN(4^-4TOW;}VB zg`X$G!@V!0m@Jy-%*>C;G15&;DB1>Rh(+>?*u8hZ<6%>#}nmv_0u(Ikm(2wJ-YGm0m zb{x4^pK`#F-$cZl=6qN}v%j-a7Hv`;S)5=T2@)F!v#qxXetSUTipJCq-|I`$Z?-;qb^aU>UwL^^S4R0tj zTGLte#Kq4k=RK!)&l>ew71*}Aj-#z=;*U$j=QclARfxh0nf7Qj@ZJE2qA!eBo^5{_ zdhvl?u-*K`j%!JG*#LKS+fcM=7^;HH)1(nr^&GvJPVz~2SAH~$cDN84n_Z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JWDPVPEGl}4g|4<=@tK&VHnwo znsTXvC`4{o$a6sDp7ls*O7s%-Z&Lzq^hI7Jb8poAhu`Gyr6L(DA>Q-NMKe6-drw7uO%Vk|vKN-tg@AGsA~ubOlz3#xw$=)33_Ub*$7H9a zoa5nfQ(-}WK;@!a`hB2UgWMqD?DxvnFKhO_7F9=NEKA#hLHSqBZ z^fDWiH~cz+`pscWwGI3=tpc`zMpq?gwnAb=zn1`mWc~RF+A%%qd~7Ih^;3}#nfHAA;G zlc*uu>k~w^Mmds!E^3P#^*u%+HqK@dmB?V|IvGGg68ZmU&zH~eN21;~q-5N@$$V2L z{M{H22j39J2g_t#Yb7vv)g!C>q@KW$wxdjQJkt5z?*ysQ`Yi4>^I*oaV4Klg{$ufs63j^Zw~J VZC4y>mG`C8uN~2tae$M1{ukk4`gQ;S literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image197.jpg b/doc/salome/gui/GEOM/image197.jpg new file mode 100755 index 0000000000000000000000000000000000000000..11eb06e4ab3d4dea89f062ff169cc52578f80a8b GIT binary patch literal 9273 zcmbVx2Q-{(+wO=iL;*2&qy*#=_e{z%!$g6EMQKMx;205cB=0pQ`_;Nsxm;o{=r~3{v3VbG z2MZhf4h}Z%?OWXbO~CCQ0EY~h{4xJ?ya$?Q_)M-80`KCo2$M)?3~=Z{DN+0J(I=i}idi(mv#wRAHre|j7 zR#w-3t#52@ZSNc%pPZhZBQGwm$Zk!(gM)*Oga0p+vF>=^Uf5(fxR3eq$e(NCo4Gz< z5_m^IAs3fb-bTnQsC7tb?lww9#UixAdh{==|1kRh&gS6%FQfmq`EQdktpG9tz$l;> z8|&73GAwK|EX*8$7#r*M0hXO}h+=O;|Bp?&vzQWhoJSR1}0h)YEoALN?&4|WnAGd6LMVq!a7G0Ku!?G4VsDEGZ zN5qj^)Q0d|TfL3*?-dZl2W4>F9zsRaND>$n&EbjehAgDeO zzWO^j!lxwU+zyM1HZbw8vBUaf(o5#pCuxR5sL`qKem9 zDk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xC?#^A`x?{M3ELmD=>TYbc2#EZVnXOuSaK`?k8{1_Yp*%Qc_vN7n?YIe-*!gM2sHJ z*!dXRC9+z^4)goe*VdQjDIwN>MVyVf{hv11}#w$L^OABOnFbZu33E2a;2niUfmSb%pM2xc$<=qxJ!B8n0fgh=mn8FNND zLcxjCKV$QBgLNNVu7MPo|RJ`e!-YCNZ$A)r_@c#n9|0nJK UfQUpzb_SpNM(Y|QNc0AZ=J`2YX_ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image199.jpg b/doc/salome/gui/GEOM/image199.jpg new file mode 100755 index 0000000000000000000000000000000000000000..277d5ed59f944683d5ca6d48fdda2b534ef9dd8e GIT binary patch literal 13440 zcmeHt2|SfuzxLYpW*d`v3>mURWT;HpN`{?66d6LK%t9H{-qC2t6hhb@gpkZh<~bQc zWS)o2^R(IfyYoD6@AE$IIp=-ebIy0Z?|kRm{c;a$`meR_b*<}v{TJyQX&4+luZB?r zFzDYQzzP6~2zW23o;k;N*~-$|(aGNFmW`DwAI8yAoKIg;{J10_^?`?g0)Ze$ASlSm z$&nNkNUDR>RFsrdOa~6o9Asl=XJ=(*W#!-&` z1yM(ZVH8Lt6(toTH8rC!Co8A$Km8-szq0!c|lO#=h)U(=w! zzoz~!@gN|B!Qo^GI62e{s2U$A4ImiE84pXIp<0ns_`Ge~9o=GOKO17tE80s%)Lf0zs-bBF%J84%=$B`Fxs zTtZ%VX5yE6K*@YIG%=@=Nee#?&3EMct}H<{FzlUMlOsH(N>DTtPp zyStRw5yj7i_UUv+@XLmT-A)|}cHZvTxcu4F;bn54f9}u#3HS={3f@N%xZN!cOC&Kz zA2~}1;gIaRs%R^kZ|FkF!RE`G_5+2po7-Vn`>m#CNt$N8&v0i`*TAukZhzC31efvx zX>mu>i`Xjp4*lhz@xo=*v>Euk80!&tk>ppK^*Os~cfS9Ue$z7oqbBLUS=ezVD|4$- zO)V*{yz%3_gO-ZM@*J)LNNLNga5(#*-iw)6!v}o_Ez*08E+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c$NBa`!L~Ckez$K_JpHwJ&o1T@^`{N}Nc34mI?QFocEm*6_0qTf?fsjpxoaRPrgj zLm~p7-_}^L2AztM_!)O?ch>_q!?}7z8!ZNvD+C47gaK{nE7*5smhutGrS9Ejh*D6v zqahWPe(S8_2@+5gf{yIPLBiFcA9xx}hi#?8F5TMi_>UDVP;ItaXSU1H4}n`R1a5y@ z2iqS?z%9?`cC0 zRN*IqQOGO#)PbGmu!NvI6uS%sVytY+*JyJf_|+)iiUH`{{GlC+tI&K4n(bZ$ygf!v zdvG!A5~Bq12#$U(>lE=pBzlVq(jAzfSdV@zbTq1ocNYO2jd})!a{gzu&C$D2$`i!c z)02s{{g%jJ@ku#(1fyCvs!hc{(Tb<7fJYF!zC!f%XeM@e=pvrBR6wuniS~2ZMMnmP znV^`KWt0QyF;u|K@h?oR9!af(O+r+$RyveQVQ zb+2`g==38NX9gi-!av_4#lNc-VW>;NTTq9;lfY@nG#K{p2H+2dJCgwKzcd0rYWnNo t9CvaO$9#OzfBwdi?WQQXegRdaQVE7*O%_kF7uHAg8HJofa)2fE{4aia_h|qC literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image200.jpg b/doc/salome/gui/GEOM/image200.jpg new file mode 100755 index 0000000000000000000000000000000000000000..c5901718828af7e935f5f29895ad5d0bbc4e9dd7 GIT binary patch literal 13194 zcmd^l2|QKr*Y9&2GZD!=&$CEo&M6_ukYtt$nL?2{&OwL_Aru*sLWRsTnUzF{Ix^4m zIp*Ow=kEI5|L_j?{r~>=zMs#1?|Zio$Ju*7&suvwYpw74uJsVV6DPp&i`u%{00#YV z0cHS*1i*7i>+E@669+pdcaPg1j?NBVyt?jo(!8d!(x+qraRfX7(7Zwo{6JzC;IwdK3N>Efx z1V&ClK}AW$NKMTs!p_Vt@=qVcHdqb-Ff!Qh1N_eeMgk`#Bd4IGqNafX_#fAxzkgi) zyNkyG2@DP=A%&AcPXSF61YHB93}lRavS-OpT)siUf0s!vB;f_6z`2s8v#_$U3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O`Kx^^uyX*hUre z1_q`VlK5HQm`?1tWy(GA5y_T?4IO=8ZzV&OecOFwtHw-;H|{)on*=TYs=wY)eMPZ< z%*oIj+~w@(pZ25xN)$coAz810-0pdtaL!|)(YZ+RW;sLlbgLK&&19ub|K@qF(@18G zk5l6ZluoEU3Iq{wW|LRO7L8l~;4&ZreTAK>%cE`;l?gV_sKn*IAla7Nfu2V4yAcgBF?I0 zMqgM6?$*#DXl0WsG)jwzT>eV6t&sE^pd*&g!V zE`*%9CyZ9`p!4QZB7&+v8NpuP8y~y480gKC&iDA;CA9sUxFu9A#5}&B4yassb~pam z8U?L#pB}Uuswn}5tAz+l79rF!@(BOvk8MkXlOatw!^eleNQCs;lT+lF9qGV;L$9|?Ry3+=X zzcvc`+3EMM@^TB8g=$rXIK;k=7hh)NV|C~{Y*6%)5gVRFXUy%b%>(#$F=$^$jT8Nc}h`Gj>mVmhWuIE;k&C^RT}qW3_Q-S=o0 z+SLk!$_oxXO5zEJpo3-OUhe>^Q*#%M2T(zRN+JgFnagEr3OsbdrkuR2x7 zoz}3JI~S(V$_>74!E{;Y2kk0wv@E_J&T`F^)sN;9UOHHd=YMRb1Pj^XAzzRP;*b9U D9XoIe literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image201.jpg b/doc/salome/gui/GEOM/image201.jpg new file mode 100755 index 0000000000000000000000000000000000000000..0a6a1b4d7241663d90e9f1cf08ab9b40fd528235 GIT binary patch literal 5193 zcmbVQ2UJsA*1iymAX20Wf~eFGB!cinl;nv9q&z{Y0umAF(xlgG0Z|kqB2p!S3euY> zpb(mLL3$G~v`~d4w1kw&do%N99<%;6|No!6?!D`-eb!#z`S#g+f9EoXnLhwQLp=jM zfQ@xY17ZNcWB@Y8sI%t}TR1todU@aUc5!p^J8a@tmf-16cadY$R;n~m2yI)aKOj7axJeW;vSpdMs$@a$p{xR6tAsn1s+Pzgz#!C;wvs}WL9Jr7Aim2a-&)g%cTUsw_ z*0Uye;`*(-JiKD!2P7or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 100755 index 0000000000000000000000000000000000000000..0674262238ca292df486ad3297e815d880b3e0b3 GIT binary patch literal 6377 zcmbVQ2T)U6yFHPPg(6)bRH=eA0Rs#MCn>b0F18DE4X{rIB(-#N81OP+= z0M=GjzRd-FVCVGM?V+2a^8-&V&Bu0PTqY7?S0w=A4DbRVCnY5#B_$^#BcmWEr=X&x zrlO>zx_IHjSz2ZW78WK3CMH&PJ}~Pgo=Z$jTq0aNmj#4`gjhJQToo0($|oo!03xTL zprWLrr>3SCU}Itv_&*O~J183fKxCj_1NbvQXGloN$SEkPsLz4`lHYTupTB4SZITu^ z10o?gLrOw+`Y%pz6LdNUkkXOSb4w_bUo^N+!Q;Uo`8+m@lJ{153!~xiHlLL3lVB=p zCT12^HvY>3f%`>L z^!&o&((=mck2TcJ?%w{v;SmOVOm_dB`!wBah)Ao@@cG$9IpLs?N2m){a z*8`}#?z=vm?#yd`U)$xjHKV&4t(z#(ZunQrB0v#la&TCh8b)g{tq*^G@Ja4*k#Dr> z5#3o=6Cf}DQThcw^NaB_iCtg|^h^JcHyfp~9ZKNNE>{Q=8^dNlfE2bgFGn8u3I;r- zKkwZp*)rr3xht2Suz0^gc6ZG4M{RnL*GaG>xrt;OpS{E_m5`hDHUM3orospqpg>!{MSi=?p_ayaeT+DM|IofZ%vu zyMjWtSO!ZgRz%g6mOCx0y)MowhaN5;8mYaXxyW0mxAa7hySdNl(~qv8YHg1_v%9w^ z6}p~K4*Ja}tFC5`%e1-cMD)gq>0P;( zNz)-V9$iXo$jSGOPGk)^&y1kY*e~$K++I37dFOFZQsbB`|9Be9?m541?^A�?G4v z8bkn9BD#WtX}#N6*MR7q673k0InKP~F(lZf65zJ%AYZAY17B{P|4g!UYcV$V$kWQb z_zwJBJT~2^bs~R9xinr_^HN89Y$bfF06bVF|5sWxDd!9De@i5@bls(5wfVV<(7g2a zWrF}@5)ml1wti$_)B=4pqZPD%@X;j@gL18EdUDBQKFDVj|2Q@vN3Q!t?6E`Bb&GXa zO4Z84vU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Vfew2oD#~Xhi%!N%`j)$=1y?@vOZZ`Qv`s3zH3QB`#IZC}l)y zn&n&jCvg>K(6-_C#lHz+v_`gEYkYXR3`*P~1X~>e7W}%)Y`-beh`+Be5Ng_|*S(pa z;lOZMNC+T2z$o#fC3ZxaJcH~+eifCCSmvunbooRb2kVan&Q99>f=YuTKOu-TMVfTX5`YCF^n zOZ_&}%KD)ewM!L#NSHQuVu#>sPT;YkW6#(qAQQ-R1IgVX+FoT<18 zEW2;C!i}I0F3~}be3Crv;mcAlJfe>0I5oFyEE8_YiSjvVdBZz!LkRg6`?6mu+lWzmtF#8Yi-B#yxd*T=8QRgyu5}i7=qwxBo}G zzRJSNhRPh2avh+uqt6+g6PYHQQA-gfT3NbJo|eCO!(ywkFCg7R3tR^TY4xRuQ~w1e CnIz%> literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image203.jpg b/doc/salome/gui/GEOM/image203.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8ecfef5372216468606fd2242668f02c33ab4c9e GIT binary patch literal 14865 zcmd^l2UwF`w(d@W(2?Fd2uep(q?n-61OzJ}(xe5Ijz~`cK}CvyfFdP|fDHj@3L+rA zC`j*J0qMmMT5>=9XXf{xduHyOnK}2I``q}*ll|>4d#~Nrdf#_#N-t#;>^Z5erww4x zKLNlA0EG;M474;)2%odJ#k#m&b9HpG_Y~H1v6U0PpeU!H2q**KCZI+lsgOu&Dk>@z zH8qNM4;?KH4J{iJ6a5}8c5ZG?c1}(nesLilK2bhSPGMqlvR+CQV^Hg zCkdlQp=fDnS?TClC3!h{CI8bON)7A@05B@p&ky+12L?wVsi;vjv~=_^fcUKr`ukh$ zFO_=$9EL!^kq9bi6i_pPP#r+BP_c?AYErYEwn2%yvnvJ1KBf^nmS4qj=F5`!fy*8t zv~-+Y+&sJzdnKjz?N>f{=&;HW)#E3$v~_g#PM$q?{(_0A*+pABdk06X(-lvz>)tnf zeEmXihK1j{eJ3I={(eGY(u0S|PcoinW@SHn{^CtR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$U02WRvSxCNTb;+{$@hVOo8#Er0+$W z-V)r9AYt65{>o?CE~_`TG5}Mx0&yR62a?m z!9(_caqvHOxty?m1i$3S)u2>uEBMO;>>}3K)628BVB>%UjF5m--VrQdq3AZT)>R}v za{%|L8ETY^jpi_>j1>l7>=Ed_#Vi|D&P=|c$iX_^HJE1E{E>Nb1ciRI)(B5kC-Ra2 zmfc06t?j&U&Q365I_xk=BmgmOUMkCatW`h$xA9{|>(G!mb4x>^ep;K`0w0s|L`u$Y z>`@0tS6^$lXo%Gg2?*H5^TBG8N8-xOrK1jwMtTJ+W#l!kRUES{BXxS0E4}|#{(hh$ z_A$nj$K1(IJZYv0pRUgo7kaaH^`=Tqg56j(TcQyZqmPpCZmz6(^WU`pQ&vZUw^xuz z&8j7&J(qW;jX(a%QhR>r%_nwQo!W*{8$r(agaZHPQ>uL*DugQM{Ml-t4ByJV_?Qxy f5(~7frG+cLth(FOtQfraSuM4@f8435Ngw|O_^bx- literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image205.jpg b/doc/salome/gui/GEOM/image205.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2e22430342ecd479938213de54d4cfd0b8705da2 GIT binary patch literal 13829 zcmeHt2|SfuyZ72Qwka~twh&6D$eg`ZL@G*#$V`R|A&S!8NFj3}Dz*?QO6H*q8H+)Ew>`_E|U zXaN}X!w)zBAd>*{tfs~(!AthGj&ANQ?ha1&UV=Jqwo-ydvQjd#fII;10cuK0DoRRf zDk>@jH8p~EKOHR%4J|7pBmI6(HZCp>HVzJMJ`p50uMjT>hoFR@kf_+9Lx;EoBxR0> z%ZP{{5`$4A5VSP3EOc}%Vmur?V*lwExfb>U02meQ=L`Jh1*3pdQc)vlXzA!-0RHP4 z^!L}(-#pw8C}40n1tpvcng!I2KlBVxGE=b}kkz1OyCPE7D=g|Wf`O`h-7)u&CtK=l zWlL^;o|Eq^Dq2X<{BF`IKk(taxao15QEqNStb;YTB$lZq+M`t%@zU$eg?oNHWAhU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Uh$io}(Vfx0@uufn`#KMGY>k8a|a$bJ6; DwqlSE literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image206.jpg b/doc/salome/gui/GEOM/image206.jpg new file mode 100755 index 0000000000000000000000000000000000000000..85e9e803d38d02f57ad70ce8533323994a784d0f GIT binary patch literal 4983 zcmbVP2UJtrwmk_wDn;pvL5d*(L@?OsC}8MF7Xc}vG($&&5G)`fMS2wwh(W4=pu&Zq zAfY@JLI;uFf*>6UA$d{n_30h|z5o8-XPmRg9($a#=U#K}xz?fg(?wA2})y(1(D#04p;y3o|n-3kwSy zD=QlZH-v+oons#-=PqsmUO_>AUVeU|0}@c7{bKw1`9-Bg#SX*ZaJb+>*`qR2MS(~mjE^T+Hj zliUCp#KZ(HOpV~o$p+dIOgbc zn*+ixASfg(c^D=IM<5lCpE!By^qI3-+B)Y@x~6947M51l7o40gyIi^I>gMa`9}sx` z2IkJ)u<&~k_aoyI5|ffsQq$6N^YU>|@C8o`D=ME?Rlj)os^(2&)7xfZOKTgctGlPS zuYX{0Yn6No` z?-NtF#m=i4_qhBuhxoDcOMH$#oe+Kr~lpGl3WbCLTZyXejfeewG4qz@ZR;(Xpl&d$+2Fx>O`t;XOx^@t!h# z7ap36%4;oxI4XI{V4vL=lad*HOs*)Thb(j{6Yoa%qY>d%n<-Z7mNQU;-( zCk>cH;Uxu&UgY%bkMJettQF^Ere|znZRvn`^&ffKa(fI$>~Czk=hDb@pf#(^IibiY z^g9jUoG8CF@v5`A`Ne4M=LK!cy%gkzd!;Rbuf{b(@J?0DhDx-)bJtWd9mu9a4rR#s4r{+OU)bRm&)Gb=p<2c5sft2x(E(e- z!nLuJ+ZaUWK-m-;pI14Bg%$SnJbm+Ti9W}QmmC^_rfexjt6ap*plglZ&*VjI!aH+o zbTVdCuxnZ7E6;vK0s*uyM)`?93`W2XI{O(H&$iauD!SC-yQtYZE|7r(Q9Q4CA0N3~ zI`31CG>603uD4qe9#_+Pv6_*cdDZH0Ib6|D0`Yqft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qUs9>eCPbZ1%Wmmbs`F=UIf0!ci+a zz{qJ?Y!jNc)BXb<_Y0FyaMdo?)$HGYyuE?4#IZ5=HN~lF< c;mgjimUH;w{^m0EfBl^PF2(oxc~qF literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image207.jpg b/doc/salome/gui/GEOM/image207.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8d9322977995ab8c3b2c0300655a4b4395494852 GIT binary patch literal 13990 zcmdsd2UL??w)P1DLX(Kndx?S~2#6GEQKX3oVxboW1w?wUi728p1r!tzVgW=2K6-D0 z0-}T_RS3O^)X+)!U;Jjg&fNKD{kN=j=l)?qLQdOfpMCazp1ogcA9V!mJ)^Cs4PelZ z0N@0GN&!M=wN9QEzIe^f(besyn}gFeFJV1bJ89v|veGiLfI0~70D4+lI$BzKIyyQ8 zJw1YPFB2mJ1LJ;HR_482?A+X(?3|oD{3szFK2bhSPGL!5(SzcL4jtkal#)3jA%l`Q zBo3oTAQ%}K_c1Z;6X)gR75@*vsEx1}0Kn*AKVRT4FBlD+mX035z{tc51MolFpuc~% z{?@n`(7@nu8d^9Vv z0NY>y4uhm;gTdKg)B(T(he7|q*?cICQAX{4yyW+=;egdKZBI#T(|v2%=y{H7Sz~dP zexq;MgUYU!JH9G8FH8_^wxUUNdjtzpnwv8_RE;#xwb4@kC|4L;ndReL%}J0`t`crX zw{4tBv!1$MFZ{Ycn#DcT!{B1~{cEmlm5IGnFo^k__0}1f*5D~!Z+*WYX0=Yf%9+H|3GNI}l|Z!p5;D*dZ_-ybDm-+; zoM>Q8<{;IM#5as8J`?e-LMJ?Fw0JmKx&T*C&87lX4 z>Q?fcx1!v;n^!F7#Y+~ju_N0X&+$P_iPjm1gF8D7q*S+UYV*d#{I7(zb>)z3pV+4< zMGAa=t*iXw1Sa*udh$Ts%4G9IW{Hb*iHT^psv7yJ;7(MdRX^J(k6vVfXiD-q9QWA>tnw@+u=~w}?5`K3!U?FN%LJ0@ z=UXK4!%da*9+S7(t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&{Tp{>$Z#LPq*9~Gz73e{Oe z@)@>n`L5y^J1L9v&9ygD+yC|1=HaKW#!JNBp_gpADLLDR%5tK#u0$zUosH+RqHS9p;F NZF*jFXd!C<{{i^3QAGd% literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image208.jpg b/doc/salome/gui/GEOM/image208.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5b912726d9cecb0609cc3c4f4f9444ba7cbabb2b GIT binary patch literal 10477 zcmdUV2|U#A+V?#Mlbw=%D{E1NP+j9;^WLuR&c0HnUXDAZj_=y3vJ23=!BxP@%*?{f%*w*Tf?{Pw zvGKCAZP>uJiJO~)SCC&wNPu5JKv+yhQdo4WsDOZ!qSRJ7`EA>_2}$fwQBqKmQP?Jr zU`3(WHn44EXWu9 zV;2w<5*Cq_lULZbU46HPrq-Ul2Kx<-j7?0>3;z9vS^M_I>=v-2B4g(((#vb&U^hnTeSh$&6xb8NqZJ{vi37S+?wA-Kcj6 zb;f7YR@JZ#{Q8Oa3oF>9)eg^YK6|l+T|h>CP7>-A0lpY1vP|7z2J?)lFx)5`(h z2CxQFkqEeZJ_M2vLGJ>bNCbR9@&PpXA=|!#`_3F!zx#rWqh?oB>s2wX(svO;`F+;D zgUS&4llDGZnk?fQA^uG-rd$7rfX>XO< zCTCMAS8;^ob!){UBOX4B&nX>gC*7a7W%a#tj%rs&D?KSZ`@vBbRM+)grw(Q9)_y*H zeqvzC%kq8g>dLdMW38KAjy>2oFV`QlO=*5XR+#dB+%Uzkpu&vfp8 z9aXN%8TVCe4u@IE9=&6Gw|;X(%IYH&(R)U-|M}`I>mog+!KsJyZD*N?Q=XzkyN;aY z_W4}1jW-9LK7B{_Al)3l6$$u(6#~No-=c8p>L+LoKGM<5o}-k^bl=yOPZpQ5lbRxnMqUJyEOBs%3qi)V%oJqRw42SiXY}>Pp{L`%+^c z(?L@tkxJhDA*5OF)Js(U?CSl;BOR;{{o}dfA1?dHRQSJ{>i51^ zC4X*7@^2a||8C;H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7wczrqz-kE8sruhz2U#mOxT zZ?NN7w?aE9fuj(>hYnY*prEEeRedfNIxu&}PYhs5V-Nw%XR)ysP1%45;QzPAiskX)`UuWGO{*eWONHM32U8jW(V5=b9nzJuehxzuw#-?g-#If)#nhz{-IwwY{H zX*K~ZuS!D?3p22Zso?bGaI_`!8MO}iLeJ_9#NHBN*~45;+~G8MABXyJ94HN&y(q_a z8C_Fk^E3nO?5*zHahq)yPjx&u2ZRf1Fmd9wkzB<6JH%j;#E4@tZ?xa}vk^xKNXzi- zG4F6DDYti;S{y)vmG4|kZAiUlj~otZdDDb}RvV2CaA>wL0p~5lont#NJKPf(4>*9A z*ThC{$6?O+#}F?PI7bG!2V`P}u79S3%L83kMl;P@Z2Ob!)FTBPK!C4CTb&RtENhmV zoC!GRw_enbi!^_m<%W1&+H>>8AJdM7(7R=5(gDuZ`8NeWyQ%TrO*^%B03&m(V^R57 n$UViq+iu=+hMUS~Ghb9|{SX;lzd%G9jl+xxiolzQqIUluz4U${ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image210.jpg b/doc/salome/gui/GEOM/image210.jpg new file mode 100755 index 0000000000000000000000000000000000000000..c651db3c43d7e6ca8940e67e1d3cc610e93f4dfd GIT binary patch literal 12886 zcmd^l2|Sd2-|v5nUC6#fBZLxVsSsw`ND^A?Qjs-em!)eEvPYqWnF^({W{;G8D{IJ_ zeapU$F=pONbwAI2-|u_w^PF?;b3V`KyyIiJ=DPm>-_LdZmhbob8%j6j8`ybPO+yVJ z;4eYI4FH7bMpy^qWE?R@8aebk`xja6W_OQAMb9dLkA=d ziAwAfN6^yIG0-!xGcvM^^Kq6^- zsN8jDe+EWw9$r5Fy<*}L`}WHpK5|q+QR(EV(`xExG|pbUbXiZ|z|hFt;)bP_wT-Qd ztDC!r=WVZmyMaN$_d-Hr9z2YVi+}Vu;o0+))U+2b(_iJj&C4$+EGjOksI024sjaJT zXlw8I(%IGhwP$E}WOQtNVsdJFacOyFb#0xnL1cqnrlO`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M0mPkFwe!;xJ*$SEV}zvUQwg!dvL523Wrw-Z$Jfl<)mSK62GQ z^DwpNj@{;`8mdnqiVfbk0A2yMP|%`E{l!g7T|fF-5G{v^@PMYs?Rdtu0Rt2J4_dYE z&bMLUn?GbqJJ(pXp40dl_kz^fw^RA6?m4X0OI~Goba6rgS%lwlkPCX<4$W+!AL!6% zagoaOt0uO>&|B#ko;zPK0zt*TzA1#)n-|aL#;i127c8G@Y0RU!-f;N~FT_>{53GHg zgY#8vr%m;Y?KGYj+mF{wCGn`9O&f{*eA!P#J`8qwx9q3k(Lf(%G%EF0CtqIf4(2@O9ksdw{> zu|pK_(g#hHJqz0Z8W0|w?ra&zAIqq^e#Y{kz&$V7M1NSls&r&9RBXIr8}4N>Ew@e2 zaSOrSQ1bvxz61Dv()aC=4z3I)-?Tq2fGV~JK4>o-d57gM{(e`rl6+?sP2&BHztj5$ zleVTIg3J&44hYAzg#ujCcX|c9)Czz_A|2X?2{+#Mex!O`5!bzRPFknd&(EJlosJX! zbeJf5c^%dc{9x^8TP(PK61L?56aQTYe-Quw!}CnLBOC>C8ru3A%%YA>BN`uOx%A;Xg+1OzK^2pnUkXz!sWvK4_PB(42?8J&aCCg z6(6X*I+_3+*X-j-MEI`xz@78S4fx{+_hEXy-DAH(%_->hPjELbFk7Bt-CBnG_Wy6! zve(pYQZ;8R@3 z*BgWA{!Q8Vhv@m^6P*9$5uN0Sp`gVv!=O*HHXL+w1uLeNE#IPXCr$%9c&O8!1?6jf d3CtUpI&tQ?Y(+*6*QNd8k>L9=9XiU_{{Rh)yrcjC literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image211.jpg b/doc/salome/gui/GEOM/image211.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8217b6b69598f7176db45b6bb97cfcc1ba1b0124 GIT binary patch literal 12992 zcmeHt2{=`4+xER}Y-EVc)0TObIa6C@Orn$wNttIEQi#1XG{_J_RBRz6NoJ`{=8`$e zJceYR*~7Qg^FB}YzQ=p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iq<4u47)Nb`?=N@cyjV=pvbrIOrKcryq*zj|YQkvHSkn6OBI~ zbA-79Jd0I}W5rW;$M0J21lmKwdL;^5Ylyi$-Y6a|{!eA^7UUN=L;MSyKWMyul(OGh QCAncDt^u}Xf}r&O59iZ41^@s6 literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image214.jpg b/doc/salome/gui/GEOM/image214.jpg new file mode 100755 index 0000000000000000000000000000000000000000..ed92bdd6666d8b207d4779ba1f33874a7355b870 GIT binary patch literal 12759 zcmeHt2UHVXxAugD-jUv$fE1A?(gP?E6+uu?P!L1M(0efv1*8Z93Q9*&P&(2&(pAbI#t+e)h8m--{mwXfA6YGyn+r!vQb? z03HW$UA?4wk^6=P(%RnPfrFKeg$p;r9(k7AK;rB<2>?F;JOPMcFhUrNh>(zwn23m& zl!lCygoN}I6%{!R6FoCCBRwM{3p+m-3mY#RBO|v6H?M%;nKNgYImOP23Z3H@IwJ@n zA|@s!A*CZDqZ4FhWEK3kKlnPx8vuY1LQX!wUp^25D2$MZn1qy!90EXp83X_RGWwfA z8h`)-g%ZG^gy2(vxA6nV02nPH9gl=6(W&cZ#Jo=Ql8+)&N%++AzcA?iSml?x@9a-X z#>m9X!g^XjQ0R=Xw9I+g3v%-67cXgOY9TJ`-?(XDcBpQ9rxyK+PnAZ86Q3td@3v|E-5W5|5{sD-_Y39+|r5d`q|yn z+t)ufJ~25pJu^EuzqY=yxwXBsySGmZnoIzLL1DzlCPN53z+WgWjF3lyh)(r7v6<5; zUdcx!^lFi*`Cmx+r1Vx9?mPb=W8{|}JH2*n^@-8{n$73#b4Kl`3O+VCh*?1d6O4W;Gpf_w{R+=%k;0a_h;b{A-RZ z=cKb@FAnv~9T`cm86V~oueWW`KyC%InuY8)sgzM#hJ^kIYGHWwPttb)ZXky`8oI;bst{t9;Oesb9=eWA4(pp z_fhNng9!|}Z)M@e{Owoz-;hEsaxyz;5x>JH(O>iG?JZ@W5WyPA!tg*Qb<@gDem&=p z;cohZ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(a#+5Uz~jr0(Z z-jI0w_AV-8l&cO$Wc}#LkqJ1-Fy*RyCvm{$s?(SL!H0#A7NdwFPxY%MuVO>)YOs0e z>9n$xljt6xCOBU}dRj+wiRz^zBgp3_`DlMsaAgBhpnOgQdO>zNP8%l;(LwyE;<777 zKft#xRz*Ki%X| z(R*aSI2AaK;C`N%^Nm?pr?mNS7OIb<8TpNY#@9O(p=m}%Lpwo*y*zqE)0EAE03;zw z2M!9N@6u~41~SCVR$KF8oW~4|ZSJcG!6ucd)r6pizq<`c8`(xj_8Gw7X|8SnX{EX^ z8y-+APTrH()RD9*3^u^EbzpL1g~-$-dfWeaCg%%s8|FIqzleh;sI5QB9% zK~$_B7vJ9mm5vTpP;yD{?KtagTn`2(8IZl5>Vps z1kdW)#?Edqdt4F&Y>rQnOJ>&=D#6+>jYoMcIv7lGYw!RDVo>-&X((`L-?`7^> zP^2xD@~sS8gR`<4gk~D;W^a-AosOhvTM%{5X$^Zto2POfGAr*$oej8~f=f!F!`NE& z^}7}BzCrT7k`VOTKlFi)ZZV!JyM-$+Hna+p&<8BXUxU}e#ZsREWwY}ql`{IET7k#aDm%&HynmV z0*ARSG0$Q-$M_j(N zkQ&4cur=|&SN}_^CeKEGK``8NG`cmy{p*gt7X3@%Yb;H(b*?LL=KboY{llib_2YwK zH>W(!U(v~b{OIg-sNKO%m5!mD|65|!@1?6>kKX1qt% nZT#Eo&84#*1#wpluaxo{1ccBeTTvDwixC&*qO<`tzVH74V-8(I literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image215.jpg b/doc/salome/gui/GEOM/image215.jpg new file mode 100755 index 0000000000000000000000000000000000000000..0cdc46dbe25b6ee88b3f1c7bb3f22f9667da38c0 GIT binary patch literal 10568 zcmeHs2UJvBvi5EoXwn5ya)LcX4-cviClr?Ph!Wgt5fwGZKI_3LXGTa&iiCa!Lvc z3Iru3g8B#zH5C>0F?xF1BdknpY%EMHEbLtTNOn$MP8OCEA}4rH3JMDgvmF;ZBPw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;_tUbTudGd8HmR#B zP3W*(F`Y?zyB4p-kL9<87BH;Yr0-3ctBAfk{jJLa599ngTW*}{$Rdx1l9x82E)U`s zm9Ou3K)j<3%p=d4`BL-=tP?8*M&8{xONgs##+!Ww&LSGIpCtEq=joSW_^dRK1XX(hr2m~6ji&T3>v>E}to#M1&HN(2?@`VGjas~~VN1IOTwCjlf0 zFsmW{Px^2227O7G>C5<6>YTcYTE{$WDEql$n%9%Ttdet}yV#*;cHZ?PhOJ4TU%bcC zscdlBq3AUWfzRanQzvVP2hl70dq!Iv_+c(>44@hIw500y2@%2G8J^qR&2Bh=YEaMF zse4RdnA_jk#wG*RsS`c*^9M(iy_>5K=;tege*T99<~PnRc6u*HTkS1J1sT9dfSNKM zVrc6#gZ^yWm=_BS=K_}15QqF6)`!FTdom zEcypH#QopiI~gM186vSf$?b{J`3(qH(0qiSJWd(58o=}uEYwzAIlmMXM6@I*PXA_5 z^de^J_xOoNezRKbudx1+deNZyXj`0e^qs!nl;i$hxk~E%P>BAG$?`v<|GiTWqoK!C zlD1bh4dfSpT4Vx|)Qfw__ATu4DAbvU9F4;KW9`bJ%K8S1Q5XM}e!`#ib89UjPX4s} z?O^vE#O9yedehlT=mAePx# literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image216.jpg b/doc/salome/gui/GEOM/image216.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8cf5671cf6fb283de50ee54ad40822c594c87c46 GIT binary patch literal 12504 zcmeHt2UJsCo9+&wR|_H?6ciNc9f3rYE*+7gBGN^A7cfDYK>z|o>*MDctT6YdBB+1{I9+s#&t-%L_WLK2X1ARJIrQc_V;Qd3b; z(NI&<&>fh0dHg!_F%zaZXr5 zQ22}xjGBgqj+X8SJ^c|OPBu=V|Ko$)0(%7jj0*Pq0RM8pDBzS-)HJko^b9Zn|Kl3; z|BtJGx_Agsz~FESN;nl{1=LIkbPZ4*raE#$@&ffyBO98No~%-#v6-|2YHym38TYLU zO5gIjPe;#ooSlR7)M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*iwwd6f0=qLljqQoHl9<#AIhi1WZ zotwcwb5v-1j=*9efH41~3&4%uDp0J$vEbH)?yDXL1CEf4E`L~cEcuxn5$nmXI4V`M zkJj4y2r$4S}!7Av*bI04B7P6(!d{K^P4Q zfUFW>9jjaaWtBa*>v=2XZ9({g9$+aj|A-Blr7QQte+jL2gFB`V{~8=3Kjn|Lz^j(0)LK63KpFunt|cZxPauYsw@-B))9EL)O(zMF%5Um uU2>>FL4@xf&+7_Ugk1WUPwTSbZ>8VdTCwLY9$vN%7)6b&45AU_;r|8Zf<86? literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image217.jpg b/doc/salome/gui/GEOM/image217.jpg new file mode 100755 index 0000000000000000000000000000000000000000..f9e5cd72cd72529c12b0e16625a39af555073019 GIT binary patch literal 11989 zcmeHt2Urwcm*#Dn93@Cj3J6G&43Zj@oI!$MBxfWiu^SXrBrBjzlne?;Y6Mh3C5uGK zk~5N#*mO_nH~a1U-_HKK|Lp9}KC@f>bk|dTtL`~<@44@J&s&8b#!rD$IvUy<00wv(b?XITie4{l-pcf^ny6RkAVk(n2?Z&kdT;&h=_!k zn1t*UITFe2FR4gB*4BY+bU5tERTkyF3`{Es&1_m9?p z(Rd0Fz~FEKLO2n07f?5$P#YkmC89ecu1ZXAe4FH~7lTAt!b?&fweqIZCcT@yk~ZGq zWaNxY%q*;Y=lBH#&r3Er-i|3Vfax%35P)ka9W@OmK9ZUFs}zOJ$ZE=k8_i++Ky|m#}eO58k6^4xywjG zzQrCNWi2yiv1;?7As>UTk=aoPiDWqxyt*~s6}7nVG`g zIdr%^h$&6uKJ;?3pwpE zK6MVTupnb`%8!91bQF@vFHc5!yGtcRGR6oRC25zSt?E7RwInS@xQU9D^c!Yat}R4K zl(yINy@=H2wJlKXu2w7T8(4pp+?#G$EK*q2z=$0>JUrcc|3#EWN{7AO@?-P6YaYSkO{TBdOwI4D4Ecq4)ce0#MUq*! zGi>FJb_#BPqXD1w>Zzy5*4h>x8t<`7w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=A6hjQ#D!!Lxrx|vkn{2^6g9I+|2?_*HJ z{fWqt*Un#V4Z(WxFT^b3SznVaA=0MSTh=a{GIVc0i|oUY>!plp z2+k0z-N#eE=%#BbE^H`sAHp+Mp!}cP2F&+hKC0{PF#4P`Uuax3%FagefE6UIi%h#G zez*QSTih;D#1$q5j{g4RivLz(lkj`*=G-y3DRJ`3Nw_(H6n-bS@c0Wd;$rz;7PZ>V i%EPin>G%|{3I4tt>-r;$cXJ}$ezt-+>Sr+g$Ugz+tR5-= literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image218.jpg b/doc/salome/gui/GEOM/image218.jpg new file mode 100755 index 0000000000000000000000000000000000000000..96b49d861b40fc27c19f5ee9d4052fdc1acad442 GIT binary patch literal 13752 zcmeHt2Ut_vw(bl8LT>`ni*!Lc0tyDCZ&6TDDHaqEP>O&8f|!5;iXZ}lg%(8YRHc_F zy+{#|-iv_r9v~!d;`W?_d*5^Kx$nL6&b!~e;e*A>O6C}I%u)XF&q?ke4*-_m^o{fZ z0{-v=P5{UxAZVf~zgXy+kh(a1VFhjK9Y@cjcDb=D`bQ+uh#buP#BuD)oT$|t=oY?!FTS4L`FS~j(PO>$6_r)hHMPwx ztzX;PJ36}thlWQ+zm1Jge4k%fTv}dPC9JKpLX{~fDUp<@EtL@zUho&mN=YTGK+UFo z6m{Nh$1X*G8uo(`NtvH$MU;-saa?f!LdPkpJSaB5rS%V`|1q5d{FC60jpk`wqowNgNc#1x5 z;6gO`oe~_Adj0fh43kv8ik}bq!0JL~yrUb1;|sAEHHk&8eDBrkcRv6WDyes()yK_w zf1KG%DuZa{_}-cHYtEdFjk6MME>mfYg}M{M7JStr2jAw3a8*|iqh*h1UQc2Fk|vuf zwUAf%eb&xdnUtD(@37l*<90?j78$9f5su!)^CWtQb#x%HF9Q`$co9<<}ralKIe*`l#F4NyH7LUb$&=2{vZ=I4;`kM2*u zxzOD>sJNWd+@-hAfv&KJrLbh?=J7?}i)nnlM;L6%a*Bh!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O2sn3{&EP(Bi1 W#<3$jHuP6X7zr3EL0B}o^M3)R52Ts^ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image219.jpg b/doc/salome/gui/GEOM/image219.jpg new file mode 100755 index 0000000000000000000000000000000000000000..62a5832b9680447187e22d7200ce874b638dbf1a GIT binary patch literal 12098 zcmeHtc|4SD+y6Oc7+bbVmKdUt?8%WM9HeDs8e;SqHhPh!RTKN~mNH zjqEhGG4^$q_tM>cr=HLK{NCsJ-M`=S{_&0v`hXB3YPOcvx9^Bm{T`B>v?Oy&9GQ0E`j#?E}7lU<_~sBNLLDg_R8k;J^1l ze}C^?*U1GKU~o7C0?r7n0x}Z}^#KGoBaf(p4%5aXcF1iWn-niar!$M~eNwggX!De~ z(rM377FOOZeEb62cSuM|?Nr{qM@3alecygvJ^cd)hR00J%#T}Gp0IZ~bJo$x*~QD- z$Jft4An@{)t6|r!-?$kQ8yBB&=kC44jLiF4zh&nhUO^vvws{KDeW@(MTPG6MnuMUUB9A?bB;se{=f3=X2=4<@BFE|LHQl z5^ytv6)*#bLEdx2;M_1e0kFeiPy@~l&|uWtRiK^r-cmfVohcM1LDtzGVJwlFeEQ{? z9rvaztYy^Ox?H8D$7g31NhI6n9lJ=~4EvN`3z-hWLW#?X#e`dq>{74&@9N~CNa__eRCBYI(~`)dAp3h zN-ER=)nx;ukg9!$koNQKdv3k46+LQ{IBu4?Y%@DUA?dw;&%dqIgXMXGni(%w=Q4+9 zZy1;(CjQoQZTn7zm{>!Sa^7%W?+0TU{jtE{vho!6>FU#-@9!%OB|kQp3s+6V(=yUc9Zw!Cjg1}lJ&yIm z?n7C$*tH(rannn7(Ln?!zc-x@K35pFD8BeQP|%Ezy;U|@K9n|g)+|{R!w5D36BzU* z^T$8m+ZF}4&y*M6t~oMnW;e#NDfK$xis{1|xwFkV(_#(J5J`0s&vmkxh{YKW{ejF2JTchzI=^+**a$v-7a_42ca8D^3C03t7H|5nH$drE^QQwEpL$ZrelY>#&$sVmGV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@i- zT5MBFY^SJRzgeU1T&_YP^(kEIwP?AMX}5svN$VN^+M%%Ct5u%R>sB9gKFVl|sSIy6 z$}|A(9!?*J0`?d?-{?n5n&#A>FmGXhJpS+kTBOC=zEE{=ayM@zX___V@$~*zv^bYC zs6x`NMOY0oD>gJy28J-Qy-)kx2}6tzvVZ^JK_g$B-+!6uh5S=ShYAe!Q#0+N`WXgS z^+1{Fh>J)X(MI-ZvR<-&KC$hGsj)x^oo}9M9JUIMfct(2-`)|!1Wx$zncqL##4pha Y-kK15pfZeD?D5(M`ynxK8HB@VQf*dj)8x|aF<`CA3Ik92k;dTZkuQ?nIiVTbr#%U}82M#p0h?{1y7&J66 zPEc}ZlL%l)_3B{=+vXziDb;71Uhb(gGe12$(`;J(ZplxfX8{XDH05j~5*!+q2P}N# hlhJUXVRgjDSs@h%92(ar9ImVJ*tRCJnURsf8UScLMD+jw literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image32.gif b/doc/salome/gui/GEOM/image32.gif new file mode 100755 index 0000000000000000000000000000000000000000..bbdf48a24bf67d98f8be9c7c62c8a1eb9809b834 GIT binary patch literal 914 zcmZ?wbh9u|6k!ly_|5~6A>*-O!NFz@VXc@G0*MR^yqs(r4hjbtn0VENBn%EH9cyJYE80>qQNg8? z)go@qi9n^ses-r-A|66&p0hM9>r^Zm(oZupxO|hTFkW_|Q7iG-70be94$GM%%S5EU fE*y3Wvg^S}9XUk+VW#DBh3kQ!K?0aKgQGrM<%QQZ{nV!6JQUd#MUZzx8CfB{9 z()y~Xu$K9Ug-%M2ZK3-mnNA^&v3>dpb*auoA`iGjz!@WQ2rZ7nnEzolk(M{B#&J!! zD@+oZ$RbeA>5DpOPVJ^6Bf&F-TrT~7-5_*jTUOCSb*-jXo$RP3SDW`-G~(^+IqdYF z9`c8RQ5qN?js&8y=+6G35qe*cX>YxmY?`b}hdA3-^Xkoi+zd2lw|!Dr!~92_Svv+S z9a>g+f3#S^q|Y*?Z=a-6^Kr`A%~S&}432%H>5bw5Z$SLx_ME~xu9a(t6aC>hHm;vJ zJG3sWxWPn)w9=?nS;F?{m_a~JtgvkiC)_}mwnj^TXQo)_ONk(O$~@l5fm%nvrOg(c_jycWc8 z?rJ@=FDv!vMmt4J69@2rfg}%EC5t1SLic z1Z8N2r>G7dwWvePt&F+^MRo2VM0A)w^ZpGDEbq?F%rnpP%)9#!>>J!Qx=}XBZ^>v@ zpJw%Fk~K4ymX?CwL!x@{VbMl(W_w^u7N!KfF{$}fqqD!5Y~V}8kV%egT-J24OXOcStcjkEYe8yv6jr; zJn$8{u%Kw+7WjzM7yvKYF&ed4i678p8av>GU=+d{Fi0~AEqJgPY@j1gl--ociQr-w zi9XhndG(T|uhqS?Se-C!uC9{3mC@;XK>vhbC5S z%eOiI3sRevu3G2Nvxm!5wXU9_q3x6PsdejHMtXmZF5hTx%%4~s8?D#7TTahC9qWF3 zyKU$6>c#exYwq+Mx;oJ@{_UOhpL+GZHlhdbb=H5bUXt1R{XNIF4j%q6_qugq_-p^_ zg){Fb<Y)munk0R~Ag%vrj0>Dskxw{G3KckkYF=g$4V$MFCEf3T8K zVl)JXX9(zkyamb&3>=FXL^)(UHY_;U$ib%-b7I57!|i;G9&&V03T50`5tzit z%)_X1;>5;eCI)7X2AhbDsmB?Zximy9H$6Ey-7q~%<>W-QV{>%MZ++nmPP;HmwUf!z zWAbyirEW91e7lUZ4lZNdlyy|%!Sc{1rMY&tGfQ8FZuH;D6=1np_2?R=Gg3MR4y$8# j6!A(a7%W&Hzn^8FmPx>Z4T*=f6}95d?AX}Uz+epkRVY~g literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image42.gif b/doc/salome/gui/GEOM/image42.gif new file mode 100755 index 0000000000000000000000000000000000000000..1e4003ccae74835ff99e20fe5edffc0514a07339 GIT binary patch literal 917 zcmZ?wbh9u|6k`x$_|5*-O!NFz@VXc@70f&Zmen~DKh6Rrp7zHHR3>+958u}HOc|3MZJm5M( z!&QkV;nQP}CT1p%3eSSao|BBZHCA458G9UiPp}M=Syx&dz4_Y%yl9T4M*FsZuD{)fElPMI|TLL@BJkwwQTEnr+ur?eO)y{2VX3!XDh(7RSuQ GU=09X z$arj6aIl#}SS#klhJ}Y)805ryGzt|O7$szxZk(97=rAJ#Q-_GbgX9wvRi&FmBpa5v WFdAqJ9hecc?CfldVm%%X25SHW9wtWs literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image51.gif b/doc/salome/gui/GEOM/image51.gif new file mode 100755 index 0000000000000000000000000000000000000000..d04ebd08fe5919c6b233524ef128ae29f587ece6 GIT binary patch literal 954 zcmZ?wbh9u|lwc5J_|5a1VuPYHgMhLZ%LjvohHeRcCzApOMkfX)owO?& z3=EA-?0kMPD-9VKnYHx0&Twp6;yr^c``nQT;R9!9D7sI}`6=|mZ<1N}vniTeo}XXp z=x!An6_DPrI--{CgXdI*6N^>0mdU;dUg5TuIbcFQRZ@ ad;WbU3t=UTgasQC56jAG`3VRxSOWl>kWoqi literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image52.gif b/doc/salome/gui/GEOM/image52.gif new file mode 100755 index 0000000000000000000000000000000000000000..94537e0f4674ce6e72d82c2326fa3321ee22691c GIT binary patch literal 973 zcmZ?wbh9u|lwc5J_|5vvldwwQJXI-MV$}-o5`B z823>+RR3=RjGnt2rb zrf?`6bZwFpbi2dxpuxS7M}onlvOwiHBddT01LsD?21bL_OFlCmF!;?-v$qpj!Emr~ zF^3<$OVrsZPOrDQGyWI3)9*5;D!GR+QJ$j4uHR;oCyd1BOZt`l9CpF~dLmElSPpDRbZ+DnVG?lIxQKy)jYr0zf#IP`w+N$v zLc_$z2m2KmSvV9nF*Go<$)1Y2IZ4r{nS)0_V#B8A3`~0ZVhR$0Y0gZXToOMtHYvC> zv$}b)N|`)qXmXR*vuy}c4V$3o8MasAfp)}1hGSK#9hVk)Z4tfBmm@u0_2dNYv&*(v z2c|Zx&N(>ARr`}Z67MxNHLI(uTYzB7wVs}yIY6*<&eEkz*REZ=ckkX~ z$BvylckbG?YybZ<{Qs}`A4rXY(GVE=A)o{D0w^yqaO_}E<&g2%u)wj2Nl47+M8QIa z7Isc20gFJUmUd=CwScR#RM2a-l)Rk%2AgRETHrQtw8C)Ke@I z8q^wlElZ^s7BDa|EEeTm6!YuA3dY4kN;*>xG#q4N<=B+P%k|*F;iVel1)>_CR$rLG zAkZVrX}IFtmh98hY^=XH#4IhTeD=mm?0qCdS$p1*nb-C1AIvKk<1m<^+rY@|$Hu|X Y;F!E^`tr1p9Xk`B&z{N8#=>9?08pi9@Bjb+ literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image57.gif b/doc/salome/gui/GEOM/image57.gif new file mode 100755 index 0000000000000000000000000000000000000000..e0f9e31094c9987c52fc727acf09e49b1a7b4fb4 GIT binary patch literal 990 zcmZ?wbh9u|6k`x$_|5X?%lih*xqaZ85sVr75IOx<^R34|KA_`{~stY3PwXz(f_#`LvcR1aEFA-KqeO++JYgNH!F$;k{x zO(_8n6c|_yl7%=HOjKoT)=xflBq1@0k;&Zq)s&wPnpnA6>%?46PGMkMEZQKnMZ?jl zg`Ia(*4_Zd#w#l&XUt=%Vpze%AmiR9%O$MQI3wfgsJ)@Sa7CykVCzJJ4 z>uZJdn4L{G=l!iVdzdhz&Nr^6#_V8Xb2TFig8@SW<75H7NpEg!P&(Ym=RZ45LV&>< E0L{vC+W-In literal 0 HcmV?d00001 diff --git a/doc/salome/gui/GEOM/image59.gif b/doc/salome/gui/GEOM/image59.gif new file mode 100755 index 0000000000000000000000000000000000000000..f470df22c0c50170d789ae76cdfbb011962a846a GIT binary patch literal 963 zcmZ?wbh9u|lw=TN_|5Z}(q=8;gY1lx4nicz6XQ4ot~x znr*{iS)~+Wj5}qHP#yP>rXMs?|)fHUA3IRJOF)(gnb6sV7;93sj4%TQt l(*W^Qrw!$&*(3rI76u)PbL7+8b76VFB4mEFL^u{KJlxJ8W+dXUG3jU<8=ry)$ALx1`xrPx zEE)tBd3G@{2^bVyaB%Mz4_uWJd7;63h9T>cn9KBVhF0PCaexdT}i<;kDqsnVvq)c>to9z1QOrk^9x=vu+vB>mSX! + + + + + + + + + +Blocks + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Building by blocks

    + +

    Introduction.

    + +

     

    + +

    Below are some general notions about blocks:

    + +

     

    + +

    A block is a an elementary geometric solid that + has specific geometric constraints oriented for meshing. In the hexahedral + case, blocks have 6 faces and each face has 4 edges.  

    + +

     

    + +

    Tetrahedral Block - is a block with constraints for tetrahedral meshing. +

    + +

     

    + +

    Hexahedral Block - is a block with constraints for hexahedral meshing.

    + +

     

    + +

    Block Compound - is a compound composed of blocks only.

    + +

     

    + +

    To build a compound the user may take the following steps:

    + +

     

    + +
    + +

     

    + +

     

    + +

    Quadrangle + face

    + +

     

    + +

    Description: + Builds a face using the below mentioned arguments. This operation allows + to build a face bypassing the intermediate stage of building edges and + wires (in the case of building by 4 points) or wires (in the case of building + by 4 or 2 edges).

    + +

     

    + +

    Result : + GEOM_Object.

    + +

     

    + +

    TUI Command:

    + +
      + +
    • geompy.MakeQuadFaceVertices(V1, + V2, V3, V4), where V1, V2, V3, V4 are + four vertices from which a face is constructed. Edges are created automatically.

    • + +
    • geompy.MakeQuadFaceEdges(E1, + E2), where E1, E2 are edges from which the face is constructed, + two other edges are created automatically.

    • + +
    • geompy.MakeQuadFace(E1, E2, E3, E4), + where E1, E2, E3, E4 are four edges from which the face is constructed.

    • +
    + +

     

    + +

    Arguments: +

    + +
      + +
    • 4 Points, or

    • + +
    • 2 Edges, or

    • + +
    • 4 Edges.

    • +
    + +

     

    + +

    Dialog Box:

    + + + ++++ + + + + +
    +

    +

    +

    + +

     

    + +

     

    + +

    Example:

    + +

     

    + +

    + +

     

    + +

     

    + +

    Hexahedral + solid

    + +

     

    + +

    Description: + Builds a hexahedral solid either of the below mentioned arguments. This + operation allows to build a solid bypassing the intermediate stage of + building a shell and 4 faces (in the case of building by 2 faces) or just + a shell (in the case of building by 6 faces).

    + +

     

    + +

    Result : + GEOM_Object.

    + +

     

    + +

    TUI Command:

    + +
      + +
    • geompy.MakeHexaSolid(F1, + F2, F3, F4, F5, F6), where F1 – F6 are six faces from which the + hexahedron is constructed.

    • + +
    • geompy.MakeHexaSolidTwoFaces(F1, + F2), where F1 and F2 are faces from which the hexahedron is constructed, + other four faces are created automatically.

    • +
    + +

     

    + +

    Arguments: +

    + +
      + +
    • 2 Faces, or

    • + +
    • 6 Faces.

    • +
    + +

     

    + +

    Dialog Box:

    + +

     

    + + + +++ + + + +
    +

          

    +

    + +

     

    + +

    Example:

    + +

     

    + +

         

    + +

         

    + +

     

    + + + + + diff --git a/doc/salome/gui/GEOM/sketcher.htm b/doc/salome/gui/GEOM/sketcher.htm new file mode 100755 index 000000000..98a550894 --- /dev/null +++ b/doc/salome/gui/GEOM/sketcher.htm @@ -0,0 +1,225 @@ + + + + + + + + + + +Sketcher + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Sketcher

    + +

    Sketcher allows to create curves of 2 types: line + segment and arc.  The + curve is created from the current point (center of coordinates when the + sketcher is started).  The + end of the curve is defined by means of "destination", which + can be a destination point (for segment only) or destination direction + coupled with length of a segment or angle and radius of an arc.

    + +

     

    + +

    Sketcher is able to create planar curves only. Therefore, it is necessary + to select a working plane before starting a sketch (by default, XOY plane + is used). Sketcher creates curves lying in the current working plane (New + Entity -> Basic -> Working Plane).

    + +

     

    + +

    Description: + Creates curves (line segment and arc).

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command: + geompy.MakeSketcher(Command, LWP), + where Command is a string containing the coordinates of points in the + local working plane, LWP is a list of 9 doubles which are coordinates + of OZ and OX of the local working plane.

    + +

     

    + +

    Arguments: +

    + +

    1. Element type (segment or arc).

    + +

    2. Destination type (point or direction).

    + +

    3. Destination point by means of:

    + +
      + +
    • absolute coordinates + X,Y;

    • + +
    • relative coordinates + DX, DY (with respect to the current point);

    • + +
    • selection of an existing + point.

    • +
    + +

    4. Destination direction by means of:

    + +
      + +
    • angle between the new + segment and the previous one;

    • + +
    • perpendicular to the + previous segment (same as previous, but angle is predefined and is equal + to 90 degrees);

    • + +
    • tangent to the previous + segment;

    • + +
    • vector components VX, + DY.

    • +
    + +

    5. Parameters of an element (for segment : + length or target X or Y coordinate value, for arc : radius and angle).

    + +

     

    + +

    Dialog Box:

    + +

     

    + +

      

    + +

     

    + +

    Example:

    + +

     

    + +

      

    + + + + + diff --git a/doc/salome/gui/GEOM/whdata/whftdata0.htm b/doc/salome/gui/GEOM/whdata/whftdata0.htm index 5fd2fa6f7..62ffe6714 100755 --- a/doc/salome/gui/GEOM/whdata/whftdata0.htm +++ b/doc/salome/gui/GEOM/whdata/whftdata0.htm @@ -10,6 +10,7 @@ diff --git a/doc/salome/gui/GEOM/whdata/whftdata0.xml b/doc/salome/gui/GEOM/whdata/whftdata0.xml index 2258debf3..dd9bb8b6d 100755 --- a/doc/salome/gui/GEOM/whdata/whftdata0.xml +++ b/doc/salome/gui/GEOM/whdata/whftdata0.xml @@ -1,5 +1,6 @@ + @@ -13,5 +14,8 @@ + + + diff --git a/doc/salome/gui/GEOM/whdata/whfts.htm b/doc/salome/gui/GEOM/whdata/whfts.htm index 8a1b3dabc..3858e4cda 100755 --- a/doc/salome/gui/GEOM/whdata/whfts.htm +++ b/doc/salome/gui/GEOM/whdata/whfts.htm @@ -6,9 +6,9 @@ diff --git a/doc/salome/gui/GEOM/whdata/whfts.xml b/doc/salome/gui/GEOM/whdata/whfts.xml index 3e5140071..71138925c 100755 --- a/doc/salome/gui/GEOM/whdata/whfts.xml +++ b/doc/salome/gui/GEOM/whdata/whfts.xml @@ -1,7 +1,7 @@ - + - + diff --git a/doc/salome/gui/GEOM/whdata/whfwdata0.htm b/doc/salome/gui/GEOM/whdata/whfwdata0.htm index f917bf1cd..82fe9859b 100755 --- a/doc/salome/gui/GEOM/whdata/whfwdata0.htm +++ b/doc/salome/gui/GEOM/whdata/whfwdata0.htm @@ -10,320 +10,730 @@ diff --git a/doc/salome/gui/GEOM/whdata/whfwdata0.xml b/doc/salome/gui/GEOM/whdata/whfwdata0.xml index af8f667a2..63e637001 100755 --- a/doc/salome/gui/GEOM/whdata/whfwdata0.xml +++ b/doc/salome/gui/GEOM/whdata/whfwdata0.xml @@ -1,318 +1,728 @@ - 0, - 0,6,8,3,2,4,9,10,11,12, - 2, - 2,9,10,11,12, - 0,8,3,2,4,9,10,12, - 6,3,2,4, - 2,9,10,11,12, - 3,2,9,10,12, - 6,3,4,10, - 2,9, - 3,9, - 6, - 11, - 6,4, - 9, - 7,12, - 6,12, - 3, - 11, - 2, - 9, - 0,6,8,3,2,4,9,10,11,12, - 5, - 8, - 6,12, - 11, - 6,10,12, - 1,8,2,4,9, - 1,8,3,4, - 8, - 0,6,8,3,2,7,4,9,10,11,12, - 1,7, - 5,7, - 1,4,9, - 1, - 2, - 8,2, - 9, - 0,11, - 8, - 8, - 5,7, - 2, - 0,5,7, - 4, - 0, - 0,6,8,3,5,2,4,9,10,11,12, - 3, - 1,6,3,9, - 8, - 3,4,12, - 6,11, - 10, - 8, - 7, - 4, - 10, - 1,3, - 2,9,10,11,12, - 7, - 11, - 8,2,12, - 12, - 10, - 9, - 6,8,5,2,4,9,10,11,12, - 1,9, - 5, - 6, - 3, - 10, - 8, - 2, - 8, - 6, - 9, - 6, - 9, - 0,6,8,3,5,2,4,9,10,11,12, - 1, - 0,6,8,3,2,7,4,9,10,11,12, - 0,8,5,10, - 6,8,9,10, - 6,2,9,10,12, - 2,10,12, - 0,8,5,7, - 5, - 5, - 8, - 0,6,2,9,10,11,12, - 6,2,4,9,10,12, - 6,8,3,5,2,4,10, - 2, - 7, - 6,2,4,10, - 5, - 5, - 5, - 4, - 0,6,3,2,4,9,10,11,12, - 4, - 1,7, - 7, - 6, - 6,2,4,9,11,12, - 12, - 6,7, - 9, - 2, - 3,5,4, - 1,7, - 1,4, - 3, - 6, - 1,6, - 0,1,6,8,3,2,7,4,9,10,12, - 6,8,3,2,4,9,10,11,12, - 0,1,6,8,3,5,2,7,4,9,10,11,12, - 6,8,3,4,9,10,11,12, - 8,3, - 0, - 2,4, - 8, - 9, - 4, - 10, - 5, - 11, - 0,5, - 8,11, - 1,7, - 1,8,5,7, - 7, - 3, - 8, - 12, - 9, - 1, - 0, - 0, - 6, - 8,11, - 9, - 2,9, - 6,4, - 4,11, - 11, - 4,9,11, - 4,9,11, - 11, - 7, - 6,8,3,5,2,4,9,10,11, - 9,12, - 2, - 3, - 10, - 8, - 9, - 2, - 4, - 10, - 10, - 4, - 2, - 4, - 6, - 9, - 2, - 12, - 12, - 12, - 12, - 12, - 6, - 2, - 6, - 6, - 12, - 12, - 11, - 4, - 4, - 10, - 10, - 12, - 2, - 2, - 4, - 6, - 8, - 8, - 0,6,8,3,5,2,7,4,9,10,11, - 9, - 6,8, - 12, - 0,5, - 1,9, - 11, - 1, - 12, - 7, - 8,5, - 6,2,4,10, - 0,6, - 0,1,6,8,3,5,2,7,4,9,10,11,12, - 7, - 3,5,12, - 1,6,3,5,9,11,12, - 10, - 1, - 11, - 11, - 2,10, - 2, - 0,6, - 3,10, - 9, - 6, - 12, - 9, - 6, - 2,9, - 9, - 2, - 6,2,4,10,12, - 0,5, - 2, - 5, - 11, - 1,10, - 6, - 0,8, - 2,9,10, - 1, - 9, - 1,11, - 12, - 5,7, - 6,8,3,2,4,9,10,11,12, - 8,4, - 6, - 0,5, - 12, - 12, - 1, - 12, - 7, - 7, - 3, - 0,6,8,3,5,2,7,4,9,10,11, - 9,11, - 6, - 0,2,12, - 0, - 0, - 0, - 11, - 5, - 0, - 0,1,6,8,3,5,4,9,11,12, - 4, - 6,4,11, - 0,6,3,4,9,12, - 2, - 6,4,10,11, - 10, - 7, - 1,7,12, - 5, - 8,4,11, - 4, - 4, - 11, - 11, - 11, - 11, - 8, - 12, - 6,8, - 8, - 10, - 3,12, - 1,12, - 12, - 0, - 11, - 8, - 0,6,8,3,5,2,4,9,10,11,12, - 12, - 8,4,10, - 0,5,9,10, - 1,6,8,3,5,4,11,12, - 8, - 0,6,8,2,9,10,11,12, - 6,2,11, - 6,8,2,4,10,12, - 2,4,10, - 0,5, - 0, - 8, - 9, - 9, - 8, - 1, - 7,12, - 6,4,11, - 0, - 0, - 2, - 2, - 2, - 2, - 8,7, - 9, + 3, + 3, + 1,12, + 1,15,11,12,7,9,10,5,13,4,3,16, + 10,3, + 11,12,10,13,3, + 14,1,15,11,12,9,10,5,13,4,3, + 12,7,10,5,4,3, + 11,12,10,13,3, + 15,11,12,10,13,4,3, + 11,12,7,9,10,6,5,4,3, + 10,3, + 14,15,12,10,4, + 15,12,7, + 14,12, + 12, + 12, + 15,12, + 15, + 15, + 15, + 12,3, + 12, + 12, + 12,16, + 12, + 16, + 12, + 7,5, + 10, + 10, + 14,15,8,13,16, + 7,10,13, + 15,12,7,13, + 4, + 12, + 12, + 10, + 13, + 12, + 12, + 15,3, + 10, + 14,1,15,11,12,7,9,10,5,13,4,3,16, + 7, + 6, + 6, + 14,3, + 6, + 3, + 11,7,9,13,3, + 3, + 12, + 11,12,7,13, + 7, + 7, + 2,15,9,10,5,3, + 9, + 15,12, + 14, + 12,3, + 14,0,10, + 2,9,5,4, + 6, + 9, + 12, + 12, + 9, + 14,1,15,8,11,12,7,9,10,5,13,4,3,16, + 2,8, + 8,6,3, + 12, + 12, + 14,0,2,10,5, + 3, + 14, + 2, + 3, + 14,12,3, + 15,11,9,13,3, + 13, + 11, + 10, + 1, + 12,9,10, + 9, + 8,10,6, + 3, + 1,8,6, + 12,5, + 12, + 12, + 12, + 12, + 1, + 14,1,15,8,11,12,7,9,10,6,5,13,4,3,16, + 12,4, + 2,7,10,4, + 15,13,3, + 14,9, + 14,12,10,5,13,4, + 7, + 9,10, + 11, + 9, + 8, + 12, + 10,5, + 12, + 14, + 14,11,5, + 2,4, + 11,12,10,13,3, + 15,8,12, + 8, + 12, + 12, + 12, + 12, + 12, + 12, + 12, + 15,11,9,13,3, + 13, + 11, + 12, + 11,12,7,10,5,3, + 15, + 14,15,11,12,7,9,10,6,5,13,3,16, + 16, + 2,12,7,10, + 15,6, + 15,12,7,3, + 12, + 12, + 12, + 12,4, + 11, + 12, + 10, + 10, + 9, + 15, + 15,11,12,10,3, + 9, + 12,7, + 10, + 15,12,7, + 10, + 10, + 10, + 8, + 14,1,15,11,12,7,9,10,6,5,13,4,3,16, + 12, + 2, + 15, + 12, + 12, + 11, + 14,1,15,8,11,12,7,9,10,5,13,4,3,16, + 6, + 1,11,9,6, + 11,7,9,10, + 13, + 13, + 13, + 15,11,7,10,13,3, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 1,8,9,6,3, + 6, + 6, + 12,9,13, + 12, + 12, + 12,13, + 1,15, + 12, + 15,13, + 15,13, + 13, + 6, + 14, + 14, + 14, + 14, + 14,11,12,7,10,5,13,3, + 12, + 16, + 9, + 9, + 14, + 15,11,12,7,9,6,5,4,3, + 14, + 3, + 12, + 15,12,13,3, + 8,3, + 15,11,7,5,3,16, + 15, + 6, + 6, + 6, + 12, + 12,5, + 14,1,15,11,12,7,10,5,13,4,3,16, + 12, + 15,16, + 0,10,5, + 2,8, + 8, + 10, + 7, + 7, + 14, + 14, + 14, + 14, + 14, + 14, + 14,12,7,10,5,13,3, + 10, + 10, + 9, + 9, + 13, + 12, + 3, + 8,7,3, + 8, + 7, + 10, + 11,10,5,13,4,3, + 12, + 12, + 12, + 14,6,5,4, + 2,8, + 8, + 14, + 12, + 2,5, + 4, + 12, + 14, + 7, + 2,7, + 1,2,8,11,7,9,10,6,5,13,4,3, + 14,15,11,12,7,9,10,5,13,4,3,16, + 14, + 1,2,8,11,12,7,9,10,6,5,13,4,3,16, + 12, + 14,15,8,11,12,7,9,10,5,13,4,3,16, + 9,5,4, + 12, + 16, + 5, + 1, + 3, + 12,10,5,13,3, + 12,10, + 6, + 9, + 16, + 10, + 3, + 12,5, + 11,7, + 14,10, + 14, + 6, + 12, + 12, + 6, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 9, + 1,12,10,6,5,16, + 12,9,10,5, + 2,8, + 13, + 2,8,9,6, + 8, + 13, + 12, + 6,4, + 10, + 9, + 13, + 9, + 12, + 10, + 10, + 10, + 12, + 10, + 14, + 12, + 10, + 10, + 14,2, + 12, + 12, + 12, + 1, + 1, + 7, + 12, + 9, + 9, + 9, + 14, + 5,3, + 3, + 3, + 15,12,9, + 12, + 10, + 15,10,3, + 15,12,7,10,5,3,16, + 10, + 12, + 12,5, + 10, + 10, + 10, + 12,10,5,3, + 10, + 10, + 12, + 15,12,13,3, + 3, + 8,13,3, + 15, + 15,12, + 0,11,12,7,9,10,6,5,4,3,16, + 16, + 11,3, + 10,13, + 3, + 3, + 10, + 4, + 11, + 9, + 10, + 10, + 3, + 5, + 11, + 11, + 5, + 3, + 5, + 7, + 10, + 12, + 14, + 14, + 3, + 3, + 3, + 13, + 13, + 13, + 10, + 10, + 13, + 13, + 13, + 10, + 7, + 3, + 3, + 13, + 7, + 14, + 14, + 14, + 7, + 13, + 13, + 12, + 5, + 15, + 5, + 11, + 11, + 13, + 3, + 3, + 5, + 3, + 9, + 10, + 9, + 12,7,10, + 7, + 12,7,9,10, + 12,10, + 10, + 12, + 12, + 15,13, + 9, + 9, + 14, + 0,1,8,11,12,7,9,10,6,5,4,3,16, + 12, + 14,10, + 10, + 5, + 3, + 7,9,10, + 7, + 9, + 7,9,10, + 10, + 10, + 11,3, + 13, + 1,12, + 2,10, + 12,13,3, + 12,13, + 13, + 2,6, + 9, + 13, + 0,10,13, + 12,13, + 8,12, + 7, + 12, + 10,13, + 13, + 13, + 10, + 10, + 15,12,9,6, + 12, + 13, + 12, + 15,11,12,7,5,3,16, + 12, + 7,13,3, + 14, + 1,12,7,10,13, + 10, + 10, + 1,2,8,11,12,7,9,10,6,5,13,4,3,16, + 1,6, + 12, + 13, + 8, + 15,12,10,6,13,4, + 12, + 12, + 14,2,12,7,10,6,13,4,16, + 12, + 11, + 2, + 0, + 12, + 14,3, + 11,3, + 12, + 10, + 15,3, + 3, + 15,3, + 12,5,3, + 1,15,12,7,3, + 12, + 11,4, + 10, + 3, + 7, + 7, + 13, + 10,16, + 15, + 7, + 15,10,13,3, + 15,5, + 10, + 14,15,11,12,9,13,3, + 3, + 3, + 3, + 9, + 3, + 1,6, + 12,3, + 12, + 12,6, + 12, + 15, + 3, + 3, + 15, + 2,11, + 7, + 12, + 12,10, + 12, + 1,9, + 10, + 9, + 14,3, + 12, + 15,11,10,3, + 11,3, + 11, + 11, + 11,3, + 11,3, + 2,12, + 12, + 6, + 10, + 15, + 12,16, + 16, + 10, + 2,12, + 13, + 3, + 5, + 8,12,6, + 12, + 12, + 15,12, + 12, + 14,15,11,12,7,9,10,5,13,4,3,16, + 12, + 5, + 9,10,5,16, + 12,7, + 1,6, + 7,13, + 13, + 12,10,5,3,16, + 2, + 15,12, + 12, + 13, + 8, + 8, + 11,10,13,4, + 10,4, + 15,12, + 0,1,15,8,11,12,7,9,10,6,5,4,3,16, + 15,12,10, + 10, + 7, + 1,12,10,13,3, + 1, + 1, + 1, + 12, + 6, + 1, + 1,2,8,12,7,9,10,6,5,13,4,16, + 9,4, + 9,4, + 12, + 10,16, + 5,13, + 14,12,7,5,13, + 1, + 3, + 3, + 13, + 14, + 12,10,3, + 15, + 12,3, + 14,11,7,10,5,13, + 3, + 9,3, + 12,10,3, + 14, + 12, + 11, + 3, + 12, + 12, + 12, + 12, + 12, + 14, + 8, + 15,13,3, + 14,2,8,13, + 13, + 13, + 15,8, + 12, + 6, + 12,5,16, + 0,12,9,5, + 10,5,16, + 5, + 16, + 12, + 12, + 12, + 12, + 12,9,13, + 12, + 12, + 13, + 11,13, + 13,3, + 14, + 15, + 15,10, + 14, + 13, + 12, + 13, + 15, + 12, + 13, + 12, + 13, + 12, + 7, + 7, + 12,7,9, + 12, + 12, + 9, + 11, + 10,13,4, + 0,2,10,13, + 13, + 10,13, + 1, + 12, + 3, + 3, + 12,9,10, + 14,1,15,8,11,12,7,9,10,6,5,13,4,3,16, + 9, + 14,11,12,10,13, + 15,11,12,9,10,5,4,16, + 5, + 12, + 1,11,10,6, + 3, + 14,2,15,12,7,9,10,6,5,13,4,3, + 14, + 14, + 14, + 14, + 12, + 9, + 9, + 1,15,11,12,7,9,10,13,3, + 12, + 15,11,7,13,3, + 11,12,7,9,5,13,3, + 5, + 5, + 9, + 9, + 14,11,12,5,3, + 1,6,3, + 6, + 6, + 1,6, + 9, + 6, + 15, + 5, + 10, + 10, + 10, + 9, + 12, + 9,5, + 2, + 8,12,10,13, + 14,12,7,5, + 1, + 1,12, + 15,12,6,3,16, + 15,9,3, + 11, + 11, + 3, + 3, + 3, + 9, + 9, + 15, + 3, + 15,9,3, + 11, + 11, + 3, + 3, + 3, + 9, + 9, + 8,9, + 9,10,3, + 11, + 11, + 9, + 9, diff --git a/doc/salome/gui/GEOM/whdata/whtdata0.htm b/doc/salome/gui/GEOM/whdata/whtdata0.htm index 33fb2dbe7..1e295373b 100755 --- a/doc/salome/gui/GEOM/whdata/whtdata0.htm +++ b/doc/salome/gui/GEOM/whdata/whtdata0.htm @@ -6,17 +6,20 @@ + + + + + + + + + + + + + + + + +

    Working with groups

    + +

    To perform operations with groups:

    + +

     

    + +

    In the main menu select New + entity > Groups.

    + +

     

    + +

    Create + a group

    + +

     

    + +

    Description: + Creates a group of subshapes of a geometrical object.

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command: + geompy.CreateGroup(MainShape, ShapeType), + where MainShape is a shape for which the group is created, ShapeType is + a type of shapes in the created group.

    + +

     

    + +

    Arguments: + 1 Shape + Type of subshape.

    + +

     

    + +

    Dialog Box:

    + +

     

    + +

    + +

     

    + +

    Example:

    + +

     

    + +

    + +

     

    + +

     

    + +

     

    + +

    Edit + a group

    + +

     

    + +

    Description: + Allows to edit the existing group.

    + +

     

    + +

    Result: GEOM_Object.

    + +

     

    + +

    TUI Command: +

    + +
      + +
    • geompy.AddObject(Group, + SubShapeID), where Group is a group to which a sub shape has to + be added, SubShapeID is an ID of the sub shape to be added to the group

    • + +
    • geompy.RemoveObject(Group, + SubShapeID), where Group is a group from which a sub shape has + to be removed, SubShapeID is an ID of the sub shape to be removed from + the group

    • + +
    • geompy.GetObjectIDs(Group), + where Group is a group for which its object IDÂ’s are returned.

    • +
    + +

    Returns: + List of IDs.

    + +

     

    + +

    Arguments: + 1 Shape + its subshapes.

    + +

     

    + +

    Dialog Box:

    + +

     

    + +

    + + + + + diff --git a/doc/salome/tui/GEOM/HTML/GEOM_Gen.html b/doc/salome/tui/GEOM/HTML/GEOM_Gen.html index 4e9967c09..507db794d 100644 --- a/doc/salome/tui/GEOM/HTML/GEOM_Gen.html +++ b/doc/salome/tui/GEOM/HTML/GEOM_Gen.html @@ -1,262 +1,802 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_Gen
    interface GEOM_Object
    IDL file
    Python
    string GetEntry ( )
    return_value = GetEntry ( )
    long GetStudyID ( )
    return_value = GetStudyID ( )
    long GetType ( )
    return_value = GetType ( )
    shape_type GetShapeType ( )
    return_value = GetShapeType ( )
    void SetName ( in string theName )
    SetName ( theName )
    string GetName ( )
    return_value = GetName ( )
    void SetStudyEntry ( in string theEntry )
    SetStudyEntry ( theEntry )
    string GetStudyEntry ( )
    return_value = GetStudyEntry ( )
    ListOfGO GetDependency ( )
    return_value = GetDependency ( )
    ListOfGO GetLastDependency ( )
    return_value = GetLastDependency ( )
    long getShape ( )
    return_value = getShape ( )
    TMPFile GetShapeStream ( )
    return_value = GetShapeStream ( )
    boolean IsMainShape ( )
    return_value = IsMainShape ( )
    ListOfLong GetSubShapeIndices ( )
    return_value = GetSubShapeIndices ( )
    GEOM_Object GetMainShape ( )
    return_value = GetMainShape ( )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_IOperations
    IDL file
    Python
    boolean IsDone ( )
    return_value = IsDone ( )
    void SetErrorCode ( in string theErrorID )
    SetErrorCode ( theErrorID )
    string GetErrorCode ( )
    return_value = GetErrorCode ( )
    long GetStudyID ( )
    return_value = GetStudyID ( )
    void StartOperation ( )
    StartOperation ( )
    void FinishOperation ( )
    FinishOperation ( )
    void AbortOperation ( )
    AbortOperation ( )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_IBasicOperations
    IDL file
    Python
    GEOM_Object MakePointXYZ ( in double theX, in double theY, in double theZ )
    return_value = MakePointXYZ ( theX, theY, theZ )
    GEOM_Object MakePointWithReference ( in GEOM_Object theReference, in double theX, in double theY, in double theZ )
    return_value = MakePointWithReference ( theReference, theX, theY, theZ )
    GEOM_Object MakePointOnCurve ( in GEOM_Object theRefCurve, in double theParameter )
    return_value = MakePointOnCurve ( theRefCurve, theParameter )
    GEOM_Object MakeVectorDXDYDZ ( in double theDX, in double theDY, in double theDZ )
    return_value = MakeVectorDXDYDZ ( theDX, theDY, theDZ )
    GEOM_Object MakeVectorTwoPnt ( in GEOM_Object thePnt1, in GEOM_Object thePnt2 )
    return_value = MakeVectorTwoPnt ( thePnt1, thePnt2 )
    GEOM_Object MakeLineTwoPnt ( in GEOM_Object thePnt1, in GEOM_Object thePnt2 )
    return_value = MakeLineTwoPnt ( thePnt1, thePnt2 )
    GEOM_Object MakePlaneThreePnt ( in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3, in double theTrimSize )
    return_value = MakePlaneThreePnt ( thePnt1, thePnt2, thePnt3, theTrimSize )
    GEOM_Object MakePlanePntVec ( in GEOM_Object thePnt, in GEOM_Object theVec, in double theTrimSize )
    return_value = MakePlanePntVec ( thePnt, theVec, theTrimSize )
    GEOM_Object MakePlaneFace ( in GEOM_Object theFace, in double theTrimSize )
    return_value = MakePlaneFace ( theFace, theTrimSize )
    GEOM_Object MakeMarker ( in double theOX, in double theOY, in double theOZ, in double theXDX, in double theXDY, in double theXDZ, in double theYDX, in double theYDY, in double theYDZ )
    return_value = MakeMarker ( theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_ITransformOperations
    IDL file
    Python
    GEOM_Object TranslateTwoPoints ( in GEOM_Object theObject, in GEOM_Object thePoint1, in GEOM_Object thePoint2 )
    return_value = TranslateTwoPoints ( theObject, thePoint1, thePoint2 )
    GEOM_Object TranslateTwoPointsCopy ( in GEOM_Object theObject, in GEOM_Object thePoint1, in GEOM_Object thePoint2 )
    return_value = TranslateTwoPointsCopy ( theObject, thePoint1, thePoint2 )
    GEOM_Object TranslateDXDYDZ ( in GEOM_Object theObject, in double theDX, in double theDY, in double theDZ )
    return_value = TranslateDXDYDZ ( theObject, theDX, theDY, theDZ )
    GEOM_Object TranslateDXDYDZCopy ( in GEOM_Object theObject, in double theDX, in double theDY, in double theDZ )
    return_value = TranslateDXDYDZCopy ( theObject, theDX, theDY, theDZ )
    GEOM_Object TranslateVector ( in GEOM_Object theObject, in GEOM_Object theVector )
    return_value = TranslateVector ( theObject, theVector )
    GEOM_Object TranslateVectorCopy ( in GEOM_Object theObject, in GEOM_Object theVector )
    return_value = TranslateVectorCopy ( theObject, theVector )
    GEOM_Object MultiTranslate1D ( in GEOM_Object theObject, in GEOM_Object theVector, in double theStep, in long theNbTimes )
    return_value = MultiTranslate1D ( theObject, theVector, theStep, theNbTimes )
    GEOM_Object MultiTranslate2D ( in GEOM_Object theObject, in GEOM_Object theVector1, in double theStep1, in long theNbTimes1, in GEOM_Object theVector2, in double theStep2, in long theNbTimes2 )
    return_value = MultiTranslate2D ( theObject, theVector1, theStep1, theNbTimes1, theVector2, theStep2, theNbTimes2 )
    GEOM_Object Rotate ( in GEOM_Object theObject, in GEOM_Object theAxis, in double theAngle )
    return_value = Rotate ( theObject, theAxis, theAngle )
    GEOM_Object RotateCopy ( in GEOM_Object theObject, in GEOM_Object theAxis, in double theAngle )
    return_value = RotateCopy ( theObject, theAxis, theAngle )
    GEOM_Object MultiRotate1D ( in GEOM_Object theObject, in GEOM_Object theAxis, in long theNbTimes )
    return_value = MultiRotate1D ( theObject, theAxis, theNbTimes )
    GEOM_Object MultiRotate2D ( in GEOM_Object theObject, in GEOM_Object theAxis, in double theAngle, in long theNbTimes1, in double theStep, in long theNbTimes2 )
    return_value = MultiRotate2D ( theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2 )
    GEOM_Object MirrorPlane ( in GEOM_Object theObject, in GEOM_Object thePlane )
    return_value = MirrorPlane ( theObject, thePlane )
    GEOM_Object MirrorPlaneCopy ( in GEOM_Object theObject, in GEOM_Object thePlane )
    return_value = MirrorPlaneCopy ( theObject, thePlane )
    GEOM_Object MirrorAxis ( in GEOM_Object theObject, in GEOM_Object theAxis )
    return_value = MirrorAxis ( theObject, theAxis )
    GEOM_Object MirrorAxisCopy ( in GEOM_Object theObject, in GEOM_Object theAxis )
    return_value = MirrorAxisCopy ( theObject, theAxis )
    GEOM_Object MirrorPoint ( in GEOM_Object theObject, in GEOM_Object thePoint )
    return_value = MirrorPoint ( theObject, thePoint )
    GEOM_Object MirrorPointCopy ( in GEOM_Object theObject, in GEOM_Object thePoint )
    return_value = MirrorPointCopy ( theObject, thePoint )
    GEOM_Object OffsetShape ( in GEOM_Object theObject, in double theOffset )
    return_value = OffsetShape ( theObject, theOffset )
    GEOM_Object OffsetShapeCopy ( in GEOM_Object theObject, in double theOffset )
    return_value = OffsetShapeCopy ( theObject, theOffset )
    GEOM_Object ScaleShape ( in GEOM_Object theObject, in GEOM_Object thePoint, in double theFactor )
    return_value = ScaleShape ( theObject, thePoint, theFactor )
    GEOM_Object ScaleShapeCopy ( in GEOM_Object theObject, in GEOM_Object thePoint, in double theFactor )
    return_value = ScaleShapeCopy ( theObject, thePoint, theFactor )
    GEOM_Object PositionShape ( in GEOM_Object theObject, in GEOM_Object theStartLCS, in GEOM_Object theEndLCS )
    return_value = PositionShape ( theObject, theStartLCS, theEndLCS )
    GEOM_Object PositionShapeCopy ( in GEOM_Object theObject, in GEOM_Object theStartLCS, in GEOM_Object theEndLCS )
    return_value = PositionShapeCopy ( theObject, theStartLCS, theEndLCS )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_I3DPrimOperations
    IDL file
    Python
    GEOM_Object MakeBoxDXDYDZ ( in double theDX, in double theDY, in double theDZ )
    return_value = MakeBoxDXDYDZ ( theDX, theDY, theDZ )
    GEOM_Object MakeBoxTwoPnt ( in GEOM_Object thePnt1, in GEOM_Object thePnt2 )
    return_value = MakeBoxTwoPnt ( thePnt1, thePnt2 )
    GEOM_Object MakeCylinderRH ( in double theR, in double theH )
    return_value = MakeCylinderRH ( theR, theH )
    GEOM_Object MakeCylinderPntVecRH ( in GEOM_Object thePnt, in GEOM_Object theAxis, in double theR, in double theH )
    return_value = MakeCylinderPntVecRH ( thePnt, theAxis, theR, theH )
    GEOM_Object MakeConeR1R2H ( in double theR1, in double theR2, in double theH )
    return_value = MakeConeR1R2H ( theR1, theR2, theH )
    GEOM_Object MakeConePntVecR1R2H ( in GEOM_Object thePnt, in GEOM_Object theAxis, in double theR1, in double theR2, in double theH )
    return_value = MakeConePntVecR1R2H ( thePnt, theAxis, theR1, theR2, theH )
    GEOM_Object MakeTorusRR ( in double theRMajor, in double theRMinor )
    return_value = MakeTorusRR ( theRMajor, theRMinor )
    GEOM_Object MakeTorusPntVecRR ( in GEOM_Object thePnt, in GEOM_Object theVec, in double theRMajor, in double theRMinor )
    return_value = MakeTorusPntVecRR ( thePnt, theVec, theRMajor, theRMinor )
    GEOM_Object MakeSphereR ( in double theR )
    return_value = MakeSphereR ( theR )
    GEOM_Object MakeSpherePntR ( in GEOM_Object thePnt, in double theR )
    return_value = MakeSpherePntR ( thePnt, theR )
    GEOM_Object MakePrismVecH ( in GEOM_Object theBase, in GEOM_Object theVec, in double theH )
    return_value = MakePrismVecH ( theBase, theVec, theH )
    GEOM_Object MakePrismTwoPnt ( in GEOM_Object theBase, in GEOM_Object thePoint1, in GEOM_Object thePoint2 )
    return_value = MakePrismTwoPnt ( theBase, thePoint1, thePoint2 )
    GEOM_Object MakePipe ( in GEOM_Object theBase, in GEOM_Object thePath )
    return_value = MakePipe ( theBase, thePath )
    GEOM_Object MakeRevolutionAxisAngle ( in GEOM_Object theBase, in GEOM_Object theAxis, in double theAngle )
    return_value = MakeRevolutionAxisAngle ( theBase, theAxis, theAngle )
    GEOM_Object MakeFilling ( in GEOM_Object theShape, in long theMinDeg, in long theMaxDeg, in double theTol2D, in double theTol3D, in long theNbIter )
    return_value = MakeFilling ( theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter )

    + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + +
    interface GEOM_IShapesOperations
    IDL file
    Python
    void GetCurrentStudy ( in long StudyID )
    GetCurrentStudy ( StudyID )
    GEOM_Object MakeEdge ( in GEOM_Object thePnt1, in GEOM_Object thePnt2 )
    return_value = MakeEdge ( thePnt1, thePnt2 )
    short NbLabels ( )
    return_value = NbLabels ( )
    GEOM_Object MakeWire ( in ListOfGO theEdgesAndWires )
    return_value = MakeWire ( theEdgesAndWires )
    GEOM_Shape GetIORFromString ( in string ior )
    return_value = GetIORFromString ( ior )
    GEOM_Object MakeFace ( in GEOM_Object theWire, in boolean isPlanarWanted )
    return_value = MakeFace ( theWire, isPlanarWanted )
    ListOfIOR GetReferencedObjects ( in GEOM_Shape shape )
    return_value = GetReferencedObjects ( shape )
    GEOM_Object MakeFaceWires ( in ListOfGO theWires, in boolean isPlanarWanted )
    return_value = MakeFaceWires ( theWires, isPlanarWanted )
    ListOfIOR GetObjects ( in GEOM_Shape shape )
    return_value = GetObjects ( shape )
    GEOM_Object MakeShell ( in ListOfGO theFacesAndShells )
    return_value = MakeShell ( theFacesAndShells )
    PointStruct MakePointStruct ( in double x, in double y, in double z )
    return_value = MakePointStruct ( x, y, z )
    GEOM_Object MakeSolidShell ( in GEOM_Object theShell )
    return_value = MakeSolidShell ( theShell )
    DirStruct MakeDirection ( in PointStruct p )
    return_value = MakeDirection ( p )
    GEOM_Object MakeSolidShells ( in ListOfGO theShells )
    return_value = MakeSolidShells ( theShells )
    AxisStruct MakeAxisStruct ( in double x, in double y, in double z, in double vx, in double vy, in double vz )
    return_value = MakeAxisStruct ( x, y, z, vx, vy, vz )
    GEOM_Object MakeCompound ( in ListOfGO theShapes )
    return_value = MakeCompound ( theShapes )
    GEOM_Shape MakeBoolean ( in GEOM_Shape shape1, in GEOM_Shape shape2, in long operation )
    return_value = MakeBoolean ( shape1, shape2, operation )
    GEOM_Object MakeGlueFaces ( in GEOM_Object theShape, in double theTolerance )
    return_value = MakeGlueFaces ( theShape, theTolerance )
    GEOM_Shape MakeFuse ( in GEOM_Shape shape1, in GEOM_Shape shape2 )
    return_value = MakeFuse ( shape1, shape2 )
    ListOfGO MakeExplode ( in GEOM_Object theShape, in long theShapeType, in boolean isSorted )
    return_value = MakeExplode ( theShape, theShapeType, isSorted )
    GEOM_Shape Partition ( in ListOfIOR ListShapes, in ListOfIOR ListTools, in ListOfIOR ListKeepInside, in ListOfIOR ListRemoveInside, in short Limit )
    return_value = Partition ( ListShapes, ListTools, ListKeepInside, ListRemoveInside, Limit )
    long NumberOfFaces ( in GEOM_Object theShape )
    return_value = NumberOfFaces ( theShape )
    GEOM_Shape MakeFilling ( in GEOM_Shape shape, in short mindeg, in short maxdeg, in double tol3d, in double tol2d, in short nbiter )
    return_value = MakeFilling ( shape, mindeg, maxdeg, tol3d, tol2d, nbiter )
    long NumberOfEdges ( in GEOM_Object theShape )
    return_value = NumberOfEdges ( theShape )
    GEOM_Shape MakeSewing ( in ListOfIOR ListShape, in double precision )
    return_value = MakeSewing ( ListShape, precision )
    GEOM_Object ChangeOrientation ( in GEOM_Object theShape )
    return_value = ChangeOrientation ( theShape )

    + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + +
    interface GEOM_IBlocksOperations
    IDL file
    Python
    GEOM_Shape MakeSewingShape ( in GEOM_Shape aShape, in double precision )
    return_value = MakeSewingShape ( aShape, precision )
    GEOM_Object MakeQuadFaceFourVertices ( in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3, in GEOM_Object thePnt4 )
    return_value = MakeQuadFaceFourVertices ( thePnt1, thePnt2, thePnt3, thePnt4 )
    GEOM_Shape OrientationChange ( in GEOM_Shape shape )
    return_value = OrientationChange ( shape )
    GEOM_Object MakeQuadFaceFourEdges ( in GEOM_Object theEdge1, in GEOM_Object theEdge2, in GEOM_Object theEdge3, in GEOM_Object theEdge4 )
    return_value = MakeQuadFaceFourEdges ( theEdge1, theEdge2, theEdge3, theEdge4 )
    GEOM_Shape MakePlacedBox ( in double x1, in double y1, in double z1, in double delta1, in double delta2, in double delta3 )
    return_value = MakePlacedBox ( x1, y1, z1, delta1, delta2, delta3 )
    GEOM_Object MakeQuadFaceTwoEdges ( in GEOM_Object theEdge1, in GEOM_Object theEdge2 )
    return_value = MakeQuadFaceTwoEdges ( theEdge1, theEdge2 )
    GEOM_Shape MakePanel ( in GEOM_Shape shape, in short directiontype, in double delta )
    return_value = MakePanel ( shape, directiontype, delta )
    GEOM_Object MakeHexaSolidSixFaces ( in GEOM_Object theFace1, in GEOM_Object theFace2, in GEOM_Object theFace3, in GEOM_Object theFace4, in GEOM_Object theFace5, in GEOM_Object theFace6 )
    return_value = MakeHexaSolidSixFaces ( theFace1, theFace2, theFace3, theFace4, theFace5, theFace6 )
    GEOM_Shape MakeGlueFaces ( in GEOM_Shape shape, in double tol3d )
    return_value = MakeGlueFaces ( shape, tol3d )
    GEOM_Object MakeHexaSolidTwoFaces ( in GEOM_Object theFace1, in GEOM_Object theFace2 )
    return_value = MakeHexaSolidTwoFaces ( theFace1, theFace2 )
    GEOM_Shape MakeCopy ( in GEOM_Shape shape )
    return_value = MakeCopy ( shape )
    GEOM_Object GetEdge ( in GEOM_Object theShape, in GEOM_Object thePoint1, in GEOM_Object thePoint2 )
    return_value = GetEdge ( theShape, thePoint1, thePoint2 )
    GEOM_Shape MakeTranslation ( in GEOM_Shape shape, in double x, in double y, in double z )
    return_value = MakeTranslation ( shape, x, y, z )
    GEOM_Object GetFaceByPoints ( in GEOM_Object theShape, in GEOM_Object thePoint1, in GEOM_Object thePoint2, in GEOM_Object thePoint3, in GEOM_Object thePoint4 )
    return_value = GetFaceByPoints ( theShape, thePoint1, thePoint2, thePoint3, thePoint4 )
    GEOM_Shape MakeRotation ( in GEOM_Shape shape, in AxisStruct axis, in double angle )
    return_value = MakeRotation ( shape, axis, angle )
    GEOM_Object GetFaceByEdges ( in GEOM_Object theShape, in GEOM_Object theEdge1, in GEOM_Object theEdge2 )
    return_value = GetFaceByEdges ( theShape, theEdge1, theEdge2 )
    GEOM_Shape MakeScaleTransform ( in GEOM_Shape shape, in PointStruct theCenterofScale, in double factor )
    return_value = MakeScaleTransform ( shape, theCenterofScale, factor )
    GEOM_Object GetOppositeFace ( in GEOM_Object theBlock, in GEOM_Object theFace )
    return_value = GetOppositeFace ( theBlock, theFace )
    GEOM_Shape MakeMirrorByPlane ( in GEOM_Shape shape, in GEOM_Shape shapePlane )
    return_value = MakeMirrorByPlane ( shape, shapePlane )
    GEOM_Object GetFaceNearPoint ( in GEOM_Object theShape, in GEOM_Object thePoint )
    return_value = GetFaceNearPoint ( theShape, thePoint )
    GEOM_Shape MakeRevolution ( in GEOM_Shape shape, in AxisStruct axis, in double angle )
    return_value = MakeRevolution ( shape, axis, angle )
    GEOM_Object GetFaceByNormale ( in GEOM_Object theBlock, in GEOM_Object theVector )
    return_value = GetFaceByNormale ( theBlock, theVector )
    GEOM_Shape MakePrism ( in GEOM_Shape baseShape, in PointStruct P1, in PointStruct P2 )
    return_value = MakePrism ( baseShape, P1, P2 )
    boolean IsCompoundOfBlocks ( in GEOM_Object theCompound, in long theMinNbFaces, in long theMaxNbFaces, out long theNbBlocks )
    [ return_value, theNbBlocks ] = IsCompoundOfBlocks ( theCompound, theMinNbFaces, theMaxNbFaces )
    GEOM_Shape MakePipe ( in GEOM_Shape pathShape, in GEOM_Shape baseShape )
    return_value = MakePipe ( pathShape, baseShape )
    ListOfGO ExplodeCompoundOfBlocks ( in GEOM_Object theCompound, in long theMinNbFaces, in long theMaxNbFaces )
    return_value = ExplodeCompoundOfBlocks ( theCompound, theMinNbFaces, theMaxNbFaces )
    GEOM_Shape MakeMultiTranslation1D ( in GEOM_Shape shape, in DirStruct dir, in double step, in short nbtimes )
    return_value = MakeMultiTranslation1D ( shape, dir, step, nbtimes )
    GEOM_Object GetBlockNearPoint ( in GEOM_Object theCompound, in GEOM_Object thePoint )
    return_value = GetBlockNearPoint ( theCompound, thePoint )
    GEOM_Shape MakeMultiTranslation2D ( in GEOM_Shape shape, in DirStruct dir1, in double step1, in short nbtimes1, in DirStruct dir2, in double step2, in short nbtimes2 )
    return_value = MakeMultiTranslation2D ( shape, dir1, step1, nbtimes1, dir2, step2, nbtimes2 )
    GEOM_Object GetBlockByParts ( in GEOM_Object theCompound, in ListOfGO theParts )
    return_value = GetBlockByParts ( theCompound, theParts )
    GEOM_Shape MakeMultiRotation1D ( in GEOM_Shape shape, in DirStruct dir, in PointStruct loc, in short nbtimes )
    return_value = MakeMultiRotation1D ( shape, dir, loc, nbtimes )
    ListOfGO GetBlocksByParts ( in GEOM_Object theCompound, in ListOfGO theParts )
    return_value = GetBlocksByParts ( theCompound, theParts )
    GEOM_Shape MakeMultiRotation2D ( in GEOM_Shape shape, in DirStruct dir, in PointStruct loc, in double ang, in short nbtimes1, in double step, in short nbtimes2 )
    return_value = MakeMultiRotation2D ( shape, dir, loc, ang, nbtimes1, step, nbtimes2 )
    GEOM_Object MakeMultiTransformation1D ( in GEOM_Object theBlock, in long theDirFace1, in long theDirFace2, in long theNbTimes )
    return_value = MakeMultiTransformation1D ( theBlock, theDirFace1, theDirFace2, theNbTimes )
    GEOM_Shape MakeCDG ( in GEOM_Shape shape )
    return_value = MakeCDG ( shape )
    GEOM_Object MakeMultiTransformation2D ( in GEOM_Object theBlock, in long theDirFace1U, in long theDirFace2U, in long theNbTimesU, in long theDirFace1V, in long theDirFace2V, in long theNbTimesV )
    return_value = MakeMultiTransformation2D ( theBlock, theDirFace1U, theDirFace2U, theNbTimesU, theDirFace1V, theDirFace2V, theNbTimesV )

    + + + + + + - - + + - - + + - - + + + +
    interface GEOM_IBooleanOperations
    IDL file
    Python
    GEOM_Shape MakeVertex ( in double x, in double y, in double z )
    return_value = MakeVertex ( x, y, z )
    GEOM_Object MakeBoolean ( in GEOM_Object theShape1, in GEOM_Object theShape2, in long theOperation )
    return_value = MakeBoolean ( theShape1, theShape2, theOperation )
    GEOM_Shape MakeVector ( in PointStruct pstruct1, in PointStruct pstruct2 )
    return_value = MakeVector ( pstruct1, pstruct2 )
    GEOM_Object MakePartition ( in ListOfGO theShapes, in ListOfGO theTools, in ListOfGO theKeepInside, in ListOfGO theRemoveInside, in short theLimit, in boolean theRemoveWebs, in ListOfLong theMaterials )
    return_value = MakePartition ( theShapes, theTools, theKeepInside, theRemoveInside, theLimit, theRemoveWebs, theMaterials )
    GEOM_Shape MakeLine ( in PointStruct pstruct, in DirStruct dstruct )
    return_value = MakeLine ( pstruct, dstruct )
    GEOM_Object MakeHalfPartition ( in GEOM_Object theShape, in GEOM_Object thePlane )
    return_value = MakeHalfPartition ( theShape, thePlane )

    + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + + +
    interface GEOM_ICurvesOperations
    IDL file
    Python
    GEOM_Object MakeCirclePntVecR ( in GEOM_Object thePnt, in GEOM_Object theVec, in double theR )
    return_value = MakeCirclePntVecR ( thePnt, theVec, theR )
    GEOM_Object MakeCircleThreePnt ( in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3 )
    return_value = MakeCircleThreePnt ( thePnt1, thePnt2, thePnt3 )
    GEOM_Object MakeEllipse ( in GEOM_Object thePnt, in GEOM_Object theVec, in double theRMajor, in double theRMinor )
    return_value = MakeEllipse ( thePnt, theVec, theRMajor, theRMinor )
    GEOM_Object MakeArc ( in GEOM_Object thePnt1, in GEOM_Object thePnt2, in GEOM_Object thePnt3 )
    return_value = MakeArc ( thePnt1, thePnt2, thePnt3 )
    GEOM_Shape MakePlane ( in PointStruct pstruct, in DirStruct dstruct, in double trimsize )
    return_value = MakePlane ( pstruct, dstruct, trimsize )
    GEOM_Object MakePolyline ( in ListOfGO thePoints )
    return_value = MakePolyline ( thePoints )
    GEOM_Shape MakeCircle ( in PointStruct pstruct, in DirStruct dstruct, in double radius )
    return_value = MakeCircle ( pstruct, dstruct, radius )
    GEOM_Object MakeSplineBezier ( in ListOfGO thePoints )
    return_value = MakeSplineBezier ( thePoints )
    GEOM_Shape MakeArc ( in PointStruct pInit, in PointStruct pCircle, in PointStruct pEnd )
    return_value = MakeArc ( pInit, pCircle, pEnd )
    GEOM_Object MakeSplineInterpolation ( in ListOfGO thePoints )
    return_value = MakeSplineInterpolation ( thePoints )
    GEOM_Shape MakeBox ( in double x1, in double y1, in double z1, in double x2, in double y2, in double z2 )
    return_value = MakeBox ( x1, y1, z1, x2, y2, z2 )
    GEOM_Object MakeSketcher ( in string theCommand, in ListOfDouble theWorkingPlane )
    return_value = MakeSketcher ( theCommand, theWorkingPlane )

    + + + + + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + +
    interface GEOM_ILocalOperations
    IDL file
    Python
    GEOM_Shape MakeCylinder ( in PointStruct pstruct, in DirStruct dstruct, in double radius, in double height )
    return_value = MakeCylinder ( pstruct, dstruct, radius, height )
    GEOM_Object MakeFilletAll ( in GEOM_Object theShape, in double theR )
    return_value = MakeFilletAll ( theShape, theR )
    GEOM_Shape MakeSphere ( in double x1, in double y1, in double z1, in double radius )
    return_value = MakeSphere ( x1, y1, z1, radius )
    GEOM_Object MakeFilletEdges ( in GEOM_Object theShape, in double theR, in ListOfLong theEdges )
    return_value = MakeFilletEdges ( theShape, theR, theEdges )
    GEOM_Shape MakeTorus ( in PointStruct pstruct, in DirStruct dstruct, in double major_radius, in double minor_radius )
    return_value = MakeTorus ( pstruct, dstruct, major_radius, minor_radius )
    GEOM_Object MakeFilletFaces ( in GEOM_Object theShape, in double theR, in ListOfLong theFaces )
    return_value = MakeFilletFaces ( theShape, theR, theFaces )
    GEOM_Shape MakeCone ( in PointStruct pstruct, in DirStruct dstruct, in double radius1, in double radius2, in double height )
    return_value = MakeCone ( pstruct, dstruct, radius1, radius2, height )
    GEOM_Object MakeChamferAll ( in GEOM_Object theShape, in double theD )
    return_value = MakeChamferAll ( theShape, theD )
    GEOM_Shape Archimede ( in GEOM_Shape shape, in double Weight, in double WaterDensity, in double MeshingDeflection )
    return_value = Archimede ( shape, Weight, WaterDensity, MeshingDeflection )
    GEOM_Object MakeChamferEdge ( in GEOM_Object theShape, in double theD1, in double theD2, in long theFace1, in long theFace2 )
    return_value = MakeChamferEdge ( theShape, theD1, theD2, theFace1, theFace2 )
    GEOM_Object MakeChamferFaces ( in GEOM_Object theShape, in double theD1, in double theD2, in ListOfLong theFaces )
    return_value = MakeChamferFaces ( theShape, theD1, theD2, theFaces )
    GEOM_Object MakeArchimede ( in GEOM_Object theShape, in double theWeight, in double theWaterDensity, in double theMeshDeflection )
    return_value = MakeArchimede ( theShape, theWeight, theWaterDensity, theMeshDeflection )
    long GetSubShapeIndex ( in GEOM_Object theShape, in GEOM_Object theSubShape )
    return_value = GetSubShapeIndex ( theShape, theSubShape )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_IHealingOperations
    IDL file
    Python
    GEOM_Object ProcessShape ( in GEOM_Object theShapes, in string_array theOperators, in string_array theParameters, in string_array theValues )
    return_value = ProcessShape ( theShapes, theOperators, theParameters, theValues )
    void GetShapeProcessParameters ( out string_array theOperators, out string_array theParameters, out string_array theValues )
    [ theOperators, theParameters, theValues ] = GetShapeProcessParameters ( )
    GEOM_Object SuppressFaces ( in GEOM_Object theObject, in short_array theFaces )
    return_value = SuppressFaces ( theObject, theFaces )
    GEOM_Object CloseContour ( in GEOM_Object theObject, in short_array theWires, in boolean isCommonVertex )
    return_value = CloseContour ( theObject, theWires, isCommonVertex )
    GEOM_Object RemoveIntWires ( in GEOM_Object theObject, in short_array theWires )
    return_value = RemoveIntWires ( theObject, theWires )
    GEOM_Object FillHoles ( in GEOM_Object theObject, in short_array theWires )
    return_value = FillHoles ( theObject, theWires )
    GEOM_Object Sew ( in GEOM_Object theObject, in double theTolerance )
    return_value = Sew ( theObject, theTolerance )
    GEOM_Object DivideEdge ( in GEOM_Object theObject, in short theEdgeIndex, in double theValue, in boolean isByParameter )
    return_value = DivideEdge ( theObject, theEdgeIndex, theValue, isByParameter )
    boolean GetFreeBoundary ( in GEOM_Object theObject, out ListOfGO theClosedWires, out ListOfGO theOpenWires )
    [ return_value, theClosedWires, theOpenWires ] = GetFreeBoundary ( theObject )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_IInsertOperations
    IDL file
    Python
    GEOM_Object MakeCopy ( in GEOM_Object theOriginal )
    return_value = MakeCopy ( theOriginal )
    void Export ( in GEOM_Object theObject, in string theFileName, in string theFormatName )
    Export ( theObject, theFileName, theFormatName )
    GEOM_Object Import ( in string theFileName, in string theFormatName )
    return_value = Import ( theFileName, theFormatName )
    void ImportTranslators ( out string_array theFormats, out string_array thePatterns )
    [ theFormats, thePatterns ] = ImportTranslators ( )
    void ExportTranslators ( out string_array theFormats, out string_array thePatterns )
    [ theFormats, thePatterns ] = ExportTranslators ( )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_IMeasureOperations
    IDL file
    Python
    void GetBasicProperties ( in GEOM_Object theShape, out double theLength, out double theSurfArea, out double theVolume )
    [ theLength, theSurfArea, theVolume ] = GetBasicProperties ( theShape )
    GEOM_Object GetCentreOfMass ( in GEOM_Object theShape )
    return_value = GetCentreOfMass ( theShape )
    void GetInertia ( in GEOM_Object theShape, out double I11, out double I12, out double I13, out double I21, out double I22, out double I23, out double I31, out double I32, out double I33, out double Ix, out double Iy, out double Iz )
    [ I11, I12, I13, I21, I22, I23, I31, I32, I33, Ix, Iy, Iz ] = GetInertia ( theShape )
    void GetBoundingBox ( in GEOM_Object theShape, out double Xmin, out double Xmax, out double Ymin, out double Ymax, out double Zmin, out double Zmax )
    [ Xmin, Xmax, Ymin, Ymax, Zmin, Zmax ] = GetBoundingBox ( theShape )
    void GetTolerance ( in GEOM_Object theShape, out double FaceMin, out double FaceMax, out double EdgeMin, out double EdgeMax, out double VertMin, out double VertMax )
    [ FaceMin, FaceMax, EdgeMin, EdgeMax, VertMin, VertMax ] = GetTolerance ( theShape )
    boolean CheckShape ( in GEOM_Object theShape, out string theDescription )
    [ return_value, theDescription ] = CheckShape ( theShape )
    string WhatIs ( in GEOM_Object theShape )
    return_value = WhatIs ( theShape )
    double GetMinDistance ( in GEOM_Object theShape1, in GEOM_Object theShape2, out double X1, out double Y1, out double Z1, out double X2, out double Y2, out double Z2 )
    [ return_value, X1, Y1, Z1, X2, Y2, Z2 ] = GetMinDistance ( theShape1, theShape2 )
    void PointCoordinates ( in GEOM_Object theShape, out double X, out double Y, out double Z )
    [ X, Y, Z ] = PointCoordinates ( theShape )

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    interface GEOM_IGroupOperations
    IDL file
    Python
    GEOM_Object CreateGroup ( in GEOM_Object theMainShape, in long theShapeType )
    return_value = CreateGroup ( theMainShape, theShapeType )
    void AddObject ( in GEOM_Object theGroup, in long theSubShapeId )
    AddObject ( theGroup, theSubShapeId )
    void RemoveObject ( in GEOM_Object theGroup, in long theSubShapeId )
    RemoveObject ( theGroup, theSubShapeId )
    long GetType ( in GEOM_Object theGroup )
    return_value = GetType ( theGroup )
    GEOM_Object GetMainShape ( in GEOM_Object theGroup )
    return_value = GetMainShape ( theGroup )
    ListOfLong GetObjects ( in GEOM_Object theGroup )
    return_value = GetObjects ( theGroup )

    + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
    interface GEOM_Gen
    IDL file
    Python
    GEOM_Shape MakeEdge ( in PointStruct pstruct1, in PointStruct pstruct2 )
    return_value = MakeEdge ( pstruct1, pstruct2 )
    void Undo ( in long theStudyID )
    Undo ( theStudyID )
    GEOM_Shape MakeWire ( in ListOfIOR ListShape )
    return_value = MakeWire ( ListShape )
    void Redo ( in long theStudyID )
    Redo ( theStudyID )
    GEOM_Shape MakeCompound ( in ListOfIOR ListShape )
    return_value = MakeCompound ( ListShape )
    SObject AddInStudy ( in Study theStudy, in GEOM_Object theObject, in string theName, in GEOM_Object theFather )
    return_value = AddInStudy ( theStudy, theObject, theName, theFather )
    GEOM_Shape MakeFace ( in GEOM_Shape shapeWire, in boolean wantplanarface )
    return_value = MakeFace ( shapeWire, wantplanarface )
    GEOM_IBasicOperations GetIBasicOperations ( in long theStudyID )
    return_value = GetIBasicOperations ( theStudyID )
    GEOM_Shape SubShape ( in GEOM_Shape shape, in short ShapeType, in ListOfSubShapeID ListOfID )
    return_value = SubShape ( shape, ShapeType, ListOfID )
    GEOM_ITransformOperations GetITransformOperations ( in long theStudyID )
    return_value = GetITransformOperations ( theStudyID )
    ListOfGeomShapes SubShapeAll ( in GEOM_Shape shape, in short ShapeType )
    return_value = SubShapeAll ( shape, ShapeType )
    GEOM_I3DPrimOperations GetI3DPrimOperations ( in long theStudyID )
    return_value = GetI3DPrimOperations ( theStudyID )
    GEOM_Shape SubShapeSorted ( in GEOM_Shape shape, in short ShapeType, in ListOfSubShapeID ListOfID )
    return_value = SubShapeSorted ( shape, ShapeType, ListOfID )
    GEOM_IShapesOperations GetIShapesOperations ( in long theStudyID )
    return_value = GetIShapesOperations ( theStudyID )
    ListOfGeomShapes SubShapeAllSorted ( in GEOM_Shape shape, in short ShapeType )
    return_value = SubShapeAllSorted ( shape, ShapeType )
    GEOM_IBooleanOperations GetIBooleanOperations ( in long theStudyID )
    return_value = GetIBooleanOperations ( theStudyID )
    GEOM_Shape MakeFillet ( in GEOM_Shape shape, in double radius, in short ShapeType, in ListOfSubShapeID ListOfID )
    return_value = MakeFillet ( shape, radius, ShapeType, ListOfID )
    GEOM_ICurvesOperations GetICurvesOperations ( in long theStudyID )
    return_value = GetICurvesOperations ( theStudyID )
    GEOM_Shape MakeChamfer ( in GEOM_Shape shape, in double d1, in double d2, in short ShapeType, in ListOfSubShapeID ListOfID )
    return_value = MakeChamfer ( shape, d1, d2, ShapeType, ListOfID )
    GEOM_ILocalOperations GetILocalOperations ( in long theStudyID )
    return_value = GetILocalOperations ( theStudyID )
    ListOfGeomShapes SuppressFaces ( in GEOM_Shape shape, in ListOfSubShapeID ListOfID )
    return_value = SuppressFaces ( shape, ListOfID )
    GEOM_IHealingOperations GetIHealingOperations ( in long theStudyID )
    return_value = GetIHealingOperations ( theStudyID )
    GEOM_Shape SuppressHole ( in GEOM_Shape shape, in ListOfSubShapeID ListOfIdFace, in ListOfSubShapeID ListOfIdWire, in ListOfSubShapeID ListOfIdEndFace )
    return_value = SuppressHole ( shape, ListOfIdFace, ListOfIdWire, ListOfIdEndFace )
    GEOM_IInsertOperations GetIInsertOperations ( in long theStudyID )
    return_value = GetIInsertOperations ( theStudyID )
    GEOM_Shape SuppressHolesInFaceOrShell ( in GEOM_Shape shapeFaceShell, in ListOfSubShapeID ListOfIdWires )
    return_value = SuppressHolesInFaceOrShell ( shapeFaceShell, ListOfIdWires )
    GEOM_IMeasureOperations GetIMeasureOperations ( in long theStudyID )
    return_value = GetIMeasureOperations ( theStudyID )
    GEOM_Shape ImportIGES ( in string filename )
    return_value = ImportIGES ( filename )
    GEOM_IBlocksOperations GetIBlocksOperations ( in long theStudyID )
    return_value = GetIBlocksOperations ( theStudyID )
    GEOM_Shape ImportBREP ( in string filename )
    return_value = ImportBREP ( filename )
    GEOM_IGroupOperations GetIGroupOperations ( in long theStudyID )
    return_value = GetIGroupOperations ( theStudyID )
    GEOM_Shape ImportSTEP ( in string filename )
    return_value = ImportSTEP ( filename )
    void RemoveObject ( in GEOM_Object theObject )
    RemoveObject ( theObject )
    void ExportIGES ( in string filename, in GEOM_Shape theShape )
    ExportIGES ( filename, theShape )
    GEOM_Object GetObject ( in long theStudyID, in string theEntry )
    return_value = GetObject ( theStudyID, theEntry )
    void ExportBREP ( in string filename, in GEOM_Shape theShape )
    ExportBREP ( filename, theShape )
    GEOM_Object AddSubShape ( in GEOM_Object theMainShape, in ListOfLong theIndices )
    return_value = AddSubShape ( theMainShape, theIndices )
    void ExportSTEP ( in string filename, in GEOM_Shape theShape )
    ExportSTEP ( filename, theShape )
    GEOM_Object GetIORFromString ( in string theIOR )
    return_value = GetIORFromString ( theIOR )
    boolean CheckShape ( in GEOM_Shape shape )
    return_value = CheckShape ( shape )
    string GetStringFromIOR ( in GEOM_Object theObject )
    return_value = GetStringFromIOR ( theObject )

    diff --git a/doc/salome/tui/GEOM/doxyfile b/doc/salome/tui/GEOM/doxyfile index a6df56f0e..92c502252 100755 --- a/doc/salome/tui/GEOM/doxyfile +++ b/doc/salome/tui/GEOM/doxyfile @@ -3,7 +3,7 @@ #--------------------------------------------------------------------------- # General configuration options #--------------------------------------------------------------------------- -PROJECT_NAME = "SALOME - GEOM - v.2.0.0" +PROJECT_NAME = "SALOME - GEOM - v.2.1.0" PROJECT_NUMBER = id#1.1 OUTPUT_DIRECTORY = ../ OUTPUT_LANGUAGE = English @@ -56,8 +56,7 @@ WARN_LOGFILE = log.txt #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ../../../share/salome/idl/GEOM_Gen.idl \ - ../../../share/salome/idl/GEOM_Shape.idl +INPUT = ../../../share/salome/idl/GEOM_Gen.idl FILE_PATTERNS = RECURSIVE = NO EXCLUDE = diff --git a/doc/salome/tui/GEOM/sources/static/page2.html b/doc/salome/tui/GEOM/sources/static/page2.html index 54dab3f8e..1966a56fc 100755 --- a/doc/salome/tui/GEOM/sources/static/page2.html +++ b/doc/salome/tui/GEOM/sources/static/page2.html @@ -35,7 +35,6 @@
  • SALOME GEOMETRY module
  • diff --git a/doc/salome/tui/GEOM/sources/static/tree.js b/doc/salome/tui/GEOM/sources/static/tree.js index fdfc5a03c..3193416d8 100755 --- a/doc/salome/tui/GEOM/sources/static/tree.js +++ b/doc/salome/tui/GEOM/sources/static/tree.js @@ -1,4 +1,4 @@ -foldersTree = gFld("SALOME v.2.0.0 ", "", "") +foldersTree = gFld("SALOME v.2.1.0 ", "", "") insDoc(foldersTree, gLnk("Main Page", "", "main.html")) aux1 = insFld(foldersTree, gFld("TUI Reference Guide", "")) diff --git a/idl/GEOM_Gen.idl b/idl/GEOM_Gen.idl index 61b8afc20..63f649050 100644 --- a/idl/GEOM_Gen.idl +++ b/idl/GEOM_Gen.idl @@ -1,26 +1,5 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// // File : GEOM_Gen.idl -// Author : Lucien PIGNOLONI +// Author : Sergey RUIN #ifndef __GEOM_GEN__ #define __GEOM_GEN__ @@ -28,305 +7,1786 @@ #include "SALOME_Exception.idl" #include "SALOME_Component.idl" #include "SALOMEDS.idl" -#include "GEOM_Shape.idl" + +#include "SALOME_GenericObj.idl" module GEOM { + /*! + * Topological types of shapes (like Open Cascade types) + */ + enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, + FACE, WIRE, EDGE, VERTEX, SHAPE }; + + typedef sequence string_array; + typedef sequence short_array; + typedef sequence ListOfLong; + typedef sequence ListOfDouble; + + interface GEOM_Object; + + typedef sequence ListOfGO; + + /*! + * GEOM_Object: interface of geometric object + */ + interface GEOM_Object : SALOME::GenericObj + { + + /*! + * Get an entry of the object in GEOM component. + */ + string GetEntry(); + + /*! + * Get ID of study, where the object is created. + */ + long GetStudyID(); + + /*! + * Get internal type of the object (POINT, BOX, CYLINDER, EXTRUSION...). + */ + long GetType(); + + /*! + * Get a shape_type of the object value. + */ + shape_type GetShapeType(); + + /*! + * Set name of the object. + * \param theName is a name which will be associated with this object. + */ + void SetName (in string theName); + + /*! + * Get name of the object associated with this object. + */ + string GetName(); + + /*! + * Set a Study entry where this object was published. + */ + void SetStudyEntry (in string theEntry); + + /*! + * Get a Study entry where this object was published. + */ + string GetStudyEntry(); + + /*! + * Get a list of all GEOM objects on which were the arguments + * when this object was constructed and modified. + * \note This method is supposed to be used by GUI only. + */ + ListOfGO GetDependency(); + + /*! + * Get a list of GEOM objects on which the last function that created or modified the object depends. + * \note This method is supposed to be used by GUI only. + */ + ListOfGO GetLastDependency(); + + /*! + * Get the TopoDS_Shape, for colocated case only. + */ + long getShape(); + + /*! + ###################################################################### + * Internal methods (For sub shape identification) + ###################################################################### + */ + + /*! + * Get geometric shape of the object as a byte stream + */ + SALOMEDS::TMPFile GetShapeStream(); + + /* + * Returns True if this object is not a sub shape of another object. + */ + boolean IsMainShape(); + + /* + * Get a list of ID's of sub shapes in the main shape. + * \note Internal method, suppopsed to be used only by GEOM_Client + */ + ListOfLong GetSubShapeIndices(); + + /* + * Get a main shape object to which this object is a sub shape + * \note Internal method, suppopsed to be used only by GEOM_Client + */ + GEOM_Object GetMainShape(); + + /* + * Return true if geom object representes a shape. + * For example, method return false for GEOM_MARKER + */ + boolean IsShape(); + }; + + + /*! + * GEOM_IOperations: basic methods of all geometric operations + */ + interface GEOM_IOperations : SALOME::GenericObj + { + /*! + * To know, if the operation was successfully performed + */ + boolean IsDone(); + + /*! + * Set the operation error code + * \param theErrorID is a string describing the error occured + * \note This method is supposed to be used only by interfaces inheriting from IOperations. + */ + void SetErrorCode (in string theErrorID); + + /*! + * Get the operation error code + */ + string GetErrorCode(); + + /*! + * Get ID of study, where the operation is defined + */ + long GetStudyID(); + + /*! + * Opens a new transaction + */ + void StartOperation(); + + /*! + * Closes the previously opened trasaction + */ + void FinishOperation(); + + /*! + * Aborts the previously opened transaction + */ + void AbortOperation(); + }; + + /*! + * GEOM_IBasicOperations: interface for basic geometry creation + * (Point, Vector, Plane, Marker) + */ + interface GEOM_IBasicOperations : GEOM_IOperations + { + /*! + * Create point by three coordinates. + * \param theX The X coordinate of the point. + * \param theY The Y coordinate of the point. + * \param theZ The Z coordinate of the point. + * \return New GEOM_Object, containing the created point. + */ + GEOM_Object MakePointXYZ (in double theX, in double theY, in double theZ); + + /*! + * Create a point, distant from the referenced point + * on the given distances along the coordinate axes. + * \param theReference The referenced point. + * \param theX Displacement from the referenced point along OX axis. + * \param theY Displacement from the referenced point along OY axis. + * \param theZ Displacement from the referenced point along OZ axis. + * \return New GEOM_Object, containing the created point. + */ + GEOM_Object MakePointWithReference (in GEOM_Object theReference, + in double theX, in double theY, in double theZ); + + /*! + * Create a point, corresponding to the given parameter on the given curve. + * \param theRefCurve The referenced curve. + * \param theParameter Value of parameter on the referenced curve. + * \return New GEOM_Object, containing the created point. + */ + GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve, + in double theParameter); + + /*! + * Create a vector with the given components. + * \param theDX X component of the vector. + * \param theDY Y component of the vector. + * \param theDZ Z component of the vector. + * \return New GEOM_Object, containing the created vector. + */ + GEOM_Object MakeVectorDXDYDZ (in double theDX, + in double theDY, + in double theDZ); + + /*! + * Create a vector between two points. + * \param thePnt1 Start point for the vector. + * \param thePnt2 End point for the vector. + * \return New GEOM_Object, containing the created vector. + */ + GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2); + + /*! + * Create a line, passing through the given point + * and parrallel to the given direction + * \param thePnt Point. The resulting line will pass through it. + * \param theDir Direction. The resulting line will be parallel to it. + * \return New GEOM_Object, containing the created line. + */ + GEOM_Object MakeLine (in GEOM_Object thePnt, in GEOM_Object theDir); + + /*! + * Create a line, passing through the given points + * \param thePnt1 First of two points, defining the line. + * \param thePnt2 Second of two points, defining the line. + * \return New GEOM_Object, containing the created line. + */ + GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2); + + /*! + * Create a plane, passing through the three given points + * \param thePnt1 First of three points, defining the plane. + * \param thePnt2 Second of three points, defining the plane. + * \param thePnt3 Fird of three points, defining the plane. + * \param theTrimSize Half size of a side of quadrangle face, representing the plane. + * \return New GEOM_Object, containing the created plane. + */ + GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3, + in double theTrimSize); + + /*! + * Create a plane, passing through the given point + * and normal to the given vector. + * \param thePnt Point, the plane has to pass through. + * \param theVec Vector, defining the plane normal direction. + * \param theTrimSize Half size of a side of quadrangle face, representing the plane. + * \return New GEOM_Object, containing the created plane. + */ + GEOM_Object MakePlanePntVec (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theTrimSize); + + /*! + * Create a plane, similar to the existing one, but with another size of representing face. + * \param theFace Referenced plane. + * \param theTrimSize New half size of a side of quadrangle face, representing the plane. + * \return New GEOM_Object, containing the created plane. + */ + GEOM_Object MakePlaneFace (in GEOM_Object theFace, + in double theTrimSize); + + /*! + * Create a local coordinate system. + * \param theOX,theOY,theOZ Three coordinates of coordinate system origin. + * \param theXDX,theXDY,theXDZ Three components of OX direction + * \param theYDX,theYDY,theYDZ Three components of OY direction + * \return New GEOM_Object, containing the created coordinate system. + */ + GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ, + in double theXDX, in double theXDY, in double theXDZ, + in double theYDX, in double theYDY, in double theYDZ); + }; + + interface GEOM_ITransformOperations : GEOM_IOperations + { + /*! + * Translate the given object along the vector, specified by its end points. + * \param theObject The object to be translated. + * \param thePoint1 Start point of translation vector. + * \param thePoint2 End point of translation vector. + * \return theObject. + */ + GEOM_Object TranslateTwoPoints (in GEOM_Object theObject, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2); + + /*! + * Translate the given object along the vector, specified + * by its end points, creating its copy before the translation. + * \param theObject The object to be translated. + * \param thePoint1 Start point of translation vector. + * \param thePoint2 End point of translation vector. + * \return New GEOM_Object, containing the translated object. + */ + GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2); + + /*! + * Translate the given object along the vector, specified by its components. + * \param theObject The object to be translated. + * \param theDX,theDY,theDZ Components of translation vector. + * \return theObject. + */ + GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject, + in double theDX, in double theDY, in double theDZ); + + /*! + * Translate the given object along the vector, specified + * by its components, creating its copy before the translation. + * \param theObject The object to be translated. + * \param theDX,theDY,theDZ Components of translation vector. + * \return New GEOM_Object, containing the translated object. + */ + GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject, + in double theDX, in double theDY, in double theDZ); + + + /*! + * Translate the given object along the given vector. + * \param theObject The object to be translated. + * \param theVector Translation vector, giving both direction and distance. + * \return theObject. + */ + GEOM_Object TranslateVector (in GEOM_Object theObject, + in GEOM_Object theVector); + + /*! + * Translate the given object along the given vector, + * creating its copy before the translation. + * \param theObject The object to be translated. + * \param theVector Translation vector, giving both direction and distance. + * \return New GEOM_Object, containing the translated object. + */ + GEOM_Object TranslateVectorCopy (in GEOM_Object theObject, + in GEOM_Object theVector); + + /*! + * Translate the given object along the given vector a given number times + * \param theObject The object to be translated. + * \param theVector Direction of the translation. + * \param theStep Distance to translate on. + * \param theNbTimes Quantity of translations to be done. + * \return New GEOM_Object, containing compound of all + * the shapes, obtained after each translation. + */ + GEOM_Object MultiTranslate1D (in GEOM_Object theObject, + in GEOM_Object theVector, + in double theStep, + in long theNbTimes); + + /*! + * Conseqently apply two specified translations to theObject specified number of times. + * \param theObject The object to be translated. + * \param theVector1 Direction of the first translation. + * \param theStep1 Step of the first translation. + * \param theNbTimes1 Quantity of translations to be done along theVector1. + * \param theVector2 Direction of the second translation. + * \param theStep2 Step of the second translation. + * \param theNbTimes2 Quantity of translations to be done along theVector2. + * \return New GEOM_Object, containing compound of all + * the shapes, obtained after each translation. + */ + GEOM_Object MultiTranslate2D (in GEOM_Object theObject, + in GEOM_Object theVector1, + in double theStep1, + in long theNbTimes1, + in GEOM_Object theVector2, + in double theStep2, + in long theNbTimes2); + + /*! + * Rotate the given object around the given axis on the given angle. + * \param theObject The object to be rotated. + * \param theAxis Rotation axis. + * \param theAngle Rotation angle in radians. + * \return theObject. + */ + GEOM_Object Rotate (in GEOM_Object theObject, + in GEOM_Object theAxis, + in double theAngle); + + /*! + * Rotate the given object around the given axis + * on the given angle, creating its copy before the rotatation. + * \param theObject The object to be rotated. + * \param theAxis Rotation axis. + * \param theAngle Rotation angle in radians. + * \return New GEOM_Object, containing the rotated object. + */ + GEOM_Object RotateCopy (in GEOM_Object theObject, + in GEOM_Object theAxis, + in double theAngle); + + /*! + * Rotate the given object around the given axis a given number times. + * Rotation angle will be 2*PI/theNbTimes. + * \param theObject The object to be rotated. + * \param theAxis The rotation axis. + * \param theNbTimes Quantity of rotations to be done. + * \return New GEOM_Object, containing compound of all the + * shapes, obtained after each rotation. + */ + GEOM_Object MultiRotate1D (in GEOM_Object theObject, + in GEOM_Object theAxis, + in long theNbTimes); + + /*! + * Rotate the given object around the + * given axis on the given angle a given number + * times and multi-translate each rotation result. + * Translation direction passes through center of gravity + * of rotated shape and its projection on the rotation axis. + * \param theObject The object to be rotated. + * \param theAxis Rotation axis. + * \param theAngle Rotation angle in graduces. + * \param theNbTimes1 Quantity of rotations to be done. + * \param theStep Translation distance. + * \param theNbTimes2 Quantity of translations to be done. + * \return New GEOM_Object, containing compound of all the + * shapes, obtained after each transformation. + */ + GEOM_Object MultiRotate2D (in GEOM_Object theObject, + in GEOM_Object theAxis, + in double theAngle, + in long theNbTimes1, + in double theStep, + in long theNbTimes2); + + /*! + * Replace the given object by an object, + * symmetrical to it relatively the given plane. + * \param theObject The object to be mirrored. + * \param thePlane Plane of symmetry. + */ + GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane); + + /*! + * Create an object, symmetrical + * to the given one relatively the given plane. + * \param theObject The object to be mirrored. + * \param thePlane Plane of symmetry. + * \return New GEOM_Object, containing the mirrored shape. + */ + GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane); + + /*! + * Replace the given object by an object, + * symmetrical to it relatively the given axis. + * \param theObject The object to be mirrored. + * \param theAxis Axis of symmetry. + * \return theObject. + */ + GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis); + + /*! + * Create an object, symmetrical + * to the given one relatively the given axis. + * \param theObject The object to be mirrored. + * \param theAxis Axis of symmetry. + * \return New GEOM_Object, containing the mirrored object. + */ + GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis); + + /*! + * Replace the given object by an object, symmetrical to it relatively the given point. + * \param theObject The object to be mirrored. + * \param thePoint Point of symmetry. + * \return theObject. + */ + GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint); + + /*! + * Create an object, symmetrical to the given one relatively the given point. + * \param theObject The object to be mirrored. + * \param thePoint Point of symmetry. + * \return New GEOM_Object, containing the mirrored object. + */ + GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint); + + /*! + * Replace the given object by its offset. + * \param theObject The base object for the offset. + * \param theOffset Offset value. + * \return theObject. + */ + GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset); + + /*! + * Create new object as offset of the given one. + * \param theObject The base object for the offset. + * \param theOffset Offset value. + * \return New GEOM_Object, containing the offset object. + */ + GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset); + + /*! + * Scale the given object by the factor. + * \param theObject The object to be scaled. + * \param thePoint Center point for scaling. + * \param theFactor Scaling factor value. + * \return theObject. + */ + GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint, + in double theFactor); + + /*! + * Scale the given object by the factor, creating its copy before the scaling. + * \param theObject The object to be scaled. + * \param thePoint Center point for scaling. + * \param theFactor Scaling factor value. + * \return New GEOM_Object, containing the scaled shape. + */ + GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint, + in double theFactor); + + /*! + * Modify the Location of the given object by LCS + */ + GEOM_Object PositionShape (in GEOM_Object theObject, + in GEOM_Object theStartLCS, + in GEOM_Object theEndLCS); + + /*! + * Modify the Location of the given object by LCS + * creating its copy before the setting + */ + GEOM_Object PositionShapeCopy (in GEOM_Object theObject, + in GEOM_Object theStartLCS, + in GEOM_Object theEndLCS); + }; + + /*! + * GEOM_I3DPrimOperations: Interface for 3D primitives creation + * Box, Cylinder, Cone, Sphere, Prism (extrusion), + * Pipe (extrusion along contour), Revolution, Solid (from shell). + */ + interface GEOM_I3DPrimOperations : GEOM_IOperations + { + /*! + * Create a box with specified dimensions along the coordinate axes + * and with edges, parallel to the coordinate axes. + * Center of the box will be at point (DX/2, DY/2, DZ/2). + * \param theDX Length of Box edges, parallel to OX axis. + * \param theDY Length of Box edges, parallel to OY axis. + * \param theDZ Length of Box edges, parallel to OZ axis. + * \return New GEOM_Object, containing the created box. + */ + GEOM_Object MakeBoxDXDYDZ (in double theDX, in double theDY, in double theDZ); + + /*! + * Create a box with two specified opposite vertices, + * and with edges, parallel to the coordinate axes + * \param thePnt1 First of two opposite vertices. + * \param thePnt2 Second of two opposite vertices. + * \return New GEOM_Object, containing the created box. + */ + GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, in GEOM_Object thePnt2); + + /*! + * Create a cylinder with given radius and height at + * the origin of coordinate system. Axis of the cylinder + * will be collinear to the OZ axis of the coordinate system. + * \param theR Cylinder radius. + * \param theH Cylinder height. + * \return New GEOM_Object, containing the created cylinder. + */ + GEOM_Object MakeCylinderRH (in double theR, in double theH); + + /*! + * Create a cylinder with given base point, axis, radius and height. + * \param thePnt Central point of cylinder base. + * \param theAxis Cylinder axis. + * \param theR Cylinder radius. + * \param theH Cylinder height. + * \return New GEOM_Object, containing the created cylinder. + */ + GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt, + in GEOM_Object theAxis, + in double theR, + in double theH); + + /*! + * Create a cone with given height and radiuses at + * the origin of coordinate system. Axis of the cone will + * be collinear to the OZ axis of the coordinate system. + * \param theR1 Radius of the first cone base. + * \param theR2 Radius of the second cone base. + * \note If both radiuses are non-zero, the cone will be truncated. + * \note If the radiuses are equal, a cylinder will be created instead. + * \param theH Cone height. + * \return New GEOM_Object, containing the created cone. + */ + GEOM_Object MakeConeR1R2H (in double theR1, in double theR2, in double theH); + + /*! + * Create a cone with given base point, axis, height and radiuses. + * \param thePnt Central point of the first cone base. + * \param theAxis Cone axis. + * \param theR1 Radius of the first cone base. + * \param theR2 Radius of the second cone base. + * \note If both radiuses are non-zero, the cone will be truncated. + * \note If the radiuses are equal, a cylinder will be created instead. + * \param theH Cone height. + * \return New GEOM_Object, containing the created cone. + */ + GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt, + in GEOM_Object theAxis, + in double theR1, + in double theR2, + in double theH); + + /*! + * Create a torus with given radiuses at the origin of coordinate system. + * \param theRMajor Torus major radius. + * \param theRMinor Torus minor radius. + * \return New GEOM_Object, containing the created torus. + */ + GEOM_Object MakeTorusRR (in double theRMajor, + in double theRMinor); + + /*! + * Create a torus with given center, normal vector and radiuses. + * \param thePnt Torus central point. + * \param theVec Torus axis of symmetry. + * \param theRMajor Torus major radius. + * \param theRMinor Torus minor radius. + * \return New GEOM_Object, containing the created torus. + */ + GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theRMajor, + in double theRMinor); + + /*! + * Create a sphere with given radius at the origin of coordinate system. + * \param theR Sphere radius. + * \return New GEOM_Object, containing the created sphere. + */ + GEOM_Object MakeSphereR (in double theR); + + /*! + * Create a sphere with given center and radius. + * \param thePnt Sphere center. + * \param theR Sphere radius. + * \return New GEOM_Object, containing the created . + */ + GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, in double theR); + + /*! + * Create a shape by extrusion of the base shape along the vector, + * i.e. all the space, transfixed by the base shape during its translation + * along the vector on the given distance. + * \param theBase Base shape to be extruded. + * \param theVec Direction of extrusion. + * \param theH Prism dimension along theVec. + * \return New GEOM_Object, containing the created prism. + */ + GEOM_Object MakePrismVecH (in GEOM_Object theBase, + in GEOM_Object theVec, + in double theH); + + /*! + * Create a shape by extrusion of the base shape along a vector, defined by two points. + * \param theBase Base shape to be extruded. + * \param thePoint1 First end of extrusion vector. + * \param thePoint2 Second end of extrusion vector. + * \return New GEOM_Object, containing the created prism. + */ + GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2); + + /*! + * Create a shape by extrusion of the base shape along + * the path shape. The path shape can be a wire or an edge. + * \param theBase Base shape to be extruded. + * \param thePath Path shape to extrude the base shape along it. + * \return New GEOM_Object, containing the created pipe. + */ + GEOM_Object MakePipe (in GEOM_Object theBase, in GEOM_Object thePath); + + /*! + * Create a shape by revolution of the base shape around the axis + * on the given angle, i.e. all the space, transfixed by the base + * shape during its rotation around the axis on the given angle. + * \param theBase Base shape to be rotated. + * \param theAxis Rotation axis. + * \param theAngle Rotation angle in radians. + * \return New GEOM_Object, containing the created revolution. + */ + GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase, + in GEOM_Object theAxis, + in double theAngle); + + /*! + * Create a filling from the given compound of contours. + * \param theMinDeg a minimal degree + * \param theMaxDeg a maximal degree + * \param theTol2D a 2d tolerance + * \param theTol3D a 3d tolerance + * \param theNbIter a number of iteration + * \return New GEOM_Object, containing the created filling surface. + */ + GEOM_Object MakeFilling (in GEOM_Object theShape, + in long theMinDeg, in long theMaxDeg, + in double theTol2D, in double theTol3D, + in long theNbIter); + }; + + /*! + * GEOM_IShapesOperations: Interface for Shapes creation: + * Edge from two points, Wire from edges, Face from wire, + * Shell from faces, Solid from shells, Compound from shapes + */ + interface GEOM_IShapesOperations : GEOM_IOperations + { + /*! + * Create a linear edge with specified ends. + * \param thePnt1 Point for the first end of edge. + * \param thePnt2 Point for the second end of edge. + * \return New GEOM_Object, containing the created edge. + */ + GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2); + + /*! + * Create a wire from the set of edges and wires. + * \param theEdgesAndWires List of edge and/or wires. + * \return New GEOM_Object, containing the created wire. + */ + GEOM_Object MakeWire (in ListOfGO theEdgesAndWires); + + /*! + * Create a face on the given wire. + * \param theWire Wire 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. + */ + GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted); + + /*! + * Create a face on the given wires set. + * \param theWires List of wires 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. + */ + GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted); + + /*! + * Create a shell from the set of faces and shells. + * \param theFacesAndShells List of faces and/or shells. + * \return New GEOM_Object, containing the created shell. + */ + GEOM_Object MakeShell (in ListOfGO theFacesAndShells); + + /*! + * Create a solid, bounded by the given shell. + * \param theShell Bounding shell. + * \return New GEOM_Object, containing the created solid. + */ + GEOM_Object MakeSolidShell (in GEOM_Object theShell); + + /*! + * Create a solid, bounded by the given shells. + * \param theShells Bounding shells. + * \return New GEOM_Object, containing the created solid. + */ + GEOM_Object MakeSolidShells (in ListOfGO theShells); + + /*! + * Create a compound of the given shapes. + * \param theShapes List of shapes to put in compound. + * \return New GEOM_Object, containing the created compound. + */ + GEOM_Object MakeCompound (in ListOfGO theShapes); + + /*! + * Replace coincident faces in theShape by one face. + * \param theShape Initial shape. + * \param theTolerance Maximum distance between faces, which can be considered as coincident. + * \return New GEOM_Object, containing a copy of theShape without coincident faces. + */ + GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance); + + /*! + * Explode a shape on subshapes of a given type. + * \param theShape Shape to be exploded. + * \param theShapeType Type of sub-shapes to be retrieved. + * \param isSorted If this parameter is TRUE, sub-shapes will be + * sorted by coordinates of their gravity centers. + * \return List of sub-shapes of type theShapeType, contained in theShape. + */ + ListOfGO MakeExplode (in GEOM_Object theShape, + in long theShapeType, + in boolean isSorted); + + /*! + * Get a sub shape defined by its unique ID inside \a theMainShape + * \note The sub shape GEOM_Objects can has ONLY ONE function. + * Don't try to apply modification operations on them. + */ + GEOM_Object GetSubShape (in GEOM_Object theMainShape, + in long theID); + + /*! + * Count number of faces in the given shape. + * \param theShape Shape to count faces in. + * \return Number of faces in the given shape. + */ + long NumberOfFaces (in GEOM_Object theShape); + + /*! + * Count number of edges in the given shape. + * \param theShape Shape to count edges in. + * \return Number of edges in theShape. + */ + long NumberOfEdges (in GEOM_Object theShape); + + /*! + * Reverses an orientation the given shape. + * \param theShape Shape to be reversed. + * \return The reversed copy of theShape. + */ + GEOM_Object ChangeOrientation (in GEOM_Object theShape); + }; + + /*! + * GEOM_IBlocksOperations: Interface for Blocks construction + * Face from points or edges, Block from faces, + * Blocks multi-translation and multi-rotation + */ + interface GEOM_IBlocksOperations : GEOM_IOperations + { + /*! + * Creation of blocks + */ + + /*! + * Create a quadrangle face from four edges. Order of Edges is not + * important. It is not necessary that edges share the same vertex. + * \param theEdge1,theEdge2,theEdge3,theEdge4 Edges for the face bound. + * \return New GEOM_Object, containing the created face. + */ + GEOM_Object MakeQuad (in GEOM_Object theEdge1, + in GEOM_Object theEdge2, + in GEOM_Object theEdge3, + in GEOM_Object theEdge4); + + /*! + * Create a quadrangle face on two edges. + * The missing edges will be built by creating the shortest ones. + * \param theEdge1,theEdge2 Two opposite edges for the face. + * \return New GEOM_Object, containing the created face. + */ + GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1, + in GEOM_Object theEdge2); + + /*! + * Create a quadrangle face with specified corners. + * The missing edges will be built by creating the shortest ones. + * \param thePnt1,thePnt2,thePnt3,thePnt4 Corner vertices for the face. + * \return New GEOM_Object, containing the created face. + */ + GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3, + in GEOM_Object thePnt4); + + /*! + * Create a hexahedral solid, bounded by the six given faces. Order of + * faces is not important. It is not necessary that Faces share the same edge. + * \param theFace1-theFace6 Faces for the hexahedral solid. + * \return New GEOM_Object, containing the created solid. + */ + GEOM_Object MakeHexa (in GEOM_Object theFace1, + in GEOM_Object theFace2, + in GEOM_Object theFace3, + in GEOM_Object theFace4, + in GEOM_Object theFace5, + in GEOM_Object theFace6); + + /*! + * Create a hexahedral solid between two given faces. + * The missing faces will be built by creating the smallest ones. + * \param theFace1,theFace2 Two opposite faces for the hexahedral solid. + * \return New GEOM_Object, containing the created solid. + */ + GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1, + in GEOM_Object theFace2); + + /*! + * Extract elements of blocks and blocks compounds + */ + + /*! + * Get a vertex, found in the given shape by its coordinates. + * \param theShape Block or a compound of blocks. + * \param theX,theY,theZ Coordinates of the sought vertex. + * \param theEpsilon Maximum allowed distance between the resulting + * vertex and point with the given coordinates. + * \return New GEOM_Object, containing the found vertex. + */ + GEOM_Object GetPoint (in GEOM_Object theShape, + in double theX, + in double theY, + in double theZ, + in double theEpsilon); + + /*! + * Get an edge, found in the given shape by two given vertices. + * \param theShape Block or a compound of blocks. + * \param thePoint1,thePoint2 Points, close to the ends of the desired edge. + * \return New GEOM_Object, containing the found edge. + */ + GEOM_Object GetEdge (in GEOM_Object theShape, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2); + + /*! + * Find an edge of the given shape, which has minimal distance to the given point. + * \param theShape Block or a compound of blocks. + * \param thePoint Point, close to the desired edge. + * \return New GEOM_Object, containing the found edge. + */ + GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape, + in GEOM_Object thePoint); + + /*! + * Returns a face, found in the given shape by four given corner vertices. + * \param theShape Block or a compound of blocks. + * \param thePoint1-thePoint4 Points, close to the corners of the desired face. + * \return New GEOM_Object, containing the found face. + */ + GEOM_Object GetFaceByPoints (in GEOM_Object theShape, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2, + in GEOM_Object thePoint3, + in GEOM_Object thePoint4); + + /*! + * Get a face of block, found in the given shape by two given edges. + * \param theShape Block or a compound of blocks. + * \param theEdge1,theEdge2 Edges, close to the edges of the desired face. + * \return New GEOM_Object, containing the found face. + */ + GEOM_Object GetFaceByEdges (in GEOM_Object theShape, + in GEOM_Object theEdge1, + in GEOM_Object theEdge2); + + /*! + * Find a face, opposite to the given one in the given block. + * \param theBlock Must be a hexahedral solid. + * \param theFace Face of \a theBlock, opposite to the desired face. + * \return New GEOM_Object, containing the found face. + */ + GEOM_Object GetOppositeFace (in GEOM_Object theBlock, + in GEOM_Object theFace); + + /*! + * Find a face of the given shape, which has minimal distance to the given point. + * \param theShape Block or a compound of blocks. + * \param thePoint Point, close to the desired face. + * \return New GEOM_Object, containing the found face. + */ + GEOM_Object GetFaceNearPoint (in GEOM_Object theShape, + in GEOM_Object thePoint); + + /*! + * Find a face of block, whose outside normale has minimal angle with the given vector. + * \param theShape Block or a compound of blocks. + * \param theVector Vector, close to the normale of the desired face. + * \return New GEOM_Object, containing the found face. + */ + GEOM_Object GetFaceByNormale (in GEOM_Object theBlock, + in GEOM_Object theVector); + + /*! + * Extract blocks from blocks compounds + */ + + /*! + * Check, if the compound contains only specified blocks. + * \param theCompound The compound to check. + * \param theMinNbFaces If solid has lower number of faces, it is not a block. + * \param theMaxNbFaces If solid has higher number of faces, it is not a block. + * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted. + * \return TRUE, if the given compound contains only blocks. + * \return theNbBlocks Number of specified blocks in theCompound. + */ + boolean IsCompoundOfBlocks (in GEOM_Object theCompound, + in long theMinNbFaces, + in long theMaxNbFaces, + out long theNbBlocks); + + /*! + * Enumeration of Blocks Compound defects. + */ + enum BCErrorType + { + NOT_BLOCK, /* Each element of the compound should be a Block */ + INVALID_CONNECTION, /* A connection between two Blocks should be an entire face or an entire edge */ + NOT_CONNECTED, /* The compound should be connexe */ + NOT_GLUED /* The glue between two quadrangle faces should be applied */ + }; + + /*! + * Description of Blocks Compound defect: type and incriminated sub-shapes. + */ + struct BCError + { + BCErrorType error; + ListOfLong incriminated; + }; + + /*! + * Sequence of all Blocks Compound defects. + */ + typedef sequence BCErrors; + + /*! + * Check, if the compound of blocks is given. + * To be considered as a compound of blocks, the + * given shape must satisfy the following conditions: + * - Each element of the compound should be a Block (6 faces and 12 edges). + * - A connection between two Blocks should be an entire quadrangle face or an entire edge. + * - The compound should be connexe. + * - The glue between two quadrangle faces should be applied. + * \param theCompound The compound to check. + * \return TRUE, if the given shape is a compound of blocks. + * \return theErrors Structure, containing discovered errors and incriminated sub-shapes. + */ + boolean CheckCompoundOfBlocks (in GEOM_Object theCompound, + out BCErrors theErrors); + + /*! + * Convert sequence of Blocks Compound errors, returned by + * CheckCompoundOfBlocks(), into string. + * \param theCompound The bad compound. + * \param theErrors The sequence of \a theCompound errors. + * \return String, describing all the errors in form, suitable for printing. + */ + string PrintBCErrors (in GEOM_Object theCompound, + in BCErrors theErrors); + + /*! + * Get all the blocks, contained in the given compound. + * \param theCompound The compound to explode. + * \param theMinNbFaces If solid has lower number of faces, it is not a block. + * \param theMaxNbFaces If solid has higher number of faces, it is not a block. + * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted. + * \return List of GEOM_Objects, containing the retrieved blocks. + */ + ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound, + in long theMinNbFaces, + in long theMaxNbFaces); + + /*! + * Find block, containing the given point inside its volume or on boundary. + * \param theCompound Compound, to find block in. + * \param thePoint Point, close to the desired block. If the point lays on + * boundary between some blocks, we return block with nearest center. + * \return New GEOM_Object, containing the found block. + */ + GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound, + in GEOM_Object thePoint); + + /*! + * Find block, containing all the elements, passed as the parts, or maximum quantity of them. + * \param theCompound Compound, to find block in. + * \param theParts List of faces and/or edges and/or vertices to be parts of the found block. + * \return New GEOM_Object, containing the found block. + */ + GEOM_Object GetBlockByParts (in GEOM_Object theCompound, + in ListOfGO theParts); + + /*! + * Return all blocks, containing all the elements, passed as the parts. + * \param theCompound Compound, to find blocks in. + * \param theParts List of faces and/or edges and/or vertices to be parts of the found blocks. + * \return List of GEOM_Objects, containing the found blocks. + */ + ListOfGO GetBlocksByParts (in GEOM_Object theCompound, + in ListOfGO theParts); + + /*! + * Operations on blocks with gluing of result + */ + + /*! + * Multi-transformate block and glue the result. + * Transformation is defined so, as to superpose theDirFace1 with theDirFace2. + * \param theBlock Hexahedral solid to be multi-transformed. + * \param theDirFace1 First direction face global index. + * \param theDirFace2 Second direction face global index. + * \param theNbTimes Quantity of transformations to be done. + * \note Global index of sub-shape can be obtained, using method + * GEOM_ILocalOperations.GetSubShapeIndex(). + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock, + in long theDirFace1, + in long theDirFace2, + in long theNbTimes); + + /*! + * Multi-transformate block and glue the result. + * \param theBlock Hexahedral solid to be multi-transformed. + * \param theDirFace1U,theDirFace2U Direction faces for the first transformation. + * \param theDirFace1V,theDirFace2V Direction faces for the second transformation. + * \param theNbTimesU,theNbTimesV Quantity of transformations to be done. + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock, + in long theDirFace1U, + in long theDirFace2U, + in long theNbTimesU, + in long theDirFace1V, + in long theDirFace2V, + in long theNbTimesV); + }; + + /*! + * GEOM_IBooleanOperations: Interface for boolean operations (Cut, Fuse, Common) + */ + interface GEOM_IBooleanOperations : GEOM_IOperations + { + /*! + * Perform one of boolean operations on two given shapes. + * \param theShape1 First argument for boolean operation. + * \param theShape2 Second argument for boolean operation. + * \param theOperation Indicates the operation to be done: + * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section. + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeBoolean (in GEOM_Object theShape1, + in GEOM_Object theShape2, + in long theOperation); + + /*! + * Perform partition operation. + * \param theShapes Shapes to be intersected. + * \param theTools Shapes to intersect theShapes. + * \param theKeepInside Shapes, outside which the results will be deleted. + * Each shape from theKeepInside must belong to theShapes also. + * \param theRemoveInside Shapes, inside which the results will be deleted. + * Each shape from theRemoveInside must belong to theShapes also. + * \param theLimit Type of resulting shapes (corresponding to TopAbs_ShapeEnum). + * \param theRemoveWebs If TRUE, perform Glue 3D algorithm. + * \param theMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE. + * \return New GEOM_Object, containing the result shapes. + */ + GEOM_Object MakePartition (in ListOfGO theShapes, + in ListOfGO theTools, + in ListOfGO theKeepInside, + in ListOfGO theRemoveInside, + in short theLimit, + in boolean theRemoveWebs, + in ListOfLong theMaterials); + + /*! + * Perform partition of the Shape with the Plane + * \param theShape Shape to be intersected. + * \param thePlane Tool shape, to intersect theShape. + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeHalfPartition (in GEOM_Object theShape, + in GEOM_Object thePlane); + }; + + /*! + * GEOM_ICurvesOperations: Interface for curves creation. + * Polyline, Circle, Spline (Bezier and Interpolation) + */ + interface GEOM_ICurvesOperations : GEOM_IOperations + { + /*! + * Create a circle with given center, normal vector and radius. + * \param thePnt Circle center. + * \param theVec Vector, normal to the plane of the circle. + * \param theR Circle radius. + * \return New GEOM_Object, containing the created circle. + */ + GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theR); + /*! + * Create a circle, passing through three given points + * \param thePnt1,thePnt2,thePnt3 Points, defining the circle. + * \return New GEOM_Object, containing the created circle. + */ + GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3); + + /*! + * Create an ellipse with given center, normal vector and radiuses. + * \param thePnt Ellipse center. + * \param theVec Vector, normal to the plane of the ellipse. + * \param theRMajor Major ellipse radius. + * \param theRMinor Minor ellipse radius. + * \return New GEOM_Object, containing the created ellipse. + */ + GEOM_Object MakeEllipse (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theRMajor, + in double theRMinor); + + /*! + * Create an arc of circle, passing through three given points. + * \param thePnt1 Start point of the arc. + * \param thePnt2 Middle point of the arc. + * \param thePnt3 End point of the arc. + * \return New GEOM_Object, containing the created arc. + */ + GEOM_Object MakeArc (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3); + + /*! + * Create a polyline on the set of points. + * \param thePoints Sequence of points for the polyline. + * \return New GEOM_Object, containing the created polyline. + */ + GEOM_Object MakePolyline (in ListOfGO thePoints); + + /*! + * Create bezier curve on the set of points. + * \param thePoints Sequence of points for the bezier curve. + * \return New GEOM_Object, containing the created bezier curve. + */ + GEOM_Object MakeSplineBezier (in ListOfGO thePoints); + + /*! + * Create B-Spline curve on the set of points. + * \param thePoints Sequence of points for the B-Spline curve. + * \return New GEOM_Object, containing the created B-Spline curve. + */ + GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints); + + /*! + * Create a sketcher (wire or face), following the textual description, + * passed through \a theCommand argument. \n + * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n + * Format of the description string have to be the following: + * + * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]" + * + * Where: + * - x1, y1 are coordinates of the first sketcher point (zero by default), + * - CMD is one of + * - "R angle" : Set the direction by angle + * - "D dx dy" : Set the direction by DX & DY + * . + * \n + * - "TT x y" : Create segment by point at X & Y + * - "T dx dy" : Create segment by point with DX & DY + * - "L length" : Create segment by direction & Length + * - "IX x" : Create segment by direction & Intersect. X + * - "IY y" : Create segment by direction & Intersect. Y + * . + * \n + * - "C radius length" : Create arc by direction, radius and length(in degree) + * . + * \n + * - "WW" : Close Wire (to finish) + * - "WF" : Close Wire and build face (to finish) + * + * \param theCommand String, defining the sketcher in local + * coordinates of the working plane. + * \param theWorkingPlane Nine double values, defining origin, + * OZ and OX directions of the working plane. + * \return New GEOM_Object, containing the created wire. + */ + GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane); + }; + + /*! + * GEOM_ILocalOperations: Interface for fillet and chamfer creation. + */ + interface GEOM_ILocalOperations : GEOM_IOperations + { + /*! + * Perform a fillet on all edges of the given shape. + * \param theShape Shape, to perform fillet on. + * \param theR Fillet radius. + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeFilletAll (in GEOM_Object theShape, + in double theR); + + /*! + * Perform a fillet on the specified edges of the given shape + * \param theShape Shape, to perform fillet on. + * \param theR Fillet radius. + * \param theEdges Global indices of edges to perform fillet on. + * \note Global index of sub-shape can be obtained, using method GetSubShapeIndex(). + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeFilletEdges (in GEOM_Object theShape, + in double theR, + in ListOfLong theEdges); + + /*! + * Perform a fillet on all edges of the specified faces of the given shape. + * \param theShape Shape, to perform fillet on. + * \param theR Fillet radius. + * \param theFaces Global indices of faces to perform fillet on. + * \note Global index of sub-shape can be obtained, using method GetSubShapeIndex(). + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeFilletFaces (in GEOM_Object theShape, + in double theR, + in ListOfLong theFaces); + + /*! + * Perform a symmetric chamfer on all edges of the given shape. + * \param theShape Shape, to perform chamfer on. + * \param theD Chamfer size along each face. + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeChamferAll (in GEOM_Object theShape, + in double theD); + + /*! + * Perform a chamfer on edges, common to the specified faces. + * with distance D1 on the Face1 + * \param theShape Shape, to perform chamfer on. + * \param theD1 Chamfer size along \a theFace1. + * \param theD2 Chamfer size along \a theFace2. + * \param theFace1,theFace2 Global indices of two faces of \a theShape. + * \note Global index of sub-shape can be obtained, using method GetSubShapeIndex(). + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeChamferEdge (in GEOM_Object theShape, + in double theD1, in double theD2, + in long theFace1, in long theFace2); + + /*! + * Perform a chamfer on all edges of the specified faces. + * with distance D1 on the first specified face (if several for one edge) + * \param theShape Shape, to perform chamfer on. + * \param theD1 Chamfer size along face from \a theFaces. If both faces, + * connected to the edge, are in \a theFaces, \a theD1 + * will be get along face, which is nearer to \a theFaces beginning. + * \param theD2 Chamfer size along another of two faces, connected to the edge. + * \param theFaces Sequence of global indices of faces of \a theShape. + * \note Global index of sub-shape can be obtained, using method GetSubShapeIndex(). + * \return New GEOM_Object, containing the result shape. + */ + GEOM_Object MakeChamferFaces (in GEOM_Object theShape, + in double theD1, in double theD2, + in ListOfLong theFaces); + + /*! + * Perform an Archimde operation on the given shape with given parameters. + * The object presenting the resulting face is returned + * \param theShape Shape to be put in water. + * \param theWeight Weight og the shape. + * \param theWaterDensity Density of the water. + * \param theMeshDeflection Deflection od the mesh, using to compute the section. + * \return New GEOM_Object, containing a section of \a theShape + * by a plane, corresponding to water level. + */ + GEOM_Object MakeArchimede (in GEOM_Object theShape, + in double theWeight, + in double theWaterDensity, + in double theMeshDeflection); + + /*! + * Get global index of \a theSubShape in \a theShape. + * \param theShape Main shape. + * \param theSubShape Sub-shape of the main shape. + * \return global index of \a theSubShape in \a theShape. + */ + long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape); + }; + + /*! + * GEOM_IHealingOperations: Interface for shape healing operations. + * Shape Processing, SuppressFaces, etc. + */ + interface GEOM_IHealingOperations : GEOM_IOperations + { + /*! + * Apply a sequence of Shape Healing operators to the given object. + * \param theShapes Shape to be processed. + * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.). + * \param theParameters List of names of parameters + * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.). + * \param theValues List of values of parameters, in the same order + * as parameters are listed in \a theParameters list. + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object ProcessShape (in GEOM_Object theShapes, + in string_array theOperators, + in string_array theParameters, + in string_array theValues); + + /*! + * Get default sequence of operators, their parameters and parameters' values + * of Shape Process operation. In the current implementation the defaults are + * read from the file pointed by CSF_ShHealingDefaults environmental variable. + * \param theOperators Output. Default list of names of operators. + * \param theParameters Output. Default list of names of parameters. + * \param theValues Output. List of default values of parameters, in the same order + * as parameters are listed in \a theParameters list. + */ + void GetShapeProcessParameters (out string_array theOperators, + out string_array theParameters, + out string_array theValues); + + /*! + * Remove faces from the given object (shape). + * \param theObject Shape to be processed. + * \param theFaces Indices of faces to be removed, if EMPTY then the method + * removes ALL faces of the given object. + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object SuppressFaces (in GEOM_Object theObject, in short_array theFaces); + + /*! + * Close an open wire. + * \param theObject Shape to be processed. + * \param theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, + * if -1, then theObject itself is a wire. + * \param isCommonVertex If TRUE : closure by creation of a common vertex, + * If FALS : closure by creation of an edge between ends. + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object CloseContour (in GEOM_Object theObject, in short_array theWires, + in boolean isCommonVertex); + + /*! + * Remove internal wires and edges from the given object (face). + * \param theObject Shape to be processed. + * \param theWires Indices of wires to be removed, if EMPTY then the method + * removes ALL internal wires of the given object. + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object RemoveIntWires (in GEOM_Object theObject, in short_array theWires); + + /*! + * Remove internal closed contours (holes) from the given object. + * \param theObject Shape to be processed. + * \param theWires Indices of wires to be removed, if EMPTY then the method + * removes ALL internal holes of the given object + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object FillHoles (in GEOM_Object theObject, in short_array theWires); + + /*! + * Sewing of the given object. + * \param theObject Shape to be processed. + * \param theTolerance Required tolerance value. + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object Sew (in GEOM_Object theObject, in double theTolerance); + + /*! + * Addition of a point to a given edge object. + * \param theObject Shape to be processed. + * \param theEdgeIndex Index of edge to be divided within theObject's shape, + * if -1, then theObject itself is the edge. + * \param theValue Value of parameter on edge or length parameter, + * depending on \a isByParameter. + * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], + * if FALSE : \a theValue is treated as a length parameter [0..1] + * \return New GEOM_Object, containing processed shape. + */ + GEOM_Object DivideEdge (in GEOM_Object theObject, in short theEdgeIndex, + in double theValue, in boolean isByParameter); + + /*! + * Get a list of wires (wrapped in GEOM_Object-s), + * that constitute a free boundary of the given shape. + * \param theObject Shape to get free boundary of. + * \param theClosedWires Output. Closed wires on the free boundary of the given shape. + * \param theOpenWires Output. Open wires on the free boundary of the given shape. + * \return FALSE, if an error(s) occured during the method execution. + */ + boolean GetFreeBoundary (in GEOM_Object theObject, + out ListOfGO theClosedWires, + out ListOfGO theOpenWires); + }; + + /*! + * GEOM_IInsertOperations: Interface for shape insert operations (like copy, import). + * + */ + interface GEOM_IInsertOperations : GEOM_IOperations + { + /*! + * Create a copy of the given object + */ + GEOM_Object MakeCopy (in GEOM_Object theOriginal); + + /*! + * Export the given shape into a file with given name. + * \param theObject Shape to be stored in the file. + * \param theFileName Name of the file to store the given shape in. + * \param theFormatName Specify format for the shape storage. + * Available formats can be obtained with ImportTranslators() method. + */ + void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName); + + /*! + * Import a shape from the BRep or IGES or STEP file + * (depends on given format) with given name. + * \param theFileName The file, containing the shape. + * \param theFormatName Specify format for the file reading. + * Available formats can be obtained with ImportTranslators() method. + * \return New GEOM_Object, containing the imported shape. + */ + GEOM_Object Import (in string theFileName, in string theFormatName); + + /*! + * Get the supported import formats and corresponding patterns for File dialog. + * \param theFormats Output. List of formats, available for import. + * \param thePatterns Output. List of file patterns, corresponding to available formats. + * \return Returns available formats and patterns through the arguments. + */ + void ImportTranslators (out string_array theFormats, + out string_array thePatterns); + + /*! + * Get the supported export formats and corresponding patterns for File dialog. + * \param theFormats Output. List of formats, available for export. + * \param thePatterns Output. List of file patterns, corresponding to available formats. + * \return Returns available formats and patterns through the arguments. + */ + void ExportTranslators (out string_array theFormats, + out string_array thePatterns); + }; + + /*! + * GEOM_IMeasureOperations: Interface for measurement (distance, whatis) and + * properties calculation (like Centre of Mass, Inertia, etc.). + * + */ + interface GEOM_IMeasureOperations : GEOM_IOperations + { + /*! + * Get summarized length of all wires, + * area of surface and volume of the given shape. + * \param theShape Shape to define properties of. + * \param theLength Output. Summarized length of all wires of the given shape. + * \param theSurfArea Output. Area of surface of the given shape. + * \param theVolume Output. Volume of the given shape. + * \return Returns shape properties through the last three arguments. + */ + void GetBasicProperties (in GEOM_Object theShape, + out double theLength, + out double theSurfArea, + out double theVolume); + + /*! + * Get a point, situated at the centre of mass of theShape. + * \param theShape Shape to define centre of mass of. + * \return New GEOM_Object, containing the created point. + */ + GEOM_Object GetCentreOfMass (in GEOM_Object theShape); + + /*! + * Get inertia matrix and moments of inertia of theShape. + * \param theShape Shape to calculate inertia of. + * \param I(1-3)(1-3) Output. Components of the inertia matrix of the given shape. + * \param Ix,Iy,Iz Output. Moments of inertia of the given shape. + * \return Returns inertia through the last twelve arguments. + */ + void GetInertia (in GEOM_Object theShape, + out double I11, out double I12, out double I13, + out double I21, out double I22, out double I23, + out double I31, out double I32, out double I33, + out double Ix , out double Iy , out double Iz); + + /*! + * Get parameters of bounding box of the given shape + * \param theShape Shape to obtain bounding box of. + * \param Xmin,Xmax Output. Limits of shape along OX axis. + * \param Ymin,Ymax Output. Limits of shape along OY axis. + * \param Zmin,Zmax Output. Limits of shape along OZ axis. + * \return Returns parameters of bounding box through the last six arguments. + */ + void GetBoundingBox (in GEOM_Object theShape, + out double Xmin, out double Xmax, + out double Ymin, out double Ymax, + out double Zmin, out double Zmax); + + /*! + * Get min and max tolerances of sub-shapes of theShape + * \param theShape Shape, to get tolerances of. + * \param FaceMin,FaceMax Output. Min and max tolerances of the faces. + * \param EdgeMin,EdgeMax Output. Min and max tolerances of the edges. + * \param VertMin,VertMax Output. Min and max tolerances of the vertices. + * \return Returns shape tolerances through the last six arguments. + */ + void GetTolerance (in GEOM_Object theShape, + out double FaceMin, out double FaceMax, + out double EdgeMin, out double EdgeMax, + out double VertMin, out double VertMax); + + /*! + * Check a topology of the given shape. + * \param theShape Shape to check validity of. + * \param theDescription Output. Description of problems in the shape, if they are. + * \return TRUE, if the shape "seems to be valid" from the topological point of view. + */ + boolean CheckShape (in GEOM_Object theShape, + out string theDescription); + + /*! + * Obtain description of the given shape + * \param theShape Shape to be described. + * \return Description of the given shape. + */ + string WhatIs (in GEOM_Object theShape); + + /*! + * Get minimal distance between the given shapes. + * \param theShape1,theShape2 Shapes to find minimal distance between. + * \param X1,Y1,Z1 Output. Coordinates of point on theShape1, nearest to theShape2. + * \param X2,Y2,Z2 Output. Coordinates of point on theShape2, nearest to theShape1. + * \return Value of the minimal distance between the given shapes. + */ + double GetMinDistance (in GEOM_Object theShape1, in GEOM_Object theShape2, + out double X1, out double Y1, out double Z1, + out double X2, out double Y2, out double Z2); + + + /*! + * Get point coordinates + */ + void PointCoordinates (in GEOM_Object theShape, out double X, out double Y, out double Z); + }; + + + /*! + * GEOM_IGroupOperations: Interface for groups creation. + */ + interface GEOM_IGroupOperations : GEOM_IOperations + { + /*! + * Creates a new group which will store sub shapes of theMainShape + * \param theMainShape is a GEOM object on which the group is selected + * \param theShapeType defines a shape type of the group + * \return a newly created GEOM group + */ + GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType); + + /*! + * Adds a sub object with ID theSubShapeId to the group + * \param theGroup is a GEOM group to which the new sub shape is added + * \param theSubShapeId is a sub shape ID in the main object. + * \note Use method ILocalOperations.GetSubShapeIndex() to get an ID by the sub shape + */ + void AddObject (in GEOM_Object theGroup, in long theSubShapeId); + + /*! + * Removes a sub object with ID \a theSubShapeId from the group + * \param theGroup is a GEOM group from which the new sub shape is removed + * \param theSubShapeId is a sub shape ID in the main object. + * \note Use method ILocalOperations.GetSubShapeIndex() to get an ID by the sub shape + */ + void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId); + + /*! + * Returns a type of sub objects stored in the group + * \param theGroup is a GEOM group which type is returned. + */ + long GetType (in GEOM_Object theGroup); + + /*! + * Returns a main shape associated with the group + * \param theGroup is a GEOM group for which a main shape object is requested + * \return a GEOM object which is a main shape for theGroup + */ + GEOM_Object GetMainShape (in GEOM_Object theGroup); + + /*! + * Returns a list of sub objects ID stored in the group + * \param theGroup is a GEOM group for which a list of IDs is requested + */ + ListOfLong GetObjects (in GEOM_Object theGroup); + }; + + + /*! + * GEOM_Gen: Interface to access other GEOM interfaces. + * Also contains some methods to access and manage GEOM objects. + */ interface GEOM_Gen : Engines::Component,SALOMEDS::Driver { - typedef sequence ListOfIOR ; - typedef sequence ListOfGeomShapes ; - - //--------------------------------------------------------------// - // Studies Management // - //--------------------------------------------------------------// - void GetCurrentStudy(in long StudyID) ; - - short NbLabels(); - - //--------------------------------------------------------------// - // Shapes Management // - //--------------------------------------------------------------// - GEOM_Shape GetIORFromString (in string ior); - ListOfIOR GetReferencedObjects(in GEOM_Shape shape); - ListOfIOR GetObjects (in GEOM_Shape shape); - - //--------------------------------------------------------------// - // Structures // - //--------------------------------------------------------------// - PointStruct MakePointStruct(in double x, - in double y, - in double z) ; - DirStruct MakeDirection (in PointStruct p) ; - AxisStruct MakeAxisStruct(in double x, - in double y, - in double z, - in double vx, - in double vy, - in double vz) ; - - //------------------------------------------------------------// - // Boolean Operations // - //------------------------------------------------------------// - GEOM_Shape MakeBoolean (in GEOM_Shape shape1, - in GEOM_Shape shape2, - in long operation) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeFuse( in GEOM_Shape shape1, - in GEOM_Shape shape2) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Advanced Operations // - //-----------------------------------------------------------// - GEOM_Shape Partition (in ListOfIOR ListShapes, - in ListOfIOR ListTools, - in ListOfIOR ListKeepInside, - in ListOfIOR ListRemoveInside, - in short Limit) - raises (SALOME::SALOME_Exception) ; - - - GEOM_Shape MakeFilling(in GEOM_Shape shape, - in short mindeg, - in short maxdeg, - in double tol3d, - in double tol2d, - in short nbiter) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeSewing (in ListOfIOR ListShape, - in double precision) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeSewingShape( in GEOM_Shape aShape, - in double precision ) raises (SALOME::SALOME_Exception); - - GEOM_Shape OrientationChange(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakePlacedBox(in double x1, in double y1, in double z1, - in double delta1, in double delta2, in double delta3) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakePanel(in GEOM_Shape shape, - in short directiontype, - in double delta) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeGlueFaces(in GEOM_Shape shape, - in double tol3d) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Transformations Operations // - //-----------------------------------------------------------// - GEOM_Shape MakeCopy(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeTranslation(in GEOM_Shape shape, - in double x, - in double y, - in double z) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeRotation(in GEOM_Shape shape, - in AxisStruct axis, - in double angle) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeScaleTransform(in GEOM_Shape shape, - in PointStruct theCenterofScale, - in double factor) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeMirrorByPlane(in GEOM_Shape shape, - in GEOM_Shape shapePlane) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeRevolution(in GEOM_Shape shape, - in AxisStruct axis, - in double angle) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakePrism(in GEOM_Shape baseShape, - in PointStruct P1, - in PointStruct P2) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakePipe(in GEOM_Shape pathShape, - in GEOM_Shape baseShape) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Patterns Construction // - //-----------------------------------------------------------// - GEOM_Shape MakeMultiTranslation1D(in GEOM_Shape shape, - in DirStruct dir, - in double step, - in short nbtimes) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeMultiTranslation2D(in GEOM_Shape shape, - in DirStruct dir1, - in double step1, - in short nbtimes1, - in DirStruct dir2, - in double step2, - in short nbtimes2) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeMultiRotation1D(in GEOM_Shape shape, - in DirStruct dir, - in PointStruct loc, - in short nbtimes) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeMultiRotation2D(in GEOM_Shape shape, - in DirStruct dir, - in PointStruct loc, - in double ang, - in short nbtimes1, - in double step, - in short nbtimes2) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Mesures Construction // - //-----------------------------------------------------------// - GEOM_Shape MakeCDG(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; - - - //-----------------------------------------------------------// - // Primitives Construction // - //-----------------------------------------------------------// - - GEOM_Shape MakeVertex(in double x, - in double y, - in double z) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeVector (in PointStruct pstruct1, - in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeLine (in PointStruct pstruct, - in DirStruct dstruct) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakePlane (in PointStruct pstruct, - in DirStruct dstruct, - in double trimsize) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeCircle(in PointStruct pstruct, - in DirStruct dstruct, - in double radius) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeArc(in PointStruct pInit, - in PointStruct pCircle, - in PointStruct pEnd) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeEllipse(in PointStruct pstruct, - in DirStruct dstruct, - in double major_radius, - in double minor_radius) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Sketcher // - //-----------------------------------------------------------// - GEOM_Shape MakeSketcher (in string Cmd) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Primitives Construction // - //-----------------------------------------------------------// - GEOM_Shape MakeBox (in double x1, - in double y1, - in double z1, - in double x2, - in double y2, - in double z2) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeCylinder(in PointStruct pstruct, - in DirStruct dstruct, - in double radius, - in double height) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeSphere (in double x1, - in double y1, - in double z1, - in double radius) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeTorus(in PointStruct pstruct, - in DirStruct dstruct, - in double major_radius, - in double minor_radius) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeCone(in PointStruct pstruct, - in DirStruct dstruct, - in double radius1, - in double radius2, - in double height) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Archimede // - //-----------------------------------------------------------// - GEOM_Shape Archimede(in GEOM_Shape shape, - in double Weight, - in double WaterDensity, - in double MeshingDeflection) raises (SALOME::SALOME_Exception); - - - //-----------------------------------------------------------// - // Build // - //-----------------------------------------------------------// - GEOM_Shape MakeEdge (in PointStruct pstruct1, - in PointStruct pstruct2) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeWire (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeCompound (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeFace (in GEOM_Shape shapeWire, - in boolean wantplanarface) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeFaces (in ListOfIOR ListShape, - in boolean wantplanarface) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeShell (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; - GEOM_Shape MakeSolid (in ListOfIOR ListShape) raises (SALOME::SALOME_Exception) ; - - - //-----------------------------------------------------------// - // Subshapes Construction for GUI only // - //-----------------------------------------------------------// - GEOM_Shape SubShape(in GEOM_Shape shape, - in short ShapeType, - in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Subshapes Construction for TUI or GUI // - //-----------------------------------------------------------// - ListOfGeomShapes SubShapeAll(in GEOM_Shape shape, - in short ShapeType) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Subshapes Construction - // Use it to have the same order of subshapes if their - // order may change as a result of reconstruction using - // boolean operations, fillet etc. - //-----------------------------------------------------------// - GEOM_Shape SubShapeSorted(in GEOM_Shape shape, - in short ShapeType, - in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; - - ListOfGeomShapes SubShapeAllSorted(in GEOM_Shape shape, - in short ShapeType) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Fillet and Chamfer construction // - //-----------------------------------------------------------// - GEOM_Shape MakeFillet(in GEOM_Shape shape, - in double radius, - in short ShapeType, - in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; - - GEOM_Shape MakeChamfer(in GEOM_Shape shape, - in double d1, - in double d2, - in short ShapeType, - in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Suppress faces in a shape // - //-----------------------------------------------------------// - ListOfGeomShapes SuppressFaces(in GEOM_Shape shape, - in GEOM_Shape::ListOfSubShapeID ListOfID) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Suppress a single hole in topology (face) shell or solid // - // : ListOfIdEndFace may be an empty list // - // : used only when hole traverses the topology // - //-----------------------------------------------------------// - GEOM_Shape SuppressHole(in GEOM_Shape shape, - in GEOM_Shape::ListOfSubShapeID ListOfIdFace, - in GEOM_Shape::ListOfSubShapeID ListOfIdWire, - in GEOM_Shape::ListOfSubShapeID ListOfIdEndFace ) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Suppress one or more holes in a face or a shell // - //-----------------------------------------------------------// - GEOM_Shape SuppressHolesInFaceOrShell(in GEOM_Shape shapeFaceShell, - in GEOM_Shape::ListOfSubShapeID ListOfIdWires ) raises (SALOME::SALOME_Exception) ; - - //-----------------------------------------------------------// - // Import/Export // - //-----------------------------------------------------------// - GEOM_Shape ImportIGES(in string filename) raises (SALOME::SALOME_Exception) ; - GEOM_Shape ImportBREP(in string filename) raises (SALOME::SALOME_Exception) ; - GEOM_Shape ImportSTEP(in string filename) raises (SALOME::SALOME_Exception) ; - - void ExportIGES(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; - void ExportBREP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; - void ExportSTEP(in string filename,in GEOM_Shape theShape) raises (SALOME::SALOME_Exception) ; - //-----------------------------------------------------------// - // Check Shape // - //-----------------------------------------------------------// - boolean CheckShape(in GEOM_Shape shape) raises (SALOME::SALOME_Exception) ; + /*! + * Undo/Redo Management + */ + + void Undo (in long theStudyID); + + void Redo (in long theStudyID); + + /*! + * Publishing manangement + * Adds in theStudy a object theObject under with a name theName, + * if theFather is not NULL the object is placed under thFather's SObject. + * Returns a SObject where theObject is placed + */ + SALOMEDS::SObject AddInStudy (in SALOMEDS::Study theStudy, + in GEOM_Object theObject, + in string theName, + in GEOM_Object theFather); + + /*! + * Methods to access interfaces for objects creation and transformation + */ + GEOM_IBasicOperations GetIBasicOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_ITransformOperations GetITransformOperations(in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_I3DPrimOperations GetI3DPrimOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IShapesOperations GetIShapesOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IBooleanOperations GetIBooleanOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_ICurvesOperations GetICurvesOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_ILocalOperations GetILocalOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IHealingOperations GetIHealingOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IInsertOperations GetIInsertOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IMeasureOperations GetIMeasureOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IBlocksOperations GetIBlocksOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + GEOM_IGroupOperations GetIGroupOperations (in long theStudyID) raises (SALOME::SALOME_Exception); + + /*! + * Objects Management + */ + + /*! + * Removes the object from the GEOM component + * \param theObject is a GEOM object to be removed + */ + void RemoveObject (in GEOM_Object theObject); + + /*! + * Returns an object defined by the study and its entry in the GEOM component + * \param theStudyID is a SALOMEDS Study ID + * \param theEntry is an entry of the requested GEOM object in the GEOM component + * \note if the object has not previously been created a NULL GEOM object is returned + */ + GEOM_Object GetObject (in long theStudyID, in string theEntry); + + /*! + * Add a sub shape defined by indices in \a theIndices + * (contains unique IDs of sub shapes inside theMainShape) + * \note The sub shape GEOM_Objects can has ONLY ONE function. + * Don't try to apply modification operations on them. + * \note Internal method + */ + GEOM_Object AddSubShape (in GEOM_Object theMainShape, in ListOfLong theIndices); + + /*! + * GEOM object's IOR Management + */ + + /*! + * Returns a GEOM Object defined by its IOR + * \param theIOR a string containg an IOR of the requested GEOM object + */ + GEOM_Object GetIORFromString (in string theIOR); + /*! + * Returns a string which contains an IOR of the GEOM object + * \param theObject is a GEOM object which IOR is requested + */ + string GetStringFromIOR (in GEOM_Object theObject); }; }; diff --git a/idl/GEOM_Shape.idl b/idl/GEOM_Shape.idl deleted file mode 100644 index a75c3486c..000000000 --- a/idl/GEOM_Shape.idl +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOM_Shape.idl -// Author : Lucien PIGNOLONI - -#ifndef __GEOM_Shape__ -#define __GEOM_Shape__ - -module GEOM -{ - //-----------------------------------------------------------------// - // Topological types for shapes (like Open Cascade types) // - //-----------------------------------------------------------------// - - enum shape_type { COMPOUND, COMPSOLID, SOLID, SHELL, - FACE, WIRE, EDGE, VERTEX, SHAPE } ; - - //----------------------------------------------------------------// - // Structures // - //--------------------------------------------------- ------------// - struct PointStruct { double x; - double y; - double z; } ; - struct DirStruct { PointStruct PS ; } ; // analog to Occ Direction - - struct AxisStruct { double x; - double y; - double z; - double vx; - double vy; - double vz; } ; - - //----------------------------------------------------------------// - // interface GEOM_Shape methods // - //----------------------------------------------------------------// - - interface GEOM_Gen; - - interface GEOM_Shape - { - typedef sequence ListOfSubShapeID ; - typedef sequence TMPFile; - - attribute string Name; // (to set and get) the name of shape (= CORBA IOR converted into a string) - attribute string MainName; // (to set and get) the name of mainshape (= CORBA IOR converted into a string) - - attribute boolean IsMainShape; // (...) true if this is a main shape (not a sub shape) - attribute string ShapeId; // (...) the entry of the shape in geom/OCAF document - attribute string StudyShapeId; // (...) the entry of the shape in the study/OCAF when added - attribute ListOfSubShapeID Index; // (...) list of references (number) identifing the sub shapes in the main shape - attribute shape_type ShapeType; // (...) a topological type of the shape - - attribute string NameType; // (...) a topological/geometrical name of the shape - - //Transfer resulting shape to client as sequence of bytes - //client can extract shape from stream using BrepTools::Read function - TMPFile GetShapeStream(); - - // the generator engine - GEOM_Gen Engine(); - - // Get the TopoDS_Shape, for colocated case only - long getShape(); - }; -}; -#endif diff --git a/idl/GEOM_Superv.idl b/idl/GEOM_Superv.idl new file mode 100644 index 000000000..d50c74abe --- /dev/null +++ b/idl/GEOM_Superv.idl @@ -0,0 +1,375 @@ +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Superv.idl +// Author : Lucien PIGNOLONI + +#ifndef __GEOM_SUPERV__ +#define __GEOM_SUPERV__ + +#include "GEOM_Gen.idl" + +module GEOM +{ + interface GEOM_Superv : Engines::Component,SALOMEDS::Driver + { + //-----------------------------------------------------------// + // Set current study ID // + //-----------------------------------------------------------// + void SetStudyID (in long theStudyID) ; + + //-----------------------------------------------------------// + // Primitives Construction : BasicOperations // + //-----------------------------------------------------------// + GEOM_Object MakePointXYZ (in double theX, + in double theY, + in double theZ) ; + GEOM_Object MakePointWithReference (in GEOM_Object theReference, + in double theX, + in double theY, + in double theZ) ; + GEOM_Object MakePointOnCurve (in GEOM_Object theRefCurve, + in double theParameter) ; + GEOM_Object MakeVectorDXDYDZ (in double theDX, + in double theDY, + in double theDZ) ; + GEOM_Object MakeVectorTwoPnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2) ; + GEOM_Object MakeLineTwoPnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2) ; + GEOM_Object MakePlaneThreePnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3, + in double theTrimSize) ; + GEOM_Object MakePlanePntVec (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theTrimSize) ; + GEOM_Object MakePlaneFace (in GEOM_Object theFace, + in double theTrimSize) ; + GEOM_Object MakeMarker (in double theOX , in double theOY , in double theOZ, + in double theXDX, in double theXDY, in double theXDZ, + in double theYDX, in double theYDY, in double theYDZ) ; + + //-----------------------------------------------------------// + // Primitives Construction : 3DPrimOperations // + //-----------------------------------------------------------// + GEOM_Object MakeBox (in double theX1, + in double theY1, + in double theZ1, + in double theX2, + in double theY2, + in double theZ2) ; + GEOM_Object MakeBoxDXDYDZ (in double theDX, + in double theDY, + in double theDZ) ; + GEOM_Object MakeBoxTwoPnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2) ; + GEOM_Object MakeCylinderPntVecRH (in GEOM_Object thePnt, + in GEOM_Object theAxis, + in double theRadius, + in double theHeight) ; + GEOM_Object MakeCylinderRH (in double theR, + in double theH) ; + GEOM_Object MakeSphere (in double theX, + in double theY, + in double theZ, + in double theRadius) ; + GEOM_Object MakeSphereR (in double theR) ; + GEOM_Object MakeSpherePntR (in GEOM_Object thePnt, + in double theR) ; + GEOM_Object MakeTorusPntVecRR (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theRMajor, + in double theRMinor) ; + GEOM_Object MakeTorusRR (in double theRMajor, + in double theRMinor) ; + GEOM_Object MakeConePntVecR1R2H (in GEOM_Object thePnt, + in GEOM_Object theAxis, + in double theR1, + in double theR2, + in double theHeight) ; + GEOM_Object MakeConeR1R2H (in double theR1, + in double theR2, + in double theHeight) ; + GEOM_Object MakePrismVecH (in GEOM_Object theBase, + in GEOM_Object theVec, + in double theH) ; + GEOM_Object MakePrismTwoPnt (in GEOM_Object theBase, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2) ; + GEOM_Object MakePipe (in GEOM_Object theBase, + in GEOM_Object thePath) ; + GEOM_Object MakeRevolutionAxisAngle (in GEOM_Object theBase, + in GEOM_Object theAxis, + in double theAngle) ; + GEOM_Object MakeFilling (in GEOM_Object theShape, + in long theMinDeg, in long theMaxDeg, + in double theTol2D, in double theTol3D, + in long theNbIter) ; + + //-----------------------------------------------------------// + // BooleanOperations // + //-----------------------------------------------------------// + GEOM_Object MakeBoolean (in GEOM_Object theShape1, + in GEOM_Object theShape2, + in long theOperation) ; + GEOM_Object MakeFuse (in GEOM_Object theShape1, + in GEOM_Object theShape2) ; + GEOM_Object MakePartition (in ListOfGO theShapes, + in ListOfGO theTools, + in ListOfGO theKeepInside, + in ListOfGO theRemoveInside, + in short theLimit, + in boolean theRemoveWebs, + in ListOfLong theMaterials) ; + GEOM_Object MakeHalfPartition (in GEOM_Object theShape, + in GEOM_Object thePlane) ; + + //-----------------------------------------------------------// + // InsertOperations // + //-----------------------------------------------------------// + GEOM_Object MakeCopy (in GEOM_Object theOriginal) ; + void Export (in GEOM_Object theObject, in string theFileName, in string theFormatName) ; + GEOM_Object Import (in string theFileName, in string theFormatName) ; + void ImportTranslators (out string_array theFormats, + out string_array thePatterns) ; + void ExportTranslators (out string_array theFormats, + out string_array thePatterns) ; + + //-----------------------------------------------------------// + // TransformOperations // + //-----------------------------------------------------------// + GEOM_Object TranslateTwoPoints (in GEOM_Object theObject, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2) ; + GEOM_Object TranslateTwoPointsCopy (in GEOM_Object theObject, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2) ; + GEOM_Object TranslateDXDYDZ (in GEOM_Object theObject, + in double theDX, + in double theDY, + in double theDZ) ; + GEOM_Object TranslateDXDYDZCopy (in GEOM_Object theObject, + in double theDX, + in double theDY, + in double theDZ) ; + GEOM_Object TranslateVector (in GEOM_Object theObject, + in GEOM_Object theVector) ; + GEOM_Object TranslateVectorCopy (in GEOM_Object theObject, + in GEOM_Object theVector) ; + GEOM_Object MultiTranslate1D (in GEOM_Object theObject, + in GEOM_Object theVector, + in double theStep, + in long theNbTimes) ; + GEOM_Object MultiTranslate2D (in GEOM_Object theObject, + in GEOM_Object theVector1, + in double theStep1, + in long theNbTimes1, + in GEOM_Object theVector2, + in double theStep2, + in long theNbTimes2) ; + GEOM_Object Rotate (in GEOM_Object theObject, + in GEOM_Object theAxis, + in double theAngle) ; + GEOM_Object RotateCopy (in GEOM_Object theObject, + in GEOM_Object theAxis, + in double theAngle) ; + GEOM_Object MultiRotate1D (in GEOM_Object theObject, + in GEOM_Object theAxis, + in long theNbTimes) ; + GEOM_Object MultiRotate2D (in GEOM_Object theObject, + in GEOM_Object theAxis, + in double theAngle, + in long theNbTimes1, + in double theStep, + in long theNbTimes2) ; + GEOM_Object MirrorPlane (in GEOM_Object theObject, in GEOM_Object thePlane) ; + GEOM_Object MirrorPlaneCopy (in GEOM_Object theObject, in GEOM_Object thePlane) ; + GEOM_Object MirrorAxis (in GEOM_Object theObject, in GEOM_Object theAxis) ; + GEOM_Object MirrorAxisCopy (in GEOM_Object theObject, in GEOM_Object theAxis) ; + GEOM_Object MirrorPoint (in GEOM_Object theObject, in GEOM_Object thePoint) ; + GEOM_Object MirrorPointCopy (in GEOM_Object theObject, in GEOM_Object thePoint) ; + GEOM_Object OffsetShape (in GEOM_Object theObject, in double theOffset) ; + GEOM_Object OffsetShapeCopy (in GEOM_Object theObject, in double theOffset) ; + GEOM_Object ScaleShape (in GEOM_Object theObject, in GEOM_Object thePoint, + in double theFactor) ; + GEOM_Object ScaleShapeCopy (in GEOM_Object theObject, in GEOM_Object thePoint, + in double theFactor) ; + GEOM_Object PositionShape (in GEOM_Object theObject, + in GEOM_Object theStartLCS, + in GEOM_Object theEndLCS) ; + GEOM_Object PositionShapeCopy (in GEOM_Object theObject, + in GEOM_Object theStartLCS, + in GEOM_Object theEndLCS) ; + + //-----------------------------------------------------------// + // ShapesOperations // + //-----------------------------------------------------------// + GEOM_Object MakeEdge (in GEOM_Object thePnt1, in GEOM_Object thePnt2) ; + GEOM_Object MakeWire (in ListOfGO theEdgesAndWires) ; + GEOM_Object MakeFace (in GEOM_Object theWire, in boolean isPlanarWanted) ; + GEOM_Object MakeFaceWires (in ListOfGO theWires, in boolean isPlanarWanted) ; + GEOM_Object MakeShell (in ListOfGO theFacesAndShells) ; + GEOM_Object MakeSolidShell (in GEOM_Object theShell) ; + GEOM_Object MakeSolidShells (in ListOfGO theShells) ; + GEOM_Object MakeCompound (in ListOfGO theShapes) ; + GEOM_Object MakeGlueFaces (in GEOM_Object theShape, in double theTolerance) ; + ListOfGO MakeExplode (in GEOM_Object theShape, + in long theShapeType, + in boolean isSorted) ; + long NumberOfFaces (in GEOM_Object theShape) ; + long NumberOfEdges (in GEOM_Object theShape) ; + GEOM_Object ChangeOrientation (in GEOM_Object theShape) ; + + //-----------------------------------------------------------// + // BlocksOperations // + //-----------------------------------------------------------// + GEOM_Object MakeQuad4Vertices (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3, + in GEOM_Object thePnt4) ; + GEOM_Object MakeQuad (in GEOM_Object theEdge1, + in GEOM_Object theEdge2, + in GEOM_Object theEdge3, + in GEOM_Object theEdge4) ; + GEOM_Object MakeQuad2Edges (in GEOM_Object theEdge1, + in GEOM_Object theEdge2) ; + GEOM_Object MakeHexa (in GEOM_Object theFace1, + in GEOM_Object theFace2, + in GEOM_Object theFace3, + in GEOM_Object theFace4, + in GEOM_Object theFace5, + in GEOM_Object theFace6) ; + GEOM_Object MakeHexa2Faces (in GEOM_Object theFace1, + in GEOM_Object theFace2) ; + GEOM_Object GetPoint (in GEOM_Object theShape, + in double theX, + in double theY, + in double theZ, + in double theEpsilon) ; + GEOM_Object GetEdge (in GEOM_Object theShape, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2) ; + GEOM_Object GetEdgeNearPoint (in GEOM_Object theShape, + in GEOM_Object thePoint) ; + GEOM_Object GetFaceByPoints (in GEOM_Object theShape, + in GEOM_Object thePoint1, + in GEOM_Object thePoint2, + in GEOM_Object thePoint3, + in GEOM_Object thePoint4) ; + GEOM_Object GetFaceByEdges (in GEOM_Object theShape, + in GEOM_Object theEdge1, + in GEOM_Object theEdge2) ; + GEOM_Object GetOppositeFace (in GEOM_Object theBlock, + in GEOM_Object theFace) ; + GEOM_Object GetFaceNearPoint (in GEOM_Object theShape, + in GEOM_Object thePoint) ; + GEOM_Object GetFaceByNormale (in GEOM_Object theBlock, + in GEOM_Object theVector) ; + boolean IsCompoundOfBlocks (in GEOM_Object theCompound, + in long theMinNbFaces, + in long theMaxNbFaces, + out long theNbBlocks) ; + boolean CheckCompoundOfBlocks (in GEOM_Object theCompound, + out GEOM_IBlocksOperations::BCErrors theErrors) ; + string PrintBCErrors (in GEOM_Object theCompound, + in GEOM_IBlocksOperations::BCErrors theErrors) ; + ListOfGO ExplodeCompoundOfBlocks (in GEOM_Object theCompound, + in long theMinNbFaces, + in long theMaxNbFaces) ; + GEOM_Object GetBlockNearPoint (in GEOM_Object theCompound, + in GEOM_Object thePoint) ; + GEOM_Object GetBlockByParts (in GEOM_Object theCompound, + in ListOfGO theParts) ; + ListOfGO GetBlocksByParts (in GEOM_Object theCompound, + in ListOfGO theParts) ; + GEOM_Object MakeMultiTransformation1D (in GEOM_Object theBlock, + in long theDirFace1, + in long theDirFace2, + in long theNbTimes) ; + GEOM_Object MakeMultiTransformation2D (in GEOM_Object theBlock, + in long theDirFace1U, + in long theDirFace2U, + in long theNbTimesU, + in long theDirFace1V, + in long theDirFace2V, + in long theNbTimesV) ; + + //-----------------------------------------------------------// + // CurvesOperations // + //-----------------------------------------------------------// + GEOM_Object MakeCirclePntVecR (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theR) ; + GEOM_Object MakeCircleThreePnt (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3) ; + GEOM_Object MakeEllipse (in GEOM_Object thePnt, + in GEOM_Object theVec, + in double theRMajor, + in double theRMinor) ; + GEOM_Object MakeArc (in GEOM_Object thePnt1, + in GEOM_Object thePnt2, + in GEOM_Object thePnt3) ; + GEOM_Object MakePolyline (in ListOfGO thePoints) ; + GEOM_Object MakeSplineBezier (in ListOfGO thePoints) ; + GEOM_Object MakeSplineInterpolation (in ListOfGO thePoints) ; + GEOM_Object MakeSketcher (in string theCommand, in ListOfDouble theWorkingPlane) ; + + //-----------------------------------------------------------// + // LocalOperations // + //-----------------------------------------------------------// + GEOM_Object MakeFilletAll (in GEOM_Object theShape, + in double theR) ; + GEOM_Object MakeFilletEdges (in GEOM_Object theShape, + in double theR, + in ListOfLong theEdges) ; + GEOM_Object MakeFilletFaces (in GEOM_Object theShape, + in double theR, + in ListOfLong theFaces) ; + GEOM_Object MakeChamferAll (in GEOM_Object theShape, + in double theD) ; + GEOM_Object MakeChamferEdge (in GEOM_Object theShape, + in double theD1, in double theD2, + in long theFace1, in long theFace2) ; + GEOM_Object MakeChamferFaces (in GEOM_Object theShape, + in double theD1, in double theD2, + in ListOfLong theFaces) ; + GEOM_Object MakeArchimede (in GEOM_Object theShape, + in double theWeight, + in double theWaterDensity, + in double theMeshDeflection) ; + long GetSubShapeIndex (in GEOM_Object theShape, in GEOM_Object theSubShape) ; + + //-----------------------------------------------------------// + // GroupOperations // + //-----------------------------------------------------------// + GEOM_Object CreateGroup (in GEOM_Object theMainShape, in long theShapeType) ; + void AddObject (in GEOM_Object theGroup, in long theSubShapeId) ; + void RemoveObject (in GEOM_Object theGroup, in long theSubShapeId) ; + long GetType (in GEOM_Object theGroup) ; + GEOM_Object GetMainShape(in GEOM_Object theGroup) ; + ListOfLong GetObjects(in GEOM_Object theGroup) ; + + }; +}; + +#endif diff --git a/idl/Makefile.in b/idl/Makefile.in index d7d1cae79..72f11d7c6 100644 --- a/idl/Makefile.in +++ b/idl/Makefile.in @@ -11,8 +11,8 @@ VPATH=.:${KERNEL_ROOT_DIR}/idl/salome @COMMENCE@ IDL_FILES = \ - GEOM_Shape.idl \ - GEOM_Gen.idl + GEOM_Gen.idl \ + GEOM_Superv.idl PY_CLIENT_IDL = $(IDL_FILES) diff --git a/resources/GEOMCatalog.xml b/resources/GEOMCatalog.xml index 9c7aecccf..136e16d19 100644 --- a/resources/GEOMCatalog.xml +++ b/resources/GEOMCatalog.xml @@ -1,5 +1,5 @@ - + @@ -10,334 +10,4138 @@ - - - GEOM - Geometry - Geom - NRI - 1.0 - Geom component - Open CASCADE - 1 - ModuleGeom.png + + + GEOM + Geometry + Geom + NRI + 2.0.0 + Geom component - Open CASCADE + 1 + ModuleGeom.png - - - - GEOM - No comment + + + + GEOM + No comment - - - - InitGeomEngine - - - - 1 - - - long - StudyID - - - - - - Engines::GEOM_Gen - geomEngine - - - - + + + + + Undo + + + + 1 + + + + theStudyID + long + + + + + + + + + Redo + + + + 1 + + + + theStudyID + long + + + + + + + + + AddInStudy + + + + 1 + + + + theStudy + Study + + + + theObject + GEOM_Object + + + + theName + string + + + + theFather + GEOM_Object + + + + + + return + SObject + + + + + + + + GetIBasicOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IBasicOperations + + + + + + + + GetITransformOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_ITransformOperations + + + + + + + + GetI3DPrimOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_I3DPrimOperations + + + + + + + + GetIShapesOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IShapesOperations + + + + + + + + GetIBooleanOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IBooleanOperations + + + + + + + + GetICurvesOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_ICurvesOperations + + + + + + + + GetILocalOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_ILocalOperations + + + + + + + + GetIHealingOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IHealingOperations + + + + + + + + GetIInsertOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IInsertOperations + + + + + + + + GetIMeasureOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IMeasureOperations + + + + + + + + GetIBlocksOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IBlocksOperations + + + + + + + + GetIGroupOperations + + + + 1 + + + + theStudyID + long + + + + + + return + GEOM_IGroupOperations + + + + + + + + RemoveObject + + + + 1 + + + + theObject + GEOM_Object + + + + + + + + + GetObject + + + + 1 + + + + theStudyID + long + + + + theEntry + string + + + + + + return + GEOM_Object + + + + + + + + AddSubShape + + + + 1 + + + + theMainShape + GEOM_Object + + + + theIndices + ListOfLong + + + + + + return + GEOM_Object + + + + + + + + GetIORFromString + + + + 1 + + + + ior + string + + + + + + return + GEOM_Object + + + + + + + + GetStringFromIOR + + + + 1 + + + + theObject + GEOM_Object + + + + + + return + string + + + + + + + + hostname = localhost + + + + GEOM_Superv + GEOM_Superv + OTHER + asv + 2.1.0 + unknown + 1 + + + + GEOM_Superv + unknown + + + SetStudyID + asv + 2.1.0 + unknown + 0 + + + theStudyID + long + unknown + + + + + + + MakePointXYZ + asv + 2.1.0 + unknown + 0 + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePointWithReference + asv + 2.1.0 + unknown + 0 + + + theReference + GEOM_Object + unknown + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePointOnCurve + asv + 2.1.0 + unknown + 0 + + + theRefCurve + GEOM_Object + unknown + + + theParameter + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeVectorDXDYDZ + asv + 2.1.0 + unknown + 0 + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeVectorTwoPnt + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeLineTwoPnt + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePlaneThreePnt + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + thePnt3 + GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePlanePntVec + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theVec + GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePlaneFace + asv + 2.1.0 + unknown + 0 + + + theFace + GEOM_Object + unknown + + + theTrimSize + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeMarker + asv + 2.1.0 + unknown + 0 + + + theOX + double + unknown + + + theOY + double + unknown + + + theOZ + double + unknown + + + theXDX + double + unknown + + + theXDY + double + unknown + + + theXDZ + double + unknown + + + theYDX + double + unknown + + + theYDY + double + unknown + + + theYDZ + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeBox + asv + 2.1.0 + unknown + 0 + + + theX1 + double + unknown + + + theY1 + double + unknown + + + theZ1 + double + unknown + + + theX2 + double + unknown + + + theY2 + double + unknown + + + theZ2 + double + unknown + + + + + return + GEOM_Object + unknown + + + + - MakeAxisStruct - - - - 1 + MakeBoxDXDYDZ + asv + 2.1.0 + unknown + 0 + theDX double - x - + unknown + theDY double - y - + unknown + theDZ double - z - + unknown + + + + return + GEOM_Object + unknown + + + + + + MakeBoxTwoPnt + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeCylinderPntVecRH + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theRadius + double + unknown + + + theHeight + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeCylinderRH + asv + 2.1.0 + unknown + 0 + + + theR + double + unknown + + + theH + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSphere + asv + 2.1.0 + unknown + 0 + + theX double - vx - + unknown + theY double - vy - + unknown + theZ double - vz - + unknown + + + theRadius + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSphereR + asv + 2.1.0 + unknown + 0 + + + theR + double + unknown - AxisStruct - axis - + return + GEOM_Object + unknown - - - - MakePointStruct - - - - 1 - - - double - x - - - - double - y - - - - double - z - - - - - - PointStruct - point - - - - - - - MakeBox - NRI - 1.0 - test XML - 1 - - - - double - x1 - X coordinate - - - double - y1 - Y coordinate - - - double - z1 - Z coordinate - - - double - x2 - X coordinate - - - double - y2 - Y coordinate - - - double - z2 - Z coordinate - - - - - GEOM_Shape - shape - boite - - - - - - MakeSphere - NRI - 1.0 - test XML - 1 - - - - double - x1 - X coordinate - - - double - y1 - Y coordinate - - - double - z1 - Z coordinate - - - double - radius - Sphere Radius - - - - - GEOM_Shape - shape - sphere - - - - - - MakeTranslation - NRI - 1.0 - test XML - 1 - - - - GEOM_Shape - shape1 - Shape - - - double - x1 - .. - - - double - y1 - .. - - - double - z1 - .. - - - - - GEOM_Shape - shape - Result - - - - - - MakeCopy - NRI - 1.0 - test XML - 1 - - - - GEOM_Shape - shape1 - Shape - - - - - GEOM_Shape - shape - Result - - - - - - MakeBoolean - NRI - 1.0 - test XML - 1 - - - - GEOM_Shape - shape1 - Shape - - - GEOM_Shape - shape2 - Tools - - - long - operation - Operation Type - - - - - GEOM_Shape - shape - Result - - - - - - MakeFuse - NRI - 1.0 - test XML - 1 - - - - GEOM_Shape - shape1 - Shape - - - GEOM_Shape - shape2 - Tools - - - - - GEOM_Shape - shape - Result - - - - - - hostname = localhost - + + + + + MakeSpherePntR + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeTorusPntVecRR + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theVec + GEOM_Object + unknown + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeTorusRR + asv + 2.1.0 + unknown + 0 + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeConePntVecR1R2H + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theR1 + double + unknown + + + theR2 + double + unknown + + + theHeight + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeConeR1R2H + asv + 2.1.0 + unknown + 0 + + + theR1 + double + unknown + + + theR2 + double + unknown + + + theHeight + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePrismVecH + asv + 2.1.0 + unknown + 0 + + + theBase + GEOM_Object + unknown + + + theVec + GEOM_Object + unknown + + + theH + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePrismTwoPnt + asv + 2.1.0 + unknown + 0 + + + theBase + GEOM_Object + unknown + + + thePoint1 + GEOM_Object + unknown + + + thePoint2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePipe + asv + 2.1.0 + unknown + 0 + + + theBase + GEOM_Object + unknown + + + thePath + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeRevolutionAxisAngle + asv + 2.1.0 + unknown + 0 + + + theBase + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFilling + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theMinDeg + long + unknown + + + theMaxDeg + long + unknown + + + theTol2D + double + unknown + + + theTol3D + double + unknown + + + theNbIter + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeBoolean + asv + 2.1.0 + unknown + 0 + + + theShape1 + GEOM_Object + unknown + + + theShape2 + GEOM_Object + unknown + + + theOperation + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFuse + asv + 2.1.0 + unknown + 0 + + + theShape1 + GEOM_Object + unknown + + + theShape2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePartition + asv + 2.1.0 + unknown + 0 + + + theShapes + ListOfGO + unknown + + + theTools + ListOfGO + unknown + + + theKeepInside + ListOfGO + unknown + + + theRemoveInside + ListOfGO + unknown + + + theLimit + short + unknown + + + theRemoveWebs + boolean + unknown + + + theMaterials + ListOfLong + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeHalfPartition + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + thePlane + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeCopy + asv + 2.1.0 + unknown + 0 + + + theOriginal + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + Export + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theFileName + string + unknown + + + theFormatName + string + unknown + + + + + + + Import + asv + 2.1.0 + unknown + 0 + + + theFileName + string + unknown + + + theFormatName + string + unknown + + + + + return + GEOM_Object + unknown + + + + + + ImportTranslators + asv + 2.1.0 + unknown + 0 + + + + theFormats + string_array + unknown + + + thePatterns + string_array + unknown + + + + + + ExportTranslators + asv + 2.1.0 + unknown + 0 + + + + theFormats + string_array + unknown + + + thePatterns + string_array + unknown + + + + + + TranslateTwoPoints + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePoint1 + GEOM_Object + unknown + + + thePoint2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + TranslateTwoPointsCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePoint1 + GEOM_Object + unknown + + + thePoint2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + TranslateDXDYDZ + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + TranslateDXDYDZCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theDX + double + unknown + + + theDY + double + unknown + + + theDZ + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + TranslateVector + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theVector + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + TranslateVectorCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theVector + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MultiTranslate1D + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theVector + GEOM_Object + unknown + + + theStep + double + unknown + + + theNbTimes + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MultiTranslate2D + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theVector1 + GEOM_Object + unknown + + + theStep1 + double + unknown + + + theNbTimes1 + long + unknown + + + theVector2 + GEOM_Object + unknown + + + theStep2 + double + unknown + + + theNbTimes2 + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + Rotate + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + RotateCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theAngle + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MultiRotate1D + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theNbTimes + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MultiRotate2D + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + theAngle + double + unknown + + + theNbTimes1 + long + unknown + + + theStep + double + unknown + + + theNbTimes2 + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MirrorPlane + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePlane + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MirrorPlaneCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePlane + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MirrorAxis + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MirrorAxisCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theAxis + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MirrorPoint + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MirrorPointCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + OffsetShape + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theOffset + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + OffsetShapeCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theOffset + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + ScaleShape + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + theFactor + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + ScaleShapeCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + theFactor + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + PositionShape + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theStartLCS + GEOM_Object + unknown + + + theEndLCS + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + PositionShapeCopy + asv + 2.1.0 + unknown + 0 + + + theObject + GEOM_Object + unknown + + + theStartLCS + GEOM_Object + unknown + + + theEndLCS + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeEdge + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeWire + asv + 2.1.0 + unknown + 0 + + + theEdgesAndWires + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFace + asv + 2.1.0 + unknown + 0 + + + theWire + GEOM_Object + unknown + + + isPlanarWanted + boolean + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFaceWires + asv + 2.1.0 + unknown + 0 + + + theWires + ListOfGO + unknown + + + isPlanarWanted + boolean + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeShell + asv + 2.1.0 + unknown + 0 + + + theFacesAndShells + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSolidShell + asv + 2.1.0 + unknown + 0 + + + theShell + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSolidShells + asv + 2.1.0 + unknown + 0 + + + theShells + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeCompound + asv + 2.1.0 + unknown + 0 + + + theShapes + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeGlueFaces + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theTolerance + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeExplode + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theShapeType + long + unknown + + + isSorted + boolean + unknown + + + + + return + ListOfGO + unknown + + + + + + NumberOfFaces + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + + + return + long + unknown + + + + + + NumberOfEdges + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + + + return + long + unknown + + + + + + ChangeOrientation + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeQuad4Vertices + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + thePnt3 + GEOM_Object + unknown + + + thePnt4 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeQuad + asv + 2.1.0 + unknown + 0 + + + theEdge1 + GEOM_Object + unknown + + + theEdge2 + GEOM_Object + unknown + + + theEdge3 + GEOM_Object + unknown + + + theEdge4 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeQuad2Edges + asv + 2.1.0 + unknown + 0 + + + theEdge1 + GEOM_Object + unknown + + + theEdge2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeHexa + asv + 2.1.0 + unknown + 0 + + + theFace1 + GEOM_Object + unknown + + + theFace2 + GEOM_Object + unknown + + + theFace3 + GEOM_Object + unknown + + + theFace4 + GEOM_Object + unknown + + + theFace5 + GEOM_Object + unknown + + + theFace6 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeHexa2Faces + asv + 2.1.0 + unknown + 0 + + + theFace1 + GEOM_Object + unknown + + + theFace2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetPoint + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theX + double + unknown + + + theY + double + unknown + + + theZ + double + unknown + + + theEpsilon + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetEdge + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + thePoint1 + GEOM_Object + unknown + + + thePoint2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetEdgeNearPoint + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetFaceByPoints + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + thePoint1 + GEOM_Object + unknown + + + thePoint2 + GEOM_Object + unknown + + + thePoint3 + GEOM_Object + unknown + + + thePoint4 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetFaceByEdges + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theEdge1 + GEOM_Object + unknown + + + theEdge2 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetOppositeFace + asv + 2.1.0 + unknown + 0 + + + theBlock + GEOM_Object + unknown + + + theFace + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetFaceNearPoint + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetFaceByNormale + asv + 2.1.0 + unknown + 0 + + + theBlock + GEOM_Object + unknown + + + theVector + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + IsCompoundOfBlocks + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + theMinNbFaces + long + unknown + + + theMaxNbFaces + long + unknown + + + + + theNbBlocks + long + unknown + + + return + boolean + unknown + + + + + + CheckCompoundOfBlocks + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + + + theErrors + BCErrors + unknown + + + return + boolean + unknown + + + + + + PrintBCErrors + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + theErrors + BCErrors + unknown + + + + + return + string + unknown + + + + + + ExplodeCompoundOfBlocks + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + theMinNbFaces + long + unknown + + + theMaxNbFaces + long + unknown + + + + + return + ListOfGO + unknown + + + + + + GetBlockNearPoint + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + thePoint + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetBlockByParts + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + theParts + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetBlocksByParts + asv + 2.1.0 + unknown + 0 + + + theCompound + GEOM_Object + unknown + + + theParts + ListOfGO + unknown + + + + + return + ListOfGO + unknown + + + + + + MakeMultiTransformation1D + asv + 2.1.0 + unknown + 0 + + + theBlock + GEOM_Object + unknown + + + theDirFace1 + long + unknown + + + theDirFace2 + long + unknown + + + theNbTimes + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeMultiTransformation2D + asv + 2.1.0 + unknown + 0 + + + theBlock + GEOM_Object + unknown + + + theDirFace1U + long + unknown + + + theDirFace2U + long + unknown + + + theNbTimesU + long + unknown + + + theDirFace1V + long + unknown + + + theDirFace2V + long + unknown + + + theNbTimesV + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeCirclePntVecR + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theVec + GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeCircleThreePnt + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + thePnt3 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeEllipse + asv + 2.1.0 + unknown + 0 + + + thePnt + GEOM_Object + unknown + + + theVec + GEOM_Object + unknown + + + theRMajor + double + unknown + + + theRMinor + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeArc + asv + 2.1.0 + unknown + 0 + + + thePnt1 + GEOM_Object + unknown + + + thePnt2 + GEOM_Object + unknown + + + thePnt3 + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakePolyline + asv + 2.1.0 + unknown + 0 + + + thePoints + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSplineBezier + asv + 2.1.0 + unknown + 0 + + + thePoints + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSplineInterpolation + asv + 2.1.0 + unknown + 0 + + + thePoints + ListOfGO + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeSketcher + asv + 2.1.0 + unknown + 0 + + + theCommand + string + unknown + + + theWorkingPlane + ListOfDouble + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFilletAll + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theR + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFilletEdges + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theR + double + unknown + + + theEdges + ListOfLong + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeFilletFaces + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theR + double + unknown + + + theFaces + ListOfLong + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeChamferAll + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theD + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeChamferEdge + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theD1 + double + unknown + + + theD2 + double + unknown + + + theFace1 + long + unknown + + + theFace2 + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeChamferFaces + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theD1 + double + unknown + + + theD2 + double + unknown + + + theFaces + ListOfLong + unknown + + + + + return + GEOM_Object + unknown + + + + + + MakeArchimede + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theWeight + double + unknown + + + theWaterDensity + double + unknown + + + theMeshDeflection + double + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetSubShapeIndex + asv + 2.1.0 + unknown + 0 + + + theShape + GEOM_Object + unknown + + + theSubShape + GEOM_Object + unknown + + + + + return + long + unknown + + + + + + CreateGroup + asv + 2.1.0 + unknown + 0 + + + theMainShape + GEOM_Object + unknown + + + theShapeType + long + unknown + + + + + return + GEOM_Object + unknown + + + + + + AddObject + asv + 2.1.0 + unknown + 0 + + + theGroup + GEOM_Object + unknown + + + theSubShapeId + long + unknown + + + + + + + RemoveObject + asv + 2.1.0 + unknown + 0 + + + theGroup + GEOM_Object + unknown + + + theSubShapeId + long + unknown + + + + + + + GetType + asv + 2.1.0 + unknown + 0 + + + theGroup + GEOM_Object + unknown + + + + + return + long + unknown + + + + + + GetMainShape + asv + 2.1.0 + unknown + 0 + + + theGroup + GEOM_Object + unknown + + + + + return + GEOM_Object + unknown + + + + + + GetObjects + asv + 2.1.0 + unknown + 0 + + + theGroup + GEOM_Object + unknown + + + + + return + ListOfLong + unknown + + + + + + + diff --git a/resources/GEOM_en.xml b/resources/GEOM_en.xml index aba68d130..b2e238212 100644 --- a/resources/GEOM_en.xml +++ b/resources/GEOM_en.xml @@ -17,18 +17,8 @@ - - - - - - - - - - - - + + @@ -48,10 +38,12 @@ - + + + @@ -70,6 +62,22 @@ + + + + + + + + + + + + + + + + @@ -82,8 +90,8 @@ - + @@ -95,13 +103,15 @@ - + - - + + + + - - + + @@ -109,28 +119,45 @@ + + + + + + + + + + + - - + - + + + + + + + + - - + + - - + + @@ -150,8 +177,8 @@ - - + @@ -162,15 +189,18 @@ + - - - - - + + + + + + + @@ -184,9 +214,11 @@ + + @@ -195,7 +227,7 @@ - + @@ -212,34 +244,66 @@ - + - - + + + + - - + + - - - - - - - + + + + + + + + + + + + + - + + + + + + + + - - + + + + + + + + + + + + + + + + + + + diff --git a/resources/GEOM_fr.xml b/resources/GEOM_fr.xml index b5c4eb07e..b353c215f 100644 --- a/resources/GEOM_fr.xml +++ b/resources/GEOM_fr.xml @@ -17,15 +17,15 @@ - - - + + + - - - + + + @@ -69,15 +69,16 @@ + - + - - - - - - + + + + + + @@ -93,13 +94,15 @@ - + - - + + + + - - + + @@ -209,13 +212,15 @@ - + - - + + + + - - + + diff --git a/resources/ImportExport b/resources/ImportExport new file mode 100644 index 000000000..574e0e2e3 --- /dev/null +++ b/resources/ImportExport @@ -0,0 +1,14 @@ +Import: BREP|IGES|STEP +Export: BREP|IGES|STEP + +BREP.Import: libBREPImport.so +BREP.Export: libBREPExport.so +BREP.Pattern: BREP Files ( *.brep ) + +IGES.Import: libIGESImport.so +IGES.Export: libIGESExport.so +IGES.Pattern: IGES Files ( *.iges *.igs ) + +STEP.Import: libSTEPImport.so +STEP.Export: libSTEPExport.so +STEP.Pattern: STEP Files ( *.step *.stp ) diff --git a/resources/ShHealing b/resources/ShHealing new file mode 100644 index 000000000..46edb31b3 --- /dev/null +++ b/resources/ShHealing @@ -0,0 +1,251 @@ + +!-------------------------------------------------------------------- +! Parameters for Shape Healing +!-------------------------------------------------------------------- + +ShapeProcess.exec.op : FixShape,FixFaceSize,DropSmallEdges,SameParameter + +ShapeProcess.SplitAngle.Angle : 3.1415928 +ShapeProcess.SplitAngle.MaxTolerance : 0.1 +ShapeProcess.SplitAngle.SegmentSurfaceMode : 1 + +ShapeProcess.SplitClosedFaces.NbSplitPoints : 1 +ShapeProcess.SplitClosedFaces.CloseTolerance : 0.05 +ShapeProcess.SplitClosedFaces.MaxTolerance : 0.1 +ShapeProcess.SplitClosedFaces.SegmentSurfaceMode : 1 + +ShapeProcess.FixFaceSize.Tolerance : 0.05 + +ShapeProcess.DropSmallEdges.Tolerance3d : 0.05 + +ShapeProcess.BSplineRestriction.SurfaceMode : 1 +ShapeProcess.BSplineRestriction.Curve3dMode : 1 +ShapeProcess.BSplineRestriction.Curve2dMode : 1 +ShapeProcess.BSplineRestriction.OffsetSurfaceMode : 1 +ShapeProcess.BSplineRestriction.OffsetCurve3dMode : 1 +ShapeProcess.BSplineRestriction.OffsetCurve2dMode : 1 +ShapeProcess.BSplineRestriction.LinearExtrusionMode : 1 +ShapeProcess.BSplineRestriction.RevolutionMode : 1 +ShapeProcess.BSplineRestriction.Tolerance3d : 1e-3 +ShapeProcess.BSplineRestriction.Tolerance2d : 1e-5 +ShapeProcess.BSplineRestriction.Continuity3d : C1 +ShapeProcess.BSplineRestriction.Continuity2d : C1 +ShapeProcess.BSplineRestriction.RequiredDegree : 15 +ShapeProcess.BSplineRestriction.RequiredNbSegments : 100 +ShapeProcess.BSplineRestriction.PreferDegree : 1 +ShapeProcess.BSplineRestriction.RationalToPolynomial : 1 +ShapeProcess.BSplineRestriction.MaxDegree : 15 +ShapeProcess.BSplineRestriction.MaxNbSegments : 10000 +ShapeProcess.BSplineRestriction.SegmentSurfaceMode : 1 +ShapeProcess.BSplineRestriction.ConvCurve3dMode : 0 +ShapeProcess.BSplineRestriction.ConvCurve2dMode : 0 +ShapeProcess.BSplineRestriction.PlaneMode : 0 +ShapeProcess.BSplineRestriction.BezierMode : 0 + +ShapeProcess.SplitContinuity.Tolerance3d :1.e-3 +ShapeProcess.SplitContinuity.SurfaceContinuity :C0 +ShapeProcess.SplitContinuity.CurveContinuity :C1 + +ShapeProcess.ToBezier.EdgeMode : 0 +ShapeProcess.ToBezier.SurfaceMode : 1 +ShapeProcess.ToBezier.PlaneMode : 1 +ShapeProcess.ToBezier.RevolutionMode : 1 +ShapeProcess.ToBezier.ExtrusionMode : 1 +ShapeProcess.ToBezier.BSplineMode : 1 +ShapeProcess.ToBezier.Curve3dMode : 1 +ShapeProcess.ToBezier.Curve2dMode : 1 +ShapeProcess.ToBezier.Line3dMode : 1 +ShapeProcess.ToBezier.Circle3dMode : 1 +ShapeProcess.ToBezier.Conic3dMode : 1 +ShapeProcess.ToBezier.MaxTolerance : 0.1 +ShapeProcess.ToBezier.SegmentSurfaceMode : 1 +ShapeProcess.ToBezier.MinCurveLength : 0.05 + +ShapeProcess.FixShape.Tolerance3d : 1.e-7 +ShapeProcess.FixShape.MaxTolerance3d : 1 +ShapeProcess.FixShape.MinTolerance3d : 1.e-7 +ShapeProcess.FixShape.FixFreeShellMode : -1 +ShapeProcess.FixShape.FixFreeFaceMode : -1 +ShapeProcess.FixShape.FixFreeWireMode : -1 +ShapeProcess.FixShape.FixSameParameterMode : -1 +ShapeProcess.FixShape.FixSolidMode : -1 +ShapeProcess.FixShape.FixShellMode : -1 +ShapeProcess.FixShape.FixFaceMode : -1 +ShapeProcess.FixShape.FixWireMode : -1 +ShapeProcess.FixShape.FixOrientationMode : -1 +ShapeProcess.FixShape.FixMissingSeamMode : -1 +ShapeProcess.FixShape.FixSmallAreaWireMode : -1 +ShapeProcess.FixShape.ModifyTopologyMode : 0 +ShapeProcess.FixShape.ModifyGeometryMode : 1 +ShapeProcess.FixShape.ClosedWireMode : 1 +ShapeProcess.FixShape.PreferencePCurveMode : 1 +ShapeProcess.FixShape.FixReorderMode : -1 +ShapeProcess.FixShape.FixSmallMode : -1 +ShapeProcess.FixShape.FixConnectedMode : -1 +ShapeProcess.FixShape.FixEdgeCurvesMode : -1 +ShapeProcess.FixShape.FixDegeneratedMode : -1 +ShapeProcess.FixShape.FixLackingMode : -1 +ShapeProcess.FixShape.FixSelfIntersectionMode : -1 +ShapeProcess.FixShape.FixReversed2dMode : -1 +ShapeProcess.FixShape.FixRemovePCurveMode : -1 +ShapeProcess.FixShape.FixRemoveCurve3dMode : -1 +ShapeProcess.FixShape.FixAddPCurveMode : -1 +ShapeProcess.FixShape.FixAddCurve3dMode : -1 +ShapeProcess.FixShape.FixSeamMode : -1 +ShapeProcess.FixShape.FixShiftedMode : -1 +ShapeProcess.FixShape.FixEdgeSameParameterMode : 0 +ShapeProcess.FixShape.FixSelfIntersectingEdgeMode : -1 +ShapeProcess.FixShape.FixIntersectingEdgesMode : -1 +ShapeProcess.FixShape.FixNonAdjacentIntersectingEdgesMode : -1 +ShapeProcess.FixShape.FixIntersectingWiresMode : -1 +ShapeProcess.FixShape.FixLoopWiresMode : -1 +ShapeProcess.FixShape.CreateOpenSolidMode :0 + +ShapeProcess.SameParameter.Force : 0 +ShapeProcess.SameParameter.Tolerance3d : 1.e-7 + +!=========================================================================== +! Description of parameters for Operations +!=========================================================================== +! .MaxTolerance : Maximal tolerance for comparing curves, points which is +! used by splitting tools. The tools that are used this +! parameter are the following: SplitAngle, SplitClosedFaces, +! ToBezier. This value should be the same for all tools in +! one sequence. To redefine default value uncomment +! appropriate line in each operator. +! .SegmentSurfaceMode : Mode for limiting surface by UV boundaries of face that +! is based on this surface. If flag is 1 the surface is +! limited. This mode is used by splitting tools (SplitAngle, +! SplitClosedFaces, ToBezier). This value should be the same +! for all tools in one sequence. To redefine default value +! uncomment appropriate line in each operator. +! BSplineRestriction : Approximation of general B-Spline and Bezier with particular B-Spline +! BSplineRestriction.ConvCurve3dMode : Mode of conversion of any 3D curve to BSpline and approximation, +! BSplineRestriction.ConvCurve2dMode : Mode of conversion of any 2D curve to BSpline and approximation, +! BSplineRestriction.PlaneMode : Mode of conversion of Geom_Plane to BSpline surface, +! BSplineRestriction.BezierMode : Mode of conversion of Besier surface to BSpline and approximation, +! BSplineRestriction.SurfaceMode : Mode of approximation of surfaces if restriction is necessary, yes/no +! BSplineRestriction.Curve3dMode : Mode of approximation of 3D curves if restriction is necessary, yes/no +! BSplineRestriction.Curve2dMode : Mode of approximation of 2D curves if restriction is necessary, yes/no +! BSplineRestriction.OffsetSurfaceMode : Mode of conversion of offset surfaces to BSpline surface, yes/no +! : Yes - surface is converted to BSpline surface +! : No - basis surface is processed but offset surface is kept. +! : This mode acts if BSplineRestriction.SurfaceMode is yes. +! BSplineRestriction.LinearExtrusionMode: Mode of conversion of linear extrusion surfaces to BSpline surface, yes/no +! : Yes - surface is converted to BSpline surface +! : No - basis curve is processed but extrusion surface is kept. +! : This mode acts if BSplineRestriction.SurfaceMode is yes. +! BSplineRestriction.RevolutionMode : Mode of conversion surfaces of revolution to BSpline surface, yes/no +! : Yes - surface is converted to BSpline surface +! : No - basis curve is processed but revolution surface is kept. +! : This mode acts if BSplineRestriction.SurfaceMode is yes. +! BSplineRestriction.OffsetCurve3dMode : Mode of conversion of 3d offset curves to BSpline curves, yes/no +! : Yes - curve is converted to BSpline curve +! : No - basis curve is processed but offset curve is kept. +! : This mode acts if BSplineRestriction.Curve3dMode is yes. +! BSplineRestriction.OffsetCurve2dMode : Mode of conversion of 2d offset curves to BSpline curves, yes/no +! : Yes - curve is converted to BSpline curve +! : No - basis curve is processed but offset curve is kept. +! : This mode acts if BSplineRestriction.Curve2dMode is yes. +! BSplineRestriction.Tolerance3d : Tolerance of 3D approximation +! BSplineRestriction.Tolerance2d : Tolerance of 2D approximation +! BSplineRestriction.Continuity3d : Required continuity of 3D geometry +! BSplineRestriction.Continuity2d : Required continuity of 2D geometry +! BSplineRestriction.RequiredDegree : Required degree of B-Spline +! BSplineRestriction.RequiredNbSegments : Required maximum number of segments of B-Spline +! BSplineRestriction.PreferDegree : Preference between requirement to degree and maximum number of segments, true/false +! BSplineRestriction.RationalToPolynomial: Mode of conversion of rational B-Spline to polynomial, yes/no +! BSplineRestriction.MaxDegree : Maximum allowed degree of B-Spline +! BSplineRestriction.MaxNbSegments : Maximum allowed number of segments in a B-Spline + +! DirectFaces : Conversion of elementary surface in left-handed coordinate system into right-handed +! no parameters + +! ElementaryToRevolution : Conversion of elementary revolutive surface into general surface of revolution +! no parameters + +! SameParameter : Conversion of edge to be SameRange and SameParameter +! SameParameter.Force : Mode of forced invoking, true/false +! SameParameter.Tolerance3d : 3D tolerance + +! SplitAngle : Split revolutive surface (elementary and general) into several surfaces +! SplitAngle.Angle : Maximum angle of revolution, radian + +! SplitClosedFaces : Split faces that have seam-edge or geometrically closed on closed surface. +! SplitClosedFaces.NbSplitPoints : Number of cuttings (number of resulting faces will be NbSplitPoints+1) +! SplitClosedFaces.CloseTolerance : Precision to define geometric closure. + +! SplitContinuity : Correction or split shapes to have speicified continuity +! SplitContinuity.Tolerance3d : 3D tolerance for correction of geometry +! SplitContinuity.SurfaceContinuity : Required continuity for surfaces +! SplitContinuity.CurveContinuity : Required continuity for curves + +! ToBezier : Conversion of geometry into Bezier +! ToBezier.SurfaceMode : Mode of conversion of surfaces, yes/no +! ToBezier.PlaneMode : Mode of conversion of Planes,yes/no. This mode acts if SurfaceMode is yes. +! ToBezier.RevolutionMode : Mode of conversion of Surfaces of Revolution (generatrix to bezier), yes/no. +! This mode acts if SurfaceMode is yes. +! ToBezier.ExtrusionMode : Mode of conversion of Surfaces of Extrusion (whole surface not only generatrix), yes/no. +! This mode acts if SurfaceMode is yes. +! ToBezier.BSplineMode : Mode of conversion of BSpline Surfaces, yes/no. This mode acts if SurfaceMode is yes. +! ToBezier.EdgeMode : Mode of translation edges (0- Free,1 - Shared,2- Both) +! : .Default - Free. Acts on translation curves 3d . +| : If it is 0 (Free) that only free edges are taken into +! : account for translation 3d curves, +! : if it is 1 (Shared) that only shared edges are taken into +! : account for translation 3d curves, +! : if it is 2 (Both) that all edges are taken into +! : account for translation 3d curves, +! ToBezier.Curve3dMode : Mode of conversion 3D curves, yes/no +! ToBezier.Curve2dMode : Mode of conversion 2D curves, yes/no +! ToBezier.Line3dMode : Mode of conversion 3D lines, yes/no +! ToBezier.Circle3dMode : Mode of conversion 3D circles, yes/no +! ToBezier.Conic3dMode : Mode of conversion 3D conics, yes/no +! ToBezier.MinCurveLength : Min length of created curves 3d.( default 0.05) + + +! FixFaceSize : Removing small faces +! FixFaceSize.Tolerance : Tolerance in 3d + +! DropSmallEdges : Eliminate small edges by removing or merging with neighbour +! DropSmallEdges.Tolerance3d : Tolerance (3d) + +! FixShape.Tolerance3d : Tolerance (3d) for fixing of shape. +! FixShape.MaxTolerance3d : Maximal possible value of increasing of tolerance during fixing. +! FixShape.MinTolerance3d : Minimal value of tolerance. +! FixShape.FixFreeShellMode : Mode for fixing free shells in the shape (default - -1, yes - 1 , no - 0). +! FixShape.FixFreeFaceMode : Mode for fixing free faces in the shape (default - -1, yes - 1 , no - 0). +! FixShape.FixFreeWireMode : Mode for fixing free wires in the shape (default - -1, yes - 1 , no - 0). +! FixShape.FixSameParameterMode : Mode for fixing same parameter on the whole shape (default - -1, yes - 1 , no - 0). +! FixShape.FixSolidMode : Mode for fixing solids (default - -1, yes - 1 , no - 0). +! FixShape.FixShellMode : Mode for fixing shells (default - -1, yes - 1 , no - 0). +! FixShape.FixFaceMode : Mode for fixing faces (default - -1, yes - 1 , no - 0). +! FixShape.FixWireMode : Mode for fixing wires (default - -1, yes - 1 , no - 0). +! FixShape.FixOrientationMode : Mode for fixing face orientation (default - -1, yes - 1 , no - 0). +! FixShape.FixMissingSeamMode : Mode for fixing face missing seam (default - -1, yes - 1 , no - 0). +! FixShape.FixSmallAreaWireMode : Mode for fixing small area wires (default - -1, yes - 1 , no - 0). +! FixShape.ModifyTopologyMode : Mode allowing of modifing of topology (default - 0, yes - 1 , no - 0). +! FixShape.ModifyGeometryMode : Mode allowing of modifing of geometry (default - 1, yes - 1 , no - 0). +! FixShape.ClosedWireMode : Mode defining whether the wire is to be closed. (default - 1, yes - 1 , no - 0). +! FixShape.PreferencePCurveMode : Mode defining of preference of 2d representation (default - 1, yes - 1 , no - 0). +! FixShape.FixReorderMode : Mode for fixing of order of the edges in the wire (default - -1, yes - 1 , no - 0). +! FixShape.FixSmallMode : Mode for removing of the small edges from the wire in the case when +! : ModifyTopologyMode equaled "yes" (default - -1, yes - 1 , no - 0). +! FixShape.FixConnectedMode : Mode for fixing of connecting of edges in the wire(default - -1, yes - 1 , no - 0). +! FixShape.FixEdgeCurvesMode : Moge for fixing each edge from the wire (default - -1, yes - 1 , no - 0). +! FixShape.FixDegeneratedMode : Moge for fixing cases of degenerate pcurve (default - -1, yes - 1 , no - 0). +! FixShape.FixLackingMode : Moge for fixing cases of lacking edge (default - -1, yes - 1 , no - 0). +! FixShape.FixSelfIntersectionMode : Mode for fixing of cases self-intersection of wire (default - -1, yes - 1 , no - 0). +! FixShape.FixReversed2dMode : Mode for fixing cases when pcurve is opposite curve3d (default - -1, yes - 1 , no - 0). +! FixShape.FixRemovePCurveMode : Mode for removing of pcurves from edges (default - -1, yes - 1 , no - 0). +! FixShape.FixRemoveCurve3dMode : Mode for removing of 3d curves from edges (default - -1, yes - 1 , no - 0). +! FixShape.FixAddPCurveMode : Mode for adding pcurves of the edges if missing (default - -1, yes - 1 , no - 0). +! FixShape.FixAddCurve3dMode : Mode for adding curves 3d of the edges if missing (default - -1, yes - 1 , no - 0). +! FixShape.FixSeamMode : Mode for fixing cases of seam edges. +! FixShape.FixShiftedMode : Mode for fixing cases when pcurves can be shifted on period on the closed surface +! (default - -1, yes - 1 , no - 0). +! FixShape.FixEdgeSameParameterMode : Mode for fixing same parameter for each edge (default - -1, yes - 1 , no - 0). +! FixShape.FixSelfIntersectingEdgeMode : Mode for fixing cases self-intrsection edge (default - -1, yes - 1 , no - 0). +! FixShape.FixIntersectingEdgesMode : Mode for fixing intersection adjacent edges. +! FixShape.FixNonAdjacentIntersectingEdgesMode : Mode for fixing intersection non-adjacent edges. +! diff --git a/resources/bezier.png b/resources/bezier.png new file mode 100644 index 0000000000000000000000000000000000000000..2629a2b594fabede3e57ca1c5eafa11ce8b3d299 GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmD7ePc z#WAE}&fUp|d@Tk%EPpHR9Z>dLQ?8v)X z$^0-*p+ki$M4yfCG1uyKva2e8>P^siaNvQZXZF=4V$T}av=y?le>*5v!FKw<%-R*c z%Qw6<-pMArqg|{~DAhYjdTwm?`}+aHpc;Q5Y^7SC_^80nj>lqt0lCK^-qsm?TNKzIi;#d5%K# zTr;{IA(kK_dn_wVn&l_K(ky2-jVX(g>Z78r>yE-RY^GWMRZ_hH5cmO}@AZ19(kwRs zoAq)~CBSSN^D@`X`G;l0x58tvI0~D*4eJ3F-0kwsdU+72w{~|54+0Im|9^$uv7!CS zr$mw@=(*lMHU^Alcx2)zL}z*PQ`*t(;nOMe*M*4)w%CXzzyB$1nCrNBzK83$eZ=B* zValRpRjdY~UD)`3ta|H9EWvhc0)j!HEjHo^lZQ#OzWP8BTwFwCSmAbMwc``*s&h$X S6@0n?0000cQgB zyD{S5xesVa7;4XYX!zNoS--34_V4A9e)E)($q`lPe8{`wW( z<^96BxBIkgZoe^h7G&X@99HV;)U;&f(|-@2f7H$RY5g#yzCP!lqQM@`68pVoWr7yw zMss)Rp4vR+@9BT;DM^)**D^UKw@h`N=%$`<)KTJ4%$pl`atk)jRyyVUa`vu;t5&#P8%PDW@IPD5gw=Qd!{ ztT27{_YC-*u>sOY|D&wp8SAVlfivI}xO76q-OZk85rws3@9^Ayx?})ot$`EHp{_J) zr+O8Zz#A}k6nc@^g84SL3Y+n!q;72vyd0u%^R%&4-A8$CD+|CLxB|rO^*d5ZhPKT& zuR&b=Cj?0a!^y zK~#90rIfvH!Y~wtKU0LfbYkk>iEd@;9Pt9>EqH}8hF9=g&;cn7pbWe~w|Zf3*GgU7 z2+18{H$Qbu5J$2S`yL-3-`re*<#Gsav3!R^Z9xHN4-xJe->>vj1)#~6b- znV_@z^PFsxA*CdlC2o7@Kdv>|n5e&|7wZ6kdxr1s;sOSIy002ovPDHLkV1hq~ ByH)@I literal 0 HcmV?d00001 diff --git a/resources/block_face_4v.png b/resources/block_face_4v.png new file mode 100644 index 0000000000000000000000000000000000000000..24f5c65135afe70f0c71cd8c3ea2fdd371f30044 GIT binary patch literal 362 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3quRTG=^*1+;V+D5zYdS z$YKTtZXpn6ymYtj4^WW3#M9T6{R*cvn}xu^Yty2ELf<`I978JR?47)q_mF`=>wLjh zZZ5B|2Gcb<6LJo6d1i)j1UodkI6pBxq!sRB)pcYV^Ue>--Rd_z-+W$PzH>8^@=CFX zzKsj(6l~@OKQLfs$ho_3j^=l38MSMx|GtxyT_{q)_05mjq`>J^@rI%|DJs$1J6>-P zP*(O`s{K;=!JNbM8|uqnNQu`L+DjxvZ@2mS#rf9$xOI)fr*iw(R-`Yn`*JJqUDn>H z!zpTa?NyW*I9L0~9yHaHk5FPNRk70f)O7c(=H!_-X0Nea;eYwC9aG(E_Q3L9?)->7CxJo0;OXk;vd$@? F2>^<5i)#P? literal 0 HcmV?d00001 diff --git a/resources/block_multitrsf_double.png b/resources/block_multitrsf_double.png new file mode 100644 index 0000000000000000000000000000000000000000..a148c710205af61ad6ae0572356d76862d71c93c GIT binary patch literal 604 zcmV-i0;BzjP)4z^5QV=BD(2vd6{NV7Ddo<8Atsecqw8Wwbr@_?8C5~0$xleYs4^(sIpCnms7=ar zRugb(6$iV;fu;~#iu0~drzlR5Eoa`$yqTSO5jFqy^_~Kpf4&VR$0vKyQ}|~)JrOlg zhyR0Zely?M*G5Q}&HQFw|M>MH_|x8ZVu`t{_G#n(Dd8Yp1iMy>brx4SOk!}oSF~}` z6GViA*9Xzg8QRhkOU%)`qhOm{Oo%1MRUKRsV=zGHQ^u!z6juedwB*M*0L4{-^aNKq zj@~xOXV)`ytz^TD^N;7Gq=*R6{*;KCng}447=Y>J6jepniil8L70n3NimEcboHG6} z4)`#`?(DK*#`Mb+Ah7amf#AP$kDoJ07nsCsuZ>m;fQW=PeDc3NtrSj zo~1A53wGnQ($?BU)RT(|%W_HjJS9KQLyJDyeRQfoHdy&t#uA6Pz_5E2ezDt0J+sAfuz^!mST{v?Udl`JbAwHLX6=L?CnA`{ z>{c6FTKcBHakuSr?Bam!(;J`cMa9>mwxuOMec!PDbQ}D>eSayov@D%#RxD{c=n53G zZ?oD}j#ahVQWmc^p|3Tpbk*E)VmN$rxGfGMg29BD4U$Dro26^irf>Rzkt7n-=8p{9 qZ+4z^5QV=BSIoi{d!XXdr;$39X(OD*qzLY;)&y)!et}B;1_y$xfYJsmt`cgUe_%BR zHG!xQ+!hPBh2UJQ?sRvOA{Uu*_wDSP_hu%b;J-$A3NZfmRDC(R?ggjtZ;svs6a+2) z+q3y>ezdN}lQx_AY+n3+ep}rq;Uh{EOWUW8dsV`2vZ&6Tbz~;PSc8rlYQBWc^PZn8i}dcO~ybrAYw=bz4l%C@qCZ4Ax^!T5Pc#94>I?Dt`2 zGT77($|Nm@hu%5sYHbrx+<(7kwO)~Q65>wG#pjEYlhJ-xF-#v)uD)D(GsK(mnq=ui zN@b#`orWU9`0fb<7z=&9JesF6@eW|Q>(fYf4BM??tRbDI|D4+r2OyCgcDamfodK}? z)2DRv(6-6e8L^HlQq4)Z?gizf+p_RLRlL7)Ht002ovPDHLkV1gE%6g&U` literal 0 HcmV?d00001 diff --git a/resources/circle3points.png b/resources/circle3points.png new file mode 100644 index 0000000000000000000000000000000000000000..a14c41b487f84a6e27d3e8f4d965e47cb7fac8c5 GIT binary patch literal 439 zcmV;o0Z9IdP)N?)%ox(N*#_75()=hP z{T$>Gi0DUh6lXjg?G0==7@lOD;ts&4T_FSf6lcb3^2qhD+zf-zX_yTw^VRCrtk(`D z>x6fQvH5noi24+io);fQbA@(8sv}}U>?v?OY=d@*5~gNKI4?!bl^`OJN7up54HTDN hX}WEfr)J7g_ziQYt3F)TDwO~L002ovPDHLkV1l#Zv*`c; literal 0 HcmV?d00001 diff --git a/resources/closecontour.png b/resources/closecontour.png new file mode 100644 index 0000000000000000000000000000000000000000..9ab62f9a0367d8917269f124cfca463203e8e6c4 GIT binary patch literal 368 zcmV-$0gwKPP)@C#0cnT3gAAIP`Qs?hFlA5Mz!JSZ& z(&U@@r!$Etr?*_Pk%B7RktYcP)@%#u(~;%xXEyuTe2?_uE|c6e*=DBr|OD za|i|nnC!cpFLb?KDa*2#2p=-VGm-HEZKucckv@4KLPs))DR2Hg?J6ZN*jYq=b0h<{ zct+^L(m*;Y%La#5#(U@~C@>WCa4;mTwF_*TD;uU0P5nW?m>mQf z9leQm3fU`cJQ+t$4smP5NnG@1$YK?fN)*kfbN}^Kc;$gP7~$i}vh5BK1$i=3-ua3E O0000767=>t9fKjng7bZq!ff3^djoL0$9!1keNd4xND#m}{BZEXXQj(l|iH?~o+qC!Qni?YPy@htExWrc!<1^HPqt7<^R zW@H+8vVq1wxu_p@+pJ7?vN9>7DYfclN@ZW>@6T0JtZyTYrDZyWIK~bbu4>bp%p~%F zs{_s$kyH3$D}?#QQZwnmI)sT^jUmuX_?1f_Q!qol(^{331OSXY?e zt4{ERh<~^@sj?r}%C$p@{%{-%*Uy{-z6w^f&`fh5(<-40Wx#pQeXxR?TD4?QkoQJu zMs-eQ#9MG3YifR|?DuaEf`9cOh8*0t{JGq>II!K;gs5>Pp6}~}EeSCf1MuTH$j`#W z^V}?O%w!hti(I$gxW#>@L$yNl^RB~3D`}4S!%d+c-1(lxO^vA82D}n{azUm5_9Kp2 zac3jxsTds36tCR;z<|8{;QF1{iWttFujko|Ts_i-Y7yf%N%%1|bk6T>;F(<^xq)8+ z{O@L9bi5VqJM2+hf%8|wuilx+X4J*Id%ryz(%kHqm!=n-6@e6s}US;@DWA88US`Wwo literal 0 HcmV?d00001 diff --git a/resources/displayonly.png b/resources/displayonly.png new file mode 100644 index 0000000000000000000000000000000000000000..6028075510b221a8b27f8aba539d25aa09535518 GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmD7ezo z#WAE}&f3d{e1{cySTEF<@N2lgXxKBUm&YScX=7nq-0|22FB_Ol)-Yt zxcYW>#7pr)W)2y`@qr>mdKI;Vst00IeNLjV8( literal 0 HcmV?d00001 diff --git a/resources/free_bound.png b/resources/free_bound.png new file mode 100755 index 0000000000000000000000000000000000000000..15b634ac8f061d724d3c991f4008e989db0181cf GIT binary patch literal 432 zcmV;h0Z;ykP)k9QO}j)!AqsEPP)lD z2(+O#WY+I_jT?a`beZQ4gd`{llGT|rHlxJ^CUlwSK}d%kK;o6;)(cFv7WRPK&!Z$_ z6~8m$hLSsy+d)3~2pak0VPR9 zK~#90t&%;8gHRNOzb6(~urOd@b`Z0KfmD(eWEa^&QaZDQsb&igcQZ{OwT19f1Y$AZ z6j4XQ)2NeEKJNSO&pC>Um&&!istIi>)G$y{rJvtVImi7P0G;VdTtP%gwuy4)!kRi$ z7%tZfWm!Ha$}CgDK3c&$dZixZh!_ z4)yBsDyDI{1-9K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wBz#(7`SRcMR@@;nJ=?@*&J0j7@N3C^ONA;=^HBO9P>0by#?fKTzi$tQ4b1`E3 zfCH0vhaS}_bpU#2dyfI{fRNVu@Ys#h&+BXQ2f$n+a literal 0 HcmV?d00001 diff --git a/resources/interpol.png b/resources/interpol.png new file mode 100644 index 0000000000000000000000000000000000000000..0fe35f2f4bc535d7f18551e628403e67de5371bb GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmD7eAX z#WAE}&fCemc^eFPTx@I7PKaHwoEvOPH%Bm~u_RWco$C|z`kPA4ZV$gCb%cfk&ZE8q~P6b1r+6tlg zU6cPSO@FmPyL{dWIhE2??I-5GR`FQMGI6)Yw&_|dRpE#9j=#Ob^(~k6dyZ%$w{_0W zbe$9l_PMXVMVBsE^;zA4J5>?FU#dEt`4qiL3D;pxYTdUHx3vIVCg!09~_S AuK)l5 literal 0 HcmV?d00001 diff --git a/resources/marker.png b/resources/marker.png new file mode 100644 index 0000000000000000000000000000000000000000..e9da6369f549375646a7ff532ea84fafa2d2860b GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmD0tq} z#WAE}&eq9>e9Z7Av1$p(B&ODcpq7pec2wst>v z_f&n$?bqMKudgrh^_aTDs{F54<+;|y<&SbsN~j13m7MgumtpDC_~(VDkK_6vQMm*z z)0_TIzGZG59f!UL+i9BAFQ2yIs9m`8HXCs#my;8RJ0QWa^w gkygI+sdWWo-0Id-Uph7?1HH!J>FVdQ&MBb@0Hefn@&Et; literal 0 HcmV?d00001 diff --git a/resources/marker2.png b/resources/marker2.png new file mode 100644 index 0000000000000000000000000000000000000000..4755c7916b82c81cc878872af6fd69b06ec75ca4 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmDEQpd z#WAE}&eqGme9a01tOg zvrB*2@9eL;doyuz@q(0sZ#nJ0kA#A=9(O$#JEq_uut1r8&!!YZx2%`VyFVyf=R8VN zzg#P1zFX*u0dLM(9lehhhy4%i>H8p1q2iHsK|i6``l~~mznnlX5KA>#c zVw}2Jf@M!4uZr08hz6I3ikEA>0v)d{y_%Zz$FsPt(zn9sK_K6`MRK0JDYbkN`TsM0 z6LXK*=57nSzTp+_lkTc(8~;-u6{1-oD!M< D){}Zt literal 0 HcmV?d00001 diff --git a/resources/marker3.png b/resources/marker3.png new file mode 100644 index 0000000000000000000000000000000000000000..835ea28bb5bf5c2ffae95bf16ae51c6c33938b8c GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmD0tb^ z#WAE}&eqF@T!#&KSOaA3(oY0zvTAnhc9dh9$7SiXZn56hEcH!umc9I-$oDMKlcRw# z?`-{nzwf_aH^{5ueZr)7?(mMns7Xso*IPwL@VO>+Em3CQ6KqtKVs7o$|4Tb`gP`!0 z4f7p%t(k)qPJR!z<1BhzYCC~($MocQ-kjQXK8;KIe=g-Y@FLJ@qTPnprK+4Aa;rbx zeWRi^<9ATvM6D%0-&<4tKcxjM_*EoWs%mQR{dvPyv%|BB-ktq2W66|vX)_Yms8?lO j)!86*WM6r>*FI(aJM)Xa{ZLi|`I*7f)z4*}Q$iB}q&0Hj literal 0 HcmV?d00001 diff --git a/resources/mirrorAxe.png b/resources/mirrorAxe.png new file mode 100644 index 0000000000000000000000000000000000000000..6b6901647ecefcb0bb80e2425efdc0c373798da8 GIT binary patch literal 436 zcmV;l0ZaagP)Dh$;7Z8GBZRIBJxK46mBk}?2q9JqS(O~28_|^)$Rdy| z0v)07T(r^tNk*-u9|Hs5oB6?G-ZuuNU8b`Fis>qOotJ>ShnE8{9)~2;M8y+CglG`$ zz@5M@l|_l)^9cwJY8S@<^CD+iFR?3o8lX#O1S%#ThdWk04w>9foIvNJq_dRa=o{L= zLAn<@Xg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*kSThwJ?AmX}WeK8M+Sk00000NkvXXu0mjfIQq_n literal 0 HcmV?d00001 diff --git a/resources/plane3points.png b/resources/plane3points.png new file mode 100644 index 0000000000000000000000000000000000000000..d5b5d45dcf4786a1796e81554bee774700dfb1ad GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3qv!*G=@v_+}PTIBAf*t zk;M!Q+(IDCcFSXD{3HH5rH;|Cs;O z)%(#0HgUa&vOL=#^5ooe^iT4!Xq%o;SWpn?^U5K>rQ@2>4{r|7O#9lu%?Ay$)E*bf zEinFS%=Lr!39HoiUwmw}pZ+i4sg20z@0UHjIrZ{4!8dC+^!_|n@_&i|kCkX!(#M?@ zO$#F?drF_){PZzHo6!|@J8=btWF27!#?Yf{%=b6P>O`u1)qMZWy4-4>M!)Kvd+dJc z!K<=ci*1Xy8(42Y-<`YGHT3W5DH5Sa&*{F@GQE_*(CND)M&ColCGg8!jjumSrb@lo dd1K*D=Fgj5Z3{CG&jNas!PC{xWt~$(6981vfA9bR literal 0 HcmV?d00001 diff --git a/resources/planeworkingorigin.png b/resources/planeworkingorigin.png new file mode 100644 index 0000000000000000000000000000000000000000..14370a348695e1cba85af334d1c8077c38990162 GIT binary patch literal 270 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmD0slr z#WAE}&eqGj`C1eNSTFqi{`Sm~BJHF^r_G(coMk@*e><0R8+GYC_@Sl8*Do`HMM>c9 ztP29$nmzw>3f%HFbNJP3(8;$Z;kn<66Q37^Y;Rb)i*4V%_#=!LgMt_G)v}gxo=Mcy z2d*H+U%dR{KCsNiv@k6_so-R#fIXV*Rv*KUDWPvi}_XRPDK9=2hdsMaU;2XFtm$O$Z5^VYRBmZ_i3tZ{3jslmR- zeG8A7cs_V;_Uf%$PxZ0X9&5iDl4tBBCT^Z_Mkq>5eZykb?|<&KZ`hpaq$~MMe1FsB zvJO_$1Y06oCq>FVdQ&MBb@ E0DJ&tmjD0& literal 0 HcmV?d00001 diff --git a/resources/point3.png b/resources/point3.png new file mode 100644 index 0000000000000000000000000000000000000000..53d5bab2c13db08e1960932f42f2c546dc5a4e84 GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VTavfC3&Vd9T(EcfWS|IVfk$L9 z0|U1Z2s2)~TlWVj$X?><>&kwGO^nTg_tLAaeL$f*o-U3d6?2kPew=p*J>U}i*lkIp zPK$_%|9+PKZMS@E-440^JKi^YdF-$IHg7N0OGwA^h#z~Mnj-%8?%wbFr=H4gdUrT0 z;qw>o{}=aue|((3P2RrFK;op08z);ygE7xV)4A13-WN(OVow}k__z+Jo=th?aUKxx zvYGyHMq^`R;_GK?|9^jXulr%p8n$a`uM8i3y0%w;7f+PXcF%G}W@hHY8?6^fv zGQ08YWqrZ9Vi6soJIcSu?O1qj-MJnS=^u}e^Dnyc&_v+w?C0}N2&F10@0+u!{QJHC z_H};}EWW!;bL@O>6f>u}y}7Zu6^NUe5C3kqzxm*+kx|6%I^CGmf&_!78_yg(~Z-aRFhkGu_@)$rk<#c5=3M5(~*%iD9-5nrFCGWd0YA3$e!fe+yq@V z@`ej@)APn0#%Il$oYm9}qd42_`{nl}-Q1bOwAKI|54V)>jVwU87uGDJIBQuZSG%3d zhT(4)24DiCOkiq&>z0v2avjL)p`e=ceZ;K9qT-R)eu z|9y4M4hCJ)ynP3F222k}VHK?hRaMQ~x-G|B$ro9SqP5;%A~yj}0g|J{9)H@p*Z0eh zMIrP0u(3nn1F&NP(>TqioeR>ueGZ(8$c68XeiTLVd{!O+wg%MGywX}{OYAU#!S_al z`=Oua?Z-~(J@8p;tyZ{H(JhI#2FKGIHg23h0HhV zJ}rK{g~>sGt<8Cuf&N?32}$5o^)>@?~+wAbQm>gvCtG0yAX z6zxrKxyyEAqe<%PTwSha5uoREI1b0f8SVeEY=d3mrpY&Y+CD6vw3T_n(zmOo%C2(k yl>0iZ?NZ<+pGixzx_`Cw-9Nj+L}M!JL*c@0)9OP`Y@P)4EQ6=3pUXO@geCyHGkE3z literal 0 HcmV?d00001 diff --git a/resources/position2.png b/resources/position2.png new file mode 100644 index 0000000000000000000000000000000000000000..12f4a0a8b65f9ae6e39e3afe22bd90d94db2d714 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc1|)ksWqE-VXMsm#F#`kNVGw3Kp1&dmDEP$F z#WAE}&f3eqT+IdotPgfpA5|_BOoBj8&4;*Uwh#HLbs@CnwR;uUP5K zvS@!=J%`_PN2NRO{O4cJ;Mv_W?ZC3!4S$)gHV z)x7Sm->aug4j;x1<>&kwGL!4cS>(|@Nqd=kWo-U3d6?2|W*_d_Mfv2rrl>dKY zyK%*bckZ0E4U=}B4-$2XQ`vk{xbl2LK^xz_D+l*JxM3^L$tj{GP_FP%@$TPA2R;N; zSL(duJfI^rQCjY>!fS`dm0EW9N~bD+tuQ-&Y=)ppeP(3BwPoFtq&O;TuRs1%ddz@l z^Rc`P;{!|B%6`kP+T;`{cA9IgY;36h_nqr+-k*Nfp5>T2>w)Kv%7Sx`tSc6?+ET`{ z*4I;@^nyae4!+OPH%Bm~u_RWco$C|z`kPA4ZV$gCb%cfk&ZE8q~P6b1r+6tlg zU6cPSO@FmPyL{dWIhE2??I-5GR`FQMGI6)Yw&_|dRpE#9j=#Ob^(~k6dyZ%$w{_0W zbe$9l_PMXVMVBsE^;zA4J5>?FU#dEt`4qiL3D;pxYTdUHx3vIVCg!09~_S AuK)l5 literal 0 HcmV?d00001 diff --git a/resources/subblock.png b/resources/subblock.png new file mode 100755 index 0000000000000000000000000000000000000000..6c75aa4bf06b4fa25aec8b30f2d5ee34331fc1ac GIT binary patch literal 461 zcmV;;0W$uHP)c#16ox+*9-aUV65zpS$Tf)M0M^!wH8SK383`XDgP|#av?&Dwcxm8kTv*Pcisn$VC=Q<6C8`A{*{_ey>3yKWAtdwLTg ziX%h>i4PgtYio{--7cCj8wHkS@q7LIRRQd^H2}W=a0$Skaul4X00000NkvXXu0mjf D-?_~J literal 0 HcmV?d00001 diff --git a/resources/suppressintwires.png b/resources/suppressintwires.png new file mode 100644 index 0000000000000000000000000000000000000000..9ab62f9a0367d8917269f124cfca463203e8e6c4 GIT binary patch literal 368 zcmV-$0gwKPP)@C#0cnT3gAAIP`Qs?hFlA5Mz!JSZ& z(&U@@r!$Etr?*_Pk%B7RktYcP)@%#u(~;%xXEyuTe2?_uE|c6e*=DBr|OD za|i|nnC!cpFLb?KDa*2#2p=-VGm-HEZKucckv@4KLPs))DR2Hg?J6ZN*jYq=b0h<{ zct+^L(m*;Y%La#5#(U@~C@>WCa4;mTwF_*TD;uU0P5nW?m>mQf z9leQm3fU`cJQ+t$4smP5NnG@1$YK?fN)*kfbN}^Kc;$gP7~$i}vh5BK1$i=3-ua3E O0000H zK~#90rIbr*!!Qtrzj56nK^Ix(6uv~4fgU7x$SQZpEkdD?O-r^tKu(c`!Cn|FNSo=V zifzS@C>;>C5cB;b%|lS`H)(k*0+9X(w%!~r+m&Rxd*5|5s0FouN-?ktbeWN~VeRj| zmh?gV{v=2(aFRxN%2EJ-&G5>Pzz-w>=covWOhF!$v%u4>K+tB@p#EQjv(6em(cZFA zK}4H(ZNITq1Vy%QTP^Z}V}9)TUI9axhlGhUslh&5=FG=|Avf9|7NakQ|DyqJWB*&hX#Rf(${ z&biU3+R)K?=$xZ=HRjv&MiWA<>&kwGMSx4v{M?Bib_NDU8BZ6-kcv5Lr#NOEHV|;VFEO>x zTf8x^s4GUPMD&GYRr|W4_B%=mC_UI`$NE_XrD2g*g(n1lp2_Lg6YO*H zS8ZN&)4Me}9ysVOg616IuZmL#>SVU^E}1*>}h#wGLj+9z*6 z^Yrb3zMUbV&(42#{IDcfZ~AK4?&+*Y7bg7PDf>kuF!_0;orKh1nJ#C?Rhsu=Z7T~~ q?^XBx>#*--*`q2mMgDQbNA9Y$%x5K$hjoBK$KdJe=d#Wzp$Py~l%GKW literal 0 HcmV?d00001 diff --git a/resources/translationVector.png b/resources/translationVector.png new file mode 100644 index 0000000000000000000000000000000000000000..78e6f9012b78ce543e1556cfdbd55460ef3bb485 GIT binary patch literal 285 zcmV+&0pk9NP)RX!yoA2=qbE}bP{@y-l3Cs@D@@iI2AA9DIA1k5X?|WhZd_;(gSQ>-vcD_56XoK@G#$X=rByT$xhQ(Uh}oFEPY2@*TdwPr+w7%_-wx&N=|t?1)$ zC70pAja(8DvSa22kJfTolr8d84mBt=_r|Lz)`u;7=?%4JSq%z;1T@#KJi9}!HAX!` jKXw9!hy$;WaW6dq6Np*<(Pa!w00000NkvXXu0mjfHQRIk literal 0 HcmV?d00001 diff --git a/resources/tree_block.png b/resources/tree_block.png new file mode 100644 index 0000000000000000000000000000000000000000..aa74e796eb2f3c04d186cb2bf110a0434d02b814 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0y_WKS2zkcv6UDL>9Th$SfbOEWWb zhXuOXy!&zfKu4^y^5Or_GN&7~WN-cw@MDGF(Z!sxGKtDpDqpA>8yF;H94gQ<^gHq{ zM2O+7>9w?%2NySG^uCxSAu(a`tPYRk>n6H5ls#Zz*x@H*BB|uo4785H)78&qol`;+ E0Ns5z5C8xG literal 0 HcmV?d00001 diff --git a/resources/tree_group_edge.png b/resources/tree_group_edge.png new file mode 100644 index 0000000000000000000000000000000000000000..214be938a476686730b611a414a7035efaafaabd GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xawj^(N7l!{JxM1({$v_d#0*}aI z1_o{+5N5n|x9$&6kiEpy*OmPWhd3Xz<*{P5{Xn5UPZ!6KiaEWLE($U$a=6HgP1zUZ zvhPLX7gt9``(vL4il6fs@8aO*W-xqHK6_)|>dIrw8+up%{K@a~_|c2o%oBRHbIoav zJAeEYzl+t^T(tz1=&F#<0iS=?z7ut-dT^qqozrvGIiJqL^{@OoWc38)MkJOxx%wnFoMQWAJqKb6Mw<&;$UYPhUm= literal 0 HcmV?d00001 diff --git a/resources/tree_group_solid.png b/resources/tree_group_solid.png new file mode 100644 index 0000000000000000000000000000000000000000..d68588346cd94ec2b0a276972ef21d0587a52e2e GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xawj^(N7l!{JxM1({$v_d#0*}aI z1_o{+5N5n|x9$&6kiEpy*OmPWhd3XH_|L#kyMaOzJzX3_D&}mRbda~zfX6vL;CZ4! z*@Gi|Jja}VwyUW+E`0P!H&kT#wl&untfswJO8-+B*C{T|!DpDsYOkK*&FpyAGVy-c z{Awk!-*dZ|)_eHhxL|#+fN#YahFRUq1e;IpTdVLQ=vM84`qqAKsY5Gw?Aq{eUTE+k zt8?15wMFL3_dnaiu+Va6QT!{hb4MfAtJZ(AR~1j3lbz?719TjNr>mdKI;Vst0E-%5 Ac>n+a literal 0 HcmV?d00001 diff --git a/resources/tree_group_vertex.png b/resources/tree_group_vertex.png new file mode 100644 index 0000000000000000000000000000000000000000..553a4b9d3132d0b767f4ce57e1ec733b59d7c135 GIT binary patch literal 248 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xawj^(N7l!{JxM1({$v_d#0*}aI z1_o{+5N5n|x9$&6kiEpy*OmPWhd3Xj=&`vP_kcpJo-U3d6?5iJy2yFhfX8LN&-0gY zl1lM67v9z8jfJ!5-Owc=2~>JQuAud~Qr{;FO; ztp0JRm1;ulz3CG!couH0ExX?@bK$jH=Bwi4izh956e1FQHsQ-wt?oPQ6D4~WE=fF^ pb-D6t&8v?mB_B`PUH9+=Kg;?shhI9*0zd~bc)I$ztaD0e0sxc!Us(VE literal 0 HcmV?d00001 diff --git a/resources/tree_lcs.png b/resources/tree_lcs.png new file mode 100644 index 0000000000000000000000000000000000000000..853d47e0aca08506df2ed2ab32aae7a4c5155bb8 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xawj^(N7l!{JxM1({$v_d#0*}aI z1_o|H5N51TiJu4*WH0gbb!ET8DZwYeR6J$-d!W!FPZ!6KiaB#9UF1Eiz~eGs@bZU? zdlT4xT|G15&DDON=0|l4Z*9qR(N$D@%_mO^mbP0l+XkKM7d~c literal 0 HcmV?d00001 diff --git a/src/BREPExport/BREPExport.cxx b/src/BREPExport/BREPExport.cxx new file mode 100644 index 000000000..1d09a7c04 --- /dev/null +++ b/src/BREPExport/BREPExport.cxx @@ -0,0 +1,33 @@ +// File: BREPExport.cxx +// Created: Wed May 19 13:10:05 2004 +// Author: Pavel TELKOV +// + +#include "utilities.h" + +#include + +#include +#include + +//============================================================================= +/*! + * + */ +//============================================================================= + +extern "C" +{ +#ifdef WNT + __declspec(__dllexport) +#endif + int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName) + { + MESSAGE("Export BREP into file " << theFileName.ToCString()); + + if ( !BRepTools::Write( theShape, theFileName.ToCString() ) ) + return 0; + + return 1; + } +} diff --git a/src/BREPExport/Makefile.in b/src/BREPExport/Makefile.in new file mode 100644 index 000000000..8983e67c6 --- /dev/null +++ b/src/BREPExport/Makefile.in @@ -0,0 +1,47 @@ +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Pavel TELKOV +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + +@COMMENCE@ + +EXPORT_HEADERS= + +# Libraries targets + +LIB = libBREPExport.la + +LIB_SRC = BREPExport.cxx + +# additionnal information to compil and link file +CPPFLAGS+= $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS+= $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS+= $(CAS_LDPATH) -lTKBRep -L${KERNEL_ROOT_DIR}/lib/salome + +@CONCLUDE@ diff --git a/src/BREPImport/BREPImport.cxx b/src/BREPImport/BREPImport.cxx new file mode 100644 index 000000000..492019032 --- /dev/null +++ b/src/BREPImport/BREPImport.cxx @@ -0,0 +1,37 @@ +// File: BREPImport.cxx +// Created: Wed May 19 14:29:52 2004 +// Author: Pavel TELKOV +// + +#include "utilities.h" + +#include +#include + +#include +#include + +//============================================================================= +/*! + * + */ +//============================================================================= + +extern "C" +{ +#ifdef WNT + __declspec(__dllexport) +#endif + TopoDS_Shape Import (const TCollection_AsciiString& theFileName, + TCollection_AsciiString& theError) + { + MESSAGE("Import BREP from file " << theFileName); + TopoDS_Shape aShape; + BRep_Builder B; + BRepTools::Read(aShape, theFileName.ToCString(), B); + if (aShape.IsNull()) { + theError = "BREP Import failed"; + } + return aShape; + } +} diff --git a/src/BREPImport/Makefile.in b/src/BREPImport/Makefile.in new file mode 100644 index 000000000..cc76e0c58 --- /dev/null +++ b/src/BREPImport/Makefile.in @@ -0,0 +1,45 @@ +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Pavel TELKOV +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + +@COMMENCE@ + +# Libraries targets + +LIB= libBREPImport.la + +LIB_SRC = BREPImport.cxx + +# additionnal information to compil and link file +CPPFLAGS+= $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS+= $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS+= $(CAS_LDPATH) -lTKBRep -L${KERNEL_ROOT_DIR}/lib/salome + +@CONCLUDE@ diff --git a/src/BasicGUI/BasicGUI.cxx b/src/BasicGUI/BasicGUI.cxx index aef6d70b0..9398230f3 100644 --- a/src/BasicGUI/BasicGUI.cxx +++ b/src/BasicGUI/BasicGUI.cxx @@ -24,40 +24,60 @@ // File : BasicGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "BasicGUI.h" +#include "GeometryGUI.h" #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" +#include "OCCViewer_AISSelector.h" #include "OCCViewer_ViewPort3d.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "utilities.h" + #include #include #include #include +#include #include "BasicGUI_PointDlg.h" // Method POINT #include "BasicGUI_LineDlg.h" // Method LINE #include "BasicGUI_CircleDlg.h" // Method CIRCLE #include "BasicGUI_EllipseDlg.h" // Method ELLIPSE #include "BasicGUI_ArcDlg.h" // Method ARC +#include "BasicGUI_CurveDlg.h" // Method CURVE #include "BasicGUI_VectorDlg.h" // Method VECTOR #include "BasicGUI_PlaneDlg.h" // Method PLANE #include "BasicGUI_WorkingPlaneDlg.h" // Method WORKING PLANE +#include "BasicGUI_MarkerDlg.h" // Method REPAIR + +BasicGUI* BasicGUI::myGUIObject = 0; + +//======================================================================= +// function : GetBasicGUI() +// purpose : Get the only BasicGUI object [ static ] +//======================================================================= +BasicGUI* BasicGUI::GetBasicGUI() +{ + if ( myGUIObject == 0 ) { + myGUIObject = new BasicGUI(); + } + return myGUIObject; +} //======================================================================= // function : BasicGUI() // purpose : Constructor //======================================================================= BasicGUI::BasicGUI() : - QObject() + GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -76,63 +96,59 @@ BasicGUI::~BasicGUI() //======================================================================= bool BasicGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - BasicGUI* myBasicGUI = new BasicGUI(); - myBasicGUI->myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + QDialog* aDlg = NULL; - switch (theCommandID) + switch ( theCommandID ) { case 4011: // POINT { Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); + QAD_StudyFrame* aFrame = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame(); + if ( aFrame->getTypeView() == VIEW_OCC) + { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)aFrame->getRightFrame()->getViewFrame())->getViewer(); ic = v3d->getAISContext(); } - BasicGUI_PointDlg *aDlg = new BasicGUI_PointDlg(parent, "", myBasicGUI, Sel, ic); + aDlg = new BasicGUI_PointDlg( parent, "", Sel ); break; } case 4012: // LINE - { - BasicGUI_LineDlg *aDlg = new BasicGUI_LineDlg(parent, "", myBasicGUI, Sel); - break; - } + aDlg = new BasicGUI_LineDlg(parent, "", Sel); + break; case 4013: // CIRCLE - { - BasicGUI_CircleDlg *aDlg = new BasicGUI_CircleDlg(parent, "", myBasicGUI, Sel); - break; - } + aDlg = new BasicGUI_CircleDlg(parent, "", Sel); + break; case 4014: // ELLIPSE - { - BasicGUI_EllipseDlg *aDlg = new BasicGUI_EllipseDlg(parent, "", myBasicGUI, Sel); - break; - } + aDlg = new BasicGUI_EllipseDlg(parent, "", Sel); + break; case 4015: // ARC - { - BasicGUI_ArcDlg *aDlg = new BasicGUI_ArcDlg(parent, "", myBasicGUI, Sel); - break ; - } + aDlg = new BasicGUI_ArcDlg(parent, "", Sel); + break ; case 4016: // VECTOR - { - BasicGUI_VectorDlg *aDlg = new BasicGUI_VectorDlg(parent, "", myBasicGUI, Sel); - break; - } + aDlg = new BasicGUI_VectorDlg(parent, "", Sel); + break; case 4017: // PLANE - { - BasicGUI_PlaneDlg *aDlg = new BasicGUI_PlaneDlg(parent, "", myBasicGUI, Sel); - break; - } + aDlg = new BasicGUI_PlaneDlg(parent, "", Sel); + break; case 4018: // WORKING PLANE - { - BasicGUI_WorkingPlaneDlg *aDlg = new BasicGUI_WorkingPlaneDlg(parent, "", myBasicGUI, Sel); - break; - } + aDlg = new BasicGUI_WorkingPlaneDlg(parent, "", Sel); + break; + case 4019: // CURVE + aDlg = new BasicGUI_CurveDlg( parent, "", Sel ); + break; + case 4020: // REPAIR + aDlg = new BasicGUI_MarkerDlg( parent, Sel ); + break; default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } + parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; } + + if ( aDlg != NULL ) + aDlg->show(); + return true; } @@ -141,44 +157,43 @@ bool BasicGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) // function : 0nMousePress() // purpose : [static] manage mouse events //================================================================================= -bool BasicGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame) +bool BasicGUI::OnMousePress( QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* theFrame ) { - BasicGUI* myBasicGUI = new BasicGUI(); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - OCCViewer_ViewPort* vp = ((OCCViewer_ViewFrame*)studyFrame->getRightFrame()->getViewFrame())->getViewPort(); - - /* Get the clicked or selected point */ - gp_Pnt thePoint; - - myBasicGUI->myGeomBase->EraseSimulationShape(); - BasicGUI_PointDlg *DialogPt = (BasicGUI_PointDlg*)(myBasicGUI->myGeomGUI->GetActiveDialogBox()); - - if(DialogPt->UseLocalContext()) { - ic->InitSelected(); - if(pe->state() == Qt::ShiftButton) - v3d->getAISSelector()->shiftSelect(); /* Append selection */ - else - v3d->getAISSelector()->select(); /* New selection */ + QDialog* aDlg = GeometryGUI::GetGeomGUI()->GetActiveDialogBox(); + + // Create Point dialog, OCC viewer + if ( aDlg && aDlg->isA( "BasicGUI_PointDlg" ) && theFrame->getTypeView() == VIEW_OCC ) + { + BasicGUI_PointDlg* aPntDlg = (BasicGUI_PointDlg*) aDlg; + if ( aPntDlg->acceptMouseEvent() ) + { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)theFrame->getRightFrame()->getViewFrame())->getViewer(); + Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - ic->InitSelected(); - if(ic->MoreSelected()) - thePoint = BRep_Tool::Pnt(TopoDS::Vertex(ic->SelectedShape())); - else - thePoint = myBasicGUI->ConvertClickToPoint(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView()); + gp_Pnt aPnt; + + ic->InitSelected(); + if( pe->state() == Qt::ShiftButton ) + v3d->getAISSelector()->shiftSelect(); // Append selection + else + v3d->getAISSelector()->select(); // New selection + + ic->InitSelected(); + if( ic->MoreSelected() ) + { + TopoDS_Shape aShape = ic->SelectedShape(); + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) + aPnt = BRep_Tool::Pnt( TopoDS::Vertex( ic->SelectedShape() ) ); + } + else + { + OCCViewer_ViewPort* vp = ((OCCViewer_ViewFrame*)theFrame->getRightFrame()->getViewFrame())->getViewPort(); + aPnt = ConvertClickToPoint( pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView() ); + } + + aPntDlg->OnPointSelected( aPnt ); // "feed" the point to point construction dialog + } // acceptMouseEvent() } - else - thePoint = myBasicGUI->ConvertClickToPoint(pe->x(), pe->y(), ((OCCViewer_ViewPort3d*)vp)->getView()); - - if(DialogPt != 0) - DialogPt->PointIntoCoordinates(thePoint, true); /* display point */ - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return false; } @@ -187,7 +202,7 @@ bool BasicGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame // function : ConvertClickToPoint() // purpose : Returns the point clicked in 3D view //======================================================================= -gp_Pnt BasicGUI::ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView) +gp_Pnt BasicGUI::ConvertClickToPoint( int x, int y, Handle(V3d_View) aView) { V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt; aView->Eye(XEye, YEye, ZEye); @@ -201,7 +216,7 @@ gp_Pnt BasicGUI::ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3 gp_Pln PlaneOfTheView = gp_Pln(AtPoint,EyeDir); Standard_Real X, Y, Z; - aView->Convert(int(x), int(y), X, Y, Z); + aView->Convert(x, y, X, Y, Z); gp_Pnt ConvertedPoint(X, Y, Z); gp_Pnt2d ConvertedPointOnPlane = ProjLib::Project(PlaneOfTheView, ConvertedPoint); @@ -209,237 +224,13 @@ gp_Pnt BasicGUI::ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3 return ResultPoint; } - -//======================================================================= -// function : MakePointAndDisplay -// purpose : -//======================================================================= -void BasicGUI::MakePointAndDisplay(const double x, const double y, const double z) -{ - try { - GEOM::GEOM_Shape_var P = myGeom->MakeVertex(x, y, z); - P->NameType(tr("GEOM_VERTEX")); - if (myGeomBase->Display(P)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeLineAndDisplay() -// purpose : Create an infinite oriented line (linear edge in fact) -//===================================================================================== -void BasicGUI::MakeLineAndDisplay(const gp_Pnt InitPoint, const gp_Pnt LastPoint) -{ - gp_Pnt P1, P2; - double dx, dy, dz; - myGeomBase->GetBipointDxDyDz(InitPoint, LastPoint, dx, dy, dz); - Standard_Real length = InitPoint.Distance(LastPoint); - if(length <= Precision::Confusion()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - - Standard_Real coeff = 1E6 / length; - - /* To create a line with length = 1E6 */ - /* Precision::Infinite() is 1E100 in OCC */ - P1.SetX(InitPoint.X() - (coeff * dx)); - P1.SetY(InitPoint.Y() - (coeff * dy)); - P1.SetZ(InitPoint.Z() - (coeff * dz)); - - P2.SetX(LastPoint.X() + (coeff * dx)); - P2.SetY(LastPoint.Y() + (coeff * dy)); - P2.SetZ(LastPoint.Z() + (coeff * dz)); - - try { - GEOM::PointStruct pstruct = myGeom->MakePointStruct(P1.X(), P1.Y(), P1.Z()); - GEOM::PointStruct d = myGeom->MakePointStruct(P2.X(), P2.Y(), P2.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - - GEOM::GEOM_Shape_ptr result = myGeom->MakeLine(pstruct, dstruct); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_LINE")); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_READY")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeCircleAndDisplay() -// purpose : -//===================================================================================== -void BasicGUI::MakeCircleAndDisplay(const gp_Pnt CenterPoint, const gp_Dir dir, const Standard_Real Radius) -{ - try { - GEOM::PointStruct pstruct = myGeom->MakePointStruct(CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z()); - GEOM::PointStruct d = myGeom->MakePointStruct(dir.X(), dir.Y(), dir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - - GEOM::GEOM_Shape_var result = myGeom->MakeCircle(pstruct, dstruct, Radius); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_CIRCLE")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeEllipseAndDisplay() -// purpose : -//===================================================================================== -void BasicGUI::MakeEllipseAndDisplay(const gp_Pnt CenterPoint, const gp_Dir dir, - const Standard_Real Major_Radius, const Standard_Real Minor_Radius) -{ - try { - GEOM::PointStruct pstruct = myGeom->MakePointStruct(CenterPoint.X(), CenterPoint.Y(), CenterPoint.Z()); - GEOM::PointStruct d = myGeom->MakePointStruct(dir.X(), dir.Y(), dir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d) ; - - GEOM::GEOM_Shape_var result = myGeom->MakeEllipse(pstruct, dstruct, Major_Radius, Minor_Radius); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_ELLIPSE")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//======================================================================================= -// function : MakeArcAndDisplay() -// purpose : Make an arc of circle from InitPoint to CirclePoint and passing on EndPoint -//======================================================================================= -void BasicGUI::MakeArcAndDisplay(gp_Pnt InitPoint, gp_Pnt CirclePoint, gp_Pnt EndPoint) -{ - gp_Vec v1(CirclePoint, InitPoint); - gp_Vec v2(CirclePoint, EndPoint); - if(v1.IsParallel(v2, Precision::Angular())) - return; - - try { - GEOM::PointStruct pI = myGeom->MakePointStruct(InitPoint.X(), InitPoint.Y(), InitPoint.Z()); - GEOM::PointStruct pC = myGeom->MakePointStruct(CirclePoint.X(), CirclePoint.Y(), CirclePoint.Z()); - GEOM::PointStruct pE = myGeom->MakePointStruct(EndPoint.X(), EndPoint.Y(), EndPoint.Z()); - GEOM::GEOM_Shape_var result = myGeom->MakeArc(pI, pC, pE); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_ARC")); - if (myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//======================================================================= -// function : MakeVectorAndDisplay() -// purpose : -//======================================================================= -void BasicGUI::MakeVectorAndDisplay(const gp_Pnt P1, const gp_Pnt P2) -{ - try { - GEOM::PointStruct pstruct1 = myGeom->MakePointStruct(P1.X(), P1.Y(), P1.Z()); - GEOM::PointStruct pstruct2 = myGeom->MakePointStruct(P2.X(), P2.Y(), P2.Z()); - GEOM::GEOM_Shape_var Vector = myGeom->MakeVector(pstruct1, pstruct2); - Vector->NameType(tr("GEOM_VECTOR")); - if(myGeomBase->Display(Vector)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//======================================================================= -// function : MakePlaneAndDisplay() -// purpose : Plane point is P1 and dx, dy, dz define a normal vector -//======================================================================= -void BasicGUI::MakePlaneAndDisplay(const gp_Pnt P1, const Standard_Real dx, const Standard_Real dy, - const Standard_Real dz, const Standard_Real TrimSize) -{ - try { - gp_Dir aDirection; - aDirection.SetCoord(dx, dy, dz); - gp_Ax2 Axis(P1, aDirection); - - GEOM::PointStruct pstruct = myGeom->MakePointStruct(P1.X(), P1.Y(), P1.Z()); - GEOM::PointStruct d = myGeom->MakePointStruct(aDirection.X(), aDirection.Y(), aDirection.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - GEOM::GEOM_Shape_ptr plane = myGeom->MakePlane(pstruct, dstruct, TrimSize); - plane->NameType(tr("GEOM_PLANE")); - if(myGeomBase->Display(plane)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//======================================================================= -// function : MakeWorkingPlane() -// purpose : Change the point of view3d -//======================================================================= -void BasicGUI::MakeWorkingPlane(const gp_Pnt P, const gp_Dir D) -{ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NOT_FOR_VTK_VIEWER")); - return; - } - - OCCViewer_ViewPort* vp = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewPort(); - Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)vp)->getView(); - view3d->SetAt(P.X(), P.Y(), P.Z()); - view3d->SetProj(D.X(), D.Y(), D.Z()); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - return; -} - - //===================================================================================== // EXPORTED METHODS //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return BasicGUI::OnGUIEvent(theCommandID, parent);} - - bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame) - {return BasicGUI::OnMousePress(pe, parent, studyFrame);} + GEOMGUI* GetLibGUI() + { + return BasicGUI::GetBasicGUI(); + } } diff --git a/src/BasicGUI/BasicGUI.h b/src/BasicGUI/BasicGUI.h index ef5d957f1..418f446ed 100644 --- a/src/BasicGUI/BasicGUI.h +++ b/src/BasicGUI/BasicGUI.h @@ -24,11 +24,12 @@ // File : BasicGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef BASICGUI_H #define BASICGUI_H +#include "GEOMGUI.h" #include "GEOMBase.h" #include @@ -36,34 +37,24 @@ // class : BasicGUI // purpose : //================================================================================= -class BasicGUI : public QObject +class BasicGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + BasicGUI(); // hide constructor to avoid direct creation public : - BasicGUI(); ~BasicGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); - static bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame); + // Get the only BasicGUI object + static BasicGUI* GetBasicGUI(); - gp_Pnt ConvertClickToPoint(Standard_Real x, Standard_Real y, Handle(V3d_View) aView); + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame); - void MakePointAndDisplay(const double x, const double y, const double z); - void MakeLineAndDisplay(const gp_Pnt InitPoint, const gp_Pnt LastPoint); - void MakeCircleAndDisplay(const gp_Pnt CenterPoint, const gp_Dir dir, const Standard_Real Radius); - void MakeEllipseAndDisplay(const gp_Pnt CenterPoint, const gp_Dir dir, - const Standard_Real Major_Radius, const Standard_Real Minor_Radius); - void MakeArcAndDisplay(gp_Pnt InitPoint, gp_Pnt CirclePoint, gp_Pnt EndPoint); - void MakeVectorAndDisplay(const gp_Pnt P1, const gp_Pnt P2); - void MakePlaneAndDisplay(const gp_Pnt P1, const Standard_Real dx, const Standard_Real dy, - const Standard_Real dz, const Standard_Real TrimSize); - void MakeWorkingPlane(const gp_Pnt P, const gp_Dir D); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + gp_Pnt ConvertClickToPoint( int x, int y, Handle(V3d_View) aView ); +private: + static BasicGUI* myGUIObject; // the only BasicGUI object }; #endif diff --git a/src/BasicGUI/BasicGUI_ArcDlg.cxx b/src/BasicGUI/BasicGUI_ArcDlg.cxx index 4c3bfaa9c..2c1dbc537 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.cxx +++ b/src/BasicGUI/BasicGUI_ArcDlg.cxx @@ -28,11 +28,14 @@ #include "BasicGUI_ArcDlg.h" +#include "QAD_Desktop.h" #include #include #include #include +#include "GEOMImpl_Types.hxx" + #include "utilities.h" using namespace std; @@ -44,7 +47,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_ArcDlg::BasicGUI_ArcDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BasicGUI_ArcDlg::BasicGUI_ArcDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_ARC"))); @@ -58,20 +61,22 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(QWidget* parent, const char* name, BasicGUI* th RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_3Sel_QTD(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_POINTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_POINT_I").arg("1")); - GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2")); - GroupPoints->TextLabel3->setText(tr("GEOM_POINT_I").arg("3")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); - GroupPoints->PushButton3->setPixmap(image1); + Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts"); + Group3Pnts->GroupBox1->setTitle(tr("GEOM_POINTS")); + Group3Pnts->TextLabel1->setText(tr("GEOM_POINT_I").arg("1")); + Group3Pnts->TextLabel2->setText(tr("GEOM_POINT_I").arg("2")); + Group3Pnts->TextLabel3->setText(tr("GEOM_POINT_I").arg("3")); - Layout1->addWidget(GroupPoints, 1, 0); - /***************************************************************/ + Group3Pnts->LineEdit1->setReadOnly( true ); + Group3Pnts->LineEdit2->setReadOnly( true ); + Group3Pnts->LineEdit3->setReadOnly( true ); + + Group3Pnts->PushButton1->setPixmap(image1); + Group3Pnts->PushButton2->setPixmap(image1); + Group3Pnts->PushButton3->setPixmap(image1); + + Layout1->addWidget( Group3Pnts, 2, 0 ); - /* Initialisations */ - myBasicGUI = theBasicGUI; Init(); } @@ -82,7 +87,6 @@ BasicGUI_ArcDlg::BasicGUI_ArcDlg(QWidget* parent, const char* name, BasicGUI* th //================================================================================= BasicGUI_ArcDlg::~BasicGUI_ArcDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -93,32 +97,33 @@ BasicGUI_ArcDlg::~BasicGUI_ArcDlg() void BasicGUI_ArcDlg::Init() { /* init variables */ - myEditCurrentArgument = GroupPoints->LineEdit1; - myOkPoint1 = myOkPoint2 = myOkPoint3 = false; + myGeomGUI->SetState( 0 ); + globalSelection( GEOM_POINT ); - /* Vertices Filter for all arguments */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + myEditCurrentArgument = Group3Pnts->LineEdit1; + myEditCurrentArgument->setFocus(); + + myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil(); /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3Pnts->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3Pnts->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3Pnts->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName( tr( "GEOM_ARC" ) ); } @@ -128,28 +133,38 @@ void BasicGUI_ArcDlg::Init() //================================================================================= void BasicGUI_ArcDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_ArcDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_ArcDlg::ClickOnApply() +bool BasicGUI_ArcDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; + + initName(); - if(myOkPoint1 && myOkPoint2 && myOkPoint3) - myBasicGUI->MakeArcAndDisplay(myPoint1, myPoint2, myPoint3); - return; + // reset + myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil(); + Group3Pnts->LineEdit1->setText( "" ); + Group3Pnts->LineEdit2->setText( "" ); + Group3Pnts->LineEdit3->setText( "" ); + myEditCurrentArgument = Group3Pnts->LineEdit1; + + return true; } @@ -159,43 +174,28 @@ void BasicGUI_ArcDlg::ClickOnApply() //================================================================================= void BasicGUI_ArcDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if (myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkPoint2 = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit3) - myOkPoint3 = false; + + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil(); return; } // nbSel == 1 - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - myEditCurrentArgument->setText(aString); - myOkPoint1 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->VertexToPoint(S, myPoint2)) { - myEditCurrentArgument->setText(aString); - myOkPoint2 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit3 && myGeomBase->VertexToPoint(S, myPoint3)) { - myEditCurrentArgument->setText(aString); - myOkPoint3 = true; + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject; } - if(myOkPoint1 && myOkPoint2 && myOkPoint3) - this->MakeArcSimulationAndDisplay(); - return; + displayPreview(); } @@ -206,24 +206,13 @@ void BasicGUI_ArcDlg::SelectionIntoArgument() void BasicGUI_ArcDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit2; - } - else if(send == GroupPoints->PushButton3) { - GroupPoints->LineEdit3->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit3; - } - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); - return; + if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1; + else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2; + else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -234,17 +223,13 @@ void BasicGUI_ArcDlg::SetEditCurrentArgument() void BasicGUI_ArcDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if(send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else if(send == GroupPoints->LineEdit3) - myEditCurrentArgument = GroupPoints->LineEdit3; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if ( send == Group3Pnts->LineEdit1 || + send == Group3Pnts->LineEdit2 || + send == Group3Pnts->LineEdit3 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -256,12 +241,28 @@ void BasicGUI_ArcDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + myGeomGUI->SetState( 0 ); + globalSelection( GEOM_POINT ); + + myEditCurrentArgument = Group3Pnts->LineEdit1; + myEditCurrentArgument->setFocus(); + + Group3Pnts->LineEdit1->setText( "" ); + Group3Pnts->LineEdit2->setText( "" ); + Group3Pnts->LineEdit3->setText( "" ); + myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil(); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_ArcDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} //================================================================================= // function : enterEvent() @@ -269,45 +270,56 @@ void BasicGUI_ArcDlg::ActivateThisDialog() //================================================================================= void BasicGUI_ArcDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_ArcDlg::createOperation() +{ + return getGeomEngine()->GetICurvesOperations( getStudyId() ); +} + +//================================================================================= +// function : isEqual +// purpose : it may also be needed to check for min distance between gp_Pnt-s... +//================================================================================= +static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 ) +{ + return thePnt1->_is_equivalent( thePnt2 ); +} //================================================================================= -// function : MakeArcSimulationAndDisplay() +// function : isValid // purpose : //================================================================================= -void BasicGUI_ArcDlg::MakeArcSimulationAndDisplay() +bool BasicGUI_ArcDlg::isValid( QString& msg ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - if(myPoint2.IsEqual(myPoint1, Precision::Confusion()) || - myPoint2.IsEqual(myPoint3, Precision::Confusion())) { - myEditCurrentArgument->setText(""); - return; - } - - gp_Vec v1(myPoint2, myPoint1); - gp_Vec v2(myPoint2, myPoint3); - if(v1.IsParallel(v2, Precision::Angular())) { - myEditCurrentArgument->setText(""); - return; - } - - GC_MakeArcOfCircle Arc(myPoint1, myPoint2, myPoint3); - if(Arc.IsDone()) { - Handle(Geom_TrimmedCurve) curve = Arc.Value(); - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(curve).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeArcSimulationAndDisplay"); - } - return; + return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() && + !isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_ArcDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeArc( myPoint1, myPoint2, myPoint3 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + return true; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_ArcDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } diff --git a/src/BasicGUI/BasicGUI_ArcDlg.h b/src/BasicGUI/BasicGUI_ArcDlg.h index 408e7077b..b34721521 100644 --- a/src/BasicGUI/BasicGUI_ArcDlg.h +++ b/src/BasicGUI/BasicGUI_ArcDlg.h @@ -32,9 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_3Sel_QTD.h" -#include "BasicGUI.h" -#include "GEOM_ShapeTypeFilter.hxx" - //================================================================================= // class : BasicGUI_ArcDlg // purpose : @@ -44,30 +41,33 @@ class BasicGUI_ArcDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_ArcDlg( QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 ); + BasicGUI_ArcDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 ); ~BasicGUI_ArcDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeArcSimulationAndDisplay(); - - BasicGUI* myBasicGUI; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */ - gp_Pnt myPoint1; - gp_Pnt myPoint2; - gp_Pnt myPoint3; - bool myOkPoint1; - bool myOkPoint2; - bool myOkPoint3; + GEOM::GEOM_Object_var myPoint1, myPoint2, myPoint3; - DlgRef_3Sel_QTD* GroupPoints; + DlgRef_3Sel_QTD* Group3Pnts; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BasicGUI/BasicGUI_CircleDlg.cxx b/src/BasicGUI/BasicGUI_CircleDlg.cxx index a10e4049f..105e3becd 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.cxx +++ b/src/BasicGUI/BasicGUI_CircleDlg.cxx @@ -28,15 +28,12 @@ #include "BasicGUI_CircleDlg.h" -#include -#include -#include -#include +#include "QAD_Desktop.h" #include "QAD_Config.h" -#include "utilities.h" +#include "GEOMImpl_Types.hxx" -using namespace std; +#include "utilities.h" //================================================================================= // class : BasicGUI_CircleDlg() @@ -45,10 +42,11 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_CircleDlg::BasicGUI_CircleDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BasicGUI_CircleDlg::BasicGUI_CircleDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PV"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CIRCLE_PNTS"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); setCaption(tr("GEOM_CIRCLE_TITLE")); @@ -56,22 +54,38 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(QWidget* parent, const char* name, BasicG /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_CIRCLE")); RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); + RadioButton2->setPixmap(image2); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_2Sel1Spin(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_CENTER_POINT")); - GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); - GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupPoints, 1, 0); + GroupPntVecR = new DlgRef_2Sel1Spin(this, "GroupPntVecR"); + GroupPntVecR->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + + GroupPntVecR->TextLabel1->setText(tr("GEOM_CENTER_POINT")); + GroupPntVecR->TextLabel2->setText(tr("GEOM_VECTOR")); + GroupPntVecR->TextLabel3->setText(tr("GEOM_RADIUS")); + GroupPntVecR->PushButton1->setPixmap(image1); + GroupPntVecR->PushButton2->setPixmap(image1); + + GroupPntVecR->LineEdit1->setReadOnly( true ); + GroupPntVecR->LineEdit2->setReadOnly( true ); + + Group3Pnts = new DlgRef_3Sel_QTD(this, "Group3Pnts"); + Group3Pnts->GroupBox1->setTitle(tr("GEOM_3_POINTS")); + Group3Pnts->TextLabel1->setText(tr("GEOM_POINT1")); + Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2")); + Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3")); + Group3Pnts->PushButton1->setPixmap(image1); + Group3Pnts->PushButton2->setPixmap(image1); + Group3Pnts->PushButton3->setPixmap(image1); + + Group3Pnts->LineEdit1->setReadOnly( true ); + Group3Pnts->LineEdit2->setReadOnly( true ); + Group3Pnts->LineEdit3->setReadOnly( true ); + + Layout1->addWidget( GroupPntVecR, 2, 0 ); + Layout1->addWidget( Group3Pnts, 2, 0 ); /***************************************************************/ - /* Initialisations */ - myBasicGUI = theBasicGUI; Init(); } @@ -82,7 +96,6 @@ BasicGUI_CircleDlg::BasicGUI_CircleDlg(QWidget* parent, const char* name, BasicG //================================================================================= BasicGUI_CircleDlg::~BasicGUI_CircleDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -93,45 +106,89 @@ BasicGUI_CircleDlg::~BasicGUI_CircleDlg() void BasicGUI_CircleDlg::Init() { /* init variables */ - myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument = GroupPntVecR->LineEdit1; - myRadius = 100.0; - myOkPoint1 = myOkDir = false; + myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil(); - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + myGeomGUI->SetState( 0 ); /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double aStep = St.toDouble(); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myRadius); + GroupPntVecR->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, aStep, 3); + GroupPntVecR->SpinBox_DX->SetValue( 100 ); /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPntVecR->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPntVecR->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupPntVecR->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupPntVecR->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); + connect(GroupPntVecR->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPntVecR->SpinBox_DX, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); + initName( tr( "GEOM_CIRCLE" ) ); - return; + Group3Pnts->hide(); + ConstructorsClicked( 0 ); } +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BasicGUI_CircleDlg::ConstructorsClicked( int constructorId ) +{ + disconnect( mySelection, 0, this, 0 ); + myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = GEOM::GEOM_Object::_nil(); + + switch ( constructorId ) + { + case 0: + { + Group3Pnts->hide(); + resize(0, 0); + GroupPntVecR->show(); + + myEditCurrentArgument = GroupPntVecR->LineEdit1; + GroupPntVecR->LineEdit1->setText(""); + GroupPntVecR->LineEdit2->setText(""); + break; + } + case 1: + { + GroupPntVecR->hide(); + resize( 0, 0 ); + Group3Pnts->show(); + + myEditCurrentArgument = Group3Pnts->LineEdit1; + Group3Pnts->LineEdit1->setText(""); + Group3Pnts->LineEdit2->setText(""); + Group3Pnts->LineEdit3->setText(""); + break; + } + } + + myEditCurrentArgument->setFocus(); + globalSelection( GEOM_POINT ); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); +} //================================================================================= // function : ClickOnOk() @@ -139,29 +196,32 @@ void BasicGUI_CircleDlg::Init() //================================================================================= void BasicGUI_CircleDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_CircleDlg::ClickOnApply() +bool BasicGUI_CircleDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkPoint1 && myOkDir) - myBasicGUI->MakeCircleAndDisplay(myPoint1, myDir, myRadius); - return; + initName(); + ConstructorsClicked( getConstructorId() ); + return true; } +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_CircleDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} //================================================================================= // function : SelectionIntoArgument() @@ -169,40 +229,32 @@ void BasicGUI_CircleDlg::ClickOnApply() //================================================================================= void BasicGUI_CircleDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if (myEditCurrentArgument == GroupPoints->LineEdit2) - myOkDir = false; + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil(); return; } - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - /* gp_Pnt : not used */ - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPoints->LineEdit1->setText(aString); - myOkPoint1 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - GroupPoints->LineEdit2->setText(aString); - myOkDir = true; + // nbSel == 1 + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPntVecR->LineEdit1 ) myPoint = aSelectedObject; + else if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) myDir = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject; } - if(myOkPoint1 && myOkDir) - this->MakeCircleSimulationAndDisplay(); - return; + displayPreview(); } @@ -213,21 +265,20 @@ void BasicGUI_CircleDlg::SelectionIntoArgument() void BasicGUI_CircleDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); - } - this->SelectionIntoArgument(); - - return; + if ( send == GroupPntVecR->PushButton1 ) myEditCurrentArgument = GroupPntVecR->LineEdit1; + else if ( send == GroupPntVecR->PushButton2 ) myEditCurrentArgument = GroupPntVecR->LineEdit2; + else if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1; + else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2; + else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3; + + myEditCurrentArgument->setFocus(); + + if ( myEditCurrentArgument == GroupPntVecR->LineEdit2 ) + globalSelection( GEOM_LINE ); + else + globalSelection( GEOM_POINT ); + SelectionIntoArgument(); } //================================================================================= @@ -237,15 +288,15 @@ void BasicGUI_CircleDlg::SetEditCurrentArgument() void BasicGUI_CircleDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if ( send == GroupPntVecR->LineEdit1 || + send == GroupPntVecR->LineEdit2 || + send == Group3Pnts->LineEdit1 || + send == Group3Pnts->LineEdit2 || + send == Group3Pnts->LineEdit3 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -256,13 +307,12 @@ void BasicGUI_CircleDlg::LineEditReturnPressed() void BasicGUI_CircleDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_POINT ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + myGeomGUI->SetState( 0 ); + + ConstructorsClicked( getConstructorId() ); } @@ -272,44 +322,106 @@ void BasicGUI_CircleDlg::ActivateThisDialog() //================================================================================= void BasicGUI_CircleDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_CircleDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} //================================================================================= // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void BasicGUI_CircleDlg::ValueChangedInSpinBox(double newValue) +void BasicGUI_CircleDlg::ValueChangedInSpinBox() { - myRadius = newValue; - if(myOkPoint1 && myOkDir) - MakeCircleSimulationAndDisplay(); - return; + displayPreview(); } +//================================================================================= +// function : getRadius() +// purpose : +//================================================================================= +double BasicGUI_CircleDlg::getRadius() const +{ + return GroupPntVecR->SpinBox_DX->GetValue(); +} //================================================================================= -// function : MakeCircleSimulationAndDisplay() +// function : createOperation // purpose : //================================================================================= -void BasicGUI_CircleDlg::MakeCircleSimulationAndDisplay() +GEOM::GEOM_IOperations_ptr BasicGUI_CircleDlg::createOperation() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - gp_Ax2 anAxis(myPoint1, myDir); - gp_Circ circ(anAxis, myRadius); - BRepBuilderAPI_MakeEdge MakeEdge(circ); - mySimulationTopoDs = MakeEdge.Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeCircleSimulationAndDisplay"); + return getGeomEngine()->GetICurvesOperations( getStudyId() ); +} + +//================================================================================= +// function : isEqual +// purpose : it may also be needed to check for min distance between gp_Pnt-s... +//================================================================================= +static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 ) +{ + return thePnt1->_is_equivalent( thePnt2 ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BasicGUI_CircleDlg::isValid( QString& msg ) +{ + const int id = getConstructorId(); + if ( id == 0 ) + return !myPoint->_is_nil() && !myDir->_is_nil() && getRadius() > 0; + else if ( id == 1 ) + return !myPoint1->_is_nil() && !myPoint2->_is_nil() && !myPoint3->_is_nil() && + !isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ); + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_CircleDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCirclePntVecR( myPoint, myDir, getRadius() ); + res = true; + break; + case 1 : + anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeCircleThreePnt( myPoint1, myPoint2, myPoint3 ); + res = true; + break; } - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_CircleDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } + diff --git a/src/BasicGUI/BasicGUI_CircleDlg.h b/src/BasicGUI/BasicGUI_CircleDlg.h index 1ed69fb55..a44c5df83 100644 --- a/src/BasicGUI/BasicGUI_CircleDlg.h +++ b/src/BasicGUI/BasicGUI_CircleDlg.h @@ -31,12 +31,15 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel1Spin.h" +#include "DlgRef_3Sel_QTD.h" #include "BasicGUI.h" +#include "GEOM_EdgeFilter.hxx" #include "GEOM_ShapeTypeFilter.hxx" #include + //================================================================================= // class : BasicGUI_CircleDlg // purpose : @@ -46,36 +49,41 @@ class BasicGUI_CircleDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_CircleDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BasicGUI_CircleDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BasicGUI_CircleDlg(); -private : - void Init(); - void enterEvent(QEvent* e); - void MakeCircleSimulationAndDisplay(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); - BasicGUI* myBasicGUI; + virtual void closeEvent( QCloseEvent* e ); - double step; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filter selection */ +private : + void Init(); + void enterEvent(QEvent* e); + double getRadius() const; - gp_Pnt myPoint1; - gp_Dir myDir; - Standard_Real myRadius; - bool myOkPoint1; - bool myOkDir; + GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3; - DlgRef_2Sel1Spin* GroupPoints; + DlgRef_2Sel1Spin* GroupPntVecR; + DlgRef_3Sel_QTD* Group3Pnts; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); - void LineEditReturnPressed(); + void DeactivateActiveDialog(); + void SelectionIntoArgument(); + + void ConstructorsClicked( int ); + void LineEditReturnPressed(); void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); + void ValueChangedInSpinBox(); }; diff --git a/src/BasicGUI/BasicGUI_CurveDlg.cxx b/src/BasicGUI/BasicGUI_CurveDlg.cxx new file mode 100644 index 000000000..245fe07a8 --- /dev/null +++ b/src/BasicGUI/BasicGUI_CurveDlg.cxx @@ -0,0 +1,318 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 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. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : BasicGUI_CurveDlg.cxx +// Author : Nicolas REJNERI +// Module : GEOM +// $Header$ + +#include "BasicGUI_CurveDlg.h" + +#include "QAD_Desktop.h" +#include "QAD_Config.h" +#include "utilities.h" + +#include "SALOME_ListIteratorOfListIO.hxx" +#include "SALOME_ListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +using namespace std; + +//================================================================================= +// class : BasicGUI_CurveDlg() +// purpose : Constructs a BasicGUI_CurveDlg 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. +//================================================================================= +BasicGUI_CurveDlg::BasicGUI_CurveDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POLYLINE"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SPLINE"))); + QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BEZIER"))); + + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_CURVE_TITLE")); + + /***************************************************************/ + RadioButton1->setPixmap( image0 ); + RadioButton2->setPixmap( image3 ); + RadioButton3->setPixmap( image2 ); + + GroupPoints = new DlgRef_1Sel_QTD( this, "GroupPoints" ); + GroupPoints->GroupBox1->setTitle( tr( "GEOM_NODES" ) ); + GroupPoints->TextLabel1->setText( tr("GEOM_POINTS") ); + GroupPoints->PushButton1->setPixmap(image1); + + GroupPoints->LineEdit1->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~BasicGUI_CurveDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BasicGUI_CurveDlg::~BasicGUI_CurveDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myPoints = new GEOM::ListOfGO(); + myPoints->length( 0 ); + + globalSelection( GEOM_POINT ); + + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + + initName( tr( "GEOM_CURVE" ) ); + ConstructorsClicked( 0 ); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::ConstructorsClicked( int id ) +{ + QString aTitle = tr( id == 0 ? "GEOM_POLYLINE" : id == 1 ? "GEOM_BEZIER" : "GEOM_INTERPOL" ); + GroupConstructors->setTitle( aTitle ); + + myPoints = new GEOM::ListOfGO(); + myPoints->length( 0 ); + + myEditCurrentArgument->setText(""); +} + + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::SetEditCurrentArgument() +{ + if ( sender() == GroupPoints->PushButton1 ) + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::LineEditReturnPressed() +{ + if ( sender() == GroupPoints->LineEdit1 ) + { + myEditCurrentArgument = GroupPoints->LineEdit1; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool BasicGUI_CurveDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_CurveDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +//================================================================================= +void BasicGUI_CurveDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText(""); + + Standard_Boolean aRes = Standard_False; + int i = 0; + myPoints->length( mySelection->IObjectCount() ); // this length may be greater than number of objects, + // that will actually be put into myPoints + for ( SALOME_ListIteratorOfListIO anIt( mySelection->StoredIObjects() ); anIt.More(); anIt.Next() ) + { + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + //TopoDS_Shape aPointShape; + //if ( myGeomBase->GetShape( aSelectedObject, aPointShape, TopAbs_VERTEX ) ) + myPoints[i++] = aSelectedObject; + } + } + myPoints->length( i ); // this is the right length, smaller of equal to the previously set + if ( i ) + GroupPoints->LineEdit1->setText( QString::number( i ) + "_" + tr( "GEOM_POINT" ) + tr( "_S_" ) ); + + displayPreview(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + myGeomGUI->SetState( 0 ); + + globalSelection( GEOM_POINT ); + ConstructorsClicked( getConstructorId() ); +} + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_CurveDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_CurveDlg::createOperation() +{ + return getGeomEngine()->GetICurvesOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BasicGUI_CurveDlg::isValid( QString& msg ) +{ + return myPoints->length() > 1; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_CurveDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakePolyline( myPoints ); + res = true; + break; + case 1 : + anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSplineBezier( myPoints ); + res = true; + break; + case 2 : + anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSplineInterpolation( myPoints ); + res = true; + break; + } + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_CurveDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + diff --git a/src/BooleanGUI/BooleanGUI_FuseDlg.h b/src/BasicGUI/BasicGUI_CurveDlg.h similarity index 58% rename from src/BooleanGUI/BooleanGUI_FuseDlg.h rename to src/BasicGUI/BasicGUI_CurveDlg.h index 6898e64aa..24cee9eaf 100644 --- a/src/BooleanGUI/BooleanGUI_FuseDlg.h +++ b/src/BasicGUI/BasicGUI_CurveDlg.h @@ -1,7 +1,6 @@ // 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 +// Copyright (C) 2003 OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -21,54 +20,61 @@ // // // -// File : BooleanGUI_FuseDlg.h -// Author : Lucien PIGNOLONI +// File : BasicGUI_CurveDlg.h +// Author : Alexander SLADKOV // Module : GEOM // $Header$ -#ifndef DIALOGBOX_FUSE_H -#define DIALOGBOX_FUSE_H +#ifndef BASICGUI_CURVE_H +#define BASICGUI_CURVE_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel_QTD.h" +#include "DlgRef_1Sel_QTD.h" -#include "BooleanGUI.h" +#include "BasicGUI.h" -#include +#include "GEOM_ShapeTypeFilter.hxx" //================================================================================= -// class : BooleanGUI_FuseDlg +// class : BasicGUI_CurveDlg // purpose : //================================================================================= -class BooleanGUI_FuseDlg : public GEOMBase_Skeleton +class BasicGUI_CurveDlg : public GEOMBase_Skeleton { Q_OBJECT public: - BooleanGUI_FuseDlg(QWidget* parent = 0, const char* name = 0, BooleanGUI* theBooleanGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~BooleanGUI_FuseDlg(); + BasicGUI_CurveDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~BasicGUI_CurveDlg(); -private: - void Init(); - void enterEvent(QEvent* e); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); - BooleanGUI* myBooleanGUI; + virtual void closeEvent( QCloseEvent* e ); - GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */ - GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */ - bool myOkShape1; /* to check when arguments are defined */ - bool myOkShape2; +private : + void Init(); + void enterEvent(QEvent* e); - DlgRef_2Sel_QTD* GroupFuse; + DlgRef_1Sel_QTD* GroupPoints; + GEOM::ListOfGO_var myPoints; private slots: void ClickOnOk(); - void ClickOnApply(); - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void ConstructorsClicked( int ); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); }; -#endif // DIALOGBOX_FUSE_H +#endif // BASICGUI_CURVE_H diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.cxx b/src/BasicGUI/BasicGUI_EllipseDlg.cxx index 80321b426..9f8d5bb90 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.cxx +++ b/src/BasicGUI/BasicGUI_EllipseDlg.cxx @@ -26,13 +26,11 @@ // $Header$ #include "BasicGUI_EllipseDlg.h" - -#include -#include -#include -#include +#include "QAD_Desktop.h" #include "QAD_Config.h" +#include "GEOMImpl_Types.hxx" + #include "utilities.h" using namespace std; @@ -44,7 +42,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_ELLIPSE_PV"))); @@ -62,16 +60,17 @@ BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(QWidget* parent, const char* name, Basi GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupPoints->TextLabel1->setText(tr("GEOM_CENTER")); GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); - GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_MINOR")); - GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_MAJOR")); + GroupPoints->TextLabel3->setText(tr("GEOM_RADIUS_MAJOR")); + GroupPoints->TextLabel4->setText(tr("GEOM_RADIUS_MINOR")); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); - Layout1->addWidget(GroupPoints, 1, 0); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ - /* Initialisations */ - myBasicGUI = theBasicGUI; Init(); } @@ -82,7 +81,6 @@ BasicGUI_EllipseDlg::BasicGUI_EllipseDlg(QWidget* parent, const char* name, Basi //================================================================================= BasicGUI_EllipseDlg::~BasicGUI_EllipseDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -94,26 +92,28 @@ void BasicGUI_EllipseDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection( GEOM_POINT ); - myMajorRadius = 200.0; - myMinorRadius = 100.0; - myOkPoint = myOkDir = false; + myPoint = myDir = GEOM::GEOM_Object::_nil(); - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + myGeomGUI->SetState( 0 ); /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); + double aMajorR( 200. ), aMinorR( 100. ); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myMajorRadius); - GroupPoints->SpinBox_DY->SetValue(myMinorRadius); + GroupPoints->SpinBox_DX->RangeStepAndValidator( 0.001, 999.999, step, 3 ); + GroupPoints->SpinBox_DY->RangeStepAndValidator( 0.001, 999.999, step, 3 ); + GroupPoints->SpinBox_DX->SetValue( aMajorR ); + GroupPoints->SpinBox_DY->SetValue( aMinorR ); /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); @@ -131,11 +131,7 @@ void BasicGUI_EllipseDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName( tr( "GEOM_ELLIPSE" ) ); } @@ -145,28 +141,40 @@ void BasicGUI_EllipseDlg::Init() //================================================================================= void BasicGUI_EllipseDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } + //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_EllipseDlg::ClickOnApply() +bool BasicGUI_EllipseDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkPoint && myOkDir) - myBasicGUI->MakeEllipseAndDisplay(myPoint, myDir, myMajorRadius, myMinorRadius); + initName(); + + // reset + myPoint = myDir = GEOM::GEOM_Object::_nil(); + GroupPoints->LineEdit1->setText( "" ); + GroupPoints->LineEdit2->setText( "" ); + myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection( GEOM_POINT ); + + return true; } +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_EllipseDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} //================================================================================= // function : SelectionIntoArgument() @@ -174,40 +182,25 @@ void BasicGUI_EllipseDlg::ClickOnApply() //================================================================================= void BasicGUI_EllipseDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint = false; - else if (myEditCurrentArgument == GroupPoints->LineEdit2) - myOkDir = false; + + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil(); return; } - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - /* gp_Pnt : not used */ - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint)) { - GroupPoints->LineEdit1->setText(aString); - myOkPoint = true; - } - else if (myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - GroupPoints->LineEdit2->setText(aString); - myOkDir = true; + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint = aSelectedObject; + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myDir = aSelectedObject; } - if(myOkPoint && myOkDir) - this->MakeEllipseSimulationAndDisplay(); - return; + displayPreview(); } @@ -218,21 +211,16 @@ void BasicGUI_EllipseDlg::SelectionIntoArgument() void BasicGUI_EllipseDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); - } - this->SelectionIntoArgument(); - return; + if ( send == GroupPoints->PushButton1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->PushButton2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + + myEditCurrentArgument->setFocus(); + if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) + globalSelection( GEOM_LINE ); + else + globalSelection( GEOM_POINT ); + SelectionIntoArgument(); } //================================================================================= @@ -242,15 +230,12 @@ void BasicGUI_EllipseDlg::SetEditCurrentArgument() void BasicGUI_EllipseDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if ( send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -262,14 +247,26 @@ void BasicGUI_EllipseDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + GroupPoints->LineEdit1->setText( "" ); + GroupPoints->LineEdit2->setText( "" ); + + myPoint = myDir = GEOM::GEOM_Object::_nil(); + globalSelection( GEOM_POINT ); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_EllipseDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} //================================================================================= // function : enterEvent() @@ -277,53 +274,67 @@ void BasicGUI_EllipseDlg::ActivateThisDialog() //================================================================================= void BasicGUI_EllipseDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } - //================================================================================= // function : ValueChangedInSpinBox() // purpose : //================================================================================= void BasicGUI_EllipseDlg::ValueChangedInSpinBox(double newValue) { - QObject* send = (QObject*)sender(); - - if(send == GroupPoints->SpinBox_DX ) - myMajorRadius = newValue; - else if(send == GroupPoints->SpinBox_DY) - myMinorRadius = newValue; + displayPreview(); +} - if (myOkPoint && myOkDir) - MakeEllipseSimulationAndDisplay(); - return; +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_EllipseDlg::createOperation() +{ + return getGeomEngine()->GetICurvesOperations( getStudyId() ); } +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BasicGUI_EllipseDlg::isValid( QString& msg ) +{ + double aMajorR = GroupPoints->SpinBox_DX->GetValue(); + double aMinorR = GroupPoints->SpinBox_DY->GetValue(); + if ( aMajorR < aMinorR ) + { + msg = tr( "GEOM_ELLIPSE_ERROR_1" ); + return false; + } + return !myPoint->_is_nil() && !myDir->_is_nil(); +} //================================================================================= -// function : MakeEllipseSimulationAndDisplay() +// function : execute // purpose : //================================================================================= -void BasicGUI_EllipseDlg::MakeEllipseSimulationAndDisplay() +bool BasicGUI_EllipseDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + double aMajorR = GroupPoints->SpinBox_DX->GetValue(); + double aMinorR = GroupPoints->SpinBox_DY->GetValue(); + GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeEllipse( myPoint, myDir, aMajorR, aMinorR ); - if(myMajorRadius < myMinorRadius) - return; + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); - try { - gp_Ax2 anAxis(myPoint, myDir); - gp_Elips ellipse(anAxis, myMajorRadius, myMinorRadius); - BRepBuilderAPI_MakeEdge MakeEdge(ellipse); - mySimulationTopoDs = MakeEdge.Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeEllipseSimulationAndDisplay"); - } - return; + return true; } + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_EllipseDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + diff --git a/src/BasicGUI/BasicGUI_EllipseDlg.h b/src/BasicGUI/BasicGUI_EllipseDlg.h index 512b0c322..21491d29e 100644 --- a/src/BasicGUI/BasicGUI_EllipseDlg.h +++ b/src/BasicGUI/BasicGUI_EllipseDlg.h @@ -34,6 +34,7 @@ #include "BasicGUI.h" #include "GEOM_ShapeTypeFilter.hxx" +#include "GEOM_EdgeFilter.hxx" #include //================================================================================= @@ -45,34 +46,33 @@ class BasicGUI_EllipseDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_EllipseDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BasicGUI_EllipseDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BasicGUI_EllipseDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeEllipseSimulationAndDisplay(); - BasicGUI* myBasicGUI; - - double step; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filter selection */ - - gp_Pnt myPoint; /* Central point of ellipse */ - bool myOkPoint; /* true when myPoint is defined */ - gp_Dir myDir; /* to set normal axis of ellipse */ - bool myOkDir; /* true when myPoint is defined */ - - Standard_Real myMajorRadius; - Standard_Real myMinorRadius; + GEOM::GEOM_Object_var myPoint, myDir; DlgRef_2Sel2Spin* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BasicGUI/BasicGUI_LineDlg.cxx b/src/BasicGUI/BasicGUI_LineDlg.cxx index a146f4d8e..fe435dc53 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.cxx +++ b/src/BasicGUI/BasicGUI_LineDlg.cxx @@ -28,10 +28,9 @@ #include "BasicGUI_LineDlg.h" -#include -#include -#include -#include +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" #include "utilities.h" @@ -44,7 +43,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_LineDlg::BasicGUI_LineDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BasicGUI_LineDlg::BasicGUI_LineDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr("ICON_DLG_LINE_2P"))); @@ -65,11 +64,12 @@ BasicGUI_LineDlg::BasicGUI_LineDlg(QWidget* parent, const char* name, BasicGUI* GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); - Layout1->addWidget(GroupPoints, 1, 0); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ - /* Initialisations */ - myBasicGUI = theBasicGUI; Init(); } @@ -80,7 +80,6 @@ BasicGUI_LineDlg::BasicGUI_LineDlg(QWidget* parent, const char* name, BasicGUI* //================================================================================= BasicGUI_LineDlg::~BasicGUI_LineDlg() { - /* no need to delete child widgets, Qt does it all for us */ } @@ -93,15 +92,16 @@ void BasicGUI_LineDlg::Init() /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(0.0, 0.0, 0.0); - myOkPoint1 = myOkPoint2 = false; - - /* Vertices Filter for all arguments */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); + myGeomGUI->SetState( 0 ); + globalSelection( GEOM_POINT ); + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); @@ -113,11 +113,7 @@ void BasicGUI_LineDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName( tr("GEOM_LINE") ); } @@ -127,27 +123,30 @@ void BasicGUI_LineDlg::Init() //================================================================================= void BasicGUI_LineDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); +} + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_LineDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_LineDlg::ClickOnApply() +bool BasicGUI_LineDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkPoint1 && myOkPoint2) - myBasicGUI->MakeLineAndDisplay(myPoint1, myPoint2); - return; + initName(); + return true; } @@ -157,37 +156,26 @@ void BasicGUI_LineDlg::ClickOnApply() //================================================================================= void BasicGUI_LineDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkPoint2 = false; - return; - } - // nbSel == 1 - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil(); return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - myEditCurrentArgument->setText(aString); - myOkPoint1 = true; } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->VertexToPoint(S, myPoint2)) { - myEditCurrentArgument->setText(aString); - myOkPoint2 = true; + + // nbSel == 1 + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = aSelectedObject; + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = aSelectedObject; } - if(myOkPoint1 && myOkPoint2 && myPoint1.Distance(myPoint2) > Precision::Confusion()) - this->MakeLineSimulationAndDisplay(); - return; + displayPreview(); } @@ -198,20 +186,10 @@ void BasicGUI_LineDlg::SelectionIntoArgument() void BasicGUI_LineDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit2; - } - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); - - return; + if ( send == GroupPoints->PushButton1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->PushButton2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -222,15 +200,10 @@ void BasicGUI_LineDlg::SetEditCurrentArgument() void BasicGUI_LineDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if(send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - + if ( send == GroupPoints->LineEdit1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->LineEdit2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + else return; GEOMBase_Skeleton::LineEditReturnPressed(); - return; } @@ -242,12 +215,27 @@ void BasicGUI_LineDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + myGeomGUI->SetState( 0 ); + globalSelection( GEOM_POINT ); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); + + GroupPoints->LineEdit1->setText( "" ); + GroupPoints->LineEdit2->setText( "" ); + myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_LineDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} //================================================================================= // function : enterEvent() @@ -255,40 +243,47 @@ void BasicGUI_LineDlg::ActivateThisDialog() //================================================================================= void BasicGUI_LineDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_LineDlg::createOperation() +{ + return getGeomEngine()->GetIBasicOperations( getStudyId() ); +} //================================================================================= -// function : MakeLineSimulationAndDisplay() -// purpose : An arrow (cone topology) is added to 'modifiedShape' -// : to simulate a vector or an 'oriented line' display. The result is in 'modifiedShape'. -// : If an arrow can't be added returns false and 'modifiedShape' isn't modified ! +// function : isValid +// purpose : //================================================================================= -void BasicGUI_LineDlg::MakeLineSimulationAndDisplay() +bool BasicGUI_LineDlg::isValid( QString& msg ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(myPoint1, myPoint2).Shape(); - TopoDS_Shape arrow; - if(myGeomBase->CreateArrowForLinearEdge(mySimulationTopoDs, arrow)) { - TopoDS_Compound Comp; - BRep_Builder B; - B.MakeCompound (Comp); - B.Add(Comp, mySimulationTopoDs); - B.Add(Comp, arrow); - mySimulationTopoDs = Comp; - } - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeLineSimulationAndDisplay"); - return; - } - return; + return !myPoint1->_is_nil() && !myPoint2->_is_nil(); } + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_LineDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeLineTwoPnt( myPoint1, myPoint2 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + return true; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_LineDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + diff --git a/src/BasicGUI/BasicGUI_LineDlg.h b/src/BasicGUI/BasicGUI_LineDlg.h index a30885753..82daf2f61 100644 --- a/src/BasicGUI/BasicGUI_LineDlg.h +++ b/src/BasicGUI/BasicGUI_LineDlg.h @@ -32,8 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" -#include "BasicGUI.h" -#include "GEOM_ShapeTypeFilter.hxx" //================================================================================= // class : BasicGUI_LineDlg @@ -44,28 +42,34 @@ class BasicGUI_LineDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_LineDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BasicGUI_LineDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BasicGUI_LineDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeLineSimulationAndDisplay(); - - BasicGUI* myBasicGUI; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */ - gp_Pnt myPoint1; /* Points containing the vector */ - gp_Pnt myPoint2; - bool myOkPoint1; /* Are true when myPoint is defined */ - bool myOkPoint2; + GEOM::GEOM_Object_var myPoint1; + GEOM::GEOM_Object_var myPoint2; DlgRef_2Sel_QTD* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.cxx b/src/BasicGUI/BasicGUI_MarkerDlg.cxx new file mode 100644 index 000000000..c73f91728 --- /dev/null +++ b/src/BasicGUI/BasicGUI_MarkerDlg.cxx @@ -0,0 +1,669 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : BasicGUI_MarkerDlg.cxx +// Author : Sergey LITONIN +// Module : GEOM +// $Header$ + +#include "BasicGUI_MarkerDlg.h" +#include "DlgRef_SpinBox.h" +#include "QAD_Desktop.h" +#include "QAD_RightFrame.h" +#include "VTKViewer_ViewFrame.h" +#include "OCCViewer_ViewFrame.h" +#include "QAD_Config.h" +#include "GEOMImpl_Types.hxx" +#include "utilities.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================================= +// class : BasicGUI_MarkerDlg() +// purpose : Constructor +//================================================================================= +BasicGUI_MarkerDlg::BasicGUI_MarkerDlg( QWidget* theParent, SALOME_Selection* theSel ) +: GEOMBase_Skeleton( theParent, "BasicGUI_MarkerDlg", theSel, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap iconCS1 ( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_MARKER" ) ) ); + QPixmap iconCS2 ( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_MARKER2" ) ) ); + QPixmap iconCS3 ( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_MARKER3" ) ) ); + QPixmap iconSelect( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + + setCaption( tr( "CAPTION" ) ); + + GroupConstructors->setTitle( tr( "LOCALCS" ) ); + RadioButton1->setPixmap( iconCS1 ); + RadioButton2->setPixmap( iconCS2 ); + RadioButton3->setPixmap( iconCS3 ); + + Group1 = new DlgRef_1Sel_QTD(this, "Group1"); + Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + Group1->TextLabel1->setText(tr("GEOM_OBJECT")); + Group1->PushButton1->setPixmap(iconSelect); + + Group2 = new DlgRef_3Sel_QTD(this, "Group2"); + Group2->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + Group2->TextLabel1->setText(tr("GEOM_POINT")); + Group2->TextLabel2->setText(tr("XDIR")); + Group2->TextLabel3->setText(tr("YDIR")); + Group2->PushButton1->setPixmap(iconSelect); + Group2->PushButton2->setPixmap(iconSelect); + Group2->PushButton3->setPixmap(iconSelect); + + aMainGrp = new QGroupBox( 1, Qt::Horizontal, this ); + aMainGrp->setFrameStyle( QFrame::NoFrame ); + aMainGrp->setInsideMargin( 0 ); + + QGroupBox* anOriGrp = new QGroupBox( 1, Qt::Vertical, tr( "ORIGIN" ), aMainGrp ); + new QLabel( tr( "GEOM_X" ), anOriGrp ); + myData[ X ] = new DlgRef_SpinBox( anOriGrp ); + new QLabel( tr( "GEOM_Y" ), anOriGrp ); + myData[ Y ] = new DlgRef_SpinBox( anOriGrp ); + new QLabel( tr( "GEOM_Z" ), anOriGrp ); + myData[ Z ] = new DlgRef_SpinBox( anOriGrp ); + + QGroupBox* aXAxisGrp = new QGroupBox( 1, Qt::Vertical, tr( "XDIR" ), aMainGrp ); + new QLabel( tr( "DX" ), aXAxisGrp ); + myData[ DX1 ] = new DlgRef_SpinBox( aXAxisGrp ); + new QLabel( tr( "DY" ), aXAxisGrp ); + myData[ DY1 ] = new DlgRef_SpinBox( aXAxisGrp ); + new QLabel( tr( "DZ" ), aXAxisGrp ); + myData[ DZ1 ] = new DlgRef_SpinBox( aXAxisGrp ); + + QGroupBox* anYAxisGrp = new QGroupBox( 1, Qt::Vertical, tr( "YDIR" ), aMainGrp ); + new QLabel( tr( "DX" ), anYAxisGrp ); + myData[ DX2 ] = new DlgRef_SpinBox( anYAxisGrp ); + new QLabel( tr( "DY" ), anYAxisGrp ); + myData[ DY2 ] = new DlgRef_SpinBox( anYAxisGrp ); + new QLabel( tr( "DZ" ), anYAxisGrp ); + myData[ DZ2 ] = new DlgRef_SpinBox( anYAxisGrp ); + + Layout1->addWidget( aMainGrp, 2, 0 ); + Layout1->addWidget( Group1, 2, 0 ); + Layout1->addWidget( Group2, 2, 0 ); + + Init( theSel ); +} + + +//================================================================================= +// function : ~BasicGUI_MarkerDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BasicGUI_MarkerDlg::~BasicGUI_MarkerDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::Init( SALOME_Selection* theSel ) +{ + myBlockPreview = false; + myConstructorId = -1; + myEditCurrentArgument = Group1->LineEdit1; + Group1->LineEdit1->setReadOnly( true ); + Group2->LineEdit1->setReadOnly( true ); + Group2->LineEdit2->setReadOnly( true ); + Group2->LineEdit3->setReadOnly( true ); + + GeometryGUI* aGeomGUI = GeometryGUI::GetGeomGUI(); + + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group2->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group2->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( onClose() ) ); + connect( aGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( onDeactivate() ) ); + connect( aGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onClose() ) ); + + connect( buttonOk, SIGNAL( clicked() ), this, SLOT( onOk() ) ); + connect( buttonApply, SIGNAL( clicked() ), this, SLOT( onApply() ) ); + + connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) ); + + initName( tr( "LCS_NAME" ) ); + + QString aStr = QAD_CONFIG->getSetting( "Geometry:SettingsGeomStep" ); + for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) + { + anIter.data()->RangeStepAndValidator( -999.999, 999.999, aStr.toDouble(), 3 ); + connect( anIter.data(), SIGNAL( valueChanged( double ) ), + this, SLOT( onValueChanged( double ) ) ); + } + + myBlockPreview = true; + for ( DataMap::iterator anIter = myData.begin(); anIter != myData.end(); ++anIter ) + anIter.data()->SetValue( 0 ); + myData[ DX1 ]->SetValue( 1 ); + myData[ DY2 ]->SetValue( 1 ); + myBlockPreview = false; + + ConstructorsClicked( 0 ); + + QAD_ViewFrame* aFrame = QAD_Application::getDesktop()->getActiveApp()-> + getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + + VTKViewer_ViewFrame* aVTKFrame = dynamic_cast( aFrame ); + if ( aVTKFrame ) + { + aVTKFrame->AdjustTrihedrons( true ); + return; + } + + OCCViewer_ViewFrame* aOCCFrame = dynamic_cast( aFrame ); + if ( aOCCFrame ) + aOCCFrame->AdjustTrihedrons( true ); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BasicGUI_MarkerDlg::ConstructorsClicked( int constructorId ) +{ + if ( myConstructorId == constructorId && myConstructorId == 0 ) + { + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + activate( GEOM_MARKER ); + displayPreview(); + return; + } + + myConstructorId = constructorId; + + disconnect(mySelection, 0, this, 0); + + switch (constructorId) + { + case 0: + { + Group1->hide(); + Group2->hide(); + resize(0, 0); + aMainGrp->show(); + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + activate( GEOM_MARKER ); + break; + } + case 1: + { + Group2->hide(); + aMainGrp->hide(); + resize(0, 0); + Group1->show(); + + globalSelection( GEOM_ALLGEOM ); + myEditCurrentArgument = Group1->LineEdit1; + Group1->LineEdit1->setText(""); + break; + } + case 2: + { + aMainGrp->hide(); + Group1->show(); + resize(0, 0); + Group2->show(); + + globalSelection( GEOM_POINT ); + myEditCurrentArgument = Group2->LineEdit1; + Group2->LineEdit1->setText(""); + Group2->LineEdit2->setText(""); + Group2->LineEdit3->setText(""); + break; + } + } + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionDone())); + onSelectionDone(); +} + +//================================================================================= +// function : onOk() +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::onOk() +{ + if ( onApply() ) + onClose(); +} + +//======================================================================= +// function : onClose() +// purpose : +//======================================================================= +void BasicGUI_MarkerDlg::onClose() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + +//================================================================================= +// function : onApply() +// purpose : +//================================================================================= +bool BasicGUI_MarkerDlg::onApply() +{ + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + + return true; +} + +//================================================================================= +// function : onSelectionDone0() +// purpose : Reaction on selection when first method of creation is current one +//================================================================================= +void BasicGUI_MarkerDlg::onSelectionDone0() +{ + if ( mySelection->IObjectCount() == 1 ) + { + + Standard_Boolean aRes = Standard_False; + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + + if ( aRes && !aSelectedObj->_is_nil() ) + { + TopoDS_Shape aShape; + if ( myGeomBase->GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) && !aShape.IsNull() ) + { + if ( aSelectedObj->GetType() == GEOM_MARKER && aShape.ShapeType() == TopAbs_FACE ) + { + TopoDS_Face aFace = TopoDS::Face( aShape ); + Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( aFace ) ); + + if ( !aPlane.IsNull() ) + { + gp_Ax3 anAx3 = aPlane->Pln().Position(); + gp_Pnt aLoc = anAx3.Location(); + gp_Dir aXDir = anAx3.XDirection(); + gp_Dir aYDir = anAx3.YDirection(); + + myData[ X ]->SetValue( aLoc.X() ); + myData[ Y ]->SetValue( aLoc.Y() ); + myData[ Z ]->SetValue( aLoc.Z() ); + + myData[ DX1 ]->SetValue( aXDir.X() ); + myData[ DY1 ]->SetValue( aXDir.Y() ); + myData[ DZ1 ]->SetValue( aXDir.Z() ); + + myData[ DX2 ]->SetValue( aYDir.X() ); + myData[ DY2 ]->SetValue( aYDir.Y() ); + myData[ DZ2 ]->SetValue( aYDir.Z() ); + //mySelection->ClearIObjects(); + } + } + else + { + if ( mySelection->HasIndex( anIO ) ) + { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + if ( aMap.Extent() == 1 ) + { + int anIndex = aMap( 1 ); + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes( aShape, aShapes ); + aShape = aShapes.FindKey( anIndex ); + //mySelection->ClearIObjects(); + } + } + + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) + { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + myData[ X ]->SetValue( aPnt.X() ); + myData[ Y ]->SetValue( aPnt.Y() ); + myData[ Z ]->SetValue( aPnt.Z() ); + } + } + } + } + } + + displayPreview(); +} + + +//================================================================================= +// function : onSelectionDone() +// purpose : Called when selection as changed or other case +//================================================================================= +void BasicGUI_MarkerDlg::onSelectionDone() +{ + if ( getConstructorId() == 0 ) + { + onSelectionDone0(); + return; + } + + + myEditCurrentArgument->setText(""); + QString aName; + + if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aRes = Standard_False; + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + + if ( !CORBA::is_nil( aSelectedObj ) && aRes ) { + aName = GEOMBase::GetName( aSelectedObj ); + TopoDS_Shape aShape; + if ( myGeomBase->GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) ) { + GEOM::short_array anIndexes; + if ( mySelection->HasIndex( anIO ) ) { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + int anIndex = aMap( 1 ); + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes( aShape, aShapes ); + aShape = aShapes.FindKey( anIndex ); + } + + if ( getConstructorId() == 1 ) { + if ( !aShape.IsNull() ) { + gp_Pnt aPnt; + if (aShape.ShapeType() == TopAbs_VERTEX) { + aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aShape)); + } + else { + GProp_GProps aSystem; + if (aShape.ShapeType() == TopAbs_EDGE || aShape.ShapeType() == TopAbs_WIRE) + BRepGProp::LinearProperties(aShape, aSystem); + else if (aShape.ShapeType() == TopAbs_FACE || aShape.ShapeType() == TopAbs_SHELL) + BRepGProp::SurfaceProperties(aShape, aSystem); + else + BRepGProp::VolumeProperties(aShape, aSystem); + + aPnt = aSystem.CentreOfMass(); + } + + gp_Ax3 anAx3; + anAx3.Transform(aShape.Location().Transformation()); + if(aShape.ShapeType() == TopAbs_FACE) { + Handle(Geom_Surface) aGS = BRep_Tool::Surface( TopoDS::Face( aShape ) ); + if (!aGS.IsNull() && aGS->IsKind( STANDARD_TYPE( Geom_Plane ) ) ) { + Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast( aGS ); + gp_Pln aPln = aGPlane->Pln(); + anAx3 = aPln.Position(); + } + } + + gp_Dir aDirX = anAx3.XDirection(); + gp_Dir aDirY = anAx3.YDirection(); + + myData[ X ]->SetValue( aPnt.X() ); + myData[ Y ]->SetValue( aPnt.Y() ); + myData[ Z ]->SetValue( aPnt.Z() ); + + myData[ DX1 ]->SetValue( aDirX.X() ); + myData[ DY1 ]->SetValue( aDirX.Y() ); + myData[ DZ1 ]->SetValue( aDirX.Z() ); + + myData[ DX2 ]->SetValue( aDirY.X() ); + myData[ DY2 ]->SetValue( aDirY.Y() ); + myData[ DZ2 ]->SetValue( aDirY.Z() ); + + myEditCurrentArgument->setText( aName ); + } + } + else if ( getConstructorId() == 2 ) { + if (myEditCurrentArgument == Group2->LineEdit1) { + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + myData[ X ]->SetValue( aPnt.X() ); + myData[ Y ]->SetValue( aPnt.Y() ); + myData[ Z ]->SetValue( aPnt.Z() ); + myEditCurrentArgument->setText( aName ); + } + } + else if (myEditCurrentArgument == Group2->LineEdit2) { + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) { + gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(aShape))); + gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(aShape))); + gp_Dir aDir(gp_Vec(aP1, aP2)); + + myData[ DX1 ]->SetValue( aDir.X() ); + myData[ DY1 ]->SetValue( aDir.Y() ); + myData[ DZ1 ]->SetValue( aDir.Z() ); + myEditCurrentArgument->setText( aName ); + } + } + else if (myEditCurrentArgument == Group2->LineEdit3) { + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_EDGE ) { + gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(TopoDS::Edge(aShape))); + gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(TopoDS::Edge(aShape))); + gp_Dir aDir(gp_Vec(aP1, aP2)); + + myData[ DX2 ]->SetValue( aDir.X() ); + myData[ DY2 ]->SetValue( aDir.Y() ); + myData[ DZ2 ]->SetValue( aDir.Z() ); + myEditCurrentArgument->setText( aName ); + } + } + } + } + } + } + + displayPreview(); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if(send == Group1->PushButton1) { + myEditCurrentArgument = Group1->LineEdit1; + globalSelection( GEOM_ALLGEOM ); + } + else if(send == Group2->PushButton1) { + myEditCurrentArgument = Group2->LineEdit1; + globalSelection( GEOM_POINT ); + } + else if(send == Group2->PushButton2) { + myEditCurrentArgument = Group2->LineEdit2; + globalSelection( GEOM_LINE ); + } + else if(send == Group2->PushButton3) { + myEditCurrentArgument = Group2->LineEdit3; + globalSelection( GEOM_LINE ); + } + + myEditCurrentArgument->setFocus(); + onSelectionDone(); +} + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); +} + +//================================================================================= +// function : onActivate() +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::onActivate() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionDone() ) ); + + ConstructorsClicked( getConstructorId() ); +} + +//================================================================================= +// function : onDeactivate() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_MarkerDlg::onDeactivate() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + onActivate(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_MarkerDlg::createOperation() +{ + return getGeomEngine()->GetIBasicOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BasicGUI_MarkerDlg::isValid( QString& msg ) +{ + const int id = getConstructorId(); + gp_Vec v1( myData[ DX1 ]->GetValue(), myData[ DY1 ]->GetValue(), myData[ DZ1 ]->GetValue() ), + v2( myData[ DX2 ]->GetValue(), myData[ DY2 ]->GetValue(), myData[ DZ2 ]->GetValue() ); + bool isOrthogonal = v1.IsNormal( v2, Precision::Confusion() ); + switch ( id ) + { + case 0: + return isOrthogonal; + case 1: + return !Group1->LineEdit1->text().isEmpty() && isOrthogonal; + case 2: + return !Group2->LineEdit1->text().isEmpty() && + !Group2->LineEdit2->text().isEmpty() && + !Group2->LineEdit3->text().isEmpty() && isOrthogonal; + } + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_MarkerDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IBasicOperations::_narrow( + getOperation() )->MakeMarker( myData[ X ]->GetValue(), myData[ Y ]->GetValue(), myData[ Z ]->GetValue(), + myData[ DX1 ]->GetValue(), myData[ DY1 ]->GetValue(), myData[ DZ1 ]->GetValue(), + myData[ DX2 ]->GetValue(), myData[ DY2 ]->GetValue(), myData[ DZ2 ]->GetValue() ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : onValueChanged +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::onValueChanged( double ) +{ + displayPreview(); +} + +//================================================================================= +// function : displayPreview +// purpose : +//================================================================================= +void BasicGUI_MarkerDlg::displayPreview ( const bool activate, + const bool update, + const bool toRemoveFromEngine, + const double lineWidth ) +{ + if ( !myBlockPreview ) + { + GEOMBase_Skeleton::displayPreview( activate, update, toRemoveFromEngine, lineWidth ); + if ( myConstructorId == 0 ) + { + GEOMBase_Skeleton::activate( GEOM_MARKER ); + } + } +} + + + + + + + + + + + + + + diff --git a/src/BasicGUI/BasicGUI_MarkerDlg.h b/src/BasicGUI/BasicGUI_MarkerDlg.h new file mode 100644 index 000000000..127685c42 --- /dev/null +++ b/src/BasicGUI/BasicGUI_MarkerDlg.h @@ -0,0 +1,90 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : BasicGUI_MarkerDlg.h +// Author : Sergey LITONIN +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_Marker_H +#define DIALOGBOX_Marker_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1Sel_QTD.h" +#include "DlgRef_3Sel_QTD.h" + +#include + +class DlgRef_SpinBox; + +class BasicGUI_MarkerDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +private: + enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 }; + typedef QMap< int, DlgRef_SpinBox* > DataMap; + +public: + BasicGUI_MarkerDlg( QWidget*, SALOME_Selection* ); + virtual ~BasicGUI_MarkerDlg(); + void Init( SALOME_Selection* ); + +protected: + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + virtual void closeEvent( QCloseEvent* e ); + virtual void displayPreview ( const bool activate = false, + const bool update = true, + const bool toRemoveFromEngine = true, + const double lineWidth = -1 ); + +private : + void enterEvent( QEvent* e ); + void onSelectionDone0(); + +private slots: + void onOk(); + void onClose(); + bool onApply(); + void onActivate(); + void onDeactivate(); + void onSelectionDone(); + void onValueChanged( double ); + void ConstructorsClicked( int ); + void LineEditReturnPressed(); + void SetEditCurrentArgument(); + +private: + DataMap myData; + int myConstructorId; + int myBlockPreview; + + QGroupBox* aMainGrp; + DlgRef_1Sel_QTD* Group1; + DlgRef_3Sel_QTD* Group2; + +}; + +#endif // DIALOGBOX_Marker_H diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.cxx b/src/BasicGUI/BasicGUI_PlaneDlg.cxx index 6b3a77f8f..a8298c652 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_PlaneDlg.cxx @@ -27,16 +27,10 @@ // $Header$ #include "BasicGUI_PlaneDlg.h" - -#include -#include -#include -#include -#include -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" -#include "utilities.h" +#include "GEOMImpl_Types.hxx" using namespace std; @@ -47,11 +41,11 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_PV"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_DXYZ"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_3PNTS"))); QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PLANE_FACE"))); QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); @@ -63,37 +57,43 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(QWidget* parent, const char* name, BasicGUI RadioButton2->setPixmap(image1); RadioButton3->setPixmap(image2); - GroupPointDirection = new DlgRef_2Sel1Spin(this, "GroupPointDirection"); - GroupPointDirection->GroupBox1->setTitle(tr("GEOM_PLANE_PV")); - GroupPointDirection->TextLabel1->setText(tr("GEOM_POINT")); - GroupPointDirection->TextLabel2->setText(tr("GEOM_VECTOR")); - GroupPointDirection->TextLabel3->setText(tr("GEOM_PLANE_SIZE")); - GroupPointDirection->PushButton1->setPixmap(image3); - GroupPointDirection->PushButton2->setPixmap(image3); - - GroupPointPlusCoordinates = new DlgRef_1Sel4Spin(this, "GroupPointPlusCoordinates" ); - GroupPointPlusCoordinates->GroupBox1->setTitle(tr("GEOM_PLANE_PVC")); - GroupPointPlusCoordinates->TextLabel1->setText(tr("GEOM_POINT")); - GroupPointPlusCoordinates->TextLabel2->setText(tr("GEOM_COOR")); - GroupPointPlusCoordinates->TextLabel3->setText(tr("GEOM_DX")); - GroupPointPlusCoordinates->TextLabel4->setText(tr("GEOM_DY")); - GroupPointPlusCoordinates->TextLabel5->setText(tr("GEOM_DZ")); - GroupPointPlusCoordinates->TextLabel6->setText(tr("GEOM_PLANE_SIZE")); - GroupPointPlusCoordinates->PushButton1->setPixmap(image3); + GroupPntDir = new DlgRef_2Sel1Spin(this, "GroupPointDirection"); + GroupPntDir->GroupBox1->setTitle(tr("GEOM_PLANE_PV")); + GroupPntDir->TextLabel1->setText(tr("GEOM_POINT")); + GroupPntDir->TextLabel2->setText(tr("GEOM_VECTOR")); + GroupPntDir->TextLabel3->setText(tr("GEOM_PLANE_SIZE")); + GroupPntDir->PushButton1->setPixmap(image3); + GroupPntDir->PushButton2->setPixmap(image3); + GroupPntDir->LineEdit1->setReadOnly( true ); + GroupPntDir->LineEdit2->setReadOnly( true ); + + Group3Pnts = new DlgRef_3Sel1Spin(this, "Group3Pnts"); + Group3Pnts->GroupBox1->setTitle(tr("GEOM_3_POINTS")); + Group3Pnts->TextLabel1->setText(tr("GEOM_POINT1")); + Group3Pnts->TextLabel2->setText(tr("GEOM_POINT2")); + Group3Pnts->TextLabel3->setText(tr("GEOM_POINT3")); + Group3Pnts->TextLabel4->setText(tr("GEOM_PLANE_SIZE")); + Group3Pnts->PushButton1->setPixmap(image3); + Group3Pnts->PushButton2->setPixmap(image3); + Group3Pnts->PushButton3->setPixmap(image3); + + Group3Pnts->LineEdit1->setReadOnly( true ); + Group3Pnts->LineEdit2->setReadOnly( true ); + Group3Pnts->LineEdit3->setReadOnly( true ); GroupFace = new DlgRef_1Sel1Spin(this, "GroupFace"); GroupFace->GroupBox1->setTitle(tr("GEOM_FACE")); GroupFace->TextLabel1->setText(tr("GEOM_SELECTION")); GroupFace->TextLabel2->setText(tr("GEOM_PLANE_SIZE")); GroupFace->PushButton1->setPixmap(image3); + + GroupFace->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPointDirection, 1, 0); - Layout1->addWidget(GroupPointPlusCoordinates, 1, 0); - Layout1->addWidget(GroupFace, 1, 0); + Layout1->addWidget(GroupPntDir, 2, 0); + Layout1->addWidget(Group3Pnts, 2, 0); + Layout1->addWidget(GroupFace, 2, 0); /***************************************************************/ - /* Initialisation */ - myBasicGUI = theBasicGUI; Init(); } @@ -104,7 +104,6 @@ BasicGUI_PlaneDlg::BasicGUI_PlaneDlg(QWidget* parent, const char* name, BasicGUI //================================================================================= BasicGUI_PlaneDlg::~BasicGUI_PlaneDlg() { - /* no need to delete child widgets, Qt does it all for us */ } @@ -115,79 +114,63 @@ BasicGUI_PlaneDlg::~BasicGUI_PlaneDlg() void BasicGUI_PlaneDlg::Init() { /* init variables */ - myConstructorId = 0; - myEditCurrentArgument = GroupPointDirection->LineEdit1; + myEditCurrentArgument = GroupPntDir->LineEdit1; - myPoint1.SetCoord(0.0, 0.0, 0.0); - myOkPoint1 = myOkDirection = myOkCoordinates = myOkPlanarFace = false; + myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = myFace = GEOM::GEOM_Object::_nil(); - /* Filters definition */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - myFaceFilter = new GEOM_FaceFilter(StdSelect_Plane, myGeom); - /* Filter for the next selection */ - mySelection->AddFilter(myVertexFilter); + myGeomGUI->SetState( 0 ); /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); - this->myTrimSize = 2000.0; + double aStep = St.toDouble(); + double aTrimSize = 2000.0; /* min, max, step and decimals for spin boxes */ - GroupPointDirection->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, step, 3); - GroupPointDirection->SpinBox_DX->SetValue(myTrimSize); - - double SpecificStep = 1; - GroupPointPlusCoordinates->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); - GroupPointPlusCoordinates->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); - GroupPointPlusCoordinates->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); - GroupPointPlusCoordinates->SpinBox_DX->SetValue(0.0); - GroupPointPlusCoordinates->SpinBox_DY->SetValue(0.0); - GroupPointPlusCoordinates->SpinBox_DZ->SetValue(1.0); - GroupPointPlusCoordinates->SpinBox_S->RangeStepAndValidator(0.001, 10000000.0, step, 3); - GroupPointPlusCoordinates->SpinBox_S->SetValue(myTrimSize) ; - - GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, step, 3); - GroupFace->SpinBox_DX->SetValue(myTrimSize); + GroupPntDir->SpinBox_DX->RangeStepAndValidator( 0.001, 10000000.0, aStep, 3 ); + GroupPntDir->SpinBox_DX->SetValue( aTrimSize ); + Group3Pnts->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, aStep, 3); + Group3Pnts->SpinBox_DX->SetValue( aTrimSize ); + GroupFace->SpinBox_DX->RangeStepAndValidator(0.001, 10000000.0, aStep, 3); + GroupFace->SpinBox_DX->SetValue( aTrimSize ); /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); - connect(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int))); - - connect(GroupPointDirection->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPointDirection->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPointPlusCoordinates->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupFace->PushButton1, SIGNAL(clicked()), this, SLOT( SetEditCurrentArgument())); - - connect(GroupPointDirection->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPointDirection->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPointPlusCoordinates->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + + connect(GroupPntDir->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPntDir->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3Pnts->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupFace->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(GroupPntDir->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupPntDir->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3Pnts->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3Pnts->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3Pnts->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupFace->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPointPlusCoordinates->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPointPlusCoordinates->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPointPlusCoordinates->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPointPlusCoordinates->SpinBox_S, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPointDirection->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPntDir->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(Group3Pnts->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(GroupFace->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPointPlusCoordinates->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPointPlusCoordinates->SpinBox_DY, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPointPlusCoordinates->SpinBox_DZ, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPointPlusCoordinates->SpinBox_S, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPointDirection->SpinBox_DX, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPntDir->SpinBox_DX, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Pnts->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupFace->SpinBox_DX, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* Displays Dialog */ - GroupPointPlusCoordinates->hide(); - GroupFace->hide(); - GroupPointDirection->show(); - this->show(); + initName( tr( "GEOM_PLANE" ) ); - return ; + Group3Pnts->hide(); + GroupFace->hide(); + ConstructorsClicked( 0 ); } @@ -197,64 +180,60 @@ void BasicGUI_PlaneDlg::Init() //================================================================================= void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - myOkPoint1 = myOkDirection = myOkCoordinates = myOkPlanarFace = false; + disconnect(mySelection, 0, this, 0); + myPoint = myDir = myPoint1 = myPoint2 = myPoint3 = myFace = GEOM::GEOM_Object::_nil(); - switch (constructorId) - { + switch ( constructorId ) + { case 0: /* plane from a point and a direction (vector, edge...) */ { - GroupPointPlusCoordinates->hide(); - GroupFace->hide(); - resize(0, 0); - GroupPointDirection->show(); - - myEditCurrentArgument = GroupPointDirection->LineEdit1; - GroupPointDirection->LineEdit1->setText(tr("")); - GroupPointDirection->LineEdit2->setText(tr("")); - - /* for the first argument */ - mySelection->AddFilter(myVertexFilter); - break; + Group3Pnts->hide(); + GroupFace->hide(); + resize(0, 0); + GroupPntDir->show(); + + myEditCurrentArgument = GroupPntDir->LineEdit1; + GroupPntDir->LineEdit1->setText(tr("")); + GroupPntDir->LineEdit2->setText(tr("")); + + /* for the first argument */ + globalSelection( GEOM_POINT ); + break; } - case 1: /* plane from a point and vector coordinates */ + case 1: /* plane from 3 points */ { - GroupPointDirection->hide(); - GroupFace->hide(); - resize(0, 0); - GroupPointPlusCoordinates->show(); - - myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1; - GroupPointPlusCoordinates->LineEdit1->setText(tr("")); - GroupPointPlusCoordinates->SpinBox_DX->SetValue(0.0); - GroupPointPlusCoordinates->SpinBox_DY->SetValue(0.0); - GroupPointPlusCoordinates->SpinBox_DZ->SetValue(1.0); - myOkCoordinates = true; - - /* for the first argument */ - mySelection->AddFilter(myVertexFilter); - break; + GroupPntDir->hide(); + GroupFace->hide(); + resize(0, 0); + Group3Pnts->show(); + + myEditCurrentArgument = Group3Pnts->LineEdit1; + Group3Pnts->LineEdit1->setText(""); + Group3Pnts->LineEdit2->setText(""); + Group3Pnts->LineEdit3->setText(""); + + /* for the first argument */ + globalSelection( GEOM_POINT ); + break; } case 2: /* plane from a planar face selection */ { - GroupPointDirection->hide(); - GroupPointPlusCoordinates->hide(); - resize(0, 0); - GroupFace->show(); + GroupPntDir->hide(); + Group3Pnts->hide(); + resize(0, 0); + GroupFace->show(); - myEditCurrentArgument = GroupFace->LineEdit1; - GroupFace->LineEdit1->setText(tr("")); + myEditCurrentArgument = GroupFace->LineEdit1; + GroupFace->LineEdit1->setText(tr("")); - /* for the first argument */ - mySelection->AddFilter(myFaceFilter); - break; + /* for the first argument */ + globalSelection( GEOM_PLANE ); + break; } } - return; + + myEditCurrentArgument->setFocus(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } @@ -264,9 +243,8 @@ void BasicGUI_PlaneDlg::ConstructorsClicked(int constructorId) //================================================================================= void BasicGUI_PlaneDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return ; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -274,39 +252,24 @@ void BasicGUI_PlaneDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_PlaneDlg::ClickOnApply() +bool BasicGUI_PlaneDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - switch(myConstructorId) - { - case 0 : /* args are myPoint1 and myDx, myDy, myDz from a vector(edge) */ - { - if(myOkPoint1 && myOkDirection) - myBasicGUI->MakePlaneAndDisplay(myPoint1, myDx, myDy, myDz, myTrimSize); - break; - } - case 1 : /* args are myPoint1 and myDx, myDy, myDz from a Spin Box */ - { - if(myOkPoint1) - myBasicGUI->MakePlaneAndDisplay(myPoint1, myDx, myDy, myDz, myTrimSize); - break; - } - case 2 : /* arg is a planar face selection */ - { - if(myOkPlanarFace) - myBasicGUI->MakePlaneAndDisplay(myPoint1, myDx, myDy, myDz, myTrimSize); - break; - } - } - return; + initName(); + ConstructorsClicked( getConstructorId() ); + return true; } +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_PlaneDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} //================================================================================= // function : SelectionIntoArgument() @@ -314,104 +277,34 @@ void BasicGUI_PlaneDlg::ClickOnApply() //================================================================================= void BasicGUI_PlaneDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - QString aString = ""; + myEditCurrentArgument->setText(""); - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - switch (myConstructorId) - { - case 0: - { - if(myEditCurrentArgument == GroupPointDirection->LineEdit1) { - GroupPointDirection->LineEdit1->setText(""); - myOkPoint1 = false ; - } - else if(myEditCurrentArgument == GroupPointDirection->LineEdit2) { - GroupPointDirection->LineEdit2->setText(""); - myOkDirection = false ; - } - break; - } - case 1: - { - if(myEditCurrentArgument == GroupPointPlusCoordinates->LineEdit1) { - GroupPointPlusCoordinates->LineEdit1->setText("") ; - myOkPoint1 = false ; - } - break; - } - case 2: - { - if(myEditCurrentArgument == GroupFace->LineEdit1) { - GroupFace->LineEdit1->setText("") ; - if(aString.compare("") == 0) - myOkPlanarFace = false; - else - myOkPlanarFace = true; - } - break; - } - } - return ; + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) myPoint = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) myDir = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupFace->LineEdit1 ) myFace = GEOM::GEOM_Object::_nil(); + return; } - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return ; - - /* FIRST CONSTRUCTOR */ - if(myEditCurrentArgument == GroupPointDirection->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPointDirection->LineEdit1->setText(aString); - myOkPoint1 = true; - } - else if( myEditCurrentArgument == GroupPointDirection->LineEdit2) { - /* We verify if the selection is a linear edge */ - gp_Pnt Pfirst, Plast; - if( myGeomBase->LinearEdgeExtremities(S, Pfirst, Plast)) { - myGeomBase->GetBipointDxDyDz(Pfirst, Plast, myDx, myDy, myDz); - GroupPointDirection->LineEdit2->setText(aString); - myOkDirection = true; - myTrimSize = GroupPointDirection->SpinBox_DX->GetValue(); - } - } - - /* SECOND CONSTRUCTOR */ - else if(myEditCurrentArgument == GroupPointPlusCoordinates->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPointPlusCoordinates->LineEdit1->setText(aString); - /* Get arguments */ - myDx = GroupPointPlusCoordinates->SpinBox_DX->GetValue(); - myDy = GroupPointPlusCoordinates->SpinBox_DY->GetValue(); - myDz = GroupPointPlusCoordinates->SpinBox_DZ->GetValue(); - myTrimSize = GroupPointPlusCoordinates->SpinBox_S->GetValue(); - myOkPoint1 = true; - myOkCoordinates = true; - } - - /* THIRD CONSTRUCTOR */ - else if(myEditCurrentArgument == GroupFace->LineEdit1) { - if(myOkPlanarFace) { - GroupFace->LineEdit1->setText(aString); - BRepAdaptor_Surface surf(TopoDS::Face(S)); - gp_Pln Plane = surf.Plane(); - - gp_Pnt myPoint1 = Plane.Location(); - gp_Ax1 ax = Plane.Axis(); - myDx = (ax.Direction()).X(); - myDy = (ax.Direction()).Y(); - myDz = (ax.Direction()).Z(); - myTrimSize = GroupFace->SpinBox_DX->GetValue(); - } + // nbSel == 1 + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPntDir->LineEdit1 ) myPoint = aSelectedObject; + else if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) myDir = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit1 ) myPoint1 = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit2 ) myPoint2 = aSelectedObject; + else if ( myEditCurrentArgument == Group3Pnts->LineEdit3 ) myPoint3 = aSelectedObject; + else if ( myEditCurrentArgument == GroupFace->LineEdit1 ) myFace = aSelectedObject; } - /* Call method simulation */ - if((myOkPoint1 && myOkDirection) || (myOkPoint1 && myOkCoordinates) || myOkPlanarFace) { - if(myDx*myDx + myDy*myDy + myDz*myDz > Precision::Confusion()*Precision::Confusion()) - this->MakePlaneSimulationAndDisplay(); - } - return; + displayPreview(); } @@ -422,48 +315,24 @@ void BasicGUI_PlaneDlg::SelectionIntoArgument() void BasicGUI_PlaneDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - switch(myConstructorId) - { - case 0: - { - if(send == GroupPointDirection->PushButton1) { - GroupPointDirection->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPointDirection->LineEdit1; - mySelection->AddFilter(myVertexFilter); - } - else if(send == GroupPointDirection->PushButton2) { - GroupPointDirection->LineEdit2->setFocus(); - myEditCurrentArgument = GroupPointDirection->LineEdit2; - /* Edge filter here */ - mySelection->AddFilter(myEdgeFilter); - } - break; - } - case 1: - { - if(send == GroupPointPlusCoordinates->PushButton1) { - GroupPointPlusCoordinates->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1; - /* Vertex filter here */ - mySelection->AddFilter(myVertexFilter); - } - break; - } - case 2: - { - if(send == GroupFace->PushButton1) { - GroupFace->LineEdit1->setFocus(); - myEditCurrentArgument = GroupFace->LineEdit1; - /* Face filter here */ - mySelection->AddFilter(myFaceFilter); - } - break; - } - } - this->SelectionIntoArgument(); - return; + if ( send == GroupPntDir->PushButton1 ) myEditCurrentArgument = GroupPntDir->LineEdit1; + else if ( send == GroupPntDir->PushButton2 ) myEditCurrentArgument = GroupPntDir->LineEdit2; + else if ( send == Group3Pnts->PushButton1 ) myEditCurrentArgument = Group3Pnts->LineEdit1; + else if ( send == Group3Pnts->PushButton2 ) myEditCurrentArgument = Group3Pnts->LineEdit2; + else if ( send == Group3Pnts->PushButton3 ) myEditCurrentArgument = Group3Pnts->LineEdit3; + else if ( send == GroupFace->PushButton1 ) myEditCurrentArgument = GroupFace->LineEdit1; + + myEditCurrentArgument->setFocus(); + + if ( myEditCurrentArgument == GroupPntDir->LineEdit2 ) + globalSelection( GEOM_LINE ); + else if ( myEditCurrentArgument == GroupFace->LineEdit1 ) + globalSelection( GEOM_PLANE ); + else + globalSelection( GEOM_POINT ); + + SelectionIntoArgument(); } @@ -473,20 +342,17 @@ void BasicGUI_PlaneDlg::SetEditCurrentArgument() //================================================================================= void BasicGUI_PlaneDlg::LineEditReturnPressed() { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPointDirection->LineEdit1) - myEditCurrentArgument = GroupPointDirection->LineEdit1; - else if (send == GroupPointDirection->LineEdit2) - myEditCurrentArgument = GroupPointDirection->LineEdit2; - else if (send == GroupPointPlusCoordinates->LineEdit1) - myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1; - else if (send == GroupFace->LineEdit1) - myEditCurrentArgument = GroupFace->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return ; + QLineEdit* send = (QLineEdit*)sender(); + if ( send == GroupPntDir->LineEdit1 || + send == GroupPntDir->LineEdit2 || + send == Group3Pnts->LineEdit1 || + send == Group3Pnts->LineEdit2 || + send == Group3Pnts->LineEdit3 || + send == GroupFace->LineEdit1 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -498,35 +364,21 @@ void BasicGUI_PlaneDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - switch(myConstructorId) - { - case 0: - { - GroupPointDirection->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPointDirection->LineEdit1; - mySelection->AddFilter(myVertexFilter); - break; - } - case 1: - { - GroupPointPlusCoordinates->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPointPlusCoordinates->LineEdit1; - mySelection->AddFilter(myVertexFilter); - break; - } - case 2: - { - GroupFace->LineEdit1->setFocus(); - myEditCurrentArgument = GroupFace->LineEdit1; - mySelection->AddFilter(myFaceFilter); - break; - } - } - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + myGeomGUI->SetState( 0 ); + + ConstructorsClicked( getConstructorId() ); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_PlaneDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} //================================================================================= // function : enterEvent() @@ -534,10 +386,8 @@ void BasicGUI_PlaneDlg::ActivateThisDialog() //================================================================================= void BasicGUI_PlaneDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -547,46 +397,103 @@ void BasicGUI_PlaneDlg::enterEvent(QEvent* e) //================================================================================= void BasicGUI_PlaneDlg::ValueChangedInSpinBox(double newValue) { - QObject* send = (QObject*)sender(); - - if(send == GroupPointPlusCoordinates->SpinBox_DX) - myDx = newValue; - else if(send == GroupPointPlusCoordinates->SpinBox_DY) - myDy = newValue; - else if(send == GroupPointPlusCoordinates->SpinBox_DZ) - myDz = newValue; - else if(send == GroupPointDirection->SpinBox_DX || send == GroupPointPlusCoordinates->SpinBox_S || send == GroupFace->SpinBox_DX) { - myTrimSize = newValue; - } else - return; + displayPreview(); +} - if((myOkPoint1 && myOkDirection) || (myOkPoint1 && myOkCoordinates) || myOkPlanarFace) { - if(myDx*myDx + myDy*myDy + myDz*myDz > Precision::Confusion() * Precision::Confusion()) - this->MakePlaneSimulationAndDisplay(); +//================================================================================= +// function : getSize() +// purpose : +//================================================================================= +double BasicGUI_PlaneDlg::getSize() const +{ + switch ( getConstructorId() ) + { + case 0 : return GroupPntDir->SpinBox_DX->GetValue(); + case 1 : return Group3Pnts->SpinBox_DX->GetValue(); + case 2 : return GroupFace->SpinBox_DX->GetValue(); } - return; + return 0.; +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_PlaneDlg::createOperation() +{ + return getGeomEngine()->GetIBasicOperations( getStudyId() ); } +//================================================================================= +// function : isEqual +// purpose : it may also be needed to check for min distance between gp_Pnt-s... +//================================================================================= +static bool isEqual( const GEOM::GEOM_Object_var& thePnt1, const GEOM::GEOM_Object_var& thePnt2 ) +{ + return thePnt1->_is_equivalent( thePnt2 ); +} //================================================================================= -// function : MakePlaneSimulationAndDisplay(() +// function : isValid // purpose : //================================================================================= -void BasicGUI_PlaneDlg::MakePlaneSimulationAndDisplay() +bool BasicGUI_PlaneDlg::isValid( QString& msg ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - gp_Dir aDirection(myDx, myDy, myDz); - /* We make a trimmed plane */ - gp_Pln gplane(myPoint1, aDirection); - mySimulationTopoDs = BRepBuilderAPI_MakeFace(gplane, -myTrimSize, +myTrimSize, -myTrimSize, +myTrimSize); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE( "Exception catched in MakePlaneSimulation" << endl ); - return; + const int id = getConstructorId(); + if ( getSize() <= 0 ) + { + msg = QString( "Please, enter size greater than 0." ); + return false; + } + if ( id == 0 ) + return !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ); + else if ( id == 1 ) + return !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) && !CORBA::is_nil( myPoint3 ) && + !isEqual( myPoint1, myPoint2 ) && !isEqual( myPoint1, myPoint3 ) && !isEqual( myPoint2, myPoint3 ); + else if ( id == 2 ) + return !CORBA::is_nil( myFace ); + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_PlaneDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePlanePntVec( myPoint, myDir, getSize() ); + res = true; + break; + case 1 : + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePlaneThreePnt( myPoint1, myPoint2, myPoint3, getSize() ); + res = true; + break; + case 2 : + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePlaneFace( myFace, getSize() ); + res = true; + break; } - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_PlaneDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } + diff --git a/src/BasicGUI/BasicGUI_PlaneDlg.h b/src/BasicGUI/BasicGUI_PlaneDlg.h index d22895569..e333a91d8 100644 --- a/src/BasicGUI/BasicGUI_PlaneDlg.h +++ b/src/BasicGUI/BasicGUI_PlaneDlg.h @@ -30,14 +30,10 @@ #define DIALOGBOX_PLANE_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin.h" -#include "DlgRef_1Sel4Spin.h" #include "DlgRef_1Sel1Spin.h" +#include "DlgRef_2Sel1Spin.h" +#include "DlgRef_3Sel1Spin.h" -#include "BasicGUI.h" - -#include "GEOM_FaceFilter.hxx" -#include "GEOM_ShapeTypeFilter.hxx" //================================================================================= // class : BasicGUI_PlaneDlg @@ -48,42 +44,36 @@ class BasicGUI_PlaneDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_PlaneDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BasicGUI_PlaneDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BasicGUI_PlaneDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); private : void Init(); void enterEvent(QEvent* e); - void MakePlaneSimulationAndDisplay(); - - BasicGUI* myBasicGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filters selection */ - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; - Handle(GEOM_FaceFilter) myFaceFilter; - - gp_Pnt myPoint1; /* Point on the plane */ - - Standard_Real myDx; - Standard_Real myDy; - Standard_Real myDz; - Standard_Real myTrimSize; + double getSize() const; - bool myOkPoint1; /* true when argument is defined */ - bool myOkDirection; - bool myOkCoordinates; - bool myOkPlanarFace; + GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3, myFace; - DlgRef_2Sel1Spin* GroupPointDirection; - DlgRef_1Sel4Spin* GroupPointPlusCoordinates; + DlgRef_2Sel1Spin* GroupPntDir; + DlgRef_3Sel1Spin* Group3Pnts; DlgRef_1Sel1Spin* GroupFace; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void SelectionIntoArgument(); void LineEditReturnPressed(); void SetEditCurrentArgument(); diff --git a/src/BasicGUI/BasicGUI_PointDlg.cxx b/src/BasicGUI/BasicGUI_PointDlg.cxx index 52128eeac..d5f72b81b 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.cxx +++ b/src/BasicGUI/BasicGUI_PointDlg.cxx @@ -30,16 +30,22 @@ using namespace std; #include "BasicGUI_PointDlg.h" #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" +#include "QAD_Config.h" #include "OCCViewer_Viewer3d.h" -#include +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" + +#include +#include +#include +#include +#include #include -#include -#if OCC_VERSION_MAJOR >= 5 -#include -#else -#include -#endif + +#include //================================================================================= // class : BasicGUI_PointDlg() @@ -48,40 +54,72 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_PointDlg::BasicGUI_PointDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, const Handle (AIS_InteractiveContext)& ic, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) +BasicGUI_PointDlg::BasicGUI_PointDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, fl ) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT_EDGE"))); QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POINT_REF"))); setCaption(tr("GEOM_POINT_TITLE")); + QGroupBox* aFrame = new QGroupBox( 1, Qt::Horizontal, this ); + aFrame->setInsideMargin( 0 ); + aFrame->setFrameStyle( QFrame::NoFrame ); + /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_POINTS")); RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->close(TRUE); - - GroupPoints = new DlgRef_3Spin(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_COORDINATES")); - GroupPoints->TextLabel1->setText(tr("GEOM_X")); - GroupPoints->TextLabel2->setText(tr("GEOM_Y")); - GroupPoints->TextLabel3->setText(tr("GEOM_Z")); - - GroupDimensions = new DlgRef_1Sel1Spin(this, "GroupDimensions"); - GroupDimensions->GroupBox1->setTitle(tr("GEOM_PARAM_POINT")); - GroupDimensions->TextLabel1->setText(tr("GEOM_EDGE")); - GroupDimensions->TextLabel2->setText(tr("GEOM_PARAMETER")); - GroupDimensions->PushButton1->setPixmap(image2); - - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + RadioButton2->setPixmap(image3); + RadioButton3->setPixmap(image1); + + GroupXYZ = new DlgRef_3Spin( aFrame, "GroupXYZ" ); + GroupXYZ->GroupBox1->setTitle(tr("GEOM_COORDINATES")); + GroupXYZ->TextLabel1->setText(tr("GEOM_X")); + GroupXYZ->TextLabel2->setText(tr("GEOM_Y")); + GroupXYZ->TextLabel3->setText(tr("GEOM_Z")); + + GroupOnCurve = new DlgRef_1Sel1Spin( aFrame, "GroupOnCurve" ); + GroupOnCurve->GroupBox1->setTitle(tr("GEOM_PARAM_POINT")); + GroupOnCurve->TextLabel1->setText(tr("GEOM_EDGE")); + GroupOnCurve->TextLabel2->setText(tr("GEOM_PARAMETER")); + GroupOnCurve->PushButton1->setPixmap(image2); + + GroupRefPoint = new DlgRef_1Sel3Spin( aFrame, "GoupRefPoint" ); + GroupRefPoint->GroupBox1->setTitle(tr("GEOM_REF_POINT")); + GroupRefPoint->TextLabel1->setText(tr("GEOM_POINT")); + GroupRefPoint->PushButton1->setPixmap(image2); + GroupRefPoint->TextLabel2->setText(tr("GEOM_DX")); + GroupRefPoint->TextLabel3->setText(tr("GEOM_DY")); + GroupRefPoint->TextLabel4->setText(tr("GEOM_DZ")); + + Layout1->addWidget( aFrame, 2, 0 ); /***************************************************************/ - /* Initialisations */ - myBasicGUI = theBasicGUI; - Init(ic); + myCoordGrp = new QGroupBox( 2, Qt::Horizontal, tr( "GEOM_COORDINATES" ), aFrame ); + new QLabel( tr( "GEOM_X" ), myCoordGrp ); + myX = new QLineEdit( myCoordGrp ); + new QLabel( tr( "GEOM_Y" ), myCoordGrp ); + myY = new QLineEdit( myCoordGrp ); + new QLabel( tr( "GEOM_Z" ), myCoordGrp ); + myZ = new QLineEdit( myCoordGrp ); + + myX->setReadOnly( true ); + myY->setReadOnly( true ); + myZ->setReadOnly( true ); + + myX->setEnabled( false ); + myY->setEnabled( false ); + myZ->setEnabled( false ); + + QPalette aPal = myX->palette(); + aPal.setColor( QPalette::Disabled, QColorGroup::Text, QColor( 0, 0, 0 ) ) ; + myX->setPalette( aPal ); + myY->setPalette( aPal ); + myZ->setPalette( aPal ); + + Init(); } @@ -91,7 +129,6 @@ BasicGUI_PointDlg::BasicGUI_PointDlg(QWidget* parent, const char* name, BasicGUI //======================================================================= BasicGUI_PointDlg::~BasicGUI_PointDlg() { - /* no need to delete child widgets, Qt does it all for us */ } @@ -99,57 +136,41 @@ BasicGUI_PointDlg::~BasicGUI_PointDlg() // function : Init() // purpose : //================================================================================= -void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic) +void BasicGUI_PointDlg::Init() { - /* init variables */ - myConstructorId = 0; - myEditCurrentArgument = GroupDimensions->LineEdit1; + GroupOnCurve->LineEdit1->setReadOnly( true ); + GroupRefPoint->LineEdit1->setReadOnly( true ); - myIC = ic; - myParameter = 0.50; - myPoint.SetCoord(0.0, 0.0, 0.0); - myOkEdge = false; + myEdge = GEOM::GEOM_Object::_nil(); + myRefPoint = GEOM::GEOM_Object::_nil(); - myGeomGUI->myState = 0; + myEditCurrentArgument = 0; - /* Vertices Filter for all arguments */ - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); + myGeomGUI->SetState( 0 ); /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes */ - double specificStep = 0.1; - GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999999.99999, 999999.99999, specificStep, 5); - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DX->SetValue(myParameter); - GroupPoints->SpinBox_DX->SetValue(0.0); - GroupPoints->SpinBox_DY->SetValue(0.0); - GroupPoints->SpinBox_DZ->SetValue(0.0); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - myLocalContextId = myIC->OpenLocalContext(); - //myGeomBase->SetDisplayedObjectList(); - /* sub shapes selection */ - myLocalContextMode = TopAbs_VERTEX; - myIC->ActivateStandardMode(myLocalContextMode); - myUseLocalContext = true; - } - else - myUseLocalContext = false; - - TopoDS_Shape S; - bool displayPoint = true; - if(myGeomBase->GetTopoFromSelection(mySelection, S)) { - /* Filter a possibly previous selection and try to put it into coordinates */ - if(myGeomBase->VertexToPoint(S, myPoint)) - displayPoint = false; - } - this->PointIntoCoordinates(myPoint, displayPoint); - + GroupXYZ->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupXYZ->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupXYZ->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupXYZ->SpinBox_DX->SetValue(0.0); + GroupXYZ->SpinBox_DY->SetValue(0.0); + GroupXYZ->SpinBox_DZ->SetValue(0.0); + + GroupRefPoint->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupRefPoint->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupRefPoint->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupRefPoint->SpinBox_DX->SetValue(0.0); + GroupRefPoint->SpinBox_DY->SetValue(0.0); + GroupRefPoint->SpinBox_DZ->SetValue(0.0); + + step = 0.1; + GroupOnCurve->SpinBox_DX->RangeStepAndValidator(0., 1., step, 3); + GroupOnCurve->SpinBox_DX->SetValue( 0.5 ); + /* signals and slots connections */ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); @@ -159,27 +180,30 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic) connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); - connect(GroupDimensions->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupDimensions->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupOnCurve->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupOnCurve->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupOnCurve->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupXYZ->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupXYZ->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupXYZ->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupRefPoint->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupRefPoint->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupRefPoint->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DZ, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupOnCurve->SpinBox_DX, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupXYZ->SpinBox_DX, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupXYZ->SpinBox_DY, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupXYZ->SpinBox_DZ, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupRefPoint->SpinBox_DX, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupRefPoint->SpinBox_DY, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupRefPoint->SpinBox_DZ, SLOT(SetStep(double))); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); + initName( tr("GEOM_VERTEX") ); - return; + ConstructorsClicked( 0 ); } @@ -188,56 +212,64 @@ void BasicGUI_PointDlg::Init(const Handle(AIS_InteractiveContext)& ic) // purpose : Radio button management //================================================================================= void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) -{ - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - disconnect(mySelection, 0, this, 0); +{ + switch ( constructorId ) + { + case 0: + { + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); + + GroupRefPoint->hide(); + GroupOnCurve->hide(); - switch (constructorId) + GroupXYZ->show(); + + myCoordGrp->hide(); + break; + } + case 1: { - case 0: - { - if(myUseLocalContext == false && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - myLocalContextId = myIC->OpenLocalContext(); - //myGeomBase->SetDisplayedObjectList(); - /* sub shapes selection */ - myLocalContextMode = TopAbs_VERTEX; - myIC->ActivateStandardMode(myLocalContextMode); - myUseLocalContext = true; - } - - GroupDimensions->hide(); - resize(0, 0); - GroupPoints->show(); - - /* Display point simulation */ - PointIntoCoordinates(myPoint, true); - break; - } - case 1: - { - if(myUseLocalContext == true && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - - GroupPoints->hide(); - resize(0, 0); - GroupDimensions->show(); - - myEditCurrentArgument = GroupDimensions->LineEdit1; - GroupDimensions->LineEdit1->setText(""); - myOkEdge = false; - - /* filter for next selections */ - mySelection->AddFilter(myEdgeFilter); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - break; - } + myEditCurrentArgument = GroupRefPoint->LineEdit1; + myEditCurrentArgument->setText(""); + myRefPoint = GEOM::GEOM_Object::_nil(); + + globalSelection( GEOM_POINT ); + + GroupXYZ->hide(); + GroupOnCurve->hide(); + + GroupRefPoint->show(); + + myCoordGrp->show(); + break; } - return; + case 2: + { + myEditCurrentArgument = GroupOnCurve->LineEdit1; + myEditCurrentArgument->setText(""); + myEdge = GEOM::GEOM_Object::_nil(); + + globalSelection( GEOM_EDGE ); + + GroupXYZ->hide(); + GroupRefPoint->hide(); + + GroupOnCurve->show(); + + myCoordGrp->show(); + break; + } + } + + myX->setText( "" ); + myY->setText( "" ); + myZ->setText( "" ); + + qApp->processEvents(); + updateGeometry(); + resize( minimumSize() ); + + displayPreview(); } @@ -247,9 +279,8 @@ void BasicGUI_PointDlg::ConstructorsClicked(int constructorId) //================================================================================= void BasicGUI_PointDlg::ClickOnOk() { - this->ClickOnApply(); - this->ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -257,52 +288,14 @@ void BasicGUI_PointDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_PointDlg::ClickOnApply() +bool BasicGUI_PointDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if(mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - /* Close local context */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } + if ( !onAccept() ) + return false; - switch(myConstructorId) - { - case 0 : - { - /* Recup args and call method */ - double x = GroupPoints->SpinBox_DX->GetValue(); - double y = GroupPoints->SpinBox_DY->GetValue(); - double z = GroupPoints->SpinBox_DZ->GetValue(); - - myBasicGUI->MakePointAndDisplay(x,y,z); /* WARNING : no display if a local context is opened */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - /* no display if a local context is opened */ - myLocalContextId = myIC->OpenLocalContext(); - //myGeomBase->SetDisplayedObjectList(); - /* sub shapes selection */ - myLocalContextMode = TopAbs_VERTEX; - myIC->ActivateStandardMode(myLocalContextMode); - myUseLocalContext = true; - } - break; - } - case 1 : - { - if(myOkEdge == true) { - /* this constructor method has no idl interface : we use same than constructor 0 */ - myBasicGUI->MakePointAndDisplay(myPoint.X(), myPoint.Y(), myPoint.Z()); - } - break; - } - } - return; + initName(); + ConstructorsClicked( getConstructorId() ); + return true; } @@ -312,18 +305,7 @@ void BasicGUI_PointDlg::ClickOnApply() //======================================================================= void BasicGUI_PointDlg::ClickOnCancel() { - if(myConstructorId == 0 && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - if(myIC->HasOpenedContext()) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - } - - myGeomGUI->myState = -1; GEOMBase_Skeleton::ClickOnCancel(); - return; } @@ -333,32 +315,50 @@ void BasicGUI_PointDlg::ClickOnCancel() //================================================================================= void BasicGUI_PointDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - myOkEdge = false; - return; + const int id = getConstructorId(); + + if ( ( id == 1 || id == 2 ) && myEditCurrentArgument != 0 ) + { + myEditCurrentArgument->setText(""); + myX->setText( "" ); + myY->setText( "" ); + myZ->setText( "" ); + myRefPoint = myEdge = GEOM::GEOM_Object::_nil(); } - - // nbSel == 1 - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(S.ShapeType() == TopAbs_EDGE) { - if(CalculateVertexOnCurve(TopoDS::Edge(S), myParameter, mySimulationTopoDs)) { - if(myGeomBase->VertexToPoint(mySimulationTopoDs, myPoint)) { - GroupDimensions->LineEdit1->setText(aString); - myOkEdge = true; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + + if ( mySelection->IObjectCount() == 1 ) + { + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + if ( id == 0 ) + { + // get CORBA reference to data object + TopoDS_Shape aShape = GeometryGUI::GetGeomGUI()->GetShapeReader().GetShape( + GeometryGUI::GetGeomGUI()->GetGeomGen(), aSelectedObject ); + if ( !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) + { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + GroupXYZ->SpinBox_DX->SetValue( aPnt.X() ); + GroupXYZ->SpinBox_DY->SetValue( aPnt.Y() ); + GroupXYZ->SpinBox_DZ->SetValue( aPnt.Z() ); + } } - } + else if ( id == 1 ) + { + myRefPoint = aSelectedObject; + GroupRefPoint->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) ); + } + else if ( id == 2 ) + { + myEdge = aSelectedObject; + GroupOnCurve->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) ); + } + } } - return; + + displayPreview(); } @@ -369,13 +369,11 @@ void BasicGUI_PointDlg::SelectionIntoArgument() void BasicGUI_PointDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupDimensions->LineEdit1) - myEditCurrentArgument = GroupDimensions->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if ( send == GroupRefPoint->LineEdit1 || send == GroupOnCurve->LineEdit1 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -387,13 +385,20 @@ void BasicGUI_PointDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - if(send == GroupDimensions->PushButton1) { - GroupDimensions->LineEdit1->setFocus(); - myEditCurrentArgument = GroupDimensions->LineEdit1; - mySelection->AddFilter(myEdgeFilter); - this->SelectionIntoArgument(); + if ( send == GroupRefPoint->PushButton1 ) + { + GroupRefPoint->LineEdit1->setFocus(); + myEditCurrentArgument = GroupRefPoint->LineEdit1; + + globalSelection( GEOM_POINT ); + } + else if ( send == GroupOnCurve->PushButton1 ) + { + GroupOnCurve->LineEdit1->setFocus(); + myEditCurrentArgument = GroupOnCurve->LineEdit1; + + globalSelection( GEOM_EDGE ); } - return; } @@ -403,21 +408,8 @@ void BasicGUI_PointDlg::SetEditCurrentArgument() //================================================================================= void BasicGUI_PointDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} - - -//======================================================================= -// function : closeEvent() -// purpose : -//======================================================================= -void BasicGUI_PointDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - this->ClickOnCancel(); + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -428,26 +420,8 @@ void BasicGUI_PointDlg::closeEvent(QCloseEvent* e) void BasicGUI_PointDlg::ActivateThisDialog( ) { GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - myGeomGUI->myState = 0; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - myLocalContextId = myIC->OpenLocalContext(); - //myGeomBase->SetDisplayedObjectList(); - /* sub shapes selection */ - myLocalContextMode = TopAbs_VERTEX; - myIC->ActivateStandardMode(myLocalContextMode); - myUseLocalContext = true; - } - - if(myConstructorId == 1) - mySelection->AddFilter(myEdgeFilter); - - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + myGeomGUI->SetState( 0 ); + ConstructorsClicked( getConstructorId() ); } @@ -457,13 +431,8 @@ void BasicGUI_PointDlg::ActivateThisDialog( ) //================================================================================= void BasicGUI_PointDlg::DeactivateActiveDialog() { - if(myConstructorId == 0 && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - myGeomGUI->myState = -1; + myGeomGUI->SetState( -1 ); GEOMBase_Skeleton::DeactivateActiveDialog(); - return; } @@ -473,95 +442,127 @@ void BasicGUI_PointDlg::DeactivateActiveDialog() //================================================================================= void BasicGUI_PointDlg::ValueChangedInSpinBox(double newValue) { - DlgRef_SpinBox* send = (DlgRef_SpinBox*)sender(); - double vx, vy, vz; - - if(send == GroupPoints->SpinBox_DX) { - vx = newValue; - vy = GroupPoints->SpinBox_DY->GetValue(); - vz = GroupPoints->SpinBox_DZ->GetValue(); - } else if(send == GroupPoints->SpinBox_DY) { - vx = GroupPoints->SpinBox_DX->GetValue(); - vy = newValue; - vz = GroupPoints->SpinBox_DZ->GetValue(); - } else if(send == GroupPoints->SpinBox_DZ) { - vx = GroupPoints->SpinBox_DX->GetValue(); - vy = GroupPoints->SpinBox_DY->GetValue(); - vz = newValue; - } else if(send == GroupDimensions->SpinBox_DX) { - myParameter = newValue; - } else - return; - - switch(myConstructorId) - { - case 0: // default constructor - { - myPoint.SetCoord(vx, vy, vz); - mySimulationTopoDs = BRepBuilderAPI_MakeVertex (myPoint).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - break; - } - case 1: - { - this->SelectionIntoArgument(); - break; - } - } - return; + displayPreview(); } +//======================================================================= +// funcion : getParameter() +// purpose : +//======================================================================= +double BasicGUI_PointDlg::getParameter() const +{ + return GroupOnCurve->SpinBox_DX->GetValue(); +} //================================================================================= -// function : CalculateVertexOnCurve() -// purpose : Calculate a Vertex on the curve given by 'anEdge'. -// : The position of resultVertex is given by aParameter. -// : For a linear edge, aParameter=0.0 gives the first vertex of edge -// : aParameter=1.0 gives the last vertex of edge -// : aParameter=0.5 gives the vertex on the middle of edge -// : It is possible to get vertices out of edge using values > 1.0 or < 0.0 +// function : OnPointSelected +// purpose : //================================================================================= -bool BasicGUI_PointDlg::CalculateVertexOnCurve(const TopoDS_Edge& anEdge, const Standard_Real aParameter, TopoDS_Shape& resultVertex) +void BasicGUI_PointDlg::OnPointSelected( const gp_Pnt& thePnt ) { -#if OCC_VERSION_MAJOR >= 5 - if(anEdge.IsNull() || !BRepAlgo::IsValid(anEdge)) -#else - if(anEdge.IsNull() || !BRepAlgoAPI::IsValid(anEdge)) -#endif - return false; + if ( getConstructorId() == 0 ) + { + GroupXYZ->SpinBox_DX->SetValue( thePnt.X() ); + GroupXYZ->SpinBox_DY->SetValue( thePnt.Y() ); + GroupXYZ->SpinBox_DZ->SetValue( thePnt.Z() ); - Standard_Real first, last; - Handle(Geom_Curve) curv = BRep_Tool::Curve(anEdge, first, last); - if(!curv->IsCN(0)) - return false; - - Standard_Real param; - if(anEdge.Orientation() == TopAbs_FORWARD) - param = first + (last-first) * aParameter; - else - param = last + (first-last) * aParameter; - - gp_Pnt paramPoint; - curv->D0(param, paramPoint); - resultVertex = BRepBuilderAPI_MakeVertex(paramPoint); - return true; + displayPreview(); + } } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BasicGUI_PointDlg::createOperation() +{ + return getGeomEngine()->GetIBasicOperations( getStudyId() ); +} -//======================================================================= -// funcion : PointIntoCoordinates() -// purpose : Sets user point coordinates into this dialog Spin boxes -// : and displays it or not according to 'bool displayPoint' -//======================================================================= -void BasicGUI_PointDlg::PointIntoCoordinates(gp_Pnt P, bool displayPoint) +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BasicGUI_PointDlg::isValid( QString& msg ) { - GroupPoints->SpinBox_DX->SetValue(P.X()); - GroupPoints->SpinBox_DY->SetValue(P.Y()); - GroupPoints->SpinBox_DZ->SetValue(P.Z()); - myPoint.SetCoord(P.X(), P.Y(), P.Z()); - if(displayPoint) { - mySimulationTopoDs = BRepBuilderAPI_MakeVertex(P).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + const int id = getConstructorId(); + if ( id == 0 ) + return true; + else if ( id == 1 ) + return !myRefPoint->_is_nil(); + else if ( id == 2 ) + return !myEdge->_is_nil(); + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BasicGUI_PointDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + double x = GroupXYZ->SpinBox_DX->GetValue(); + double y = GroupXYZ->SpinBox_DY->GetValue(); + double z = GroupXYZ->SpinBox_DZ->GetValue(); + + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointXYZ( x,y,z ); + res = true; + break; + } + case 1 : + { + double dx = GroupRefPoint->SpinBox_DX->GetValue(); + double dy = GroupRefPoint->SpinBox_DY->GetValue(); + double dz = GroupRefPoint->SpinBox_DZ->GetValue(); + + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointWithReference( myRefPoint, dx, dy, dz ); + res = true; + break; + } + case 2 : + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakePointOnCurve( myEdge, getParameter() ); + res = true; + break; } - return; + + if ( getConstructorId() == 1 || getConstructorId() == 2 ) + { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( anObj, aShape ) && !aShape.IsNull() && aShape.ShapeType() == TopAbs_VERTEX ) + { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + myX->setText( QString( "%1" ).arg( aPnt.X() ) ); + myY->setText( QString( "%1" ).arg( aPnt.Y() ) ); + myZ->setText( QString( "%1" ).arg( aPnt.Z() ) ); + } + else + { + myX->setText( "" ); + myY->setText( "" ); + myZ->setText( "" ); + } + } + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_PointDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } diff --git a/src/BasicGUI/BasicGUI_PointDlg.h b/src/BasicGUI/BasicGUI_PointDlg.h index 2ee583633..48b248db8 100644 --- a/src/BasicGUI/BasicGUI_PointDlg.h +++ b/src/BasicGUI/BasicGUI_PointDlg.h @@ -32,11 +32,10 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Spin.h" #include "DlgRef_3Spin.h" +#include "DlgRef_1Sel3Spin.h" -#include "BasicGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" -#include +class QLineEdit; +class QGroupBox; //================================================================================= // class : BasicGUI_PointDlg @@ -47,38 +46,42 @@ class BasicGUI_PointDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_PointDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, const Handle(AIS_InteractiveContext)& ic = 0, bool modal = FALSE, WFlags fl = 0); + BasicGUI_PointDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BasicGUI_PointDlg(); + + bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }; + void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress() -private : - void Init(const Handle(AIS_InteractiveContext)& ic); - void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); - BasicGUI* myBasicGUI; + virtual void closeEvent( QCloseEvent* e ); - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* filter for selection */ +private : + void Init(); + void enterEvent(QEvent* e); + double getParameter() const; - gp_Pnt myPoint; /* Is 'mySimulationTopoDs' */ - bool myOkEdge; /* true when an edge is selected by user */ - double myParameter; /* Parameter used to create a vertex on edge (point on curve) */ + GEOM::GEOM_Object_var myEdge; + GEOM::GEOM_Object_var myRefPoint; - /* Interactive and local context management see also : bool UseLocalContext() */ - Handle(AIS_InteractiveContext) myIC; /* Interactive context from IAPP */ - Standard_Integer myLocalContextId; /* identify a local context for this method */ - TopAbs_ShapeEnum myLocalContextMode; /* identify a selection mode into local context */ - bool myUseLocalContext; /* true when method as opened a local context */ + DlgRef_3Spin* GroupXYZ; + DlgRef_1Sel3Spin* GroupRefPoint; + DlgRef_1Sel1Spin* GroupOnCurve; - DlgRef_1Sel1Spin* GroupDimensions; - DlgRef_3Spin* GroupPoints; + QGroupBox* myCoordGrp; + QLineEdit* myX; + QLineEdit* myY; + QLineEdit* myZ; private slots: void ClickOnOk(); void ClickOnCancel(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void DeactivateActiveDialog(); void LineEditReturnPressed(); @@ -86,16 +89,6 @@ private slots: void SetEditCurrentArgument(); void ConstructorsClicked(int constructorId); void ValueChangedInSpinBox(double newValue); - - bool CalculateVertexOnCurve(const TopoDS_Edge& anEdge, - const Standard_Real aParameter, - TopoDS_Shape& resultVertex); - -public: - void PointIntoCoordinates(gp_Pnt P, bool displayPoint); - /* return true if method has opened a local context */ - bool UseLocalContext(){return myUseLocalContext;}; - }; #endif // DIALOGBOX_POINT_H diff --git a/src/BasicGUI/BasicGUI_VectorDlg.cxx b/src/BasicGUI/BasicGUI_VectorDlg.cxx index 03baf4300..0af637cb3 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.cxx +++ b/src/BasicGUI/BasicGUI_VectorDlg.cxx @@ -29,12 +29,12 @@ using namespace std; #include "BasicGUI_VectorDlg.h" +#include "QAD_Desktop.h" #include "QAD_Config.h" -#include -#include -#include -#include -#include + +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" //================================================================================= // class : BasicGUI_VectorDlg() @@ -43,8 +43,8 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BasicGUI_VectorDlg::BasicGUI_VectorDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +BasicGUI_VectorDlg::BasicGUI_VectorDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, fl ) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_VECTOR_2P"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_VECTOR_DXYZ"))); @@ -65,6 +65,9 @@ BasicGUI_VectorDlg::BasicGUI_VectorDlg(QWidget* parent, const char* name, BasicG GroupPoints->PushButton1->setPixmap(image2); GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + GroupDimensions = new DlgRef_3Spin1Check(this, "GroupDimensions"); GroupDimensions->GroupBox1->setTitle(tr("GEOM_COORDINATES")); GroupDimensions->TextLabel1->setText(tr("GEOM_DX")); @@ -72,12 +75,11 @@ BasicGUI_VectorDlg::BasicGUI_VectorDlg(QWidget* parent, const char* name, BasicG GroupDimensions->TextLabel3->setText(tr("GEOM_DZ")); GroupDimensions->CheckBox1->setText(tr("GEOM_REVERSE_VECTOR")); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ /* Initialisations */ - myBasicGUI = theBasicGUI; Init(); } @@ -88,7 +90,6 @@ BasicGUI_VectorDlg::BasicGUI_VectorDlg(QWidget* parent, const char* name, BasicG //================================================================================= BasicGUI_VectorDlg::~BasicGUI_VectorDlg() { - /* no need to delete child widgets, Qt does it all for us */ } @@ -99,36 +100,32 @@ BasicGUI_VectorDlg::~BasicGUI_VectorDlg() void BasicGUI_VectorDlg::Init() { /* init variables */ - myConstructorId = 0; myEditCurrentArgument = GroupPoints->LineEdit1; - myDx = 0.0; - myDy = 0.0; - myDz = 200.0; - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(0.0, 0.0, 0.0); - myOkPoint1 = myOkPoint2 = false; - - /* Vertices Filter for all arguments */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + myPoint1 = GEOM::GEOM_Object::_nil(); + myPoint2 = GEOM::GEOM_Object::_nil(); /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes */ GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupDimensions->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupDimensions->SpinBox_DX->SetValue(myDx); - GroupDimensions->SpinBox_DY->SetValue(myDy); - GroupDimensions->SpinBox_DZ->SetValue(myDz); + double dx( 0. ), dy( 0. ), dz( 200. ); + GroupDimensions->SpinBox_DX->SetValue( dx ); + GroupDimensions->SpinBox_DY->SetValue( dy ); + GroupDimensions->SpinBox_DZ->SetValue( dz ); GroupDimensions->CheckBox1->setChecked(FALSE); /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); @@ -151,12 +148,10 @@ void BasicGUI_VectorDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); + initName( tr("GEOM_VECTOR") ); - return; + GroupDimensions->hide(); + ConstructorsClicked( 0 ); } @@ -164,13 +159,11 @@ void BasicGUI_VectorDlg::Init() // function : ConstructorsClicked() // purpose : Radio button management //================================================================================= -void BasicGUI_VectorDlg::ConstructorsClicked(int constructorId) +void BasicGUI_VectorDlg::ConstructorsClicked( int constructorId ) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); disconnect(mySelection, 0, this, 0); - myOkPoint1 = myOkPoint2 = false; + myPoint1 = GEOM::GEOM_Object::_nil(); + myPoint2 = GEOM::GEOM_Object::_nil(); switch (constructorId) { @@ -184,8 +177,7 @@ void BasicGUI_VectorDlg::ConstructorsClicked(int constructorId) GroupPoints->LineEdit1->setText(""); GroupPoints->LineEdit2->setText(""); - /* filter for next selection */ - mySelection->AddFilter(myVertexFilter); + globalSelection( GEOM_POINT ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } @@ -194,28 +186,18 @@ void BasicGUI_VectorDlg::ConstructorsClicked(int constructorId) GroupPoints->hide(); resize( 0, 0 ); GroupDimensions->show(); + + double dx( 0. ), dy( 0. ), dz( 0. ); + GroupDimensions->SpinBox_DX->SetValue( dx ); + GroupDimensions->SpinBox_DY->SetValue( dy ); + GroupDimensions->SpinBox_DZ->SetValue( dz ); - myDx = 0.0; - myDy = 0.0; - myDz = 200.0; - - GroupDimensions->SpinBox_DX->SetValue(myDx); - GroupDimensions->SpinBox_DY->SetValue(myDy); - GroupDimensions->SpinBox_DZ->SetValue(myDz); - - myPoint1.SetCoord(0.0, 0.0, 0.0) ; - myPoint2.SetCoord(myDx, myDy, myDz); - - GroupDimensions->CheckBox1->setChecked(FALSE); - - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(myPoint1, myPoint2).Shape(); - /* Add arrow in simulation */ - bool noNeedToTest = AddArrowToSimulation(mySimulationTopoDs); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + GroupDimensions->CheckBox1->setChecked( FALSE ); break; } } - return; + + displayPreview(); } @@ -225,46 +207,34 @@ void BasicGUI_VectorDlg::ConstructorsClicked(int constructorId) //================================================================================= void BasicGUI_VectorDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_VectorDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_VectorDlg::ClickOnApply() +bool BasicGUI_VectorDlg::ClickOnApply() { buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - switch(myConstructorId) - { - case 0 : - { - if(myOkPoint1 && myOkPoint2) - myBasicGUI->MakeVectorAndDisplay(myPoint1, myPoint2); - break ; - } - case 1 : - { - /* Recup args and call method */ - myDx = GroupDimensions->SpinBox_DX->GetValue(); - myDy = GroupDimensions->SpinBox_DY->GetValue(); - myDz = GroupDimensions->SpinBox_DZ->GetValue(); - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(myDx, myDy, myDz); - myBasicGUI->MakeVectorAndDisplay(myPoint1, myPoint2); - break; - } - } - return; + + if ( !onAccept() ) + return false; + + initName(); + if ( getConstructorId() != 1 ) + ConstructorsClicked( getConstructorId() ); + return true; } @@ -274,40 +244,28 @@ void BasicGUI_VectorDlg::ClickOnApply() //================================================================================= void BasicGUI_VectorDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if (myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if ( myEditCurrentArgument == GroupPoints->LineEdit2) - myOkPoint2 = false; - return; - } - // nbSel == 1 - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + myPoint1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) + myPoint2 = GEOM::GEOM_Object::_nil(); return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - myEditCurrentArgument->setText(aString); - myOkPoint1 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->VertexToPoint(S, myPoint2)) { - myEditCurrentArgument->setText(aString); - myOkPoint2 = true; } - if(myOkPoint1 && myOkPoint2 && myPoint1.Distance(myPoint2) > Precision::Confusion()) { - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(myPoint1, myPoint2).Shape(); - /* Add arrow in simulation */ - bool noNeedToTest = this->AddArrowToSimulation(mySimulationTopoDs); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + // nbSel == 1 + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myPoint1 = aSelectedObject; + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myPoint2 = aSelectedObject; } - return; + + displayPreview(); } @@ -317,23 +275,11 @@ void BasicGUI_VectorDlg::SelectionIntoArgument() //================================================================================= void BasicGUI_VectorDlg::SetEditCurrentArgument() { - if(myConstructorId != 0) - return; - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit2; - } - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); - - return; + if ( send == GroupPoints->PushButton1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->PushButton2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -344,15 +290,10 @@ void BasicGUI_VectorDlg::SetEditCurrentArgument() void BasicGUI_VectorDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - + if ( send == GroupPoints->LineEdit1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->LineEdit2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + else return; GEOMBase_Skeleton::LineEditReturnPressed(); - return; } @@ -364,13 +305,19 @@ void BasicGUI_VectorDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 0) - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_VectorDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} //================================================================================= // function : enterEvent() @@ -378,91 +325,84 @@ void BasicGUI_VectorDlg::ActivateThisDialog() //================================================================================= void BasicGUI_VectorDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } - //================================================================================= // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void BasicGUI_VectorDlg::ValueChangedInSpinBox(double newValue) +void BasicGUI_VectorDlg::ValueChangedInSpinBox( double newValue ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - QObject* send = (QObject*)sender(); - - if(send == GroupDimensions->SpinBox_DX) - myDx = newValue; - else if (send == GroupDimensions->SpinBox_DY) - myDy = newValue; - else if (send == GroupDimensions->SpinBox_DZ) - myDz = newValue; - - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(myDx, myDy, myDz); - - if(myPoint1.Distance(myPoint2) > Precision::Confusion()) { // mySimulationTopoDs - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(myPoint1, myPoint2).Shape(); - /* Create simulation vector with an arrow */ - this->AddArrowToSimulation(mySimulationTopoDs); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - return; + displayPreview(); } +//================================================================================= +// function : ReverseVector() +// purpose : 'state' not used here +//================================================================================= +void BasicGUI_VectorDlg::ReverseVector(int state) +{ + double dx = -GroupDimensions->SpinBox_DX->GetValue(); + double dy = -GroupDimensions->SpinBox_DY->GetValue(); + double dz = -GroupDimensions->SpinBox_DZ->GetValue(); + + GroupDimensions->SpinBox_DX->SetValue( dx ); + GroupDimensions->SpinBox_DY->SetValue( dy ); + GroupDimensions->SpinBox_DZ->SetValue( dz ); + + displayPreview(); +} //================================================================================= -// function : AddArrowToSimulation() -// purpose : An arrow (cone topology) is added to 'modifiedShape' -// : to simulate a vector or an 'oriented line' display. The result is in 'modifiedShape'. -// : If an arrow can't be added returns false and 'modifiedShape' isn't modified ! +// function : createOperation +// purpose : //================================================================================= -bool BasicGUI_VectorDlg::AddArrowToSimulation(TopoDS_Shape& modifiedShape) +GEOM::GEOM_IOperations_ptr BasicGUI_VectorDlg::createOperation() { - TopoDS_Shape arrow; - /* Try to add a cone simulation shape to show direction of a linear edge */ - if(myGeomBase->CreateArrowForLinearEdge(modifiedShape, arrow)) { - TopoDS_Compound Comp; - BRep_Builder B; - B.MakeCompound (Comp); - B.Add(Comp, modifiedShape); - B.Add(Comp, arrow); - modifiedShape = Comp; - return true; - } - return false; + return getGeomEngine()->GetIBasicOperations( getStudyId() ); } +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BasicGUI_VectorDlg::isValid( QString& msg ) +{ + return getConstructorId() == 0 ? !myPoint1->_is_nil() && !myPoint2->_is_nil(): true; +} //================================================================================= -// function : ReverseVector() -// purpose : 'state' not used here +// function : execute +// purpose : //================================================================================= -void BasicGUI_VectorDlg::ReverseVector(int state) +bool BasicGUI_VectorDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - myDx = -myDx; - GroupDimensions->SpinBox_DX->SetValue(myDx); - myDy = -myDy; - GroupDimensions->SpinBox_DY->SetValue(myDy); - myDz = -myDz; - GroupDimensions->SpinBox_DZ->SetValue(myDz); - - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(myDx, myDy, myDz); + bool res = false; - /* In the appropriate constructor */ - if(myPoint1.Distance(myPoint2) > Precision::Confusion()) { - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(myPoint1, myPoint2).Shape(); - /* Add arrow in simulation */ - bool noNeedToTest = this->AddArrowToSimulation(mySimulationTopoDs); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) { + case 0 : + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorTwoPnt( myPoint1, myPoint2 ); + res = true; + break; + + case 1 : + { + double dx = GroupDimensions->SpinBox_DX->GetValue(); + double dy = GroupDimensions->SpinBox_DY->GetValue(); + double dz = GroupDimensions->SpinBox_DZ->GetValue(); + anObj = GEOM::GEOM_IBasicOperations::_narrow( getOperation() )->MakeVectorDXDYDZ( dx,dy,dz ); + res = true; + break; + } } - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; } + diff --git a/src/BasicGUI/BasicGUI_VectorDlg.h b/src/BasicGUI/BasicGUI_VectorDlg.h index 41636b165..02c5e0ef2 100644 --- a/src/BasicGUI/BasicGUI_VectorDlg.h +++ b/src/BasicGUI/BasicGUI_VectorDlg.h @@ -45,35 +45,33 @@ class BasicGUI_VectorDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_VectorDlg(QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BasicGUI_VectorDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BasicGUI_VectorDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); private : void Init(); void enterEvent(QEvent* e); - bool AddArrowToSimulation(TopoDS_Shape& modifiedShape); - BasicGUI* myBasicGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */ - - gp_Pnt myPoint1; /* Points containing the vector */ - gp_Pnt myPoint2; - bool myOkPoint1; /* Are true when myPoint is defined */ - bool myOkPoint2; - double myDx; - double myDy; - double myDz; + GEOM::GEOM_Object_var myPoint1; + GEOM::GEOM_Object_var myPoint2; DlgRef_2Sel_QTD* GroupPoints; DlgRef_3Spin1Check* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx index 515269302..991fc997a 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.cxx @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -28,56 +28,91 @@ using namespace std; #include "BasicGUI_WorkingPlaneDlg.h" -#include -#include +#include "GEOMBase.h" + +#include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewPort3d.h" +#include "QAD_StudyFrame.h" +#include "QAD_RightFrame.h" +#include "QAD_Desktop.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include +#include + +#include "GEOMImpl_Types.hxx" + +#include //================================================================================= // class : BasicGUI_WorkingPlaneDlg() -// purpose : Constructs a BasicGUI_WorkingPlaneDlg which is a child of 'parent', with the +// purpose : Constructs a BasicGUI_WorkingPlaneDlg 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. //================================================================================= -BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(QWidget* parent, const char* name, BasicGUI* theBasicGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BasicGUI_WorkingPlaneDlg::BasicGUI_WorkingPlaneDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_FACE"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_FACE"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_VECTOR"))); + QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WPLANE_ORIGIN"))); setCaption(tr("GEOM_WPLANE_TITLE")); - + /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_WPLANE")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupWPlane = new DlgRef_1Sel_QTD(this, "GroupWPlane"); - GroupWPlane->GroupBox1->setTitle(tr("GEOM_WPLANE_FACE")); - GroupWPlane->TextLabel1->setText(tr("GEOM_SELECTION")); - GroupWPlane->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupWPlane, 1, 0); + RadioButton1->setPixmap(image1); + RadioButton2->setPixmap(image2); + RadioButton3->setPixmap(image3); + + Group1 = new DlgRef_1Sel_QTD(this, "Group1"); + Group1->GroupBox1->setTitle(tr("GEOM_WPLANE_FACE")); + Group1->TextLabel1->setText(tr("GEOM_SELECTION")); + Group1->PushButton1->setPixmap(image0); + Group1->LineEdit1->setReadOnly( true ); + + Group2 = new DlgRef_2Sel_QTD(this, "Group2"); + Group2->GroupBox1->setTitle(tr("GEOM_WPLANE_VECTOR")); + Group2->TextLabel1->setText(tr("GEOM_WPLANE_VX")); + Group2->TextLabel2->setText(tr("GEOM_WPLANE_VZ")); + Group2->PushButton1->setPixmap(image0); + Group2->PushButton2->setPixmap(image0); + Group2->LineEdit1->setReadOnly( true ); + Group2->LineEdit2->setReadOnly( true ); + + Group3 = new DlgRef_3Check_QTD(this, "Group3"); + Group3->GroupBox1->setTitle(tr("GEOM_WPLANE_ORIGIN")); + Group3->RadioButton1->setText(tr("GEOM_WPLANE_OXY")); + Group3->RadioButton2->setText(tr("GEOM_WPLANE_OYZ")); + Group3->RadioButton3->setText(tr("GEOM_WPLANE_OZX")); + + Layout1->addWidget(Group1, 1, 0); + Layout1->addWidget(Group2, 1, 0); + Layout1->addWidget(Group3, 1, 0); /***************************************************************/ - /* Initialisation */ - myBasicGUI = theBasicGUI; Init(); } - //================================================================================= // function : ~BasicGUI_WorkingPlaneDlg() // purpose : Destroys the object and frees any allocated resources //================================================================================= BasicGUI_WorkingPlaneDlg::~BasicGUI_WorkingPlaneDlg() { - // no need to delete child widgets, Qt does it all for us } - //================================================================================= // function : Init() // purpose : @@ -85,30 +120,113 @@ BasicGUI_WorkingPlaneDlg::~BasicGUI_WorkingPlaneDlg() void BasicGUI_WorkingPlaneDlg::Init() { /* init variables */ - myEditCurrentArgument = GroupWPlane->LineEdit1; + myEditCurrentArgument = Group1->LineEdit1; + myWPlane = GeometryGUI::GetGeomGUI()->GetWorkingPlane(); + + myGeomGUI->SetState( 0 ); - myOkPlane = false; + myFace = GEOM::GEOM_Object::_nil(); + myVectX = GEOM::GEOM_Object::_nil(); + myVectZ = GEOM::GEOM_Object::_nil(); + + aOriginType = 1; /* Filter definition */ - myFaceFilter = new GEOM_FaceFilter(StdSelect_Plane, myGeom); - mySelection->AddFilter(myFaceFilter); /* filter for next selection */ + globalSelection( GEOM_PLANE ); /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); + connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupWPlane->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupWPlane->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group2->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(Group3->GroupBox1, SIGNAL(clicked(int)), this, SLOT(GroupClicked(int))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupWPlane->show(); - this->show(); + initName( tr( "GEOM_WPLANE" ) ); + ConstructorsClicked(0); +} - return; +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BasicGUI_WorkingPlaneDlg::ConstructorsClicked(int constructorId) +{ + disconnect(mySelection, 0, this, 0); + myGeomGUI->SetState( 0 ); + + switch (constructorId) + { + case 0: + { + globalSelection( GEOM_PLANE ); + + Group2->hide(); + Group3->hide(); + resize(0, 0); + Group1->show(); + + myEditCurrentArgument = Group1->LineEdit1; + Group1->LineEdit1->setText(""); + myFace = GEOM::GEOM_Object::_nil(); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + break; + } + case 1: + { + globalSelection( GEOM_LINE ); + + Group1->hide(); + Group3->hide(); + resize(0, 0); + Group2->show(); + + myEditCurrentArgument = Group2->LineEdit1; + Group2->LineEdit1->setText(""); + Group2->LineEdit2->setText(""); + myVectX = GEOM::GEOM_Object::_nil(); + myVectZ = GEOM::GEOM_Object::_nil(); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + break; + } + case 2: + { + Group1->hide(); + Group2->hide(); + resize(0, 0); + Group3->show(); + + Group3->RadioButton1->setChecked(true); + aOriginType = 1; + break; + } + } + displayPreview(); } +//================================================================================= +// function : GroupClicked() +// purpose : Radio button management +//================================================================================= +void BasicGUI_WorkingPlaneDlg::GroupClicked(int groupId) +{ + aOriginType = groupId; +} //================================================================================= // function : ClickOnOk() @@ -116,26 +234,103 @@ void BasicGUI_WorkingPlaneDlg::Init() //================================================================================= void BasicGUI_WorkingPlaneDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BasicGUI_WorkingPlaneDlg::ClickOnApply() +bool BasicGUI_WorkingPlaneDlg::ClickOnApply() { buttonApply->setFocus(); QAD_Application::getDesktop()->putInfo(tr("")); - if(myOkPlane) - myBasicGUI->MakeWorkingPlane(myLoc, myDir); - - return; + const int id = getConstructorId(); + + if (id == 0) { + if ( !CORBA::is_nil( myFace ) ) { + TopoDS_Face aPlaneShape; + if ( GEOMBase::GetShape( myFace, aPlaneShape, TopAbs_FACE ) ) { + Handle(Geom_Surface) aGS = BRep_Tool::Surface( TopoDS::Face( aPlaneShape ) ); + if ( !aGS.IsNull() && aGS->IsKind( STANDARD_TYPE( Geom_Plane ) ) ) { + Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast( aGS ); + gp_Pln aPln = aGPlane->Pln(); + + myWPlane = aPln.Position(); + GeometryGUI::GetGeomGUI()->SetWorkingPlane(myWPlane); + GeometryGUI::GetGeomGUI()->ActiveWorkingPlane(); + return true; + } + } + } + } else if (id == 1) { + if ( CORBA::is_nil( myVectX ) || CORBA::is_nil( myVectZ ) ) { + showError( "Two vectors have to be selected" ); + return false; + } + + TopoDS_Edge aVectX, aVectZ; + TopoDS_Vertex V1, V2; + gp_Vec aVX, aVZ; + if (GEOMBase::GetShape( myVectX, aVectX, TopAbs_EDGE ) && + GEOMBase::GetShape( myVectZ, aVectZ, TopAbs_EDGE )) { + TopExp::Vertices(aVectZ, V1, V2, Standard_True); + if (!V1.IsNull() && !V2.IsNull()) + aVZ = gp_Vec(BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + else { + showError( "Bad OZ vector" ); + return false; + } + + TopExp::Vertices(aVectX, V1, V2, Standard_True); + if (!V1.IsNull() && !V2.IsNull()) + aVX = gp_Vec(BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + else { + showError( "Bad OX vector" ); + return false; + } + + gp_Dir aDirZ = gp_Dir(aVZ.X(), aVZ.Y(), aVZ.Z()); + gp_Dir aDirX = gp_Dir(aVX.X(), aVX.Y(), aVX.Z()); + + if (aDirX.IsParallel(aDirZ, Precision::Confusion())) { + showError( "Parallel vectors selected" ); + return false; + } + + myWPlane = gp_Ax3(BRep_Tool::Pnt(V1), aDirZ, aDirX); + + GeometryGUI::GetGeomGUI()->SetWorkingPlane(myWPlane); + GeometryGUI::GetGeomGUI()->ActiveWorkingPlane(); + return true; + } + } else if (id == 2) { + gp_Pnt P1 = gp_Pnt(0., 0., 0.); + gp_Dir aDirZ, aDirX; + + if (aOriginType == 1) { + aDirZ = gp_Dir(0., 0., 1.); + aDirX = gp_Dir(1., 0., 0.); + } + else if (aOriginType == 2) { + aDirZ = gp_Dir(1., 0., 0.); + aDirX = gp_Dir(0., 1., 0.); + } + else if (aOriginType == 0) { + aDirZ = gp_Dir(0., 1., 0.); + aDirX = gp_Dir(0., 0., 1.); + } + + myWPlane = gp_Ax3(P1, aDirZ, aDirX); + + GeometryGUI::GetGeomGUI()->SetWorkingPlane(myWPlane); + GeometryGUI::GetGeomGUI()->ActiveWorkingPlane(); + return true; + } + return false; } - //================================================================================= // function : SelectionIntoArgument() // purpose : Called when selection as changed or other case @@ -143,29 +338,35 @@ void BasicGUI_WorkingPlaneDlg::ClickOnApply() void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument() { myEditCurrentArgument->setText(""); - QString aString = ""; - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - myOkPlane = false; + const int id = getConstructorId(); + if ( mySelection->IObjectCount() != 1 ) { + if(id == 0) + myFace = GEOM::GEOM_Object::_nil(); + else if(id == 1) { + if (myEditCurrentArgument == Group2->LineEdit1) + myVectX = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == Group2->LineEdit2) + myVectZ = GEOM::GEOM_Object::_nil(); + } return; } - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + + // nbSel == 1 + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), aRes); + + if(!aRes || CORBA::is_nil( aSelectedObject )) return; - - BRepAdaptor_Surface surf(TopoDS::Face(S)); - gp_Pln Plane = surf.Plane(); - myLoc = Plane.Location(); - myDir = Plane.Axis().Direction(); - GroupWPlane->LineEdit1->setText(aString); - myOkPlane = true; + if(myEditCurrentArgument == Group1->LineEdit1) + myFace = aSelectedObject; + else if(myEditCurrentArgument == Group2->LineEdit1) + myVectX = aSelectedObject; + else if(myEditCurrentArgument == Group2->LineEdit2) + myVectZ = aSelectedObject; - /* no simulation */ - return; + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); } @@ -175,9 +376,23 @@ void BasicGUI_WorkingPlaneDlg::SelectionIntoArgument() //================================================================================= void BasicGUI_WorkingPlaneDlg::SetEditCurrentArgument() { - GroupWPlane->LineEdit1->setFocus(); - this->SelectionIntoArgument(); - return; + QPushButton* send = (QPushButton*)sender(); + + if(send == Group1->PushButton1) { + myEditCurrentArgument = Group1->LineEdit1; + globalSelection( GEOM_PLANE ); + } + else if(send == Group2->PushButton1) { + myEditCurrentArgument = Group2->LineEdit1; + globalSelection( GEOM_LINE ); + } + else if(send == Group2->PushButton2) { + myEditCurrentArgument = Group2->LineEdit2; + globalSelection( GEOM_LINE ); + } + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -187,8 +402,11 @@ void BasicGUI_WorkingPlaneDlg::SetEditCurrentArgument() //================================================================================= void BasicGUI_WorkingPlaneDlg::LineEditReturnPressed() { - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + QLineEdit* send = (QLineEdit*)sender(); + if(send == Group1->LineEdit1 || send == Group2->LineEdit1 || send == Group2->LineEdit2) { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -196,23 +414,50 @@ void BasicGUI_WorkingPlaneDlg::LineEditReturnPressed() // function : ActivateThisDialog() // purpose : //================================================================================= -void BasicGUI_WorkingPlaneDlg::ActivateThisDialog() +void BasicGUI_WorkingPlaneDlg::ActivateThisDialog( ) { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myFaceFilter); - return; + + ConstructorsClicked( getConstructorId() ); } +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void BasicGUI_WorkingPlaneDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void BasicGUI_WorkingPlaneDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + //================================================================================= // function : enterEvent() // purpose : //================================================================================= void BasicGUI_WorkingPlaneDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void BasicGUI_WorkingPlaneDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } diff --git a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h index 6e9b5baf6..ba4bf98ed 100644 --- a/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h +++ b/src/BasicGUI/BasicGUI_WorkingPlaneDlg.h @@ -30,10 +30,9 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" +#include "DlgRef_2Sel_QTD.h" +#include "DlgRef_3Check_QTD.h" -#include "BasicGUI.h" - -#include "GEOM_FaceFilter.hxx" //================================================================================= // class : BasicGUI_WorkingPlaneDlg @@ -44,30 +43,40 @@ class BasicGUI_WorkingPlaneDlg : public GEOMBase_Skeleton Q_OBJECT public: - BasicGUI_WorkingPlaneDlg( QWidget* parent = 0, const char* name = 0, BasicGUI* theBasicGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 ); + BasicGUI_WorkingPlaneDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 ); ~BasicGUI_WorkingPlaneDlg(); + + virtual void closeEvent( QCloseEvent* e ); private: void Init(); void enterEvent(QEvent* e); - BasicGUI* myBasicGUI; + GEOM::GEOM_Object_var myFace; + GEOM::GEOM_Object_var myVectX; + GEOM::GEOM_Object_var myVectZ; - Handle(GEOM_FaceFilter) myFaceFilter; /* filter for selection */ + int aOriginType; - gp_Pnt myLoc; - gp_Dir myDir; - bool myOkPlane; /* to check when arguments are defined */ + DlgRef_1Sel_QTD* Group1; + DlgRef_2Sel_QTD* Group2; + DlgRef_3Check_QTD* Group3; - DlgRef_1Sel_QTD* GroupWPlane; + gp_Ax3 myWPlane; private slots: void ClickOnOk(); - void ClickOnApply(); + void ClickOnCancel(); + bool ClickOnApply(); + + void ConstructorsClicked(int constructorId); + void GroupClicked(int groupId); void SetEditCurrentArgument(); void SelectionIntoArgument(); void LineEditReturnPressed(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); }; diff --git a/src/BasicGUI/Makefile.in b/src/BasicGUI/Makefile.in index 2dc8edf1b..dfc9c8a84 100644 --- a/src/BasicGUI/Makefile.in +++ b/src/BasicGUI/Makefile.in @@ -48,10 +48,11 @@ LIB_SRC = BasicGUI.cxx \ BasicGUI_ArcDlg.cxx \ BasicGUI_VectorDlg.cxx \ BasicGUI_PlaneDlg.cxx \ - BasicGUI_WorkingPlaneDlg.cxx + BasicGUI_WorkingPlaneDlg.cxx \ + BasicGUI_CurveDlg.cxx \ + BasicGUI_MarkerDlg.cxx LIB_MOC = \ - BasicGUI.h \ BasicGUI_PointDlg.h \ BasicGUI_LineDlg.h \ BasicGUI_CircleDlg.h \ @@ -59,9 +60,11 @@ LIB_MOC = \ BasicGUI_ArcDlg.h \ BasicGUI_VectorDlg.h \ BasicGUI_PlaneDlg.h \ - BasicGUI_WorkingPlaneDlg.h + BasicGUI_WorkingPlaneDlg.h \ + BasicGUI_CurveDlg.h \ + BasicGUI_MarkerDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl LIB_SERVER_IDL = @@ -70,6 +73,6 @@ LIB_SERVER_IDL = CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lGEOMFiltersSelection -lGEOMBase +LDFLAGS += -lGEOMFiltersSelection -lGEOMBase -lGEOMGUI @CONCLUDE@ diff --git a/src/BlocksGUI/BlocksGUI.cxx b/src/BlocksGUI/BlocksGUI.cxx new file mode 100644 index 000000000..39c125b28 --- /dev/null +++ b/src/BlocksGUI/BlocksGUI.cxx @@ -0,0 +1,131 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BooleanGUI.cxx +// Author : Julia DOOVSKIKH +// Module : GEOM +// $Header$ + +#include "BlocksGUI.h" + +#include "BlocksGUI_QuadFaceDlg.h" +#include "BlocksGUI_BlockDlg.h" +#include "BlocksGUI_TrsfDlg.h" +//#include "BlocksGUI_CheckMultiBlockDlg.h" +#include "BlocksGUI_ExplodeDlg.h" + +#include "SALOMEGUI_QtCatchCorbaException.hxx" + +#include "QAD_Desktop.h" +#include "QAD_MessageBox.h" + +BlocksGUI* BlocksGUI::myGUIObject = 0; + +//======================================================================= +// function : GetBlocksGUI() +// purpose : Get the only BlocksGUI object [ static ] +//======================================================================= +BlocksGUI* BlocksGUI::GetBlocksGUI() +{ + if ( myGUIObject == 0 ) + myGUIObject = new BlocksGUI(); + + return myGUIObject; +} + +//======================================================================= +// function : BlocksGUI() +// purpose : Constructor +//======================================================================= +BlocksGUI::BlocksGUI() + : GEOMGUI() +{ +} + +//======================================================================= +// function : ~BlocksGUI() +// purpose : Destructor +//======================================================================= +BlocksGUI::~BlocksGUI() +{ +} + +//======================================================================= +// function : OnGUIEvent() +// purpose : +//======================================================================= +bool BlocksGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) +{ + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + + SALOME_Selection* Sel = SALOME_Selection::Selection + (QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + + QDialog* aDlg = NULL; + + switch (theCommandID) + { + case 9999: + aDlg = new BlocksGUI_BlockDlg (parent, Sel); + break; + + case 9998: + aDlg = new BlocksGUI_TrsfDlg (parent, Sel); + break; + + case 9997: + aDlg = new BlocksGUI_QuadFaceDlg (parent, Sel); + break; + + case 9996: +// aDlg = new BlocksGUI_CheckMultiBlockDlg (parent, Sel); + QAD_MessageBox::warn1 (parent, + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_NOT_IMPLEMENTED"), + QObject::tr("BUT_OK")); + break; + + case 9995: + aDlg = new BlocksGUI_ExplodeDlg (parent, Sel); + break; + + default: + parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; + } + + if (aDlg != NULL) + aDlg->show(); + + return true; +} + +//===================================================================================== +// EXPORTED METHODS +//===================================================================================== +extern "C" +{ + GEOMGUI* GetLibGUI() + { + return BlocksGUI::GetBlocksGUI(); + } +} diff --git a/src/BlocksGUI/BlocksGUI.h b/src/BlocksGUI/BlocksGUI.h new file mode 100644 index 000000000..513b8accf --- /dev/null +++ b/src/BlocksGUI/BlocksGUI.h @@ -0,0 +1,54 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BuildGUI.h +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#ifndef BLOCKSGUI_H +#define BLOCKSGUI_H + +#include "GEOMGUI.h" + +//================================================================================= +// class : BlocksGUI +// purpose : +//================================================================================= +class BlocksGUI : public GEOMGUI +{ + protected: + BlocksGUI(); // hide constructor to avoid direct creation + + public: + ~BlocksGUI(); + + // Get the only BuildGUI object + static BlocksGUI* GetBlocksGUI(); + + bool OnGUIEvent (int theCommandID, QAD_Desktop* parent); + +private: + static BlocksGUI* myGUIObject; // the only BlocksGUI object +}; + +#endif diff --git a/src/BlocksGUI/BlocksGUI_BlockDlg.cxx b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx new file mode 100644 index 000000000..888ee3a63 --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_BlockDlg.cxx @@ -0,0 +1,394 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_BlockDlg.cxx +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#include "BlocksGUI_BlockDlg.h" + +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" + +using namespace std; + +//================================================================================= +// class : BlocksGUI_BlockDlg() +// purpose : Constructs a BlocksGUI_BlockDlg which is a child of 'parent'. +//================================================================================= +BlocksGUI_BlockDlg::BlocksGUI_BlockDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal) + : GEOMBase_Skeleton(parent, "BlockDlg", Sel, modal, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM", tr("ICON_DLG_BLOCK_2F"))); + QPixmap image1 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM", tr("ICON_DLG_BLOCK_6F"))); + QPixmap imageS (QAD_Desktop::getResourceManager()->loadPixmap("GEOM", tr("ICON_SELECT"))); + + setCaption(tr("GEOM_BLOCK_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_BLOCK")); + + RadioButton1->setPixmap(image0); + RadioButton2->setPixmap(image1); + RadioButton3->close(TRUE); + + // Create first group + Group2F = new DlgRef_2Sel_QTD(this, "Group2F"); + Group2F->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + Group2F->TextLabel1->setText(tr("FACE_1")); + Group2F->TextLabel2->setText(tr("FACE_2")); + Group2F->PushButton1->setPixmap(imageS); + Group2F->PushButton2->setPixmap(imageS); + + // Create second group + Group6F = new DlgRef_6Sel_QTD(this, "Group2F"); + Group6F->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + Group6F->TextLabel1->setText(tr("FACE_1")); + Group6F->TextLabel2->setText(tr("FACE_2")); + Group6F->TextLabel3->setText(tr("FACE_3")); + Group6F->TextLabel4->setText(tr("FACE_4")); + Group6F->TextLabel5->setText(tr("FACE_5")); + Group6F->TextLabel6->setText(tr("FACE_6")); + Group6F->PushButton1->setPixmap(imageS); + Group6F->PushButton2->setPixmap(imageS); + Group6F->PushButton3->setPixmap(imageS); + Group6F->PushButton4->setPixmap(imageS); + Group6F->PushButton5->setPixmap(imageS); + Group6F->PushButton6->setPixmap(imageS); + + // Add groups to layout + Layout1->addWidget(Group2F, 2, 0); + Layout1->addWidget(Group6F, 2, 0); + /***************************************************************/ + + Init(); +} + +//================================================================================= +// function : ~BlocksGUI_BlockDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BlocksGUI_BlockDlg::~BlocksGUI_BlockDlg() +{ + // no need to delete child widgets, Qt does it all for us +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BlocksGUI_BlockDlg::Init() +{ + // init variables + Group2F->LineEdit1->setReadOnly(true); + Group2F->LineEdit2->setReadOnly(true); + + Group6F->LineEdit1->setReadOnly(true); + Group6F->LineEdit2->setReadOnly(true); + Group6F->LineEdit3->setReadOnly(true); + Group6F->LineEdit4->setReadOnly(true); + Group6F->LineEdit5->setReadOnly(true); + Group6F->LineEdit6->setReadOnly(true); + + // signals and slots connections + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + + connect(Group2F->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2F->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(Group6F->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group6F->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group6F->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group6F->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group6F->PushButton5, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group6F->PushButton6, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + + // init controls and fields + initName(tr("GEOM_BLOCK")); + + myConstructorId = -1; + ConstructorsClicked(0); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BlocksGUI_BlockDlg::ConstructorsClicked (int constructorId) +{ + if (myConstructorId == constructorId) + return; + + myConstructorId = constructorId; + + switch (constructorId) { + case 0: + Group6F->hide(); + resize(0, 0); + Group2F->show(); + + myEditCurrentArgument = Group2F->LineEdit1; + Group2F->LineEdit1->setText(tr("")); + Group2F->LineEdit2->setText(tr("")); + break; + case 1: + Group2F->hide(); + resize(0, 0); + Group6F->show(); + + myEditCurrentArgument = Group6F->LineEdit1; + Group6F->LineEdit1->setText(tr("")); + Group6F->LineEdit2->setText(tr("")); + Group6F->LineEdit3->setText(tr("")); + Group6F->LineEdit4->setText(tr("")); + Group6F->LineEdit5->setText(tr("")); + Group6F->LineEdit6->setText(tr("")); + break; + default: + break; + } + + // init fields + myFace1 = myFace2 = GEOM::GEOM_Object::_nil(); + myFace3 = myFace4 = myFace5 = myFace6 = myFace1; + + globalSelection(GEOM_FACE); + SelectionIntoArgument(); +// connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void BlocksGUI_BlockDlg::ClickOnOk() +{ + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool BlocksGUI_BlockDlg::ClickOnApply() +{ + if (!onAccept()) + return false; + + initName(); + return true; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +//================================================================================= +void BlocksGUI_BlockDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText(""); + + if (mySelection->IObjectCount() != 1) + { + if (myEditCurrentArgument == Group2F->LineEdit1 || + myEditCurrentArgument == Group6F->LineEdit1) + myFace1 = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == Group2F->LineEdit2 || + myEditCurrentArgument == Group6F->LineEdit2) + myFace2 = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == Group6F->LineEdit3) + myFace3 = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == Group6F->LineEdit4) + myFace4 = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == Group6F->LineEdit5) + myFace5 = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == Group6F->LineEdit6) + myFace6 = GEOM::GEOM_Object::_nil(); + return; + } + + // nbSel == 1 + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if (!testResult || CORBA::is_nil( aSelectedObject )) + return; + + if (myEditCurrentArgument == Group2F->LineEdit1 || + myEditCurrentArgument == Group6F->LineEdit1) + myFace1 = aSelectedObject; + else if (myEditCurrentArgument == Group2F->LineEdit2 || + myEditCurrentArgument == Group6F->LineEdit2) + myFace2 = aSelectedObject; + else if (myEditCurrentArgument == Group6F->LineEdit3) + myFace3 = aSelectedObject; + else if (myEditCurrentArgument == Group6F->LineEdit4) + myFace4 = aSelectedObject; + else if (myEditCurrentArgument == Group6F->LineEdit5) + myFace5 = aSelectedObject; + else if (myEditCurrentArgument == Group6F->LineEdit6) + myFace6 = aSelectedObject; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BlocksGUI_BlockDlg::SetEditCurrentArgument() +{ + QPushButton* aSender = (QPushButton*)sender(); + + if (aSender == Group2F->PushButton1) { + myEditCurrentArgument = Group2F->LineEdit1; + } else if (aSender == Group2F->PushButton2) { + myEditCurrentArgument = Group2F->LineEdit2; + + } else if (aSender == Group6F->PushButton1) { + myEditCurrentArgument = Group6F->LineEdit1; + } else if (aSender == Group6F->PushButton2) { + myEditCurrentArgument = Group6F->LineEdit2; + } else if (aSender == Group6F->PushButton3) { + myEditCurrentArgument = Group6F->LineEdit3; + } else if (aSender == Group6F->PushButton4) { + myEditCurrentArgument = Group6F->LineEdit4; + } else if (aSender == Group6F->PushButton5) { + myEditCurrentArgument = Group6F->LineEdit5; + } else if (aSender == Group6F->PushButton6) { + myEditCurrentArgument = Group6F->LineEdit6; + } + + globalSelection(GEOM_FACE); + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void BlocksGUI_BlockDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + globalSelection(GEOM_FACE); + + SelectionIntoArgument(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void BlocksGUI_BlockDlg::enterEvent (QEvent* e) +{ + if (!GroupConstructors->isEnabled()) + ActivateThisDialog(); +} + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +//void BlocksGUI_BlockDlg::DeactivateActiveDialog() +//{ +// GEOMBase_Skeleton::DeactivateActiveDialog(); +//} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BlocksGUI_BlockDlg::createOperation() +{ + return getGeomEngine()->GetIBlocksOperations(getStudyId()); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BlocksGUI_BlockDlg::isValid (QString&) +{ + switch (getConstructorId()) { + case 0: + return !(myFace1->_is_nil() || myFace2->_is_nil()); + case 1: + return !(myFace1->_is_nil() || myFace2->_is_nil() || + myFace3->_is_nil() || myFace4->_is_nil() || + myFace5->_is_nil() || myFace6->_is_nil()); + default: + return false; + } + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BlocksGUI_BlockDlg::execute (ObjectList& objects) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch (getConstructorId()) { + case 0: + if (!CORBA::is_nil(myFace1) && !CORBA::is_nil(myFace2)) { + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())-> + MakeHexa2Faces(myFace1, myFace2); + res = true; + } + break; + case 1: + if (!CORBA::is_nil(myFace1) && !CORBA::is_nil(myFace2) && + !CORBA::is_nil(myFace3) && !CORBA::is_nil(myFace4) && + !CORBA::is_nil(myFace5) && !CORBA::is_nil(myFace6)) { + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())-> + MakeHexa(myFace1, myFace2, myFace3, myFace4, myFace5, myFace6); + res = true; + } + break; + } + + if (!anObj->_is_nil()) + objects.push_back(anObj._retn()); + + return res; +} diff --git a/src/BlocksGUI/BlocksGUI_BlockDlg.h b/src/BlocksGUI/BlocksGUI_BlockDlg.h new file mode 100644 index 000000000..91f98567b --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_BlockDlg.h @@ -0,0 +1,80 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_BlockDlg.h +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_BLOCK_H +#define DIALOGBOX_BLOCK_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_2Sel_QTD.h" +#include "DlgRef_6Sel_QTD.h" + + +//================================================================================= +// class : BlocksGUI_BlockDlg +// purpose : +//================================================================================= +class BlocksGUI_BlockDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + BlocksGUI_BlockDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal = FALSE); + ~BlocksGUI_BlockDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid (QString&); + virtual bool execute (ObjectList& objects); + +private: + void Init(); + void enterEvent (QEvent* e); + +private: + int myConstructorId; + + GEOM::GEOM_Object_var myFace1, myFace2; + GEOM::GEOM_Object_var myFace3, myFace4, myFace5, myFace6; + + DlgRef_2Sel_QTD* Group2F; + DlgRef_6Sel_QTD* Group6F; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); +// void DeactivateActiveDialog(); + void ConstructorsClicked (int constructorId); + + void SelectionIntoArgument(); + void SetEditCurrentArgument(); +}; + +#endif // DIALOGBOX_BLOCK_H diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx new file mode 100644 index 000000000..be34aa116 --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.cxx @@ -0,0 +1,485 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_ExplodeDlg.cxx +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#include "BlocksGUI_ExplodeDlg.h" + +#include "DlgRef_SpinBox.h" + +#include "GEOM_Displayer.h" + +#include "QAD_Desktop.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "utilities.h" + +#include + +#include +#include +#include + +//================================================================================= +// class : BlocksGUI_ExplodeDlg() +// purpose : Constructs a BlocksGUI_ExplodeDlg which is a child of 'parent'. +//================================================================================= +BlocksGUI_ExplodeDlg::BlocksGUI_ExplodeDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal) + : GEOMBase_Skeleton(parent, "ExplodeDlg", Sel, modal, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image1 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BLOCK_EXPLODE"))); + QPixmap imageS (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_BLOCK_EXPLODE_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_BLOCK_EXPLODE")); + + RadioButton1->setPixmap(image1); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + // Create first group + myGrp1 = new QGroupBox(1, Qt::Horizontal, tr("GEOM_ARGUMENTS"), this); + + QGroupBox* aSelGrp = new QGroupBox(3, Qt::Horizontal, myGrp1); + aSelGrp->setFrameStyle(QFrame::NoFrame); + aSelGrp->setInsideMargin(0); + + new QLabel(tr("GEOM_MAIN_OBJECT"), aSelGrp); + mySelBtn = new QPushButton(aSelGrp); + mySelBtn->setPixmap(imageS); + mySelName = new QLineEdit(aSelGrp); + mySelName->setReadOnly(true); + + QGroupBox* aSpinGrp = new QGroupBox(2, Qt::Horizontal, myGrp1); + aSpinGrp->setFrameStyle(QFrame::NoFrame); + aSpinGrp->setInsideMargin(0); + + new QLabel(tr("NB_FACES_MIN"), aSpinGrp); + mySpinBoxMin = new DlgRef_SpinBox(aSpinGrp); + + new QLabel(tr("NB_FACES_MAX"), aSpinGrp); + mySpinBoxMax = new DlgRef_SpinBox(aSpinGrp); + + QGroupBox* anInfoGrp = new QGroupBox(2, Qt::Horizontal, myGrp1); + anInfoGrp->setFrameStyle(QFrame::NoFrame); + anInfoGrp->setInsideMargin(0); + + myBlocksNb = new QTextEdit(anInfoGrp); + myBlocksNb->setReadOnly(true); + + QGroupBox* aCheckGrp = new QGroupBox(3, Qt::Horizontal, myGrp1); + aCheckGrp->setFrameStyle(QFrame::NoFrame); + aCheckGrp->setInsideMargin(0); + + myCheckBtn = new QCheckBox(aCheckGrp, "CheckButton1"); + myCheckBtn->setText(tr("GEOM_SUBSHAPE_SELECT")); + + // Add groups to layout + Layout1->addWidget(myGrp1, 1, 0); + /***************************************************************/ + + Init(); +} + +//================================================================================= +// function : ~BlocksGUI_ExplodeDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BlocksGUI_ExplodeDlg::~BlocksGUI_ExplodeDlg() +{ + // no need to delete child widgets, Qt does it all for us + clearTemporary(); +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::Init() +{ + // Set range of spinboxes + double SpecificStep = 1.0; + mySpinBoxMin->RangeStepAndValidator(0.0, 999.0, SpecificStep, 3); + mySpinBoxMax->RangeStepAndValidator(0.0, 999.0, SpecificStep, 3); + + if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) + myCheckBtn->setEnabled(false); + + // signals and slots connections + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + connect(mySelBtn, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(mySpinBoxMin, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(mySpinBoxMax, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + + connect(myCheckBtn, SIGNAL(stateChanged(int)), this, SLOT(SubShapeToggled())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + myConstructorId = -1; + ConstructorsClicked(0); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BlocksGUI_ExplodeDlg::ConstructorsClicked (int constructorId) +{ + if (myConstructorId == constructorId) + return; + + myConstructorId = constructorId; + + switch (constructorId) { + case 0: + myGrp1->show(); + mySpinBoxMin->SetValue(6.0); + mySpinBoxMax->SetValue(6.0); + myCheckBtn->setChecked(FALSE); + break; + default: + break; + } + + // init fields + myEditCurrentArgument = mySelName; + myObject = GEOM::GEOM_Object::_nil(); + + activateSelection(); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::ClickOnOk() +{ + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool BlocksGUI_ExplodeDlg::ClickOnApply() +{ + QAD_Application::getDesktop()->putInfo(tr("")); + + // Explode all sub shapes + if (isAllSubShapes()) { + // More than 30 subshapes : ask confirmation + if (myNbBlocks > 30) { + const QString caption = tr("GEOM_CONFIRM"); + const QString text = tr("GEOM_CONFIRM_INFO").arg(myNbBlocks); + const QString button0 = tr("GEOM_BUT_EXPLODE"); + const QString button1 = tr("GEOM_BUT_CANCEL"); + + if (QMessageBox::warning(this, caption, text, button0, button1) != 0) + return false; /* aborted */ + } + } + + if (!onAccept()) + return false; + + activateSelection(); + + return true; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void BlocksGUI_ExplodeDlg::SelectionIntoArgument() +{ + if (!isAllSubShapes()) + return; + + myObject = GEOM::GEOM_Object::_nil(); + mySelName->setText(""); + + if (mySelection->IObjectCount() == 1) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), aResult); + + if ( aResult && !anObj->_is_nil() && GEOMBase::IsShape( anObj ) ) { + myObject = anObj; + mySelName->setText(GEOMBase::GetName(anObj)); + } + } + + updateButtonState(); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::SetEditCurrentArgument() +{ + QPushButton* aSender = (QPushButton*)sender(); + + if (mySelBtn == aSender) { + mySelName->setFocus(); + myEditCurrentArgument = mySelName; + myCheckBtn->setChecked(FALSE); + } + + activateSelection(); +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + activateSelection(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::enterEvent (QEvent* e) +{ + if (!GroupConstructors->isEnabled()) + this->ActivateThisDialog(); +} + +//================================================================================= +// function : ValueChangedInSpinBox() +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::ValueChangedInSpinBox (double newValue) +{ + if (!isAllSubShapes()) + activateSelection(); + else + updateButtonState(); +} + +//================================================================================= +// function : SubShapeToggled() +// purpose : Allow user selection of all or only selected sub shapes +// : Called when 'myCheckBtn' state change +//================================================================================= +void BlocksGUI_ExplodeDlg::SubShapeToggled() +{ + activateSelection(); +} + +//================================================================================= +// function : activateSelection +// purpose : Redisplay preview and Activate selection +//================================================================================= +void BlocksGUI_ExplodeDlg::activateSelection() +{ + clearTemporary(); + erasePreview(true); + + if (isAllSubShapes()) { // Sub-shapes selection disabled + globalSelection( GEOM_ALLSHAPES ); + SelectionIntoArgument(); + + } else { + displayPreview(true, true, false); + globalSelection(GEOM_PREVIEW); + } +} + +//================================================================================= +// function : updateButtonState +// purpose : +//================================================================================= +void BlocksGUI_ExplodeDlg::updateButtonState() +{ + if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC || + myObject->_is_nil()) { + myCheckBtn->setChecked(FALSE); + myCheckBtn->setEnabled(FALSE); + } else { + myCheckBtn->setEnabled(TRUE); + } + + myNbBlocks = 0; + + if (myObject->_is_nil()) { + myBlocksNb->setText(""); + } else { + bool isOnlyBlocks = GEOM::GEOM_IBlocksOperations::_narrow + (getOperation())->IsCompoundOfBlocks(myObject, + (int)mySpinBoxMin->GetValue(), + (int)mySpinBoxMax->GetValue(), + myNbBlocks); + if (isOnlyBlocks) + myBlocksNb->setText(tr("GEOM_NB_BLOCKS_NO_OTHERS").arg(myNbBlocks)); + else + myBlocksNb->setText(tr("GEOM_NB_BLOCKS_SOME_OTHERS").arg(myNbBlocks)); + } +} + +//================================================================================= +// function : isAllSubShapes +// purpose : +//================================================================================= +bool BlocksGUI_ExplodeDlg::isAllSubShapes() const +{ + return !myCheckBtn->isChecked() || !myCheckBtn->isEnabled(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BlocksGUI_ExplodeDlg::createOperation() +{ + return getGeomEngine()->GetIBlocksOperations(getStudyId()); +} + +//================================================================================= +// function : isValid() +// purpose : Verify validity of input data +//================================================================================= +bool BlocksGUI_ExplodeDlg::isValid (QString&) +{ + switch (getConstructorId()) { + case 0: + if (IsPreview()) + return !myObject->_is_nil(); + else + return !myObject->_is_nil() && (isAllSubShapes() || mySelection->IObjectCount()); + default: + return false; + } + + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BlocksGUI_ExplodeDlg::execute (ObjectList& objects) +{ + GEOM::ListOfGO_var aList; + + switch (getConstructorId()) { + case 0: + aList = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->ExplodeCompoundOfBlocks + (myObject, + (int)mySpinBoxMin->GetValue(), + (int)mySpinBoxMax->GetValue()); + break; + } + + if (!aList->length()) + return false; + + if (IsPreview()) { + clearTemporary(); + + // Store objects. They will be put in study when "Apply" is pressed + for (int i = 0, n = aList->length(); i < n; i++) { + objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); + myTmpObjs.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); + } + + return objects.size() ? true : false; + } + + // Throw away sub-shapes not selected by user if not in preview mode + // and manual selection is active + if (!isAllSubShapes()) + { + QMap selected; + + // Get names of selected objects + SALOME_ListIteratorOfListIO it (mySelection->StoredIObjects()); + for (; it.More(); it.Next()) { + selected.insert(it.Value()->getName(), 0); + } + + // Iterate through result and select objects with names from selection + ObjectList toRemoveFromEnggine; + ObjectList::iterator anIter; + for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter) { + if (selected.contains(GeometryGUI::GetORB()->object_to_string(*anIter))) + objects.push_back(*anIter); + else + toRemoveFromEnggine.push_back(*anIter); + } + + // Remove from engine useless objects + ObjectList::iterator anIter2 = toRemoveFromEnggine.begin(); + for (; anIter2 != toRemoveFromEnggine.end(); ++anIter2) + getGeomEngine()->RemoveObject(*anIter2); + + myTmpObjs.clear(); + + } else { + for (int i = 0, n = aList->length(); i < n; i++) + objects.push_back(GEOM::GEOM_Object::_duplicate(aList[i])); + } + + return objects.size(); +} + +//================================================================================= +// function : clearTemporary +// purpose : Remove temporary objects from engine +//================================================================================= +void BlocksGUI_ExplodeDlg::clearTemporary() +{ + ObjectList::iterator anIter; + for (anIter = myTmpObjs.begin(); anIter != myTmpObjs.end(); ++anIter) + getGeomEngine()->RemoveObject(*anIter); + + myTmpObjs.clear(); +} + +//================================================================ +// Function : getFather +// Purpose : Get father object for object to be added in study +// ( called with addInStudy method ) +//================================================================ +GEOM::GEOM_Object_ptr BlocksGUI_ExplodeDlg::getFather (GEOM::GEOM_Object_ptr) +{ + return myObject; +} diff --git a/src/BlocksGUI/BlocksGUI_ExplodeDlg.h b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h new file mode 100644 index 000000000..73c44136c --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_ExplodeDlg.h @@ -0,0 +1,104 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_ExplodeDlg.h +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_BLOCK_EXPLODE_H +#define DIALOGBOX_BLOCK_EXPLODE_H + +#include "GEOMBase_Skeleton.h" + +class DlgRef_SpinBox; +class QTextEdit; +class QCheckBox; + +//================================================================================= +// class : BlocksGUI_ExplodeDlg +// purpose : +//================================================================================= +class BlocksGUI_ExplodeDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + BlocksGUI_ExplodeDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal = FALSE); + ~BlocksGUI_ExplodeDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid (QString& msg); + virtual bool execute (ObjectList& objects); + virtual GEOM::GEOM_Object_ptr getFather(GEOM::GEOM_Object_ptr theObj); + +private: + void Init(); + void enterEvent (QEvent* e); + + void activateSelection(); + + void updateButtonState(); + bool isAllSubShapes() const; + int shapeType() const; + + void clearTemporary(); + +private: + int myConstructorId; + + CORBA::Long myNbBlocks; + GEOM::GEOM_Object_var myObject; + + ObjectList myTmpObjs; + + QFrame* myGrp1; + + QPushButton* mySelBtn; + QLineEdit* mySelName; + + DlgRef_SpinBox* mySpinBoxMin; + DlgRef_SpinBox* mySpinBoxMax; + + QTextEdit* myBlocksNb; + + QCheckBox* myCheckBtn; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void ConstructorsClicked (int constructorId); + + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + + void SubShapeToggled(); + + void ValueChangedInSpinBox (double newValue); +}; + +#endif // DIALOGBOX_BLOCK_EXPLODE_H diff --git a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx new file mode 100644 index 000000000..c95296207 --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.cxx @@ -0,0 +1,409 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_QuadFaceDlg.cxx +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#include "BlocksGUI_QuadFaceDlg.h" + +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" + +//using namespace std; + +//================================================================================= +// class : BlocksGUI_QuadFaceDlg() +// purpose : Constructs a BlocksGUI_QuadFaceDlg which is a child of 'parent'. +//================================================================================= +BlocksGUI_QuadFaceDlg::BlocksGUI_QuadFaceDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal) + : GEOMBase_Skeleton(parent, "QuadFaceDlg", Sel, modal, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image1 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_QUAD_FACE_4_VERT"))); + QPixmap image2 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_QUAD_FACE_2_EDGE"))); + QPixmap image3 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_QUAD_FACE_4_EDGE"))); + QPixmap imageS (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_QUAD_FACE_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_QUAD_FACE")); + + RadioButton1->setPixmap(image1); + RadioButton2->setPixmap(image2); + RadioButton3->setPixmap(image3); + + // Create first group + myGrp1 = new QGroupBox(1, Qt::Horizontal, tr("GEOM_ARGUMENTS"), this); + + QGroupBox* aSelGrp1 = new QGroupBox(3, Qt::Horizontal, myGrp1); + aSelGrp1->setFrameStyle(QFrame::NoFrame); + aSelGrp1->setInsideMargin(0); + + createSelWg(tr("VERTEX_1"), imageS, aSelGrp1, Vertex1); + createSelWg(tr("VERTEX_2"), imageS, aSelGrp1, Vertex2); + createSelWg(tr("VERTEX_3"), imageS, aSelGrp1, Vertex3); + createSelWg(tr("VERTEX_4"), imageS, aSelGrp1, Vertex4); + + // Create second group + myGrp2 = new QGroupBox(1, Qt::Horizontal, tr("GEOM_ARGUMENTS"), this); + + QGroupBox* aSelGrp2 = new QGroupBox(3, Qt::Horizontal, myGrp2); + aSelGrp2->setFrameStyle(QFrame::NoFrame); + aSelGrp2->setInsideMargin(0); + + createSelWg(tr("EDGE_1"), imageS, aSelGrp2, Edge12); + createSelWg(tr("EDGE_2"), imageS, aSelGrp2, Edge22); + + // Create fird group + myGrp3 = new QGroupBox(1, Qt::Horizontal, tr("GEOM_ARGUMENTS"), this); + + QGroupBox* aSelGrp3 = new QGroupBox(3, Qt::Horizontal, myGrp3); + aSelGrp3->setFrameStyle(QFrame::NoFrame); + aSelGrp3->setInsideMargin(0); + + createSelWg(tr("EDGE_1"), imageS, aSelGrp3, Edge14); + createSelWg(tr("EDGE_2"), imageS, aSelGrp3, Edge24); + createSelWg(tr("EDGE_3"), imageS, aSelGrp3, Edge34); + createSelWg(tr("EDGE_4"), imageS, aSelGrp3, Edge44); + + (new QLabel(myGrp3))->setSizePolicy( + QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + + // Add groups to layout + Layout1->addWidget(myGrp1, 2, 0); + Layout1->addWidget(myGrp2, 2, 0); + Layout1->addWidget(myGrp3, 2, 0); + /***************************************************************/ + + Init(); +} + +//================================================================================= +// function : ~BlocksGUI_QuadFaceDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BlocksGUI_QuadFaceDlg::~BlocksGUI_QuadFaceDlg() +{ + // no need to delete child widgets, Qt does it all for us +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BlocksGUI_QuadFaceDlg::Init() +{ + // signals and slots connections + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + + QMap::iterator anIterBtn; + for (anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn) + connect(anIterBtn.data(), SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + // init controls and fields + initName(tr("GEOM_QUAD_FACE")); + + myConstructorId = -1; + ConstructorsClicked(0); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BlocksGUI_QuadFaceDlg::ConstructorsClicked (int constructorId) +{ + if (myConstructorId == constructorId) + return; + + myConstructorId = constructorId; + + switch (constructorId) { + case 0: + myGrp2->hide(); + myGrp3->hide(); + myGrp1->show(); + myEditCurrentArgument = mySelName[Vertex1]; + break; + case 1: + myGrp1->hide(); + myGrp3->hide(); + myGrp2->show(); + myEditCurrentArgument = mySelName[Edge12]; + break; + case 2: + myGrp1->hide(); + myGrp2->hide(); + myGrp3->show(); + myEditCurrentArgument = mySelName[Edge14]; + break; + default: + break; + } + + // clear line edits + QMap::iterator anIterLE; + for (anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE) + anIterLE.data()->setText(""); + + // init fields + myShape1 = myShape2 = GEOM::GEOM_Object::_nil(); + myShape3 = myShape4 = myShape1; + + activateSelection(); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void BlocksGUI_QuadFaceDlg::ClickOnOk() +{ + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool BlocksGUI_QuadFaceDlg::ClickOnApply() +{ + if (!onAccept()) + return false; + + initName(); + return true; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void BlocksGUI_QuadFaceDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText(""); + + // Get index of current selection focus + int aCurrFocus = -1; + QMap::iterator anIter; + for (anIter = mySelName.begin(); anIter != mySelName.end(); ++anIter) { + if (myEditCurrentArgument == anIter.data()) { + aCurrFocus = anIter.key(); + break; + } + } + + GEOM::GEOM_Object_var anObj; + Standard_Boolean aResult = Standard_False; + if (mySelection->IObjectCount() == 1) { + anObj = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), aResult); + if (aResult) { + if (anObj->_is_nil()) { + aResult = Standard_False; + } else { + mySelName[aCurrFocus]->setText(GEOMBase::GetName(anObj)); + } + } else { + anObj = GEOM::GEOM_Object::_nil(); + } + } + + if (aCurrFocus == Vertex1 || aCurrFocus == Edge12 || aCurrFocus == Edge14) { + myShape1 = anObj; + } else if (aCurrFocus == Vertex2 || aCurrFocus == Edge22 || aCurrFocus == Edge24) { + myShape2 = anObj; + } else if (aCurrFocus == Vertex3 || aCurrFocus == Edge34) { + myShape3 = anObj; + } else if (aCurrFocus == Vertex4 || aCurrFocus == Edge44) { + myShape4 = anObj; + } else { + return; + } + + displayPreview(); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BlocksGUI_QuadFaceDlg::SetEditCurrentArgument() +{ + QPushButton* aSender = (QPushButton*)sender(); + + QMap::iterator anIter; + for (anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter) { + if (anIter.data() == aSender) { + mySelName[anIter.key()]->setFocus(); + myEditCurrentArgument = mySelName[anIter.key()]; + } + } + + activateSelection(); +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void BlocksGUI_QuadFaceDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + activateSelection(); + displayPreview(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void BlocksGUI_QuadFaceDlg::enterEvent (QEvent* e) +{ + if (!GroupConstructors->isEnabled()) + this->ActivateThisDialog(); +} + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +//void BlocksGUI_QuadFaceDlg::DeactivateActiveDialog() +//{ +// // disconnect selection +// GEOMBase_Skeleton::DeactivateActiveDialog(); +//} + +//================================================================================= +// function : createSelWg() +// purpose : +//================================================================================= +void BlocksGUI_QuadFaceDlg::createSelWg (const QString& theLbl, + QPixmap& thePix, + QWidget* theParent, + const int theId) +{ + new QLabel(theLbl, theParent); + mySelBtn[theId] = new QPushButton(theParent); + mySelBtn[theId]->setPixmap(thePix); + mySelName[theId] = new QLineEdit(theParent); + mySelName[theId]->setReadOnly(true); +} + +//================================================================================= +// function : activateSelection +// purpose : Activate selection in accordance with myEditCurrentArgument +//================================================================================= +void BlocksGUI_QuadFaceDlg::activateSelection() +{ + if (myEditCurrentArgument == mySelName[Vertex1] || + myEditCurrentArgument == mySelName[Vertex2] || + myEditCurrentArgument == mySelName[Vertex3] || + myEditCurrentArgument == mySelName[Vertex4]) { + + globalSelection(GEOM_POINT); + + } else { + globalSelection(GEOM_EDGE); + } + + SelectionIntoArgument(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BlocksGUI_QuadFaceDlg::createOperation() +{ + return getGeomEngine()->GetIBlocksOperations(getStudyId()); +} + +//================================================================================= +// function : isValid +// purpose : Verify validity of input data +//================================================================================= +bool BlocksGUI_QuadFaceDlg::isValid (QString&) +{ + switch (getConstructorId()) { + case 0: + return (!myShape1->_is_nil() && !myShape2->_is_nil() && + !myShape3->_is_nil() && !myShape4->_is_nil()); + case 1: + return (!myShape1->_is_nil() && !myShape2->_is_nil()); + case 2: + return (!myShape1->_is_nil() && !myShape2->_is_nil() && + !myShape3->_is_nil() && !myShape4->_is_nil()); + default: + return false; + } + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BlocksGUI_QuadFaceDlg::execute (ObjectList& objects) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch (getConstructorId()) { + case 0: + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->MakeQuad4Vertices + (myShape1, myShape2, myShape3, myShape4); + res = true; + break; + case 1: + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->MakeQuad2Edges + (myShape1, myShape2); + res = true; + break; + case 2: + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->MakeQuad + (myShape1, myShape2, myShape3, myShape4); + res = true; + break; + default: + break; + } + + if (!anObj->_is_nil()) + objects.push_back(anObj._retn()); + + return res; +} diff --git a/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h new file mode 100644 index 000000000..bd7150e4c --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_QuadFaceDlg.h @@ -0,0 +1,90 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_QuadFaceDlg.h +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_QUAD_FACE_H +#define DIALOGBOX_QUAD_FACE_H + +#include "GEOMBase_Skeleton.h" + +//================================================================================= +// class : BlocksGUI_QuadFaceDlg +// purpose : +//================================================================================= +class BlocksGUI_QuadFaceDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + + enum { Vertex1, Vertex2, Vertex3, Vertex4, + Edge12, Edge22, + Edge14, Edge24, Edge34, Edge44 }; + +public: + BlocksGUI_QuadFaceDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal = FALSE); + ~BlocksGUI_QuadFaceDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid (QString& msg); + virtual bool execute (ObjectList& objects); + +private: + void Init(); + void enterEvent (QEvent* e); + + void createSelWg (const QString&, QPixmap&, QWidget*, const int); + void activateSelection(); + +private: + int myConstructorId; + + GEOM::GEOM_Object_var myShape1; + GEOM::GEOM_Object_var myShape2; + GEOM::GEOM_Object_var myShape3; + GEOM::GEOM_Object_var myShape4; + + QFrame* myGrp1; + QFrame* myGrp2; + QFrame* myGrp3; + + QMap mySelBtn; + QMap mySelName; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); +// void DeactivateActiveDialog(); + void ConstructorsClicked( int constructorId ); + + void SelectionIntoArgument(); + void SetEditCurrentArgument(); +}; + +#endif // DIALOGBOX_QUAD_FACE_H diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx new file mode 100644 index 000000000..959df91a6 --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -0,0 +1,513 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_TrsfDlg.cxx +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#include "BlocksGUI_TrsfDlg.h" + +#include "DlgRef_SpinBox.h" + +#include "QAD_Desktop.h" + +#include + +//================================================================================= +// class : BlocksGUI_TrsfDlg() +// purpose : Constructs a BlocksGUI_TrsfDlg which is a child of 'parent'. +//================================================================================= +BlocksGUI_TrsfDlg::BlocksGUI_TrsfDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal) + : GEOMBase_Skeleton(parent, "TrsfDlg", Sel, modal, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image1 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BLOCK_MULTITRSF_SIMPLE"))); + QPixmap image2 (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BLOCK_MULTITRSF_DOUBLE"))); + QPixmap imageS (QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_BLOCK_MULTITRSF_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_BLOCK_MULTITRSF")); + + RadioButton1->setPixmap(image1); + RadioButton2->setPixmap(image2); + RadioButton3->close(TRUE); + + // Create first group + myGrp1 = new QGroupBox(1, Qt::Horizontal, tr("GEOM_BLOCK_MULTITRSF_SIMPLE"), this); + + QGroupBox* aSelGrp1 = new QGroupBox(3, Qt::Horizontal, myGrp1); + aSelGrp1->setFrameStyle(QFrame::NoFrame); + aSelGrp1->setInsideMargin(0); + + createSelWg(tr("GEOM_MAIN_OBJECT"), imageS, aSelGrp1, MainObj1); + createSelWg(tr("FACE_1"), imageS, aSelGrp1, Face1); + createSelWg(tr("FACE_2"), imageS, aSelGrp1, Face2); + + QGroupBox* aSpinGrp1 = new QGroupBox(1, Qt::Vertical, myGrp1); + aSpinGrp1->setFrameStyle(QFrame::NoFrame); + aSpinGrp1->setInsideMargin(0); + + new QLabel(tr("GEOM_NB_TIMES"), aSpinGrp1); + mySpinBox[SpinBox1] = new DlgRef_SpinBox(aSpinGrp1); + + // Create second group + myGrp2 = new QGroupBox(1, Qt::Horizontal, tr("GEOM_BLOCK_MULTITRSF_DOUBLE"), this); + + // U trsf + QGroupBox* aSelGrp2U = new QGroupBox(3, Qt::Horizontal, myGrp2); + aSelGrp2U->setFrameStyle(QFrame::NoFrame); + aSelGrp2U->setInsideMargin(0); + + createSelWg(tr("GEOM_MAIN_OBJECT"), imageS, aSelGrp2U, MainObj2); + createSelWg(tr("FACE_1U"), imageS, aSelGrp2U, Face1U); + createSelWg(tr("FACE_2U"), imageS, aSelGrp2U, Face2U); + + QGroupBox* aSpinGrp2U = new QGroupBox(1, Qt::Vertical, myGrp2); + aSpinGrp2U->setFrameStyle(QFrame::NoFrame); + aSpinGrp2U->setInsideMargin(0); + + new QLabel(tr("GEOM_NB_TIMES_U"), aSpinGrp2U); + mySpinBox[SpinBox2U] = new DlgRef_SpinBox(aSpinGrp2U); + + // V trsf + QGroupBox* aSelGrp2V = new QGroupBox(3, Qt::Horizontal, myGrp2); + aSelGrp2V->setFrameStyle(QFrame::NoFrame); + aSelGrp2V->setInsideMargin(0); + + createSelWg(tr("FACE_1V"), imageS, aSelGrp2V, Face1V); + createSelWg(tr("FACE_2V"), imageS, aSelGrp2V, Face2V); + + QGroupBox* aSpinGrp2V = new QGroupBox(1, Qt::Vertical, myGrp2); + aSpinGrp2V->setFrameStyle(QFrame::NoFrame); + aSpinGrp2V->setInsideMargin(0); + + new QLabel(tr("GEOM_NB_TIMES_V"), aSpinGrp2V); + mySpinBox[SpinBox2V] = new DlgRef_SpinBox(aSpinGrp2V); + + (new QLabel(myGrp2))->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + + // Add groups to layout + Layout1->addWidget( myGrp1, 2, 0 ); + Layout1->addWidget( myGrp2, 2, 0 ); + /***************************************************************/ + + Init(); +} + +//================================================================================= +// function : ~BlocksGUI_TrsfDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BlocksGUI_TrsfDlg::~BlocksGUI_TrsfDlg() +{ + // no need to delete child widgets, Qt does it all for us +} + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::Init() +{ + // Set range of spinboxes + double SpecificStep = 1.0; + QMap::iterator anIter; + for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) { + anIter.data()->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); + } + + // signals and slots connections + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + + QMap::iterator anIterBtn; + for (anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn) + connect(anIterBtn.data(), SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + QMap::iterator anIterSpin; + for (anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin) + connect(anIterSpin.data(), SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + // init controls and fields + initName(tr("GEOM_BLOCK_MULTITRSF")); + + myConstructorId = -1; + ConstructorsClicked(0); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void BlocksGUI_TrsfDlg::ConstructorsClicked (int constructorId) +{ + if (myConstructorId == constructorId) + return; + + myConstructorId = constructorId; + + switch (constructorId) { + case 0: + myGrp2->hide(); + myGrp1->show(); + mySpinBox[SpinBox1]->SetValue(2.0); + myEditCurrentArgument = mySelName[MainObj1]; + myFaces[Face1] = -1; + myFaces[Face2] = -1; + break; + case 1: + myGrp1->hide(); + myGrp2->show(); + mySpinBox[SpinBox2U]->SetValue(2.0); + mySpinBox[SpinBox2V]->SetValue(2.0); + myEditCurrentArgument = mySelName[MainObj2]; + myFaces[Face1U] = -1; + myFaces[Face2U] = -1; + myFaces[Face1V] = -1; + myFaces[Face2V] = -1; + break; + default: + break; + } + + // clear line edits + QMap::iterator anIterLE; + for (anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE) + anIterLE.data()->setText(""); + + // init fields + myShape = GEOM::GEOM_Object::_nil(); + + activateSelection(); +// enableWidgets(); +// displayPreview(); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::ClickOnOk() +{ + if (ClickOnApply()) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool BlocksGUI_TrsfDlg::ClickOnApply() +{ + if (!onAccept()) + return false; + + initName(); + return true; +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void BlocksGUI_TrsfDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText(""); + + // Get index of current selection focus + int aCurrFocus = -1; + QMap::iterator anIter; + for (anIter = mySelName.begin(); anIter != mySelName.end(); ++anIter) { + if (myEditCurrentArgument == anIter.data()) { + aCurrFocus = anIter.key(); + break; + } + } + + // If selection of main object is activated + if (aCurrFocus == MainObj1 || aCurrFocus == MainObj2) { + if (mySelection->IObjectCount() == 1) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), aResult); + + if (aResult && !anObj->_is_nil() && GEOMBase::IsShape( anObj ) ) { + myShape = anObj; + mySelName[aCurrFocus]->setText(GEOMBase::GetName(anObj)); + enableWidgets(); + return; + } + } + + myShape = GEOM::GEOM_Object::_nil(); + enableWidgets(); + } + // If face selection is activated + else if (aCurrFocus == Face1 || aCurrFocus == Face2 || + aCurrFocus == Face1U || aCurrFocus == Face2U || + aCurrFocus == Face1V || aCurrFocus == Face2V) { + if (mySelection->IObjectCount() == 1) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), aResult); + + if ( aResult && !anObj->_is_nil() && GEOMBase::IsShape( anObj ) ) { + TColStd_IndexedMapOfInteger anIndexes; + mySelection->GetIndex(mySelection->firstIObject(), anIndexes); + + if (anIndexes.Extent() == 1) { + int anIndex = anIndexes(1); + QString aFaceName = QString(GEOMBase::GetName(anObj)) + ":%1"; + myEditCurrentArgument->setText(aFaceName.arg(anIndex)); + myFaces[aCurrFocus] = anIndex; + displayPreview(); + return; + } + } + } + + myFaces[aCurrFocus] = -1; + } +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::SetEditCurrentArgument() +{ + QPushButton* aSender = (QPushButton*)sender(); + + QMap::iterator anIter; + for (anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter) { + if (anIter.data() == aSender) { + mySelName[anIter.key()]->setFocus(); + myEditCurrentArgument = mySelName[anIter.key()]; + break; + } + } + + activateSelection(); +} + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + activateSelection(); + displayPreview(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::enterEvent (QEvent* e) +{ + if (!GroupConstructors->isEnabled()) + this->ActivateThisDialog(); +} + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +//void BlocksGUI_TrsfDlg::DeactivateActiveDialog() +//{ +// // disconnect selection +// GEOMBase_Skeleton::DeactivateActiveDialog(); +//} + +//================================================================================= +// function : ValueChangedInSpinBox() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::ValueChangedInSpinBox (double newValue) +{ + displayPreview(); +} + +//================================================================================= +// function : createSelWg() +// purpose : +//================================================================================= +void BlocksGUI_TrsfDlg::createSelWg (const QString& theLbl, + QPixmap& thePix, + QWidget* theParent, + const int theId) +{ + new QLabel(theLbl, theParent); + mySelBtn[theId] = new QPushButton(theParent); + mySelBtn[theId]->setPixmap(thePix); + mySelName[theId] = new QLineEdit(theParent); + mySelName[theId]->setReadOnly(true); +} + +//================================================================================= +// function : activateSelection +// purpose : Activate selection in accordance with myEditCurrentArgument +//================================================================================= +void BlocksGUI_TrsfDlg::activateSelection() +{ + if (!myShape->_is_nil() && + (myEditCurrentArgument == mySelName[ Face1 ] || + myEditCurrentArgument == mySelName[ Face2 ] || + myEditCurrentArgument == mySelName[ Face1U ] || + myEditCurrentArgument == mySelName[ Face2U ] || + myEditCurrentArgument == mySelName[ Face1V ] || + myEditCurrentArgument == mySelName[ Face2V ])) { + + // Local selection is available only in the OCC Viewer + if ( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) { + localSelection(myShape, TopAbs_FACE); + } else { + return; + } + } else { + globalSelection( GEOM_ALLSHAPES ); + } + + SelectionIntoArgument(); +} + +//================================================================================= +// function : enableWidgets +// purpose : Enable widgets of faces in accordance with value of main object +//================================================================================= +void BlocksGUI_TrsfDlg::enableWidgets() +{ + int anId = getConstructorId(); + + bool toEnable = !myShape->_is_nil(); + + if (anId == 0) { + mySelName[Face1]->setEnabled(toEnable); + mySelName[Face2]->setEnabled(toEnable); + mySelBtn[Face1]->setEnabled(toEnable); + mySelBtn[Face2]->setEnabled(toEnable); + + if (!toEnable) { + mySelName[Face1]->setText(""); + mySelName[Face2]->setText(""); + myFaces[Face1] = -1; + myFaces[Face2] = -1; + } + } else if (anId == 1) { + mySelName[Face1U]->setEnabled(toEnable); + mySelName[Face2U]->setEnabled(toEnable); + mySelName[Face1V]->setEnabled(toEnable); + mySelName[Face2V]->setEnabled(toEnable); + mySelBtn[Face1U]->setEnabled(toEnable); + mySelBtn[Face2U]->setEnabled(toEnable); + mySelBtn[Face1V]->setEnabled(toEnable); + mySelBtn[Face2V]->setEnabled(toEnable); + + if (!toEnable) { + mySelName[Face1U]->setText(""); + mySelName[Face2U]->setText(""); + mySelName[Face1V]->setText(""); + mySelName[Face2V]->setText(""); + myFaces[Face1U] = -1; + myFaces[Face2U] = -1; + myFaces[Face1V] = -1; + myFaces[Face2V] = -1; + } + } +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BlocksGUI_TrsfDlg::createOperation() +{ + return getGeomEngine()->GetIBlocksOperations(getStudyId()); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : Verify validity of input data +//================================================================================= +bool BlocksGUI_TrsfDlg::isValid (QString&) +{ + switch (getConstructorId()) { + case 0: + return !myShape->_is_nil() && myFaces[Face1] > 0; + case 1: + return !myShape->_is_nil() && myFaces[Face1U] > 0 && myFaces[Face1V] > 0; + default: + return false; + } + return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch (getConstructorId()) { + case 0: + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->MakeMultiTransformation1D + (myShape, + myFaces[Face1], + myFaces[Face2], + (int)mySpinBox[SpinBox1]->GetValue()); + res = true; + break; + case 1: + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->MakeMultiTransformation2D + (myShape, + myFaces[Face1U], + myFaces[Face2U], + (int)mySpinBox[SpinBox2U]->GetValue(), + myFaces[Face1V], + myFaces[Face2V], + (int)mySpinBox[SpinBox2V]->GetValue()); + res = true; + break; + } + + if (!anObj->_is_nil()) + objects.push_back(anObj._retn()); + + return res; +} diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.h b/src/BlocksGUI/BlocksGUI_TrsfDlg.h new file mode 100644 index 000000000..1b3b782ff --- /dev/null +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.h @@ -0,0 +1,92 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : BlocksGUI_TrsfDlg.h +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_BLOCK_MULTITRSF_H +#define DIALOGBOX_BLOCK_MULTITRSF_H + +#include "GEOMBase_Skeleton.h" + +class DlgRef_SpinBox; + +//================================================================================= +// class : BlocksGUI_TrsfDlg +// purpose : +//================================================================================= +class BlocksGUI_TrsfDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + + enum { MainObj1, Face1, Face2, MainObj2, Face1U, Face2U, Face1V, Face2V }; + enum { SpinBox1, SpinBox2U, SpinBox2V }; + +public: + BlocksGUI_TrsfDlg (QWidget* parent, + SALOME_Selection* Sel, + bool modal = FALSE); + ~BlocksGUI_TrsfDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid (QString& msg); + virtual bool execute (ObjectList& objects); + +private: + void Init(); + void enterEvent (QEvent* e); + + void createSelWg (const QString&, QPixmap&, QWidget*, const int); + void activateSelection(); + void enableWidgets(); + +private: + int myConstructorId; + + GEOM::GEOM_Object_var myShape; + QMap myFaces; + + QFrame* myGrp1; + QFrame* myGrp2; + + QMap mySelBtn; + QMap mySelName; + QMap mySpinBox; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); +// void DeactivateActiveDialog(); + void ConstructorsClicked (int constructorId); + + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + + void ValueChangedInSpinBox (double newValue); +}; + +#endif // DIALOGBOX_BLOCK_MULTITRSF_H diff --git a/src/BlocksGUI/Makefile.in b/src/BlocksGUI/Makefile.in new file mode 100644 index 000000000..e36dd5fe8 --- /dev/null +++ b/src/BlocksGUI/Makefile.in @@ -0,0 +1,66 @@ +# GEOM BUILDGUI : +# +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Julia DOROVSKIKH (OCC) +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +# header files +EXPORT_HEADERS= + +# Libraries targets +LIB = libBlocksGUI.la + +LIB_SRC = \ + BlocksGUI.cxx \ + BlocksGUI_QuadFaceDlg.cxx \ + BlocksGUI_BlockDlg.cxx \ + BlocksGUI_ExplodeDlg.cxx \ + BlocksGUI_TrsfDlg.cxx + +LIB_MOC = \ + BlocksGUI_QuadFaceDlg.h \ + BlocksGUI_BlockDlg.h \ + BlocksGUI_ExplodeDlg.h \ + BlocksGUI_TrsfDlg.h + +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl + +LIB_SERVER_IDL = + +# additionnal information to compil and link file + +CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS += -lGEOMFiltersSelection -lGEOMBase + +@CONCLUDE@ diff --git a/src/BooleanGUI/BooleanGUI.cxx b/src/BooleanGUI/BooleanGUI.cxx index da6531ff2..0e6c813d6 100644 --- a/src/BooleanGUI/BooleanGUI.cxx +++ b/src/BooleanGUI/BooleanGUI.cxx @@ -24,28 +24,36 @@ // File : BooleanGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "BooleanGUI.h" +#include "QAD_Desktop.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "BooleanGUI_Dialog.h" -#include "BooleanGUI_FuseDlg.h" // Method FUSE -#include "BooleanGUI_CommonDlg.h" // Method COMMON -#include "BooleanGUI_CutDlg.h" // Method CUT -#include "BooleanGUI_SectionDlg.h" // Method SECTION +BooleanGUI* BooleanGUI::myGUIObject = 0; + +//======================================================================= +// function : GetBooleanGUI() +// purpose : Get the only BooleanGUI object [ static ] +//======================================================================= +BooleanGUI* BooleanGUI::GetBooleanGUI() +{ + if ( myGUIObject == 0 ) { + // init BooleanGUI only once + myGUIObject = new BooleanGUI(); + } + return myGUIObject; +} //======================================================================= // function : BooleanGUI() // purpose : Constructor //======================================================================= -BooleanGUI::BooleanGUI() : - QObject() +BooleanGUI::BooleanGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -64,75 +72,34 @@ BooleanGUI::~BooleanGUI() //======================================================================= bool BooleanGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - BooleanGUI* myBooleanGUI = new BooleanGUI(); - myBooleanGUI->myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - switch (theCommandID) - { - case 5011: // FUSE - { - BooleanGUI_FuseDlg *aDlg = new BooleanGUI_FuseDlg(parent, "", myBooleanGUI, Sel); - break; - } - case 5012: // COMMON - { - BooleanGUI_CommonDlg *aDlg = new BooleanGUI_CommonDlg(parent, "", myBooleanGUI, Sel); - break; - } - case 5013: // CUT - { - BooleanGUI_CutDlg *aDlg = new BooleanGUI_CutDlg(parent, "", myBooleanGUI, Sel); - break; - } - case 5014: // SECTION - { - BooleanGUI_SectionDlg *aDlg = new BooleanGUI_SectionDlg(parent, "", myBooleanGUI, Sel); - break; - } - default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } - return true; -} - - -//======================================================================= -// function : MakeBooleanAndDisplay() -// purpose : -//======================================================================= -void BooleanGUI::MakeBooleanAndDisplay(GEOM::GEOM_Shape_ptr Shape1, GEOM::GEOM_Shape_ptr Shape2, const short operation) -{ - try { - GEOM::GEOM_Shape_ptr result = myGeom->MakeBoolean(Shape1, Shape2, operation); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); + int anOperation = 0; + if ( theCommandID == 5011 ) + anOperation = FUSE; + else if ( theCommandID == 5012 ) + anOperation = COMMON; + else if ( theCommandID == 5013 ) + anOperation = CUT; + else if ( theCommandID == 5014 ) + anOperation = SECTION; + else + return false; - if (myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; + QDialog* aDlg = new BooleanGUI_Dialog( anOperation, parent, "", Sel); + aDlg->show(); + + return true; } - //===================================================================================== // EXPORTED METHODS //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return BooleanGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return BooleanGUI::GetBooleanGUI(); + } } diff --git a/src/BooleanGUI/BooleanGUI.h b/src/BooleanGUI/BooleanGUI.h index 6fb9cde55..d7773d16a 100644 --- a/src/BooleanGUI/BooleanGUI.h +++ b/src/BooleanGUI/BooleanGUI.h @@ -24,35 +24,34 @@ // File : BooleanGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef BOOLEANGUI_H #define BOOLEANGUI_H -#include "GEOMBase.h" +#include "GEOMGUI.h" //================================================================================= // class : BooleanGUI // purpose : //================================================================================= -class BooleanGUI : public QObject +class BooleanGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + BooleanGUI(); // hide constructor to avoid direct creation -public : - BooleanGUI(); - ~BooleanGUI(); +public: + enum BooleanOperation { COMMON = 1, CUT = 2, FUSE = 3, SECTION = 4 }; - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + ~BooleanGUI(); - void MakeBooleanAndDisplay(GEOM::GEOM_Shape_ptr Shape1, - GEOM::GEOM_Shape_ptr Shape2, - const short operation); + // Get the only BooleanGUI object + static BooleanGUI* GetBooleanGUI(); - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); +private: + static BooleanGUI* myGUIObject; // the only BooleanGUI object }; #endif diff --git a/src/BooleanGUI/BooleanGUI_CommonDlg.cxx b/src/BooleanGUI/BooleanGUI_CommonDlg.cxx deleted file mode 100644 index db7b47d14..000000000 --- a/src/BooleanGUI/BooleanGUI_CommonDlg.cxx +++ /dev/null @@ -1,245 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : BooleanGUI_CommonDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -using namespace std; -#include "BooleanGUI_CommonDlg.h" - -//================================================================================= -// class : BooleanGUI_CommonDlg() -// purpose : Constructs a BooleanGUI_CommonDlg 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. -//================================================================================= -BooleanGUI_CommonDlg::BooleanGUI_CommonDlg(QWidget* parent, const char* name, BooleanGUI* theBooleanGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_COMMON"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_COMMON_TITLE")); - - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_COMMON")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupCommon = new DlgRef_2Sel_QTD(this, "GroupCommon"); - GroupCommon->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupCommon->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); - GroupCommon->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); - GroupCommon->PushButton1->setPixmap(image1); - GroupCommon->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupCommon, 1, 0); - /***************************************************************/ - - /* Initialisation */ - myBooleanGUI = theBooleanGUI; - Init(); -} - - -//================================================================================= -// function : ~BooleanGUI_CommonDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -BooleanGUI_CommonDlg::~BooleanGUI_CommonDlg() -{ - /* no need to delete child widgets, Qt does it all for us */ -} - - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void BooleanGUI_CommonDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupCommon->LineEdit1; - myOkShape1 = myOkShape2 = false; - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupCommon->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupCommon->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupCommon->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupCommon->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupCommon->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : -//================================================================================= -void BooleanGUI_CommonDlg::ClickOnOk() -{ - this->ClickOnApply(); - ClickOnCancel(); - return ; -} - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void BooleanGUI_CommonDlg::ClickOnApply() -{ - QAD_Application::getDesktop()->putInfo(tr("")); - - if(myOkShape1 && myOkShape2) - myBooleanGUI->MakeBooleanAndDisplay(myGeomShape1 ,myGeomShape2, 1); - - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection has changed -//================================================================================= -void BooleanGUI_CommonDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - QString aString = ""; - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupCommon->LineEdit1) - myOkShape1 = false; - else if( myEditCurrentArgument == GroupCommon->LineEdit2) - myOkShape2 = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupCommon->LineEdit1) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupCommon->LineEdit1->setText(aString); - myOkShape1 = true; - } - else if(myEditCurrentArgument == GroupCommon->LineEdit2) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupCommon->LineEdit2->setText(aString); - myOkShape2 = true; - } - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void BooleanGUI_CommonDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupCommon->PushButton1) { - GroupCommon->LineEdit1->setFocus(); - myEditCurrentArgument = GroupCommon->LineEdit1; - } - else if(send == GroupCommon->PushButton2) { - GroupCommon->LineEdit2->setFocus(); - myEditCurrentArgument = GroupCommon->LineEdit2; - } - SelectionIntoArgument(); - - return; -} - - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void BooleanGUI_CommonDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupCommon->LineEdit1) - myEditCurrentArgument = GroupCommon->LineEdit1; - else if(send == GroupCommon->LineEdit2) - myEditCurrentArgument = GroupCommon->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void BooleanGUI_CommonDlg::ActivateThisDialog() -{ - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : when mouse enter onto the QWidget -//================================================================================= -void BooleanGUI_CommonDlg::enterEvent(QEvent * e) -{ - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} diff --git a/src/BooleanGUI/BooleanGUI_CutDlg.cxx b/src/BooleanGUI/BooleanGUI_CutDlg.cxx deleted file mode 100644 index 4123fed72..000000000 --- a/src/BooleanGUI/BooleanGUI_CutDlg.cxx +++ /dev/null @@ -1,243 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : BooleanGUI_CutDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -using namespace std; -#include "BooleanGUI_CutDlg.h" - -//================================================================================= -// class : BooleanGUI_CutDlg() -// purpose : Constructs a BooleanGUI_CutDlg 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. -//================================================================================= -BooleanGUI_CutDlg::BooleanGUI_CutDlg(QWidget* parent, const char* name, BooleanGUI* theBooleanGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CUT"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_CUT_TITLE")); - - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_CUT")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupCut = new DlgRef_2Sel_QTD(this, "GroupCut"); - GroupCut->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupCut->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); - GroupCut->TextLabel2->setText(tr("GEOM_TOOL_OBJECT")); - GroupCut->PushButton1->setPixmap(image1); - GroupCut->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupCut, 1, 0); - /***************************************************************/ - - /* Initialisation */ - myBooleanGUI = theBooleanGUI; - Init(); -} - - -//================================================================================= -// function : ~BooleanGUI_CutDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -BooleanGUI_CutDlg::~BooleanGUI_CutDlg() -{ - /* no need to delete child widgets, Qt does it all for us */ -} - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void BooleanGUI_CutDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupCut->LineEdit1; - myOkShape1 = myOkShape2 = false; - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupCut->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupCut->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupCut->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupCut->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupCut->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : -//================================================================================= -void BooleanGUI_CutDlg::ClickOnOk() -{ - this->ClickOnApply(); - ClickOnCancel(); - return ; -} - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void BooleanGUI_CutDlg::ClickOnApply() -{ - QAD_Application::getDesktop()->putInfo(tr("")); - - if(myOkShape1 && myOkShape2) - myBooleanGUI->MakeBooleanAndDisplay(myGeomShape1 ,myGeomShape2, 2); - - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection has changed -//================================================================================= -void BooleanGUI_CutDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - QString aString = ""; - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupCut->LineEdit1) - myOkShape1 = false; - else if( myEditCurrentArgument == GroupCut->LineEdit2) - myOkShape2 = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupCut->LineEdit1) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupCut->LineEdit1->setText(aString); - myOkShape1 = true; - } - else if(myEditCurrentArgument == GroupCut->LineEdit2) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupCut->LineEdit2->setText(aString); - myOkShape2 = true; - } - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void BooleanGUI_CutDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupCut->PushButton1) { - GroupCut->LineEdit1->setFocus(); - myEditCurrentArgument = GroupCut->LineEdit1; - } - else if(send == GroupCut->PushButton2) { - GroupCut->LineEdit2->setFocus(); - myEditCurrentArgument = GroupCut->LineEdit2; - } - SelectionIntoArgument(); - - return; -} - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void BooleanGUI_CutDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupCut->LineEdit1) - myEditCurrentArgument = GroupCut->LineEdit1; - else if(send == GroupCut->LineEdit2) - myEditCurrentArgument = GroupCut->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void BooleanGUI_CutDlg::ActivateThisDialog() -{ - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : when mouse enter onto the QWidget -//================================================================================= -void BooleanGUI_CutDlg::enterEvent(QEvent * e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx new file mode 100644 index 000000000..68bd77be8 --- /dev/null +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -0,0 +1,282 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : BooleanGUI_Dialog.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; +#include "BooleanGUI_Dialog.h" +#include "BooleanGUI.h" +#include "DlgRef_2Sel_QTD.h" + +#include "QAD_Desktop.h" + +//================================================================================= +// class : BooleanGUI_Dialog() +// purpose : Constructs a BooleanGUI_Dialog 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. +//================================================================================= +BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, fl), + myOperation( theOperation ) +{ + QPixmap image0; + QString aTitle, aCaption; + switch ( myOperation ) + { + case BooleanGUI::COMMON: + image0 = QPixmap( QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_COMMON"))); + aTitle = tr("GEOM_COMMON"); + aCaption = tr("GEOM_COMMON_TITLE"); + break; + case BooleanGUI::CUT: + image0 = QPixmap( QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CUT"))); + aTitle = tr("GEOM_CUT"); + aCaption = tr("GEOM_CUT_TITLE"); + break; + case BooleanGUI::FUSE: + image0 = QPixmap( QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_FUSE"))); + aTitle = tr("GEOM_FUSE"); + aCaption = tr("GEOM_FUSE_TITLE"); + break; + case BooleanGUI::SECTION: + image0 = QPixmap( QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SECTION"))); + aTitle = tr("GEOM_SECTION"); + aCaption = tr("GEOM_SECTION_TITLE"); + break; + } + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption( aCaption ); + + /***************************************************************/ + GroupConstructors->setTitle( aTitle ); + RadioButton1->setPixmap( image0 ); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + myGroup = new DlgRef_2Sel_QTD(this, "GroupCommon"); + myGroup->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + if ( myOperation != BooleanGUI::CUT ) + { + myGroup->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); + myGroup->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); + } + else + { + myGroup->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); + myGroup->TextLabel2->setText(tr("GEOM_TOOL_OBJECT")); + } + + myGroup->PushButton1->setPixmap(image1); + myGroup->PushButton2->setPixmap(image1); + myGroup->LineEdit1->setReadOnly( true ); + myGroup->LineEdit2->setReadOnly( true ); + + Layout1->addWidget(myGroup, 2, 0); + /***************************************************************/ + + /* Initialisation */ + Init(); +} + + +//================================================================================= +// function : ~BooleanGUI_Dialog() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +BooleanGUI_Dialog::~BooleanGUI_Dialog() +{ +} + + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void BooleanGUI_Dialog::Init() +{ + /* init variables */ + myEditCurrentArgument = myGroup->LineEdit1; + + /* signals and slots connections */ + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + connect(myGroup->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(myGroup->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(myGroup->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(myGroup->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + initName( GroupConstructors->title() ); + + globalSelection( GEOM_ALLSHAPES ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void BooleanGUI_Dialog::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool BooleanGUI_Dialog::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + return true; +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void BooleanGUI_Dialog::SelectionIntoArgument() +{ + myEditCurrentArgument->setText( "" ); + + if ( mySelection->IObjectCount() != 1 ) + { + if ( myEditCurrentArgument == myGroup->LineEdit1 ) myObject1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == myGroup->LineEdit2 ) myObject2 = GEOM::GEOM_Object::_nil(); + return; + } + + // nbSel == 1 + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes && GEOMBase::IsShape( aSelectedObject ) ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == myGroup->LineEdit1 ) myObject1 = aSelectedObject; + else if ( myEditCurrentArgument == myGroup->LineEdit2 ) myObject2 = aSelectedObject; + } +} + + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void BooleanGUI_Dialog::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if ( send == myGroup->PushButton1 ) myEditCurrentArgument = myGroup->LineEdit1; + else if ( send == myGroup->PushButton2 ) myEditCurrentArgument = myGroup->LineEdit2; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void BooleanGUI_Dialog::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + if ( send == myGroup->LineEdit1 || send == myGroup->LineEdit2 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void BooleanGUI_Dialog::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); +} + + +//================================================================================= +// function : enterEvent() +// purpose : when mouse enter onto the QWidget +//================================================================================= +void BooleanGUI_Dialog::enterEvent(QEvent * e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation() +{ + return getGeomEngine()->GetIBooleanOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BooleanGUI_Dialog::isValid( QString& msg ) +{ + return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BooleanGUI_Dialog::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->MakeBoolean( myObject1, myObject2, myOperation ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} diff --git a/src/BooleanGUI/BooleanGUI_CommonDlg.h b/src/BooleanGUI/BooleanGUI_Dialog.h similarity index 65% rename from src/BooleanGUI/BooleanGUI_CommonDlg.h rename to src/BooleanGUI/BooleanGUI_Dialog.h index cb3b805f5..e9483dd39 100644 --- a/src/BooleanGUI/BooleanGUI_CommonDlg.h +++ b/src/BooleanGUI/BooleanGUI_Dialog.h @@ -21,49 +21,50 @@ // // // -// File : BooleanGUI_CommonDlg.h +// File : BooleanGUI_Dialog.h // Author : Lucien PIGNOLONI // Module : GEOM // $Header$ -#ifndef DIALOGBOX_COMMON_H -#define DIALOGBOX_COMMON_H +#ifndef BooleanGUI_Dialog_H +#define BooleanGUI_Dialog_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel_QTD.h" -#include "BooleanGUI.h" - -#include +class DlgRef_2Sel_QTD; //================================================================================= -// class : BooleanGUI_CommonDlg +// class : BooleanGUI_Dialog // purpose : //================================================================================= -class BooleanGUI_CommonDlg : public GEOMBase_Skeleton -{ +class BooleanGUI_Dialog : public GEOMBase_Skeleton +{ Q_OBJECT public: - BooleanGUI_CommonDlg(QWidget* parent = 0, const char* name = 0, BooleanGUI* theBooleanGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~BooleanGUI_CommonDlg(); + BooleanGUI_Dialog( const int theOperation, QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~BooleanGUI_Dialog(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); private: + int myOperation; + void Init(); void enterEvent(QEvent * e); - BooleanGUI* myBooleanGUI; - - GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */ - GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */ - bool myOkShape1; - bool myOkShape2; /* to check when arguments are defined */ + GEOM::GEOM_Object_var myObject1; + GEOM::GEOM_Object_var myObject2; - DlgRef_2Sel_QTD* GroupCommon; + DlgRef_2Sel_QTD* myGroup; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void SetEditCurrentArgument(); void SelectionIntoArgument(); void LineEditReturnPressed(); @@ -71,4 +72,4 @@ private slots: }; -#endif // DIALOGBOX_COMMON_H +#endif // BooleanGUI_Dialog_H diff --git a/src/BooleanGUI/BooleanGUI_FuseDlg.cxx b/src/BooleanGUI/BooleanGUI_FuseDlg.cxx deleted file mode 100644 index ea9ae1b3a..000000000 --- a/src/BooleanGUI/BooleanGUI_FuseDlg.cxx +++ /dev/null @@ -1,243 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : BooleanGUI_FuseDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -using namespace std; -#include "BooleanGUI_FuseDlg.h" - -//================================================================================= -// class : BooleanGUI_FuseDlg() -// purpose : Constructs a BooleanGUI_FuseDlg 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. -//================================================================================= -BooleanGUI_FuseDlg::BooleanGUI_FuseDlg(QWidget* parent, const char* name, BooleanGUI* theBooleanGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_FUSE"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_FUSE_TITLE")); - - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_FUSE")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupFuse = new DlgRef_2Sel_QTD(this, "GroupFuse"); - GroupFuse->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupFuse->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); - GroupFuse->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); - GroupFuse->PushButton1->setPixmap(image1); - GroupFuse->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupFuse, 1, 0); - /***************************************************************/ - - /* Initialisation */ - myBooleanGUI = theBooleanGUI; - Init(); -} - - -//================================================================================= -// function : ~BooleanGUI_FuseDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -BooleanGUI_FuseDlg::~BooleanGUI_FuseDlg() -{ - /* no need to delete child widgets, Qt does it all for us */ -} - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void BooleanGUI_FuseDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupFuse->LineEdit1; - myOkShape1 = myOkShape2 = false; - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupFuse->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupFuse->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupFuse->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupFuse->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupFuse->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : -//================================================================================= -void BooleanGUI_FuseDlg::ClickOnOk() -{ - this->ClickOnApply(); - ClickOnCancel(); - return; -} - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void BooleanGUI_FuseDlg::ClickOnApply() -{ - QAD_Application::getDesktop()->putInfo(tr("")); - - if(myOkShape1 && myOkShape2) - myBooleanGUI->MakeBooleanAndDisplay(myGeomShape1 ,myGeomShape2, 3); - - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection has changed -//================================================================================= -void BooleanGUI_FuseDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - QString aString = ""; - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupFuse->LineEdit1) - myOkShape1 = false; - else if( myEditCurrentArgument == GroupFuse->LineEdit2) - myOkShape2 = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupFuse->LineEdit1) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupFuse->LineEdit1->setText(aString); - myOkShape1 = true; - } - else if(myEditCurrentArgument == GroupFuse->LineEdit2) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupFuse->LineEdit2->setText(aString); - myOkShape2 = true; - } - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void BooleanGUI_FuseDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupFuse->PushButton1) { - GroupFuse->LineEdit1->setFocus(); - myEditCurrentArgument = GroupFuse->LineEdit1; - } - else if(send == GroupFuse->PushButton2) { - GroupFuse->LineEdit2->setFocus(); - myEditCurrentArgument = GroupFuse->LineEdit2; - } - SelectionIntoArgument(); - - return; -} - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void BooleanGUI_FuseDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupFuse->LineEdit1) - myEditCurrentArgument = GroupFuse->LineEdit1; - else if(send == GroupFuse->LineEdit2) - myEditCurrentArgument = GroupFuse->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void BooleanGUI_FuseDlg::ActivateThisDialog() -{ - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : when mouse enter onto the QWidget -//================================================================================= -void BooleanGUI_FuseDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} diff --git a/src/BooleanGUI/BooleanGUI_SectionDlg.cxx b/src/BooleanGUI/BooleanGUI_SectionDlg.cxx deleted file mode 100644 index 51bae1f9e..000000000 --- a/src/BooleanGUI/BooleanGUI_SectionDlg.cxx +++ /dev/null @@ -1,244 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : BooleanGUI_SectionDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -using namespace std; -#include "BooleanGUI_SectionDlg.h" - -//================================================================================= -// class : BooleanGUI_SectionDlg() -// purpose : Constructs a BooleanGUI_SectionDlg 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. -//================================================================================= -BooleanGUI_SectionDlg::BooleanGUI_SectionDlg(QWidget* parent, const char* name, BooleanGUI* theBooleanGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SECTION"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_SECTION_TITLE")); - - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_SECTION")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupSection = new DlgRef_2Sel_QTD(this, "GroupSection"); - GroupSection->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupSection->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); - GroupSection->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); - GroupSection->PushButton1->setPixmap(image1); - GroupSection->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupSection, 1, 0); - /***************************************************************/ - - /* Initialisation */ - myBooleanGUI = theBooleanGUI; - Init(); -} - - -//================================================================================= -// function : ~BooleanGUI_SectionDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -BooleanGUI_SectionDlg::~BooleanGUI_SectionDlg() -{ - /* no need to delete child widgets, Qt does it all for us */ -} - - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void BooleanGUI_SectionDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupSection->LineEdit1; - myOkShape1 = myOkShape2 = false; - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupSection->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupSection->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupSection->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupSection->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupSection->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : -//================================================================================= -void BooleanGUI_SectionDlg::ClickOnOk() -{ - this->ClickOnApply(); - ClickOnCancel(); - return ; -} - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void BooleanGUI_SectionDlg::ClickOnApply() -{ - QAD_Application::getDesktop()->putInfo(tr("")); - - if(myOkShape1 && myOkShape2) - myBooleanGUI->MakeBooleanAndDisplay(myGeomShape1 ,myGeomShape2, 4); - - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection has changed -//================================================================================= -void BooleanGUI_SectionDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - QString aString = ""; - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupSection->LineEdit1) - myOkShape1 = false; - else if( myEditCurrentArgument == GroupSection->LineEdit2) - myOkShape2 = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupSection->LineEdit1) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupSection->LineEdit1->setText(aString); - myOkShape1 = true; - } - else if(myEditCurrentArgument == GroupSection->LineEdit2) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - GroupSection->LineEdit2->setText(aString); - myOkShape2 = true; - } - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void BooleanGUI_SectionDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupSection->PushButton1) { - GroupSection->LineEdit1->setFocus(); - myEditCurrentArgument = GroupSection->LineEdit1; - } - else if(send == GroupSection->PushButton2) { - GroupSection->LineEdit2->setFocus(); - myEditCurrentArgument = GroupSection->LineEdit2; - } - SelectionIntoArgument(); - - return; -} - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void BooleanGUI_SectionDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupSection->LineEdit1) - myEditCurrentArgument = GroupSection->LineEdit1; - else if(send == GroupSection->LineEdit2) - myEditCurrentArgument = GroupSection->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void BooleanGUI_SectionDlg::ActivateThisDialog() -{ - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : when mouse enter onto the QWidget -//================================================================================= -void BooleanGUI_SectionDlg::enterEvent(QEvent * e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} diff --git a/src/BooleanGUI/Makefile.in b/src/BooleanGUI/Makefile.in index 92de526ff..61467e6d7 100644 --- a/src/BooleanGUI/Makefile.in +++ b/src/BooleanGUI/Makefile.in @@ -41,21 +41,14 @@ EXPORT_HEADERS= LIB = libBooleanGUI.la LIB_SRC = BooleanGUI.cxx \ - BooleanGUI_FuseDlg.cxx \ - BooleanGUI_CommonDlg.cxx \ - BooleanGUI_CutDlg.cxx \ - BooleanGUI_SectionDlg.cxx + BooleanGUI_Dialog.cxx LIB_MOC = \ - BooleanGUI.h \ - BooleanGUI_FuseDlg.h \ - BooleanGUI_CommonDlg.h \ - BooleanGUI_CutDlg.h \ - BooleanGUI_SectionDlg.h + BooleanGUI_Dialog.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file diff --git a/src/BuildGUI/BuildGUI.cxx b/src/BuildGUI/BuildGUI.cxx index 1460732e7..d361dde5e 100644 --- a/src/BuildGUI/BuildGUI.cxx +++ b/src/BuildGUI/BuildGUI.cxx @@ -24,12 +24,12 @@ // File : BooleanGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ -using namespace std; #include "BuildGUI.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "QAD_Desktop.h" #include "BuildGUI_EdgeDlg.h" // Method EDGE #include "BuildGUI_WireDlg.h" // Method WIRE @@ -38,16 +38,27 @@ using namespace std; #include "BuildGUI_SolidDlg.h" // Method SOLID #include "BuildGUI_CompoundDlg.h" // Method COMPOUND +BuildGUI* BuildGUI::myGUIObject = 0; + +//======================================================================= +// function : GetBuildGUI() +// purpose : Get the only BuildGUI object [ static ] +//======================================================================= +BuildGUI* BuildGUI::GetBuildGUI() +{ + if ( myGUIObject == 0 ) + myGUIObject = new BuildGUI(); + + return myGUIObject; +} + //======================================================================= // function : BuildGUI() // purpose : Constructor //======================================================================= -BuildGUI::BuildGUI() : - QObject() +BuildGUI::BuildGUI() +: GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -64,203 +75,40 @@ BuildGUI::~BuildGUI() // function : OnGUIEvent() // purpose : //======================================================================= -bool BuildGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) -{ - BuildGUI* myBuildGUI = new BuildGUI(); - myBuildGUI->myGeomGUI->EmitSignalDeactivateDialog(); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - - switch (theCommandID) - { - case 4081: // GEOM::EDGE - { - BuildGUI_EdgeDlg *aDlg = new BuildGUI_EdgeDlg(parent, "", myBuildGUI, Sel); - break; - } - case 4082: // GEOM::WIRE - { - BuildGUI_WireDlg *aDlg = new BuildGUI_WireDlg(parent, "", myBuildGUI, Sel); - break; - } - case 4083: // GEOM::FACE - { - BuildGUI_FaceDlg *aDlg = new BuildGUI_FaceDlg(parent, "", myBuildGUI, Sel); - break; - } - case 4084: // GEOM::SHELL - { - BuildGUI_ShellDlg *aDlg = new BuildGUI_ShellDlg(parent, "", myBuildGUI, Sel); - break; - } - case 4085: // GEOM::SOLID - { - BuildGUI_SolidDlg *aDlg = new BuildGUI_SolidDlg(parent, "", myBuildGUI, Sel); - break; - } - case 4086: // GEOM::COMPOUND - { - BuildGUI_CompoundDlg *aDlg = new BuildGUI_CompoundDlg(parent, "", myBuildGUI, Sel); - break; - } - default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } - return true; -} - - -//===================================================================================== -// function : MakeLinearEdgeAndDisplay() -// purpose : -//===================================================================================== -void BuildGUI::MakeLinearEdgeAndDisplay(const gp_Pnt P1, const gp_Pnt P2) +bool BuildGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) { - try { - GEOM::PointStruct ps1 = myGeom->MakePointStruct(P1.X(), P1.Y(), P1.Z()); - GEOM::PointStruct ps2 = myGeom->MakePointStruct(P2.X(), P2.Y(), P2.Z()); - GEOM::GEOM_Shape_var result = myGeom->MakeEdge(ps1, ps2); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(tr("GEOM_EDGE")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + QDialog* aDlg = NULL; + + switch ( theCommandID ) + { + case 4081: aDlg = new BuildGUI_EdgeDlg ( parent, "", Sel ); break; + case 4082: aDlg = new BuildGUI_WireDlg ( parent, "", Sel ); break; + case 4083: aDlg = new BuildGUI_FaceDlg ( parent, "", Sel ); break; + case 4084: aDlg = new BuildGUI_ShellDlg ( parent, "", Sel ); break; + case 4085: aDlg = new BuildGUI_SolidDlg ( parent, "", Sel ); break; + case 4086: aDlg = new BuildGUI_CompoundDlg( parent, "", Sel ); break; + + default: parent->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); break; } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeWireAndDisplay() -// purpose : -//===================================================================================== -void BuildGUI::MakeWireAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeWire(listShapesIOR); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(tr("GEOM_WIRE")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeFaceAndDisplay() -// purpose : -//===================================================================================== -void BuildGUI::MakeFaceAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR, - const Standard_Boolean wantPlanar) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeFaces(listShapesIOR, wantPlanar); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - if (wantPlanar) - result->NameType(tr("GEOM_PLANE")); - else - result->NameType(tr("GEOM_FACE")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeShellAndDisplay() -// purpose : -//===================================================================================== -void BuildGUI::MakeShellAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeShell(listShapesIOR); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(tr("GEOM_SHELL")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeSolidAndDisplay() -// purpose : -//===================================================================================== -void BuildGUI::MakeSolidAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeSolid(listShapesIOR); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(tr("GEOM_SOLID")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeCompoundAndDisplay() -// purpose : -//===================================================================================== -void BuildGUI::MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeCompound(listShapesIOR); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(tr("GEOM_COMPOUND")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; + + if ( aDlg != NULL ) + aDlg->show(); + + return true; } - //===================================================================================== // EXPORTED METHODS //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return BuildGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return BuildGUI::GetBuildGUI(); + } } diff --git a/src/BuildGUI/BuildGUI.h b/src/BuildGUI/BuildGUI.h index 7d50e6967..d7818c5a4 100644 --- a/src/BuildGUI/BuildGUI.h +++ b/src/BuildGUI/BuildGUI.h @@ -24,40 +24,32 @@ // File : BuildGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef BUILDGUI_H #define BUILDGUI_H -#include "GEOMBase.h" -#include +#include "GEOMGUI.h" //================================================================================= // class : BuildGUI // purpose : //================================================================================= -class BuildGUI : public QObject +class BuildGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + BuildGUI(); // hide constructor to avoid direct creation public : - BuildGUI(); ~BuildGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only BuildGUI object + static BuildGUI* GetBuildGUI(); - void MakeLinearEdgeAndDisplay(const gp_Pnt P1, const gp_Pnt P2); - void MakeWireAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); - void MakeFaceAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR, - const Standard_Boolean wantPlanar); - void MakeShellAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); - void MakeSolidAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); - void MakeCompoundAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent( int theCommandID, QAD_Desktop* parent ); +private: + static BuildGUI* myGUIObject; // the only BuildGUI object }; #endif diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.cxx b/src/BuildGUI/BuildGUI_CompoundDlg.cxx index 29d3b26a8..b6f9f06b6 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.cxx +++ b/src/BuildGUI/BuildGUI_CompoundDlg.cxx @@ -26,8 +26,9 @@ // Module : GEOM // $Header$ -using namespace std; #include "BuildGUI_CompoundDlg.h" +#include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" //================================================================================= // class : BuildGUI_CompoundDlg() @@ -36,7 +37,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BuildGUI_CompoundDlg::BuildGUI_CompoundDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BuildGUI_CompoundDlg::BuildGUI_CompoundDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BUILD_COMPOUND"))); @@ -50,16 +51,16 @@ BuildGUI_CompoundDlg::BuildGUI_CompoundDlg(QWidget* parent, const char* name, Bu RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_1Sel_QTD(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); - GroupPoints->PushButton1->setPixmap(image1); + GroupShapes = new DlgRef_1Sel_QTD(this, "GroupShapes"); + GroupShapes->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + GroupShapes->TextLabel1->setText(tr("GEOM_OBJECTS")); + GroupShapes->PushButton1->setPixmap(image1); + GroupShapes->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupShapes, 2, 0); /***************************************************************/ /* Initialisations */ - myBuildGUI = theBuildGUI; Init(); } @@ -81,20 +82,20 @@ BuildGUI_CompoundDlg::~BuildGUI_CompoundDlg() void BuildGUI_CompoundDlg::Init() { /* init variables */ - myEditCurrentArgument = GroupPoints->LineEdit1; - myOkListShapes = false; + myEditCurrentArgument = GroupShapes->LineEdit1; + GroupShapes->LineEdit1->setReadOnly( true ); + + myOkShapes = false; /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupShapes->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); + globalSelection( GEOM_ALLSHAPES ); - return; + initName( tr( "GEOM_COMPOUND" ) ); } @@ -104,9 +105,8 @@ void BuildGUI_CompoundDlg::Init() //================================================================================= void BuildGUI_CompoundDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -114,12 +114,13 @@ void BuildGUI_CompoundDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BuildGUI_CompoundDlg::ClickOnApply() +bool BuildGUI_CompoundDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - if(myOkListShapes) - myBuildGUI->MakeCompoundAndDisplay(myListShapes); - return; + if ( !onAccept() ) + return false; + + initName(); + return true; } @@ -129,26 +130,19 @@ void BuildGUI_CompoundDlg::ClickOnApply() //================================================================================= void BuildGUI_CompoundDlg::SelectionIntoArgument() { - myEditCurrentArgument->setText(""); + myEditCurrentArgument->setText( "" ); QString aString = ""; /* name of selection */ - myOkListShapes = false; - int nbSel = mySelection->IObjectCount(); - if(nbSel == 0) + myOkShapes = false; + int nbSel = GEOMBase::GetNameOfSelectedIObjects( mySelection, aString, true ); + if ( nbSel == 0 ) return; - aString = tr("%1_objects").arg(nbSel); - -// int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); -// if(nbSel <= 1) { -// myOkListShapes = false; -// return; -// } + if ( nbSel != 1 ) + aString = QString( "%1_objects").arg( nbSel ); - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); - myEditCurrentArgument->setText(aString); - myOkListShapes = true; - /* no simulation */ - return; + GEOMBase::ConvertListOfIOInListOfGO( mySelection->StoredIObjects(), myShapes, true ); + myEditCurrentArgument->setText( aString ); + myOkShapes = true; } @@ -158,9 +152,14 @@ void BuildGUI_CompoundDlg::SelectionIntoArgument() //================================================================================= void BuildGUI_CompoundDlg::SetEditCurrentArgument() { - GroupPoints->LineEdit1->setFocus(); - this->SelectionIntoArgument(); - return; + QPushButton* send = (QPushButton*)sender(); + if (send != GroupShapes->PushButton1) + return; + + myEditCurrentArgument = GroupShapes->LineEdit1; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -171,8 +170,8 @@ void BuildGUI_CompoundDlg::SetEditCurrentArgument() void BuildGUI_CompoundDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; } @@ -182,8 +181,40 @@ void BuildGUI_CompoundDlg::ActivateThisDialog() //================================================================================= void BuildGUI_CompoundDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BuildGUI_CompoundDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BuildGUI_CompoundDlg::isValid( QString& ) +{ + return myOkShapes; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BuildGUI_CompoundDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IShapesOperations::_narrow( getOperation() )->MakeCompound( myShapes ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } diff --git a/src/BuildGUI/BuildGUI_CompoundDlg.h b/src/BuildGUI/BuildGUI_CompoundDlg.h index deb8a153b..848556ded 100644 --- a/src/BuildGUI/BuildGUI_CompoundDlg.h +++ b/src/BuildGUI/BuildGUI_CompoundDlg.h @@ -21,7 +21,7 @@ // // // -// File : GEOMBase_Context*_CompoundDlg.h +// File : GEOMBase_CompoundDlg.h // Author : Lucien PIGNOLONI // Module : GEOM // $Header$ @@ -32,8 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" -#include "BuildGUI.h" - //================================================================================= // class : BuildGUI_CompoundDlg // purpose : @@ -43,23 +41,27 @@ class BuildGUI_CompoundDlg : public GEOMBase_Skeleton Q_OBJECT public: - BuildGUI_CompoundDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BuildGUI_CompoundDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BuildGUI_CompoundDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent* e); - BuildGUI* myBuildGUI; - - GEOM::GEOM_Gen::ListOfIOR myListShapes; - bool myOkListShapes; /* to check when arguments is defined */ - - DlgRef_1Sel_QTD* GroupPoints; + GEOM::ListOfGO myShapes; + bool myOkShapes; + DlgRef_1Sel_QTD* GroupShapes; + private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.cxx b/src/BuildGUI/BuildGUI_EdgeDlg.cxx index 770cc70b3..33518dc5c 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.cxx +++ b/src/BuildGUI/BuildGUI_EdgeDlg.cxx @@ -32,8 +32,8 @@ #include #include "utilities.h" - -using namespace std; +#include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" //================================================================================= // class : BuildGUI_EdgeDlg() @@ -42,7 +42,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BuildGUI_EdgeDlg::BuildGUI_EdgeDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BuildGUI_EdgeDlg::BuildGUI_EdgeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BUILD_EDGE"))); @@ -62,12 +62,14 @@ BuildGUI_EdgeDlg::BuildGUI_EdgeDlg(QWidget* parent, const char* name, BuildGUI* GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("2")); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myBuildGUI = theBuildGUI; Init(); } @@ -90,14 +92,12 @@ void BuildGUI_EdgeDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(0.0, 0.0, 0.0); myOkPoint1 = myOkPoint2 = false; - /* first filter used */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + globalSelection( GEOM_POINT ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -111,11 +111,7 @@ void BuildGUI_EdgeDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName( tr( "GEOM_EDGE") ); } @@ -125,9 +121,8 @@ void BuildGUI_EdgeDlg::Init() //================================================================================= void BuildGUI_EdgeDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -135,17 +130,13 @@ void BuildGUI_EdgeDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BuildGUI_EdgeDlg::ClickOnApply() +bool BuildGUI_EdgeDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkPoint1 && myOkPoint2) - myBuildGUI->MakeLinearEdgeAndDisplay(myPoint1, myPoint2); - return; + initName(); + return true; } @@ -155,13 +146,10 @@ void BuildGUI_EdgeDlg::ClickOnApply() //================================================================================= void BuildGUI_EdgeDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + erasePreview(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { + if(mySelection->IObjectCount() != 1) { if(myEditCurrentArgument == GroupPoints->LineEdit1) myOkPoint1 = false; else if(myEditCurrentArgument == GroupPoints->LineEdit2) @@ -170,22 +158,24 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument() } // nbSel == 1 - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - myEditCurrentArgument->setText(aString); + if(!testResult) + return; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) { + myPoint1 = aSelectedObject; myOkPoint1 = true; } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->VertexToPoint(S, myPoint2)) { - myEditCurrentArgument->setText(aString); + else if(myEditCurrentArgument == GroupPoints->LineEdit2) { + myPoint2 = aSelectedObject; myOkPoint2 = true; } - - if(myOkPoint1 && myOkPoint2 && myPoint1.Distance(myPoint2) > Precision::Confusion()) - this->MakeEdgeSimulationAndDisplay(); - return; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -196,15 +186,11 @@ void BuildGUI_EdgeDlg::SelectionIntoArgument() void BuildGUI_EdgeDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -214,21 +200,21 @@ void BuildGUI_EdgeDlg::LineEditReturnPressed() //================================================================================= void BuildGUI_EdgeDlg::SetEditCurrentArgument() { + QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); + globalSelection(); if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection( GEOM_POINT ); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; + globalSelection( GEOM_POINT ); } - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -240,10 +226,8 @@ void BuildGUI_EdgeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + globalSelection( GEOM_POINT ); + displayPreview(); } @@ -253,29 +237,40 @@ void BuildGUI_EdgeDlg::ActivateThisDialog() //================================================================================= void BuildGUI_EdgeDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BuildGUI_EdgeDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} //================================================================================= -// function : MakeMirrorSimulationAndDisplay() -// purpose : S1 is a shape and S2 a mirror. +// function : isValid +// purpose : //================================================================================= -void BuildGUI_EdgeDlg::MakeEdgeSimulationAndDisplay() +bool BuildGUI_EdgeDlg::isValid( QString& ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - mySimulationTopoDs = BRepBuilderAPI_MakeEdge(myPoint1, myPoint2).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeEdgeSimulationAndDisplay"); - return; - } - return; + return myOkPoint1 && myOkPoint2; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BuildGUI_EdgeDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IShapesOperations::_narrow( getOperation() )->MakeEdge( myPoint1, myPoint2 ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } diff --git a/src/BuildGUI/BuildGUI_EdgeDlg.h b/src/BuildGUI/BuildGUI_EdgeDlg.h index 18c34e67e..b86590bff 100644 --- a/src/BuildGUI/BuildGUI_EdgeDlg.h +++ b/src/BuildGUI/BuildGUI_EdgeDlg.h @@ -32,10 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" -#include "BuildGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" - //================================================================================= // class : BuildGUI_EdgeDlg // purpose : @@ -45,27 +41,28 @@ class BuildGUI_EdgeDlg : public GEOMBase_Skeleton Q_OBJECT public: - BuildGUI_EdgeDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BuildGUI_EdgeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BuildGUI_EdgeDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private : void Init(); void enterEvent(QEvent* e); - void MakeEdgeSimulationAndDisplay(); - - BuildGUI* myBuildGUI; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* Filter selection */ - - gp_Pnt myPoint1; /* Points containing the vector */ - gp_Pnt myPoint2; + + GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the edge */ bool myOkPoint1; /* true when myPoint is defined */ bool myOkPoint2; - + DlgRef_2Sel_QTD* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); diff --git a/src/BuildGUI/BuildGUI_FaceDlg.cxx b/src/BuildGUI/BuildGUI_FaceDlg.cxx index 197231414..2b76cc7cf 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.cxx +++ b/src/BuildGUI/BuildGUI_FaceDlg.cxx @@ -28,6 +28,11 @@ using namespace std; #include "BuildGUI_FaceDlg.h" +#include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" + +//Qt includes +#include //================================================================================= // class : BuildGUI_FaceDlg() @@ -36,7 +41,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BUILD_FACE"))); @@ -50,17 +55,16 @@ BuildGUI_FaceDlg::BuildGUI_FaceDlg(QWidget* parent, const char* name, BuildGUI* RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_1Sel1Check_QTD(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_FACE_FFW")); - GroupPoints->TextLabel1->setText(tr("GEOM_WIRES")); - GroupPoints->CheckButton1->setText(tr("GEOM_FACE_OPT")); - GroupPoints->PushButton1->setPixmap(image1); + GroupWire = new DlgRef_1Sel1Check_QTD(this, "GroupWire"); + GroupWire->GroupBox1->setTitle(tr("GEOM_FACE_FFW")); + GroupWire->TextLabel1->setText(tr("GEOM_WIRES")); + GroupWire->CheckButton1->setText(tr("GEOM_FACE_OPT")); + GroupWire->PushButton1->setPixmap(image1); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupWire, 2, 0); /***************************************************************/ /* Initialisations */ - myBuildGUI = theBuildGUI; Init(); } @@ -82,26 +86,21 @@ BuildGUI_FaceDlg::~BuildGUI_FaceDlg() void BuildGUI_FaceDlg::Init() { /* init variables */ - myEditCurrentArgument = GroupPoints->LineEdit1; - GroupPoints->CheckButton1->setChecked(TRUE); + myEditCurrentArgument = GroupWire->LineEdit1; + GroupWire->LineEdit1->setReadOnly( true ); - myOkListShapes = false; + GroupWire->CheckButton1->setChecked(TRUE); - myWireFilter = new GEOM_ShapeTypeFilter(TopAbs_WIRE, myGeom); - mySelection->AddFilter(myWireFilter); /* first filter used */ + globalSelection( GEOM_WIRE ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupWire->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupWire->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName(tr("GEOM_FACE")); } @@ -111,9 +110,8 @@ void BuildGUI_FaceDlg::Init() //================================================================================= void BuildGUI_FaceDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -121,12 +119,13 @@ void BuildGUI_FaceDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BuildGUI_FaceDlg::ClickOnApply() +bool BuildGUI_FaceDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - if(myOkListShapes) - myBuildGUI->MakeFaceAndDisplay(myListShapes, GroupPoints->CheckButton1->isChecked()); - return; + if ( !onAccept() ) + return false; + + initName(); + return true; } @@ -137,21 +136,25 @@ void BuildGUI_FaceDlg::ClickOnApply() void BuildGUI_FaceDlg::SelectionIntoArgument() { myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - myOkListShapes = false; - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel == 0) + QString aName; + + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + + if(aNbSel < 1) + { + myWires.length(0); + return; + } + + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myWires); + if (!myWires.length()) return; - if(nbSel != 1) - aString = tr("%1_objects").arg(nbSel); - - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); + if(aNbSel != 1) + aName = tr("%1_wires").arg(aNbSel); + + myEditCurrentArgument->setText( aName ); - myEditCurrentArgument->setText(aString); - myOkListShapes = true; - /* no simulation */ - return; + myEditCurrentArgument->setText( aName ); } @@ -161,11 +164,15 @@ void BuildGUI_FaceDlg::SelectionIntoArgument() //================================================================================= void BuildGUI_FaceDlg::SetEditCurrentArgument() { - GroupPoints->LineEdit1->setFocus(); - mySelection->ClearFilters(); - mySelection->AddFilter(myWireFilter); - this->SelectionIntoArgument(); - return; + QPushButton* send = (QPushButton*)sender(); + if (send != GroupWire->PushButton1) + return; + + globalSelection( GEOM_WIRE ); + myEditCurrentArgument = GroupWire->LineEdit1; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -177,8 +184,7 @@ void BuildGUI_FaceDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myWireFilter); - return; + globalSelection( GEOM_WIRE ); } @@ -188,8 +194,43 @@ void BuildGUI_FaceDlg::ActivateThisDialog() //================================================================================= void BuildGUI_FaceDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BuildGUI_FaceDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BuildGUI_FaceDlg::isValid( QString& ) +{ + return (myWires.length() != 0); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BuildGUI_FaceDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + bool isPlanarWanted = GroupWire->CheckButton1->isChecked(); + anObj = GEOM::GEOM_IShapesOperations::_narrow( + getOperation() )->MakeFaceWires( myWires, isPlanarWanted ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + diff --git a/src/BuildGUI/BuildGUI_FaceDlg.h b/src/BuildGUI/BuildGUI_FaceDlg.h index 86ce40a13..d91ba714c 100644 --- a/src/BuildGUI/BuildGUI_FaceDlg.h +++ b/src/BuildGUI/BuildGUI_FaceDlg.h @@ -32,10 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Check_QTD.h" -#include "BuildGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" - //================================================================================= // class : BuildGUI_FaceDlg // purpose : @@ -45,26 +41,26 @@ class BuildGUI_FaceDlg : public GEOMBase_Skeleton Q_OBJECT public: - BuildGUI_FaceDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BuildGUI_FaceDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BuildGUI_FaceDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent* e); - - BuildGUI* myBuildGUI; - - /* Filter selection */ - Handle(GEOM_ShapeTypeFilter) myWireFilter; - - GEOM::GEOM_Gen::ListOfIOR myListShapes; - bool myOkListShapes; /* to check when arguments is defined */ - - DlgRef_1Sel1Check_QTD* GroupPoints; + + GEOM::ListOfGO myWires; + + DlgRef_1Sel1Check_QTD* GroupWire; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index 1f4df38cf..ff65505a6 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -26,11 +26,10 @@ // Module : GEOM // $Header: -using namespace std; #include "BuildGUI_ShellDlg.h" -#include "BuildGUI.h" #include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" //================================================================================= // class : BuildGUI_ShellDlg() @@ -39,7 +38,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BuildGUI_ShellDlg::BuildGUI_ShellDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BuildGUI_ShellDlg::BuildGUI_ShellDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_SHELL"))); @@ -57,12 +56,12 @@ BuildGUI_ShellDlg::BuildGUI_ShellDlg(QWidget* parent, const char* name, BuildGUI GroupShell->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupShell->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupShell->PushButton1->setPixmap(image1); + GroupShell->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupShell, 1, 0); + Layout1->addWidget(GroupShell, 2, 0); /***************************************************************/ /* Initialisations */ - myBuildGUI = theBuildGUI; Init(); } @@ -85,11 +84,14 @@ void BuildGUI_ShellDlg::Init() { /* init variables */ myEditCurrentArgument = GroupShell->LineEdit1; - myOkListShapes = false; - - myFaceFilter = new GEOM_ShapeTypeFilter(TopAbs_FACE, myGeom); - /* Filter for the next selection */ - mySelection->AddFilter(myFaceFilter) ; + GroupShell->LineEdit1->setReadOnly( true ); + + myOkFacesAndShells = false; + + TColStd_MapOfInteger aMap; + aMap.Add(GEOM_SHELL); + aMap.Add(GEOM_FACE); + globalSelection( aMap ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -99,11 +101,7 @@ void BuildGUI_ShellDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupShell->show(); - this->show(); - - return; + initName(tr("GEOM_SHELL")); } @@ -113,9 +111,8 @@ void BuildGUI_ShellDlg::Init() //================================================================================= void BuildGUI_ShellDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return ; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -123,13 +120,13 @@ void BuildGUI_ShellDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BuildGUI_ShellDlg::ClickOnApply() +bool BuildGUI_ShellDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); + if ( !onAccept() ) + return false; - if(myOkListShapes) - myBuildGUI->MakeShellAndDisplay(myListShapes); - return; + initName(); + return true; } @@ -139,21 +136,22 @@ void BuildGUI_ShellDlg::ClickOnApply() //================================================================================= void BuildGUI_ShellDlg::SelectionIntoArgument() { - myEditCurrentArgument->setText(""); - QString aString = ""; + myEditCurrentArgument->setText( "" ); + QString aString; - myOkListShapes = false; - int nbSel = mySelection->IObjectCount(); - if(nbSel == 0) + myOkFacesAndShells = false; + int nbSel = GEOMBase::GetNameOfSelectedIObjects( mySelection, aString, true ); + if ( nbSel == 0 ) return; + if ( nbSel != 1 ) + aString = QString( "%1_objects ").arg( nbSel ); - aString = tr("%1_objects").arg(nbSel); - - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); - myEditCurrentArgument->setText(aString); - myOkListShapes = true; + GEOMBase::ConvertListOfIOInListOfGO( mySelection->StoredIObjects(), myFacesAndShells, true ); + if ( !myFacesAndShells.length() ) + return; - return; + myEditCurrentArgument->setText( aString ); + myOkFacesAndShells = true; } @@ -163,11 +161,18 @@ void BuildGUI_ShellDlg::SelectionIntoArgument() //================================================================================= void BuildGUI_ShellDlg::SetEditCurrentArgument() { - mySelection->ClearFilters(); - GroupShell->LineEdit1->setFocus(); - mySelection->AddFilter(myFaceFilter); - this->SelectionIntoArgument(); - return; + QPushButton* send = (QPushButton*)sender(); + if (send != GroupShell->PushButton1) + return; + + TColStd_MapOfInteger aMap; + aMap.Add(GEOM_SHELL); + aMap.Add(GEOM_FACE); + globalSelection( aMap ); + myEditCurrentArgument = GroupShell->LineEdit1; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -179,8 +184,10 @@ void BuildGUI_ShellDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myFaceFilter); - return; + TColStd_MapOfInteger aMap; + aMap.Add(GEOM_SHELL); + aMap.Add(GEOM_FACE); + globalSelection( aMap ); } @@ -190,8 +197,42 @@ void BuildGUI_ShellDlg::ActivateThisDialog() //================================================================================= void BuildGUI_ShellDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BuildGUI_ShellDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); } + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BuildGUI_ShellDlg::isValid( QString& ) +{ + return myOkFacesAndShells; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BuildGUI_ShellDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IShapesOperations::_narrow( + getOperation() )->MakeShell( myFacesAndShells ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + diff --git a/src/BuildGUI/BuildGUI_ShellDlg.h b/src/BuildGUI/BuildGUI_ShellDlg.h index 3bb860857..3c3c57c0b 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.h +++ b/src/BuildGUI/BuildGUI_ShellDlg.h @@ -32,10 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" -#include "BuildGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" - //================================================================================= // class : BuildGUI_ShellDlg // purpose : @@ -45,25 +41,29 @@ class BuildGUI_ShellDlg : public GEOMBase_Skeleton Q_OBJECT public: - BuildGUI_ShellDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BuildGUI_ShellDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BuildGUI_ShellDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent * e); - BuildGUI* myBuildGUI; - - Handle(GEOM_ShapeTypeFilter) myFaceFilter; /* Filters selection */ - GEOM::GEOM_Gen::ListOfIOR myListShapes; - bool myOkListShapes; /* to check when arguments is defined */ + GEOM::ListOfGO myFacesAndShells; + bool myOkFacesAndShells; /* to check when arguments is defined */ DlgRef_1Sel_QTD* GroupShell; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void SetEditCurrentArgument(); + void LineEditReturnPressed(); void SelectionIntoArgument(); void ActivateThisDialog(); diff --git a/src/BuildGUI/BuildGUI_SolidDlg.cxx b/src/BuildGUI/BuildGUI_SolidDlg.cxx index d47526194..cdd99d738 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.cxx +++ b/src/BuildGUI/BuildGUI_SolidDlg.cxx @@ -26,11 +26,13 @@ // Module : GEOM // $Header: -using namespace std; #include "BuildGUI_SolidDlg.h" -#include "BuildGUI.h" #include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" + +//Qt includes +#include //================================================================================= // class : BuildGUI_SolidDlg() @@ -39,7 +41,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BuildGUI_SolidDlg::BuildGUI_SolidDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BuildGUI_SolidDlg::BuildGUI_SolidDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM", tr("ICON_DLG_BUILD_SOLID"))); @@ -53,16 +55,17 @@ BuildGUI_SolidDlg::BuildGUI_SolidDlg(QWidget* parent, const char* name, BuildGUI RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupSolid = new DlgRef_1Sel_QTD(this, "GroupSolid"); + GroupSolid = new DlgRef_1Sel1Check_QTD(this, "GroupSolid"); GroupSolid->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupSolid->TextLabel1->setText(tr("GEOM_OBJECTS")); + GroupSolid->CheckButton1->setText(tr("GEOM_CREATE_SINGLE_SOLID")); GroupSolid->PushButton1->setPixmap(image1); + GroupSolid->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupSolid, 1, 0); + Layout1->addWidget(GroupSolid, 2, 0); /***************************************************************/ /* Initialisations */ - myBuildGUI = theBuildGUI; Init(); } @@ -85,25 +88,23 @@ void BuildGUI_SolidDlg::Init() { /* init variables */ myEditCurrentArgument = GroupSolid->LineEdit1; - myOkListShapes = false; + GroupSolid->LineEdit1->setReadOnly( true ); + GroupSolid->CheckButton1->setChecked( true ); + + myOkShells = false; - myShellFilter = new GEOM_ShapeTypeFilter(TopAbs_SHELL, myGeom); - /* filter for next selection */ - mySelection->AddFilter(myShellFilter); + globalSelection( GEOM_SHELL ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(GroupSolid->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupSolid->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(EnableNameField(bool))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupSolid->show(); - this->show(); - return; + initName(tr("GEOM_SOLID")); } @@ -113,23 +114,21 @@ void BuildGUI_SolidDlg::Init() //================================================================================= void BuildGUI_SolidDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return ; + if ( ClickOnApply() ) + ClickOnCancel(); } //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void BuildGUI_SolidDlg::ClickOnApply() +bool BuildGUI_SolidDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - - if(myOkListShapes) - myBuildGUI->MakeSolidAndDisplay(myListShapes); + if ( !onAccept() ) + return false; - return; + initName(); + return true; } @@ -141,19 +140,20 @@ void BuildGUI_SolidDlg::SelectionIntoArgument() { myEditCurrentArgument->setText(""); QString aString = ""; - - myOkListShapes = false; - int nbSel = mySelection->IObjectCount(); + + myOkShells = false; + int nbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aString); if (nbSel == 0) return; - - aString = tr("%1_objects").arg(nbSel); + if(nbSel != 1) + aString = tr("%1_objects").arg(nbSel); + + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myShells); + if (!myShells.length()) + return; - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); myEditCurrentArgument->setText(aString); - myOkListShapes = true; - - return ; + myOkShells = true; } //================================================================================= @@ -163,12 +163,14 @@ void BuildGUI_SolidDlg::SelectionIntoArgument() void BuildGUI_SolidDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters() ; - GroupSolid->LineEdit1->setFocus(); + if(send != GroupSolid->PushButton1) + return; + + globalSelection( GEOM_SHELL ); myEditCurrentArgument = GroupSolid->LineEdit1; - mySelection->AddFilter(myShellFilter); + + myEditCurrentArgument->setFocus(); SelectionIntoArgument(); - return; } @@ -180,8 +182,7 @@ void BuildGUI_SolidDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myShellFilter); - return; + globalSelection( GEOM_SHELL ); } @@ -191,8 +192,66 @@ void BuildGUI_SolidDlg::ActivateThisDialog() //================================================================================= void BuildGUI_SolidDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : EnableNameField() +// purpose : +//================================================================================= +void BuildGUI_SolidDlg::EnableNameField(bool toEnable) +{ + this->GroupBoxName->setEnabled(toEnable); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BuildGUI_SolidDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); } + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BuildGUI_SolidDlg::isValid( QString& ) +{ + return myOkShells; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BuildGUI_SolidDlg::execute( ObjectList& objects ) +{ + bool toCreateSingleSolid = GroupSolid->CheckButton1->isChecked(); + + if ( toCreateSingleSolid ) + { + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow( + getOperation() )->MakeSolidShells( myShells ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + { + for ( int i = 0, n = myShells.length(); i< n; i++ ) + { + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow( + getOperation() )->MakeSolidShell( myShells[ i ] ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + } + + return true; +} + diff --git a/src/BuildGUI/BuildGUI_SolidDlg.h b/src/BuildGUI/BuildGUI_SolidDlg.h index 02ac32058..a767fba68 100644 --- a/src/BuildGUI/BuildGUI_SolidDlg.h +++ b/src/BuildGUI/BuildGUI_SolidDlg.h @@ -30,11 +30,7 @@ #define DIALOGBOX_SOLID_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel_QTD.h" - -#include "BuildGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" +#include "DlgRef_1Sel1Check_QTD.h" //================================================================================= // class : BuildGUI_SolidDlg @@ -45,28 +41,33 @@ class BuildGUI_SolidDlg : public GEOMBase_Skeleton Q_OBJECT public: - BuildGUI_SolidDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BuildGUI_SolidDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BuildGUI_SolidDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent * e); - BuildGUI* myBuildGUI; - - Handle(GEOM_ShapeTypeFilter) myShellFilter; /* filter for selection */ - GEOM::GEOM_Gen::ListOfIOR myListShapes; - bool myOkListShapes; /* to check when arguments is defined */ + GEOM::ListOfGO myShells; + bool myOkShells; /* to check when arguments is defined and + all shells are closed */ - DlgRef_1Sel_QTD* GroupSolid; + DlgRef_1Sel1Check_QTD* GroupSolid; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void SetEditCurrentArgument(); void LineEditReturnPressed(); void SelectionIntoArgument(); void ActivateThisDialog(); + void EnableNameField(bool toEnable); }; diff --git a/src/BuildGUI/BuildGUI_WireDlg.cxx b/src/BuildGUI/BuildGUI_WireDlg.cxx index 8b2ea49f9..f7f52d8ad 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.cxx +++ b/src/BuildGUI/BuildGUI_WireDlg.cxx @@ -26,8 +26,9 @@ // Module : GEOM // $Header$ -using namespace std; #include "BuildGUI_WireDlg.h" +#include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" //================================================================================= // class : BuildGUI_WireDlg() @@ -36,7 +37,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BuildGUI_WireDlg::BuildGUI_WireDlg(QWidget* parent, const char* name, BuildGUI* theBuildGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +BuildGUI_WireDlg::BuildGUI_WireDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BUILD_WIRE"))); @@ -54,12 +55,12 @@ BuildGUI_WireDlg::BuildGUI_WireDlg(QWidget* parent, const char* name, BuildGUI* GroupPoints->GroupBox1->setTitle(tr("GEOM_WIRE_CONNECT")); GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myBuildGUI = theBuildGUI; Init(); } @@ -82,19 +83,22 @@ void BuildGUI_WireDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - myOkListShapes = false; + GroupPoints->LineEdit1->setReadOnly( true ); + + myOkEdgesAndWires = false; + + TColStd_MapOfInteger aMap; + aMap.Add(GEOM_WIRE); + aMap.Add(GEOM_EDGE); + globalSelection( aMap ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName(tr("GEOM_WIRE")); } @@ -104,9 +108,8 @@ void BuildGUI_WireDlg::Init() //================================================================================= void BuildGUI_WireDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -114,12 +117,13 @@ void BuildGUI_WireDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void BuildGUI_WireDlg::ClickOnApply() +bool BuildGUI_WireDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - if(myOkListShapes) - myBuildGUI->MakeWireAndDisplay(myListShapes); - return; + if ( !onAccept() ) + return false; + + initName(); + return true; } @@ -132,17 +136,20 @@ void BuildGUI_WireDlg::SelectionIntoArgument() myEditCurrentArgument->setText(""); QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel < 1) { - myOkListShapes = false; + myOkEdgesAndWires = false; + int nbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aString); + + if(nbSel == 0) return; - } - - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); + if(nbSel != 1) + aString = tr("%1_objects").arg(nbSel); + + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myEdgesAndWires); + if (!myEdgesAndWires.length()) + return; + myEditCurrentArgument->setText(aString); - myOkListShapes = true; - /* no simulation */ - return; + myOkEdgesAndWires = true; } @@ -152,9 +159,18 @@ void BuildGUI_WireDlg::SelectionIntoArgument() //================================================================================= void BuildGUI_WireDlg::SetEditCurrentArgument() { - GroupPoints->LineEdit1->setFocus(); - this->SelectionIntoArgument(); - return; + QPushButton* send = (QPushButton*)sender(); + if (send != GroupPoints->PushButton1) + return; + + TColStd_MapOfInteger aMap; + aMap.Add(GEOM_WIRE); + aMap.Add(GEOM_EDGE); + globalSelection( aMap ); + myEditCurrentArgument = GroupPoints->LineEdit1; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -166,7 +182,10 @@ void BuildGUI_WireDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; + TColStd_MapOfInteger aMap; + aMap.Add(GEOM_WIRE); + aMap.Add(GEOM_EDGE); + globalSelection( aMap ); } @@ -176,8 +195,42 @@ void BuildGUI_WireDlg::ActivateThisDialog() //================================================================================= void BuildGUI_WireDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr BuildGUI_WireDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool BuildGUI_WireDlg::isValid( QString& ) +{ + return myOkEdgesAndWires; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool BuildGUI_WireDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IShapesOperations::_narrow( + getOperation() )->MakeWire( myEdgesAndWires ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } + diff --git a/src/BuildGUI/BuildGUI_WireDlg.h b/src/BuildGUI/BuildGUI_WireDlg.h index 5ef146c4d..4fa20d828 100644 --- a/src/BuildGUI/BuildGUI_WireDlg.h +++ b/src/BuildGUI/BuildGUI_WireDlg.h @@ -32,8 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel_QTD.h" -#include "BuildGUI.h" - //================================================================================= // class : BuildGUI_WireDlg // purpose : @@ -43,23 +41,27 @@ class BuildGUI_WireDlg : public GEOMBase_Skeleton Q_OBJECT public: - BuildGUI_WireDlg(QWidget* parent = 0, const char* name = 0, BuildGUI* theBuildGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + BuildGUI_WireDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~BuildGUI_WireDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent* e); - BuildGUI* myBuildGUI; - - GEOM::GEOM_Gen::ListOfIOR myListShapes; - bool myOkListShapes; /* to check when arguments is defined */ + GEOM::ListOfGO myEdgesAndWires; + bool myOkEdgesAndWires; /* to check when arguments is defined */ DlgRef_1Sel_QTD* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/BuildGUI/Makefile.in b/src/BuildGUI/Makefile.in index 3b29f7b59..abf7e06ca 100644 --- a/src/BuildGUI/Makefile.in +++ b/src/BuildGUI/Makefile.in @@ -49,7 +49,6 @@ LIB_SRC = BuildGUI.cxx \ BuildGUI_CompoundDlg.cxx LIB_MOC = \ - BuildGUI.h \ BuildGUI_EdgeDlg.h \ BuildGUI_WireDlg.h \ BuildGUI_FaceDlg.h \ @@ -57,9 +56,9 @@ LIB_MOC = \ BuildGUI_SolidDlg.h \ BuildGUI_CompoundDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index 0ef6fcdfe..1f496edb0 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -22,41 +22,55 @@ // // // File : DisplayGUI.cxx -// Author : Damien COQUERET +// Author : Vadim SANDLER // Module : GEOM -// $Header: +// $Header$ #include "DisplayGUI.h" +#include "GeometryGUI.h" +#include "GEOM_Displayer.h" #include "QAD_RightFrame.h" -#include "GEOM_AssemblyBuilder.h" +#include "QAD_WaitCursor.h" +#include "QAD_Desktop.h" #include "VTKViewer_ViewFrame.h" +#include "VTKViewer_RenderWindowInteractor.h" #include "OCCViewer_ViewFrame.h" #include "OCCViewer_Viewer3d.h" -#include "SALOMEGUI_ImportOperation.h" #include "SALOME_ListIteratorOfListIO.hxx" +#include "VTKViewer_Prs.h" +#include "OCCViewer_Prs.h" #include -#include "utilities.h" - using namespace std; +DisplayGUI* DisplayGUI::myGUIObject = 0; + +//======================================================================= +// function : DisplayGUI::GetDisplayGUI() +// purpose : Get the only DisplayGUI object [ static ] //======================================================================= -// function : DisplayGUI() +DisplayGUI* DisplayGUI::GetDisplayGUI() +{ + if ( myGUIObject == 0 ) { + // init DisplayGUI only once + myGUIObject = new DisplayGUI(); + } + return myGUIObject; +} + +//======================================================================= +// function : DisplayGUI::DisplayGUI() // purpose : Constructor //======================================================================= -DisplayGUI::DisplayGUI() : - QObject() +DisplayGUI::DisplayGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } //======================================================================= -// function : ~DisplayGUI() +// function : DisplayGUI::~DisplayGUI() // purpose : Destructor //======================================================================= DisplayGUI::~DisplayGUI() @@ -65,952 +79,322 @@ DisplayGUI::~DisplayGUI() //======================================================================= -// function : OnGUIEvent() -// purpose : +// function : DisplayGUI::OnGUIEvent() +// purpose : Dispatch menu command //======================================================================= bool DisplayGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - DisplayGUI* myDisplayGUI = new DisplayGUI(); + DisplayGUI* myDisplayGUI = GetDisplayGUI(); - switch (theCommandID) + switch (theCommandID) { + case 211: // MENU VIEW - WIREFRAME/SHADING { - case 211: // MENU VIEW - WIREFRAME/SHADING - { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - QApplication::setOverrideCursor(waitCursor); - - VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - int themode = myRenderInter->GetDisplayMode(); - if(themode==0) { - myRenderInter->SetDisplayMode(1); - QAD_Application::getDesktop()->menuBar()->changeItem(211, tr("GEOM_MEN_WIREFRAME")); - } - else { - myRenderInter->SetDisplayMode(0); - QAD_Application::getDesktop()->menuBar()->changeItem(211, tr("GEOM_MEN_SHADING")); - } - - QApplication::restoreOverrideCursor(); - } - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - QApplication::setOverrideCursor(Qt::waitCursor); - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - AIS_DisplayMode mode = (AIS_DisplayMode)ic->DisplayMode(); - AIS_DisplayMode newmode = (mode == AIS_WireFrame ? AIS_Shaded : AIS_WireFrame); - - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - List.Append(List1); - - AIS_ListIteratorOfListOfInteractive ite(List); - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - ic->SetDisplayMode(aSh,Standard_Integer(newmode),true); - } - ite.Next(); - } - - ic->SetDisplayMode(newmode, Standard_False); - if(newmode == 1) - QAD_Application::getDesktop()->menuBar()->changeItem(211, tr("GEOM_MEN_WIREFRAME")); - else - QAD_Application::getDesktop()->menuBar()->changeItem(211, tr("GEOM_MEN_SHADING")); - - QApplication::restoreOverrideCursor(); - } - break; - } - case 212: // MENU VIEW - DISPLAY ALL - { - myDisplayGUI->OnDisplayAll(); - break; - } - case 213: // MENU VIEW - DISPLAY ONLY - { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) - myDisplayGUI->OnVTKDisplayOnly(); - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) - myDisplayGUI->OnDisplayOnly(); - break; - } - case 214: // MENU VIEW - ERASE ALL - { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) - ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor()->EraseAll(); - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - - ic->EraseAll(Standard_True, Standard_False); - ic->Display(v3d->getTrihedron()); - } - break; - } - case 215: // MENU VIEW - ERASE ONLY - { - myDisplayGUI->OnErase(); - break; - } - case 8031: // POPUP VIEWER - WIREFRAME/SHADING - { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - // VTK - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - - QApplication::setOverrideCursor(Qt::waitCursor); - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IOS = It.Value(); - myRenderInter->SwitchRepresentation(IOS, false); - } - myRenderInter->Render(); - QApplication::restoreOverrideCursor(); - } - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - QApplication::setOverrideCursor(Qt::waitCursor); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - Standard_Boolean found; - Handle(GEOM_AISShape) Shape = myDisplayGUI->myGeomBase->ConvertIOinGEOMAISShape(IObject, found, true); - if(!Shape.IsNull()) { - AIS_DisplayMode mode = (AIS_DisplayMode)Shape->DisplayMode(); - if(mode == -1) - mode = (AIS_DisplayMode)ic->DisplayMode(); - - ic->SetDisplayMode(Shape, mode == AIS_WireFrame ? AIS_Shaded : AIS_WireFrame, false); - } - } - ic->UpdateCurrentViewer(); - } - QApplication::restoreOverrideCursor(); - break; - } - default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } + myDisplayGUI->InvertDisplayMode(); + int newMode = myDisplayGUI->GetDisplayMode(); + QAD_Application::getDesktop()->menuBar()->changeItem( 211, newMode == 1 ? tr( "GEOM_MEN_WIREFRAME" ) : tr("GEOM_MEN_SHADING") ); + break; + } + case 212: // MENU VIEW - DISPLAY ALL + { + myDisplayGUI->DisplayAll(); + break; + } + case 213: // MENU VIEW - DISPLAY ONLY + { + myDisplayGUI->DisplayOnly(); + break; + } + case 214: // MENU VIEW - ERASE ALL + { + myDisplayGUI->EraseAll(); + break; + } + case 215: // MENU VIEW - ERASE + { + myDisplayGUI->Erase(); + break; + } + case 216: // MENU VIEW - DISPLAY + { + myDisplayGUI->Display(); + break; } + case 80311: // POPUP VIEWER - WIREFRAME + { + myDisplayGUI->ChangeDisplayMode( 0 ); + break; + } + case 80312: // POPUP VIEWER - SHADING + { + myDisplayGUI->ChangeDisplayMode( 1 ); + break; + } + default: + { + parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; + } + } return true; } - -//================================================================================= -// function : BuildPresentation() -// purpose : static -//================================================================================= -void DisplayGUI::BuildPresentation(const Handle(SALOME_InteractiveObject)& theIO) +//===================================================================================== +// function : DisplayGUI::DisplayAll() +// purpose : Display all GEOM objects +//===================================================================================== +void DisplayGUI::DisplayAll() { - DisplayGUI* myDisplayGUI = new DisplayGUI(); - + QAD_WaitCursor wc; SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - - OCCViewer_Viewer3d* v3d; - Handle(AIS_InteractiveContext) ic; - vtkRenderer* Renderer; - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - Renderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - } - else - return; - - if(theIO.IsNull()) - MESSAGE("BuildPresentation(): null SALOME_InteractiveObject passed") - - Standard_Boolean testResult; - GEOM::GEOM_Shape_var myGeomShape = myDisplayGUI->myGeomBase->ConvertIOinGEOMShape(theIO, testResult); - if(!testResult) + SALOMEDS::SComponent_var SC = aStudy->FindComponent( "GEOM" ); + if ( SC->_is_nil() ) return; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - // VTK - - SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - - SALOMEDS::SObject_var obj = aStudy->FindObjectID(theIO->getEntry()); - - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributeIOR_var anIOR; - - if(myRenderInter->isInViewer(theIO)) { - myRenderInter->Display(theIO, false); - } - else { - // Create new actor - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - // this SObject may be GEOM module root SObject - - bool useSubItems = false; - SALOMEDS::ChildIterator_var anIter = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->NewChildIterator(obj); - if(myDisplayGUI->myGeom->GetIORFromString(SALOMEDS::AttributeIOR::_narrow(anAttr)->Value())->_is_nil()) { - while (anIter->More() && !useSubItems) { - SALOMEDS::SObject_var subobj = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttr; - if (subobj->FindAttribute(aTmpAttr, "AttributeIOR")) { - if (!myDisplayGUI->myGeom->GetIORFromString(SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value())->_is_nil()) { - anAttr = aTmpAttr; - obj = subobj; - useSubItems = true; - } - else - anIter->Next(); - } - else - anIter->Next(); - } - } - - while(useSubItems?anIter->More():!anAttr->_is_nil()) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myDisplayGUI->myGeom->GetIORFromString(anIOR->Value()); - TopoDS_Shape Shape = myDisplayGUI->myGeomGUI->GetShapeReader().GetShape(myDisplayGUI->myGeom,aShape); - - if(obj->FindAttribute(anAttr, "AttributeName")) { - aName = SALOMEDS::AttributeName::_narrow(anAttr); - - vtkRenderer* theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - vtkActorCollection* theAllActors = theRenderer->GetActors(); - theAllActors->InitTraversal(); - vtkActor* actor = (vtkActor*)theAllActors->GetNextActor(); - Handle(SALOME_InteractiveObject) anIObj; - // don't create new study object if it already exists - bool isDisplayed = false; - while(!(actor==NULL)) { - SALOME_Actor* Gactor = SALOME_Actor::SafeDownCast(actor); - if(Gactor!=NULL) { - if(Gactor->hasIO()) { - if(strcmp(Gactor->getIO()->getEntry(),obj->GetID())==0) { - isDisplayed = true; - anIObj = Gactor->getIO(); - if(!anIObj.IsNull()) myRenderInter->Display(anIObj, false); - } - } - } - actor=(vtkActor*)(theAllActors->GetNextActor()); - } - if(!isDisplayed) { - // open transaction - QAD_Operation* op = new SALOMEGUI_ImportOperation( QAD_Application::getDesktop()->getActiveStudy() ); - op->start(); - - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); - aStudyBuilder->Addreference(newObj1, obj); - // commit transaction - op->finish(); - - vtkRenderWindow *renWin = theRenderer->GetRenderWindow(); - int themode = myRenderInter->GetDisplayMode(); - - vtkActorCollection* theActors = - GEOM_AssemblyBuilder::BuildActors(Shape,0,themode,Standard_True); - theActors->InitTraversal(); - vtkActor* anActor = (vtkActor*)theActors->GetNextActor(); - while(!(anActor==NULL)) { - GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); - Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(anIOR->Value(), myDisplayGUI->myGeomGUI->GetFatherior(),"GEOM"); - IO->setEntry(obj->GetID()); - GActor->setIO(IO); - GActor->setName(theIO->getName()); - - theRenderer->AddActor(GActor); - // renWin->Render(); - anActor = (vtkActor*)theActors->GetNextActor(); - } - } - } - // next item iteration - if(useSubItems) { - anIter->Next(); - anAttr = SALOMEDS::GenericAttribute::_nil(); - while(anIter->More() && anAttr->_is_nil()) { - SALOMEDS::SObject_var subobject = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttribute; - if (subobject->FindAttribute(aTmpAttribute, "AttributeIOR")) { - anAttr = aTmpAttribute; - obj = subobject; - } - else - anIter->Next(); - } - } - else - anAttr = SALOMEDS::GenericAttribute::_nil(); - } - } - } - } - // No viewer update should be done here! - //myRenderInter->Render(); - //QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser( true ); - } - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributeIOR_var anIOR; - - if(v3d->isInViewer(theIO, true)) { - Standard_Boolean found; - Handle(GEOM_AISShape) aSh = myDisplayGUI->myGeomBase->ConvertIOinGEOMAISShape(theIO, found, true); - if(found) { - ic->Display(aSh, false); - ic->AddOrRemoveCurrentObject(aSh, false); - } - + SALOME_ListIO listIO; + SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator( SC ); + anIter->InitEx( true ); + while( anIter->More() ) { + SALOMEDS::SObject_var valSO = anIter->Value(); + SALOMEDS::SObject_var refSO; + if ( !valSO->ReferencedObject( refSO ) ) { + listIO.Append( new SALOME_InteractiveObject( valSO->GetID(), SC->ComponentDataType() ,valSO->GetName()) ); } - else { - SALOMEDS::SObject_var obj = aStudy->FindObjectID(theIO->getEntry()); - if(!obj->_is_nil()) { - MESSAGE("BuildPresentation(): SObject not null") - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - MESSAGE("BuildPresentation(): SObject has IOR") - // this SObject may be GEOM module root SObject - - bool useSubItems = false; - SALOMEDS::ChildIterator_var anIter = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->NewChildIterator(obj); - if(myDisplayGUI->myGeom->GetIORFromString(SALOMEDS::AttributeIOR::_narrow(anAttr)->Value())->_is_nil()) { - while(anIter->More() && !useSubItems) { - SALOMEDS::SObject_var subobj = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttr; - if(subobj->FindAttribute(aTmpAttr, "AttributeIOR")) { - if(!myDisplayGUI->myGeom->GetIORFromString(SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value())->_is_nil()) { - anAttr = aTmpAttr; - obj = subobj; - useSubItems = true; - } - else - anIter->Next(); - } - else - anIter->Next(); - } - } - - while(useSubItems?anIter->More():!anAttr->_is_nil()) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myDisplayGUI->myGeom->GetIORFromString(anIOR->Value()); - TopoDS_Shape Shape = myDisplayGUI->myGeomGUI->GetShapeReader().GetShape(myDisplayGUI->myGeom,aShape); - if(Shape.IsNull()) - MESSAGE("BuildPresentation(): TopoDS_Shape is null!") - if(obj->FindAttribute(anAttr, "AttributeName")) { - MESSAGE("BuildPresentation(): SObject has Name") - aName = SALOMEDS::AttributeName::_narrow(anAttr); - // searchin for already displayed objects with the same shape - AIS_ListOfInteractive aDisplayed; - ic->DisplayedObjects(aDisplayed); - AIS_ListIteratorOfListOfInteractive anIObjects(aDisplayed); - Handle(AIS_Shape) anAISShape; - for(;anIObjects.More();anIObjects.Next()) { - anAISShape = Handle(AIS_Shape)::DownCast(anIObjects.Value()); - if(!anAISShape.IsNull()) { - if(anAISShape->Shape().IsSame(Shape)) - break; - anAISShape.Nullify(); - } - } - if(!anAISShape.IsNull()) { - if(!ic->IsDisplayed(anAISShape)) - ic->Display(anAISShape, false); - } - else { - if(!useSubItems) { - // open transaction - QAD_Operation* op = new SALOMEGUI_ImportOperation( QAD_Application::getDesktop()->getActiveStudy() ); - op->start(); - if (fatherSF->_is_nil()) - MESSAGE("BuildPresentation(): fatherSF is nil!") - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); - aStudyBuilder->Addreference(newObj1, obj); - // commit transaction - op->finish(); - } - Handle(GEOM_AISShape) aSh = new GEOM_AISShape(Shape, aName->Value()); - aSh->SetShadingColor(myDisplayGUI->myGeomBase->myShadingColor); - aSh->SetInfiniteState(Shape.Infinite()); - Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(anIOR->Value(), myDisplayGUI->myGeomGUI->GetFatherior(), "GEOM"); - IO->setEntry(obj->GetID()); - aSh->setIO(IO); - aSh->setName(aName->Value()); - ic->Display(aSh, false); - if(!useSubItems) - ic->AddOrRemoveCurrentObject(aSh, false); - } - } - // next item iteration - if(useSubItems) { - anIter->Next(); - anAttr=SALOMEDS::GenericAttribute::_nil(); - while (anIter->More() && anAttr->_is_nil()) { - SALOMEDS::SObject_var subobject = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttribute; - if(subobject->FindAttribute(aTmpAttribute, "AttributeIOR")) { - anAttr = aTmpAttribute; - obj = subobject; - } - else - anIter->Next(); - } - } - else - anAttr = SALOMEDS::GenericAttribute::_nil(); - } - } - } - } - // No viewer update should be done here! - //QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser( true ); - //ic->UpdateCurrentViewer(); + anIter->Next(); } + GEOM_Displayer().Display( listIO, true ); } - //===================================================================================== -// function : OnDisplayAll() -// purpose : +// function : DisplayGUI::EraseAll() +// purpose : Erase all GEOM objects //===================================================================================== -void DisplayGUI::OnDisplayAll(bool onlyPreviousDisplayedObject) +void DisplayGUI::EraseAll() { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) myContext = v3d->getAISContext(); - - //myContext->Display(v3d->getTrihedron()); - - if(!onlyPreviousDisplayedObject) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); - SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(SC); - for(; it->More();it->Next()) { - SALOMEDS::SObject_var CSO = it->Value(); - SALOMEDS::AttributeIOR_var anIOR; - SALOMEDS::GenericAttribute_var anAttr; - if(CSO->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - Standard_Boolean testResult; - Handle(GEOM_AISShape) aSh = myGeomBase->ConvertIORinGEOMAISShape(anIOR->Value(), testResult); - if(testResult) - myContext->Display(aSh); - else { - GEOM::GEOM_Shape_ptr aShape = myGeom->GetIORFromString(anIOR->Value()); - bool AddInSt = myGeomBase->mySettings_AddInStudy; - myGeomBase->mySettings_AddInStudy = false; - myGeomBase->Display(aShape); - myGeomBase->mySettings_AddInStudy = AddInSt; - } - } - } - } - else { - AIS_ListOfInteractive aListDisplayedObject; - myContext->DisplayedObjects(aListDisplayedObject); - AIS_ListIteratorOfListOfInteractive ite(aListDisplayedObject); - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - if (aSh->hasIO()) { - Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(aSh->getIO()); - if (v3d->isInViewer(GIO,true)) - myContext->Display(aSh); - } - } - ite.Next(); - } - } - } - else if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); - SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(SC); - for(; it->More();it->Next()) { - SALOMEDS::SObject_var CSO = it->Value(); - SALOMEDS::AttributeIOR_var anIOR; - SALOMEDS::GenericAttribute_var anAttr; - if(CSO->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - Standard_Boolean testResult; - GEOM_Actor* aSh = myGeomBase->ConvertIORinGEOMActor(anIOR->Value(), testResult); - if(testResult) { - Handle(SALOME_InteractiveObject) IObject = aSh->getIO(); - ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor()->Display(IObject); - } - else { - GEOM::GEOM_Shape_ptr aShape = myGeom->GetIORFromString(anIOR->Value()); - bool AddInSt = myGeomBase->mySettings_AddInStudy; - myGeomBase->mySettings_AddInStudy = false; - myGeomBase->Display(aShape); - myGeomBase->mySettings_AddInStudy = AddInSt; - } - } - } - } - return; + QAD_WaitCursor wc; + QAD_ViewFrame* vf = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + if ( vf->getTypeView() == VIEW_OCC || vf->getTypeView() == VIEW_VTK ) + vf->EraseAll(); } - //===================================================================================== -// function : OnVTKDisplayOnly() -// purpose : +// function : DisplayGUI::DisplayOnly() +// purpose : Display selected GEOM objects and erase other //===================================================================================== -void DisplayGUI::OnVTKDisplayOnly() +void DisplayGUI::DisplayOnly() { - QApplication::setOverrideCursor(Qt::waitCursor); - - // Erase all not selected actors - vtkRenderer* aren = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - vtkActorCollection* theActors = aren->GetActors(); - theActors->InitTraversal(); - vtkActor *ac = theActors->GetNextActor(); - while(!(ac==NULL)) { - if(ac->IsA("SALOME_Actor")) { - SALOME_Actor* anActor = SALOME_Actor::SafeDownCast(ac); - if(!anActor->isHighlighted()) - anActor->VisibilityOff(); - } - ac = theActors->GetNextActor(); - } - - // Display selection - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributeIOR_var anIOR; - - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID( IObject->getEntry() ); - - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - if(myRenderInter->isInViewer(IObject)) { - myRenderInter->Display(IObject); - } - else { - // Create new actor - if(!obj->_is_nil()) { - if(!obj->FindAttribute(anAttr, "AttributeIOR")) - break; - // If selected object contains displayable subobjects, then do nothing - SALOMEDS::ChildIterator_var anIter = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->NewChildIterator(obj); - SALOMEDS::GenericAttribute_var aTmpAttr; - - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(anIOR->Value()); - if(CORBA::is_nil(aShape)) continue; - TopoDS_Shape Shape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - - if(obj->FindAttribute(anAttr, "AttributeName")) { - aName = SALOMEDS::AttributeName::_narrow(anAttr); - // open transaction - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); - op->start(); - - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); - aStudyBuilder->Addreference(newObj1, obj); - // commit transaction - op->finish(); - - vtkRenderer* theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - int themode = myRenderInter->GetDisplayMode(); - vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(Shape, 0, themode, Standard_True); - theActors->InitTraversal(); - vtkActor* anActor = (vtkActor*)theActors->GetNextActor(); - while(!(anActor==NULL)) { - GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); - GActor->setIO(IObject); - GActor->setName(IObject->getName()); - - theRenderer->AddActor(GActor); - vtkRenderWindow *renWin = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer()->GetRenderWindow(); - renWin->Render(); - anActor = (vtkActor*)theActors->GetNextActor(); - } - } - } - } - } - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(true); - - QApplication::restoreOverrideCursor(); - return; -} - + EraseAll(); + Display(); +} //===================================================================================== -// function : OnDisplayOnly() -// purpose : +// function : DisplayGUI::Display() +// purpose : Display selected GEOM objects //===================================================================================== -void DisplayGUI::OnDisplayOnly() +void DisplayGUI::Display() { - if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListIteratorOfListOfInteractive ite(List); - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - if (!ic->IsSelected( aSh )) { - ic->Erase(aSh, Standard_True, Standard_True); - } - } - ite.Next(); - } - - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - - SALOME_ListIteratorOfListIO It1(Sel->StoredIObjects()); - for(;It1.More();It1.Next()) { - Handle(SALOME_InteractiveObject) IObject = It1.Value(); - - SALOMEDS::SObject_var fatherSF = - aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - if(v3d->isInViewer(IObject, true)) { - AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - AIS_ListIteratorOfListOfInteractive ite1(List1); - while(ite1.More()) { - if(ite1.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite1.Value()); - if (aSh->hasIO()) { - Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(aSh->getIO()); - if (IObject->isSame(GIO)) { - ic->Display(aSh); - ic->AddOrRemoveCurrentObject(aSh, true); - break; - } - } + QAD_WaitCursor wc; + SALOME_ListIO listIO; + + QAD_Study* anActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOME_Selection* Sel = SALOME_Selection::Selection( anActiveStudy->getSelection() ); + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); + for( ;It.More();It.Next() ) { + Handle(SALOME_InteractiveObject) anIObject = It.Value(); + if ( anIObject->hasEntry() ) { + SALOMEDS::SObject_var SO = anActiveStudy->getStudyDocument()->FindObjectID( anIObject->getEntry() ); + if ( !SO->_is_nil() && QString( SO->GetID() ) == QString( SO->GetFatherComponent()->GetID() ) ) { + SALOMEDS::SComponent_var SC = SO->GetFatherComponent(); + // if component is selected + listIO.Clear(); + SALOMEDS::ChildIterator_var anIter = anActiveStudy->getStudyDocument()->NewChildIterator( SO ); + anIter->InitEx( true ); + while( anIter->More() ) { + SALOMEDS::SObject_var valSO = anIter->Value(); + SALOMEDS::SObject_var refSO; + if ( !valSO->ReferencedObject( refSO ) ) { + listIO.Append( new SALOME_InteractiveObject( valSO->GetID(), SC->ComponentDataType() ,valSO->GetName()) ); + } + anIter->Next(); } - ite1.Next(); + break; + } + else { + listIO.Append( anIObject ); } } else { - if (IObject->hasEntry()) { - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IObject->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributeIOR_var anIOR; - if (!obj->_is_nil()) { - if (obj->FindAttribute(anAttr, "AttributeIOR")) { - // this SObject may be GEOM module root SObject - - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(anIOR->Value()); - if(CORBA::is_nil(aShape)) continue; - TopoDS_Shape Shape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - - if(obj->FindAttribute(anAttr, "AttributeName")) { - aName = SALOMEDS::AttributeName::_narrow(anAttr); - // open transaction - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); - op->start(); - - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); - aStudyBuilder->Addreference(newObj1, obj); - // commit transaction - op->finish(); - } - - Handle(GEOM_AISShape) aSh = new GEOM_AISShape(Shape, aName->Value()); - Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(anIOR->Value(), myGeomGUI->GetFatherior(),"GEOM"); - - IO->setEntry(obj->GetID()); - aSh->setIO(IO); - aSh->setName(aName->Value()); - ic->Display(aSh); - ic->AddOrRemoveCurrentObject(aSh, true); - } - } - } + listIO.Append( anIObject ); } } + GEOM_Displayer().Display( listIO, true ); } //===================================================================================== -// function : OnErase() -// purpose : +// function : DisplayGUI::Erase() +// purpose : Erase selected GEOM objects //===================================================================================== -void DisplayGUI::OnErase() +void DisplayGUI::Erase() { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - // VTK - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) anIObject; - for(;It.More();It.Next()) { - anIObject = It.Value(); - VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - if(myRenderInter->isInViewer(anIObject)) { - myRenderInter->Erase(anIObject); - } - else { - SALOMEDS::SObject_var obj = aStudy->FindObjectID(anIObject->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - // this SObject may be GEOM module root SObject - SALOMEDS::ChildIterator_var anIter = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->NewChildIterator(obj); - bool useSubItems = false; - while(anIter->More() && !useSubItems) { - SALOMEDS::SObject_var subobj = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttr; - if(subobj->FindAttribute(aTmpAttr, "AttributeIOR")) { - anAttr = aTmpAttr; - obj = subobj; - useSubItems = true; - } - else - anIter->Next(); - } - - while(useSubItems?anIter->More():!anAttr->_is_nil()) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(anIOR->Value()); - TopoDS_Shape Shape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - if(obj->FindAttribute(anAttr, "AttributeName")) { - // searchin for already displayed objects with the same shape - vtkRenderer* theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - vtkActorCollection* theAllActors = theRenderer->GetActors(); - theAllActors->InitTraversal(); - vtkActor* actor = (vtkActor*)theAllActors->GetNextActor(); - Handle(SALOME_InteractiveObject) anIObj; - // don't create new study object if it already exists - bool isDisplayed = false; - while(!(actor==NULL)) { - SALOME_Actor* Gactor = SALOME_Actor::SafeDownCast(actor); - if(Gactor!=NULL) { - if(Gactor->hasIO()) { - if(strcmp(Gactor->getIO()->getEntry(),obj->GetID())==0) { - isDisplayed = true; - anIObj = Gactor->getIO(); - if(!anIObj.IsNull()) - myRenderInter->Erase(anIObj); - } - } - } - actor=(vtkActor*)(theAllActors->GetNextActor()); - } - } - if(useSubItems) { - anIter->Next(); - anAttr=SALOMEDS::GenericAttribute::_nil(); - while(anIter->More() && anAttr->_is_nil()) { - SALOMEDS::SObject_var subobject = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttribute; - if(subobject->FindAttribute(aTmpAttribute, "AttributeIOR")) { - anAttr = aTmpAttribute; - obj = subobject; - } - else - anIter->Next(); - } - } - else - anAttr = SALOMEDS::GenericAttribute::_nil(); - } - } + QAD_WaitCursor wc; + SALOME_ListIO listIO; + + QAD_Study* anActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); + SALOME_Selection* Sel = SALOME_Selection::Selection( anActiveStudy->getSelection() ); + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); + for( ;It.More();It.Next() ) { + Handle(SALOME_InteractiveObject) anIObject = It.Value(); + if ( anIObject->hasEntry() ) { + SALOMEDS::SObject_var SO = anActiveStudy->getStudyDocument()->FindObjectID( anIObject->getEntry() ); + if ( !SO->_is_nil() && QString( SO->GetID() ) == QString( SO->GetFatherComponent()->GetID() ) ) { + SALOMEDS::SComponent_var SC = SO->GetFatherComponent(); + // if component is selected + listIO.Clear(); + SALOMEDS::ChildIterator_var anIter = anActiveStudy->getStudyDocument()->NewChildIterator( SO ); + anIter->InitEx( true ); + while( anIter->More() ) { + SALOMEDS::SObject_var valSO = anIter->Value(); + SALOMEDS::SObject_var refSO; + if ( !valSO->ReferencedObject( refSO ) ) { + listIO.Append( new SALOME_InteractiveObject( valSO->GetID(), SC->ComponentDataType() ,valSO->GetName()) ); + } + anIter->Next(); } + break; } - } - } - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - // OCC - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) anIObject; - for(;It.More();It.Next()) { - anIObject = It.Value(); - if(v3d->isInViewer(anIObject, true)) { - Standard_Boolean found; - Handle(GEOM_AISShape) aSh = myGeomBase->ConvertIOinGEOMAISShape(anIObject, found, true); - if(found) { - ic->Erase(aSh); - ic->AddOrRemoveCurrentObject(aSh, true); - } - } else { - SALOMEDS::SObject_var obj = aStudy->FindObjectID(anIObject->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - // this SObject may be GEOM module root SObject - SALOMEDS::ChildIterator_var anIter = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->NewChildIterator(obj); - bool useSubItems = false; - while(anIter->More() && !useSubItems) { - SALOMEDS::SObject_var subobj = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttr; - if(subobj->FindAttribute(aTmpAttr, "AttributeIOR")) { - anAttr = aTmpAttr; - obj = subobj; - useSubItems = true; - } - else - anIter->Next(); - } - - while(useSubItems?anIter->More():!anAttr->_is_nil()) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(anIOR->Value()); - TopoDS_Shape Shape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - if(obj->FindAttribute(anAttr, "AttributeName")) { - // searchin for already displayed objects with the same shape - AIS_ListOfInteractive aDisplayed; - ic->DisplayedObjects(aDisplayed); - AIS_ListIteratorOfListOfInteractive anIObjects(aDisplayed); - Handle(AIS_Shape) anAISShape; - for(;anIObjects.More();anIObjects.Next()) { - anAISShape = Handle(AIS_Shape)::DownCast(anIObjects.Value()); - if(!anAISShape.IsNull()) { - if(anAISShape->Shape().IsSame(Shape)) - break; - anAISShape.Nullify(); - } - } - if(!anAISShape.IsNull()) { - if(ic->IsDisplayed(anAISShape)) - ic->Erase(anAISShape); - } - } - if(useSubItems) { - anIter->Next(); - anAttr=SALOMEDS::GenericAttribute::_nil(); - while(anIter->More() && anAttr->_is_nil()) { - SALOMEDS::SObject_var subobject = anIter->Value(); - SALOMEDS::GenericAttribute_var aTmpAttribute; - if(subobject->FindAttribute(aTmpAttribute, "AttributeIOR")) { - anAttr = aTmpAttribute; - obj = subobject; - } - else - anIter->Next(); - } - } - else - anAttr = SALOMEDS::GenericAttribute::_nil(); - } - } - } + listIO.Append( anIObject ); } } + else { + listIO.Append( anIObject ); + } } + GEOM_Displayer().Erase( listIO, true ); Sel->ClearIObjects(); } - //===================================================================================== -// function : PrepareSubShapeSelection() -// purpose : (localContextId of the method is opened and defined here) +// function : DisplayGUI::SetDisplayMode() +// purpose : Set display mode for the viewer (current viewer if - 0 ) //===================================================================================== -bool DisplayGUI::PrepareSubShapeSelection(const int SubShapeType, Standard_Integer& returnLocalContextId) +void DisplayGUI::SetDisplayMode( const int mode, QAD_ViewFrame* viewFrame ) { - //* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - /* local context opening */ - //myGeomBase->SetDisplayedObjectList(); - this->OnDisplayOnly(); - - returnLocalContextId = ic->OpenLocalContext(Standard_False, Standard_True, Standard_False, Standard_False); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - Standard_Boolean found; - Handle(GEOM_AISShape) Shape = myGeomBase->ConvertIOinGEOMAISShape(IObject, found); - if(found && SubShapeType >= Shape->Shape().ShapeType()) { - ic->Load(Shape, (8 - SubShapeType), Standard_True); - ic->HilightWithColor(Shape, Quantity_NOC_RED); + QAD_WaitCursor wc; + if ( !viewFrame ) + viewFrame = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + if( viewFrame->getTypeView() == VIEW_VTK ) { + VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)viewFrame)->getRWInteractor(); + myRenderInter->SetDisplayMode( mode ); + } + else if( viewFrame->getTypeView() == VIEW_OCC ) { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)viewFrame)->getViewer(); + Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); + AIS_DisplayMode newmode = (mode == 1 ? AIS_Shaded : AIS_WireFrame); + AIS_ListOfInteractive List; + ic->DisplayedObjects( List ); + AIS_ListOfInteractive List1; + ic->ObjectsInCollector( List1 ); + List.Append( List1 ); + + AIS_ListIteratorOfListOfInteractive ite( List ); + while( ite.More() ) { + if( ite.Value()->IsInstance( STANDARD_TYPE(GEOM_AISShape) ) ) { + Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast( ite.Value() ); + ic->SetDisplayMode( aSh, Standard_Integer( newmode ),true ); + } + ite.Next(); } + + ic->SetDisplayMode( newmode, Standard_False ); } - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_SUBSHAPES")); - return true; } - //===================================================================================== -// function : PrepareSubShapeSelectionArgumentShape() -// purpose : ( localContextId of the method is opened and defined here ) +// function : DisplayGUI::GetDisplayMode() +// purpose : Get display mode of the viewer (current viewer if - 0 ) //===================================================================================== -bool DisplayGUI::PrepareSubShapeSelectionArgumentShape(const TopoDS_Shape& aShape,const int SubShapeType, Standard_Integer& returnLocalContextId) +int DisplayGUI::GetDisplayMode( QAD_ViewFrame* viewFrame ) { - //* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - if(aShape.IsNull()) - return false ; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - /* local context opening */ - //myGeomBase->SetDisplayedObjectList(); - this->OnDisplayOnly(); - - returnLocalContextId = ic->OpenLocalContext(Standard_False, Standard_True, Standard_False, Standard_False) ; - - Handle(GEOM_AISShape) Shape = new GEOM_AISShape(aShape, ""); - ic->Display(Shape, 0, (8 - SubShapeType)); + int dispMode = 0; + if ( !viewFrame ) + viewFrame = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + if( viewFrame->getTypeView() == VIEW_VTK) { + VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)viewFrame)->getRWInteractor(); + dispMode = myRenderInter->GetDisplayMode(); + } + else if( viewFrame->getTypeView() == VIEW_OCC) { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)viewFrame)->getViewer(); + Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); + AIS_DisplayMode mode = (AIS_DisplayMode)ic->DisplayMode(); + dispMode = (mode == AIS_WireFrame ? 0 : 1 ); + } + return dispMode; +} - // Not Load(...) but Display(...) - // ic->Load(Shape, (8 - SubShapeType), Standard_True); - ic->HilightWithColor(Shape, Quantity_NOC_RED); - - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_SUBSHAPES")); - return true; +//===================================================================================== +// function : DisplayGUI::InvertDisplayMode() +// purpose : Invert display mode ( shadin <-> wireframe ) for the viewer +// (current viewer if = 0 ) +//===================================================================================== +void DisplayGUI::InvertDisplayMode( QAD_ViewFrame* viewFrame ) +{ + SetDisplayMode( 1 - GetDisplayMode( viewFrame ) ); } +//===================================================================================== +// function : DisplayGUI::ChangeDisplayMode() +// purpose : Set display mode for selected objects in the viewer given +// (current viewer if = 0 ) +//===================================================================================== +void DisplayGUI::ChangeDisplayMode( const int mode, QAD_ViewFrame* viewFrame ) +{ + QAD_WaitCursor wc; + if ( !viewFrame ) + viewFrame = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + if ( viewFrame->getTypeView() == VIEW_VTK ) { + VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)viewFrame)->getRWInteractor(); + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); + for( ;It.More(); It.Next() ) { + VTKViewer_Prs* vtkPrs = dynamic_cast( viewFrame->CreatePrs( It.Value()->getEntry() ) ); + if ( vtkPrs && !vtkPrs->IsNull() ) { + if ( mode == 0 ) + myRenderInter->ChangeRepresentationToWireframe( vtkPrs->GetObjects() ); + else if ( mode == 1 ) + myRenderInter->ChangeRepresentationToSurface( vtkPrs->GetObjects() ); + } + } + myRenderInter->Render(); + } + else if ( viewFrame->getTypeView() == VIEW_OCC ) { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)viewFrame)->getViewer(); + Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); + for( ;It.More(); It.Next() ) { + OCCViewer_Prs* occPrs = dynamic_cast( viewFrame->CreatePrs( It.Value()->getEntry() ) ); + if ( occPrs && !occPrs->IsNull() ) { + AIS_ListOfInteractive shapes; occPrs->GetObjects( shapes ); + AIS_ListIteratorOfListOfInteractive interIter( shapes ); + for ( ; interIter.More(); interIter.Next() ) { + if ( mode == 0 ) + ic->SetDisplayMode( interIter.Value(), AIS_WireFrame, false ); + else if ( mode == 1 ) + ic->SetDisplayMode( interIter.Value(), AIS_Shaded, false ); + } + } + } + ic->UpdateCurrentViewer(); + } +} //===================================================================================== // EXPORTED METHODS //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return DisplayGUI::OnGUIEvent(theCommandID, parent);} - - void BuildPresentation(const Handle(SALOME_InteractiveObject)& theIO) - {return DisplayGUI::BuildPresentation(theIO);} + GEOMGUI* GetLibGUI() + { + return DisplayGUI::GetDisplayGUI(); + } } diff --git a/src/DisplayGUI/DisplayGUI.h b/src/DisplayGUI/DisplayGUI.h index 1c4aef111..bf2b57ac1 100644 --- a/src/DisplayGUI/DisplayGUI.h +++ b/src/DisplayGUI/DisplayGUI.h @@ -24,43 +24,59 @@ // File : DisplayGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef DISPLAYGUI_H #define DISPLAYGUI_H +#include "GEOMGUI.h" #include "GEOMBase.h" //================================================================================= // class : GEOMBase_Display // purpose : //================================================================================= -class DisplayGUI : public QObject +class QAD_ViewFrame; +class DisplayGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + DisplayGUI(); // hide constructor to avoid direct creation public : - DisplayGUI(); ~DisplayGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); - static void BuildPresentation(const Handle(SALOME_InteractiveObject)& theIO); + // Get the only DisplayGUI object + static DisplayGUI* GetDisplayGUI(); - void OnDisplayAll(bool onlyPreviousDisplayedObject = false); - void OnVTKDisplayOnly(); - void OnDisplayOnly(); - void OnErase(); + // Dispatch menu command + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); - /* Method opening context for any sub shape selection */ - bool PrepareSubShapeSelection(const int SubShapeType, Standard_Integer& returnLocalContextId); - /* Method opening context for sub shape selection on an argument shape */ - bool PrepareSubShapeSelectionArgumentShape(const TopoDS_Shape& aShape, const int SubShapeType, - Standard_Integer& returnLocalContextId); + // Display all GEOM objects + void DisplayAll(); + // Erase all GEOM objects + void EraseAll(); + // Display selected GEOM objects + void Display(); + // Display selected GEOM objects and erase other + void DisplayOnly(); + // Erase selected GEOM objects + void Erase(); - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + // DISPLAY MODE methods : 0 - wireframe, 1 - shading + // Set display mode for the viewer (current viewer if - 0 ) + void SetDisplayMode( const int mode, QAD_ViewFrame* viewFrame = 0 ); + // Get display mode of the viewer (current viewer if - 0 ) + int GetDisplayMode( QAD_ViewFrame* viewFrame = 0 ); + // Invert display mode ( shadin <-> wireframe ) for the viewer + // (current viewer if = 0 ) + void InvertDisplayMode( QAD_ViewFrame* viewFrame = 0 ); + // Set display mode for selected objects in the viewer given + // (current viewer if = 0 ) + void ChangeDisplayMode( const int mode, QAD_ViewFrame* viewFrame = 0 ); + +private: + static DisplayGUI* myGUIObject; // the only DisplayGUI object }; #endif diff --git a/src/DisplayGUI/Makefile.in b/src/DisplayGUI/Makefile.in index d1cd6aa6a..8d0958981 100644 --- a/src/DisplayGUI/Makefile.in +++ b/src/DisplayGUI/Makefile.in @@ -42,10 +42,9 @@ EXPORT_HEADERS= DisplayGUI.h LIB_SRC = DisplayGUI.cxx -LIB_MOC = \ - DisplayGUI.h +LIB_MOC = -LIB_CLIENT_IDL = SALOME_Exception.idl +LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl LIB_SERVER_IDL = @@ -54,6 +53,6 @@ LIB_SERVER_IDL = CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lGEOMBase +LDFLAGS += -lGEOMGUI @CONCLUDE@ diff --git a/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.cxx b/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.cxx new file mode 100644 index 000000000..271cd6d1c --- /dev/null +++ b/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.cxx @@ -0,0 +1,73 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_1List1Spin1Btn_QTD.ui' +** +** Created: Wed Mar 17 11:29:24 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "DlgRef_1List1Spin1Btn_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_1List1Spin1Btn_QTD which is a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_1List1Spin1Btn_QTD::DlgRef_1List1Spin1Btn_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_1List1Spin1Btn_QTD" ); + resize( 204, 148 ); + setCaption( trUtf8( "DlgRef_3Sel4Spin2Check_QTD" ) ); + DlgRef_1List1Spin1Btn_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "DlgRef_1List1Spin1Btn_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setTitle( trUtf8( "" ) ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + QSpacerItem* spacer = new QSpacerItem( 0, 23, QSizePolicy::Minimum, QSizePolicy::Expanding ); + GroupBox1Layout->addItem( spacer, 3, 1 ); + + ListView1 = new QListView( GroupBox1, "ListView1" ); + + GroupBox1Layout->addMultiCellWidget( ListView1, 0, 3, 0, 0 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setText( trUtf8( "TL1" ) ); + + GroupBox1Layout->addWidget( TextLabel1, 0, 1 ); + + SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); + + GroupBox1Layout->addWidget( SpinBox1, 1, 1 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setText( trUtf8( "" ) ); + + GroupBox1Layout->addWidget( PushButton1, 2, 1 ); + + DlgRef_1List1Spin1Btn_QTDLayout->addWidget( GroupBox1, 0, 0 ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_1List1Spin1Btn_QTD::~DlgRef_1List1Spin1Btn_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h b/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h new file mode 100644 index 000000000..909db129e --- /dev/null +++ b/src/DlgRef/DlgRef_1List1Spin1Btn_QTD.h @@ -0,0 +1,44 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_1List1Spin1Btn_QTD.ui' +** +** Created: Wed Mar 17 11:29:24 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef DLGREF_1LIST1SPIN1BTN_QTD_H +#define DLGREF_1LIST1SPIN1BTN_QTD_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QGroupBox; +class QLabel; +class QListView; +class QListViewItem; +class QPushButton; +class QSpinBox; + +class DlgRef_1List1Spin1Btn_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_1List1Spin1Btn_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_1List1Spin1Btn_QTD(); + + QGroupBox* GroupBox1; + QListView* ListView1; + QLabel* TextLabel1; + QSpinBox* SpinBox1; + QPushButton* PushButton1; + + +protected: + QGridLayout* DlgRef_1List1Spin1Btn_QTDLayout; + QGridLayout* GroupBox1Layout; +}; + +#endif // DLGREF_1LIST1SPIN1BTN_QTD_H diff --git a/src/DlgRef/DlgRef_1Sel1Check_QTD.cxx b/src/DlgRef/DlgRef_1Sel1Check_QTD.cxx index 98de50013..7010f4115 100644 --- a/src/DlgRef/DlgRef_1Sel1Check_QTD.cxx +++ b/src/DlgRef/DlgRef_1Sel1Check_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_1Sel1Check_QTD.ui' ** -** Created: ven oct 10 11:28:38 2003 +** Created: Thu May 20 11:55:05 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -9,11 +9,11 @@ #include "DlgRef_1Sel1Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include @@ -27,7 +27,7 @@ DlgRef_1Sel1Check_QTD::DlgRef_1Sel1Check_QTD( QWidget* parent, const char* name { if ( !name ) setName( "DlgRef_1Sel1Check_QTD" ); - resize( 129, 76 ); + resize( 382, 219 ); setCaption( trUtf8( "DlgRef_1Sel1Check_QTD" ) ); DlgRef_1Sel1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel1Check_QTDLayout"); @@ -39,34 +39,38 @@ DlgRef_1Sel1Check_QTD::DlgRef_1Sel1Check_QTD( QWidget* parent, const char* name GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); TextLabel1->setText( trUtf8( "TL1" ) ); - Layout1->addWidget( TextLabel1, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 113, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 2, 2 ); + Layout3->addWidget( TextLabel1, 0, 0 ); PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); PushButton1->setText( trUtf8( "" ) ); - Layout1->addWidget( PushButton1, 0, 1 ); + Layout3->addWidget( PushButton1, 0, 1 ); - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); + CheckButton1->setText( trUtf8( "" ) ); - Layout1->addWidget( LineEdit1, 0, 2 ); + Layout3->addMultiCellWidget( CheckButton1, 1, 1, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout3->addItem( spacer, 2, 2 ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); - CheckButton1->setText( trUtf8( "" ) ); + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - Layout1->addMultiCellWidget( CheckButton1, 1, 1, 0, 2 ); + Layout3->addWidget( LineEdit1, 0, 2 ); - GroupBox1Layout->addLayout( Layout1, 0, 0 ); + GroupBox1Layout->addLayout( Layout3, 0, 0 ); DlgRef_1Sel1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, CheckButton1 ); } /* diff --git a/src/DlgRef/DlgRef_1Sel1Check_QTD.h b/src/DlgRef/DlgRef_1Sel1Check_QTD.h index 7f083d9ff..4ff71d4bd 100644 --- a/src/DlgRef/DlgRef_1Sel1Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel1Check_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_1Sel1Check_QTD.ui' ** -** Created: ven oct 10 11:28:37 2003 +** Created: Thu May 20 11:55:05 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -14,11 +14,11 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class DlgRef_1Sel1Check_QTD : public QWidget { @@ -31,14 +31,14 @@ public: QGroupBox* GroupBox1; QLabel* TextLabel1; QPushButton* PushButton1; + QCheckBox* CheckButton1; QLineEdit* LineEdit1; - QRadioButton* CheckButton1; protected: QGridLayout* DlgRef_1Sel1Check_QTDLayout; QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; + QGridLayout* Layout3; }; #endif // DLGREF_1SEL1CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.cxx index 12fc89820..86f49fb17 100644 --- a/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.cxx +++ b/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_1Sel1Spin1Check_QTD.ui' ** -** Created: lun nov 17 14:16:09 2003 +** Created: Mon May 24 15:59:03 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -9,11 +9,11 @@ #include "DlgRef_1Sel1Spin1Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include @@ -28,7 +28,7 @@ DlgRef_1Sel1Spin1Check_QTD::DlgRef_1Sel1Spin1Check_QTD( QWidget* parent, const { if ( !name ) setName( "DlgRef_1Sel1Spin1Check_QTD" ); - resize( 129, 106 ); + resize( 163, 109 ); setCaption( trUtf8( "DlgRef_1Sel1Spin1Check_QTD" ) ); DlgRef_1Sel1Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel1Spin1Check_QTDLayout"); @@ -40,21 +40,7 @@ DlgRef_1Sel1Spin1Check_QTD::DlgRef_1Sel1Spin1Check_QTD( QWidget* parent, const GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - QSpacerItem* spacer = new QSpacerItem( 0, 120, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 3, 2 ); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout1->addWidget( TextLabel1, 0, 0 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); + Layout8 = new QGridLayout( 0, 1, 1, 0, 6, "Layout8"); Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); @@ -69,18 +55,32 @@ DlgRef_1Sel1Spin1Check_QTD::DlgRef_1Sel1Spin1Check_QTD( QWidget* parent, const Layout2->addWidget( TextLabel2, 0, 0 ); - Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); + Layout8->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); + + Layout8->addWidget( TextLabel1, 0, 0 ); LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - Layout1->addWidget( LineEdit1, 0, 2 ); + Layout8->addWidget( LineEdit1, 0, 2 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); + + Layout8->addWidget( PushButton1, 0, 1 ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); CheckButton1->setText( trUtf8( "" ) ); - Layout1->addMultiCellWidget( CheckButton1, 2, 2, 0, 2 ); + Layout8->addMultiCellWidget( CheckButton1, 2, 2, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout8->addItem( spacer, 3, 2 ); - GroupBox1Layout->addLayout( Layout1, 0, 0 ); + GroupBox1Layout->addLayout( Layout8, 0, 0 ); DlgRef_1Sel1Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); } diff --git a/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h b/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h index cf3722b32..a14bb56e6 100644 --- a/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel1Spin1Check_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_1Sel1Spin1Check_QTD.ui' ** -** Created: lun nov 17 14:16:09 2003 +** Created: Mon May 24 15:59:03 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -14,11 +14,11 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class QSpinBox; class DlgRef_1Sel1Spin1Check_QTD : public QWidget @@ -30,18 +30,18 @@ public: ~DlgRef_1Sel1Spin1Check_QTD(); QGroupBox* GroupBox1; - QLabel* TextLabel1; - QPushButton* PushButton1; QSpinBox* SpinBox1; QLabel* TextLabel2; + QLabel* TextLabel1; QLineEdit* LineEdit1; - QRadioButton* CheckButton1; + QPushButton* PushButton1; + QCheckBox* CheckButton1; protected: QGridLayout* DlgRef_1Sel1Spin1Check_QTDLayout; QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; + QGridLayout* Layout8; QGridLayout* Layout2; }; diff --git a/src/DlgRef/DlgRef_1Sel3Check_QTD.cxx b/src/DlgRef/DlgRef_1Sel3Check_QTD.cxx index 3778dd33e..7f35197cc 100644 --- a/src/DlgRef/DlgRef_1Sel3Check_QTD.cxx +++ b/src/DlgRef/DlgRef_1Sel3Check_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_1Sel3Check_QTD.ui' ** -** Created: lun nov 17 11:32:21 2003 +** Created: Thu May 20 10:15:08 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -9,11 +9,11 @@ #include "DlgRef_1Sel3Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include @@ -27,7 +27,7 @@ DlgRef_1Sel3Check_QTD::DlgRef_1Sel3Check_QTD( QWidget* parent, const char* name { if ( !name ) setName( "DlgRef_1Sel3Check_QTD" ); - resize( 129, 114 ); + resize( 163, 116 ); setCaption( trUtf8( "DlgRef_1Sel3Check_QTD" ) ); DlgRef_1Sel3Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel3Check_QTDLayout"); @@ -39,44 +39,50 @@ DlgRef_1Sel3Check_QTD::DlgRef_1Sel3Check_QTD( QWidget* parent, const char* name GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + Layout6 = new QGridLayout( 0, 1, 1, 0, 6, "Layout6"); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout6->addItem( spacer, 4, 2 ); - CheckButton2 = new QRadioButton( GroupBox1, "CheckButton2" ); - CheckButton2->setText( trUtf8( "" ) ); + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - Layout1->addMultiCellWidget( CheckButton2, 2, 2, 0, 2 ); + Layout6->addWidget( LineEdit1, 0, 2 ); - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); + CheckButton2 = new QCheckBox( GroupBox1, "CheckButton2" ); + CheckButton2->setText( trUtf8( "" ) ); - Layout1->addWidget( TextLabel1, 0, 0 ); + Layout6->addMultiCellWidget( CheckButton2, 2, 2, 0, 2 ); - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); + CheckButton1->setText( trUtf8( "" ) ); - Layout1->addWidget( PushButton1, 0, 1 ); - QSpacerItem* spacer = new QSpacerItem( 0, 60, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 4, 2 ); + Layout6->addMultiCellWidget( CheckButton1, 1, 1, 0, 2 ); - CheckButton3 = new QRadioButton( GroupBox1, "CheckButton3" ); + CheckButton3 = new QCheckBox( GroupBox1, "CheckButton3" ); CheckButton3->setText( trUtf8( "" ) ); - Layout1->addMultiCellWidget( CheckButton3, 3, 3, 0, 2 ); + Layout6->addMultiCellWidget( CheckButton3, 3, 3, 0, 2 ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); - CheckButton1->setText( trUtf8( "" ) ); + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); - Layout1->addMultiCellWidget( CheckButton1, 1, 1, 0, 2 ); + Layout6->addWidget( PushButton1, 0, 1 ); - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); - Layout1->addWidget( LineEdit1, 0, 2 ); + Layout6->addWidget( TextLabel1, 0, 0 ); - GroupBox1Layout->addLayout( Layout1, 0, 0 ); + GroupBox1Layout->addLayout( Layout6, 0, 0 ); DlgRef_1Sel3Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, CheckButton1 ); + setTabOrder( CheckButton1, CheckButton2 ); + setTabOrder( CheckButton2, CheckButton3 ); } /* diff --git a/src/DlgRef/DlgRef_1Sel3Check_QTD.h b/src/DlgRef/DlgRef_1Sel3Check_QTD.h index 248f7f773..a63e25ea7 100644 --- a/src/DlgRef/DlgRef_1Sel3Check_QTD.h +++ b/src/DlgRef/DlgRef_1Sel3Check_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_1Sel3Check_QTD.ui' ** -** Created: lun nov 17 11:32:20 2003 +** Created: Thu May 20 10:15:07 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -14,11 +14,11 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class DlgRef_1Sel3Check_QTD : public QWidget { @@ -29,18 +29,18 @@ public: ~DlgRef_1Sel3Check_QTD(); QGroupBox* GroupBox1; - QRadioButton* CheckButton2; - QLabel* TextLabel1; - QPushButton* PushButton1; - QRadioButton* CheckButton3; - QRadioButton* CheckButton1; QLineEdit* LineEdit1; + QCheckBox* CheckButton2; + QCheckBox* CheckButton1; + QCheckBox* CheckButton3; + QPushButton* PushButton1; + QLabel* TextLabel1; protected: QGridLayout* DlgRef_1Sel3Check_QTDLayout; QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; + QGridLayout* Layout6; }; #endif // DLGREF_1SEL3CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_1Sel_Ext.h b/src/DlgRef/DlgRef_1Sel_Ext.h new file mode 100644 index 000000000..9b995ddcb --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel_Ext.h @@ -0,0 +1,28 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_1Sel_QTD.ui' +** +** Created: lun sep 22 17:38:05 2003 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef DlgRef_1Sel_Ext_H +#define DlgRef_1Sel_Ext_H + +#include "DlgRef_1Sel_QTD.h" + +class QGridLayout; + +class DlgRef_1Sel_Ext : public DlgRef_1Sel_QTD +{ + Q_OBJECT + +public: + DlgRef_1Sel_Ext( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ) + : DlgRef_1Sel_QTD( parent, name, fl ) {}; + ~DlgRef_1Sel_Ext() {}; + + QGridLayout* getGroupBoxLayout() { return GroupBox1Layout; } +}; + +#endif // DlgRef_1Sel_Ext_H diff --git a/src/DlgRef/DlgRef_2Sel1Spin.cxx b/src/DlgRef/DlgRef_2Sel1Spin.cxx index cb8499e99..b42b334cf 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin.cxx +++ b/src/DlgRef/DlgRef_2Sel1Spin.cxx @@ -31,6 +31,7 @@ #include #include #include +#include /* * Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the @@ -42,6 +43,10 @@ DlgRef_2Sel1Spin::DlgRef_2Sel1Spin(QWidget* parent, const char* name, WFlags fl SpinBox1->close(TRUE); SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX"); Layout2->addWidget(SpinBox_DX, 0, 1); + + // PAL 6532 + PushButton1->setAutoDefault( false ); + PushButton2->setAutoDefault( false ); } diff --git a/src/DlgRef/DlgRef_2Sel1Spin1Check.cxx b/src/DlgRef/DlgRef_2Sel1Spin2Check.cxx similarity index 79% rename from src/DlgRef/DlgRef_2Sel1Spin1Check.cxx rename to src/DlgRef/DlgRef_2Sel1Spin2Check.cxx index c4d8c0619..717897572 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin1Check.cxx +++ b/src/DlgRef/DlgRef_2Sel1Spin2Check.cxx @@ -21,34 +21,34 @@ // // // -// File : DlgRef_2Sel1Spin1Check.cxx +// File : DlgRef_2Sel1Spin2Check.cxx // Author : Damien COQUERET // Module : GEOM // $Header: -#include "DlgRef_2Sel1Spin1Check.h" +#include "DlgRef_2Sel1Spin2Check.h" #include #include #include /* - * Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the + * Constructs a DlgRef_2Sel1Spin2Check which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -DlgRef_2Sel1Spin1Check::DlgRef_2Sel1Spin1Check(QWidget* parent, const char* name, WFlags fl) - :DlgRef_2Sel1Spin1Check_QTD(parent, name, fl) +DlgRef_2Sel1Spin2Check::DlgRef_2Sel1Spin2Check(QWidget* parent, const char* name, WFlags fl) + :DlgRef_2Sel1Spin2Check_QTD(parent, name, fl) { SpinBox1->close(TRUE); SpinBox_DX = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX"); - Layout2->addWidget(SpinBox_DX, 0, 1); + Layout1->addWidget(SpinBox_DX, 2, 2); } /* * Destroys the object and frees any allocated resources */ -DlgRef_2Sel1Spin1Check::~DlgRef_2Sel1Spin1Check() +DlgRef_2Sel1Spin2Check::~DlgRef_2Sel1Spin2Check() { // no need to delete child widgets, Qt does it all for us } diff --git a/src/DlgRef/DlgRef_2Sel1Spin1Check.h b/src/DlgRef/DlgRef_2Sel1Spin2Check.h similarity index 81% rename from src/DlgRef/DlgRef_2Sel1Spin1Check.h rename to src/DlgRef/DlgRef_2Sel1Spin2Check.h index f26c0bfbe..89e9d149c 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin1Check.h +++ b/src/DlgRef/DlgRef_2Sel1Spin2Check.h @@ -21,27 +21,27 @@ // // // -// File : DlgRef_2Sel1Spin1Check.h +// File : DlgRef_2Sel1Spin2Check.h // Author : Damien COQUERET // Module : GEOM // $Header: -#ifndef DLGREF_2SEL1SPIN1CHECK_H -#define DLGREF_2SEL1SPIN1CHECK_H +#ifndef DLGREF_2SEL1SPIN2CHECK_H +#define DLGREF_2SEL1SPIN2CHECK_H -#include "DlgRef_2Sel1Spin1Check_QTD.h" +#include "DlgRef_2Sel1Spin2Check_QTD.h" #include "DlgRef_SpinBox.h" -class DlgRef_2Sel1Spin1Check : public DlgRef_2Sel1Spin1Check_QTD +class DlgRef_2Sel1Spin2Check : public DlgRef_2Sel1Spin2Check_QTD { Q_OBJECT public: - DlgRef_2Sel1Spin1Check(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); - ~DlgRef_2Sel1Spin1Check(); + DlgRef_2Sel1Spin2Check(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + ~DlgRef_2Sel1Spin2Check(); DlgRef_SpinBox* SpinBox_DX; }; -#endif // DLGREF_2SEL1SPIN1CHECK_H +#endif // DLGREF_2SEL1SPIN2CHECK_H diff --git a/src/DlgRef/DlgRef_2Sel1Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.cxx similarity index 67% rename from src/DlgRef/DlgRef_2Sel1Spin1Check_QTD.cxx rename to src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.cxx index 7fa002f40..7b54bed10 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin1Check_QTD.cxx +++ b/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.cxx @@ -1,36 +1,36 @@ /**************************************************************************** -** Form implementation generated from reading ui file 'DlgRef_2Sel1Spin1Check_QTD.ui' +** Form implementation generated from reading ui file 'DlgRef_2Sel1Spin2Check_QTD.ui' ** -** Created: mer oct 1 16:20:02 2003 +** Created: Fri Aug 13 15:32:26 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ -#include "DlgRef_2Sel1Spin1Check_QTD.h" +#include "DlgRef_2Sel1Spin2Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include #include /* - * Constructs a DlgRef_2Sel1Spin1Check_QTD which is a child of 'parent', with the + * Constructs a DlgRef_2Sel1Spin2Check_QTD which is a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ -DlgRef_2Sel1Spin1Check_QTD::DlgRef_2Sel1Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl ) +DlgRef_2Sel1Spin2Check_QTD::DlgRef_2Sel1Spin2Check_QTD( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) - setName( "DlgRef_2Sel1Spin1Check_QTD" ); - resize( 129, 117 ); - setCaption( trUtf8( "DlgRef_2Sel1Spin1Check_QTD" ) ); - DlgRef_2Sel1Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel1Spin1Check_QTDLayout"); + setName( "DlgRef_2Sel1Spin2Check_QTD" ); + resize( 256, 139 ); + setCaption( trUtf8( "DlgRef_2Sel1Spin2Check_QTD" ) ); + DlgRef_2Sel1Spin2Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel1Spin2Check_QTDLayout"); GroupBox1 = new QGroupBox( this, "GroupBox1" ); GroupBox1->setTitle( trUtf8( "" ) ); @@ -42,33 +42,40 @@ DlgRef_2Sel1Spin1Check_QTD::DlgRef_2Sel1Spin1Check_QTD( QWidget* parent, const Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setText( trUtf8( "TL2" ) ); + + Layout1->addWidget( TextLabel2, 1, 0 ); - Layout1->addWidget( LineEdit1, 0, 2 ); + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + TextLabel3->setText( trUtf8( "TL3" ) ); + + Layout1->addWidget( TextLabel3, 2, 0 ); TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); TextLabel1->setText( trUtf8( "TL1" ) ); Layout1->addWidget( TextLabel1, 0, 0 ); + QSpacerItem* spacer = new QSpacerItem( 0, 316, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 4, 2 ); - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); + CheckButton2 = new QCheckBox( GroupBox1, "CheckButton2" ); + CheckButton2->setText( trUtf8( "" ) ); - Layout1->addWidget( TextLabel2, 1, 0 ); + Layout1->addWidget( CheckButton2, 2, 3 ); LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); - Layout1->addWidget( LineEdit2, 1, 2 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); - QSpacerItem* spacer = new QSpacerItem( 0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 3, 2 ); + Layout1->addMultiCellWidget( LineEdit2, 1, 1, 2, 3 ); PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); @@ -76,35 +83,37 @@ DlgRef_2Sel1Spin1Check_QTD::DlgRef_2Sel1Spin1Check_QTD( QWidget* parent, const Layout1->addWidget( PushButton2, 1, 1 ); - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); - SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - Layout2->addWidget( SpinBox1, 0, 1 ); + Layout1->addMultiCellWidget( LineEdit1, 0, 0, 2, 3 ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); CheckButton1->setText( trUtf8( "" ) ); - Layout2->addWidget( CheckButton1, 0, 2 ); + Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 3 ); - TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); - TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); - TextLabel3->setText( trUtf8( "TL3" ) ); - - Layout2->addWidget( TextLabel3, 0, 0 ); + SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); + SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); - Layout1->addMultiCellLayout( Layout2, 2, 2, 0, 2 ); + Layout1->addWidget( SpinBox1, 2, 2 ); GroupBox1Layout->addLayout( Layout1, 0, 0 ); - DlgRef_2Sel1Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + DlgRef_2Sel1Spin2Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, PushButton2 ); + setTabOrder( PushButton2, LineEdit2 ); + setTabOrder( LineEdit2, SpinBox1 ); + setTabOrder( SpinBox1, CheckButton2 ); + setTabOrder( CheckButton2, CheckButton1 ); } /* * Destroys the object and frees any allocated resources */ -DlgRef_2Sel1Spin1Check_QTD::~DlgRef_2Sel1Spin1Check_QTD() +DlgRef_2Sel1Spin2Check_QTD::~DlgRef_2Sel1Spin2Check_QTD() { // no need to delete child widgets, Qt does it all for us } diff --git a/src/DlgRef/DlgRef_2Sel1Spin1Check_QTD.h b/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h similarity index 66% rename from src/DlgRef/DlgRef_2Sel1Spin1Check_QTD.h rename to src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h index cbc33b9c0..d090065d8 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_2Sel1Spin2Check_QTD.h @@ -1,51 +1,51 @@ /**************************************************************************** -** Form interface generated from reading ui file 'DlgRef_2Sel1Spin1Check_QTD.ui' +** Form interface generated from reading ui file 'DlgRef_2Sel1Spin2Check_QTD.ui' ** -** Created: mer oct 1 16:20:02 2003 +** Created: Fri Aug 13 15:32:26 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ -#ifndef DLGREF_2SEL1SPIN1CHECK_QTD_H -#define DLGREF_2SEL1SPIN1CHECK_QTD_H +#ifndef DLGREF_2SEL1SPIN2CHECK_QTD_H +#define DLGREF_2SEL1SPIN2CHECK_QTD_H #include #include class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class QSpinBox; -class DlgRef_2Sel1Spin1Check_QTD : public QWidget +class DlgRef_2Sel1Spin2Check_QTD : public QWidget { Q_OBJECT public: - DlgRef_2Sel1Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~DlgRef_2Sel1Spin1Check_QTD(); + DlgRef_2Sel1Spin2Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_2Sel1Spin2Check_QTD(); QGroupBox* GroupBox1; - QLineEdit* LineEdit1; - QLabel* TextLabel1; QLabel* TextLabel2; - QLineEdit* LineEdit2; QPushButton* PushButton1; + QLabel* TextLabel3; + QLabel* TextLabel1; + QCheckBox* CheckButton2; + QLineEdit* LineEdit2; QPushButton* PushButton2; + QLineEdit* LineEdit1; + QCheckBox* CheckButton1; QSpinBox* SpinBox1; - QRadioButton* CheckButton1; - QLabel* TextLabel3; protected: - QGridLayout* DlgRef_2Sel1Spin1Check_QTDLayout; + QGridLayout* DlgRef_2Sel1Spin2Check_QTDLayout; QGridLayout* GroupBox1Layout; QGridLayout* Layout1; - QGridLayout* Layout2; }; -#endif // DLGREF_2SEL1SPIN1CHECK_QTD_H +#endif // DLGREF_2SEL1SPIN2CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_2Sel1Spin_QTD.cxx b/src/DlgRef/DlgRef_2Sel1Spin_QTD.cxx index 9c27921ac..cc32e36cb 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin_QTD.cxx +++ b/src/DlgRef/DlgRef_2Sel1Spin_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_2Sel1Spin_QTD.ui' ** -** Created: mar sep 23 16:05:09 2003 +** Created: Tue Jun 1 16:15:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -27,7 +27,7 @@ DlgRef_2Sel1Spin_QTD::DlgRef_2Sel1Spin_QTD( QWidget* parent, const char* name, { if ( !name ) setName( "DlgRef_2Sel1Spin_QTD" ); - resize( 129, 117 ); + resize( 163, 122 ); setCaption( trUtf8( "DlgRef_2Sel1Spin_QTD" ) ); DlgRef_2Sel1Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel1Spin_QTDLayout"); @@ -69,6 +69,8 @@ DlgRef_2Sel1Spin_QTD::DlgRef_2Sel1Spin_QTD( QWidget* parent, const char* name, TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setFrameShape( QLabel::NoFrame ); + TextLabel2->setFrameShadow( QLabel::Plain ); TextLabel2->setText( trUtf8( "TL2" ) ); Layout1->addWidget( TextLabel2, 1, 0 ); @@ -93,6 +95,12 @@ DlgRef_2Sel1Spin_QTD::DlgRef_2Sel1Spin_QTD( QWidget* parent, const char* name, GroupBox1Layout->addLayout( Layout1, 0, 0 ); DlgRef_2Sel1Spin_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, PushButton2 ); + setTabOrder( PushButton2, LineEdit2 ); + setTabOrder( LineEdit2, SpinBox1 ); } /* diff --git a/src/DlgRef/DlgRef_2Sel1Spin_QTD.h b/src/DlgRef/DlgRef_2Sel1Spin_QTD.h index 8f1f48985..0d0abfc3c 100644 --- a/src/DlgRef/DlgRef_2Sel1Spin_QTD.h +++ b/src/DlgRef/DlgRef_2Sel1Spin_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_2Sel1Spin_QTD.ui' ** -** Created: mar sep 23 16:05:09 2003 +** Created: Tue Jun 1 16:14:59 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/DlgRef/DlgRef_2Sel2Spin1Check.cxx b/src/DlgRef/DlgRef_2Sel2Spin1Check.cxx index e996c3cfa..f8ac135da 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin1Check.cxx +++ b/src/DlgRef/DlgRef_2Sel2Spin1Check.cxx @@ -31,6 +31,7 @@ #include #include #include +#include /* * Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the @@ -45,6 +46,10 @@ DlgRef_2Sel2Spin1Check::DlgRef_2Sel2Spin1Check(QWidget* parent, const char* name SpinBox_DY = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY"); Layout2->addWidget(SpinBox_DX, 0, 1); Layout2->addWidget(SpinBox_DY, 1, 1); + + // PAL 6532 + PushButton1->setAutoDefault( false ); + PushButton2->setAutoDefault( false ); } diff --git a/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.cxx index 22d8dc808..5a1b88e5c 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.cxx +++ b/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_2Sel2Spin1Check_QTD.ui' ** -** Created: ven oct 24 09:53:25 2003 +** Created: Tue Jun 1 16:29:28 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -9,11 +9,11 @@ #include "DlgRef_2Sel2Spin1Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include @@ -28,7 +28,7 @@ DlgRef_2Sel2Spin1Check_QTD::DlgRef_2Sel2Spin1Check_QTD( QWidget* parent, const { if ( !name ) setName( "DlgRef_2Sel2Spin1Check_QTD" ); - resize( 129, 164 ); + resize( 163, 170 ); setCaption( trUtf8( "DlgRef_2Sel2Spin1Check_QTD" ) ); DlgRef_2Sel2Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel2Spin1Check_QTDLayout"); @@ -48,11 +48,11 @@ DlgRef_2Sel2Spin1Check_QTD::DlgRef_2Sel2Spin1Check_QTD( QWidget* parent, const Layout1->addWidget( TextLabel2, 1, 0 ); - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); - Layout1->addWidget( PushButton1, 0, 1 ); + Layout1->addWidget( TextLabel1, 0, 0 ); Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); @@ -80,36 +80,44 @@ DlgRef_2Sel2Spin1Check_QTD::DlgRef_2Sel2Spin1Check_QTD( QWidget* parent, const Layout1->addMultiCellLayout( Layout2, 2, 2, 0, 2 ); - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - Layout1->addWidget( TextLabel1, 0, 0 ); + Layout1->addWidget( LineEdit1, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 4, 2 ); - PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); - PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); - PushButton2->setText( trUtf8( "" ) ); + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); + CheckButton1->setText( trUtf8( "" ) ); - Layout1->addWidget( PushButton2, 1, 1 ); - QSpacerItem* spacer = new QSpacerItem( 0, 275, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 4, 2 ); + Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 2 ); LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); Layout1->addWidget( LineEdit2, 1, 2 ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); - CheckButton1->setText( trUtf8( "" ) ); + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + PushButton2->setText( trUtf8( "" ) ); - Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 2 ); + Layout1->addWidget( PushButton2, 1, 1 ); - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); - Layout1->addWidget( LineEdit1, 0, 2 ); + Layout1->addWidget( PushButton1, 0, 1 ); GroupBox1Layout->addLayout( Layout1, 0, 0 ); DlgRef_2Sel2Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, PushButton2 ); + setTabOrder( PushButton2, LineEdit2 ); + setTabOrder( LineEdit2, SpinBox1 ); + setTabOrder( SpinBox1, SpinBox2 ); + setTabOrder( SpinBox2, CheckButton1 ); } /* diff --git a/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h b/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h index 624e360ed..dda68e4bb 100644 --- a/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_2Sel2Spin1Check_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_2Sel2Spin1Check_QTD.ui' ** -** Created: ven oct 24 09:53:25 2003 +** Created: Tue Jun 1 16:29:28 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -14,11 +14,11 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class QSpinBox; class DlgRef_2Sel2Spin1Check_QTD : public QWidget @@ -31,16 +31,16 @@ public: QGroupBox* GroupBox1; QLabel* TextLabel2; - QPushButton* PushButton1; + QLabel* TextLabel1; QSpinBox* SpinBox1; QLabel* TextLabel3; QLabel* TextLabel4; QSpinBox* SpinBox2; - QLabel* TextLabel1; - QPushButton* PushButton2; - QLineEdit* LineEdit2; - QRadioButton* CheckButton1; QLineEdit* LineEdit1; + QCheckBox* CheckButton1; + QLineEdit* LineEdit2; + QPushButton* PushButton2; + QPushButton* PushButton1; protected: diff --git a/src/DlgRef/DlgRef_2Sel4Spin1Check.cxx b/src/DlgRef/DlgRef_2Sel4Spin1Check.cxx index d10c1e50d..2a039dd2b 100644 --- a/src/DlgRef/DlgRef_2Sel4Spin1Check.cxx +++ b/src/DlgRef/DlgRef_2Sel4Spin1Check.cxx @@ -31,6 +31,7 @@ #include #include #include +#include /* * Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the @@ -51,6 +52,10 @@ DlgRef_2Sel4Spin1Check::DlgRef_2Sel4Spin1Check(QWidget* parent, const char* name Layout2->addWidget(SpinBox_DY1, 1, 1); Layout3->addWidget(SpinBox_DX2, 0, 1); Layout3->addWidget(SpinBox_DY2, 1, 1); + + // PAL 6532 + PushButton1->setAutoDefault( false ); + PushButton2->setAutoDefault( false ); } diff --git a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.cxx index 508e7c648..a59e6c6df 100644 --- a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.cxx +++ b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_2Sel4Spin1Check_QTD.ui' ** -** Created: lun oct 27 11:40:44 2003 +** Created: Tue Jun 1 12:38:04 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -9,11 +9,11 @@ #include "DlgRef_2Sel4Spin1Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include @@ -28,7 +28,7 @@ DlgRef_2Sel4Spin1Check_QTD::DlgRef_2Sel4Spin1Check_QTD( QWidget* parent, const { if ( !name ) setName( "DlgRef_2Sel4Spin1Check_QTD" ); - resize( 129, 222 ); + resize( 262, 230 ); setCaption( trUtf8( "DlgRef_2Sel4Spin1Check_QTD" ) ); DlgRef_2Sel4Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_2Sel4Spin1Check_QTDLayout"); @@ -40,17 +40,18 @@ DlgRef_2Sel4Spin1Check_QTD::DlgRef_2Sel4Spin1Check_QTD( QWidget* parent, const GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - - LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); - - Layout1->addWidget( LineEdit2, 1, 2 ); + Layout5 = new QGridLayout( 0, 1, 1, 0, 6, "Layout5"); PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); PushButton1->setText( trUtf8( "" ) ); - Layout1->addWidget( PushButton1, 0, 1 ); + Layout5->addWidget( PushButton1, 0, 1 ); + + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); + CheckButton1->setText( trUtf8( "" ) ); + + Layout5->addMultiCellWidget( CheckButton1, 3, 3, 0, 3 ); Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); @@ -76,7 +77,35 @@ DlgRef_2Sel4Spin1Check_QTD::DlgRef_2Sel4Spin1Check_QTD( QWidget* parent, const Layout2->addWidget( TextLabel4, 1, 0 ); - Layout1->addMultiCellLayout( Layout2, 2, 2, 0, 2 ); + Layout5->addMultiCellLayout( Layout2, 2, 2, 0, 2 ); + + LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); + + Layout5->addWidget( LineEdit2, 1, 2 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); + + Layout5->addWidget( TextLabel1, 0, 0 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout5->addWidget( LineEdit1, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout5->addItem( spacer, 5, 3 ); + + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + PushButton2->setText( trUtf8( "" ) ); + + Layout5->addWidget( PushButton2, 1, 1 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setText( trUtf8( "TL2" ) ); + + Layout5->addWidget( TextLabel2, 1, 0 ); Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); @@ -102,40 +131,21 @@ DlgRef_2Sel4Spin1Check_QTD::DlgRef_2Sel4Spin1Check_QTD( QWidget* parent, const Layout3->addWidget( TextLabel6, 1, 0 ); - Layout1->addMultiCellLayout( Layout3, 4, 4, 0, 2 ); - - PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); - PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); - PushButton2->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton2, 1, 1 ); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout1->addWidget( TextLabel1, 0, 0 ); + Layout5->addMultiCellLayout( Layout3, 4, 4, 0, 2 ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); - CheckButton1->setText( trUtf8( "" ) ); - - Layout1->addMultiCellWidget( CheckButton1, 3, 3, 0, 2 ); - - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - - Layout1->addWidget( LineEdit1, 0, 2 ); - - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); - - Layout1->addWidget( TextLabel2, 1, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 177, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 5, 2 ); - - GroupBox1Layout->addLayout( Layout1, 0, 0 ); + GroupBox1Layout->addLayout( Layout5, 0, 0 ); DlgRef_2Sel4Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, PushButton2 ); + setTabOrder( PushButton2, LineEdit2 ); + setTabOrder( LineEdit2, SpinBox1 ); + setTabOrder( SpinBox1, SpinBox2 ); + setTabOrder( SpinBox2, CheckButton1 ); + setTabOrder( CheckButton1, SpinBox3 ); + setTabOrder( SpinBox3, SpinBox4 ); } /* diff --git a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h index afde716e6..57e27f7fc 100644 --- a/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h +++ b/src/DlgRef/DlgRef_2Sel4Spin1Check_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_2Sel4Spin1Check_QTD.ui' ** -** Created: lun oct 27 11:40:44 2003 +** Created: Tue Jun 1 12:38:04 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -14,11 +14,11 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class QSpinBox; class DlgRef_2Sel4Spin1Check_QTD : public QWidget @@ -30,27 +30,27 @@ public: ~DlgRef_2Sel4Spin1Check_QTD(); QGroupBox* GroupBox1; - QLineEdit* LineEdit2; QPushButton* PushButton1; + QCheckBox* CheckButton1; QLabel* TextLabel3; QSpinBox* SpinBox1; QSpinBox* SpinBox2; QLabel* TextLabel4; + QLineEdit* LineEdit2; + QLabel* TextLabel1; + QLineEdit* LineEdit1; + QPushButton* PushButton2; + QLabel* TextLabel2; QSpinBox* SpinBox4; QLabel* TextLabel5; QSpinBox* SpinBox3; QLabel* TextLabel6; - QPushButton* PushButton2; - QLabel* TextLabel1; - QRadioButton* CheckButton1; - QLineEdit* LineEdit1; - QLabel* TextLabel2; protected: QGridLayout* DlgRef_2Sel4Spin1Check_QTDLayout; QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; + QGridLayout* Layout5; QGridLayout* Layout2; QGridLayout* Layout3; }; diff --git a/src/DlgRef/DlgRef_3Check_QTD.cxx b/src/DlgRef/DlgRef_3Check_QTD.cxx new file mode 100644 index 000000000..1e24399b7 --- /dev/null +++ b/src/DlgRef/DlgRef_3Check_QTD.cxx @@ -0,0 +1,75 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_3Check_QTD.ui' +** +** Created: Tue Aug 24 11:27:47 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "DlgRef_3Check_QTD.h" + +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_3Check_QTD which is a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_3Check_QTD::DlgRef_3Check_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_3Check_QTD" ); + resize( 135, 108 ); + setCaption( trUtf8( "DlgRef_3Check_QTD" ) ); + DlgRef_3Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_3Check_QTDLayout"); + + GroupBox1 = new QButtonGroup( this, "GroupBox1" ); + GroupBox1->setTitle( trUtf8( "" ) ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + + Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + + RadioButton3 = new QRadioButton( GroupBox1, "RadioButton3" ); + RadioButton3->setText( trUtf8( "RadioButton3" ) ); + + Layout1->addWidget( RadioButton3, 2, 0 ); + + RadioButton1 = new QRadioButton( GroupBox1, "RadioButton1" ); + RadioButton1->setText( trUtf8( "RadioButton1" ) ); + + Layout1->addWidget( RadioButton1, 0, 0 ); + + RadioButton2 = new QRadioButton( GroupBox1, "RadioButton2" ); + RadioButton2->setText( trUtf8( "RadioButton2" ) ); + + Layout1->addWidget( RadioButton2, 1, 0 ); + QSpacerItem* spacer = new QSpacerItem( 0, 91, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 3, 0 ); + + GroupBox1Layout->addLayout( Layout1, 0, 0 ); + + DlgRef_3Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( RadioButton1, RadioButton2 ); + setTabOrder( RadioButton2, RadioButton3 ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_3Check_QTD::~DlgRef_3Check_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/src/DlgRef/DlgRef_3Check_QTD.h b/src/DlgRef/DlgRef_3Check_QTD.h new file mode 100644 index 000000000..a2600b7ed --- /dev/null +++ b/src/DlgRef/DlgRef_3Check_QTD.h @@ -0,0 +1,40 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_3Check_QTD.ui' +** +** Created: Tue Aug 24 11:27:47 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef DLGREF_3CHECK_QTD_H +#define DLGREF_3CHECK_QTD_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QButtonGroup; +class QRadioButton; + +class DlgRef_3Check_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_3Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_3Check_QTD(); + + QButtonGroup* GroupBox1; + QRadioButton* RadioButton3; + QRadioButton* RadioButton1; + QRadioButton* RadioButton2; + + +protected: + QGridLayout* DlgRef_3Check_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* Layout1; +}; + +#endif // DLGREF_3CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_3Sel1Spin.cxx b/src/DlgRef/DlgRef_3Sel1Spin.cxx new file mode 100644 index 000000000..76de7351e --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel1Spin.cxx @@ -0,0 +1,55 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File: DlgRef_3Sel1Spin.cxx +// Created: Thu May 13 12:19:31 2004 +// Author: Alexander SLADKOV +// + + +#include "DlgRef_3Sel1Spin.h" + +//================================================================================= +// class : DlgRef_3Sel1Spin +// purpose : +//================================================================================= +DlgRef_3Sel1Spin::DlgRef_3Sel1Spin( QWidget* parent, const char* name, WFlags fl ) + :DlgRef_3Sel_QTD( parent, name, fl ) +{ + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + + TextLabel4 = new QLabel( (QWidget*)GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + Layout2->addWidget( TextLabel4, 0, 0 ); + + SpinBox_DX = new DlgRef_SpinBox( (QWidget*)GroupBox1, "SpinBox_DX" ); + Layout2->addWidget( SpinBox_DX, 0, 1 ); + + Layout1->addMultiCellLayout( Layout2, 3, 3, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 4, 2 ); +} + +DlgRef_3Sel1Spin::~DlgRef_3Sel1Spin() +{ +} diff --git a/src/GEOMDS/GEOMDS_Application.cxx b/src/DlgRef/DlgRef_3Sel1Spin.h similarity index 53% rename from src/GEOMDS/GEOMDS_Application.cxx rename to src/DlgRef/DlgRef_3Sel1Spin.h index 7308742db..00135ab7c 100644 --- a/src/GEOMDS/GEOMDS_Application.cxx +++ b/src/DlgRef/DlgRef_3Sel1Spin.h @@ -1,4 +1,4 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +// 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 @@ -21,46 +21,36 @@ // // // -// File : GEOMDS_Application.cxx -// Author : Yves FRICAUD +// File : DlgRef_3Sel1Spin.h +// Author : Alexander SLADKOV // Module : GEOM // $Header$ -using namespace std; -#include "GEOMDS_Application.ixx" +#ifndef DlgRef_3SEL_1SPIN_H +#define DlgRef_3SEL_1SPIN_H -//======================================================================= -//function : GEOMDS_Application -//purpose : -//======================================================================= +#include "DlgRef_3Sel_QTD.h" +#include "DlgRef_SpinBox.h" +#include +#include -GEOMDS_Application::GEOMDS_Application() +//================================================================================= +// class : DlgRef_3Sel1Spin +// purpose : extension of a DlgRef_3Sel_QTD class, 1 additional spin box is added +//================================================================================= +class DlgRef_3Sel1Spin : public DlgRef_3Sel_QTD { -} - - -//======================================================================= -//function : Formats -//purpose : -//======================================================================= - -void GEOMDS_Application::Formats(TColStd_SequenceOfExtendedString& Formats) -{ - Formats.Append(TCollection_ExtendedString ("SALOME_GEOM")); -} - - -//======================================================================= -//function : ResourcesName -//purpose : -//======================================================================= - -Standard_CString GEOMDS_Application::ResourcesName() -{ - return Standard_CString ("GEOMDS_Resources"); -} - + Q_OBJECT + public: + DlgRef_3Sel1Spin( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_3Sel1Spin(); + QLabel* TextLabel4; + DlgRef_SpinBox* SpinBox_DX; + protected: + QGridLayout* Layout2; +}; +#endif // DlgRef_3SEL_1SPIN_H diff --git a/src/DlgRef/DlgRef_3Sel3Spin1Check.cxx b/src/DlgRef/DlgRef_3Sel3Spin1Check.cxx new file mode 100644 index 000000000..e8b60c9b9 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin1Check.cxx @@ -0,0 +1,114 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : DlgRef_3Sel3Spin1Check.cxx +// Author : Michael Zorin +// Module : GEOM +// $Header: + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * Constructs a DlgRef_3Sel3Spin1Check which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +DlgRef_3Sel3Spin1Check::DlgRef_3Sel3Spin1Check(QWidget* parent, const char* name, WFlags fl) + :DlgRef_3Sel3Spin1Check_QTD(parent, name, fl) +{ + SpinBox_1->close(TRUE); + SpinBox_2->close(TRUE); + SpinBox_3->close(TRUE); + SpinBox1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DX"); + SpinBox2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DY"); + SpinBox3 = new DlgRef_SpinBox(GroupBox1, "SpinBox_DZ"); + Layout1->addWidget(SpinBox1, 3, 2); + Layout1->addWidget(SpinBox2, 4, 2); + Layout1->addWidget(SpinBox3, 5, 2); +} + + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_3Sel3Spin1Check::~DlgRef_3Sel3Spin1Check() +{ + // no need to delete child widgets, Qt does it all for us +} + +void DlgRef_3Sel3Spin1Check:: ShowRows(int fromRow, int toRow, bool toShow) +{ + typedef void (QWidget::* ShowFun)(); + ShowFun pShowFun; + + if (toShow) + pShowFun = &QWidget::show; + else + pShowFun = &QWidget::hide; + + if (fromRow >= 0 && toRow>=0 && toRow >= fromRow) + { + if ( fromRow == 0) + { + (TextLabel1->*pShowFun)(); + (PushButton1->*pShowFun)(); + (LineEdit1->*pShowFun)(); + } + if ( fromRow <= 1 && 1 <= toRow) + { + (TextLabel2->*pShowFun)(); + (PushButton2->*pShowFun)(); + (LineEdit2->*pShowFun)(); + } + if ( fromRow <= 2 && 2 <= toRow) + { + (TextLabel3->*pShowFun)(); + (PushButton3->*pShowFun)(); + (LineEdit3->*pShowFun)(); + } + if ( fromRow <= 3 && 3 <= toRow) + { + (TextLabel4->*pShowFun)(); + (SpinBox1->*pShowFun)(); + } + if ( fromRow <= 4 && 4 <= toRow) + { + (TextLabel5->*pShowFun)(); + (SpinBox2->*pShowFun)(); + } + if ( fromRow <= 5 && 5 <= toRow) + { + (TextLabel6->*pShowFun)(); + (SpinBox3->*pShowFun)(); + } + if ( fromRow <= 6 && 6 <= toRow) + (CheckBox1->*pShowFun)(); + } +} diff --git a/src/GEOMDS/GEOMDS_Application.jxx b/src/DlgRef/DlgRef_3Sel3Spin1Check.h similarity index 59% rename from src/GEOMDS/GEOMDS_Application.jxx rename to src/DlgRef/DlgRef_3Sel3Spin1Check.h index 936d0a158..ba0a06515 100644 --- a/src/GEOMDS/GEOMDS_Application.jxx +++ b/src/DlgRef/DlgRef_3Sel3Spin1Check.h @@ -1,4 +1,4 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +// 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 @@ -21,12 +21,31 @@ // // // -// File : GEOMDS_Application.jxx +// File : DlgRef_3Sel3Spin1Check.h +// Author : Michael ZORIN // Module : GEOM +// $Header: -#ifndef _TColStd_SequenceOfExtendedString_HeaderFile -#include -#endif -#ifndef _GEOMDS_Application_HeaderFile -#include "GEOMDS_Application.hxx" -#endif +#ifndef DLGREF_3SEL3SPIN1CHECK_H +#define DLGREF_3SEL3SPIN1CHECK_H + +#include "DlgRef_3Sel3Spin1Check_QTD.h" +#include "DlgRef_SpinBox.h" + +class DlgRef_3Sel3Spin1Check : public DlgRef_3Sel3Spin1Check_QTD +{ + Q_OBJECT + +public: + DlgRef_3Sel3Spin1Check( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_3Sel3Spin1Check(); + + DlgRef_SpinBox* SpinBox1; + DlgRef_SpinBox* SpinBox2; + DlgRef_SpinBox* SpinBox3; + + void ShowRows(int fromRow, int toRow, bool toShow = true); + +}; + +#endif // DLGREF_3SEL3SPIN1CHECK_H diff --git a/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.cxx new file mode 100644 index 000000000..1110add18 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.cxx @@ -0,0 +1,158 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_3Sel3Spin1Check_QTD.ui' +** +** Created: Mon Apr 19 16:36:48 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "DlgRef_3Sel3Spin1Check_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_3Sel3Spin1Check_QTD which is a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_3Sel3Spin1Check_QTD::DlgRef_3Sel3Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_3Sel3Spin1Check_QTD" ); + resize( 380, 229 ); + setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) ); + setCaption( trUtf8( "DlgRef_3Sel3Spin1Check_QTD" ) ); + DlgRef_3Sel3Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_3Sel3Spin1Check_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); + GroupBox1->setTitle( trUtf8( "" ) ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + + Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + + SpinBox_2 = new QSpinBox( GroupBox1, "SpinBox_2" ); + SpinBox_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox_2->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( SpinBox_2, 4, 2 ); + + LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" ); + + Layout1->addWidget( LineEdit3, 2, 2 ); + + SpinBox_3 = new QSpinBox( GroupBox1, "SpinBox_3" ); + SpinBox_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox_3->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( SpinBox_3, 5, 2 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); + + Layout1->addWidget( TextLabel1, 0, 0 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + TextLabel3->setText( trUtf8( "TL3" ) ); + + Layout1->addWidget( TextLabel3, 2, 0 ); + + CheckBox1 = new QCheckBox( GroupBox1, "CheckBox1" ); + CheckBox1->setText( trUtf8( "" ) ); + + Layout1->addMultiCellWidget( CheckBox1, 6, 6, 0, 1 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + TextLabel4->setText( trUtf8( "TL4" ) ); + + Layout1->addWidget( TextLabel4, 3, 0 ); + + LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); + + Layout1->addWidget( LineEdit2, 1, 2 ); + + PushButton3 = new QPushButton( GroupBox1, "PushButton3" ); + PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); + PushButton3->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton3, 2, 1 ); + + TextLabel6 = new QLabel( GroupBox1, "TextLabel6" ); + TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) ); + TextLabel6->setText( trUtf8( "TL6" ) ); + + Layout1->addWidget( TextLabel6, 5, 0 ); + + SpinBox_1 = new QSpinBox( GroupBox1, "SpinBox_1" ); + SpinBox_1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox_1->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( SpinBox_1, 3, 2 ); + + TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + TextLabel5->setText( trUtf8( "TL5" ) ); + + Layout1->addWidget( TextLabel5, 4, 0 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setText( trUtf8( "TL2" ) ); + + Layout1->addWidget( TextLabel2, 1, 0 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout1->addWidget( LineEdit1, 0, 2 ); + + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + PushButton2->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton2, 1, 1 ); + QSpacerItem* spacer = new QSpacerItem( 0, 250, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 7, 2 ); + + GroupBox1Layout->addLayout( Layout1, 0, 0 ); + + DlgRef_3Sel3Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, PushButton2 ); + setTabOrder( PushButton2, LineEdit2 ); + setTabOrder( LineEdit2, PushButton3 ); + setTabOrder( PushButton3, LineEdit3 ); + setTabOrder( LineEdit3, SpinBox_1 ); + setTabOrder( SpinBox_1, SpinBox_2 ); + setTabOrder( SpinBox_2, SpinBox_3 ); + setTabOrder( SpinBox_3, CheckBox1 ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_3Sel3Spin1Check_QTD::~DlgRef_3Sel3Spin1Check_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h b/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h new file mode 100644 index 000000000..024549bc7 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin1Check_QTD.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_3Sel3Spin1Check_QTD.ui' +** +** Created: Mon Apr 19 16:36:48 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef DLGREF_3SEL3SPIN1CHECK_QTD_H +#define DLGREF_3SEL3SPIN1CHECK_QTD_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QCheckBox; +class QGroupBox; +class QLabel; +class QLineEdit; +class QPushButton; +class QSpinBox; + +class DlgRef_3Sel3Spin1Check_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_3Sel3Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_3Sel3Spin1Check_QTD(); + + QGroupBox* GroupBox1; + QSpinBox* SpinBox_2; + QLineEdit* LineEdit3; + QSpinBox* SpinBox_3; + QLabel* TextLabel1; + QLabel* TextLabel3; + QCheckBox* CheckBox1; + QPushButton* PushButton1; + QLabel* TextLabel4; + QLineEdit* LineEdit2; + QPushButton* PushButton3; + QLabel* TextLabel6; + QSpinBox* SpinBox_1; + QLabel* TextLabel5; + QLabel* TextLabel2; + QLineEdit* LineEdit1; + QPushButton* PushButton2; + + +protected: + QGridLayout* DlgRef_3Sel3Spin1Check_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* Layout1; +}; + +#endif // DLGREF_3SEL3SPIN1CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_3Sel4Spin2Check.cxx b/src/DlgRef/DlgRef_3Sel4Spin2Check.cxx index 7c343f705..b290b918a 100644 --- a/src/DlgRef/DlgRef_3Sel4Spin2Check.cxx +++ b/src/DlgRef/DlgRef_3Sel4Spin2Check.cxx @@ -31,6 +31,7 @@ #include #include #include +#include /* * Constructs a DlgRef_2Sel1Spin which is a child of 'parent', with the @@ -51,6 +52,11 @@ DlgRef_3Sel4Spin2Check::DlgRef_3Sel4Spin2Check(QWidget* parent, const char* name Layout2->addWidget(SpinBox_DY1, 1, 1); Layout3->addWidget(SpinBox_DX2, 0, 1); Layout3->addWidget(SpinBox_DY2, 1, 1); + + // PAL6532 + PushButton1->setAutoDefault( false ); + PushButton2->setAutoDefault( false ); + PushButton3->setAutoDefault( false ); } diff --git a/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.cxx b/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.cxx index 55bee78b8..b79ae4b55 100644 --- a/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.cxx +++ b/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_3Sel4Spin2Check_QTD.ui' ** -** Created: ven oct 24 09:53:25 2003 +** Created: Tue Jun 1 16:29:29 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -9,11 +9,11 @@ #include "DlgRef_3Sel4Spin2Check_QTD.h" #include +#include #include #include #include #include -#include #include #include #include @@ -28,7 +28,7 @@ DlgRef_3Sel4Spin2Check_QTD::DlgRef_3Sel4Spin2Check_QTD( QWidget* parent, const { if ( !name ) setName( "DlgRef_3Sel4Spin2Check_QTD" ); - resize( 129, 271 ); + resize( 269, 281 ); setCaption( trUtf8( "DlgRef_3Sel4Spin2Check_QTD" ) ); DlgRef_3Sel4Spin2Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_3Sel4Spin2Check_QTDLayout"); @@ -42,66 +42,37 @@ DlgRef_3Sel4Spin2Check_QTD::DlgRef_3Sel4Spin2Check_QTD( QWidget* parent, const Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); + CheckButton2 = new QCheckBox( GroupBox1, "CheckButton2" ); + CheckButton2->setText( trUtf8( "" ) ); - Layout1->addWidget( TextLabel2, 1, 0 ); + Layout1->addMultiCellWidget( CheckButton2, 6, 6, 0, 2 ); LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); Layout1->addWidget( LineEdit1, 0, 2 ); - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); - - PushButton3 = new QPushButton( GroupBox1, "PushButton3" ); - PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); - PushButton3->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton3, 2, 1 ); - QSpacerItem* spacer = new QSpacerItem( 0, 155, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 7, 2 ); - - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); - TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); - TextLabel5->setText( trUtf8( "TL5" ) ); - - Layout2->addWidget( TextLabel5, 1, 0 ); - - TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); - TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); - TextLabel4->setText( trUtf8( "TL4" ) ); - - Layout2->addWidget( TextLabel4, 0, 0 ); - - SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); - SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); - - Layout2->addWidget( SpinBox1, 0, 1 ); - - SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" ); - SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) ); - - Layout2->addWidget( SpinBox2, 1, 1 ); - - Layout1->addMultiCellLayout( Layout2, 3, 3, 0, 2 ); - TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); TextLabel3->setText( trUtf8( "TL3" ) ); Layout1->addWidget( TextLabel3, 2, 0 ); + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + PushButton2->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton2, 1, 1 ); + LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" ); Layout1->addWidget( LineEdit3, 2, 2 ); + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" ); @@ -128,35 +99,77 @@ DlgRef_3Sel4Spin2Check_QTD::DlgRef_3Sel4Spin2Check_QTD( QWidget* parent, const Layout1->addMultiCellLayout( Layout3, 5, 5, 0, 2 ); - CheckButton2 = new QRadioButton( GroupBox1, "CheckButton2" ); - CheckButton2->setText( trUtf8( "" ) ); + CheckButton1 = new QCheckBox( GroupBox1, "CheckButton1" ); + CheckButton1->setText( trUtf8( "" ) ); - Layout1->addMultiCellWidget( CheckButton2, 6, 6, 0, 2 ); + Layout1->addMultiCellWidget( CheckButton1, 4, 4, 0, 2 ); + + PushButton3 = new QPushButton( GroupBox1, "PushButton3" ); + PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); + PushButton3->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton3, 2, 1 ); TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); TextLabel1->setText( trUtf8( "TL1" ) ); Layout1->addWidget( TextLabel1, 0, 0 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 7, 2 ); LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); Layout1->addWidget( LineEdit2, 1, 2 ); - PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); - PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); - PushButton2->setText( trUtf8( "" ) ); + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - Layout1->addWidget( PushButton2, 1, 1 ); + TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + TextLabel5->setText( trUtf8( "TL5" ) ); - CheckButton1 = new QRadioButton( GroupBox1, "CheckButton1" ); - CheckButton1->setText( trUtf8( "" ) ); + Layout2->addWidget( TextLabel5, 1, 0 ); - Layout1->addMultiCellWidget( CheckButton1, 4, 4, 0, 2 ); + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + TextLabel4->setText( trUtf8( "TL4" ) ); + + Layout2->addWidget( TextLabel4, 0, 0 ); + + SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); + SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox1, 0, 1 ); + + SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" ); + SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox2, 1, 1 ); + + Layout1->addMultiCellLayout( Layout2, 3, 3, 0, 2 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setText( trUtf8( "TL2" ) ); + + Layout1->addWidget( TextLabel2, 1, 0 ); GroupBox1Layout->addLayout( Layout1, 0, 0 ); DlgRef_3Sel4Spin2Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + // tab order + setTabOrder( PushButton1, LineEdit1 ); + setTabOrder( LineEdit1, PushButton2 ); + setTabOrder( PushButton2, LineEdit2 ); + setTabOrder( LineEdit2, PushButton3 ); + setTabOrder( PushButton3, LineEdit3 ); + setTabOrder( LineEdit3, SpinBox1 ); + setTabOrder( SpinBox1, SpinBox2 ); + setTabOrder( SpinBox2, CheckButton1 ); + setTabOrder( CheckButton1, SpinBox3 ); + setTabOrder( SpinBox3, SpinBox4 ); + setTabOrder( SpinBox4, CheckButton2 ); } /* diff --git a/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h b/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h index fb053ced4..ef704cbe4 100644 --- a/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h +++ b/src/DlgRef/DlgRef_3Sel4Spin2Check_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_3Sel4Spin2Check_QTD.ui' ** -** Created: ven oct 24 09:53:25 2003 +** Created: Tue Jun 1 16:29:29 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -14,11 +14,11 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; +class QCheckBox; class QGroupBox; class QLabel; class QLineEdit; class QPushButton; -class QRadioButton; class QSpinBox; class DlgRef_3Sel4Spin2Check_QTD : public QWidget @@ -30,33 +30,33 @@ public: ~DlgRef_3Sel4Spin2Check_QTD(); QGroupBox* GroupBox1; - QLabel* TextLabel2; + QCheckBox* CheckButton2; QLineEdit* LineEdit1; - QPushButton* PushButton1; - QPushButton* PushButton3; - QLabel* TextLabel5; - QLabel* TextLabel4; - QSpinBox* SpinBox1; - QSpinBox* SpinBox2; QLabel* TextLabel3; + QPushButton* PushButton2; QLineEdit* LineEdit3; + QPushButton* PushButton1; QSpinBox* SpinBox4; QSpinBox* SpinBox3; QLabel* TextLabel7; QLabel* TextLabel6; - QRadioButton* CheckButton2; + QCheckBox* CheckButton1; + QPushButton* PushButton3; QLabel* TextLabel1; QLineEdit* LineEdit2; - QPushButton* PushButton2; - QRadioButton* CheckButton1; + QLabel* TextLabel5; + QLabel* TextLabel4; + QSpinBox* SpinBox1; + QSpinBox* SpinBox2; + QLabel* TextLabel2; protected: QGridLayout* DlgRef_3Sel4Spin2Check_QTDLayout; QGridLayout* GroupBox1Layout; QGridLayout* Layout1; - QGridLayout* Layout2; QGridLayout* Layout3; + QGridLayout* Layout2; }; #endif // DLGREF_3SEL4SPIN2CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_4Sel1List1Check_QTD.cxx b/src/DlgRef/DlgRef_4Sel1List1Check_QTD.cxx new file mode 100644 index 000000000..cd7664335 --- /dev/null +++ b/src/DlgRef/DlgRef_4Sel1List1Check_QTD.cxx @@ -0,0 +1,176 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_4Sel1List1Check_QTD.ui' +** +** Created: lun oct 27 17:21:04 2003 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "DlgRef_4Sel1List1Check_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_4Sel1List1Check_QTD which is a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_4Sel1List1Check_QTD::DlgRef_4Sel1List1Check_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_4Sel1List1Check_QTD" ); + resize( 129, 210 ); + setCaption( trUtf8( "DlgRef_4Sel1List1Check_QTD" ) ); + DlgRef_4Sel1List1Check_QTDLayout = + new QGridLayout( this, 1, 1, 0, 6, "DlgRef_4Sel1List1Check_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setTitle( trUtf8( "" ) ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + + Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); + + Layout1->addWidget( TextLabel1, 0, 0 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout1->addWidget( LineEdit1, 0, 2 ); + + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setText( trUtf8( "TL2" ) ); + + Layout1->addWidget( TextLabel2, 1, 0 ); + + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + PushButton2->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton2, 1, 1 ); + + LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); + + Layout1->addWidget( LineEdit2, 1, 2 ); + + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + TextLabel3->setText( trUtf8( "TL3" ) ); + + Layout1->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); + + ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" ); + ComboBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, ComboBox1->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( ComboBox1, 2, 2 ); + + + GroupBox1Layout->addLayout( Layout1, 0, 0 ); + + DlgRef_4Sel1List1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + + + GroupBox2 = new QGroupBox( this, "GroupBox2" ); + GroupBox2->setTitle( trUtf8( "" ) ); + GroupBox2->setColumnLayout(0, Qt::Vertical ); + GroupBox2->layout()->setSpacing( 6 ); + GroupBox2->layout()->setMargin( 11 ); + GroupBox2Layout = new QGridLayout( GroupBox2->layout() ); + GroupBox2Layout->setAlignment( Qt::AlignTop ); + + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + + TextLabel4 = new QLabel( GroupBox2, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + TextLabel4->setText( trUtf8( "TL4" ) ); + + Layout2->addWidget( TextLabel4, 0, 0 ); + QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 5, 2 ); + + PushButton3 = new QPushButton( GroupBox2, "PushButton3" ); + PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); + PushButton3->setText( trUtf8( "" ) ); + + Layout2->addWidget( PushButton3, 0, 1 ); + + LineEdit3 = new QLineEdit( GroupBox2, "LineEdit3" ); + + Layout2->addWidget( LineEdit3, 0, 2 ); + + + TextLabel5 = new QLabel( GroupBox2, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + TextLabel5->setText( trUtf8( "TL5" ) ); + + Layout2->addWidget( TextLabel5, 1, 0 ); + + PushButton4 = new QPushButton( GroupBox2, "PushButton4" ); + PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) ); + PushButton4->setText( trUtf8( "" ) ); + + Layout2->addWidget( PushButton4, 1, 1 ); + + LineEdit4 = new QLineEdit( GroupBox2, "LineEdit4" ); + + Layout2->addWidget( LineEdit4, 1, 2 ); + + CheckBox1 = new QCheckBox( GroupBox1, "CheckBox1" ); + CheckBox1->setText( trUtf8( "" ) ); + Layout1->addMultiCellWidget( CheckBox1, 5, 5, 0, 1 ); + + PushButton5 = new QPushButton( GroupBox1, "PushButton5" ); + PushButton5->setText( trUtf8( "" ) ); + Layout1->addWidget( PushButton5, 5, 2 ); + + GroupBox2Layout->addLayout( Layout2, 0, 0 ); + + DlgRef_4Sel1List1Check_QTDLayout->addWidget( GroupBox2, 1, 0 ); + + // tab order + setTabOrder(PushButton1 , LineEdit1); + setTabOrder(LineEdit1 , PushButton2); + setTabOrder(PushButton2 , LineEdit2); + setTabOrder(LineEdit2, ComboBox1); + setTabOrder(ComboBox1, CheckBox1); + setTabOrder(CheckBox1, PushButton5); + setTabOrder(PushButton5, PushButton3); + setTabOrder(PushButton3 , LineEdit3); + setTabOrder(LineEdit3, PushButton4 ); + setTabOrder(PushButton4 , LineEdit4); + +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_4Sel1List1Check_QTD::~DlgRef_4Sel1List1Check_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h b/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h new file mode 100644 index 000000000..d757be902 --- /dev/null +++ b/src/DlgRef/DlgRef_4Sel1List1Check_QTD.h @@ -0,0 +1,60 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_4Sel1List1Check_QTD.ui' +** +** Created: lun oct 27 17:21:03 2003 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef DLGREF_4SEL1LIST1CHECK_QTD_H +#define DLGREF_4SEL1LIST1CHECK_QTD_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QComboBox; +class QGroupBox; +class QLabel; +class QLineEdit; +class QPushButton; +class QCheckBox; +class QPushButton; + +class DlgRef_4Sel1List1Check_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_4Sel1List1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_4Sel1List1Check_QTD(); + + QGroupBox* GroupBox1; + QGroupBox* GroupBox2; + QLabel* TextLabel1; + QLabel* TextLabel2; + QLabel* TextLabel3; + QLabel* TextLabel4; + QLabel* TextLabel5; + QPushButton* PushButton1; + QPushButton* PushButton2; + QPushButton* PushButton3; + QPushButton* PushButton4; + QLineEdit* LineEdit1; + QLineEdit* LineEdit2; + QLineEdit* LineEdit3; + QLineEdit* LineEdit4; + QComboBox* ComboBox1; + QCheckBox* CheckBox1; + QPushButton* PushButton5; + +protected: + QGridLayout* DlgRef_4Sel1List1Check_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* GroupBox2Layout; + QGridLayout* Layout1; + QGridLayout* Layout2; +}; + +#endif // DLGREF_4SEL1LIST1CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_6Sel_QTD.cxx b/src/DlgRef/DlgRef_6Sel_QTD.cxx new file mode 100644 index 000000000..238416e69 --- /dev/null +++ b/src/DlgRef/DlgRef_6Sel_QTD.cxx @@ -0,0 +1,152 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_6Sel_QTD.ui' +** +** Created: Tue Aug 24 18:18:57 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#include "DlgRef_6Sel_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_6Sel_QTD which is a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_6Sel_QTD::DlgRef_6Sel_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_6Sel_QTD" ); + resize( 235, 196 ); + setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); + setCaption( trUtf8( "DlgRef_6Sel_QTD" ) ); + DlgRef_6Sel_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_6Sel_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setTitle( trUtf8( "" ) ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + + Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + TextLabel1->setText( trUtf8( "TL1" ) ); + + Layout1->addWidget( TextLabel1, 0, 0 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2->setText( trUtf8( "TL2" ) ); + + Layout1->addWidget( TextLabel2, 1, 0 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + TextLabel3->setText( trUtf8( "TL3" ) ); + + Layout1->addWidget( TextLabel3, 2, 0 ); + + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + TextLabel4->setText( trUtf8( "TL4" ) ); + + Layout1->addWidget( TextLabel4, 3, 0 ); + + TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + TextLabel5->setText( trUtf8( "TL5" ) ); + + Layout1->addWidget( TextLabel5, 4, 0 ); + + TextLabel6 = new QLabel( GroupBox1, "TextLabel6" ); + TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) ); + TextLabel6->setText( trUtf8( "TL6" ) ); + + Layout1->addWidget( TextLabel6, 5, 0 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + PushButton1->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + PushButton2->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton2, 1, 1 ); + + PushButton3 = new QPushButton( GroupBox1, "PushButton3" ); + PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); + PushButton3->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton3, 2, 1 ); + + PushButton4 = new QPushButton( GroupBox1, "PushButton4" ); + PushButton4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton4->sizePolicy().hasHeightForWidth() ) ); + PushButton4->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton4, 3, 1 ); + + PushButton5 = new QPushButton( GroupBox1, "PushButton5" ); + PushButton5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton5->sizePolicy().hasHeightForWidth() ) ); + PushButton5->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton5, 4, 1 ); + + PushButton6 = new QPushButton( GroupBox1, "PushButton6" ); + PushButton6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton6->sizePolicy().hasHeightForWidth() ) ); + PushButton6->setText( trUtf8( "" ) ); + + Layout1->addWidget( PushButton6, 5, 1 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout1->addWidget( LineEdit1, 0, 2 ); + + LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); + + Layout1->addWidget( LineEdit2, 1, 2 ); + + LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" ); + + Layout1->addWidget( LineEdit3, 2, 2 ); + + LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" ); + + Layout1->addWidget( LineEdit4, 3, 2 ); + + LineEdit5 = new QLineEdit( GroupBox1, "LineEdit5" ); + + Layout1->addWidget( LineEdit5, 4, 2 ); + + LineEdit6 = new QLineEdit( GroupBox1, "LineEdit6" ); + + Layout1->addWidget( LineEdit6, 5, 2 ); + + GroupBox1Layout->addLayout( Layout1, 0, 0 ); + + DlgRef_6Sel_QTDLayout->addWidget( GroupBox1, 0, 0 ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_6Sel_QTD::~DlgRef_6Sel_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + diff --git a/src/DlgRef/DlgRef_6Sel_QTD.h b/src/DlgRef/DlgRef_6Sel_QTD.h new file mode 100644 index 000000000..0231bbb4b --- /dev/null +++ b/src/DlgRef/DlgRef_6Sel_QTD.h @@ -0,0 +1,57 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_6Sel_QTD.ui' +** +** Created: Tue Aug 24 18:18:28 2004 +** by: The User Interface Compiler (uic) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ +#ifndef DLGREF_6SEL_QTD_H +#define DLGREF_6SEL_QTD_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QGroupBox; +class QLabel; +class QLineEdit; +class QPushButton; + +class DlgRef_6Sel_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_6Sel_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_6Sel_QTD(); + + QGroupBox* GroupBox1; + QLabel* TextLabel1; + QLabel* TextLabel2; + QLabel* TextLabel3; + QLabel* TextLabel4; + QLabel* TextLabel5; + QLabel* TextLabel6; + QPushButton* PushButton1; + QPushButton* PushButton2; + QPushButton* PushButton3; + QPushButton* PushButton4; + QPushButton* PushButton5; + QPushButton* PushButton6; + QLineEdit* LineEdit1; + QLineEdit* LineEdit2; + QLineEdit* LineEdit3; + QLineEdit* LineEdit4; + QLineEdit* LineEdit5; + QLineEdit* LineEdit6; + + +protected: + QGridLayout* DlgRef_6Sel_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* Layout1; +}; + +#endif // DLGREF_6SEL_QTD_H diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.cxx b/src/DlgRef/DlgRef_Skeleton_QTD.cxx index 897e3f19c..b612a9a42 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.cxx +++ b/src/DlgRef/DlgRef_Skeleton_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'DlgRef_Skeleton_QTD.ui' ** -** Created: Fri Apr 16 12:57:26 2004 +** Created: Wed Aug 11 18:42:51 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -31,7 +31,7 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo { if ( !name ) setName( "DlgRef_Skeleton_QTD" ); - resize( 321, 295 ); + resize( 307, 378 ); setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); setCaption( trUtf8( "DlgRef_Skeleton_QTD" ) ); setSizeGripEnabled( TRUE ); @@ -79,7 +79,7 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo GroupConstructors->setColumnLayout(0, Qt::Vertical ); GroupConstructors->layout()->setSpacing( 6 ); GroupConstructors->layout()->setMargin( 11 ); - GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() ); + GroupConstructorsLayout = new QHBoxLayout( GroupConstructors->layout() ); GroupConstructorsLayout->setAlignment( Qt::AlignTop ); Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); @@ -96,7 +96,10 @@ DlgRef_Skeleton_QTD::DlgRef_Skeleton_QTD( QWidget* parent, const char* name, bo RadioButton3->setText( trUtf8( "" ) ); Layout2->addWidget( RadioButton3 ); - GroupConstructorsLayout->addLayout( Layout2, 0, 0 ); + RadioButton4 = new QRadioButton( GroupConstructors, "RadioButton4" ); + RadioButton4->setText( trUtf8( "" ) ); + Layout2->addWidget( RadioButton4 ); + GroupConstructorsLayout->addLayout( Layout2 ); Layout1->addWidget( GroupConstructors, 0, 0 ); diff --git a/src/DlgRef/DlgRef_Skeleton_QTD.h b/src/DlgRef/DlgRef_Skeleton_QTD.h index 38d6d83d6..0ca0df849 100644 --- a/src/DlgRef/DlgRef_Skeleton_QTD.h +++ b/src/DlgRef/DlgRef_Skeleton_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'DlgRef_Skeleton_QTD.ui' ** -** Created: Fri Apr 16 12:57:26 2004 +** Created: Wed Aug 11 18:42:51 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -38,6 +38,7 @@ public: QRadioButton* RadioButton1; QRadioButton* RadioButton2; QRadioButton* RadioButton3; + QRadioButton* RadioButton4; QGroupBox* GroupBoxName; QLineEdit* ResultName; QLabel* NameLabel; @@ -48,7 +49,7 @@ protected: QGridLayout* Layout1; QHBoxLayout* GroupButtonsLayout; QHBoxLayout* Layout3; - QGridLayout* GroupConstructorsLayout; + QHBoxLayout* GroupConstructorsLayout; QHBoxLayout* Layout2; QGridLayout* GroupBoxNameLayout; QGridLayout* Layout66; diff --git a/src/DlgRef/Makefile.in b/src/DlgRef/Makefile.in index c6ed3784e..a986c83f6 100644 --- a/src/DlgRef/Makefile.in +++ b/src/DlgRef/Makefile.in @@ -53,15 +53,18 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \ DlgRef_2Sel2Spin_QTD.cxx \ DlgRef_2Sel3Spin_QTD.cxx \ DlgRef_1Sel1Spin1Check_QTD.cxx \ - DlgRef_2Sel1Spin1Check_QTD.cxx \ + DlgRef_2Sel1Spin2Check_QTD.cxx \ DlgRef_2Sel2Spin1Check_QTD.cxx \ DlgRef_2Sel4Spin1Check_QTD.cxx \ DlgRef_3Sel4Spin2Check_QTD.cxx \ DlgRef_4Sel1List_QTD.cxx \ + DlgRef_1List1Spin1Btn_QTD.cxx \ + DlgRef_4Sel1List1Check_QTD.cxx \ DlgRef_1Spin_QTD.cxx \ DlgRef_2Spin_QTD.cxx \ DlgRef_3Spin_QTD.cxx \ DlgRef_3Spin1Check_QTD.cxx \ + DlgRef_3Sel3Spin1Check_QTD.cxx \ DlgRef_SpinBox.cxx \ DlgRef_1Sel1Spin.cxx \ DlgRef_1Sel2Spin.cxx \ @@ -72,14 +75,18 @@ LIB_SRC = DlgRef_Skeleton_QTD.cxx \ DlgRef_2Sel2Spin.cxx \ DlgRef_2Sel3Spin.cxx \ DlgRef_1Sel1Spin1Check.cxx \ - DlgRef_2Sel1Spin1Check.cxx \ + DlgRef_2Sel1Spin2Check.cxx \ DlgRef_2Sel2Spin1Check.cxx \ DlgRef_2Sel4Spin1Check.cxx \ DlgRef_3Sel4Spin2Check.cxx \ + DlgRef_3Sel3Spin1Check.cxx \ DlgRef_1Spin.cxx \ DlgRef_2Spin.cxx \ DlgRef_3Spin.cxx \ - DlgRef_3Spin1Check.cxx + DlgRef_3Spin1Check.cxx \ + DlgRef_3Sel1Spin.cxx \ + DlgRef_3Check_QTD.cxx \ + DlgRef_6Sel_QTD.cxx LIB_MOC = \ DlgRef_Skeleton_QTD.h \ @@ -98,15 +105,18 @@ LIB_MOC = \ DlgRef_2Sel2Spin_QTD.h \ DlgRef_2Sel3Spin_QTD.h \ DlgRef_1Sel1Spin1Check_QTD.h \ - DlgRef_2Sel1Spin1Check_QTD.h \ + DlgRef_2Sel1Spin2Check_QTD.h \ DlgRef_2Sel2Spin1Check_QTD.h \ DlgRef_2Sel4Spin1Check_QTD.h \ DlgRef_3Sel4Spin2Check_QTD.h \ DlgRef_4Sel1List_QTD.h \ + DlgRef_1List1Spin1Btn_QTD.h \ + DlgRef_4Sel1List1Check_QTD.h \ DlgRef_1Spin_QTD.h \ DlgRef_2Spin_QTD.h \ DlgRef_3Spin_QTD.h \ DlgRef_3Spin1Check_QTD.h \ + DlgRef_3Sel3Spin1Check_QTD.h \ DlgRef_SpinBox.h \ DlgRef_1Sel1Spin.h \ DlgRef_1Sel2Spin.h \ @@ -117,14 +127,19 @@ LIB_MOC = \ DlgRef_2Sel2Spin.h \ DlgRef_2Sel3Spin.h \ DlgRef_1Sel1Spin1Check.h \ - DlgRef_2Sel1Spin1Check.h \ + DlgRef_2Sel1Spin2Check.h \ DlgRef_2Sel2Spin1Check.h \ DlgRef_2Sel4Spin1Check.h \ DlgRef_3Sel4Spin2Check.h \ + DlgRef_3Sel3Spin1Check.h \ DlgRef_1Spin.h \ DlgRef_2Spin.h \ DlgRef_3Spin.h \ - DlgRef_3Spin1Check.h + DlgRef_3Spin1Check.h \ + DlgRef_3Sel1Spin.h \ + DlgRef_1Sel_Ext.h \ + DlgRef_3Check_QTD.h \ + DlgRef_6Sel_QTD.h # header files EXPORT_HEADERS= $(LIB_MOC) diff --git a/src/DlgRef/UIFiles/DlgRef_1List1Spin1Btn_QTD.ui b/src/DlgRef/UIFiles/DlgRef_1List1Spin1Btn_QTD.ui new file mode 100644 index 000000000..6366a74a7 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_1List1Spin1Btn_QTD.ui @@ -0,0 +1,93 @@ + +DlgRef_1List1Spin1Btn_QTD + + + DlgRef_1List1Spin1Btn_QTD + + + + 0 + 0 + 204 + 148 + + + + DlgRef_3Sel4Spin2Check_QTD + + + + unnamed + + + 11 + + + 6 + + + + GroupBox1 + + + + + + + unnamed + + + 11 + + + 6 + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 23 + + + + + + ListView1 + + + + + TextLabel1 + + + TL1 + + + + + SpinBox1 + + + + + PushButton1 + + + + + + + + + + + diff --git a/src/DlgRef/UIFiles/DlgRef_1Sel1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_1Sel1Check_QTD.ui index 93c1da336..f86081355 100644 --- a/src/DlgRef/UIFiles/DlgRef_1Sel1Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_1Sel1Check_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 76 + 382 + 219 @@ -44,7 +44,7 @@ - Layout1 + Layout3 @@ -72,23 +72,6 @@ TL1 - - - Spacer5 - - - Vertical - - - Expanding - - - - 0 - 113 - - - PushButton1 @@ -105,12 +88,7 @@ - - - LineEdit1 - - - + CheckButton1 @@ -118,11 +96,38 @@ + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 16 + + + + + + LineEdit1 + + + + PushButton1 + LineEdit1 + CheckButton1 + diff --git a/src/DlgRef/UIFiles/DlgRef_1Sel1Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_1Sel1Spin1Check_QTD.ui index 27b1ad9e3..c90e9c67e 100644 --- a/src/DlgRef/UIFiles/DlgRef_1Sel1Spin1Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_1Sel1Spin1Check_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 106 + 163 + 109 @@ -44,7 +44,7 @@ - Layout1 + Layout8 @@ -56,55 +56,6 @@ 6 - - - Spacer5 - - - Vertical - - - Expanding - - - - 0 - 120 - - - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - PushButton1 - - - - 0 - 0 - 0 - 0 - - - - - - Layout2 @@ -150,12 +101,44 @@ + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + LineEdit1 - + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + CheckButton1 @@ -163,11 +146,34 @@ + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 16 + + + + + PushButton1 + LineEdit1 + SpinBox1 + CheckButton1 + diff --git a/src/DlgRef/UIFiles/DlgRef_1Sel3Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_1Sel3Check_QTD.ui index 113ad786c..c2e482a23 100644 --- a/src/DlgRef/UIFiles/DlgRef_1Sel3Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_1Sel3Check_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 114 + 163 + 116 @@ -44,7 +44,7 @@ - Layout1 + Layout6 @@ -56,7 +56,29 @@ 6 - + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 16 + + + + + + LineEdit1 + + + CheckButton2 @@ -64,20 +86,20 @@ - + - TextLabel1 + CheckButton1 - - - 0 - 0 - 0 - 0 - + + + + + + + CheckButton3 - TL1 + @@ -96,42 +118,20 @@ - - - Spacer5 - - - Vertical - - - Expanding - - - - 0 - 60 - - - - + - CheckButton3 - - - + TextLabel1 - - - - CheckButton1 + + + 0 + 0 + 0 + 0 + - - - - - - LineEdit1 + TL1 @@ -140,5 +140,12 @@ + + PushButton1 + LineEdit1 + CheckButton1 + CheckButton2 + CheckButton3 + diff --git a/src/DlgRef/UIFiles/DlgRef_2Sel1Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_2Sel1Spin2Check_QTD.ui similarity index 67% rename from src/DlgRef/UIFiles/DlgRef_2Sel1Spin1Check_QTD.ui rename to src/DlgRef/UIFiles/DlgRef_2Sel1Spin2Check_QTD.ui index a06de5cb4..a2e4e0ace 100644 --- a/src/DlgRef/UIFiles/DlgRef_2Sel1Spin1Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_2Sel1Spin2Check_QTD.ui @@ -1,19 +1,19 @@ -DlgRef_2Sel1Spin1Check_QTD +DlgRef_2Sel1Spin2Check_QTD - DlgRef_2Sel1Spin1Check_QTD + DlgRef_2Sel1Spin2Check_QTD 0 0 - 129 - 117 + 256 + 139 - DlgRef_2Sel1Spin1Check_QTD + DlgRef_2Sel1Spin2Check_QTD @@ -56,14 +56,9 @@ 6 - - - LineEdit1 - - - + - TextLabel1 + TextLabel2 @@ -74,12 +69,12 @@ - TL1 + TL2 - + - TextLabel2 + PushButton1 @@ -90,17 +85,28 @@ - TL2 + - + - LineEdit2 + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 - + - PushButton1 + TextLabel1 @@ -111,10 +117,10 @@ - + TL1 - + Spacer5 @@ -127,10 +133,23 @@ 0 - 20 + 316 + + + CheckButton2 + + + + + + + + LineEdit2 + + PushButton2 @@ -147,58 +166,31 @@ - + + + LineEdit1 + + + + + CheckButton1 + + + + + + - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - SpinBox1 - - - - 7 - 0 - 0 - 0 - - - - - - CheckButton1 - - - - - - - - TextLabel3 - - - - 0 - 0 - 0 - 0 - - - - TL3 - - - + SpinBox1 + + + + 7 + 0 + 0 + 0 + + @@ -206,5 +198,14 @@ + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + SpinBox1 + CheckButton2 + CheckButton1 + diff --git a/src/DlgRef/UIFiles/DlgRef_2Sel1Spin_QTD.ui b/src/DlgRef/UIFiles/DlgRef_2Sel1Spin_QTD.ui index 053cae186..df952819a 100644 --- a/src/DlgRef/UIFiles/DlgRef_2Sel1Spin_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_2Sel1Spin_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 117 + 163 + 122 @@ -126,6 +126,12 @@ 0 + + NoFrame + + + Plain + TL2 @@ -198,5 +204,12 @@ + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + SpinBox1 + diff --git a/src/DlgRef/UIFiles/DlgRef_2Sel2Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_2Sel2Spin1Check_QTD.ui index e5c699abb..1a97c8724 100644 --- a/src/DlgRef/UIFiles/DlgRef_2Sel2Spin1Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_2Sel2Spin1Check_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 164 + 163 + 170 @@ -72,9 +72,9 @@ TL2 - + - PushButton1 + TextLabel1 @@ -85,7 +85,7 @@ - + TL1 @@ -162,36 +162,9 @@ - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - + - PushButton2 - - - - 0 - 0 - 0 - 0 - - - - + LineEdit1 @@ -207,26 +180,53 @@ 0 - 275 + 16 + + + CheckButton1 + + + + + LineEdit2 - + - CheckButton1 + PushButton2 + + + + 0 + 0 + 0 + 0 + - + - LineEdit1 + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + @@ -235,5 +235,14 @@ + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + SpinBox1 + SpinBox2 + CheckButton1 + diff --git a/src/DlgRef/UIFiles/DlgRef_2Sel4Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_2Sel4Spin1Check_QTD.ui index 85da96fca..f148e2c89 100644 --- a/src/DlgRef/UIFiles/DlgRef_2Sel4Spin1Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_2Sel4Spin1Check_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 222 + 262 + 230 @@ -44,7 +44,7 @@ - Layout1 + Layout5 @@ -56,11 +56,6 @@ 6 - - - LineEdit2 - - PushButton1 @@ -77,6 +72,14 @@ + + + CheckButton1 + + + + + Layout2 @@ -151,6 +154,81 @@ + + + LineEdit2 + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + LineEdit1 + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 16 + + + + + + PushButton2 + + + + 0 + 0 + 0 + 0 + + + + + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + Layout3 @@ -225,89 +303,22 @@ - - - PushButton2 - - - - 0 - 0 - 0 - 0 - - - - - - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - CheckButton1 - - - - - - - - LineEdit1 - - - - - TextLabel2 - - - - 0 - 0 - 0 - 0 - - - - TL2 - - - - - Spacer1 - - - Vertical - - - Expanding - - - - 0 - 177 - - - + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + SpinBox1 + SpinBox2 + CheckButton1 + SpinBox3 + SpinBox4 + diff --git a/src/DlgRef/UIFiles/DlgRef_3Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_3Check_QTD.ui new file mode 100644 index 000000000..9573bb295 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_3Check_QTD.ui @@ -0,0 +1,112 @@ + +DlgRef_3Check_QTD + + + DlgRef_3Check_QTD + + + + 0 + 0 + 135 + 108 + + + + DlgRef_3Check_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + RadioButton3 + + + RadioButton3 + + + + + RadioButton1 + + + RadioButton1 + + + + + RadioButton2 + + + RadioButton2 + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 91 + + + + + + + + + + + RadioButton1 + RadioButton2 + RadioButton3 + + + diff --git a/src/DlgRef/UIFiles/DlgRef_3Sel3Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_3Sel3Spin1Check_QTD.ui new file mode 100644 index 000000000..c48cc30c3 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_3Sel3Spin1Check_QTD.ui @@ -0,0 +1,317 @@ + +DlgRef_3Sel3Spin1Check_QTD + + + DlgRef_3Sel3Spin1Check_QTD + + + + 0 + 0 + 380 + 229 + + + + + 5 + 5 + 0 + 0 + + + + DlgRef_3Sel3Spin1Check_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + + 5 + 5 + 0 + 0 + + + + + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + SpinBox_2 + + + + 7 + 0 + 0 + 0 + + + + + + LineEdit3 + + + + + SpinBox_3 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + CheckBox1 + + + + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + LineEdit2 + + + + + PushButton3 + + + + 0 + 0 + 0 + 0 + + + + + + + + + TextLabel6 + + + + 0 + 0 + 0 + 0 + + + + TL6 + + + + + SpinBox_1 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel5 + + + + 0 + 0 + 0 + 0 + + + + TL5 + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + LineEdit1 + + + + + PushButton2 + + + + 0 + 0 + 0 + 0 + + + + + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 0 + 250 + + + + + + + + + + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + PushButton3 + LineEdit3 + SpinBox_1 + SpinBox_2 + SpinBox_3 + CheckBox1 + + + diff --git a/src/DlgRef/UIFiles/DlgRef_3Sel4Spin2Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_3Sel4Spin2Check_QTD.ui index 93e8f84d8..441a99a72 100644 --- a/src/DlgRef/UIFiles/DlgRef_3Sel4Spin2Check_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_3Sel4Spin2Check_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 129 - 271 + 269 + 281 @@ -56,20 +56,12 @@ 6 - + - TextLabel2 - - - - 0 - 0 - 0 - 0 - + CheckButton2 - TL2 + @@ -77,9 +69,9 @@ LineEdit1 - + - PushButton1 + TextLabel3 @@ -90,12 +82,12 @@ - + TL3 - + - PushButton3 + PushButton2 @@ -109,26 +101,30 @@ - + - Spacer1 + LineEdit3 - - Vertical + + + + PushButton1 - - Expanding + + + 0 + 0 + 0 + 0 + - - - 0 - 155 - + + - - + + - Layout2 + Layout3 @@ -140,69 +136,77 @@ 6 - + - TextLabel5 + SpinBox4 - 0 + 7 0 0 0 - - TL5 - - + - TextLabel4 + SpinBox3 - 0 + 7 0 0 0 - - TL4 - - + - SpinBox1 + TextLabel7 - 7 + 0 0 0 0 + + TL7 + - + - SpinBox2 + TextLabel6 - 7 + 0 0 0 0 + + TL6 + - + - TextLabel3 + CheckButton1 + + + + + + + + PushButton3 @@ -213,17 +217,50 @@ - TL3 + - + - LineEdit3 + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 - + - Layout3 + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 16 + + + + + + LineEdit2 + + + + + Layout2 @@ -235,98 +272,69 @@ 6 - + - SpinBox4 + TextLabel5 - 7 + 0 0 0 0 + + TL5 + - + - SpinBox3 + TextLabel4 - 7 + 0 0 0 0 + + TL4 + - + - TextLabel7 + SpinBox1 - 0 + 7 0 0 0 - - TL7 - - + - TextLabel6 + SpinBox2 - 0 + 7 0 0 0 - - TL6 - - - - CheckButton2 - - - - - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - LineEdit2 - - - + - PushButton2 + TextLabel2 @@ -337,15 +345,7 @@ - - - - - - CheckButton1 - - - + TL2 @@ -354,5 +354,19 @@ + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + PushButton3 + LineEdit3 + SpinBox1 + SpinBox2 + CheckButton1 + SpinBox3 + SpinBox4 + CheckButton2 + diff --git a/src/DlgRef/UIFiles/DlgRef_6Sel_QTD.ui b/src/DlgRef/UIFiles/DlgRef_6Sel_QTD.ui new file mode 100644 index 000000000..c5ff40649 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_6Sel_QTD.ui @@ -0,0 +1,296 @@ + +DlgRef_6Sel_QTD + + + DlgRef_6Sel_QTD + + + + 0 + 0 + 235 + 196 + + + + + 5 + 7 + 0 + 0 + + + + DlgRef_6Sel_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + TextLabel5 + + + + 0 + 0 + 0 + 0 + + + + TL5 + + + + + TextLabel6 + + + + 0 + 0 + 0 + 0 + + + + TL6 + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + PushButton2 + + + + 0 + 0 + 0 + 0 + + + + + + + + + PushButton3 + + + + 0 + 0 + 0 + 0 + + + + + + + + + PushButton4 + + + + 0 + 0 + 0 + 0 + + + + + + + + + PushButton5 + + + + 0 + 0 + 0 + 0 + + + + + + + + + PushButton6 + + + + 0 + 0 + 0 + 0 + + + + + + + + + LineEdit1 + + + + + LineEdit2 + + + + + LineEdit3 + + + + + LineEdit4 + + + + + LineEdit5 + + + + + LineEdit6 + + + + + + + + + + diff --git a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui index eed5c27f4..1098d6c46 100644 --- a/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui +++ b/src/DlgRef/UIFiles/DlgRef_Skeleton_QTD.ui @@ -8,8 +8,8 @@ 0 0 - 321 - 295 + 307 + 378 @@ -165,7 +165,7 @@ - + unnamed @@ -175,7 +175,7 @@ 6 - + Layout2 @@ -213,9 +213,17 @@ + + + RadioButton4 + + + + + - + diff --git a/src/DlgRef/UIFiles/ui_to_cxx b/src/DlgRef/UIFiles/ui_to_cxx index d65425f35..b042efa8e 100755 --- a/src/DlgRef/UIFiles/ui_to_cxx +++ b/src/DlgRef/UIFiles/ui_to_cxx @@ -21,8 +21,8 @@ #uic -o DlgRef_1Sel4Spin_QTD.h DlgRef_1Sel4Spin_QTD.ui #uic -o DlgRef_1Sel4Spin_QTD.cxx -impl DlgRef_1Sel4Spin_QTD.h DlgRef_1Sel4Spin_QTD.ui -uic -o DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui -uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui +#uic -o DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui +#uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QTD.ui #uic -o DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui #uic -o DlgRef_1Sel1Check_QTD.cxx -impl DlgRef_1Sel1Check_QTD.h DlgRef_1Sel1Check_QTD.ui @@ -39,8 +39,8 @@ uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QT #uic -o DlgRef_2Sel1Spin_QTD.h DlgRef_2Sel1Spin_QTD.ui #uic -o DlgRef_2Sel1Spin_QTD.cxx -impl DlgRef_2Sel1Spin_QTD.h DlgRef_2Sel1Spin_QTD.ui -#uic -o DlgRef_2Sel1Spin1Check_QTD.h DlgRef_2Sel1Spin1Check_QTD.ui -#uic -o DlgRef_2Sel1Spin1Check_QTD.cxx -impl DlgRef_2Sel1Spin1Check_QTD.h DlgRef_2Sel1Spin1Check_QTD.ui +#uic -o DlgRef_2Sel1Spin2Check_QTD.h DlgRef_2Sel1Spin2Check_QTD.ui +#uic -o DlgRef_2Sel1Spin2Check_QTD.cxx -impl DlgRef_2Sel1Spin2Check_QTD.h DlgRef_2Sel1Spin2Check_QTD.ui #uic -o DlgRef_2Sel2Spin_QTD.h DlgRef_2Sel2Spin_QTD.ui #uic -o DlgRef_2Sel2Spin_QTD.cxx -impl DlgRef_2Sel2Spin_QTD.h DlgRef_2Sel2Spin_QTD.ui @@ -74,3 +74,12 @@ uic -o DlgRef_1Sel5Spin_QTD.cxx -impl DlgRef_1Sel5Spin_QTD.h DlgRef_1Sel5Spin_QT #uic -o DlgRef_3Spin1Check_QTD.h DlgRef_3Spin1Check_QTD.ui #uic -o DlgRef_3Spin1Check_QTD.cxx -impl DlgRef_3Spin1Check_QTD.h DlgRef_3Spin1Check_QTD.ui + +#uic -o DlgRef_3Sel3Spin1Check_QTD.h DlgRef_3Sel3Spin1Check_QTD.ui +#uic -o DlgRef_3Sel3Spin1Check_QTD.cxx -impl DlgRef_3Sel3Spin1Check_QTD.h DlgRef_3Sel3Spin1Check_QTD.ui + +#uic -o DlgRef_6Sel_QTD.h DlgRef_6Sel_QTD.ui +#uic -o DlgRef_6Sel_QTD.cxx -impl DlgRef_6Sel_QTD.h DlgRef_6Sel_QTD.ui + +uic -o DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui +uic -o DlgRef_3Check_QTD.cxx -impl DlgRef_3Check_QTD.h DlgRef_3Check_QTD.ui diff --git a/src/EntityGUI/EntityGUI.cxx b/src/EntityGUI/EntityGUI.cxx index 049b4fe00..28765de1f 100644 --- a/src/EntityGUI/EntityGUI.cxx +++ b/src/EntityGUI/EntityGUI.cxx @@ -24,12 +24,15 @@ // File : EntityGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #include "EntityGUI.h" +#include "GeometryGUI.h" #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" #include "VTKViewer_ViewFrame.h" #include "GEOM_AssemblyBuilder.h" #include "SALOMEGUI_ImportOperation.h" @@ -39,8 +42,6 @@ #include #include -#include "DisplayGUI.h" - #include "EntityGUI_SketcherDlg.h" // Sketcher #include "EntityGUI_SubShapeDlg.h" // Method SUBSHAPE @@ -48,16 +49,29 @@ using namespace std; +EntityGUI* EntityGUI::myGUIObject = 0; + +//======================================================================= +// function : GetEntityGUI() +// purpose : Get the only EntityGUI object [ static ] +//======================================================================= +EntityGUI* EntityGUI::GetEntityGUI() +{ + if ( myGUIObject == 0 ) { + // init EntityGUI only once + myGUIObject = new EntityGUI(); + } + return myGUIObject; +} + //======================================================================= // function : EntityGUI() // purpose : Constructor //======================================================================= -EntityGUI::EntityGUI() : - QObject() +EntityGUI::EntityGUI() : GEOMGUI() { myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; + myGeom = GEOM::GEOM_Gen::_duplicate( GeometryGUI::GetGeomGUI()->GetGeomGen() ); mySimulationShape1 = new AIS_Shape(TopoDS_Shape()); mySimulationShape2 = new AIS_Shape(TopoDS_Shape()); @@ -79,34 +93,26 @@ EntityGUI::~EntityGUI() //======================================================================= bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - EntityGUI* myEntityGUI = new EntityGUI(); - myEntityGUI->myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + QDialog* aDlg = NULL; switch (theCommandID) - { + { case 404: // SKETCHER - { - ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewTop(); // DCQ : 28/02/2002 - EntityGUI_SketcherDlg* aDlg = new EntityGUI_SketcherDlg(parent, "", myEntityGUI, Sel); - break; - } + GeometryGUI::GetGeomGUI()->ActiveWorkingPlane(); + aDlg = new EntityGUI_SketcherDlg(parent, "", Sel); + break; case 407: // EXPLODE : use ic - { - Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - EntityGUI_SubShapeDlg *aDlg = new EntityGUI_SubShapeDlg(parent, "", myEntityGUI, Sel, ic); - break ; - } + aDlg = new EntityGUI_SubShapeDlg(parent, "", Sel); + break; default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } + parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; + } + if ( aDlg ) + aDlg->show(); + return true; } @@ -117,6 +123,9 @@ bool EntityGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) //======================================================================= void EntityGUI::OnSketchEnd(const char *Cmd) { + /* QAD_Application::getDesktop()->putInfo("Create sketch functionality is NOT implemented in new GEOM kernel + (no such Corba interface method). Waiting for SRN to create it..."); + try { GEOM::GEOM_Shape_var result = myGeom->MakeSketcher(Cmd); if(result->_is_nil()) { @@ -130,6 +139,7 @@ void EntityGUI::OnSketchEnd(const char *Cmd) catch(const SALOME::SALOME_Exception& S_ex) { QtCatchCorbaException(S_ex); } + */ return; } @@ -185,27 +195,22 @@ void EntityGUI::DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shap // function : EraseSimulationShape() // purpose : Clears the display of 'mySimulationShape' a pure graphical shape //================================================================================== -void EntityGUI::EraseSimulationShape(int Sh) +void EntityGUI::EraseSimulationShape() { int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); for(int i = 0; i < count; i++) { if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) { OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer(); Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - if(Sh < 1) { - ic->Erase(mySimulationShape1, Standard_True, Standard_False); - ic->ClearPrs(mySimulationShape1); - } - if(Sh <= 1) { - ic->Erase(mySimulationShape2, Standard_True, Standard_False); - ic->ClearPrs(mySimulationShape2); - } + ic->Erase(mySimulationShape1, Standard_True, Standard_False); + ic->ClearPrs(mySimulationShape1); + ic->Erase(mySimulationShape2, Standard_True, Standard_False); + ic->ClearPrs(mySimulationShape2); ic->UpdateCurrentViewer(); } } } - //===================================================================================== // function : SObjectExist() // purpose : @@ -242,6 +247,8 @@ bool EntityGUI::SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* //===================================================================================== bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType) { + QAD_Application::getDesktop()->putInfo("OnSubShapeGetAll method from EntityGUI should be reimplemented ..."); + /* SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR); if(theObj->_is_nil()) { @@ -256,8 +263,8 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap SALOMEDS::AttributeIOR_var anIOR; SALOMEDS::AttributePixMap_var aPixmap; - /* We create a sub object for each sub shape as attribute of the main object */ - /* Each sub object contains list (length=1) containing its index in the main shape */ + // We create a sub object for each sub shape as attribute of the main object + // Each sub object contains list (length=1) containing its index in the main shape GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); GEOM::GEOM_Gen::ListOfGeomShapes_var listGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes; GEOM::GEOM_Shape_var aResult; @@ -273,7 +280,7 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap QtCatchCorbaException(S_ex); } - /* open transaction */ + // open transaction QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); op->start(); @@ -289,10 +296,10 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap aShape = myGeom->GetIORFromString(aShape->MainName()); } - /* Loop on each sub shape created */ - /* int i = 1 ; /* index for the nameType */ + // Loop on each sub shape created + // int i = 1 ; index for the nameType for(int j=0; jlength(); j++) { - /* Get each sub shape extracted CORBA and OCC */ + // Get each sub shape extracted CORBA and OCC aResult = listGeomShapes[j] ; TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult); @@ -301,7 +308,7 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap return false; } - /* Set the nameType of sub shape */ + // Set the nameType of sub shape char* nameG = (char *)malloc(20); Standard_CString Type; if(myGeomBase->GetShapeTypeString(S, Type)) { @@ -444,11 +451,12 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap } } - /* commit transaction */ + // commit transaction op->finish(); QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY")); + */ return true; } @@ -459,184 +467,185 @@ bool EntityGUI::OnSubShapeGetAll(const TopoDS_Shape& ShapeTopo, const char* Shap //===================================================================================== bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, const int SubShapeType, Standard_Integer& aLocalContextId, bool& myUseLocalContext) { - //* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR); - if(theObj->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return false; - } - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); + QAD_Application::getDesktop()->putInfo("OnSubShapeGetSelected method from EntityGUI should be reimplemented ..."); + // //* Test the type of viewer */ +// if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) +// return false; + +// SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); +// SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR); +// if(theObj->_is_nil()) { +// QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); +// return false; +// } + +// OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); +// Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - if( myUseLocalContext == false ) { - /* local context is from DialogBox */ - MESSAGE("Error : No local context opened for sub shapes method" << endl ) ; - return false ; - } - - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString( ShapeTopoIOR ); - TopoDS_Shape mainTopo = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - - TopoDS_Shape mainShape; - bool main = false; - while(!main) { - if(aShape->IsMainShape()) { - mainShape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - main = true; - } - else - aShape = myGeom->GetIORFromString(aShape->MainName()); - } - - GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; - ic->InitSelected(); - int nbSelected = ic->NbSelected(); - ListOfID->length(nbSelected); +// if( myUseLocalContext == false ) { +// /* local context is from DialogBox */ +// MESSAGE("Error : No local context opened for sub shapes method" << endl ) ; +// return false ; +// } + +// GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString( ShapeTopoIOR ); +// TopoDS_Shape mainTopo = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); + +// TopoDS_Shape mainShape; +// bool main = false; +// while(!main) { +// if(aShape->IsMainShape()) { +// mainShape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); +// main = true; +// } +// else +// aShape = myGeom->GetIORFromString(aShape->MainName()); +// } + +// GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; +// ic->InitSelected(); +// int nbSelected = ic->NbSelected(); +// ListOfID->length(nbSelected); - TopoDS_Compound compound; - ic->InitSelected(); /* to init again */ - BRep_Builder B; - B.MakeCompound(compound); - - int i = 0; - /* We create a unique compound containing all the sub shapes selected by user as attribute of the main shape */ - /* the compound is homogenous by selection */ - while(ic->MoreSelected()) { - int index = myGeomBase->GetIndex(ic->SelectedShape(), mainShape, SubShapeType); - ListOfID[i] = index; - B.Add(compound, ic->SelectedShape()); - i++; - ic->NextSelected(); - } +// TopoDS_Compound compound; +// ic->InitSelected(); /* to init again */ +// BRep_Builder B; +// B.MakeCompound(compound); + +// int i = 0; +// /* We create a unique compound containing all the sub shapes selected by user as attribute of the main shape */ +// /* the compound is homogenous by selection */ +// while(ic->MoreSelected()) { +// int index = myGeomBase->GetIndex(ic->SelectedShape(), mainShape, SubShapeType); +// ListOfID[i] = index; +// B.Add(compound, ic->SelectedShape()); +// i++; +// ic->NextSelected(); +// } - /* Test if user has selected sub shapes */ - if(ListOfID->length() < 1) - return false; - - GEOM::GEOM_Shape_var aResult; - try { - aResult = myGeom->SubShape(aShape, SubShapeType, ListOfID); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - - /* local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false ; - - char* nameG = (char *)malloc(20); - Standard_CString Type; - - Handle(GEOM_AISShape) result; - Handle(GEOM_InteractiveObject) IO; - - if(nbSelected == 1) { - TopExp_Explorer Exp (compound, TopAbs_ShapeEnum(SubShapeType)); - if(Exp.More()) { - if(myGeomBase->GetShapeTypeString(Exp.Current(),Type)) { - aResult->NameType(Type); - sprintf (nameG, "%s_%d", Type, myGeomBase->GetIndex( Exp.Current(), mainTopo, SubShapeType)); - } - else { - aResult->NameType(tr("GEOM_SHAPE")); - sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++); - } - result = new GEOM_AISShape(Exp.Current(), nameG); - IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM"); - } - } - else { - if ( myGeomBase->GetShapeTypeString(compound,Type)) { - aResult->NameType(Type); - sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++); - } else { - aResult->NameType(tr("GEOM_SHAPE")); - sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++); - } - result = new GEOM_AISShape(compound, nameG); - IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM"); - } +// /* Test if user has selected sub shapes */ +// if(ListOfID->length() < 1) +// return false; + +// GEOM::GEOM_Shape_var aResult; +// try { +// aResult = myGeom->SubShape(aShape, SubShapeType, ListOfID); +// } +// catch (const SALOME::SALOME_Exception& S_ex) { +// QtCatchCorbaException(S_ex); +// } + +// /* local context from DialogBox */ +// ic->CloseLocalContext(aLocalContextId); +// myUseLocalContext = false ; + +// char* nameG = (char *)malloc(20); +// Standard_CString Type; + +// Handle(GEOM_AISShape) result; +// Handle(GEOM_InteractiveObject) IO; + +// if(nbSelected == 1) { +// TopExp_Explorer Exp (compound, TopAbs_ShapeEnum(SubShapeType)); +// if(Exp.More()) { +// if(myGeomBase->GetShapeTypeString(Exp.Current(),Type)) { +// aResult->NameType(Type); +// sprintf (nameG, "%s_%d", Type, myGeomBase->GetIndex( Exp.Current(), mainTopo, SubShapeType)); +// } +// else { +// aResult->NameType(tr("GEOM_SHAPE")); +// sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++); +// } +// result = new GEOM_AISShape(Exp.Current(), nameG); +// IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM"); +// } +// } +// else { +// if ( myGeomBase->GetShapeTypeString(compound,Type)) { +// aResult->NameType(Type); +// sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++); +// } else { +// aResult->NameType(tr("GEOM_SHAPE")); +// sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++); +// } +// result = new GEOM_AISShape(compound, nameG); +// IO = new GEOM_InteractiveObject(aResult->Name(), myGeomGUI->GetFatherior(), "GEOM"); +// } - SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name()); +// SALOMEDS::SObject_var SO = aStudy->FindObjectIOR(aResult->Name()); - /* open transaction */ - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); - op->start(); +// /* open transaction */ +// QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); +// op->start(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributeIOR_var anIOR; - SALOMEDS::AttributePixMap_var aPixmap; +// SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); +// SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); +// SALOMEDS::GenericAttribute_var anAttr; +// SALOMEDS::AttributeName_var aName; +// SALOMEDS::AttributeIOR_var anIOR; +// SALOMEDS::AttributePixMap_var aPixmap; - bool allreadyexist = false; - - if(SO->_is_nil()) { - SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj); - anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR"); - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - anIOR->SetValue(aResult->Name()); - anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - aName->SetValue(result->getName()); +// bool allreadyexist = false; + +// if(SO->_is_nil()) { +// SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(theObj); +// anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR"); +// anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); +// anIOR->SetValue(aResult->Name()); +// anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName"); +// aName = SALOMEDS::AttributeName::_narrow(anAttr); +// aName->SetValue(result->getName()); - anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap"); - aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); - if(result->Shape().ShapeType() == TopAbs_COMPOUND) - aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND"); - else if(result->Shape().ShapeType() == TopAbs_COMPSOLID) - aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID"); - else if(result->Shape().ShapeType() == TopAbs_SOLID) - aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID"); - else if(result->Shape().ShapeType() == TopAbs_SHELL) - aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL"); - else if(result->Shape().ShapeType() == TopAbs_FACE) - aPixmap->SetPixMap("ICON_OBJBROWSER_FACE"); - else if(result->Shape().ShapeType() == TopAbs_WIRE) - aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE"); - else if(result->Shape().ShapeType() == TopAbs_EDGE) - aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE"); - else if(result->Shape().ShapeType() == TopAbs_VERTEX) - aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX"); - - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); - aStudyBuilder->Addreference(newObj1, newObj); +// anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap"); +// aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); +// if(result->Shape().ShapeType() == TopAbs_COMPOUND) +// aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND"); +// else if(result->Shape().ShapeType() == TopAbs_COMPSOLID) +// aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID"); +// else if(result->Shape().ShapeType() == TopAbs_SOLID) +// aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID"); +// else if(result->Shape().ShapeType() == TopAbs_SHELL) +// aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL"); +// else if(result->Shape().ShapeType() == TopAbs_FACE) +// aPixmap->SetPixMap("ICON_OBJBROWSER_FACE"); +// else if(result->Shape().ShapeType() == TopAbs_WIRE) +// aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE"); +// else if(result->Shape().ShapeType() == TopAbs_EDGE) +// aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE"); +// else if(result->Shape().ShapeType() == TopAbs_VERTEX) +// aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX"); + +// SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); +// aStudyBuilder->Addreference(newObj1, newObj); - IO->setEntry(newObj->GetID()); - aResult->StudyShapeId(newObj->GetID()); - } - else { - allreadyexist = true; - if(!this->SObjectExist(theObj, aResult->Name())) { - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj); - aStudyBuilder->Addreference(newObj1, SO); +// IO->setEntry(newObj->GetID()); +// aResult->StudyShapeId(newObj->GetID()); +// } +// else { +// allreadyexist = true; +// if(!this->SObjectExist(theObj, aResult->Name())) { +// SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(theObj); +// aStudyBuilder->Addreference(newObj1, SO); - IO->setEntry(SO->GetID()); - aResult->StudyShapeId(SO->GetID()); - } - } +// IO->setEntry(SO->GetID()); +// aResult->StudyShapeId(SO->GetID()); +// } +// } - /* commit transaction */ - op->finish(); +// /* commit transaction */ +// op->finish(); - result->setIO(IO); - result->setName(nameG); +// result->setIO(IO); +// result->setName(nameG); - if(!allreadyexist) - ic->Display(result); +// if(!allreadyexist) +// ic->Display(result); - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); +// DisplayGUI* myDisplayGUI = new DisplayGUI(); +// myDisplayGUI->OnDisplayAll(true); - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); - QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY")); +// QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); +// QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY")); return true; } @@ -646,6 +655,8 @@ bool EntityGUI::OnSubShapeGetSelected(const TopoDS_Shape& ShapeTopo, const char* //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return EntityGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return EntityGUI::GetEntityGUI(); + } } diff --git a/src/EntityGUI/EntityGUI.h b/src/EntityGUI/EntityGUI.h index 9ecb56744..bc0fdadc4 100644 --- a/src/EntityGUI/EntityGUI.h +++ b/src/EntityGUI/EntityGUI.h @@ -24,31 +24,38 @@ // File : EntityGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef ENTITYGUI_H #define ENTITYGUI_H +#include "GEOMGUI.h" #include "GEOMBase.h" //================================================================================= // class : EntityGUI // purpose : //================================================================================= -class EntityGUI : public QObject +class EntityGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + EntityGUI(); // hide constructor to avoid direct creation public : - EntityGUI(); ~EntityGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only EntityGUI object + static EntityGUI* GetEntityGUI(); + + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); void OnSketchEnd(const char *Cmd); void DisplaySimulationShape(const TopoDS_Shape& S1, const TopoDS_Shape& S2); - void EraseSimulationShape(int Sh = 0); + void EraseSimulationShape(); + + void MakeInterpolAndDisplay(GEOM::string_array& listShapesIOR); + void MakeBezierAndDisplay(GEOM::string_array& listShapesIOR); /* Methods for sub shapes explode */ bool SObjectExist(SALOMEDS::SObject_ptr theFatherObject, const char* IOR); @@ -61,9 +68,10 @@ public : Handle(AIS_Shape) mySimulationShape2; GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ +private: + static EntityGUI* myGUIObject; // the only EntityGUI object }; #endif diff --git a/src/EntityGUI/EntityGUI_1Sel_QTD.cxx b/src/EntityGUI/EntityGUI_1Sel_QTD.cxx index 01584de8f..824a6ecc7 100644 --- a/src/EntityGUI/EntityGUI_1Sel_QTD.cxx +++ b/src/EntityGUI/EntityGUI_1Sel_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_1Sel_QTD.ui' ** -** Created: Fri Apr 30 11:23:36 2004 +** Created: Thu Aug 12 19:03:19 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -26,7 +26,7 @@ EntityGUI_1Sel_QTD::EntityGUI_1Sel_QTD( QWidget* parent, const char* name, WFla { if ( !name ) setName( "EntityGUI_1Sel_QTD" ); - resize( 245, 110 ); + resize( 329, 112 ); setCaption( trUtf8( "EntityGUI_1Sel_QTD" ) ); EntityGUI_1Sel_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_1Sel_QTDLayout"); @@ -38,23 +38,32 @@ EntityGUI_1Sel_QTD::EntityGUI_1Sel_QTD( QWidget* parent, const char* name, WFla GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); + Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); + QSpacerItem* spacer = new QSpacerItem( 0, 163, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout3->addItem( spacer, 2, 0 ); + + buttonApply = new QPushButton( GroupBox1, "buttonApply" ); + buttonApply->setText( trUtf8( "Create" ) ); + + Layout3->addWidget( buttonApply, 0, 0 ); Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + buttonRedo = new QPushButton( GroupBox1, "buttonRedo" ); + buttonRedo->setText( trUtf8( "Redo" ) ); + + Layout2->addWidget( buttonRedo, 0, 1 ); + buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); buttonUndo->setText( trUtf8( "Undo" ) ); - Layout2->addWidget( buttonUndo, 1, 0 ); - - buttonApply = new QPushButton( GroupBox1, "buttonApply" ); - buttonApply->setText( trUtf8( "Create" ) ); + Layout2->addWidget( buttonUndo, 0, 0 ); - Layout2->addWidget( buttonApply, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout2->addItem( spacer, 2, 0 ); + Layout3->addLayout( Layout2, 1, 0 ); - Layout3->addLayout( Layout2, 0, 1 ); + Layout4->addLayout( Layout3, 0, 1 ); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); @@ -73,13 +82,13 @@ EntityGUI_1Sel_QTD::EntityGUI_1Sel_QTD( QWidget* parent, const char* name, WFla Layout1->addWidget( PushButton1, 0, 1 ); LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - LineEdit1->setFocusPolicy( QLineEdit::NoFocus ); + LineEdit1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, LineEdit1->sizePolicy().hasHeightForWidth() ) ); Layout1->addWidget( LineEdit1, 0, 2 ); - Layout3->addLayout( Layout1, 0, 0 ); + Layout4->addLayout( Layout1, 0, 0 ); - GroupBox1Layout->addLayout( Layout3, 0, 0 ); + GroupBox1Layout->addLayout( Layout4, 0, 0 ); EntityGUI_1Sel_QTDLayout->addWidget( GroupBox1, 0, 0 ); } diff --git a/src/EntityGUI/EntityGUI_1Sel_QTD.h b/src/EntityGUI/EntityGUI_1Sel_QTD.h index 915cda9c4..36e13768e 100644 --- a/src/EntityGUI/EntityGUI_1Sel_QTD.h +++ b/src/EntityGUI/EntityGUI_1Sel_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_1Sel_QTD.ui' ** -** Created: Fri Apr 30 11:23:32 2004 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -28,8 +28,9 @@ public: ~EntityGUI_1Sel_QTD(); QGroupBox* GroupBox1; - QPushButton* buttonUndo; QPushButton* buttonApply; + QPushButton* buttonRedo; + QPushButton* buttonUndo; QLabel* TextLabel1; QPushButton* PushButton1; QLineEdit* LineEdit1; @@ -38,6 +39,7 @@ public: protected: QGridLayout* EntityGUI_1Sel_QTDLayout; QGridLayout* GroupBox1Layout; + QGridLayout* Layout4; QGridLayout* Layout3; QGridLayout* Layout2; QGridLayout* Layout1; diff --git a/src/EntityGUI/EntityGUI_1Spin_QTD.cxx b/src/EntityGUI/EntityGUI_1Spin_QTD.cxx index 20f21d295..b96c0e18a 100644 --- a/src/EntityGUI/EntityGUI_1Spin_QTD.cxx +++ b/src/EntityGUI/EntityGUI_1Spin_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_1Spin_QTD.ui' ** -** Created: ven déc 12 11:17:10 2003 +** Created: Fri Jul 30 16:05:59 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -26,7 +26,7 @@ EntityGUI_1Spin_QTD::EntityGUI_1Spin_QTD( QWidget* parent, const char* name, WF { if ( !name ) setName( "EntityGUI_1Spin_QTD" ); - resize( 154, 96 ); + resize( 255, 112 ); setCaption( trUtf8( "EntityGUI_1Spin_QTD" ) ); EntityGUI_1Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_1Spin_QTDLayout"); @@ -38,23 +38,7 @@ EntityGUI_1Spin_QTD::EntityGUI_1Spin_QTD( QWidget* parent, const char* name, WF GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); - Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); - - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); - buttonUndo->setText( trUtf8( "Undo" ) ); - - Layout2->addWidget( buttonUndo, 1, 0 ); - - buttonApply = new QPushButton( GroupBox1, "buttonApply" ); - buttonApply->setText( trUtf8( "Create" ) ); - - Layout2->addWidget( buttonApply, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout2->addItem( spacer, 2, 0 ); - - Layout3->addLayout( Layout2, 0, 1 ); + Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); @@ -68,12 +52,37 @@ EntityGUI_1Spin_QTD::EntityGUI_1Spin_QTD( QWidget* parent, const char* name, WF SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); Layout1->addWidget( SpinBox1, 0, 1 ); - QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer_2, 3, 1 ); + QSpacerItem* spacer = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 3, 1 ); + + Layout4->addLayout( Layout1, 0, 0 ); + + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); + + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + + buttonRedo = new QPushButton( GroupBox1, "buttonRedo" ); + buttonRedo->setText( trUtf8( "Redo" ) ); + + Layout2->addWidget( buttonRedo, 0, 1 ); + + buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); + buttonUndo->setText( trUtf8( "Undo" ) ); + + Layout2->addWidget( buttonUndo, 0, 0 ); + + Layout3->addLayout( Layout2, 1, 0 ); + + buttonApply = new QPushButton( GroupBox1, "buttonApply" ); + buttonApply->setText( trUtf8( "Create" ) ); + + Layout3->addWidget( buttonApply, 0, 0 ); + QSpacerItem* spacer_2 = new QSpacerItem( 0, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout3->addItem( spacer_2, 2, 0 ); - Layout3->addLayout( Layout1, 0, 0 ); + Layout4->addLayout( Layout3, 0, 1 ); - GroupBox1Layout->addLayout( Layout3, 0, 0 ); + GroupBox1Layout->addLayout( Layout4, 0, 0 ); EntityGUI_1Spin_QTDLayout->addWidget( GroupBox1, 0, 0 ); } diff --git a/src/EntityGUI/EntityGUI_1Spin_QTD.h b/src/EntityGUI/EntityGUI_1Spin_QTD.h index b44238263..9e5498776 100644 --- a/src/EntityGUI/EntityGUI_1Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_1Spin_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_1Spin_QTD.ui' ** -** Created: ven déc 12 11:17:10 2003 +** Created: Fri Jul 30 16:05:59 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -28,18 +28,20 @@ public: ~EntityGUI_1Spin_QTD(); QGroupBox* GroupBox1; - QPushButton* buttonUndo; - QPushButton* buttonApply; QLabel* TextLabel1; QSpinBox* SpinBox1; + QPushButton* buttonRedo; + QPushButton* buttonUndo; + QPushButton* buttonApply; protected: QGridLayout* EntityGUI_1Spin_QTDLayout; QGridLayout* GroupBox1Layout; + QGridLayout* Layout4; + QGridLayout* Layout1; QGridLayout* Layout3; QGridLayout* Layout2; - QGridLayout* Layout1; }; #endif // ENTITYGUI_1SPIN_QTD_H diff --git a/src/EntityGUI/EntityGUI_2Spin_QTD.cxx b/src/EntityGUI/EntityGUI_2Spin_QTD.cxx index a01f2a783..a742db393 100644 --- a/src/EntityGUI/EntityGUI_2Spin_QTD.cxx +++ b/src/EntityGUI/EntityGUI_2Spin_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_2Spin_QTD.ui' ** -** Created: ven déc 12 11:17:11 2003 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -26,7 +26,7 @@ EntityGUI_2Spin_QTD::EntityGUI_2Spin_QTD( QWidget* parent, const char* name, WF { if ( !name ) setName( "EntityGUI_2Spin_QTD" ); - resize( 154, 96 ); + resize( 255, 112 ); setCaption( trUtf8( "EntityGUI_2Spin_QTD" ) ); EntityGUI_2Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_2Spin_QTDLayout"); @@ -38,23 +38,7 @@ EntityGUI_2Spin_QTD::EntityGUI_2Spin_QTD( QWidget* parent, const char* name, WF GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); - Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); - - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); - buttonUndo->setText( trUtf8( "Undo" ) ); - - Layout2->addWidget( buttonUndo, 1, 0 ); - - buttonApply = new QPushButton( GroupBox1, "buttonApply" ); - buttonApply->setText( trUtf8( "Create" ) ); - - Layout2->addWidget( buttonApply, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout2->addItem( spacer, 2, 0 ); - - Layout3->addLayout( Layout2, 0, 1 ); + Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); @@ -79,12 +63,37 @@ EntityGUI_2Spin_QTD::EntityGUI_2Spin_QTD( QWidget* parent, const char* name, WF SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) ); Layout1->addWidget( SpinBox2, 1, 1 ); - QSpacerItem* spacer_2 = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer_2, 3, 1 ); + QSpacerItem* spacer = new QSpacerItem( 0, 82, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( spacer, 3, 1 ); + + Layout4->addLayout( Layout1, 0, 0 ); + + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); + QSpacerItem* spacer_2 = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout3->addItem( spacer_2, 2, 0 ); + + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + + buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); + buttonUndo->setText( trUtf8( "Undo" ) ); + + Layout2->addWidget( buttonUndo, 0, 0 ); + + buttonRedo = new QPushButton( GroupBox1, "buttonRedo" ); + buttonRedo->setText( trUtf8( "Redo" ) ); + + Layout2->addWidget( buttonRedo, 0, 1 ); + + Layout3->addLayout( Layout2, 1, 0 ); + + buttonApply = new QPushButton( GroupBox1, "buttonApply" ); + buttonApply->setText( trUtf8( "Create" ) ); + + Layout3->addWidget( buttonApply, 0, 0 ); - Layout3->addLayout( Layout1, 0, 0 ); + Layout4->addLayout( Layout3, 0, 1 ); - GroupBox1Layout->addLayout( Layout3, 0, 0 ); + GroupBox1Layout->addLayout( Layout4, 0, 0 ); EntityGUI_2Spin_QTDLayout->addWidget( GroupBox1, 0, 0 ); } diff --git a/src/EntityGUI/EntityGUI_2Spin_QTD.h b/src/EntityGUI/EntityGUI_2Spin_QTD.h index 4827aa86c..8c23b2326 100644 --- a/src/EntityGUI/EntityGUI_2Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_2Spin_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_2Spin_QTD.ui' ** -** Created: ven déc 12 11:17:10 2003 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -28,20 +28,22 @@ public: ~EntityGUI_2Spin_QTD(); QGroupBox* GroupBox1; - QPushButton* buttonUndo; - QPushButton* buttonApply; QLabel* TextLabel2; QLabel* TextLabel1; QSpinBox* SpinBox1; QSpinBox* SpinBox2; + QPushButton* buttonUndo; + QPushButton* buttonRedo; + QPushButton* buttonApply; protected: QGridLayout* EntityGUI_2Spin_QTDLayout; QGridLayout* GroupBox1Layout; + QGridLayout* Layout4; + QGridLayout* Layout1; QGridLayout* Layout3; QGridLayout* Layout2; - QGridLayout* Layout1; }; #endif // ENTITYGUI_2SPIN_QTD_H diff --git a/src/EntityGUI/EntityGUI_3Spin_QTD.cxx b/src/EntityGUI/EntityGUI_3Spin_QTD.cxx index 8fa505304..9a2dd4795 100644 --- a/src/EntityGUI/EntityGUI_3Spin_QTD.cxx +++ b/src/EntityGUI/EntityGUI_3Spin_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_3Spin_QTD.ui' ** -** Created: ven déc 12 11:17:11 2003 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -26,7 +26,7 @@ EntityGUI_3Spin_QTD::EntityGUI_3Spin_QTD( QWidget* parent, const char* name, WF { if ( !name ) setName( "EntityGUI_3Spin_QTD" ); - resize( 154, 120 ); + resize( 255, 125 ); setCaption( trUtf8( "EntityGUI_3Spin_QTD" ) ); EntityGUI_3Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_3Spin_QTDLayout"); @@ -38,23 +38,32 @@ EntityGUI_3Spin_QTD::EntityGUI_3Spin_QTD( QWidget* parent, const char* name, WF GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); + Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); + buttonApply = new QPushButton( GroupBox1, "buttonApply" ); + buttonApply->setText( trUtf8( "Create" ) ); + + Layout3->addWidget( buttonApply, 0, 0 ); + QSpacerItem* spacer = new QSpacerItem( 0, 121, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout3->addItem( spacer, 2, 0 ); + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); buttonUndo->setText( trUtf8( "Undo" ) ); - Layout2->addWidget( buttonUndo, 1, 0 ); + Layout2->addWidget( buttonUndo, 0, 0 ); - buttonApply = new QPushButton( GroupBox1, "buttonApply" ); - buttonApply->setText( trUtf8( "Create" ) ); + buttonRedo = new QPushButton( GroupBox1, "buttonRedo" ); + buttonRedo->setText( trUtf8( "Redo" ) ); + + Layout2->addWidget( buttonRedo, 0, 1 ); - Layout2->addWidget( buttonApply, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout2->addItem( spacer, 2, 0 ); + Layout3->addLayout( Layout2, 1, 0 ); - Layout3->addLayout( Layout2, 0, 1 ); + Layout4->addLayout( Layout3, 0, 1 ); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); @@ -93,9 +102,9 @@ EntityGUI_3Spin_QTD::EntityGUI_3Spin_QTD( QWidget* parent, const char* name, WF Layout1->addWidget( SpinBox3, 2, 1 ); - Layout3->addLayout( Layout1, 0, 0 ); + Layout4->addLayout( Layout1, 0, 0 ); - GroupBox1Layout->addLayout( Layout3, 0, 0 ); + GroupBox1Layout->addLayout( Layout4, 0, 0 ); EntityGUI_3Spin_QTDLayout->addWidget( GroupBox1, 0, 0 ); } diff --git a/src/EntityGUI/EntityGUI_3Spin_QTD.h b/src/EntityGUI/EntityGUI_3Spin_QTD.h index 1efc3a5c1..314ca5796 100644 --- a/src/EntityGUI/EntityGUI_3Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_3Spin_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_3Spin_QTD.ui' ** -** Created: ven déc 12 11:17:11 2003 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -28,8 +28,9 @@ public: ~EntityGUI_3Spin_QTD(); QGroupBox* GroupBox1; - QPushButton* buttonUndo; QPushButton* buttonApply; + QPushButton* buttonUndo; + QPushButton* buttonRedo; QLabel* TextLabel2; QLabel* TextLabel1; QSpinBox* SpinBox1; @@ -41,6 +42,7 @@ public: protected: QGridLayout* EntityGUI_3Spin_QTDLayout; QGridLayout* GroupBox1Layout; + QGridLayout* Layout4; QGridLayout* Layout3; QGridLayout* Layout2; QGridLayout* Layout1; diff --git a/src/EntityGUI/EntityGUI_4Spin_QTD.cxx b/src/EntityGUI/EntityGUI_4Spin_QTD.cxx index 428da7dfb..d449befc7 100644 --- a/src/EntityGUI/EntityGUI_4Spin_QTD.cxx +++ b/src/EntityGUI/EntityGUI_4Spin_QTD.cxx @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'EntityGUI_4Spin_QTD.ui' ** -** Created: Fri Apr 30 10:56:21 2004 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -26,7 +26,7 @@ EntityGUI_4Spin_QTD::EntityGUI_4Spin_QTD( QWidget* parent, const char* name, WF { if ( !name ) setName( "EntityGUI_4Spin_QTD" ); - resize( 176, 154 ); + resize( 255, 154 ); setCaption( trUtf8( "EntityGUI_4Spin_QTD" ) ); EntityGUI_4Spin_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "EntityGUI_4Spin_QTDLayout"); @@ -38,23 +38,32 @@ EntityGUI_4Spin_QTD::EntityGUI_4Spin_QTD( QWidget* parent, const char* name, WF GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); GroupBox1Layout->setAlignment( Qt::AlignTop ); + Layout4 = new QGridLayout( 0, 1, 1, 0, 6, "Layout4"); + Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + buttonRedo = new QPushButton( GroupBox1, "buttonRedo" ); + buttonRedo->setText( trUtf8( "Redo" ) ); + + Layout2->addWidget( buttonRedo, 0, 1 ); + buttonUndo = new QPushButton( GroupBox1, "buttonUndo" ); buttonUndo->setText( trUtf8( "Undo" ) ); - Layout2->addWidget( buttonUndo, 1, 0 ); + Layout2->addWidget( buttonUndo, 0, 0 ); + + Layout3->addLayout( Layout2, 1, 0 ); + QSpacerItem* spacer = new QSpacerItem( 0, 45, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout3->addItem( spacer, 2, 0 ); buttonApply = new QPushButton( GroupBox1, "buttonApply" ); buttonApply->setText( trUtf8( "Create" ) ); - Layout2->addWidget( buttonApply, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 0, 51, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout2->addItem( spacer, 2, 0 ); + Layout3->addWidget( buttonApply, 0, 0 ); - Layout3->addLayout( Layout2, 0, 1 ); + Layout4->addLayout( Layout3, 0, 1 ); Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); @@ -104,18 +113,11 @@ EntityGUI_4Spin_QTD::EntityGUI_4Spin_QTD( QWidget* parent, const char* name, WF Layout1->addWidget( TextLabel4, 3, 0 ); - Layout3->addLayout( Layout1, 0, 0 ); + Layout4->addLayout( Layout1, 0, 0 ); - GroupBox1Layout->addLayout( Layout3, 0, 0 ); + GroupBox1Layout->addLayout( Layout4, 0, 0 ); EntityGUI_4Spin_QTDLayout->addWidget( GroupBox1, 0, 0 ); - - // tab order - setTabOrder( buttonUndo, buttonApply ); - setTabOrder( buttonApply, SpinBox1 ); - setTabOrder( SpinBox1, SpinBox2 ); - setTabOrder( SpinBox2, SpinBox3 ); - setTabOrder( SpinBox3, SpinBox4 ); } /* diff --git a/src/EntityGUI/EntityGUI_4Spin_QTD.h b/src/EntityGUI/EntityGUI_4Spin_QTD.h index 4aa37176d..13d983fd4 100644 --- a/src/EntityGUI/EntityGUI_4Spin_QTD.h +++ b/src/EntityGUI/EntityGUI_4Spin_QTD.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'EntityGUI_4Spin_QTD.ui' ** -** Created: Fri Apr 30 10:56:17 2004 +** Created: Fri Jul 30 16:06:00 2004 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! @@ -28,6 +28,7 @@ public: ~EntityGUI_4Spin_QTD(); QGroupBox* GroupBox1; + QPushButton* buttonRedo; QPushButton* buttonUndo; QPushButton* buttonApply; QSpinBox* SpinBox3; @@ -43,6 +44,7 @@ public: protected: QGridLayout* EntityGUI_4Spin_QTDLayout; QGridLayout* GroupBox1Layout; + QGridLayout* Layout4; QGridLayout* Layout3; QGridLayout* Layout2; QGridLayout* Layout1; diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.cxx b/src/EntityGUI/EntityGUI_SketcherDlg.cxx index d91c24544..bd150b1ad 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_SketcherDlg.cxx @@ -26,16 +26,28 @@ // Module : GEOM // $Header: -using namespace std; #include "EntityGUI_SketcherDlg.h" #include "Sketcher_Profile.hxx" -#include "utilities.h" +#include "GEOM_Displayer.h" +#include "QAD_Config.h" +#include "QAD_Desktop.h" +#include "QAD_MessageBox.h" + +#include #include #include +#include #include +#include +#include +#include -#include +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" + +using namespace std; //================================================================================= // class : EntityGUI_SketcherDlg() @@ -44,21 +56,25 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, EntityGUI* theEntityGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :EntityGUI_Skeleton_QTD(parent, name, modal, fl) +EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) +:EntityGUI_Skeleton_QTD(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose), GEOMBase_Helper(), myIsAllAdded( false ) { - if (!name) - setName("EntityGUI_SketcherDlg"); + mySelection = Sel; + GeometryGUI::GetGeomGUI()->SetActiveDialogBox(this); + + if ( !name ) setName("EntityGUI_SketcherDlg"); buttonCancel->setText(tr("GEOM_BUT_CANCEL")); buttonEnd->setText(tr("GEOM_BUT_END_SKETCH")); buttonClose->setText(tr("GEOM_BUT_CLOSE_SKETCH")); - GroupVal->close(TRUE); + + GroupVal->close(TRUE); GroupDest2->close(TRUE); GroupDest3->close(TRUE); - resize(0, 0); QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_UNDO"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_REDO"))); setCaption(tr("GEOM_SKETCHER_TITLE")); @@ -93,29 +109,35 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, Group1Sel = new EntityGUI_1Sel_QTD(this, "Group1Sel"); Group1Sel->TextLabel1->setText(tr("GEOM_SKETCHER_POINT2")); Group1Sel->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); - Group1Sel->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO")); Group1Sel->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); Group1Sel->PushButton1->setPixmap(image0); + Group1Sel->buttonUndo->setPixmap(image1); + Group1Sel->buttonRedo->setPixmap(image2); + Group1Sel->LineEdit1->setReadOnly( true ); Group1Spin = new EntityGUI_1Spin(this, "Group1Spin"); Group1Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); - Group1Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO")); Group1Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); + Group1Spin->buttonUndo->setPixmap(image1); + Group1Spin->buttonRedo->setPixmap(image2); Group2Spin = new EntityGUI_2Spin(this, "Group2Spin"); Group2Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); - Group2Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO")); Group2Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); + Group2Spin->buttonUndo->setPixmap(image1); + Group2Spin->buttonRedo->setPixmap(image2); Group3Spin = new EntityGUI_3Spin(this, "Group3Spin"); Group3Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); - Group3Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO")); Group3Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); + Group3Spin->buttonUndo->setPixmap(image1); + Group3Spin->buttonRedo->setPixmap(image2); Group4Spin = new EntityGUI_4Spin(this, "Group4Spin"); Group4Spin->GroupBox1->setTitle(tr("GEOM_SKETCHER_VALUES")); - Group4Spin->buttonUndo->setText(tr("GEOM_SKETCHER_UNDO")); Group4Spin->buttonApply->setText(tr("GEOM_SKETCHER_APPLY")); + Group4Spin->buttonUndo->setPixmap(image1); + Group4Spin->buttonRedo->setPixmap(image2); Layout5->addMultiCellWidget(GroupPt, 1, 1, 0, 1); Layout5->addWidget(GroupD1, 1, 0); @@ -128,38 +150,26 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, Layout1->addWidget(Group4Spin, 2, 0); /***************************************************************/ - mySelection = Sel; - mySimulationTopoDs1.Nullify(); - mySimulationTopoDs2.Nullify(); - myEntityGUI = theEntityGUI; - - /* Get setting of step value from file configuration */ - QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); - - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeomGUI->SetActiveDialogBox((QDialog*)this); - myGeom = myGeomGUI->myComponentGeom; - - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); - /* signals and slots connections */ connect(buttonEnd, SIGNAL(clicked()), this, SLOT(ClickOnEnd())); - connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnClose())); + connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnEnd())); connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); connect(Group1Sel->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(Group1Sel->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo())); + connect(Group1Sel->buttonRedo, SIGNAL(clicked()), this, SLOT(ClickOnRedo())); connect(Group1Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(Group1Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo())); + connect(Group1Spin->buttonRedo, SIGNAL(clicked()), this, SLOT(ClickOnRedo())); connect(Group2Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(Group2Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo())); + connect(Group2Spin->buttonRedo, SIGNAL(clicked()), this, SLOT(ClickOnRedo())); connect(Group3Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(Group3Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo())); + connect(Group3Spin->buttonRedo, SIGNAL(clicked()), this, SLOT(ClickOnRedo())); connect(Group4Spin->buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(Group4Spin->buttonUndo, SIGNAL(clicked()), this, SLOT(ClickOnUndo())); + connect(Group4Spin->buttonRedo, SIGNAL(clicked()), this, SLOT(ClickOnRedo())); connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(TypeClicked(int))); connect(GroupDest1, SIGNAL(clicked(int)), this, SLOT(DestClicked(int))); @@ -181,27 +191,21 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, connect(Group4Spin->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); connect(Group4Spin->SpinBox_DS, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1Spin->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2Spin->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group2Spin->SpinBox_DY, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DY, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DZ, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DY, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DZ, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DS, SLOT(SetStep(double))); - - connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); - connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); - - /* Move widget on the botton right corner of main widget */ -// int x, y; -// myGeomBase->DefineDlgPosition( this, x, y ); - - myEntityGUI = theEntityGUI; - this->Init(); - this->show(); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group1Spin->SpinBox_DX, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group2Spin->SpinBox_DX, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group2Spin->SpinBox_DY, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DX, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DY, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group3Spin->SpinBox_DZ, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DX, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DY, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DZ, SLOT(SetStep(double))); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDefaultStepValueChanged(double)), Group4Spin->SpinBox_DS, SLOT(SetStep(double))); + + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); + connect(GeometryGUI::GetGeomGUI(), SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + + Init(); } @@ -211,8 +215,7 @@ EntityGUI_SketcherDlg::EntityGUI_SketcherDlg(QWidget* parent, const char* name, //================================================================================= EntityGUI_SketcherDlg::~EntityGUI_SketcherDlg() { - // no need to delete child widgets, Qt does it all for us - this->destroy(TRUE, TRUE); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox( 0 ); } @@ -224,66 +227,56 @@ void EntityGUI_SketcherDlg::Init() { /* init variables */ myEditCurrentArgument = Group1Sel->LineEdit1; + myCommand.append( "Sketcher" ); + myUndoCommand.append( "Sketcher" ); - /* min, max, step and decimals for spin boxes */ - Group1Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group4Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 0.1, 3); - Group4Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 0.1, 3); - Group4Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group4Spin->SpinBox_DS->RangeStepAndValidator(-999.999, 999.999, 5., 3); - - Group1Spin->SpinBox_DX->SetValue(0.0); - Group2Spin->SpinBox_DX->SetValue(0.0); - Group2Spin->SpinBox_DY->SetValue(0.0); - Group3Spin->SpinBox_DX->SetValue(0.0); - Group3Spin->SpinBox_DY->SetValue(0.0); - Group3Spin->SpinBox_DZ->SetValue(0.0); - Group4Spin->SpinBox_DX->SetValue(0.0); - Group4Spin->SpinBox_DY->SetValue(0.0); - Group4Spin->SpinBox_DZ->SetValue(0.0); - Group4Spin->SpinBox_DS->SetValue(0.0); - - /* displays Dialog */ - Group1Sel->buttonUndo->setEnabled(false); - Group1Spin->buttonUndo->setEnabled(false); - Group2Spin->buttonUndo->setEnabled(false); - Group3Spin->buttonUndo->setEnabled(false); - Group4Spin->buttonUndo->setEnabled(false); - - RadioButton1->setChecked(true); + mySketchState = FIRST_POINT; + globalSelection( GEOM_POINT ); - myLastOp = 0; myLastX1 = 0.0; myLastY1 = 0.0; myLastX2 = 0.0; myLastY2 = 0.0; - mySketchState = FIRST_POINT; - this->TypeClicked(0); + /* Get setting of step value from file configuration */ + QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); + double step = St.toDouble(); + + /* min, max, step and decimals for spin boxes */ + Group1Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group3Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group4Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); + Group4Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); + Group4Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, step, 3); + Group4Spin->SpinBox_DS->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + + /* displays Dialog */ + GroupConstructors->setEnabled(false); + GroupDest1->setEnabled(false); + setEnabledUndo(false); + setEnabledRedo(false); + + RadioButton1->setChecked(true); - return; + resize( 0, 0 ); + TypeClicked(0); + + GEOMBase_Helper::displayPreview(); } //================================================================================= // function : InitClick() -// purpose : +// purpose : //================================================================================= void EntityGUI_SketcherDlg::InitClick() { disconnect(mySelection, 0, this, 0); - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - Group1Sel->hide(); Group1Spin->hide(); Group2Spin->hide(); @@ -291,8 +284,6 @@ void EntityGUI_SketcherDlg::InitClick() Group4Spin->hide(); resize(0, 0); - - return; } @@ -303,19 +294,20 @@ void EntityGUI_SketcherDlg::InitClick() void EntityGUI_SketcherDlg::TypeClicked(int constructorId) { myConstructorId = constructorId; - if(myConstructorId == 0) { // SEGMENT + if ( myConstructorId == 0 ) // SEGMENT + { GroupD2->setEnabled(true); RB_Dest1->setEnabled(true); RB_Dest1->setChecked(true); - this->DestClicked(1); + DestClicked(1); } - else if(myConstructorId == 1) { // ARC + else if ( myConstructorId == 1 ) // ARC + { GroupD2->setEnabled(false); RB_Dest1->setEnabled(false); RB_Dest2->setChecked(true); - this->DestClicked(0); + DestClicked(0); } - return; } @@ -323,24 +315,25 @@ void EntityGUI_SketcherDlg::TypeClicked(int constructorId) // function : DestClicked() // purpose : Radio button management //================================================================================= -void EntityGUI_SketcherDlg::DestClicked(int constructorId) +void EntityGUI_SketcherDlg::DestClicked( int constructorId ) { GroupPt->hide(); GroupD1->hide(); GroupD2->hide(); - if(constructorId == 1) { // Point + if ( constructorId == 1 ) + { // Point GroupPt->RB_Point1->setChecked(true); GroupPt->show(); - this->PointClicked(1); // XY + PointClicked(1); // XY } - else if(constructorId == 0) { // Direction + else if ( constructorId == 0 ) + { // Direction GroupD1->RB_Dir11->setChecked(true); GroupD1->show(); GroupD2->show(); - this->Dir1Clicked(2); // Angle + Dir1Clicked(2); // Angle } - return; } @@ -350,11 +343,15 @@ void EntityGUI_SketcherDlg::DestClicked(int constructorId) //================================================================================= void EntityGUI_SketcherDlg::PointClicked(int constructorId) { - this->InitClick(); + InitClick(); - if(myConstructorId == 0) { // SEGMENT - if(constructorId == 1) { // XY + if ( myConstructorId == 0 ) + { // SEGMENT + if ( constructorId == 1 ) + { // XY mySketchType = PT_ABS; + Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y2")); myX = 0.0; @@ -363,10 +360,14 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) Group2Spin->SpinBox_DY->SetValue(myY); Group2Spin->show(); Group2Spin->buttonApply->setFocus(); - this->MakeSimulationAndDisplay(); + + GEOMBase_Helper::displayPreview(); } - else if(constructorId == 0) { // DXDY + else if ( constructorId == 0 ) + { // DXDY mySketchType = PT_RELATIVE; + Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_DX2")); Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_DY2")); myDX = 0.0; @@ -375,19 +376,19 @@ void EntityGUI_SketcherDlg::PointClicked(int constructorId) Group2Spin->SpinBox_DY->SetValue(myDY); Group2Spin->show(); Group2Spin->buttonApply->setFocus(); - this->MakeSimulationAndDisplay(); + + GEOMBase_Helper::displayPreview(); } - else if(constructorId == 2) { // Selection + else if ( constructorId == 2 ) + { // Selection mySketchType = PT_SEL; myEditCurrentArgument = Group1Sel->LineEdit1; connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); Group1Sel->show(); Group1Sel->buttonApply->setFocus(); - this->SelectionIntoArgument(); + SelectionIntoArgument(); } } - - return; } @@ -399,8 +400,7 @@ void EntityGUI_SketcherDlg::Dir1Clicked(int constructorId) { myConstructorDirId = constructorId; GroupD2->RB_Dir21->setChecked(true); - this->Dir2Clicked(2); - return; + Dir2Clicked(2); } @@ -410,79 +410,95 @@ void EntityGUI_SketcherDlg::Dir1Clicked(int constructorId) //================================================================================= void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) { - this->InitClick(); + InitClick(); myAngle = 0.0; - if(myConstructorId == 0) { // SEGMENT + if ( myConstructorId == 0 ) + { // SEGMENT myX = 0.0; myY = 0.0; myLength = 100.0; - if(myConstructorDirId == 2) { // Angle - Group2Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 5., 3); + if ( myConstructorDirId == 2 ) + { // Angle + Group2Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); Group2Spin->SpinBox_DX->SetValue(myAngle); Group2Spin->buttonApply->setFocus(); Group2Spin->show(); - if(constructorId == 2) { // Length - mySketchType = DIR_ANGLE_LENGTH; - Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_LENGTH2")); - Group2Spin->SpinBox_DY->SetValue(myLength); + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_ANGLE_LENGTH; + Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_LENGTH2")); + Group2Spin->SpinBox_DY->SetValue(myLength); } - else if(constructorId == 0) { // X - mySketchType = DIR_ANGLE_X; - Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_X3")); - Group2Spin->SpinBox_DY->SetValue(myX); + else if ( constructorId == 0 ) + { // X + mySketchType = DIR_ANGLE_X; + Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_X3")); + Group2Spin->SpinBox_DY->SetValue(myX); } - else if(constructorId == 1) { // Y - mySketchType = DIR_ANGLE_Y; - Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3")); - Group2Spin->SpinBox_DY->SetValue(myY); + else if ( constructorId == 1 ) + { // Y + mySketchType = DIR_ANGLE_Y; + Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_Y3")); + Group2Spin->SpinBox_DY->SetValue(myY); } - } - else if(myConstructorDirId == 0) { // Perpendicular + } + else if ( myConstructorDirId == 0 ) + { // Perpendicular Group1Spin->show(); Group1Spin->buttonApply->setFocus(); - if(constructorId == 2) { // Length - mySketchType = DIR_PER_LENGTH; - Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_LENGTH2")); - Group1Spin->SpinBox_DX->SetValue(myLength); + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_PER_LENGTH; + Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_LENGTH2")); + Group1Spin->SpinBox_DX->SetValue(myLength); } - else if(constructorId == 0) { // X - mySketchType = DIR_PER_X; - Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X3")); - Group1Spin->SpinBox_DX->SetValue(myX); + else if ( constructorId == 0 ) + { // X + mySketchType = DIR_PER_X; + Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X3")); + Group1Spin->SpinBox_DX->SetValue(myX); } - else if(constructorId == 1) { // Y - mySketchType = DIR_PER_Y; - Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_Y3")); - Group1Spin->SpinBox_DX->SetValue(myY); + else if ( constructorId == 1 ) + { // Y + mySketchType = DIR_PER_Y; + Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_Y3")); + Group1Spin->SpinBox_DX->SetValue(myY); } } - else if(myConstructorDirId == 1) { // Tangent + else if ( myConstructorDirId == 1 ) + { // Tangent Group1Spin->show(); Group1Spin->buttonApply->setFocus(); - if(constructorId == 2) { // Length - mySketchType = DIR_TAN_LENGTH; - Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_LENGTH2")); - Group1Spin->SpinBox_DX->SetValue(myLength); + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_TAN_LENGTH; + Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_LENGTH2")); + Group1Spin->SpinBox_DX->SetValue(myLength); } - else if(constructorId == 0) { // X - mySketchType = DIR_TAN_X; - Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X3")); - Group1Spin->SpinBox_DX->SetValue(myX); + else if ( constructorId == 0 ) + { // X + mySketchType = DIR_TAN_X; + Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_X3")); + Group1Spin->SpinBox_DX->SetValue(myX); } - else if(constructorId == 1) { // Y - mySketchType = DIR_TAN_Y; - Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_Y3")); - Group1Spin->SpinBox_DX->SetValue(myY); + else if ( constructorId == 1 ) + { // Y + mySketchType = DIR_TAN_Y; + Group1Spin->TextLabel1->setText(tr("GEOM_SKETCHER_Y3")); + Group1Spin->SpinBox_DX->SetValue(myY); } } - else if(myConstructorDirId == 3) { // DXDY - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 0.1, 3); - Group3Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 0.1, 3); + else if ( myConstructorDirId == 3 ) + { // DXDY + Group3Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 0.1, 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); myDX = 0.0; @@ -492,92 +508,106 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) Group3Spin->show(); Group3Spin->buttonApply->setFocus(); - if(constructorId == 2) { // Length - mySketchType = DIR_DXDY_LENGTH; - Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_LENGTH2")); - Group3Spin->SpinBox_DZ->SetValue(myLength); + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_DXDY_LENGTH; + Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_LENGTH2")); + Group3Spin->SpinBox_DZ->SetValue(myLength); } - else if(constructorId == 0) { // X - mySketchType = DIR_DXDY_X; - Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_X3")); - Group3Spin->SpinBox_DZ->SetValue(myX); + else if ( constructorId == 0 ) + { // X + mySketchType = DIR_DXDY_X; + Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_X3")); + Group3Spin->SpinBox_DZ->SetValue(myX); } - else if(constructorId == 1) { // Y - mySketchType = DIR_DXDY_Y; - Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_Y3")); - Group3Spin->SpinBox_DZ->SetValue(myY); + else if ( constructorId == 1 ) + { // Y + mySketchType = DIR_DXDY_Y; + Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_Y3")); + Group3Spin->SpinBox_DZ->SetValue(myY); } } } - else if(myConstructorId == 1) { // ARC - if(myConstructorDirId == 2) { // Angle - if(constructorId == 2) { // Length - mySketchType = DIR_ANGLE_LENGTH; - Group3Spin->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, 5., 3); - Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, 5., 3); - Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); - Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2")); - Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2")); - Group3Spin->SpinBox_DX->SetValue(myAngle); - myRadius = 100.0; - Group3Spin->SpinBox_DY->SetValue(myRadius); - myLength = 30.0; - Group3Spin->SpinBox_DZ->SetValue(myLength); - Group3Spin->show(); - Group3Spin->buttonApply->setFocus(); + else if ( myConstructorId == 1 ) + { // ARC + if ( myConstructorDirId == 2 ) + { // Angle + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_ANGLE_LENGTH; + Group3Spin->SpinBox_DX->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group3Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group3Spin->SpinBox_DZ->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group3Spin->TextLabel1->setText(tr("GEOM_SKETCHER_ANGLE2")); + Group3Spin->TextLabel2->setText(tr("GEOM_SKETCHER_RADIUS2")); + Group3Spin->TextLabel3->setText(tr("GEOM_SKETCHER_ANGLE2")); + Group3Spin->SpinBox_DX->SetValue(myAngle); + myRadius = 100.0; + Group3Spin->SpinBox_DY->SetValue(myRadius); + myLength = 30.0; + Group3Spin->SpinBox_DZ->SetValue(myLength); + Group3Spin->show(); + Group3Spin->buttonApply->setFocus(); } } - else if(myConstructorDirId == 0) { // Perpendicular - if(constructorId == 2) { // Length - mySketchType = DIR_PER_LENGTH; - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 5., 3); - Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); - Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); - myRadius = 100.0; - Group2Spin->SpinBox_DX->SetValue(myRadius); - myLength = 30.0; - Group2Spin->SpinBox_DY->SetValue(myLength); - Group2Spin->show(); - Group2Spin->buttonApply->setFocus(); + else if ( myConstructorDirId == 0 ) + { // Perpendicular + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_PER_LENGTH; + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); + Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); + myRadius = 100.0; + Group2Spin->SpinBox_DX->SetValue(myRadius); + myLength = 30.0; + Group2Spin->SpinBox_DY->SetValue(myLength); + Group2Spin->show(); + Group2Spin->buttonApply->setFocus(); } } - else if(myConstructorDirId == 1) { // Tangent - if(constructorId == 2) { // Length - mySketchType = DIR_TAN_LENGTH; - Group2Spin->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, 5., 3); - Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); - Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); - myRadius = 100.0; - Group2Spin->SpinBox_DX->SetValue(myRadius); - myLength = 30.0; - Group2Spin->SpinBox_DY->SetValue(myLength); - Group2Spin->show(); - Group2Spin->buttonApply->setFocus(); + else if ( myConstructorDirId == 1 ) + { // Tangent + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_TAN_LENGTH; + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 100., 3); + Group2Spin->SpinBox_DY->RangeStepAndValidator(-999999.999, 999999.999, 5., 3); + Group2Spin->TextLabel1->setText(tr("GEOM_SKETCHER_RADIUS2")); + Group2Spin->TextLabel2->setText(tr("GEOM_SKETCHER_ANGLE2")); + myRadius = 100.0; + Group2Spin->SpinBox_DX->SetValue(myRadius); + myLength = 30.0; + Group2Spin->SpinBox_DY->SetValue(myLength); + Group2Spin->show(); + Group2Spin->buttonApply->setFocus(); } } - else if(myConstructorDirId == 3) { // DXDY - if(constructorId == 2) { // Length - mySketchType = DIR_DXDY_LENGTH; - Group4Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); - Group4Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); - Group4Spin->TextLabel3->setText(tr("GEOM_SKETCHER_RADIUS2")); - Group4Spin->TextLabel4->setText(tr("GEOM_SKETCHER_ANGLE2")); - myDX = 0.0; - Group4Spin->SpinBox_DX->SetValue(myDX); - myDY = 0.0; - Group4Spin->SpinBox_DY->SetValue(myDY); - myRadius = 100.0; - Group4Spin->SpinBox_DZ->SetValue(myRadius); - myLength = 30.0; - Group4Spin->SpinBox_DS->SetValue(myLength); - Group4Spin->show(); - Group4Spin->buttonApply->setFocus(); + else if ( myConstructorDirId == 3 ) + { // DXDY + if ( constructorId == 2 ) + { // Length + mySketchType = DIR_DXDY_LENGTH; + Group4Spin->TextLabel1->setText(tr("GEOM_SKETCHER_VX2")); + Group4Spin->TextLabel2->setText(tr("GEOM_SKETCHER_VY2")); + Group4Spin->TextLabel3->setText(tr("GEOM_SKETCHER_RADIUS2")); + Group4Spin->TextLabel4->setText(tr("GEOM_SKETCHER_ANGLE2")); + myDX = 0.0; + Group4Spin->SpinBox_DX->SetValue(myDX); + myDY = 0.0; + Group4Spin->SpinBox_DY->SetValue(myDY); + myRadius = 100.0; + Group4Spin->SpinBox_DZ->SetValue(myRadius); + myLength = 30.0; + Group4Spin->SpinBox_DS->SetValue(myLength); + Group4Spin->show(); + Group4Spin->buttonApply->setFocus(); } } } - this->MakeSimulationAndDisplay(); - return; + GEOMBase_Helper::displayPreview(); } @@ -587,106 +617,141 @@ void EntityGUI_SketcherDlg::Dir2Clicked(int constructorId) //================================================================================= void EntityGUI_SketcherDlg::ClickOnCancel() { - QAD_Application::getDesktop()->putInfo(tr("")); - myEntityGUI->EraseSimulationShape(); - mySimulationTopoDs1.Nullify(); - mySimulationTopoDs2.Nullify(); - - mySelection->ClearFilters(); - disconnect(mySelection, 0, this, 0); - - reject(); - return; + close(); } //================================================================================= // function : ClickOnEnd() -// purpose : +// purpose : connected to buttonEnd AND buttonClose //================================================================================= void EntityGUI_SketcherDlg::ClickOnEnd() { - if(mySketchState != FIRST_POINT && mySketchState != SECOND_POINT) - myEntityGUI->OnSketchEnd(myCommand.ascii()); + if ( sender() == buttonClose ) + { + // Verify validity of commands + if ( myCommand.count() <= 2 ) + { + QAD_MessageBox::error1( QAD_Application::getDesktop(), + tr( "GEOM_ERROR_STATUS" ), tr( "CANNOT_CLOSE" ), tr( "BUT_OK" ) ); + return; + } + + QString Command = myCommand.join( "" ) + GetNewCommand(); + Sketcher_Profile aProfile (Command.ascii()); + + Command = myCommand.join( "" ); + aProfile = Sketcher_Profile(Command.ascii()); + TopoDS_Shape myShape; + if ( aProfile.IsDone() ) + myShape = aProfile.GetShape(); + + if(myShape.ShapeType() != TopAbs_VERTEX) + myCommand.append( ":WW" ); + } + else + myIsAllAdded = true; - this->ClickOnCancel(); - return; + if( myCommand.size() > 2 ) + if( !onAccept() ) + return; + + close(); } +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool EntityGUI_SketcherDlg::ClickOnApply() +{ + myCommand.append( GetNewCommand() ); + mySketchState = NEXT_POINT; + + myUndoCommand.clear(); + myUndoCommand.append( "Sketcher" ); + + GroupConstructors->setEnabled(true); + GroupDest1->setEnabled(true); + setEnabledUndo(true); + setEnabledRedo(false); + + GEOMBase_Helper::displayPreview(); + + return true; +} //================================================================================= -// function : ClickOnClose() +// function : ClickOnUndo() // purpose : //================================================================================= -void EntityGUI_SketcherDlg::ClickOnClose() +void EntityGUI_SketcherDlg::ClickOnUndo() { - if(mySketchState != FIRST_POINT && mySketchState != SECOND_POINT) { - myCommand = myCommand + ":WW"; - myEntityGUI->OnSketchEnd(myCommand.ascii()); + myUndoCommand.append( myCommand.last() ); + myCommand.pop_back(); + + if(myCommand.count() == 1) { + mySketchState = FIRST_POINT; + + RadioButton1->setChecked(true); + TypeClicked(0); + + GroupConstructors->setEnabled(false); + GroupDest1->setEnabled(false); + setEnabledUndo(false); } - this->ClickOnCancel(); - return; -} + setEnabledRedo(true); + GEOMBase_Helper::displayPreview(); +} //================================================================================= -// function : ClickOnApply() +// function : ClickOnRedo() // purpose : //================================================================================= -void EntityGUI_SketcherDlg::ClickOnApply() +void EntityGUI_SketcherDlg::ClickOnRedo() { - if(mySketchState == FIRST_POINT) { - mySketchState = SECOND_POINT; - myLastX2 = myLastX1; - myLastY2 = myLastY1; - } - else { - if(mySketchState != SECOND_POINT) { - Group1Sel->buttonUndo->setEnabled(true); - Group1Spin->buttonUndo->setEnabled(true); - Group2Spin->buttonUndo->setEnabled(true); - Group3Spin->buttonUndo->setEnabled(true); - Group4Spin->buttonUndo->setEnabled(true); - } + myCommand.append( myUndoCommand.last() ); + myUndoCommand.pop_back(); - QString myNewCommand = this->GetNewCommand(); - QString myCommandTemp = myCommand + myNewCommand; + mySketchState = NEXT_POINT; - Sketcher_Profile aProfile (myCommandTemp.ascii()); + GroupConstructors->setEnabled(true); + GroupDest1->setEnabled(true); + setEnabledUndo(true); - if(aProfile.IsDone()) { - myLastCommand = myCommand; - myCommand = myCommandTemp; - myLastX2 = myLastX1; - myLastY2 = myLastY1; - mySketchState = NEXT_POINT; - } - } + if(myUndoCommand.count() == 1) + setEnabledRedo(false); - myLastOp = myConstructorId; - this->MakeSimulationAndDisplay(); - return; + GEOMBase_Helper::displayPreview(); } - //================================================================================= -// function : ClickOnUndo() +// function : setEnabledUndo() // purpose : //================================================================================= -void EntityGUI_SketcherDlg::ClickOnUndo() +void EntityGUI_SketcherDlg::setEnabledUndo(bool value) { - Group1Sel->buttonUndo->setEnabled(false); - Group1Spin->buttonUndo->setEnabled(false); - Group2Spin->buttonUndo->setEnabled(false); - Group3Spin->buttonUndo->setEnabled(false); - Group4Spin->buttonUndo->setEnabled(false); - - myCommand = myLastCommand; - this->MakeSimulationAndDisplay(); - return; + Group1Sel->buttonUndo->setEnabled(value); + Group1Spin->buttonUndo->setEnabled(value); + Group2Spin->buttonUndo->setEnabled(value); + Group3Spin->buttonUndo->setEnabled(value); + Group4Spin->buttonUndo->setEnabled(value); } +//================================================================================= +// function : setEnabledRedo() +// purpose : +//================================================================================= +void EntityGUI_SketcherDlg::setEnabledRedo(bool value) +{ + Group1Sel->buttonRedo->setEnabled(value); + Group1Spin->buttonRedo->setEnabled(value); + Group2Spin->buttonRedo->setEnabled(value); + Group3Spin->buttonRedo->setEnabled(value); + Group4Spin->buttonRedo->setEnabled(value); +} //================================================================================= // function : SelectionIntoArgument() @@ -694,40 +759,36 @@ void EntityGUI_SketcherDlg::ClickOnUndo() //================================================================================= void EntityGUI_SketcherDlg::SelectionIntoArgument() { - myEntityGUI->EraseSimulationShape(1); //Juste Shape2!! - - Group1Sel->buttonApply->setEnabled(false); - Group1Sel->buttonApply->setFocus(); - myEditCurrentArgument->setText(""); - QString aString = ""; - - myX = 0.0; - myY = 0.0; - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - gp_Pnt myPoint1; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == Group1Sel->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - myX = myPoint1.X(); - myY = myPoint1.Y(); - Group1Sel->LineEdit1->setText(aString); - - Group1Sel->buttonApply->setEnabled(true); - Group1Sel->buttonApply->setFocus(); - this->MakeSimulationAndDisplay(); + myX = myLastX1; + myY = myLastY1; + + int nbSel = mySelection->IObjectCount(); + if ( nbSel == 1 && myEditCurrentArgument == Group1Sel->LineEdit1 ) + { + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) { + TopoDS_Shape aShape; + if ( GEOMBase::GetShape( aSelectedObject, aShape, TopAbs_VERTEX ) ) { + gp_Trsf aTrans; + gp_Ax3 aWPlane = GeometryGUI::GetGeomGUI()->GetWorkingPlane(); + + aTrans.SetTransformation(aWPlane); + BRepBuilderAPI_Transform aTransformation(aShape, aTrans, Standard_False); + aShape = aTransformation.Shape(); + + gp_Pnt aPnt; + if ( GEOMBase::VertexToPoint( aShape, aPnt ) ) { + myX = aPnt.X(); + myY = aPnt.Y(); + Group1Sel->LineEdit1->setText( GEOMBase::GetName( aSelectedObject ) ); + } + } + } } - return; + GEOMBase_Helper::displayPreview(); } @@ -737,16 +798,12 @@ void EntityGUI_SketcherDlg::SelectionIntoArgument() //================================================================================= void EntityGUI_SketcherDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); - - mySelection->ClearFilters(); - if(send == Group1Sel->PushButton1) { - //Group1Sel->LineEdit1->setFocus(); + if ( sender() == Group1Sel->PushButton1 ) + { myEditCurrentArgument = Group1Sel->LineEdit1; + myEditCurrentArgument->setFocus(); } - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); - return; + SelectionIntoArgument(); } @@ -756,15 +813,18 @@ void EntityGUI_SketcherDlg::SetEditCurrentArgument() //================================================================================= void EntityGUI_SketcherDlg::LineEditReturnPressed() { - /* User name of object input management */ - /* If successfull the selection is changed and signal emitted... */ - /* so SelectionIntoArgument() is automatically called. */ - const QString objectUserName = myEditCurrentArgument->text(); - QWidget* thisWidget = (QWidget*)this; - if(myGeomBase->SelectionByNameInDialogs(thisWidget, objectUserName, mySelection)) - myEditCurrentArgument->setText(objectUserName); - - return; + if ( sender() == Group1Sel->LineEdit1 ) + { + myEditCurrentArgument = Group1Sel->LineEdit1; + + /* User name of object input management */ + /* If successfull the selection is changed and signal emitted... */ + /* so SelectionIntoArgument() is automatically called. */ + const QString objectUserName = myEditCurrentArgument->text(); + QWidget* thisWidget = (QWidget*)this; + if(GEOMBase::SelectionByNameInDialogs(thisWidget, objectUserName, mySelection)) + myEditCurrentArgument->setText(objectUserName); + } } @@ -774,12 +834,12 @@ void EntityGUI_SketcherDlg::LineEditReturnPressed() //================================================================================= void EntityGUI_SketcherDlg::DeactivateActiveDialog() { - this->setEnabled(false); - mySelection->ClearFilters(); + GeometryGUI::GetGeomGUI()->SetState( -1 ); + + setEnabled( false ); + globalSelection(); disconnect(mySelection, 0, this, 0); - myEntityGUI->EraseSimulationShape(); - myGeomGUI->SetActiveDialogBox(0); - return; + GeometryGUI::GetGeomGUI()->SetActiveDialogBox(0); } @@ -789,15 +849,19 @@ void EntityGUI_SketcherDlg::DeactivateActiveDialog() //================================================================================= void EntityGUI_SketcherDlg::ActivateThisDialog() { - /* Emit a signal to deactivate the active dialog */ - myGeomGUI->EmitSignalDeactivateDialog(); - this->setEnabled(true); - myGeomGUI->SetActiveDialogBox((QDialog*)this); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + setEnabled(true); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox((QDialog*)this); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myVertexFilter); - myEntityGUI->DisplaySimulationShape(mySimulationTopoDs1, mySimulationTopoDs2); - return; + GeometryGUI::GetGeomGUI()->SetState( 0 ); + globalSelection( GEOM_POINT ); + + myEditCurrentArgument = Group1Sel->LineEdit1; + myEditCurrentArgument->setFocus(); + + GEOMBase_Helper::displayPreview(); } @@ -807,10 +871,8 @@ void EntityGUI_SketcherDlg::ActivateThisDialog() //================================================================================= void EntityGUI_SketcherDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled()) + ActivateThisDialog(); } @@ -820,9 +882,9 @@ void EntityGUI_SketcherDlg::enterEvent(QEvent* e) //================================================================================= void EntityGUI_SketcherDlg::closeEvent(QCloseEvent* e) { - /* same than click on cancel button */ - this->ClickOnCancel(); - return; + GeometryGUI::GetGeomGUI()->SetState( -1 ); + disconnect(mySelection, 0, this, 0); + QDialog::closeEvent( e ); } @@ -836,137 +898,157 @@ void EntityGUI_SketcherDlg::ValueChangedInSpinBox(double newValue) Standard_Real vx, vy, vz, vs; vx = vy = vz = vs = 0.0; - if(send == Group1Spin->SpinBox_DX) { + if ( send == Group1Spin->SpinBox_DX) + { vx = newValue; - Group1Spin->buttonApply->setFocus(); } - else if(send == Group2Spin->SpinBox_DX) { + else if ( send == Group2Spin->SpinBox_DX ) + { vx = newValue; vy = Group2Spin->SpinBox_DY->GetValue(); - Group2Spin->buttonApply->setFocus(); } - else if(send == Group2Spin->SpinBox_DY) { + else if ( send == Group2Spin->SpinBox_DY) + { vx = Group2Spin->SpinBox_DX->GetValue(); vy = newValue; - Group2Spin->buttonApply->setFocus(); } - else if(send == Group3Spin->SpinBox_DX) { + else if ( send == Group3Spin->SpinBox_DX) + { vx = newValue; vy = Group3Spin->SpinBox_DY->GetValue(); vz = Group3Spin->SpinBox_DZ->GetValue(); - Group3Spin->buttonApply->setFocus(); } - else if(send == Group3Spin->SpinBox_DY) { + else if ( send == Group3Spin->SpinBox_DY) + { vx = Group3Spin->SpinBox_DX->GetValue(); vy = newValue; vz = Group3Spin->SpinBox_DZ->GetValue(); - Group3Spin->buttonApply->setFocus(); } - else if(send == Group3Spin->SpinBox_DZ) { + else if ( send == Group3Spin->SpinBox_DZ) + { vx = Group3Spin->SpinBox_DX->GetValue(); vy = Group3Spin->SpinBox_DY->GetValue(); vz = newValue; - Group3Spin->buttonApply->setFocus(); } - else if(send == Group4Spin->SpinBox_DX) { + else if ( send == Group4Spin->SpinBox_DX) + { vx = newValue; vy = Group4Spin->SpinBox_DY->GetValue(); vz = Group4Spin->SpinBox_DZ->GetValue(); vs = Group4Spin->SpinBox_DS->GetValue(); - Group4Spin->buttonApply->setFocus(); } - else if(send == Group4Spin->SpinBox_DY) { + else if ( send == Group4Spin->SpinBox_DY) + { vx = Group4Spin->SpinBox_DX->GetValue(); vy = newValue; vz = Group4Spin->SpinBox_DZ->GetValue(); vs = Group4Spin->SpinBox_DS->GetValue(); - Group4Spin->buttonApply->setFocus(); } - else if(send == Group4Spin->SpinBox_DZ) { + else if ( send == Group4Spin->SpinBox_DZ) + { vx = Group4Spin->SpinBox_DX->GetValue(); vy = Group4Spin->SpinBox_DY->GetValue(); vz = newValue; vs = Group4Spin->SpinBox_DS->GetValue(); - Group4Spin->buttonApply->setFocus(); } - else if(send == Group4Spin->SpinBox_DS) { + else if ( send == Group4Spin->SpinBox_DS) + { vx = Group4Spin->SpinBox_DX->GetValue(); vy = Group4Spin->SpinBox_DY->GetValue(); vz = Group4Spin->SpinBox_DZ->GetValue(); vs = newValue; - Group4Spin->buttonApply->setFocus(); } - if(myConstructorId == 0) { // SEGMENT - if(mySketchType == PT_ABS) { + if ( myConstructorId == 0 ) + { // SEGMENT + if ( mySketchType == PT_ABS) + { myX = vx; myY = vy; } - else if(mySketchType == PT_RELATIVE) { + else if ( mySketchType == PT_RELATIVE) + { myDX = vx; myDY = vy; } - else if(mySketchType == DIR_ANGLE_LENGTH) { + else if ( mySketchType == DIR_ANGLE_LENGTH) + { myAngle = vx; myLength = vy; } - else if(mySketchType == DIR_ANGLE_X) { + else if ( mySketchType == DIR_ANGLE_X) + { myAngle = vx; myX = vy; } - else if(mySketchType == DIR_ANGLE_Y) { + else if ( mySketchType == DIR_ANGLE_Y) + { myAngle = vx; myY = vy; } - else if(mySketchType == DIR_PER_LENGTH) { + else if ( mySketchType == DIR_PER_LENGTH) + { myLength = vx; } - else if(mySketchType == DIR_PER_X) { + else if ( mySketchType == DIR_PER_X) + { myX = vx; } - else if(mySketchType == DIR_PER_Y) { + else if ( mySketchType == DIR_PER_Y) + { myY = vx; } - else if(mySketchType == DIR_TAN_LENGTH) { + else if ( mySketchType == DIR_TAN_LENGTH) + { myLength = vx; } - else if(mySketchType == DIR_TAN_X) { + else if ( mySketchType == DIR_TAN_X) + { myX = vx; } - else if(mySketchType == DIR_TAN_Y) { + else if ( mySketchType == DIR_TAN_Y) + { myY = vx; } - else if(mySketchType == DIR_DXDY_LENGTH) { + else if ( mySketchType == DIR_DXDY_LENGTH) + { myDX = vx; myDY = vy; myLength = vz; } - else if(mySketchType == DIR_DXDY_X) { + else if ( mySketchType == DIR_DXDY_X) + { myDX = vx; myDY = vy; myX = vz; } - else if(mySketchType == DIR_DXDY_Y) { + else if ( mySketchType == DIR_DXDY_Y) + { myDX = vx; myDY = vy; myY = vz; } } - else if(myConstructorId == 1) { // ARC - if(mySketchType == DIR_ANGLE_LENGTH) { + else if ( myConstructorId == 1 ) + { // ARC + if ( mySketchType == DIR_ANGLE_LENGTH) + { myAngle = vx; myRadius = vy; myLength = vz; } - else if(mySketchType == DIR_PER_LENGTH) { + else if ( mySketchType == DIR_PER_LENGTH) + { myRadius = vx; myLength = vy; } - else if(mySketchType == DIR_TAN_LENGTH) { + else if ( mySketchType == DIR_TAN_LENGTH) + { myRadius = vx; myLength = vy; } - else if(mySketchType == DIR_DXDY_LENGTH) { + else if ( mySketchType == DIR_DXDY_LENGTH) + { myDX = vx; myDY = vy; myRadius = vz; @@ -974,83 +1056,101 @@ void EntityGUI_SketcherDlg::ValueChangedInSpinBox(double newValue) } } - this->MakeSimulationAndDisplay(); - return; + GEOMBase_Helper::displayPreview(); } //================================================================================= // function : GetNewCommand() -// purpose : +// purpose : Build the new command with context //================================================================================= QString EntityGUI_SketcherDlg::GetNewCommand() { - QString myNewCommand = ""; - if(mySketchState == FIRST_POINT) + QString myNewCommand = ":"; + if ( mySketchState == FIRST_POINT ) { + if ( mySketchType == PT_ABS || mySketchType == PT_SEL) + myNewCommand = myNewCommand + "F " + QString::number(myX) + " " + QString::number(myY); + if ( mySketchType == PT_RELATIVE) + myNewCommand = myNewCommand + "F " + QString::number(myDX) + " " + QString::number(myDY); return myNewCommand; + } - myNewCommand = ":"; - if(myConstructorId == 0) { // SEGMENT - if(mySketchType == PT_ABS || mySketchType == PT_SEL) + if ( myConstructorId == 0 ) + { // SEGMENT + if ( mySketchType == PT_ABS || mySketchType == PT_SEL) myNewCommand = myNewCommand + "TT " + QString::number(myX) + " " + QString::number(myY); - if(mySketchType == PT_RELATIVE) + if ( mySketchType == PT_RELATIVE) myNewCommand = myNewCommand + "T " + QString::number(myDX) + " " + QString::number(myDY); - if(mySketchType == DIR_ANGLE_LENGTH) { + if ( mySketchType == DIR_ANGLE_LENGTH) + { myNewCommand = myNewCommand + "R " + QString::number(myAngle); myNewCommand = myNewCommand + ":" + "L " + QString::number(myLength); } - if(mySketchType == DIR_ANGLE_X) { + if ( mySketchType == DIR_ANGLE_X) + { myNewCommand = myNewCommand + "R " + QString::number(myAngle); myNewCommand = myNewCommand + ":" + "IX " + QString::number(myX); } - if(mySketchType == DIR_ANGLE_Y) { + if ( mySketchType == DIR_ANGLE_Y) + { myNewCommand = myNewCommand + "R " + QString::number(myAngle); myNewCommand = myNewCommand + ":" + "IY " + QString::number(myY); } - if(mySketchType == DIR_PER_LENGTH) { + if ( mySketchType == DIR_PER_LENGTH) + { myNewCommand = myNewCommand + "R " + QString::number(90.0); myNewCommand = myNewCommand + ":" + "L " + QString::number(myLength); } - if(mySketchType == DIR_PER_X) { + if ( mySketchType == DIR_PER_X) + { myNewCommand = myNewCommand + "R " + QString::number(90.0); myNewCommand = myNewCommand + ":" + "IX " + QString::number(myX); } - if(mySketchType == DIR_PER_Y) { + if ( mySketchType == DIR_PER_Y) + { myNewCommand = myNewCommand + "R " + QString::number(90.0); myNewCommand = myNewCommand + ":" + "IY " + QString::number(myY); } - if(mySketchType == DIR_TAN_LENGTH) + if ( mySketchType == DIR_TAN_LENGTH) myNewCommand = myNewCommand + "L " + QString::number(myLength); - if(mySketchType == DIR_TAN_X) + if ( mySketchType == DIR_TAN_X) myNewCommand = myNewCommand + "IX " + QString::number(myX); - if(mySketchType == DIR_TAN_Y) + if ( mySketchType == DIR_TAN_Y) myNewCommand = myNewCommand + "IY " + QString::number(myY); - if(mySketchType == DIR_DXDY_LENGTH) { + if ( mySketchType == DIR_DXDY_LENGTH) + { myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY); myNewCommand = myNewCommand + ":" + "L " + QString::number(myLength); } - if(mySketchType == DIR_DXDY_X) { + if ( mySketchType == DIR_DXDY_X) + { myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY); myNewCommand = myNewCommand + ":" + "IX " + QString::number(myX); } - if(mySketchType == DIR_DXDY_Y) { + if ( mySketchType == DIR_DXDY_Y) + { myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY); myNewCommand = myNewCommand + ":" + "IY " + QString::number(myY); } } - else if(myConstructorId == 1) { // ARC - if(mySketchType == DIR_ANGLE_LENGTH) { + else if ( myConstructorId == 1 ) + { // ARC + if ( mySketchType == DIR_ANGLE_LENGTH) + { myNewCommand = myNewCommand + "R " + QString::number(myAngle); myNewCommand = myNewCommand + ":" + "C " + QString::number(myRadius) + " " + QString::number(myLength); } - if(mySketchType == DIR_PER_LENGTH) { + if ( mySketchType == DIR_PER_LENGTH) + { myNewCommand = myNewCommand + "R " + QString::number(90.0); myNewCommand = myNewCommand + ":" + "C " + QString::number(myRadius) + " " + QString::number(myLength); } - if(mySketchType == DIR_TAN_LENGTH) { + if ( mySketchType == DIR_TAN_LENGTH) + { myNewCommand = myNewCommand + "C " + QString::number(myRadius) + " " + QString::number(myLength); } - if(mySketchType == DIR_DXDY_LENGTH) { + if ( mySketchType == DIR_DXDY_LENGTH) + { myNewCommand = myNewCommand + "D " + QString::number(myDX) + " " + QString::number(myDY); myNewCommand = myNewCommand + ":" + "C " + QString::number(myRadius) + " " + QString::number(myLength); } @@ -1058,111 +1158,267 @@ QString EntityGUI_SketcherDlg::GetNewCommand() return myNewCommand; } - //================================================================================= -// function : MakeSimulationAndDisplay() +// function : createOperation // purpose : //================================================================================= -void EntityGUI_SketcherDlg::MakeSimulationAndDisplay() +GEOM::GEOM_IOperations_ptr EntityGUI_SketcherDlg::createOperation() { - myEntityGUI->EraseSimulationShape(); - mySimulationTopoDs1.Nullify(); - mySimulationTopoDs2.Nullify(); - - try { - if(mySketchState == FIRST_POINT) { - myCommand = "Sketch "; - myCommand = myCommand + ":" + "F " + QString::number(myX) + " " + QString::number(myY); - - myLastX1 = myX; - myLastY1 = myY; - - } + return getGeomEngine()->GetICurvesOperations( getStudyId() ); +} - Sketcher_Profile aProfile1 (myCommand.ascii()); +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool EntityGUI_SketcherDlg::isValid( QString& msg ) +{ + return true; +} - if(aProfile1.IsDone()) { - myShape = aProfile1.GetShape(); - mySimulationTopoDs1 = myShape; +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool EntityGUI_SketcherDlg::execute( ObjectList& objects ) +{ + if(mySketchState == FIRST_POINT) { + myLastX2 = myX; + myLastY2 = myY; + } + else { + //Test if the current point is the same as the last one + TopoDS_Shape myShape1, myShape2; + + //Last Shape + QString Command1 = myCommand.join( "" ); + Sketcher_Profile aProfile1 (Command1.ascii()); + if(aProfile1.IsDone()) + myShape1 = aProfile1.GetShape(); + + //Current Shape + QString Command2 = Command1 + GetNewCommand(); + Sketcher_Profile aProfile2 (Command2.ascii()); + if(aProfile2.IsDone()) + myShape2 = aProfile2.GetShape(); + + if(myShape2.IsNull()) { + //the current point is the same as the last one + myLastX2 = myLastX1; + myLastY2 = myLastY1; } - - if(mySketchState != FIRST_POINT) { - if(mySketchState == SECOND_POINT) { - gp_Pnt pt = BRep_Tool::Pnt(TopoDS::Vertex(myShape)); + else { + TopoDS_Vertex V1, V2; + gp_Pnt pt; + if(myShape1.ShapeType() == TopAbs_VERTEX) { + //the last shape is the first point + pt = BRep_Tool::Pnt(TopoDS::Vertex(myShape1)); myLastX1 = pt.X(); myLastY1 = pt.Y(); } else { - TopoDS_Vertex V1, V2; - TopExp::Vertices(TopoDS::Wire(myShape), V1, V2); - gp_Pnt pt = BRep_Tool::Pnt(V2); + TopExp::Vertices(TopoDS::Wire(myShape1), V1, V2); + pt = BRep_Tool::Pnt(V2); myLastX1 = pt.X(); myLastY1 = pt.Y(); - if(myLastOp == 1) { // ARC - myLastDir = aProfile1.GetLastDir(); - myLastX2 = myLastX1 - myLastDir.X(); - myLastY2 = myLastY1 - myLastDir.Y(); - } - } - QString myNewCommand = "Sketch "; - myNewCommand = myNewCommand + ":" + "F " + QString::number(myLastX1) + " " + QString::number(myLastY1); - if(mySketchState != SECOND_POINT && !((myLastX1 - myLastX2) == 0 && (myLastY1 - myLastY2) == 0)) - myNewCommand = myNewCommand + ":" + "D " + QString::number(myLastX1 - myLastX2) + " " + QString::number(myLastY1 - myLastY2); - myNewCommand = myNewCommand + this->GetNewCommand(); - Sketcher_Profile aProfile2 (myNewCommand.ascii()); - if(aProfile2.IsDone()) - mySimulationTopoDs2 = aProfile2.GetShape(); - - if ( mySimulationTopoDs2.IsNull() ) { - if ( Group1Sel->isVisible() ) { - Group1Sel->buttonApply->setEnabled(false); - Group1Sel->buttonApply->setFocus(); - } - if ( Group1Spin->isVisible() ) { - Group1Spin->buttonApply->setEnabled(false); - Group1Spin->buttonApply->setFocus(); - } - if ( Group2Spin->isVisible() ) { - Group2Spin->buttonApply->setEnabled(false); - Group2Spin->buttonApply->setFocus(); - } - if ( Group3Spin->isVisible() ) { - Group3Spin->buttonApply->setEnabled(false); - Group3Spin->buttonApply->setFocus(); - } - if ( Group4Spin->isVisible() ) { - Group4Spin->buttonApply->setEnabled(false); - Group4Spin->buttonApply->setFocus(); - } - } else { - if ( Group1Sel->isVisible() ) { - Group1Sel->buttonApply->setEnabled(true); - Group1Sel->buttonApply->setFocus(); - } - if ( Group1Spin->isVisible() ) { - Group1Spin->buttonApply->setEnabled(true); - Group1Spin->buttonApply->setFocus(); - } - if ( Group2Spin->isVisible() ) { - Group2Spin->buttonApply->setEnabled(true); - Group2Spin->buttonApply->setFocus(); - } - if ( Group3Spin->isVisible() ) { - Group3Spin->buttonApply->setEnabled(true); - Group3Spin->buttonApply->setFocus(); - } - if ( Group4Spin->isVisible() ) { - Group4Spin->buttonApply->setEnabled(true); - Group4Spin->buttonApply->setFocus(); - } } + TopExp::Vertices(TopoDS::Wire(myShape2), V1, V2); + pt = BRep_Tool::Pnt(V2); + myLastX2 = pt.X(); + myLastY2 = pt.Y(); } + } - myEntityGUI->DisplaySimulationShape(mySimulationTopoDs1, mySimulationTopoDs2); + QString cmd; + if( ( mySketchState != FIRST_POINT && myLastX1 == myLastX2 && myLastY1 == myLastY2 ) || myIsAllAdded ) { + cmd = myCommand.join( "" ); + + if ( Group1Sel->isVisible() ) { + Group1Sel->buttonApply->setEnabled(false); + Group1Sel->buttonApply->setFocus(); + } + if ( Group1Spin->isVisible() ) { + Group1Spin->buttonApply->setEnabled(false); + Group1Spin->buttonApply->setFocus(); + } + if ( Group2Spin->isVisible() ) { + Group2Spin->buttonApply->setEnabled(false); + Group2Spin->buttonApply->setFocus(); + } + if ( Group3Spin->isVisible() ) { + Group3Spin->buttonApply->setEnabled(false); + Group3Spin->buttonApply->setFocus(); + } + if ( Group4Spin->isVisible() ) { + Group4Spin->buttonApply->setEnabled(false); + Group4Spin->buttonApply->setFocus(); + } } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeSimulationAndDisplay"); + else { + cmd = myCommand.join( "" ) + GetNewCommand(); + + if ( Group1Sel->isVisible() ) { + Group1Sel->buttonApply->setEnabled(true); + Group1Sel->buttonApply->setFocus(); + } + if ( Group1Spin->isVisible() ) { + Group1Spin->buttonApply->setEnabled(true); + Group1Spin->buttonApply->setFocus(); + } + if ( Group2Spin->isVisible() ) { + Group2Spin->buttonApply->setEnabled(true); + Group2Spin->buttonApply->setFocus(); + } + if ( Group3Spin->isVisible() ) { + Group3Spin->buttonApply->setEnabled(true); + Group3Spin->buttonApply->setFocus(); + } + if ( Group4Spin->isVisible() ) { + Group4Spin->buttonApply->setEnabled(true); + Group4Spin->buttonApply->setFocus(); + } + } + + gp_Ax3 myWPlane = GeometryGUI::GetGeomGUI()->GetWorkingPlane(); + GEOM::ListOfDouble_var WPlane = new GEOM::ListOfDouble; + WPlane->length(9); + WPlane[0] = myWPlane.Location().X(); + WPlane[1] = myWPlane.Location().Y(); + WPlane[2] = myWPlane.Location().Z(); + + WPlane[3] = myWPlane.Direction().X(); + WPlane[4] = myWPlane.Direction().Y(); + WPlane[5] = myWPlane.Direction().Z(); + + WPlane[6] = myWPlane.XDirection().X(); + WPlane[7] = myWPlane.XDirection().Y(); + WPlane[8] = myWPlane.XDirection().Z(); + + GEOM::GEOM_Object_var anObj = GEOM::GEOM_ICurvesOperations::_narrow( getOperation() )->MakeSketcher( cmd.latin1(), WPlane ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + +//================================================================ +// Function : displayPreview +// Purpose : Method for displaying preview of resulting shape +// Redefined from GEOMBase_Helper. +//================================================================ +void EntityGUI_SketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object, + const bool append, + const bool activate, + const bool update, + const double lineWidth ) +{ + // Set color for preview shape + getDisplayer()->SetColor( Quantity_NOC_RED ); + + // set width of displayed shape + getDisplayer()->SetWidth( lineWidth ); + + // Disable activation of selection + getDisplayer()->SetToActivate( activate ); + + // Make a reference to GEOM_Object + getDisplayer()->SetName( GeometryGUI::GetORB()->object_to_string( object ) ); + + // Create wire from applayed object + TopoDS_Shape anApplyedWire, aLastSegment; + if ( !createShapes( object, anApplyedWire, aLastSegment ) ) return; + + // Build prs + SALOME_Prs* aPrs = getDisplayer()->BuildPrs( anApplyedWire ); + if ( aPrs != 0 && !aPrs->IsNull() ) + GEOMBase_Helper::displayPreview( aPrs, append, update ); + + getDisplayer()->SetColor( Quantity_NOC_VIOLET ); + aPrs = getDisplayer()->BuildPrs( aLastSegment ); + if ( aPrs != 0 && !aPrs->IsNull() ) + GEOMBase_Helper::displayPreview( aPrs, append, update ); + + getDisplayer()->UnsetName(); + + // Enable activation of displayed objects + getDisplayer()->SetToActivate( true ); +} + +//================================================================ +// Function : createShapes +// Purpose : Create applyed wire, and last segment from entry object +//================================================================ +bool EntityGUI_SketcherDlg::createShapes( GEOM::GEOM_Object_ptr theObject, + TopoDS_Shape& theApplyedWire, + TopoDS_Shape& theLastSegment ) +{ + TopoDS_Shape aShape; + if ( !GEOMBase::GetShape( theObject, aShape ) || + aShape.ShapeType() != TopAbs_WIRE && aShape.ShapeType() != TopAbs_VERTEX ) + return false; + + if ( Group1Sel->isVisible() && !Group1Sel->buttonApply->isEnabled() || + Group1Spin->isVisible() && !Group1Spin->buttonApply->isEnabled() || + Group2Spin->isVisible() && !Group2Spin->buttonApply->isEnabled() || + Group3Spin->isVisible() && !Group3Spin->buttonApply->isEnabled() || + Group4Spin->isVisible() && !Group4Spin->buttonApply->isEnabled() ) + { + theApplyedWire = aShape; + return true; } - return; + + BRepBuilderAPI_MakeWire aBuilder; + TopExp_Explorer anExp( aShape, TopAbs_EDGE ); + while( 1 ) + { + TopoDS_Shape anEdge = anExp.Current(); + anExp.Next(); + if ( anExp.More() ) // i.e. non-last edge + aBuilder.Add( TopoDS::Edge( anEdge ) ); + else + { + theLastSegment = anEdge; + break; + } + } + + if ( aBuilder.IsDone() ) + theApplyedWire = aBuilder.Shape(); + + return true; } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/EntityGUI/EntityGUI_SketcherDlg.h b/src/EntityGUI/EntityGUI_SketcherDlg.h index 2da62fe81..d7c287d79 100644 --- a/src/EntityGUI/EntityGUI_SketcherDlg.h +++ b/src/EntityGUI/EntityGUI_SketcherDlg.h @@ -29,6 +29,8 @@ #ifndef ENTITYGUI_SKETCHERDLG_H #define ENTITYGUI_SKETCHERDLG_H +#include "GEOMBase_Helper.h" + #include "EntityGUI_Skeleton_QTD.h" #include "EntityGUI_Point_QTD.h" #include "EntityGUI_Dir1_QTD.h" @@ -41,6 +43,7 @@ #include "EntityGUI_4Spin.h" #include "EntityGUI.h" +#include "GeometryGUI.h" #include "GEOM_ShapeTypeFilter.hxx" @@ -57,56 +60,48 @@ // class : EntityGUI_Dlg // purpose : //================================================================================= -class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD +class EntityGUI_SketcherDlg : public EntityGUI_Skeleton_QTD, public GEOMBase_Helper { Q_OBJECT public: - EntityGUI_SketcherDlg(QWidget* parent = 0, const char* name = 0, EntityGUI* theEntityGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + EntityGUI_SketcherDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~EntityGUI_SketcherDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); void InitClick(); - void MakeSimulationAndDisplay(); - QString GetNewCommand(); + void setEnabledUndo(bool value); + void setEnabledRedo(bool value); - EntityGUI* myEntityGUI; + QString GetNewCommand(); - double step; int myConstructorId; int myConstructorDirId; int mySketchType; int mySketchState; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - TopoDS_Shape mySimulationTopoDs1; /* Shape used for simulation display */ - TopoDS_Shape mySimulationTopoDs2; /* Shape used for simulation display */ + bool myIsAllAdded; + QLineEdit* myEditCurrentArgument; /* Current LineEdit */ SALOME_Selection* mySelection; /* User shape selection */ - GEOM::GEOM_Gen_var myGeom; /* Current GeomI object */ - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; /* Current GeomGUI object */ - - int myLastOp; - QString myCommand; - QString myLastCommand; - TopoDS_Shape myShape; - gp_Dir myLastDir; - - Standard_Real myX; - Standard_Real myY; - Standard_Real myDX; - Standard_Real myDY; - Standard_Real myLastX1; - Standard_Real myLastY1; - Standard_Real myLastX2; - Standard_Real myLastY2; - Standard_Real myLength; - Standard_Real myAngle; - Standard_Real myRadius; + + QStringList myCommand; + QStringList myUndoCommand; + + Standard_Real myX, myY, myDX, myDY; + Standard_Real myLength, myAngle, myRadius; + Standard_Real myLastX1, myLastY1; + Standard_Real myLastX2, myLastY2; EntityGUI_Point_QTD* GroupPt; EntityGUI_Dir1_QTD* GroupD1; @@ -118,7 +113,7 @@ private : EntityGUI_3Spin* Group3Spin; EntityGUI_4Spin* Group4Spin; - enum SketchState {FIRST_POINT, SECOND_POINT, NEXT_POINT}; + enum SketchState {FIRST_POINT, NEXT_POINT}; enum SketchType {PT_ABS, PT_RELATIVE, PT_SEL, DIR_ANGLE_LENGTH, DIR_ANGLE_X, DIR_ANGLE_Y, @@ -126,12 +121,21 @@ private : DIR_TAN_LENGTH, DIR_TAN_X, DIR_TAN_Y, DIR_DXDY_LENGTH, DIR_DXDY_X, DIR_DXDY_Y}; + virtual void displayPreview ( GEOM::GEOM_Object_ptr obj, + const bool append = false, + const bool activate = false, + const bool update = true, + const double lineWidth = -1 ); + + bool createShapes( GEOM::GEOM_Object_ptr theObject, + TopoDS_Shape& theApplyedWire, + TopoDS_Shape& theLastSegment ); private slots: void ClickOnEnd(); - void ClickOnClose(); void ClickOnCancel(); - void ClickOnApply(); + bool ClickOnApply(); void ClickOnUndo(); + void ClickOnRedo(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index b782a2bd2..ff6304c63 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -26,27 +26,29 @@ // Module : GEOM // $Header$ -using namespace std; #include "EntityGUI_SubShapeDlg.h" +#include "GEOM_Displayer.h" -#include "DisplayGUI.h" #include "QAD_RightFrame.h" -#include "OCCViewer_Viewer3d.h" +#include "QAD_Desktop.h" +#include "SALOME_ListIteratorOfListIO.hxx" +#include +#include #include #include #include //================================================================================= -// class : EntityGUI_SubShapeDlg() +// class : EntityGUI_SubShapeDlg // purpose : Constructs a EntityGUI_SubShapeDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(QWidget* parent, const char* name, EntityGUI* theEntityGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, fl) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUBSHAPE"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); @@ -65,13 +67,12 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(QWidget* parent, const char* name, GroupPoints->TextLabel2->setText(tr("GEOM_SUBSHAPE_TYPE")); GroupPoints->CheckButton1->setText(tr("GEOM_SUBSHAPE_SELECT")); GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); Layout1->addWidget(GroupPoints, 1, 0); /***************************************************************/ - /* Initialisations */ - myEntityGUI = theEntityGUI; - Init(ic); + Init(); } @@ -81,7 +82,6 @@ EntityGUI_SubShapeDlg::EntityGUI_SubShapeDlg(QWidget* parent, const char* name, //================================================================================= EntityGUI_SubShapeDlg::~EntityGUI_SubShapeDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -89,15 +89,13 @@ EntityGUI_SubShapeDlg::~EntityGUI_SubShapeDlg() // function : Init() // purpose : //================================================================================= -void EntityGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic) +void EntityGUI_SubShapeDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + myObject = GEOM::GEOM_Object::_nil(); myWithShape = true; - myAbort = myOkShape = myUseLocalContext = false; - myIC = ic; - myLocalContextId = -1; /* type for sub shape selection */ GroupPoints->ComboBox1->insertItem("Compound"); @@ -110,9 +108,6 @@ void EntityGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic) GroupPoints->ComboBox1->insertItem("Vertex"); GroupPoints->ComboBox1->insertItem("Shape"); - myShapeType = GroupPoints->ComboBox1->currentItem(); - myOkSelectSubMode = GroupPoints->CheckButton1->isChecked(); - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) GroupPoints->CheckButton1->setEnabled(false); @@ -128,15 +123,13 @@ void EntityGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic) connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(AllOrNotAll())); + connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(SubShapeToggled())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); + updateButtonState(); - return; + SelectionIntoArgument(); } @@ -146,15 +139,8 @@ void EntityGUI_SubShapeDlg::Init(Handle(AIS_InteractiveContext) ic) //================================================================================= void EntityGUI_SubShapeDlg::ClickOnOk() { - this->ClickOnApply(); - - /* User has aborted or not operation of explode all with many sub shapes */ - if(myAbort == false) - this->ClickOnCancel(); - else - myAbort = false; - - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -162,65 +148,26 @@ void EntityGUI_SubShapeDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void EntityGUI_SubShapeDlg::ClickOnApply() +bool EntityGUI_SubShapeDlg::ClickOnApply() { QAD_Application::getDesktop()->putInfo(tr("")); - bool testResult = false; - myAbort = false; /* Not aborted by default */ /* Explode all sub shapes */ - if(myOkShape && !myOkSelectSubMode) { + if( isAllSubShapes() ) { /* More than 30 subshapes : ask confirmation */ - unsigned int nb = NumberOfSubShapes(myShape, myShapeType); + unsigned int nb = NumberOfSubShapes(myShape, shapeType()); if(nb > 30) { const QString caption = tr("GEOM_CONFIRM"); const QString text = tr("GEOM_CONFIRM_INFO").arg(nb); const QString button0 = tr("GEOM_BUT_EXPLODE"); const QString button1 = tr("GEOM_BUT_CANCEL"); - - if(QMessageBox::warning(this, caption, text, button0, button1) == 0) - testResult = myEntityGUI->OnSubShapeGetAll(myShape, myShapeIOR, myShapeType); - else - myAbort = true; /* aborted */ - } - else - testResult = myEntityGUI->OnSubShapeGetAll(myShape, myShapeIOR, myShapeType); - } - /* explode only selected sub shapes */ - else if(myOkShape && myOkSelectSubMode) - testResult = myEntityGUI->OnSubShapeGetSelected(myShape, myShapeIOR, myShapeType, myLocalContextId, myUseLocalContext); - if(!testResult) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - myAbort = true; - } - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - - /* Reset all arguments and local context to allow user a new selection ...*/ - //this->ResetStateOfDialog(); - return; -} - - -//================================================================================= -// function : ClickOnCancel() -// purpose : -//================================================================================= -void EntityGUI_SubShapeDlg::ClickOnCancel() -{ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; + if(QMessageBox::warning(this, caption, text, button0, button1) != 0) + return false; /* aborted */ } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); } - GEOMBase_Skeleton::ClickOnCancel(); - return; + + return onAccept(); } @@ -231,98 +178,107 @@ void EntityGUI_SubShapeDlg::ClickOnCancel() //================================================================================= void EntityGUI_SubShapeDlg::SelectionIntoArgument() { - myEditCurrentArgument->setText(""); - this->ResetStateOfDialog(); + if ( !isAllSubShapes() ) + return; + + ResetStateOfDialog(); + QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - myOkShape = false; + int nbSel = GEOMBase::GetNameOfSelectedIObjects( mySelection, aString, true ); + if( nbSel != 1 ) return; - } - - /* nbSel == 1 */ + TopoDS_Shape S; Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + if ( !IO->hasEntry() ) + { + QAD_Application::getDesktop()->putInfo( tr( "GEOM_PRP_SHAPE_IN_STUDY" ) ); + updateButtonState(); return; - - if(!IO->hasEntry()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); + } + + if ( !myGeomBase->GetTopoFromSelection( mySelection, S ) || + S.IsNull() || + S.ShapeType() == TopAbs_VERTEX ) + { + updateButtonState(); return; } - if(!S.IsNull() && S.ShapeType() != TopAbs_VERTEX) { - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast( IO ); - myShapeIOR = GIObject->getIOR(); /* the Geom IOR string of selection */ - myEditCurrentArgument->setText(aString); - myShape = S; - myOkShape = true; - } - else { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - myShapeIOR = anIOR->Value(); - myOkShape = true; - myShape = S; - GroupPoints->LineEdit1->setText(aString); - } - } - } - - int SelectedShapeType = GroupPoints->ComboBox1->currentItem(); - int count = GroupPoints->ComboBox1->count(); - if(myWithShape) - count = count - 1; + Standard_Boolean testResult; + myObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult ); + if ( !testResult || myObject->_is_nil() ) + { + updateButtonState(); + return; + } + + myShape = S; + GroupPoints->LineEdit1->setText( aString ); + + + int SelectedShapeType = GroupPoints->ComboBox1->currentItem(); + int count = GroupPoints->ComboBox1->count(); + + if ( myWithShape ) + count = count - 1; - int i = 0; - while(i <= myShape.ShapeType()) { - GroupPoints->ComboBox1->removeItem(0); + int i = 0; + // Solving PAL5590 + if ( myShape.ShapeType() == TopAbs_COMPOUND ) { + unsigned int nb = NumberOfSubShapes(myShape, TopAbs_COMPOUND); + if (nb > 0) i++; - } + } + while ( i <= myShape.ShapeType()) + { + GroupPoints->ComboBox1->removeItem( 0 ); + i++; + } - if(myShape.ShapeType()==TopAbs_COMPOUND) { - if(myWithShape == false) { - GroupPoints->ComboBox1->insertItem("Shape"); - myWithShape = true; - } + if ( myShape.ShapeType() == TopAbs_COMPOUND ) + { + if ( myWithShape == false ) + { + GroupPoints->ComboBox1->insertItem( "Shape" ); + myWithShape = true; } - else { - if(myWithShape == true) { - GroupPoints->ComboBox1->removeItem(GroupPoints->ComboBox1->count() - 1); - myWithShape = false; - } + } + else + { + if ( myWithShape == true ) + { + GroupPoints->ComboBox1->removeItem( GroupPoints->ComboBox1->count() - 1 ); + myWithShape = false; } - - int count1 = GroupPoints->ComboBox1->count(); - if(myWithShape) - count1 = count1 - 1; - - if(SelectedShapeType > myShape.ShapeType()) { - if(SelectedShapeType == 8) { - if(myShape.ShapeType() != TopAbs_COMPOUND) { - GroupPoints->ComboBox1->setCurrentItem(0); - myShapeType = 8 - count1; - } - } - else { - GroupPoints->ComboBox1->setCurrentItem(count1 - count + SelectedShapeType); - myShapeType = 8 - count1 + GroupPoints->ComboBox1->currentItem(); + } + + int count1 = GroupPoints->ComboBox1->count(); + if ( myWithShape ) + count1 = count1 - 1; + + if ( SelectedShapeType > myShape.ShapeType() ) + { + if ( SelectedShapeType == 8 ) + { + if ( myShape.ShapeType() != TopAbs_COMPOUND ) + { + GroupPoints->ComboBox1->setCurrentItem( 0 ); + ComboTextChanged(); } - } - else { - GroupPoints->ComboBox1->setCurrentItem(0); - myShapeType = 8 - count1; - } + } + else + GroupPoints->ComboBox1->setCurrentItem(count1 - count + SelectedShapeType); + } + else + { + GroupPoints->ComboBox1->setCurrentItem( 0 ); + ComboTextChanged(); } - return; + + updateButtonState(); } @@ -332,15 +288,12 @@ void EntityGUI_SubShapeDlg::SelectionIntoArgument() //================================================================================= void EntityGUI_SubShapeDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - this->SelectionIntoArgument(); - - return; + GroupPoints->LineEdit1->setFocus(); + myEditCurrentArgument = GroupPoints->LineEdit1; + + GroupPoints->CheckButton1->setChecked( FALSE ); + SubShapeToggled(); + SelectionIntoArgument(); } @@ -352,12 +305,11 @@ void EntityGUI_SubShapeDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; + SetEditCurrentArgument(); else return; GEOMBase_Skeleton::LineEditReturnPressed(); - return; } @@ -368,10 +320,8 @@ void EntityGUI_SubShapeDlg::LineEditReturnPressed() void EntityGUI_SubShapeDlg::DeactivateActiveDialog() { if(GroupConstructors->isEnabled()) { - this->ResetStateOfDialog(); GEOMBase_Skeleton::DeactivateActiveDialog(); } - return; } @@ -383,11 +333,8 @@ void EntityGUI_SubShapeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) - GroupPoints->CheckButton1->setEnabled(true); - else - GroupPoints->CheckButton1->setEnabled(false); - return; + SubShapeToggled(); + updateButtonState(); } @@ -399,37 +346,22 @@ void EntityGUI_SubShapeDlg::enterEvent(QEvent* e) { if(GroupConstructors->isEnabled()) return; - this->ActivateThisDialog(); - return; -} - - -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void EntityGUI_SubShapeDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - this->ClickOnCancel(); - return; + ActivateThisDialog(); } - //================================================================================= // function : ResetStateOfDialog() // purpose : Completely reset the state of method including local context //================================================================================= void EntityGUI_SubShapeDlg::ResetStateOfDialog() { - if(myAbort == true) { - myOkShape = false; - myEditCurrentArgument->setText(""); - } + myObject = GEOM::GEOM_Object::_nil(); + myShape.Nullify(); + myEditCurrentArgument->setText(""); int SelectedShapeType = GroupPoints->ComboBox1->currentItem(); int count = GroupPoints->ComboBox1->count(); - if(myWithShape) + if ( myWithShape ) count = count - 1; /* type for sub shape selection */ @@ -443,130 +375,210 @@ void EntityGUI_SubShapeDlg::ResetStateOfDialog() GroupPoints->ComboBox1->insertItem("Edge"); GroupPoints->ComboBox1->insertItem("Vertex"); GroupPoints->ComboBox1->insertItem("Shape"); - myWithShape=true; - GroupPoints->ComboBox1->setCurrentItem(8 - count + SelectedShapeType); - myOkSelectSubMode = false; - - /* unpress buttons : due to abort box*/ - buttonApply->setDown(FALSE); - buttonOk->setDown(FALSE); - GroupPoints->CheckButton1->setChecked(FALSE); - - /* Close its local contact if opened */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } - return; + + myWithShape = true; + + GroupPoints->ComboBox1->setCurrentItem( 8 - count + SelectedShapeType ); + ComboTextChanged(); + + updateButtonState(); } //================================================================================= -// function : AllOrNotAll() +// function : SubShapeToggled() // purpose : Allow user selection of all or only selected sub shapes // : Called when 'CheckButton1' state change //================================================================================= -void EntityGUI_SubShapeDlg::AllOrNotAll() +void EntityGUI_SubShapeDlg::SubShapeToggled() { - /* No sub shape selection if main shape not selected */ - if(!myOkShape) { - this->ResetStateOfDialog(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_FIRST")); - return; - } - - if(myShapeType ==TopAbs_SHAPE && myShape.ShapeType()==TopAbs_COMPOUND) { - /* Select sub shapes mode not checked */ - myOkSelectSubMode = false; - GroupPoints->CheckButton1->setChecked( FALSE ); - //no meaning to allow user selection for type = shape - //TODO - add another message - //QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_FIRST")) ; - return; - } + if ( isAllSubShapes() ) + globalSelection( GEOM_ALLSHAPES ); + else + localSelection( myObject, shapeType() ); +} - myOkSelectSubMode = GroupPoints->CheckButton1->isChecked(); - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); +//================================================================================= +// function : ComboTextChanged() +// purpose : +//================================================================================= +void EntityGUI_SubShapeDlg::ComboTextChanged() +{ + /* Select sub shapes mode not checked */ + updateButtonState(); + SubShapeToggled(); +} + - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; +//================================================================================= +// function : NumberOfSubShapes() +// purpose : +//================================================================================= +unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes (const TopoDS_Shape& S, + const int shapeType) const +{ + if (S.IsNull()) + return 0; + + unsigned int index = 0; + TopTools_MapOfShape M; + + if (S.ShapeType() == TopAbs_COMPOUND && + (TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE || + TopAbs_ShapeEnum(shapeType) == TopAbs_COMPSOLID || + TopAbs_ShapeEnum(shapeType) == TopAbs_COMPOUND)) { + TopoDS_Iterator It (S, Standard_True, Standard_True); + for (; It.More(); It.Next()) { + if (M.Add(It.Value())) { + if (TopAbs_ShapeEnum(shapeType) == TopAbs_SHAPE || + TopAbs_ShapeEnum(shapeType) == It.Value().ShapeType()) { + index++; + } + } + } + } else { + TopExp_Explorer Exp (S, TopAbs_ShapeEnum(shapeType)); + for (; Exp.More(); Exp.Next()) { + if (M.Add(Exp.Current())) { + index++; + } } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } - else { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NOT_FOR_VTK_VIEWER")); - return; } - if(myOkShape && myOkSelectSubMode) { - /* local context is defined into the method */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelection(myShapeType, myLocalContextId); - myUseLocalContext = true; - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_FACE")); + M.Clear(); + return index; +} + +//================================================================================= +// function : updateButtonState +// purpose : +//================================================================================= +void EntityGUI_SubShapeDlg::updateButtonState() +{ + if ( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC || + myObject->_is_nil() || shapeType() == TopAbs_SHAPE || shapeType() == TopAbs_COMPOUND ) { + GroupPoints->CheckButton1->setChecked( FALSE ); + GroupPoints->CheckButton1->setEnabled( FALSE ); } - return; + else + GroupPoints->CheckButton1->setEnabled( TRUE ); } +//================================================================================= +// function : isAllSubShapes +// purpose : +//================================================================================= +bool EntityGUI_SubShapeDlg::isAllSubShapes() const +{ + return !GroupPoints->CheckButton1->isChecked() || !GroupPoints->CheckButton1->isEnabled(); +} //================================================================================= -// function : ComboTextChanged() -// purpose : +// function : shapeType +// purpose : //================================================================================= -void EntityGUI_SubShapeDlg::ComboTextChanged() +int EntityGUI_SubShapeDlg::shapeType() const { - if(myOkShape) - myShapeType = GroupPoints->ComboBox1->currentItem() + myShape.ShapeType() + 1; - else - myShapeType = GroupPoints->ComboBox1->currentItem(); + int type = GroupPoints->ComboBox1->currentItem(); - /* Select sub shapes mode not checked */ - GroupPoints->CheckButton1->setChecked(FALSE); - myOkSelectSubMode = FALSE; + if (myObject->_is_nil()) + return type; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); + // Solving PAL5590 + type += myShape.ShapeType() + 1; + if (myShape.ShapeType() == TopAbs_COMPOUND && + NumberOfSubShapes(myShape, TopAbs_COMPOUND) > 0) { + type--; + } + + return type; +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr EntityGUI_SubShapeDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool EntityGUI_SubShapeDlg::isValid( QString& msg ) +{ + bool isOk = false; + if ( !myObject->_is_nil() ) { + if ( isAllSubShapes() ) + isOk = true; + else if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) { + TColStd_IndexedMapOfInteger aMapIndex; + mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); + isOk = aMapIndex.Extent() > 0; + if ( !isOk ) + msg += tr( "NO_SUBSHAPES_SELECTED" ); + } } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); } - return; + return isOk; } - //================================================================================= -// function : NumberOfSubShapes() +// function : execute // purpose : //================================================================================= -unsigned int EntityGUI_SubShapeDlg::NumberOfSubShapes(const TopoDS_Shape& S, const int shapeType) +bool EntityGUI_SubShapeDlg::execute( ObjectList& objects ) { - if(S.IsNull()) - return 0; + GEOM::ListOfGO_var aList = GEOM::GEOM_IShapesOperations::_narrow( + getOperation() )->MakeExplode( myObject, shapeType(), false ); + + if ( !aList->length() ) + return false; - unsigned int index = 0; - TopExp_Explorer Exp(S, TopAbs_ShapeEnum(shapeType)); - TopTools_MapOfShape M; - while(Exp.More()) { - if(M.Add(Exp.Current())) - index++; - Exp.Next(); + // Throw away sub-shapes not selected by user if not in preview mode + // and manual selection is active + if ( !isAllSubShapes() ) + { + if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) { + TColStd_IndexedMapOfInteger aMapIndex; + mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); + + GEOM::GEOM_ILocalOperations_var aLocOp = + getGeomEngine()->GetILocalOperations( getStudyId() ); + + for ( int i = 0, n = aList->length(); i < n; i++ ) + if ( aMapIndex.Contains( aLocOp->GetSubShapeIndex( myObject, aList[i] ) ) ) + objects.push_back( GEOM::GEOM_Object::_duplicate( aList[i] ) ); + } + } } - M.Clear(); - return index; + else + for ( int i = 0, n = aList->length(); i < n; i++ ) + objects.push_back( GEOM::GEOM_Object::_duplicate( aList[i] ) ); + + return objects.size(); } + +//================================================================ +// Function : getFather +// Purpose : Get father object for object to be added in study +// ( called with addInStudy method ) +//================================================================ +GEOM::GEOM_Object_ptr EntityGUI_SubShapeDlg::getFather( GEOM::GEOM_Object_ptr ) +{ + return myObject; +} + diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.h b/src/EntityGUI/EntityGUI_SubShapeDlg.h index cd85ce051..3baba6c6c 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.h +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.h @@ -32,7 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Check1List_QTD.h" -#include "EntityGUI.h" //================================================================================= // class : EntityGUI_SubShapeDlg @@ -43,47 +42,52 @@ class EntityGUI_SubShapeDlg : public GEOMBase_Skeleton Q_OBJECT public: - EntityGUI_SubShapeDlg(QWidget* parent = 0, const char* name = 0, EntityGUI* theEntityGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0); - ~EntityGUI_SubShapeDlg(); + EntityGUI_SubShapeDlg( QWidget* parent = 0, + const char* name = 0, + SALOME_Selection* Sel = 0, + bool modal = FALSE, + WFlags fl = 0 ); + ~EntityGUI_SubShapeDlg(); -private : - void Init(Handle(AIS_InteractiveContext) ic); - void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj ); - void ResetStateOfDialog(); - unsigned int NumberOfSubShapes(const TopoDS_Shape& S, const int shapeType); +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void SubShapeToggled(); + void ComboTextChanged(); - EntityGUI* myEntityGUI; +private : + void Init(); + void enterEvent( QEvent* e ); - /* Interactive and local context management see also : bool myUseLocalContext() */ - Handle(AIS_InteractiveContext) myIC; /* Interactive context */ - Standard_Integer myLocalContextId; /* identify a local context used by this method */ - bool myUseLocalContext; /* true when this method as opened a local context */ + void ResetStateOfDialog(); + unsigned int NumberOfSubShapes (const TopoDS_Shape& S, + const int shapeType) const; - TopoDS_Shape myShape; - bool myOkShape; - char* myShapeIOR; - int myShapeType; + void updateButtonState(); + bool isAllSubShapes() const; + int shapeType() const; - bool myWithShape; /* check if Shape item exists */ - bool myOkSelectSubMode; /* true = sub mode selection activated */ - bool myAbort; /* Indicate if sub Shape All has been aborted by user */ - - DlgRef_1Sel1Check1List_QTD* GroupPoints; +private: -private slots: - void ClickOnOk(); - void ClickOnApply(); - void ClickOnCancel(); - void ActivateThisDialog(); - void DeactivateActiveDialog(); - void LineEditReturnPressed(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void AllOrNotAll(); - void ComboTextChanged(); + TopoDS_Shape myShape; + GEOM::GEOM_Object_var myObject; + bool myWithShape; + + DlgRef_1Sel1Check1List_QTD* GroupPoints; + ObjectList myResult; }; #endif // DIALOGBOX_SUBSHAPE_H diff --git a/src/EntityGUI/Makefile.in b/src/EntityGUI/Makefile.in index 2f22e88c2..2fd741ec5 100644 --- a/src/EntityGUI/Makefile.in +++ b/src/EntityGUI/Makefile.in @@ -58,7 +58,6 @@ LIB_SRC = EntityGUI.cxx \ EntityGUI_SubShapeDlg.cxx LIB_MOC = \ - EntityGUI.h \ EntityGUI_Skeleton_QTD.h \ EntityGUI_Point_QTD.h \ EntityGUI_Dir1_QTD.h \ @@ -75,15 +74,15 @@ LIB_MOC = \ EntityGUI_SketcherDlg.h \ EntityGUI_SubShapeDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file CPPFLAGS += $(QT_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lGEOMFiltersSelection -lDisplayGUI -lGEOMSketcher +LDFLAGS += -lGEOMFiltersSelection -lGEOMSketcher -lGEOMBase -lGEOMGUI @CONCLUDE@ diff --git a/src/EntityGUI/UIFiles/EntityGUI_1Sel_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_1Sel_QTD.ui new file mode 100644 index 000000000..c88df1ae6 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_1Sel_QTD.ui @@ -0,0 +1,218 @@ + +EntityGUI_1Sel_QTD + + + EntityGUI_1Sel_QTD + + + + 0 + 0 + 329 + 112 + + + + EntityGUI_1Sel_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + Values + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 163 + + + + + + buttonApply + + + Create + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + buttonRedo + + + Redo + + + + + buttonUndo + + + Undo + + + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 180 + + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + LineEdit1 + + + + 3 + 0 + 0 + 0 + + + + + + + + + + + + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_1Spin_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_1Spin_QTD.ui new file mode 100644 index 000000000..e1d0a7151 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_1Spin_QTD.ui @@ -0,0 +1,201 @@ + +EntityGUI_1Spin_QTD + + + EntityGUI_1Spin_QTD + + + + 0 + 0 + 255 + 112 + + + + EntityGUI_1Spin_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + Values + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + SpinBox1 + + + + 7 + 0 + 0 + 0 + + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 82 + + + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + buttonRedo + + + Redo + + + + + buttonUndo + + + Undo + + + + + + + buttonApply + + + Create + + + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 40 + + + + + + + + + + + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_2Spin_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_2Spin_QTD.ui new file mode 100644 index 000000000..938383c07 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_2Spin_QTD.ui @@ -0,0 +1,230 @@ + +EntityGUI_2Spin_QTD + + + EntityGUI_2Spin_QTD + + + + 0 + 0 + 255 + 112 + + + + EntityGUI_2Spin_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + Values + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + SpinBox1 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox2 + + + + 7 + 0 + 0 + 0 + + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 82 + + + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 51 + + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + buttonUndo + + + Undo + + + + + buttonRedo + + + Redo + + + + + + + buttonApply + + + Create + + + + + + + + + + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_3Spin_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_3Spin_QTD.ui new file mode 100644 index 000000000..c094d5791 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_3Spin_QTD.ui @@ -0,0 +1,259 @@ + +EntityGUI_3Spin_QTD + + + EntityGUI_3Spin_QTD + + + + 0 + 0 + 255 + 125 + + + + EntityGUI_3Spin_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + Values + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + buttonApply + + + Create + + + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 121 + + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + buttonUndo + + + Undo + + + + + buttonRedo + + + Redo + + + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + SpinBox1 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox2 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 82 + + + + + + SpinBox3 + + + + 7 + 0 + 0 + 0 + + + + + + + + + + + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_4Spin_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_4Spin_QTD.ui new file mode 100644 index 000000000..956ce0d1b --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_4Spin_QTD.ui @@ -0,0 +1,288 @@ + +EntityGUI_4Spin_QTD + + + EntityGUI_4Spin_QTD + + + + 0 + 0 + 255 + 154 + + + + EntityGUI_4Spin_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + Values + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + buttonRedo + + + Redo + + + + + buttonUndo + + + Undo + + + + + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 45 + + + + + + buttonApply + + + Create + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + SpinBox3 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox2 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 0 + 70 + + + + + + SpinBox4 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + SpinBox1 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + + + + + + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_Dir1_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Dir1_QTD.ui new file mode 100644 index 000000000..59f644641 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_Dir1_QTD.ui @@ -0,0 +1,112 @@ + +EntityGUI_Dir1_QTD + + + EntityGUI_Dir1_QTD + + + + 0 + 0 + 131 + 123 + + + + EntityGUI_Dir1_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupDir1 + + + + 7 + 0 + 0 + 0 + + + + Direction + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + RB_Dir12 + + + Perpendicular + + + + + RB_Dir13 + + + Tangent + + + + + RB_Dir11 + + + Angle + + + + + RB_Dir14 + + + VX-VY + + + + + + + + + + RB_Dir11 + RB_Dir12 + RB_Dir13 + RB_Dir14 + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_Dir2_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Dir2_QTD.ui new file mode 100644 index 000000000..617d3c3f6 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_Dir2_QTD.ui @@ -0,0 +1,120 @@ + +EntityGUI_Dir2_QTD + + + EntityGUI_Dir2_QTD + + + + 0 + 0 + 124 + 106 + + + + EntityGUI_Dir2_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupDir2 + + + + 7 + 7 + 0 + 0 + + + + Direction + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + RB_Dir22 + + + X + + + + + RB_Dir23 + + + Y + + + + + Spacer4 + + + Vertical + + + Expanding + + + + 0 + 20 + + + + + + RB_Dir21 + + + Length + + + + + + + + + + RB_Dir21 + RB_Dir22 + RB_Dir23 + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_Point_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Point_QTD.ui new file mode 100644 index 000000000..8e0bd22ad --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_Point_QTD.ui @@ -0,0 +1,103 @@ + +EntityGUI_Point_QTD + + + EntityGUI_Point_QTD + + + + 0 + 0 + 124 + 106 + + + + EntityGUI_Point_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupPoint + + + + 7 + 0 + 0 + 0 + + + + Point + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + RB_Point2 + + + Relative + + + + + RB_Point1 + + + Absolute + + + + + RB_Point3 + + + Selection + + + + + + + + + + RB_Point1 + RB_Point2 + RB_Point3 + + + diff --git a/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui new file mode 100644 index 000000000..1a27ca107 --- /dev/null +++ b/src/EntityGUI/UIFiles/EntityGUI_Skeleton_QTD.ui @@ -0,0 +1,379 @@ + +EntityGUI_Skeleton_QTD + + + EntityGUI_Skeleton_QTD + + + + 0 + 0 + 317 + 276 + + + + + 5 + 7 + 0 + 0 + + + + EntityGUI_Skeleton_QTD + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + GroupVal + + + + 7 + 7 + 0 + 0 + + + + + + + + + GroupConstructors + + + + 5 + 0 + 0 + 0 + + + + Element Type + + + + unnamed + + + 11 + + + 6 + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + RadioButton1 + + + Segment + + + + + RadioButton2 + + + Arc + + + + + + + + + GroupDest + + + + 7 + 0 + 0 + 0 + + + + Destination + + + + unnamed + + + 11 + + + 6 + + + + Layout5 + + + + unnamed + + + 0 + + + 6 + + + + GroupDest1 + + + + 7 + 0 + 0 + 0 + + + + Type + + + + unnamed + + + 11 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + RB_Dest2 + + + Direction + + + + + RB_Dest1 + + + Point + + + + + + + + + GroupDest2 + + + + 7 + 7 + 0 + 0 + + + + + + + + unnamed + + + 11 + + + 6 + + + + + + GroupDest3 + + + + 7 + 7 + 0 + 0 + + + + + + + + unnamed + + + 11 + + + 6 + + + + + + + + + + GroupButtons + + + + 7 + 0 + 0 + 0 + + + + + + + + unnamed + + + 11 + + + 6 + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + buttonEnd + + + End Sketch + + + + + buttonClose + + + Close Sketch + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 91 + 0 + + + + + + buttonCancel + + + &Cancel + + + + + + + + + + + + RadioButton1 + RadioButton2 + RB_Dest1 + RB_Dest2 + buttonEnd + buttonClose + buttonCancel + + + diff --git a/src/EntityGUI/UIFiles/ui_to_cxx b/src/EntityGUI/UIFiles/ui_to_cxx new file mode 100755 index 000000000..e370f446a --- /dev/null +++ b/src/EntityGUI/UIFiles/ui_to_cxx @@ -0,0 +1,28 @@ +#!/bin/sh + +uic -o EntityGUI_Skeleton_QTD.h EntityGUI_Skeleton_QTD.ui +uic -o EntityGUI_Skeleton_QTD.cxx -impl EntityGUI_Skeleton_QTD.h EntityGUI_Skeleton_QTD.ui + +uic -o EntityGUI_Point_QTD.h EntityGUI_Point_QTD.ui +uic -o EntityGUI_Point_QTD.cxx -impl EntityGUI_Point_QTD.h EntityGUI_Point_QTD.ui + +uic -o EntityGUI_Dir1_QTD.h EntityGUI_Dir1_QTD.ui +uic -o EntityGUI_Dir1_QTD.cxx -impl EntityGUI_Dir1_QTD.h EntityGUI_Dir1_QTD.ui + +uic -o EntityGUI_Dir2_QTD.h EntityGUI_Dir2_QTD.ui +uic -o EntityGUI_Dir2_QTD.cxx -impl EntityGUI_Dir2_QTD.h EntityGUI_Dir2_QTD.ui + +uic -o EntityGUI_1Spin_QTD.h EntityGUI_1Spin_QTD.ui +uic -o EntityGUI_1Spin_QTD.cxx -impl EntityGUI_1Spin_QTD.h EntityGUI_1Spin_QTD.ui + +uic -o EntityGUI_2Spin_QTD.h EntityGUI_2Spin_QTD.ui +uic -o EntityGUI_2Spin_QTD.cxx -impl EntityGUI_2Spin_QTD.h EntityGUI_2Spin_QTD.ui + +uic -o EntityGUI_3Spin_QTD.h EntityGUI_3Spin_QTD.ui +uic -o EntityGUI_3Spin_QTD.cxx -impl EntityGUI_3Spin_QTD.h EntityGUI_3Spin_QTD.ui + +uic -o EntityGUI_4Spin_QTD.h EntityGUI_4Spin_QTD.ui +uic -o EntityGUI_4Spin_QTD.cxx -impl EntityGUI_4Spin_QTD.h EntityGUI_4Spin_QTD.ui + +uic -o EntityGUI_1Sel_QTD.h EntityGUI_1Sel_QTD.ui +uic -o EntityGUI_1Sel_QTD.cxx -impl EntityGUI_1Sel_QTD.h EntityGUI_1Sel_QTD.ui diff --git a/src/GEOM/GEOM_Application.cxx b/src/GEOM/GEOM_Application.cxx new file mode 100644 index 000000000..24a3f1899 --- /dev/null +++ b/src/GEOM/GEOM_Application.cxx @@ -0,0 +1,39 @@ + +using namespace std; +#include "GEOM_Application.ixx" + +//======================================================================= +//function : GEOM_Application +//purpose : +//======================================================================= + +GEOM_Application::GEOM_Application() +{ +} + + +//======================================================================= +//function : Formats +//purpose : +//======================================================================= + +void GEOM_Application::Formats(TColStd_SequenceOfExtendedString& Formats) +{ + Formats.Append(TCollection_ExtendedString ("SALOME_GEOM")); +} + + +//======================================================================= +//function : ResourcesName +//purpose : +//======================================================================= + +Standard_CString GEOM_Application::ResourcesName() +{ + return Standard_CString ("GEOMDS_Resources"); +} + + + + + diff --git a/src/GEOM/GEOM_Application.hxx b/src/GEOM/GEOM_Application.hxx new file mode 100644 index 000000000..cf866a881 --- /dev/null +++ b/src/GEOM/GEOM_Application.hxx @@ -0,0 +1,89 @@ +// File : GEOM_Application.hxx +// Module : GEOM + +#ifndef _GEOM_Application_HeaderFile +#define _GEOM_Application_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_GEOM_Application_HeaderFile +#include +#endif + +#ifndef _TDocStd_Application_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif +class TColStd_SequenceOfExtendedString; + + +class GEOM_Application : public TDocStd_Application { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } +// inline void operator delete(void *anAddress, size_t size) +// { +// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); +// } + // Methods PUBLIC + // +Standard_EXPORT GEOM_Application(); +Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats) ; +Standard_EXPORT Standard_CString ResourcesName() ; +Standard_EXPORT ~GEOM_Application(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOM_Application_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOM/GEOM_Application.ixx b/src/GEOM/GEOM_Application.ixx new file mode 100644 index 000000000..77f5bf9fc --- /dev/null +++ b/src/GEOM/GEOM_Application.ixx @@ -0,0 +1,63 @@ +// File : GEOM_Application.ixx +// Module : GEOM + +#include "GEOM_Application.jxx" + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +GEOM_Application::~GEOM_Application() {} + + + +Standard_EXPORT Handle_Standard_Type& GEOM_Application_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TDocStd_Application); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDocStd_Application); + static Handle_Standard_Type aType2 = STANDARD_TYPE(CDF_Application); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(CDF_Application); + static Handle_Standard_Type aType3 = STANDARD_TYPE(CDM_Application); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(CDM_Application); + static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient); + if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOM_Application", + sizeof(GEOM_Application), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +// DownCast method +// allow safe downcasting + + +const Handle(GEOM_Application) Handle(GEOM_Application)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOM_Application) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOM_Application))) { + _anOtherObject = Handle(GEOM_Application)((Handle(GEOM_Application)&)AnObject); + } + } + + return _anOtherObject ; +} + + +const Handle(Standard_Type)& GEOM_Application::DynamicType() const +{ + return STANDARD_TYPE(GEOM_Application) ; +} +Standard_Boolean GEOM_Application::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(GEOM_Application) == AType || TDocStd_Application::IsKind(AType)); +} +Handle_GEOM_Application::~Handle_GEOM_Application() {} diff --git a/src/GEOM/GEOM_Application.jxx b/src/GEOM/GEOM_Application.jxx new file mode 100644 index 000000000..948f69196 --- /dev/null +++ b/src/GEOM/GEOM_Application.jxx @@ -0,0 +1,9 @@ +// File : GEOM_Application.jxx +// Module : GEOM + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _GEOM_Application_HeaderFile +#include "GEOM_Application.hxx" +#endif diff --git a/src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx b/src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx new file mode 100644 index 000000000..dc78bfb92 --- /dev/null +++ b/src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx @@ -0,0 +1,86 @@ + +#ifndef _GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_HeaderFile +#define _GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_HeaderFile + +#ifndef _TCollection_BasicMapIterator_HeaderFile +#include +#endif +#ifndef _Handle_Standard_Transient_HeaderFile +#include +#endif +#ifndef _Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class TCollection_AsciiString; +class Standard_Transient; +class GEOM_DataMapOfAsciiStringTransient; +class GEOM_DataMapNodeOfDataMapOfAsciiStringTransient; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient : public TCollection_BasicMapIterator { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient(); +Standard_EXPORT GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient(const GEOM_DataMapOfAsciiStringTransient& aMap); +Standard_EXPORT void Initialize(const GEOM_DataMapOfAsciiStringTransient& aMap) ; +Standard_EXPORT const TCollection_AsciiString& Key() const; +Standard_EXPORT const Handle_Standard_Transient& Value() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_0.cxx b/src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_0.cxx new file mode 100644 index 000000000..5ef372f1d --- /dev/null +++ b/src/GEOM/GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_0.cxx @@ -0,0 +1,36 @@ + +#include + +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _TCollection_AsciiString_HeaderFile +#include +#endif +#ifndef _Standard_Transient_HeaderFile +#include +#endif +#ifndef _GEOM_DataMapOfAsciiStringTransient_HeaderFile +#include +#endif +#ifndef _GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif + + +#define TheKey TCollection_AsciiString +#define TheKey_hxx +#define TheItem Handle_Standard_Transient +#define TheItem_hxx +#define Hasher TCollection_AsciiString +#define Hasher_hxx +#define TCollection_DataMapNode GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_Type_() GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_Type_() +#define TCollection_DataMap GEOM_DataMapOfAsciiStringTransient +#define TCollection_DataMap_hxx +#include + diff --git a/src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx b/src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx new file mode 100644 index 000000000..fb095128d --- /dev/null +++ b/src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx @@ -0,0 +1,123 @@ + +#ifndef _GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#define _GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif + +#ifndef _TCollection_AsciiString_HeaderFile +#include +#endif +#ifndef _Handle_Standard_Transient_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class Standard_Transient; +class TCollection_AsciiString; +class GEOM_DataMapOfAsciiStringTransient; +class GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient; + + +class GEOM_DataMapNodeOfDataMapOfAsciiStringTransient : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +GEOM_DataMapNodeOfDataMapOfAsciiStringTransient(const TCollection_AsciiString& K,const Handle(Standard_Transient)& I,const TCollection_MapNodePtr& n); + TCollection_AsciiString& Key() const; + Handle_Standard_Transient& Value() const; +Standard_EXPORT ~GEOM_DataMapNodeOfDataMapOfAsciiStringTransient(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +TCollection_AsciiString myKey; +Handle_Standard_Transient myValue; + + +}; + +#define TheKey TCollection_AsciiString +#define TheKey_hxx +#define TheItem Handle_Standard_Transient +#define TheItem_hxx +#define Hasher TCollection_AsciiString +#define Hasher_hxx +#define TCollection_DataMapNode GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_Type_() GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_Type_() +#define TCollection_DataMap GEOM_DataMapOfAsciiStringTransient +#define TCollection_DataMap_hxx + +#include + +#undef TheKey +#undef TheKey_hxx +#undef TheItem +#undef TheItem_hxx +#undef Hasher +#undef Hasher_hxx +#undef TCollection_DataMapNode +#undef TCollection_DataMapNode_hxx +#undef TCollection_DataMapIterator +#undef TCollection_DataMapIterator_hxx +#undef Handle_TCollection_DataMapNode +#undef TCollection_DataMapNode_Type_ +#undef TCollection_DataMap +#undef TCollection_DataMap_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_0.cxx b/src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_0.cxx new file mode 100644 index 000000000..1836c2e0f --- /dev/null +++ b/src/GEOM/GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_0.cxx @@ -0,0 +1,85 @@ + +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_Transient_HeaderFile +#include +#endif +#ifndef _TCollection_AsciiString_HeaderFile +#include +#endif +#ifndef _GEOM_DataMapOfAsciiStringTransient_HeaderFile +#include +#endif +#ifndef _GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif +GEOM_DataMapNodeOfDataMapOfAsciiStringTransient::~GEOM_DataMapNodeOfDataMapOfAsciiStringTransient() {} + + + +Standard_EXPORT Handle_Standard_Type& GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOM_DataMapNodeOfDataMapOfAsciiStringTransient", + sizeof(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient) Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient))) { + _anOtherObject = Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)((Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& GEOM_DataMapNodeOfDataMapOfAsciiStringTransient::DynamicType() const +{ + return STANDARD_TYPE(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient) ; +} +Standard_Boolean GEOM_DataMapNodeOfDataMapOfAsciiStringTransient::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient::~Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient() {} +#define TheKey TCollection_AsciiString +#define TheKey_hxx +#define TheItem Handle_Standard_Transient +#define TheItem_hxx +#define Hasher TCollection_AsciiString +#define Hasher_hxx +#define TCollection_DataMapNode GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_Type_() GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_Type_() +#define TCollection_DataMap GEOM_DataMapOfAsciiStringTransient +#define TCollection_DataMap_hxx +#include + diff --git a/src/GEOM/GEOM_DataMapOfAsciiStringTransient.hxx b/src/GEOM/GEOM_DataMapOfAsciiStringTransient.hxx new file mode 100644 index 000000000..2225272fc --- /dev/null +++ b/src/GEOM/GEOM_DataMapOfAsciiStringTransient.hxx @@ -0,0 +1,118 @@ + +#ifndef _GEOM_DataMapOfAsciiStringTransient_HeaderFile +#define _GEOM_DataMapOfAsciiStringTransient_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Handle_Standard_Transient_HeaderFile +#include +#endif +#ifndef _Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_NoSuchObject; +class TCollection_AsciiString; +class Standard_Transient; +class GEOM_DataMapNodeOfDataMapOfAsciiStringTransient; +class GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class GEOM_DataMapOfAsciiStringTransient : public TCollection_BasicMap { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT GEOM_DataMapOfAsciiStringTransient(const Standard_Integer NbBuckets = 1); +Standard_EXPORT GEOM_DataMapOfAsciiStringTransient& Assign(const GEOM_DataMapOfAsciiStringTransient& Other) ; + GEOM_DataMapOfAsciiStringTransient& operator =(const GEOM_DataMapOfAsciiStringTransient& Other) +{ + return Assign(Other); +} + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +Standard_EXPORT void Clear() ; +~GEOM_DataMapOfAsciiStringTransient() +{ + Clear(); +} + +Standard_EXPORT Standard_Boolean Bind(const TCollection_AsciiString& K,const Handle(Standard_Transient)& I) ; +Standard_EXPORT Standard_Boolean IsBound(const TCollection_AsciiString& K) const; +Standard_EXPORT Standard_Boolean UnBind(const TCollection_AsciiString& K) ; +Standard_EXPORT const Handle_Standard_Transient& Find(const TCollection_AsciiString& K) const; + const Handle_Standard_Transient& operator()(const TCollection_AsciiString& K) const +{ + return Find(K); +} + +Standard_EXPORT Handle_Standard_Transient& ChangeFind(const TCollection_AsciiString& K) ; + Handle_Standard_Transient& operator()(const TCollection_AsciiString& K) +{ + return ChangeFind(K); +} + + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT GEOM_DataMapOfAsciiStringTransient(const GEOM_DataMapOfAsciiStringTransient& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/GEOM/GEOM_DataMapOfAsciiStringTransient_0.cxx b/src/GEOM/GEOM_DataMapOfAsciiStringTransient_0.cxx new file mode 100644 index 000000000..fbb69911d --- /dev/null +++ b/src/GEOM/GEOM_DataMapOfAsciiStringTransient_0.cxx @@ -0,0 +1,39 @@ + +#include + +#ifndef _Standard_DomainError_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _TCollection_AsciiString_HeaderFile +#include +#endif +#ifndef _Standard_Transient_HeaderFile +#include +#endif +#ifndef _GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif +#ifndef _GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_HeaderFile +#include +#endif + + +#define TheKey TCollection_AsciiString +#define TheKey_hxx +#define TheItem Handle_Standard_Transient +#define TheItem_hxx +#define Hasher TCollection_AsciiString +#define Hasher_hxx +#define TCollection_DataMapNode GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_hxx +#define TCollection_DataMapIterator GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient +#define TCollection_DataMapIterator_hxx +#define Handle_TCollection_DataMapNode Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient +#define TCollection_DataMapNode_Type_() GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_Type_() +#define TCollection_DataMap GEOM_DataMapOfAsciiStringTransient +#define TCollection_DataMap_hxx +#include + diff --git a/src/GEOM/GEOM_Engine.cxx b/src/GEOM/GEOM_Engine.cxx new file mode 100644 index 000000000..46726dcea --- /dev/null +++ b/src/GEOM/GEOM_Engine.cxx @@ -0,0 +1,312 @@ +#include "GEOM_Engine.hxx" + +#include "GEOM_Solver.hxx" +#include "GEOM_Function.hxx" +#include "GEOM_ISubShape.hxx" +#include "GEOM_SubShapeDriver.hxx" +#include "GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient.hxx" + +#include "utilities.h" + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +static GEOM_Engine* TheEngine = NULL; + +static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_Object)& theObject) +{ + TCollection_AsciiString anID(theObject->GetDocID()), anEntry; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + anID+=(TCollection_AsciiString("_")+anEntry); + return anID; +} + +static TCollection_AsciiString BuildID(Standard_Integer theDocID, char* theEntry) +{ + TCollection_AsciiString anID(theDocID); + anID+=(TCollection_AsciiString("_")+theEntry); + return anID; +} + +static Standard_Integer ExtractDocID(TCollection_AsciiString& theID) +{ + TCollection_AsciiString aDocID = theID.Token("_"); + if(aDocID.Length() < 1) return -1; + return aDocID.IntegerValue(); +} + +//============================================================================= +/*! + * GetEngine + */ +//============================================================================= +GEOM_Engine* GEOM_Engine::GetEngine() { return TheEngine; } + + +//============================================================================= +/*! + * SetEngine + */ +//============================================================================= +void GEOM_Engine::SetEngine(GEOM_Engine* theEngine) { TheEngine = theEngine; } + +//============================================================================= +/*! + * Constructor + */ +//============================================================================= +GEOM_Engine::GEOM_Engine() +{ + TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver()); + + _OCAFApp = new GEOM_Application(); + _UndoLimit = 10; +} + +//============================================================================= +/*! + * GetDocument + */ +//============================================================================= +Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID) +{ + Handle(TDocStd_Document) aDoc; + if(!_mapIDDocument.IsBound(theDocID)) { + _OCAFApp->NewDocument("SALOME_GEOM", aDoc); + aDoc->SetUndoLimit(_UndoLimit); + _mapIDDocument.Bind(theDocID, aDoc); + TDataStd_Integer::Set(aDoc->Main(), theDocID); + } + + return Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID)); +} + +//============================================================================= +/*! + * GetDocID + */ +//============================================================================= +int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument) +{ + if(theDocument.IsNull()) return -1; + for(Interface_DataMapIteratorOfDataMapOfIntegerTransient anItr(_mapIDDocument); anItr.More(); anItr.Next()) + if(anItr.Value() == theDocument) return anItr.Key(); + + return -1; + +} + +//============================================================================= +/*! + * GetObject + */ +//============================================================================= +Handle(GEOM_Object) GEOM_Engine::GetObject(int theDocID, char* theEntry) +{ + TCollection_AsciiString anID = BuildID(theDocID, theEntry); + if(_objects.IsBound(anID)) return Handle(GEOM_Object)::DownCast(_objects(anID)); + + TDF_Label aLabel; + Handle(TDocStd_Document) aDoc = GetDocument(theDocID); + TDF_Tool::Label(aDoc->Main().Data(), theEntry, aLabel, Standard_True); + Handle(GEOM_Object) anObject = new GEOM_Object(aLabel); + + _objects.Bind(anID, anObject); + + return anObject; +} + +//============================================================================= +/*! + * AddObject + */ +//============================================================================= +Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType) +{ + Handle(TDocStd_Document) aDoc = GetDocument(theDocID); + Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main()); + + TDF_Label aChild = TDF_TagSource::NewChild(aDoc->Main()); + Handle(GEOM_Object) anObject = new GEOM_Object(aChild, theType); + + //Put an object in the map of created objects + TCollection_AsciiString anID = BuildIDFromObject(anObject); + if(_objects.IsBound(anID)) _objects.UnBind(anID); + _objects.Bind(anID, anObject); + + return anObject; +} + +//============================================================================= +/*! + * AddSubShape + */ +//============================================================================= +Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object) theMainShape, Handle(TColStd_HArray1OfInteger) theIndices) +{ + if(theMainShape.IsNull() || theIndices.IsNull()) return NULL; + + Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID()); + Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main()); + + TDF_Label aChild = TDF_TagSource::NewChild(aDoc->Main()); + + Handle(GEOM_Function) aMainShape = theMainShape->GetLastFunction(); + Handle(GEOM_Object) anObject = new GEOM_Object(aChild, 28); //28 is SUBSHAPE type + Handle(GEOM_Function) aFunction = anObject->AddFunction(GEOM_Object::GetSubShapeID(), 1); + + GEOM_ISubShape aSSI(aFunction); + aSSI.SetMainShape(aMainShape); + aSSI.SetIndices(theIndices); + + try { + GEOM_Solver aSolver (GEOM_Engine::GetEngine()); + if (!aSolver.ComputeFunction(aFunction)) { + MESSAGE("GEOM_Engine::AddSubShape Error: Can't build a sub shape"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + MESSAGE("GEOM_Engine::AddSubShape Error: " << aFail->GetMessageString()); + return NULL; + } + + //Put an object in the map of created objects + TCollection_AsciiString anID = BuildIDFromObject(anObject); + if(_objects.IsBound(anID)) _objects.UnBind(anID); + _objects.Bind(anID, anObject); + + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(anObject->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = geom.AddSubShape("; + TDF_Tool::Entry(theMainShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (", ["); + for(Standard_Integer i=theIndices->Lower(); i<=theIndices->Upper(); i++) { + aDescr += (TCollection_AsciiString(theIndices->Value(i))+", "); + } + aDescr.Trunc(aDescr.Length()-1); + aDescr += "])"; + aFunction->SetDescription(aDescr); + + return anObject; +} + +//============================================================================= +/*! + * RemoveObject + */ +//============================================================================= +bool GEOM_Engine::RemoveObject(Handle(GEOM_Object) theObject) +{ + if(!theObject) return false; + + //Remove an object from the map of available objects + TCollection_AsciiString anID = BuildIDFromObject(theObject); + if(_objects.IsBound(anID)) _objects.UnBind(anID); + + TDF_Label aLabel = theObject->GetEntry(); + aLabel.ForgetAllAttributes(Standard_True); + + theObject.Nullify(); + + return true; +} + +//============================================================================= +/*! + * Undo + */ +//============================================================================= +void GEOM_Engine::Undo(int theDocID) +{ + GetDocument(theDocID)->Undo(); +} + +//============================================================================= +/*! + * Redo + */ +//============================================================================= +void GEOM_Engine::Redo(int theDocID) +{ + GetDocument(theDocID)->Redo(); +} + +//============================================================================= +/*! + * Save + */ +//============================================================================= +bool GEOM_Engine::Save(int theDocID, char* theFileName) +{ + if(!_mapIDDocument.IsBound(theDocID)) return false; + Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID)); + + _OCAFApp->SaveAs(aDoc, theFileName); + + return true; +} + +//============================================================================= +/*! + * Load + */ +//============================================================================= +bool GEOM_Engine::Load(int theDocID, char* theFileName) +{ + Handle(TDocStd_Document) aDoc; + if(_OCAFApp->Open(theFileName, aDoc) != CDF_RS_OK) return false; + + aDoc->SetUndoLimit(_UndoLimit); + + if(_mapIDDocument.IsBound(theDocID)) _mapIDDocument.UnBind(theDocID); + _mapIDDocument.Bind(theDocID, aDoc); + + TDataStd_Integer::Set(aDoc->Main(), theDocID); + + return true; +} + +//============================================================================= +/*! + * Close + */ +//============================================================================= +void GEOM_Engine::Close(int theDocID) +{ + if(_mapIDDocument.IsBound(theDocID)) { + Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID)); + + //Remove all GEOM Objects associated to the given document + TColStd_SequenceOfAsciiString aSeq; + GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It(_objects); + for(; It.More(); It.Next()) { + TCollection_AsciiString anObjID(It.Key()); + Standard_Integer anID = ExtractDocID(anObjID); + if(theDocID == anID) aSeq.Append(It.Key()); + } + for(Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i)); + + _mapIDDocument.UnBind(theDocID); + _OCAFApp->Close(aDoc); + aDoc.Nullify(); + } +} diff --git a/src/GEOM/GEOM_Engine.hxx b/src/GEOM/GEOM_Engine.hxx new file mode 100644 index 000000000..3db976f6e --- /dev/null +++ b/src/GEOM/GEOM_Engine.hxx @@ -0,0 +1,74 @@ + +#ifndef _GEOM_Engine_HXX_ +#define _GEOM_Engine_HXX_ + +#include "GEOM_Application.hxx" +#include +#include +#include +#include "GEOM_Object.hxx" +#include +#include + +#include "GEOM_DataMapOfAsciiStringTransient.hxx" + +class GEOM_Engine +{ + public: + GEOM_Engine(); + ~GEOM_Engine() { _mapIDDocument.Clear(); _objects.Clear(); } + + //Retuns the engine + static GEOM_Engine* GetEngine(); + + //Returns the OCAF document by its ID, if document doesn't exists it will be created + Handle(TDocStd_Document) GetDocument(int theDocID); + + //Returns the ID of the given OCAF document + int GetDocID(Handle(TDocStd_Document) theDocument); + + //Returns the OCAF appliaction + Handle(TDocStd_Application) GetApplication() { return _OCAFApp; } + + //Returns a pointer to GEOM_Object defined by a document and the entry + Handle(GEOM_Object) GetObject(int theDocID, char* theEntry); + + //Adds a new object of the type theType in the OCAF document + Handle(GEOM_Object) AddObject(int theDocID, int theType); + + //Removes the object from the OCAF document + bool RemoveObject(Handle(GEOM_Object) theObject); + + //Saves the OCAF document with ID = theDocID with file with name theFileName + bool Save(int theDocID, char* theFileName); + + //Loads the OCAF document into the application and assigns to it an ID = theDocID + bool Load(int theDocID, char* theFileName); + + //Closes the document with ID = theDocID + void Close(int theDocID); + + //Sets the number of Undos (default value = 10) + void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; } + + //Applies an Undo to document with ID = theDocID + void Undo(int theDocID); + + //Applies an Redo to document with ID = theDocID + void Redo(int theDocID); + + //Adds a new sub shape object of the MainShape object + Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape, Handle(TColStd_HArray1OfInteger) theIndices); + + protected: + static void SetEngine(GEOM_Engine* theEngine); + + private: + + Handle(GEOM_Application) _OCAFApp; + Interface_DataMapOfIntegerTransient _mapIDDocument; + int _UndoLimit; + GEOM_DataMapOfAsciiStringTransient _objects; +}; + +#endif diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx new file mode 100644 index 000000000..e11f8cf7b --- /dev/null +++ b/src/GEOM/GEOM_Function.cxx @@ -0,0 +1,631 @@ +using namespace std; + +#include "GEOM_Function.hxx" +#include "GEOM_Object.hxx" +#include "GEOM_Solver.hxx" + +#include "utilities.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +#define ARGUMENT_LABEL 1 +#define RESULT_LABEL 2 +#define DESCRIPTION_LABEL 3 +#define ARGUMENTS _label.FindChild((ARGUMENT_LABEL)) +#define ARGUMENT(thePosition) _label.FindChild((ARGUMENT_LABEL)).FindChild((thePosition)) +#define SUB_ARGUMENT(thePos1, thePos2) _label.FindChild((ARGUMENT_LABEL)).FindChild((thePos1)).FindChild((thePos2)) + +//======================================================================= +//function : GetFunctionTreeID +//purpose : +//======================================================================= +const Standard_GUID& GEOM_Function::GetFunctionTreeID() +{ + static Standard_GUID aFunctionTreeID("FF1BBB00-5D14-4df2-980B-3A668264EA16"); + return aFunctionTreeID; +} + + +//======================================================================= +//function : GetDependencyID +//purpose : +//======================================================================= +const Standard_GUID& GEOM_Function::GetDependencyID() +{ + static Standard_GUID aDependencyID("E2620650-2354-41bd-8C2C-210CFCD00948"); + return aDependencyID; +} + +//============================================================================= +/*! + * GetFunction: + */ +//============================================================================= +Handle(GEOM_Function) GEOM_Function::GetFunction(const TDF_Label& theEntry) +{ + if(!theEntry.IsAttribute(TFunction_Function::GetID())) return NULL; + + return new GEOM_Function(theEntry); +} + +//============================================================================= +/*! + * Constructor: + */ +//============================================================================= +GEOM_Function::GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType) +: _label(theEntry) +{ + TFunction_Function::Set(theEntry, theGUID); + TDataStd_Integer::Set(theEntry, theType); + + //Add function to a function tree + Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theEntry.Data()); + Handle(TDataStd_TreeNode) aRoot, aNode; + if(!aDoc->Main().FindAttribute(GetFunctionTreeID(), aRoot)) + aRoot = TDataStd_TreeNode::Set(aDoc->Main(), GetFunctionTreeID()); + + aNode = TDataStd_TreeNode::Set(theEntry, GetFunctionTreeID()); + aRoot->Append(aNode); +} + +//============================================================================= +/*! + * GetOwner + */ +//============================================================================= +TDF_Label GEOM_Function::GetOwnerEntry() +{ + TDF_Label aFather = _label.Father(); + while(!aFather.IsRoot()) { + if(aFather.IsAttribute(GEOM_Object::GetObjectID())) return aFather; + aFather = aFather.Father(); + } + + return TDF_Label(); +} + +//============================================================================= +/*! + * GetType + */ +//============================================================================= +int GEOM_Function::GetType() +{ + _isDone = false; + Handle(TDataStd_Integer) aType; + if(!_label.FindAttribute(TDataStd_Integer::GetID(), aType)) return 0; + _isDone = true; + return aType->Get(); +} + +//============================================================================= +/*! + * GetValue + */ +//============================================================================= +TopoDS_Shape GEOM_Function::GetValue() +{ + _isDone = false; + + TopoDS_Shape aShape; + TDF_Label aLabel = GetOwnerEntry(); + if(aLabel.IsRoot()) return aShape; + Handle(GEOM_Object) anObject = GEOM_Object::GetObject(aLabel); + if(anObject.IsNull()) return aShape; + if(!anObject->IsMainShape()) { + try { + GEOM_Solver aSolver(GEOM_Engine::GetEngine()); + if (!aSolver.ComputeFunction(this)) { + MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape"); + return aShape; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString()); + return aShape; + } + } + + TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL); + Handle(TNaming_NamedShape) aNS; + if(!aResultLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape; + + aShape = aNS->Get(); + + _isDone = true; + return aShape; +} + +//============================================================================= +/*! + * GetValue + */ +//============================================================================= +void GEOM_Function::SetValue(TopoDS_Shape& theShape) +{ + _isDone = false; + TDF_Label aResultLabel = _label.FindChild(RESULT_LABEL); + TNaming_Builder aBuilder(aResultLabel); + + aBuilder.Generated(theShape); + + _isDone = true; +} + +//============================================================================= +/*! + * GetDriverGUID + */ +//============================================================================= +Standard_GUID GEOM_Function::GetDriverGUID() +{ + Handle(TFunction_Function) aFunction; + if(!_label.FindAttribute(TFunction_Function::GetID(), aFunction)) { + return TDF::LowestID(); + } + + return aFunction->GetDriverGUID(); +} + +//============================================================================= +/*! + * GetDescription + */ +//============================================================================= +TCollection_AsciiString GEOM_Function::GetDescription() +{ + Handle(TDataStd_Comment) aComment; + TDF_Label aChild = _label.FindChild(DESCRIPTION_LABEL); + if(!aChild.FindAttribute(TDataStd_Comment::GetID(), aComment)) return TCollection_AsciiString(); + TCollection_AsciiString aDescr(aComment->Get()); + return aDescr; +} + +//============================================================================= +/*! + * SetDescription + */ +//============================================================================= +void GEOM_Function::SetDescription(TCollection_AsciiString& theDescription) +{ + TDF_Label aChild = _label.FindChild(DESCRIPTION_LABEL); + Handle(TDataStd_Comment) aComment = TDataStd_Comment::Set(aChild, TCollection_ExtendedString(theDescription)); +} + +//============================================================================= +/*! + * SetReal + */ +//============================================================================= +void GEOM_Function::SetReal(int thePosition, double theValue) +{ + _isDone = false; + if(thePosition <= 0) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + TDataStd_Real::Set(anArgLabel, theValue); + _isDone = true; +} + +//============================================================================= +/*! + * SetRealArray + */ +//============================================================================= +void GEOM_Function::SetRealArray (int thePosition, + const Handle(TColStd_HArray1OfReal)& theArray) +{ + _isDone = false; + if(thePosition <= 0) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + Handle(TDataStd_RealArray) anAttr = + TDataStd_RealArray::Set(anArgLabel, theArray->Lower(), theArray->Upper()); + anAttr->ChangeArray(theArray); + _isDone = true; +} + +//============================================================================= +/*! + * GetReal + */ +//============================================================================= +double GEOM_Function::GetReal(int thePosition) +{ + _isDone = false; + if(thePosition <= 0) return 0.0; + Handle(TDataStd_Real) aReal; + TDF_Label anArgLabel = ARGUMENT(thePosition); + if(!anArgLabel.FindAttribute(TDataStd_Real::GetID(), aReal)) return 0.0; + + _isDone = true; + return aReal->Get(); +} + +//============================================================================= +/*! + * GetRealArray + */ +//============================================================================= +Handle(TColStd_HArray1OfReal) GEOM_Function::GetRealArray(int thePosition) +{ + _isDone = false; + if(thePosition <= 0) return NULL; + Handle(TDataStd_RealArray) aRealArray; + TDF_Label anArgLabel = ARGUMENT(thePosition); + if(!anArgLabel.FindAttribute(TDataStd_RealArray::GetID(), aRealArray)) return NULL; + + _isDone = true; + return aRealArray->Array(); +} + +//============================================================================= +/*! + * SetInteger + */ +//============================================================================= +void GEOM_Function::SetInteger(int thePosition, int theValue) +{ + _isDone = false; + if(thePosition <= 0) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + TDataStd_Integer::Set(anArgLabel, theValue); + _isDone = true; +} + +//============================================================================= +/*! + * SetIntegerArray + */ +//============================================================================= +void GEOM_Function::SetIntegerArray (int thePosition, + const Handle(TColStd_HArray1OfInteger)& theArray) +{ + _isDone = false; + if(thePosition <= 0) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + Handle(TDataStd_IntegerArray) anAttr = + TDataStd_IntegerArray::Set(anArgLabel, theArray->Lower(), theArray->Upper()); + anAttr->ChangeArray(theArray); + _isDone = true; +} + +//============================================================================= +/*! + * GetInteger + */ +//============================================================================= +int GEOM_Function::GetInteger(int thePosition) +{ + _isDone = false; + if(thePosition <= 0) return 0; + Handle(TDataStd_Integer) anInteger; + TDF_Label anArgLabel = ARGUMENT(thePosition); + if(!anArgLabel.FindAttribute(TDataStd_Integer::GetID(), anInteger)) return 0; + + _isDone = true; + return anInteger->Get(); +} + +//============================================================================= +/*! + * GetIntegerArray + */ +//============================================================================= +Handle(TColStd_HArray1OfInteger) GEOM_Function::GetIntegerArray(int thePosition) +{ + _isDone = false; + if(thePosition <= 0) return 0; + Handle(TDataStd_IntegerArray) anIntegerArray; + TDF_Label anArgLabel = ARGUMENT(thePosition); + if(!anArgLabel.FindAttribute(TDataStd_IntegerArray::GetID(), anIntegerArray)) return 0; + + _isDone = true; + return anIntegerArray->Array(); +} + +//============================================================================= +/*! + * SetString + */ +//============================================================================= +void GEOM_Function::SetString(int thePosition, const TCollection_AsciiString& theValue) +{ + _isDone = false; + if(thePosition <= 0) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + TDataStd_Comment::Set(anArgLabel, theValue); + _isDone = true; +} + +//============================================================================= +/*! + * GetString + */ +//============================================================================= +TCollection_AsciiString GEOM_Function::GetString(int thePosition) +{ + _isDone = false; + TCollection_AsciiString aRes; + if(thePosition <= 0) return aRes; + Handle(TDataStd_Comment) aString; + TDF_Label anArgLabel = ARGUMENT(thePosition); + if(!anArgLabel.FindAttribute(TDataStd_Comment::GetID(), aString)) return aRes; + + _isDone = true; + aRes = TCollection_AsciiString(aString->Get()); + return aRes; +} + +//============================================================================= +/*! + * SetReference + */ +//============================================================================= +void GEOM_Function::SetReference(int thePosition, Handle(GEOM_Function) theReference) +{ + _isDone = false; + if(thePosition <= 0) return; + if(theReference.IsNull()) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + TDF_Reference::Set(anArgLabel, theReference->GetEntry()); + TDataStd_UAttribute::Set(anArgLabel, GetDependencyID()); + _isDone = true; + return; +} + +//============================================================================= +/*! + * GetReference + */ +//============================================================================= +Handle(GEOM_Function) GEOM_Function::GetReference(int thePosition) +{ + _isDone = false; + if(thePosition <= 0) return NULL; + TDF_Label anArgLabel = ARGUMENT(thePosition); + Handle(TDF_Reference) aRef; + if(!anArgLabel.FindAttribute(TDF_Reference::GetID(), aRef)) return NULL; + + _isDone = true; + return GetFunction(aRef->Get()); +} + + +//============================================================================= +/*! + * SetStringArray + */ +//============================================================================= +void GEOM_Function::SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray) +{ + _isDone = false; + if(thePosition <= 0 || theArray.IsNull()) return; + TDF_Label anArgLabel = ARGUMENT(thePosition); + + Handle(TDataStd_ExtStringArray) anArray = new TDataStd_ExtStringArray; + anArray->ChangeArray(theArray); + anArgLabel.AddAttribute(anArray); + + _isDone = true; +} + + +//============================================================================= +/*! + * GetStringArray + */ +//============================================================================= +Handle(TColStd_HArray1OfExtendedString) GEOM_Function::GetStringArray(int thePosition) +{ + _isDone = false; + if(thePosition <= 0) return NULL; + TDF_Label anArgLabel = ARGUMENT(thePosition); + Handle(TDataStd_ExtStringArray) anArray; + if(!anArgLabel.FindAttribute(TDataStd_ExtStringArray::GetID(), anArray)) return NULL; + + _isDone = true; + return anArray->Array(); +} + +//======================================================================= +//function : GetReferencesTreeID +//purpose : +//======================================================================= +const Standard_GUID& GEOM_Function::GetReferencesTreeID() +{ + static Standard_GUID aReferencesTreeID("FF1BBB10-5D14-4df2-980B-3A668264EA16"); + return aReferencesTreeID; +} + +//============================================================================= +/*! + * SetReferenceList + */ +//============================================================================= +void GEOM_Function::SetReferenceList (int thePosition, + const Handle(TColStd_HSequenceOfTransient)& theRefList) +{ + _isDone = false; + if(thePosition <= 0) return; + + // parent label for the list of references + TDF_Label anArgLabel = ARGUMENT(thePosition); + anArgLabel.ForgetAllAttributes(); + + // set TreeNode on the parent label + Handle(TDataStd_TreeNode) aRoot, aNode; + aRoot = TDataStd_TreeNode::Set(anArgLabel, GetReferencesTreeID()); + + // store references on sub-labels of the parent label + Handle(GEOM_Function) aFunc; + Standard_Integer ind, len = theRefList->Length(); + for (ind = 1; ind <= len; ind++) { + aFunc = Handle(GEOM_Function)::DownCast(theRefList->Value(ind)); + if (aFunc.IsNull()) continue; + TDF_Label anArgLabel_i = SUB_ARGUMENT(thePosition, ind); + TDF_Reference::Set(anArgLabel_i, aFunc->GetEntry()); + TDataStd_UAttribute::Set(anArgLabel_i, GetDependencyID()); + + // set TreeNode on the child label + aNode = TDataStd_TreeNode::Set(anArgLabel_i, GetReferencesTreeID()); + aRoot->Append(aNode); + } + + _isDone = true; + return; +} + +//============================================================================= +/*! + * GetReferenceList + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOM_Function::GetReferenceList(int thePosition) +{ + Handle(TColStd_HSequenceOfTransient) aResult = new TColStd_HSequenceOfTransient; + _isDone = false; + if(thePosition <= 0) return aResult; + + // parent label for the list of references + TDF_Label anArgLabel = ARGUMENT(thePosition); + Handle(TDF_Reference) aRef; + + // get TreeNode on the parent label + Handle(TDataStd_TreeNode) aRoot, aNode; + if(!anArgLabel.FindAttribute(GetReferencesTreeID(), aRoot)) + return aResult; + + // get references, stored on sub-labels of the parent label + TDF_Label aLabel_i; + TDataStd_ChildNodeIterator anIter (aRoot); + for (; anIter.More(); anIter.Next()) { + aNode = anIter.Value(); + aLabel_i = aNode->Label(); + if (!aLabel_i.FindAttribute(TDF_Reference::GetID(), aRef)) continue; + Handle(GEOM_Function) aFunc_i = GetFunction(aRef->Get()); + if (aFunc_i.IsNull()) continue; + aResult->Append(aFunc_i); + } + + _isDone = true; + return aResult; +} + +//============================================================================= +/*! + * SetShape + */ +//============================================================================= +void GEOM_Function::SetShape(int thePosition, const TopoDS_Shape& theShape) +{ + _isDone = false; + if(thePosition <= 0 || theShape.IsNull()) return; + + TDF_Label anArgLabel = ARGUMENT(thePosition); + TNaming_Builder aBuilder(anArgLabel); + aBuilder.Generated(theShape); + + _isDone = true; + return; +} + +//============================================================================= +/*! + * GetShape + */ +//============================================================================= +TopoDS_Shape GEOM_Function::GetShape(int thePosition) +{ + _isDone = false; + TopoDS_Shape aShape; + if(thePosition <= 0) return aShape; + + TDF_Label anArgLabel = ARGUMENT(thePosition); + Handle(TNaming_NamedShape) aNS; + if(!anArgLabel.FindAttribute(TNaming_NamedShape::GetID(), aNS)) return aShape; + + aShape = aNS->Get(); + _isDone = true; + return aShape; +} + + +//============================================================================= +/*! + * GetDependency + */ +//============================================================================= +void GEOM_Function::GetDependency(TDF_LabelSequence& theSeq) +{ + TDF_ChildIterator anIterator(ARGUMENTS, Standard_True); + for(; anIterator.More(); anIterator.Next()) { + if(anIterator.Value().IsAttribute(GetDependencyID())) theSeq.Append(anIterator.Value()); + } +} + +//======================================================================= +//function : GEOM_Function_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOM_Function_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOM_Function", + sizeof(GEOM_Function), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOM_Function) Handle(GEOM_Function)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOM_Function) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOM_Function))) { + _anOtherObject = Handle(GEOM_Function)((Handle(GEOM_Function)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOM/GEOM_Function.hxx b/src/GEOM/GEOM_Function.hxx new file mode 100644 index 000000000..be5c192f1 --- /dev/null +++ b/src/GEOM/GEOM_Function.hxx @@ -0,0 +1,243 @@ + +#ifndef _GEOM_Function_HeaderFile +#define _GEOM_Function_HeaderFile + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Handle_MMgt_TShared_HeaderFile +#include +#endif +#ifndef _MMgt_TShared_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TDF_Label_HeaderFile +#include +#endif +#ifndef _TDF_LabelSequence_HeaderFile +#include +#endif +#ifndef _TColStd_HArray1OfExtendedString_HeaderFile +#include +#endif + +class Handle_TColStd_HArray1OfReal; +class Handle_TColStd_HArray1OfInteger; +class Handle_TColStd_HSequenceOfTransient; +class Handle_TColStd_HArray1OfExtendedString; + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(MMgt_TShared); +class GEOM_Function; + +#include + + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Function); + +class Handle(GEOM_Function) : public Handle(MMgt_TShared) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOM_Function)():Handle(MMgt_TShared)() {} + Handle(GEOM_Function)(const Handle(GEOM_Function)& aHandle) : Handle(MMgt_TShared)(aHandle) + { + } + + Handle(GEOM_Function)(const GEOM_Function* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) + { + } + + Handle(GEOM_Function)& operator=(const Handle(GEOM_Function)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOM_Function)& operator=(const GEOM_Function* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOM_Function* operator->() + { + return (GEOM_Function *)ControlAccess(); + } + + GEOM_Function* operator->() const + { + return (GEOM_Function *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOM_Function)() {}; + + Standard_EXPORT static const Handle(GEOM_Function) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +class GEOM_Function : public MMgt_TShared +{ + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOM_Function_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOM_Function) ; } + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_Function) == AType || MMgt_TShared::IsKind(AType)); } + + +private: + GEOM_Function(const TDF_Label& theEntry) { _label = theEntry; } + +public: + + //Returns a GUID for a function tree + static const Standard_GUID& GetFunctionTreeID(); + + //Returns the ID which is associated with a reference to another function + static const Standard_GUID& GetDependencyID(); + + //Finds and returns a function located on a label theEntry + static Handle(GEOM_Function) GetFunction(const TDF_Label& theEntry); + + + GEOM_Function(const TDF_Label& theEntry, const Standard_GUID& theGUID, int theType); + ~GEOM_Function() {;} + + TDF_Label GetOwnerEntry(); + + //Access to properties + + //Returns a result of the function built by the function Driver + TopoDS_Shape GetValue(); + + //Sets the function result + void SetValue(TopoDS_Shape& theShape); + + //Returns a function entry in the OCAF document + TDF_Label& GetEntry() { return _label; } + + //Returns the type of the function + int GetType(); + + //Returns a function Driver GUID + Standard_GUID GetDriverGUID(); + + //Returns aPython description of the function + TCollection_AsciiString GetDescription(); + + //Sets aPython description of the function + void SetDescription(TCollection_AsciiString& theDescription); + + //Access to arguments + + //Sets a real argument at position thePosition + void SetReal(int thePosition, double theValue); + + //Returns a real argument at position thePosition + double GetReal(int thePosition); + + //Sets a real array argument at position thePosition + void SetRealArray(int thePosition, const Handle(TColStd_HArray1OfReal)& theArray); + + //Returns a real array argument at position thePosition + Handle(TColStd_HArray1OfReal) GetRealArray(int thePosition); + + //Sets an integer argument at position thePosition + void SetInteger(int thePosition, int theValue); + + //Returns an integer argument at position thePosition + int GetInteger(int thePosition); + + //Sets an integer array argument at position thePosition + void SetIntegerArray(int thePosition, const Handle(TColStd_HArray1OfInteger)& theArray); + + //Returns an integer array argument at position thePosition + Handle(TColStd_HArray1OfInteger) GetIntegerArray(int thePosition); + + //Sets a reference to other function argument at position thePosition + void SetReference(int thePosition, Handle(GEOM_Function) theReference); + + //Sets a string argument at position thePosition + void SetString(int thePosition, const TCollection_AsciiString& theValue); + + //Returns a string argument at position thePosition + TCollection_AsciiString GetString(int thePosition); + + //Returns a reference to other function argument at position thePosition + Handle(GEOM_Function) GetReference(int thePosition); + + //Set an array of ExtendedString + void SetStringArray(int thePosition, const Handle(TColStd_HArray1OfExtendedString)& theArray); + + //Returns the array of ExtendedString + Handle(TColStd_HArray1OfExtendedString) GetStringArray(int thePosition); + + //Returns a GUID for a references tree + static const Standard_GUID& GetReferencesTreeID(); + + //Sets a list of references to other function arguments at position thePosition + void SetReferenceList (int thePosition, + const Handle(TColStd_HSequenceOfTransient)& theRefList); + + //Returns a list of references to other function arguments at position thePosition + Handle(TColStd_HSequenceOfTransient) GetReferenceList (int thePosition); + + //Sets a TopoDS_Shape argument at position thePosition + void SetShape(int thePosition, const TopoDS_Shape& theShape); + + //Returns a TopoDS_Shape argument at position thePosition + TopoDS_Shape GetShape(int thePosition); + + //Returns true if the last method succided + bool IsDone() { return _isDone; } + + //Returns a sequence of the external dependencies of this function + void GetDependency(TDF_LabelSequence& theSeq); + +private: + + + TDF_Label _label; + bool _isDone; +}; + +#endif diff --git a/src/GEOM/GEOM_Gen_i.cc b/src/GEOM/GEOM_Gen_i.cc index aec7970cd..1175cafe8 100644 --- a/src/GEOM/GEOM_Gen_i.cc +++ b/src/GEOM/GEOM_Gen_i.cc @@ -212,7 +212,7 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, { GEOM::GEOM_Shape_var aShape = GEOM::GEOM_Shape::_narrow(_orb->string_to_object(IORString)); if (!CORBA::is_nil(aShape)) { - return CORBA::string_dup(aShape->ShapeId()); + return aShape->ShapeId(); } return 0; } @@ -458,16 +458,16 @@ SALOMEDS::TMPFile* GEOM_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, bool isMultiFile) { SALOMEDS::TMPFile_var aStreamFile; // Get a temporary directory to store a file - TCollection_AsciiString aTmpDir = (isMultiFile)?TCollection_AsciiString((char*)theURL):SALOMEDS_Tool::GetTmpDir(); + TCollection_AsciiString aTmpDir = (isMultiFile)?TCollection_AsciiString((char*)theURL):(char*)SALOMEDS_Tool::GetTmpDir().c_str(); // Create a list to store names of created files SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames; aSeq->length(1); // Prepare a file name to open TCollection_AsciiString aNameWithExt(""); if (isMultiFile) - aNameWithExt = TCollection_AsciiString(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL())); + aNameWithExt = TCollection_AsciiString((char*)SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()).c_str()); aNameWithExt += TCollection_AsciiString("_GEOM.sgd"); - aSeq[0] = CORBA::string_dup(aNameWithExt.ToCString()); + aSeq[0] = aNameWithExt.ToCString(); // Build a full file name of temporary file TCollection_AsciiString aFullName = aTmpDir + aNameWithExt; // Save GEOM component in this file @@ -499,7 +499,7 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, } // Get a temporary directory for a file - TCollection_AsciiString aTmpDir = isMultiFile?TCollection_AsciiString((char*)theURL):SALOMEDS_Tool::GetTmpDir(); + TCollection_AsciiString aTmpDir = isMultiFile?TCollection_AsciiString((char*)theURL):(char*)SALOMEDS_Tool::GetTmpDir().c_str(); // Conver the byte stream theStream to a file and place it in tmp directory SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.ToCString(), @@ -508,7 +508,7 @@ CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, // Prepare a file name to open TCollection_AsciiString aNameWithExt(""); if (isMultiFile) - aNameWithExt = TCollection_AsciiString(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL())); + aNameWithExt = TCollection_AsciiString((char*)SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()).c_str()); aNameWithExt += TCollection_AsciiString("_GEOM.sgd"); TCollection_AsciiString aFullName = aTmpDir + aNameWithExt; @@ -597,7 +597,7 @@ void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent) // Handle(TDocStd_Document) anEmptyDoc; // if (aDoc->Main().Root().FindAttribute(TDocStd_Owner::GetID(), anOwner)) { // anOwner->SetDocument(anEmptyDoc); -// cout<<"********** Nullify owner of document"<Close(aDoc); myStudyIDToDoc.UnBind(anID); // remove document from GEOM documents data map @@ -661,7 +661,7 @@ SALOMEDS::TMPFile* GEOM_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA:: CORBA::Boolean GEOM_Gen_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID) { // The Geometry component can paste only objects copied by Geometry component // and with the object type = 1 -// cout<<"********** GEOM_Gen_i::CanPaste ("<Name(), myCurrentOCAFDoc) ; - result->ShapeId(entry) ; - } - return result; - } +// function : MakeSketcher() +// purpose : Make a wire from a list containing many points +//================================================================================= +GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeSketcher( const char *Cmd ) + throw (SALOME::SALOME_Exception) +{ + GEOM::GEOM_Shape_var result ; + TopoDS_Shape tds ; + try { + Sketcher_Profile aProfile (Cmd); + if(aProfile.IsDone()) + tds = aProfile.GetShape(); + } + catch(Standard_Failure) { + THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::MakeSketcher", SALOME::BAD_PARAM); + } + + if (tds.IsNull()) { + THROW_SALOME_CORBA_EXCEPTION("MakeSketcher aborted : null shape", SALOME::BAD_PARAM); + } + else { + result = CreateObject(tds); + const char *entry = InsertInLabel(tds, result->Name(), myCurrentOCAFDoc) ; + result->ShapeId(entry) ; + } + return result; +} + + + +//================================================================================= +// function : MakeBezier() +// purpose : Make a wire from a list containing many points +//================================================================================= +GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeBezier( const GEOM::GEOM_Gen::ListOfIOR& ListShapes ) + throw (SALOME::SALOME_Exception) +{ + GEOM::GEOM_Shape_var result; + TopoDS_Shape tds, Shape; + TColgp_Array1OfPnt CurvePoints(1, ListShapes.length()); + + try { + for(unsigned int i = 0; i < ListShapes.length(); i++) { + GEOM::GEOM_Shape_var aShape = GetIORFromString(ListShapes[i]); + Shape = GetTopoShape(aShape); + if(Shape.IsNull()) { + THROW_SALOME_CORBA_EXCEPTION("MakeBezier aborted : null shape during operation", SALOME::BAD_PARAM); + } + if(Shape.ShapeType() == TopAbs_VERTEX) { + const gp_Pnt& P = BRep_Tool::Pnt(TopoDS::Vertex(Shape)); + CurvePoints.SetValue(i + 1, P); + } + } + Handle(Geom_BezierCurve) GBC = new Geom_BezierCurve(CurvePoints); + tds = BRepBuilderAPI_MakeEdge(GBC); + } + catch(Standard_Failure) { + THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::MakeBezier", SALOME::BAD_PARAM); + } + + if( tds.IsNull() ) { + THROW_SALOME_CORBA_EXCEPTION("Make Bezier operation aborted : null result", SALOME::BAD_PARAM); + } + else { + result = CreateObject(tds); + InsertInLabelMoreArguments(tds, result, ListShapes, myCurrentOCAFDoc); + } + return result; +} + + +//================================================================================= +// function : MakeInterpol() +// purpose : Make a wire from a list containing many points +//================================================================================= +GEOM::GEOM_Shape_ptr GEOM_Gen_i::MakeInterpol( const GEOM::GEOM_Gen::ListOfIOR& ListShapes ) + throw (SALOME::SALOME_Exception) +{ + GEOM::GEOM_Shape_var result; + TopoDS_Shape tds, Shape; + TColgp_Array1OfPnt CurvePoints(1, ListShapes.length()); + + try { + for(unsigned int i = 0; i < ListShapes.length(); i++) { + GEOM::GEOM_Shape_var aShape = GetIORFromString(ListShapes[i]); + Shape = GetTopoShape(aShape); + if(Shape.IsNull()) { + THROW_SALOME_CORBA_EXCEPTION("MakeBSpline aborted : null shape during operation", SALOME::BAD_PARAM); + } + if(Shape.ShapeType() == TopAbs_VERTEX) { + const gp_Pnt& P = BRep_Tool::Pnt(TopoDS::Vertex(Shape)); + CurvePoints.SetValue(i + 1, P); + } + } + GeomAPI_PointsToBSpline GBC(CurvePoints); + tds = BRepBuilderAPI_MakeEdge(GBC); + } + catch(Standard_Failure) { + THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::MakeBSpline", SALOME::BAD_PARAM); + } + + if( tds.IsNull() ) { + THROW_SALOME_CORBA_EXCEPTION("Make BSpline operation aborted : null result", SALOME::BAD_PARAM); + } + else { + result = CreateObject(tds) ; + InsertInLabelMoreArguments(tds, result, ListShapes, myCurrentOCAFDoc) ; + } + return result; +} //================================================================================= // function : MakeTranslation() diff --git a/src/GEOM/GEOM_Gen_i.hh b/src/GEOM/GEOM_Gen_i.hh deleted file mode 100644 index ff910b897..000000000 --- a/src/GEOM/GEOM_Gen_i.hh +++ /dev/null @@ -1,617 +0,0 @@ -// GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOM_GEN_i.h file -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#ifndef __GEOM_GEN_I_H__ -#define __GEOM_GEN_I_H__ - -// standard C++ headers -#include -#include "GEOMDS_DataMapOfIntegerTransient.hxx" -#include "GEOMDS_Application.hxx" -#include -#include -#include -#include -#include -#include - -// IDL headers -#include -#include CORBA_SERVER_HEADER(GEOM_Gen) -#include CORBA_SERVER_HEADER(GEOM_Shape) -#include CORBA_SERVER_HEADER(SALOMEDS) - -#include "SALOME_Component_i.hxx" -#include "GEOM_Shape_i.hh" - -#include "SALOME_NamingService.hxx" -#include - -#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC - - -//===================================================================== -// GEOM_Gen_i : class definition -//===================================================================== -class GEOM_Gen_i: public POA_GEOM::GEOM_Gen, - public Engines_Component_i -{ - private: - - SALOME_NamingService * name_service; - char * _name; - Handle(GEOMDS_Application) myOCAFApp; /* geom/OCAF Application */ - Handle(TDocStd_Document) myCurrentOCAFDoc; /* Current geom/OCAF Document */ - GEOMDS_DataMapOfIntegerTransient myStudyIDToDoc; /* Map to bind a Study to a Document */ - - int myStudyID; - - GEOM::GEOM_Shape_ptr CreateObject(TopoDS_Shape& tds) ; - - GEOM::GEOM_Shape_ptr CreateSubObject(const TopoDS_Shape& SubShape, - const GEOM::GEOM_Shape_ptr MainShape, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID); - // Create and insert(!) SubShape of MainShape - - GEOM::GEOM_Shape_ptr GEOM_Gen_i::SubShapesOne( GEOM::GEOM_Shape_ptr shape, - const TopAbs_ShapeEnum ShapeType, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID, - const Standard_Boolean sorted=Standard_False) - throw (SALOME::SALOME_Exception); - // return all listed subshapes as one shape - - GEOM::GEOM_Gen::ListOfGeomShapes* SubShapesAll(GEOM::GEOM_Shape_ptr shape, - const TopAbs_ShapeEnum type, - const Standard_Boolean sorted=Standard_False) - throw (SALOME::SALOME_Exception); - // return all subshapes by type - - TopoDS_Face FindSameFace(const TopoDS_Shape& aShape, - const TopoDS_Face& F, - double tol3d); - TopoDS_Edge FindSameEdge(const TopoDS_Face& newFace, - TopoDS_Edge& Eold, - double tol3d); - - public: - //-----------------------------------------------------------------------// - // Constructor / Destructor // - //-----------------------------------------------------------------------// - // constructor to be called for servant creation. - GEOM_Gen_i(); - GEOM_Gen_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName); - - // destructor, doing nothing (for now) - virtual ~GEOM_Gen_i(); - - // generic method to be put in a super class - void register_name(char * name); - - //-----------------------------------------------------------------------// - // Studies Management // - //-----------------------------------------------------------------------// - void GetCurrentStudy (CORBA::Long StudyID); - - CORBA::Short NbLabels(); - - // inherited methods from SALOMEDS::Driver - SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile); - - SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, - const char* theURL, - bool isMultiFile); - - CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile); - - CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent, - const SALOMEDS::TMPFile& theStream, - const char* theURL, - bool isMultiFile); - - void Close(SALOMEDS::SComponent_ptr theComponent); - char* ComponentDataType(); - - - char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, - const char* IORString, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII); - char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, - const char* aLocalPersistentID, - CORBA::Boolean isMultiFile, - CORBA::Boolean isASCII); - - bool CanPublishInStudy(CORBA::Object_ptr theIOR); - SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy, - SALOMEDS::SObject_ptr theSObject, - CORBA::Object_ptr theObject, - const char* theName) throw (SALOME::SALOME_Exception) ; - - CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject); - SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID); - CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID); - SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream, - CORBA::Long theObjectID, - SALOMEDS::SObject_ptr theObject); - - //-----------------------------------------------------------------------// - // Shapes Management // - //-----------------------------------------------------------------------// - const char* InsertInLabel(TopoDS_Shape S, - const char *nameIor, - Handle(TDocStd_Document) OCAFDoc) ; - - const char* InsertInLabelDependentShape(TopoDS_Shape S, - const char *nameIor, - GEOM::GEOM_Shape_ptr mainshape_ptr, - Handle(TDocStd_Document) OCAFDoc) ; - - void InsertInLabelOneArgument(TopoDS_Shape main_topo, - GEOM::GEOM_Shape_ptr shape_ptr, - TopoDS_Shape result_topo, - GEOM::GEOM_Shape_ptr result, - Handle(TDocStd_Document) OCAFDoc) ; - - void InsertInLabelMoreArguments(TopoDS_Shape main_topo, - GEOM::GEOM_Shape_ptr result, - const GEOM::GEOM_Gen::ListOfIOR& ListShapes, - Handle(TDocStd_Document) OCAFDoc) ; - - // Methods used by SuppressFaces - int SuppressFacesGlue( const TopoDS_Shape& S, - const TopTools_MapOfShape& mapFaces, - TopoDS_Shape& aCompoundOfShells ) throw (SALOME::SALOME_Exception) ; - - // various services - int GetIndexTopology( const TopoDS_Shape& subshape, - const TopoDS_Shape& mainShape ) ; - - bool GetShapeFromIndex( const TopoDS_Shape& aShape, - const TopAbs_ShapeEnum aType, - const int index, - TopoDS_Shape& tds) ; - - GEOM::GEOM_Shape::ListOfSubShapeID* IndexOfFacesOfSubShell( const TopoDS_Shape& S, - const TopoDS_Shape subShell ) - throw (SALOME::SALOME_Exception) ; - - bool ListOfIDIntoMapOfShapes( const TopoDS_Shape& S, - const GEOM::GEOM_Shape::ListOfSubShapeID& L, - const int subShapeType, - TopTools_MapOfShape& aMap ) ; - - bool ListOfIDIntoSequenceOfShapes( const TopoDS_Shape& S, - const GEOM::GEOM_Shape::ListOfSubShapeID& L, - const int subShapeType, - TopTools_SequenceOfShape& aSequenceOfShapes ) ; - - // Returns a TopoDS_Shape from a GEOM::GEOM_Shape_ptr - TopoDS_Shape GetTopoShape(GEOM::GEOM_Shape_ptr shape_ptr) ; - - // Define a sequence of shapes from 'listShapes' and return its length - int SequenceOfShapeFromListOfGeomShape( const GEOM::GEOM_Gen::ListOfGeomShapes& listShapes, - TopTools_SequenceOfShape& SS ) ; - - // Get a string representing a shape ref IOR - const char* GetStringFromIOR(GEOM::GEOM_Shape_var shapeIOR); - - // Return the shape ref represented by a string of IOR - GEOM::GEOM_Shape_ptr GetIORFromString(const char* stringIOR); - - GEOM::GEOM_Gen::ListOfIOR* GetReferencedObjects(GEOM::GEOM_Shape_ptr shape); - GEOM::GEOM_Gen::ListOfIOR* GetObjects(GEOM::GEOM_Shape_ptr shape); - - - //-----------------------------------------------------------------------// - // Internal structure of shapes // - //-----------------------------------------------------------------------// - // Explode SubShape - GEOM::GEOM_Shape_ptr SubShape(GEOM::GEOM_Shape_ptr shape, - CORBA::Short ShapeType, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID) - throw (SALOME::SALOME_Exception) ; - - // Explode SubShape in predictable order - GEOM::GEOM_Shape_ptr SubShapeSorted(GEOM::GEOM_Shape_ptr shape, - CORBA::Short ShapeType, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID) - throw (SALOME::SALOME_Exception) ; - - // Explode SubShape - GEOM::GEOM_Gen::ListOfGeomShapes* SubShapeAll(GEOM::GEOM_Shape_ptr shape, - CORBA::Short ShapeType) - throw (SALOME::SALOME_Exception) ; - - // Explode SubShape in predictable order for TUI or GUI - GEOM::GEOM_Gen::ListOfGeomShapes* SubShapeAllSorted(GEOM::GEOM_Shape_ptr shape, - CORBA::Short ShapeType) - throw (SALOME::SALOME_Exception) ; - - // Suppress faces in a shape - GEOM::GEOM_Gen::ListOfGeomShapes* SuppressFaces( GEOM::GEOM_Shape_ptr shape, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID ) - throw (SALOME::SALOME_Exception) ; - - // Suppress one or more holes in a face or shell independant topology - GEOM::GEOM_Shape_ptr SuppressHolesInFaceOrShell( GEOM::GEOM_Shape_ptr shapeFaceShell, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdWires) - throw (SALOME::SALOME_Exception) ; - - // Suppress a single hole in a topology (face) shell or solid with/without hole traversing - GEOM::GEOM_Shape_ptr SuppressHole( GEOM::GEOM_Shape_ptr shape, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdFace, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdWire, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListIdEndFace ) - throw (SALOME::SALOME_Exception) ; - - bool RebuildFaceRemovingHoles( const TopoDS_Face& aFace, - const TopTools_MapOfShape& mapHoles, - TopoDS_Shape& resultFace ) ; - - void SuppressHoleSubRoutine( const TopoDS_Shape& mainShape, - const TopoDS_Face& aFace, - const TopTools_SequenceOfShape& SSedgesOfWire, - const TopTools_IndexedDataMapOfShapeListOfShape& aMapEdgesFaces, - const TopTools_MapOfShape& MSfaces, - TopTools_MapOfShape& MSfacesSuppress, - const Standard_Boolean withEndFace, - const TopoDS_Face& endFace, - TopTools_MapOfShape& MSwireEndEdges ) - throw (SALOME::SALOME_Exception ) ; - - bool BuildShapeHoleNotTraversing( const TopoDS_Shape& aShape, - const TopoDS_Face& aFace, - const TopoDS_Wire& aWire, - const TopTools_MapOfShape& MFSuppress, - TopoDS_Shape& resultTds ) - throw (SALOME::SALOME_Exception) ; - - bool BuildShapeHoleTraversing( const TopoDS_Shape& aShape, - const TopoDS_Face& aFace, - const TopoDS_Wire& aWire, - const TopTools_MapOfShape& MFSuppress, - const TopoDS_Face& endFace, - const TopoDS_Wire& endWire, - TopoDS_Shape& resultTds ) - throw (SALOME::SALOME_Exception) ; - - bool FindCompareWireHoleOnFace( const TopoDS_Face& F, - const TopTools_MapOfShape& MSwireEdges, - TopoDS_Wire& aFoundWire ) ; - - bool IsShapeInSequence( const TopTools_SequenceOfShape& SS, const TopoDS_Shape& aShape ) ; - - void FreeEdgesFromMapOfFace(const TopTools_MapOfShape& MSfaces, TopTools_MapOfShape& MS ) ; - - void MapRemoveSequence( const TopTools_MapOfShape& MS, - const TopTools_SequenceOfShape& SSRemove, - TopTools_SequenceOfShape& ST) ; - - bool BuildShellWithFaceCompound( const TopoDS_Compound Comp, - TopoDS_Shell& resultShell ) ; - - //-----------------------------------------------------------------------// - // Basic structures // - //-----------------------------------------------------------------------// - GEOM::PointStruct MakePointStruct(CORBA::Double x, - CORBA::Double y, - CORBA::Double z) ; - GEOM::DirStruct MakeDirection(const GEOM::PointStruct& p) ; - - GEOM::AxisStruct MakeAxisStruct(CORBA::Double x, - CORBA::Double y, - CORBA::Double z, - CORBA::Double vx, - CORBA::Double vy, - CORBA::Double vz) ; - - //----------------------------------------------------------------------// - // Boolean Operations // - //----------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr MakeBoolean(GEOM::GEOM_Shape_ptr shape1, - GEOM::GEOM_Shape_ptr shape2, - CORBA::Long operation) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeFuse(GEOM::GEOM_Shape_ptr shape1, - GEOM::GEOM_Shape_ptr shape2) - throw (SALOME::SALOME_Exception) ; - - //----------------------------------------------------------------------// - // Advanced Operations // - //----------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr Partition(const GEOM::GEOM_Gen::ListOfIOR& ListShapes, - const GEOM::GEOM_Gen::ListOfIOR& ListTools, - const GEOM::GEOM_Gen::ListOfIOR& ListKeepInside, - const GEOM::GEOM_Gen::ListOfIOR& ListRemoveInside, - const CORBA::Short Limit) - throw (SALOME::SALOME_Exception) ; - - // Filling a surface with section curves - GEOM::GEOM_Shape_ptr MakeFilling(GEOM::GEOM_Shape_ptr shape, - CORBA::Short mindeg, - CORBA::Short maxdeg, - CORBA::Double tol3d, - CORBA::Double tol2d, - CORBA::Short nbiter) - throw (SALOME::SALOME_Exception) ; - // Sewing of shapes - GEOM::GEOM_Shape_ptr MakeSewing(const GEOM::GEOM_Gen::ListOfIOR& ListShapes, - CORBA::Double precision) - throw (SALOME::SALOME_Exception) ; - - GEOM::GEOM_Shape_ptr MakeSewingShape( GEOM::GEOM_Shape_ptr aShape, - CORBA::Double precision ) - throw (SALOME::SALOME_Exception); - - GEOM::GEOM_Shape_ptr MakeGlueFaces(GEOM::GEOM_Shape_ptr myShape, - double tol3d) - throw (SALOME::SALOME_Exception); - - // Change the orientation of a (new) shape - GEOM::GEOM_Shape_ptr OrientationChange(GEOM::GEOM_Shape_ptr shape) - throw (SALOME::SALOME_Exception) ; - - GEOM::GEOM_Shape_ptr MakePlacedBox(CORBA::Double x1, CORBA::Double y1, CORBA::Double z1, - CORBA::Double delta1, CORBA::Double delta2, CORBA::Double delta3) - throw (SALOME::SALOME_Exception) ; - - GEOM::GEOM_Shape_ptr MakePanel(GEOM::GEOM_Shape_ptr shape, - CORBA::Short directiontype, - CORBA::Double delta) - throw (SALOME::SALOME_Exception) ; - - //---------------------------------------------------------------------// - // Transformations Operations // - //---------------------------------------------------------------------// - // Copy - GEOM::GEOM_Shape_ptr MakeCopy( GEOM::GEOM_Shape_ptr shape) - throw (SALOME::SALOME_Exception) ; - - // Translation - GEOM::GEOM_Shape_ptr MakeTranslation( GEOM::GEOM_Shape_ptr shape, - CORBA::Double x, - CORBA::Double y, - CORBA::Double z) - throw (SALOME::SALOME_Exception) ; - // Rotation - GEOM::GEOM_Shape_ptr MakeRotation( GEOM::GEOM_Shape_ptr shape, - const GEOM::AxisStruct& axis, - CORBA::Double angle) - throw (SALOME::SALOME_Exception) ; - // Create a shape using a scale factor - GEOM::GEOM_Shape_ptr MakeScaleTransform(GEOM::GEOM_Shape_ptr shape, - const GEOM::PointStruct& theCenterOfScale, - CORBA::Double factor) - throw (SALOME::SALOME_Exception) ; - // Mirror of a shape by a plane - GEOM::GEOM_Shape_ptr MakeMirrorByPlane(GEOM::GEOM_Shape_ptr shape, - GEOM::GEOM_Shape_ptr shapePlane) - throw (SALOME::SALOME_Exception) ; - - // Shape by revolution of another around an axis - GEOM::GEOM_Shape_ptr MakeRevolution(GEOM::GEOM_Shape_ptr shape, - const GEOM::AxisStruct& axis, - CORBA::Double angle) - throw (SALOME::SALOME_Exception) ; - - // Create a prism with a base shape along a vector P1 to P2 - GEOM::GEOM_Shape_ptr MakePrism(GEOM::GEOM_Shape_ptr baseShape, - const GEOM::PointStruct& P1, - const GEOM::PointStruct& P2) - throw (SALOME::SALOME_Exception) ; - // Create a shape by sweeping a baseShape along a pathShape - GEOM::GEOM_Shape_ptr MakePipe(GEOM::GEOM_Shape_ptr pathShape, - GEOM::GEOM_Shape_ptr baseShape) - throw (SALOME::SALOME_Exception) ; - - //---------------------------------------------------------------------// - // Patterns Operations // - //---------------------------------------------------------------------// - - // Multi Translation 1D - GEOM::GEOM_Shape_ptr MakeMultiTranslation1D( GEOM::GEOM_Shape_ptr shape, - const GEOM::DirStruct& dir, - CORBA::Double step, - CORBA::Short nbtimes) - throw (SALOME::SALOME_Exception) ; - - // Multi Translation 2D - GEOM::GEOM_Shape_ptr MakeMultiTranslation2D( GEOM::GEOM_Shape_ptr shape, - const GEOM::DirStruct& dir1, - CORBA::Double step1, - CORBA::Short nbtimes1, - const GEOM::DirStruct& dir2, - CORBA::Double step2, - CORBA::Short nbtimes2) - throw (SALOME::SALOME_Exception) ; - - // Multi Rotation 1D - GEOM::GEOM_Shape_ptr MakeMultiRotation1D( GEOM::GEOM_Shape_ptr shape, - const GEOM::DirStruct& dir, - const GEOM::PointStruct& loc, - CORBA::Short nbtimes) - throw (SALOME::SALOME_Exception) ; - - // Multi Rotation 2D - GEOM::GEOM_Shape_ptr MakeMultiRotation2D( GEOM::GEOM_Shape_ptr shape, - const GEOM::DirStruct& dir, - const GEOM::PointStruct& loc, - CORBA::Double ang, - CORBA::Short nbtimes1, - CORBA::Double step, - CORBA::Short nbtimes2) - throw (SALOME::SALOME_Exception) ; - - //--------------------------------------------------------------------// - // Primitives Construction // - //--------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr MakeBox(CORBA::Double x1, - CORBA::Double y1, - CORBA::Double z1, - CORBA::Double x2, - CORBA::Double y2, - CORBA::Double z2) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeSphere(CORBA::Double x1, - CORBA::Double y1, - CORBA::Double z1, - CORBA::Double radius) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeCylinder(const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruct, - CORBA::Double radius, - CORBA::Double height) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeTorus(const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruct, - CORBA::Double major_radius, - CORBA::Double minor_radius) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeCone(const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruct, - CORBA::Double radius1, - CORBA::Double radius2, - CORBA::Double height) - throw (SALOME::SALOME_Exception) ; - - //-------------------------------------------------------------------// - // Import/Export // - //-------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr ImportIGES(const char* filename) throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr ImportBREP(const char* filename) throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr ImportSTEP(const char* filename) throw (SALOME::SALOME_Exception) ; - - void ExportIGES(const char* filename,GEOM::GEOM_Shape_ptr theShape) throw (SALOME::SALOME_Exception) ; - void ExportBREP(const char* filename,GEOM::GEOM_Shape_ptr theShape) throw (SALOME::SALOME_Exception) ; - void ExportSTEP(const char* filename,GEOM::GEOM_Shape_ptr theShape) throw (SALOME::SALOME_Exception) ; - //-------------------------------------------------------------------// - // Fillet and Chamfer construction // - //-------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr MakeFillet (GEOM::GEOM_Shape_ptr shape, - CORBA::Double radius, - CORBA::Short ShapeType, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID) - throw (SALOME::SALOME_Exception) ; - - GEOM::GEOM_Shape_ptr MakeChamfer(GEOM::GEOM_Shape_ptr shape, - CORBA::Double d1, - CORBA::Double d2, - CORBA::Short ShapeType, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID) - throw (SALOME::SALOME_Exception) ; - - //-------------------------------------------------------------------// - // Mesures Construction // - //-------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr MakeCDG(GEOM::GEOM_Shape_ptr shape) - throw (SALOME::SALOME_Exception) ; - - //-------------------------------------------------------------------// - // Check Shape // - //-------------------------------------------------------------------// - CORBA::Boolean CheckShape(GEOM::GEOM_Shape_ptr shape) - throw (SALOME::SALOME_Exception) ; - - //-------------------------------------------------------------------// - // Primitives Construction // - //-------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr MakeVertex(CORBA::Double x, - CORBA::Double y, - CORBA::Double z) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeVector(const GEOM::PointStruct& pstruct1, - const GEOM::PointStruct& pstruct2) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeLine (const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruc) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakePlane (const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruc, - CORBA::Double trimsize) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeCircle(const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruct, - CORBA::Double radius) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeEllipse(const GEOM::PointStruct& pstruct, - const GEOM::DirStruct& dstruct, - CORBA::Double radius_major, - CORBA::Double radiusminus ) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeArc (const GEOM::PointStruct& pInit, - const GEOM::PointStruct& pCircle, - const GEOM::PointStruct& pEnd) - throw (SALOME::SALOME_Exception) ; - - //-------------------------------------------------------------------// - // Specific method Sketcher // - //-------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr MakeSketcher (const char* Cmd) - throw (SALOME::SALOME_Exception) ; - - //-------------------------------------------------------------------// - - GEOM::GEOM_Shape_ptr MakeCompound (const GEOM::GEOM_Gen::ListOfIOR& ListShapes) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeWire (const GEOM::GEOM_Gen::ListOfIOR& ListShapes) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeEdge (const GEOM::PointStruct& pstruct1, - const GEOM::PointStruct& pstruct2) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeFace (GEOM::GEOM_Shape_ptr wire, CORBA::Boolean wantplanarface) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeFaces (const GEOM::GEOM_Gen::ListOfIOR& ListShapes, - CORBA::Boolean wantplanarface) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeShell (const GEOM::GEOM_Gen::ListOfIOR& ListShapes) - throw (SALOME::SALOME_Exception) ; - GEOM::GEOM_Shape_ptr MakeSolid (const GEOM::GEOM_Gen::ListOfIOR& ListShapes) - throw (SALOME::SALOME_Exception) ; - - - //-------------------------------------------------------------------// - // Speciic method Archimede // - //-------------------------------------------------------------------// - GEOM::GEOM_Shape_ptr Archimede(GEOM::GEOM_Shape_ptr aShape, - CORBA::Double aWeight, - CORBA::Double aWaterDensity, - CORBA::Double aMeshingDeflection) - throw (SALOME::SALOME_Exception) ; - -}; - -#endif diff --git a/src/GEOM/GEOM_IOperations.cxx b/src/GEOM/GEOM_IOperations.cxx new file mode 100644 index 000000000..e851ce116 --- /dev/null +++ b/src/GEOM/GEOM_IOperations.cxx @@ -0,0 +1,84 @@ +using namespace std; + +#include "GEOM_IOperations.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include + +//============================================================================= +/*! + * default constructor: + */ +//============================================================================= + +GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine, int theDocID) +: _engine(theEngine), _docID(theDocID) +{ + _solver = new GEOM_Solver(theEngine); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOM_IOperations::~GEOM_IOperations() +{ + delete _solver; + MESSAGE("GEOM_IOperations::~GEOM_IOperations"); +} + + +//============================================================================= +/*! + * StartOperation + */ +//============================================================================= +void GEOM_IOperations::StartOperation() +{ + Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID); + if(aDoc->GetUndoLimit() > 0) + aDoc->NewCommand(); +} + + //============================================================================= + /*! + * FinishOperation + */ +//============================================================================= +void GEOM_IOperations::FinishOperation() +{ + Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID); + if(aDoc->GetUndoLimit() > 0) + aDoc->CommitCommand(); +} + +//============================================================================= +/*! + * AbortOperation + */ +//============================================================================= +void GEOM_IOperations::AbortOperation() +{ + Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID); + aDoc->AbortCommand(); +} + + +//============================================================================= +/*! + * IsDone + */ +//============================================================================= +bool GEOM_IOperations::IsDone() +{ + return (_errorCode == OK); +} + + diff --git a/src/GEOM/GEOM_IOperations.hxx b/src/GEOM/GEOM_IOperations.hxx new file mode 100644 index 000000000..a14614c1b --- /dev/null +++ b/src/GEOM/GEOM_IOperations.hxx @@ -0,0 +1,66 @@ + +#ifndef _GEOM_IOperations_HXX_ +#define _GEOM_IOperations_HXX_ + +#include "GEOM_Engine.hxx" +#include +#include +#include "GEOM_Object.hxx" +#include "GEOM_Solver.hxx" + +#define OK "PAL_NO_ERROR" +#define KO "PAL_NOT_DONE_ERROR" +#define ALREADY_PRESENT "PAL_ELEMENT_ALREADY_PRESENT" +#define NOT_EXISTS "PAL_ELEMENT_DOES_NOT_EXISTS" +#define INVALID_TYPE "INVALID_TYPE_OF_ELEMENT" + +class GEOM_IOperations +{ + public: + GEOM_IOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOM_IOperations(); + + //Starts a new operation (opens a tansaction) + void StartOperation(); + + //Finishes the previously started operation (closes the transaction) + void FinishOperation(); + + //Aborts the operation + void AbortOperation(); + + //Returns true if the last operation succided + bool IsDone(); + + //Sets Not done error code + void SetNotDone() { _errorCode = KO; } + + //Sets an error code of the operation + void SetErrorCode(const TCollection_AsciiString& theErrorCode) { + _errorCode = theErrorCode; + } + + //Returns an error code of the last operatioin + char* GetErrorCode() { + return _errorCode.ToCString(); + } + + //Returns a pointer to GEOM_Engine which this operation interface is associated + GEOM_Engine* GetEngine() { return _engine; } + + //Return a pointer to Solver associated with this operation interface + GEOM_Solver* GetSolver() { return _solver; } + + //Returns an ID of the OCAF document where this operation stores the data + int GetDocID() { return _docID; } + + private: + + TCollection_AsciiString _errorCode; + GEOM_Engine* _engine; + GEOM_Solver* _solver; + int _docID; + +}; + +#endif diff --git a/src/GEOM/GEOM_ISubShape.hxx b/src/GEOM/GEOM_ISubShape.hxx new file mode 100644 index 000000000..7ddf8919c --- /dev/null +++ b/src/GEOM/GEOM_ISubShape.hxx @@ -0,0 +1,34 @@ +// NOTE: This is an intreface to a function for the Shapes +// (Wire, Face, Shell, Solid and Compound) creation. + + +#include "GEOM_Function.hxx" + +#include "TColStd_HSequenceOfTransient.hxx" +#include "TColStd_HArray1OfInteger.hxx" + +#define SHAPE_ARG_MAIN_SHAPE 1 +#define SHAPE_ARG_INDICES 2 +#define SHAPE_ARG_SORTED 3 + +class GEOM_ISubShape +{ + public: + + GEOM_ISubShape(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetMainShape(Handle(GEOM_Function) theRefBase) + { _func->SetReference(SHAPE_ARG_MAIN_SHAPE, theRefBase); } + + Handle(GEOM_Function) GetMainShape() { return _func->GetReference(SHAPE_ARG_MAIN_SHAPE); } + + void SetIndices(const Handle(TColStd_HArray1OfInteger)& theIndices) + { _func->SetIntegerArray(SHAPE_ARG_INDICES, theIndices); } + + Handle(TColStd_HArray1OfInteger) GetIndices() + { return _func->GetIntegerArray(SHAPE_ARG_INDICES); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOM/GEOM_Object.cxx b/src/GEOM/GEOM_Object.cxx new file mode 100644 index 000000000..0fbfacbc7 --- /dev/null +++ b/src/GEOM/GEOM_Object.cxx @@ -0,0 +1,404 @@ +using namespace std; + +#include "GEOM_Object.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Solver.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TYPE 2 +#define FUNCTION_LABEL(theNb) (_label.FindChild(1).FindChild((theNb))) +#define FREE_LABEL 3 + +//======================================================================= +//function : GetObjectID +//purpose : +//======================================================================= +const Standard_GUID& GEOM_Object::GetObjectID() +{ + static Standard_GUID anObjectID("FF1BBB01-5D14-4df2-980B-3A668264EA16"); + return anObjectID; +} + +//======================================================================= +//function : GetSubShapeID +//purpose : +//======================================================================= +const Standard_GUID& GEOM_Object::GetSubShapeID() +{ + static Standard_GUID anObjectID("FF1BBB68-5D14-4df2-980B-3A668264EA16"); + return anObjectID; +} + +//============================================================================= +/*! + * GetObject + */ +//============================================================================= +Handle(GEOM_Object) GEOM_Object::GetObject(TDF_Label& theLabel) +{ + if (!theLabel.IsAttribute(GetObjectID())) return NULL; + + TCollection_AsciiString anEntry; + TDF_Tool::Entry(theLabel, anEntry); + + Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data()); + if(aDoc.IsNull()) return NULL; + + Handle(TDataStd_Integer) anID; + if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL; + + + GEOM_Engine* anEngine= GEOM_Engine::GetEngine(); + if(anEngine == NULL) return NULL; + return anEngine->GetObject(anID->Get(), anEntry.ToCString()); +} + +//============================================================================= +/*! + * GetReferencedObject + */ +//============================================================================= +Handle(GEOM_Object) GEOM_Object::GetReferencedObject(TDF_Label& theLabel) +{ + Handle(TDF_Reference) aRef; + if (!theLabel.FindAttribute(TDF_Reference::GetID(), aRef)) return NULL; + + // Get TreeNode of a referenced function + Handle(TDataStd_TreeNode) aT, aFather; + if (!TDataStd_TreeNode::Find(aRef->Get(), aT)) return NULL; + + // Get TreeNode of Object of the referenced function + aFather = aT->Father(); + if (aFather.IsNull()) return NULL; + + // Get label of the referenced object + TDF_Label aLabel = aFather->Label(); + + + return GEOM_Object::GetObject(aLabel); +} + +//============================================================================= +/*! + * Constructor: private + */ +//============================================================================= +GEOM_Object::GEOM_Object(TDF_Label& theEntry) +: _label(theEntry), _ior("") +{ + if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root)) + _root = TDataStd_TreeNode::Set(theEntry); +} + +//============================================================================= +/*! + * Constructor: public + */ +//============================================================================= +GEOM_Object::GEOM_Object(TDF_Label& theEntry, int theType) +: _label(theEntry), _ior("") +{ + theEntry.ForgetAllAttributes(Standard_True); + + if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root)) + _root = TDataStd_TreeNode::Set(theEntry); + + TDataStd_Integer::Set(theEntry.FindChild(TYPE), theType); + + TDataStd_UAttribute::Set(theEntry, GetObjectID()); +} + +//============================================================================= +/*! + * GetType + */ +//============================================================================= +int GEOM_Object::GetType() +{ + Handle(TDataStd_Integer) aType; + if(!_label.FindChild(TYPE).FindAttribute(TDataStd_Integer::GetID(), aType)) return -1; + + return aType->Get(); +} + +//============================================================================= +/*! + * SetType + */ +//============================================================================= +void GEOM_Object::SetType(int theType) +{ + TDataStd_Integer::Set(_label.FindChild(TYPE), theType); + return; +} + + +//============================================================================= +/*! + * GetDocID + */ +//============================================================================= +int GEOM_Object::GetDocID() +{ + Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data()); + if(aDoc.IsNull()) return -1; + + Handle(TDataStd_Integer) anID; + if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return -1; + + return anID->Get(); +} + + +//============================================================================= +/*! + * GetValue + */ +//============================================================================= +TopoDS_Shape GEOM_Object::GetValue() +{ + TopoDS_Shape aShape; + + Handle(GEOM_Function) aFunction = GetLastFunction(); + + if (!aFunction.IsNull()) + aShape = aFunction->GetValue(); + + return aShape; +} + +//============================================================================= +/*! + * SetName + */ +//============================================================================= +void GEOM_Object::SetName(const char* theName) +{ + TDataStd_Name::Set(_label, (char*)theName); +} + +//============================================================================= +/*! + * GetName + */ +//============================================================================= +char* GEOM_Object::GetName() +{ + Handle(TDataStd_Name) aNameAttr; + if(!_label.FindAttribute(TDataStd_Name::GetID(), aNameAttr)) return NULL; + + TCollection_AsciiString aName(aNameAttr->Get()); + return aName.ToCString(); +} + +//============================================================================= +/*! + * SetAuxData + */ +//============================================================================= +void GEOM_Object::SetAuxData(const char* theData) +{ + TDataStd_Comment::Set(_label, (char*)theData); +} + +//============================================================================= +/*! + * GetAuxData + */ +//============================================================================= +char* GEOM_Object::GetAuxData() +{ + Handle(TDataStd_Comment) aCommentAttr; + if(!_label.FindAttribute(TDataStd_Comment::GetID(), aCommentAttr)) return NULL; + + TCollection_AsciiString aData(aCommentAttr->Get()); + return aData.ToCString(); +} + + +//============================================================================= +/*! + * IsSubShape + */ +//============================================================================= +bool GEOM_Object::IsMainShape() +{ + Handle(GEOM_Function) aFunction = GetFunction(1); + if(aFunction == NULL || aFunction->GetDriverGUID() != GetSubShapeID()) return true; + return false; +} + + +//============================================================================= +/*! + * AddFunction + */ +//============================================================================= +Handle(GEOM_Function) GEOM_Object::AddFunction(const Standard_GUID& theGUID, int theFunctionType) +{ + Standard_Integer nb = GetNbFunctions(); + if(nb == 1 && theGUID == GetSubShapeID()) return NULL; //It's impossible to add a function to sub shape + nb++; + TDF_Label aChild = FUNCTION_LABEL(nb); + + Handle(TDataStd_TreeNode) aNode = TDataStd_TreeNode::Set(aChild); + _root->Append(aNode); + + Handle(GEOM_Function) aFunction = new GEOM_Function(aChild, theGUID, theFunctionType); + + return aFunction; + +} + +//============================================================================= +/*! + * GetNbFunctions + */ +//============================================================================= +int GEOM_Object::GetNbFunctions() +{ + Standard_Integer nb = 0; + for(TDataStd_ChildNodeIterator CI(_root); CI.More(); CI.Next()) nb++; + return nb; +} + +//============================================================================= +/*! + * GetFunction + */ +//============================================================================= +Handle(GEOM_Function) GEOM_Object::GetFunction(int theFunctionNumber) +{ + TDF_Label aChild = FUNCTION_LABEL(theFunctionNumber); + return GEOM_Function::GetFunction(aChild); +} + +//============================================================================= +/*! + * GetlastFunction + */ +//============================================================================= +Handle(GEOM_Function) GEOM_Object::GetLastFunction() +{ + Standard_Integer nb = GetNbFunctions(); + if(nb) return GetFunction(nb); + + return NULL; +} + + +//============================================================================= +/*! + * GetAllDependency + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOM_Object::GetAllDependency() +{ + Handle(TColStd_HSequenceOfTransient) anArray; + TDF_LabelSequence aSeq; + Standard_Integer nb = GetNbFunctions(); + if(nb == 0) return anArray; + for(Standard_Integer i=1; i<=nb; i++) { + Handle(GEOM_Function) aFunction = GetFunction(i); + if(aFunction.IsNull()) continue; + aFunction->GetDependency(aSeq); + } + + Standard_Integer aLength = aSeq.Length(); + if(aLength > 0) { + anArray = new TColStd_HSequenceOfTransient; + for(Standard_Integer j =1; j<=aLength; j++) + anArray->Append(GetReferencedObject(aSeq(j))); + } + + return anArray; +} + +//============================================================================= +/*! + * GetLastDependency + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOM_Object::GetLastDependency() +{ + Handle(TColStd_HSequenceOfTransient) anArray; + Handle(GEOM_Function) aFunction = GetLastFunction(); + if (aFunction.IsNull()) return anArray; + + TDF_LabelSequence aSeq; + aFunction->GetDependency(aSeq); + Standard_Integer aLength = aSeq.Length(); + if (aLength > 0) { + anArray = new TColStd_HSequenceOfTransient; + for (Standard_Integer i = 1; i <= aLength; i++) + anArray->Append(GetReferencedObject(aSeq(i))); + } + + return anArray; +} + +//============================================================================= +/*! + * GetFreeLabel + */ +//============================================================================= +TDF_Label GEOM_Object::GetFreeLabel() +{ + return _label.FindChild(FREE_LABEL); +} + +//======================================================================= +//function : GEOM_Object_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOM_Object_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOM_Object", + sizeof(GEOM_Object), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOM_Object) Handle(GEOM_Object)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOM_Object) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOM_Object))) { + _anOtherObject = Handle(GEOM_Object)((Handle(GEOM_Object)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOM/GEOM_Object.hxx b/src/GEOM/GEOM_Object.hxx new file mode 100644 index 000000000..0d1571d71 --- /dev/null +++ b/src/GEOM/GEOM_Object.hxx @@ -0,0 +1,237 @@ +#ifndef _GEOM_Object_HeaderFile +#define _GEOM_Object_HeaderFile + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_MMgt_TShared_HeaderFile +#include +#endif +#ifndef _MMgt_TShared_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TDF_Label_HeaderFile +#include +#endif +#ifndef _TColStd_HSequenceOfTransient_HeaderFile +#include +#endif +#ifndef _TCollection_AsciiString_HeaderFile +#include +#endif + +class Handle_TColStd_HSequenceOfTransient; +class Standard_Transient; +class Handle_Standard_Type; +class Handle(MMgt_TShared); +class GEOM_Object; + + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_Object); + +class Handle(GEOM_Object) : public Handle(MMgt_TShared) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOM_Object)():Handle(MMgt_TShared)() {} + Handle(GEOM_Object)(const Handle(GEOM_Object)& aHandle) : Handle(MMgt_TShared)(aHandle) + { + } + + Handle(GEOM_Object)(const GEOM_Object* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) + { + } + + Handle(GEOM_Object)& operator=(const Handle(GEOM_Object)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOM_Object)& operator=(const GEOM_Object* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOM_Object* operator->() + { + return (GEOM_Object *)ControlAccess(); + } + + GEOM_Object* operator->() const + { + return (GEOM_Object *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOM_Object)() {}; + + Standard_EXPORT static const Handle(GEOM_Object) DownCast(const Handle(Standard_Transient)& AnObject); +}; + + + +#include +#include +#include "GEOM_Function.hxx" +#include "GEOM_Engine.hxx" + + +class GEOM_Object : public MMgt_TShared +{ + friend class GEOM_Engine; + + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& GEOM_Object_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOM_Object) ; } + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_Object) == AType || MMgt_TShared::IsKind(AType)); } + + private: + GEOM_Object(TDF_Label& theLabel); + + public: + GEOM_Object(TDF_Label& theEntry, int theType); + ~GEOM_Object() {;} + + //Finds a GEOM_Object on the label theLabel + static Handle(GEOM_Object) GetObject(TDF_Label& theLabel); + + //Finds a GEOM_Object by a reference, stored on the label theLabel + static Handle(GEOM_Object) GetReferencedObject(TDF_Label& theLabel); + + //Returns a GEOM_Object common GUID + static const Standard_GUID& GetObjectID(); + + //Returns a GUID associated with a sub shape object + static const Standard_GUID& GetSubShapeID(); + + //########################################################### + //Access to properties + //########################################################### + + //Returns a TreeNode that presents a root of a function tree for this GEOM_Object + Handle(TDataStd_TreeNode) GetRootNode() { return _root; } + + //Returns a label of this GEOM_Object + TDF_Label GetEntry() { return _label; } + + //Returns a type of this GEOM_Object (GEOM_POINT, GEOM_VECTOR...) + int GetType(); + + //Sets the type of this GEOM_Object + void SetType(int theType); + + //Returns an ID of the OCAF document where this GEOM_Object is stored + int GetDocID(); + + //Returns a value (as TopoDS_Shape) of this GEOM_Object + TopoDS_Shape GetValue(); + + //Sets a name of this GEOM_Object + void SetName(const char* theName); + + //Returns a name of this GEOM_Object + char* GetName(); + + //Sets an auxiliary data + void SetAuxData(const char* theData); + + //Returns an auxiliary data + char* GetAuxData(); + + //########################################################### + // Sub shape methods + //########################################################### + + //Returns false if the object is a sub shape of another object + bool IsMainShape(); + + //########################################################### + // CORBA related methods + //########################################################### + + //Sets an IOR of CORBA GEOM_Object_i which refers to this object + void SetIOR(TCollection_AsciiString& theIOR) { _ior = theIOR; } + + //Returns an IOR of CORBA GEOM_Object_i which refers to this object + TCollection_AsciiString GetIOR() { return _ior; } + + //########################################################### + //Functions methods + //########################################################### + + //Adds a function with a driver GUID = theGUID and a type theFunctionType to the function tree of this GEOM_Object + Handle(GEOM_Function) AddFunction(const Standard_GUID& theGUID, int theFunctionType); + + //Returns a number of functions of this GEOM_Object + int GetNbFunctions(); + + //Returns a function with given number theFunctionNumber + Handle(GEOM_Function) GetFunction(int theFunctionNumber); + + //Return the last function of this GEOM_Object + Handle(GEOM_Function) GetLastFunction(); + + //Returns all dependencies of the object + Handle(TColStd_HSequenceOfTransient) GetAllDependency(); + + //Returns the dependencies of the last function + Handle(TColStd_HSequenceOfTransient) GetLastDependency(); + + //########################################################### + // Internal methods + //########################################################### + + //Returns a label which could be used to store some additional data + TDF_Label GetFreeLabel(); + + + private: + + Handle(TDataStd_TreeNode) _root; + TDF_Label _label; + TCollection_AsciiString _ior; +}; + +#endif diff --git a/src/GEOM/GEOM_Shape_i.cc b/src/GEOM/GEOM_Shape_i.cc deleted file mode 100644 index bd2110d50..000000000 --- a/src/GEOM/GEOM_Shape_i.cc +++ /dev/null @@ -1,260 +0,0 @@ -// GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOM_Shape_i.cc -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#include -#include - -#include -#include - -#include "GEOM_Shape_i.hh" -#include "SALOME_NamingService.hxx" - -using namespace std; - - -//================================================================================= -// function : GEOM_Shape_i() constructor (no arguments) -// purpose : for what now ? -//================================================================================= -GEOM_Shape_i::GEOM_Shape_i() { } - - - -//================================================================================= -// function : constructor -// purpose : constructor for servant creation -//================================================================================= -GEOM_Shape_i::GEOM_Shape_i(TopoDS_Shape geom, - CORBA::ORB_ptr orb, - GEOM::GEOM_Gen_ptr engine, - const GEOM::GEOM_Shape::ListOfSubShapeID& index, - GEOM::shape_type sht, - bool ismain) { - _geom = geom; - _orb = orb; - _engine = engine; - _shapetype = sht ; - _ismain = ismain; - _index = index ; - - _shapeid = ""; - _studyshapeid = ""; - - _name = ""; - _mainname =""; - _nametype =""; - -} - - - -//================================================================================= -// function : destructor -// purpose : deleting the internal geometry structure -//================================================================================= -GEOM_Shape_i::~GEOM_Shape_i() { delete &_geom; } - - -//================================================================================= -// function : Name (set method) -// purpose : to set the attribute 'name' of this shape. -// : WARNING : Register to naming service actually removed ! -//================================================================================= -void GEOM_Shape_i::Name(const char* name) { - _name = CORBA::string_dup(name); - GEOM::GEOM_Shape_ptr g = GEOM::GEOM_Shape::_narrow(_this()); - - // Removed declaration of shapes to naming service - //SALOME_NamingService * ns = new SALOME_NamingService(_orb); - //ns->Register(g, _name); -} - - -//================================================================================= -// function : Name (get method) -// purpose : to get the attribute 'name' of this shape -//================================================================================= -char* GEOM_Shape_i::Name() { return CORBA::string_dup(_name); } - -//================================================================================= -// function : MainName (set method) -// purpose : to set the attribute 'name' of this mainshape. -//================================================================================= -void GEOM_Shape_i::MainName(const char* name) { - _mainname = CORBA::string_dup(name); -} - - -//================================================================================= -// function : MainName (get method) -// purpose : to get the attribute 'name' of this shape -//================================================================================= -char* GEOM_Shape_i::MainName() { return CORBA::string_dup(_mainname); } - -//================================================================================= -// function : IsMainShape (get method) -// purpose : return 'true' if this is a main shape (not a sub shape) -//================================================================================= -bool GEOM_Shape_i::IsMainShape() { return _ismain ; } - - -//================================================================================= -// function : IsMainShape (set method) -// purpose : to set the property 'ismain' true or false of this shape -//================================================================================= -void GEOM_Shape_i::IsMainShape(const bool abool) { _ismain = abool ; } - - -//================================================================================= -// function : ShapeId -// purpose : to get the id of this shape from GEOM (OCAF entry) -//================================================================================= -char* GEOM_Shape_i::ShapeId() { return CORBA::string_dup(_shapeid) ; } - - -//================================================================================= -// function : ShapeId (set method) -// purpose : to set the id of this shape in GEOM/OCAF doc -//================================================================================= -void GEOM_Shape_i::ShapeId(const char * shapeid) { _shapeid = CORBA::string_dup(shapeid) ; } - - - -//================================================================================= -// function : StudyShapeId (get method) -// purpose : to get the id of this shape from the study document (OCAF entry) -//================================================================================= -char* GEOM_Shape_i::StudyShapeId() { return CORBA::string_dup(_studyshapeid) ; } - - -//================================================================================= -// function : StudyShapeId (set method) -// purpose : to set the id of this shape in the Study document (OCAF entry) -//================================================================================= -void GEOM_Shape_i::StudyShapeId(const char * studyshapeid) -{ _studyshapeid = CORBA::string_dup(studyshapeid) ; } - - - -//================================================================================= -// function : Index (get method) -// purpose : to get the index of this sub shape in its main shape -//================================================================================= -GEOM::GEOM_Shape::ListOfSubShapeID* GEOM_Shape_i::Index() { - unsigned int _length = _index.length(); - GEOM::GEOM_Shape::ListOfSubShapeID_var _list = new GEOM::GEOM_Shape::ListOfSubShapeID; - _list->length(_length); - - for (unsigned int ind = 0; ind < _length; ind++) { - _list[ind] = _index[ind]; - } - - return _list._retn() ; -} - - -//================================================================================= -// function : Index (set method) -// purpose : to set the index of this sub shape (in a main shape) -//================================================================================= -void GEOM_Shape_i::Index(const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfSubShapeID) -{ _index = ListOfSubShapeID ; } - - -//================================================================================= -// function : ShapeType (get method) -// purpose : to get the topological type of this shape as defined in enum of IDL file -//================================================================================= -GEOM::shape_type GEOM_Shape_i::ShapeType() { return _shapetype ; } - - -//================================================================================= -// function : SetType (set method) -// purpose : to set the topological type of this shape (see GetType) -//================================================================================= -void GEOM_Shape_i::ShapeType(GEOM::shape_type sht) { _shapetype = sht ; } - - -//================================================================================= -// function : NameType (set method) -// purpose : to set the attribute 'nametype' of this shape. -//================================================================================= -void GEOM_Shape_i::NameType(const char* name) { -} - -//================================================================================= -// function : NameType (get method) -// purpose : to get the attribute 'nametype' of this shape -//================================================================================= -char* GEOM_Shape_i::NameType() { return CORBA::string_dup(_nametype); } - -//================================================================================= -// function : GetShapeStream -// Transfer resulting shape to client as sequence of bytes -//client can extract shape from stream using BrepTools::Read function -//================================================================================= -GEOM::GEOM_Shape::TMPFile* GEOM_Shape_i::GetShapeStream() -{ - ostrstream streamShape; - //Write TopoDS_Shape in ASCII format to the stream - BRepTools::Write(_geom, streamShape); - //Returns the number of bytes that have been stored in the stream's buffer. - int size = streamShape.pcount(); - char* buf = new char [size]; - //Get pointer on internal character array in ostrstream - char* valueOfStream = streamShape.str(); - //Create copy of ostrstream content - memcpy(buf, valueOfStream, size); - //Allow automatic deletion of ostrstream content - streamShape.rdbuf()->freeze(0); - - CORBA::Octet* OctetBuf = (CORBA::Octet*)buf; - GEOM::GEOM_Shape::TMPFile_var SeqFile = new GEOM::GEOM_Shape::TMPFile(size,size,OctetBuf,1); - return SeqFile._retn(); - -} - -//======================================================================= -//function : Engine -//purpose : return generator engine -//======================================================================= - -GEOM::GEOM_Gen_ptr GEOM_Shape_i::Engine() -{ - return _engine; -} - -//======================================================================= -//function : getShape -//purpose : return the TopoDS_Shape when client and servant are colocated, be careful -//======================================================================= - -long GEOM_Shape_i::getShape() { - return((long)(&_geom)); -} diff --git a/src/GEOM/GEOM_Shape_i.hh b/src/GEOM/GEOM_Shape_i.hh deleted file mode 100644 index bf114b937..000000000 --- a/src/GEOM/GEOM_Shape_i.hh +++ /dev/null @@ -1,119 +0,0 @@ -// GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOM_Shape_i.hh -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#ifndef __GEOM_SHAPE_I_H__ -#define __GEOM_SHAPE_I_H__ - -// SALOME config header -#include - -// Standard C++ headers -#include - -// IDL headers -#include CORBA_SERVER_HEADER(GEOM_Gen) -#include CORBA_SERVER_HEADER(GEOM_Shape) - -// Cascade headers -#include -#include -#include -#include -#include -#include - - -//===================================================================== -// GEOM_Shape_i : class definition -//===================================================================== -class GEOM_Shape_i: public POA_GEOM::GEOM_Shape, - public PortableServer::RefCountServantBase { -private: - - TopoDS_Shape _geom; - CORBA::ORB_ptr _orb; - GEOM::GEOM_Gen_ptr _engine; - - GEOM::shape_type _shapetype ; // enum defined in the IDL file (Occ topol. type of a shape) - bool _ismain; - GEOM::GEOM_Shape::ListOfSubShapeID _index; - char* _name; - char* _mainname; - char* _shapeid; - char* _studyshapeid; // exists only if added in the study document - char* _nametype; - - -public: - - // no-arg constructor, doing nothing (for now ?) - GEOM_Shape_i(); - - // constructor to be called for servant creation - GEOM_Shape_i(TopoDS_Shape geom, - CORBA::ORB_ptr orb, - GEOM::GEOM_Gen_ptr engine, - const GEOM::GEOM_Shape::ListOfSubShapeID& index, - GEOM::shape_type sht = GEOM::SHAPE, - bool ismain = true); - - // destructor deleting the internal geometry structure - ~GEOM_Shape_i(); - - char* Name(); - void Name(const char* name); - - char* MainName(); - void MainName(const char* name); - - char* NameType(); - void NameType(const char* name); - - bool IsMainShape(); - void IsMainShape(const bool abool); - - char* ShapeId(); - void ShapeId(const char* shapeid); - - char* StudyShapeId(); - void StudyShapeId(const char* studyshapeid); - - GEOM::GEOM_Shape::ListOfSubShapeID* Index(); - void Index(const GEOM::GEOM_Shape::ListOfSubShapeID&); - - GEOM::shape_type ShapeType(); - void ShapeType(GEOM::shape_type sht); - - GEOM::GEOM_Shape::TMPFile* GetShapeStream(); - - GEOM::GEOM_Gen_ptr Engine(); - - long getShape(); -}; - -#endif diff --git a/src/GEOM/GEOM_Solver.cxx b/src/GEOM/GEOM_Solver.cxx new file mode 100644 index 000000000..bdecce3cd --- /dev/null +++ b/src/GEOM/GEOM_Solver.cxx @@ -0,0 +1,50 @@ + +#include "GEOM_Solver.hxx" +#include +#include +#include +#include +#include +#include "GEOM_Function.hxx" +#include + +//============================================================================= +/*! + * Update + */ +//============================================================================= +bool GEOM_Solver::Update(int theDocID, TDF_LabelSequence& theSeq) +{ + return false; +} + +//============================================================================= +/*! + * UpdateObject + */ +//============================================================================= +bool GEOM_Solver::UpdateObject(Handle(GEOM_Object) theObject, TDF_LabelSequence& theSeq) +{ + return false; +} + +//============================================================================= +/*! + * ComputeFunction + */ +//============================================================================= +bool GEOM_Solver::ComputeFunction(Handle(GEOM_Function) theFunction) +{ + if(theFunction == NULL) return false; + Standard_GUID aGUID = theFunction->GetDriverGUID(); + + Handle(TFunction_Driver) aDriver; + if(!TFunction_DriverTable::Get()->FindDriver(aGUID, aDriver)) return false; + + aDriver->Init(theFunction->GetEntry()); + + TFunction_Logbook aLog; + if(aDriver->Execute(aLog) == 0) return false; + + return true; +} diff --git a/src/GEOM/GEOM_Solver.hxx b/src/GEOM/GEOM_Solver.hxx new file mode 100644 index 000000000..215402f2b --- /dev/null +++ b/src/GEOM/GEOM_Solver.hxx @@ -0,0 +1,34 @@ + +#ifndef _GEOM_Solver_HXX_ +#define _GEOM_Solver_HXX_ + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include "GEOM_Function.hxx" + +#include + +class GEOM_Solver +{ + public: + GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {} + ~GEOM_Solver() {} + + //Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels + //Note: not Implemented + bool Update(int theDocID, TDF_LabelSequence& theSeq); + + //Updates a value of theObject, theSeq will contain a list of touched labels + //Note: not implemented + bool UpdateObject(Handle(GEOM_Object) theObject, TDF_LabelSequence& theSeq); + + //Recomputes a function + bool ComputeFunction(Handle(GEOM_Function) theFunction); + + private: + + GEOM_Engine* _engine; + +}; + +#endif diff --git a/src/GEOM/GEOM_SubShapeDriver.cxx b/src/GEOM/GEOM_SubShapeDriver.cxx new file mode 100644 index 000000000..9e6564752 --- /dev/null +++ b/src/GEOM/GEOM_SubShapeDriver.cxx @@ -0,0 +1,150 @@ + +using namespace std; +#include "GEOM_SubShapeDriver.hxx" +#include "GEOM_ISubShape.hxx" +#include "GEOM_Function.hxx" +#include "GEOM_Object.hxx" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + + +//======================================================================= +//function : GEOM_SubShapeDriver +//purpose : +//======================================================================= +GEOM_SubShapeDriver::GEOM_SubShapeDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOM_SubShapeDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOM_ISubShape aCI (aFunction); + + TDF_Label aLabel = aCI.GetMainShape()->GetOwnerEntry(); + if (aLabel.IsRoot()) return 0; + Handle(GEOM_Object) anObj = GEOM_Object::GetObject(aLabel); + if (anObj.IsNull()) return 0; + TopoDS_Shape aMainShape = anObj->GetValue(); + if (aMainShape.IsNull()) return 0; + + Handle(TColStd_HArray1OfInteger) anIndices = aCI.GetIndices(); + if (anIndices.IsNull() || anIndices->Length() <= 0) return 0; + + BRep_Builder B; + TopoDS_Compound aCompound; + TopoDS_Shape aShape; + + if (anIndices->Length() == 1 && anIndices->Value(1) == -1) { //The empty subshape + B.MakeCompound(aCompound); + aShape = aCompound; + + } else { + + TopTools_IndexedMapOfShape aMapOfShapes; + TopExp::MapShapes(aMainShape, aMapOfShapes); + + if (anIndices->Length() > 1) { + + B.MakeCompound(aCompound); + + for (int i = anIndices->Lower(); i<= anIndices->Upper(); i++) { + if (aMapOfShapes.Extent() < anIndices->Value(i)) + Standard_NullObject::Raise("GEOM_SubShapeDriver::Execute: Index is out of range"); + TopoDS_Shape aSubShape = aMapOfShapes.FindKey(anIndices->Value(i)); + if (aSubShape.IsNull()) continue; + B.Add(aCompound,aSubShape); + } + + aShape = aCompound; + + } else { + + if (aMapOfShapes.Extent() < anIndices->Value(1)) + Standard_NullObject::Raise("GEOM_SubShapeDriver::Execute: Index is out of range"); + aShape = aMapOfShapes.FindKey(anIndices->Value(1)); + } + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOM_SubShapeDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOM_SubShapeDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOM_SubShapeDriver", + sizeof(GEOM_SubShapeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOM_SubShapeDriver) Handle(GEOM_SubShapeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOM_SubShapeDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOM_SubShapeDriver))) { + _anOtherObject = Handle(GEOM_SubShapeDriver)((Handle(GEOM_SubShapeDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOM/GEOM_SubShapeDriver.hxx b/src/GEOM/GEOM_SubShapeDriver.hxx new file mode 100644 index 000000000..a1f9b331e --- /dev/null +++ b/src/GEOM/GEOM_SubShapeDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ShapeDriver.ixx +// Module : GEOM + +#ifndef _GEOM_SubShapeDriver_HeaderFile +#define _GEOM_SubShapeDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOM_SubShapeDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_SubShapeDriver); + +class Handle(GEOM_SubShapeDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOM_SubShapeDriver)():Handle(TFunction_Driver)() {} + Handle(GEOM_SubShapeDriver)(const Handle(GEOM_SubShapeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOM_SubShapeDriver)(const GEOM_SubShapeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOM_SubShapeDriver)& operator=(const Handle(GEOM_SubShapeDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOM_SubShapeDriver)& operator=(const GEOM_SubShapeDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOM_SubShapeDriver* operator->() + { + return (GEOM_SubShapeDriver *)ControlAccess(); + } + + GEOM_SubShapeDriver* operator->() const + { + return (GEOM_SubShapeDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOM_SubShapeDriver)() {}; + + Standard_EXPORT static const Handle(GEOM_SubShapeDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOM_SubShapeDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOM_SubShapeDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOM_SubShapeDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOM_SubShapeDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOM_SubShapeDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOM_SubShapeDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOM/Handle_GEOM_Application.hxx b/src/GEOM/Handle_GEOM_Application.hxx new file mode 100644 index 000000000..f1dfa9edc --- /dev/null +++ b/src/GEOM/Handle_GEOM_Application.hxx @@ -0,0 +1,77 @@ +// File : Handle_GEOM_Application.hxx +// Module : GEOM + +#ifndef _Handle_GEOM_Application_HeaderFile +#define _Handle_GEOM_Application_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TDocStd_Application_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TDocStd_Application); +class GEOM_Application; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SimpleOCAF_Application); + +class Handle(GEOM_Application) : public Handle(TDocStd_Application) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } +// inline void operator delete(void *anAddress, size_t size) +// { +// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); +// } + Handle(GEOM_Application)():Handle(TDocStd_Application)() {} + Handle(GEOM_Application)(const Handle(GEOM_Application)& aHandle) : Handle(TDocStd_Application)(aHandle) + { + } + + Handle(GEOM_Application)(const GEOM_Application* anItem) : Handle(TDocStd_Application)((TDocStd_Application *)anItem) + { + } + + Handle(GEOM_Application)& operator=(const Handle(GEOM_Application)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOM_Application)& operator=(const GEOM_Application* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOM_Application* operator->() + { + return (GEOM_Application *)ControlAccess(); + } + + GEOM_Application* operator->() const + { + return (GEOM_Application *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOM_Application)(); + + Standard_EXPORT static const Handle(GEOM_Application) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/GEOM/Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx b/src/GEOM/Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx new file mode 100644 index 000000000..f93d44766 --- /dev/null +++ b/src/GEOM/Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx @@ -0,0 +1,91 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991 - 2000 by +// Matra Datavision SA. All rights reserved. +// +// Copyright (C) 2001 - 2004 by +// Open CASCADE SA. All rights reserved. +// +// This file is part of the Open CASCADE Technology software. +// +// This software may be distributed and/or modified under the terms and +// conditions of the Open CASCADE Public License as defined by Open CASCADE SA +// and appearing in the file LICENSE included in the packaging of this file. +// +// This software is distributed on an "AS IS" basis, without warranty of any +// kind, and Open CASCADE SA hereby disclaims all such warranties, +// including without limitation, any warranties of merchantability, fitness +// for a particular purpose or non-infringement. Please see the License for +// the specific terms and conditions governing rights and limitations under the +// License. + +#ifndef _Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile +#define _Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class GEOM_DataMapNodeOfDataMapOfAsciiStringTransient; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient); + +class Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)():Handle(TCollection_MapNode)() {} + Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)(const Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)(const GEOM_DataMapNodeOfDataMapOfAsciiStringTransient* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)& operator=(const Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)& operator=(const GEOM_DataMapNodeOfDataMapOfAsciiStringTransient* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOM_DataMapNodeOfDataMapOfAsciiStringTransient* operator->() + { + return (GEOM_DataMapNodeOfDataMapOfAsciiStringTransient *)ControlAccess(); + } + + GEOM_DataMapNodeOfDataMapOfAsciiStringTransient* operator->() const + { + return (GEOM_DataMapNodeOfDataMapOfAsciiStringTransient *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient)(); + + Standard_EXPORT static const Handle(GEOM_DataMapNodeOfDataMapOfAsciiStringTransient) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/GEOM/Makefile.in b/src/GEOM/Makefile.in index a15b57b8b..d61a7fa10 100644 --- a/src/GEOM/Makefile.in +++ b/src/GEOM/Makefile.in @@ -1,30 +1,3 @@ -# GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl -# -# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -# -# -# -# File : Makefile.in -# Author : Patrick GOLDBRONN (CEA) -# Module : GEOM -# $Header$ top_srcdir=@top_srcdir@ top_builddir=../.. @@ -36,22 +9,44 @@ VPATH=.:@srcdir@:@top_srcdir@/idl # Libraries targets -LIB = libGEOMEngine.la -LIB_SRC = GEOM_Shape_i.cc GEOM_Gen_i.cc -LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Gen.idl GEOM_Shape.idl +LIB = libGEOMbasic.la +LIB_SRC = GEOM_Application.cxx \ + GEOM_Engine.cxx \ + GEOM_Function.cxx \ + GEOM_Object.cxx \ + GEOM_IOperations.cxx \ + GEOM_Solver.cxx \ + GEOM_SubShapeDriver.cxx \ + GEOM_DataMapNodeOfDataMapOfAsciiStringTransient_0.cxx \ + GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient_0.cxx \ + GEOM_DataMapOfAsciiStringTransient_0.cxx + +LIB_CLIENT_IDL = +LIB_SERVER_IDL = # Executables targets -BIN = -BIN_SRC = +BIN = +BIN_SRC = BIN_CLIENT_IDL = -BIN_SERVER_IDL = - -EXPORT_HEADERS = +BIN_SERVER_IDL = + +# header files +EXPORT_HEADERS= GEOM_Application.hxx \ + Handle_GEOM_Application.hxx \ + GEOM_Engine.hxx \ + GEOM_Function.hxx \ + GEOM_Object.hxx \ + GEOM_IOperations.hxx \ + GEOM_ISubShape.hxx \ + GEOM_Solver.hxx \ + GEOM_DataMapOfAsciiStringTransient.hxx \ + Handle_GEOM_DataMapNodeOfDataMapOfAsciiStringTransient.hxx # additionnal information to compil and link file -CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS) CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lGEOMDS -lTOOLSDS -lSalomeNS -lSalomeContainer -lGEOMPartition -lGEOMArchimede $(CAS_LDPATH) -lTKIGES -lTKSTEP -lTKFillet -lTKOffset -lGEOMSketcher -L${KERNEL_ROOT_DIR}/lib/salome +LDFLAGS += -L${KERNEL_ROOT_DIR}/lib/salome $(CAS_LDPATH) -lTKCAF + # additional file to be cleaned MOSTLYCLEAN = diff --git a/src/GEOM/geom.cxx b/src/GEOM/geom.cxx index 37707e720..81517451a 100644 --- a/src/GEOM/geom.cxx +++ b/src/GEOM/geom.cxx @@ -1,4 +1,4 @@ -// GEOM GEOM : implementaion of GEOM_Gen.idl and GEOM_Shape.idl +// GEOM GEOM : implementaion of GEOM_Gen.idl // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS diff --git a/src/GEOMBase/GEOMBase.cxx b/src/GEOMBase/GEOMBase.cxx index 9e7925e68..878cf93e9 100644 --- a/src/GEOMBase/GEOMBase.cxx +++ b/src/GEOMBase/GEOMBase.cxx @@ -24,27 +24,36 @@ // File : GEOMBase.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ -using namespace std; #include "GEOMBase.h" +#include "GeometryGUI.h" +#include "GEOMBase_aParameterDlg.h" //// SALOME Includes -# include "Utils_ORB_INIT.hxx" -# include "Utils_SINGLETON.hxx" +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" +#include "QAD_Config.h" +#include "QAD_Desktop.h" #include "QAD_RightFrame.h" #include "QAD_MessageBox.h" #include "QAD_Resource.h" +#include "QAD_MessageBox.h" +#include "SALOME_Selection.h" #include "GEOM_AssemblyBuilder.h" +#include "GEOM_Actor.h" #include "VTKViewer_ViewFrame.h" +#include "VTKViewer_RenderWindowInteractor.h" #include "OCCViewer_ViewPort3d.h" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" #include "SALOME_ListIteratorOfListIO.hxx" +#include "GEOM_AISTrihedron.hxx" #include "SALOMEGUI_ImportOperation.h" -#include "SALOMEGUI_NameDlg.h" +#include "SALOMEGUI_NameDlg.h" // // Open CASCADE Includes #include @@ -54,6 +63,7 @@ using namespace std; #include #include +#include #include #include @@ -62,68 +72,24 @@ using namespace std; #include #include #include +#include #include -// // QT Includes -#include +#include +#include +#include -#include "GEOMBase_aParameterDlg.h" - -//================================================================================= -// class : CustomItem -// purpose : Set Font to a text. -//================================================================================= -class CustomItem : public QCustomMenuItem -{ -public: - CustomItem(const QString& s, const QFont& f) - :string(s), font(f){}; - ~CustomItem(){} - - void paint(QPainter* p, const QColorGroup& /*cg*/, bool /*act*/, - bool /*enabled*/, int x, int y, int w, int h) - { - p->setFont(font); - p->drawText(x, y, w, h, AlignHCenter | AlignVCenter | ShowPrefix | DontClip, string); - } - - QSize sizeHint() - { - return QFontMetrics(font).size(AlignHCenter | AlignVCenter | ShowPrefix | DontClip, string); - } - -private: - QString string; - QFont font; - -}; +#include "GEOMImpl_Types.hxx" +using namespace std; //======================================================================= // function : GEOMBase() // purpose : Constructor //======================================================================= -GEOMBase::GEOMBase() : - QObject() +GEOMBase::GEOMBase() { - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; - - /* Shading Color */ - QString SCr = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorRed"); - QString SCg = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorGreen"); - QString SCb = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorBlue"); - if(!SCr.isEmpty() && !SCg.isEmpty() && !SCb.isEmpty()) - myShadingColor = Quantity_Color(SCr.toInt()/255., SCg.toInt()/255., SCb.toInt()/255., Quantity_TOC_RGB); - else - myShadingColor = Quantity_Color(Quantity_NOC_GOLDENROD); - - QString AddInStudy = QAD_CONFIG->getSetting("Geometry:SettingsAddInStudy"); - if(!AddInStudy.isEmpty()) - mySettings_AddInStudy = AddInStudy.toInt(); - else - mySettings_AddInStudy = 1; } @@ -135,654 +101,6 @@ GEOMBase::~GEOMBase() { } - -//================================================================================= -// function : CustomPopup() -// purpose : [static] -//================================================================================= -bool GEOMBase::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext, - const QString& theParent, const QString& theObject) -{ - GEOMBase* myGeomBase = new GEOMBase(); - QAD_Study* ActiveStudy = parent->getActiveStudy(); - - /* Deactivate any non modal dialog box to get the neutral point */ - myGeomBase->myGeomGUI->EmitSignalDeactivateDialog(); - - SALOME_Selection* Sel = SALOME_Selection::Selection(ActiveStudy->getSelection()); - int nbSel = Sel->IObjectCount(); - - if((nbSel == 0)) - return false; - - if(ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - if(theParent.compare("Viewer") == 0) { - if(theObject.compare("Component") == 0) { - popup->removeItem(QAD_DisplayOnly_Popup_ID); - return true; - } - else { - QFont f = QApplication::font(); - f.setBold(TRUE); - if(nbSel == 1) { - Handle(SALOME_InteractiveObject) IObject = Sel->firstIObject(); - popup->removeItem(QAD_TopLabel_Popup_ID); - popup->insertItem(new CustomItem (QString(IObject->getName()), f), QAD_TopLabel_Popup_ID, 0); - if(IObject->hasEntry()) - popup->setItemEnabled(804, false); //Add in Study Menu - else - popup->setItemEnabled(804, true); //Add in Study Menu - - if(IObject->IsKind(STANDARD_TYPE(GEOM_InteractiveObject))) { - Standard_Boolean found; - Handle(GEOM_AISShape) Result = myGeomBase->ConvertIOinGEOMAISShape(IObject, found, true); - - if(found) { - if(Result->DisplayMode() == 1) - popup->changeItem(8031, tr("GEOM_MEN_WIREFRAME")); //Shading/Wireframe Menu - else - popup->changeItem(8031, tr("GEOM_MEN_SHADING")); //Shading/Wireframe Menu - } - } - - if(!(v3d->isInViewer(IObject) && v3d->isVisible(IObject))) - popup->removeItem(QAD_Erase_Popup_ID); - else - popup->removeItem(QAD_Display_Popup_ID); - } - else { - popup->removeItem(QAD_DisplayOnly_Popup_ID); - popup->removeItem(QAD_TopLabel_Popup_ID); - popup->insertItem(new CustomItem (tr("GEOM_MEN_POPUP_NAME").arg(nbSel), f), QAD_TopLabel_Popup_ID, 0); - popup->setItemEnabled(804, false); //Add in Study Menu - } - } - return true; - } - else if(theParent.compare("ObjectBrowser") == 0) { - popup->removeItem(QAD_TopLabel_Popup_ID); - int id = popup->idAt(0); // separator - if(id < 0) - popup->removeItem(id); - - // checking for GEOM label in the selected list - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) anIObject; - - bool useSubItems = false; - bool needOpen = false; - bool needDisplay = false; - bool needErase = false; - SALOMEDS::GenericAttribute_var aTmpAttr; - for(;It.More();It.Next()) { - anIObject = It.Value(); - if(!anIObject->hasEntry()) - continue; - - if(v3d->isInViewer(anIObject) && v3d->isVisible(anIObject)) - needErase = true; - else - needDisplay = true; - SALOMEDS::SObject_var obj = ActiveStudy->getStudyDocument()->FindObjectID(anIObject->getEntry()); - if(!obj->_is_nil()) { - if (strcmp(obj->GetFatherComponent()->GetName(), "GEOM")) continue; - GEOM::GEOM_Shape_var aShape; - if(obj->FindAttribute(aTmpAttr, "AttributeIOR")) { - char *str = SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value(); - if(str && strlen(str)) - aShape = myGeomBase->myGeom->GetIORFromString(str); - } - else if(obj->FindAttribute(aTmpAttr, "AttributePersistentRef")) - needOpen = true; - - if(aShape->_is_nil()) { - SALOMEDS::ChildIterator_var anIter = ActiveStudy->getStudyDocument()->NewChildIterator(obj); - while(anIter->More()) { - SALOMEDS::SObject_var subobj = anIter->Value(); - if(subobj->FindAttribute(aTmpAttr, "AttributeIOR")) { - useSubItems = true; - needErase = true; - needDisplay = true; - } - else if(subobj->FindAttribute(aTmpAttr, "AttributePersistentRef")) { - needOpen = true; - useSubItems = true; - } - anIter->Next(); - } - } - } - } - // remove useless popup items - if(nbSel != 1) - popup->removeItem(901); // rename - if(useSubItems) - popup->removeItem(QAD_DisplayOnly_Popup_ID); // display only - - if(!needOpen) { - int index = popup->indexOf(9024); // open - popup->removeItem(9024); - popup->removeItemAt(index); // separator under Open - - if (!needDisplay) - popup->removeItem(QAD_Display_Popup_ID); - if (!needErase) - popup->removeItem(QAD_Erase_Popup_ID); - - if(!needDisplay && !needErase) { - int id = popup->idAt(popup->count()-1); // last item - popup->removeItem(id); // separator - } - } - else { - popup->removeItem(QAD_DisplayOnly_Popup_ID); // display only - popup->removeItem(QAD_Display_Popup_ID); - popup->removeItem(QAD_Erase_Popup_ID); - if (nbSel != 1) { - int id = popup->idAt(popup->count()-1); // last item - popup->removeItem(id); // separator - } - } - return true; - } - } - else if(ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - // MESSAGE ( " CUSTOM POPUP VIEWER VTK ") - if((theParent.compare("Viewer") == 0)) { - popup->setItemEnabled(8034, false); //Isos Menu - if(theObject.compare("Component") == 0) { - popup->removeItem(QAD_DisplayOnly_Popup_ID); - return true; - } - - //int id = popup->idAt(0); - QFont f = QApplication::font(); - f.setBold(TRUE); - - if(nbSel == 1) { - Handle(SALOME_InteractiveObject) IObject = Sel->firstIObject(); - popup->removeItem(QAD_TopLabel_Popup_ID); - popup->insertItem(new CustomItem (QString(IObject->getName()), f), QAD_TopLabel_Popup_ID, 0); - if(IObject->hasEntry()) { - popup->setItemEnabled(804, false); //Add in Study Menu - SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument(); - SALOMEDS::SObject_var SO = aStudy->FindObjectID(IObject->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!SO->_is_nil()) { - if(SO->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - Standard_Boolean found; - GEOM_Actor* Result = myGeomBase->ConvertIORinGEOMActor(anIOR->Value(), found, true); - if(found) { - if(Result->getDisplayMode() == 1) - popup->changeItem(8031, tr("GEOM_MEN_WIREFRAME")); //Shading/Wireframe Menu - else - popup->changeItem(8031, tr("GEOM_MEN_SHADING")); //Shading/Wireframe Menu - - if(!Result->GetVisibility()) - popup->removeItem(QAD_Erase_Popup_ID); - else - popup->removeItem(QAD_Display_Popup_ID); - } - else - popup->removeItem(QAD_Erase_Popup_ID); - } - } - } - else - popup->setItemEnabled(804, true); //Add in Study Menu - } - else { - popup->removeItem(QAD_DisplayOnly_Popup_ID); - popup->removeItem(QAD_TopLabel_Popup_ID); - popup->insertItem( new CustomItem (tr("GEOM_MEN_POPUP_NAME").arg(nbSel), f), QAD_TopLabel_Popup_ID, 0); - popup->setItemEnabled(804, false); //Add in Study Menu - } - return true; - } - else if(theParent.compare("ObjectBrowser") == 0) { - popup->removeItem(QAD_TopLabel_Popup_ID); - int id = popup->idAt(0); // separator - if(id < 0) - popup->removeItem(id); - - // checking for GEOM label in the selected list - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) anIObject; - - bool useSubItems = false; - bool needOpen = false; - bool needDisplay = false; - bool needErase = false; - SALOMEDS::GenericAttribute_var aTmpAttr; - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - for(;It.More();It.Next()) { - anIObject = It.Value(); - if(!anIObject->hasEntry()) - continue; - - if(myRenderInter->isInViewer(anIObject) && myRenderInter->isVisible(anIObject)) - needErase = true; - else - needDisplay = true; - - SALOMEDS::SObject_var obj = ActiveStudy->getStudyDocument()->FindObjectID(anIObject->getEntry()); - if(!obj->_is_nil()) { - if (strcmp(obj->GetFatherComponent()->GetName(), "GEOM")) continue; - GEOM::GEOM_Shape_var aShape; - if(obj->FindAttribute(aTmpAttr, "AttributeIOR")) { - char *str = SALOMEDS::AttributeIOR::_narrow(aTmpAttr)->Value(); - if(str && strlen(str)) - aShape = myGeomBase->myGeom->GetIORFromString(str); - } - else if(obj->FindAttribute(aTmpAttr, "AttributePersistentRef")) - needOpen = true; - - if(aShape->_is_nil()) { - SALOMEDS::ChildIterator_var anIter = ActiveStudy->getStudyDocument()->NewChildIterator(obj); - while(anIter->More()) { - SALOMEDS::SObject_var subobj = anIter->Value(); - if(subobj->FindAttribute(aTmpAttr, "AttributeIOR")) { - useSubItems = true; - needDisplay = true; - needErase = true; - } - else if(subobj->FindAttribute(aTmpAttr, "AttributePersistentRef")) { - needOpen = true; - useSubItems = true; - } - anIter->Next(); - } - } - } - } - // remove useless popup items - if(nbSel != 1) - popup->removeItem(901); // rename - if(useSubItems) - popup->removeItem(QAD_DisplayOnly_Popup_ID); // display only - - if(!needOpen) { - int index = popup->indexOf(9024); // open - popup->removeItem(9024); - popup->removeItemAt(index); // separator under Open - - if(!needDisplay) - popup->removeItem(QAD_Display_Popup_ID); - if(!needErase) - popup->removeItem(QAD_Erase_Popup_ID); - if(!needDisplay && !needErase) { - int id = popup->idAt(popup->count()-1); // last item - popup->removeItem(id); // separator - } - } - else { - popup->removeItem(QAD_DisplayOnly_Popup_ID); // display only - popup->removeItem(QAD_Display_Popup_ID); - popup->removeItem(QAD_Erase_Popup_ID); - if(nbSel!=1) { - int id = popup->idAt(popup->count()-1); // last item - popup->removeItem(id); // separator - } - } - return true; - } - } - else { // other viewer types not supported. - while(1) { - int id = popup->idAt(0); - if(id <= QAD_TopLabel_Popup_ID && id != -1) - popup->removeItemAt(0); - else - break; - } - popup->removeItem(QAD_DisplayOnly_Popup_ID); - popup->removeItem(QAD_Display_Popup_ID); - popup->removeItem(QAD_Erase_Popup_ID); - int id = popup->idAt(popup->count() - 1); // last item - if(id < 0 && id != -1) - popup->removeItem(id); // separator - return false; - } - return false; -} - - -//===================================================================================== -// function : Display() -// purpose : Displays a CORBA shape -//===================================================================================== -bool GEOMBase::Display(GEOM::GEOM_Shape_ptr aShape, Standard_CString name) -{ - // MESSAGE ( "GEOMBase::Display init ") - Handle(GEOM_InteractiveObject) IO; - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - Sel->ClearIObjects(); - - if(aShape->_is_nil()) { - QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_PRP_ABORT"), tr("GEOM_BUT_OK")); - return false; - } - - TopoDS_Shape shape = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); - if(shape.IsNull()) - return false; - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributePixMap_var aPixmap; - - SALOMEDS::SComponent_var father = aStudy->FindComponent("GEOM"); - int aLocked = false; - if(father->_is_nil()) { - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); - op->start(); - aLocked = aStudy->GetProperties()->IsLocked(); - if(aLocked) - aStudy->GetProperties()->SetLocked(false); - father = aStudyBuilder->NewComponent("GEOM"); - anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - aName->SetValue(QAD_Application::getDesktop()->getComponentUserName("GEOM")); - anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap"); - aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); - aPixmap->SetPixMap("ICON_OBJBROWSER_Geometry"); - aStudyBuilder->DefineComponentInstance(father, myGeom); - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); - if(aLocked) - aStudy->GetProperties()->SetLocked(true); - op->finish(); - } - - father->ComponentIOR(myGeomGUI->GetFatherior()); - - TCollection_AsciiString nameG(""); - Standard_CString Type; - if(TCollection_AsciiString(name).IsEqual(Standard_CString(""))) { - if(TCollection_AsciiString(aShape->NameType()).IsEqual(Standard_CString(""))) { - Standard_CString type; - GetShapeTypeString(shape,type); - aShape->NameType(type); - nameG += TCollection_AsciiString(type) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->myNbGeom++) + TCollection_AsciiString("\0"); - } - else - nameG += TCollection_AsciiString(aShape->NameType()) + TCollection_AsciiString("_") + TCollection_AsciiString(myGeomGUI->myNbGeom++) + TCollection_AsciiString("\0"); - } - else - nameG = TCollection_AsciiString(name); - - // VTK - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - vtkRenderer *theRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - int themode = myRenderInter->GetDisplayMode(); - - vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(shape, 0, themode, Standard_True); - theActors->InitTraversal(); - vtkActor* anActor = (vtkActor*)theActors->GetNextActor(); - - IO = new GEOM_InteractiveObject(aShape->Name(), myGeomGUI->GetFatherior(), "GEOM"); - while(!(anActor==NULL)) { - GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); - GActor->setIO(IO); - GActor->setName(nameG.ToCString()); - - theRenderer->AddActor(GActor); - anActor = (vtkActor*)theActors->GetNextActor(); - } - } - // OCC - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - Handle(GEOM_AISShape) theResult = new GEOM_AISShape(shape, nameG.ToCString()); - theResult->SetInfiniteState(shape.Infinite()); - theResult->SetShadingColor(myShadingColor); - IO = new GEOM_InteractiveObject(aShape->Name(), myGeomGUI->GetFatherior(), "GEOM"); - theResult->setIO(IO); - theResult->setName(nameG.ToCString()); - - /* Precaution : close any local context to permit the display */ - if(ic->HasOpenedContext()) - ic->CloseAllContexts(); - - ic->Display(theResult); - } - - // DCQ Sel->AddIObject(IO, false); - QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame()->Repaint(); - if(mySettings_AddInStudy) - AddInStudy(false, IO); - - return true; -} - - -//===================================================================================== -// function : AddInStudy() -// purpose : anIOShape or a selected shape -//===================================================================================== -bool GEOMBase::AddInStudy(bool selection, const Handle(SALOME_InteractiveObject)& anIO) -{ - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - if (!(!mySettings_AddInStudy || selection)) { - Sel->ClearIObjects(); - } - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributePixMap_var aPixmap; - SALOMEDS::AttributeIOR_var anIOR; - SALOMEDS::AttributeSelectable_var aSelAttr; - - SALOMEDS::SComponent_var father = aStudy->FindComponent("GEOM"); - int aLocked = false; - if(father->_is_nil()) { - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); - op->start(); - aLocked = aStudy->GetProperties()->IsLocked(); - if(aLocked) - aStudy->GetProperties()->SetLocked(false); - father = aStudyBuilder->NewComponent("GEOM"); - anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - aName->SetValue( QAD_Application::getDesktop()->getComponentUserName("GEOM")); - anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap"); - aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); - aPixmap->SetPixMap("ICON_OBJBROWSER_Geometry"); - aStudyBuilder->DefineComponentInstance(father, myGeom); - if (aLocked) - aStudy->GetProperties()->SetLocked(true); - op->finish(); - } - - father->ComponentIOR(myGeomGUI->GetFatherior()); - - SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - - Handle(GEOM_AISShape) GAISShape; - GEOM_Actor* GActor; - Handle(GEOM_InteractiveObject) GIO; - bool found = false; - - // VTK - if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - vtkRenderer *Renderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - - vtkActorCollection* theActors = Renderer->GetActors(); - theActors->InitTraversal(); - vtkActor *ac = theActors->GetNextActor(); - while(!(ac==NULL)) { - if(ac->IsA("GEOM_Actor")) { - GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(ac); - if(anActor->hasIO()) { - Handle(SALOME_InteractiveObject) IO = anActor->getIO(); - if(IO->IsKind(STANDARD_TYPE(GEOM_InteractiveObject))) { - GIO = Handle(GEOM_InteractiveObject)::DownCast(IO); - if(anIO->isSame(GIO)) { - found = true; - GActor = anActor; - break; - } - } - } - } - ac = theActors->GetNextActor(); - } - - if(!found) - return false; - } - // OCC - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListIteratorOfListOfInteractive ite(List); - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - if(aSh->hasIO()) { - Handle(SALOME_InteractiveObject) IO = aSh->getIO(); - if ( IO->IsKind(STANDARD_TYPE(GEOM_InteractiveObject))) { - GIO = Handle(GEOM_InteractiveObject)::DownCast(IO); - if(anIO->isSame(GIO)) { - found = true; - GAISShape = aSh; - break; - } - } - } - } - ite.Next(); - } - - if(!found) - return false; - } - - if(!mySettings_AddInStudy || selection) { - QString Name = SALOMEGUI_NameDlg::getName(QAD_Application::getDesktop(), anIO->getName()); - if(!Name.isEmpty()) { - // VTK - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - char* aCopy = CORBA::string_dup(Name.latin1()); - GActor->setName(aCopy); - delete(aCopy); - } - // OCC - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - char* aCopy = CORBA::string_dup(Name.latin1()); - GAISShape->setName(aCopy); - delete(aCopy); - } - } - else - return false; - } - - // open transaction - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy()); - op->start(); - - SALOMEDS::SObject_var newObj = aStudyBuilder->NewObject(father); - - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(GIO->getIOR()); - - /* For the shape inserted into the study we set its field 'studyshapeid' */ - /* so the shape will contain its corresponding entry in the study Ocaf doc. */ - aShape->StudyShapeId(newObj->GetID()); - - GIO->setEntry(newObj->GetID()); - - anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeIOR"); - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - anIOR->SetValue(aShape->Name()); - - anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - - anAttr = aStudyBuilder->FindOrCreateAttribute(newObj, "AttributePixMap"); - aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); - if(aShape->ShapeType() == GEOM::COMPOUND) - aPixmap->SetPixMap("ICON_OBJBROWSER_COMPOUND"); - else if(aShape->ShapeType() == GEOM::COMPSOLID) - aPixmap->SetPixMap("ICON_OBJBROWSER_COMPSOLID"); - else if(aShape->ShapeType() == GEOM::SOLID) - aPixmap->SetPixMap("ICON_OBJBROWSER_SOLID"); - else if(aShape->ShapeType() == GEOM::SHELL) - aPixmap->SetPixMap("ICON_OBJBROWSER_SHELL"); - else if(aShape->ShapeType() == GEOM::FACE) - aPixmap->SetPixMap("ICON_OBJBROWSER_FACE"); - else if(aShape->ShapeType() == GEOM::WIRE) - aPixmap->SetPixMap("ICON_OBJBROWSER_WIRE"); - else if(aShape->ShapeType() == GEOM::EDGE) - aPixmap->SetPixMap("ICON_OBJBROWSER_EDGE"); - else if(aShape->ShapeType() == GEOM::VERTEX) - aPixmap->SetPixMap("ICON_OBJBROWSER_VERTEX"); - - // VTK - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - GActor->setIO(GIO); - aName->SetValue(GActor->getName()); - } - // OCC - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - GAISShape->setIO(GIO); - aName->SetValue(GAISShape->getName()); - } - - SALOMEDS::SObject_var newObj1 = aStudyBuilder->NewObject(fatherSF); - aStudyBuilder->Addreference(newObj1,newObj); - - GEOM::GEOM_Gen::ListOfIOR_var listIOR = new GEOM::GEOM_Gen::ListOfIOR; - listIOR = myGeom->GetReferencedObjects(aShape); - - if(listIOR->length()>0) { - SALOMEDS::SObject_var Arguments = aStudyBuilder->NewObject(newObj); - anAttr = aStudyBuilder->FindOrCreateAttribute(Arguments, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - aName->SetValue(tr("GEOM_ARGUMENTS")); - anAttr = aStudyBuilder->FindOrCreateAttribute(Arguments, "AttributeSelectable"); - aSelAttr = SALOMEDS::AttributeSelectable::_narrow(anAttr); - aSelAttr->SetSelectable(false); - - bool ObjectReferenced = false; - for (unsigned int ind = 0; ind < listIOR->length();ind++) { - SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(listIOR[ind]); - - if(!theObj->_is_nil()) { - SALOMEDS::SObject_var RefObject = aStudyBuilder->NewObject(Arguments); - aStudyBuilder->Addreference(RefObject, theObj); - ObjectReferenced = true; - } - } - - if(!ObjectReferenced) - aStudyBuilder->RemoveObject(Arguments); - } - op->finish(); - - if(!mySettings_AddInStudy || selection) - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); - else { - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(false); - // DCQ Sel->AddIObject(GIO); - } - return true; -} - - //===================================================================================== // function : GetShapeFromIOR() // purpose : exist also as static method ! @@ -792,14 +110,15 @@ TopoDS_Shape GEOMBase::GetShapeFromIOR(QString IOR) TopoDS_Shape result; if(IOR.stripWhiteSpace().isEmpty()) return result; - ORB_INIT &init = *SINGLETON_::Instance(); - CORBA::ORB_var& _orb = init.orb() ; - CORBA::Object_var obj = _orb->string_to_object((char*)(IOR.latin1())); + + CORBA::Object_var obj = GeometryGUI::GetORB()->string_to_object((char*)(IOR.latin1())); if(CORBA::is_nil(obj)) return result; - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(IOR); - if(!aShape->_is_nil()) - result = myGeomGUI->GetShapeReader().GetShape(myGeom, aShape); + GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( obj ); + if (GeomObject->_is_nil()) + return result; + + result = GeometryGUI::GetGeomGUI()->GetShapeReader().GetShape(GeometryGUI::GetGeomGUI()->GetGeomGen(), GeomObject); return result; } @@ -808,42 +127,16 @@ TopoDS_Shape GEOMBase::GetShapeFromIOR(QString IOR) // function : GetIndex() // purpose : Get the index of a sub shape in a main shape : index start at 1 //===================================================================================== -int GEOMBase::GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int /*ShapeType*/) -{ - if(shape.IsNull() || subshape.IsNull()) - return -1; - - int index = 1; - if(subshape.ShapeType() == TopAbs_COMPOUND) { - TopoDS_Iterator it; - TopTools_ListOfShape CL; - CL.Append(shape); - TopTools_ListIteratorOfListOfShape itC; - for(itC.Initialize(CL); itC.More(); itC.Next()) { - for(it.Initialize(itC.Value()); it.More(); it.Next()) { - if(it.Value().ShapeType() == TopAbs_COMPOUND) { - if(it.Value().IsSame(subshape)) - return index; - else - index++; - CL.Append(it.Value()); - } - } - } - } - else { - TopExp_Explorer Exp(shape, subshape.ShapeType()); - TopTools_MapOfShape M; - while(Exp.More()) { - if(M.Add(Exp.Current())) { - if(Exp.Current().IsSame(subshape)) - return index; - index++; - } - Exp.Next(); - } - } - return -1; +int GEOMBase::GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int /*ShapeType*/) +{ + if(shape.IsNull() || subshape.IsNull()) + return -1; + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(shape, anIndices); + if(anIndices.Contains(subshape)) return anIndices.FindIndex(subshape); + + return -1; } @@ -851,11 +144,11 @@ int GEOMBase::GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, // function : GetTopoFromSelection() // purpose : Define tds from a single selection and retuen true //======================================================================= -bool GEOMBase::GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds) +bool GEOMBase::GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds) { if(Sel->IObjectCount() != 1) return false; - + Handle(SALOME_InteractiveObject) IO = Sel->firstIObject(); /* case SObject */ if(IO->hasEntry()) { @@ -866,7 +159,7 @@ bool GEOMBase::GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds) if(!obj->_is_nil()) { if(obj->FindAttribute(anAttr, "AttributeIOR")) { anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - tds = this->GetShapeFromIOR(anIOR->Value()); + tds = GetShapeFromIOR(anIOR->Value()); if(tds.IsNull()) return false; else @@ -875,36 +168,42 @@ bool GEOMBase::GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds) } } - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Standard_CString ior = ""; - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IO); - ior = GIObject->getIOR(); - tds = this->GetShapeFromIOR(ior); - if(tds.IsNull()) - return false; - else - return true; - } - return false; } - //======================================================================= // function : GetNameOfSelectedIObjects() // purpose : Define the name geom++ or other name of mono or multi sel. //======================================================================= -int GEOMBase::GetNameOfSelectedIObjects(SALOME_Selection* Sel, QString& aName) +int GEOMBase::GetNameOfSelectedIObjects( SALOME_Selection* theSel, + QString& theName, + const bool theShapesOnly ) { - int nbSel = Sel->IObjectCount(); - if(nbSel == 1) { - Handle(SALOME_InteractiveObject) IObject = Sel->firstIObject(); - aName = IObject->getName(); - } - else { - aName = tr("%1_objects").arg(nbSel); + if ( !theShapesOnly ) + { + int nbSel = theSel->IObjectCount(); + if ( nbSel == 1 ) + { + Handle(SALOME_InteractiveObject) anIObj = theSel->firstIObject(); + theName = anIObj->getName(); + } + else + theName = QObject::tr("%1_objects").arg(nbSel); + + return nbSel; + } + else + { + QStringList aNames; + GEOM::ListOfGO anObjs; + ConvertListOfIOInListOfGO( theSel->StoredIObjects(), anObjs, theShapesOnly ); + if ( anObjs.length() == 1 ) + theName = GetName( anObjs[ 0 ] ); + else + theName = QString( "%1_objects" ).arg( anObjs.length() ); + + return anObjs.length(); } - return nbSel; } @@ -922,55 +221,55 @@ bool GEOMBase::GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& { case TopAbs_COMPOUND: { - aTypeString = CORBA::string_dup(tr("GEOM_COMPOUND")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_COMPOUND")); return true; } case TopAbs_COMPSOLID: { - aTypeString = CORBA::string_dup(tr("GEOM_COMPOUNDSOLID")) ; + aTypeString = CORBA::string_dup(QObject::tr("GEOM_COMPOUNDSOLID")) ; return true ; } case TopAbs_SOLID: { - aTypeString = CORBA::string_dup(tr("GEOM_SOLID")) ; + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SOLID")) ; return true ; } case TopAbs_SHELL: { - aTypeString = CORBA::string_dup(tr("GEOM_SHELL")) ; + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SHELL")) ; return true ; } case TopAbs_FACE: - { + { BRepAdaptor_Surface surf(TopoDS::Face(aShape)); if(surf.GetType() == GeomAbs_Plane) { - aTypeString = CORBA::string_dup(tr("GEOM_PLANE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_PLANE")); return true; } else if(surf.GetType() == GeomAbs_Cylinder) { - aTypeString = CORBA::string_dup(tr("GEOM_SURFCYLINDER")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFCYLINDER")); return true; } else if(surf.GetType() == GeomAbs_Sphere) { - aTypeString = CORBA::string_dup(tr("GEOM_SURFSPHERE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFSPHERE")); return true ; } else if(surf.GetType() == GeomAbs_Torus) { - aTypeString = CORBA::string_dup(tr("GEOM_SURFTORUS")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFTORUS")); return true ; } else if(surf.GetType() == GeomAbs_Cone) { - aTypeString = CORBA::string_dup(tr("GEOM_SURFCONE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SURFCONE")); return true ; } else { - aTypeString = CORBA::string_dup(tr("GEOM_FACE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_FACE")); return true; } } case TopAbs_WIRE: { - aTypeString = CORBA::string_dup(tr("GEOM_WIRE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_WIRE")); return true; } case TopAbs_EDGE: @@ -978,31 +277,31 @@ bool GEOMBase::GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& BRepAdaptor_Curve curv(TopoDS::Edge(aShape)); if(curv.GetType() == GeomAbs_Line) { if((Abs(curv.FirstParameter()) >= 1E6) || (Abs(curv.LastParameter()) >= 1E6)) - aTypeString = CORBA::string_dup(tr("GEOM_LINE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_LINE")); else - aTypeString = CORBA::string_dup(tr("GEOM_EDGE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_EDGE")); return true; } else if(curv.GetType() == GeomAbs_Circle) { if(curv.IsClosed()) - aTypeString = CORBA::string_dup(tr("GEOM_CIRCLE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_CIRCLE")); else - aTypeString = CORBA::string_dup(tr("GEOM_ARC")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_ARC")); return true; - } + } else { - aTypeString = CORBA::string_dup(tr("GEOM_EDGE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_EDGE")); return true; } } case TopAbs_VERTEX: { - aTypeString = CORBA::string_dup(tr("GEOM_VERTEX")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_VERTEX")); return true; } case TopAbs_SHAPE: { - aTypeString = CORBA::string_dup(tr("GEOM_SHAPE")); + aTypeString = CORBA::string_dup(QObject::tr("GEOM_SHAPE")); return true; } } @@ -1018,6 +317,12 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const char * IOR, Stand { Handle(GEOM_AISShape) resultShape; testResult = false; + + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + SALOMEDS::SObject_var anObj = aStudy->FindObjectIOR( IOR ); + if ( anObj->_is_nil() ) + return resultShape; + int nbSf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); for(int i = 0; i < nbSf; i++) { QAD_StudyFrame* sf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i); @@ -1036,26 +341,19 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const char * IOR, Stand if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); if(aSh->hasIO()) { - Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(aSh->getIO()); - Standard_CString theIOR = GIO->getIOR(); - if(strcmp(IOR, theIOR) == 0) { - if(onlyInActiveView) { - if(sf == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()) { - testResult = true; - resultShape = aSh; - return resultShape; - } - } - else { + Handle(SALOME_InteractiveObject) GIO = Handle(SALOME_InteractiveObject)::DownCast(aSh->getIO()); + if(GIO->hasEntry() && strcmp(GIO->getEntry(), anObj->GetID()) == 0) { + if(!onlyInActiveView || + sf == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()) { testResult = true; resultShape = aSh; - return resultShape; + return resultShape; } } } } ite.Next(); - } + } } } return resultShape; @@ -1068,6 +366,13 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIORinGEOMAISShape(const char * IOR, Stand //======================================================================= GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const char* IOR, Standard_Boolean& testResult, bool onlyInActiveView) { + testResult = false; + + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + SALOMEDS::SObject_var anObj = aStudy->FindObjectIOR( IOR ); + if ( anObj->_is_nil() ) + return GEOM_Actor::New(); + int nbSf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); for(int i = 0; i < nbSf; i++) { QAD_StudyFrame* sf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i); @@ -1080,16 +385,10 @@ GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const char* IOR, Standard_Boolean& t if( ac->IsA("GEOM_Actor")) { GEOM_Actor* anActor = GEOM_Actor::SafeDownCast(ac); if(anActor->hasIO()) { - Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(anActor->getIO()); - Standard_CString theIOR = GIO->getIOR(); - if(strcmp(IOR, theIOR) == 0) { - if(onlyInActiveView) { - if(sf == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()) { - testResult = true; - return anActor; - } - } - else { + Handle(SALOME_InteractiveObject) GIO = Handle(SALOME_InteractiveObject)::DownCast(anActor->getIO()); + if(GIO->hasEntry() && strcmp(GIO->getEntry(), anObj->GetID()) == 0) { + if(!onlyInActiveView || + sf == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()) { testResult = true; return anActor; } @@ -1104,6 +403,57 @@ GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const char* IOR, Standard_Boolean& t return GEOM_Actor::New(); } +//======================================================================= +// function : GetAIS() +// purpose : +//======================================================================= +Handle(AIS_InteractiveObject) GEOMBase::GetAIS( const Handle(SALOME_InteractiveObject)& theIO, + const bool isOnlyInActiveView ) +{ + if ( theIO.IsNull() || !theIO->hasEntry() ) + return Handle(AIS_InteractiveObject)(); + + int nbSf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); + + for ( int i = 0; i < nbSf; i++ ) + { + QAD_StudyFrame* aStudyFrame = + QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame( i ); + + if ( aStudyFrame->getTypeView() != VIEW_OCC ) + continue; + + OCCViewer_Viewer3d* v3d = + ((OCCViewer_ViewFrame*)aStudyFrame->getRightFrame()->getViewFrame())->getViewer(); + + Handle(AIS_InteractiveContext) anIC = v3d->getAISContext(); + + AIS_ListOfInteractive aList; + anIC->DisplayedObjects( aList ); + anIC->ObjectsInCollector( aList ); + + AIS_ListIteratorOfListOfInteractive anIter( aList ); + for ( ; anIter.More(); anIter.Next() ) + { + Handle(SALOME_InteractiveObject) anObj = + Handle(SALOME_InteractiveObject)::DownCast( anIter.Value()->GetOwner() ); + + if( !anObj.IsNull() && strcmp( anObj->getEntry(), theIO->getEntry() ) == 0 ) + { + if( isOnlyInActiveView ) + { + if ( aStudyFrame == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame() ) + return anIter.Value(); + } + else + return anIter.Value(); + } + } + } + + return Handle(AIS_InteractiveObject)(); +} + //======================================================================= // function : ConvertIOinGEOMAISShape() @@ -1112,6 +462,13 @@ GEOM_Actor* GEOMBase::ConvertIORinGEOMActor(const char* IOR, Standard_Boolean& t Handle(GEOM_AISShape) GEOMBase::ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult, bool onlyInActiveView) { Handle(GEOM_AISShape) res; + + if ( !IO->hasEntry() ) + { + testResult = false; + return res; + } + int nbSf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); for(int i = 0; i < nbSf; i++) { QAD_StudyFrame* sf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i); @@ -1126,26 +483,32 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIOinGEOMAISShape(const Handle(SALOME_Inte List.Append(List1); AIS_ListIteratorOfListOfInteractive ite(List); - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - if(aSh->hasIO()) { - Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(aSh->getIO()); - if(GIO->isSame(IO)) { - if(onlyInActiveView) { - if(sf == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()) { - testResult = true; - return aSh; - } - } - else { - testResult = true; - return aSh; - } - } - } - } - ite.Next(); + while(ite.More()) + { + if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) + { + Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); + if( aSh->hasIO() ) + { + if( strcmp( aSh->getIO()->getEntry(), IO->getEntry() ) == 0 ) + { + if(onlyInActiveView) + { + if(sf == QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()) + { + testResult = true; + return aSh; + } + } + else + { + testResult = true; + return aSh; + } + } + } + } + ite.Next(); } } } @@ -1158,9 +521,9 @@ Handle(GEOM_AISShape) GEOMBase::ConvertIOinGEOMAISShape(const Handle(SALOME_Inte // function : ConvertIOinGEOMShape() // purpose : //======================================================================= -GEOM::GEOM_Shape_ptr GEOMBase::ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult) +GEOM::GEOM_Object_ptr GEOMBase::ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult) { - GEOM::GEOM_Shape_var aShape; + GEOM::GEOM_Object_var aShape; testResult = false; /* case SObject */ @@ -1172,24 +535,14 @@ GEOM::GEOM_Shape_ptr GEOMBase::ConvertIOinGEOMShape(const Handle(SALOME_Interact if(!obj->_is_nil()) { if(obj->FindAttribute(anAttr, "AttributeIOR")) { anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - aShape = myGeom->GetIORFromString(anIOR->Value()); + aShape = GeometryGUI::GetGeomGUI()->GetGeomGen()->GetIORFromString(anIOR->Value()); if(!CORBA::is_nil(aShape)) testResult = true; return aShape._retn(); } } } - /* case Graphical Object */ - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IO); - Standard_CString ior = GIObject->getIOR(); - - aShape = myGeom->GetIORFromString(ior); - if(!CORBA::is_nil(aShape)) - testResult = true; - return aShape._retn(); - } - return aShape._retn(); + return GEOM::GEOM_Object::_nil(); } @@ -1197,7 +550,7 @@ GEOM::GEOM_Shape_ptr GEOMBase::ConvertIOinGEOMShape(const Handle(SALOME_Interact // function : ConvertListOfIOInListOfIOR() // purpose : //======================================================================= -void GEOMBase::ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, GEOM::GEOM_Gen::ListOfIOR& listIOR) +void GEOMBase::ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, GEOM::string_array& listIOR) { int nbSel = aList.Extent(); listIOR.length(nbSel); @@ -1216,93 +569,69 @@ void GEOMBase::ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, GEOM::GEOM CORBA::ORB_var& _orb = init.orb(); CORBA::String_var theValue = anIOR->Value(); CORBA::Object_var theObj = _orb->string_to_object(theValue); - if(theObj->_is_a("IDL:GEOM/GEOM_Shape:1.0")) { + if(theObj->_is_a("IDL:GEOM/GEOM_Object:1.0")) { listIOR[j] = CORBA::string_dup(theValue); j++; } } } - else if(IObject->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IObject); - Standard_CString ior = GIObject->getIOR(); - listIOR[j] = CORBA::string_dup(ior); - j++; - } } listIOR.length(j); } -//================================================================================ -// function : SetDisplayedObjectList() -// purpose : -//================================================================================ -// void GEOMBase::SetDisplayedObjectList() -// { -// if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) -// return; - -// OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); -// myGeomGUI->GetListDisplayedObject().Clear(); - -// Handle (AIS_InteractiveContext) aContext = v3d->getAISContext(); -// aContext->DisplayedObjects(myGeomGUI->GetListDisplayedObject()); -// } - - -//===================================================================================== -// function : DisplaySimulationShape() -// purpose : Displays 'this->mySimulationShape' a pure graphical shape from a TopoDS_Shape -//===================================================================================== -void GEOMBase::DisplaySimulationShape(const TopoDS_Shape& S) -{ - if(S.IsNull()) - return; - - //NRI DEBUG : 14/02/2002 - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - try { - /* erase any previous */ - ic->Erase(mySimulationShape, Standard_True, Standard_False); - ic->ClearPrs(mySimulationShape); - mySimulationShape = new AIS_Shape(TopoDS_Shape()); - mySimulationShape->Set(S); - mySimulationShape->SetColor(Quantity_NOC_VIOLET); - ic->Deactivate(mySimulationShape); - ic->Display(mySimulationShape, Standard_False); - ic->UpdateCurrentViewer(); +//======================================================================= +// function : ConvertIOinGEOMObject() +// purpose : +//======================================================================= +GEOM::GEOM_Object_ptr GEOMBase::ConvertIOinGEOMObject( const Handle(SALOME_InteractiveObject)& theIO, + Standard_Boolean& theResult ) +{ + theResult = Standard_False; + GEOM::GEOM_Object_var aReturnObject; + if ( !theIO.IsNull() ) + { + const char* anEntry = theIO->getEntry(); + SALOMEDS::SObject_var aSObj = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->FindObjectID( anEntry ); + if ( !CORBA::is_nil( aSObj ) ) + { + aReturnObject = GEOM::GEOM_Object::_narrow( aSObj->GetObject() ); + theResult = !CORBA::is_nil( aReturnObject ); + } } - catch(Standard_Failure) { - MESSAGE("Exception catched in GEOMBase::DisplaySimulationShape "); - } - mySimulationShape->UnsetColor(); - return; + return aReturnObject._retn(); } -//================================================================================== -// function : EraseSimulationShape() -// purpose : Clears the display of 'mySimulationShape' a pure graphical shape -//================================================================================== -void GEOMBase::EraseSimulationShape() +//======================================================================= +// function : ConvertListOfIOInListOfGO() +// purpose : +//======================================================================= +void GEOMBase::ConvertListOfIOInListOfGO( const SALOME_ListIO& theList, + GEOM::ListOfGO& theListGO, + const bool theShapesOnly ) { - int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); - for(int i = 0; i < count; i++) { - if(QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - ic->Erase(mySimulationShape, Standard_True, Standard_False); - ic->ClearPrs(mySimulationShape); - ic->UpdateCurrentViewer(); - } + int nbSel = theList.Extent(); + theListGO.length( nbSel ); + SALOME_ListIteratorOfListIO anIter( theList ); + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + int j = 0; + for ( int i=0; anIter.More(); anIter.Next(), i++ ) + { + Handle(SALOME_InteractiveObject) anIObj = anIter.Value(); + SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( anIObj->getEntry() ); + + if ( !aSObj->_is_nil() ) + { + GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(aSObj->GetObject()); + if ( !CORBA::is_nil( aGeomObj ) && ( !theShapesOnly || IsShape( aGeomObj ) ) ) + theListGO[ j++ ] = aGeomObj; + } } + + theListGO.length( j ); } - //================================================================================= // function : CreateArrowForLinearEdge() // purpose : Create a cone topology to be used to display an arrow in the middle @@ -1443,18 +772,18 @@ bool GEOMBase::SelectionByNameInDialogs(QWidget* aWidget, const QString& objectU listSO = ST->FindObjectByName(objectUserName, "GEOM"); if(listSO->length() < 1) { - const QString caption = tr("GEOM_WRN_WARNING"); - const QString text = tr("GEOM_NAME_INCORRECT"); - const QString button0 = tr("GEOM_BUT_OK"); - QMessageBox::warning(aWidget, caption, text, button0); + const QString caption = QObject::tr("GEOM_WRN_WARNING"); + const QString text = QObject::tr("GEOM_NAME_INCORRECT"); + const QString button0 = QObject::tr("GEOM_BUT_OK"); + QAD_MessageBox::error1(aWidget, caption, text, button0); return false; } /* More than one object with same name */ if(listSO->length() > 1) { - const QString caption = tr("GEOM_WRN_WARNING"); - const QString text = tr("GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE"); - const QString button0 = tr("GEOM_BUT_OK") ; - QMessageBox::warning(aWidget, caption, text, button0) ; + const QString caption = QObject::tr("GEOM_WRN_WARNING"); + const QString text = QObject::tr("GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE"); + const QString button0 = QObject::tr("GEOM_BUT_OK") ; + QAD_MessageBox::error1(aWidget, caption, text, button0) ; return false; } @@ -1487,6 +816,11 @@ bool GEOMBase::DefineDlgPosition(QWidget* aDlg, int& x, int& y) return true; } + +//======================================================================= +// function : GetDefaultName() +// purpose : Generates default names +//======================================================================= QString GEOMBase::GetDefaultName(const QString& theOperation) { SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); @@ -1505,12 +839,128 @@ QString GEOMBase::GetDefaultName(const QString& theOperation) } -//===================================================================================== -// EXPORTED METHODS -//===================================================================================== -extern "C" +//======================================================================= +// function : ShowErrorMessage() +// purpose : Shows message box with error code and comment +//======================================================================= +void GEOMBase::ShowErrorMessage(const char* theErrorCode, const char* theComment) +{ + QString anErrorCode(theErrorCode); + QString aComment(theComment); + + QString aText = ""; + if (!anErrorCode.isEmpty()) + aText.append("\n" + QObject::tr(anErrorCode)); + if (!aComment.isEmpty()) + aText.append("\n" + QString(theComment)); + + QAD_MessageBox::error1( QAD_Application::getDesktop(), QObject::tr( "GEOM_ERROR" ), + QObject::tr("GEOM_PRP_ABORT") + aText, "OK" ); +} + + +//======================================================================= +// function : GetObjectFromIOR() +// purpose : returns a GEOM_Object by given IOR (string) +//======================================================================= +GEOM::GEOM_Object_ptr GEOMBase::GetObjectFromIOR( const char* theIOR ) +{ + GEOM::GEOM_Object_var anObject; + if ( theIOR == NULL || strlen( theIOR ) == 0 ) + return anObject._retn(); // returning nil object + + anObject = GEOM::GEOM_Object::_narrow( GeometryGUI::GetORB()->string_to_object( theIOR ) ); + return anObject._retn(); +} + +//======================================================================= +// function : GetIORFromObject() +// purpose : returns IOR of a given GEOM_Object +//======================================================================= +char* GEOMBase::GetIORFromObject( const GEOM::GEOM_Object_ptr& theObject ) +{ + if ( CORBA::is_nil( theObject ) ) + return NULL; + + return GeometryGUI::GetORB()->object_to_string( theObject ); +} + +//======================================================================= +// function : GetShape() +// purpose : returns a TopoDS_Shape stored in GEOM_Object +//======================================================================= +bool GEOMBase::GetShape( const GEOM::GEOM_Object_ptr& theObject, TopoDS_Shape& theShape, const TopAbs_ShapeEnum theType ) +{ + if ( !CORBA::is_nil( theObject ) ) + { + TopoDS_Shape aTopoDSShape = GEOM_Client().GetShape( GeometryGUI::GetGeomGUI()->GetGeomGen(), theObject ); + if ( !aTopoDSShape.IsNull() && ( theType == TopAbs_SHAPE || theType == aTopoDSShape.ShapeType() ) ) + { + theShape = aTopoDSShape; + return true; + } + } + return false; +} + +//======================================================================= +// function : GetName() +// purpose : Get name of object +//======================================================================= +const char* GEOMBase::GetName( GEOM::GEOM_Object_ptr theObj ) +{ + QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); + + if ( aStudy ) + { + string anIOR = GeometryGUI::GetORB()->object_to_string( theObj ); + if ( anIOR != "" ) + { + SALOMEDS::SObject_var aSObj = aStudy->getStudyDocument()->FindObjectIOR( anIOR.c_str() ); + SALOMEDS::GenericAttribute_var anAttr; + + if ( !aSObj->_is_nil() && aSObj->FindAttribute( anAttr, "AttributeName") ) + { + SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr ); + return aNameAttr->Value(); + } + } + } + + return ""; +} + +bool GEOMBase::IsShape( GEOM::GEOM_Object_ptr theObj ) { - bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString & theContext, - const QString & theParent, const QString & theObject) - {return GEOMBase::CustomPopup(parent, popup, theContext, theParent, theObject);} + return !theObj->_is_nil() && theObj->IsShape(); } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMBase/GEOMBase.h b/src/GEOMBase/GEOMBase.h index b6de381c5..3a829a819 100644 --- a/src/GEOMBase/GEOMBase.h +++ b/src/GEOMBase/GEOMBase.h @@ -24,102 +24,115 @@ // File : GEOMBase.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef GEOMBASE_H #define GEOMBASE_H -#include "GEOMContext.h" - // SALOME Includes -#include "QAD_Config.h" -#include "SALOME_Selection.h" -#include "GEOM_Actor.h" #include "GEOM_AISShape.hxx" -#include "GEOM_InteractiveObject.hxx" - -// Open CASCADE Includes -#include // IDL Headers #include #include CORBA_SERVER_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) +#include CORBA_SERVER_HEADER(GEOM_Gen) + +// QT Includes +#include + +class GEOM_Actor; +class SALOME_Selection; +class SALOME_ListIO; +class QAD_Desktop; +class TColStd_MapOfInteger; + +class QWidget; //================================================================================= // class : GEOMBase // purpose : //================================================================================= -class GEOMBase : public QObject +class GEOMBase { - Q_OBJECT /* for QT compatibility */ - public : GEOMBase(); ~GEOMBase(); - static bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext, - const QString& theParent, const QString& theObject); - - bool Display(GEOM::GEOM_Shape_ptr aShape, Standard_CString name = ""); - bool AddInStudy(bool selection = false, const Handle(SALOME_InteractiveObject)& anIO = 0); + // SAN -- TO BE REMOVED !!! + static bool Display( GEOM::GEOM_Object_ptr ) {return false;} + static bool AddInStudy( GEOM::GEOM_Object_ptr ) {return false;} + static void DisplaySimulationShape(const TopoDS_Shape& S) {}; + static void EraseSimulationShape() {}; + // SAN -- TO BE REMOVED !!! /* Selection and objects management */ - int GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int ShapeType); - TopoDS_Shape GetShapeFromIOR(QString IOR); - bool GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds); - int GetNameOfSelectedIObjects(SALOME_Selection* Sel, QString& aName); - bool GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& aTypeString); + static int GetIndex(const TopoDS_Shape& subshape, const TopoDS_Shape& shape, int ShapeType); + static TopoDS_Shape GetShapeFromIOR(QString IOR); + static bool GetShape( const GEOM::GEOM_Object_ptr&, TopoDS_Shape&, const TopAbs_ShapeEnum = TopAbs_SHAPE ); + static bool GetTopoFromSelection(SALOME_Selection *Sel, TopoDS_Shape& tds); + static int GetNameOfSelectedIObjects(SALOME_Selection* Sel, QString& aName, const bool theShapesOnly = false ); + static bool GetShapeTypeString(const TopoDS_Shape& aShape, Standard_CString& aTypeString); /* Convertions */ - GEOM::GEOM_Shape_ptr ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO, + static GEOM::GEOM_Object_ptr ConvertIOinGEOMShape(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult); - Handle(GEOM_AISShape) ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO, + static Handle(GEOM_AISShape) ConvertIOinGEOMAISShape(const Handle(SALOME_InteractiveObject)& IO, Standard_Boolean& testResult, - bool onlyInActiveView = false); - void ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, - GEOM::GEOM_Gen::ListOfIOR& listIOR); + bool onlyInActiveView = false); - Handle(GEOM_AISShape) ConvertIORinGEOMAISShape(const char * IOR, + static Handle(AIS_InteractiveObject) GetAIS( const Handle(SALOME_InteractiveObject)& theIO, + const bool isOnlyInActiveView = false ); + static void ConvertListOfIOInListOfIOR(const SALOME_ListIO& aList, + GEOM::string_array& listIOR); + + static Handle(GEOM_AISShape) ConvertIORinGEOMAISShape(const char * IOR, Standard_Boolean& testResult, bool onlyInActiveView = false); - GEOM_Actor* ConvertIORinGEOMActor(const char * IOR, Standard_Boolean& testResult, + static GEOM_Actor* ConvertIORinGEOMActor(const char * IOR, Standard_Boolean& testResult, bool onlyInActiveView = false); + static GEOM::GEOM_Object_ptr ConvertIOinGEOMObject(const Handle(SALOME_InteractiveObject)& IO, + Standard_Boolean& testResult); + + static void ConvertListOfIOInListOfGO( const SALOME_ListIO& aList, + GEOM::ListOfGO& listGO, + const bool theShapesOnly = false ); + + static GEOM::GEOM_Object_ptr GetObjectFromIOR( const char* theIOR ); + + static char* GetIORFromObject( const GEOM::GEOM_Object_ptr& theObject ); + /* Geometry */ - bool VertexToPoint(const TopoDS_Shape& S, gp_Pnt& P); + static bool VertexToPoint(const TopoDS_Shape& S, gp_Pnt& P); /* Used just by Plane and Prism */ - bool LinearEdgeExtremities(const TopoDS_Shape& S, gp_Pnt& P1, gp_Pnt& P2); - void GetBipointDxDyDz(gp_Pnt P1, gp_Pnt P2, double& dx, double& dy, double& dz); + static bool LinearEdgeExtremities(const TopoDS_Shape& S, gp_Pnt& P1, gp_Pnt& P2); + static void GetBipointDxDyDz(gp_Pnt P1, gp_Pnt P2, double& dx, double& dy, double& dz); /* User dialog 1 parameter returned */ - double Parameter(Standard_Boolean& res, + static double Parameter(Standard_Boolean& res, const char* aValue1 = 0, const char* aTitle1 = 0, const char* aTitle = 0, const double bottom = -1E6, const double top = +1E6, const int decimals = 6); - //void SetDisplayedObjectList(); - /* Simulation management */ - bool CreateArrowForLinearEdge(const TopoDS_Shape& tds, TopoDS_Shape& ArrowCone); - void DisplaySimulationShape(const TopoDS_Shape& S); - void EraseSimulationShape(); + static bool CreateArrowForLinearEdge(const TopoDS_Shape& tds, TopoDS_Shape& ArrowCone); - /* Method used by dialog boxes called when used has entered a name of object in a LineEdit */ - bool SelectionByNameInDialogs(QWidget* aWidget, const QString& userObjectName, SALOME_Selection *Sel); - bool DefineDlgPosition(QWidget* aDlg, int& x, int& y); + /* Generates default names */ + static bool SelectionByNameInDialogs(QWidget* aWidget, const QString& userObjectName, SALOME_Selection *Sel); + /* Shows message box with error code */ + static bool DefineDlgPosition(QWidget* aDlg, int& x, int& y); /* This method generates default names for results of geometrical operations */ static QString GetDefaultName(const QString& theOperation); + /* Shows message box with error code and comment */ + static void ShowErrorMessage(const char* theErrorCode, const char* theComment = 0); - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ - - Quantity_Color myShadingColor; - Handle(AIS_Shape) mySimulationShape; /* AIS shape used only during topo/geom simulations */ - bool mySettings_AddInStudy; + /* Gets name of object */ + static const char* GetName( GEOM::GEOM_Object_ptr ); + static bool IsShape( GEOM::GEOM_Object_ptr theObj ); }; #endif diff --git a/src/GEOMBase/GEOMBase_Helper.cxx b/src/GEOMBase/GEOMBase_Helper.cxx new file mode 100755 index 000000000..5bb5d91e8 --- /dev/null +++ b/src/GEOMBase/GEOMBase_Helper.cxx @@ -0,0 +1,863 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GEOMBase_Helper.cxx +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#include "GEOMBase_Helper.h" +#include "GEOMBase.h" +#include "GEOM_Operation.h" +#include "GeometryGUI.h" +#include "GEOM_Displayer.h" +#include "GEOMImpl_Types.hxx" +#include "QAD_Study.h" +#include "QAD_Application.h" +#include "QAD_Desktop.h" +#include "QAD_MessageBox.h" +#include "QAD_ViewFrame.h" +#include "QAD_RightFrame.h" +#include "QAD_WaitCursor.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" + +#include +#include + +using namespace std; + +//================================================================ +// Function : getActiveView +// Purpose : Get active study frame, returns 0 if no open study frame +//================================================================ +static QAD_ViewFrame* getActiveView() +{ + QAD_Study* activeStudy = QAD_Application::getDesktop()->getActiveStudy(); + if ( activeStudy ) { + QAD_StudyFrame* sf = activeStudy->getActiveStudyFrame(); + if ( sf ) { + return sf->getRightFrame()->getViewFrame(); + } + } + return 0; +} + + +//================================================================ +// Function : getGeomEngine +// Purpose : Static method +//================================================================ +GEOM::GEOM_Gen_ptr GEOMBase_Helper::getGeomEngine() +{ + Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); + return GEOM::GEOM_Gen::_narrow(comp); +} + +//================================================================ +// Function : GEOMBase_Helper +// Purpose : +//================================================================ +GEOMBase_Helper::GEOMBase_Helper() + : myViewFrame( 0 ), myDisplayer( 0 ), myCommand( 0 ), isPreview( false ) +{ +} + +//================================================================ +// Function : ~GEOMBase_Helper +// Purpose : +//================================================================ +GEOMBase_Helper::~GEOMBase_Helper() +{ + if ( myPreview.size() ) + erasePreview(); + if ( hasCommand() ) + abortCommand(); + + globalSelection( GEOM_ALLOBJECTS, true ); + + delete myDisplayer; +} + +//================================================================ +// Function : display +// Purpose : +//================================================================ +void GEOMBase_Helper::display( const ObjectList& objList, const bool updateView ) +{ + ObjectList::const_iterator it; + for ( it = objList.begin(); it != objList.end(); it++ ) { + display( *it, false ); + } + if ( !objList.empty() && updateView ) + getDisplayer()->UpdateViewer(); +} + +//================================================================ +// Function : display +// Purpose : Display object. +// Important : Object must be already in study +//================================================================ +void GEOMBase_Helper::display( GEOM::GEOM_Object_ptr object, const bool updateView ) +{ + // Unset color of shape ( this color may be set during preview displaying ) + // Default color will be used + getDisplayer()->UnsetColor(); + getDisplayer()->UnsetWidth(); + + // Enable activisation of selection + getDisplayer()->SetToActivate( true ); + + // Display object + getDisplayer()->Display( object, updateView ); +} + +//================================================================ +// Function : erase +// Purpose : +//================================================================ +void GEOMBase_Helper::erase( const ObjectList& objList, const bool updateView ) +{ + ObjectList::const_iterator it = objList.begin(); + for ( ; it != objList.end(); it++ ) { + erase( *it, false ); + } + if ( !objList.empty() && updateView ) + getDisplayer()->UpdateViewer(); +} + +//================================================================ +// Function : erase +// Purpose : +//================================================================ +void GEOMBase_Helper::erase( GEOM::GEOM_Object_ptr object, const bool updateView ) +{ + if ( !object->_is_nil() ) { + string entry = getEntry( object ); + getDisplayer()->Erase( new SALOME_InteractiveObject( + entry.c_str(), "GEOM", strdup( GEOMBase::GetName( object ) ) ), true, updateView ); + } +} + +//================================================================ +// Function : redisplay +// Purpose : +//================================================================ +void GEOMBase_Helper::redisplay( const ObjectList& objList, + const bool withChildren, + const bool updateView ) +{ + ObjectList::const_iterator it = objList.begin(); + for ( ; it != objList.end(); it++ ) { + redisplay( *it, withChildren, false ); + } + if ( !objList.empty() && updateView ) + getDisplayer()->UpdateViewer(); +} + +//================================================================ +// Function : redisplay +// Purpose : +//================================================================ +void GEOMBase_Helper::redisplay( GEOM::GEOM_Object_ptr object, + const bool withChildren, + const bool updateView ) +{ + if ( !object->_is_nil() ) { + // Unset color of shape ( this color may be set during preview displaying ) + // Default color will be used + getDisplayer()->UnsetColor(); + getDisplayer()->UnsetWidth(); + + // Enable activisation of selection + getDisplayer()->SetToActivate( true ); + + string entry = getEntry( object ); + getDisplayer()->Redisplay( new SALOME_InteractiveObject( entry.c_str(), "GEOM", strdup( GEOMBase::GetName( object ) ) ), false ); + } + + if ( withChildren ) { + QAD_Study* aDoc = getStudy(); + if ( aDoc && !CORBA::is_nil( aDoc->getStudyDocument() ) ) { + SALOMEDS::Study_var aStudy = aDoc->getStudyDocument(); + SALOMEDS::SObject_var aSObj = aStudy->FindObjectIOR( GeometryGUI::GetORB()->object_to_string( object ) ); + if ( !CORBA::is_nil( aSObj ) ) { + SALOMEDS::ChildIterator_var anIt = aStudy->NewChildIterator( aSObj ); + for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) { + GEOM::GEOM_Object_var aChild = GEOM::GEOM_Object::_narrow( anIt->Value()->GetObject() ); + if ( !CORBA::is_nil( aChild ) ) { + if ( !aChild->_is_nil() ) { + string entry = getEntry( aChild ); + getDisplayer()->Redisplay( new SALOME_InteractiveObject( + entry.c_str(), "GEOM", strdup( GEOMBase::GetName( aChild ) ) ), false ); + } + } + } + } + } + } + + if ( updateView ) + getDisplayer()->UpdateViewer(); +} + +//================================================================ +// Function : displayPreview +// Purpose : Method for displaying preview based on execute() results +//================================================================ +void GEOMBase_Helper::displayPreview( const bool activate, + const bool update, + const bool toRemoveFromEngine, + const double lineWidth ) +{ + isPreview = true; + QString msg; + if ( !isValid( msg ) ) + { + erasePreview( update ); + isPreview = false; + return; + } + + erasePreview( false ); + + try { + QAD_WaitCursor wc; + ObjectList objects; + if ( !execute( objects ) || !getOperation()->IsDone() ) { + wc.stop(); + } + else { + for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) + { + displayPreview( *it, true, activate, false, lineWidth ); + if ( toRemoveFromEngine ) + getGeomEngine()->RemoveObject( *it ); + } + } + } + catch( const SALOME::SALOME_Exception& e ) { + QtCatchCorbaException( e ); + } + + isPreview = false; + + if ( update ) + updateViewer(); +} + +//================================================================ +// Function : displayPreview +// Purpose : Method for displaying preview of resulting shape +//================================================================ +void GEOMBase_Helper::displayPreview( GEOM::GEOM_Object_ptr object, + const bool append, + const bool activate, + const bool update, + const double lineWidth ) +{ + // Set color for preview shape + getDisplayer()->SetColor( Quantity_NOC_VIOLET ); + + // set width of displayed shape + getDisplayer()->SetWidth( lineWidth ); + + // Disable activation of selection + getDisplayer()->SetToActivate( activate ); + + // Make a reference to GEOM_Object + getDisplayer()->SetName( GeometryGUI::GetORB()->object_to_string( object ) ); + + // Build prs + SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object ); + if ( aPrs == 0 || aPrs->IsNull() ) + return; + + // Display prs + displayPreview( aPrs, append, update ); + + getDisplayer()->UnsetName(); + + // Enable activation of displayed objects + getDisplayer()->SetToActivate( true ); +} + +//================================================================ +// Function : displayPreview +// Purpose : Method for displaying arbitrary preview objects (not limited to shapes) +//================================================================ +void GEOMBase_Helper::displayPreview( const SALOME_Prs* prs, + const bool append, + const bool update ) +{ + if ( !append ) + erasePreview( false ); + + // remember current view frame to make correct erase preview later + myViewFrame = getActiveView(); + + if ( myViewFrame == 0 ) + return; + + // Display prs + ( (SALOME_View*)myViewFrame )->Display( prs ); + + // Add prs to the preview list + myPreview.push_back( (SALOME_Prs*)prs ); + + // Update viewer + if ( update ) + myViewFrame->Repaint(); +} + +//================================================================ +// Function : erasePreview +// Purpose : +//================================================================ +void GEOMBase_Helper::erasePreview( const bool update ) +{ + // check view frame where the preview was displayed + bool vfOK = checkViewFrame() && myViewFrame; + // Iterate through presentations and delete them + for ( PrsList::iterator anIter = myPreview.begin(); anIter != myPreview.end(); ++anIter ) { + if ( vfOK ) + ( (SALOME_View*)myViewFrame )->Erase( *anIter, true ); + delete *anIter; + } + myPreview.clear(); + + // Update viewer + if ( update ) + updateViewer(); +} + +//================================================================ +// Function : localSelection +// Purpose : Activate selection of objects of a given type +// IMPORTANT : Works after localSelection( ... ) method call only +//================================================================ +void GEOMBase_Helper::activate( const int theType ) +{ + SALOMEDS::Study_var aStudy = getStudy()->getStudyDocument(); + SALOMEDS::SComponent_var aGeom = aStudy->FindComponent( "GEOM" ); + if ( aGeom->_is_nil() ) + return; + + SALOME_ListIO aList; + SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator( aGeom ); + for ( ; anIter->More(); anIter->Next() ) + { + SALOMEDS::SObject_var aSO = anIter->Value(); + if ( !aSO->_is_nil() ) + { + SALOMEDS::SObject_var aRefSO; + if ( !aSO->ReferencedObject( aRefSO ) ) + { + GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow( aSO->GetObject() ); + if ( !anObj->_is_nil() && anObj->GetType() == theType ) + aList.Append( new SALOME_InteractiveObject( aSO->GetID(), "GEOM", aSO->GetName()) ); + } + } + } + + myDisplayer->LocalSelection( aList, 0 ); +} + +//================================================================ +// Function : localSelection +// Purpose : Activate selection of subshapes in accordance with mode +// theMode is from TopAbs_ShapeEnum +//================================================================ +void GEOMBase_Helper::localSelection( const ObjectList& theObjs, const int theMode ) +{ + SALOME_ListIO aListOfIO; + + ObjectList::const_iterator anIter = theObjs.begin(); + for ( ; anIter != theObjs.end(); ++anIter ) + { + GEOM::GEOM_Object_ptr anObj = *anIter; + if ( anObj->_is_nil() ) + continue; + string aEntry = getEntry( anObj ); + if ( aEntry != "" ) + aListOfIO.Append( new SALOME_InteractiveObject( + aEntry.c_str(), "GEOM", strdup( GEOMBase::GetName( anObj ) ) ) ); + } + + myDisplayer->LocalSelection( aListOfIO, theMode ); +} + +//================================================================ +// Function : localSelection +// Purpose : Activate selection of subshapes in accordance with mode +// theMode is from TopAbs_ShapeEnum +//================================================================ +void GEOMBase_Helper::localSelection( GEOM::GEOM_Object_ptr obj, const int mode ) +{ + // If object is null local selection for all objects is activated + if ( obj->_is_nil() ) { + myDisplayer->LocalSelection( Handle(SALOME_InteractiveObject)(), mode ); + return; + } + + ObjectList objList; + objList.push_back( obj ); + localSelection( objList, mode ); +} + + +//================================================================ +// Function : globalSelection +// Purpose : Activate selection of subshapes. Set selection filters +// in accordance with mode. theMode is from GEOMImpl_Types +//================================================================ +void GEOMBase_Helper::globalSelection( const int theMode, const bool update ) +{ + myDisplayer->GlobalSelection( theMode, update ); +} + +//================================================================ +// Function : globalSelection +// Purpose : Activate selection of subshapes. Set selection filters +// in accordance with mode. theMode is from GEOMImpl_Types +//================================================================ +void GEOMBase_Helper::globalSelection( const TColStd_MapOfInteger& theModes, + const bool update ) +{ + myDisplayer->GlobalSelection( theModes, update ); +} + +//================================================================ +// Function : addInStudy +// Purpose : Add object in study +//================================================================ +void GEOMBase_Helper::addInStudy( GEOM::GEOM_Object_ptr theObj, const char* theName ) +{ + if ( !hasCommand() ) + return; + + SALOMEDS::Study_var aStudy = getStudy()->getStudyDocument(); + if ( aStudy->_is_nil() || theObj->_is_nil() ) + return; + + GEOM::GEOM_Object_ptr aFatherObj = getFather( theObj ); + + GeometryGUI::GetGeomGUI()->GetGeomGen()->AddInStudy( aStudy, theObj, theName, aFatherObj ); +} + +//================================================================ +// Function : updateObjBrowser +// Purpose : Update object browser +//================================================================ +void GEOMBase_Helper::updateObjBrowser() const +{ + getStudy()->updateObjBrowser(); +} + +//================================================================ +// Function : updateViewer +// Purpose : Update active 3D view +//================================================================ +void GEOMBase_Helper::updateViewer() +{ + getDisplayer()->UpdateViewer(); +} + +//================================================================ +// Function : getStudyId +// Purpose : Get study Id +//================================================================ +int GEOMBase_Helper::getStudyId() const +{ + int anId = -1; + if ( getStudy() ) + anId = getStudy()->getStudyId(); + return anId; +} + +//================================================================ +// Function : getStudy +// Purpose : Returns the active study. It is recommended to use +// this method instead of direct desktop->getActiveStudy() calls +//================================================================ +QAD_Study* GEOMBase_Helper::getStudy() const +{ + // Probably, it would be better to rememeber the active study in helper... + return QAD_Application::getDesktop()->getActiveStudy(); +} + +//================================================================ +// Function : getEntry +// Purpose : +//================================================================ +char* GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const +{ + QAD_Study* study = getStudy(); + if ( study ) { + string IOR = GEOMBase::GetIORFromObject( object); + if ( IOR != "" ) { + SALOMEDS::SObject_var SO = study->getStudyDocument()->FindObjectIOR( IOR.c_str() ); + if ( !SO->_is_nil() ) { + return SO->GetID(); + } + } + } + return ""; +} + +//================================================================ +// Function : getDisplayer +// Purpose : +//================================================================ +GEOM_Displayer* GEOMBase_Helper::getDisplayer() +{ + if ( !myDisplayer ) + myDisplayer = new GEOM_Displayer(); + return myDisplayer; +} + +//================================================================ +// Function : clearShapeBuffer +// Purpose : +//================================================================ +void GEOMBase_Helper::clearShapeBuffer( GEOM::GEOM_Object_ptr theObj ) +{ + if ( CORBA::is_nil( theObj ) ) + return; + + string IOR = GeometryGUI::GetORB()->object_to_string( theObj ); + TCollection_AsciiString asciiIOR( strdup( IOR.c_str() ) ); + GeometryGUI::GetGeomGUI()->GetShapeReader().RemoveShapeFromBuffer( asciiIOR ); + + if ( !getStudy() || CORBA::is_nil( getStudy()->getStudyDocument() ) ) + return; + + SALOMEDS::Study_var aStudy = getStudy()->getStudyDocument(); + SALOMEDS::SObject_var aSObj = aStudy->FindObjectIOR( IOR.c_str() ); + if ( CORBA::is_nil( aSObj ) ) + return; + + SALOMEDS::ChildIterator_var anIt = aStudy->NewChildIterator( aSObj ); + for ( anIt->InitEx( true ); anIt->More(); anIt->Next() ) { + SALOMEDS::GenericAttribute_var anAttr; + if ( anIt->Value()->FindAttribute(anAttr, "AttributeIOR") ) { + SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + TCollection_AsciiString asciiIOR( anIOR->Value() ); + GeometryGUI::GetGeomGUI()->GetShapeReader().RemoveShapeFromBuffer( asciiIOR ); + } + } +} + +//================================================================ +// Function : openCommand +// Purpose : +//================================================================ +bool GEOMBase_Helper::openCommand() +{ + bool res = false; + if ( !getStudy() || hasCommand() ) + return res; + + GEOM::GEOM_IOperations_var anOp = GEOM::GEOM_IOperations::_narrow( getOperation() ); + if ( !anOp->_is_nil() ) { + myCommand = new GEOM_Operation( getStudy(), anOp.in() ); + myCommand->start(); + res = true; + } + + return res; +} + +//================================================================ +// Function : abortCommand +// Purpose : +//================================================================ +bool GEOMBase_Helper::abortCommand() +{ + if ( !hasCommand() ) + return false; + + myCommand->abort(); + myCommand = 0; + + return true; +} + +//================================================================ +// Function : commitCommand +// Purpose : +//================================================================ +bool GEOMBase_Helper::commitCommand( const char* ) +{ + if ( !hasCommand() ) + return false; + + myCommand->finish(); + myCommand = 0; + + return true; +} + +//================================================================ +// Function : hasCommand +// Purpose : +//================================================================ +bool GEOMBase_Helper::hasCommand() const +{ + return (bool)myCommand; +} + +//================================================================ +// Function : getOperation +// Purpose : +//================================================================ +GEOM::GEOM_IOperations_ptr GEOMBase_Helper::getOperation() +{ + if ( myOperation->_is_nil() ) + myOperation = createOperation(); + + return myOperation; +} + + + +//================================================================ +// Function : checkViewFrame +// Purpose : +//================================================================ +bool GEOMBase_Helper::checkViewFrame() +{ + if ( myViewFrame ){ + QListIterator it( QAD_Application::getDesktop()->getActiveApp()->getStudies() ); + for ( ; it.current(); ++it ) { + QListIterator it1( it.current()->getStudyFrames() ); + for ( ; it1.current(); ++it1 ) { + if ( myViewFrame == it1.current()->getRightFrame()->getViewFrame() ) + return true; + } + } + } + myViewFrame = 0; + return false; +} + +//================================================================ +// Function : onAccept +// Purpose : This method should be called from dialog's slots onOk() and onApply() +// It perfroms user input validation, then it +// performs a proper operation and manages transactions, etc. +//================================================================ +bool GEOMBase_Helper::onAccept( const bool publish, const bool useTransaction ) +{ + QAD_Study* aDoc = QAD_Application::getDesktop()->getActiveStudy(); + SALOMEDS::Study_var aStudy = aDoc->getStudyDocument(); + + bool aLocked = aStudy->GetProperties()->IsLocked(); + if ( aLocked ) { + MESSAGE("GEOMBase_Helper::onAccept - ActiveStudy is locked"); + QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); + return false; + } + + QString msg; + if ( !isValid( msg ) ) { + showError( msg ); + return false; + } + + erasePreview( false ); + + try { + if ( ( !publish && !useTransaction ) || openCommand() ) { + QAD_WaitCursor wc; + QAD_Application::getDesktop()->putInfo( "" ); + ObjectList objects; + if ( !execute( objects ) || !getOperation()->IsDone() ) { + wc.stop(); + abortCommand(); + showError(); + } + else { + const int nbObjs = objects.size(); + bool withChildren = false; + for ( ObjectList::iterator it = objects.begin(); it != objects.end(); ++it ) { + if ( publish ) { + QString aName(""); + if ( nbObjs > 1 ) + aName = strlen( getNewObjectName() ) ? GEOMBase::GetDefaultName( getNewObjectName() ) : GEOMBase::GetDefaultName( getPrefix( *it ) ); + else { + aName = getNewObjectName(); + // PAL6521: use a prefix, if some dialog box doesn't reimplement getNewObjectName() + if ( aName.isEmpty() ) + aName = GEOMBase::GetDefaultName( getPrefix( *it ) ); + } + addInStudy( *it, aName.latin1() ); + withChildren = false; + display( *it, false ); + } + else { // asv : fix of PAL6454. If publish==false, then the original shape was modified, and need to be re-cached in GEOM_Client + // before redisplay + clearShapeBuffer( *it ); + withChildren = true; + redisplay( *it, withChildren, false ); + } + } + + if ( nbObjs ) { + commitCommand(); + updateObjBrowser(); + QAD_Application::getDesktop()->putInfo( QObject::tr("GEOM_PRP_DONE") ); + } + else + abortCommand(); + } + } + } + catch( const SALOME::SALOME_Exception& e ) { + QtCatchCorbaException( e ); + abortCommand(); + } + + updateViewer(); + + return true; +} + + +//================================================================ +// Function : showError +// Purpose : Shows a message box with infromation about an error taken from getOperation()->GetErrorCode() +//================================================================ +void GEOMBase_Helper::showError() +{ + QString msg; + if ( !getOperation()->_is_nil() ) + msg = QObject::tr( getOperation()->GetErrorCode() ); + + if ( msg.isEmpty() ) + msg = QObject::tr( "GEOM_PRP_ABORT" ); + + QAD_MessageBox::error1( QAD_Application::getDesktop(), + QObject::tr( "GEOM_ERROR_STATUS" ), + msg, + QObject::tr( "BUT_OK" ) ); +} + +//================================================================ +// Function : showError +// Purpose : Shows a error message followed by +//================================================================ +void GEOMBase_Helper::showError( const QString& msg ) +{ + QString str( QObject::tr( "GEOM_INCORRECT_INPUT" ) ); + if ( !msg.isEmpty() ) + str += "\n" + msg; + QAD_MessageBox::error1( QAD_Application::getDesktop(), QObject::tr( "GEOM_ERROR" ), str, QObject::tr( "BUT_OK" ) ); +} + +////////////////////////////////////////////////////////////////// +// Virtual methods to be redefined in dialogs +////////////////////////////////////////////////////////////////// + +//================================================================ +// Function : createOperation +// Purpose : Redefine this method to return proper IOperation reference +//================================================================ +GEOM::GEOM_IOperations_ptr GEOMBase_Helper::createOperation() +{ + GEOM::GEOM_IOperations_var aNilOp; + return aNilOp._retn(); +} + +//================================================================ +// Function : isValid +// Purpose : Called by onAccept(). Redefine this method to check validity of user input in dialog boxes. +//================================================================ +bool GEOMBase_Helper::isValid( QString& ) +{ + return true; +} + +//================================================================ +// Function : execute +// Purpose : This method is called by onAccept(). +// It should perform the required operation and put all new or modified objects into +// argument.Should return if some error occurs during its execution. +//================================================================ +bool GEOMBase_Helper::execute( ObjectList& objects ) +{ + return false; +} + +//================================================================ +// Function : getFather +// Purpose : This method is called by addInStudy(). It should return a father object +// for or a nil reference if should be published +// as a top-level object. +//================================================================ +GEOM::GEOM_Object_ptr GEOMBase_Helper::getFather( GEOM::GEOM_Object_ptr theObj ) +{ + return GEOM::GEOM_Object::_nil(); +} + +//================================================================ +// Function : getNewObjectName +// Purpose : Redefine this method to return proper name for a new object +//================================================================ +const char* GEOMBase_Helper::getNewObjectName() const +{ + return ""; +} + +//================================================================ +// Function : getPrefix +// Purpose : Get prefix for name of created object +//================================================================ +QString GEOMBase_Helper::getPrefix( GEOM::GEOM_Object_ptr theObj ) const +{ + if ( !myPrefix.isEmpty() || theObj->_is_nil() ) + return myPrefix; + + TopoDS_Shape aShape; + if ( !GEOMBase::GetShape( theObj, aShape ) ) + return ""; + + long aType = aShape.ShapeType(); + + switch ( aType ) + { + case TopAbs_VERTEX : return QObject::tr( "GEOM_VERTEX" ); + case TopAbs_EDGE : return QObject::tr( "GEOM_EDGE" ); + case TopAbs_WIRE : return QObject::tr( "GEOM_WIRE" ); + case TopAbs_FACE : return QObject::tr( "GEOM_FACE" ); + case TopAbs_SHELL : return QObject::tr( "GEOM_SHELL" ); + case TopAbs_SOLID : return QObject::tr( "GEOM_SOLID" ); + case TopAbs_COMPSOLID: return QObject::tr( "GEOM_COMPOUNDSOLID" ); + case TopAbs_COMPOUND : return QObject::tr( "GEOM_COMPOUND" ); + default : return ""; + } +} + + diff --git a/src/GEOMBase/GEOMBase_Helper.h b/src/GEOMBase/GEOMBase_Helper.h new file mode 100755 index 000000000..64dbd4d22 --- /dev/null +++ b/src/GEOMBase/GEOMBase_Helper.h @@ -0,0 +1,175 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GEOMBase_Helper.h +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#ifndef GEOMBASE_HELPER_H +#define GEOMBASE_HELPER_H + +#include "GEOM_Displayer.h" +#include "SALOME_Prs.h" +#include +#include CORBA_CLIENT_HEADER(GEOM_Gen) + +#include + +#include + +typedef std::list ObjectList; + +class GEOM_Operation; +class QAD_Study; +class TopoDS_Shape; +class QAD_ViewFrame; +class TColStd_MapOfInteger; + +//================================================================ +// Class : GEOMBase_Helper +// Description : Helper class for dialog box development, can be used as +// the second base class for dialog boxes. Contains convenient methods +// performing common operations (display/erase, selection activation, +// publication in a study, transaction management) +//================================================================ +class GEOMBase_Helper +{ +public: + GEOMBase_Helper(); + virtual ~GEOMBase_Helper(); + +protected: + static GEOM::GEOM_Gen_ptr getGeomEngine(); + + void display ( const ObjectList&, const bool = true ); + void display ( GEOM::GEOM_Object_ptr, const bool = true ); + void erase ( const ObjectList&, const bool = true ); + void erase ( GEOM::GEOM_Object_ptr, const bool = true ); + void redisplay ( const ObjectList&, const bool = true, const bool = true ); + void redisplay ( GEOM::GEOM_Object_ptr, const bool = true, const bool = true ); + + virtual void displayPreview ( const bool activate = false, + const bool update = true, + const bool toRemoveFromEngine = true, + const double lineWidth = -1 ); + // This is the easiest way to show preview. It is based on execute() method. + // It removes temporary GEOM::GEOM_Objects automatically. + + virtual void displayPreview ( GEOM::GEOM_Object_ptr obj, + const bool append = false, + const bool activate = false, + const bool update = true, + const double lineWidth = -1 ); + void displayPreview ( const SALOME_Prs* prs, + const bool append = false, + const bool = true ); + void erasePreview ( const bool = true ); + + void localSelection( const ObjectList&, const int ); + void localSelection( GEOM::GEOM_Object_ptr, const int ); + void activate( const int ); + void globalSelection( const int = GEOM_ALLOBJECTS, const bool = false ); + void globalSelection( const TColStd_MapOfInteger&, const bool = false ); + void updateViewer (); + + void prepareSelection( const ObjectList&, const int ); + void prepareSelection( GEOM::GEOM_Object_ptr, const int ); + + void addInStudy ( GEOM::GEOM_Object_ptr, const char* theName ); + + bool openCommand (); + bool abortCommand (); + bool commitCommand ( const char* = 0 ); + bool hasCommand () const; + + void updateObjBrowser() const; + int getStudyId () const; + QAD_Study* getStudy () const; + bool checkViewFrame (); + + bool onAccept( const bool publish = true, const bool useTransaction = true ); + // This method should be called from "OK" button handler. + // == true means that objects returned by execute() + // should be published in a study. + + void showError(); + // Shows a message box with infromation about an error taken from getOperation()->GetErrorCode() + void showError( const QString& msg ); + // Shows a error message followed by + + GEOM::GEOM_IOperations_ptr getOperation(); + // If is nil --> calls createOperation() and put the result + // into and returns it; + // otherwise, simply returns + + inline void setPrefix( const QString& prefix ) { myPrefix = prefix; } + QString getPrefix( GEOM::GEOM_Object_ptr = GEOM::GEOM_Object::_nil() ) const; + + //////////////////////////////////////////////////////////////////////////// + // Virtual methods, to be redefined in dialog classes + //////////////////////////////////////////////////////////////////////////// + + virtual GEOM::GEOM_IOperations_ptr createOperation(); + // This method should be redefined in dialog boxes so as to return + // proper GEOM_IOperation interface. + // Returns nil reference by default + + virtual bool isValid( QString& msg ); + // Called by onAccept(). Redefine this method to check validity of user input in dialog boxes. + + virtual bool execute( ObjectList& objects ); + // This method is called by onAccept(). + // It should perform the required operation and put all new or modified objects into + // argument.Should return if some error occurs during its execution. + + virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj ); + // This method is called by addInStudy(). It should return a father object + // for or a nil reference if should be published + // as a top-level object. + + virtual const char* getNewObjectName() const; + + void SetIsPreview(const bool thePreview) {isPreview = thePreview;} + bool IsPreview() {return isPreview;} + + GEOM_Displayer* getDisplayer(); + +private: + char* getEntry ( GEOM::GEOM_Object_ptr ) const; + void clearShapeBuffer( GEOM::GEOM_Object_ptr ); + +private: + typedef std::list PrsList; + + PrsList myPreview; + GEOM_Displayer* myDisplayer; + GEOM_Operation* myCommand; + GEOM::GEOM_IOperations_var myOperation; + QAD_ViewFrame* myViewFrame; + QString myPrefix; + bool isPreview; + +}; + +#endif diff --git a/src/GEOMBase/GEOMBase_Skeleton.cxx b/src/GEOMBase/GEOMBase_Skeleton.cxx index 85b4f326f..5d2c7fb53 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.cxx +++ b/src/GEOMBase/GEOMBase_Skeleton.cxx @@ -24,10 +24,14 @@ // File : GEOMBase_Skeleton.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "GEOMBase_Skeleton.h" +#include "GeometryGUI.h" +#include "SALOME_Selection.h" + +#include //================================================================================= // class : GEOMBase_Skeleton() @@ -37,7 +41,7 @@ using namespace std; // TRUE to construct a modal dialog. //================================================================================= GEOMBase_Skeleton::GEOMBase_Skeleton(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :DlgRef_Skeleton_QTD(parent, name, modal, fl) +:DlgRef_Skeleton_QTD(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ), GEOMBase_Helper() { if (!name) setName("GEOMBase_Skeleton"); @@ -59,8 +63,7 @@ GEOMBase_Skeleton::GEOMBase_Skeleton(QWidget* parent, const char* name, SALOME_S //================================================================================= GEOMBase_Skeleton::~GEOMBase_Skeleton() { - // no need to delete child widgets, Qt does it all for us - this->destroy(TRUE, TRUE); + myGeomGUI->SetActiveDialogBox( 0 ); } @@ -70,14 +73,13 @@ GEOMBase_Skeleton::~GEOMBase_Skeleton() //================================================================================= void GEOMBase_Skeleton::Init(SALOME_Selection* Sel) { + myGeomGUI = GeometryGUI::GetGeomGUI(); + /* init variables */ mySelection = Sel; - mySimulationTopoDs.Nullify(); - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeomGUI->SetActiveDialogBox((QDialog*)this); - myGeom = myGeomGUI->myComponentGeom; + myGeomBase = new GEOMBase(); // SAN -- TO BE REMOVED !!! + myGeomGUI->SetActiveDialogBox(this); /* signals and slots connections */ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); @@ -90,6 +92,7 @@ void GEOMBase_Skeleton::Init(SALOME_Selection* Sel) /* displays Dialog */ RadioButton1->setChecked(TRUE); + RadioButton4->hide(); return; } @@ -101,16 +104,7 @@ void GEOMBase_Skeleton::Init(SALOME_Selection* Sel) //================================================================================= void GEOMBase_Skeleton::ClickOnCancel() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - mySelection->ClearFilters(); - disconnect(mySelection, 0, this, 0); - - //myGeomGUI->ResetState(); - reject(); - - return; + close(); } @@ -125,7 +119,7 @@ void GEOMBase_Skeleton::LineEditReturnPressed() /* so SelectionIntoArgument() is automatically called. */ const QString objectUserName = myEditCurrentArgument->text(); QWidget* thisWidget = (QWidget*)this; - if(myGeomBase->SelectionByNameInDialogs(thisWidget, objectUserName, mySelection)) + if(GEOMBase::SelectionByNameInDialogs(thisWidget, objectUserName, mySelection)) myEditCurrentArgument->setText(objectUserName); return; @@ -139,11 +133,10 @@ void GEOMBase_Skeleton::LineEditReturnPressed() void GEOMBase_Skeleton::DeactivateActiveDialog() { this->setEnabled(false); - mySelection->ClearFilters(); + globalSelection(); //myGeomGUI->ResetState(); disconnect(mySelection, 0, this, 0); - myGeomBase->EraseSimulationShape(); - myGeomGUI->SetActiveDialogBox(0); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox(0); return; } @@ -155,20 +148,50 @@ void GEOMBase_Skeleton::DeactivateActiveDialog() void GEOMBase_Skeleton::ActivateThisDialog() { /* Emit a signal to deactivate the active dialog */ - myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); this->setEnabled(true); - myGeomGUI->SetActiveDialogBox((QDialog*)this); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox((QDialog*)this); return; } //================================================================================= // function : closeEvent() -// purpose : +// purpose : same than click on cancel button //================================================================================= void GEOMBase_Skeleton::closeEvent(QCloseEvent* e) { - /* same than click on cancel button */ - this->ClickOnCancel(); - return; + disconnect(mySelection, 0, this, 0); + QDialog::closeEvent( e ); +} + +//================================================================================= +// function : initName() +// purpose : initialize the Name field with a string "thePrefix_X" (Vertex_3) +//================================================================================= +void GEOMBase_Skeleton::initName( const char* thePrefix ) +{ + if ( thePrefix ) + setPrefix( thePrefix ); + ResultName->setText( GEOMBase::GetDefaultName( getPrefix() ) ); +} + +//================================================================================= +// function : getNewObjectName() +// purpose : returns contents of Name field +//================================================================================= +const char* GEOMBase_Skeleton::getNewObjectName() const +{ + return ResultName->text(); +} + +//================================================================================= +// function : getConstructorId() +// purpose : +//================================================================================= +int GEOMBase_Skeleton::getConstructorId() const +{ + if ( GroupConstructors != NULL && GroupConstructors->selected() != NULL ) + return GroupConstructors->id( GroupConstructors->selected() ); + return -1; } diff --git a/src/GEOMBase/GEOMBase_Skeleton.h b/src/GEOMBase/GEOMBase_Skeleton.h index cfeb6ea45..30d30ec24 100644 --- a/src/GEOMBase/GEOMBase_Skeleton.h +++ b/src/GEOMBase/GEOMBase_Skeleton.h @@ -24,7 +24,7 @@ // File : GEOMBase_Skeleton.h // Author : Damine COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef GEOMBASE_SKELETON_H #define GEOMBASE_SKELETON_H @@ -32,16 +32,18 @@ #include "DlgRef_Skeleton_QTD.h" #include "GEOMBase.h" +#include "GEOMBase_Helper.h" +#include "GeometryGUI.h" #include #include #include #include +#include #include #include -#include -class GEOMBase_Skeleton : public DlgRef_Skeleton_QTD +class GEOMBase_Skeleton : public DlgRef_Skeleton_QTD, public GEOMBase_Helper { Q_OBJECT @@ -55,12 +57,14 @@ private : protected: void closeEvent(QCloseEvent* e); - TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */ + void initName( const char* thePrefix = 0 ); // initialize "Name" field with a string "thePrefix_X" (Vertex_3) + const char* getNewObjectName() const; // returns contents of "Name" field + int getConstructorId() const; // returns id of a selected "constructor" radio button or '-1' in case of error + QLineEdit* myEditCurrentArgument; /* Current LineEdit */ SALOME_Selection* mySelection; /* User shape selection */ - GEOM::GEOM_Gen_var myGeom; /* Current GeomI object */ - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; /* Current GeomGUI object */ + GEOMBase* myGeomBase; // SAN -- TO BE REMOVED !!! + GeometryGUI* myGeomGUI; /* reference GEOM GUI */ protected slots: void ClickOnCancel(); diff --git a/src/GEOMBase/GEOM_Operation.cxx b/src/GEOMBase/GEOM_Operation.cxx new file mode 100644 index 000000000..a1804d491 --- /dev/null +++ b/src/GEOMBase/GEOM_Operation.cxx @@ -0,0 +1,122 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GEOM_Operation.cxx +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#include "GEOM_Operation.h" + +#include "SALOMEGUI_QtCatchCorbaException.hxx" + +//================================================================ +// Function : GEOM_Operation +// Purpose : +//================================================================ +GEOM_Operation::GEOM_Operation( QAD_Study* doc, GEOM::GEOM_IOperations_ptr oper ) +: QAD_Operation( doc ) +{ + myIOperation = GEOM::GEOM_IOperations::_narrow( oper ); +} + +//================================================================ +// Function : ~GEOM_Operation +// Purpose : +//================================================================ +GEOM_Operation::~GEOM_Operation() +{ +} + +//================================================================ +// Function : onStartOperation() +// Purpose : Opens an internal transaction in GEOM engine +//================================================================ +void GEOM_Operation::onStartOperation() +{ + QAD_Operation::onStartOperation(); + + if ( !myIOperation->_is_nil() ) { + try { + myIOperation->StartOperation(); + } + catch( const SALOME::SALOME_Exception& e ) { + QtCatchCorbaException( e ); + } + } +} + +//================================================================ +// Function : onFinishOperation +// Purpose : Commits an internal transaction in GEOM engine +//================================================================ +void GEOM_Operation::onFinishOperation() +{ + QAD_Operation::onFinishOperation(); + + if ( !myIOperation->_is_nil() ) { + try { + myIOperation->FinishOperation(); + } + catch( const SALOME::SALOME_Exception& e ) { + QtCatchCorbaException( e ); + } + } +} + +//================================================================ +// Function : onSuspendOperation +// Purpose : +//================================================================ +void GEOM_Operation::onSuspendOperation() +{ + QAD_Operation::onSuspendOperation(); +} + +//================================================================ +// Function : onResumeOperation +// Purpose : +//================================================================ +void GEOM_Operation::onResumeOperation() +{ + QAD_Operation::onResumeOperation(); +} + +//================================================================ +// Function : onAbortOperation +// Purpose : Aborts an internal transaction in GEOM engine +//================================================================ +void GEOM_Operation::onAbortOperation() +{ + QAD_Operation::onAbortOperation(); + + if ( !myIOperation->_is_nil() ) { + try { + myIOperation->AbortOperation(); + } + catch( const SALOME::SALOME_Exception& e ) { + QtCatchCorbaException( e ); + } + } +} + diff --git a/src/GEOMBase/GEOM_Operation.h b/src/GEOMBase/GEOM_Operation.h new file mode 100644 index 000000000..8c051e011 --- /dev/null +++ b/src/GEOMBase/GEOM_Operation.h @@ -0,0 +1,54 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GEOM_Operation.h +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#ifndef GEOM_OPERATION_H +#define GEOM_OPERATION_H + +#include "QAD_Operation.h" +#include +#include CORBA_CLIENT_HEADER(GEOM_Gen) + +class GEOM_Operation : public QAD_Operation +{ +public: + GEOM_Operation( QAD_Study*, GEOM::GEOM_IOperations_ptr ); + virtual ~GEOM_Operation(); + +protected: + // Reimplemented from QAD_Operation + virtual void onStartOperation(); + virtual void onFinishOperation(); + virtual void onSuspendOperation(); + virtual void onResumeOperation(); + virtual void onAbortOperation(); + +private: + GEOM::GEOM_IOperations_var myIOperation; +}; + +#endif diff --git a/src/GEOMBase/Makefile.in b/src/GEOMBase/Makefile.in index 42082e5fe..9dff7f68d 100644 --- a/src/GEOMBase/Makefile.in +++ b/src/GEOMBase/Makefile.in @@ -39,20 +39,25 @@ LIB = libGEOMBase.la # header files EXPORT_HEADERS= GEOMBase.h \ - GEOMBase_Skeleton.h + GEOMBase_Skeleton.h \ + GEOMBase_Helper.h \ + GEOM_Operation.h LIB_SRC = GEOMBase.cxx \ GEOMBase_Skeleton.cxx \ - GEOMBase_aParameterDlg.cxx + GEOMBase_aParameterDlg.cxx \ + GEOMBase_Helper.cxx \ + GEOM_Operation.cxx LIB_MOC = \ - GEOMBase.h \ GEOMBase_Skeleton.h \ GEOMBase_aParameterDlg.h LIB_CLIENT_IDL = SALOME_Exception.idl \ SALOMEDS.idl \ - SALOMEDS_Attributes.idl + SALOMEDS_Attributes.idl \ + SALOME_GenericObj.idl \ + GEOM_Gen.idl LIB_SERVER_IDL = @@ -61,6 +66,6 @@ LIB_SERVER_IDL = CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lDlgRef -lGEOMContext +LDFLAGS += -lDlgRef -lGEOMGUI @CONCLUDE@ diff --git a/src/GEOMClient/GEOM_Client.cxx b/src/GEOMClient/GEOM_Client.cxx index 8c1345ff4..b18299bff 100644 --- a/src/GEOMClient/GEOM_Client.cxx +++ b/src/GEOMClient/GEOM_Client.cxx @@ -29,8 +29,10 @@ using namespace std; #include "GEOM_Client.hxx" #include +#include "OpUtil.hxx" #include "utilities.h" +#include CORBA_SERVER_HEADER(SALOMEDS) #include CORBA_SERVER_HEADER(GEOM_Gen) #include @@ -39,38 +41,34 @@ using namespace std; #include #include #include +#include #include -#include -#include -#include -#include -#include - +#include #include #define HST_CLIENT_LEN 256 + //======================================================================= // function : Load() // purpose : //======================================================================= -TopoDS_Shape GEOM_Client::Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape ) +TopoDS_Shape GEOM_Client::Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape ) { - char hst_client[HST_CLIENT_LEN]; - gethostname(hst_client, HST_CLIENT_LEN); + string hst_client = GetHostname(); Engines::Container_var ctn_server = geom->GetContainerRef(); long pid_server = ctn_server->getPID(); - - if ( (pid_client==pid_server) && (strcmp(hst_client, ctn_server->getHostName())==0) ) { + + if ( (pid_client==pid_server) && (strcmp(hst_client.c_str(), ctn_server->getHostName())==0) ) { TopoDS_Shape* S = (TopoDS_Shape*)(aShape->getShape()); return(*S); } else { /* get sequence of bytes of resulting brep shape from GEOM server */ TopoDS_Shape S; - GEOM::GEOM_Shape::TMPFile_var SeqFile = aShape->GetShapeStream(); + SALOMEDS::TMPFile_var SeqFile = aShape->GetShapeStream(); int sizebuf = SeqFile->length(); char* buf; buf = (char*) &SeqFile[0]; @@ -88,7 +86,7 @@ TopoDS_Shape GEOM_Client::Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aS //======================================================================= GEOM_Client::GEOM_Client() { - pid_client = (-1); + pid_client = (long)getpid(); } //======================================================================= @@ -115,6 +113,20 @@ Standard_Integer GEOM_Client::Find( const TCollection_AsciiString& IOR, TopoDS_S return 0; } +//======================================================================= +// function : Find() +// purpose : +//======================================================================= +Standard_Integer GEOM_Client::Find( const TopoDS_Shape& S, TCollection_AsciiString& IOR ) +{ + for ( Standard_Integer i = 1; i<= myShapes.Length(); i++ ) { + if (myShapes.Value(i) == S) { + IOR = myIORs.Value(i); + return i; + } + } + return 0; +} //======================================================================= // function : Bind() @@ -130,13 +142,13 @@ void GEOM_Client::Bind( const TCollection_AsciiString& IOR, const TopoDS_Shape& // function : RemoveShapeFromBuffer() // purpose : Remove shape from Client Buffer //======================================================================= -void GEOM_Client::RemoveShapeFromBuffer( const TCollection_AsciiString& shapeIOR ) +void GEOM_Client::RemoveShapeFromBuffer( const TCollection_AsciiString& IOR) { if( myIORs.IsEmpty() ) return ; TopoDS_Shape S ; - Standard_Integer anIndex = Find( shapeIOR, S ) ; + Standard_Integer anIndex = Find( IOR, S ) ; if( anIndex != 0 ) { myIORs.Remove(anIndex) ; myShapes.Remove(anIndex) ; @@ -173,105 +185,46 @@ unsigned int GEOM_Client::BufferLength() // purpose : //======================================================================= -TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape ) +TopoDS_Shape GEOM_Client::GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape ) { - TopoDS_Shape S; - TCollection_AsciiString IOR(aShape->Name()); - Standard_Integer anIndex = Find(IOR, S); + TCollection_AsciiString IOR = geom->GetStringFromIOR(aShape); + Standard_Integer anIndex = Find(IOR, S); - BRep_Builder B; - - if (anIndex !=0 ) { - return S ; - } + if (anIndex !=0 ) return S ; /******* in case of a MAIN GEOM::SHAPE ********/ if (aShape->IsMainShape()) { S = Load(geom, aShape); - Bind(IOR,S); + Bind(IOR, S); return S; } /******* in case of SUB GEOM::SHAPE ***********/ // Load and Explore the Main Shape - TopoDS_Shape MainShape = GetShape (geom, geom->GetIORFromString(aShape->MainName())); - GEOM::GEOM_Shape::ListOfSubShapeID_var list = aShape->Index(); + TopoDS_Shape aMainShape = GetShape (geom, aShape->GetMainShape()); + GEOM::ListOfLong_var list = aShape->GetSubShapeIndices(); + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aMainShape, anIndices); - Standard_Integer j = 1; - TopExp_Explorer exp; - TopAbs_ShapeEnum ShapeType = TopAbs_ShapeEnum(aShape->ShapeType()); - /* Case of only one subshape */ if (list->length() == 1) { - if (ShapeType == TopAbs_COMPOUND) - { - TopoDS_Iterator it; - TopTools_ListOfShape CL; - CL.Append( MainShape ); - TopTools_ListIteratorOfListOfShape itC; - for (itC.Initialize( CL ); itC.More(); itC.Next()) - { - for (it.Initialize( itC.Value() ); it.More(); it.Next()) - { - if ( it.Value().ShapeType() == TopAbs_COMPOUND) - { - if (j == list[0]) - { - S = it.Value(); - Bind(IOR, S); - return S; - } - j++; - CL.Append( it.Value() ); - } - } - } - } - else - { - TopTools_MapOfShape M; - for (exp.Init(MainShape, ShapeType); exp.More(); exp.Next()) { - if ( M.Add(exp.Current()) ) - { - if (j == list[0]) - { - S = exp.Current(); - Bind(IOR, S); - return S; - } - j++; - } - } - } + S = anIndices.FindKey(list[0]); } - - /* Case of a compound containing two or more sub shapes (not a main shape compound !) */ - - /* Warning : the compound when representing sub shapes must be explored in a sub type */ - /* that is NOT ShapeType=aShape->ShapeType()= TopAbs_COMPOUND ! */ - /* We have to retrieve the exact sub type of shapes contained in the compound first ! */ - TopoDS_Iterator it ; - TopAbs_ShapeEnum exactSubType ; - S = Load( geom, aShape ); - it.Initialize( S, true, true ) ; - it.More(); - exactSubType = it.Value().ShapeType() ; + else { + BRep_Builder B; + TopoDS_Compound aCompound; + B.MakeCompound(aCompound); + for(int i=0; ilength(); i++) { + TopoDS_Shape aSubShape = anIndices.FindKey(list[i]); + B.Add(aCompound, aSubShape); + } - TColStd_MapOfInteger MapIndex; - Standard_Integer nbSS = list->length(); - TopoDS_Compound Comp; - B.MakeCompound(Comp); - - for (Standard_Integer i=1; i<=nbSS; i++) - MapIndex.Add(list[i-1]); - - for (exp.Init(MainShape, exactSubType), j=1; exp.More() ; exp.Next(), j++) { - if ( MapIndex.Contains(j) ) { - B.Add( Comp, exp.Current() ); - } - } - Bind(IOR, Comp); - return Comp; + S = aCompound; + } + Bind(IOR, S); + return S; } + diff --git a/src/GEOMClient/GEOM_Client.hxx b/src/GEOMClient/GEOM_Client.hxx index 0dbaddd63..0dd255d35 100644 --- a/src/GEOMClient/GEOM_Client.hxx +++ b/src/GEOMClient/GEOM_Client.hxx @@ -30,7 +30,6 @@ #define _GEOM_Client_HeaderFile #include -#include CORBA_SERVER_HEADER(GEOM_Shape) #include CORBA_SERVER_HEADER(GEOM_Gen) # #ifndef _TColStd_SequenceOfAsciiString_HeaderFile @@ -76,13 +75,14 @@ public: // Standard_EXPORT GEOM_Client(); Standard_EXPORT GEOM_Client(Engines::Container_ptr client); - Standard_EXPORT Standard_Integer Find( const TCollection_AsciiString& ShapeIOR, TopoDS_Shape& S ) ; - Standard_EXPORT void Bind( const TCollection_AsciiString& ShapeIOR, const TopoDS_Shape& S ) ; - Standard_EXPORT TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape ); - Standard_EXPORT void RemoveShapeFromBuffer( const TCollection_AsciiString& shapeIOR ) ; + Standard_EXPORT Standard_Integer Find( const TCollection_AsciiString& IOR, TopoDS_Shape& S ) ; + Standard_EXPORT Standard_Integer Find( const TopoDS_Shape& S, TCollection_AsciiString& IOR ) ; + Standard_EXPORT void Bind( const TCollection_AsciiString& IOR, const TopoDS_Shape& S ) ; + Standard_EXPORT TopoDS_Shape GetShape( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape ); + Standard_EXPORT void RemoveShapeFromBuffer( const TCollection_AsciiString& IOR ) ; Standard_EXPORT void ClearClientBuffer() ; Standard_EXPORT unsigned int BufferLength() ; - TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Shape_ptr aShape); + TopoDS_Shape Load( GEOM::GEOM_Gen_ptr geom, GEOM::GEOM_Object_ptr aShape); private: // Fields PRIVATE diff --git a/src/GEOMClient/Makefile.in b/src/GEOMClient/Makefile.in index 32db3e220..19a402639 100644 --- a/src/GEOMClient/Makefile.in +++ b/src/GEOMClient/Makefile.in @@ -42,7 +42,9 @@ EXPORT_HEADERS = \ LIB = libGEOMClient.la LIB_SRC = GEOM_Client.cxx -LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl +LIB_SERVER_IDL = \ + SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl SALOME_GenericObj.idl \ + GEOM_Gen.idl # Executables targets BIN = diff --git a/src/GEOMDS/GEOMDS.cdl b/src/GEOMDS/GEOMDS.cdl deleted file mode 100644 index 0e727a942..000000000 --- a/src/GEOMDS/GEOMDS.cdl +++ /dev/null @@ -1,53 +0,0 @@ --- GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management --- --- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org --- --- --- --- File : GEOMDS.cdl --- Author : Yves FRICAUD --- Module : GEOM - -package GEOMDS - - ---Purpose: - -uses - TDF, - TDocStd, - TDataStd, - TColStd, - TopoDS, - TCollection, - TNaming - - -is - class Application; - class Commands; - class Explorer; - - - class DataMapOfIntegerTransient instantiates DataMap from -TCollection(Integer from Standard, Transient from Standard, MapIntegerHasher -from TColStd); - -end GEOMDS; - diff --git a/src/GEOMDS/GEOMDS_Application.cdl b/src/GEOMDS/GEOMDS_Application.cdl deleted file mode 100644 index de1ec2bbc..000000000 --- a/src/GEOMDS/GEOMDS_Application.cdl +++ /dev/null @@ -1,49 +0,0 @@ --- GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management --- --- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org --- --- --- --- File : GEOMDS_Application.cdl --- Author : Yves FRICAUD --- Module : GEOM - -class Application from GEOMDS inherits Application from TDocStd - - ---Purpose: - -uses - Label from TDF, - SequenceOfExtendedString from TColStd, - CString from Standard, - Document from TDocStd - - -is - - Create - returns mutable Application from GEOMDS; - - Formats(me: mutable; Formats: out SequenceOfExtendedString from TColStd) - is redefined; - - ResourcesName (me: mutable) returns CString from Standard; - -end Application; diff --git a/src/GEOMDS/GEOMDS_Application.ixx b/src/GEOMDS/GEOMDS_Application.ixx deleted file mode 100644 index c94573fb8..000000000 --- a/src/GEOMDS/GEOMDS_Application.ixx +++ /dev/null @@ -1,86 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_Application.ixx -// Module : GEOM - -#include "GEOMDS_Application.jxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -GEOMDS_Application::~GEOMDS_Application() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMDS_Application_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TDocStd_Application); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TDocStd_Application); - static Handle_Standard_Type aType2 = STANDARD_TYPE(CDF_Application); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(CDF_Application); - static Handle_Standard_Type aType3 = STANDARD_TYPE(CDM_Application); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(CDM_Application); - static Handle_Standard_Type aType4 = STANDARD_TYPE(Standard_Transient); - if ( aType4.IsNull()) aType4 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMDS_Application", - sizeof(GEOMDS_Application), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - -// DownCast method -// allow safe downcasting - - -const Handle(GEOMDS_Application) Handle(GEOMDS_Application)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMDS_Application) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMDS_Application))) { - _anOtherObject = Handle(GEOMDS_Application)((Handle(GEOMDS_Application)&)AnObject); - } - } - - return _anOtherObject ; -} - - -const Handle(Standard_Type)& GEOMDS_Application::DynamicType() const -{ - return STANDARD_TYPE(GEOMDS_Application) ; -} -Standard_Boolean GEOMDS_Application::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMDS_Application) == AType || TDocStd_Application::IsKind(AType)); -} -Handle_GEOMDS_Application::~Handle_GEOMDS_Application() {} \ No newline at end of file diff --git a/src/GEOMDS/GEOMDS_Commands.cdl b/src/GEOMDS/GEOMDS_Commands.cdl deleted file mode 100644 index a4a2f8f06..000000000 --- a/src/GEOMDS/GEOMDS_Commands.cdl +++ /dev/null @@ -1,46 +0,0 @@ --- GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management --- --- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org --- --- --- --- File : GEOMDS_Commands.cdl --- Author : Yves FRICAUD --- Module : GEOM - -class Commands from GEOMDS - - ---Purpose: - -uses - Label from TDF, - Shape from TopoDS, - ExtendedString from TCollection - -is - Create ( Main : Label from TDF) returns Commands from GEOMDS; - - AddShape(me : in out; S : Shape from TopoDS; - Name : ExtendedString from TCollection) - returns Label from TDF; - -fields - myLab : Label from TDF; -end Commands; diff --git a/src/GEOMDS/GEOMDS_Commands.hxx b/src/GEOMDS/GEOMDS_Commands.hxx deleted file mode 100644 index 0e2403920..000000000 --- a/src/GEOMDS/GEOMDS_Commands.hxx +++ /dev/null @@ -1,150 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GeomDS_Commands.hxx -// Author : Yves FRICAUD/Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#ifndef _GEOMDS_Commands_HeaderFile -#define _GEOMDS_Commands_HeaderFile - -#ifndef _TDF_Label_HeaderFile -#include -#endif -class TDF_Label; -class TopoDS_Shape; -class TCollection_ExtendedString; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - - - -//============================================================================ -// class : GEOMDS_Commands -// purpose : -//============================================================================ -class GEOMDS_Commands { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // inline void operator delete(void *anAddress, size_t size) - // { - // if (anAddress) Standard::Free((Standard_Address&)anAddress,size); - // } - // Methods PUBLIC - // - - // used for specific entities - enum GEOMDS_ConstructiveType { VECTOR, LINE, PLANE } ; - - // Methods to add or create items in the data structure - Standard_EXPORT GEOMDS_Commands(const TDF_Label& Main); - Standard_EXPORT TDF_Label AddShape(const TopoDS_Shape& S, - const TCollection_ExtendedString& Name) ; - - Standard_EXPORT TDF_Label Generated(const TopoDS_Shape& S, - const TCollection_ExtendedString& Name) ; - Standard_EXPORT TDF_Label Generated(const TopoDS_Shape& S1, - const TopoDS_Shape& S2, - const TCollection_ExtendedString& Name) ; - - /* Shapes construction */ - Standard_EXPORT TDF_Label AddIndependentShape(const TopoDS_Shape& S, - const TCollection_AsciiString& nameIOR) ; - Standard_EXPORT TDF_Label AddDependentShape(const TopoDS_Shape& S, - const TCollection_AsciiString& nameIOR, - const TDF_Label& mainLab) ; - Standard_EXPORT TDF_Label AddConstructiveElement(const TopoDS_Shape& S, - const TCollection_ExtendedString& nameIOR, - const GEOMDS_ConstructiveType& aType); - - Standard_EXPORT Standard_Boolean AddIORNameAttribute(const TDF_Label& aLabel, - const TCollection_ExtendedString& nameIOR) ; - - /* Shapes query */ - - Standard_EXPORT Standard_Boolean IsConstructiveElement(const TDF_Label& aLabel) ; - - Standard_EXPORT Standard_Boolean IsConstructiveElement(const TDF_Label& aLabel, - TopoDS_Shape& returnTopo, - GEOMDS_ConstructiveType& returnType) ; - - Standard_EXPORT Standard_Boolean GetShape(const TDF_Label& aLabel, - TopoDS_Shape& returnTopo) ; - - Standard_EXPORT Standard_Boolean IsDependentShape(const TDF_Label& aLabel) ; - - Standard_EXPORT Standard_Boolean GetMainShapeLabel(const TDF_Label& aLabel, - TDF_Label& returnMainLabel) ; - - Standard_EXPORT Standard_Boolean ClearAllIOR(const TDF_Label& aLabel) ; - - Standard_EXPORT Standard_Boolean HasIOR(const TDF_Label& aLabel) ; - - Standard_EXPORT Standard_Boolean ReturnNameIOR(const TDF_Label& aLabel, - TCollection_ExtendedString& returnNameIOR) ; - -protected: - - // Methods PROTECTED - // - - // Fields PROTECTED - // - -private: - - // Methods PRIVATE - // - - // Fields PRIVATE - // - - TDF_Label myLab; - -}; - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx b/src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx deleted file mode 100644 index b391e99fa..000000000 --- a/src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx +++ /dev/null @@ -1,118 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx -// Module : GEOM - -#ifndef _GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_HeaderFile -#define _GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_Standard_Transient_HeaderFile -#include -#endif -#ifndef _Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#include "Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx" -#endif -class Standard_NoSuchObject; -class Standard_Transient; -class TColStd_MapIntegerHasher; -class GEOMDS_DataMapOfIntegerTransient; -class GEOMDS_DataMapNodeOfDataMapOfIntegerTransient; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient : public TCollection_BasicMapIterator { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient(); -Standard_EXPORT GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient(const GEOMDS_DataMapOfIntegerTransient& aMap); -Standard_EXPORT void Initialize(const GEOMDS_DataMapOfIntegerTransient& aMap) ; -Standard_EXPORT const Standard_Integer& Key() const; -Standard_EXPORT const Handle_Standard_Transient& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_0.cxx b/src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_0.cxx deleted file mode 100644 index 24cb9de3d..000000000 --- a/src/GEOMDS/GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_0.cxx +++ /dev/null @@ -1,62 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_0.cxx -// Module : GEOM - -using namespace std; -#include "GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx" - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _Standard_Transient_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _GEOMDS_DataMapOfIntegerTransient_HeaderFile -#include "GEOMDS_DataMapOfIntegerTransient.hxx" -#endif -#ifndef _GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#include "GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx" -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem Handle_Standard_Transient -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_Type_() GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_Type_() -#define TCollection_DataMap GEOMDS_DataMapOfIntegerTransient -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx b/src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx deleted file mode 100644 index 437a40015..000000000 --- a/src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx +++ /dev/null @@ -1,152 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx -// Module : GEOM - -#ifndef _GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#define _GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#include "Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx" -#endif - -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_Standard_Transient_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class Standard_Transient; -class TColStd_MapIntegerHasher; -class GEOMDS_DataMapOfIntegerTransient; -class GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient; - - -class GEOMDS_DataMapNodeOfDataMapOfIntegerTransient : public TCollection_MapNode { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT inline GEOMDS_DataMapNodeOfDataMapOfIntegerTransient(const Standard_Integer& K,const Handle(Standard_Transient)& I,const TCollection_MapNodePtr& n); -Standard_EXPORT inline Standard_Integer& Key() const; -Standard_EXPORT inline Handle_Standard_Transient& Value() const; -Standard_EXPORT ~GEOMDS_DataMapNodeOfDataMapOfIntegerTransient(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Integer myKey; -Handle_Standard_Transient myValue; - - -}; - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem Handle_Standard_Transient -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_Type_() GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_Type_() -#define TCollection_DataMap GEOMDS_DataMapOfIntegerTransient -#define TCollection_DataMap_hxx - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_0.cxx b/src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_0.cxx deleted file mode 100644 index 12f74127c..000000000 --- a/src/GEOMDS/GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_0.cxx +++ /dev/null @@ -1,111 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_0.cxx -// Module : GEOM - -using namespace std; -#include "GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _Standard_Transient_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _GEOMDS_DataMapOfIntegerTransient_HeaderFile -#include "GEOMDS_DataMapOfIntegerTransient.hxx" -#endif -#ifndef _GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_HeaderFile -#include "GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx" -#endif -GEOMDS_DataMapNodeOfDataMapOfIntegerTransient::~GEOMDS_DataMapNodeOfDataMapOfIntegerTransient() {} - - - -Standard_EXPORT Handle_Standard_Type& GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("GEOMDS_DataMapNodeOfDataMapOfIntegerTransient", - sizeof(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient) Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient))) { - _anOtherObject = Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)((Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& GEOMDS_DataMapNodeOfDataMapOfIntegerTransient::DynamicType() const -{ - return STANDARD_TYPE(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient) ; -} -Standard_Boolean GEOMDS_DataMapNodeOfDataMapOfIntegerTransient::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient) == AType || TCollection_MapNode::IsKind(AType)); -} -Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient::~Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient() {} -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem Handle_Standard_Transient -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_Type_() GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_Type_() -#define TCollection_DataMap GEOMDS_DataMapOfIntegerTransient -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMDS/GEOMDS_DataMapOfIntegerTransient.hxx b/src/GEOMDS/GEOMDS_DataMapOfIntegerTransient.hxx deleted file mode 100644 index 52fb4b920..000000000 --- a/src/GEOMDS/GEOMDS_DataMapOfIntegerTransient.hxx +++ /dev/null @@ -1,140 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_DataMapOfIntegerTransient.hxx -// Module : GEOM - -#ifndef _GEOMDS_DataMapOfIntegerTransient_HeaderFile -#define _GEOMDS_DataMapOfIntegerTransient_HeaderFile - -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Handle_Standard_Transient_HeaderFile -#include -#endif -#ifndef _Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#include "Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx" -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_DomainError; -class Standard_NoSuchObject; -class Standard_Transient; -class TColStd_MapIntegerHasher; -class GEOMDS_DataMapNodeOfDataMapOfIntegerTransient; -class GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class GEOMDS_DataMapOfIntegerTransient : public TCollection_BasicMap { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT GEOMDS_DataMapOfIntegerTransient(const Standard_Integer NbBuckets = 1); -Standard_EXPORT GEOMDS_DataMapOfIntegerTransient& Assign(const GEOMDS_DataMapOfIntegerTransient& Other) ; -GEOMDS_DataMapOfIntegerTransient& operator =(const GEOMDS_DataMapOfIntegerTransient& Other) -{ - return Assign(Other); -} - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; -Standard_EXPORT void Clear() ; -~GEOMDS_DataMapOfIntegerTransient() -{ - Clear(); -} - -Standard_EXPORT Standard_Boolean Bind(const Standard_Integer& K,const Handle(Standard_Transient)& I) ; -Standard_EXPORT Standard_Boolean IsBound(const Standard_Integer& K) const; -Standard_EXPORT Standard_Boolean UnBind(const Standard_Integer& K) ; -Standard_EXPORT const Handle_Standard_Transient& Find(const Standard_Integer& K) const; - const Handle_Standard_Transient& operator()(const Standard_Integer& K) const -{ - return Find(K); -} - -Standard_EXPORT Handle_Standard_Transient& ChangeFind(const Standard_Integer& K) ; - Handle_Standard_Transient& operator()(const Standard_Integer& K) -{ - return ChangeFind(K); -} - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - Standard_EXPORT GEOMDS_DataMapOfIntegerTransient(const GEOMDS_DataMapOfIntegerTransient& Other); - - -// Fields PRIVATE -// - - -}; - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/GEOMDS/GEOMDS_DataMapOfIntegerTransient_0.cxx b/src/GEOMDS/GEOMDS_DataMapOfIntegerTransient_0.cxx deleted file mode 100644 index da4ed5f16..000000000 --- a/src/GEOMDS/GEOMDS_DataMapOfIntegerTransient_0.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_DataMapOfIntegerTransient_0.cxx -// Module : GEOM - -using namespace std; -#include "GEOMDS_DataMapOfIntegerTransient.hxx" - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _Standard_Transient_HeaderFile -#include -#endif -#ifndef _TColStd_MapIntegerHasher_HeaderFile -#include -#endif -#ifndef _GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#include "GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx" -#endif -#ifndef _GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_HeaderFile -#include "GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient.hxx" -#endif - - -#define TheKey Standard_Integer -#define TheKey_hxx -#define TheItem Handle_Standard_Transient -#define TheItem_hxx -#define Hasher TColStd_MapIntegerHasher -#define Hasher_hxx -#define TCollection_DataMapNode GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_hxx -#define TCollection_DataMapIterator GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient -#define TCollection_DataMapIterator_hxx -#define Handle_TCollection_DataMapNode Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient -#define TCollection_DataMapNode_Type_() GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_Type_() -#define TCollection_DataMap GEOMDS_DataMapOfIntegerTransient -#define TCollection_DataMap_hxx -#include - diff --git a/src/GEOMDS/GEOMDS_Explorer.cdl b/src/GEOMDS/GEOMDS_Explorer.cdl deleted file mode 100644 index eb737cf95..000000000 --- a/src/GEOMDS/GEOMDS_Explorer.cdl +++ /dev/null @@ -1,52 +0,0 @@ --- GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management --- --- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, --- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS --- --- This library is free software; you can redistribute it and/or --- modify it under the terms of the GNU Lesser General Public --- License as published by the Free Software Foundation; either --- version 2.1 of the License. --- --- This library is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --- Lesser General Public License for more details. --- --- You should have received a copy of the GNU Lesser General Public --- License along with this library; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA --- --- See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org --- --- --- --- File : GEOMDS_Explorer.cdl --- Author : Yves FRICAUD --- Module : GEOM - -class Explorer from GEOMDS - - ---Purpose: - -uses - ChildIterator from TDF, - Label from TDF, - ExtendedString from TCollection, - Shape from TopoDS - - -is - Create ( Main : Label from TDF) returns Explorer from GEOMDS; - - More(me : in out) returns Boolean from Standard; - - Next(me : in out); - - Shape(me)returns Shape from TopoDS; - - Name(me) returns ExtendedString from TCollection; - -fields - myChildIterator : ChildIterator from TDF; -end Explorer; diff --git a/src/GEOMDS/GEOMDS_Explorer.cxx b/src/GEOMDS/GEOMDS_Explorer.cxx deleted file mode 100644 index 8a40ff226..000000000 --- a/src/GEOMDS/GEOMDS_Explorer.cxx +++ /dev/null @@ -1,126 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_Explorer.cxx -// Author : Yves FRICAUD -// Module : GEOM -// $Header$ - -using namespace std; -#include "GEOMDS_Explorer.ixx" - -#include -#include -#include - - -//======================================================================= -//function : GEOMDS_Explorer -//purpose : -//======================================================================= - -GEOMDS_Explorer::GEOMDS_Explorer(const TDF_Label& Main) : myChildIterator(Main) -{ -} - - -//======================================================================= -//function : const; -//purpose : -//======================================================================= - -Standard_Boolean GEOMDS_Explorer::More() -{ - if (!myChildIterator.More()) - return 0; - Handle(TDataStd_Name) Att; - Handle(TNaming_NamedShape) NS; - TDF_Label L = myChildIterator.Value(); - if (( L.FindAttribute(TDataStd_Name::GetID(),Att) ) || - (L.FindAttribute(TNaming_NamedShape::GetID(),NS)) - ) - return 1; - // myChildIterator.Next(); - // More(); - return 0; - /* - if (!myChildIterator.More()) - return 0; - TDF_Label L = myChildIterator.Value(); - Handle(TNaming_NamedShape) NS; - for (TDF_ChildIterator it2(L); it2.More(); it2.Next()) { - TDF_Label L2 = it2.Value(); - if (L2.FindAttribute(TNaming_NamedShape::GetID(),NS)) { - return 1; - } - myChildIterator.Next(); - } - return 0; - */ -} - - -//======================================================================= -//function : Next -//purpose : -//======================================================================= - -void GEOMDS_Explorer::Next() -{ - myChildIterator.Next(); -} - - -//======================================================================= -//function : Shape -//purpose : -//======================================================================= - -TopoDS_Shape GEOMDS_Explorer::Shape() const -{ - Handle(TNaming_NamedShape) NS; - TDF_Label L = myChildIterator.Value(); - L.FindAttribute(TNaming_NamedShape::GetID(),NS); - TopoDS_Shape S = TNaming_Tool::GetShape(NS); - return S; -} - -//======================================================================= -//function : Name -//purpose : -//======================================================================= - -TCollection_ExtendedString GEOMDS_Explorer::Name() const -{ - TDF_Label L = myChildIterator.Value(); - Handle(TDataStd_Name) Att; - if ( L.FindAttribute(TDataStd_Name::GetID(),Att) ) - //L.FindAttribute(TDataStd_Name::GetID(),Att); - return Att->Get(); - else - return TCollection_ExtendedString(); -} - - - - diff --git a/src/GEOMDS/GEOMDS_Explorer.hxx b/src/GEOMDS/GEOMDS_Explorer.hxx deleted file mode 100644 index 29ce10bc9..000000000 --- a/src/GEOMDS/GEOMDS_Explorer.hxx +++ /dev/null @@ -1,101 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_Explorer.hxx -// Module : GEOM - -#ifndef _GEOMDS_Explorer_HeaderFile -#define _GEOMDS_Explorer_HeaderFile - -#ifndef _TDF_ChildIterator_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class TDF_Label; -class TopoDS_Shape; -class TCollection_ExtendedString; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class GEOMDS_Explorer { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT GEOMDS_Explorer(const TDF_Label& Main); -Standard_EXPORT Standard_Boolean More() ; -Standard_EXPORT void Next() ; -Standard_EXPORT TopoDS_Shape Shape() const; -Standard_EXPORT TCollection_ExtendedString Name() const; - -protected: - - // Methods PROTECTED - // - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - // Fields PRIVATE - // -TDF_ChildIterator myChildIterator; - - -}; - - -// other inline functions and methods (like "C++: function call" methods) -// - -#endif diff --git a/src/GEOMDS/GEOMDS_Explorer.jxx b/src/GEOMDS/GEOMDS_Explorer.jxx deleted file mode 100644 index 3a0770d28..000000000 --- a/src/GEOMDS/GEOMDS_Explorer.jxx +++ /dev/null @@ -1,38 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOMDS_Explorer.jxx -// Module : GEOM - -#ifndef _TDF_Label_HeaderFile -#include -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _TCollection_ExtendedString_HeaderFile -#include -#endif -#ifndef _GEOMDS_Explorer_HeaderFile -#include "GEOMDS_Explorer.hxx" -#endif diff --git a/src/GEOMDS/Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx b/src/GEOMDS/Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx deleted file mode 100644 index 911d6a490..000000000 --- a/src/GEOMDS/Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx -// Module : GEOM - -#ifndef _Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile -#define _Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class GEOMDS_DataMapNodeOfDataMapOfIntegerTransient; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient); - -class Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient) : public Handle(TCollection_MapNode) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)():Handle(TCollection_MapNode)() {} - Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)(const Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)(const GEOMDS_DataMapNodeOfDataMapOfIntegerTransient* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)& operator=(const Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)& operator=(const GEOMDS_DataMapNodeOfDataMapOfIntegerTransient* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - GEOMDS_DataMapNodeOfDataMapOfIntegerTransient* operator->() - { - return (GEOMDS_DataMapNodeOfDataMapOfIntegerTransient *)ControlAccess(); - } - - GEOMDS_DataMapNodeOfDataMapOfIntegerTransient* operator->() const - { - return (GEOMDS_DataMapNodeOfDataMapOfIntegerTransient *)ControlAccess(); - } - - Standard_EXPORT ~Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient)(); - - Standard_EXPORT static const Handle(GEOMDS_DataMapNodeOfDataMapOfIntegerTransient) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx b/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx index e61d3d30f..94729c71d 100644 --- a/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_EdgeFilter.cxx @@ -28,107 +28,39 @@ using namespace std; #include "GEOM_EdgeFilter.ixx" -#include "GEOM_Client.hxx" -#include "SALOME_InteractiveObject.hxx" -#include "GEOM_InteractiveObject.hxx" -#include "GEOM_ShapeTypeFilter.hxx" -#include "SALOME_TypeFilter.hxx" - -#include "utilities.h" -#include "QAD_Application.h" -#include "QAD_Desktop.h" -#include "QAD_Study.h" - -// Open CASCADE Includes #include #include #include -#include - - -static GEOM_Client ShapeReader; -/*! - enumeration TypeOfEdge is AnyEdge,Line,Circle; -*/ -GEOM_EdgeFilter::GEOM_EdgeFilter(const StdSelect_TypeOfEdge Edge, - GEOM::GEOM_Gen_ptr geom) +//======================================================================= +// function : IsShapeOk +// purpose : enumeration TypeOfEdge is AnyEdge,Line,Circle; +//======================================================================= +GEOM_EdgeFilter::GEOM_EdgeFilter( const StdSelect_TypeOfEdge theKind ) +: GEOM_ShapeTypeFilter( TopAbs_EDGE ) { - myKind = Edge; - myComponentGeom = GEOM::GEOM_Gen::_narrow(geom); + myKind = theKind; } -Standard_Boolean GEOM_EdgeFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const +//======================================================================= +// function : IsShapeOk +// purpose : +//======================================================================= +Standard_Boolean GEOM_EdgeFilter::IsShapeOk( const TopoDS_Shape& theShape ) const { - Handle(SALOME_TypeFilter) GeomFilter = new SALOME_TypeFilter( "GEOM" ); - if ( !GeomFilter->IsOk(anObj) ) - return false; - - Handle(GEOM_ShapeTypeFilter) GeomShapeTypeFilter = new GEOM_ShapeTypeFilter( TopAbs_EDGE, myComponentGeom ); - if ( !GeomShapeTypeFilter->IsOk(anObj) ) - return false; - - if ( anObj->hasEntry() ) { - QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID( anObj->getEntry() ); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if ( !obj->_is_nil() ) { - if (obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myComponentGeom->GetIORFromString( anIOR->Value() ); - if ( aShape->_is_nil() ) - return false; - - TopoDS_Shape Shape = ShapeReader.GetShape( myComponentGeom, aShape ); - if ( Shape.IsNull() ) - return false; - - switch (myKind) { - case StdSelect_AnyEdge: - return Standard_True; - case StdSelect_Line: - { - BRepAdaptor_Curve curv(TopoDS::Edge(Shape)); - return (curv.GetType() == GeomAbs_Line); - } - break; - case StdSelect_Circle: - BRepAdaptor_Curve curv(TopoDS::Edge(Shape)); - return (curv.GetType() == GeomAbs_Circle); - } - } - } - } - - if ( anObj->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject)) ) { - Handle(GEOM_InteractiveObject) GObject = - Handle(GEOM_InteractiveObject)::DownCast(anObj); - - GEOM::GEOM_Shape_var aShape = myComponentGeom->GetIORFromString( GObject->getIOR() ); - if ( aShape->_is_nil() ) - return false; - - TopoDS_Shape Shape = ShapeReader.GetShape( myComponentGeom, aShape ); - if ( Shape.IsNull() ) - return false; - - switch (myKind) { - case StdSelect_AnyEdge: - return Standard_True; - case StdSelect_Line: - { - BRepAdaptor_Curve curv(TopoDS::Edge(Shape)); - return (curv.GetType() == GeomAbs_Line); - } - break; - case StdSelect_Circle: - BRepAdaptor_Curve curv(TopoDS::Edge(Shape)); - return (curv.GetType() == GeomAbs_Circle); + if ( !theShape.IsNull() && theShape.ShapeType() == TopAbs_EDGE ) + { + BRepAdaptor_Curve aCurve( TopoDS::Edge( theShape ) ); + GeomAbs_CurveType aType = aCurve.GetType(); + + switch ( myKind ) + { + case StdSelect_AnyEdge: return Standard_True; + case StdSelect_Line: return ( aType == GeomAbs_Line ); + case StdSelect_Circle: return ( aType == GeomAbs_Circle ); } } - return false; + return Standard_False; } diff --git a/src/GEOMFiltersSelection/GEOM_EdgeFilter.hxx b/src/GEOMFiltersSelection/GEOM_EdgeFilter.hxx index a464cdae9..ea4428983 100644 --- a/src/GEOMFiltersSelection/GEOM_EdgeFilter.hxx +++ b/src/GEOMFiltersSelection/GEOM_EdgeFilter.hxx @@ -32,21 +32,18 @@ #endif #include "SALOME_InteractiveObject.hxx" -#include "SALOME_Filter.hxx" +#include "GEOM_ShapeTypeFilter.hxx" // IDL Headers #include -#include CORBA_SERVER_HEADER(GEOM_Shape) #include CORBA_SERVER_HEADER(GEOM_Gen) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) // Open CASCADE Includes #include -#include -#include #include -class GEOM_EdgeFilter : public SALOME_Filter { +class GEOM_EdgeFilter : public GEOM_ShapeTypeFilter { public: @@ -68,31 +65,25 @@ public: // } // Methods PUBLIC // -Standard_EXPORT GEOM_EdgeFilter(const StdSelect_TypeOfEdge Edge, - GEOM::GEOM_Gen_ptr geom); - -Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; +Standard_EXPORT GEOM_EdgeFilter( const StdSelect_TypeOfEdge Edge ); Standard_EXPORT ~GEOM_EdgeFilter(); - - // Type management // Standard_EXPORT friend Handle_Standard_Type& GEOM_EdgeFilter_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: // Methods PROTECTED // - + Standard_EXPORT virtual Standard_Boolean IsShapeOk(const TopoDS_Shape& theShape ) const; // Fields PROTECTED // StdSelect_TypeOfEdge myKind; -GEOM::GEOM_Gen_var myComponentGeom; private: diff --git a/src/GEOMFiltersSelection/GEOM_EdgeFilter.ixx b/src/GEOMFiltersSelection/GEOM_EdgeFilter.ixx index 9e028014b..275670b55 100644 --- a/src/GEOMFiltersSelection/GEOM_EdgeFilter.ixx +++ b/src/GEOMFiltersSelection/GEOM_EdgeFilter.ixx @@ -37,8 +37,8 @@ GEOM_EdgeFilter::~GEOM_EdgeFilter() {} Standard_EXPORT Handle_Standard_Type& GEOM_EdgeFilter_Type_() { - static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_Filter); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_Filter); + static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOM_ShapeTypeFilter); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(GEOM_ShapeTypeFilter); static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); @@ -77,7 +77,7 @@ const Handle(Standard_Type)& GEOM_EdgeFilter::DynamicType() const } Standard_Boolean GEOM_EdgeFilter::IsKind(const Handle(Standard_Type)& AType) const { - return (STANDARD_TYPE(GEOM_EdgeFilter) == AType || SALOME_Filter::IsKind(AType)); + return (STANDARD_TYPE(GEOM_EdgeFilter) == AType || GEOM_ShapeTypeFilter::IsKind(AType)); } Handle_GEOM_EdgeFilter::~Handle_GEOM_EdgeFilter() {} diff --git a/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx b/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx index aca4648e4..5fbaf1743 100644 --- a/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_FaceFilter.cxx @@ -28,157 +28,47 @@ using namespace std; #include "GEOM_FaceFilter.ixx" -#include "GEOM_Client.hxx" -#include "SALOME_InteractiveObject.hxx" -#include "GEOM_InteractiveObject.hxx" -#include "GEOM_ShapeTypeFilter.hxx" -#include "SALOME_TypeFilter.hxx" - -#include "utilities.h" -#include "QAD_Application.h" -#include "QAD_Desktop.h" -#include "QAD_Study.h" - -// Open CASCADE Includes #include #include -#include #include -#include -static GEOM_Client ShapeReader; - -/*! - enumeration TypeOfFace is AnyFace,Plane,Cylinder,Sphere,Torus,Revol,Cone; -*/ -GEOM_FaceFilter::GEOM_FaceFilter(const StdSelect_TypeOfFace Face, - GEOM::GEOM_Gen_ptr geom) +//======================================================================= +// function : IsShapeOk +// purpose : enumeration TypeOfFace is AnyFace,Plane,Cylinder,Sphere,Torus,Revol,Cone; +//======================================================================= +GEOM_FaceFilter::GEOM_FaceFilter( const StdSelect_TypeOfFace theKind ) +: GEOM_ShapeTypeFilter( TopAbs_FACE ) { - myKind = Face; - myComponentGeom = GEOM::GEOM_Gen::_narrow(geom); + myKind = theKind; } -Standard_Boolean GEOM_FaceFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const +//======================================================================= +// function : IsShapeOk +// purpose : +//======================================================================= +Standard_Boolean GEOM_FaceFilter::IsShapeOk( const TopoDS_Shape& theShape ) const { - Handle(SALOME_TypeFilter) GeomFilter = new SALOME_TypeFilter( "GEOM" ); - if ( !GeomFilter->IsOk(anObj) ) - return false; - - Handle(GEOM_ShapeTypeFilter) GeomShapeTypeFilter = new GEOM_ShapeTypeFilter( TopAbs_FACE, myComponentGeom ); - if ( !GeomShapeTypeFilter->IsOk(anObj) ) - return false; - - if ( anObj->hasEntry() ) { - QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID( anObj->getEntry() ); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if ( !obj->_is_nil() ) { - if (obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myComponentGeom->GetIORFromString( anIOR->Value() ); - if ( aShape->_is_nil() ) - return false; - - TopoDS_Shape Shape = ShapeReader.GetShape( myComponentGeom, aShape ); - if ( Shape.IsNull() ) - return false; - - switch (myKind) { - case StdSelect_AnyFace: - return Standard_True; - case StdSelect_Plane: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Plane); - } - case StdSelect_Cylinder: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Cylinder); - } - case StdSelect_Sphere: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Sphere); - } - case StdSelect_Torus: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return ( surf.GetType() == GeomAbs_Torus); - } - case StdSelect_Revol: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return ( surf.GetType() == GeomAbs_Cylinder || - surf.GetType() == GeomAbs_Cone || - surf.GetType() == GeomAbs_Torus || - surf.GetType() == GeomAbs_Sphere || - surf.GetType() == GeomAbs_SurfaceOfRevolution ); - } - case StdSelect_Cone: // en attendant la liberation du cdl, on l'utilise pour Cone - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Cone); - } - } - } - } - } - - if ( anObj->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject)) ) { - Handle(GEOM_InteractiveObject) GObject = - Handle(GEOM_InteractiveObject)::DownCast(anObj); - - GEOM::GEOM_Shape_var aShape = myComponentGeom->GetIORFromString( GObject->getIOR() ); - if ( aShape->_is_nil() ) - return false; - - TopoDS_Shape Shape = ShapeReader.GetShape( myComponentGeom, aShape ); - if ( Shape.IsNull() ) - return false; - - switch (myKind) { - case StdSelect_AnyFace: - return Standard_True; - case StdSelect_Plane: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Plane); - } - case StdSelect_Cylinder: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Cylinder); - } - case StdSelect_Sphere: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Sphere); - } - case StdSelect_Torus: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return ( surf.GetType() == GeomAbs_Torus); - } - case StdSelect_Revol: - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return ( surf.GetType() == GeomAbs_Cylinder || - surf.GetType() == GeomAbs_Cone || - surf.GetType() == GeomAbs_Torus || - surf.GetType() == GeomAbs_Sphere || - surf.GetType() == GeomAbs_SurfaceOfRevolution ); - } - case StdSelect_Cone: // en attendant la liberation du cdl, on l'utilise pour Cone - { - BRepAdaptor_Surface surf(TopoDS::Face(Shape)); - return (surf.GetType() == GeomAbs_Cone); - } + if ( !theShape.IsNull() && theShape.ShapeType() == TopAbs_FACE ) + { + BRepAdaptor_Surface aSurf( TopoDS::Face( theShape ) ); + GeomAbs_SurfaceType aType = aSurf.GetType(); + + switch ( myKind ) + { + case StdSelect_AnyFace: return Standard_True; + case StdSelect_Plane: return ( aType == GeomAbs_Plane ); + case StdSelect_Cylinder: return ( aType == GeomAbs_Cylinder); + case StdSelect_Sphere: return ( aType == GeomAbs_Sphere); + case StdSelect_Torus: return ( aType == GeomAbs_Torus); + case StdSelect_Revol: return ( aType == GeomAbs_Cylinder || + aType == GeomAbs_Cone || + aType == GeomAbs_Torus || + aType == GeomAbs_Sphere || + aType == GeomAbs_SurfaceOfRevolution ); + case StdSelect_Cone: return ( aType == GeomAbs_Cone); } } - return false; + return Standard_False; } diff --git a/src/GEOMFiltersSelection/GEOM_FaceFilter.hxx b/src/GEOMFiltersSelection/GEOM_FaceFilter.hxx index d81e27413..de6e94893 100644 --- a/src/GEOMFiltersSelection/GEOM_FaceFilter.hxx +++ b/src/GEOMFiltersSelection/GEOM_FaceFilter.hxx @@ -31,22 +31,18 @@ #include "Handle_GEOM_FaceFilter.hxx" #endif -#include "SALOME_InteractiveObject.hxx" -#include "SALOME_Filter.hxx" +#include "GEOM_ShapeTypeFilter.hxx" // IDL Headers #include -#include CORBA_SERVER_HEADER(GEOM_Shape) #include CORBA_SERVER_HEADER(GEOM_Gen) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) // Open CASCADE Includes #include -#include -#include #include -class GEOM_FaceFilter : public SALOME_Filter { +class GEOM_FaceFilter : public GEOM_ShapeTypeFilter { public: @@ -68,10 +64,7 @@ public: // } // Methods PUBLIC // -Standard_EXPORT GEOM_FaceFilter(const StdSelect_TypeOfFace Face, - GEOM::GEOM_Gen_ptr geom); - -Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; +Standard_EXPORT GEOM_FaceFilter( const StdSelect_TypeOfFace Face ); Standard_EXPORT ~GEOM_FaceFilter(); @@ -81,18 +74,18 @@ Standard_EXPORT ~GEOM_FaceFilter(); // Standard_EXPORT friend Handle_Standard_Type& GEOM_FaceFilter_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: // Methods PROTECTED // + Standard_EXPORT virtual Standard_Boolean IsShapeOk(const TopoDS_Shape& theShape ) const; // Fields PROTECTED // StdSelect_TypeOfFace myKind; -GEOM::GEOM_Gen_var myComponentGeom; private: diff --git a/src/GEOMFiltersSelection/GEOM_FaceFilter.ixx b/src/GEOMFiltersSelection/GEOM_FaceFilter.ixx index f6404a0d3..4f81dc83b 100644 --- a/src/GEOMFiltersSelection/GEOM_FaceFilter.ixx +++ b/src/GEOMFiltersSelection/GEOM_FaceFilter.ixx @@ -37,8 +37,8 @@ GEOM_FaceFilter::~GEOM_FaceFilter() {} Standard_EXPORT Handle_Standard_Type& GEOM_FaceFilter_Type_() { - static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_Filter); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_Filter); + static Handle_Standard_Type aType1 = STANDARD_TYPE(GEOM_ShapeTypeFilter); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(GEOM_ShapeTypeFilter); static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); @@ -77,7 +77,7 @@ const Handle(Standard_Type)& GEOM_FaceFilter::DynamicType() const } Standard_Boolean GEOM_FaceFilter::IsKind(const Handle(Standard_Type)& AType) const { - return (STANDARD_TYPE(GEOM_FaceFilter) == AType || SALOME_Filter::IsKind(AType)); + return (STANDARD_TYPE(GEOM_FaceFilter) == AType || GEOM_ShapeTypeFilter::IsKind(AType)); } Handle_GEOM_FaceFilter::~Handle_GEOM_FaceFilter() {} diff --git a/src/GEOMFiltersSelection/GEOM_LogicalFilter.cxx b/src/GEOMFiltersSelection/GEOM_LogicalFilter.cxx new file mode 100644 index 000000000..39c11dfbb --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_LogicalFilter.cxx @@ -0,0 +1,161 @@ +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_LogicalFilter.cxx +// Author : Sergey LITONIN +// Module : GEOM + +#include "GEOM_LogicalFilter.hxx" + +/* + Class : GEOM_LogicalFilter + Description : Filter for combaining several filters with logical operation (OR or AND) +*/ + +IMPLEMENT_STANDARD_HANDLE( GEOM_LogicalFilter, SALOME_Filter ) +IMPLEMENT_STANDARD_RTTIEXT( GEOM_LogicalFilter, SALOME_Filter ) + +//======================================================================= +// name : GEOM_LogicalFilter::GEOM_LogicalFilter +// Purpose : Constructor +//======================================================================= +GEOM_LogicalFilter::GEOM_LogicalFilter( const GEOM_ListOfFilter& theFilters, + const int theLogOp ) +{ + myFilters = theFilters; + myLogOp = theLogOp; +} + +//======================================================================= +// name : GEOM_LogicalFilter::GEOM_LogicalFilter +// Purpose : Constructor +//======================================================================= +GEOM_LogicalFilter::GEOM_LogicalFilter( const Handle(SALOME_Filter)& theFilter, + const int theLogOp ) +{ + myFilters.Append( theFilter ); + myLogOp = theLogOp; +} + +//======================================================================= +// name : GEOM_LogicalFilter::~GEOM_LogicalFilter +// Purpose : Destructor +//======================================================================= +GEOM_LogicalFilter::~GEOM_LogicalFilter() +{ +} + +//======================================================================= +// name : GEOM_LogicalFilter::IsOk +// Purpose : Verify validity of entry object +//======================================================================= +Standard_Boolean GEOM_LogicalFilter::IsOk( const Handle(SALOME_InteractiveObject)& theIO ) const +{ + GEOM_ListOfFilter::Iterator anIter( myFilters ); + for ( ; anIter.More(); anIter.Next() ) + { + Handle(SALOME_Filter) aFilter = anIter.Value(); + if ( !aFilter.IsNull() ) + { + if ( myLogOp == LO_OR && anIter.Value()->IsOk( theIO ) ) + return true; + if ( myLogOp == LO_AND && !anIter.Value()->IsOk( theIO ) ) + return false; + if ( myLogOp == LO_NOT ) + return !anIter.Value()->IsOk( theIO ); + } + } + + return myLogOp == LO_OR ? false : true; +} + +//======================================================================= +// name : GEOM_LogicalFilter::SetFilters +// Purpose : Set new list of filters. Old wilters are removed +//======================================================================= +void GEOM_LogicalFilter::SetFilters( const GEOM_ListOfFilter& theFilters ) +{ + myFilters = theFilters; +} + +//======================================================================= +// name : GEOM_LogicalFilter::SetLogOp +// Purpose : Set logical operation +//======================================================================= +void GEOM_LogicalFilter::SetLogOp( const int theLogOp ) +{ + myLogOp = theLogOp; +} + +//======================================================================= +// name : GEOM_LogicalFilter::GetFilters +// Purpose : Get list of filters +//======================================================================= +const GEOM_ListOfFilter& GEOM_LogicalFilter::GetFilters() const +{ + return myFilters; +} + +//======================================================================= +// name : GEOM_LogicalFilter::GetLogOp +// Purpose : Get logical operation +//======================================================================= +int GEOM_LogicalFilter::GetLogOp() const +{ + return myLogOp; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMFiltersSelection/GEOM_LogicalFilter.hxx b/src/GEOMFiltersSelection/GEOM_LogicalFilter.hxx new file mode 100644 index 000000000..aa9fbdccf --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_LogicalFilter.hxx @@ -0,0 +1,103 @@ +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_LogicalFilter.hxx +// Author : Sergey LITONIN +// Module : GEOM + +#ifndef _GEOM_LogicalFilter_HeaderFile +#define _GEOM_LogicalFilter_HeaderFile + +#include "SALOME_Filter.hxx" + +#include +#include +#include + +DEFINE_STANDARD_HANDLE( GEOM_LogicalFilter, SALOME_Filter ) + +DEFINE_BASECOLLECTION( GEOM_FilterColl, Handle(SALOME_Filter) ) +DEFINE_LIST( GEOM_ListOfFilter, GEOM_FilterColl, Handle(SALOME_Filter) ) + + +/* + Class : GEOM_LogicalFilter + Description : Filter for combaining several filters with logical operation (OR or AND) +*/ + +class GEOM_LogicalFilter : public SALOME_Filter +{ +public: + + enum { LO_OR, LO_AND, LO_NOT, LO_UNDEFINED }; + +public: + + GEOM_LogicalFilter( const GEOM_ListOfFilter&, const int ); + GEOM_LogicalFilter( const Handle(SALOME_Filter)&, const int ); + + + virtual ~GEOM_LogicalFilter(); + virtual Standard_Boolean IsOk( const Handle(SALOME_InteractiveObject)& ) const; + + void SetFilters( const GEOM_ListOfFilter& ); + void SetLogOp( const int ); + const GEOM_ListOfFilter& GetFilters() const; + int GetLogOp() const; + +private: + + GEOM_ListOfFilter myFilters; + int myLogOp; + +public: + DEFINE_STANDARD_RTTI( GEOM_LogicalFilter ) +}; + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMDS/GEOMDS_Explorer.ixx b/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx similarity index 67% rename from src/GEOMDS/GEOMDS_Explorer.ixx rename to src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx index cd182b147..e9766b88e 100644 --- a/src/GEOMDS/GEOMDS_Explorer.ixx +++ b/src/GEOMFiltersSelection/GEOM_PreviewFilter.cxx @@ -1,4 +1,4 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +// GEOM GEOMFiltersSelection : filter selector for the viewer // // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -21,11 +21,22 @@ // // // -// File : GEOMDS_Explorer.ixx +// File : GEOM_PreviewFilter.cxx +// Author : Sergey ANIKIN // Module : GEOM +// $Header$ -#include "GEOMDS_Explorer.jxx" +#include "GEOM_PreviewFilter.ixx" +#include "SALOME_InteractiveObject.hxx" - +using namespace std; +GEOM_PreviewFilter::GEOM_PreviewFilter() +{ +} + +Standard_Boolean GEOM_PreviewFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const +{ + return ( !anObj.IsNull() && anObj->hasEntry() && strstr( anObj->getEntry(), "TEMP" ) ); +} diff --git a/src/GEOMDS/GEOMDS_Application.hxx b/src/GEOMFiltersSelection/GEOM_PreviewFilter.hxx similarity index 57% rename from src/GEOMDS/GEOMDS_Application.hxx rename to src/GEOMFiltersSelection/GEOM_PreviewFilter.hxx index bc5fa691c..e27701ca6 100644 --- a/src/GEOMDS/GEOMDS_Application.hxx +++ b/src/GEOMFiltersSelection/GEOM_PreviewFilter.hxx @@ -1,6 +1,6 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +// GEOM GEOMFiltersSelection : filter selector for the viewer // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// Copyright (C) 2004 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 @@ -17,33 +17,30 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org // // // -// File : GEOMDS_Application.hxx +// File : GEOM_PreviewFilter.hxx // Module : GEOM -#ifndef _GEOMDS_Application_HeaderFile -#define _GEOMDS_Application_HeaderFile +#ifndef _GEOM_PreviewFilter_HeaderFile +#define _GEOM_PreviewFilter_HeaderFile -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_GEOMDS_Application_HeaderFile -#include +#ifndef _Handle_GEOM_PreviewFilter_HeaderFile +#include "Handle_GEOM_PreviewFilter.hxx" #endif -#ifndef _TDocStd_Application_HeaderFile -#include -#endif -#ifndef _Standard_CString_HeaderFile -#include -#endif -class TColStd_SequenceOfExtendedString; +#include "SALOME_InteractiveObject.hxx" +#include "SALOME_Filter.hxx" +// IDL Headers -class GEOMDS_Application : public TDocStd_Application { + +// Open CASCADE Includes +#include + +class GEOM_PreviewFilter : public SALOME_Filter { public: @@ -59,23 +56,17 @@ public: { if (anAddress) Standard::Free((Standard_Address&)anAddress); } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } // Methods PUBLIC // -Standard_EXPORT GEOMDS_Application(); -Standard_EXPORT virtual void Formats(TColStd_SequenceOfExtendedString& Formats) ; -Standard_EXPORT Standard_CString ResourcesName() ; -Standard_EXPORT ~GEOMDS_Application(); - +Standard_EXPORT GEOM_PreviewFilter(); +Standard_EXPORT ~GEOM_PreviewFilter(); +Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; // Type management // - Standard_EXPORT friend Handle_Standard_Type& GEOMDS_Application_Type_(); + Standard_EXPORT friend Handle_Standard_Type& GEOM_PreviewFilter_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; @@ -88,7 +79,6 @@ protected: // Fields PROTECTED // - private: // Methods PRIVATE diff --git a/src/GEOMFiltersSelection/GEOM_PreviewFilter.ixx b/src/GEOMFiltersSelection/GEOM_PreviewFilter.ixx new file mode 100644 index 000000000..6ec1aef97 --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_PreviewFilter.ixx @@ -0,0 +1,83 @@ +// GEOM GEOMFiltersSelection : filter selector for the viewer +// +// Copyright (C) 2004 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.org +// +// +// +// File : GEOM_PreviewFilter.ixx +// Module : GEOM + +#include "GEOM_PreviewFilter.jxx" + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +GEOM_PreviewFilter::~GEOM_PreviewFilter() {} + + + +Standard_EXPORT Handle_Standard_Type& GEOM_PreviewFilter_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_Filter); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_Filter); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOM_PreviewFilter", + sizeof(GEOM_PreviewFilter), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(GEOM_PreviewFilter) Handle(GEOM_PreviewFilter)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOM_PreviewFilter) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOM_PreviewFilter))) { + _anOtherObject = Handle(GEOM_PreviewFilter)((Handle(GEOM_PreviewFilter)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& GEOM_PreviewFilter::DynamicType() const +{ + return STANDARD_TYPE(GEOM_PreviewFilter) ; +} +Standard_Boolean GEOM_PreviewFilter::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(GEOM_PreviewFilter) == AType || SALOME_Filter::IsKind(AType)); +} +Handle_GEOM_PreviewFilter::~Handle_GEOM_PreviewFilter() {} + diff --git a/src/GEOMDS/GEOMDS_Commands.ixx b/src/GEOMFiltersSelection/GEOM_PreviewFilter.jxx similarity index 71% rename from src/GEOMDS/GEOMDS_Commands.ixx rename to src/GEOMFiltersSelection/GEOM_PreviewFilter.jxx index 09d333363..bd82eff74 100644 --- a/src/GEOMDS/GEOMDS_Commands.ixx +++ b/src/GEOMFiltersSelection/GEOM_PreviewFilter.jxx @@ -1,6 +1,6 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +// GEOM GEOMFiltersSelection : filter selector for the viewer // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// Copyright (C) 2004 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 @@ -17,15 +17,13 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org // // // -// File : GEOMDS_Commands.ixx +// File : GEOM_PreviewFilter.jxx // Module : GEOM -#include "GEOMDS_Commands.jxx" - - - - +#ifndef _GEOM_PreviewFilter_HeaderFile +#include "GEOM_PreviewFilter.hxx" +#endif diff --git a/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx b/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx index 6ca272b01..9d98cc998 100644 --- a/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx +++ b/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.cxx @@ -28,82 +28,137 @@ using namespace std; #include "GEOM_ShapeTypeFilter.ixx" -#include "GEOM_Client.hxx" - #include "SALOME_InteractiveObject.hxx" -#include "GEOM_InteractiveObject.hxx" -#include "SALOME_TypeFilter.hxx" - -#include "utilities.h" +#include "GEOM_Client.hxx" #include "QAD_Application.h" #include "QAD_Desktop.h" -#include "QAD_Study.h" +#include "utilities.h" -static GEOM_Client ShapeReader; +#include -GEOM_ShapeTypeFilter::GEOM_ShapeTypeFilter(TopAbs_ShapeEnum ShapeType, - GEOM::GEOM_Gen_ptr geom) +//======================================================================= +// function : getShape() +// purpose : returns a TopoDS_Shape stored in GEOM_Object +//======================================================================= +static bool getShape( const GEOM::GEOM_Object_ptr& theObject, TopoDS_Shape& theShape ) { - myKind = ShapeType; - myComponentGeom = GEOM::GEOM_Gen::_narrow(geom); + if ( !CORBA::is_nil( theObject ) ) + { + Engines::Component_var comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", "GEOM" ); + GEOM::GEOM_Gen_var myGeom = GEOM::GEOM_Gen::_narrow( comp ); + TopoDS_Shape aTopoDSShape = GEOM_Client().GetShape( myGeom, theObject ); + + if ( !aTopoDSShape.IsNull() ) + { + theShape = aTopoDSShape; + return true; + } + } + return false; } -Standard_Boolean GEOM_ShapeTypeFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const +//======================================================================= +// function : ConvertIOinGEOMObject() +// purpose : +//======================================================================= +static GEOM::GEOM_Object_ptr convertIOinGEOMObject( + const Handle(SALOME_InteractiveObject)& theIO, Standard_Boolean& theResult ) { - Handle(SALOME_TypeFilter) GeomFilter = new SALOME_TypeFilter( "GEOM" ); - if ( !GeomFilter->IsOk(anObj) ) - return false; - if ( anObj->hasEntry() ) { - QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOMEDS::Study_var aStudy = ActiveStudy->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID( anObj->getEntry() ); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if ( !obj->_is_nil() ) { - if (obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = myComponentGeom->GetIORFromString( anIOR->Value() ); - if ( aShape->_is_nil() ) - return false; - - TopoDS_Shape Shape = ShapeReader.GetShape( myComponentGeom, aShape ); - if ( Shape.IsNull() ) - return false; - - MESSAGE ( " myKind = " << myKind ); - MESSAGE ( " Shape.ShapeType = " << Shape.ShapeType() ); - if ( myKind == TopAbs_SHAPE ) - return true; - - if ( Shape.ShapeType() == myKind ) - return true; - else - return false; - } + theResult = Standard_False; + GEOM::GEOM_Object_var aReturnObject; + if ( !theIO.IsNull() ) + { + const char* anEntry = theIO->getEntry(); + SALOMEDS::SObject_var aSObj = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->FindObjectID( anEntry ); + if ( !CORBA::is_nil( aSObj ) ) + { + aReturnObject = GEOM::GEOM_Object::_narrow( aSObj->GetObject() ); + theResult = !CORBA::is_nil( aReturnObject ); } } - - if ( anObj->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject)) ) { - Handle(GEOM_InteractiveObject) GObject = - Handle(GEOM_InteractiveObject)::DownCast(anObj); - - GEOM::GEOM_Shape_var aShape = myComponentGeom->GetIORFromString( GObject->getIOR() ); - if ( aShape->_is_nil() ) - return false; - - TopoDS_Shape Shape = ShapeReader.GetShape( myComponentGeom, aShape ); - if ( Shape.IsNull() ) - return false; - - MESSAGE ( " myKind = " << myKind ); - MESSAGE ( " Shape.ShapeType = " << Shape.ShapeType() ); - if ( myKind == TopAbs_SHAPE ) - return true; - - if ( Shape.ShapeType() == myKind ) - return true; - else - return false; - } - return false; + return aReturnObject._retn(); +} + +//======================================================================= +// function : ShapeTypeFilter +// purpose : +//======================================================================= +GEOM_ShapeTypeFilter::GEOM_ShapeTypeFilter( const TopAbs_ShapeEnum theShapeType, + const bool theIsAll ) +{ + myIsAll = theIsAll; + myShapeTypes.Add( theShapeType ); + myTypeFilter = new SALOME_TypeFilter( "GEOM" ); +} + +//======================================================================= +// function : ShapeTypeFilter +// purpose : +//======================================================================= +GEOM_ShapeTypeFilter::GEOM_ShapeTypeFilter( const TColStd_MapOfInteger& theShapeTypes, + const bool theIsAll ) +{ + myIsAll = theIsAll; + myShapeTypes = theShapeTypes; + myTypeFilter = new SALOME_TypeFilter( "GEOM" ); +} + +//======================================================================= +// function : IsOk +// purpose : +//======================================================================= +Standard_Boolean GEOM_ShapeTypeFilter::IsOk( + const Handle(SALOME_InteractiveObject)& anObj ) const +{ + if ( !myTypeFilter->IsOk(anObj) ) + return Standard_False; + + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_ptr aGeomObj = convertIOinGEOMObject( anObj, aResult ); + if ( !CORBA::is_nil( aGeomObj ) && aResult && aGeomObj->IsShape() ) + { + if ( myIsAll ) + return true; + TopoDS_Shape aShape; + if ( getShape( aGeomObj, aShape ) ) + { + if ( myShapeTypes.Contains( aShape.ShapeType() ) ) + return IsShapeOk( aShape ); + } + } + return Standard_False; +} + +//======================================================================= +// function : IsShapeOk +// purpose : +//======================================================================= +Standard_Boolean GEOM_ShapeTypeFilter::IsShapeOk( const TopoDS_Shape& ) const +{ + return Standard_True; } + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.hxx b/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.hxx index ffbc4e115..1d9df8e6d 100644 --- a/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.hxx +++ b/src/GEOMFiltersSelection/GEOM_ShapeTypeFilter.hxx @@ -33,10 +33,10 @@ #include "SALOME_InteractiveObject.hxx" #include "SALOME_Filter.hxx" +#include "SALOME_TypeFilter.hxx" // IDL Headers #include -#include CORBA_SERVER_HEADER(GEOM_Shape) #include CORBA_SERVER_HEADER(GEOM_Gen) #include CORBA_SERVER_HEADER(SALOMEDS_Attributes) @@ -44,8 +44,10 @@ #include #include #include +#include -class GEOM_ShapeTypeFilter : public SALOME_Filter { +class GEOM_ShapeTypeFilter : public SALOME_Filter +{ public: @@ -61,45 +63,38 @@ public: { if (anAddress) Standard::Free((Standard_Address&)anAddress); } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } // Methods PUBLIC - // -Standard_EXPORT GEOM_ShapeTypeFilter(TopAbs_ShapeEnum ShapeType, - GEOM::GEOM_Gen_ptr geom); -Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; + // +Standard_EXPORT GEOM_ShapeTypeFilter( const TopAbs_ShapeEnum theShapeType, + const bool theIsAll = false ); +Standard_EXPORT GEOM_ShapeTypeFilter( const TColStd_MapOfInteger& theShapeTypes, + const bool theIsAll = false ); Standard_EXPORT ~GEOM_ShapeTypeFilter(); - +Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; // Type management // Standard_EXPORT friend Handle_Standard_Type& GEOM_ShapeTypeFilter_Type_(); Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; protected: // Methods PROTECTED - // + // + Standard_EXPORT virtual Standard_Boolean IsShapeOk(const TopoDS_Shape& theShape ) const; // Fields PROTECTED // -TopAbs_ShapeEnum myKind; -GEOM::GEOM_Gen_var myComponentGeom; +TColStd_MapOfInteger myShapeTypes; +Handle(SALOME_TypeFilter) myTypeFilter; private: - // Methods PRIVATE - // - - - // Fields PRIVATE - // + bool myIsAll; }; diff --git a/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx b/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx new file mode 100644 index 000000000..26df6985e --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_TypeFilter.cxx @@ -0,0 +1,145 @@ +// GEOM GEOMGUI : Implementation of selection filters for GEOM module +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_TypeFilter.cxx +// Author : Sergey LITONIN +// Module : GEOM + +#include "GEOM_TypeFilter.hxx" +#include "SALOME_InteractiveObject.hxx" +#include "GEOM_Client.hxx" +#include "QAD_Application.h" +#include "QAD_Desktop.h" +#include "utilities.h" + +static GEOM::GEOM_Object_ptr convertIOinGEOMObject( + const Handle(SALOME_InteractiveObject)& theIO, Standard_Boolean& theResult ) +{ + theResult = Standard_False; + GEOM::GEOM_Object_var aReturnObject; + if ( !theIO.IsNull() ) + { + const char* anEntry = theIO->getEntry(); + SALOMEDS::SObject_var aSObj = + QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument()->FindObjectID( anEntry ); + if ( !CORBA::is_nil( aSObj ) ) + { + aReturnObject = GEOM::GEOM_Object::_narrow( aSObj->GetObject() ); + theResult = !CORBA::is_nil( aReturnObject ); + } + } + return aReturnObject._retn(); +} + +/* + Class : GEOM_TypeFilter + Description : Filter for combaining several filters with logical operation (OR or AND) +*/ + +IMPLEMENT_STANDARD_HANDLE( GEOM_TypeFilter, SALOME_TypeFilter ) +IMPLEMENT_STANDARD_RTTIEXT( GEOM_TypeFilter, SALOME_TypeFilter ) + +//======================================================================= +// name : GEOM_TypeFilter::GEOM_TypeFilter +// Purpose : Constructor +//======================================================================= +GEOM_TypeFilter::GEOM_TypeFilter( const int theType ) +: SALOME_TypeFilter( "GEOM" ) +{ + myType = theType; +} + +//======================================================================= +// name : GEOM_TypeFilter::~GEOM_TypeFilter +// Purpose : Destructor +//======================================================================= +GEOM_TypeFilter::~GEOM_TypeFilter() +{ +} + +//======================================================================= +// name : GEOM_TypeFilter::IsOk +// Purpose : Verify validity of entry object +//======================================================================= +Standard_Boolean GEOM_TypeFilter::IsOk( const Handle(SALOME_InteractiveObject)& theIO ) const +{ + if ( SALOME_TypeFilter::IsOk( theIO ) ) + { + Standard_Boolean aTestRes = Standard_False; + GEOM::GEOM_Object_var anObj = convertIOinGEOMObject( theIO, aTestRes ); + if ( aTestRes && !anObj->_is_nil() ) + return anObj->GetType() == myType; + } + + return false; +} + +//======================================================================= +// name : GEOM_TypeFilter::SetType +// Purpose : Set type of object +//======================================================================= +void GEOM_TypeFilter::SetType( const int theType ) +{ + myType = theType; +} + +//======================================================================= +// name : GEOM_TypeFilter::GetType +// Purpose : Get type of object +//======================================================================= +int GEOM_TypeFilter::GetType() const +{ + return myType; +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMFiltersSelection/GEOM_TypeFilter.hxx b/src/GEOMFiltersSelection/GEOM_TypeFilter.hxx new file mode 100644 index 000000000..e9c0b6e57 --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_TypeFilter.hxx @@ -0,0 +1,90 @@ +// GEOM GEOMGUI : Implementation of selection filters for GEOM module +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_TypeFilter.hxx +// Author : Sergey LITONIN +// Module : GEOM + +#ifndef _GEOM_TypeFilter_HeaderFile +#define _GEOM_TypeFilter_HeaderFile + +#include "SALOME_TypeFilter.hxx" + +#include + +DEFINE_STANDARD_HANDLE( GEOM_TypeFilter, SALOME_TypeFilter ) + +/* + Class : GEOM_TypeFilter + Description : Filter for verifyimg type of geom object ( GEOM_POINT, GEOM_MARKER and so on ) +*/ + +class GEOM_TypeFilter : public SALOME_TypeFilter +{ + +public: + + GEOM_TypeFilter( const int ); + + + virtual ~GEOM_TypeFilter(); + virtual Standard_Boolean IsOk( const Handle(SALOME_InteractiveObject)& ) const; + + void SetType( const int ); + int GetType() const; + +private: + + int myType; + +public: + DEFINE_STANDARD_RTTI( GEOM_TypeFilter ) +}; + +#endif + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMFiltersSelection/Handle_GEOM_EdgeFilter.hxx b/src/GEOMFiltersSelection/Handle_GEOM_EdgeFilter.hxx index 6c8dd9c28..581ddb235 100644 --- a/src/GEOMFiltersSelection/Handle_GEOM_EdgeFilter.hxx +++ b/src/GEOMFiltersSelection/Handle_GEOM_EdgeFilter.hxx @@ -34,17 +34,17 @@ #include #endif -#ifndef _Handle_SALOME_Filter_HeaderFile -#include "Handle_SALOME_Filter.hxx" +#ifndef _Handle_GEOM_ShapeTypeFilter_HeaderFile +#include "Handle_GEOM_ShapeTypeFilter.hxx" #endif class Standard_Transient; class Handle_Standard_Type; -class Handle(SALOME_Filter); +class Handle(GEOM_ShapeTypeFilter); class GEOM_EdgeFilter; Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_EdgeFilter); -class Handle(GEOM_EdgeFilter) : public Handle(SALOME_Filter) { +class Handle(GEOM_EdgeFilter) : public Handle(GEOM_ShapeTypeFilter) { public: inline void* operator new(size_t,void* anAddress) { @@ -62,12 +62,12 @@ class Handle(GEOM_EdgeFilter) : public Handle(SALOME_Filter) { // { // if (anAddress) Standard::Free((Standard_Address&)anAddress,size); // } - Handle(GEOM_EdgeFilter)():Handle(SALOME_Filter)() {} - Handle(GEOM_EdgeFilter)(const Handle(GEOM_EdgeFilter)& aHandle) : Handle(SALOME_Filter)(aHandle) + Handle(GEOM_EdgeFilter)():Handle(GEOM_ShapeTypeFilter)() {} + Handle(GEOM_EdgeFilter)(const Handle(GEOM_EdgeFilter)& aHandle) : Handle(GEOM_ShapeTypeFilter)(aHandle) { } - Handle(GEOM_EdgeFilter)(const GEOM_EdgeFilter* anItem) : Handle(SALOME_Filter)((SALOME_Filter *)anItem) + Handle(GEOM_EdgeFilter)(const GEOM_EdgeFilter* anItem) : Handle(GEOM_ShapeTypeFilter)((GEOM_ShapeTypeFilter *)anItem) { } diff --git a/src/GEOMFiltersSelection/Handle_GEOM_FaceFilter.hxx b/src/GEOMFiltersSelection/Handle_GEOM_FaceFilter.hxx index 3acc213ac..49ae830d7 100644 --- a/src/GEOMFiltersSelection/Handle_GEOM_FaceFilter.hxx +++ b/src/GEOMFiltersSelection/Handle_GEOM_FaceFilter.hxx @@ -34,17 +34,17 @@ #include #endif -#ifndef _Handle_SALOME_Filter_HeaderFile -#include "Handle_SALOME_Filter.hxx" +#ifndef _Handle_GEOM_ShapeTypeFilter_HeaderFile +#include "Handle_GEOM_ShapeTypeFilter.hxx" #endif class Standard_Transient; class Handle_Standard_Type; -class Handle(SALOME_Filter); +class Handle(GEOM_ShapeTypeFilter); class GEOM_FaceFilter; Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_FaceFilter); -class Handle(GEOM_FaceFilter) : public Handle(SALOME_Filter) { +class Handle(GEOM_FaceFilter) : public Handle(GEOM_ShapeTypeFilter) { public: inline void* operator new(size_t,void* anAddress) { @@ -62,12 +62,12 @@ class Handle(GEOM_FaceFilter) : public Handle(SALOME_Filter) { // { // if (anAddress) Standard::Free((Standard_Address&)anAddress,size); // } - Handle(GEOM_FaceFilter)():Handle(SALOME_Filter)() {} - Handle(GEOM_FaceFilter)(const Handle(GEOM_FaceFilter)& aHandle) : Handle(SALOME_Filter)(aHandle) + Handle(GEOM_FaceFilter)():Handle(GEOM_ShapeTypeFilter)() {} + Handle(GEOM_FaceFilter)(const Handle(GEOM_FaceFilter)& aHandle) : Handle(GEOM_ShapeTypeFilter)(aHandle) { } - Handle(GEOM_FaceFilter)(const GEOM_FaceFilter* anItem) : Handle(SALOME_Filter)((SALOME_Filter *)anItem) + Handle(GEOM_FaceFilter)(const GEOM_FaceFilter* anItem) : Handle(GEOM_ShapeTypeFilter)((GEOM_ShapeTypeFilter *)anItem) { } diff --git a/src/GEOMDS/Handle_GEOMDS_Application.hxx b/src/GEOMFiltersSelection/Handle_GEOM_PreviewFilter.hxx similarity index 55% rename from src/GEOMDS/Handle_GEOMDS_Application.hxx rename to src/GEOMFiltersSelection/Handle_GEOM_PreviewFilter.hxx index 418b10298..cb8285ee5 100644 --- a/src/GEOMDS/Handle_GEOMDS_Application.hxx +++ b/src/GEOMFiltersSelection/Handle_GEOM_PreviewFilter.hxx @@ -1,6 +1,6 @@ -// GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +// GEOM GEOMFiltersSelection : filter selector for the viewer // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// Copyright (C) 2004 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 @@ -17,15 +17,15 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org // // // -// File : Handle_GEOMDS_Application.hxx +// File : Handle_GEOM_PreviewFilter // Module : GEOM -#ifndef _Handle_GEOMDS_Application_HeaderFile -#define _Handle_GEOMDS_Application_HeaderFile +#ifndef _Handle_GEOM_PreviewFilter_HeaderFile +#define _Handle_GEOM_PreviewFilter_HeaderFile #ifndef _Standard_Macro_HeaderFile #include @@ -34,17 +34,17 @@ #include #endif -#ifndef _Handle_TDocStd_Application_HeaderFile -#include +#ifndef _Handle_SALOME_Filter_HeaderFile +#include "Handle_SALOME_Filter.hxx" #endif class Standard_Transient; class Handle_Standard_Type; -class Handle(TDocStd_Application); -class GEOMDS_Application; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SimpleOCAF_Application); +class Handle(SALOME_Filter); +class GEOM_PreviewFilter; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOM_PreviewFilter); -class Handle(GEOMDS_Application) : public Handle(TDocStd_Application) { +class Handle(GEOM_PreviewFilter) : public Handle(SALOME_Filter) { public: inline void* operator new(size_t,void* anAddress) { @@ -62,39 +62,39 @@ class Handle(GEOMDS_Application) : public Handle(TDocStd_Application) { // { // if (anAddress) Standard::Free((Standard_Address&)anAddress,size); // } - Handle(GEOMDS_Application)():Handle(TDocStd_Application)() {} - Handle(GEOMDS_Application)(const Handle(GEOMDS_Application)& aHandle) : Handle(TDocStd_Application)(aHandle) + Handle(GEOM_PreviewFilter)():Handle(SALOME_Filter)() {} + Handle(GEOM_PreviewFilter)(const Handle(GEOM_PreviewFilter)& aHandle) : Handle(SALOME_Filter)(aHandle) { } - Handle(GEOMDS_Application)(const GEOMDS_Application* anItem) : Handle(TDocStd_Application)((TDocStd_Application *)anItem) + Handle(GEOM_PreviewFilter)(const GEOM_PreviewFilter* anItem) : Handle(SALOME_Filter)((SALOME_Filter *)anItem) { } - Handle(GEOMDS_Application)& operator=(const Handle(GEOMDS_Application)& aHandle) + Handle(GEOM_PreviewFilter)& operator=(const Handle(GEOM_PreviewFilter)& aHandle) { Assign(aHandle.Access()); return *this; } - Handle(GEOMDS_Application)& operator=(const GEOMDS_Application* anItem) + Handle(GEOM_PreviewFilter)& operator=(const GEOM_PreviewFilter* anItem) { Assign((Standard_Transient *)anItem); return *this; } - GEOMDS_Application* operator->() + GEOM_PreviewFilter* operator->() { - return (GEOMDS_Application *)ControlAccess(); + return (GEOM_PreviewFilter *)ControlAccess(); } - GEOMDS_Application* operator->() const + GEOM_PreviewFilter* operator->() const { - return (GEOMDS_Application *)ControlAccess(); + return (GEOM_PreviewFilter *)ControlAccess(); } - Standard_EXPORT ~Handle(GEOMDS_Application)(); + Standard_EXPORT ~Handle(GEOM_PreviewFilter)(); - Standard_EXPORT static const Handle(GEOMDS_Application) DownCast(const Handle(Standard_Transient)& AnObject); + Standard_EXPORT static const Handle(GEOM_PreviewFilter) DownCast(const Handle(Standard_Transient)& AnObject); }; #endif diff --git a/src/GEOMFiltersSelection/Makefile.in b/src/GEOMFiltersSelection/Makefile.in index 851695357..7857d21cf 100644 --- a/src/GEOMFiltersSelection/Makefile.in +++ b/src/GEOMFiltersSelection/Makefile.in @@ -39,9 +39,12 @@ VPATH=.:@srcdir@:@top_srcdir@/idl LIB = libGEOMFiltersSelection.la LIB_SRC = GEOM_ShapeTypeFilter.cxx \ GEOM_FaceFilter.cxx \ - GEOM_EdgeFilter.cxx + GEOM_EdgeFilter.cxx \ + GEOM_PreviewFilter.cxx \ + GEOM_LogicalFilter.cxx \ + GEOM_TypeFilter.cxx -LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl GEOM_Shape.idl GEOM_Gen.idl +LIB_CLIENT_IDL = SALOME_Component.idl SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Exception.idl GEOM_Gen.idl SALOME_GenericObj.idl # header files EXPORT_HEADERS= GEOM_ShapeTypeFilter.hxx \ @@ -49,7 +52,11 @@ EXPORT_HEADERS= GEOM_ShapeTypeFilter.hxx \ GEOM_FaceFilter.hxx \ Handle_GEOM_FaceFilter.hxx \ GEOM_EdgeFilter.hxx \ - Handle_GEOM_EdgeFilter.hxx + Handle_GEOM_EdgeFilter.hxx \ + GEOM_TypeFilter.hxx \ + GEOM_LogicalFilter.hxx \ + GEOM_PreviewFilter.hxx \ + Handle_GEOM_PreviewFilter.hxx # additionnal information to compil and link file CPPFLAGS += $(OCC_INCLUDES) $(QT_INCLUDES) $(PYTHON_INCLUDES) $(VTK_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome diff --git a/src/GEOMGUI/GEOMGUI.cxx b/src/GEOMGUI/GEOMGUI.cxx new file mode 100644 index 000000000..815927875 --- /dev/null +++ b/src/GEOMGUI/GEOMGUI.cxx @@ -0,0 +1,115 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOMGUI.cxx +// Author : Vadim SANDLER +// Module : GEOM +// $Header$ + +#include "GEOMGUI.h" + +#include "QAD_Desktop.h" +#include "QAD_StudyFrame.h" +#include "QAD_Application.h" +#include + +//================================================================================= +// class : GEOMGUI::GEOMGUI +// purpose : Constructor +//================================================================================= +GEOMGUI::GEOMGUI( QObject* parent ) : + QObject ( parent ) +{ +} + +//================================================================================= +// class : GEOMGUI::GEOMGUI +// purpose : Destructor +//================================================================================= +GEOMGUI::~GEOMGUI() +{ +} + +//================================================================================= +// class : GEOMGUI::OnGUIEvent +// purpose : Main/popup menu events processing +//================================================================================= +bool GEOMGUI::OnGUIEvent( int /*theCommandID*/, QAD_Desktop* /*parent*/ ) +{ + return TRUE; +} + +//================================================================================= +// class : GEOMGUI::OnMousePress +// purpose : Mouse press event processing. Should return FALSE to let the event +// be processed further. +//================================================================================= +bool GEOMGUI::OnMousePress( QMouseEvent* /*pe*/, QAD_Desktop* /*parent*/, QAD_StudyFrame* /*studyFrame*/ ) +{ + return FALSE; +} + +//================================================================================= +// class : GEOMGUI::OnMouseMove +// purpose : Mouse move event processing +//================================================================================= +bool GEOMGUI::OnMouseMove( QMouseEvent* /*pe*/, QAD_Desktop* /*parent*/, QAD_StudyFrame* /*studyFrame*/ ) +{ + return TRUE; +} + +//================================================================================= +// class : GEOMGUI::OnKeyPress +// purpose : Key press event processing +//================================================================================= +bool GEOMGUI::OnKeyPress( QKeyEvent* /*pe*/, QAD_Desktop* /*parent*/, QAD_StudyFrame* /*studyFrame*/ ) +{ + return TRUE; +} + +//================================================================================= +// class : GEOMGUI::SetSettings +// purpose : Called when GEOM component is activated +//================================================================================= +bool GEOMGUI::SetSettings( QAD_Desktop* /*parent*/ ) +{ + return TRUE; +} + +//================================================================================= +// class : GEOMGUI::Deactivate +// purpose : Called when GEOM component is deactivated +//================================================================================= +void GEOMGUI::Deactivate() +{ +} + +//================================================================================= +// class : GEOMGUI::ActiveStudyChanged +// purpose : Called when active study changed +//================================================================================= +bool GEOMGUI::ActiveStudyChanged( QAD_Desktop* /*parent*/ ) +{ + return TRUE; +} + diff --git a/src/GEOMGUI/GEOMGUI.h b/src/GEOMGUI/GEOMGUI.h new file mode 100644 index 000000000..bd0520027 --- /dev/null +++ b/src/GEOMGUI/GEOMGUI.h @@ -0,0 +1,62 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOMGUI.h +// Author : Vadim SANDLER +// Module : GEOM +// $Header$ + +#if !defined( __GEOMGUI_H ) +#define __GEOMGUI_H + +#include + +class QAD_Desktop; +class QAD_StudyFrame; +class QMouseEvent; +class QKeyEvent; + +//================================================================================= +// class : GEOMGUI +// purpose : Base class for all geometry GUI subclasses +//================================================================================= +class GEOMGUI : public QObject +{ +public : + // Constructor + GEOMGUI( QObject* parent = 0 ); + // Destructor + virtual ~GEOMGUI(); + + // Each of this methods can be redifined by descendants + virtual bool OnGUIEvent( int theCommandID, QAD_Desktop* parent ); + virtual bool OnMousePress( QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame ); + virtual bool OnMouseMove( QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame ); + virtual bool OnKeyPress( QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame ); + virtual bool SetSettings( QAD_Desktop* parent ); + virtual void Deactivate(); + virtual bool ActiveStudyChanged( QAD_Desktop* parent ); +}; + +#endif // __GEOMGUI_H + diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx new file mode 100644 index 000000000..f518e4ecb --- /dev/null +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -0,0 +1,1074 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Displayer.cxx +// Author : Vadim SANDLER +// Module : GEOM +// $Header$ + +#include "GEOM_Displayer.h" +#include "GEOM_ShapeTypeFilter.hxx" +#include "GEOM_TypeFilter.hxx" +#include "QAD_Desktop.h" +#include "QAD_Application.h" +#include "QAD_Study.h" +#include "QAD_StudyFrame.h" +#include "QAD_RightFrame.h" +#include "QAD_ViewFrame.h" +#include "QAD_Config.h" +#include "SALOME_ListIteratorOfListIO.hxx" +#include "OCCViewer_Prs.h" +#include "OCCViewer_ViewFrame.h" +#include "OCCViewer_Viewer3d.h" +#include "VTKViewer_Prs.h" +#include "VTKViewer_ViewFrame.h" +#include "GEOMImpl_Types.hxx" +#include "TColStd_MapOfInteger.hxx" +#include "TColStd_MapIteratorOfMapOfInteger.hxx" +#include "GEOM_EdgeFilter.hxx" +#include "GEOM_FaceFilter.hxx" +#include "GEOM_PreviewFilter.hxx" +#include "GEOM_LogicalFilter.hxx" +#include "GEOM_AssemblyBuilder.h" +#include "GEOM_Actor.h" +#include "GEOM_AISTrihedron.hxx" +#include "GEOM_VTKTrihedron.hxx" + +#include CORBA_CLIENT_HEADER(SALOMEDS_Attributes) + +#include "GeometryGUI.h" +#include "GEOM_AISShape.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +using namespace std; + +//================================================================ +// Function : getActiveStudy +// Purpose : Get active study, returns 0 if no open study frame +//================================================================ +static inline QAD_Study* getActiveStudy() +{ + QAD_Desktop* desktop = QAD_Application::getDesktop(); + if ( desktop ) { + QAD_Application* app = desktop->getActiveApp(); + if ( app ) + return app->getActiveStudy(); + } + return 0; +} + +//================================================================ +// Function : getTopAbsMode +// Purpose : Get TopAbs_ShapeEnum value corresponding to the +// one from GEOMImpl_Types.h +//================================================================ +static inline int getTopAbsMode( const int implType ) +{ + switch ( implType ) + { + case GEOM_COMPOUND : return TopAbs_COMPOUND; + case GEOM_SOLID : return TopAbs_SOLID; + case GEOM_SHELL : return TopAbs_SHELL; + case GEOM_FACE : return TopAbs_FACE; + case GEOM_WIRE : return TopAbs_WIRE; + case GEOM_EDGE : return TopAbs_EDGE; + case GEOM_POINT : return TopAbs_VERTEX; + default : return -1; + } +} + +//================================================================ +// Function : getTopAbsMode +// Purpose : Get filter corresponding to the type of object +// from GEOMImpl_Types.h +//================================================================ +static inline Handle(SALOME_Filter) getFilter( const int theMode ) +{ + Handle(SALOME_Filter) aFilter; + + int aTopAbsMode = getTopAbsMode( theMode ); + if ( aTopAbsMode != -1 ) + aFilter = new GEOM_ShapeTypeFilter( ( TopAbs_ShapeEnum )aTopAbsMode ); + else + switch ( theMode ) + { + case GEOM_LINE : aFilter = new GEOM_EdgeFilter( StdSelect_Line ); break; + case GEOM_CIRCLE : aFilter = new GEOM_EdgeFilter( StdSelect_Circle ); break; + + case GEOM_PLANE : aFilter = new GEOM_FaceFilter( StdSelect_Plane ); break; + case GEOM_CYLINDER : aFilter = new GEOM_FaceFilter( StdSelect_Cylinder ); break; + case GEOM_SPHERE : aFilter = new GEOM_FaceFilter( StdSelect_Sphere ); break; + case GEOM_TORUS : aFilter = new GEOM_FaceFilter( StdSelect_Torus ); break; + case GEOM_REVOLUTION: aFilter = new GEOM_FaceFilter( StdSelect_Revol ); break; + case GEOM_CONE : aFilter = new GEOM_FaceFilter( StdSelect_Cone ); break; + + case GEOM_PREVIEW : aFilter = new GEOM_PreviewFilter(); break; + + case GEOM_ALLSHAPES : aFilter = new GEOM_ShapeTypeFilter( -1, true ); break; + case GEOM_ALLGEOM : aFilter = new SALOME_TypeFilter( "GEOM" ); break; + + default : aFilter = new GEOM_TypeFilter( theMode ); break; + } + + return aFilter; +} + +//================================================================ +// Function : getEntry +// Purpose : +//================================================================ +static char* getEntry( GEOM::GEOM_Object_ptr object ) +{ + QAD_Study* study = getActiveStudy(); + if ( study ) { + string IOR = GeometryGUI::GetORB()->object_to_string( object ); + if ( IOR != "" ) { + SALOMEDS::SObject_var SO = study->getStudyDocument()->FindObjectIOR( IOR.c_str() ); + if ( !SO->_is_nil() ) { + return SO->GetID(); + } + } + } + return ""; +} + +//================================================================ +// Function : getName +// Purpose : +//================================================================ +static const char* getName( GEOM::GEOM_Object_ptr theObj ) +{ + QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); + + if ( aStudy ) + { + string anIOR = GeometryGUI::GetORB()->object_to_string( theObj ); + if ( anIOR != "" ) + { + SALOMEDS::SObject_var aSObj = aStudy->getStudyDocument()->FindObjectIOR( anIOR.c_str() ); + SALOMEDS::GenericAttribute_var anAttr; + + if ( !aSObj->_is_nil() && aSObj->FindAttribute( anAttr, "AttributeName") ) + { + SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr ); + return aNameAttr->Value(); + } + } + } + + return ""; +} + +//================================================================= +/*! + * GEOM_Displayer::GEOM_Displayer + * Constructor + */ +//================================================================= +GEOM_Displayer::GEOM_Displayer() +{ + /* Shading Color */ + QString SCr = QAD_CONFIG->getSetting( "Geometry:SettingsShadingColorRed" ); + QString SCg = QAD_CONFIG->getSetting( "Geometry:SettingsShadingColorGreen" ); + QString SCb = QAD_CONFIG->getSetting( "Geometry:SettingsShadingColorBlue" ); + if ( !SCr.isEmpty() && !SCg.isEmpty() && !SCb.isEmpty() ) + myShadingColor = Quantity_Color( + SCr.toInt()/255., SCg.toInt()/255., SCb.toInt()/255., Quantity_TOC_RGB ); + else + myShadingColor = Quantity_Color( Quantity_NOC_GOLDENROD ); + + myColor = -1; + // This color is used for shape displaying. If it is equal -1 then + // default color is used. + + myWidth = -1; + myType = -1; + + myToActivate = true; + // This parameter is used for activisation/deactivisation of objects to be displayed + + myViewFrame = 0; +} + +//================================================================= +/*! + * GEOM_Displayer::~GEOM_Displayer + * Destructor + */ +//================================================================= +GEOM_Displayer::~GEOM_Displayer() +{ +} + +//================================================================= +/*! + * GetActiveView + * Get active study frame, returns 0 if no open study frame + */ +//================================================================= +QAD_ViewFrame* GEOM_Displayer::GetActiveView() +{ + QAD_Study* activeStudy = getActiveStudy(); + if ( activeStudy ) + { + QAD_StudyFrame* sf = activeStudy->getActiveStudyFrame(); + if ( sf ) + { + return sf->getRightFrame()->getViewFrame(); + } + } + return 0; +} + +//================================================================= +/*! + * GEOM_Displayer::Display + * Display interactive object in the current viewer + */ +//================================================================= +void GEOM_Displayer::Display( const Handle(SALOME_InteractiveObject)& theIO, const bool updateViewer, + QAD_ViewFrame* theViewFrame ) +{ + QAD_ViewFrame* vf = theViewFrame; + if ( !vf ) + vf = GetActiveView(); + + if ( vf ) + { + if ( vf->inherits( "VTKViewer_ViewFrame" ) ) + { + SALOME_Prs* prs = vf->CreatePrs( !theIO.IsNull() ? theIO->getEntry() : 0 ); + ((SALOME_View*)vf)->Erase( prs, true ); + delete prs; + } + + SALOME_Prs* prs = buildPresentation( theIO, vf ); + + if ( prs ) + { + vf->BeforeDisplay( this ); + ((SALOME_View*)vf)->Display( prs ); + vf->AfterDisplay( this ); + + if ( updateViewer ) + vf->Repaint(); + + delete prs; // delete presentation because displayer is its owner + } + } +} + +//================================================================= +/*! + * GEOM_Displayer::Display + * This overloaded Display() method can be useful for operations + * not using dialog boxes. + */ +//================================================================= +void GEOM_Displayer::Display( GEOM::GEOM_Object_ptr theObj, const bool updateViewer ) +{ + if ( theObj->_is_nil() ) + return; + + string entry = getEntry( theObj ); + if ( entry != "" ) { + Display( new SALOME_InteractiveObject( + entry.c_str(), "GEOM", strdup( getName( theObj ) ) ), updateViewer ); + } +} + +//================================================================= +/*! + * GEOM_Displayer::Erase + * Erase interactive object in the current viewer + */ +//================================================================= +void GEOM_Displayer::Erase( const Handle(SALOME_InteractiveObject)& theIO, + const bool forced, + const bool updateViewer, + QAD_ViewFrame* theViewFrame ) +{ + if ( theIO.IsNull() ) + return; + + QAD_ViewFrame* vf = theViewFrame; + if ( !vf ) + vf = GetActiveView(); + + if ( vf ) { + SALOME_Prs* prs = vf->CreatePrs( theIO->getEntry() ); + if ( prs ) { + ((SALOME_View*)vf)->Erase( prs, forced ); + if ( updateViewer ) + vf->Repaint(); + delete prs; // delete presentation because displayer is its owner + } + } +} + +//================================================================= +/*! + * GEOM_Displayer::Erase + * Erase geometry object in the current viewer + */ +//================================================================= +void GEOM_Displayer::Erase( GEOM::GEOM_Object_ptr theObj, + const bool forced, + const bool updateViewer ) +{ + string entry = getEntry( theObj ); + if ( entry != "" ) + { + Erase( new SALOME_InteractiveObject( + entry.c_str(), "GEOM", strdup( getName( theObj ) ) ), forced, updateViewer ); + } +} + +//================================================================= +/*! + * GEOM_Displayer::Redisplay + * Redisplay (erase and then display again) interactive object + * in the current viewer + */ +//================================================================= +void GEOM_Displayer::Redisplay( const Handle(SALOME_InteractiveObject)& theIO, + const bool updateViewer ) +{ + // Remove the object permanently ( == true) + + QAD_Study* activeStudy = getActiveStudy(); + if ( !activeStudy ) + return; + + int aNbFrames = activeStudy->getStudyFramesCount(); + for (int i = 0; i < aNbFrames; i++) + { + QAD_StudyFrame* sf = activeStudy->getStudyFrame(i); + if ( !sf ) + continue; + + QAD_ViewFrame* vf = sf->getRightFrame()->getViewFrame(); + if ( !vf ) + continue; + + if ( vf->isVisible(theIO) || vf == GetActiveView() ) + { + Erase( theIO, true, false, vf ); + Display( theIO, updateViewer, vf ); + } + } +} + +//================================================================= +/*! + * GEOM_Displayer::Display + * Calls Display() method for each object in the given list + */ +//================================================================= +void GEOM_Displayer::Display( const SALOME_ListIO& theIOList, const bool updateViewer ) +{ + SALOME_ListIteratorOfListIO Iter( theIOList ); + for ( ; Iter.More(); Iter.Next() ) { + Display( Iter.Value(), false ); + } + if ( updateViewer ) + UpdateViewer(); +} + +//================================================================= +/*! + * GEOM_Displayer::Erase + * Calls Erase() method for each object in the given list + */ +//================================================================= +void GEOM_Displayer::Erase( const SALOME_ListIO& theIOList, + const bool forced, + const bool updateViewer ) +{ + SALOME_ListIteratorOfListIO Iter( theIOList ); + for ( ; Iter.More(); Iter.Next() ) + Erase( Iter.Value(), forced, false ); + + if ( updateViewer ) + UpdateViewer(); +} + +//================================================================= +/*! + * GEOM_Displayer::Redisplay + * Calls Redisplay() method for each object in the given list + */ +//================================================================= +void GEOM_Displayer::Redisplay( const SALOME_ListIO& theIOList, const bool updateViewer ) +{ + SALOME_ListIteratorOfListIO Iter( theIOList ); + for ( ; Iter.More(); Iter.Next() ) { + Redisplay( Iter.Value(), false ); + } + if ( updateViewer ) + UpdateViewer(); +} + +//================================================================= +/*! + * GEOM_Displayer::UpdateViewer + * Update current viewer + */ +//================================================================= +void GEOM_Displayer::UpdateViewer() +{ + QAD_ViewFrame* vf = GetActiveView(); + if ( vf ) + vf->Repaint(); +} + +//================================================================= +/*! + * GEOM_Displayer::Update + * Update OCC presentaion + * [ Reimplemented from SALOME_Displayer ] + */ +//================================================================= +void GEOM_Displayer::Update( SALOME_OCCPrs* prs ) +{ + OCCViewer_Prs* occPrs = dynamic_cast( prs ); + if ( !occPrs ) + return; + + OCCViewer_ViewFrame* vf = dynamic_cast( myViewFrame ); + if ( !vf ) + return; + + if ( myType == GEOM_MARKER && !myShape.IsNull() && myShape.ShapeType() == TopAbs_FACE ) + { + TopoDS_Face aFace = TopoDS::Face( myShape ); + Handle(Geom_Plane) aPlane = Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( aFace ) ); + if ( !aPlane.IsNull() ) + { + gp_Ax3 aPos = aPlane->Pln().Position(); + Handle(Geom_Axis2Placement) aPlc = new Geom_Axis2Placement( aPos.Ax2() ); + + Handle(GEOM_AISTrihedron) aTrh; + + if ( occPrs->IsNull() ) + { + aTrh = new GEOM_AISTrihedron( aPlc ); + + if ( HasColor() ) + aTrh->SetColor( (Quantity_NameOfColor)GetColor() ); + + if ( HasWidth() ) + aTrh->SetWidth( GetWidth() ); + + if ( !myIO.IsNull() ) + { + aTrh->setIO( myIO ); + aTrh->SetOwner( myIO ); + } + + occPrs->AddObject( aTrh ); + } + else + { + AIS_ListOfInteractive aList; + occPrs->GetObjects( aList ); + AIS_ListIteratorOfListOfInteractive anIter( aList ); + for ( ; anIter.More(); anIter.Next() ) + { + aTrh = Handle(GEOM_AISTrihedron)::DownCast( anIter.Value() ); + if ( !aTrh.IsNull() ) + { + aTrh->SetComponent( aPlc ); + aTrh->SetToUpdate(); + } + } + } + + occPrs->SetToActivate( ToActivate() ); + } + } + else + { + // if presentation is empty we try to create new one + if ( occPrs->IsNull() ) + { + if ( !myShape.IsNull() ) + { + Handle(GEOM_AISShape) AISShape = new GEOM_AISShape( myShape, "" ); + // Temporary staff: vertex must be infinite for correct visualization + AISShape->SetInfiniteState( myShape.Infinite() || myShape.ShapeType() == TopAbs_VERTEX ); + + // Setup shape properties here ..., e.g. display mode, color, transparency, etc + AISShape->SetShadingColor( myShadingColor ); + if ( HasColor() ) + { + if ( myShape.ShapeType() == TopAbs_VERTEX ) + { + AISShape->SetColor( (Quantity_NameOfColor)GetColor() ); + Handle(Prs3d_PointAspect) anAspect = AISShape->Attributes()->PointAspect(); + anAspect->SetColor( (Quantity_NameOfColor)GetColor() ); + AISShape->Attributes()->SetPointAspect( anAspect ); + } + else + AISShape->SetColor( (Quantity_NameOfColor)GetColor() ); + } + + if ( HasWidth() ) + AISShape->SetWidth( GetWidth() ); + + if ( !myIO.IsNull() ) + { + AISShape->setIO( myIO ); + AISShape->SetOwner( myIO ); + } + else if ( !myName.empty() ) + { + // Workaround to allow selection of temporary objects + static int tempId = 0; + char buf[50]; + sprintf( buf, "TEMP_%d", tempId++ ); + Handle( SALOME_InteractiveObject ) anObj = + new SALOME_InteractiveObject( buf, "GEOM", myName.c_str() ); + AISShape->setIO( anObj ); + AISShape->SetOwner( anObj ); + } + // AISShape->SetName(???); ??? necessary to set name ??? + occPrs->AddObject( AISShape ); + + // In accordance with ToActivate() value object will be activated/deactivated + // when it will be displayed + occPrs->SetToActivate( ToActivate() ); + } + } + // if presentation is found -> set again shape for it + else + { + if ( !myShape.IsNull() ) + { + AIS_ListOfInteractive IOList; + occPrs->GetObjects( IOList ); + AIS_ListIteratorOfListOfInteractive Iter( IOList ); + for ( ; Iter.More(); Iter.Next() ) + { + Handle(GEOM_AISShape) AISShape = Handle(GEOM_AISShape)::DownCast( Iter.Value() ); + if ( AISShape.IsNull() ) + continue; + if ( AISShape->Shape() != myShape ) + { + AISShape->Set( myShape ); + AISShape->UpdateSelection(); + AISShape->SetToUpdate(); + } + if ( !myIO.IsNull() ) + { + AISShape->setIO( myIO ); + AISShape->SetOwner( myIO ); + } + } + } + } + } +} + +//================================================================= +/*! + * GEOM_Displayer::Update + * Update VTK presentaion + * [ Reimplemented from SALOME_Displayer ] + */ +//================================================================= +void GEOM_Displayer::Update( SALOME_VTKPrs* prs ) +{ + VTKViewer_Prs* vtkPrs = dynamic_cast( prs ); + if ( !vtkPrs || myShape.IsNull() ) + return; + + vtkActorCollection* theActors = 0; + + if ( myType == GEOM_MARKER && !myShape.IsNull() && myShape.ShapeType() == TopAbs_FACE ) + { + myToActivate = false; + GEOM_VTKTrihedron* aTrh = GEOM_VTKTrihedron::New(); + + if ( HasColor() ) + { + Quantity_Color aColor( (Quantity_NameOfColor)GetColor() ); + aTrh->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() ); + } + + Handle(Geom_Plane) aPlane = + Handle(Geom_Plane)::DownCast( BRep_Tool::Surface( TopoDS::Face( myShape ) ) ); + if ( aPlane.IsNull() ) + return; + + gp_Ax2 anAx2 = aPlane->Pln().Position().Ax2(); + aTrh->SetPlacement( new Geom_Axis2Placement( anAx2 ) ); + + if ( VTKViewer_ViewFrame* vf = dynamic_cast( GetActiveView() ) ) + aTrh->SetSize( 0.5 * vf->GetTrihedronSize() ); + + vtkPrs->AddObject( aTrh ); + + theActors = vtkActorCollection::New(); + theActors->AddItem( aTrh ); + } + else + theActors = GEOM_AssemblyBuilder::BuildActors( myShape, 0, 0, Standard_True ); + + theActors->InitTraversal(); + + vtkActor* anActor = (vtkActor*)theActors->GetNextActor(); + + vtkProperty* aProp = 0; + + if ( HasColor() || HasWidth() ) + { + aProp = vtkProperty::New(); + aProp->SetRepresentationToWireframe(); + } + + if ( HasColor() ) + { + Quantity_Color aColor( (Quantity_NameOfColor)GetColor() ); + aProp->SetColor( aColor.Red(), aColor.Green(), aColor.Blue() ); + } + + if ( HasWidth() ) + { + aProp->SetLineWidth( GetWidth() ); + } + + while ( anActor != NULL ) + { + SALOME_Actor* GActor = SALOME_Actor::SafeDownCast( anActor ); + + GActor->setIO( myIO ); + + if ( aProp ) + { + GActor->SetProperty( aProp ); + GActor->SetPreviewProperty( aProp ); + + GEOM_Actor* aGeomGActor = GEOM_Actor::SafeDownCast( anActor ); + if ( aGeomGActor != 0 ) + { + aGeomGActor->SetShadingProperty( aProp ); + aGeomGActor->SetWireframeProperty( aProp ); + } + } + + if ( myToActivate ) + GActor->PickableOn(); + else + GActor->PickableOff(); + + vtkPrs->AddObject( GActor ); + + anActor = (vtkActor*)theActors->GetNextActor(); + } + + if ( aProp ) + aProp->Delete(); + + theActors->Delete(); +} + +//================================================================= +/*! + * GEOM_Displayer::BuildPrs + * Build presentation accordint to the current viewer type + */ +//================================================================= +SALOME_Prs* GEOM_Displayer::BuildPrs( GEOM::GEOM_Object_ptr theObj ) +{ + if ( theObj->_is_nil() ) + return 0; + + GeometryGUI* geomGUI = GeometryGUI::GetGeomGUI(); + + myViewFrame = GetActiveView(); + if ( myViewFrame == 0 ) + return 0; + + SALOME_Prs* aPrs = myViewFrame->CreatePrs(); + if ( aPrs == 0 ) + return 0; + + internalReset(); + setShape( geomGUI->GetShapeReader().GetShape( geomGUI->GetGeomGen(), theObj ) ); + myType = theObj->GetType(); + + // Update presentation + UpdatePrs( aPrs ); + + return aPrs; +} + +//================================================================= +/*! + * GEOM_Displayer::BuildPrs + * Build presentation accordint to the current viewer type + */ +//================================================================= +SALOME_Prs* GEOM_Displayer::BuildPrs( const TopoDS_Shape& theShape ) +{ + myViewFrame = GetActiveView(); + if ( theShape.IsNull() || myViewFrame == 0 ) + return 0; + + SALOME_Prs* aPrs = myViewFrame->CreatePrs(); + if ( aPrs == 0 ) + return 0; + + internalReset(); + setShape( theShape ); + myType = -1; + + UpdatePrs( aPrs ); + + return aPrs; +} + +//================================================================= +/*! + * GEOM_Displayer::buildPresentation + * Builds/finds object's presentation for the current viewer + * Calls corresponding Update() method by means of double dispatch + * [ internal ] + */ +//================================================================= +SALOME_Prs* GEOM_Displayer::buildPresentation( const Handle(SALOME_InteractiveObject)& theIO, + QAD_ViewFrame* theViewFrame ) +{ + SALOME_Prs* prs = 0; + internalReset(); + + GeometryGUI* geomGUI = GeometryGUI::GetGeomGUI(); + + myViewFrame = theViewFrame; // no dynamic_cast here to use double dispatch + if ( !myViewFrame ) + myViewFrame = GetActiveView(); + + if ( myViewFrame ) { + prs = myViewFrame->CreatePrs( !theIO.IsNull() ? theIO->getEntry() : 0 ); + if ( prs ) { + if ( !theIO.IsNull() ) { + // set interactive object + setIO( theIO ); + // Find SOBject (because shape should be published previously) + SALOMEDS::SObject_var SO = getActiveStudy()->getStudyDocument()->FindObjectID( theIO->getEntry() ); + if ( !SO->_is_nil() ) { + // get CORBA reference to data object + CORBA::Object_var object = SO->GetObject(); + if ( !CORBA::is_nil( object ) ) { + // downcast to GEOM object + GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( object ); + if ( !GeomObject->_is_nil() ) { + // finally set shape + setShape( geomGUI->GetShapeReader().GetShape( geomGUI->GetGeomGen(), GeomObject ) ); + myType = GeomObject->GetType(); + } + } + } + } + UpdatePrs( prs ); // Update presentation by using of the double dispatch + } + } + return prs; +} + +//================================================================= +/*! + * GEOM_Displayer::internalReset + * Resets internal data + * [internal] + */ +//================================================================= +void GEOM_Displayer::internalReset() +{ + myIO.Nullify(); + myShape.Nullify(); +} + +//================================================================= +/*! + * GEOM_Displayer::LocalSelection + * Activate selection of CAD shapes with activisation of selection + * of their sub-shapes (with opened local context for OCC viewer) + */ +//================================================================= +void GEOM_Displayer::LocalSelection( const Handle(SALOME_InteractiveObject)& theIO, const int theMode ) +{ + // remove all filters from selection + SALOME_Selection* aSel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + aSel->ClearFilters(); + + QAD_ViewFrame* vf = GetActiveView(); + if ( vf ) + { + SALOME_Prs* prs = vf->CreatePrs( theIO.IsNull() ? 0 : theIO->getEntry() ); + ((SALOME_View*)vf)->LocalSelection( prs, theMode ); + delete prs; // delete presentation because displayer is its owner + } +} + +//================================================================= +/*! + * GEOM_Displayer::globalSelection + * Activate selection of CAD shapes without activisation of selection + * of their sub-shapes (without opened local context for OCC viewer) + */ +//================================================================= +void GEOM_Displayer::GlobalSelection( const int theMode, const bool update ) +{ + TColStd_MapOfInteger aModes; + aModes.Add( theMode ); + GlobalSelection( aModes, update ); +} + +//================================================================= +/*! + * GEOM_Displayer::globalSelection + * Activate selection of CAD shapes without activisation of selection + * of their sub-shapes (without opened local context for OCC viewer) + */ +//================================================================= +void GEOM_Displayer::GlobalSelection( const TColStd_MapOfInteger& theModes, + const bool update ) +{ + QAD_ViewFrame* vf = GetActiveView(); + if ( vf == 0 ) + return; + + // Close local context + vf->GlobalSelection( update ); + + // Set selection filters in accordance with current mode + SALOME_Selection* aSel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + // Remove from selection temporary objects if necessary + if ( !theModes.Contains( GEOM_PREVIEW ) ) + clearTemporary( aSel ); + + aSel->ClearIndex(); + + aSel->ClearFilters(); + + if ( theModes.Contains( GEOM_ALLOBJECTS ) ) + return; + + Handle(SALOME_Filter) aFilter; + if ( theModes.Extent() == 1 ) + { + int aMode = TColStd_MapIteratorOfMapOfInteger( theModes ).Key(); + aFilter = getFilter( aMode ); + } + else if ( theModes.Extent() > 1 ) + { + TColStd_MapOfInteger aTopAbsModes; + TColStd_MapIteratorOfMapOfInteger anIter( theModes ); + GEOM_ListOfFilter aListOfFilters; + for ( ; anIter.More(); anIter.Next() ) + { + Handle(SALOME_Filter) aFilter = getFilter( anIter.Key() ); + if ( !aFilter.IsNull() ) + aListOfFilters.Append( aFilter ); + } + + aFilter = new GEOM_LogicalFilter( aListOfFilters, GEOM_LogicalFilter::LO_OR ); + } + else + return; + + if ( !aFilter.IsNull() ) + aSel->AddFilter( aFilter ); +} + +//================================================================= +/*! + * GEOM_Displayer::LocalSelection + * Activate selection of CAD shapes with activisation of selection + * of their sub-shapes (with opened local context for OCC viewer) + */ +//================================================================= +void GEOM_Displayer::LocalSelection( const SALOME_ListIO& theIOList, const int theMode ) +{ + SALOME_ListIteratorOfListIO Iter( theIOList ); + for ( ; Iter.More(); Iter.Next() ) + LocalSelection( Iter.Value(), theMode ); +} + +//================================================================= +/*! + * GEOM_Displayer::BeforeDisplay + * Called before displaying of pars. Close local context + * [ Reimplemented from SALOME_Displayer ] + */ +//================================================================= +void GEOM_Displayer::BeforeDisplay( SALOME_View* v, const SALOME_OCCViewType& ) +{ + OCCViewer_ViewFrame* vf = dynamic_cast( v ); + if ( vf ) + { + Handle(AIS_InteractiveContext) ic = vf->getViewer()->getAISContext(); + if ( !ic.IsNull() ) + { + if ( ic->HasOpenedContext() ) + ic->CloseAllContexts(); + } + } +} + +void GEOM_Displayer::AfterDisplay( SALOME_View*, const SALOME_OCCViewType& ) +{ +} + + +//================================================================= +/*! + * GEOM_Displayer::SetColor + * Set color for shape displaying. If it is equal -1 then default color is used. + * Available values are from Quantity_NameOfColor enumeration + */ +//================================================================= +void GEOM_Displayer::SetColor( const int color ) +{ + myColor = color; +} + +int GEOM_Displayer::GetColor() const +{ + return myColor; +} + +bool GEOM_Displayer::HasColor() const +{ + return myColor != -1; +} + +void GEOM_Displayer::UnsetColor() +{ + myColor = -1; +} + +//================================================================= +/*! + * GEOM_Displayer::SetWidth + * Set width of shape displaying. If it is equal -1 then default width is used. + */ +//================================================================= +void GEOM_Displayer::SetWidth( const double width ) +{ + myWidth = width; +} + +double GEOM_Displayer::GetWidth() const +{ + return myWidth; +} + +bool GEOM_Displayer::HasWidth() const +{ + return myWidth != -1; +} + +void GEOM_Displayer::UnsetWidth() +{ + myWidth = -1; +} + +//================================================================= +/*! + * GEOM_Displayer::SetToActivate + * This method is used for activisation/deactivisation of objects to be displayed + */ +//================================================================= +void GEOM_Displayer::SetToActivate( const bool toActivate ) +{ + myToActivate = toActivate; +} +bool GEOM_Displayer::ToActivate() const +{ + return myToActivate; +} + +//================================================================= +/*! + * GEOM_Displayer::clearTemporary + * Removes from selection temporary objects + */ +//================================================================= +void GEOM_Displayer::clearTemporary( SALOME_Selection* theSel ) +{ + SALOME_ListIO toBeRemoved; + SALOME_ListIteratorOfListIO anIter( theSel->StoredIObjects() ); + for ( ; anIter.More(); anIter.Next() ) + { + Handle(SALOME_InteractiveObject) anIO = anIter.Value(); + if ( anIO->hasEntry() && ( strncmp( anIO->getEntry(), "TEMP_", 5 ) == 0 ) ) + toBeRemoved.Append( anIO ); + } + + SALOME_ListIteratorOfListIO anIter2( toBeRemoved ); + for ( ; anIter2.More(); anIter2.Next() ) + theSel->RemoveIObject( anIter2.Value(), false ); +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/GEOMGUI/GEOM_Displayer.h b/src/GEOMGUI/GEOM_Displayer.h new file mode 100644 index 000000000..45a1e4f41 --- /dev/null +++ b/src/GEOMGUI/GEOM_Displayer.h @@ -0,0 +1,173 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_Displayer.h +// Author : Vadim SANDLER +// Module : GEOM +// $Header$ + +#if !defined (__GEOM_DISPLAYER_H) +#define __GEOM_DISPLAYER_H + +#include "SALOME_Prs.h" +#include "SALOME_InteractiveObject.hxx" +#include "SALOME_ListIO.hxx" +#include +#include + +#include + +#include +#include CORBA_CLIENT_HEADER(GEOM_Gen) + +#define GEOM_ALLOBJECTS -1 // Selection of all objects is activated +#define GEOM_PREVIEW -2 // Definition for preview selection +#define GEOM_ALLSHAPES -3 // Selection of all shapes is activated +#define GEOM_ALLGEOM -4 // Selection of all geom objects is activated + +typedef std::list ObjectList; + +class TColStd_MapOfInteger; +class QAD_ViewFrame; +class SALOME_Selection; + +class GEOM_Displayer : public SALOME_Displayer +{ + +public: + /* Constructor */ + GEOM_Displayer(); + /* Destructor */ + virtual ~GEOM_Displayer(); + + /* Display/Erase object methods */ + + void Display ( const Handle(SALOME_InteractiveObject)& theIO, + const bool updateViewer = true, + QAD_ViewFrame* theViewFrame = 0 ); + + // This overloaded Display() method can be useful for operations + // not using dialog boxes. + void Display ( GEOM::GEOM_Object_ptr theObj, + const bool updateViewer = true ); + + void Redisplay ( const Handle(SALOME_InteractiveObject)& theIO, + const bool updateViewer = true ); + + void Erase ( const Handle(SALOME_InteractiveObject)& theIO, + const bool forced = false, + const bool updateViewer = true, + QAD_ViewFrame* theViewFrame = 0 ); + + void Erase ( GEOM::GEOM_Object_ptr theObj, + const bool forced = false, + const bool updateViewer = true ); + + /* Display/Erase list of objects methods */ + + void Display ( const SALOME_ListIO& theIOList, + const bool updateViewer = true ); + + void Erase ( const SALOME_ListIO& theIOList, + const bool forced = false, + const bool updateViewer = true ); + + void Redisplay ( const SALOME_ListIO& theIOList, + const bool updateViewer = true ); + + /* Update current viewer */ + void UpdateViewer(); + + /* build presentation accordint to the current viewer type*/ + SALOME_Prs* BuildPrs ( GEOM::GEOM_Object_ptr ); + SALOME_Prs* BuildPrs ( const TopoDS_Shape& ); + + /* Set color for shape displaying. If it is equal -1 then default color is used. + Available values are from Quantity_NameOfColor enumeration */ + void SetColor ( const int ); + void UnsetColor(); + int GetColor () const; + bool HasColor () const; + + /* Set width for shape displaying. If it is equal -1 then default width is used. */ + void SetWidth ( const double ); + void UnsetWidth(); + double GetWidth () const; + bool HasWidth () const; + + + /* Sets name - for temporary objects only */ + void SetName( const char* theName ) { myName = theName; } + void UnsetName() { myName = ""; } + + /* Reimplemented from SALOME_Displayer */ + virtual void Update( SALOME_OCCPrs* ); + virtual void Update( SALOME_VTKPrs* ); + virtual void BeforeDisplay( SALOME_View*, const SALOME_OCCViewType& ); + virtual void AfterDisplay ( SALOME_View*, const SALOME_OCCViewType& ); + + /* This methos is used for activisation/deactivisation of objects to be displayed*/ + void SetToActivate( const bool ); + bool ToActivate() const; + + /* Activate/Deactivate selection*/ + void LocalSelection( const Handle(SALOME_InteractiveObject)&, const int ); + void LocalSelection( const SALOME_ListIO& theIOList, const int ); + void GlobalSelection( const int = GEOM_ALLOBJECTS, const bool = false ); + void GlobalSelection( const TColStd_MapOfInteger&, const bool = false ); + + static QAD_ViewFrame* GetActiveView(); + +protected: + /* internal methods */ + /* Builds presentation accordint to the current viewer type */ + SALOME_Prs* buildPresentation( const Handle(SALOME_InteractiveObject)& theIO, + QAD_ViewFrame* theViewFrame = 0 ); + + /* Sets interactive object */ + void setIO( const Handle(SALOME_InteractiveObject)& theIO ) { myIO = theIO; } + + /* Sets shape */ + void setShape( const TopoDS_Shape& theShape ) { myShape = theShape; } + + /* Resets internal data */ + void internalReset(); + + void clearTemporary( SALOME_Selection* ); + +protected: + Handle(SALOME_InteractiveObject) myIO; + TopoDS_Shape myShape; + string myName; + int myType; + QAD_ViewFrame* myViewFrame; + + // Attributes + Quantity_Color myShadingColor; + int myColor; + double myWidth; + bool myToActivate; +}; + +#endif // __GEOM_DISPLAYER_H + diff --git a/src/GEOMGUI/GEOM_icons.po b/src/GEOMGUI/GEOM_icons.po new file mode 100644 index 000000000..97e439650 --- /dev/null +++ b/src/GEOMGUI/GEOM_icons.po @@ -0,0 +1,488 @@ +# This is a Qt message file in .po format. Each msgid starts with +# a scope. This scope should *NOT* be translated - eg. translating +# from French to English, "Foo::Bar" would be translated to "Pub", +# not "Foo::Pub". +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2001-06-14 09:11:49 PM CEST\n" +"PO-Revision-Date: 2003-09-22 16:39+0200\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +#Select +msgid "ICON_SELECT" +msgstr "select1.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_Geometry" +msgstr "geometry.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_COMPOUND" +msgstr "tree_compound.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_COMPSOLID" +msgstr "tree_compsolid.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_EDGE" +msgstr "tree_edge.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_FACE" +msgstr "tree_face.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_SHAPE" +msgstr "tree_shape.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_SHELL" +msgstr "tree_shell.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_SOLID" +msgstr "tree_solid.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_VERTEX" +msgstr "tree_vertex.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_WIRE" +msgstr "tree_wire.png" + +#: QAD_ObjectBrowser.cxx:140 +msgid "ICON_OBJBROWSER_BLOCK" +msgstr "tree_block.png" + +#BoxDlg +msgid "ICON_DLG_BOX_2P" +msgstr "box2points.png" + +#BoxDlg +msgid "ICON_DLG_BOX_DXYZ" +msgstr "boxdxyz.png" + +#CylinderDlg +msgid "ICON_DLG_CYLINDER_PV" +msgstr "cylinderpointvector.png" + +#CylinderDlg +msgid "ICON_DLG_CYLINDER_DXYZ" +msgstr "cylinderdxyz.png" + +#SphereDlg +msgid "ICON_DLG_SPHERE_P" +msgstr "spherepoint.png" + +#SphereDlg +msgid "ICON_DLG_SPHERE_DXYZ" +msgstr "spheredxyz.png" + +#torusDlg +msgid "ICON_DLG_TORUS_PV" +msgstr "toruspointvector.png" + +#ConeDlg +msgid "ICON_DLG_CONE_PV" +msgstr "conepointvector.png" + +#torusDlg +msgid "ICON_DLG_TORUS_DXYZ" +msgstr "torusdxyz.png" + +#ConeDlg +msgid "ICON_DLG_CONE_DXYZ" +msgstr "conedxyz.png" + +#LineDlg +msgid "ICON_DLG_LINE_2P" +msgstr "line2points.png" + +#LineDlg +msgid "ICON_DLG_LINE_EDGE" +msgstr "lineedge.png" + +#LineDlg +msgid "ICON_DLG_LINE_PV" +msgstr "linepointvector.png" + +#CircleDlg +msgid "ICON_DLG_CIRCLE_PV" +msgstr "circlepointvector.png" + +#VectorDlg +msgid "ICON_DLG_VECTOR_2P" +msgstr "vector2points.png" + +#vectorDlg +msgid "ICON_DLG_VECTOR_DXYZ" +msgstr "vectordxyz.png" + +#PlaneDlg +msgid "ICON_DLG_PLANE_DXYZ" +msgstr "planedxyz.png" + +#PlaneDlg +msgid "ICON_DLG_PLANE_FACE" +msgstr "planeface.png" + +#PlaneDlg +msgid "ICON_DLG_PLANE_PV" +msgstr "planepointvector.png" + +#WorkingPlaneDlg +msgid "ICON_DLG_WPLANE_FACE" +msgstr "planeworkingface.png" + +#WorkingPlaneDlg +msgid "ICON_DLG_WPLANE_VECTOR" +msgstr "planeworkingvector.png" + +#WorkingPlaneDlg +msgid "ICON_DLG_WPLANE_ORIGIN" +msgstr "planeworkingorigin.png" + +#PointDlg +msgid "ICON_DLG_POINT" +msgstr "point2.png" + +#PointDlg +msgid "ICON_DLG_POINT_REF" +msgstr "point3.png" + +#PoinDlg +msgid "ICON_DLG_POINT_EDGE" +msgstr "pointonedge.png" + +#ArcDlg +msgid "ICON_DLG_ARC" +msgstr "arc.png" + +#ArchimedeDlg +msgid "ICON_DLG_ARCHIMEDE" +msgstr "archimede.png" + +#PartitionDlg +msgid "ICON_DLG_PARTITION" +msgstr "partition.png" + +#PartitionDlg +msgid "ICON_DLG_PARTITION_KEEP_FACES" +msgstr "partitionkeep.png" + +#PartitionDlg +msgid "ICON_DLG_PARTITION_PLANE" +msgstr "partitionplane.png" + +#CenterMassDlg +msgid "ICON_DLG_CENTERMASS" +msgstr "centergravity.png" + +#BoundingBoxDlg +msgid "ICON_DLG_BOUNDING_BOX" +msgstr "bounding.png" + +#CommonDlg +msgid "ICON_DLG_COMMON" +msgstr "common.png" + +#CompoundDlg +msgid "ICON_DLG_BUILD_COMPOUND" +msgstr "build_compound.png" + +#CutDlg +msgid "ICON_DLG_CUT" +msgstr "cut.png" + +#EdgeDlg +msgid "ICON_DLG_BUILD_EDGE" +msgstr "build_edge.png" + +#FaceDlg +msgid "ICON_DLG_BUILD_FACE" +msgstr "build_face.png" + +#ShellDlg +msgid "ICON_DLG_BUILD_SHELL" +msgstr "build_shell.png" + +#SolidDlg +msgid "ICON_DLG_BUILD_SOLID" +msgstr "build_solid.png" + +#WireDlg +msgid "ICON_DLG_BUILD_WIRE" +msgstr "build_wire.png" + +#FillingDlg +msgid "ICON_DLG_FILLING" +msgstr "filling.png" + +#FuseDlg +msgid "ICON_DLG_FUSE" +msgstr "fuse.png" + +#InertiaDlg +msgid "ICON_DLG_INERTIA" +msgstr "axisinertia.png" + +#ToleranceDlg +msgid "ICON_DLG_TOLERANCE" +msgstr "tolerance.png" + +#BasicPropertiesDlg +msgid "ICON_DLG_BASICPROPERTIES" +msgstr "basicproperties.png" + +#WhatisDlg +msgid "ICON_DLG_WHATIS" +msgstr "whatis.png" + +#MinDistDlg +msgid "ICON_DLG_MINDIST" +msgstr "mindist.png" + +#MirrorDlg (MZN: add icons for point and axe) +msgid "ICON_DLG_MIRROR_POINT" +msgstr "mirrorPoint.png" + +msgid "ICON_DLG_MIRROR_AXE" +msgstr "mirrorAxe.png" + +msgid "ICON_DLG_MIRROR_PLANE" +msgstr "mirrorPlane.png" + +#TranslationDlg +msgid "ICON_DLG_TRANSLATION_DXYZ" +msgstr "translationDxyz.png" + +#TranslationDlg +msgid "ICON_DLG_TRANSLATION_POINTS" +msgstr "translationPoints.png" + +#TranslationDlg +msgid "ICON_DLG_TRANSLATION_VECTOR" +msgstr "translationVector.png" + +#RotationDlg +msgid "ICON_DLG_ROTATION" +msgstr "rotate.png" + +#ScaleDlg +msgid "ICON_DLG_SCALE" +msgstr "scale.png" + +#OffsetDlg +msgid "ICON_DLG_OFFSET" +msgstr "offset.png" + +#OrientationDlg +msgid "ICON_DLG_DIVIDE_EDGE" +msgstr "pointonedge.png" + +#SewingDlg +msgid "ICON_DLG_SEWING" +msgstr "sewing.png" + +#PipeDlg +msgid "ICON_DLG_PIPE" +msgstr "pipe.png" + +#PrismDlg +msgid "ICON_DLG_PRISM" +msgstr "prism.png" + +#RevolutionDlg +msgid "ICON_DLG_REVOL" +msgstr "revol.png" + +#SectionDlg +msgid "ICON_DLG_SECTION" +msgstr "section.png" + +#SubShapeDlg +msgid "ICON_DLG_SUBSHAPE" +msgstr "subshape.png" + +#FilletDlg +msgid "ICON_DLG_FILLET" +msgstr "fillet.png" + +#ChamferDlg +msgid "ICON_DLG_CHAMFER" +msgstr "chamfer.png" + +#FilletDlg +msgid "ICON_DLG_FILLET_ALL" +msgstr "filletall.png" + +#ChamferDlg +msgid "ICON_DLG_CHAMFER_ALL" +msgstr "chamferall.png" + +#FilletDlg +msgid "ICON_DLG_FILLET_EDGE" +msgstr "filletedge.png" + +#ChamferDlg +msgid "ICON_DLG_CHAMFER_EDGE" +msgstr "chamferedge.png" + +#FilletDlg +msgid "ICON_DLG_FILLET_FACE" +msgstr "filletface.png" + +#ChamferDlg +msgid "ICON_DLG_CHAMFER_FACE" +msgstr "chamferface.png" + +#ChamferDlg +msgid "ICON_DLG_CHECKSHAPE" +msgstr "check.png" + +#SupressFaceDlg +msgid "ICON_DLG_SUPRESS_FACE" +msgstr "supressface.png" + +msgid "ICON_DLG_CLOSECONTOUR" +msgstr "closecontour.png" + +#SupressHoleDlg +msgid "ICON_DLG_SUPRESS_HOLE" +msgstr "supresshole.png" + +#SupressHoleDlg +msgid "ICON_DLG_SUPRESS_HOLE_FACE_SHELL" +msgstr "supressHolesOnFaceShell.png" + +#MultiTranslationDlg +msgid "ICON_DLG_MULTITRANSLATION_SIMPLE" +msgstr "multitranslationsimple.png" + +#MultiTranslationDlg +msgid "ICON_DLG_MULTITRANSLATION" +msgstr "multitranslation.png" + +#MultiTranslationDlg +msgid "ICON_DLG_MULTITRANSLATION_DOUBLE" +msgstr "multitranslationdouble.png" + +#MultiRotationDlg +msgid "ICON_DLG_MULTIROTATION_SIMPLE" +msgstr "multirotationsimple.png" + +#MultiRotationDlg +msgid "ICON_DLG_MULTIROTATION" +msgstr "multirotation.png" + +#MultiRotationDlg +msgid "ICON_DLG_MULTIROTATION_DOUBLE" +msgstr "multirotationdouble.png" + +#EllipseDlg +msgid "ICON_DLG_ELLIPSE_PV" +msgstr "ellipsepointvector.png" + +#SplineDlg +msgid "ICON_DLG_SPLINE" +msgstr "spline.png" + +#SplineDlg +msgid "ICON_DLG_BEZIER" +msgstr "bezier.png" + +#SplineDlg +msgid "ICON_DLG_INTERPOL" +msgstr "interpol.png" + +msgid "ICON_DLG_CIRCLE_PNTS" +msgstr "circle3points.png" + +msgid "ICON_DLG_PLANE_3PNTS" +msgstr "plane3points.png" + +msgid "ICON_DLG_POLYLINE" +msgstr "polyline.png" + +msgid "ICON_DLG_SUPPRESS_INT_WIRES" +msgstr "suppressintwires.png" + +msgid "ICON_DLG_ADD_POINT_ON_EDGE" +msgstr "pointonedge.png" + +msgid "ICON_DLG_SUPPRESS_HOLES" +msgstr "supressHolesOnFaceShell.png" + +msgid "ICON_MARKER" +msgstr "marker.png" + +msgid "ICON_MARKER2" +msgstr "marker2.png" + +msgid "ICON_MARKER3" +msgstr "marker3.png" + +msgid "ICON_DLG_POSITION" +msgstr "position.png" + +msgid "ICON_DLG_POSITION2" +msgstr "position2.png" + +msgid "ICON_DLG_UNDO" +msgstr "undo.png" + +msgid "ICON_DLG_REDO" +msgstr "redo.png" + +msgid "ICON_OBJBROWSER_GROUP_PNT" +msgstr "tree_group_vertex.png" + +msgid "ICON_OBJBROWSER_GROUP_EDGE" +msgstr "tree_group_edge.png" + +msgid "ICON_OBJBROWSER_GROUP_FACE" +msgstr "tree_group_face.png" + +msgid "ICON_OBJBROWSER_GROUP_SOLID" +msgstr "tree_group_solid.png" + +msgid "ICON_OBJBROWSER_LCS" +msgstr "tree_lcs.png" + +msgid "ICON_DLG_SHAPEPROCESS" +msgstr "shapeprocess.png" + +#BlocksGUI_BlockDlg +msgid "ICON_DLG_BLOCK_2F" +msgstr "block_2f.png" + +msgid "ICON_DLG_BLOCK_6F" +msgstr "block_6f.png" + +#BlocksGUI_ExplodeDlg +msgid "ICON_DLG_BLOCK_EXPLODE" +msgstr "subblock.png" + +#BlocksGUI_TrsfDlg +msgid "ICON_DLG_BLOCK_MULTITRSF_SIMPLE" +msgstr "block_multitrsf_simple.png" + +msgid "ICON_DLG_BLOCK_MULTITRSF_DOUBLE" +msgstr "block_multitrsf_double.png" + +#BlocksGUI_QuadFaceDlg +msgid "ICON_DLG_QUAD_FACE_4_VERT" +msgstr "block_face_4v.png" + +msgid "ICON_DLG_QUAD_FACE_2_EDGE" +msgstr "block_face_2e.png" + +msgid "ICON_DLG_QUAD_FACE_4_EDGE" +msgstr "block_face_4e.png" + +msgid "ICON_DLG_GLUE_FACES" +msgstr "glue.png" diff --git a/src/GEOMGUI/GEOM_msg_en.po b/src/GEOMGUI/GEOM_msg_en.po new file mode 100644 index 000000000..30092d5de --- /dev/null +++ b/src/GEOMGUI/GEOM_msg_en.po @@ -0,0 +1,1932 @@ +# This is a Qt message file in .po format. Each msgid starts with +# a scope. This scope should *NOT* be translated - eg. translating +# from French to English, "Foo::Bar" would be translated to "Pub", +# not "Foo::Pub". +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2002-03-19 09:35:48 AM CET\n" +"PO-Revision-Date: 2003-10-27 17:32+0100\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +# +#============================================================================== +# + +#Button Apply +msgid "GEOM_BUT_APPLY" +msgstr "&Apply" + +#Button Close +msgid "GEOM_BUT_CLOSE" +msgstr "&Close" + +#Button Cancel +msgid "GEOM_BUT_CANCEL" +msgstr "&Cancel" + +#Button Ok +msgid "GEOM_BUT_OK" +msgstr "&Ok" + +#Button Yes +msgid "GEOM_BUT_YES" +msgstr "&Yes" + +#Button No +msgid "GEOM_BUT_NO" +msgstr "&No" + +#Button Help +msgid "GEOM_BUT_HELP" +msgstr "&Help" + +#Button Explode +msgid "GEOM_BUT_EXPLODE" +msgstr "&Explode" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:563 +msgid "GEOM_INF_LOADED" +msgstr "File %1 loaded." + +# +#============================================================================== +# + +#: GeometryGUI.cxx:3069 +msgid "GEOM_PRP_COMMAND" +msgstr "No command associated with this id = %1." + +#: GeometryGUI.cxx:4977 +msgid "GEOM_PRP_ABORT" +msgstr "Operation aborted" + +#: GeometryGUI.cxx:5058 +msgid "GEOM_PRP_DONE" +msgstr "Operation done" + +#: GeometryGUI.cxx:3717 +msgid "GEOM_PRP_LOADING" +msgstr "Loading %1 ..." + +#: GeometryGUI.cxx:1412 +msgid "GEOM_PRP_NULLSHAPE" +msgstr "Error, null or inappropriate shape !" + +#: GeometryGUI.cxx:5072 +msgid "GEOM_PRP_READY" +msgstr "Ready" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_SUBSHAPES" +msgstr "Select Sub Shapes" + +msgid "GEOM_CONFIRM" +msgstr "Confirm operation" + +msgid "GEOM_CONFIRM_INFO" +msgstr "Shape contains %1 sub shapes !" + + +msgid "GEOM_PRP_NOT_FOR_VTK_VIEWER" +msgstr "Not allowed in VTK viewer" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SHAPE_IN_STUDY" +msgstr "Main shape must be in the study before" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_EDGE" +msgstr "Select edges and click on Apply" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_FACE" +msgstr "Select faces to suppress and click on Ok/Apply" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_FIRST" +msgstr "Select main shape first" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_MIN_DIST" +msgstr "Min Distance not computed" + +msgid "GEOM_STUDY_LOCKED" +msgstr "The active study is locked and therefore cannot be modified" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:3698 +msgid "GEOM_MEN_ALL_FILES" +msgstr "All Files ( * )" + +#: GeometryGUI.cxx:4389 +msgid "GEOM_MEN_ANGLE" +msgstr "Angle :" + +#: GeometryGUI.cxx:3941 +msgid "GEOM_MEN_COMPONENT" +msgstr "Geometry" + +#: GeometryGUI.cxx:4389 +msgid "GEOM_MEN_ENTER_ANGLE" +msgstr "Enter An Angle In Degrees" + +#: GeometryGUI.cxx:3758 +msgid "GEOM_MEN_EXPORT" +msgstr "Export" + +#: GeometryGUI.cxx:3648 +msgid "GEOM_MEN_IMPORT" +msgstr "Import" + +#: GeometryGUI.cxx:3763 +msgid "GEOM_MEN_LOAD_SCRIPT" +msgstr "PYTHON Files ( *.py )" + +#: GeometryGUI.cxx:2931 +msgid "GEOM_MEN_ISOS" +msgstr "Select Number Of Isos" + +#: GeometryGUI.cxx:4278 +msgid "GEOM_MEN_POPUP_NAME" +msgstr "%1 Objects" + +#: GeometryGUI.cxx:4414 +msgid "GEOM_MEN_SKETCHER_X" +msgstr "Enter a length to set X" + +#: GeometryGUI.cxx:4438 +msgid "GEOM_MEN_SKETCHER_Y" +msgstr "Enter a length to set Y" + +#: GeometryGUI.cxx:2898 +msgid "GEOM_MEN_TRANSPARENCY" +msgstr "Transparency" + +#: GeometryGUI.cxx:4413 +msgid "GEOM_MEN_X" +msgstr "X :" + +#: GeometryGUI.cxx:4437 +msgid "GEOM_MEN_Y" +msgstr "Y :" + +#: GeometryGUI_NbIsosDlg.cxx:36 +msgid "GEOM_MEN_ISOU" +msgstr "Isos u :" + +#: GeometryGUI_NbIsosDlg.cxx:53 +msgid "GEOM_MEN_ISOV" +msgstr "Isos v :" + +#: GeometryGUI_TransparencyDlg.cxx:31 +msgid "GEOM_MEN_TRANSPARENCY_LABEL" +msgstr "Transparency :" + +msgid "GEOM_MEN_STEP_LABEL" +msgstr "Step :" + +msgid "GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE" +msgstr "Identical names : select by mouse !" + +msgid "GEOM_NAME_INCORRECT" +msgstr "Object name not found" + +msgid "GEOM_INCORRECT_INPUT" +msgstr "Incorrect input data!" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:892 +msgid "GEOM_WRN_RADIUS_NULL" +msgstr "Radius is null" + +#: GeometryGUI.cxx:3854 +msgid "GEOM_WRN_WARNING" +msgstr "Warning" + +#: GeometryGUI.cxx:3854 +msgid "GEOM_REALLY_DELETE" +msgstr "Do you really want to delete object(s) ?" + +# +#============================================================================== +# + +#Object +msgid "GEOM_OBJECT" +msgstr "Object" + +#Main object +msgid "GEOM_MAIN_OBJECT" +msgstr "Main Object" + +#Tool object +msgid "GEOM_TOOL_OBJECT" +msgstr "Tool Object" + +#Base Object +msgid "GEOM_BASE_OBJECT" +msgstr "Base Object" + +#Path Object +msgid "GEOM_PATH_OBJECT" +msgstr "Path Object" + +#Objects +msgid "GEOM_OBJECTS" +msgstr "Objects" + +#Object i +msgid "GEOM_OBJECT_I" +msgstr "Object %1" + +#Object and result +msgid "GEOM_OBJECT_RESULT" +msgstr "Object And Result" + +#Point +msgid "GEOM_POINT" +msgstr "Point" + +#Base point +msgid "GEOM_BASE_POINT" +msgstr "Base Point" + +#Center Point +msgid "GEOM_CENTER_POINT" +msgstr "Center Point" + +#Diagonal Points +msgid "GEOM_DIAGONAL_POINTS" +msgstr "Diagonal Points" + +#Central Point +msgid "GEOM_CENTRAL_POINT" +msgstr "Central Point" + +#Points +msgid "GEOM_POINTS" +msgstr "Points" + +#Point i +msgid "GEOM_POINT_I" +msgstr "Point %1" + +#Arguments +msgid "GEOM_ARGUMENTS" +msgstr "Arguments" + +#Center +msgid "GEOM_CENTER" +msgstr "Center" + +#Radius +msgid "GEOM_RADIUS" +msgstr "Radius :" + +#Radius i +msgid "GEOM_RADIUS_I" +msgstr "Radius %1 :" + +#Height +msgid "GEOM_HEIGHT" +msgstr "Height :" + +#Length +msgid "GEOM_LENGTH" +msgstr "Length is :" + +#Weight +msgid "GEOM_WEIGHT" +msgstr "Weight :" + +#Coordinates +msgid "GEOM_COORDINATES" +msgstr "Coordinates" + +#Coor. +msgid "GEOM_COOR" +msgstr "Coord. :" + +#Reverse +msgid "GEOM_REVERSE" +msgstr "Reverse" + +#Reverse U +msgid "GEOM_REVERSE_U" +msgstr "Reverse U" + +#Reverse V +msgid "GEOM_REVERSE_V" +msgstr "Reverse V" + +#Angle +msgid "GEOM_ANGLE" +msgstr "Angle :" + +#Axis +msgid "GEOM_AXIS" +msgstr "Axis" + +#Matrix +msgid "GEOM_MATRIX" +msgstr "Matrix :" + +#Vector Length +msgid "GEOM_VECTOR_LENGTH" +msgstr "Vector Length :" + +#Reverse Vector +msgid "GEOM_REVERSE_VECTOR" +msgstr "Reverse Vector" + +#Point Mirror +msgid "GEOM_POINT_MIRROR" +msgstr "Point Mirror" + +#Axe Mirror +msgid "GEOM_AXE_MIRROR" +msgstr "Axe Mirror" + +#Plane Mirror +msgid "GEOM_PLANE_MIRROR" +msgstr "Plane Mirror" + +#Face Selection +msgid "GEOM_FACE_SELECTION" +msgstr "Face Selection" + +#Base +msgid "GEOM_BASE" +msgstr "Base" + +#Water Density +msgid "GEOM_WATER_DENSITY" +msgstr "Water Density :" + +#Meshing Deflection +msgid "GEOM_MESHING_DEFLECTION" +msgstr "Meshing Deflect. :" + +#Dimensions +msgid "GEOM_DIMENSIONS" +msgstr "Dimensions" + +#Precision +msgid "GEOM_PRECISION" +msgstr "Precision :" + +#Selection +msgid "GEOM_SELECTION" +msgstr "Selection" + +#Nb. Times +msgid "GEOM_NB_TIMES" +msgstr "Nb. Times :" + +#Nb. Times U +msgid "GEOM_NB_TIMES_U" +msgstr "Nb. Times U :" + +#Nb. Times V +msgid "GEOM_NB_TIMES_V" +msgstr "Nb. Times V :" + +#Step +msgid "GEOM_STEP" +msgstr "Step :" + +#Step V +msgid "GEOM_STEP_V" +msgstr "Step V :" + +#Step U +msgid "GEOM_STEP_U" +msgstr "Step U :" + +# +#============================================================================== +# + +#Partition +msgid "GEOM_PARTITION" +msgstr "Partition" + +#Half-space partition +msgid "GEOM_PARTITION_HALFSPACE" +msgstr "Half-space partition" + +#Tolerance +msgid "GEOM_TOLERANCE" +msgstr "Tolerance" + +#Orientation +msgid "GEOM_ORIENTATION" +msgstr "Orientation" + +#Pipe +msgid "GEOM_PIPE" +msgstr "Pipe" + +#Revolution +msgid "GEOM_REVOLUTION" +msgstr "Revolution" + +#Rotation +msgid "GEOM_ROTATION" +msgstr "Rotation" + +#Archimede +msgid "GEOM_ARCHIMEDE" +msgstr "Archimede" + +#Common +msgid "GEOM_COMMON" +msgstr "Common" + +#Cut +msgid "GEOM_CUT" +msgstr "Cut" + +#Distance +msgid "GEOM_DISTANCE" +msgstr "Distance" + +#Filling +msgid "GEOM_FILLING" +msgstr "Filling" + +#Fuse +msgid "GEOM_FUSE" +msgstr "Fuse" + +#Scale +msgid "GEOM_SCALE" +msgstr "Scale" + +#Position +msgid "GEOM_POSITION" +msgstr "Location" + +#Offset +msgid "GEOM_OFFSET" +msgstr "Offset" + +#Section +msgid "GEOM_SECTION" +msgstr "Section" + +#Sewing +msgid "GEOM_SEWING" +msgstr "Sewing" + +#Translation +msgid "GEOM_TRANSLATION" +msgstr "Translation" + +#Working Plane +msgid "GEOM_WPLANE" +msgstr "Working Plane" + +#Mirror +msgid "GEOM_MIRROR" +msgstr "Mirror" + +#Prism +msgid "GEOM_PRISM" +msgstr "Prism" + +#Sub Shapes +msgid "GEOM_SUB_SHAPE" +msgstr "Sub Shapes" + +#Supress Face +msgid "GEOM_SUPRESSFACE" +msgstr "Supress Face" + +#Fillet +msgid "GEOM_FILLET" +msgstr "Fillet" + +#Chamfer +msgid "GEOM_CHAMFER" +msgstr "Chamfer" + +#Check Shape +msgid "GEOM_CHECK_SHAPE" +msgstr "Check Shape" + +#Whatis +msgid "GEOM_WHATIS" +msgstr "Whatis" + +#Bounding Box +msgid "GEOM_BNDBOX" +msgstr "Bounding Box" + +#Center Of Mass +msgid "GEOM_CMASS" +msgstr "Center Of Mass" + +#Basic Properties +msgid "GEOM_PROPERTIES" +msgstr "Basic Properties" + +#Multi-Translation +msgid "GEOM_MULTITRANSLATION" +msgstr "Multi-Translation" + +#Multi-Rotation +msgid "GEOM_MULTIROTATION" +msgstr "Multi-Rotation" + +# +#============================================================================== +# + +#Arc +msgid "GEOM_ARC" +msgstr "Arc" + +#Box +msgid "GEOM_BOX" +msgstr "Box" + +#Circle +msgid "GEOM_CIRCLE" +msgstr "Circle" + +#Ellipse +msgid "GEOM_ELLIPSE" +msgstr "Ellipse" + +msgid "GEOM_ELLIPSE_TITLE" +msgstr "Ellipse Construction" + +#Radius major +msgid "GEOM_RADIUS_MAJOR" +msgstr "Major radius :" + +#Radius minor +msgid "GEOM_RADIUS_MINOR" +msgstr "Minor radius :" + +#Compound +msgid "GEOM_COMPOUND" +msgstr "Compound" + +#CompSolid +msgid "GEOM_COMPOUNDSOLID" +msgstr "CompSolid" + +#Cone +msgid "GEOM_CONE" +msgstr "Cone" + +#Cylinder +msgid "GEOM_CYLINDER" +msgstr "Cylinder" + +#Edge +msgid "GEOM_EDGE" +msgstr "Edge" + +#Face +msgid "GEOM_FACE" +msgstr "Face" + +#Faces +msgid "GEOM_FACES" +msgstr "Faces" + +#Line +msgid "GEOM_LINE" +msgstr "Line" + +#Plane +msgid "GEOM_PLANE" +msgstr "Plane" + +#Shape +msgid "GEOM_SHAPE" +msgstr "Shape" + +#Shell +msgid "GEOM_SHELL" +msgstr "Shell" + +#Shells +msgid "GEOM_SHELLS" +msgstr "Shells" + +#Solid +msgid "GEOM_SOLID" +msgstr "Solid" + +#Sphere +msgid "GEOM_SPHERE" +msgstr "Sphere" + +#Conical Face +msgid "GEOM_SURFCONE" +msgstr "Conical Face" + +#Cylindrical Face +msgid "GEOM_SURFCYLINDER" +msgstr "Cylindrical Face" + +#Spherical Face +msgid "GEOM_SURFSPHERE" +msgstr "Spherical Face" + +#Toroidal Face +msgid "GEOM_SURFTORUS" +msgstr "Toroidal Face" + +#Torus +msgid "GEOM_TORUS" +msgstr "Torus" + +#Vector +msgid "GEOM_VECTOR" +msgstr "Vector" + +#Vector U +msgid "GEOM_VECTOR_U" +msgstr "Vector U" + +#Vector V +msgid "GEOM_VECTOR_V" +msgstr "Vector V" + +#Vertex +msgid "GEOM_VERTEX" +msgstr "Vertex" + +#Wire +msgid "GEOM_WIRE" +msgstr "Wire" + +#Wire(s) +msgid "GEOM_WIRES" +msgstr "Wire(s)" + +#Wires +msgid "GEOM_WIREZ" +msgstr "Wires" + +msgid "GEOM_IMPORT" +msgstr "Imported_Shape" + +#Parameter +msgid "GEOM_PARAMETER" +msgstr "Parameter :" + +# +#============================================================================== +# + +#Min +msgid "GEOM_MIN" +msgstr "Min :" + +#Max +msgid "GEOM_MAX" +msgstr "Max :" + +#X +msgid "GEOM_X" +msgstr "X :" + +#Y +msgid "GEOM_Y" +msgstr "Y :" + +#Z +msgid "GEOM_Z" +msgstr "Z :" + +#DX +msgid "GEOM_DX" +msgstr "Dx :" + +#DY +msgid "GEOM_DY" +msgstr "Dy :" + +#DZ +msgid "GEOM_DZ" +msgstr "Dz :" + +#D1 +msgid "GEOM_D1" +msgstr "D1 :" + +#D2 +msgid "GEOM_D2" +msgstr "D2 :" + +# +#============================================================================== +# + +#: GeometryGUI.cxx +msgid "GEOM_STEP_TITLE" +msgstr "Step value for GUI constructions" + +#: GeometryGUI_ArcDlg.cxx:45 +msgid "GEOM_ARC_TITLE" +msgstr "Arc Construction" + +#: GeometryGUI_ArchimedeDlg.cxx:55 +msgid "GEOM_ARCHIMEDE_TITLE" +msgstr "Archimede Construction" + +#: GeometryGUI_BndBoxDlg.cxx:59 +msgid "GEOM_BNDBOX_TITLE" +msgstr "Bounding Box Informations" + +#: GeometryGUI_BndBoxDlg.cxx:82 +msgid "GEOM_BNDBOX_OBJDIM" +msgstr "Object And Its Dimensions" + +#: GeometryGUI_BoxDlg.cxx:50 +msgid "GEOM_BOX_TITLE" +msgstr "Box Construction" + +#: GeometryGUI_BoxDlg.cxx:50 +msgid "GEOM_BOX_OBJ" +msgstr "Dimensions At Origin" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_TITLE" +msgstr "Chamfer Construction" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_ALL" +msgstr "Chamfer On Whole Shape" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_EDGES" +msgstr "Chamfer On Edges From Shape" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_FACES" +msgstr "Chamfer On Faces From Shape" + +#: GeometryGUI_CircleDlg.cxx:48 +msgid "GEOM_CIRCLE_TITLE" +msgstr "Circle Construction" + +#: GeometryGUI_CenterMassDlg.cxx:77 +msgid "GEOM_CMASS_TITLE" +msgstr "Center Of Mass Construction" + +msgid "GEOM_PLANE_SIZE" +msgstr "Size of plane :" + +#: GeometryGUI_CommonDlg.cxx:47 +msgid "GEOM_COMMON_TITLE" +msgstr "BOOLEAN : Common Of Two Objects" + +#: GeometryGUI_CompoundDlg.cxx:44 +msgid "GEOM_COMPOUND_TITLE" +msgstr "Create A Compound" + +#: GeometryGUI_ConeDlg.cxx:49 +msgid "GEOM_CONE_TITLE" +msgstr "Cone Construction" + +#: GeometryGUI_CutDlg.cxx:48 +msgid "GEOM_CUT_TITLE" +msgstr "BOOLEAN : Cut Of Two Objects" +# +#: GeometryGUI_CylinderDlg.cxx:47 +msgid "GEOM_CYLINDER_TITLE" +msgstr "Cylinder Construction" + +#: GeometryGUI_CheckShape.cxx:60 +msgid "GEOM_CHECK_TITLE" +msgstr "Check Shape Informations" + +#: GeometryGUI_CheckShape.cxx:83 +msgid "GEOM_CHECK_INFOS" +msgstr "Object And Its Topological Informations" + +#: GeometryGUI_DistanceDlg.cxx:57 +msgid "GEOM_MINDIST_TITLE" +msgstr "Minimun Distance Between Two Objects" + +#: GeometryGUI_DistanceDlg.cxx:57 +msgid "GEOM_MINDIST_OBJ" +msgstr "Objects And Results" + +#: GeometryGUI_EdgeDlg.cxx:47 +msgid "GEOM_EDGE_TITLE" +msgstr "Create An Edge" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_TITLE" +msgstr "Fillet Construction" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_ALL" +msgstr "Fillet On Whole Shape" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_EDGES" +msgstr "Fillet On Edges From Shape" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_FACES" +msgstr "Fillet On Faces From Shape" + +#: GeometryGUI_FaceDlg.cxx:49 +msgid "GEOM_FACE_TITLE" +msgstr "Create A Face" + +#: GeometryGUI_FaceDlg.cxx:78 +msgid "GEOM_FACE_FFW" +msgstr "Face from a wire" + +#: GeometryGUI_FaceDlg.cxx:103 +msgid "GEOM_FACE_OPT" +msgstr "Try to create a planar face" + +#: GeometryGUI_FillingDlg.cxx:53 +msgid "GEOM_FILLING_TITLE" +msgstr "Filling Surface With Curves" + +#: GeometryGUI_FillingDlg.cxx:112 +msgid "GEOM_FILLING_ARG" +msgstr "Arguments And Parameters" + +#: GeometryGUI_FillingDlg.cxx:128 +msgid "GEOM_FILLING_MIN_DEG" +msgstr "Min deg" + +#: GeometryGUI_FillingDlg.cxx:142 +msgid "GEOM_FILLING_MAX_DEG" +msgstr "Max deg" + +#: GeometryGUI_FillingDlg.cxx:150 +msgid "GEOM_FILLING_TOL_2D" +msgstr "Tol. 2D :" + +#: GeometryGUI_FillingDlg.cxx:170 +msgid "GEOM_FILLING_COMPOUND" +msgstr "Curves Comp." + +#: GeometryGUI_FillingDlg.cxx:184 +msgid "GEOM_FILLING_TOL_3D" +msgstr "Tol. 3D :" + +#: GeometryGUI_FillingDlg.cxx:192 +msgid "GEOM_FILLING_NB_ITER" +msgstr "Nb. Iter :" + +#: GeometryGUI_FuseDlg.cxx:48 +msgid "GEOM_FUSE_TITLE" +msgstr "BOOLEAN : Fuse Two Objects" + +#: GeometryGUI_InertiaDlg.cxx:42 +msgid "GEOM_INERTIA_TITLE" +msgstr "Calculs Of Inertia" + +#: GeometryGUI_InertiaDlg.cxx:50 +msgid "GEOM_INERTIA_CONSTR" +msgstr "Matrix And Moments Of Inertia" + +#: GeometryGUI_InertiaDlg.cxx:100 +msgid "GEOM_INERTIA_I" +msgstr "%1:1 :" + +#: GeometryGUI_InertiaDlg.cxx:182 +msgid "GEOM_INERTIA_IXYZ" +msgstr "IX & IY & IZ :" + +#: GeometryGUI_LineDlg.cxx:50 +msgid "GEOM_LINE_TITLE" +msgstr "Line Construction" + +#: GeometryGUI_MaxToleranceDlg.cxx:53 +msgid "GEOM_TOLERANCE_TITLE" +msgstr "Maximum Tolerance" + +#: GeometryGUI_MaxToleranceDlg.cxx:84 +msgid "GEOM_TOLERANCE_CONSTR" +msgstr "Object And Its Tolerances" + +#: GeometryGUI_MaxToleranceDlg.cxx:121 +msgid "GEOM_TOLERANCE_FACE" +msgstr "Face :" + +#: GeometryGUI_MaxToleranceDlg.cxx:138 +msgid "GEOM_TOLERANCE_EDGE" +msgstr "Edge :" + +#: GeometryGUI_MaxToleranceDlg.cxx:155 +msgid "GEOM_TOLERANCE_VERTEX" +msgstr "Vertex :" + +#: GeometryGUI_MirrorDlg.cxx:52 +msgid "GEOM_MIRROR_TITLE" +msgstr "Mirror An Object" + +#: GeometryGUI_OrientationDlg.cxx:46 +msgid "GEOM_ORIENTATION_TITLE" +msgstr "Change Orientation" + +#: GeometryGUI_OrientationDlg.cxx:134 +msgid "GEOM_ORIENTATION_OPT" +msgstr "Reverse orientation with normal vectors simulation" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "GEOM_PARTITION_TITLE" +msgstr "Partition Of Object With Tool" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "GEOM_KEEP_OBJECT" +msgstr "Keep Object" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "GEOM_PARTITION_ORIENTATION" +msgstr "Change Orientation" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "SUPPRESS_RESULT" +msgstr "Suppress Result" + +msgid "GEOM_REMOVE_WEBS" +msgstr "Remove webs" + +msgid "GEOM_SET_MATERIALS" +msgstr "Set materials" + +#: OperationGUI_MaterialDlg.cxx:45 +msgid "GEOM_MATERIAL_TITLE" +msgstr "Define materials for Dominant Fuse" + +msgid "GEOM_MATERIAL_SHAPE" +msgstr "Shapes" + +msgid "GEOM_MATERIAL_MATERIAL" +msgstr "Material" + +msgid "GEOM_MATERIAL_ID" +msgstr "Material ID:" + +msgid "GEOM_MATERIAL_SET" +msgstr "<< Set" + +#: GeometryGUI_PipeDlg.cxx:47 +msgid "GEOM_PIPE_TITLE" +msgstr "Pipe Construction" + +#: GeometryGUI_PointDlg.cxx:52 +msgid "GEOM_POINT_TITLE" +msgstr "Point Construction" + +#: GeometryGUI_PlaneDlg.cxx:60 +msgid "GEOM_PLANE_TITLE" +msgstr "Plane Construction" + +#: GeometryGUI_PlaneDlg.cxx:172 +msgid "GEOM_PLANE_PVC" +msgstr "Point + Coordinate Vector" + +#: GeometryGUI_PlaneDlg.cxx:133 +msgid "GEOM_PLANE_PV" +msgstr "Point + Vector" + +#: GeometryGUI_PrismDlg.cxx:54 +msgid "GEOM_PRISM_TITLE" +msgstr "Prism Construction" + +#: GeometryGUI_PrismDlg.cxx:83 +msgid "GEOM_PRISM_BSV" +msgstr "Base Shape + Vector" + +#: GeometryGUI_PropertiesDlg.cxx:56 +msgid "GEOM_PROPERTIES_TITLE" +msgstr "Basic Properties Informations" + +#: GeometryGUI_PropertiesDlg.cxx:78 +msgid "GEOM_PROPERTIES_CONSTR" +msgstr "Object And Its Properties" + +#: GeometryGUI_PropertiesDlg.cxx:114 +msgid "GEOM_PROPERTIES_SURFACE" +msgstr "Surface is :" + +#: GeometryGUI_PropertiesDlg.cxx:120 +msgid "GEOM_PROPERTIES_VOLUME" +msgstr "Volume is :" + +#: GeometryGUI_RevolDlg.cxx:49 +msgid "GEOM_REVOLUTION_TITLE" +msgstr "Construction By Revolution" + +#: GeometryGUI_RotationDlg.cxx:51 +msgid "GEOM_ROTATION_TITLE" +msgstr "Rotation Of An Object" + +#: GeometryGUI_ScaleDlg.cxx:52 +msgid "GEOM_SCALE_TITLE" +msgstr "Scale An Object" + +#: GeometryGUI_PositionDlg.cxx:52 +msgid "GEOM_POSITION_TITLE" +msgstr "Modify the Location of an Object" + +#: GeometryGUI_PositionDlg.cxx:52 +msgid "GEOM_START_LCS" +msgstr "Start LCS" + +#: GeometryGUI_PositionDlg.cxx:52 +msgid "GEOM_END_LCS" +msgstr "End LCS" + +#: GeometryGUI_OffsetDlg.cxx:53 +msgid "GEOM_OFFSET_TITLE" +msgstr "Offset Surface" + +#: GeometryGUI_ScaleDlg.cxx:117 +msgid "GEOM_SCALE_FACTOR" +msgstr "Scale Factor :" + +#: GeometryGUI_SectionDlg.cxx:50 +msgid "GEOM_SECTION_TITLE" +msgstr "BOOLEAN : Section Of Two Objects" + +#: GeometryGUI_SewingDlg.cxx:48 +msgid "GEOM_SEWING_TITLE" +msgstr "Topological sewing" + +#: GeometryGUI_ShellDlg.cxx:53 +msgid "GEOM_SHELL_TITLE" +msgstr "Shell Construction" + +#: GeometryGUI_SolidDlg.cxx:74 +msgid "GEOM_SOLID_TITLE" +msgstr "Solid Construction" + +#: GeometryGUI_SphereDlg.cxx:50 +msgid "GEOM_SPHERE_TITLE" +msgstr "Sphere Construction" + +#: GeometryGUI_SphereDlg.cxx:113 +msgid "GEOM_SPHERE_CR" +msgstr "Center + Radius" + +#: GeometryGUI_SphereDlg.cxx:146 +msgid "GEOM_SPHERE_RO" +msgstr "Radius At Origin" + +#: GeometryGUI_SubShapeDlg.cxx:55 +msgid "GEOM_SUBSHAPE_TITLE" +msgstr "Sub Shapes Selection" + +#: GeometryGUI_SubShapeDlg.cxx:131 +msgid "GEOM_SUBSHAPE_TYPE" +msgstr "Sub Shapes Type :" + +#: GeometryGUI_SubShapeDlg.cxx:137 +msgid "GEOM_SUBSHAPE_SELECT" +msgstr "Select Sub Shapes" + +msgid "EntityGUI_SubShapeDlg::NO_SUBSHAPES_SELECTED" +msgstr "Please, select one or more sub-shapes" + +#: GeometryGUI_TorusDlg.cxx:51 +msgid "GEOM_TORUS_TITLE" +msgstr "Torus Construction" + +#: GeometryGUI_SuppressFacesDlg.cxx:103 +msgid "GEOM_SUPRESSFACE_TITLE" +msgstr "Suppress Faces In An Object" + +#: GeometryGUI_SuppressFacesDlg.cxx:164 +msgid "GEOM_SUPRESSFACE_SELECT" +msgstr "Select Faces To Suppress" + +#: GeometryGUI_TranslationDlg.cxx:78 +msgid "GEOM_TRANSLATION_COOR" +msgstr "Translation With Coordinates" + +msgid "GEOM_TRANSPARENCY_TITLE" +msgstr "Transparency" + +msgid "GEOM_TRANSPARENCY_OPAQUE" +msgstr "Opaque" + +msgid "GEOM_TRANSPARENCY_TRANSPARENT" +msgstr "Transparent" + +msgid "GEOM_SUPPRESSHOLE_TITLE" +msgstr "Suppress holes" + +msgid "GEOM_SUPPRESSHOLE_SELECTFACE" +msgstr "Select the face with hole" + +msgid "GEOM_SUPPRESSHOLE_SELECTWIRE" +msgstr "Select wire on face" + +msgid "GEOM_SUPPRESSHOLE_SELECTFACE_END" +msgstr "Select end face (if hole traversing)" + +msgid "GEOM_SUPPRESSHOLE_SELECTWIRE_END" +msgstr "Select end wire (if hole traversing)" + +msgid "GEOM_SUPPRESSHOLE_FACE_SHELL" +msgstr "Face or shell" + +msgid "GEOM_SUPPRESSHOLE_SELECT_HOLES_ON_FACE" +msgstr "Select hole(s) on the face" + +#: GeometryGUI_TranslationDlg.cxx:56 +msgid "GEOM_TRANSLATION_TITLE" +msgstr "Translation Of An Object" + +#: GeometryGUI_VectorDlg.cxx:54 +msgid "GEOM_VECTOR_TITLE" +msgstr "Vector Construction" + +#: GeometryGUI_WhatisDlg.cxx:63 +msgid "GEOM_WHATIS_TITLE" +msgstr "Whatis Informations" + +#: GeometryGUI_WhatisDlg.cxx:86 +msgid "GEOM_WHATIS_OBJECT" +msgstr "Object And Its Topological Informations" + +#: GeometryGUI_WireDlg.cxx:46 +msgid "GEOM_WIRE_TITLE" +msgstr "Create A Wire" + +#: GeometryGUI_WireDlg.cxx:103 +msgid "GEOM_WIRE_CONNECT" +msgstr "Wire creation from wires/edges connected" + +#: GeometryGUI_WorkingPlaneDlg.cxx:50 +msgid "GEOM_WPLANE_TITLE" +msgstr "Working Plane Selection" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_FACE" +msgstr "Plane Or Planar Face" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_VECTOR" +msgstr "Select 2 vectors" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_VX" +msgstr "Vector X" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_VZ" +msgstr "Vector Z" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_ORIGIN" +msgstr "Select a plane" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_OYZ" +msgstr "OYZ" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_OZX" +msgstr "OZX" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_OXY" +msgstr "OXY" + +#: GeometryGUI_multiTranslationDlg.cxx:107 +msgid "GEOM_MULTITRANSLATION_TITLE" +msgstr "Multi-Translation" + +#: GeometryGUI_multiTranslationDlg.cxx:107 +msgid "GEOM_MULTITRANSLATION_SIMPLE" +msgstr "Multi Translation Simple" + +#: GeometryGUI_multiTranslationDlg.cxx:107 +msgid "GEOM_MULTITRANSLATION_DOUBLE" +msgstr "Multi Translation Double" + +#: GeometryGUI_multiRotationDlg.cxx:107 +msgid "GEOM_MULTIROTATION_TITLE" +msgstr "Multi-Rotation" + +#: GeometryGUI_multiRotationDlg.cxx:107 +msgid "GEOM_MULTIROTATION_SIMPLE" +msgstr "Multi Rotation Simple" + +#: GeometryGUI_multiRotationDlg.cxx:107 +msgid "GEOM_MULTIROTATION_DOUBLE" +msgstr "Multi Rotation Double" + +msgid "GEOM_PARAM_POINT" +msgstr "Parametric point" + +msgid "GEOM_REF_POINT" +msgstr "Point with reference" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:4613 +msgid "GEOM_MEN_WIREFRAME" +msgstr "Wireframe" + +#: GeometryGUI.cxx:4613 +msgid "GEOM_MEN_SHADING" +msgstr "\nShading" + +msgid "GEOM_RECONSTRUCTION_LIMIT" +msgstr "Reconstruction Limit" + +msgid "GEOM_SUPPRESS_RESULT" +msgstr "Suppress Result" + +msgid "GEOM_SUPPRESS_RESULT_INSIDE" +msgstr "Inside" + +msgid "GEOM_SUPPRESS_RESULT_OUTSIDE" +msgstr "Outside" + +msgid "GEOM_RECONSTRUCTION_LIMIT_SHAPE" +msgstr "Shape" +msgid "GEOM_RECONSTRUCTION_LIMIT_SOLID" +msgstr "Solid" +msgid "GEOM_RECONSTRUCTION_LIMIT_SHELL" +msgstr "Shell" +msgid "GEOM_RECONSTRUCTION_LIMIT_FACE" +msgstr "Face" +msgid "GEOM_RECONSTRUCTION_LIMIT_WIRE" +msgstr "Wire" +msgid "GEOM_RECONSTRUCTION_LIMIT_EDGE" +msgstr "Edge" +msgid "GEOM_RECONSTRUCTION_LIMIT_VERTEX" +msgstr "Vertex" + +msgid "GEOM_SPLINE_TITLE" +msgstr "Spline Construction" +msgid "GEOM_SPLINE" +msgstr "Spline" +msgid "GEOM_BEZIER" +msgstr "Bezier" +msgid "GEOM_INTERPOL" +msgstr "Interpolation" + +# +#============================================================================== +# + +msgid "GEOM_SKETCHER_EL" +msgstr "Element Type" + +msgid "GEOM_BUT_CLOSE_SKETCH" +msgstr "Sketch Closure" + +msgid "GEOM_BUT_END_SKETCH" +msgstr "Sketch Validation" + +msgid "GEOM_SKETCHER_TITLE" +msgstr "Sketch Construction" + +msgid "GEOM_SKETCHER_POINT" +msgstr "Point" + +msgid "GEOM_SKETCHER_SEGMENT" +msgstr "Segment" + +msgid "GEOM_SKETCHER_ARC" +msgstr "Arc" + +msgid "GEOM_SKETCHER_DIR" +msgstr "Direction" + +msgid "GEOM_SKETCHER_POINT2" +msgstr "Point :" + +msgid "GEOM_SKETCHER_DEST" +msgstr "Destination" + +msgid "GEOM_SKETCHER_ABS" +msgstr "Absolute" + +msgid "GEOM_SKETCHER_REL" +msgstr "Relative" + +msgid "GEOM_SKETCHER_SEL" +msgstr "Selection" + +msgid "GEOM_SKETCHER_ANGLE" +msgstr "Angle" + +msgid "GEOM_SKETCHER_PER" +msgstr "Perpendicular" + +msgid "GEOM_SKETCHER_TAN" +msgstr "Tangent" + +msgid "GEOM_SKETCHER_VXVY" +msgstr "VX-VY" + +msgid "GEOM_SKETCHER_LENGTH" +msgstr "Length" + +msgid "GEOM_SKETCHER_X" +msgstr "X" + +msgid "GEOM_SKETCHER_Y" +msgstr "Y" + +msgid "GEOM_SKETCHER_X2" +msgstr "X :" + +msgid "GEOM_SKETCHER_Y2" +msgstr "Y :" + +msgid "GEOM_SKETCHER_X3" +msgstr "Abs. X :" + +msgid "GEOM_SKETCHER_Y3" +msgstr "Abs. Y :" + +msgid "GEOM_SKETCHER_DX2" +msgstr "DX :" + +msgid "GEOM_SKETCHER_DY2" +msgstr "DY :" + +msgid "GEOM_SKETCHER_VX2" +msgstr "VX :" + +msgid "GEOM_SKETCHER_VY2" +msgstr "VY :" + +msgid "GEOM_SKETCHER_LENGTH2" +msgstr "Length :" + +msgid "GEOM_SKETCHER_ANGLE2" +msgstr "Angle :" + +msgid "GEOM_SKETCHER_RADIUS2" +msgstr "Radius :" + +msgid "GEOM_SKETCHER_UNDO" +msgstr "Undo" + +msgid "GEOM_SKETCHER_APPLY" +msgstr "Apply" + +msgid "GEOM_SKETCHER_VALUES" +msgstr "Values" + +msgid "GEOM_SKETCHER_TYPE" +msgstr "Type" + +msgid "EntityGUI_SketcherDlg::CANNOT_CLOSE" +msgstr "It is impossible to close sketch\nNumber of sketch points too small" + +msgid "GEOM_FILLET_ABORT" +msgstr "Fillet can't be computed with radius %1" + +msgid "GEOM_CHAMFER_ABORT" +msgstr "Chamfer can't be computed with %1 and %2" + +msgid "GEOM_3_POINTS" +msgstr "3 points" + +msgid "GEOM_POINT1" +msgstr "Point 1" + +msgid "GEOM_POINT2" +msgstr "Point 2" + +msgid "GEOM_POINT3" +msgstr "Point 3" + +msgid "GEOM_CREATE_COPY" +msgstr "Create a copy" + +msgid "GEOM_CREATE_SINGLE_SOLID" +msgstr "Create a single solid" + +msgid "GEOM_ERROR" +msgstr "Error" + +msgid "GEOM_ERROR_STATUS" +msgstr "Operation status" + +msgid "GEOM_ELLIPSE_ERROR_1" +msgstr "Error creating ellipse. Reason: minor radius is greater than major radius." + +msgid "GEOM_CURVE" +msgstr "Curve" + +msgid "GEOM_POLYLINE" +msgstr "Polyline" + +msgid "GEOM_NODES" +msgstr "Nodes" + +msgid "GEOM_CURVE_TITLE" +msgstr "Curve Construction" + +# ShapeProcessDlg.cxx +msgid "GEOM_SHAPEPROCESS_TITLE" +msgstr "Shape Processing" + +msgid "GEOM_SHAPES" +msgstr "Shapes" + +msgid "GEOM_SELECTED_OBJECTS" +msgstr "Selected objects" + +msgid "GEOM_OPERATIONS" +msgstr "Operations" + +msgid "GEOM_PARAMETERS" +msgstr "Parameters" + +msgid "GEOM_FixShape" +msgstr "FixShape" + +msgid "GEOM_FixFaceSize" +msgstr "FixFaceSize" + +msgid "GEOM_DropSmallEdges" +msgstr "DropSmallEdges" + +msgid "GEOM_SplitAngle" +msgstr "SplitAngle" + +msgid "GEOM_SplitClosedFaces" +msgstr "SplitClosedFaces" + +msgid "GEOM_SplitContinuity" +msgstr "SplitContinuity" + +msgid "GEOM_BSplineRestriction" +msgstr "BSplineRestriction" + +msgid "GEOM_ToBezier" +msgstr "ToBezier" + +msgid "GEOM_SameParameter" +msgstr "SameParameter" + +msgid "GEOM_3D_TOLERANCE" +msgstr "3D tolerance" + +msgid "GEOM_MAX_3D_TOLERANCE" +msgstr "Max 3D tolerance" + +msgid "GEOM_MAX_TOLERANCE" +msgstr "Max tolerance" + +msgid "GEOM_ANGLE_1" +msgstr "Angle" + +msgid "GEOM_NUM_SPLIT_POINTS" +msgstr "Number of splitting points" + +msgid "GEOM_SURFACE_CONTINUTY" +msgstr "Surface continuty" + +msgid "GEOM_CURVE_CONTINUTY" +msgstr "Curve continuty" + +msgid "GEOM_SURFACE_MODE" +msgstr "Surface mode" + +msgid "GEOM_3D_CURVE_MODE" +msgstr "3D curve mode" + +msgid "GEOM_2D_CURVE_MODE" +msgstr "2D curve mode" + +msgid "GEOM_2D_TOLERANCE" +msgstr "2D tolerance" + +msgid "GEOM_REQUIRED_DEGREE" +msgstr "Required degree" + +msgid "GEOM_REQUIRED_NUM_SEGMENTS" +msgstr "Required number of segments" + +msgid "GEOM_3D_CONTINUTY" +msgstr "3D continuty" + +msgid "GEOM_2D_CONTINUTY" +msgstr "2D continuty" + +msgid "GEOM_CLOSECONTOUR_TITLE" +msgstr "Close contour" + +msgid "GEOM_ERR_LIB_NOT_FOUND" +msgstr "GUI library corresponding to the user action can not be found or loaded" + +msgid "OperationGUI_ChamferDlg::FACE_1" +msgstr "Face 1" + +msgid "OperationGUI_ChamferDlg::FACE_2" +msgstr "Face 2" + +msgid "OperationGUI_ChamferDlg::SELECTED_FACES" +msgstr "Selected faces" + +msgid "OperationGUI_ChamferDlg::D" +msgstr "D" + +msgid "OperationGUI_FilletDlg::SELECTED_EDGES" +msgstr "Selected edges" + +msgid "OperationGUI_FilletDlg::SELECTED_FACES" +msgstr "Selected faces" + +msgid "GEOM_REMOVE_INTERNAL_WIRES_TITLE" +msgstr "Suppress internal wires" + +msgid "GEOM_INTERNAL_WIRES" +msgstr "Internal wires" + +msgid "GEOM_SELECTED_FACE" +msgstr "Selected face" + +msgid "GEOM_REMOVE_ALL_INT_WIRES" +msgstr "Remove all internal wires" + +msgid "GEOM_REMOVE_HOLES_TITLE" +msgstr "Suppress holes" + +msgid "GEOM_SELECTED_SHAPE" +msgstr "Selected shape" + +msgid "GEOM_REMOVE_ALL_HOLES" +msgstr "Remove all holes" + +msgid "GEOM_HOLES" +msgstr "Holes" + +msgid "GEOM_WIRES_TO_REMOVE" +msgstr "Wires to remove" + +msgid "GEOM_DETECT" +msgstr "Detect" + +msgid "GEOM_FREE_BOUNDARIES" +msgstr "Free boundaries" + +msgid "GEOM_BY_PARAMETER" +msgstr "By parameter" + +msgid "GEOM_BY_LENGTH" +msgstr "By length" + +msgid "GEOM_DIVIDE_EDGE_TITLE" +msgstr "Addition of point" + +msgid "GEOM_ADD_POINT" +msgstr "Add point" + +msgid "GEOM_VALUE" +msgstr "Value" + +msgid "GEOM_MARKER_TITLE" +msgstr "Create marker" + +msgid "GEOM_MARKER" +msgstr "Marker" + +msgid "GEOM_TRIHEDRON" +msgstr "Trihedron" + +msgid "GEOM_FREE_BOUNDS_MSG" +msgstr "Number of free boundaries detected: %1 (%2 closed, %3 open)" + +msgid "GEOM_FREE_BOUNDS_ERROR" +msgstr "Object is not selected" + +msgid "GEOM_FREE_BOUNDS_TLT" +msgstr "Free boundary detection" + +msgid "RepairGUI_FreeBoundDlg::CAPTION" +msgstr "Check free boundaries" + +msgid "RepairGUI_FreeBoundDlg::FREE_BOUND" +msgstr "Free boundaries" + +msgid "RepairGUI_FreeBoundDlg::NUMBER_CLOSED" +msgstr "Number of closed free boundaries: " + +msgid "RepairGUI_FreeBoundDlg::NUMBER_OPEN" +msgstr "Number of open free boundaries: " + +msgid "RepairGUI_ShapeProcessDlg::ERROR_NO_OPERATORS" +msgstr "Please, select at least one Shape Process operation to proceed." + +msgid "RepairGUI_ShapeProcessDlg::ERROR_NO_OBJECTS" +msgstr "Please, select a geometrical object for Shape Processing." + +msgid "MeasureGUI_PointDlg::POINT" +msgstr "Point" + +msgid "MeasureGUI_PointDlg::X" +msgstr "X" + +msgid "MeasureGUI_PointDlg::Y" +msgstr "Y" + +msgid "MeasureGUI_PointDlg::Z" +msgstr "Z" + +msgid "MeasureGUI_PointDlg::CAPTION" +msgstr "Point Coordinates" + +msgid "MeasureGUI_PointDlg::COORDINATES" +msgstr "Point and its coordinates" + +msgid "GroupGUI_GroupDlg::CREATE_GROUP_TITLE" +msgstr "Create Group" + +msgid "GroupGUI_GroupDlg::EDIT_GROUP_TITLE" +msgstr "Edit Group" + +msgid "GroupGUI_GroupDlg::SHAPE_TYPE" +msgstr "Shape Type" + +msgid "GroupGUI_GroupDlg::GROUP_NAME" +msgstr "Group Name" + +msgid "GroupGUI_GroupDlg::MAIN_SUB_SHAPES" +msgstr "Main Shape And Sub-Shapes" + +msgid "GroupGUI_GroupDlg::MAIN_SHAPE" +msgstr "Main Shape" + +msgid "GroupGUI_GroupDlg::SELECT_SUB_SHAPES" +msgstr "Select Sub-Shapes" + +msgid "GroupGUI_GroupDlg::SELECT_ALL" +msgstr "Select All" + +msgid "GroupGUI_GroupDlg::ADD" +msgstr "Add" + +msgid "GroupGUI_GroupDlg::REMOVE" +msgstr "Remove" + +msgid "GroupGUI_GroupDlg::GROUP_PREFIX" +msgstr "Group" + +msgid "GroupGUI_GroupDlg::EMPTY_NAME" +msgstr "Please, specify a non-empty group name" + +msgid "GroupGUI_GroupDlg::NO_MAIN_OBJ" +msgstr "Please, select a main shape" + +msgid "GroupGUI_GroupDlg::NO_GROUP" +msgstr "Please, select a group to edit" + +msgid "GroupGUI_GroupDlg::EMPTY_LIST" +msgstr "Please, select one or more sub-shapes to put into the group" + +msgid "GroupGUI::NO_GROUP" +msgstr "Please, select a group to edit" + +msgid "_S_" +msgstr "(s)" + +### BlocksGUI ### + +msgid "WRN_NOT_IMPLEMENTED" +msgstr "Sorry, this functionality is not yet implemented" + +### BlocksGUI_TrsfDlg ### + +msgid "BlocksGUI_TrsfDlg::FACE_1" +msgstr "Face 1" + +msgid "BlocksGUI_TrsfDlg::FACE_2" +msgstr "Face 2" + +msgid "BlocksGUI_TrsfDlg::FACE_1U" +msgstr "Face 1 U" + +msgid "BlocksGUI_TrsfDlg::FACE_2U" +msgstr "Face 2 U" + +msgid "BlocksGUI_TrsfDlg::FACE_1V" +msgstr "Face 1 V" + +msgid "BlocksGUI_TrsfDlg::FACE_2V" +msgstr "Face 2 V" + +msgid "GEOM_BLOCK_MULTITRSF_TITLE" +msgstr "Block Multi-Transformation" + +msgid "GEOM_BLOCK_MULTITRSF" +msgstr "Block Multi-Transformation" + +msgid "GEOM_BLOCK_MULTITRSF_SIMPLE" +msgstr "Multi-Transformation Simple" + +msgid "GEOM_BLOCK_MULTITRSF_DOUBLE" +msgstr "Multi-Transformation Double" + +### BlocksGUI_QuadFaceDlg ### + +msgid "BlocksGUI_QuadFaceDlg::VERTEX_1" +msgstr "Vertex 1" + +msgid "BlocksGUI_QuadFaceDlg::VERTEX_2" +msgstr "Vertex 2" + +msgid "BlocksGUI_QuadFaceDlg::VERTEX_3" +msgstr "Vertex 3" + +msgid "BlocksGUI_QuadFaceDlg::VERTEX_4" +msgstr "Vertex 4" + +msgid "BlocksGUI_QuadFaceDlg::EDGE_1" +msgstr "Edge 1" + +msgid "BlocksGUI_QuadFaceDlg::EDGE_2" +msgstr "Edge 2" + +msgid "BlocksGUI_QuadFaceDlg::EDGE_3" +msgstr "Edge 3" + +msgid "BlocksGUI_QuadFaceDlg::EDGE_4" +msgstr "Edge 4" + +msgid "GEOM_QUAD_FACE_TITLE" +msgstr "Quadrangle Face Construction" + +msgid "GEOM_QUAD_FACE" +msgstr "Quadrangle Face" + +### BlocksGUI_BlockDlg ### + +msgid "BlocksGUI_BlockDlg::FACE_1" +msgstr "Face 1" + +msgid "BlocksGUI_BlockDlg::FACE_2" +msgstr "Face 2" + +msgid "BlocksGUI_BlockDlg::FACE_3" +msgstr "Face 3" + +msgid "BlocksGUI_BlockDlg::FACE_4" +msgstr "Face 4" + +msgid "BlocksGUI_BlockDlg::FACE_5" +msgstr "Face 5" + +msgid "BlocksGUI_BlockDlg::FACE_6" +msgstr "Face 6" + +msgid "GEOM_BLOCK_TITLE" +msgstr "Hexahedral Solid Construction" + +msgid "GEOM_BLOCK" +msgstr "Hexahedral Solid" + +#============================================================================== + +msgid "BasicGUI_MarkerDlg::CAPTION" +msgstr "Local CS Construction" + +msgid "BasicGUI_MarkerDlg::LOCALCS" +msgstr "Local coordinate system" + +msgid "BasicGUI_MarkerDlg::ORIGIN" +msgstr "Coordinates of origin" + +msgid "BasicGUI_MarkerDlg::XDIR" +msgstr "X axis direction" + +msgid "BasicGUI_MarkerDlg::YDIR" +msgstr "Y axis direction" + +msgid "BasicGUI_MarkerDlg::DX" +msgstr "Dx" + +msgid "BasicGUI_MarkerDlg::DY" +msgstr "Dy" + +msgid "BasicGUI_MarkerDlg::DZ" +msgstr "Dz" + +msgid "BasicGUI_MarkerDlg::LCS_NAME" +msgstr "LocalCS" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +======= + +### BlocksGUI_ExplodeDlg ### + +msgid "BlocksGUI_ExplodeDlg::NB_FACES_MIN" +msgstr "Min. nb. faces" + +msgid "BlocksGUI_ExplodeDlg::NB_FACES_MAX" +msgstr "Max. nb. faces" + +msgid "GEOM_BLOCK_EXPLODE_TITLE" +msgstr "Sub Blocks Selection" + +msgid "GEOM_BLOCK_EXPLODE" +msgstr "Sub Blocks" + +msgid "GEOM_NB_BLOCKS_NO_OTHERS" +msgstr "There are %1 specified blocks and NO other solids" + +msgid "GEOM_NB_BLOCKS_SOME_OTHERS" +msgstr "There are %1 specified blocks and some other solids" + +msgid "ShHealOper_NotError_msg" +msgstr "Shape Healing algorithm has done no modification of the original shape" + +msgid "ShHealOper_InvalidParameters_msg" +msgstr "Incorrect parameters for Shape Healing algorithm" + +msgid "ShHealOper_ErrorExecution_msg" +msgstr "Shape Healing algorithm failed" + +msgid "GEOM_GLUE_TITLE" +msgstr "Glue faces" + +msgid "GEOM_GLUE" +msgstr "Glue" + +### New object names for RepairGUI ### +msgid "SEWING_NEW_OBJ_NAME" +msgstr "Sewing" + +msgid "DEVIDE_EDGE_NEW_OBJECT_NAME" +msgstr "NewObject" + +msgid "CLOSE_CONTOUR_NEW_OBJ_NAME" +msgstr "CloseContour" + +msgid "REMOVE_HOLES_NEW_OBJ_NAME" +msgstr "SupressHoles" + +msgid "GLUE_NEW_OBJ_NAME" +msgstr "Glue" + +msgid "REMOVE_INT_WIRES_NEW_OBJ_NAME" +msgstr "RemoveIntWires" + +msgid "PROCESS_SHAPE_NEW_OBJ_NAME" +msgstr "ProcessShape" + +msgid "SUPRESS_FACE_NEW_OBJ_NAME" +msgstr "SupressFaces" +### diff --git a/src/GEOMGUI/GEOM_msg_fr.po b/src/GEOMGUI/GEOM_msg_fr.po new file mode 100644 index 000000000..e56d06af5 --- /dev/null +++ b/src/GEOMGUI/GEOM_msg_fr.po @@ -0,0 +1,1350 @@ +# This is a Qt message file in .po format. Each msgid starts with +# a scope. This scope should *NOT* be translated - eg. translating +# from French to English, "Foo::Bar" would be translated to "Pub", +# not "Foo::Pub". +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2002-03-19 09:35:48 AM CET\n" +"PO-Revision-Date: YYYY-MM-DD\n" +"Last-Translator: FULLNAME \n" +"Content-Type: text/plain; charset=iso-8859-1\n" + +# +#============================================================================== +# + +#Button Apply +msgid "GEOM_BUT_APPLY" +msgstr "&Appliquer" + +#Button Close +msgid "GEOM_BUT_CLOSE" +msgstr "&Fermer" + +#Button Cancel +msgid "GEOM_BUT_CANCEL" +msgstr "&Annuler" + +#Button Ok +msgid "GEOM_BUT_OK" +msgstr "&Ok" + +#Button Yes +msgid "GEOM_BUT_YES" +msgstr "&Oui" + +#Button No +msgid "GEOM_BUT_NO" +msgstr "&Non" + +#Button Help +msgid "GEOM_BUT_HELP" +msgstr "&Aide" + + +#Button Explode +msgid "GEOM_BUT_EXPLODE" +msgstr "&Exploser" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:563 +msgid "GEOM_INF_LOADED" +msgstr "Le fichier %1 est chargé." + +# +#============================================================================== +# + +#: GeometryGUI.cxx:3069 +msgid "GEOM_PRP_COMMAND" +msgstr "Pas de commande associée à l'id = %1." + +#: GeometryGUI.cxx:4977 +msgid "GEOM_PRP_ABORT" +msgstr "L'opération a echoué" + +#: GeometryGUI.cxx:5058 +msgid "GEOM_PRP_DONE" +msgstr "Opération effectuée" + +#: GeometryGUI.cxx:3717 +msgid "GEOM_PRP_LOADING" +msgstr "Chargement de %1 ..." + +#: GeometryGUI.cxx:1412 +msgid "GEOM_PRP_NULLSHAPE" +msgstr "Erreur, objet inconsistant ou inapproprié !" + +#: GeometryGUI.cxx:5072 +msgid "GEOM_PRP_READY" +msgstr "Prêt..." + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_SUBSHAPES" +msgstr "Selection de sous objets" + +msgid "GEOM_CONFIRM" +msgstr "Confirmer cette operation" + +msgid "GEOM_CONFIRM_INFO" +msgstr "L'objet contient %1 sous objets" + + +msgid "GEOM_PRP_NOT_FOR_VTK_VIEWER" +msgstr "Non permis dans viewer VTK" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SHAPE_IN_STUDY" +msgstr "La shape principale doit etre avant dans l'etude" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_EDGE" +msgstr "Selectionner les edges et clicker sur Apply" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_FACE" +msgstr "Select les faces a supprimer et clicker sur Ok/Apply" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_SELECT_FIRST" +msgstr "Selectionner la shape principale en premier" + +#: GeometryGUI.cxx:1690 +msgid "GEOM_PRP_MIN_DIST" +msgstr "Min Distance non calculer" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:3698 +msgid "GEOM_MEN_ALL_FILES" +msgstr "Tous fichiers ( * )" + +#: GeometryGUI.cxx:4389 +msgid "GEOM_MEN_ANGLE" +msgstr "Angle :" + +#: GeometryGUI.cxx:3941 +msgid "GEOM_MEN_COMPONENT" +msgstr "Géometrie" + +#: GeometryGUI.cxx:4389 +msgid "GEOM_MEN_ENTER_ANGLE" +msgstr "Saisir un angle en degrés" + +#: GeometryGUI.cxx:3758 +msgid "GEOM_MEN_EXPORT" +msgstr "Exporter" + +#: GeometryGUI.cxx:3648 +msgid "GEOM_MEN_IMPORT" +msgstr "Importer" + +#: GeometryGUI.cxx:3763 +msgid "GEOM_MEN_LOAD_SCRIPT" +msgstr "Fichiers PYTHON ( *.py )" + +#: GeometryGUI.cxx:2931 +msgid "GEOM_MEN_ISOS" +msgstr "Choisir un nombre d'isos" + +#: GeometryGUI.cxx:4278 +msgid "GEOM_MEN_POPUP_NAME" +msgstr "%1 Objets" + +#: GeometryGUI.cxx:4414 +msgid "GEOM_MEN_SKETCHER_X" +msgstr "Saisir une longueur pour fixer X" + +#: GeometryGUI.cxx:4438 +msgid "GEOM_MEN_SKETCHER_Y" +msgstr "Saisir une longueur pour fixer Y" + +#: GeometryGUI.cxx:2898 +msgid "GEOM_MEN_TRANSPARENCY" +msgstr "Transparence" + +#: GeometryGUI.cxx:4413 +msgid "GEOM_MEN_X" +msgstr "X :" + +#: GeometryGUI.cxx:4437 +msgid "GEOM_MEN_Y" +msgstr "Y :" + +#: GeometryGUI_NbIsosDlg.cxx:36 +msgid "GEOM_MEN_ISOU" +msgstr "Isos u :" + +#: GeometryGUI_NbIsosDlg.cxx:53 +msgid "GEOM_MEN_ISOV" +msgstr "Isos v :" + +#: GeometryGUI_TransparencyDlg.cxx:31 +msgid "GEOM_MEN_TRANSPARENCY_LABEL" +msgstr "Transparence :" + +msgid "GEOM_MEN_STEP_LABEL" +msgstr "Increment" + +msgid "GEOM_IDENTICAL_NAMES_SELECT_BY_MOUSE" +msgstr "Noms identiques : selectionner avec la souris !" + +msgid "GEOM_NAME_INCORRECT" +msgstr "Le nom saisi n'existe pas" + + + +# +#============================================================================== +# + +#: GeometryGUI.cxx:892 +msgid "GEOM_WRN_RADIUS_NULL" +msgstr "Le rayon est nul" + +#: GeometryGUI.cxx:3854 +msgid "GEOM_WRN_WARNING" +msgstr "Avertissement" + +#: GeometryGUI.cxx:3854 +msgid "GEOM_REALLY_DELETE" +msgstr "Voulez-vous supprimer l'object(s) ?" + +# +#============================================================================== +# + +#Object +msgid "GEOM_OBJECT" +msgstr "Objet" + +#Main object +msgid "GEOM_MAIN_OBJECT" +msgstr "Objet Principal" + +#Tool object +msgid "GEOM_TOOL_OBJECT" +msgstr "Objet Outil" + +#Base Object +msgid "GEOM_BASE_OBJECT" +msgstr "Objet De Base" + +#Path Object +msgid "GEOM_PATH_OBJECT" +msgstr "Objet Chemin" + +#Objects +msgid "GEOM_OBJECTS" +msgstr "Objets" + +#Object i +msgid "GEOM_OBJECT_I" +msgstr "Objet %1" + +#Object and result +msgid "GEOM_OBJECT_RESULT" +msgstr "Objet Et Résultat" + +#Point +msgid "GEOM_POINT" +msgstr "Point" + +#Base point +msgid "GEOM_BASE_POINT" +msgstr "Point De Base" + +#Center Point +msgid "GEOM_CENTER_POINT" +msgstr "Point Centre" + +#Diagonal Points +msgid "GEOM_DIAGONAL_POINTS" +msgstr "Points Diagonaux" + +#Central Point +msgid "GEOM_CENTRAL_POINT" +msgstr "Point Central" + +#Points +msgid "GEOM_POINTS" +msgstr "Points" + +#Point i +msgid "GEOM_POINT_I" +msgstr "Point %1" + +#Arguments +msgid "GEOM_ARGUMENTS" +msgstr "Arguments" + +#Center +msgid "GEOM_CENTER" +msgstr "Centre" + +#Radius +msgid "GEOM_RADIUS" +msgstr "Rayon" + +#Radius i +msgid "GEOM_RADIUS_I" +msgstr "Rayon %1" + +#Height +msgid "GEOM_HEIGHT" +msgstr "Hauteur" + +#Length +msgid "GEOM_LENGTH" +msgstr "Longueur :" + +#Weight +msgid "GEOM_WEIGHT" +msgstr "poids" + +#Coordinates +msgid "GEOM_COORDINATES" +msgstr "Coordonnées" + +#Coor. +msgid "GEOM_COOR" +msgstr "Coord. :" + +#Reverse +msgid "GEOM_REVERSE" +msgstr "Renverser" + +#Reverse U +msgid "GEOM_REVERSE_U" +msgstr "Renverser U" + +#Reverse V +msgid "GEOM_REVERSE_V" +msgstr "Reverser V" + +#Angle +msgid "GEOM_ANGLE" +msgstr "Angle :" + +#Axis +msgid "GEOM_AXIS" +msgstr "Axe" + +#Matrix +msgid "GEOM_MATRIX" +msgstr "Matrice :" + +#Vector Length +msgid "GEOM_VECTOR_LENGTH" +msgstr "Longueur Du Vecteur :" + +#Reverse Vector +msgid "GEOM_REVERSE_VECTOR" +msgstr "Renverser Le Vecteur" + +#Point Mirror +msgid "GEOM_POINT_MIRROR" +msgstr "Point Miroir" + +#Axe Mirror +msgid "GEOM_AXE_MIRROR" +msgstr "Axe Miroir" + +#Plane Mirror +msgid "GEOM_PLANE_MIRROR" +msgstr "Plan Miroir" + +#Face Selection +msgid "GEOM_FACE_SELECTION" +msgstr "Selection de Face" + +#Base +msgid "GEOM_BASE" +msgstr "Base" + +#Water Density +msgid "GEOM_WATER_DENSITY" +msgstr "Densité de l'eau :" + +#Meshing Deflection +msgid "GEOM_MESHING_DEFLECTION" +msgstr "Déflection Du Maillage :" + +#Dimensions +msgid "GEOM_DIMENSIONS" +msgstr "Dimensions" + +#Precision +msgid "GEOM_PRECISION" +msgstr "Précision :" + +#Selection +msgid "GEOM_SELECTION" +msgstr "Sélection" + +#Nb. Times +msgid "GEOM_NB_TIMES" +msgstr "Nb. Fois :" + +#Nb. Times U +msgid "GEOM_NB_TIMES_U" +msgstr "Nb. Fois U :" + +#Nb. Times V +msgid "GEOM_NB_TIMES_V" +msgstr "Nb. Fois V :" + +#Step +msgid "GEOM_STEP" +msgstr "Pas :" + +#Step V +msgid "GEOM_STEP_V" +msgstr "Pas V :" + +#Step U +msgid "GEOM_STEP_U" +msgstr "Pas U :" + +# +#============================================================================== +# + +#Partition +msgid "GEOM_PARTITION" +msgstr "Partition" + +#Half-space partition +msgid "GEOM_PARTITION_HALFSPACE" +msgstr "Half-space partition" + +#Tolerance +msgid "GEOM_TOLERANCE" +msgstr "Tolérance" + +#Orientation +msgid "GEOM_ORIENTATION" +msgstr "Orientation" + +#Pipe +msgid "GEOM_PIPE" +msgstr "Pipe" + +#Revolution +msgid "GEOM_REVOLUTION" +msgstr "Révolution" + +#Rotation +msgid "GEOM_ROTATION" +msgstr "Rotation" + +#Archimede +msgid "GEOM_ARCHIMEDE" +msgstr "Archimède" + +#Common +msgid "GEOM_COMMON" +msgstr "Joindre" + +#Cut +msgid "GEOM_CUT" +msgstr "Couper" + +#Distance +msgid "GEOM_DISTANCE" +msgstr "Distance" + +#Filling +msgid "GEOM_FILLING" +msgstr "Surface Par Courbes" + +#Fuse +msgid "GEOM_FUSE" +msgstr "Fusionner" + +#Scale +msgid "GEOM_SCALE" +msgstr "Echelle" + +#Section +msgid "GEOM_SECTION" +msgstr "Section" + +#Sewing +msgid "GEOM_SEWING" +msgstr "Coudre" + +#Translation +msgid "GEOM_TRANSLATION" +msgstr "Translation" + +#Working Plane +msgid "GEOM_WPLANE" +msgstr "Plan de Travail" + +#Mirror +msgid "GEOM_MIRROR" +msgstr "Miroir" + +#Prism +msgid "GEOM_PRISM" +msgstr "Extrusion" + +#Sub Shapes +msgid "GEOM_SUB_SHAPE" +msgstr "Sous Shapes" + +#Supress Face +msgid "GEOM_SUPRESSFACE" +msgstr "Supression de Face" + +#Fillet +msgid "GEOM_FILLET" +msgstr "Conge" + +#Chamfer +msgid "GEOM_CHAMFER" +msgstr "Chanfrein" + +#Check Shape +msgid "GEOM_CHECK_SHAPE" +msgstr "Check Shape" + +#Whatis +msgid "GEOM_WHATIS" +msgstr "Whatis" + +#Bounding Box +msgid "GEOM_BNDBOX" +msgstr "Boite Anglobante" + +#Center Of Mass +msgid "GEOM_CMASS" +msgstr "Centre de Masse" + +#Basic Properties +msgid "GEOM_PROPERTIES" +msgstr "Basiques Proprietes" + +#Multi-Translation +msgid "GEOM_MULTITRANSLATION" +msgstr "Multi-Translation" + +#Multi-Rotation +msgid "GEOM_MULTIROTATION" +msgstr "Multi-Rotation" + +# +#============================================================================== +# + +#Arc +msgid "GEOM_ARC" +msgstr "Arc" + +#Box +msgid "GEOM_BOX" +msgstr "Boite" + +#Circle +msgid "GEOM_CIRCLE" +msgstr "Cercle" + +#Ellipse +msgid "GEOM_ELLIPSE" +msgstr "Ellipse" + +msgid "GEOM_ELLIPSE_TITLE" +msgstr "Construction d'Ellipses" + +#Radius major +msgid "GEOM_RADIUS_MAJOR" +msgstr "Rayon max. :" + +#Radius minor +msgid "GEOM_RADIUS_MINOR" +msgstr "Rayon min. :" + +#Compound +msgid "GEOM_COMPOUND" +msgstr "Compound" + +#CompSolid +msgid "GEOM_COMPOUNDSOLID" +msgstr "CompSolid" + +#Cone +msgid "GEOM_CONE" +msgstr "Cone" + +#Cylinder +msgid "GEOM_CYLINDER" +msgstr "Cylindre" + +#Edge +msgid "GEOM_EDGE" +msgstr "Edge" + +#Face +msgid "GEOM_FACE" +msgstr "Face" + +#Faces +msgid "GEOM_FACES" +msgstr "Faces" + +#Line +msgid "GEOM_LINE" +msgstr "Ligne" + +#Plane +msgid "GEOM_PLANE" +msgstr "Plan" + +#Shape +msgid "GEOM_SHAPE" +msgstr "Shape" + +#Shell +msgid "GEOM_SHELL" +msgstr "Shell" + +#Shells +msgid "GEOM_SHELLS" +msgstr "Shells" + +#Solid +msgid "GEOM_SOLID" +msgstr "Solide" + +#Sphere +msgid "GEOM_SPHERE" +msgstr "Sphère" + +#Conical Face +msgid "GEOM_SURFCONE" +msgstr "Face Conique" + +#Cylindrical Face +msgid "GEOM_SURFCYLINDER" +msgstr "Face Cylindrique" + +#Spherical Face +msgid "GEOM_SURFSPHERE" +msgstr "Face Sphèrique" + +#Toroidal Face +msgid "GEOM_SURFTORUS" +msgstr "Face Toroique" + +#Torus +msgid "GEOM_TORUS" +msgstr "Tore" + +#Vector +msgid "GEOM_VECTOR" +msgstr "Vecteur" + +#Vector U +msgid "GEOM_VECTOR_U" +msgstr "Vecteur U" + +#Vector V +msgid "GEOM_VECTOR_V" +msgstr "Vecteur V" + +#Vertex +msgid "GEOM_VERTEX" +msgstr "Vertex" + +#Wire +msgid "GEOM_WIRE" +msgstr "Wire" + +#Wire(s) +msgid "GEOM_WIRES" +msgstr "Wire(s)" + +#Parameter +msgid "GEOM_PARAMETER" +msgstr "Paramètre :" + + +# +#============================================================================== +# + +#Min +msgid "GEOM_MIN" +msgstr "Min :" + +#Max +msgid "GEOM_MAX" +msgstr "Max :" + +#X +msgid "GEOM_X" +msgstr "X :" + +#Y +msgid "GEOM_Y" +msgstr "Y :" + +#Z +msgid "GEOM_Z" +msgstr "Z :" + +#DX +msgid "GEOM_DX" +msgstr "Dx :" + +#DY +msgid "GEOM_DY" +msgstr "Dy :" + +#DZ +msgid "GEOM_DZ" +msgstr "Dz :" + +#D1 +msgid "GEOM_D1" +msgstr "D1 :" + +#D2 +msgid "GEOM_D2" +msgstr "D2 :" + +# +#============================================================================== +# + +#: GeometryGUI.cxx +msgid "GEOM_STEP_TITLE" +msgstr "Increment par défaut lors des constructions" + +#: GeometryGUI_ArcDlg.cxx:45 +msgid "GEOM_ARC_TITLE" +msgstr "Construction d'un Arc" + +#: GeometryGUI_ArchimedeDlg.cxx:55 +msgid "GEOM_ARCHIMEDE_TITLE" +msgstr "Construction d'Archimède" + +#: GeometryGUI_BndBoxDlg.cxx:59 +msgid "GEOM_BNDBOX_TITLE" +msgstr "Boite Englobante" + +#: GeometryGUI_BndBoxDlg.cxx:82 +msgid "GEOM_BNDBOX_OBJDIM" +msgstr "Objet and ses dimensions" + +#: GeometryGUI_BoxDlg.cxx:50 +msgid "GEOM_BOX_TITLE" +msgstr "Construction d'une Boite" + +#: GeometryGUI_BoxDlg.cxx:50 +msgid "GEOM_BOX_OBJ" +msgstr "Dimensions A l'Origine" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_TITLE" +msgstr "Construction d'un Chanfrein" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_ALL" +msgstr "Chanfrein sur toute la Shape" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_EDGES" +msgstr "Chanfrein sur Edges de la Shape" + +#: GeometryGUI_ChamferDlg.cxx:58 +msgid "GEOM_CHAMFER_FACES" +msgstr "Chanfrein sur Faces de la Shape" + +#: GeometryGUI_CircleDlg.cxx:48 +msgid "GEOM_CIRCLE_TITLE" +msgstr "Construction d'un Cercle" + +#: GeometryGUI_CenterMassDlg.cxx:77 +msgid "GEOM_CMASS_TITLE" +msgstr "Centre De Gravité" + +msgid "GEOM_PLANE_SIZE" +msgstr "Taille du plan :" + +#: GeometryGUI_CommonDlg.cxx:47 +msgid "GEOM_COMMON_TITLE" +msgstr "BOOLEEN : Jonction De Deux Objets" + +#: GeometryGUI_CompoundDlg.cxx:44 +msgid "GEOM_COMPOUND_TITLE" +msgstr "Création d'un Compound" + +#: GeometryGUI_ConeDlg.cxx:49 +msgid "GEOM_CONE_TITLE" +msgstr "Construction d'un Cone" + +#: GeometryGUI_CutDlg.cxx:48 +msgid "GEOM_CUT_TITLE" +msgstr "BOOLEEN : Couper Deux Objets" +# +#: GeometryGUI_CylinderDlg.cxx:47 +msgid "GEOM_CYLINDER_TITLE" +msgstr "Construction d'un Cylindre" + +#: GeometryGUI_CheckShape.cxx:60 +msgid "GEOM_CHECK_TITLE" +msgstr "Check Shape" + +#: GeometryGUI_CheckShape.cxx:83 +msgid "GEOM_CHECK_INFOS" +msgstr "Objet et ses Informations Topologiques" + +#: GeometryGUI_DistanceDlg.cxx:57 +msgid "GEOM_MINDIST_TITLE" +msgstr "Distance Minimale entre Deux Objets" + +#: GeometryGUI_DistanceDlg.cxx:57 +msgid "GEOM_MINDIST_OBJ" +msgstr "Objets Et Resultats" + +#: GeometryGUI_EdgeDlg.cxx:47 +msgid "GEOM_EDGE_TITLE" +msgstr "Création d'un Edge" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_TITLE" +msgstr "Construction d'un Congé" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_ALL" +msgstr "Congé sur toute la Shape" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_EDGES" +msgstr "Congé sur Edges de la Shape" + +#: GeometryGUI_FilletDlg.cxx:58 +msgid "GEOM_FILLET_FACES" +msgstr "Congé sur Faces de la Shape" + +#: GeometryGUI_FaceDlg.cxx:49 +msgid "GEOM_FACE_TITLE" +msgstr "Création d'une Face" + +#: GeometryGUI_FaceDlg.cxx:78 +msgid "GEOM_FACE_FFW" +msgstr "Face a partir d'un wire" + +#: GeometryGUI_FaceDlg.cxx:103 +msgid "GEOM_FACE_OPT" +msgstr "Création d'une Face plane" + +#: GeometryGUI_FillingDlg.cxx:53 +msgid "GEOM_FILLING_TITLE" +msgstr "Surface Par Courbes" + +#: GeometryGUI_FillingDlg.cxx:112 +msgid "GEOM_FILLING_ARG" +msgstr "Argument Et Parametres" + +#: GeometryGUI_FillingDlg.cxx:128 +msgid "GEOM_FILLING_MIN_DEG" +msgstr "Min. Deg" + +#: GeometryGUI_FillingDlg.cxx:142 +msgid "GEOM_FILLING_MAX_DEG" +msgstr "Max. Deg" + +#: GeometryGUI_FillingDlg.cxx:150 +msgid "GEOM_FILLING_TOL_2D" +msgstr "Tol. 2D" + +#: GeometryGUI_FillingDlg.cxx:170 +msgid "GEOM_FILLING_COMPOUND" +msgstr "Compound de Courbes" + +#: GeometryGUI_FillingDlg.cxx:184 +msgid "GEOM_FILLING_TOL_3D" +msgstr "Tol. 3D" + +#: GeometryGUI_FillingDlg.cxx:192 +msgid "GEOM_FILLING_NB_ITER" +msgstr "Nb. Iter" + +#: GeometryGUI_FuseDlg.cxx:48 +msgid "GEOM_FUSE_TITLE" +msgstr "BOOLEEN : Fusionner deux Objets" + +#: GeometryGUI_InertiaDlg.cxx:42 +msgid "GEOM_INERTIA_TITLE" +msgstr "Calculs d'Inertie" + +#: GeometryGUI_InertiaDlg.cxx:50 +msgid "GEOM_INERTIA_CONSTR" +msgstr "Matrice Et Moments d'Inertie" + +#: GeometryGUI_InertiaDlg.cxx:100 +msgid "GEOM_INERTIA_I" +msgstr "%1:1" + +#: GeometryGUI_InertiaDlg.cxx:182 +msgid "GEOM_INERTIA_IXYZ" +msgstr "IX & IY & IZ" + +#: GeometryGUI_LineDlg.cxx:50 +msgid "GEOM_LINE_TITLE" +msgstr "Construction d'une Ligne" + +#: GeometryGUI_MaxToleranceDlg.cxx:53 +msgid "GEOM_TOLERANCE_TITLE" +msgstr "Tolerance Maximale" + +#: GeometryGUI_MaxToleranceDlg.cxx:84 +msgid "GEOM_TOLERANCE_CONSTR" +msgstr "Object et ses Tolerances" + +#: GeometryGUI_MaxToleranceDlg.cxx:121 +msgid "GEOM_TOLERANCE_FACE" +msgstr "Face :" + +#: GeometryGUI_MaxToleranceDlg.cxx:138 +msgid "GEOM_TOLERANCE_EDGE" +msgstr "Edge :" + +#: GeometryGUI_MaxToleranceDlg.cxx:155 +msgid "GEOM_TOLERANCE_VERTEX" +msgstr "Vertex :" + +#: GeometryGUI_MirrorDlg.cxx:52 +msgid "GEOM_MIRROR_TITLE" +msgstr "Methode Miroir" + +#: GeometryGUI_OrientationDlg.cxx:46 +msgid "GEOM_ORIENTATION_TITLE" +msgstr "Changer l'Orientation" + +#: GeometryGUI_OrientationDlg.cxx:134 +msgid "GEOM_ORIENTATION_OPT" +msgstr "Renverser l'orientation avec une simulation de vecteur normal" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "GEOM_PARTITION_TITLE" +msgstr "Partition d'Objects Avec Outils" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "GEOM_KEEP_OBJECT" +msgstr "Objet garde" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "GEOM_PARTITION_ORIENTATION" +msgstr "Change l'orientation" + +#: GeometryGUI_PartitionDlg.cxx:45 +msgid "SUPPRESS_RESULT" +msgstr "Suppress Result" + +msgid "GEOM_REMOVE_WEBS" +msgstr "Remove webs" + +msgid "GEOM_SET_MATERIALS" +msgstr "Set materials" + +#: OperationGUI_MaterialDlg.cxx:45 +msgid "GEOM_MATERIAL_TITLE" +msgstr "Define materials for Dominant Fuse" + +msgid "GEOM_MATERIAL_SHAPE" +msgstr "Shapes" + +msgid "GEOM_MATERIAL_MATERIAL" +msgstr "Material" + +msgid "GEOM_MATERIAL_ID" +msgstr "Material ID:" + +msgid "GEOM_MATERIAL_SET" +msgstr "<< Set" + +#: GeometryGUI_PipeDlg.cxx:47 +msgid "GEOM_PIPE_TITLE" +msgstr "Construction d'une Pipe" + +#: GeometryGUI_PointDlg.cxx:52 +msgid "GEOM_POINT_TITLE" +msgstr "Construction d'un Point" + +#: GeometryGUI_PlaneDlg.cxx:60 +msgid "GEOM_PLANE_TITLE" +msgstr "Construction d'un Plan" + +#: GeometryGUI_PlaneDlg.cxx:172 +msgid "GEOM_PLANE_PVC" +msgstr "Point + Vecteur Coordonnes" + +#: GeometryGUI_PlaneDlg.cxx:133 +msgid "GEOM_PLANE_PV" +msgstr "Point + Vecteur" + +#: GeometryGUI_PrismDlg.cxx:54 +msgid "GEOM_PRISM_TITLE" +msgstr "Extruder une Shape de base" + +#: GeometryGUI_PrismDlg.cxx:83 +msgid "GEOM_PRISM_BSV" +msgstr "Shape de base + Vecteur" + +#: GeometryGUI_PropertiesDlg.cxx:56 +msgid "GEOM_PROPERTIES_TITLE" +msgstr "Proprietes Basiques" + +#: GeometryGUI_PropertiesDlg.cxx:78 +msgid "GEOM_PROPERTIES_CONSTR" +msgstr "Objet et ses Proprietes" + +#: GeometryGUI_PropertiesDlg.cxx:114 +msgid "GEOM_PROPERTIES_SURFACE" +msgstr "Surface :" + +#: GeometryGUI_PropertiesDlg.cxx:120 +msgid "GEOM_PROPERTIES_VOLUME" +msgstr "Volume :" + +#: GeometryGUI_RevolDlg.cxx:49 +msgid "GEOM_REVOLUTION_TITLE" +msgstr "Construction Par Revolution" + +#: GeometryGUI_RotationDlg.cxx:51 +msgid "GEOM_ROTATION_TITLE" +msgstr "Rotation d'un Objet" + +#: GeometryGUI_ScaleDlg.cxx:52 +msgid "GEOM_SCALE_TITLE" +msgstr "Echelle d'un Objet" + +#: GeometryGUI_ScaleDlg.cxx:117 +msgid "GEOM_SCALE_FACTOR" +msgstr "Facteur d'echelle" + +#: GeometryGUI_SectionDlg.cxx:50 +msgid "GEOM_SECTION_TITLE" +msgstr "BOOLEEN : Section De Deux Objets" + +#: GeometryGUI_SewingDlg.cxx:48 +msgid "GEOM_SEWING_TITLE" +msgstr "Coudre des Topologies" + +#: GeometryGUI_ShellDlg.cxx:53 +msgid "GEOM_SHELL_TITLE" +msgstr "Construction d'une Shell" + +#: GeometryGUI_SolidDlg.cxx:74 +msgid "GEOM_SOLID_TITLE" +msgstr "Construction d'un Solid" + +#: GeometryGUI_SphereDlg.cxx:50 +msgid "GEOM_SPHERE_TITLE" +msgstr "Construction d'une Sphere" + +#: GeometryGUI_SphereDlg.cxx:113 +msgid "GEOM_SPHERE_CR" +msgstr "Centre + rayon" + +#: GeometryGUI_SphereDlg.cxx:146 +msgid "GEOM_SPHERE_RO" +msgstr "Rayon a l'origine" + +#: GeometryGUI_SubShapeDlg.cxx:55 +msgid "GEOM_SUBSHAPE_TITLE" +msgstr "Selection de Sous Shapes" + +#: GeometryGUI_SubShapeDlg.cxx:131 +msgid "GEOM_SUBSHAPE_TYPE" +msgstr "Type de Sous Shapes" + +#: GeometryGUI_SubShapeDlg.cxx:137 +msgid "GEOM_SUBSHAPE_SELECT" +msgstr "Selectionner de Sous Shapes" + +#: GeometryGUI_TorusDlg.cxx:51 +msgid "GEOM_TORUS_TITLE" +msgstr "Constructiond'un Tore" + +#: GeometryGUI_SuppressFacesDlg.cxx:103 +msgid "GEOM_SUPRESSFACE_TITLE" +msgstr "Supprimer des Faces dans un Objet" + +#: GeometryGUI_SuppressFacesDlg.cxx:164 +msgid "GEOM_SUPRESSFACE_SELECT" +msgstr "Selectionner les Faces a Supprimer" + +#: GeometryGUI_TranslationDlg.cxx:78 +msgid "GEOM_TRANSLATION_COOR" +msgstr "Translation Avec Coordonnees" + +msgid "GEOM_TRANSPARENCY_TITLE" +msgstr "Transparence" + +msgid "GEOM_TRANSPARENCY_OPAQUE" +msgstr "Opaque" + +msgid "GEOM_TRANSPARENCY_TRANSPARENT" +msgstr "Transparent" + +msgid "GEOM_SUPPRESSHOLE_TITLE" +msgstr "Suppression de trous" + +msgid "GEOM_SUPPRESSHOLE_SELECTFACE" +msgstr "Selection de la face initiale" + +msgid "GEOM_SUPPRESSHOLE_SELECTWIRE" +msgstr "Selection du contour/trou sur la face" + +msgid "GEOM_SUPPRESSHOLE_SELECTFACE_END" +msgstr "Selection de la face terminale (si trou traversant)" + +msgid "GEOM_SUPPRESSHOLE_SELECTWIRE_END" +msgstr "Selection de contour final (si trou traversant)" + +msgid "GEOM_SUPPRESSHOLE_FACE_SHELL" +msgstr "Face ou shell" + +msgid "GEOM_SUPPRESSHOLE_SELECT_HOLES_ON_FACE" +msgstr "Selection de trou(s) sur la face" + +#: GeometryGUI_TranslationDlg.cxx:56 +msgid "GEOM_TRANSLATION_TITLE" +msgstr "Translation d'un Objet" + +#: GeometryGUI_VectorDlg.cxx:54 +msgid "GEOM_VECTOR_TITLE" +msgstr "Construction d'un Vecteur" + +#: GeometryGUI_WhatisDlg.cxx:63 +msgid "GEOM_WHATIS_TITLE" +msgstr "Whatis" + +#: GeometryGUI_WhatisDlg.cxx:86 +msgid "GEOM_WHATIS_OBJECT" +msgstr "Objet et ses Informations Topologiques" + +#: GeometryGUI_WireDlg.cxx:46 +msgid "GEOM_WIRE_TITLE" +msgstr "Creer un Wire" + +#: GeometryGUI_WireDlg.cxx:103 +msgid "GEOM_WIRE_CONNECT" +msgstr "Creation d'un Wire a partir de wires/edges connectes" + +#: GeometryGUI_WorkingPlaneDlg.cxx:50 +msgid "GEOM_WPLANE_TITLE" +msgstr "plan de travail" + +#: GeometryGUI_WorkingPlaneDlg.cxx:107 +msgid "GEOM_WPLANE_FACE" +msgstr "Plan Ou Face plane" + +#: GeometryGUI_multiTranslationDlg.cxx:107 +msgid "GEOM_MULTITRANSLATION_TITLE" +msgstr "Multi-Translation" + +#: GeometryGUI_multiTranslationDlg.cxx:107 +msgid "GEOM_MULTITRANSLATION_SIMPLE" +msgstr "Multi Translation Simple" + +#: GeometryGUI_multiTranslationDlg.cxx:107 +msgid "GEOM_MULTITRANSLATION_DOUBLE" +msgstr "Multi Translation Double" + +#: GeometryGUI_multiRotationDlg.cxx:107 +msgid "GEOM_MULTIROTATION_TITLE" +msgstr "Multi-Rotation" + +#: GeometryGUI_multiRotationDlg.cxx:107 +msgid "GEOM_MULTIROTATION_SIMPLE" +msgstr "Multi Rotation Simple" + +#: GeometryGUI_multiRotationDlg.cxx:107 +msgid "GEOM_MULTIROTATION_DOUBLE" +msgstr "Multi Rotation Double" + +msgid "GEOM_PARAM_POINT" +msgstr "Point paramétrique" + +# +#============================================================================== +# + +#: GeometryGUI.cxx:4613 +msgid "GEOM_MEN_WIREFRAME" +msgstr "Filaire" + +#: GeometryGUI.cxx:4613 +msgid "GEOM_MEN_SHADING" +msgstr "Ombré" + +msgid "GEOM_RECONSTRUCTION_LIMIT" +msgstr "Limite de Reconstruction" + +msgid "GEOM_SUPPRESS_RESULT" +msgstr "Supprimer le Resultat" + +msgid "GEOM_SUPPRESS_RESULT_INSIDE" +msgstr "Intérieur" + +msgid "GEOM_SUPPRESS_RESULT_OUTSIDE" +msgstr "Extérieur" + +msgid "GEOM_RECONSTRUCTION_LIMIT_SHAPE" +msgstr "Shape" +msgid "GEOM_RECONSTRUCTION_LIMIT_SOLID" +msgstr "Solid" +msgid "GEOM_RECONSTRUCTION_LIMIT_SHELL" +msgstr "Shell" +msgid "GEOM_RECONSTRUCTION_LIMIT_FACE" +msgstr "Face" +msgid "GEOM_RECONSTRUCTION_LIMIT_WIRE" +msgstr "Wire" +msgid "GEOM_RECONSTRUCTION_LIMIT_EDGE" +msgstr "Edge" +msgid "GEOM_RECONSTRUCTION_LIMIT_VERTEX" +msgstr "Vertex" + +msgid "GEOM_SPLINE_TITLE" +msgstr "Construction de Splines" +msgid "GEOM_SPLINE" +msgstr "Spline" +msgid "GEOM_BEZIER" +msgstr "Bezier" +msgid "GEOM_INTERPOL" +msgstr "Interpolation" + +# +#============================================================================== +# + +msgid "GEOM_SKETCHER_EL" +msgstr "Type d'Element" + +msgid "GEOM_BUT_CLOSE_SKETCH" +msgstr "Fermer Sketch" + +msgid "GEOM_BUT_END_SKETCH" +msgstr "Terminer Sketch" + +msgid "GEOM_SKETCHER_TITLE" +msgstr "Construction de Sketch" + +msgid "GEOM_SKETCHER_POINT" +msgstr "Point" + +msgid "GEOM_SKETCHER_SEGMENT" +msgstr "Sègment" + +msgid "GEOM_SKETCHER_ARC" +msgstr "Arc" + +msgid "GEOM_SKETCHER_DIR" +msgstr "Direction" + +msgid "GEOM_SKETCHER_POINT2" +msgstr "Point :" + +msgid "GEOM_SKETCHER_DEST" +msgstr "Destination" + +msgid "GEOM_SKETCHER_ABS" +msgstr "Absolu" + +msgid "GEOM_SKETCHER_REL" +msgstr "Relative" + +msgid "GEOM_SKETCHER_SEL" +msgstr "Sélection" + +msgid "GEOM_SKETCHER_ANGLE" +msgstr "Angle" + +msgid "GEOM_SKETCHER_PER" +msgstr "Perpendiculaire" + +msgid "GEOM_SKETCHER_TAN" +msgstr "Tangent" + +msgid "GEOM_SKETCHER_VXVY" +msgstr "VX-VY" + +msgid "GEOM_SKETCHER_LENGTH" +msgstr "Longueur" + +msgid "GEOM_SKETCHER_X" +msgstr "X" + +msgid "GEOM_SKETCHER_Y" +msgstr "Y" + +msgid "GEOM_SKETCHER_X2" +msgstr "X :" + +msgid "GEOM_SKETCHER_Y2" +msgstr "Y :" + +msgid "GEOM_SKETCHER_X3" +msgstr "Abs. X :" + +msgid "GEOM_SKETCHER_Y3" +msgstr "Abs. Y :" + +msgid "GEOM_SKETCHER_DX2" +msgstr "DX :" + +msgid "GEOM_SKETCHER_DY2" +msgstr "DY :" + +msgid "GEOM_SKETCHER_VX2" +msgstr "VX :" + +msgid "GEOM_SKETCHER_VY2" +msgstr "VY :" + +msgid "GEOM_SKETCHER_LENGTH2" +msgstr "Longueur :" + +msgid "GEOM_SKETCHER_ANGLE2" +msgstr "Angle :" + +msgid "GEOM_SKETCHER_RADIUS2" +msgstr "Radius :" + +msgid "GEOM_SKETCHER_UNDO" +msgstr "Undo" + +msgid "GEOM_SKETCHER_APPLY" +msgstr "Appliquer" + +msgid "GEOM_SKETCHER_VALUES" +msgstr "Valeurs" + +msgid "GEOM_SKETCHER_TYPE" +msgstr "Type" + +msgid "GEOM_FILLET_ABORT" +msgstr "Le congé ne peut-être realisé avec un rayon de %1 " + +msgid "GEOM_CHAMFER_ABORT" +msgstr "Le chanfrein ne peut-être realisé avec %1 et %2 " + +#MZN: to be translated +msgid "GEOM_CREATE_COPY" +msgstr "Create a copy" + +#MZN: to be translated +msgid "GEOM_CREATE_SINGLE_SOLID" +msgstr "Create a single solid" diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index fd961ec3d..7f26db05c 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -28,273 +28,464 @@ #include "GeometryGUI.h" -// Open CASCADE Includes -#include -#include - // SALOME Includes +#include "Utils_ORB_INIT.hxx" +#include "Utils_SINGLETON.hxx" + +#include "QAD_Desktop.h" +#include "QAD_Application.h" #include "QAD_RightFrame.h" #include "QAD_Config.h" +#include "QAD_Tools.h" +#include "QAD_MessageBox.h" +#include "QAD_Resource.h" +#include "SALOMEGUI_Desktop.h" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" #include "OCCViewer_ViewPort3d.h" +#include "OCCViewer_Prs.h" + #include "VTKViewer_ViewFrame.h" +#include "VTKViewer_RenderWindowInteractor.h" #include "VTKViewer_InteractorStyleSALOME.h" +#include "VTKViewer_Prs.h" +#include "SALOME_Actor.h" #include "SALOME_Selection.h" +#include "SALOME_ListIteratorOfListIO.hxx" +#include "GEOM_AISShape.hxx" +#include "GEOM_Displayer.h" + +#include "GEOMImpl_Types.hxx" + +// External includes +#include +#include +#include +#include + +#include "utilities.h" + +#include +#include using namespace std; -/* The object itself created in the static method 'GetOrCreateGEOMBase()' */ -static GEOMContext* GeomGUI = 0; +extern "C" { + Standard_EXPORT SALOMEGUI* GetComponentGUI() { + return GeometryGUI::GetGeomGUI(); + } +} -typedef bool OGE(int, QAD_Desktop*); -typedef bool OMP(QMouseEvent*, QAD_Desktop*, QAD_StudyFrame*); -typedef void BP(const Handle(SALOME_InteractiveObject)&); -typedef bool CP(QAD_Desktop*, QPopupMenu*, const QString&, - const QString&, const QString&); +//================================================================================= +// class : CustomItem +// purpose : Set Font to a text. +//================================================================================= +class CustomItem : public QCustomMenuItem +{ +public: + CustomItem(const QString& s, const QFont& f) : myString(s), myFont(f) {} + ~CustomItem() {} + + void paint(QPainter* p, const QColorGroup& cg, bool act, bool /*enabled*/, int x, int y, int w, int h) + { + if ( !act ) { + p->fillRect( x, y+1, w, h-2, cg.mid() ); + p->drawRect( x, y+1, w, h-2 ); + } + else { + p->fillRect( x, y+1, w, h-2, cg.midlight() ); + QPen oldPen = p->pen(); + p->setPen( cg.mid() ); + p->drawRect( x, y+1, w, h-2 ); + p->setPen( oldPen ); + } + p->setFont( myFont ); + p->drawText( x, y, w, h, AlignHCenter | AlignVCenter | ShowPrefix | DontClip, myString ); + } + + QSize sizeHint() + { + return QFontMetrics( myFont ).size( AlignHCenter | AlignVCenter | ShowPrefix | DontClip, myString ); + } + +private: + QString myString; + QFont myFont; + +}; + +//======================================================================= +// function : GeometryGUI::GetGeomGUI() +// purpose : Gets the only object of GeometryGUI [ static ] +//======================================================================= +GeometryGUI* GeometryGUI::GetGeomGUI() +{ + static GeometryGUI myContext; + return &myContext; +} + +//======================================================================= +// function : GetORB +// purpose : Returns a reference to ORB [ static ] +//======================================================================= +CORBA::ORB_var GeometryGUI::GetORB() +{ + ORB_INIT& init = *SINGLETON_::Instance(); + return init.orb(); +} //======================================================================= -// function : GeometryGUI() +// function : GeometryGUI::GeometryGUI() // purpose : Constructor //======================================================================= -GeometryGUI::GeometryGUI( const QString& theName, QObject* theParent ) : - SALOMEGUI( theName, theParent ) -{} +GeometryGUI::GeometryGUI() : + SALOMEGUI() +{ + QAD_Desktop* desktop = QAD_Application::getDesktop(); + Engines::Component_var comp = desktop->getEngine( "FactoryServer", "GEOM" ); + + myComponentGeom = GEOM::GEOM_Gen::_narrow( comp ); + myState = -1; + myActiveDialogBox = 0; + myFatherior = ""; + gp_Pnt origin = gp_Pnt(0., 0., 0.); + gp_Dir direction = gp_Dir(0., 0., 1.); + myWorkingPlane = gp_Ax3(origin, direction); +} //======================================================================= -// function : ~GeometryGUI() +// function : GeometryGUI::~GeometryGUI() // purpose : Destructor //======================================================================= GeometryGUI::~GeometryGUI() { } - //======================================================================= -// function : GetOrCreateGEOMBase() -// purpose : Gets or create an object 'GEOMBase' with initialisations -// : Returns 'GeomGUI' as a pointer +// function : GeometryGUI::getLibrary() +// purpose : get or load GUI library by name [ internal ] //======================================================================= -GEOMContext* GeometryGUI::GetOrCreateGeometryGUI(QAD_Desktop* desktop) +typedef GEOMGUI* (*LibraryGUI)(); +GEOMGUI* GeometryGUI::getLibrary( const QString& libraryName ) { - GeomGUI = GeomGUI->GetOrCreateGeomGUI(desktop); - return GeomGUI; + if ( !myGUIMap.contains( libraryName ) ) { + // try to load library if it is not loaded yet + QCString libs; + if( ( libs = getenv( "LD_LIBRARY_PATH" ) ) ) { + QStringList dirList = QStringList::split( ":", libs, false ); // skip empty entries + for( int i = dirList.count()-1; i >= 0; i-- ) { + QString dir = dirList[ i ]; + QFileInfo fi( QAD_Tools::addSlash( dirList[ i ] ) + libraryName ); + if( fi.exists() ) { + OSD_SharedLibrary aSharedLibrary( (char*)fi.fileName().latin1() ); + bool res = aSharedLibrary.DlOpen( OSD_RTLD_LAZY ); + if( !res ) { + MESSAGE( "Can't open library : " << aSharedLibrary.DlError() ); + continue; // continue search further + } + OSD_Function osdF = aSharedLibrary.DlSymb( "GetLibGUI" ); + if ( osdF != NULL ) { + LibraryGUI func = (GEOMGUI* (*) ())osdF; + GEOMGUI* libGUI = (*func)(); + if ( libGUI ) { + myGUIMap[ libraryName ] = libGUI; + break; // found and loaded! + } + } + } + } + } + } + if ( myGUIMap.contains( libraryName ) ) + // library is successfully loaded + return myGUIMap[ libraryName ]; + return 0; } - //======================================================================= -// function : OnGUIEvent() [static] -// purpose : manage all events on GUI +// function : GeometryGUI::ActiveWorkingPlane() +// purpose : Activate Working Plane View //======================================================================= -bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) +void GeometryGUI::ActiveWorkingPlane() { - GeometryGUI::GetOrCreateGeometryGUI(parent); + gp_Dir DZ = myWorkingPlane.Direction(); + gp_Dir DY = myWorkingPlane.YDirection(); - QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar(); - bool ViewOCC; + if( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { + OCCViewer_ViewPort* vp = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewPort(); + Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)vp)->getView(); - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) - ViewOCC = true; - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) - ViewOCC = false; - else - return false; + view3d->SetProj(DZ.X(), DZ.Y(), DZ.Z()); + view3d->SetUp(DY.X(), DY.Y(), DY.Z()); + + ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewFitAll(); + } + else if( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { + vtkRenderer* myRenderer = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRenderer(); - Mb->setItemEnabled(404, ViewOCC);//SKETCHER + vtkCamera* camera = myRenderer->GetActiveCamera(); + camera->SetPosition(DZ.X(), DZ.Y(), DZ.Z()); + camera->SetViewUp(DY.X(), DY.Y(), DY.Z()); + camera->SetFocalPoint(0,0,0); - Mb->setItemEnabled(603, ViewOCC);//SuppressFace - Mb->setItemEnabled(604, ViewOCC);//SuppressHole - - Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings - Mb->setItemEnabled(414, ViewOCC);// Isos Settings - - if(theCommandID == 111 || // MENU FILE - IMPORT BREP - theCommandID == 112 || // MENU FILE - IMPORT IGES - theCommandID == 113 || // MENU FILE - IMPORT STEP - theCommandID == 121 || // MENU FILE - EXPORT BREP - theCommandID == 122 || // MENU FILE - EXPORT IGES - theCommandID == 123 || // MENU FILE - EXPORT STEP - theCommandID == 31 || // MENU EDIT - COPY - theCommandID == 33 || // MENU EDIT - DELETE - theCommandID == 411 || // MENU SETTINGS - ADD IN STUDY - theCommandID == 412 || // MENU SETTINGS - SHADING COLOR - theCommandID == 413 || // MENU SETTINGS - ISOS - theCommandID == 414 || // MENU SETTINGS - STEP VALUE FOR SPIN BOXES - theCommandID == 5103 || // MENU TOOLS - CHECK GEOMETRY - theCommandID == 5104 || // MENU TOOLS - LOAD SCRIPT - theCommandID == 8032 || // POPUP VIEWER - COLOR - theCommandID == 8033 || // POPUP VIEWER - TRANSPARENCY - theCommandID == 8034 || // POPUP VIEWER - ISOS - theCommandID == 804 || // POPUP VIEWER - ADD IN STUDY - theCommandID == 901 || // OBJECT BROWSER - RENAME - theCommandID == 9024) { // OBJECT BROWSER - OPEN - if(!GeomGUI->LoadLibrary("libGEOMToolsGUI.so")) - return false; - } - else if(theCommandID == 211 || // MENU VIEW - WIREFRAME/SHADING - theCommandID == 212 || // MENU VIEW - DISPLAY ALL - theCommandID == 213 || // MENU VIEW - DISPLAY ONLY - theCommandID == 214 || // MENU VIEW - ERASE ALL - theCommandID == 215 || // MENU VIEW - ERASE ONLY - theCommandID == 8031) { // POPUP VIEWER - WIREFRAME/SHADING - if(!GeomGUI->LoadLibrary("libDisplayGUI.so")) - return false; - } - else if(theCommandID == 4011 || // MENU BASIC - POINT - theCommandID == 4012 || // MENU BASIC - LINE - theCommandID == 4013 || // MENU BASIC - CIRCLE - theCommandID == 4014 || // MENU BASIC - ELLIPSE - theCommandID == 4015 || // MENU BASIC - ARC - theCommandID == 4016 || // MENU BASIC - VECTOR - theCommandID == 4017 || // MENU BASIC - PLANE - theCommandID == 4018) { // MENU BASIC - WPLANE - if(!GeomGUI->LoadLibrary("libBasicGUI.so")) - return false; - } - else if(theCommandID == 4021 || // MENU PRIMITIVE - BOX - theCommandID == 4022 || // MENU PRIMITIVE - CYLINDER - theCommandID == 4023 || // MENU PRIMITIVE - SPHERE - theCommandID == 4024 || // MENU PRIMITIVE - TORUS - theCommandID == 4025) { // MENU PRIMITIVE - CONE - if(!GeomGUI->LoadLibrary("libPrimitiveGUI.so")) - return false; - } - else if(theCommandID == 4031 || // MENU GENERATION - PRISM - theCommandID == 4032 || // MENU GENERATION - REVOLUTION - theCommandID == 4033 || // MENU GENERATION - FILLING - theCommandID == 4034) { // MENU GENERATION - PIPE - if(!GeomGUI->LoadLibrary("libGenerationGUI.so")) - return false; - } - else if(theCommandID == 404 || // MENU ENTITY - SKETCHER - theCommandID == 407) { // MENU ENTITY - EXPLODE - if(!GeomGUI->LoadLibrary("libEntityGUI.so")) - return false; - } - else if(theCommandID == 4081 || // MENU BUILD - EDGE - theCommandID == 4082 || // MENU BUILD - WIRE - theCommandID == 4083 || // MENU BUILD - FACE - theCommandID == 4084 || // MENU BUILD - SHELL - theCommandID == 4085 || // MENU BUILD - SOLID - theCommandID == 4086) { // MENU BUILD - COMPUND - if(!GeomGUI->LoadLibrary("libBuildGUI.so")) - return false; - } - else if(theCommandID == 5011 || // MENU BOOLEAN - FUSE - theCommandID == 5012 || // MENU BOOLEAN - COMMON - theCommandID == 5013 || // MENU BOOLEAN - CUT - theCommandID == 5014) { // MENU BOOLEAN - SECTION - if(!GeomGUI->LoadLibrary("libBooleanGUI.so")) - return false; - } - else if(theCommandID == 5021 || // MENU TRANSFORMATION - TRANSLATION - theCommandID == 5022 || // MENU TRANSFORMATION - ROTATION - theCommandID == 5023 || // MENU TRANSFORMATION - MIRROR - theCommandID == 5024 || // MENU TRANSFORMATION - SCALE - theCommandID == 5025 || // MENU TRANSFORMATION - MULTI-TRANSLATION - theCommandID == 5026) { // MENU TRANSFORMATION - MULTI-ROTATION - if(!GeomGUI->LoadLibrary("libTransformationGUI.so")) - return false; - } - else if(theCommandID == 503 || // MENU OPERATION - PARTITION - theCommandID == 504 || // MENU OPERATION - ARCHIMEDE - theCommandID == 505 || // MENU OPERATION - FILLET - theCommandID == 506) { // MENU OPERATION - CHAMFER - if(!GeomGUI->LoadLibrary("libOperationGUI.so")) - return false; - } - else if(theCommandID == 601 || // MENU REPAIR - SEWING - theCommandID == 602 || // MENU REPAIR - ORIENTATION - theCommandID == 603 || // MENU REPAIR - SUPPRESS FACES - theCommandID == 604) { // MENU REPAIR - SUPPRESS HOLE - if(!GeomGUI->LoadLibrary("libRepairGUI.so")) - return false; - } - else if(theCommandID == 701 || // MENU MEASURE - PROPERTIES - theCommandID == 702 || // MENU MEASURE - CDG - theCommandID == 703 || // MENU MEASURE - INERTIA - theCommandID == 7041 || // MENU MEASURE - BOUNDING BOX - theCommandID == 7042 || // MENU MEASURE - MIN DISTANCE - theCommandID == 705 || // MENU MEASURE - TOLERANCE - theCommandID == 706 || // MENU MEASURE - WHATIS - theCommandID == 707) { // MENU MEASURE - CHECK - if(!GeomGUI->LoadLibrary("libMeasureGUI.so")) - return false; + ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->onViewFitAll(); } - else + +} + +//======================================================================= +// function : GeometryGUI::SetActiveDialogBox() +// purpose : Set active dialog box +//======================================================================= +void GeometryGUI::SetActiveDialogBox( QDialog* aDlg ) +{ + myActiveDialogBox = (QDialog*)aDlg; +} + +//======================================================================= +// function : GeometryGUI::EmitSignalDeactivateDialog() +// purpose : Emit a signal to deactivate the active dialog Box +//======================================================================= +void GeometryGUI::EmitSignalDeactivateDialog() +{ + emit SignalDeactivateActiveDialog(); +} + +//======================================================================= +// function : GeometryGUI::EmitSignalCloseAllDialogs() +// purpose : Emit a signal to close all non modal dialogs box +//======================================================================= +void GeometryGUI::EmitSignalCloseAllDialogs() +{ + emit SignalCloseAllDialogs(); +} + +//======================================================================= +// function : GeometryGUI::EmitSignalDefaultStepValueChanged() +// purpose : Emit a signal to inform that default real spin box step has +// been changed +//======================================================================= +void GeometryGUI::EmitSignalDefaultStepValueChanged(double newVal) +{ + emit SignalDefaultStepValueChanged(newVal); +} + +//======================================================================= +// function : GeometryGUI::OnGUIEvent() +// purpose : manage all events on GUI [static] +//======================================================================= +bool GeometryGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) +{ + GeometryGUI* geomGUI = GeometryGUI::GetGeomGUI(); + + // get main menu + QMenuBar* Mb = parent->getMainMenuBar(); + // check if current viewframe is of OCC type + bool ViewOCC = parent->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC; + // if current viewframe is not of OCC and not of VTK type - return immediately + if( !ViewOCC && parent->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_VTK) return false; - //Load Function OnGUIEvent - OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("OnGUIEvent"); - OGE (*f1) = NULL; - if(osdF != NULL) { - f1 = (bool (*) (int, QAD_Desktop*)) osdF; - (*f1)(theCommandID, parent); + // disable non-OCC viewframe menu commands + //Mb->setItemEnabled( 404, ViewOCC ); // SKETCHER + Mb->setItemEnabled( 603, ViewOCC ); // SuppressFace + Mb->setItemEnabled( 604, ViewOCC ); // SuppressHole + Mb->setItemEnabled( 606, ViewOCC ); // CloseContour + Mb->setItemEnabled( 607, ViewOCC ); // RemoveInternalWires + Mb->setItemEnabled( 608, ViewOCC ); // AddPointOnEdge + //Mb->setItemEnabled( 609, ViewOCC ); // Free boundaries + Mb->setItemEnabled( 413, ViewOCC ); // Isos Settings + + Mb->setItemEnabled( 800, ViewOCC ); // Create Group + Mb->setItemEnabled( 801, ViewOCC ); // Edit Group + + Mb->setItemEnabled(9998, ViewOCC ); // MENU BLOCKS - MULTI-TRANSFORMATION + + GEOMGUI* library = 0; + // try to get-or-load corresponding GUI library + if( theCommandID == 111 || // MENU FILE - IMPORT BREP + theCommandID == 112 || // MENU FILE - IMPORT IGES + theCommandID == 113 || // MENU FILE - IMPORT STEP + theCommandID == 121 || // MENU FILE - EXPORT BREP + theCommandID == 122 || // MENU FILE - EXPORT IGES + theCommandID == 123 || // MENU FILE - EXPORT STEP + theCommandID == 31 || // MENU EDIT - COPY + theCommandID == 33 || // MENU EDIT - DELETE + theCommandID == 411 || // MENU SETTINGS - ADD IN STUDY + theCommandID == 412 || // MENU SETTINGS - SHADING COLOR + theCommandID == 413 || // MENU SETTINGS - ISOS + theCommandID == 414 || // MENU SETTINGS - STEP VALUE FOR SPIN BOXES + theCommandID == 5103 || // MENU TOOLS - CHECK GEOMETRY + theCommandID == 5104 || // MENU TOOLS - LOAD SCRIPT + theCommandID == 8032 || // POPUP VIEWER - COLOR + theCommandID == 8033 || // POPUP VIEWER - TRANSPARENCY + theCommandID == 8034 || // POPUP VIEWER - ISOS + theCommandID == 804 || // POPUP VIEWER - ADD IN STUDY + theCommandID == 901 || // OBJECT BROWSER - RENAME + theCommandID == 9024 ) { // OBJECT BROWSER - OPEN + library = geomGUI->getLibrary( "libGEOMToolsGUI.so" ); + } + else if( theCommandID == 211 || // MENU VIEW - WIREFRAME/SHADING + theCommandID == 212 || // MENU VIEW - DISPLAY ALL + theCommandID == 213 || // MENU VIEW - DISPLAY ONLY + theCommandID == 214 || // MENU VIEW - ERASE ALL + theCommandID == 215 || // MENU VIEW - ERASE + theCommandID == 216 || // MENU VIEW - DISPLAY + theCommandID == 80311 || // POPUP VIEWER - WIREFRAME + theCommandID == 80312 ) { // POPUP VIEWER - SHADING + library = geomGUI->getLibrary( "libDisplayGUI.so" ); + } + else if( theCommandID == 4011 || // MENU BASIC - POINT + theCommandID == 4012 || // MENU BASIC - LINE + theCommandID == 4013 || // MENU BASIC - CIRCLE + theCommandID == 4014 || // MENU BASIC - ELLIPSE + theCommandID == 4015 || // MENU BASIC - ARC + theCommandID == 4016 || // MENU BASIC - VECTOR + theCommandID == 4017 || // MENU BASIC - PLANE + theCommandID == 4018 || // MENU BASIC - WPLANE + theCommandID == 4019 || // MENU BASIC - CURVE + theCommandID == 4020 ) { // MENU BASIC - REPAIR + library = geomGUI->getLibrary( "libBasicGUI.so" ); + } + else if( theCommandID == 4021 || // MENU PRIMITIVE - BOX + theCommandID == 4022 || // MENU PRIMITIVE - CYLINDER + theCommandID == 4023 || // MENU PRIMITIVE - SPHERE + theCommandID == 4024 || // MENU PRIMITIVE - TORUS + theCommandID == 4025 ) { // MENU PRIMITIVE - CONE + library = geomGUI->getLibrary( "libPrimitiveGUI.so" ); + } + else if( theCommandID == 4031 || // MENU GENERATION - PRISM + theCommandID == 4032 || // MENU GENERATION - REVOLUTION + theCommandID == 4033 || // MENU GENERATION - FILLING + theCommandID == 4034 ) { // MENU GENERATION - PIPE + library = geomGUI->getLibrary( "libGenerationGUI.so" ); + } + else if( theCommandID == 404 || // MENU ENTITY - SKETCHER + theCommandID == 407 ) { // MENU ENTITY - EXPLODE + library = geomGUI->getLibrary( "libEntityGUI.so" ); + } + else if( theCommandID == 4081 || // MENU BUILD - EDGE + theCommandID == 4082 || // MENU BUILD - WIRE + theCommandID == 4083 || // MENU BUILD - FACE + theCommandID == 4084 || // MENU BUILD - SHELL + theCommandID == 4085 || // MENU BUILD - SOLID + theCommandID == 4086 ) { // MENU BUILD - COMPUND + library = geomGUI->getLibrary( "libBuildGUI.so" ); + } + else if( theCommandID == 5011 || // MENU BOOLEAN - FUSE + theCommandID == 5012 || // MENU BOOLEAN - COMMON + theCommandID == 5013 || // MENU BOOLEAN - CUT + theCommandID == 5014 ) { // MENU BOOLEAN - SECTION + library = geomGUI->getLibrary( "libBooleanGUI.so" ); + } + else if( theCommandID == 5021 || // MENU TRANSFORMATION - TRANSLATION + theCommandID == 5022 || // MENU TRANSFORMATION - ROTATION + theCommandID == 5023 || // MENU TRANSFORMATION - LOCATION + theCommandID == 5024 || // MENU TRANSFORMATION - MIRROR + theCommandID == 5025 || // MENU TRANSFORMATION - SCALE + theCommandID == 5026 || // MENU TRANSFORMATION - OFFSET + theCommandID == 5027 || // MENU TRANSFORMATION - MULTI-TRANSLATION + theCommandID == 5028 ) { // MENU TRANSFORMATION - MULTI-ROTATION + library = geomGUI->getLibrary( "libTransformationGUI.so" ); + } + else if( theCommandID == 503 || // MENU OPERATION - PARTITION + theCommandID == 504 || // MENU OPERATION - ARCHIMEDE + theCommandID == 505 || // MENU OPERATION - FILLET + theCommandID == 506 || // MENU OPERATION - CHAMFER + theCommandID == 507 ) { // MENU OPERATION - CLIPPING RANGE + library = geomGUI->getLibrary( "libOperationGUI.so" ); + } + else if( theCommandID == 601 || // MENU REPAIR - SEWING + theCommandID == 603 || // MENU REPAIR - SUPPRESS FACES + theCommandID == 604 || // MENU REPAIR - SUPPRESS HOLE + theCommandID == 605 || // MENU REPAIR - SHAPE PROCESSING + theCommandID == 606 || // MENU REPAIR - CLOSE CONTOUR + theCommandID == 607 || // MENU REPAIR - REMOVE INTERNAL WIRES + theCommandID == 608 || // MENU REPAIR - ADD POINT ON EDGE + theCommandID == 609 || // MENU REPAIR - FREE BOUNDARIES + theCommandID == 602 ) { // MENU REPAIR - GLUE FACES + library = geomGUI->getLibrary( "libRepairGUI.so" ); + } + else if( theCommandID == 701 || // MENU MEASURE - PROPERTIES + theCommandID == 702 || // MENU MEASURE - CDG + theCommandID == 703 || // MENU MEASURE - INERTIA + theCommandID == 7041 || // MENU MEASURE - BOUNDING BOX + theCommandID == 7042 || // MENU MEASURE - MIN DISTANCE + theCommandID == 705 || // MENU MEASURE - TOLERANCE + theCommandID == 706 || // MENU MEASURE - WHATIS + theCommandID == 707 || // MENU MEASURE - CHECK + theCommandID == 708 ) { // MENU MEASURE - POINT COORDINATES + library = geomGUI->getLibrary( "libMeasureGUI.so" ); + } + else if( theCommandID == 800 || // MENU GROUP - CREATE + theCommandID == 801 ) { // MENU GROUP - EDIT + library = geomGUI->getLibrary( "libGroupGUI.so" ); + } + else if( theCommandID == 9999 || // MENU BLOCKS - HEXAHEDRAL SOLID + theCommandID == 9998 || // MENU BLOCKS - MULTI-TRANSFORMATION + theCommandID == 9997 || // MENU BLOCKS - QUADRANGLE FACE + theCommandID == 9995 ) { // MENU BLOCKS - EXPLODE ON BLOCKS + library = geomGUI->getLibrary( "libBlocksGUI.so" ); } - else - return false; - return true; + // call method of corresponding GUI library + if ( library ) { + return library->OnGUIEvent( theCommandID, parent ); + } + else { + QAD_MessageBox::error1( parent, tr( "GEOM_ERROR" ), tr( "GEOM_ERR_LIB_NOT_FOUND" ), tr( "GEOM_BUT_OK" ) ); + } + return false; } //================================================================================= -// function : OnKeyPress() -// purpose : [static] +// function : GeometryGUI::OnKeyPress() +// purpose : Called when any key is pressed by user [static] //================================================================================= bool GeometryGUI::OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame) { - GeometryGUI::GetOrCreateGeometryGUI(parent); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - else - return true; + GeometryGUI* geomGUI = GeometryGUI::GetGeomGUI(); + GUIMap::Iterator it; + bool bOk = true; + for ( it = geomGUI->myGUIMap.begin(); it != geomGUI->myGUIMap.end(); ++it ) + bOk = bOk && it.data()->OnKeyPress( pe, parent, studyFrame ); + return bOk; } //================================================================================= -// function : OnMouseMove() -// purpose : [static] manage mouse events +// function : GeometryGUI::OnMouseMove() +// purpose : Manages mouse move events [static] //================================================================================= bool GeometryGUI::OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame) { - GeometryGUI::GetOrCreateGeometryGUI(parent); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - else - return true; + GeometryGUI* geomGUI = GeometryGUI::GetGeomGUI(); + GUIMap::Iterator it; + bool bOk = true; + for ( it = geomGUI->myGUIMap.begin(); it != geomGUI->myGUIMap.end(); ++it ) + bOk = bOk && it.data()->OnMouseMove( pe, parent, studyFrame ); + return bOk; } //================================================================================= -// function : 0nMousePress() -// purpose : [static] manage mouse events +// function : GeometryGUI::0nMousePress() +// purpose : Manage mouse press events [static] //================================================================================= bool GeometryGUI::OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame) { - GeometryGUI::GetOrCreateGeometryGUI(parent); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - if(GeomGUI->myState == 0) { - if(!GeomGUI->LoadLibrary("libBasicGUI.so")) - return false; - - //Load Function OnMousePress - OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("OnMousePress"); - OMP (*f1) = NULL; - if(osdF != NULL) { - f1 = (bool (*) (QMouseEvent*, QAD_Desktop*, QAD_StudyFrame*)) osdF; - (*f1)(pe, parent, studyFrame); - } - } - - return false; + GeometryGUI* geomGUI = GeometryGUI::GetGeomGUI(); + GUIMap::Iterator it; + // OnMousePress() should return false if this event should be processed further + // (see OCCViewer_Viewer3d::onMousePress() for explanation) + bool processed = false; + for ( it = geomGUI->myGUIMap.begin(); it != geomGUI->myGUIMap.end(); ++it ) + processed = processed || it.data()->OnMousePress( pe, parent, studyFrame ); + return processed; } static void UpdateVtkSelection(QAD_Desktop* parent) @@ -321,60 +512,60 @@ static void UpdateVtkSelection(QAD_Desktop* parent) } } - //================================================================================= -// function : SetSettings() -// purpose : [static] +// function : GeometryGUI::SetSettings() +// purpose : Called when GEOM module is activated [static] //================================================================================= bool GeometryGUI::SetSettings(QAD_Desktop* parent) { - GeometryGUI::GetOrCreateGeometryGUI(parent); - QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar(); - QAD_Study* ActiveStudy = parent->getActiveStudy(); + GeometryGUI* geomGUI = GetGeomGUI(); + QMenuBar* Mb = parent->getMainMenuBar(); + QAD_Study* ActiveStudy = parent->getActiveStudy(); + + /* Wireframe or Shading */ int DisplayMode = 0; bool ViewOCC = false; - if(ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { + if ( ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) { OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); DisplayMode = ic->DisplayMode(); ViewOCC = true; } - else if(ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { + else if (ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) { VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); DisplayMode = myRenderInter->GetDisplayMode(); } - if(DisplayMode == 1) - Mb->changeItem(211, tr("GEOM_MEN_WIREFRAME")); + if( DisplayMode == 1 ) + Mb->changeItem( 211, tr( "GEOM_MEN_WIREFRAME" ) ); else - Mb->changeItem(211, tr("GEOM_MEN_SHADING")); + Mb->changeItem( 211, tr( "GEOM_MEN_SHADING" ) ); - /* Add in Study */ + /* Add in Study - !!!ALWAYS TRUE!!! */ /////// VSR : TO BE REMOVED QString AddInStudy = QAD_CONFIG->getSetting("Geometry:SettingsAddInStudy"); int Settings_AddInStudy; - if(!AddInStudy.isEmpty()) + /*if(!AddInStudy.isEmpty()) Settings_AddInStudy = AddInStudy.toInt(); else - Settings_AddInStudy = 1; + */ + Settings_AddInStudy = 1; Mb->setItemChecked(411, Settings_AddInStudy); - /* step value */ QString S = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); if(S.isEmpty()) QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", "100"); - /* isos */ int count = ActiveStudy->getStudyFramesCount(); for(int i = 0; i < count; i++) { if(ActiveStudy->getStudyFrame(i)->getTypeView() == VIEW_OCC) { OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)ActiveStudy->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer(); Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - + QString IsoU = QAD_CONFIG->getSetting("Geometry:SettingsIsoU"); QString IsoV = QAD_CONFIG->getSetting("Geometry:SettingsIsoV"); if(!IsoU.isEmpty()) @@ -384,156 +575,412 @@ bool GeometryGUI::SetSettings(QAD_Desktop* parent) } } - Mb->setItemEnabled(404, ViewOCC);//SKETCHER + //Mb->setItemEnabled(404, ViewOCC); // SKETCHER + Mb->setItemEnabled(603, ViewOCC); // SuppressFace + Mb->setItemEnabled(604, ViewOCC); // SuppressHole + Mb->setItemEnabled(606, ViewOCC); // CloseContour + Mb->setItemEnabled(607, ViewOCC); // RemoveInternalWires + Mb->setItemEnabled(608, ViewOCC); // AddPointOnEdge +// Mb->setItemEnabled(609, ViewOCC); // Free boundaries + Mb->setItemEnabled(413, ViewOCC); // Isos Settings - Mb->setItemEnabled(603, ViewOCC);//SuppressFace - Mb->setItemEnabled(604, ViewOCC);//SuppressHole - - Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings - Mb->setItemEnabled(414, ViewOCC);// Isos Settings + Mb->setItemEnabled( 800, ViewOCC ); // Create Group + Mb->setItemEnabled( 801, ViewOCC ); // Edit Group + Mb->setItemEnabled(9998, ViewOCC); // MENU BLOCKS - MULTI-TRANSFORMATION + + // PAL5356: update VTK selection ::UpdateVtkSelection(parent); - - return true; + bool bOk = true; + GUIMap::Iterator it; + for ( it = geomGUI->myGUIMap.begin(); it != geomGUI->myGUIMap.end(); ++it ) + bOk = bOk && it.data()->SetSettings( parent ); + + // 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); + } + + return bOk; } +//======================================================================= +// function : GeometryGUI::Deactivate() +// purpose : Called when GEOM module is deactivated [ static ] +//======================================================================= +void GeometryGUI::Deactivate() +{ + GeometryGUI* geomGUI = GetGeomGUI(); + GetGeomGUI()->EmitSignalCloseAllDialogs(); + GUIMap::Iterator it; + for ( it = geomGUI->myGUIMap.begin(); it != geomGUI->myGUIMap.end(); ++it ) + it.data()->Deactivate(); +} //================================================================================= -// function : DefinePopup() -// purpose : [static] +// function : GeometryGUI::DefinePopup() +// purpose : Called from desktop to define popup menu [static] //================================================================================= -void GeometryGUI::DefinePopup(QString & theContext, QString & theParent, QString & theObject) +void GeometryGUI::DefinePopup(QString& theContext, QString& theParent, QString& theObject) { - GeometryGUI::GetOrCreateGeometryGUI(QAD_Application::getDesktop()); - + GeometryGUI* geomGUI = GetGeomGUI(); QAD_Study* ActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); - SALOME_Selection* Sel = SALOME_Selection::Selection(ActiveStudy->getSelection()); - theObject = ""; + SALOME_Selection* Sel = SALOME_Selection::Selection(ActiveStudy->getSelection()); + + theObject = ""; theContext = ""; - if((theParent.compare("Viewer") == 0)) { - if(Sel->IObjectCount() == 0) + if ( theParent == "Viewer" ) { + if ( Sel->IObjectCount() == 0 ) theContext = "NothingSelected"; } - if(Sel->IObjectCount() == 1) { + if ( Sel->IObjectCount() == 1 ) { Handle(SALOME_InteractiveObject) IO = Sel->firstIObject(); - if(IO->hasEntry()) { - SALOMEDS::SObject_var sobj = ActiveStudy->getStudyDocument()->FindObjectID(IO->getEntry()); - if(!sobj->_is_nil()) { + if( IO->hasEntry() ) { + SALOMEDS::SObject_var sobj = ActiveStudy->getStudyDocument()->FindObjectID( IO->getEntry() ); + if ( !sobj->_is_nil() ) { SALOMEDS::SComponent_var scomp = sobj->GetFatherComponent(); - if(strcmp(scomp->GetID(), IO->getEntry()) == 0) { + if ( !strcmp(scomp->GetID(), IO->getEntry() ) ) { // component is selected theObject = "Component"; } + else { + GEOM::GEOM_Object_var aGObj = GEOM::GEOM_Object::_narrow( sobj->GetObject() ); + if ( !CORBA::is_nil( aGObj ) ) { + switch( aGObj->GetType() ) { + case GEOM_GROUP: + theObject = "Group"; + break; + default: + theObject = "Shape"; + break; + } + } + } } } } - - return; } - //================================================================================= -// function : CustomPopup() -// purpose : [static] +// function : GeometryGUI::CustomPopup() +// purpose : Called from desktop to create popup menu [static] //================================================================================= bool GeometryGUI::CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext, const QString& theParent, const QString& theObject) { - GeometryGUI::GetOrCreateGeometryGUI(parent); + GeometryGUI* geomGUI = GetGeomGUI(); + + // Deactivate any non modal dialog box to get the neutral point + geomGUI->EmitSignalDeactivateDialog(); + QAD_Study* anActiveStudy = parent->getActiveStudy(); + QAD_StudyFrame* aStudyFrame = anActiveStudy->getActiveStudyFrame(); + QAD_ViewFrame* aViewFrame = aStudyFrame->getRightFrame()->getViewFrame(); + SALOME_Selection* Sel = SALOME_Selection::Selection(anActiveStudy->getSelection()); + QString parentComponent = ((SALOMEGUI_Desktop*)parent)->getComponentFromSelection(); + bool isOCCViewer = aViewFrame->getTypeView() == VIEW_OCC; + bool isVTKViewer = aViewFrame->getTypeView() == VIEW_VTK; + int aDisplayMode = 0; + QString objectName; + + if ( aViewFrame->getTypeView() == VIEW_OCC ) + aDisplayMode = ((OCCViewer_ViewFrame*)aViewFrame)->getViewer()->getAISContext()->DisplayMode(); + else if ( aViewFrame->getTypeView() == VIEW_VTK ) + aDisplayMode = ((VTKViewer_ViewFrame*)aViewFrame)->getRWInteractor()->GetDisplayMode(); + + int nbSel = Sel->IObjectCount(); + + if( nbSel == 0 ) { + ////// NOTHING SELECTED + popup->clear(); + } + else if ( nbSel == 1 ) { + ////// SINGLE OBJECT SELECTION + if ( parentComponent != parent->getActiveComponent() ) { + ////// selected object does not belong to GEOM module: + // remove all commands except Display/Erase... + while ( 1 ) { + int id = popup->idAt( 0 ); + if ( id <= QAD_TopLabel_Popup_ID ) + popup->removeItemAt( 0 ); + else + break; + } + } + else { + ////// selected object belong to the GEOM module + // get interactive object + Handle(SALOME_InteractiveObject) IObject = Sel->firstIObject(); + objectName = IObject->getName(); + // if object has entry get SObject + SALOMEDS::SObject_var SO; + if ( IObject->hasEntry() ) + SO = anActiveStudy->getStudyDocument()->FindObjectID( IObject->getEntry() ); + + if ( theObject == "Component" ) { + ////// menu for component + popup->removeItem( QAD_DisplayOnly_Popup_ID ); + if ( !isOCCViewer && !isVTKViewer ) { + popup->removeItem( QAD_Display_Popup_ID ); + popup->removeItem( QAD_Erase_Popup_ID ); + } + } + else { + ////// not component (should be shape) + if ( IObject->hasEntry() ) /////// VSR : TO BE REMOVED + popup->removeItem( 804 ); // "Add in Study" + + // Here could be analysis of the geom shape's type + // ... // + + SALOMEDS::GenericAttribute_var aTmpAttr; + if( SO->_is_nil() || SO->GetFatherComponent()->FindAttribute( aTmpAttr, "AttributeIOR") ) + popup->removeItem( 9024 ); // "Open" /////// VSR : TO BE REMOVED + + if ( !isOCCViewer && theParent == "ObjectBrowser" ) { + if ( theObject == "Shape" ) + popup->removeItem( 800 ); // Create Group + else if ( theObject == "Group" ) + popup->removeItem( 801 ); // Edit Group + } - if(!GeomGUI->LoadLibrary("libGEOMBase.so")) - return false; + if ( isOCCViewer || isVTKViewer ) { + ////// current viewer is OCC or VTK + SALOME_Prs* prs = aViewFrame->CreatePrs( IObject->getEntry() ); + if ( aViewFrame->isVisible( IObject ) ) { + ////// object is already displayed in the viewer + popup->removeItem( QAD_Display_Popup_ID ); + if ( isOCCViewer ) { + ////// OCC viewer only + OCCViewer_Prs* occPrs = dynamic_cast( prs ); + if ( occPrs && !occPrs->IsNull() ) { + AIS_ListOfInteractive ioList; + occPrs->GetObjects( ioList ); + QMenuItem* mi = popup->findItem( 803 ); + if ( mi && mi->popup() ) { + if ( ioList.First()->DisplayMode() == 0 ) + mi->popup()->setItemChecked( 80311, true ); // "Wireframe" + else if ( ioList.First()->DisplayMode() == 1 ) + mi->popup()->setItemChecked( 80312, true ); // "Shading" + else if ( ioList.First()->DisplayMode() < 0 ) + mi->popup()->setItemChecked( aDisplayMode == 0 ? 80311 : 80312 , true ); // "Wireframe" or "Shading" + } + } + } + else { + ////// VTK viewer only + popup->removeItem( 8034 ); // "Isos" + VTKViewer_Prs* vtkPrs = dynamic_cast( prs ); + if ( vtkPrs && !vtkPrs->IsNull() ) { + vtkActorCollection* actorList = vtkPrs->GetObjects(); + actorList->InitTraversal(); + SALOME_Actor* ac = SALOME_Actor::SafeDownCast( actorList->GetNextActor() ); + QMenuItem* mi = popup->findItem( 803 ); + if ( ac && mi && mi->popup() ) { + if ( ac->getDisplayMode() == 0 ) + mi->popup()->setItemChecked( 80311, true ); // "Wireframe" + else if ( ac->getDisplayMode() == 1 ) + mi->popup()->setItemChecked( 80312, true ); // "Shading" + else + mi->popup()->setItemChecked( aDisplayMode == 0 ? 80311 : 80312 , true ); // "Wireframe" or "Shading" + } + } + } + } + else { + ////// object is not yet displayed in the viewer + popup->removeItem( 803 ); // "Display Mode" + popup->removeItem( 8032 ); // "Color" + popup->removeItem( 8033 ); // "Transparency" + popup->removeItem( 8034 ); // "Isos" + popup->removeItem( QAD_Erase_Popup_ID ); + } + delete prs; + } + else { + ////// other viewer type (neither OCC nor VTK) + popup->removeItem( 803 ); // "Display Mode" + popup->removeItem( 8032 ); // "Color" + popup->removeItem( 8033 ); // "Transparency" + popup->removeItem( 8034 ); // "Isos" + popup->removeItem( QAD_Display_Popup_ID ); + popup->removeItem( QAD_DisplayOnly_Popup_ID ); + popup->removeItem( QAD_Erase_Popup_ID ); + } + } + } + } + else { + ////// MULTIPLE SELECTION + if ( parentComponent != parent->getActiveComponent() ) { + ////// not GEOM module objects or objects belong to different modules + // remove all commands except Display/Erase... + while ( 1 ) { + int id = popup->idAt( 0 ); + if ( id <= QAD_TopLabel_Popup_ID ) + popup->removeItemAt( 0 ); + else + break; + } + if ( parentComponent.isNull() ) { + ////// objects belong to different modules + popup->removeItem(QAD_Display_Popup_ID); + popup->removeItem(QAD_DisplayOnly_Popup_ID); + popup->removeItem(QAD_Erase_Popup_ID); + } + else { + objectName = tr( "GEOM_MEN_POPUP_NAME" ).arg( nbSel ); + } + } + else { + ////// all selected objects belong to GEOM module + popup->removeItem( 901 ); // "Rename" + + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); + bool isComponent = false; + bool needOpen = false; + bool needDisplay = false; + bool needErase = false; + int needToPublish = 0; + + for( ;It.More();It.Next() ) { + Handle(SALOME_InteractiveObject) anIObject = It.Value(); + + if ( aViewFrame->isVisible( anIObject ) ) + needErase = true; + else + needDisplay = true; + + if( anIObject->hasEntry() ) { + needToPublish = -1; /////// VSR : TO BE REMOVED + SALOMEDS::SObject_var obj = anActiveStudy->getStudyDocument()->FindObjectID( anIObject->getEntry() ); + SALOMEDS::GenericAttribute_var aTmpAttr; + if ( !obj->_is_nil() && !obj->GetFatherComponent()->FindAttribute( aTmpAttr, "AttributeIOR" ) ) + needOpen = true; /////// VSR : TO BE REMOVED + if ( !obj->_is_nil() && QString( obj->GetID() ) == QString( obj->GetFatherComponent()->GetID() ) ) + isComponent = true; + } + else { + if ( needToPublish != -1 ) needToPublish = 1; + } + } + if( needOpen || ( !isOCCViewer && !isVTKViewer ) ) { + ////// Data is not loaded yet or current viewer is neither OCC nor VTK + popup->removeItem( 803 ); // "Display Mode" + popup->removeItem( 8032 ); // "Color" + popup->removeItem( 8033 ); // "Transparency" + popup->removeItem( 8034 ); // "Isos" + popup->removeItem( 804 ); // "Add in Study" + popup->removeItem( QAD_DisplayOnly_Popup_ID ); + popup->removeItem( QAD_Display_Popup_ID ); + popup->removeItem( QAD_Erase_Popup_ID ); + } + else { + popup->removeItem( 9024 ); // "Open" + if ( needToPublish <= 0 ) + popup->removeItem( 804 ); // "Add in Study" + + if( isComponent ) { + popup->removeItem( 803 ); // "Display Mode" + popup->removeItem( 8032 ); // "Color" + popup->removeItem( 8033 ); // "Transparency" + popup->removeItem( 8034 ); // "Isos" + popup->removeItem( QAD_DisplayOnly_Popup_ID ); + } + + if ( !needDisplay ) + popup->removeItem( QAD_Display_Popup_ID ); + if ( !needErase ) + popup->removeItem( QAD_Erase_Popup_ID ); + if ( !isOCCViewer ) + popup->removeItem( 8034 ); // "Isos" + } + } + } - //Load Function BuildPresentation - OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("CustomPopup"); - CP (*f1) = NULL; - if(osdF != NULL) { - f1 = (bool (*) (QAD_Desktop*, QPopupMenu*, const QString&, - const QString&, const QString&)) osdF; - (*f1)(parent, popup, theContext, theParent, theObject); + // check popup for unnecessary separators + QAD_Tools::checkPopup( popup ); + // find popup menu's TopLabel item (with title) + int topItem = popup->indexOf( QAD_TopLabel_Popup_ID ); + if ( topItem >= 0 ) { + // remove popup menu's title item + popup->removeItem( QAD_TopLabel_Popup_ID ); + if ( theParent == "Viewer" && !objectName.isEmpty() && popup->count() > 0 ) { + // set bold font for popup menu's title + QFont f = QApplication::font(); f.setBold( TRUE ); + popup->removeItem( QAD_TopLabel_Popup_ID ); + popup->insertItem( new CustomItem( objectName, f ), QAD_TopLabel_Popup_ID, topItem ); + } } - else - return false; - return true; + return false; } - //================================================================================= -// function : activeStudyChanged() +// function : GeometryGUI::ActiveStudyChanged() // purpose : static //================================================================================= bool GeometryGUI::ActiveStudyChanged(QAD_Desktop* parent) { - GeometryGUI::GetOrCreateGeometryGUI(parent); + GeometryGUI* geomGUI = GetGeomGUI(); + QAD_Study* ActiveStudy = parent->getActiveStudy(); + QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar(); + int DisplayMode = 0; + bool ViewOCC = false; - if(GeomGUI != 0) { - QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar(); - bool ViewOCC = false; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) - ViewOCC = true; + if( ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); + Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); + DisplayMode = ic->DisplayMode(); + ViewOCC = true; + } + else if( ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) { + VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); + DisplayMode = myRenderInter->GetDisplayMode(); + } - Mb->setItemEnabled(404, ViewOCC);//SKETCHER + if( DisplayMode == 1 ) + Mb->changeItem( 211, tr( "GEOM_MEN_WIREFRAME" ) ); + else + Mb->changeItem( 211, tr( "GEOM_MEN_SHADING" ) ); - Mb->setItemEnabled(603, ViewOCC);//SuppressFace - Mb->setItemEnabled(604, ViewOCC);//SuppressHole - - Mb->setItemEnabled(413, ViewOCC);// ShadingColor Settings - Mb->setItemEnabled(414, ViewOCC);// Isos Settings + //Mb->setItemEnabled( 404, ViewOCC ); // SKETCHER + Mb->setItemEnabled( 603, ViewOCC ); // SuppressFace + Mb->setItemEnabled( 604, ViewOCC ); // SuppressHole + Mb->setItemEnabled( 606, ViewOCC ); // CloseContour + Mb->setItemEnabled( 413, ViewOCC ); // Isos Settings + Mb->setItemEnabled(9998, ViewOCC ); // MENU BLOCKS - MULTI-TRANSFORMATION - GeomGUI->EmitSignalCloseAllDialogs(); - GeomGUI = 0; - } + geomGUI->EmitSignalCloseAllDialogs(); // PAL5356: update VTK selection - ::UpdateVtkSelection(parent); + ::UpdateVtkSelection( parent ); - return true; + bool bOk = true; + GUIMap::Iterator it; + for ( it = geomGUI->myGUIMap.begin(); it != geomGUI->myGUIMap.end(); ++it ) + bOk = bOk && it.data()->ActiveStudyChanged( parent ); + return bOk; } - //======================================================================= -// function : BuildPresentation() +// function : GeometryGUI::BuildPresentation() // purpose : static //======================================================================= -void GeometryGUI::BuildPresentation(const Handle(SALOME_InteractiveObject)& theIO) +void GeometryGUI::BuildPresentation( const Handle(SALOME_InteractiveObject)& theIO, + QAD_ViewFrame* theViewFrame ) { - GeometryGUI::GetOrCreateGeometryGUI(QAD_Application::getDesktop()); - - if(!GeomGUI->LoadLibrary("libDisplayGUI.so")) - return; - - //Load Function BuildPresentation - OSD_Function osdF = GeomGUI->myGUILibrary.DlSymb("BuildPresentation"); - BP (*f1) = NULL; - if(osdF != NULL) { - f1 = (void (*) (const Handle(SALOME_InteractiveObject)&)) osdF; - (*f1)(theIO); - } - return; + GEOM_Displayer().Display( theIO, false, theViewFrame ); } - void GeometryGUI::SupportedViewType(int* buffer, int bufferSize) { if(!buffer || !bufferSize) return; buffer[0] = (int)VIEW_OCC; if (--bufferSize) buffer[1] = (int)VIEW_VTK; } - -void GeometryGUI::Deactivate() -{ - if ( GeomGUI ) - GeomGUI->EmitSignalCloseAllDialogs(); -} - -static GeometryGUI aGUI(""); -extern "C" -{ - Standard_EXPORT SALOMEGUI* GetComponentGUI() { - return &aGUI; - } -} diff --git a/src/GEOMGUI/GeometryGUI.h b/src/GEOMGUI/GeometryGUI.h index 06649f622..255c46f12 100644 --- a/src/GEOMGUI/GeometryGUI.h +++ b/src/GEOMGUI/GeometryGUI.h @@ -30,7 +30,18 @@ #define GEOMETRYGUI_H #include "SALOMEGUI.h" -#include "GEOMContext.h" + +#include "GEOMGUI.h" +#include "GEOM_Client.hxx" +#include "SALOME_InteractiveObject.hxx" +#include + +#include "gp_Ax3.hxx" + +typedef QMap GUIMap; + +class QDialog; +class QPopupMenu; //================================================================================= // class : GeometryGUI @@ -38,27 +49,74 @@ //================================================================================= class GeometryGUI : public SALOMEGUI { - Q_OBJECT /* for QT compatibility */ + Q_OBJECT; + +protected: + // Constructor + GeometryGUI(); // hide constructor to avoid direct creation + // get or load GUI library by name + GEOMGUI* getLibrary( const QString& libraryName ); -public : - GeometryGUI( const QString& name = "", QObject* parent = 0 ); +public: + // Destructor ~GeometryGUI(); + + // Get the only GeometryGUI object + static GeometryGUI* GetGeomGUI(); + + static CORBA::ORB_var GetORB(); + + GEOM::GEOM_Gen_ptr GetGeomGen() { return myComponentGeom; } + GEOM_Client& GetShapeReader() { return myShapeReader; } + Standard_CString& GetFatherior() { return myFatherior; } + void SetState( const int state ) { myState = state; } + int GetState() const { return myState; } - static GEOMContext* GetOrCreateGeometryGUI(QAD_Desktop* desktop); - - /* Managed by IAPP */ + // Get active dialog box + QDialog* GetActiveDialogBox(){ return myActiveDialogBox; } + // Set active dialog box + void SetActiveDialogBox( QDialog* aDlg ); + + // Non modal dialog boxes management + void EmitSignalDeactivateDialog(); + void EmitSignalCloseAllDialogs(); + void EmitSignalDefaultStepValueChanged( double newVal ); + + // The following methods are called from IAPP virtual bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); virtual bool OnMousePress(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame); virtual bool OnMouseMove(QMouseEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame); virtual bool OnKeyPress(QKeyEvent* pe, QAD_Desktop* parent, QAD_StudyFrame* studyFrame); virtual bool SetSettings(QAD_Desktop* parent); virtual bool ActiveStudyChanged(QAD_Desktop* parent); - virtual void BuildPresentation(const Handle(SALOME_InteractiveObject)&); + virtual void Deactivate(); + virtual void BuildPresentation( const Handle(SALOME_InteractiveObject)&, + QAD_ViewFrame* = 0 ); + virtual void SupportedViewType (int* buffer, int bufferSize); virtual void DefinePopup(QString & theContext, QString & theParent, QString & theObject); virtual bool CustomPopup(QAD_Desktop* parent, QPopupMenu* popup, const QString& theContext, const QString& theParent, const QString& theObject); - virtual void SupportedViewType (int* buffer, int bufferSize); - virtual void Deactivate (); + + // The Working Plane management + void SetWorkingPlane(gp_Ax3 WorkingPlane) { myWorkingPlane = WorkingPlane; }; + gp_Ax3 GetWorkingPlane() { return myWorkingPlane; }; + void ActiveWorkingPlane(); + +signals : + void SignalDeactivateActiveDialog(); + void SignalCloseAllDialogs(); + void SignalDefaultStepValueChanged( double newVal ); + +private: + static GeometryGUI* myContext; // the only GeometryGUI object + + GUIMap myGUIMap; // GUI libraries map + QDialog* myActiveDialogBox; // active dialog box + GEOM_Client myShapeReader; // geom shape reader + Standard_CString myFatherior; + GEOM::GEOM_Gen_var myComponentGeom; // GEOM engine + int myState; // identify a method + gp_Ax3 myWorkingPlane; }; #endif diff --git a/src/GEOMGUI/GeometryGUI_Swig.cxx b/src/GEOMGUI/GeometryGUI_Swig.cxx index bb7159bbb..ead4659da 100644 --- a/src/GEOMGUI/GeometryGUI_Swig.cxx +++ b/src/GEOMGUI/GeometryGUI_Swig.cxx @@ -26,9 +26,8 @@ // Module : GEOM // $Header$ -using namespace std; #include "GeometryGUI_Swig.hxx" -#include "utilities.h" +#include "SALOMEGUI_Swig.hxx" #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -38,6 +37,7 @@ using namespace std; #include "SALOMEGUI_ImportOperation.h" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" #include #include #include @@ -51,6 +51,8 @@ using namespace std; #include #include +#include "SALOME_Event.hxx" + #include "VTKViewer_RenderWindowInteractor.h" #include "VTKViewer_ViewFrame.h" @@ -60,8 +62,18 @@ using namespace std; #include "GEOM_AssemblyBuilder.h" #include "GEOM_InteractiveObject.hxx" +#include "utilities.h" + +using namespace std; + static GEOM_Client ShapeReader; + +template inline TViewFrame* GetFrame(QAD_Study* theStudy){ + return dynamic_cast(SALOME::GetViewFrame(theStudy)); +} + + GEOM_Swig::GEOM_Swig() { // MESSAGE("Constructeur"); @@ -82,27 +94,29 @@ void GEOM_Swig::createAndDisplayGO(const char* Entry) Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); GEOM::GEOM_Gen_var Geom = GEOM::GEOM_Gen::_narrow(comp); - Standard_CString Fatherior = ""; + CORBA::String_var aFatherIOR; SALOMEDS::SComponent_var father = aStudy->FindComponent("GEOM"); aStudyBuilder->DefineComponentInstance( father, Geom ); - father->ComponentIOR( Fatherior ); + father->ComponentIOR(aFatherIOR); SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(ActiveStudy->getActiveStudyFrame()->entry()); SALOMEDS::SObject_var obj = aStudy->FindObjectID(Entry); SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; SALOMEDS::AttributeIOR_var anIOR; // Create new actor if ( !obj->FindAttribute(anAttr, "AttributeIOR")) return; anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var aShape = Geom->GetIORFromString(anIOR->Value()); + CORBA::String_var anIORValue = anIOR->Value(); + + GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(anIORValue); TopoDS_Shape Shape = ShapeReader.GetShape(Geom,aShape); if ( !obj->_is_nil() ) { if (obj->FindAttribute(anAttr, "AttributeName")) { - aName = SALOMEDS::AttributeName::_narrow(anAttr); + SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr); + CORBA::String_var aNameValue = aName->Value(); // open transaction QAD_Operation* op = new SALOMEGUI_ImportOperation( ActiveStudy ); op->start(); @@ -112,60 +126,65 @@ void GEOM_Swig::createAndDisplayGO(const char* Entry) // commit transaction op->finish(); - if ( ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) { // VTK - //vtkQGLRenderWindowInteractor* myRenderInter = ActiveStudy->getActiveStudyFrame()->getRightFrame()->getVTKView()->getRWInteractor(); - VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - int themode = myRenderInter->GetDisplayMode(); + Handle(GEOM_InteractiveObject) anIO = new GEOM_InteractiveObject(const_cast(anIORValue.in()), + const_cast(aFatherIOR.in()), + "GEOM", + const_cast(obj->GetID())); - vtkActorCollection* theActors = - GEOM_AssemblyBuilder::BuildActors(Shape,0,themode,Standard_True); - theActors->InitTraversal(); - vtkActor* anActor = (vtkActor*)theActors->GetNextActor(); - while(!(anActor==NULL)) { - GEOM_Actor* GActor = GEOM_Actor::SafeDownCast( anActor ); - Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(anIOR->Value(), - Fatherior, - "GEOM"); - IO->setEntry(obj->GetID()); - GActor->setIO( IO ); - GActor->setName( aName->Value() ); - - myRenderInter->Display(GActor); - anActor = (vtkActor*)theActors->GetNextActor(); - } - myRenderInter->Update(); - } - else if ( ActiveStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) // OCC - { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)ActiveStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - // QAD_Viewer3d* v3d = ActiveStudy->getActiveStudyFrame()->getViewerOCC(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - Handle(GEOM_AISShape) aSh = new GEOM_AISShape(Shape, aName->Value()); - Handle(GEOM_InteractiveObject) IO = new GEOM_InteractiveObject(anIOR->Value(), - Fatherior, - "GEOM"); - - IO->setEntry(obj->GetID()); - aSh->setIO( IO ); - aSh->setName( aName->Value() ); - ic->Display (aSh); - ic->AddOrRemoveCurrentObject(aSh, true); - } + class TEvent: public SALOME_Event{ + QAD_Study* myStudy; + TopoDS_Shape myShape; + Handle(SALOME_InteractiveObject) myIO; + const char* myName; + public: + TEvent(QAD_Study* theStudy, TopoDS_Shape theShape, + const Handle(SALOME_InteractiveObject)& theIO, + const char* theName): + myStudy(theStudy), myShape(theShape), + myIO(theIO), myName(theName) + {} + virtual void Execute(){ + if(VTKViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + VTKViewer_RenderWindowInteractor* myRenderInter= aViewFrame->getRWInteractor(); + int aMode = myRenderInter->GetDisplayMode(); + + vtkActorCollection* theActors = GEOM_AssemblyBuilder::BuildActors(myShape,0,aMode,true); + theActors->InitTraversal(); + while(vtkActor* anActor = theActors->GetNextActor()){ + GEOM_Actor* GActor = GEOM_Actor::SafeDownCast(anActor); + GActor->setName(const_cast(myName)); + GActor->setIO(myIO); + myRenderInter->Display(GActor); + } + myRenderInter->Update(); + }else if(OCCViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + Handle(AIS_InteractiveContext) ic = aViewFrame->getViewer()->getAISContext(); + Handle(GEOM_AISShape) aSh = new GEOM_AISShape(myShape,const_cast(myName)); + aSh->setName(const_cast(myName)); + aSh->setIO(myIO); + + ic->Display(aSh); + ic->AddOrRemoveCurrentObject(aSh,true); + } + myStudy->updateObjBrowser(true); + } + }; + ProcessVoidEvent(new TEvent(ActiveStudy,Shape,anIO,aNameValue.in())); } } - ActiveStudy->updateObjBrowser( true ); } + int GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR) { Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); GEOM::GEOM_Gen_var Geom = GEOM::GEOM_Gen::_narrow(comp); - GEOM::GEOM_Shape_var aMainShape = Geom->GetIORFromString(IOR); - TopoDS_Shape shape = ShapeReader.GetShape(Geom, aMainShape); + GEOM::GEOM_Object_var aMainShape = Geom->GetIORFromString(IOR); + TopoDS_Shape shape = ShapeReader.GetShape(Geom, aMainShape); - GEOM::GEOM_Shape_var aSubShape = Geom->GetIORFromString(SubIOR); - TopoDS_Shape subshape = ShapeReader.GetShape(Geom, aSubShape); + GEOM::GEOM_Object_var aSubShape = Geom->GetIORFromString(SubIOR); + TopoDS_Shape subshape = ShapeReader.GetShape(Geom, aSubShape); int index = 1; if(subshape.ShapeType() == TopAbs_COMPOUND) { @@ -205,7 +224,7 @@ const char* GEOM_Swig::getShapeTypeString(const char* IOR) Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); GEOM::GEOM_Gen_var Geom = GEOM::GEOM_Gen::_narrow(comp); - GEOM::GEOM_Shape_var aShape = Geom->GetIORFromString(IOR); + GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(IOR); TopoDS_Shape shape = ShapeReader.GetShape(Geom, aShape); if( shape.IsNull() ) { @@ -273,13 +292,14 @@ const char* GEOM_Swig::getShapeTypeIcon(const char* IOR) Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); GEOM::GEOM_Gen_var Geom = GEOM::GEOM_Gen::_narrow(comp); - GEOM::GEOM_Shape_var aShape = Geom->GetIORFromString(IOR); + GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(IOR); + TopoDS_Shape shape = ShapeReader.GetShape(Geom, aShape); - if( aShape->_is_nil() ) { + if( shape.IsNull() ) { return "None" ; } - switch (aShape->ShapeType() ) + switch (shape.ShapeType() ) { case TopAbs_COMPOUND: { return "ICON_OBJBROWSER_COMPOUND" ;} @@ -301,61 +321,87 @@ const char* GEOM_Swig::getShapeTypeIcon(const char* IOR) return "None"; } -void GEOM_Swig::setDisplayMode(const char* Entry, int mode) +void GEOM_Swig::setDisplayMode(const char* theEntry, int theMode) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - Handle(SALOME_InteractiveObject) IO = - myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->FindIObject( Entry ); - - if ( myStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) { // VTK - VTKViewer_RenderWindowInteractor* myRenderInter = - ((VTKViewer_ViewFrame*)myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - myRenderInter->SwitchRepresentation(IO, mode); - myRenderInter->Update(); - } - else if ( myStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) // OCC - { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - v3d->SwitchRepresentation(IO, mode); + QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); + Handle(SALOME_InteractiveObject) anIO = SALOME::FindIObject(aStudy,theEntry); + + class TEvent: public SALOME_Event{ + QAD_Study* myStudy; + Handle(SALOME_InteractiveObject) myIO; + int myParam; + public: + TEvent(QAD_Study* theStudy, const Handle(SALOME_InteractiveObject)& theIO, int theParam): + myStudy(theStudy), myIO(theIO), myParam(theParam) + {} + virtual void Execute(){ + if(VTKViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + VTKViewer_RenderWindowInteractor* myRenderInter= aViewFrame->getRWInteractor(); + myRenderInter->SetDisplayMode(myIO,myParam); + myRenderInter->Update(); + }else if(OCCViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + OCCViewer_Viewer3d* v3d = aViewFrame->getViewer(); + v3d->SwitchRepresentation(myIO,myParam); + } } + }; + + ProcessVoidEvent(new TEvent(aStudy,anIO,theMode)); } -void GEOM_Swig::setColor(const char* Entry, int red, int green, int blue) +void GEOM_Swig::setColor(const char* theEntry, int red, int green, int blue) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - QColor c = QColor (red, green, blue); - Handle(SALOME_InteractiveObject) IO = - myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->FindIObject( Entry ); - - if ( myStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) { // VTK - VTKViewer_RenderWindowInteractor* myRenderInter = - ((VTKViewer_ViewFrame*)myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - myRenderInter->SetColor(IO,c); - myRenderInter->Update(); - } - else if ( myStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) // OCC - { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - v3d->SetColor(IO,c); + QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); + Handle(SALOME_InteractiveObject) anIO = SALOME::FindIObject(aStudy,theEntry); + QColor aColor(red,green,blue); + + class TEvent: public SALOME_Event{ + QAD_Study* myStudy; + Handle(SALOME_InteractiveObject) myIO; + QColor myParam; + public: + TEvent(QAD_Study* theStudy, const Handle(SALOME_InteractiveObject)& theIO, const QColor& theParam): + myStudy(theStudy), myIO(theIO), myParam(theParam) + {} + virtual void Execute(){ + if(VTKViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + VTKViewer_RenderWindowInteractor* myRenderInter= aViewFrame->getRWInteractor(); + myRenderInter->SetColor(myIO,myParam); + myRenderInter->Update(); + }else if(OCCViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + OCCViewer_Viewer3d* v3d = aViewFrame->getViewer(); + v3d->SetColor(myIO,myParam); + } } + }; + + ProcessVoidEvent(new TEvent(aStudy,anIO,aColor)); } -void GEOM_Swig::setTransparency(const char* Entry, float transp) +void GEOM_Swig::setTransparency(const char* theEntry, float transp) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - Handle(SALOME_InteractiveObject) IO = - myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->FindIObject( Entry ); - - if ( myStudy->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) { // VTK - VTKViewer_RenderWindowInteractor* myRenderInter = - ((VTKViewer_ViewFrame*)myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - myRenderInter->SetTransparency(IO,transp); - myRenderInter->Update(); - } - else if ( myStudy->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) // OCC - { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - v3d->SetTransparency(IO,transp); + QAD_Study* aStudy = QAD_Application::getDesktop()->getActiveStudy(); + Handle(SALOME_InteractiveObject) anIO = SALOME::FindIObject(aStudy,theEntry); + + class TEvent: public SALOME_Event{ + QAD_Study* myStudy; + Handle(SALOME_InteractiveObject) myIO; + float myParam; + public: + TEvent(QAD_Study* theStudy, const Handle(SALOME_InteractiveObject)& theIO, float theParam): + myStudy(theStudy), myIO(theIO), myParam(theParam) + {} + virtual void Execute(){ + if(VTKViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + VTKViewer_RenderWindowInteractor* myRenderInter= aViewFrame->getRWInteractor(); + myRenderInter->SetTransparency(myIO,myParam); + myRenderInter->Update(); + }else if(OCCViewer_ViewFrame* aViewFrame = GetFrame(myStudy)){ + OCCViewer_Viewer3d* v3d = aViewFrame->getViewer(); + v3d->SetTransparency(myIO,myParam); + } } + }; + + ProcessVoidEvent(new TEvent(aStudy,anIO,transp)); } diff --git a/src/GEOMGUI/Makefile.in b/src/GEOMGUI/Makefile.in index 9576c2d35..bd17ccd48 100644 --- a/src/GEOMGUI/Makefile.in +++ b/src/GEOMGUI/Makefile.in @@ -34,29 +34,41 @@ VPATH=.:@srcdir@:@top_srcdir@/idl @COMMENCE@ +# ressources files +PO_FILES = \ + GEOM_icons.po \ + GEOM_msg_en.po \ + GEOM_msg_fr.po + # header files -EXPORT_HEADERS= GeometryGUI_Swig.hxx \ - GeometryGUI_Swig.i +EXPORT_HEADERS= GeometryGUI.h \ + GEOMGUI.h \ + GeometryGUI_Swig.hxx \ + GeometryGUI_Swig.i \ + GEOM_Displayer.h # Libraries targets LIB = libGEOMGUI.la LIB_SRC = GeometryGUI.cxx \ - GeometryGUI_Swig.cxx + GeometryGUI_Swig.cxx \ + GEOM_Displayer.cxx \ + GEOMGUI.cxx LIB_MOC = \ GeometryGUI.h \ LIB_CLIENT_IDL = SALOME_Exception.idl \ SALOMEDS.idl \ - SALOMEDS_Attributes.idl + SALOMEDS_Attributes.idl \ + SALOME_GenericObj.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lGEOMContext +LDFLAGS += -L$(KERNEL_ROOT_DIR)/lib/salome -lOCCViewer -lVTKViewer -lSalomeGUI -lGEOMClient -lGEOMObject -lGEOMFiltersSelection @CONCLUDE@ diff --git a/src/GEOMImpl/GEOMImpl_ArcDriver.cxx b/src/GEOMImpl/GEOMImpl_ArcDriver.cxx new file mode 100644 index 000000000..2e8b5d7ec --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ArcDriver.cxx @@ -0,0 +1,132 @@ + +using namespace std; +#include "GEOMImpl_ArcDriver.hxx" +#include "GEOMImpl_IArc.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ArcDriver::GetID() +{ + static Standard_GUID aArcDriver("FF1BBB35-5D14-4df2-980B-3A668264EA16"); + return aArcDriver; +} + + +//======================================================================= +//function : GEOMImpl_ArcDriver +//purpose : +//======================================================================= +GEOMImpl_ArcDriver::GEOMImpl_ArcDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ArcDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IArc aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == CIRC_ARC_THREE_PNT) { + Handle(GEOM_Function) aRefPoint1 = aCI.GetPoint1(); + Handle(GEOM_Function) aRefPoint2 = aCI.GetPoint2(); + Handle(GEOM_Function) aRefPoint3 = aCI.GetPoint3(); + TopoDS_Shape aShapePnt1 = aRefPoint1->GetValue(); + TopoDS_Shape aShapePnt2 = aRefPoint2->GetValue(); + TopoDS_Shape aShapePnt3 = aRefPoint3->GetValue(); + if (aShapePnt1.ShapeType() == TopAbs_VERTEX && + aShapePnt2.ShapeType() == TopAbs_VERTEX && + aShapePnt3.ShapeType() == TopAbs_VERTEX) { + gp_Pnt aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt1)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt2)); + gp_Pnt aP3 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt3)); + if (aP1.Distance(aP2) < gp::Resolution() || + aP1.Distance(aP3) < gp::Resolution() || + aP2.Distance(aP3) < gp::Resolution()) + Standard_ConstructionError::Raise("Arc creation aborted: coincident points given"); + if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular())) + Standard_ConstructionError::Raise("Arc creation aborted: points lay on one line"); + GC_MakeArcOfCircle arc (aP1, aP2, aP3); + aShape = BRepBuilderAPI_MakeEdge(arc).Edge(); + } + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ArcDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArcDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArcDriver", + sizeof(GEOMImpl_ArcDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ArcDriver) Handle(GEOMImpl_ArcDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ArcDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ArcDriver))) { + _anOtherObject = Handle(GEOMImpl_ArcDriver)((Handle(GEOMImpl_ArcDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ArcDriver.hxx b/src/GEOMImpl/GEOMImpl_ArcDriver.hxx new file mode 100644 index 000000000..95cee034a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ArcDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ArcDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ArcDriver_HeaderFile +#define _GEOMImpl_ArcDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ArcDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ArcDriver); + +class Handle(GEOMImpl_ArcDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ArcDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ArcDriver)(const Handle(GEOMImpl_ArcDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ArcDriver)(const GEOMImpl_ArcDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ArcDriver)& operator=(const Handle(GEOMImpl_ArcDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ArcDriver)& operator=(const GEOMImpl_ArcDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ArcDriver* operator->() + { + return (GEOMImpl_ArcDriver *)ControlAccess(); + } + + GEOMImpl_ArcDriver* operator->() const + { + return (GEOMImpl_ArcDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ArcDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ArcDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ArcDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ArcDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ArcDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ArcDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ArcDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ArcDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx new file mode 100644 index 000000000..05114c950 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.cxx @@ -0,0 +1,168 @@ + +#include "GEOMImpl_ArchimedeDriver.hxx" +#include "GEOMImpl_IArchimede.hxx" +#include "GEOMImpl_Types.hxx" + +#include "Archimede_VolumeSection.hxx" + +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +using namespace std; + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ArchimedeDriver::GetID() +{ + static Standard_GUID aArchimedeDriver("FF1BBB59-5D14-4df2-980B-3A668264EA16"); + return aArchimedeDriver; +} + + +//======================================================================= +//function : GEOMImpl_ArchimedeDriver +//purpose : +//======================================================================= + +GEOMImpl_ArchimedeDriver::GEOMImpl_ArchimedeDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ArchimedeDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + Standard_Integer aType = aFunction->GetType(); + if (aType != ARCHIMEDE_TYPE) return 0; + + GEOMImpl_IArchimede IA (aFunction); + + Handle(GEOM_Function) aShapeFunction = IA.GetBasicShape(); + if (aShapeFunction.IsNull()) return 0; + TopoDS_Shape shape = aShapeFunction->GetValue(); + if(shape.IsNull()) return 0; + + Standard_Real aWaterDensity = IA.GetDensity(); + Standard_Real aWeight = IA.GetWeight(); + Standard_Real aMeshingDeflection = IA.GetDeflection(); + + double cste = -1; + if (aWaterDensity != 0.) + cste = aWeight/aWaterDensity; + else + return 0; + + gp_Dir direct (0.0, 0.0, 1.0); + gp_Pnt PosPlan (0.0, 0.0, 0.0); + Geom_Plane PP (PosPlan, direct); + Handle(Geom_Plane) P = Handle(Geom_Plane)::DownCast(PP.Copy()); + + gp_Dir Zdirection (0.0, 0.0, 1.0); + VolumeSection VOL (shape, aMeshingDeflection); + VOL.SetPlane(P); + Handle(Geom_RectangularTrimmedSurface) SurfaceTrimmee; + + if (Zdirection.IsEqual(direct, Precision::Angular()) == Standard_False) { + VOL.MakeRotation(direct); + } + + VOL.CenterOfGravity(); + SurfaceTrimmee = VOL.TrimSurf(); + Standard_Real Cote = VOL.Archimede(cste, aMeshingDeflection); + + if (Cote == -1) { + double Zmin,Zmax; + VOL.getZ(Zmin,Zmax); + double volume = VOL.CalculateVolume(Zmax) * aWaterDensity; + + char msg[100] = ""; + sprintf(msg, "shape sinks to the bottom : Weigth max = %.1f", volume); + + StdFail_NotDone::Raise(msg); + } + + SurfaceTrimmee = VOL.AjustePlan(SurfaceTrimmee,Cote,PosPlan); + if (Zdirection.IsEqual(direct,Precision::Angular()) == Standard_False) { + SurfaceTrimmee = VOL.InvMakeRotation(direct,SurfaceTrimmee); + } + + Standard_Real u1,u2,v1,v2; + SurfaceTrimmee->Bounds(u1,u2,v1,v2); + TopoDS_Face tirant = BRepBuilderAPI_MakeFace(SurfaceTrimmee, u1, u2, v1, v2); + + if (tirant.IsNull()) { + StdFail_NotDone::Raise("Failed to build secant face"); + } + + aFunction->SetValue(tirant); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ArchimedeDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ArchimedeDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ArchimedeDriver", + sizeof(GEOMImpl_ArchimedeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_ArchimedeDriver) Handle(GEOMImpl_ArchimedeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ArchimedeDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ArchimedeDriver))) { + _anOtherObject = Handle(GEOMImpl_ArchimedeDriver)((Handle(GEOMImpl_ArchimedeDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_ArchimedeDriver.hxx b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.hxx new file mode 100644 index 000000000..ba2fcfb29 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ArchimedeDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ArchimedeDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ArchimedeDriver_HeaderFile +#define _GEOMImpl_ArchimedeDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ArchimedeDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ArchimedeDriver); + +class Handle(GEOMImpl_ArchimedeDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ArchimedeDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ArchimedeDriver)(const Handle(GEOMImpl_ArchimedeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ArchimedeDriver)(const GEOMImpl_ArchimedeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ArchimedeDriver)& operator=(const Handle(GEOMImpl_ArchimedeDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ArchimedeDriver)& operator=(const GEOMImpl_ArchimedeDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ArchimedeDriver* operator->() + { + return (GEOMImpl_ArchimedeDriver *)ControlAccess(); + } + + GEOMImpl_ArchimedeDriver* operator->() const + { + return (GEOMImpl_ArchimedeDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ArchimedeDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ArchimedeDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ArchimedeDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ArchimedeDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ArchimedeDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ArchimedeDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ArchimedeDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ArchimedeDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx b/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx new file mode 100644 index 000000000..71987a990 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Block6Explorer.cxx @@ -0,0 +1,1213 @@ +using namespace std; + +#include + +#include "GEOMImpl_Block6Explorer.hxx" + +#include "utilities.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#define NBFACES 6 +#define NBEDGES 12 +#define NBVERTS 8 + +static Standard_Integer mod4 (Standard_Integer nb) +{ + if (nb <= 0) return nb + 4; + if (nb > 4) return nb - 4; + return nb; +} + +static Standard_Integer edge_id (const Standard_Integer theFaceID, + const Standard_Integer theEdgeNB) +{ + static Standard_Integer edge_ids[NBFACES][4] = { + { 1, 2, 3, 4 }, // face 1 + { 5, 6, 7, 8 }, // face 2 + { 9, 5, 10, 1 }, // face 3 + { 12, 7, 11, 3 }, // face 4 + { 4, 12, 8, 9 }, // face 5 + { 2, 11, 6, 10 } }; // face 6 + + return edge_ids[theFaceID - 1][theEdgeNB - 1]; +} + +static Standard_Integer side_edge_id (const Standard_Integer theEdgeNB) +{ + static Standard_Integer side_edge_ids[4] = {9, 10, 11, 12}; + + return side_edge_ids[theEdgeNB - 1]; +} + +static Standard_Integer vertex_id (const Standard_Integer theFaceID, + const Standard_Integer theVertexNB) +{ + static Standard_Integer vertex_ids[NBFACES][4] = { + { 1, 2, 3, 4 }, // face 1 + { 5, 6, 7, 8 }, // face 2 + { 1, 5, 6, 2 }, // face 3 + { 4, 8, 7, 3 }, // face 4 + { 1, 4, 8, 5 }, // face 5 + { 2, 3, 7, 6 } }; // face 6 + + return vertex_ids[theFaceID - 1][theVertexNB - 1]; +} + +static Standard_Integer vertex_id_edge (const Standard_Integer theEdgeID, // [1,12] + const Standard_Integer theVertexNB) // [1,2] +{ + static Standard_Integer vertex_ids_edge[NBEDGES][2] = { + {1, 2}, // edge 1 + {2, 3}, // edge 2 + {3, 4}, // edge 3 + {4, 1}, // edge 4 + {5, 6}, // edge 5 + {6, 7}, // edge 6 + {7, 8}, // edge 7 + {8, 5}, // edge 8 + {1, 5}, // edge 9 + {2, 6}, // edge 10 + {3, 7}, // edge 11 + {4, 8} }; // edge 12 + + return vertex_ids_edge[theEdgeID - 1][theVertexNB - 1]; +} + +static Standard_Integer face_id_edges (const Standard_Integer theEdge1ID, // [1,12] + const Standard_Integer theEdge2ID) // [1,12] +{ + static Standard_Integer face_ids_edges[NBEDGES][NBEDGES] = { + // 1 2 3 4 5 6 7 8 9 10 11 12 + { 0, 1, 1, 1, 3, 0, 0, 0, 3, 3, 0, 0 }, // edge 1 + { 1, 0, 1, 1, 0, 6, 0, 0, 0, 6, 6, 0 }, // edge 2 + { 1, 1, 0, 1, 0, 0, 4, 0, 0, 0, 4, 4 }, // edge 3 + { 1, 1, 1, 0, 0, 0, 0, 5, 5, 0, 0, 5 }, // edge 4 + { 3, 0, 0, 0, 0, 2, 2, 2, 3, 3, 0, 0 }, // edge 5 + { 0, 6, 0, 0, 2, 0, 2, 2, 0, 6, 6, 0 }, // edge 6 + { 0, 0, 4, 0, 2, 2, 0, 2, 0, 0, 4, 4 }, // edge 7 + { 0, 0, 0, 5, 2, 2, 2, 0, 5, 0, 0, 5 }, // edge 8 + { 3, 0, 0, 5, 3, 0, 0, 5, 0, 3, 0, 5 }, // edge 9 + { 3, 6, 0, 0, 3, 6, 0, 0, 3, 0, 6, 0 }, // edge 10 + { 0, 6, 4, 0, 0, 6, 4, 0, 0, 6, 0, 4 }, // edge 11 + { 0, 0, 4, 5, 0, 0, 4, 5, 5, 0, 4, 0 } }; // edge 12 + + return face_ids_edges[theEdge1ID - 1][theEdge2ID - 1]; +} + +static Standard_Integer edge_id_vertices (const Standard_Integer theVertex1ID, // [1,8] + const Standard_Integer theVertex2ID) // [1,8] +{ + static Standard_Integer edge_ids_vertices[NBVERTS][NBVERTS] = { + // 1 2 3 4 5 6 7 8 + { 0, 1, 0, 4, 9, 0, 0, 0}, // vertex 1 + { 1, 0, 2, 0, 0, 10, 0, 0}, // vertex 2 + { 0, 2, 0, 3, 0, 0, 11, 0}, // vertex 3 + { 4, 0, 3, 0, 0, 0, 0, 12}, // vertex 4 + { 9, 0, 0, 0, 0, 5, 0, 8}, // vertex 5 + { 0, 10, 0, 0, 5, 0, 6, 0}, // vertex 6 + { 0, 0, 11, 0, 0, 6, 0, 7}, // vertex 7 + { 0, 0, 0, 12, 8, 0, 7, 0} }; // vertex 8 + + return edge_ids_vertices[theVertex1ID - 1][theVertex2ID - 1]; +} + +static Standard_Integer edge_id_faces (const Standard_Integer theFace1ID, // [1,6] + const Standard_Integer theFace2ID) // [1,6] +{ + static Standard_Integer edge_ids_faces[NBFACES][NBFACES] = { + // 1 2 3 4 5 6 + { 0, 0, 1, 3, 4, 2 }, // face 1 + { 0, 0, 5, 7, 8, 6 }, // face 2 + { 1, 5, 0, 0, 9, 10 }, // face 3 + { 3, 7, 0, 0, 12, 11 }, // face 4 + { 4, 8, 9, 12, 0, 0 }, // face 5 + { 2, 6, 10, 11, 0, 0 } }; // face 6 + + return edge_ids_faces[theFace1ID - 1][theFace2ID - 1]; +} + +//======================================================================= +//function : GEOMImpl_Block6Explorer +//purpose : Constructor +//======================================================================= +GEOMImpl_Block6Explorer::GEOMImpl_Block6Explorer () + : myFaces(1,NBFACES), myEdges(1,NBEDGES), myVertices(1,NBVERTS) +{ +} + +//======================================================================= +//function : GetVertex +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_Block6Explorer::GetVertex (const Standard_Integer theVertexID) +{ + TopoDS_Shape aNullShape; + if (theVertexID < 1 || theVertexID > NBVERTS) return aNullShape; + return myVertices(theVertexID); +} + +//======================================================================= +//function : GetVertexID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetVertexID (const TopoDS_Shape& theVertex) +{ + for (Standard_Integer id = 1; id <= NBVERTS; id++) { + if (theVertex.IsSame(myVertices(id))) return id; + } + Standard_NoSuchObject::Raise("The Vertex does not belong to the Block"); + return 0; +} + +//======================================================================= +//function : GetVertexID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetVertexID (const Standard_Integer theFaceID, + const Standard_Integer theVertexNB) +{ + return vertex_id(theFaceID, theVertexNB); +} + +//======================================================================= +//function : GetVertexOnEdgeID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetVertexOnEdgeID + (const Standard_Integer theEdgeID, + const Standard_Integer theVertexNB) +{ + return vertex_id_edge(theEdgeID, theVertexNB); +} + +//======================================================================= +//function : GetEdge +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_Block6Explorer::GetEdge (const Standard_Integer theEdgeID, + const Standard_Boolean doMake) +{ + TopoDS_Shape aNullShape; + if (theEdgeID < 1 || theEdgeID > NBEDGES) return aNullShape; + if (myEdges(theEdgeID).IsNull() && doMake) { + // Create the required edge as a linear segment between + // corresponding vertices and put it in the Block's edges + BRepBuilderAPI_MakeEdge ME (TopoDS::Vertex(myVertices(vertex_id_edge(theEdgeID, 1))), + TopoDS::Vertex(myVertices(vertex_id_edge(theEdgeID, 2)))); + if (!ME.IsDone()) { + Standard_ConstructionError::Raise("Edge construction failed"); + } + myEdges(theEdgeID) = ME.Shape(); + } + + return myEdges(theEdgeID); +} + +//======================================================================= +//function : GetEdgeID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetEdgeID (const TopoDS_Shape& theEdge) +{ + for (Standard_Integer id = 1; id <= NBEDGES; id++) { + if (theEdge.IsSame(myEdges(id))) return id; + } + Standard_NoSuchObject::Raise("The Edge does not belong to the Block"); + return 0; +} + +//======================================================================= +//function : GetEdgeID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetEdgeID (const Standard_Integer theFaceID, + const Standard_Integer theEdgeNB) +{ + return edge_id(theFaceID, theEdgeNB); +} + +//======================================================================= +//function : FindEdgeID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::FindEdgeID (const Standard_Integer theVertex1ID, + const Standard_Integer theVertex2ID) +{ + return edge_id_vertices(theVertex1ID, theVertex2ID); +} + +//======================================================================= +//function : FindCommonEdgeID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::FindCommonEdgeID + (const Standard_Integer theFace1ID, + const Standard_Integer theFace2ID) +{ + return edge_id_faces(theFace1ID, theFace2ID); +} + +//======================================================================= +//function : GetFace +//purpose : +//======================================================================= +TopoDS_Shape GEOMImpl_Block6Explorer::GetFace (const Standard_Integer theFaceID, + const Standard_Boolean doMake) +{ + TopoDS_Shape aNullShape; + if (theFaceID < 1 || theFaceID > NBFACES) return aNullShape; + + if (myFaces(theFaceID).IsNull() && doMake) { + + // Create the required face between + // corresponding edges and put it in the Block's faces + + TopoDS_Shape E1 = GetEdge(edge_id(theFaceID, 1), doMake); + TopoDS_Shape E2 = GetEdge(edge_id(theFaceID, 2), doMake); + TopoDS_Shape E3 = GetEdge(edge_id(theFaceID, 3), doMake); + TopoDS_Shape E4 = GetEdge(edge_id(theFaceID, 4), doMake); + + BRepBuilderAPI_MakeWire MW (TopoDS::Edge(E1), + TopoDS::Edge(E2), + TopoDS::Edge(E3), + TopoDS::Edge(E4)); + if (!MW.IsDone()) { + Standard_ConstructionError::Raise("Wire construction failed"); + } + TopoDS_Shape aFace; + MakeFace(MW, Standard_False, aFace); + if (aFace.IsNull()) { + Standard_ConstructionError::Raise("Face construction failed"); + } + myFaces(theFaceID) = aFace; + } + + return myFaces(theFaceID); +} + +//======================================================================= +//function : GetFaceID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetFaceID (const TopoDS_Shape& theFace) +{ + for (Standard_Integer id = 1; id <= NBFACES; id++) { + if (theFace.IsSame(myFaces(id))) return id; + } + Standard_NoSuchObject::Raise("The Face does not belong to the Block"); + return 0; +} + +//======================================================================= +//function : FindFaceID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::FindFaceID (const Standard_Integer theEdge1ID, + const Standard_Integer theEdge2ID) +{ + return face_id_edges(theEdge1ID, theEdge2ID); +} + +//======================================================================= +//function : GetOppositeFaceID +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::GetOppositeFaceID (const Standard_Integer theFaceID) +{ + Standard_Integer opp_face_id[NBFACES + 1] = { + 0, + 2, // to 1 face + 1, // to 2 face + 4, // to 3 face + 3, // to 4 face + 6, // to 5 face + 5}; // to 6 face + + return opp_face_id[theFaceID]; +} + +//======================================================================= +//function : IsSimilarFaces +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_Block6Explorer::IsSimilarFaces (const Standard_Integer theFace1ID, + const Standard_Integer theFace2ID, + const gp_Trsf theTransformation) +{ + Standard_Integer common_edge_id = FindCommonEdgeID(theFace1ID, theFace2ID); + + if (common_edge_id == 0) { // opposite faces + for (Standard_Integer id = 1; id <= 4; id++) { + TopoDS_Shape E1 = GetEdge(edge_id(theFace1ID, id)); + TopoDS_Shape E2 = GetEdge(edge_id(theFace2ID, id)); + + BRepBuilderAPI_Transform aTrsf (E1, theTransformation, Standard_False); + if (!IsSimilarEdges(aTrsf.Shape(), E2)) + return Standard_False; + } + } else { // the faces have common edge + TopTools_Array1OfShape aVerts1 (1,4); + TopTools_Array1OfShape aVerts2 (1,4); + + Standard_Integer common_vertex1 = GetVertexOnEdgeID(common_edge_id, 1); + Standard_Integer common_vertex2 = GetVertexOnEdgeID(common_edge_id, 2); + aVerts1(1) = myVertices(common_vertex1); + aVerts1(2) = myVertices(common_vertex2); + aVerts2(1) = myVertices(common_vertex1); + aVerts2(2) = myVertices(common_vertex2); + + Standard_Integer not_common_v11 = 0, not_common_v12 = 0; + Standard_Integer vnb, vid; + for (vnb = 1; vnb <= 4; vnb++) { + vid = GetVertexID(theFace1ID, vnb); + if (vid != common_vertex1 && FindEdgeID(vid, common_vertex1) == 0) { + not_common_v12 = vid; + } else { + if (vid != common_vertex2 && FindEdgeID(vid, common_vertex2) == 0) { + not_common_v11 = vid; + } + } + } + + Standard_Integer not_common_v21 = 0, not_common_v22 = 0; + for (vnb = 1; vnb <= 4; vnb++) { + vid = GetVertexID(theFace2ID, vnb); + if (vid != common_vertex1 && FindEdgeID(vid, common_vertex1) == 0) { + not_common_v22 = vid; + } else { + if (vid != common_vertex2 && FindEdgeID(vid, common_vertex2) == 0) { + not_common_v21 = vid; + } + } + } + aVerts1(3) = myVertices(not_common_v11); + aVerts1(4) = myVertices(not_common_v12); + aVerts2(3) = myVertices(not_common_v21); + aVerts2(4) = myVertices(not_common_v22); + + for (Standard_Integer id = 1; id <= 4; id++) { + BRepBuilderAPI_Transform aTrsf (aVerts1(id), theTransformation, Standard_False); + TopoDS_Vertex V1 = TopoDS::Vertex(aTrsf.Shape()); + TopoDS_Vertex V2 = TopoDS::Vertex(aVerts2(id)); + if (!BRepTools::Compare(V1, V2)) { + return Standard_False; + } + } + } + + return Standard_True; +} + +//============ Initialization methods =================================== + +//======================================================================= +//function : InitByBlock +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::InitByBlock (const TopoDS_Shape& theBlock) +{ + // 1. Find any one face of the block + TopExp_Explorer faces (theBlock, TopAbs_FACE); + if (!faces.More()) { + Standard_ConstructionError::Raise("The block has no faces"); + } + TopoDS_Shape aFirstFace = faces.Current(); + + // 2. Store all elements of the block relatively aFirstFace + InitByBlockAndFace(theBlock, aFirstFace); +} + +//======================================================================= +//function : InitByBlockAndFace +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::InitByBlockAndFace (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theFace) +{ + myFaces(1) = theFace; + + // 2. Get wire of the first face + TopExp_Explorer wires (myFaces(1), TopAbs_WIRE); + if (!wires.More()) { + Standard_ConstructionError::Raise("A face of the block has no wires"); + } + TopoDS_Shape aWire = wires.Current(); + wires.Next(); + if (wires.More()) { + Standard_ConstructionError::Raise("A face of the block has more than one wires"); + } + + // 3. Explore wire to init edges and vertices of the first face + BRepTools_WireExplorer aWE (TopoDS::Wire(aWire), TopoDS::Face(myFaces(1))); + Standard_Integer nb = 1; + for (; aWE.More(); aWE.Next(), nb++) { + if (nb > 4) { + Standard_ConstructionError::Raise("A face of the block has more than four edges"); + } + myEdges(edge_id(1, nb)) = aWE.Current(); + myVertices(vertex_id(1, nb)) = aWE.CurrentVertex(); + } + if (nb < 5) { + Standard_ConstructionError::Raise("A face of the block has less than four edges"); + } + + // 2. Store all other elements of the block + InitByBlockAndVertices (theBlock, + myVertices(vertex_id(1,1)), + myVertices(vertex_id(1,2)), + myVertices(vertex_id(1,3))); +} + +//======================================================================= +//function : InitByBlockAndEdges +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::InitByBlockAndEdges (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theEdge1, + const TopoDS_Shape& theEdge3) +{ + // 1. Store vertices and edges of the first face + + // 1.1. Store two given edges + myEdges(edge_id(1, 1)) = theEdge1; + myEdges(edge_id(1, 3)) = theEdge3; + + // 1.2. Find and store the first face + TopTools_IndexedDataMapOfShapeListOfShape MEF; + MapShapesAndAncestors(theBlock, TopAbs_EDGE, TopAbs_FACE, MEF); + if (MEF.Extent() != NBEDGES) { + Standard_TypeMismatch::Raise("Block has wrong number of edges"); + } + const TopTools_ListOfShape& aFacesOfE1 = MEF.FindFromKey(theEdge1); + const TopTools_ListOfShape& aFacesOfE3 = MEF.FindFromKey(theEdge3); + + Standard_Boolean isFound = Standard_False; + TopTools_ListIteratorOfListOfShape anIterF1 (aFacesOfE1); + for (; anIterF1.More() && !isFound; anIterF1.Next()) { + + TopTools_ListIteratorOfListOfShape anIterF3 (aFacesOfE3); + for (; anIterF3.More() && !isFound; anIterF3.Next()) { + + if (anIterF1.Value().IsSame(anIterF3.Value())) { + isFound = Standard_True; + + // Store the face, defined by two opposite edges + myFaces(1) = anIterF1.Value(); + } + } + } + if (!isFound) { + Standard_ConstructionError::Raise + ("Edges 1 and 2 do not belong to one face of the block"); + } + + // 1.3. Make vertices of the first edge the first and the + // second vertices of the first face. Order is free. + TopoDS_Edge E = TopoDS::Edge(theEdge1); + TopoDS_Vertex V1, V2; + TopExp::Vertices(E, V1, V2, Standard_True); + myVertices(vertex_id(1,1)) = V1; + myVertices(vertex_id(1,2)) = V2; + + // Init maps vertex->list_of_edges for the face + TopTools_IndexedDataMapOfShapeListOfShape M1; + MapShapesAndAncestors(myFaces(1), TopAbs_VERTEX, TopAbs_EDGE, M1); + if (M1.Extent() != 4) { + Standard_TypeMismatch::Raise("The first face of block has wrong number of vertices"); + } + + // 1.4. Find and store others elements of the first face + + // edges of the first vertex + TopoDS_Shape E1_f = M1.FindFromKey(V1).First(); + TopoDS_Shape E1_l = M1.FindFromKey(V1).Last(); + + if (E1_f.IsSame(theEdge1)) { + myEdges(edge_id(1, 4)) = E1_l; + } else { + myEdges(edge_id(1, 4)) = E1_f; + } + + // fourth vertex + TopoDS_Edge E4 = TopoDS::Edge(myEdges(edge_id(1, 4))); + TopoDS_Vertex V41, V42; + TopExp::Vertices(E4, V41, V42, Standard_True); + if (V41.IsSame(V1)) { + myVertices(vertex_id(1,4)) = V42; + } else { + myVertices(vertex_id(1,4)) = V41; + } + + // edges of the second vertex + TopoDS_Shape E2_f = M1.FindFromKey(V2).First(); + TopoDS_Shape E2_l = M1.FindFromKey(V2).Last(); + + if (E2_f.IsSame(theEdge1)) { + myEdges(edge_id(1, 2)) = E2_l; + } else { + myEdges(edge_id(1, 2)) = E2_f; + } + + // fird vertex + TopoDS_Edge E2 = TopoDS::Edge(myEdges(edge_id(1, 2))); + TopoDS_Vertex V21, V22; + TopExp::Vertices(E2, V21, V22, Standard_True); + if (V21.IsSame(V2)) { + myVertices(vertex_id(1,3)) = V22; + } else { + myVertices(vertex_id(1,3)) = V21; + } + + // 2. Store all other elements of the block + InitByBlockAndVertices (theBlock, + myVertices(vertex_id(1,1)), + myVertices(vertex_id(1,2)), + myVertices(vertex_id(1,3))); +} + +//======================================================================= +//function : InitByBlockAndVertices +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::InitByBlockAndVertices (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theVertex1, + const TopoDS_Shape& theVertex2, + const TopoDS_Shape& theVertex3) +{ + // Here we suppose, that vertices are ordered, i.e. exists edge between + // theVertex1 and theVertex2 and edge between theVertex2 and theVertex3 + + // 1. Store vertices and edges of the first face. + // If the first face is initialized, it means, that this + // method is called from another initialization method, and all + // vertices and edges of the first face are also initialized + if (myFaces(1).IsNull()) { + + // 1.1. Store first three vertices + myVertices(vertex_id(1, 1)) = theVertex1; + myVertices(vertex_id(1, 2)) = theVertex2; + myVertices(vertex_id(1, 3)) = theVertex3; + + // 1.2. Find and store the first face + TopTools_IndexedDataMapOfShapeListOfShape MVF; + MapShapesAndAncestors(theBlock, TopAbs_VERTEX, TopAbs_FACE, MVF); + if (MVF.Extent() != NBVERTS) { + Standard_TypeMismatch::Raise("Block has wrong number of vertices"); + } + const TopTools_ListOfShape& aFacesOfV1 = MVF.FindFromKey(theVertex1); + const TopTools_ListOfShape& aFacesOfV3 = MVF.FindFromKey(theVertex3); + + Standard_Boolean isFound = Standard_False; + TopTools_ListIteratorOfListOfShape anIterF1 (aFacesOfV1); + for (; anIterF1.More() && !isFound; anIterF1.Next()) { + + TopTools_ListIteratorOfListOfShape anIterF3 (aFacesOfV3); + for (; anIterF3.More() && !isFound; anIterF3.Next()) { + + if (anIterF1.Value().IsSame(anIterF3.Value())) { + isFound = Standard_True; + + // Store the face, defined by two opposite vertices + myFaces(1) = anIterF1.Value(); + } + } + } + if (!isFound) { + Standard_ConstructionError::Raise + ("Vertices 1 and 3 do not belong to one face of the block"); + } + + // Init maps vertex->list_of_edges for the face + TopTools_IndexedDataMapOfShapeListOfShape M1; + MapShapesAndAncestors(myFaces(1), TopAbs_VERTEX, TopAbs_EDGE, M1); + if (M1.Extent() != 4) { + Standard_TypeMismatch::Raise("The first face of block has wrong number of vertices"); + } + + // 1.3. Find and store edges and last vertex of the first face + const TopTools_ListOfShape& anEdgesOfV1 = M1.FindFromKey(theVertex1); + const TopTools_ListOfShape& anEdgesOfV2 = M1.FindFromKey(theVertex2); + const TopTools_ListOfShape& anEdgesOfV3 = M1.FindFromKey(theVertex3); + + TopTools_ListIteratorOfListOfShape anIterE2 (anEdgesOfV2); + for (; anIterE2.More(); anIterE2.Next()) { + + TopTools_ListIteratorOfListOfShape anIterE1 (anEdgesOfV1); + for (; anIterE1.More(); anIterE1.Next()) { + + if (anIterE1.Value().IsSame(anIterE2.Value())) { + // Store the first edge, defined by two vertices + myEdges(edge_id(1,1)) = anIterE1.Value(); + + } else { + // Store the last edge + myEdges(edge_id(1,4)) = anIterE1.Value(); + + // Find and store the last vertex + TopoDS_Edge E = TopoDS::Edge(myEdges(4)); + TopoDS_Vertex V1, V2; + TopExp::Vertices(E, V1, V2, Standard_True); + + if (V1.IsSame(theVertex1)) { + myVertices(vertex_id(1,4)) = V2; + } else { + myVertices(vertex_id(1,4)) = V1; + } + } + } + + TopTools_ListIteratorOfListOfShape anIterE3 (anEdgesOfV3); + for (; anIterE3.More(); anIterE3.Next()) { + + if (anIterE3.Value().IsSame(anIterE2.Value())) { + // Store the second edge, defined by two vertices + myEdges(edge_id(1,2)) = anIterE3.Value(); + + } else { + // Store the fird edge + myEdges(edge_id(1,3)) = anIterE3.Value(); + } + } + } + } + + // Init map vertex->list_of_edges for the block + TopTools_IndexedDataMapOfShapeListOfShape MB; + MapShapesAndAncestors(theBlock, TopAbs_VERTEX, TopAbs_EDGE, MB); + if (MB.Extent() != NBVERTS) { + Standard_TypeMismatch::Raise("Block has wrong number of vertices"); + } + + // 2. Store edges, linking the first face with the second one + // and vertices of the second face + TopTools_IndexedMapOfShape aFaceEdges; + TopExp::MapShapes(myFaces(1), TopAbs_EDGE, aFaceEdges); + + for (Standard_Integer i = 1; i <= 4; i++) { + // Get i-th vertex of the face 1 + TopoDS_Shape Vi = myVertices(vertex_id(1, i)); + if (!MB.Contains(Vi)) { + Standard_ConstructionError::Raise("Face does not belong to the block"); + } + + // Get list of block's edges, sharing this Vertex + const TopTools_ListOfShape& anEdgesOfVi = MB.FindFromKey(Vi); + TopTools_ListIteratorOfListOfShape anEdgesIter (anEdgesOfVi); + + // Get Edge (from the List), not belonging to the face 1 + Standard_Boolean isFound = Standard_False; + for (; anEdgesIter.More() && !isFound; anEdgesIter.Next()) { + if (!aFaceEdges.Contains(anEdgesIter.Value())) { + isFound = Standard_True; + + // Store the linking edge + TopoDS_Shape aLinkEdge = anEdgesIter.Value(); + myEdges(side_edge_id(i)) = aLinkEdge; + + // Get another vertex of the linking edge + TopoDS_Edge E = TopoDS::Edge(aLinkEdge); + TopoDS_Vertex V1, V2; + TopExp::Vertices(E, V1, V2, Standard_True); + + // Store the i-th vertex of the second (opposite to the first) face + if (V1.IsSame(Vi)) { + myVertices(vertex_id(2, i)) = V2; + } else { + myVertices(vertex_id(2, i)) = V1; + } + } + } + } + + // 3. Store edges of the second (opposite to the first) face + for (Standard_Integer i = 1; i <= 4; i++) { + // Get i-th and (i+1)-th vertices of the face 2 + TopoDS_Shape Vi = myVertices(vertex_id(2, i)); + TopoDS_Shape Vj = myVertices(vertex_id(2, mod4(i + 1))); + + // Get list of block's edges, sharing Vi + const TopTools_ListOfShape& anEdgesOfVi = MB.FindFromKey(Vi); + // Get list of block's edges, sharing Vj + const TopTools_ListOfShape& anEdgesOfVj = MB.FindFromKey(Vj); + + // Get Edge (from the List), linking this vertex with the next one + Standard_Boolean isFound = Standard_False; + TopTools_ListIteratorOfListOfShape anEdgesIteri (anEdgesOfVi); + for (; anEdgesIteri.More() && !isFound; anEdgesIteri.Next()) { + + TopTools_ListIteratorOfListOfShape anEdgesIterj (anEdgesOfVj); + for (; anEdgesIterj.More() && !isFound; anEdgesIterj.Next()) { + + if (anEdgesIteri.Value().IsSame(anEdgesIterj.Value())) { + isFound = Standard_True; + + // Store the linking edge + myEdges(edge_id(2, i)) = anEdgesIteri.Value(); + } + } + } + } + + // 4. Store faces of the block + TopTools_IndexedDataMapOfShapeListOfShape MBE; + MapShapesAndAncestors(theBlock, TopAbs_EDGE, TopAbs_FACE, MBE); + if (MBE.Extent() != NBEDGES) { + Standard_TypeMismatch::Raise("Block has wrong number of edges"); + } + + for (Standard_Integer i = 2; i <= NBFACES; i++) { + TopoDS_Shape Ei1 = myEdges(edge_id(i, 1)); + TopoDS_Shape Ei2 = myEdges(edge_id(i, 2)); + const TopTools_ListOfShape& aFacesOfEi1 = MBE.FindFromKey(Ei1); + const TopTools_ListOfShape& aFacesOfEi2 = MBE.FindFromKey(Ei2); + + Standard_Boolean isFound = Standard_False; + TopTools_ListIteratorOfListOfShape anIterEi1 (aFacesOfEi1); + for (; anIterEi1.More() && !isFound; anIterEi1.Next()) { + + TopTools_ListIteratorOfListOfShape anIterEi2 (aFacesOfEi2); + for (; anIterEi2.More() && !isFound; anIterEi2.Next()) { + + if (anIterEi1.Value().IsSame(anIterEi2.Value())) { + isFound = Standard_True; + + // Store the face, defined by two edges + myFaces(i) = anIterEi1.Value(); + } + } + } + } +} + +//======================================================================= +//function : InitByTwoFaces +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::InitByTwoFaces (const TopoDS_Shape& theFace1, + const TopoDS_Shape& theFace2) +{ + if (theFace1.IsSame(theFace2)) { + Standard_ConstructionError::Raise("The faces must be different"); + } + + // Add two given faces in the structure + myFaces(1) = theFace1; + myFaces(2) = theFace2; + + // Step 1. Order vertices (and edges) + + // 1.1. Ordered vertices and edges of the first face we put in + + // Get wire of the first face + TopExp_Explorer wires1 (myFaces(1), TopAbs_WIRE); + if (!wires1.More()) { + Standard_ConstructionError::Raise("A face for the block has no wires"); + } + TopoDS_Shape aWire1 = wires1.Current(); + wires1.Next(); + if (wires1.More()) { + Standard_ConstructionError::Raise("A face for the block has more than one wire"); + } + + BRepTools_WireExplorer aWE1 (TopoDS::Wire(aWire1), TopoDS::Face(myFaces(1))); + Standard_Integer nb; + for (nb = 1; aWE1.More(); aWE1.Next(), nb++) { + if (nb > 4) { + Standard_ConstructionError::Raise("A face for the block has more than four edges"); + } + myEdges(edge_id(1, nb)) = aWE1.Current(); + myVertices(vertex_id(1, nb)) = aWE1.CurrentVertex(); + } + if (nb < 5) { + Standard_ConstructionError::Raise("A face for the block has less than four edges"); + } + + // 1.2. Ordered vertices and edges of the second face we temporarily store + // in arrays, to find for them rigth location in on the Step 2. + + // declare arrays + TopTools_Array1OfShape aVertis2(1,4); // ordered vertices of the second face + TopTools_Array1OfShape anEdges2(1,4); // anEdges2(i) links aVertis2(i) and aVertis2(i+1) + + // Get wire of the second face + TopExp_Explorer wires2 (myFaces(2), TopAbs_WIRE); + if (!wires2.More()) { + Standard_ConstructionError::Raise("A face for the block has no wires"); + } + TopoDS_Shape aWire2 = wires2.Current(); + wires2.Next(); + if (wires2.More()) { + Standard_ConstructionError::Raise("A face for the block has more than one wire"); + } + + BRepTools_WireExplorer aWE2 (TopoDS::Wire(aWire2), TopoDS::Face(myFaces(2))); + for (nb = 1; aWE2.More(); aWE2.Next(), nb++) { + if (nb > 4) { + Standard_ConstructionError::Raise("A face for the block has more than four edges"); + } + anEdges2(nb) = aWE2.Current(); + aVertis2(nb) = aWE2.CurrentVertex(); + } + if (nb < 5) { + Standard_ConstructionError::Raise("A face for the block has less than four edges"); + } + + // Step 2. Find right place in for the , + // so as to minimize common length of linking edges + // between face 1 and face 2. + // Each linking edge (of four) will link vertices of the + // faces 1 and 2 with equal local numbers. + // The right place is defined by: + // - vertex , which will become the first vertex + // of the second face + // - orientation of relatively their future location + // in (s_min = 1 if direct, s_min = -1 if reversed) + Standard_Integer i_min = 0, s_min = 0; + + TColgp_Array1OfPnt aPnts1 (1,4); // points of the first face + aPnts1(1) = BRep_Tool::Pnt(TopoDS::Vertex(myVertices(vertex_id(1, 1)))); + aPnts1(2) = BRep_Tool::Pnt(TopoDS::Vertex(myVertices(vertex_id(1, 2)))); + aPnts1(3) = BRep_Tool::Pnt(TopoDS::Vertex(myVertices(vertex_id(1, 3)))); + aPnts1(4) = BRep_Tool::Pnt(TopoDS::Vertex(myVertices(vertex_id(1, 4)))); + + TColgp_Array1OfPnt aPnts2 (1,4); // points of the second face + aPnts2(1) = BRep_Tool::Pnt(TopoDS::Vertex(aVertis2(1))); + aPnts2(2) = BRep_Tool::Pnt(TopoDS::Vertex(aVertis2(2))); + aPnts2(3) = BRep_Tool::Pnt(TopoDS::Vertex(aVertis2(3))); + aPnts2(4) = BRep_Tool::Pnt(TopoDS::Vertex(aVertis2(4))); + + Standard_Real Dist_min = RealLast(); + // try all possible locations to find the best (with minimum sum distance) + for (Standard_Integer i = 1; i <= 4; i++) { + // try direct orientation + Standard_Real Dist_plus = aPnts1(1).Distance(aPnts2(i)) + + aPnts1(2).Distance(aPnts2(mod4(i + 1))) + + aPnts1(3).Distance(aPnts2(mod4(i + 2))) + + aPnts1(4).Distance(aPnts2(mod4(i + 3))); + if (Dist_plus < Dist_min) { + Dist_min = Dist_plus; + i_min = i; + s_min = 1; + } + + // try reversed orientation + Standard_Real Dist_minus = aPnts1(1).Distance(aPnts2(i)) + + aPnts1(2).Distance(aPnts2(mod4(i - 1))) + + aPnts1(3).Distance(aPnts2(mod4(i - 2))) + + aPnts1(4).Distance(aPnts2(mod4(i - 3))); + if (Dist_minus < Dist_min) { + Dist_min = Dist_minus; + i_min = i; + s_min = - 1; + } + } + + // 3. Put vertices and edges of the second face to they + // permanent location in and + for (Standard_Integer i = 1; i <= 4; i++) { + Standard_Integer nb = mod4(i_min + s_min*(i - 1)); + + if (aPnts1(i).Distance(aPnts2(nb)) < Precision::Confusion()) { + Standard_ConstructionError::Raise("The faces are too close"); + } + + myVertices(vertex_id(2, i)) = aVertis2(nb); + + if (s_min == -1) nb = mod4(nb - 1); + myEdges(edge_id(2, i)) = anEdges2(nb); + } + + // 4. Generate side surface + if (!aWire1.Closed() || !aWire2.Closed()) { + // BRepOffsetAPI_ThruSections is not applicable on not closed wires + GetFace(3, Standard_True); + GetFace(4, Standard_True); + GetFace(5, Standard_True); + GetFace(6, Standard_True); + } else { + // try to build faces on native surfaces of edges or planar + Standard_Boolean tryThru = Standard_False; + for (Standard_Integer i = 3; i <= 6 && !tryThru; i++) { + Standard_Boolean doMake = Standard_True; + TopoDS_Shape E1 = GetEdge(edge_id(i, 1), doMake); + TopoDS_Shape E2 = GetEdge(edge_id(i, 2), doMake); + TopoDS_Shape E3 = GetEdge(edge_id(i, 3), doMake); + TopoDS_Shape E4 = GetEdge(edge_id(i, 4), doMake); + + BRepBuilderAPI_MakeWire MW (TopoDS::Edge(E1), + TopoDS::Edge(E2), + TopoDS::Edge(E3), + TopoDS::Edge(E4)); + if (!MW.IsDone()) { + Standard_ConstructionError::Raise("Wire construction failed"); + } + + BRepBuilderAPI_MakeFace MF (MW, Standard_False); + if (MF.IsDone()) { + myFaces(i) = MF.Shape(); + } else { + tryThru = Standard_True; + } + } + + // Build side surface by ThruSections algorithm + if (tryThru) { + BRepOffsetAPI_ThruSections THS; + THS.AddWire(TopoDS::Wire(aWire1)); + THS.AddWire(TopoDS::Wire(aWire2)); + THS.Build(); + if (!THS.IsDone()) { + StdFail_NotDone::Raise("Side surface generation failed"); + } + for (Standard_Integer i = 1; i <= 4; i++) { + // fill face + myFaces(i+2) = THS.GeneratedFace(myEdges(i)); + + // fill edge + Standard_Integer ee = side_edge_id(i); + TopTools_IndexedDataMapOfShapeListOfShape MVE; + MapShapesAndAncestors(myFaces(i+2), TopAbs_VERTEX, TopAbs_EDGE, MVE); + FindEdge(myEdges(ee), + myVertices(vertex_id_edge(ee, 1)), + myVertices(vertex_id_edge(ee, 2)), + MVE); + } + } + } +} + +//======================================================================= +//function : MapShapesAndAncestors +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::MapShapesAndAncestors (const TopoDS_Shape& S, + const TopAbs_ShapeEnum TS, + const TopAbs_ShapeEnum TA, + TopTools_IndexedDataMapOfShapeListOfShape& M) +{ + TopTools_ListOfShape empty; + TopTools_MapOfShape mapA; + + // visit ancestors + TopExp_Explorer exa (S,TA); + for (; exa.More(); exa.Next()) { + // visit shapes + const TopoDS_Shape& anc = exa.Current(); + if (mapA.Add(anc)) { + TopExp_Explorer exs (anc,TS); + TopTools_MapOfShape mapS; + for (; exs.More(); exs.Next()) { + if (mapS.Add(exs.Current())) { + Standard_Integer index = M.FindIndex(exs.Current()); + if (index == 0) index = M.Add(exs.Current(),empty); + M(index).Append(anc); + } + } + } + } + + // visit shapes not under ancestors + TopExp_Explorer ex (S,TS,TA); + for (; ex.More(); ex.Next()) { + Standard_Integer index = M.FindIndex(ex.Current()); + if (index == 0) index = M.Add(ex.Current(),empty); + } +} + +//======================================================================= +//function : IsSimilarEdges +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_Block6Explorer::IsSimilarEdges (const TopoDS_Shape& E1, + const TopoDS_Shape& E2) +{ + TopoDS_Edge E1e = TopoDS::Edge(E1); + TopoDS_Edge E2e = TopoDS::Edge(E2); + TopoDS_Vertex V11, V12, V21, V22; + TopExp::Vertices(E1e, V11, V12, Standard_True); + TopExp::Vertices(E2e, V21, V22, Standard_True); + if (BRepTools::Compare(V11, V21) && BRepTools::Compare(V12, V22)) + return Standard_True; + if (BRepTools::Compare(V11, V22) && BRepTools::Compare(V12, V21)) + return Standard_True; + + return Standard_False; +} + +//======================================================================= +//function : FindEdge +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::FindEdge + (TopoDS_Shape& theResult, + const TopoDS_Shape& V1, + const TopoDS_Shape& V2, + const TopTools_IndexedDataMapOfShapeListOfShape& MVE, + const Standard_Boolean findAll) +{ + Standard_Integer isFound = 0; + + const TopTools_ListOfShape& anEdgesOfV1 = MVE.FindFromKey(V1); + const TopTools_ListOfShape& anEdgesOfV2 = MVE.FindFromKey(V2); + + TopTools_ListIteratorOfListOfShape it1 (anEdgesOfV1); + for (; it1.More(); it1.Next()) { + TopTools_ListIteratorOfListOfShape it2 (anEdgesOfV2); + for (; it2.More(); it2.Next()) { + if (it1.Value().IsSame(it2.Value())) { + isFound++; + theResult = it1.Value(); + if (!findAll) return isFound; + } + } + } + + return isFound; +} + +//======================================================================= +//function : FindFace +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Block6Explorer::FindFace + (TopoDS_Shape& theResult, + const TopoDS_Shape& V1, + const TopoDS_Shape& V2, + const TopoDS_Shape& V3, + const TopoDS_Shape& V4, + const TopTools_IndexedDataMapOfShapeListOfShape& MVF, + const Standard_Boolean findAll) +{ + Standard_Integer isFound = Standard_False; + + const TopTools_ListOfShape& aFacesOfV1 = MVF.FindFromKey(V1); + const TopTools_ListOfShape& aFacesOfV2 = MVF.FindFromKey(V2); + const TopTools_ListOfShape& aFacesOfV3 = MVF.FindFromKey(V3); + const TopTools_ListOfShape& aFacesOfV4 = MVF.FindFromKey(V4); + + TopTools_ListIteratorOfListOfShape it1 (aFacesOfV1); + for (; it1.More(); it1.Next()) { + TopTools_ListIteratorOfListOfShape it2 (aFacesOfV2); + for (; it2.More(); it2.Next()) { + if (it1.Value().IsSame(it2.Value())) { + TopTools_ListIteratorOfListOfShape it3 (aFacesOfV3); + for (; it3.More(); it3.Next()) { + if (it1.Value().IsSame(it3.Value())) { + TopTools_ListIteratorOfListOfShape it4 (aFacesOfV4); + for (; it4.More(); it4.Next()) { + if (it1.Value().IsSame(it4.Value())) { + isFound++; + theResult = it1.Value(); + if (!findAll) return isFound; + } + } + } + } + } + } + } + + return isFound; +} + +//======================================================================= +//function : MakeFace +//purpose : +//======================================================================= +void GEOMImpl_Block6Explorer::MakeFace (const TopoDS_Wire& theWire, + const Standard_Boolean isPlanarWanted, + TopoDS_Shape& theResult) +{ + // try to build face on plane or on any surface under the edges of the wire + BRepBuilderAPI_MakeFace MK (theWire, isPlanarWanted); + if (MK.IsDone()) { + theResult = MK.Shape(); + return; + } + + // try to construct filling surface + if (!isPlanarWanted) { + BRepOffsetAPI_MakeFilling MF; + + Standard_Integer nbEdges = 0; + BRepTools_WireExplorer aWE (theWire); + for (; aWE.More(); aWE.Next(), nbEdges++) { + MF.Add(TopoDS::Edge(aWE.Current()), GeomAbs_C0); + } + + MF.Build(); + if (MF.IsDone()) { + // Result of filling + TopoDS_Shape aFace = MF.Shape(); + + // Update tolerance + Standard_Real aTol = MF.G0Error(); + + TColgp_Array1OfPnt aPnts (1,nbEdges); // points of the given wire + aWE = BRepTools_WireExplorer(theWire); + Standard_Integer vi = 1; + for (; aWE.More() && vi <= nbEdges; aWE.Next(), vi++) { + aPnts(vi) = BRep_Tool::Pnt(TopoDS::Vertex(aWE.CurrentVertex())); + } + + // Find maximum deviation in vertices + TopExp_Explorer exp (aFace, TopAbs_VERTEX); + TopTools_MapOfShape mapShape; + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Vertex aV = TopoDS::Vertex(exp.Current()); + Standard_Real aTolV = BRep_Tool::Tolerance(aV); + gp_Pnt aP = BRep_Tool::Pnt(aV); + Standard_Real min_dist = aP.Distance(aPnts(1)); + for (vi = 2; vi <= nbEdges; vi++) { + min_dist = Min(min_dist, aP.Distance(aPnts(vi))); + } + aTol = Max(aTol, aTolV); + aTol = Max(aTol, min_dist); + } + } + + if ((*((Handle(BRep_TFace)*)&aFace.TShape()))->Tolerance() < aTol) { + (*((Handle(BRep_TFace)*)&aFace.TShape()))->Tolerance(aTol); + } + theResult = aFace; + } + } +} diff --git a/src/GEOMImpl/GEOMImpl_Block6Explorer.hxx b/src/GEOMImpl/GEOMImpl_Block6Explorer.hxx new file mode 100644 index 000000000..d7d09c1bc --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Block6Explorer.hxx @@ -0,0 +1,207 @@ +// File : GEOMImpl_Block6Explorer.hxx +// Module : GEOMImpl + +#ifndef GEOMImpl_Block6Explorer_HeaderFile +#define GEOMImpl_Block6Explorer_HeaderFile + +#include +#include +#include +#include +#include + + // Class GEOMImpl_Block6Explorer gives easy and fast access to a certain sub-elements of hexahedral solid + // Each face can be accessed by its global ID [1-6] + // Each edge can be accessed by its global ID [1-12] or by its local NB [1-4] inside certain face + // Each vertex can be accessed by its global ID [1-8] or by its local NB [1-4] inside certain face + // Numeration of the sub-shapes is defined in constructors, see they comments + // + // face 2 face 4 | 4 face 2 face | + // | / | \ | | + // \|/ |/_ | _\| \|/ | + // ' ' | ' ' | + // 8_______7__7 | 7__7_______8 | + // /| /| | |\ |\ | + // 8 12 6 11 | 11 6 12 8 | + // / | / | | | \ | \ | + // 5/______5__6/ | | | \6__5______\5 | + // face 5 ---> | | | | <--- 6 face | face 6 ---> | | | | <--- 5 face | + // | |__3__|____| | |____|__3__| | | + // | /4 | /3 | 3\ | 4\ | | + // | / | / | \ | \ | | + // 9 4 10 2 | 2 10 4 9 | + // |/__1______|/ | \|______1__\| | + // 1 2 | 2 1 | + // _. . | . ._ | + // /| /|\ | /|\ |\ | + // / | | | \ | + // 3 face 1 face | face 1 face 3 | + // | | + // Picture 1 (right orientation) | Picture 2 (left orientation) | + // | + // For the moment, the orientation of numbering is not controlled + + // Faces: 1 - bottom, 2 - top, 3 - front, 4 - back, 5 - left (right), 6 - right (left) + + // + // 4_______3__3 2 ______2__3 + // / / | | + // 4 2 1 3 + // / / | | + // 1/______1__2/ | | + // | | + // | __4______| + // face 2 face 4 1 4 + // | / + // \|/ |/_ + // ' ' + // 3 8_______7__7 3 + // /| /| /| /| + // 3 2 8 12 6 11 3 2 + // / | / | / | / | + // 4/ | 5/______5__6/ | 4/ | + // | | face 5 ---> | | | | <--- 6 face | | + // | | | |__3__|____| | | + // | /2 | /4 | /3 | /2 + // | / | / | / | / + // 4 1 9 4 10 2 4 1 + // |/ |/__1______|/ |/ + // 1 1 2 1 + // _. . + // /| /|\ + // / | + // 2 ______2__3 3 face 1 face + // | | + // | | __3_______ + // | | /4 /3 + // | | / / + // 1 3 4 2 + // | __4______| /__1______ / + // 1 4 1 2 + // + // Picture 3 (On periferal pictures the local + // numeration of edges and vertices is shown) + +class GEOMImpl_Block6Explorer +{ + public: + // ---------- PUBLIC METHODS ---------- + + GEOMImpl_Block6Explorer (); + // Constructor. + + // Initialization by existing solid, + // sub-elements regulate numeration + + void InitByBlock (const TopoDS_Shape& theBlock); + // Init by hexahedral solid. First face, edge and vertex is defined randomly + + void InitByBlockAndFace (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theFace); + // Constructor from hexahedral solid, making theFace the first face. + // First edge and vertex is defined randomly from theFace entities + + void InitByBlockAndEdges (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theEdge1, + const TopoDS_Shape& theEdge2); + // Init by hexahedral solid, making theEdge1 the first, theEdge2 the fird. + // First vertex is defined randomly from theEdge1 vertices + // (Picture 1 and Picture 2 shows two possible cases) + + void InitByBlockAndVertices (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theVertex1, + const TopoDS_Shape& theVertex2, + const TopoDS_Shape& theVertex3); + // Init by hexahedral solid, making theVertex1 the first, + // theVertex2 the second and theVertex3 the fird vertices. + + // Initialization by parts of solid to be built + + void InitByTwoFaces (const TopoDS_Shape& theFace1, + const TopoDS_Shape& theFace2); + // Init by two faces. TheFace1 will be the first, + // theFace2 will be the second. + // First edge and vertex is defined randomly from theFace1 entities. + + // Access to vertices + TopoDS_Shape GetVertex (const Standard_Integer theVertexID); // [1-8] + + Standard_Integer GetVertexID (const TopoDS_Shape& theVertex); + + Standard_Integer GetVertexID (const Standard_Integer theFaceID, // [1-6] + const Standard_Integer theVertexNB); // [1-4] + + Standard_Integer GetVertexOnEdgeID (const Standard_Integer theEdgeID, // [1-12] + const Standard_Integer theVertexNB); // [1-2] + + // Access to edges + TopoDS_Shape GetEdge (const Standard_Integer theEdgeID, // [1-12] + const Standard_Boolean doMake = Standard_False); + + Standard_Integer GetEdgeID (const TopoDS_Shape& theEdge); + + Standard_Integer GetEdgeID (const Standard_Integer theFaceID, // [1-6] + const Standard_Integer theEdgeNB); // [1-4] + + Standard_Integer FindEdgeID (const Standard_Integer theVertex1ID, + const Standard_Integer theVertex2ID); + + Standard_Integer FindCommonEdgeID (const Standard_Integer theFace1ID, + const Standard_Integer theFace2ID); + + // Access to faces + TopoDS_Shape GetFace (const Standard_Integer theFaceID, // [1-6] + const Standard_Boolean doMake = Standard_False); + + Standard_Integer GetFaceID (const TopoDS_Shape& theFace); + + Standard_Integer FindFaceID (const Standard_Integer theEdge1ID, + const Standard_Integer theEdge2ID); + + Standard_Integer GetOppositeFaceID (const Standard_Integer theFaceID); + + // Check Block + Standard_Boolean IsSimilarFaces (const Standard_Integer theFace1ID, + const Standard_Integer theFace2ID, + const gp_Trsf theTransformation); + // returns true, if theFace1, transformed + // by theTransformation, coincides with theFace2 + public: + // ---------- STATIC PUBLIC METHODS ---------- + static void MapShapesAndAncestors (const TopoDS_Shape& S, + const TopAbs_ShapeEnum TS, + const TopAbs_ShapeEnum TA, + TopTools_IndexedDataMapOfShapeListOfShape& M); + + static Standard_Boolean IsSimilarEdges (const TopoDS_Shape& E1, + const TopoDS_Shape& E2); + + static Standard_Integer FindEdge (TopoDS_Shape& theResult, + const TopoDS_Shape& V1, + const TopoDS_Shape& V2, + const TopTools_IndexedDataMapOfShapeListOfShape& MVE, + const Standard_Boolean findAll = Standard_False); + // returns number of found edges + + static Standard_Integer FindFace (TopoDS_Shape& theResult, + const TopoDS_Shape& V1, + const TopoDS_Shape& V2, + const TopoDS_Shape& V3, + const TopoDS_Shape& V4, + const TopTools_IndexedDataMapOfShapeListOfShape& MVF, + const Standard_Boolean findAll = Standard_False); + // returns number of found faces + + static void MakeFace (const TopoDS_Wire& theWire, + const Standard_Boolean isPlanarWanted, + TopoDS_Shape& theResult); + + private: + // ---------- PRIVATE FIELDS ---------- + + TopTools_Array1OfShape myFaces; + TopTools_Array1OfShape myEdges; + TopTools_Array1OfShape myVertices; +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_BlockDriver.cxx b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx new file mode 100644 index 000000000..27073e439 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_BlockDriver.cxx @@ -0,0 +1,920 @@ + +using namespace std; + +#include + +#include "GEOMImpl_BlockDriver.hxx" +#include "GEOMImpl_IBlocks.hxx" +#include "GEOMImpl_IBlockTrsf.hxx" +#include "GEOMImpl_GlueDriver.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_ILocalOperations.hxx" +#include "GEOMImpl_Block6Explorer.hxx" +#include "GEOM_Function.hxx" + +#include "ShHealOper_Sewing.hxx" +#include "NMTAlgo_Splitter1.hxx" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_BlockDriver::GetID() +{ + static Standard_GUID aBlockDriver("FF1BBB67-5D14-4df2-980B-3A668264EA16"); + return aBlockDriver; +} + + +//======================================================================= +//function : GEOMImpl_BlockDriver +//purpose : +//======================================================================= +GEOMImpl_BlockDriver::GEOMImpl_BlockDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_BlockDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + BRep_Builder B; + + Standard_Real prec = Precision::Confusion(); + + Standard_Integer aNbSub = 0; + if (aType == BLOCK_COMPOUND_GLUE) { + + aNbSub = 1; + + } else if (aType == BLOCK_FACE_TWO_EDGES || + aType == BLOCK_TWO_FACES) { + + aNbSub = 2; + + } else if (aType == BLOCK_FACE_FOUR_PNT || + aType == BLOCK_FACE_FOUR_EDGES) { + + aNbSub = 4; + + } else if (aType == BLOCK_SIX_FACES) { + + aNbSub = 6; + + } else { + } + + if (aNbSub > 0) { + GEOMImpl_IBlocks aCI (aFunction); + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + Standard_Integer nbshapes = aShapes->Length(); + + if (nbshapes != aNbSub) { + Standard_TypeMismatch::Raise + ("Number of elements for object construction does not correspond to the used constructor"); + } + + TopTools_Array1OfShape anArgs (1, aNbSub); + Standard_Integer argi; + for (argi = 1; argi <= aNbSub; argi++) { + Handle(GEOM_Function) aRef = Handle(GEOM_Function)::DownCast(aShapes->Value(argi)); + TopoDS_Shape anArg = aRef->GetValue(); + if (anArg.IsNull()) { + Standard_NullObject::Raise("Null shape is given as argument"); + } + anArgs(argi) = anArg; + } + + if (aType == BLOCK_FACE_FOUR_EDGES) { + + // Make face from four edges + if (anArgs(1).ShapeType() != TopAbs_EDGE || anArgs(2).ShapeType() != TopAbs_EDGE || + anArgs(3).ShapeType() != TopAbs_EDGE || anArgs(4).ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise("Shape for face construction is not an edge"); + } + + // count corner vertices + TopTools_MapOfShape aVertMap; + for (Standard_Integer ii = 1; ii <= 4; ii++) { + TopoDS_Edge anEdge = TopoDS::Edge(anArgs(ii)); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anEdge, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + Standard_NullObject::Raise("Bad edge for face construction: vertex is not defined"); + } + if (BRepTools::Compare(V1,V2)) { + Standard_ConstructionError::Raise("Edge ends are too close"); + } + Standard_Boolean isCoin1 = Standard_False, isCoin2 = Standard_False; + TopTools_MapIteratorOfMapOfShape anIter (aVertMap); + for (; anIter.More(); anIter.Next()) { + TopoDS_Vertex V = TopoDS::Vertex(anIter.Key()); + if (BRepTools::Compare(V,V1)) isCoin1 = Standard_True; + if (BRepTools::Compare(V,V2)) isCoin2 = Standard_True; + } + if (!isCoin1) aVertMap.Add(V1); + if (!isCoin2) aVertMap.Add(V2); + } + if (aVertMap.Extent() != 4) { + Standard_ConstructionError::Raise("The edges must form a closed wire"); + } + + TopoDS_Edge anEdge1 = TopoDS::Edge(anArgs(1)); + TopoDS_Edge anEdge2 = TopoDS::Edge(anArgs(2)); + TopoDS_Edge anEdge3 = TopoDS::Edge(anArgs(3)); + TopoDS_Edge anEdge4 = TopoDS::Edge(anArgs(4)); + + // check, if anEdge1 has common/coincident vertex with anEdge2, + Standard_Boolean isConnected12 = Standard_False; + TopoDS_Vertex V11, V12, V21, V22; + TopExp::Vertices(anEdge1, V11, V12, Standard_True); + TopExp::Vertices(anEdge2, V21, V22, Standard_True); + if (BRepTools::Compare(V11,V21) || BRepTools::Compare(V11,V22) || + BRepTools::Compare(V12,V21) || BRepTools::Compare(V12,V22)) { + // the edges have common vertex + isConnected12 = Standard_True; + } + + // build wire in right order, corresponding to edges connexity + BRepBuilderAPI_MakeWire MW; + if (isConnected12) + MW = BRepBuilderAPI_MakeWire(anEdge1, anEdge2, anEdge3, anEdge4); + else + MW = BRepBuilderAPI_MakeWire(anEdge1, anEdge3, anEdge2, anEdge4); + + if (!MW.IsDone()) { + Standard_ConstructionError::Raise + ("Impossible to build a connected wire from the given edges"); + } + TopoDS_Wire aWire = MW; + if (!aWire.Closed()) { + Standard_ConstructionError::Raise + ("Impossible to build a closed wire from the given edges"); + } + + // try to build face on the wire + GEOMImpl_Block6Explorer::MakeFace(aWire, Standard_False, aShape); + if (aShape.IsNull()) { + Standard_ConstructionError::Raise("Face construction failed"); + } + + } else if (aType == BLOCK_FACE_TWO_EDGES) { + + // Make face from two opposite edges + if (anArgs(1).ShapeType() != TopAbs_EDGE || + anArgs(2).ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise("Shape for face construction is not an edge"); + } + + TopoDS_Edge anEdge1 = TopoDS::Edge(anArgs(1)); + TopoDS_Edge anEdge2 = TopoDS::Edge(anArgs(2)); + + if (anEdge1.IsSame(anEdge2)) { + Standard_ConstructionError::Raise("The edges must be different"); + } + + // create two edges, linking ends of the given edges + TopoDS_Vertex V11, V12, V21, V22; + TopExp::Vertices(anEdge1, V11, V12, Standard_True); + TopExp::Vertices(anEdge2, V21, V22, Standard_True); + if (V11.IsNull() || V12.IsNull() || + V21.IsNull() || V22.IsNull()) { + Standard_NullObject::Raise("Bad edge for face construction: vertex is not defined"); + } + gp_Pnt P11 = BRep_Tool::Pnt(V11); + gp_Pnt P12 = BRep_Tool::Pnt(V12); + gp_Pnt P21 = BRep_Tool::Pnt(V21); + gp_Pnt P22 = BRep_Tool::Pnt(V22); + + if (P11.Distance(P21) < prec || P12.Distance(P22) < prec || + P11.Distance(P22) < prec || P12.Distance(P21) < prec) { + Standard_ConstructionError::Raise("Given edges have too close ends"); + } + + Standard_Real per11 = P11.Distance(P21) + P12.Distance(P22); + Standard_Real per12 = P11.Distance(P22) + P12.Distance(P21); + + TopoDS_Edge anEdge3; + TopoDS_Edge anEdge4; + if (per11 < per12) { + anEdge3 = BRepBuilderAPI_MakeEdge(V11, V21); + anEdge4 = BRepBuilderAPI_MakeEdge(V12, V22); + } else { + anEdge3 = BRepBuilderAPI_MakeEdge(V11, V22); + anEdge4 = BRepBuilderAPI_MakeEdge(V12, V21); + } + + // build a wire + BRepBuilderAPI_MakeWire MW (anEdge1, anEdge3, anEdge2, anEdge4); + if (!MW.IsDone()) { + Standard_ConstructionError::Raise("Wire construction failed"); + } + + // try to build face on the wire + GEOMImpl_Block6Explorer::MakeFace(MW, Standard_False, aShape); + if (aShape.IsNull()) { + Standard_ConstructionError::Raise("Face construction failed"); + } + + } else if (aType == BLOCK_FACE_FOUR_PNT) { + + // Make face from four corner vertices + if (anArgs(1).ShapeType() != TopAbs_VERTEX || + anArgs(2).ShapeType() != TopAbs_VERTEX || + anArgs(3).ShapeType() != TopAbs_VERTEX || + anArgs(4).ShapeType() != TopAbs_VERTEX) { + Standard_TypeMismatch::Raise("Shape for face construction is not a vertex"); + } + + TopoDS_Vertex V1 = TopoDS::Vertex(anArgs(1)); + TopoDS_Vertex V2 = TopoDS::Vertex(anArgs(2)); + TopoDS_Vertex V3 = TopoDS::Vertex(anArgs(3)); + TopoDS_Vertex V4 = TopoDS::Vertex(anArgs(4)); + + gp_Pnt P1 = BRep_Tool::Pnt(V1); + gp_Pnt P2 = BRep_Tool::Pnt(V2); + gp_Pnt P3 = BRep_Tool::Pnt(V3); + gp_Pnt P4 = BRep_Tool::Pnt(V4); + + if (P1.Distance(P2) < prec || P1.Distance(P3) < prec || + P1.Distance(P4) < prec || P2.Distance(P3) < prec || + P2.Distance(P4) < prec || P3.Distance(P4) < prec) { + Standard_ConstructionError::Raise("Four not coincident points must be given"); + } + + // calculate perimeters + Standard_Real per1234 = P1.Distance(P2) + P2.Distance(P3) + + P3.Distance(P4) + P4.Distance(P1); + Standard_Real per1243 = P1.Distance(P2) + P2.Distance(P4) + + P4.Distance(P3) + P3.Distance(P1); + Standard_Real per1324 = P1.Distance(P3) + P3.Distance(P2) + + P2.Distance(P4) + P4.Distance(P1); + + // order vertices + if (per1243 < per1234 && per1243 < per1324) { + TopoDS_Vertex Vtmp = V3; + V3 = V4; + V4 = Vtmp; + } else if (per1324 < per1234 && per1324 < per1243) { + TopoDS_Vertex Vtmp = V3; + V3 = V2; + V2 = Vtmp; + } else { + } + + // build wire + BRepBuilderAPI_MakePolygon aMkPoly (V1, V2, V3, V4, Standard_True); + if (!aMkPoly.IsDone()) { + Standard_ConstructionError::Raise("Polygon construction failed"); + } + + // try to build face on the wire + GEOMImpl_Block6Explorer::MakeFace(aMkPoly, Standard_False, aShape); + if (aShape.IsNull()) { + Standard_ConstructionError::Raise("Face construction failed"); + } + + } else if (aType == BLOCK_SIX_FACES || aType == BLOCK_TWO_FACES) { + + BRepTools_Quilt Glue; + + if (aType == BLOCK_SIX_FACES) { + + // Make block (hexahedral solid) from six faces + for (Standard_Integer ind = 1; ind <= nbshapes; ind++) { + if (anArgs(ind).ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Shape for block construction is not a face"); + } + Glue.Add(anArgs(ind)); + } + + } else { + + // Make block (hexahedral solid) from two opposite faces + if (anArgs(1).ShapeType() != TopAbs_FACE || + anArgs(2).ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Shape for block construction is not a face"); + } + + // Get wires of the given faces + TopExp_Explorer wires1 (anArgs(1), TopAbs_WIRE); + TopExp_Explorer wires2 (anArgs(2), TopAbs_WIRE); + if (!wires1.More() || !wires2.More()) { + Standard_ConstructionError::Raise("A face for the block has no wires"); + } + TopoDS_Shape aWire1 = wires1.Current(); + TopoDS_Shape aWire2 = wires2.Current(); + wires1.Next(); + wires2.Next(); + if (wires1.More() || wires2.More()) { + Standard_ConstructionError::Raise("A face for the block has more than one wire"); + } + + GEOMImpl_Block6Explorer aBlockTool; + aBlockTool.InitByTwoFaces(anArgs(1), anArgs(2)); + + // Construct the linking faces and add them in the gluing tool + Glue.Add(anArgs(1)); + Glue.Add(aBlockTool.GetFace(3, Standard_True)); + Glue.Add(aBlockTool.GetFace(4, Standard_True)); + Glue.Add(aBlockTool.GetFace(5, Standard_True)); + Glue.Add(aBlockTool.GetFace(6, Standard_True)); + Glue.Add(anArgs(2)); + } + + TopExp_Explorer exp (Glue.Shells(), TopAbs_SHELL); + Standard_Integer ish = 0; + TopTools_MapOfShape mapShape; + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + aShape = exp.Current(); + ish++; + } + } + + if (ish > 1) { + aShape = Glue.Shells(); + Standard_Real aTol = prec; // Precision::Confusion() + TopExp_Explorer expF (aShape, TopAbs_FACE); + TopTools_MapOfShape mapF; + TopoDS_Shell Shell; + B.MakeShell(Shell); + for (; expF.More(); expF.Next()) { + if (mapF.Add(expF.Current())) { + B.Add(Shell, expF.Current()); + Standard_Real aToler = BRep_Tool::Tolerance(TopoDS::Face(expF.Current())); + if (aToler > aTol) + aTol = aToler; + } + } + ShHealOper_Sewing aHealer (Shell, aTol); + if (aHealer.Perform()) + aShape = aHealer.GetResultShape(); + else + Standard_ConstructionError::Raise + ("Impossible to build a connected shell on the given faces"); + } + + if (aType == BLOCK_SIX_FACES) { + if (!aShape.Closed()) { + Standard_ConstructionError::Raise + ("Impossible to build a closed shell on the given faces"); + } + } + + TopoDS_Solid Sol; + B.MakeSolid(Sol); + B.Add(Sol, aShape); + BRepClass3d_SolidClassifier SC (Sol); + SC.PerformInfinitePoint(prec); + if (SC.State() == TopAbs_IN) { + B.MakeSolid(Sol); + B.Add(Sol, aShape.Reversed()); + } + aShape = Sol; + BRepLib::SameParameter(aShape, 1.E-5, Standard_True); + + } else if (aType == BLOCK_COMPOUND_GLUE) { + + // Make blocks compound from a compound + if (anArgs(1).ShapeType() != TopAbs_COMPOUND && + anArgs(2).ShapeType() != TopAbs_COMPSOLID) { + Standard_TypeMismatch::Raise("Not a compound given"); + } + + TopoDS_Shape aCompound = anArgs(1); + + // Glue coincident faces and edges (with Partition algorithm). + NMTAlgo_Splitter1 PS; + PS.AddShape(aCompound); + PS.Compute(); + PS.SetRemoveWebs(Standard_False); +// PS.Build(aCompound.ShapeType()); + PS.Build(TopAbs_SOLID); + + aShape = PS.Shape(); + } else { + } + + } else { // Multi-transformations + + TopoDS_Shape aMulti; + GEOMImpl_IBlockTrsf aCI (aFunction); + Handle(GEOM_Function) aRefShape = aCI.GetOriginal(); + TopoDS_Shape aBlockIni = aRefShape->GetValue(); + if (aBlockIni.IsNull()) { + Standard_NullObject::Raise("Null Block"); + } + + // Copy block to avoid problems (PAL6706) + TColStd_IndexedDataMapOfTransientTransient aMap; + TopoDS_Shape aBlock; + TNaming_CopyShape::CopyTool(aBlockIni, aMap, aBlock); + + // Block tolerance in vertices + Standard_Real aTol = prec; + TopExp_Explorer expV (aBlock, TopAbs_VERTEX); + TopTools_MapOfShape mapShape; + for (; expV.More(); expV.Next()) { + if (mapShape.Add(expV.Current())) { + TopoDS_Vertex aV = TopoDS::Vertex(expV.Current()); + aTol = Max(BRep_Tool::Tolerance(aV), aTol); + } + } + + if (aType == BLOCK_MULTI_TRANSFORM_1D) { + // Retrieve a faces by Ids + Standard_Integer aFace1Id = aCI.GetFace1U(); + Standard_Integer aFace2Id = aCI.GetFace2U(); + TopoDS_Shape aFace1, aFace2; + if (!GEOMImpl_ILocalOperations::GetSubShape(aBlock, aFace1Id, aFace1)) { + Standard_NullObject::Raise("Can not retrieve a sub-shape with given Id"); + } + if (aFace1.ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Sub-shape with given Id is not a face"); + } + + if (aFace2Id > 0) { + if (!GEOMImpl_ILocalOperations::GetSubShape(aBlock, aFace2Id, aFace2)) { + Standard_NullObject::Raise("Can not retrieve a sub-shape with given Id"); + } + if (aFace2.ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Sub-shape with given Id is not a face"); + } + } + + Standard_Integer aNbIter = aCI.GetNbIterU(); + + MultiTransformate1D(aBlock, aFace1, aFace2, aNbIter, aMulti); + + } else if (aType == BLOCK_MULTI_TRANSFORM_2D) { + // Retrieve a faces by Ids + Standard_Integer aFace1UId = aCI.GetFace1U(); + Standard_Integer aFace2UId = aCI.GetFace2U(); + Standard_Integer aFace1VId = aCI.GetFace1V(); + Standard_Integer aFace2VId = aCI.GetFace2V(); + + TopoDS_Shape aFace1U, aFace2U, aFace1V, aFace2V; + if (!GEOMImpl_ILocalOperations::GetSubShape(aBlock, aFace1UId, aFace1U) || + !GEOMImpl_ILocalOperations::GetSubShape(aBlock, aFace1VId, aFace1V)) { + Standard_NullObject::Raise("Can not retrieve a sub-shape with given Id"); + } + + if (aFace1U.ShapeType() != TopAbs_FACE || + aFace1V.ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Sub-shape with given Id is not a face"); + } + + if (aFace2UId > 0) { + if (!GEOMImpl_ILocalOperations::GetSubShape(aBlock, aFace2UId, aFace2U)) { + Standard_NullObject::Raise("Can not retrieve a sub-shape with given Id"); + } + + if (aFace2U.ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Sub-shape with given Id is not a face"); + } + } + + if (aFace2VId > 0) { + if (!GEOMImpl_ILocalOperations::GetSubShape(aBlock, aFace2VId, aFace2V)) { + Standard_NullObject::Raise("Can not retrieve a sub-shape with given Id"); + } + + if (aFace2V.ShapeType() != TopAbs_FACE) { + Standard_TypeMismatch::Raise("Sub-shape with given Id is not a face"); + } + } + + Standard_Integer aNbIterU = aCI.GetNbIterU(); + Standard_Integer aNbIterV = aCI.GetNbIterV(); + + MultiTransformate2D(aBlock, + aFace1U, aFace2U, aNbIterU, + aFace1V, aFace2V, aNbIterV, aMulti); + + } else { + return 0; + } + + if (aMulti.IsNull()) { + StdFail_NotDone::Raise("Multi-transformation failed"); + return 0; + } + + // Glue faces of the multi-block + aShape = GEOMImpl_GlueDriver::GlueFaces(aMulti, aTol); + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + +//======================================================================= +//function : MultiTransformate1D +//purpose : +//======================================================================= +void GEOMImpl_BlockDriver::MultiTransformate1D (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theFace1, + const TopoDS_Shape& theFace2, + const Standard_Integer theNbIter, + TopoDS_Shape& theResult) const +{ + // Construct Tool, where will be the first face, + // and a face, opposite to , will be the second face + GEOMImpl_Block6Explorer aBlockTool; + aBlockTool.InitByBlockAndFace(theBlock, theFace1); + + // Find IDs of the faces + Standard_Integer dir_face1 = 1, dir_face2 = 2; + if (!theFace2.IsNull()) { + dir_face2 = aBlockTool.GetFaceID(theFace2); + } + + // Find three pairs of points + Standard_Integer v11_id = 0, v12_id = 0, v13_id = 0; // vertices of the first face + Standard_Integer v21_id = 0, v22_id = 0, v23_id = 0; // vertices of the second face + + if (dir_face2 == 2) { // is opposite to + + // We will take vertices with equal local numbers on the faces, + // as the Block6Explorer gives equal local numbers + // to the linked vertices on the opposite faces, + // i.e. v1* is linked with the v2* by an edge: + + // _________ + // /|v23 /| + // / | / | dir_face1 - bottom + // / | / | + // /________ / | dir_face2 - top + // |v21 | |v22 | + // | |____|____| + // | / v13 | / + // | / | / + // | / | / + // |/________|/ + // v11 v12 + + v11_id = aBlockTool.GetVertexID(dir_face1, 1); + v12_id = aBlockTool.GetVertexID(dir_face1, 2); + v13_id = aBlockTool.GetVertexID(dir_face1, 4); + + v21_id = aBlockTool.GetVertexID(dir_face2, 1); + v22_id = aBlockTool.GetVertexID(dir_face2, 2); + v23_id = aBlockTool.GetVertexID(dir_face2, 4); + + } else { + + // _________ + // /| /| + // / | / | dir_face1 - bottom + // / | / | + // /________ / | dir_face2 - right (for example) + // | | |v23 | + // | |____|____| + // | / | /v12 = v22 (common_vertex2) + // | / | / + // | / | / + // |/________|/ + // v13 v11 = v21 (common_vertex1) + + Standard_Integer common_edge_id = aBlockTool.FindCommonEdgeID(dir_face1, dir_face2); + Standard_Integer common_vertex1 = aBlockTool.GetVertexOnEdgeID(common_edge_id, 1); + Standard_Integer common_vertex2 = aBlockTool.GetVertexOnEdgeID(common_edge_id, 2); + + Standard_Integer not_common_v1 = 0; + Standard_Integer vid = 1; + Standard_Boolean isFound = Standard_False; + while (!isFound && vid <= 4) { + not_common_v1 = aBlockTool.GetVertexID(dir_face1, vid); + isFound = (not_common_v1 != common_vertex2 && + aBlockTool.FindEdgeID(not_common_v1, common_vertex1) != 0); + vid++; + } + + Standard_Integer not_common_v2 = 0; + vid = 1; + isFound = Standard_False; + while (!isFound && vid <= 4) { + not_common_v2 = aBlockTool.GetVertexID(dir_face2, vid); + isFound = (not_common_v2 != common_vertex2 && + aBlockTool.FindEdgeID(not_common_v2, common_vertex1) != 0); + vid++; + } + + v11_id = common_vertex1; + v12_id = common_vertex2; + v13_id = not_common_v1; + + v21_id = common_vertex1; + v22_id = common_vertex2; + v23_id = not_common_v2; + } + + // Construct a transformation operator + TopoDS_Vertex V11 = TopoDS::Vertex(aBlockTool.GetVertex(v11_id)); + TopoDS_Vertex V12 = TopoDS::Vertex(aBlockTool.GetVertex(v12_id)); + TopoDS_Vertex V13 = TopoDS::Vertex(aBlockTool.GetVertex(v13_id)); + + TopoDS_Vertex V21 = TopoDS::Vertex(aBlockTool.GetVertex(v21_id)); + TopoDS_Vertex V22 = TopoDS::Vertex(aBlockTool.GetVertex(v22_id)); + TopoDS_Vertex V23 = TopoDS::Vertex(aBlockTool.GetVertex(v23_id)); + + // Axes of the first direction face + gp_Pnt P1 = BRep_Tool::Pnt(V11); + gp_Vec VecN1 (P1, BRep_Tool::Pnt(V12)); + gp_Vec VecX1 (P1, BRep_Tool::Pnt(V13)); + gp_Ax3 Ax1 (P1, VecN1, VecX1); + + // Axes of the second direction face + gp_Pnt P2 = BRep_Tool::Pnt(V21); + gp_Vec VecN2 (P2, BRep_Tool::Pnt(V22)); + gp_Vec VecX2 (P2, BRep_Tool::Pnt(V23)); + gp_Ax3 Ax2 (P2, VecN2, VecX2); + + gp_Trsf aTrsf; + aTrsf.SetDisplacement(Ax1, Ax2); + + // Check, that is similar to . + // Actually, we need only to check right position of one + // vertex, not involved into the transformation construction. + if (!aBlockTool.IsSimilarFaces(dir_face1, dir_face2, aTrsf)) { + Standard_ConstructionError::Raise("The direction faces are not similar"); + } + + // Perform multi-transformation + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound(aCompound); + + TopoDS_Shape aPrevShape = theBlock; + for (Standard_Integer i = 0; i < theNbIter; i++) { + B.Add(aCompound, aPrevShape); + BRepBuilderAPI_Transform aTransformation (aPrevShape, aTrsf, Standard_False); + aPrevShape = aTransformation.Shape(); + } + theResult = aCompound; +} + +//======================================================================= +//function : MultiTransformate2D +//purpose : +//======================================================================= +void GEOMImpl_BlockDriver::MultiTransformate2D (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theFace1U, + const TopoDS_Shape& theFace2U, + const Standard_Integer theNbIterU, + const TopoDS_Shape& theFace1V, + const TopoDS_Shape& theFace2V, + const Standard_Integer theNbIterV, + TopoDS_Shape& theResult) const +{ + // Construct Tool, where will be the first face, + // and a face, opposite to , will be the second face + GEOMImpl_Block6Explorer aBlockTool; + aBlockTool.InitByBlockAndFace(theBlock, theFace1U); + + gp_Trsf aTrsfU, aTrsfV; + gp_Ax3 Ax1V, Ax2V; + for (Standard_Integer uv = 1; uv <= 2; uv++) { + // U transformation + TopoDS_Shape theFace1 = theFace1U; + TopoDS_Shape theFace2 = theFace2U; + if (uv == 2) { + // V transformation + theFace1 = theFace1V; + theFace2 = theFace2V; + } + + // Find IDs of the faces + Standard_Integer dir_face1 = aBlockTool.GetFaceID(theFace1); + Standard_Integer dir_face2 = 0; + Standard_Integer opp_face1 = aBlockTool.GetOppositeFaceID(dir_face1); + if (theFace2.IsNull()) { + dir_face2 = opp_face1; + } else { + dir_face2 = aBlockTool.GetFaceID(theFace2); + } + + // Find three pairs of points + Standard_Integer v11_id = 0, v12_id = 0, v13_id = 0; // vertices of the first face + Standard_Integer v21_id = 0, v22_id = 0, v23_id = 0; // vertices of the second face + + if (dir_face2 == opp_face1) { // is opposite to + + // We will take vertices with equal local numbers on the faces, + // as the Block6Explorer gives equal local numbers + // to the linked vertices on the opposite faces, + // i.e. v1* is linked with the v2* by an edge: + + v11_id = aBlockTool.GetVertexID(dir_face1, 1); + v12_id = aBlockTool.GetVertexID(dir_face1, 2); + v13_id = aBlockTool.GetVertexID(dir_face1, 4); + + v21_id = aBlockTool.GetVertexID(dir_face2, 1); + v22_id = aBlockTool.GetVertexID(dir_face2, 2); + v23_id = aBlockTool.GetVertexID(dir_face2, 4); + + } else { + + Standard_Integer common_edge_id = aBlockTool.FindCommonEdgeID(dir_face1, dir_face2); + Standard_Integer common_vertex1 = aBlockTool.GetVertexOnEdgeID(common_edge_id, 1); + Standard_Integer common_vertex2 = aBlockTool.GetVertexOnEdgeID(common_edge_id, 2); + + Standard_Integer not_common_v1 = 0; + Standard_Integer vid = 1; + Standard_Boolean isFound = Standard_False; + while (!isFound && vid <= 4) { + not_common_v1 = aBlockTool.GetVertexID(dir_face1, vid); + isFound = (not_common_v1 != common_vertex2 && + aBlockTool.FindEdgeID(not_common_v1, common_vertex1) != 0); + vid++; + } + + Standard_Integer not_common_v2 = 0; + vid = 1; + isFound = Standard_False; + while (!isFound && vid <= 4) { + not_common_v2 = aBlockTool.GetVertexID(dir_face2, vid); + isFound = (not_common_v2 != common_vertex2 && + aBlockTool.FindEdgeID(not_common_v2, common_vertex1) != 0); + vid++; + } + + v11_id = common_vertex1; + v12_id = common_vertex2; + v13_id = not_common_v1; + + v21_id = common_vertex1; + v22_id = common_vertex2; + v23_id = not_common_v2; + } + + // Construct a transformation operator + TopoDS_Vertex V11 = TopoDS::Vertex(aBlockTool.GetVertex(v11_id)); + TopoDS_Vertex V12 = TopoDS::Vertex(aBlockTool.GetVertex(v12_id)); + TopoDS_Vertex V13 = TopoDS::Vertex(aBlockTool.GetVertex(v13_id)); + + TopoDS_Vertex V21 = TopoDS::Vertex(aBlockTool.GetVertex(v21_id)); + TopoDS_Vertex V22 = TopoDS::Vertex(aBlockTool.GetVertex(v22_id)); + TopoDS_Vertex V23 = TopoDS::Vertex(aBlockTool.GetVertex(v23_id)); + + // Axes of the first direction face + gp_Pnt P1 = BRep_Tool::Pnt(V11); + gp_Vec VecN1 (P1, BRep_Tool::Pnt(V12)); + gp_Vec VecX1 (P1, BRep_Tool::Pnt(V13)); + gp_Ax3 Ax1 (P1, VecN1, VecX1); + + // Axes of the second direction face + gp_Pnt P2 = BRep_Tool::Pnt(V21); + gp_Vec VecN2 (P2, BRep_Tool::Pnt(V22)); + gp_Vec VecX2 (P2, BRep_Tool::Pnt(V23)); + gp_Ax3 Ax2 (P2, VecN2, VecX2); + + gp_Trsf aTrsf; + aTrsf.SetDisplacement(Ax1, Ax2); + if (uv == 1) { + aTrsfU = aTrsf; + } else { + aTrsfV = aTrsf; + Ax1V = Ax1; + Ax2V = Ax2; + } + + // Check, that is similar to . + // Actually, we need only to check right position of one + // vertex, not involved into the transformation construction. + if (!aBlockTool.IsSimilarFaces(dir_face1, dir_face2, aTrsf)) { + Standard_ConstructionError::Raise("The direction faces are not similar"); + } + } + + // Perform multi-transformation + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound(aCompound); + + TopoDS_Shape aPrevShapeU = theBlock; + for (int i = 0; i < theNbIterU; i++) { + TopoDS_Shape aPrevShapeV = aPrevShapeU; + for (int j = 0; j < theNbIterV; j++) { + B.Add(aCompound, aPrevShapeV); + BRepBuilderAPI_Transform aTransformationV (aPrevShapeV, aTrsfV, Standard_False); + aPrevShapeV = aTransformationV.Shape(); + } + BRepBuilderAPI_Transform aTransformationU (aPrevShapeU, aTrsfU, Standard_False); + aPrevShapeU = aTransformationU.Shape(); + // Correction of the second transformation according to the first transformation + Ax1V.Transform(aTrsfU); + Ax2V.Transform(aTrsfU); + aTrsfV.SetDisplacement(Ax1V, Ax2V); + // Correction done + } + theResult = aCompound; +} + +//======================================================================= +//function : GEOMImpl_BlockDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_BlockDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BlockDriver", + sizeof(GEOMImpl_BlockDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_BlockDriver) Handle(GEOMImpl_BlockDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_BlockDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BlockDriver))) { + _anOtherObject = Handle(GEOMImpl_BlockDriver)((Handle(GEOMImpl_BlockDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_BlockDriver.hxx b/src/GEOMImpl/GEOMImpl_BlockDriver.hxx new file mode 100644 index 000000000..8d78a468d --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_BlockDriver.hxx @@ -0,0 +1,155 @@ +// File : GEOMImpl_BlockDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_BlockDriver_HeaderFile +#define _GEOMImpl_BlockDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_BlockDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BlockDriver); + +class Handle(GEOMImpl_BlockDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_BlockDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_BlockDriver)(const Handle(GEOMImpl_BlockDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_BlockDriver)(const GEOMImpl_BlockDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_BlockDriver)& operator=(const Handle(GEOMImpl_BlockDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_BlockDriver)& operator=(const GEOMImpl_BlockDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_BlockDriver* operator->() + { + return (GEOMImpl_BlockDriver *)ControlAccess(); + } + + GEOMImpl_BlockDriver* operator->() const + { + return (GEOMImpl_BlockDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_BlockDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_BlockDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif +#include + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_BlockDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_BlockDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_BlockDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BlockDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BlockDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BlockDriver) == AType || TFunction_Driver::IsKind(AType)); } + +private: + void MultiTransformate1D (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theFace1, + const TopoDS_Shape& theFace2, + const Standard_Integer theNbIter, + TopoDS_Shape& theResult) const; + + void MultiTransformate2D (const TopoDS_Shape& theBlock, + const TopoDS_Shape& theFace1U, + const TopoDS_Shape& theFace2U, + const Standard_Integer theNbIterU, + const TopoDS_Shape& theFace1V, + const TopoDS_Shape& theFace2V, + const Standard_Integer theNbIterV, + TopoDS_Shape& theResult) const; + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx new file mode 100644 index 000000000..32599b5a3 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -0,0 +1,138 @@ + +using namespace std; +#include "GEOMImpl_BooleanDriver.hxx" +#include "GEOMImpl_IBoolean.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_BooleanDriver::GetID() +{ + static Standard_GUID aBooleanDriver("FF1BBB21-5D14-4df2-980B-3A668264EA16"); + return aBooleanDriver; +} + + +//======================================================================= +//function : GEOMImpl_BooleanDriver +//purpose : +//======================================================================= +GEOMImpl_BooleanDriver::GEOMImpl_BooleanDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_BooleanDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IBoolean aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + Handle(GEOM_Function) aRefShape1 = aCI.GetShape1(); + Handle(GEOM_Function) aRefShape2 = aCI.GetShape2(); + TopoDS_Shape aShape1 = aRefShape1->GetValue(); + TopoDS_Shape aShape2 = aRefShape2->GetValue(); + if (!aShape1.IsNull() && !aShape2.IsNull()) { + if (aType == BOOLEAN_COMMON) { + BRepAlgoAPI_Common BO (aShape1, aShape2); +// BO.Build(); + if (!BO.IsDone()) { + StdFail_NotDone::Raise("Requested boolean operation can not be performed on the given shapes"); + } + aShape = BO.Shape(); + } else if (aType == BOOLEAN_CUT) { + BRepAlgoAPI_Cut BO (aShape1, aShape2); + if (!BO.IsDone()) { + StdFail_NotDone::Raise("Requested boolean operation can not be performed on the given shapes"); + } + aShape = BO.Shape(); + } else if (aType == BOOLEAN_FUSE) { + BRepAlgoAPI_Fuse BO (aShape1, aShape2); + if (!BO.IsDone()) { + StdFail_NotDone::Raise("Requested boolean operation can not be performed on the given shapes"); + } + aShape = BO.Shape(); + } else if (aType == BOOLEAN_SECTION) { + BRepAlgoAPI_Section BO (aShape1, aShape2); + if (!BO.IsDone()) { + StdFail_NotDone::Raise("Requested boolean operation can not be performed on the given shapes"); + } + aShape = BO.Shape(); + } else { + } + } + + if (aShape.IsNull()) return 0; + if (!BRepAlgo::IsValid(aShape)) { + Standard_ConstructionError::Raise("Boolean aborted : non valid shape result"); + } + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_BooleanDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BooleanDriver", + sizeof(GEOMImpl_BooleanDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_BooleanDriver) Handle(GEOMImpl_BooleanDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_BooleanDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BooleanDriver))) { + _anOtherObject = Handle(GEOMImpl_BooleanDriver)((Handle(GEOMImpl_BooleanDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.hxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.hxx new file mode 100644 index 000000000..72163fbf8 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_BooleanDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_BooleanDriver_HeaderFile +#define _GEOMImpl_BooleanDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_BooleanDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BooleanDriver); + +class Handle(GEOMImpl_BooleanDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_BooleanDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_BooleanDriver)(const Handle(GEOMImpl_BooleanDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_BooleanDriver)(const GEOMImpl_BooleanDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_BooleanDriver)& operator=(const Handle(GEOMImpl_BooleanDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_BooleanDriver)& operator=(const GEOMImpl_BooleanDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_BooleanDriver* operator->() + { + return (GEOMImpl_BooleanDriver *)ControlAccess(); + } + + GEOMImpl_BooleanDriver* operator->() const + { + return (GEOMImpl_BooleanDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_BooleanDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_BooleanDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_BooleanDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_BooleanDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_BooleanDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BooleanDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BooleanDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BooleanDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_BoxDriver.cxx b/src/GEOMImpl/GEOMImpl_BoxDriver.cxx new file mode 100644 index 000000000..f89ccf678 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_BoxDriver.cxx @@ -0,0 +1,131 @@ + +using namespace std; +#include "GEOMImpl_BoxDriver.hxx" +#include "GEOMImpl_IBox.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include + +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_BoxDriver::GetID() +{ + static Standard_GUID aBoxDriver("FF1BBB13-5D14-4df2-980B-3A668264EA16"); + return aBoxDriver; +} + + +//======================================================================= +//function : GEOMImpl_BoxDriver +//purpose : +//======================================================================= +GEOMImpl_BoxDriver::GEOMImpl_BoxDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_BoxDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IBox aBI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == BOX_DX_DY_DZ) { + BRepPrimAPI_MakeBox MB (aBI.GetDX(), aBI.GetDY(), aBI.GetDZ()); + MB.Build(); + + if (!MB.IsDone()) { + StdFail_NotDone::Raise("Box with the given dimensions can not be computed"); + } + aShape = MB.Shape(); + } + else if (aType == BOX_TWO_PNT) { + Handle(GEOM_Function) aRefPoint1 = aBI.GetRef1(); + Handle(GEOM_Function) aRefPoint2 = aBI.GetRef2(); + TopoDS_Shape aShape1 = aRefPoint1->GetValue(); + TopoDS_Shape aShape2 = aRefPoint2->GetValue(); + if (aShape1.ShapeType() == TopAbs_VERTEX && + aShape2.ShapeType() == TopAbs_VERTEX) { + gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1)); + gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2)); + BRepPrimAPI_MakeBox MB (P1,P2); + MB.Build(); + + if (!MB.IsDone()) { + StdFail_NotDone::Raise("Box can not be computed from the given point"); + } + aShape = MB.Shape(); + } + } + else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_BoxDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_BoxDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_BoxDriver", + sizeof(GEOMImpl_BoxDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_BoxDriver) Handle(GEOMImpl_BoxDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_BoxDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_BoxDriver))) { + _anOtherObject = Handle(GEOMImpl_BoxDriver)((Handle(GEOMImpl_BoxDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_BoxDriver.hxx b/src/GEOMImpl/GEOMImpl_BoxDriver.hxx new file mode 100644 index 000000000..104bff796 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_BoxDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_BoxDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_BoxDriver_HeaderFile +#define _GEOMImpl_BoxDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_BoxDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_BoxDriver); + +class Handle(GEOMImpl_BoxDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_BoxDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_BoxDriver)(const Handle(GEOMImpl_BoxDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_BoxDriver)(const GEOMImpl_BoxDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_BoxDriver)& operator=(const Handle(GEOMImpl_BoxDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_BoxDriver)& operator=(const GEOMImpl_BoxDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_BoxDriver* operator->() + { + return (GEOMImpl_BoxDriver *)ControlAccess(); + } + + GEOMImpl_BoxDriver* operator->() const + { + return (GEOMImpl_BoxDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_BoxDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_BoxDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_BoxDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_BoxDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_BoxDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_BoxDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_BoxDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_BoxDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ChamferDriver.cxx b/src/GEOMImpl/GEOMImpl_ChamferDriver.cxx new file mode 100644 index 000000000..d28ed4633 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ChamferDriver.cxx @@ -0,0 +1,228 @@ + +using namespace std; +#include "GEOMImpl_ChamferDriver.hxx" +#include "GEOMImpl_IChamfer.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_ILocalOperations.hxx" +#include "GEOM_Function.hxx" +#include "GEOMImpl_Block6Explorer.hxx" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ChamferDriver::GetID() +{ + static Standard_GUID aChamferDriver("FF1BBB42-5D14-4df2-980B-3A668264EA16"); + return aChamferDriver; +} + + +//======================================================================= +//function : GEOMImpl_ChamferDriver +//purpose : +//======================================================================= +GEOMImpl_ChamferDriver::GEOMImpl_ChamferDriver() +{ +} + +//======================================================================= +//function : isGoodForChamfer +//purpose : +//======================================================================= +static Standard_Boolean isGoodForChamfer (const TopoDS_Shape& theShape) +{ + if (theShape.ShapeType() == TopAbs_SHELL || + theShape.ShapeType() == TopAbs_SOLID || + theShape.ShapeType() == TopAbs_COMPSOLID) { + return Standard_True; + } + + if (theShape.ShapeType() == TopAbs_COMPOUND) { + TopTools_MapOfShape mapShape; + TopoDS_Iterator It (theShape, Standard_False, Standard_False); + for (; It.More(); It.Next()) { + if (mapShape.Add(It.Value())) { + if (!isGoodForChamfer(It.Value())) { + return Standard_False; + } + } + } + return Standard_True; + } + + return Standard_False; +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ChamferDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IChamfer aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + TopoDS_Shape aShapeBase = aRefShape->GetValue(); + + // Check the shape type. It have to be shell + // or solid, or compsolid, or compound of these shapes. + if (!isGoodForChamfer(aShapeBase)) { + StdFail_NotDone::Raise + ("Wrong shape. Must be shell or solid, or compsolid or compound of these shapes"); + } + + BRepFilletAPI_MakeChamfer fill (aShapeBase); + + if (aType == CHAMFER_SHAPE_ALL) { + // symmetric chamfer on all edges + double aD = aCI.GetD(); + TopTools_IndexedDataMapOfShapeListOfShape M; + GEOMImpl_Block6Explorer::MapShapesAndAncestors(aShapeBase, TopAbs_EDGE, TopAbs_FACE, M); + for (int i = 1; i <= M.Extent(); i++) { + TopoDS_Edge E = TopoDS::Edge(M.FindKey(i)); + TopoDS_Face F = TopoDS::Face(M.FindFromIndex(i).First()); + if (!BRepTools::IsReallyClosed(E, F) && + !BRep_Tool::Degenerated(E) && + M.FindFromIndex(i).Extent() == 2) + fill.Add(aD, E, F); + } + } else if (aType == CHAMFER_SHAPE_EDGE) { + // chamfer on edges, common to two faces, with D1 on the first face + double aD1 = aCI.GetD1(); + double aD2 = aCI.GetD2(); + TopoDS_Shape aFace1, aFace2; + if (GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace1(), aFace1) && + GEOMImpl_ILocalOperations::GetSubShape(aShapeBase, aCI.GetFace2(), aFace2)) { + TopoDS_Face F = TopoDS::Face(aFace1); + + // fill map of edges of the second face + TopTools_MapOfShape aMap; + TopExp_Explorer Exp2 (aFace2, TopAbs_EDGE); + for (; Exp2.More(); Exp2.Next()) { + aMap.Add(Exp2.Current()); + } + + // find edges of the first face, common with the second face + TopExp_Explorer Exp (aFace1, TopAbs_EDGE); + for (; Exp.More(); Exp.Next()) { + if (aMap.Contains(Exp.Current())) { + TopoDS_Edge E = TopoDS::Edge(Exp.Current()); + if (!BRepTools::IsReallyClosed(E, F) && !BRep_Tool::Degenerated(E)) + fill.Add(aD1, aD2, E, F); + } + } + } + } else if (aType == CHAMFER_SHAPE_FACES) { + // chamfer on all edges of the selected faces, with D1 on the selected face + // (on first selected face, if the edge belongs to two selected faces) + double aD1 = aCI.GetD1(); + double aD2 = aCI.GetD2(); + int aLen = aCI.GetLength(); + int ind = 1; + TopTools_MapOfShape aMap; + TopTools_IndexedDataMapOfShapeListOfShape M; + GEOMImpl_Block6Explorer::MapShapesAndAncestors(aShapeBase, TopAbs_EDGE, TopAbs_FACE, M); + for (; ind <= aLen; ind++) + { + TopoDS_Shape aShapeFace; + if (GEOMImpl_ILocalOperations::GetSubShape + (aShapeBase, aCI.GetFace(ind), aShapeFace)) { + TopoDS_Face F = TopoDS::Face(aShapeFace); + TopExp_Explorer Exp (F, TopAbs_EDGE); + for (; Exp.More(); Exp.Next()) { + if (!aMap.Contains(Exp.Current())) { + TopoDS_Edge E = TopoDS::Edge(Exp.Current()); + if (!BRepTools::IsReallyClosed(E, F) && + !BRep_Tool::Degenerated(E) && + M.FindFromKey(E).Extent() == 2) + fill.Add(aD1, aD2, E, F); + } + } + } + } + } else { + } + + fill.Build(); + if (!fill.IsDone()) { + StdFail_NotDone::Raise("Chamfer can not be computed on the given shape with the given parameters"); + } + aShape = fill.Shape(); + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ChamferDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ChamferDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ChamferDriver", + sizeof(GEOMImpl_ChamferDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ChamferDriver) Handle(GEOMImpl_ChamferDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ChamferDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ChamferDriver))) { + _anOtherObject = Handle(GEOMImpl_ChamferDriver)((Handle(GEOMImpl_ChamferDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ChamferDriver.hxx b/src/GEOMImpl/GEOMImpl_ChamferDriver.hxx new file mode 100644 index 000000000..72e2ef480 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ChamferDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ChamferDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ChamferDriver_HeaderFile +#define _GEOMImpl_ChamferDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ChamferDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ChamferDriver); + +class Handle(GEOMImpl_ChamferDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ChamferDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ChamferDriver)(const Handle(GEOMImpl_ChamferDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ChamferDriver)(const GEOMImpl_ChamferDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ChamferDriver)& operator=(const Handle(GEOMImpl_ChamferDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ChamferDriver)& operator=(const GEOMImpl_ChamferDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ChamferDriver* operator->() + { + return (GEOMImpl_ChamferDriver *)ControlAccess(); + } + + GEOMImpl_ChamferDriver* operator->() const + { + return (GEOMImpl_ChamferDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ChamferDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ChamferDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ChamferDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ChamferDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ChamferDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ChamferDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ChamferDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ChamferDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_CircleDriver.cxx b/src/GEOMImpl/GEOMImpl_CircleDriver.cxx new file mode 100644 index 000000000..caa7ac4c3 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_CircleDriver.cxx @@ -0,0 +1,154 @@ + +using namespace std; +#include "GEOMImpl_CircleDriver.hxx" +#include "GEOMImpl_ICircle.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_CircleDriver::GetID() +{ + static Standard_GUID aCircleDriver("FF1BBB32-5D14-4df2-980B-3A668264EA16"); + return aCircleDriver; +} + + +//======================================================================= +//function : GEOMImpl_CircleDriver +//purpose : +//======================================================================= +GEOMImpl_CircleDriver::GEOMImpl_CircleDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_CircleDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ICircle aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == CIRCLE_PNT_VEC_R) { + Handle(GEOM_Function) aRefPoint = aCI.GetCenter(); + Handle(GEOM_Function) aRefVector = aCI.GetVector(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + TopoDS_Shape aShapeVec = aRefVector->GetValue(); + if (aShapePnt.ShapeType() == TopAbs_VERTEX && + aShapeVec.ShapeType() == TopAbs_EDGE) { + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + TopoDS_Edge anE = TopoDS::Edge(aShapeVec); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (!V1.IsNull() && !V2.IsNull()) { + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + gp_Ax2 anAxes (aP, aV); + gp_Circ aCirc (anAxes, aCI.GetRadius()); + aShape = BRepBuilderAPI_MakeEdge(aCirc).Edge(); + } + } + } + else if (aType == CIRCLE_THREE_PNT) { + Handle(GEOM_Function) aRefPoint1 = aCI.GetPoint1(); + Handle(GEOM_Function) aRefPoint2 = aCI.GetPoint2(); + Handle(GEOM_Function) aRefPoint3 = aCI.GetPoint3(); + TopoDS_Shape aShapePnt1 = aRefPoint1->GetValue(); + TopoDS_Shape aShapePnt2 = aRefPoint2->GetValue(); + TopoDS_Shape aShapePnt3 = aRefPoint3->GetValue(); + if (aShapePnt1.ShapeType() == TopAbs_VERTEX && + aShapePnt2.ShapeType() == TopAbs_VERTEX && + aShapePnt3.ShapeType() == TopAbs_VERTEX) { + gp_Pnt aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt1)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt2)); + gp_Pnt aP3 = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt3)); + if (aP1.Distance(aP2) < gp::Resolution() || + aP1.Distance(aP3) < gp::Resolution() || + aP2.Distance(aP3) < gp::Resolution()) + Standard_ConstructionError::Raise("Circle creation aborted: coincident points given"); + if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular())) + Standard_ConstructionError::Raise("Circle creation aborted: points lay on one line"); + Handle(Geom_Circle) aCirc = GC_MakeCircle(aP1, aP2, aP3).Value(); + aShape = BRepBuilderAPI_MakeEdge(aCirc).Edge(); + } + } + else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_CircleDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_CircleDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CircleDriver", + sizeof(GEOMImpl_CircleDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_CircleDriver) Handle(GEOMImpl_CircleDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_CircleDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CircleDriver))) { + _anOtherObject = Handle(GEOMImpl_CircleDriver)((Handle(GEOMImpl_CircleDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_CircleDriver.hxx b/src/GEOMImpl/GEOMImpl_CircleDriver.hxx new file mode 100644 index 000000000..f28cadc01 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_CircleDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_CircleDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_CircleDriver_HeaderFile +#define _GEOMImpl_CircleDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_CircleDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_CircleDriver); + +class Handle(GEOMImpl_CircleDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_CircleDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_CircleDriver)(const Handle(GEOMImpl_CircleDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_CircleDriver)(const GEOMImpl_CircleDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_CircleDriver)& operator=(const Handle(GEOMImpl_CircleDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_CircleDriver)& operator=(const GEOMImpl_CircleDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_CircleDriver* operator->() + { + return (GEOMImpl_CircleDriver *)ControlAccess(); + } + + GEOMImpl_CircleDriver* operator->() const + { + return (GEOMImpl_CircleDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_CircleDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_CircleDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_CircleDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_CircleDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_CircleDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_CircleDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_CircleDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_CircleDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ConeDriver.cxx b/src/GEOMImpl/GEOMImpl_ConeDriver.cxx new file mode 100644 index 000000000..a4486bf98 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ConeDriver.cxx @@ -0,0 +1,165 @@ + +using namespace std; +#include "GEOMImpl_ConeDriver.hxx" +#include "GEOMImpl_ICone.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ConeDriver::GetID() +{ + static Standard_GUID aConeDriver("FF1BBB15-5D14-4df2-980B-3A668264EA16"); + return aConeDriver; +} + + +//======================================================================= +//function : GEOMImpl_ConeDriver +//purpose : +//======================================================================= +GEOMImpl_ConeDriver::GEOMImpl_ConeDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ConeDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ICone aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + gp_Pnt aP; + gp_Vec aV; + + Standard_Real aR1 = aCI.GetR1(); + Standard_Real aR2 = aCI.GetR2(); + + if (aType == CONE_R1_R2_H) { + aP = gp::Origin(); + aV = gp::DZ(); + + } else if (aType == CONE_PNT_VEC_R1_R2_H) { + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); + Handle(GEOM_Function) aRefVector = aCI.GetVector(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + TopoDS_Shape aShapeVec = aRefVector->GetValue(); + if (aShapePnt.IsNull() || aShapeVec.IsNull()) { + Standard_NullObject::Raise + ("Cone creation aborted: point or vector is not defined"); + } + if (aShapePnt.ShapeType() != TopAbs_VERTEX || + aShapeVec.ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise + ("Cone creation aborted: point or vector shapes has wrong type"); + } + + aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + + TopoDS_Edge anE = TopoDS::Edge(aShapeVec); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + Standard_NullObject::Raise + ("Cylinder creation aborted: vector is not defined"); + } + aV = gp_Vec(BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + + } else { + return 0; + } + + if (aCI.GetH() < 0.0) aV.Reverse(); + gp_Ax2 anAxes (aP, aV); + + TopoDS_Shape aShape; + // Cone does not work if same radius + if (fabs(aR1 - aR2) <= Precision::Confusion()) { + BRepPrimAPI_MakeCylinder MC (anAxes, (aR1 + aR2)/2.0, Abs(aCI.GetH())); + MC.Build(); + if (!MC.IsDone()) { + StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters"); + } + aShape = MC.Shape(); + } else { + BRepPrimAPI_MakeCone MC (anAxes, aCI.GetR1(), aCI.GetR2(), Abs(aCI.GetH())); + MC.Build(); + if (!MC.IsDone()) { + StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters"); + } + aShape = MC.Shape(); + } + if (aShape.IsNull()) return 0; + + log.SetTouched(Label()); + + aFunction->SetValue(aShape); + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ConeDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ConeDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ConeDriver", + sizeof(GEOMImpl_ConeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ConeDriver) Handle(GEOMImpl_ConeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ConeDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ConeDriver))) { + _anOtherObject = Handle(GEOMImpl_ConeDriver)((Handle(GEOMImpl_ConeDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ConeDriver.hxx b/src/GEOMImpl/GEOMImpl_ConeDriver.hxx new file mode 100644 index 000000000..86332dc75 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ConeDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ConeDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ConeDriver_HeaderFile +#define _GEOMImpl_ConeDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ConeDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ConeDriver); + +class Handle(GEOMImpl_ConeDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ConeDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ConeDriver)(const Handle(GEOMImpl_ConeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ConeDriver)(const GEOMImpl_ConeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ConeDriver)& operator=(const Handle(GEOMImpl_ConeDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ConeDriver)& operator=(const GEOMImpl_ConeDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ConeDriver* operator->() + { + return (GEOMImpl_ConeDriver *)ControlAccess(); + } + + GEOMImpl_ConeDriver* operator->() const + { + return (GEOMImpl_ConeDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ConeDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ConeDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ConeDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ConeDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ConeDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ConeDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ConeDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ConeDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_CopyDriver.cxx b/src/GEOMImpl/GEOMImpl_CopyDriver.cxx new file mode 100644 index 000000000..8eb25b407 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_CopyDriver.cxx @@ -0,0 +1,114 @@ + +using namespace std; +#include "GEOMImpl_CopyDriver.hxx" +#include "GEOMImpl_ICopy.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_CopyDriver::GetID() +{ + static Standard_GUID aCopyDriver("FF1BBB53-5D14-4df2-980B-3A668264EA16"); + return aCopyDriver; +} + + +//======================================================================= +//function : GEOMImpl_CopyDriver +//purpose : +//======================================================================= +GEOMImpl_CopyDriver::GEOMImpl_CopyDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_CopyDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + Standard_Integer aType = aFunction->GetType(); + + GEOMImpl_ICopy aCI (aFunction); + TopoDS_Shape aCopy; + + if(aType == COPY_WITH_REF) { + + Handle(GEOM_Function) aRefFunction = aCI.GetOriginal(); + if (aRefFunction.IsNull()) return 0; + TopoDS_Shape anOriginal = aRefFunction->GetValue(); + + TColStd_IndexedDataMapOfTransientTransient aMap; + + TNaming_CopyShape::CopyTool(anOriginal, aMap, aCopy); + } + else if(aType == COPY_WITHOUT_REF) { + aCopy = aFunction->GetValue(); + } + + if (aCopy.IsNull()) return 0; + + aFunction->SetValue(aCopy); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_CopyDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_CopyDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CopyDriver", + sizeof(GEOMImpl_CopyDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_CopyDriver) Handle(GEOMImpl_CopyDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_CopyDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CopyDriver))) { + _anOtherObject = Handle(GEOMImpl_CopyDriver)((Handle(GEOMImpl_CopyDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_CopyDriver.hxx b/src/GEOMImpl/GEOMImpl_CopyDriver.hxx new file mode 100644 index 000000000..5fab4d5cb --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_CopyDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_CopyDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_CopyDriver_HeaderFile +#define _GEOMImpl_CopyDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_CopyDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_CopyDriver); + +class Handle(GEOMImpl_CopyDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_CopyDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_CopyDriver)(const Handle(GEOMImpl_CopyDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_CopyDriver)(const GEOMImpl_CopyDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_CopyDriver)& operator=(const Handle(GEOMImpl_CopyDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_CopyDriver)& operator=(const GEOMImpl_CopyDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_CopyDriver* operator->() + { + return (GEOMImpl_CopyDriver *)ControlAccess(); + } + + GEOMImpl_CopyDriver* operator->() const + { + return (GEOMImpl_CopyDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_CopyDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_CopyDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_CopyDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_CopyDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_CopyDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_CopyDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_CopyDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_CopyDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx b/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx new file mode 100644 index 000000000..7706ebef6 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_CylinderDriver.cxx @@ -0,0 +1,148 @@ + +using namespace std; +#include "GEOMImpl_CylinderDriver.hxx" +#include "GEOMImpl_ICylinder.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_CylinderDriver::GetID() +{ + static Standard_GUID aCylinderDriver("FF1BBB14-5D14-4df2-980B-3A668264EA16"); + return aCylinderDriver; +} + + +//======================================================================= +//function : GEOMImpl_CylinderDriver +//purpose : +//======================================================================= +GEOMImpl_CylinderDriver::GEOMImpl_CylinderDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_CylinderDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ICylinder aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + gp_Pnt aP; + gp_Vec aV; + + if (aType == CYLINDER_R_H) { + aP = gp::Origin(); + aV = gp::DZ(); + } + else if (aType == CYLINDER_PNT_VEC_R_H) { + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); + Handle(GEOM_Function) aRefVector = aCI.GetVector(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + TopoDS_Shape aShapeVec = aRefVector->GetValue(); + if (aShapePnt.IsNull() || aShapeVec.IsNull()) { + Standard_NullObject::Raise("Cylinder creation aborted: point or vector is not defined"); + } + if (aShapePnt.ShapeType() != TopAbs_VERTEX || + aShapeVec.ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise("Cylinder creation aborted: point or vector shapes has wrong type"); + } + + aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + + TopoDS_Edge anE = TopoDS::Edge(aShapeVec); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + Standard_NullObject::Raise("Cylinder creation aborted: vector is not defined"); + } + aV = gp_Vec(BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + } + else { + return 0; + } + + if (aCI.GetH() < 0.0) aV.Reverse(); + gp_Ax2 anAxes (aP, aV); + + BRepPrimAPI_MakeCylinder MC (anAxes, aCI.GetR(), Abs(aCI.GetH())); + MC.Build(); + if (!MC.IsDone()) { + StdFail_NotDone::Raise("Cylinder can't be computed from the given parameters"); + } + + TopoDS_Shape aShape = MC.Shape(); + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_CylinderDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_CylinderDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_CylinderDriver", + sizeof(GEOMImpl_CylinderDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_CylinderDriver) Handle(GEOMImpl_CylinderDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_CylinderDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_CylinderDriver))) { + _anOtherObject = Handle(GEOMImpl_CylinderDriver)((Handle(GEOMImpl_CylinderDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_CylinderDriver.hxx b/src/GEOMImpl/GEOMImpl_CylinderDriver.hxx new file mode 100644 index 000000000..20a5778ed --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_CylinderDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_CylinderDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_CylinderDriver_HeaderFile +#define _GEOMImpl_CylinderDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_CylinderDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_CylinderDriver); + +class Handle(GEOMImpl_CylinderDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_CylinderDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_CylinderDriver)(const Handle(GEOMImpl_CylinderDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_CylinderDriver)(const GEOMImpl_CylinderDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_CylinderDriver)& operator=(const Handle(GEOMImpl_CylinderDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_CylinderDriver)& operator=(const GEOMImpl_CylinderDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_CylinderDriver* operator->() + { + return (GEOMImpl_CylinderDriver *)ControlAccess(); + } + + GEOMImpl_CylinderDriver* operator->() const + { + return (GEOMImpl_CylinderDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_CylinderDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_CylinderDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_CylinderDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_CylinderDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_CylinderDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_CylinderDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_CylinderDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_CylinderDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx b/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx new file mode 100644 index 000000000..e21f90c59 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_EllipseDriver.cxx @@ -0,0 +1,124 @@ + +using namespace std; +#include "GEOMImpl_EllipseDriver.hxx" +#include "GEOMImpl_IEllipse.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_EllipseDriver::GetID() +{ + static Standard_GUID aEllipseDriver("FF1BBB34-5D14-4df2-980B-3A668264EA16"); + return aEllipseDriver; +} + + +//======================================================================= +//function : GEOMImpl_EllipseDriver +//purpose : +//======================================================================= +GEOMImpl_EllipseDriver::GEOMImpl_EllipseDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_EllipseDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IEllipse aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == ELLIPSE_PNT_VEC_RR) { + Handle(GEOM_Function) aRefPoint = aCI.GetCenter(); + Handle(GEOM_Function) aRefVector = aCI.GetVector(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + TopoDS_Shape aShapeVec = aRefVector->GetValue(); + if (aShapePnt.ShapeType() == TopAbs_VERTEX && + aShapeVec.ShapeType() == TopAbs_EDGE) { + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + TopoDS_Edge anE = TopoDS::Edge(aShapeVec); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (!V1.IsNull() && !V2.IsNull()) { + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + gp_Ax2 anAxes (aP, aV); + gp_Elips anEll (anAxes, aCI.GetRMajor(), aCI.GetRMinor()); + aShape = BRepBuilderAPI_MakeEdge(anEll).Edge(); + } + } + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_EllipseDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_EllipseDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_EllipseDriver", + sizeof(GEOMImpl_EllipseDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_EllipseDriver) Handle(GEOMImpl_EllipseDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_EllipseDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_EllipseDriver))) { + _anOtherObject = Handle(GEOMImpl_EllipseDriver)((Handle(GEOMImpl_EllipseDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_EllipseDriver.hxx b/src/GEOMImpl/GEOMImpl_EllipseDriver.hxx new file mode 100644 index 000000000..9fcc9e293 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_EllipseDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_EllipseDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_EllipseDriver_HeaderFile +#define _GEOMImpl_EllipseDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_EllipseDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_EllipseDriver); + +class Handle(GEOMImpl_EllipseDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_EllipseDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_EllipseDriver)(const Handle(GEOMImpl_EllipseDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_EllipseDriver)(const GEOMImpl_EllipseDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_EllipseDriver)& operator=(const Handle(GEOMImpl_EllipseDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_EllipseDriver)& operator=(const GEOMImpl_EllipseDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_EllipseDriver* operator->() + { + return (GEOMImpl_EllipseDriver *)ControlAccess(); + } + + GEOMImpl_EllipseDriver* operator->() const + { + return (GEOMImpl_EllipseDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_EllipseDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_EllipseDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_EllipseDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_EllipseDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_EllipseDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_EllipseDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_EllipseDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_EllipseDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.cxx b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx new file mode 100644 index 000000000..21f8c4639 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ExportDriver.cxx @@ -0,0 +1,139 @@ + +using namespace std; +#include "GEOMImpl_ExportDriver.hxx" +#include "GEOMImpl_IImportExport.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include + +#ifdef WNT +#include +#else +#include +#endif + +#ifdef WNT +#define LibHandle HMODULE +#define LoadLib( name ) LoadLibrary( name ) +#define GetProc GetProcAddress +#define UnLoadLib( handle ) FreeLibrary( handle ); +#else +#define LibHandle void* +#define LoadLib( name ) dlopen( name, RTLD_LAZY ) +#define GetProc dlsym +#define UnLoadLib( handle ) dlclose( handle ); +#endif + +typedef int (*funcPoint)(const TopoDS_Shape&, const TCollection_AsciiString&); + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ExportDriver::GetID() +{ + static Standard_GUID aExportDriver("FF1BBB58-5D14-4df2-980B-3A668264EA16"); + return aExportDriver; +} + + +//======================================================================= +//function : GEOMImpl_ExportDriver +//purpose : +//======================================================================= +GEOMImpl_ExportDriver::GEOMImpl_ExportDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ExportDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IImportExport aCI (aFunction); + + // retrieve the being exported shape + TopoDS_Shape aShape; + Handle(GEOM_Function) aRefFunction = aCI.GetOriginal(); + if (aRefFunction.IsNull()) return 0; + aShape = aRefFunction->GetValue(); + if (aShape.IsNull()) return 0; + // !!! set the result of function to be used by next operations + aFunction->SetValue(aShape); + + // retrieve the file and format names + TCollection_AsciiString aFileName = aCI.GetFileName(); + TCollection_AsciiString aLibName = aCI.GetPluginName(); + if (aFileName.IsEmpty() || aLibName.IsEmpty()) + return 0; + + // load plugin library + LibHandle anExportLib = LoadLib( aLibName.ToCString() ); + funcPoint fp = 0; + if ( anExportLib ) + fp = (funcPoint)GetProc( anExportLib, "Export" ); + + if ( !fp ) + return 0; + + // perform the export + int res = fp( aShape, aFileName ); + + // unload plugin library + UnLoadLib( anExportLib ); + if ( res ) + log.SetTouched(Label()); + + return res; +} + + +//======================================================================= +//function : GEOMImpl_ExportDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ExportDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ExportDriver", + sizeof(GEOMImpl_ExportDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ExportDriver) Handle(GEOMImpl_ExportDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ExportDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ExportDriver))) { + _anOtherObject = Handle(GEOMImpl_ExportDriver)((Handle(GEOMImpl_ExportDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ExportDriver.hxx b/src/GEOMImpl/GEOMImpl_ExportDriver.hxx new file mode 100644 index 000000000..795e5258d --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ExportDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ExportDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ExportDriver_HeaderFile +#define _GEOMImpl_ExportDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ExportDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ExportDriver); + +class Handle(GEOMImpl_ExportDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ExportDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ExportDriver)(const Handle(GEOMImpl_ExportDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ExportDriver)(const GEOMImpl_ExportDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ExportDriver)& operator=(const Handle(GEOMImpl_ExportDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ExportDriver)& operator=(const GEOMImpl_ExportDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ExportDriver* operator->() + { + return (GEOMImpl_ExportDriver *)ControlAccess(); + } + + GEOMImpl_ExportDriver* operator->() const + { + return (GEOMImpl_ExportDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ExportDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ExportDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ExportDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ExportDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ExportDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ExportDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ExportDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ExportDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_FilletDriver.cxx b/src/GEOMImpl/GEOMImpl_FilletDriver.cxx new file mode 100644 index 000000000..78a6df186 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_FilletDriver.cxx @@ -0,0 +1,157 @@ + +using namespace std; +#include "GEOMImpl_FilletDriver.hxx" +#include "GEOMImpl_IFillet.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_ILocalOperations.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_FilletDriver::GetID() +{ + static Standard_GUID aFilletDriver("FF1BBB41-5D14-4df2-980B-3A668264EA16"); + return aFilletDriver; +} + + +//======================================================================= +//function : GEOMImpl_FilletDriver +//purpose : +//======================================================================= +GEOMImpl_FilletDriver::GEOMImpl_FilletDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_FilletDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IFillet aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + TopoDS_Shape aShapeBase = aRefShape->GetValue(); + BRepFilletAPI_MakeFillet fill (aShapeBase); + + if (aType == FILLET_SHAPE_ALL) { + TopExp_Explorer Exp (aShapeBase, TopAbs_EDGE); + for (; Exp.More(); Exp.Next()) { + TopoDS_Edge E = TopoDS::Edge(Exp.Current()); + fill.Add(E); + } + } else if (aType == FILLET_SHAPE_EDGES) { + int aLen = aCI.GetLength(); + int ind = 1; + for (; ind <= aLen; ind++) { + TopoDS_Shape aShapeEdge; + if (GEOMImpl_ILocalOperations::GetSubShape + (aShapeBase, aCI.GetEdge(ind), aShapeEdge)) { + fill.Add(TopoDS::Edge(aShapeEdge)); + } + } + } else if (aType == FILLET_SHAPE_FACES) { + int aLen = aCI.GetLength(); + int ind = 1; + for (; ind <= aLen; ind++) { + TopoDS_Shape aShapeFace; + if (GEOMImpl_ILocalOperations::GetSubShape + (aShapeBase, aCI.GetFace(ind), aShapeFace)) { + TopExp_Explorer Exp (aShapeFace, TopAbs_EDGE); + for (; Exp.More(); Exp.Next()) { + fill.Add(TopoDS::Edge(Exp.Current())); + } + } + } + } else { + } + + for (int i = 1; i <= fill.NbContours(); i++) { + fill.SetRadius(aCI.GetR(), i, i); + } + fill.Build(); + if (!fill.IsDone()) { + StdFail_NotDone::Raise("Fillet can't be computed on the given shape with the given radius"); + } + aShape = fill.Shape(); + + if (aShape.IsNull()) return 0; + + // Check shape validity + BRepCheck_Analyzer ana (aShape, false); + if (!ana.IsValid()) { + StdFail_NotDone::Raise("Fillet algorithm have produced an invalid shape result"); + } + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_FilletDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_FilletDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FilletDriver", + sizeof(GEOMImpl_FilletDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_FilletDriver) Handle(GEOMImpl_FilletDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_FilletDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FilletDriver))) { + _anOtherObject = Handle(GEOMImpl_FilletDriver)((Handle(GEOMImpl_FilletDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_FilletDriver.hxx b/src/GEOMImpl/GEOMImpl_FilletDriver.hxx new file mode 100644 index 000000000..c6a3f9e0b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_FilletDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_FilletDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_FilletDriver_HeaderFile +#define _GEOMImpl_FilletDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_FilletDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_FilletDriver); + +class Handle(GEOMImpl_FilletDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_FilletDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_FilletDriver)(const Handle(GEOMImpl_FilletDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_FilletDriver)(const GEOMImpl_FilletDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_FilletDriver)& operator=(const Handle(GEOMImpl_FilletDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_FilletDriver)& operator=(const GEOMImpl_FilletDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_FilletDriver* operator->() + { + return (GEOMImpl_FilletDriver *)ControlAccess(); + } + + GEOMImpl_FilletDriver* operator->() const + { + return (GEOMImpl_FilletDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_FilletDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_FilletDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_FilletDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_FilletDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_FilletDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_FilletDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_FilletDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_FilletDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_FillingDriver.cxx b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx new file mode 100644 index 000000000..0a5bdedf6 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_FillingDriver.cxx @@ -0,0 +1,167 @@ + +using namespace std; + +#include "GEOMImpl_FillingDriver.hxx" +#include "GEOM_Function.hxx" +#include "GEOMImpl_IFilling.hxx" +#include "GEOMImpl_Types.hxx" + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_FillingDriver::GetID() +{ + static Standard_GUID aFillingDriver ("FF1BBB62-5D14-4df2-980B-3A668264EA16"); + return aFillingDriver; +} + + +//======================================================================= +//function : GEOMImpl_FillingDriver +//purpose : +//======================================================================= + +GEOMImpl_FillingDriver::GEOMImpl_FillingDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + if (aFunction.IsNull()) return 0; + + if (aFunction->GetType() != BASIC_FILLING) return 0; + + GEOMImpl_IFilling IF (aFunction); + Handle(GEOM_Function) aShapeFunction = IF.GetShape(); + if (aShapeFunction.IsNull()) return 0; + TopoDS_Shape aShape = aShapeFunction->GetValue(); + if (aShape.IsNull() || aShape.ShapeType() != TopAbs_COMPOUND) return 0; + + Standard_Integer mindeg = IF.GetMinDeg(); + Standard_Integer maxdeg = IF.GetMaxDeg(); + Standard_Real tol3d = IF.GetTol2D(); + Standard_Real tol2d = IF.GetTol3D(); + Standard_Integer nbiter = IF.GetNbIter(); + + if (mindeg > maxdeg) { + Standard_RangeError::Raise("Minimal degree can not be more than maximal degree"); + } + + /* we verify the contents of the shape */ + TopExp_Explorer Ex; + TopoDS_Shape Scurrent; + Standard_Real First, Last; + Handle(Geom_Curve) C; + GeomFill_SectionGenerator Section; + + Standard_Integer i = 0; + for (Ex.Init(aShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { + Scurrent = Ex.Current() ; + if (Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE) return 0; + C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last); + C = new Geom_TrimmedCurve(C, First, Last); + Section.AddCurve(C); + i++; + } + + /* a 'tolerance' is used to compare 2 knots : see GeomFill_Generator.cdl */ + Section.Perform(Precision::Confusion()); + Handle(GeomFill_Line) Line = new GeomFill_Line(i); + + GeomFill_AppSurf App (mindeg, maxdeg, tol3d, tol2d, nbiter); /* user parameters */ + App.Perform(Line, Section); + + if (!App.IsDone()) return 0; + Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots; + App.SurfShape(UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots); + Handle(Geom_BSplineSurface) GBS = new Geom_BSplineSurface + (App.SurfPoles(), App.SurfWeights(), App.SurfUKnots(), App.SurfVKnots(), + App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree()); + + if (GBS.IsNull()) return 0; + aShape = BRepBuilderAPI_MakeFace(GBS); + + /* We test the validity of resulting shape */ + if (!BRepAlgo::IsValid((aShape))) { + Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result"); + return 0; + } + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + return 1; +} + + +//======================================================================= +//function : GEOMImpl_FillingDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_FillingDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FillingDriver", + sizeof(GEOMImpl_FillingDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_FillingDriver) Handle(GEOMImpl_FillingDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_FillingDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FillingDriver))) { + _anOtherObject = Handle(GEOMImpl_FillingDriver)((Handle(GEOMImpl_FillingDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_FillingDriver.hxx b/src/GEOMImpl/GEOMImpl_FillingDriver.hxx new file mode 100644 index 000000000..89ac7ce98 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_FillingDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_FillingDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_FillingDriver_HeaderFile +#define _GEOMImpl_FillingDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_FillingDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_FillingDriver); + +class Handle(GEOMImpl_FillingDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_FillingDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_FillingDriver)(const Handle(GEOMImpl_FillingDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_FillingDriver)(const GEOMImpl_FillingDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_FillingDriver)& operator=(const Handle(GEOMImpl_FillingDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_FillingDriver)& operator=(const GEOMImpl_FillingDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_FillingDriver* operator->() + { + return (GEOMImpl_FillingDriver *)ControlAccess(); + } + + GEOMImpl_FillingDriver* operator->() const + { + return (GEOMImpl_FillingDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_FillingDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_FillingDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_FillingDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_FillingDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_FillingDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_FillingDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_FillingDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_FillingDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_Gen.cxx b/src/GEOMImpl/GEOMImpl_Gen.cxx new file mode 100644 index 000000000..124c0499c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Gen.cxx @@ -0,0 +1,352 @@ +using namespace std; + +#include "GEOMImpl_Gen.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include + +#include "GEOMImpl_PointDriver.hxx" +#include "GEOMImpl_VectorDriver.hxx" +#include "GEOMImpl_LineDriver.hxx" +#include "GEOMImpl_PlaneDriver.hxx" +#include "GEOMImpl_MarkerDriver.hxx" +#include "GEOMImpl_ArcDriver.hxx" +#include "GEOMImpl_CircleDriver.hxx" +#include "GEOMImpl_EllipseDriver.hxx" +#include "GEOMImpl_PolylineDriver.hxx" +#include "GEOMImpl_SplineDriver.hxx" +#include "GEOMImpl_SketcherDriver.hxx" +#include "GEOMImpl_BoxDriver.hxx" +#include "GEOMImpl_ConeDriver.hxx" +#include "GEOMImpl_CylinderDriver.hxx" +#include "GEOMImpl_PrismDriver.hxx" +#include "GEOMImpl_PipeDriver.hxx" +#include "GEOMImpl_RevolutionDriver.hxx" +#include "GEOMImpl_ShapeDriver.hxx" +#include "GEOMImpl_BlockDriver.hxx" +#include "GEOMImpl_SphereDriver.hxx" +#include "GEOMImpl_TorusDriver.hxx" +#include "GEOMImpl_BooleanDriver.hxx" +#include "GEOMImpl_ChamferDriver.hxx" +#include "GEOMImpl_FilletDriver.hxx" +#include "GEOMImpl_TranslateDriver.hxx" +#include "GEOMImpl_RotateDriver.hxx" +#include "GEOMImpl_MirrorDriver.hxx" +#include "GEOMImpl_OffsetDriver.hxx" +#include "GEOMImpl_ScaleDriver.hxx" +#include "GEOMImpl_PositionDriver.hxx" +#include "GEOMImpl_PartitionDriver.hxx" +#include "GEOMImpl_CopyDriver.hxx" +#include "GEOMImpl_ExportDriver.hxx" +#include "GEOMImpl_ImportDriver.hxx" +#include "GEOMImpl_ArchimedeDriver.hxx" +#include "GEOMImpl_HealingDriver.hxx" +#include "GEOMImpl_FillingDriver.hxx" +#include "GEOMImpl_GlueDriver.hxx" +#include "GEOMImpl_MeasureDriver.hxx" + +//============================================================================= +/*! + * default constructor: + */ +//============================================================================= + +GEOMImpl_Gen::GEOMImpl_Gen() +{ + MESSAGE("GEOMImpl_Gen::GEOMImpl_Gen"); + _mapOfBasicOperations.clear(); + + // Basic elements + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PointDriver::GetID(), new GEOMImpl_PointDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_VectorDriver::GetID(), new GEOMImpl_VectorDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_LineDriver::GetID(), new GEOMImpl_LineDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PlaneDriver::GetID(), new GEOMImpl_PlaneDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MarkerDriver::GetID(), new GEOMImpl_MarkerDriver()); + + // Curves + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ArcDriver::GetID(), new GEOMImpl_ArcDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_CircleDriver::GetID(), new GEOMImpl_CircleDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_EllipseDriver::GetID(), new GEOMImpl_EllipseDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PolylineDriver::GetID(), new GEOMImpl_PolylineDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SplineDriver::GetID(), new GEOMImpl_SplineDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SketcherDriver::GetID(), new GEOMImpl_SketcherDriver()); + + // 3D Primitives + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_BoxDriver::GetID(), new GEOMImpl_BoxDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ConeDriver::GetID(), new GEOMImpl_ConeDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_CylinderDriver::GetID(), new GEOMImpl_CylinderDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PrismDriver::GetID(), new GEOMImpl_PrismDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeDriver::GetID(), new GEOMImpl_PipeDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_RevolutionDriver::GetID(), new GEOMImpl_RevolutionDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SphereDriver::GetID(), new GEOMImpl_SphereDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_TorusDriver::GetID(), new GEOMImpl_TorusDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_FillingDriver::GetID(), new GEOMImpl_FillingDriver()); + + // Shapes Operations + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ShapeDriver::GetID(), new GEOMImpl_ShapeDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_GlueDriver::GetID(), new GEOMImpl_GlueDriver()); + + // Blocks Operations + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_BlockDriver::GetID(), new GEOMImpl_BlockDriver()); + + // Boolean Operations, Partition + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_BooleanDriver::GetID(), new GEOMImpl_BooleanDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PartitionDriver::GetID(), new GEOMImpl_PartitionDriver()); + + // Local Operations + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ChamferDriver::GetID(), new GEOMImpl_ChamferDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_FilletDriver::GetID(), new GEOMImpl_FilletDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ArchimedeDriver::GetID(), new GEOMImpl_ArchimedeDriver()); + + // Geometrical Transformations, Offset, Scale + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_TranslateDriver::GetID(), new GEOMImpl_TranslateDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_RotateDriver::GetID(), new GEOMImpl_RotateDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MirrorDriver::GetID(), new GEOMImpl_MirrorDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_OffsetDriver::GetID(), new GEOMImpl_OffsetDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ScaleDriver::GetID(), new GEOMImpl_ScaleDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PositionDriver::GetID(), new GEOMImpl_PositionDriver()); + + // Insert Operations (Copy, Import/Export) + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_CopyDriver::GetID(), new GEOMImpl_CopyDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ImportDriver::GetID(), new GEOMImpl_ImportDriver()); + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ExportDriver::GetID(), new GEOMImpl_ExportDriver()); + + // Shape Healing + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_HealingDriver::GetID(), new GEOMImpl_HealingDriver()); + + // Measurements + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MeasureDriver::GetID(), new GEOMImpl_MeasureDriver()); + + SetEngine(this); +} + +//============================================================================= +/*! + * + */ +//============================================================================= + +GEOMImpl_Gen::~GEOMImpl_Gen() +{ + MESSAGE("GEOMImpl_Gen::~GEOMImpl_Gen"); + + std::map::iterator aBasicIter = _mapOfBasicOperations.begin(); + for (; aBasicIter != _mapOfBasicOperations.end(); aBasicIter++) + delete (*aBasicIter).second; + + std::map::iterator aTransformIter = _mapOfTransformOperations.begin(); + for (; aTransformIter != _mapOfTransformOperations.end(); aTransformIter++) + delete (*aTransformIter).second; + + std::map::iterator a3DPrimIter = _mapOf3DPrimOperations.begin(); + for (; a3DPrimIter != _mapOf3DPrimOperations.end(); a3DPrimIter++) + delete (*a3DPrimIter).second; + + std::map::iterator aShapesIter = _mapOfShapesOperations.begin(); + for (; aShapesIter != _mapOfShapesOperations.end(); aShapesIter++) + delete (*aShapesIter).second; + + std::map::iterator aBlocksIter = _mapOfBlocksOperations.begin(); + for (; aBlocksIter != _mapOfBlocksOperations.end(); aBlocksIter++) + delete (*aBlocksIter).second; + + std::map::iterator aBooleanIter = _mapOfBooleanOperations.begin(); + for (; aBooleanIter != _mapOfBooleanOperations.end(); aBooleanIter++) + delete (*aBooleanIter).second; + + std::map::iterator aHealingIter = _mapOfHealingOperations.begin(); + for (; aHealingIter != _mapOfHealingOperations.end(); aHealingIter++) + delete (*aHealingIter).second; + + std::map::iterator aCurvesIter = _mapOfCurvesOperations.begin(); + for (; aCurvesIter != _mapOfCurvesOperations.end(); aCurvesIter++) + delete (*aCurvesIter).second; + + std::map::iterator aLocalIter = _mapOfLocalOperations.begin(); + for (; aLocalIter != _mapOfLocalOperations.end(); aLocalIter++) + delete (*aLocalIter).second; + + std::map::iterator aInsertIter = _mapOfInsertOperations.begin(); + for (; aInsertIter != _mapOfInsertOperations.end(); aInsertIter++) + delete (*aInsertIter).second; + + std::map::iterator aMeasureIter = _mapOfMeasureOperations.begin(); + for (; aMeasureIter != _mapOfMeasureOperations.end(); aMeasureIter++) + delete (*aMeasureIter).second; + + std::map::iterator aGroupIter = _mapOfGroupOperations.begin(); + for (; aGroupIter != _mapOfGroupOperations.end(); aGroupIter++) + delete (*aGroupIter).second; +} + +//============================================================================= +/*! + * GetIBasicOperations + */ +//============================================================================= +GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID) +{ + if(_mapOfBasicOperations.find(theDocID) == _mapOfBasicOperations.end()) { + _mapOfBasicOperations[theDocID] = new GEOMImpl_IBasicOperations(this, theDocID); + } + + return _mapOfBasicOperations[theDocID]; +} + +//============================================================================= +/*! + * GetITransformOperations + */ +//============================================================================= +GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocID) +{ + if(_mapOfTransformOperations.find(theDocID) == _mapOfTransformOperations.end()) { + _mapOfTransformOperations[theDocID] = new GEOMImpl_ITransformOperations(this, theDocID); + } + + return _mapOfTransformOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIBooleanOperations + */ +//============================================================================= +GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID) +{ + if(_mapOfBooleanOperations.find(theDocID) == _mapOfBooleanOperations.end()) { + _mapOfBooleanOperations[theDocID] = new GEOMImpl_IBooleanOperations(this, theDocID); + } + + return _mapOfBooleanOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIHealingOperations + */ +//============================================================================= +GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID) +{ + if(_mapOfHealingOperations.find(theDocID) == _mapOfHealingOperations.end()) { + _mapOfHealingOperations[theDocID] = new GEOMImpl_IHealingOperations(this, theDocID); + } + + return _mapOfHealingOperations[theDocID]; +} + +//============================================================================= +/*! + * GetI3DPrimOperations + */ +//============================================================================= +GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID) +{ + if(_mapOf3DPrimOperations.find(theDocID) == _mapOf3DPrimOperations.end()) { + _mapOf3DPrimOperations[theDocID] = new GEOMImpl_I3DPrimOperations(this, theDocID); + } + + return _mapOf3DPrimOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIShapesOperations + */ +//============================================================================= +GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID) +{ + if(_mapOfShapesOperations.find(theDocID) == _mapOfShapesOperations.end()) { + _mapOfShapesOperations[theDocID] = new GEOMImpl_IShapesOperations(this, theDocID); + } + + return _mapOfShapesOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIBlocksOperations + */ +//============================================================================= +GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID) +{ + if(_mapOfBlocksOperations.find(theDocID) == _mapOfBlocksOperations.end()) { + _mapOfBlocksOperations[theDocID] = new GEOMImpl_IBlocksOperations(this, theDocID); + } + + return _mapOfBlocksOperations[theDocID]; +} + +//============================================================================= +/*! + * GetICurvesOperations + */ +//============================================================================= +GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID) +{ + if(_mapOfCurvesOperations.find(theDocID) == _mapOfCurvesOperations.end()) { + _mapOfCurvesOperations[theDocID] = new GEOMImpl_ICurvesOperations(this, theDocID); + } + + return _mapOfCurvesOperations[theDocID]; +} + +//============================================================================= +/*! + * GetILocalOperations + */ +//============================================================================= +GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID) +{ + if(_mapOfLocalOperations.find(theDocID) == _mapOfLocalOperations.end()) { + _mapOfLocalOperations[theDocID] = new GEOMImpl_ILocalOperations(this, theDocID); + } + + return _mapOfLocalOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIInsertOperations + */ +//============================================================================= +GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID) +{ + if(_mapOfInsertOperations.find(theDocID) == _mapOfInsertOperations.end()) { + _mapOfInsertOperations[theDocID] = new GEOMImpl_IInsertOperations(this, theDocID); + } + + return _mapOfInsertOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIMeasureOperations + */ +//============================================================================= +GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID) +{ + if(_mapOfMeasureOperations.find(theDocID) == _mapOfMeasureOperations.end()) { + _mapOfMeasureOperations[theDocID] = new GEOMImpl_IMeasureOperations(this, theDocID); + } + + return _mapOfMeasureOperations[theDocID]; +} + +//============================================================================= +/*! + * GetIGroupOperations + */ +//============================================================================= +GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID) +{ + if(_mapOfGroupOperations.find(theDocID) == _mapOfGroupOperations.end()) { + _mapOfGroupOperations[theDocID] = new GEOMImpl_IGroupOperations(this, theDocID); + } + + return _mapOfGroupOperations[theDocID]; +} diff --git a/src/GEOMImpl/GEOMImpl_Gen.hxx b/src/GEOMImpl/GEOMImpl_Gen.hxx new file mode 100644 index 000000000..255b4f54e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Gen.hxx @@ -0,0 +1,67 @@ + +#ifndef _GEOMImpl_GEN_HXX_ +#define _GEOMImpl_GEN_HXX_ + +#include + +#include "GEOMImpl_IBasicOperations.hxx" +#include "GEOMImpl_ITransformOperations.hxx" +#include "GEOMImpl_I3DPrimOperations.hxx" +#include "GEOMImpl_IShapesOperations.hxx" +#include "GEOMImpl_IBlocksOperations.hxx" +#include "GEOMImpl_IBooleanOperations.hxx" +#include "GEOMImpl_IHealingOperations.hxx" +#include "GEOMImpl_ICurvesOperations.hxx" +#include "GEOMImpl_ILocalOperations.hxx" +#include "GEOMImpl_IInsertOperations.hxx" +#include "GEOMImpl_IMeasureOperations.hxx" +#include "GEOMImpl_IGroupOperations.hxx" +#include "GEOM_Engine.hxx" + +class GEOMImpl_Gen : public GEOM_Engine +{ + public: + GEOMImpl_Gen(); + ~GEOMImpl_Gen(); + + GEOMImpl_IBasicOperations* GetIBasicOperations(int theDocID); + + GEOMImpl_ITransformOperations* GetITransformOperations(int theDocID); + + GEOMImpl_I3DPrimOperations* GetI3DPrimOperations(int theDocID); + + GEOMImpl_IShapesOperations* GetIShapesOperations(int theDocID); + + GEOMImpl_IBlocksOperations* GetIBlocksOperations(int theDocID); + + GEOMImpl_IMeasureOperations* GetIMeasureOperations(int theDocID); + + GEOMImpl_IBooleanOperations* GetIBooleanOperations(int theDocID); + + GEOMImpl_ICurvesOperations* GetICurvesOperations(int theDocID); + + GEOMImpl_ILocalOperations* GetILocalOperations(int theDocID); + + GEOMImpl_IInsertOperations* GetIInsertOperations(int theDocID); + + GEOMImpl_IHealingOperations* GetIHealingOperations(int theDocID); + + GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID); + + private: + + std::map _mapOfBasicOperations; + std::map _mapOfTransformOperations; + std::map _mapOf3DPrimOperations; + std::map _mapOfShapesOperations; + std::map _mapOfBlocksOperations; + std::map _mapOfBooleanOperations; + std::map _mapOfHealingOperations; + std::map _mapOfCurvesOperations; + std::map _mapOfLocalOperations; + std::map _mapOfInsertOperations; + std::map _mapOfMeasureOperations; + std::map _mapOfGroupOperations; +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx new file mode 100644 index 000000000..e41b48ccb --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx @@ -0,0 +1,388 @@ + +using namespace std; +#include "GEOMImpl_GlueDriver.hxx" +#include "GEOMImpl_IGlue.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_GlueDriver::GetID() +{ + static Standard_GUID aGlueDriver("FF1BBB63-5D14-4df2-980B-3A668264EA16"); + return aGlueDriver; +} + + +//======================================================================= +//function : GEOMImpl_GlueDriver +//purpose : +//======================================================================= +GEOMImpl_GlueDriver::GEOMImpl_GlueDriver() +{ +} + +//======================================================================= +//function : FindSameFace +//purpose : for GLUE_FACES +//======================================================================= +static TopoDS_Face FindSameFace (const TopoDS_Shape& aShape, + const TopoDS_Face& F, + const double tol3d) +{ + TopoDS_Face aFace; + bool isSame = false; + for (TopExp_Explorer exf (aShape, TopAbs_FACE); exf.More(); exf.Next()) { + // test a face + int nbFound = 0; + aFace = TopoDS::Face(exf.Current()); + TopTools_ListOfShape liste1; + TopTools_ListOfShape liste2; + for (TopExp_Explorer exp (aFace, TopAbs_VERTEX); exp.More(); exp.Next()) { + const TopoDS_Vertex& V = TopoDS::Vertex(exp.Current()); + liste1.Append(V); + } + for (TopExp_Explorer exp (F, TopAbs_VERTEX); exp.More(); exp.Next()) { + const TopoDS_Vertex& V = TopoDS::Vertex(exp.Current()); + liste2.Append(V); + } + isSame = false; + if (liste1.Extent() == liste2.Extent()) + { + TopTools_ListIteratorOfListOfShape it1 (liste1); + isSame = true; + for (; it1.More(); it1.Next()) + { + bool foundSamePoint = false; + gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(it1.Value())); + TopTools_ListIteratorOfListOfShape it2 (liste2); + for (; it2.More(); it2.Next()) { + gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(it2.Value())); + double d = P1.Distance(P2); + if (d < tol3d) { + nbFound++; + // found Same Point : P1 + foundSamePoint = true; + break; + } + } + isSame = isSame && foundSamePoint; + if (! isSame) break; // a vertex does not correspond : not same face + } + } + if (isSame) { + // Found Same Face + break; // a face corresponding to F is found + } + } + if (!isSame) aFace.Nullify(); // return null face + return aFace; +} + +//======================================================================= +//function : FindSameEdge +//purpose : for GLUE_FACES +//======================================================================= +static TopoDS_Edge FindSameEdge (const TopoDS_Face& nf, + TopoDS_Edge& Eold, + const double tol3d) +{ + TopoDS_Face newFace = TopoDS::Face(nf.Oriented(TopAbs_REVERSED)); + TopoDS_Vertex VFirst, VLast; + TopExp::Vertices(Eold, VFirst, VLast); + gp_Pnt Pf = BRep_Tool::Pnt(VFirst); + gp_Pnt Pl = BRep_Tool::Pnt(VLast); + TopoDS_Edge Enew; + for (TopExp_Explorer ee (newFace, TopAbs_EDGE); ee.More(); ee.Next()) { + const TopoDS_Edge& E = TopoDS::Edge(ee.Current()); + TopoDS_Vertex VFn, VLn; + TopExp::Vertices(E, VFn, VLn); + gp_Pnt Pfn = BRep_Tool::Pnt(VFn); + gp_Pnt Pln = BRep_Tool::Pnt(VLn); + double dff = Pf.Distance(Pfn); + double dfl = Pf.Distance(Pln); + double dlf = Pl.Distance(Pfn); + double dll = Pl.Distance(Pln); + if ((dff < tol3d) && (dll 0) && shellAdded) { + shellAdded = false; + its.Initialize(shellList); + for (; its.More(); its.Next()) { + S = TopoDS::Shell(its.Value()); + + // compare tolerance with shape's size + Bnd_Box aBox; + BRepBndLib::Add(S, aBox); + Standard_Real Xmin, Ymin, Zmin, Xmax, Ymax, Zmax; + aBox.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax); + Standard_Real aTolerance = theTolerance; + if (aBox.IsXThin(100. * aTolerance)) + aTolerance = 0.01 * (Xmax - Xmin); + if (aBox.IsYThin(100. * aTolerance)) + aTolerance = 0.01 * (Ymax - Ymin); + if (aBox.IsZThin(100. * aTolerance)) + aTolerance = 0.01 * (Zmax - Zmin); + if (theTolerance > aTolerance) + bigTolerance = true; + + bool isConnected = false; + TopTools_ListOfShape newEdges; // common edges from new compound + TopTools_ListOfShape oldEdges; // common edges from face to add + TopoDS_Compound CFN; + TopoDS_Compound CFO; + bu.MakeCompound(CFN); // empty compound for new faces + bu.MakeCompound(CFO); // empty compound for old faces + + for (TopExp_Explorer exp (S, TopAbs_FACE); exp.More(); exp.Next()) { + // try to find corresponding face in new compound + TopoDS_Face F = TopoDS::Face(exp.Current()); + TopoDS_Face newFace = FindSameFace(C,F,aTolerance); + if (! newFace.IsNull()) + { + // face found + isConnected = true; + bu.Add(CFN, newFace); // common faces from new compound + for (TopExp_Explorer ee (F, TopAbs_EDGE); ee.More(); ee.Next()) { + // find edge pair + TopoDS_Edge Eold = TopoDS::Edge(ee.Current()); + TopoDS_Edge Enew = FindSameEdge(newFace, Eold, aTolerance); + if (Enew.IsNull()) { + Standard_ConstructionError::Raise("Glue aborted : no same edge in same face"); + } + oldEdges.Append(Eold); + newEdges.Append(Enew); + } + } else { + bu.Add(CFO, F); // not common faces from shell to add + } + } + if (isConnected) { + // some faces found + shellAdded = true; + BRepTools_Quilt glue; + glue.Add(CFN); + TopTools_ListIteratorOfListOfShape ito (oldEdges); + TopTools_ListIteratorOfListOfShape itn (newEdges); + for (; ito.More(); ito.Next()) { + // bind + glue.Bind(TopoDS::Edge(ito.Value()), TopoDS::Edge(itn.Value())); + itn.Next(); + } + glue.Add(CFO); + TopoDS_Compound newc = TopoDS::Compound(glue.Shells()); + for (TopExp_Explorer exs (newc, TopAbs_SHELL); exs.More(); exs.Next()) { + TopoDS_Shell NS = TopoDS::Shell(exs.Current()); + bu.Add(C, NS); + } + shellList.Remove(its); + // remove shell from list + break; + } + } + } + + if (shellList.Extent() > 0) { + TCollection_AsciiString aMsg + ("Some shapes can not be glued with others, because they are too far from them."); + if (bigTolerance) { + aMsg += "\n\nWarning: The tolerance is too big for some sub-shapes, 1% of sub-shape size is given instead."; + } + Standard_ConstructionError::Raise(aMsg.ToCString()); + } + + TopExp_Explorer exp (C, TopAbs_SHELL); + Standard_Integer ish = 0; + TopoDS_Compound Res; + TopoDS_Solid Sol; + BRep_Builder B; + B.MakeCompound(Res); + + for (; exp.More(); exp.Next()) { + TopoDS_Shape Sh = exp.Current(); + B.MakeSolid(Sol); + B.Add(Sol,Sh); + BRepClass3d_SolidClassifier SC(Sol); + SC.PerformInfinitePoint(1.E-6); // cf. BRepFill_Confusion() - BRepFill_Evolved.cxx + if (SC.State() == TopAbs_IN) { + B.MakeSolid(Sol); + B.Add(Sol,Sh.Reversed()); + } + B.Add(Res,Sol); + ish++; + } + if (ish == 1) { + aShape = Sol; + } else { + aShape = Res; + } + + BRepLib::SameParameter(aShape, 1.E-5, Standard_True); + return aShape; +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IGlue aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == GLUE_FACES) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + if (aShapeBase.IsNull()) { + Standard_NullObject::Raise("Shape for gluing is null"); + } + + Standard_Real tol3d = aCI.GetTolerance(); + aShape = GlueFaces(aShapeBase, tol3d); + + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_GlueDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_GlueDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_GlueDriver", + sizeof(GEOMImpl_GlueDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_GlueDriver) Handle(GEOMImpl_GlueDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_GlueDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_GlueDriver))) { + _anOtherObject = Handle(GEOMImpl_GlueDriver)((Handle(GEOMImpl_GlueDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx new file mode 100644 index 000000000..489f6a11c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx @@ -0,0 +1,142 @@ +// File : GEOMImpl_GlueDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_GlueDriver_HeaderFile +#define _GEOMImpl_GlueDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_GlueDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_GlueDriver); + +class Handle(GEOMImpl_GlueDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_GlueDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_GlueDriver)(const Handle(GEOMImpl_GlueDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_GlueDriver)(const GEOMImpl_GlueDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_GlueDriver)& operator=(const Handle(GEOMImpl_GlueDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_GlueDriver)& operator=(const GEOMImpl_GlueDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_GlueDriver* operator->() + { + return (GEOMImpl_GlueDriver *)ControlAccess(); + } + + GEOMImpl_GlueDriver* operator->() const + { + return (GEOMImpl_GlueDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_GlueDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_GlueDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif +#include + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_GlueDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_GlueDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_GlueDriver() {}; + +Standard_EXPORT static TopoDS_Shape GlueFaces (const TopoDS_Shape& theShape, + const Standard_Real theTolerance); + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_GlueDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_GlueDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_GlueDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_HealingDriver.cxx b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx new file mode 100644 index 000000000..a1b1d8bda --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_HealingDriver.cxx @@ -0,0 +1,405 @@ + +using namespace std; +#include "GEOMImpl_HealingDriver.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_IHealing.hxx" +#include "GEOM_Function.hxx" + +#include "ShHealOper_ShapeProcess.hxx" +#include "ShHealOper_RemoveFace.hxx" +#include "ShHealOper_CloseContour.hxx" +#include "ShHealOper_RemoveInternalWires.hxx" +#include "ShHealOper_FillHoles.hxx" +#include "ShHealOper_Sewing.hxx" +#include "ShHealOper_EdgeDivide.hxx" + +#include +#include +#include + +#include + +//======================================================================= +//function : raiseNotDoneExeption +//purpose : global function: forms error message and raises exeption +//======================================================================= +void raiseNotDoneExeption( const int theErrorStatus ) +{ + switch ( theErrorStatus ) + { + case ShHealOper_NotError: StdFail_NotDone::Raise( "ShHealOper_NotError_msg" ); + case ShHealOper_InvalidParameters: StdFail_NotDone::Raise( "ShHealOper_InvalidParameters_msg" ); + case ShHealOper_ErrorExecution: + default: StdFail_NotDone::Raise( "ShHealOper_ErrorExecution_msg" ); + } +} + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_HealingDriver::GetID() +{ + static Standard_GUID aHealingDriver("FF1BBB61-5D14-4df2-980B-3A668264EA16"); + return aHealingDriver; +} + + +//======================================================================= +//function : GEOMImpl_HealingDriver +//purpose : +//======================================================================= + +GEOMImpl_HealingDriver::GEOMImpl_HealingDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_HealingDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + if (aFunction.IsNull()) return 0; + + GEOMImpl_IHealing HI (aFunction); + Standard_Integer aType = aFunction->GetType(); + Handle(GEOM_Function) anOriginalFunction = HI.GetOriginal(); + if (anOriginalFunction.IsNull()) return 0; + TopoDS_Shape aShape, anOriginalShape = anOriginalFunction->GetValue(); + if (anOriginalShape.IsNull()) return 0; + + switch (aType) + { + case SHAPE_PROCESS: + ShapeProcess(&HI, anOriginalShape, aShape); + break; + case SUPPRESS_FACES: + SuppressFaces(&HI, anOriginalShape, aShape); + break; + case CLOSE_CONTOUR: + CloseContour(&HI, anOriginalShape, aShape); + break; + case REMOVE_INT_WIRES: + RemoveIntWires(&HI, anOriginalShape, aShape); + break; + case FILL_HOLES: + RemoveHoles(&HI, anOriginalShape, aShape); + break; + case SEWING: + Sew(&HI, anOriginalShape, aShape); + break; + case DIVIDE_EDGE: + AddPointOnEdge(&HI, anOriginalShape, aShape); + break; + default: + return 0; + } + + if (aShape.IsNull()) + raiseNotDoneExeption( ShHealOper_ErrorExecution ); + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + return 1; +} + +//======================================================================= +//function : ShapeProcess +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::ShapeProcess (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Handle(TColStd_HArray1OfExtendedString) anOperators = theHI->GetOperators(); + Handle(TColStd_HArray1OfExtendedString) aParams = theHI->GetParameters(); + Handle(TColStd_HArray1OfExtendedString) aValues = theHI->GetValues(); + + if (anOperators.IsNull() || anOperators->Length() <= 0) + return Standard_False; + + Standard_Integer nbParams = 0, nbValues = 0; + if (!aParams.IsNull()) { + nbParams = aParams->Length(); + } + if (!aValues.IsNull()) { + nbValues = aValues->Length(); + } + if (nbParams != nbValues) + return Standard_False; + + ShHealOper_ShapeProcess aHealer; + TColStd_SequenceOfAsciiString anOperatorsAS, aParamsAS, aValuesAS; + int i; + for (i = 1; i <= anOperators->Length(); i++) + anOperatorsAS.Append(TCollection_AsciiString(anOperators->Value(i))); + + aHealer.SetOperators(anOperatorsAS); + + for (i = 1; i <= nbParams; i++) { + aHealer.SetParameter(TCollection_AsciiString(aParams->Value(i)), + TCollection_AsciiString(aValues->Value(i))); + } + + aHealer.Perform(theOriginalShape, theOutShape); + + if (!aHealer.isDone()) + raiseNotDoneExeption( ShHealOper_NotError ); + + return Standard_True; +} + +//======================================================================= +//function : SupressFaces +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::SuppressFaces (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Handle(TColStd_HArray1OfInteger) aFaces = theHI->GetFaces(); + + ShHealOper_RemoveFace aHealer (theOriginalShape); + + Standard_Boolean aResult = Standard_False; + if (aFaces.IsNull()) // remove all faces + { + aResult = aHealer.Perform(); + } else { + TopTools_SequenceOfShape aShapesFaces; + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes(theOriginalShape, aShapes); + for (int i = 1; i <= aFaces->Length(); i++) { + int indexOfFace = aFaces->Value(i); + TopoDS_Shape aFace = aShapes.FindKey(indexOfFace); + aShapesFaces.Append(aFace); + } + + aResult = aHealer.Perform(aShapesFaces); + } + + if ( aResult ) + theOutShape = aHealer.GetResultShape(); + else + raiseNotDoneExeption( aHealer.GetErrorStatus() ); + + return aResult; +} + +//======================================================================= +//function : CloseContour +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::CloseContour (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Standard_Boolean isByVertex = theHI->GetIsCommonVertex(); + Handle(TColStd_HArray1OfInteger) aWires = theHI->GetWires(); + + ShHealOper_CloseContour aHealer (theOriginalShape); + + Standard_Boolean aResult = Standard_False; + if ( aWires.IsNull() ) { + if ( theOriginalShape.ShapeType() == TopAbs_WIRE ) + aResult = aHealer.Perform(TopoDS::Wire(theOriginalShape), isByVertex, !isByVertex); + } + else { + TopTools_SequenceOfShape aShapesWires; + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes(theOriginalShape, aShapes); + for (int i = 1; i <= aWires->Length(); i++) { + int indexOfWire = aWires->Value(i); + TopoDS_Shape aWire = aShapes.FindKey(indexOfWire); + aShapesWires.Append(aWire); + } + + aResult = aHealer.Perform( aShapesWires, isByVertex, !isByVertex ); + } + + if (aResult) + theOutShape = aHealer.GetResultShape(); + else + raiseNotDoneExeption( aHealer.GetErrorStatus() ); + + return aResult; +} + +//======================================================================= +//function : RemoveIntWires +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::RemoveIntWires (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Handle(TColStd_HArray1OfInteger) aWires = theHI->GetWires(); + + ShHealOper_RemoveInternalWires aHealer(theOriginalShape); + + Standard_Boolean aResult = Standard_False; + if (aWires.IsNull()) { // remove all faces + aResult = aHealer.Remove(); + } else { + TopTools_SequenceOfShape aShapesWires; + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes(theOriginalShape, aShapes); + for (int i = 1; i <= aWires->Length(); i++) { + int indexOfWire = aWires->Value(i); + TopoDS_Shape aWire = aShapes.FindKey(indexOfWire); + aShapesWires.Append(aWire); + } + + aResult = aHealer.Remove(aShapesWires); + } + + if (aResult) + theOutShape = aHealer.GetResultShape(); + else + raiseNotDoneExeption( aHealer.GetErrorStatus() ); + + return aResult; +} + +//======================================================================= +//function : RemoveHoles +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::RemoveHoles (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Handle(TColStd_HArray1OfInteger) aWires = theHI->GetWires(); + + ShHealOper_FillHoles aHealer (theOriginalShape); + + Standard_Boolean aResult = Standard_False; + if (aWires.IsNull()) { // remove all faces + aResult = aHealer.Fill(); + } else { + TopTools_SequenceOfShape aShapesWires; + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes(theOriginalShape, aShapes); + for (int i = 1; i <= aWires->Length(); i++) { + int indexOfWire = aWires->Value(i); + TopoDS_Shape aWire = aShapes.FindKey(indexOfWire); + aShapesWires.Append(aWire); + } + + aResult = aHealer.Fill(aShapesWires); + } + + if (aResult) + theOutShape = aHealer.GetResultShape(); + else + raiseNotDoneExeption( aHealer.GetErrorStatus() ); + + return aResult; +} + +//======================================================================= +//function : Sew +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::Sew (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Standard_Real aTol = theHI->GetTolerance(); + + ShHealOper_Sewing aHealer (theOriginalShape, aTol); + + Standard_Boolean aResult = aHealer.Perform(); + + if (aResult) + theOutShape = aHealer.GetResultShape(); + else + raiseNotDoneExeption( aHealer.GetErrorStatus() ); + + return aResult; +} + +//======================================================================= +//function : AddPointOnEdge +//purpose : +//======================================================================= +Standard_Boolean GEOMImpl_HealingDriver::AddPointOnEdge (GEOMImpl_IHealing* theHI, + const TopoDS_Shape& theOriginalShape, + TopoDS_Shape& theOutShape) const +{ + Standard_Boolean isByParameter = theHI->GetIsByParameter(); + Standard_Integer anIndex = theHI->GetIndex(); + Standard_Real aValue = theHI->GetDevideEdgeValue(); + + ShHealOper_EdgeDivide aHealer (theOriginalShape); + + Standard_Boolean aResult = Standard_False; + if (anIndex == -1) { // apply algorythm for the whole shape which is EDGE + if (theOriginalShape.ShapeType() == TopAbs_EDGE) + aResult = aHealer.Perform(TopoDS::Edge(theOriginalShape), aValue, isByParameter); + } else { + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes(theOriginalShape, aShapes); + TopoDS_Shape aEdgeShape = aShapes.FindKey(anIndex); + if (aEdgeShape.ShapeType() == TopAbs_EDGE) + aResult = aHealer.Perform(TopoDS::Edge(aEdgeShape), aValue, isByParameter); + } + + if (aResult) + theOutShape = aHealer.GetResultShape(); + else + raiseNotDoneExeption( aHealer.GetErrorStatus() ); + + return aResult; +} + + +//======================================================================= +//function : GEOMImpl_HealingDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_HealingDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_HealingDriver", + sizeof(GEOMImpl_HealingDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_HealingDriver) Handle(GEOMImpl_HealingDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_HealingDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_HealingDriver))) { + _anOtherObject = Handle(GEOMImpl_HealingDriver)((Handle(GEOMImpl_HealingDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_HealingDriver.hxx b/src/GEOMImpl/GEOMImpl_HealingDriver.hxx new file mode 100644 index 000000000..97390d632 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_HealingDriver.hxx @@ -0,0 +1,152 @@ +// File : GEOMImpl_HealingDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_HealingDriver_HeaderFile +#define _GEOMImpl_HealingDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_HealingDriver; + +class GEOMImpl_IHealing; +#include + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_HealingDriver); + +class Handle(GEOMImpl_HealingDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_HealingDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_HealingDriver)(const Handle(GEOMImpl_HealingDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_HealingDriver)(const GEOMImpl_HealingDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_HealingDriver)& operator=(const Handle(GEOMImpl_HealingDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_HealingDriver)& operator=(const GEOMImpl_HealingDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_HealingDriver* operator->() + { + return (GEOMImpl_HealingDriver *)ControlAccess(); + } + + GEOMImpl_HealingDriver* operator->() const + { + return (GEOMImpl_HealingDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_HealingDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_HealingDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_HealingDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_HealingDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_HealingDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_HealingDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_HealingDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_HealingDriver) == AType || TFunction_Driver::IsKind(AType)); } + +private: +Standard_Boolean ShapeProcess ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; +Standard_Boolean SuppressFaces ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; +Standard_Boolean CloseContour ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; +Standard_Boolean RemoveIntWires( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; +Standard_Boolean RemoveHoles ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; +Standard_Boolean Sew ( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; +Standard_Boolean AddPointOnEdge( GEOMImpl_IHealing*, const TopoDS_Shape&, TopoDS_Shape& ) const; + + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx new file mode 100644 index 000000000..56eb0762b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx @@ -0,0 +1,1039 @@ +using namespace std; + +#include "GEOMImpl_I3DPrimOperations.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +#include "GEOMImpl_BoxDriver.hxx" +#include "GEOMImpl_CylinderDriver.hxx" +#include "GEOMImpl_ConeDriver.hxx" +#include "GEOMImpl_SphereDriver.hxx" +#include "GEOMImpl_TorusDriver.hxx" +#include "GEOMImpl_PrismDriver.hxx" +#include "GEOMImpl_PipeDriver.hxx" +#include "GEOMImpl_RevolutionDriver.hxx" +#include "GEOMImpl_ShapeDriver.hxx" +#include "GEOMImpl_FillingDriver.hxx" + +#include "GEOMImpl_IBox.hxx" +#include "GEOMImpl_ICylinder.hxx" +#include "GEOMImpl_ICone.hxx" +#include "GEOMImpl_ISphere.hxx" +#include "GEOMImpl_ITorus.hxx" +#include "GEOMImpl_IPrism.hxx" +#include "GEOMImpl_IPipe.hxx" +#include "GEOMImpl_IRevolution.hxx" +#include "GEOMImpl_IShapes.hxx" +#include "GEOMImpl_IFilling.hxx" + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_I3DPrimOperations::~GEOMImpl_I3DPrimOperations() +{ + MESSAGE("GEOMImpl_I3DPrimOperations::~GEOMImpl_I3DPrimOperations"); +} + + +//============================================================================= +/*! + * MakeBoxDXDYDZ + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxDXDYDZ (double theDX, double theDY, double theDZ) +{ + SetErrorCode(KO); + + //Add a new Box object + Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX); + + //Add a new Box function with DX_DY_DZ parameters + Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BoxDriver::GetID()) return NULL; + + GEOMImpl_IBox aBI (aFunction); + + aBI.SetDX(theDX); + aBI.SetDY(theDY); + aBI.SetDZ(theDZ); + + //Compute the box value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Box driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aBox->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeBoxDXDYDZ("; + aDescr += (TCollection_AsciiString(theDX)+", "); + aDescr += (TCollection_AsciiString(theDY)+", "); + aDescr += (TCollection_AsciiString(theDZ)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aBox; +} + + +//============================================================================= +/*! + * MakeBoxTwoPnt + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxTwoPnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL; + + //Add a new Box object + Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX); + + //Add a new Box function for creation a box relatively to two points + Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BoxDriver::GetID()) return aBox; + + GEOMImpl_IBox aBI (aFunction); + + Handle(GEOM_Function) aRefFunction1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRefFunction2 = thePnt2->GetLastFunction(); + + if (aRefFunction1.IsNull() || aRefFunction2.IsNull()) return aBox; + + aBI.SetRef1(aRefFunction1); + aBI.SetRef2(aRefFunction2); + + //Compute the Box value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Box driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aBox->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeBoxTwoPnt("; + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aBox; +} + + +//============================================================================= +/*! + * MakeCylinderRH + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, double theH) +{ + SetErrorCode(KO); + + //Add a new Cylinder object + Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER); + + //Add a new Cylinder function with R and H parameters + Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_CylinderDriver::GetID()) return NULL; + + GEOMImpl_ICylinder aCI (aFunction); + + aCI.SetR(theR); + aCI.SetH(theH); + + //Compute the Cylinder value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Cylinder driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aCylinder->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeCylinderRH("; + aDescr += (TCollection_AsciiString(theR)+", "); + aDescr += (TCollection_AsciiString(theH)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCylinder; +} + + +//============================================================================= +/*! + * MakeCylinderPntVecRH + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theR, double theH) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Cylinder object + Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER); + + //Add a new Cylinder function for creation a cylinder relatively to point and vector + Handle(GEOM_Function) aFunction = + aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_PNT_VEC_R_H); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_CylinderDriver::GetID()) return NULL; + + GEOMImpl_ICylinder aCI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + + if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL; + + aCI.SetPoint(aRefPnt); + aCI.SetVector(aRefVec); + aCI.SetR(theR); + aCI.SetH(theH); + + //Compute the Cylinder value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Cylinder driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aCylinder->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeCylinderPntVecRH("; + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR)+", "); + aDescr += (TCollection_AsciiString(theH)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCylinder; +} + + +//============================================================================= +/*! + * MakeConeR1R2H + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConeR1R2H (double theR1, double theR2, + double theH) +{ + SetErrorCode(KO); + + //Add a new Cone object + Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE); + + //Add a new Cone function with R and H parameters + Handle(GEOM_Function) aFunction = + aCone->AddFunction(GEOMImpl_ConeDriver::GetID(), CONE_R1_R2_H); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ConeDriver::GetID()) return NULL; + + GEOMImpl_ICone aCI (aFunction); + + aCI.SetR1(theR1); + aCI.SetR2(theR2); + aCI.SetH(theH); + + //Compute the Cone value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Cone driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aCone->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeConeR1R2H("; + aDescr += (TCollection_AsciiString(theR1)+", "); + aDescr += (TCollection_AsciiString(theR2)+", "); + aDescr += (TCollection_AsciiString(theH)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCone; +} + + +//============================================================================= +/*! + * MakeConePntVecR1R2H + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConePntVecR1R2H (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theR1, double theR2, + double theH) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Cone object + Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE); + + //Add a new Cone function for creation a cone relatively to point and vector + Handle(GEOM_Function) aFunction = + aCone->AddFunction(GEOMImpl_ConeDriver::GetID(), CONE_PNT_VEC_R1_R2_H); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ConeDriver::GetID()) return NULL; + + GEOMImpl_ICone aCI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + + if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL; + + aCI.SetPoint(aRefPnt); + aCI.SetVector(aRefVec); + aCI.SetR1(theR1); + aCI.SetR2(theR2); + aCI.SetH(theH); + + //Compute the Cone value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Cone driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aCone->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeConePntVecR1R2H("; + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR1)+", "); + aDescr += (TCollection_AsciiString(theR2)+", "); + aDescr += (TCollection_AsciiString(theH)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCone; +} + + +//============================================================================= +/*! + * MakeSphereR + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSphereR (double theR) +{ + SetErrorCode(KO); + + //Add a new Sphere object + Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE); + + //Add a new Sphere function with R parameter + Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_SphereDriver::GetID()) return NULL; + + GEOMImpl_ISphere aCI (aFunction); + + aCI.SetR(theR); + + //Compute the Sphere value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Sphere driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aSphere->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeSphereR("; + aDescr += (TCollection_AsciiString(theR)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSphere; +} + + +//============================================================================= +/*! + * MakeSpherePntR + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSpherePntR (Handle(GEOM_Object) thePnt, + double theR) +{ + SetErrorCode(KO); + + if (thePnt.IsNull()) return NULL; + + //Add a new Point object + Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE); + + //Add a new Sphere function for creation a sphere relatively to point + Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_SphereDriver::GetID()) return NULL; + + GEOMImpl_ISphere aCI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + + if (aRefPnt.IsNull()) return NULL; + + aCI.SetPoint(aRefPnt); + aCI.SetR(theR); + + //Compute the Sphere value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Sphere driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aSphere->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeSpherePntR("; + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSphere; +} + + +//============================================================================= +/*! + * MakeTorusRR + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusRR + (double theRMajor, double theRMinor) +{ + SetErrorCode(KO); + + //Add a new Torus object + Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS); + + //Add a new Torus function + Handle(GEOM_Function) aFunction = + anEll->AddFunction(GEOMImpl_TorusDriver::GetID(), TORUS_RR); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TorusDriver::GetID()) return NULL; + + GEOMImpl_ITorus aCI (aFunction); + + aCI.SetRMajor(theRMajor); + aCI.SetRMinor(theRMinor); + + //Compute the Torus value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Torus driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(anEll->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeTorusRR("; + aDescr += (TCollection_AsciiString(theRMajor)+", "); + aDescr += (TCollection_AsciiString(theRMinor)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return anEll; +} + +//============================================================================= +/*! + * MakeTorusPntVecRR + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusPntVecRR + (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, + double theRMajor, double theRMinor) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Torus object + Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS); + + //Add a new Torus function + Handle(GEOM_Function) aFunction = + anEll->AddFunction(GEOMImpl_TorusDriver::GetID(), TORUS_PNT_VEC_RR); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TorusDriver::GetID()) return NULL; + + GEOMImpl_ITorus aCI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + + if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL; + + aCI.SetCenter(aRefPnt); + aCI.SetVector(aRefVec); + aCI.SetRMajor(theRMajor); + aCI.SetRMinor(theRMinor); + + //Compute the Torus value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Torus driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(anEll->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeTorusPntVecRR("; + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theRMajor)+", "); + aDescr += (TCollection_AsciiString(theRMinor)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return anEll; +} + + +//============================================================================= +/*! + * MakePrismVecH + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) theVec, + double theH) +{ + SetErrorCode(KO); + + if (theBase.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Prism object + Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM); + + //Add a new Prism function for creation a Prism relatively to vector + Handle(GEOM_Function) aFunction = + aPrism->AddFunction(GEOMImpl_PrismDriver::GetID(), PRISM_BASE_VEC_H); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PrismDriver::GetID()) return NULL; + + GEOMImpl_IPrism aCI (aFunction); + + Handle(GEOM_Function) aRefBase = theBase->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + + if (aRefBase.IsNull() || aRefVec.IsNull()) return NULL; + + aCI.SetBase(aRefBase); + aCI.SetVector(aRefVec); + aCI.SetH(theH); + + //Compute the Prism value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Prism driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aPrism->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakePrismVecH("; + TDF_Tool::Entry(theBase->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theH)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPrism; +} + +//============================================================================= +/*! + * MakePrismTwoPnt + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt + (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) thePoint1, Handle(GEOM_Object) thePoint2) +{ + SetErrorCode(KO); + + if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL; + + //Add a new Prism object + Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM); + + //Add a new Prism function for creation a Prism relatively to two points + Handle(GEOM_Function) aFunction = + aPrism->AddFunction(GEOMImpl_PrismDriver::GetID(), PRISM_BASE_TWO_PNT); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PrismDriver::GetID()) return NULL; + + GEOMImpl_IPrism aCI (aFunction); + + Handle(GEOM_Function) aRefBase = theBase->GetLastFunction(); + Handle(GEOM_Function) aRefPnt1 = thePoint1->GetLastFunction(); + Handle(GEOM_Function) aRefPnt2 = thePoint2->GetLastFunction(); + + if (aRefBase.IsNull() || aRefPnt1.IsNull() || aRefPnt2.IsNull()) return NULL; + + aCI.SetBase(aRefBase); + aCI.SetFirstPoint(aRefPnt1); + aCI.SetLastPoint(aRefPnt2); + + //Compute the Prism value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Prism driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aPrism->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakePrismVecH("; + TDF_Tool::Entry(theBase->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPrism; +} + + +//============================================================================= +/*! + * MakePipe + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePipe (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) thePath) +{ + SetErrorCode(KO); + + if (theBase.IsNull() || thePath.IsNull()) return NULL; + + //Add a new Pipe object + Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE); + + //Add a new Pipe function + Handle(GEOM_Function) aFunction = + aPipe->AddFunction(GEOMImpl_PipeDriver::GetID(), PIPE_BASE_PATH); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PipeDriver::GetID()) return NULL; + + GEOMImpl_IPipe aCI (aFunction); + + Handle(GEOM_Function) aRefBase = theBase->GetLastFunction(); + Handle(GEOM_Function) aRefPath = thePath->GetLastFunction(); + + if (aRefBase.IsNull() || aRefPath.IsNull()) return NULL; + + aCI.SetBase(aRefBase); + aCI.SetPath(aRefPath); + + //Compute the Pipe value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Pipe driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPipe->GetEntry(), anEntry); + aDescr += (anEntry + " = I3DPrimOperations.MakePipe("); + TDF_Tool::Entry(theBase->GetEntry(), anEntry); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(thePath->GetEntry(), anEntry); + aDescr += (anEntry + ")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPipe; +} + + +//============================================================================= +/*! + * MakeRevolutionAxisAngle + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) theAxis, + double theAngle) +{ + SetErrorCode(KO); + + if (theBase.IsNull() || theAxis.IsNull()) return NULL; + + //Add a new Revolution object + Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION); + + //Add a new Revolution function for creation a revolution relatively to axis + Handle(GEOM_Function) aFunction = + aRevolution->AddFunction(GEOMImpl_RevolutionDriver::GetID(), REVOLUTION_BASE_AXIS_ANGLE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RevolutionDriver::GetID()) return NULL; + + GEOMImpl_IRevolution aCI (aFunction); + + Handle(GEOM_Function) aRefBase = theBase->GetLastFunction(); + Handle(GEOM_Function) aRefAxis = theAxis->GetLastFunction(); + + if (aRefBase.IsNull() || aRefAxis.IsNull()) return NULL; + + aCI.SetBase(aRefBase); + aCI.SetAxis(aRefAxis); + aCI.SetAngle(theAngle); + + //Compute the Revolution value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Revolution driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aRevolution->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeRevolutionAxisAngle("; + TDF_Tool::Entry(theBase->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theAngle)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aRevolution; +} + + +//============================================================================= +/*! + * MakeSolidShell + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSolidShell (Handle(GEOM_Object) theShell) +{ + SetErrorCode(KO); + + if (theShell.IsNull()) return NULL; + + //Add a new Solid object + Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID); + + //Add a new Solid function for creation a solid from a shell + Handle(GEOM_Function) aFunction = + aSolid->AddFunction(GEOMImpl_ShapeDriver::GetID(), SOLID_SHELL); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL; + + GEOMImpl_IShapes aCI (aFunction); + + Handle(GEOM_Function) aRefShell = theShell->GetLastFunction(); + + if (aRefShell.IsNull()) return NULL; + + aCI.SetBase(aRefShell); + + //Compute the Solid value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Solid driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aSolid->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = I3DPrimOperations.MakeSolidShell("; + TDF_Tool::Entry(theShell->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSolid; +} + +//============================================================================= +/*! + * MakeFilling + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return NULL; + + //Add a new Filling object + Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING); + + //Add a new Filling function for creation a filling from a compound + Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_FillingDriver::GetID()) return NULL; + + GEOMImpl_IFilling aFI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + + if (aRefShape.IsNull()) return NULL; + + aFI.SetShape(aRefShape); + aFI.SetMinDeg(theMinDeg); + aFI.SetMaxDeg(theMaxDeg); + aFI.SetTol2D(theTol2D); + aFI.SetTol3D(theTol3D); + aFI.SetNbIter(theNbIter); + + //Compute the Solid value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Fiiling driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aFilling->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeFilling("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theMinDeg)+", "); + aDescr += (TCollection_AsciiString(theMaxDeg)+", "); + aDescr += (TCollection_AsciiString(theTol2D)+", "); + aDescr += (TCollection_AsciiString(theTol3D)+", "); + aDescr += (TCollection_AsciiString(theNbIter)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFilling; +} diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx new file mode 100644 index 000000000..5e43a2d55 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx @@ -0,0 +1,59 @@ + +#ifndef _GEOMImpl_I3DPrimOperations_HXX_ +#define _GEOMImpl_I3DPrimOperations_HXX_ + +#include "Utils_SALOME_Exception.hxx" +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include + +class GEOMImpl_I3DPrimOperations : public GEOM_IOperations { + public: + GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_I3DPrimOperations(); + + Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ); + Handle(GEOM_Object) MakeBoxTwoPnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2); + + Handle(GEOM_Object) MakeCylinderRH (double theR, double theH); + Handle(GEOM_Object) MakeCylinderPntVecRH (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theR, double theH); + + Handle(GEOM_Object) MakeConeR1R2H (double theR1, double theR2, double theH); + Handle(GEOM_Object) MakeConePntVecR1R2H (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theR1, double theR2, double theH); + + Handle(GEOM_Object) MakeSphereR (double theR); + Handle(GEOM_Object) MakeSpherePntR (Handle(GEOM_Object) thePnt, double theR); + + Handle(GEOM_Object) MakeTorusRR (double theRMajor, double theRMinor); + + Handle(GEOM_Object) MakeTorusPntVecRR (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theRMajor, double theRMinor); + + Handle(GEOM_Object) MakePrismVecH (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) theVec, double theH); + + Handle(GEOM_Object) MakePrismTwoPnt (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); + + Handle(GEOM_Object) MakePipe (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) thePath); + + Handle(GEOM_Object) MakeRevolutionAxisAngle (Handle(GEOM_Object) theBase, + Handle(GEOM_Object) theAxis, + double theAngle); + + Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell); + + Handle(GEOM_Object) MakeFilling (Handle(GEOM_Object) theShape, int theMinDeg, int theMaxDeg, double theTol2D, double theTol3D, int theNbIter); + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IArc.hxx b/src/GEOMImpl/GEOMImpl_IArc.hxx new file mode 100644 index 000000000..0c8c75d5e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IArc.hxx @@ -0,0 +1,27 @@ +//NOTE: This is an intreface to a function for the Arc creation. + + +#include "GEOM_Function.hxx" + +#define ARC_ARG_PI 1 +#define ARC_ARG_PC 2 +#define ARC_ARG_PE 3 + +class GEOMImpl_IArc +{ + public: + + GEOMImpl_IArc(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetPoint1(Handle(GEOM_Function) theP) { _func->SetReference(ARC_ARG_PI, theP); } + void SetPoint2(Handle(GEOM_Function) theP) { _func->SetReference(ARC_ARG_PC, theP); } + void SetPoint3(Handle(GEOM_Function) theP) { _func->SetReference(ARC_ARG_PE, theP); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(ARC_ARG_PI); } + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(ARC_ARG_PC); } + Handle(GEOM_Function) GetPoint3() { return _func->GetReference(ARC_ARG_PE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IArchimede.hxx b/src/GEOMImpl/GEOMImpl_IArchimede.hxx new file mode 100644 index 000000000..0b298a03a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IArchimede.hxx @@ -0,0 +1,36 @@ +//NOTE: This is an intreface to a function for the Archimede operation. + + +#include "GEOM_Function.hxx" + +#define ARG_WEIGHT 1 +#define ARG_DENSITY 2 +#define ARG_DEFLECT 3 +#define ARG_SHAPE 4 + +class GEOMImpl_IArchimede +{ + public: + + GEOMImpl_IArchimede(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetWeight(Standard_Real theWeight) { _func->SetReal(ARG_WEIGHT, theWeight); } + + Standard_Real GetWeight() { return _func->GetReal(ARG_WEIGHT); } + + void SetDensity(Standard_Real theDensity) { _func->SetReal(ARG_DENSITY, theDensity); } + + Standard_Real GetDensity() { return _func->GetReal(ARG_DENSITY); } + + void SetDeflection(Standard_Real theDeflection) { _func->SetReal(ARG_DEFLECT, theDeflection); } + + Standard_Real GetDeflection() { return _func->GetReal(ARG_DEFLECT); } + + void SetBasicShape(Handle(GEOM_Function) theShape) { _func->SetReference(ARG_SHAPE, theShape); } + + Handle(GEOM_Function) GetBasicShape() { return _func->GetReference(ARG_SHAPE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx b/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx new file mode 100644 index 000000000..a0225ef9c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBasicOperations.cxx @@ -0,0 +1,704 @@ +using namespace std; + +#include "GEOMImpl_IBasicOperations.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include "GEOM_Function.hxx" + +#include "GEOMImpl_PointDriver.hxx" +#include "GEOMImpl_VectorDriver.hxx" +#include "GEOMImpl_LineDriver.hxx" +#include "GEOMImpl_PlaneDriver.hxx" +#include "GEOMImpl_MarkerDriver.hxx" + +#include "GEOMImpl_IPoint.hxx" +#include "GEOMImpl_IVector.hxx" +#include "GEOMImpl_ILine.hxx" +#include "GEOMImpl_IPlane.hxx" +#include "GEOMImpl_IMarker.hxx" + +#include "GEOMImpl_Types.hxx" + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IBasicOperations::~GEOMImpl_IBasicOperations() +{ + MESSAGE("GEOMImpl_IBasicOperations::~GEOMImpl_IBasicOperations"); +} + + +//============================================================================= +/*! + * MakePointXYZ + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ + (double theX, double theY, double theZ) +{ + SetErrorCode(KO); + + //Add a new Point object + Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT); + + //Add a new Point function with XYZ parameters + Handle(GEOM_Function) aFunction = + aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL; + + GEOMImpl_IPoint aPI(aFunction); + + aPI.SetX(theX); + aPI.SetY(theY); + aPI.SetZ(theZ); + + //Compute the point value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Point driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPoint->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakePointXYZ("); + aDescr += (TCollection_AsciiString(theX)+", "); + aDescr += (TCollection_AsciiString(theY)+", "); + aDescr += (TCollection_AsciiString(theZ)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPoint; +} + +//============================================================================= +/*! + * MakePointWithReference + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference + (Handle(GEOM_Object) theReference, double theX, double theY, double theZ) +{ + SetErrorCode(KO); + + if (theReference.IsNull()) return NULL; + + //Add a new Point object + Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT); + + //Add a new Point function for creation a point relativley another point + Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL; + + GEOMImpl_IPoint aPI(aFunction); + + Handle(GEOM_Function) aRefFunction = theReference->GetLastFunction(); + if (aRefFunction.IsNull()) return NULL; + + aPI.SetRef(aRefFunction); + aPI.SetX(theX); + aPI.SetY(theY); + aPI.SetZ(theZ); + + //Compute the point value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Point driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPoint->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakePointReference("); + TDF_Tool::Entry(theReference->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theX)+", "); + aDescr += (TCollection_AsciiString(theY)+", "); + aDescr += (TCollection_AsciiString(theZ)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPoint; +} + +//============================================================================= +/*! + * MakePointOnCurve + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnCurve + (Handle(GEOM_Object) theCurve, double theParameter) +{ + SetErrorCode(KO); + + if (theCurve.IsNull()) return NULL; + + //Add a new Point object + Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT); + + //Add a new Point function for creation a point relativley another point + Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_CURVE_PAR); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PointDriver::GetID()) return NULL; + + GEOMImpl_IPoint aPI (aFunction); + + Handle(GEOM_Function) aRefFunction = theCurve->GetLastFunction(); + if (aRefFunction.IsNull()) return NULL; + + aPI.SetCurve(aRefFunction); + aPI.SetParameter(theParameter); + + //Compute the point value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Point driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPoint->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakePointReference("); + TDF_Tool::Entry(theCurve->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theParameter)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPoint; +} + + +//============================================================================= +/*! + * MakeVectorDXDYDZ + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ + (double theDX, double theDY, double theDZ) +{ + SetErrorCode(KO); + + //Add a new Vector object + Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR); + + //Add a new Vector function with DXDYDZ parameters + Handle(GEOM_Function) aFunction = + aVector->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_DX_DY_DZ); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL; + + GEOMImpl_IVector aPI (aFunction); + + aPI.SetDX(theDX); + aPI.SetDY(theDY); + aPI.SetDZ(theDZ); + + //Compute the Vector value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Vector driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aVector->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakeVectorDXDYDZ("); + aDescr += (TCollection_AsciiString(theDX)+", "); + aDescr += (TCollection_AsciiString(theDY)+", "); + aDescr += (TCollection_AsciiString(theDZ)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aVector; +} + +//============================================================================= +/*! + * MakeVectorTwoPnt + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt + (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL; + + //Add a new Vector object + Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR); + + //Add a new Vector function + Handle(GEOM_Function) aFunction = + aVector->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TWO_PNT); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL; + + GEOMImpl_IVector aPI (aFunction); + + Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + aPI.SetPoint1(aRef1); + aPI.SetPoint2(aRef2); + + //Compute the Vector value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Vector driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aVector->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakeVectorTwoPnt("); + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aVector; +} + + +//============================================================================= +/*! + * MakeLine + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLine + (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theDir) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theDir.IsNull()) return NULL; + + //Add a new Line object + Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE); + + //Add a new Line function + Handle(GEOM_Function) aFunction = + aLine->AddFunction(GEOMImpl_LineDriver::GetID(), LINE_PNT_DIR); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_LineDriver::GetID()) return NULL; + + GEOMImpl_ILine aPI (aFunction); + + Handle(GEOM_Function) aRef1 = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRef2 = theDir->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + aPI.SetPoint1(aRef1); + aPI.SetPoint2(aRef2); + + //Compute the Line value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Line driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aLine->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakeLine("); + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theDir->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aLine; +} + +//============================================================================= +/*! + * MakeLineTwoPnt + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt + (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL; + + //Add a new Line object + Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE); + + //Add a new Line function + Handle(GEOM_Function) aFunction = + aLine->AddFunction(GEOMImpl_LineDriver::GetID(), LINE_TWO_PNT); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_LineDriver::GetID()) return NULL; + + GEOMImpl_ILine aPI (aFunction); + + Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + aPI.SetPoint1(aRef1); + aPI.SetPoint2(aRef2); + + //Compute the Line value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Line driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aLine->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakeLineTwoPnt("); + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aLine; +} + + +//============================================================================= +/*! + * MakePlaneThreePnt + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt + (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3, double theSize) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL; + + //Add a new Plane object + Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE); + + //Add a new Plane function + Handle(GEOM_Function) aFunction = + aPlane->AddFunction(GEOMImpl_PlaneDriver::GetID(), PLANE_THREE_PNT); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PlaneDriver::GetID()) return NULL; + + GEOMImpl_IPlane aPI (aFunction); + + Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction(); + Handle(GEOM_Function) aRef3 = thePnt3->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) return NULL; + + aPI.SetPoint1(aRef1); + aPI.SetPoint2(aRef2); + aPI.SetPoint3(aRef3); + aPI.SetSize(theSize); + + //Compute the Plane value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Plane driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPlane->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakePlaneThreePnt("); + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt3->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theSize) + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPlane; +} + +//============================================================================= +/*! + * MakePlanePntVec + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec + (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, + double theSize) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Plane object + Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE); + + //Add a new Plane function + Handle(GEOM_Function) aFunction = + aPlane->AddFunction(GEOMImpl_PlaneDriver::GetID(), PLANE_PNT_VEC); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PlaneDriver::GetID()) return NULL; + + GEOMImpl_IPlane aPI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL; + + aPI.SetPoint(aRefPnt); + aPI.SetVector(aRefVec); + aPI.SetSize(theSize); + + //Compute the Plane value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Plane driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPlane->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakePlanePntVec("); + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theSize) + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPlane; +} + +//============================================================================= +/*! + * MakePlaneFace + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace + (Handle(GEOM_Object) theFace, double theSize) +{ + SetErrorCode(KO); + + if (theFace.IsNull()) return NULL; + + //Add a new Plane object + Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE); + + //Add a new Plane function + Handle(GEOM_Function) aFunction = + aPlane->AddFunction(GEOMImpl_PlaneDriver::GetID(), PLANE_FACE); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PlaneDriver::GetID()) return NULL; + + GEOMImpl_IPlane aPI (aFunction); + + Handle(GEOM_Function) aRef = theFace->GetLastFunction(); + if (aRef.IsNull()) return NULL; + + aPI.SetFace(aRef); + aPI.SetSize(theSize); + + //Compute the Plane value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Plane driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPlane->GetEntry(), anEntry); + aDescr += (anEntry+" = IBasicOperations.MakePlaneFace("); + TDF_Tool::Entry(theFace->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theSize) + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPlane; +} + + +//============================================================================= +/*! + * MakeMarker + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker + (double theOX, double theOY, double theOZ, + double theXDX, double theXDY, double theXDZ, + double theYDX, double theYDY, double theYDZ) +{ + SetErrorCode(KO); + + //Add a new Marker object + Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER); + + //Add a new Marker function + Handle(GEOM_Function) aFunction = + aMarker->AddFunction(GEOMImpl_MarkerDriver::GetID(), MARKER_CS); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MarkerDriver::GetID()) return NULL; + + GEOMImpl_IMarker aPI(aFunction); + + aPI.SetOrigin(theOX, theOY, theOZ); + aPI.SetXDir(theXDX, theXDY, theXDZ); + aPI.SetYDir(theYDX, theYDY, theYDZ); + + //Compute the marker value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Marker driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aMarker->GetEntry(), anEntry); + aDescr += anEntry + " = IBasicOperations.MakeMarker("; + aDescr += TCollection_AsciiString(theOX) + ", "; + aDescr += TCollection_AsciiString(theOY) + ", "; + aDescr += TCollection_AsciiString(theOZ) + ", "; + aDescr += TCollection_AsciiString(theXDX) + ", "; + aDescr += TCollection_AsciiString(theXDY) + ", "; + aDescr += TCollection_AsciiString(theXDZ) + ", "; + aDescr += TCollection_AsciiString(theYDX) + ", "; + aDescr += TCollection_AsciiString(theYDY) + ", "; + aDescr += TCollection_AsciiString(theYDZ) + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aMarker; +} diff --git a/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx b/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx new file mode 100644 index 000000000..da601f7b4 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBasicOperations.hxx @@ -0,0 +1,56 @@ + +#ifndef _GEOMImpl_IBasicOperations_HXX_ +#define _GEOMImpl_IBasicOperations_HXX_ + +#include "Utils_SALOME_Exception.hxx" +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include + +class GEOMImpl_IBasicOperations : public GEOM_IOperations { + public: + GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IBasicOperations(); + + // Point + Handle(GEOM_Object) MakePointXYZ (double theX, double theY, double theZ); + + Handle(GEOM_Object) MakePointWithReference (Handle(GEOM_Object) theReference, + double theX, double theY, double theZ); + + Handle(GEOM_Object) MakePointOnCurve (Handle(GEOM_Object) theCurve, + double theParameter); + + // Vector + Handle(GEOM_Object) MakeVectorDXDYDZ (double theDX, double theDY, double theDZ); + + Handle(GEOM_Object) MakeVectorTwoPnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2); + + // Line + Handle(GEOM_Object) MakeLineTwoPnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2); + + Handle(GEOM_Object) MakeLine (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theDir); + + // Plane + Handle(GEOM_Object) MakePlaneThreePnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3, + double theSize); + + Handle(GEOM_Object) MakePlanePntVec (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theSize); + + Handle(GEOM_Object) MakePlaneFace (Handle(GEOM_Object) theFace, double theSize); + + // Marker + Handle(GEOM_Object) MakeMarker (double theOX, double theOY, double theOZ, + double theXDX, double theXDY, double theXDZ, + double theYDX, double theYDY, double theYDZ); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IBlockTrsf.hxx b/src/GEOMImpl/GEOMImpl_IBlockTrsf.hxx new file mode 100644 index 000000000..205f7405c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBlockTrsf.hxx @@ -0,0 +1,42 @@ +//NOTE: This is an interface to a function for the Blocks Multi-Transformations. + + +#include "GEOM_Function.hxx" + +#define TRSF_ORIGIN 1 + +#define TRSF_FACE_1_U 2 +#define TRSF_FACE_2_U 3 +#define TRSF_NBITER_U 4 +#define TRSF_FACE_1_V 5 +#define TRSF_FACE_2_V 6 +#define TRSF_NBITER_V 7 + +class GEOMImpl_IBlockTrsf +{ + public: + + GEOMImpl_IBlockTrsf (Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetOriginal (Handle(GEOM_Function) theOriginal) { _func->SetReference(TRSF_ORIGIN, theOriginal); } + + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRSF_ORIGIN); } + + void SetFace1U (int theFaceId) { _func->SetInteger(TRSF_FACE_1_U, theFaceId); } + void SetFace2U (int theFaceId) { _func->SetInteger(TRSF_FACE_2_U, theFaceId); } + void SetFace1V (int theFaceId) { _func->SetInteger(TRSF_FACE_1_V, theFaceId); } + void SetFace2V (int theFaceId) { _func->SetInteger(TRSF_FACE_2_V, theFaceId); } + void SetNbIterU (int theNbIter) { _func->SetInteger(TRSF_NBITER_U, theNbIter); } + void SetNbIterV (int theNbIter) { _func->SetInteger(TRSF_NBITER_V, theNbIter); } + + int GetFace1U () { return _func->GetInteger(TRSF_FACE_1_U); } + int GetFace2U () { return _func->GetInteger(TRSF_FACE_2_U); } + int GetFace1V () { return _func->GetInteger(TRSF_FACE_1_V); } + int GetFace2V () { return _func->GetInteger(TRSF_FACE_2_V); } + int GetNbIterU() { return _func->GetInteger(TRSF_NBITER_U); } + int GetNbIterV() { return _func->GetInteger(TRSF_NBITER_V); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IBlocks.hxx b/src/GEOMImpl/GEOMImpl_IBlocks.hxx new file mode 100644 index 000000000..a98c9d32b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBlocks.hxx @@ -0,0 +1,26 @@ +// NOTE: This is an interface to a function for the Blocks +// creation and transformation. + + +#include "GEOM_Function.hxx" + +#include "TColStd_HSequenceOfTransient.hxx" + +#define BLOCK_ARG_SHAPES 1 // Arguments for creation of block or face of block + +class GEOMImpl_IBlocks +{ + public: + + GEOMImpl_IBlocks(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes) + { _func->SetReferenceList(BLOCK_ARG_SHAPES, theShapes); } + + Handle(TColStd_HSequenceOfTransient) GetShapes() + { return _func->GetReferenceList(BLOCK_ARG_SHAPES); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx new file mode 100644 index 000000000..9b7aedc80 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx @@ -0,0 +1,2694 @@ +using namespace std; + +#include "GEOMImpl_IBlocksOperations.hxx" + +#include "GEOMImpl_Types.hxx" + +#include "GEOMImpl_BlockDriver.hxx" +#include "GEOMImpl_IBlocks.hxx" +#include "GEOMImpl_IBlockTrsf.hxx" +#include "GEOMImpl_CopyDriver.hxx" +#include "GEOMImpl_Block6Explorer.hxx" + +#include "GEOM_Function.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IBlocksOperations::~GEOMImpl_IBlocksOperations() +{ + MESSAGE("GEOMImpl_IBlocksOperations::~GEOMImpl_IBlocksOperations"); +} + + +//============================================================================= +/*! + * MakeQuad + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad + (Handle(GEOM_Object) theEdge1, Handle(GEOM_Object) theEdge2, + Handle(GEOM_Object) theEdge3, Handle(GEOM_Object) theEdge4) +{ + SetErrorCode(KO); + + if (theEdge1.IsNull() || theEdge2.IsNull() || + theEdge3.IsNull() || theEdge4.IsNull()) return NULL; + + //Add a new Face object + Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE); + + //Add a new Face function + Handle(GEOM_Function) aFunction = + aFace->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_FACE_FOUR_EDGES); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlocks aPI (aFunction); + + Handle(GEOM_Function) aRef1 = theEdge1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = theEdge2->GetLastFunction(); + Handle(GEOM_Function) aRef3 = theEdge3->GetLastFunction(); + Handle(GEOM_Function) aRef4 = theEdge4->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull() || + aRef3.IsNull() || aRef4.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + aShapesSeq->Append(aRef1); + aShapesSeq->Append(aRef2); + aShapesSeq->Append(aRef3); + aShapesSeq->Append(aRef4); + + aPI.SetShapes(aShapesSeq); + + //Compute the Face value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to compute a face"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aFace->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeQuad("; + TDF_Tool::Entry(theEdge1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theEdge2->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theEdge3->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theEdge4->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFace; +} + +//============================================================================= +/*! + * MakeQuad2Edges + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges + (Handle(GEOM_Object) theEdge1, Handle(GEOM_Object) theEdge2) +{ + SetErrorCode(KO); + + if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL; + + //Add a new Face object + Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE); + + //Add a new Face function + Handle(GEOM_Function) aFunction = + aFace->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_FACE_TWO_EDGES); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlocks aPI (aFunction); + + Handle(GEOM_Function) aRef1 = theEdge1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = theEdge2->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + aShapesSeq->Append(aRef1); + aShapesSeq->Append(aRef2); + + aPI.SetShapes(aShapesSeq); + + //Compute the Face value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to compute a face"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aFace->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeQuad2Edges("; + TDF_Tool::Entry(theEdge1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theEdge2->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFace; +} + +//============================================================================= +/*! + * MakeQuad4Vertices + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices + (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3, Handle(GEOM_Object) thePnt4) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull() || + thePnt3.IsNull() || thePnt4.IsNull()) return NULL; + + //Add a new Face object + Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE); + + //Add a new Face function + Handle(GEOM_Function) aFunction = + aFace->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_FACE_FOUR_PNT); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlocks aPI (aFunction); + + Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction(); + Handle(GEOM_Function) aRef3 = thePnt3->GetLastFunction(); + Handle(GEOM_Function) aRef4 = thePnt4->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull() || + aRef3.IsNull() || aRef4.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + aShapesSeq->Append(aRef1); + aShapesSeq->Append(aRef2); + aShapesSeq->Append(aRef3); + aShapesSeq->Append(aRef4); + + aPI.SetShapes(aShapesSeq); + + //Compute the Face value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to compute a face"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aFace->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeQuad4Vertices("; + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePnt3->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePnt4->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFace; +} + +//============================================================================= +/*! + * MakeHexa + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa + (Handle(GEOM_Object) theFace1, Handle(GEOM_Object) theFace2, + Handle(GEOM_Object) theFace3, Handle(GEOM_Object) theFace4, + Handle(GEOM_Object) theFace5, Handle(GEOM_Object) theFace6) +{ + SetErrorCode(KO); + + if (theFace1.IsNull() || theFace2.IsNull() || + theFace3.IsNull() || theFace4.IsNull() || + theFace5.IsNull() || theFace6.IsNull()) return NULL; + + //Add a new Solid object + Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK); + + //Add a new Block function + Handle(GEOM_Function) aFunction = + aBlock->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_SIX_FACES); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlocks aPI (aFunction); + + Handle(GEOM_Function) aRef1 = theFace1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = theFace2->GetLastFunction(); + Handle(GEOM_Function) aRef3 = theFace3->GetLastFunction(); + Handle(GEOM_Function) aRef4 = theFace4->GetLastFunction(); + Handle(GEOM_Function) aRef5 = theFace5->GetLastFunction(); + Handle(GEOM_Function) aRef6 = theFace6->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull() || + aRef3.IsNull() || aRef4.IsNull() || + aRef5.IsNull() || aRef6.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + aShapesSeq->Append(aRef1); + aShapesSeq->Append(aRef2); + aShapesSeq->Append(aRef3); + aShapesSeq->Append(aRef4); + aShapesSeq->Append(aRef5); + aShapesSeq->Append(aRef6); + + aPI.SetShapes(aShapesSeq); + + //Compute the Block value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to compute a block"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aBlock->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeHexa("; + TDF_Tool::Entry(theFace1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace2->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace3->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace4->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace5->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace6->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aBlock; +} + +//============================================================================= +/*! + * MakeHexa2Faces + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces + (Handle(GEOM_Object) theFace1, Handle(GEOM_Object) theFace2) +{ + SetErrorCode(KO); + + if (theFace1.IsNull() || theFace2.IsNull()) return NULL; + + //Add a new Solid object + Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK); + + //Add a new Block function + Handle(GEOM_Function) aFunction = + aBlock->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_TWO_FACES); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlocks aPI (aFunction); + + Handle(GEOM_Function) aRef1 = theFace1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = theFace2->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + aShapesSeq->Append(aRef1); + aShapesSeq->Append(aRef2); + + aPI.SetShapes(aShapesSeq); + + //Compute the Block value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to compute a block"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aBlock->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeHexa2Faces("; + TDF_Tool::Entry(theFace1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace2->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aBlock; +} + +//============================================================================= +/*! + * MakeBlockCompound + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound + (Handle(GEOM_Object) theCompound) +{ + SetErrorCode(KO); + + if (theCompound.IsNull()) return NULL; + + //Add a new object + Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GetDocID(), GEOM_COMPOUND); + + //Add a new BlocksComp function + Handle(GEOM_Function) aFunction = + aBlockComp->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_COMPOUND_GLUE); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlocks aPI (aFunction); + + Handle(GEOM_Function) aRef1 = theCompound->GetLastFunction(); + if (aRef1.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + aShapesSeq->Append(aRef1); + + aPI.SetShapes(aShapesSeq); + + //Compute the Blocks Compound value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to compute a blocks compound"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aBlockComp->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeBlockCompound("; + TDF_Tool::Entry(theCompound->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aBlockComp; +} + +//============================================================================= +/*! + * GetEdge + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetPoint + (Handle(GEOM_Object) theShape, + const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theEpsilon) +{ + SetErrorCode(KO); + + //New Point object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + //Compute the Vertex value + gp_Pnt P (theX, theY, theZ); + Standard_Real eps = Max(theEpsilon, Precision::Confusion()); + + TopoDS_Shape V; + Standard_Integer isFound = 0; + TopTools_MapOfShape mapShape; + TopExp_Explorer exp (aBlockOrComp, TopAbs_VERTEX); + + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Vertex aVi = TopoDS::Vertex(exp.Current()); + gp_Pnt aPi = BRep_Tool::Pnt(aVi); + if (aPi.Distance(P) < eps) { + V = aVi; + isFound++; + } + } + } + + if (isFound == 0) { + SetErrorCode("Vertex has not been found"); + return NULL; + } else if (isFound > 1) { + SetErrorCode("Multiple vertices found by the given coordinates and epsilon"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(V)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + + //The GetPoint() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetPoint("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + aDescr += TCollection_AsciiString(theX) + ", "; + aDescr += TCollection_AsciiString(theY) + ", "; + aDescr += TCollection_AsciiString(theZ) + ", "; + aDescr += TCollection_AsciiString(theEpsilon) + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetEdge + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdge + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2) +{ + SetErrorCode(KO); + + //New Edge object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg1 = thePoint1->GetValue(); + TopoDS_Shape anArg2 = thePoint2->GetValue(); + if (anArg1.IsNull() || anArg2.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg1.ShapeType() != TopAbs_VERTEX || + anArg2.ShapeType() != TopAbs_VERTEX) { + SetErrorCode("Element for edge identification is not a vertex"); + return NULL; + } + + //Compute the Edge value + try { + TopTools_IndexedDataMapOfShapeListOfShape MVE; + GEOMImpl_Block6Explorer::MapShapesAndAncestors + (aBlockOrComp, TopAbs_VERTEX, TopAbs_EDGE, MVE); + + TopoDS_Shape V1,V2; + Standard_Integer ish, ext = MVE.Extent(); + + if (MVE.Contains(anArg1)) { + V1 = anArg1; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MVE.FindKey(ish); + if (BRepTools::Compare(TopoDS::Vertex(anArg1), TopoDS::Vertex(aShi))) { + V1 = aShi; + break; + } + } + } + + if (MVE.Contains(anArg2)) { + V2 = anArg2; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MVE.FindKey(ish); + if (BRepTools::Compare(TopoDS::Vertex(anArg2), TopoDS::Vertex(aShi))) { + V2 = aShi; + break; + } + } + } + + if (V1.IsNull() || V2.IsNull()) { + SetErrorCode("The given vertex does not belong to the shape"); + return NULL; + } + + TopoDS_Shape anEdge; + Standard_Integer isFound = + GEOMImpl_Block6Explorer::FindEdge(anEdge, V1, V2, MVE, Standard_True); + if (isFound == 0) { + SetErrorCode("The given vertices do not belong to one edge of the given shape"); + return NULL; + } else if (isFound > 1) { + SetErrorCode("Multiple edges found by the given vertices of the shape"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(anEdge)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + } catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetEdge() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetEdge("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint2->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetEdgeNearPoint + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetEdgeNearPoint + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || thePoint.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg = thePoint->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg.ShapeType() != TopAbs_VERTEX) { + SetErrorCode("Element for edge identification is not a vertex"); + return NULL; + } + + //Compute the Edge value + try { + TopoDS_Shape aShape; + + TopoDS_Vertex aVert = TopoDS::Vertex(anArg); + + // 1. Explode blocks on edges + TopTools_MapOfShape mapShape; + Standard_Integer nbEdges = 0; + TopExp_Explorer exp (aBlockOrComp, TopAbs_EDGE); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + nbEdges++; + } + } + + mapShape.Clear(); + Standard_Integer ind = 1; + TopTools_Array1OfShape anEdges (1, nbEdges); + TColStd_Array1OfReal aDistances (1, nbEdges); + for (exp.Init(aBlockOrComp, TopAbs_EDGE); exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape anEdge = exp.Current(); + anEdges(ind) = anEdge; + + // 2. Classify the point relatively each edge + BRepExtrema_DistShapeShape aDistTool (aVert, anEdges(ind)); + if (!aDistTool.IsDone()) { + SetErrorCode("Can not find a distance from the given point to one of edges"); + return NULL; + } + aDistances(ind) = aDistTool.Value(); + ind++; + } + } + + // 3. Define edge, having minimum distance to the point + Standard_Real nearest = RealLast(), nbFound = 0; + Standard_Real prec = Precision::Confusion(); + for (ind = 1; ind <= nbEdges; ind++) { + if (Abs(aDistances(ind) - nearest) < prec) { + nbFound++; + } else if (aDistances(ind) < nearest) { + nearest = aDistances(ind); + aShape = anEdges(ind); + nbFound = 1; + } else { + } + } + if (nbFound > 1) { + SetErrorCode("Multiple edges near the given point are found"); + return NULL; + } else if (nbFound == 0) { + SetErrorCode("There are no edges near the given point"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetEdgeNearPoint() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetEdgeNearPoint("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetFaceByPoints + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByPoints + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2, + Handle(GEOM_Object) thePoint3, + Handle(GEOM_Object) thePoint4) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || + thePoint1.IsNull() || thePoint2.IsNull() || + thePoint3.IsNull() || thePoint4.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg1 = thePoint1->GetValue(); + TopoDS_Shape anArg2 = thePoint2->GetValue(); + TopoDS_Shape anArg3 = thePoint3->GetValue(); + TopoDS_Shape anArg4 = thePoint4->GetValue(); + if (anArg1.IsNull() || anArg2.IsNull() || + anArg3.IsNull() || anArg4.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg1.ShapeType() != TopAbs_VERTEX || + anArg2.ShapeType() != TopAbs_VERTEX || + anArg3.ShapeType() != TopAbs_VERTEX || + anArg4.ShapeType() != TopAbs_VERTEX) { + SetErrorCode("Element for face identification is not a vertex"); + return NULL; + } + + //Compute the Face value + try { + TopoDS_Shape aShape; + + TopTools_IndexedDataMapOfShapeListOfShape MVF; + GEOMImpl_Block6Explorer::MapShapesAndAncestors(aBlockOrComp, TopAbs_VERTEX, TopAbs_FACE, MVF); + + TopoDS_Shape V1,V2,V3,V4; + Standard_Integer ish, ext = MVF.Extent(); + + if (MVF.Contains(anArg1)) { + V1 = anArg1; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MVF.FindKey(ish); + if (BRepTools::Compare(TopoDS::Vertex(anArg1), TopoDS::Vertex(aShi))) { + V1 = aShi; + break; + } + } + } + + if (MVF.Contains(anArg2)) { + V2 = anArg2; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MVF.FindKey(ish); + if (BRepTools::Compare(TopoDS::Vertex(anArg2), TopoDS::Vertex(aShi))) { + V2 = aShi; + break; + } + } + } + + if (MVF.Contains(anArg3)) { + V3 = anArg3; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MVF.FindKey(ish); + if (BRepTools::Compare(TopoDS::Vertex(anArg3), TopoDS::Vertex(aShi))) { + V3 = aShi; + break; + } + } + } + + if (MVF.Contains(anArg4)) { + V4 = anArg4; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MVF.FindKey(ish); + if (BRepTools::Compare(TopoDS::Vertex(anArg4), TopoDS::Vertex(aShi))) { + V4 = aShi; + break; + } + } + } + + if (V1.IsNull() || V2.IsNull() || V3.IsNull() || V4.IsNull()) { + SetErrorCode("The given vertex does not belong to the shape"); + return NULL; + } + + Standard_Integer isFound = + GEOMImpl_Block6Explorer::FindFace(aShape, V1, V2, V3, V4, MVF, Standard_True); + if (isFound == 0) { + SetErrorCode("The given vertices do not belong to one face of the given shape"); + return NULL; + } else if (isFound > 1) { + SetErrorCode("The given vertices belong to several faces of the given shape"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetFaceByPoints() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetFaceByPoints("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint2->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint3->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint4->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetFaceByEdges + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByEdges + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) theEdge1, + Handle(GEOM_Object) theEdge2) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || theEdge1.IsNull() || theEdge2.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg1 = theEdge1->GetValue(); + TopoDS_Shape anArg2 = theEdge2->GetValue(); + if (anArg1.IsNull() || anArg2.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg1.ShapeType() != TopAbs_EDGE || + anArg2.ShapeType() != TopAbs_EDGE) { + SetErrorCode("Element for face identification is not an edge"); + return NULL; + } + + //Compute the Face value + try { + TopoDS_Shape aShape; + + TopTools_IndexedDataMapOfShapeListOfShape MEF; + GEOMImpl_Block6Explorer::MapShapesAndAncestors(aBlockOrComp, TopAbs_EDGE, TopAbs_FACE, MEF); + + TopoDS_Shape E1,E2; + Standard_Integer ish, ext = MEF.Extent(); + + if (MEF.Contains(anArg1)) { + E1 = anArg1; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MEF.FindKey(ish); + if (GEOMImpl_Block6Explorer::IsSimilarEdges(anArg1, aShi)) { + E1 = aShi; + } + } + } + + if (MEF.Contains(anArg2)) { + E2 = anArg2; + } else { + for (ish = 1; ish <= ext; ish++) { + TopoDS_Shape aShi = MEF.FindKey(ish); + if (GEOMImpl_Block6Explorer::IsSimilarEdges(anArg2, aShi)) { + E2 = aShi; + } + } + } + + if (E1.IsNull() || E2.IsNull()) { + SetErrorCode("The given edge does not belong to the shape"); + return NULL; + } + + const TopTools_ListOfShape& aFacesOfE1 = MEF.FindFromKey(E1); + const TopTools_ListOfShape& aFacesOfE2 = MEF.FindFromKey(E2); + + Standard_Integer isFound = 0; + TopTools_ListIteratorOfListOfShape anIterF1 (aFacesOfE1); + for (; anIterF1.More(); anIterF1.Next()) { + + TopTools_ListIteratorOfListOfShape anIterF2 (aFacesOfE2); + for (; anIterF2.More(); anIterF2.Next()) { + + if (anIterF1.Value().IsSame(anIterF2.Value())) { + isFound++; + + // Store the face, defined by two edges + aShape = anIterF1.Value(); + } + } + } + if (isFound == 0) { + SetErrorCode("The given edges do not belong to one face of the given shape"); + return NULL; + } else if (isFound > 1) { + SetErrorCode("The given edges belong to several faces of the given shape"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetFaceByEdges() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetFaceByEdges("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theEdge1->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theEdge2->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetOppositeFace + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetOppositeFace + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) theFace) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || theFace.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID) { + SetErrorCode("Shape is not a block"); + return NULL; + } + + TopoDS_Shape anArg = theFace->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg.ShapeType() != TopAbs_FACE) { + SetErrorCode("Element for face identification is not a face"); + return NULL; + } + + //Compute the Face value + try { + TopoDS_Shape aShape; + + GEOMImpl_Block6Explorer aBlockTool; + aBlockTool.InitByBlockAndFace(aBlockOrComp, anArg); + aShape = aBlockTool.GetFace(2); + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetOppositeFace() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetOppositeFace("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theFace->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetFaceNearPoint + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceNearPoint + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || thePoint.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg = thePoint->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg.ShapeType() != TopAbs_VERTEX) { + SetErrorCode("Element for face identification is not a vertex"); + return NULL; + } + + //Compute the Face value + try { + TopoDS_Shape aShape; + + TopoDS_Vertex aVert = TopoDS::Vertex(anArg); + gp_Pnt aPnt = BRep_Tool::Pnt(aVert); + + // 1. Explode blocks on faces + TopTools_MapOfShape mapShape; + Standard_Integer nbFaces = 0; + TopExp_Explorer exp (aBlockOrComp, TopAbs_FACE); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + nbFaces++; + } + } + + mapShape.Clear(); + Standard_Integer ind = 1; + TopTools_Array1OfShape aFaces (1, nbFaces); + TColStd_Array1OfInteger aDistances (1, nbFaces); + for (exp.Init(aBlockOrComp, TopAbs_FACE); exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape aFace = exp.Current(); + aFaces(ind) = aFace; + + // 2. Classify the point relatively each face + BRepClass_FaceClassifier FC (TopoDS::Face(aFace), aPnt, Precision::Confusion()); + if (FC.State() == TopAbs_IN) { + aDistances(ind) = -1; + } else if (FC.State() == TopAbs_ON) { + aDistances(ind) = 0; + } else { // OUT + aDistances(ind) = 1; + } + ind++; + } + } + + // 3. Define face, containing the point or having minimum distance to it + Standard_Integer nearest = 2, nbFound = 0; + for (ind = 1; ind <= nbFaces; ind++) { + if (aDistances(ind) < nearest) { + nearest = aDistances(ind); + aShape = aFaces(ind); + nbFound = 1; + } else if (aDistances(ind) == nearest) { + nbFound++; + } else { + } + } + if (nbFound > 1) { + if (nearest == 0) { + // The point is on boundary of some faces and there are + // no faces, having the point inside + SetErrorCode("Multiple faces near the given point are found"); + return NULL; + + } else if (nearest == 1) { + // The point is outside some faces and there are + // no faces, having the point inside or on boundary. + // We will get a nearest face + Standard_Real minDist = RealLast(); + for (ind = 1; ind <= nbFaces; ind++) { + if (aDistances(ind) == 1) { + BRepExtrema_DistShapeShape aDistTool (aVert, aFaces(ind)); + if (!aDistTool.IsDone()) { + SetErrorCode("Can not find a distance from the given point to one of faces"); + return NULL; + } + Standard_Real aDist = aDistTool.Value(); + if (aDist < minDist) { + minDist = aDist; + aShape = aFaces(ind); + } + } + } + } else { // nearest == -1 + // The point is inside some faces. + // We will get a face with nearest center + Standard_Real minDist = RealLast(); + for (ind = 1; ind <= nbFaces; ind++) { + if (aDistances(ind) == -1) { + GProp_GProps aSystem; + BRepGProp::SurfaceProperties(aFaces(ind), aSystem); + gp_Pnt aCenterMass = aSystem.CentreOfMass(); + + Standard_Real aDist = aCenterMass.Distance(aPnt); + if (aDist < minDist) { + minDist = aDist; + aShape = aFaces(ind); + } + } + } + } + } + + if (nbFound == 0) { + SetErrorCode("There are no faces near the given point"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetFaceNearPoint() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetFaceNearPoint("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetFaceByNormale + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetFaceByNormale + (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) theVector) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theShape.IsNull() || theVector.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theShape->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Block or compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_SOLID && + aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg = theVector->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg.ShapeType() != TopAbs_EDGE) { + SetErrorCode("Element for normale identification is not an edge"); + return NULL; + } + + //Compute the Face value + try { + TopoDS_Shape aShape; + + TopoDS_Edge anEdge = TopoDS::Edge(anArg); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anEdge, V1, V2, Standard_True); + gp_Pnt P1 = BRep_Tool::Pnt(V1); + gp_Pnt P2 = BRep_Tool::Pnt(V2); + gp_Vec aVec (P1, P2); + if (aVec.Magnitude() < Precision::Confusion()) { + SetErrorCode("Vector with null magnitude is given"); + return NULL; + } + + Standard_Real minAngle = RealLast(); + TopTools_MapOfShape mapShape; + TopExp_Explorer exp (aBlockOrComp, TopAbs_FACE); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Face aFace = TopoDS::Face(exp.Current()); + BRepAdaptor_Surface SF (aFace); + + Standard_Real u, v, x; + + // find a point on the surface to get normal direction in + u = SF.FirstUParameter(); + x = SF.LastUParameter(); + if (Precision::IsInfinite(u)) { + u = (Precision::IsInfinite(x)) ? 0. : x; + } else if (!Precision::IsInfinite(x)) { + u = (u+x) / 2.; + } + + v = SF.FirstVParameter(); + x = SF.LastVParameter(); + if (Precision::IsInfinite(v)) { + v = (Precision::IsInfinite(x)) ? 0. : x; + } else if (!Precision::IsInfinite(x)) { + v = (v+x) / 2.; + } + + // compute the normal direction + gp_Vec Vec1,Vec2; + SF.D1(u,v,P1,Vec1,Vec2); + gp_Vec V = Vec1.Crossed(Vec2); + x = V.Magnitude(); + if (V.Magnitude() < Precision::Confusion()) { + SetErrorCode("Normal vector of a face has null magnitude"); + return NULL; + } + + // consider the face orientation + if (aFace.Orientation() == TopAbs_REVERSED || + aFace.Orientation() == TopAbs_INTERNAL) { + V = - V; + } + + // compute the angle and compare with the minimal one + Standard_Real anAngle = aVec.Angle(V); + if (anAngle < minAngle) { + minAngle = anAngle; + aShape = aFace; + } + } + } + + if (aShape.IsNull()) { + SetErrorCode("Failed to find a face by the given normale"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theShape, anArray); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetFaceByNormale() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetFaceByNormale("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(theVector->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * IsCompoundOfBlocks + */ +//============================================================================= +Standard_Boolean GEOMImpl_IBlocksOperations::IsCompoundOfBlocks + (Handle(GEOM_Object) theCompound, + const Standard_Integer theMinNbFaces, + const Standard_Integer theMaxNbFaces, + Standard_Integer& theNbBlocks) +{ + SetErrorCode(KO); + Standard_Boolean isCompOfBlocks = Standard_False; + theNbBlocks = 0; + + if (theCompound.IsNull()) return isCompOfBlocks; + TopoDS_Shape aBlockOrComp = theCompound->GetValue(); + + //Check + isCompOfBlocks = Standard_True; + try { + TopTools_MapOfShape mapShape; + TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape aSolid = exp.Current(); + + TopTools_MapOfShape mapFaces; + TopExp_Explorer expF (aSolid, TopAbs_FACE); + Standard_Integer nbFaces = 0; + for (; expF.More(); expF.Next()) { + if (mapFaces.Add(expF.Current())) { + nbFaces++; + if (nbFaces > theMaxNbFaces) { + isCompOfBlocks = Standard_False; + break; + } + } + } + if (nbFaces < theMinNbFaces || theMaxNbFaces < nbFaces) { + isCompOfBlocks = Standard_False; + } else { + theNbBlocks++; + } + } + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return isCompOfBlocks; + } + + SetErrorCode(OK); + return isCompOfBlocks; +} + +//============================================================================= +/*! + * Set of functions, used by CheckCompoundOfBlocks() method + */ +//============================================================================= +void AddBlocksFrom (const TopoDS_Shape& theShape, + TopTools_ListOfShape& BLO, + TopTools_ListOfShape& NOT) +{ + TopAbs_ShapeEnum aType = theShape.ShapeType(); + switch (aType) { + case TopAbs_COMPOUND: + case TopAbs_COMPSOLID: + { + TopoDS_Iterator It (theShape); + for (; It.More(); It.Next()) { + AddBlocksFrom(It.Value(), BLO, NOT); + } + } + break; + case TopAbs_SOLID: + { + TopTools_MapOfShape mapFaces; + TopExp_Explorer expF (theShape, TopAbs_FACE); + Standard_Integer nbFaces = 0; + Standard_Integer nbEdges = 0; + for (; expF.More(); expF.Next()) { + if (mapFaces.Add(expF.Current())) { + nbFaces++; + if (nbFaces > 6) break; + + // Check number of edges in the face + TopoDS_Shape aF = expF.Current(); + TopExp_Explorer expE (aF, TopAbs_EDGE); + nbEdges = 0; + for (; expE.More(); expE.Next()) { + nbEdges++; + if (nbEdges > 4) break; + } + if (nbEdges != 4) break; + } + } + if (nbFaces == 6 && nbEdges == 4) { + BLO.Append(theShape); + } else { + NOT.Append(theShape); + } + } + break; + default: + NOT.Append(theShape); + } +} + +#define REL_NOT_CONNECTED 0 +#define REL_OK 1 +#define REL_NOT_GLUED 2 +#define REL_COLLISION_VV 3 +#define REL_COLLISION_FF 4 +#define REL_COLLISION_EE 5 +#define REL_UNKNOWN 6 + +Standard_Integer BlocksRelation (const TopoDS_Shape& theBlock1, + const TopoDS_Shape& theBlock2) +{ + // Compare bounding boxes before calling BRepExtrema_DistShapeShape + Standard_Real Xmin1, Ymin1, Zmin1, Xmax1, Ymax1, Zmax1; + Standard_Real Xmin2, Ymin2, Zmin2, Xmax2, Ymax2, Zmax2; + Bnd_Box B1, B2; + BRepBndLib::Add(theBlock1, B1); + BRepBndLib::Add(theBlock2, B2); +// BRepBndLib::AddClose(theBlock1, B1); +// BRepBndLib::AddClose(theBlock2, B2); + B1.Get(Xmin1, Ymin1, Zmin1, Xmax1, Ymax1, Zmax1); + B2.Get(Xmin2, Ymin2, Zmin2, Xmax2, Ymax2, Zmax2); + if (Xmax2 < Xmin1 || Xmax1 < Xmin2 || + Ymax2 < Ymin1 || Ymax1 < Ymin2 || + Zmax2 < Zmin1 || Zmax1 < Zmin2) { +// Standard_Real prec = Precision::Confusion(); +// if (prec < Xmin1 - Xmax2 || prec < Xmin2 - Xmax1 || +// prec < Ymin1 - Ymax2 || prec < Ymin2 - Ymax1 || +// prec < Zmin1 - Zmax2 || prec < Zmin2 - Zmax1) { + return REL_NOT_CONNECTED; + } + // to be done + + BRepExtrema_DistShapeShape dst (theBlock1, theBlock2); + if (!dst.IsDone()) { + return REL_UNKNOWN; + } + + if (dst.Value() > Precision::Confusion()) { + return REL_NOT_CONNECTED; + } + + if (dst.InnerSolution()) { + return REL_COLLISION_VV; + } + + Standard_Integer nbSol = dst.NbSolution(); + Standard_Integer relation = REL_OK; + Standard_Integer nbVerts = 0; + Standard_Integer nbEdges = 0; + Standard_Integer sol = 1; + for (; sol <= nbSol; sol++) { + BRepExtrema_SupportType supp1 = dst.SupportTypeShape1(sol); + BRepExtrema_SupportType supp2 = dst.SupportTypeShape2(sol); + if (supp1 == BRepExtrema_IsVertex && supp2 == BRepExtrema_IsVertex) { + nbVerts++; + } else if (supp1 == BRepExtrema_IsInFace || supp2 == BRepExtrema_IsInFace) { + return REL_COLLISION_FF; + } else if (supp1 == BRepExtrema_IsOnEdge && supp2 == BRepExtrema_IsOnEdge) { + nbEdges++; + } else if ((supp1 == BRepExtrema_IsOnEdge && supp2 == BRepExtrema_IsVertex) || + (supp2 == BRepExtrema_IsOnEdge && supp1 == BRepExtrema_IsVertex)) { + relation = REL_COLLISION_EE; + } else { + } + } + + if (relation != REL_OK) { + return relation; + } + + TColStd_Array1OfInteger vertSol (1, nbVerts); + TopTools_Array1OfShape V1 (1, nbVerts); + TopTools_Array1OfShape V2 (1, nbVerts); + Standard_Integer ivs = 0; + for (sol = 1; sol <= nbSol; sol++) { + if (dst.SupportTypeShape1(sol) == BRepExtrema_IsVertex && + dst.SupportTypeShape2(sol) == BRepExtrema_IsVertex) { + TopoDS_Vertex Vcur = TopoDS::Vertex(dst.SupportOnShape1(sol)); + // Check, that this vertex is far enough from other solution vertices. + Standard_Integer ii = 1; + for (; ii <= ivs; ii++) { + if (BRepTools::Compare(TopoDS::Vertex(V1(ii)), Vcur)) { + continue; + } + } + ivs++; + vertSol(ivs) = sol; + V1(ivs) = Vcur; + V2(ivs) = dst.SupportOnShape2(sol); + } + } + + // As we deal only with quadrangles, + // 2, 3 or 4 vertex solutions can be found. + if (ivs <= 1) { + if (nbEdges > 0) { + return REL_COLLISION_FF; + } + return REL_NOT_CONNECTED; + } + if (ivs > 4) { + return REL_UNKNOWN; + } + + // Check sharing of coincident entities. + if (ivs == 2 || ivs == 3) { + // Map vertices and edges of the blocks + TopTools_IndexedDataMapOfShapeListOfShape MVE1, MVE2; + GEOMImpl_Block6Explorer::MapShapesAndAncestors + (theBlock1, TopAbs_VERTEX, TopAbs_EDGE, MVE1); + GEOMImpl_Block6Explorer::MapShapesAndAncestors + (theBlock2, TopAbs_VERTEX, TopAbs_EDGE, MVE2); + + if (ivs == 2) { + // Find common edge + TopoDS_Shape anEdge1, anEdge2; + GEOMImpl_Block6Explorer::FindEdge(anEdge1, V1(1), V1(2), MVE1); + if (anEdge1.IsNull()) return REL_UNKNOWN; + + GEOMImpl_Block6Explorer::FindEdge(anEdge2, V2(1), V2(2), MVE2); + if (anEdge2.IsNull()) return REL_UNKNOWN; + + if (!anEdge1.IsSame(anEdge2)) return REL_NOT_GLUED; + + } else { // ivs == 3 + // Find common edges + Standard_Integer e1_v1 = 1; + Standard_Integer e1_v2 = 2; + Standard_Integer e2_v1 = 3; + Standard_Integer e2_v2 = 1; + + TopoDS_Shape anEdge11, anEdge12; + GEOMImpl_Block6Explorer::FindEdge(anEdge11, V1(e1_v1), V1(e1_v2), MVE1); + if (anEdge11.IsNull()) { + e1_v2 = 3; + e2_v1 = 2; + GEOMImpl_Block6Explorer::FindEdge(anEdge11, V1(e1_v1), V1(e1_v2), MVE1); + if (anEdge11.IsNull()) return REL_UNKNOWN; + } + GEOMImpl_Block6Explorer::FindEdge(anEdge12, V1(e2_v1), V1(e2_v2), MVE1); + if (anEdge12.IsNull()) { + e2_v2 = 5 - e2_v1; + GEOMImpl_Block6Explorer::FindEdge(anEdge12, V1(e2_v1), V1(e2_v2), MVE1); + if (anEdge12.IsNull()) return REL_UNKNOWN; + } + + TopoDS_Shape anEdge21, anEdge22; + GEOMImpl_Block6Explorer::FindEdge(anEdge21, V2(e1_v1), V2(e1_v2), MVE2); + if (anEdge21.IsNull()) return REL_UNKNOWN; + GEOMImpl_Block6Explorer::FindEdge(anEdge22, V2(e2_v1), V2(e2_v2), MVE2); + if (anEdge22.IsNull()) return REL_UNKNOWN; + + // Check of edges coincidence (with some precision) have to be done here + // if (!anEdge11.IsEqual(anEdge21)) return REL_UNKNOWN; + // if (!anEdge12.IsEqual(anEdge22)) return REL_UNKNOWN; + + // Check of edges sharing + if (!anEdge11.IsSame(anEdge21)) return REL_NOT_GLUED; + if (!anEdge12.IsSame(anEdge22)) return REL_NOT_GLUED; + } + } + + if (ivs == 4) { + // Map vertices and faces of the blocks + TopTools_IndexedDataMapOfShapeListOfShape MVF1, MVF2; + GEOMImpl_Block6Explorer::MapShapesAndAncestors + (theBlock1, TopAbs_VERTEX, TopAbs_FACE, MVF1); + GEOMImpl_Block6Explorer::MapShapesAndAncestors + (theBlock2, TopAbs_VERTEX, TopAbs_FACE, MVF2); + + TopoDS_Shape aFace1, aFace2; + GEOMImpl_Block6Explorer::FindFace(aFace1, V1(1), V1(2), V1(3), V1(4), MVF1); + if (aFace1.IsNull()) return REL_UNKNOWN; + GEOMImpl_Block6Explorer::FindFace(aFace2, V2(1), V2(2), V2(3), V2(4), MVF2); + if (aFace2.IsNull()) return REL_UNKNOWN; + + // Check of faces coincidence (with some precision) have to be done here + // if (!aFace1.IsEqual(aFace2)) return REL_UNKNOWN; + + // Check of faces sharing + if (!aFace1.IsSame(aFace2)) return REL_NOT_GLUED; + } + + return REL_OK; +} + +void FindConnected (const Standard_Integer theBlockIndex, + const TColStd_Array2OfInteger& theRelations, + TColStd_MapOfInteger& theProcessedMap, + TColStd_MapOfInteger& theConnectedMap) +{ + theConnectedMap.Add(theBlockIndex); + theProcessedMap.Add(theBlockIndex); + + Standard_Integer nbBlocks = theRelations.ColLength(); + Standard_Integer col = 1; + for (; col <= nbBlocks; col++) { + if (theRelations(theBlockIndex, col) == REL_OK || + theRelations(theBlockIndex, col) == REL_NOT_GLUED) { + if (!theProcessedMap.Contains(col)) { + FindConnected(col, theRelations, theProcessedMap, theConnectedMap); + } + } + } +} + +Standard_Boolean HasAnyConnection (const Standard_Integer theBlockIndex, + const TColStd_MapOfInteger& theWith, + const TColStd_Array2OfInteger& theRelations, + TColStd_MapOfInteger& theProcessedMap) +{ + theProcessedMap.Add(theBlockIndex); + + Standard_Integer nbBlocks = theRelations.ColLength(); + Standard_Integer col = 1; + for (; col <= nbBlocks; col++) { + if (theRelations(theBlockIndex, col) != REL_NOT_CONNECTED) { + if (!theProcessedMap.Contains(col)) { + if (theWith.Contains(col)) + return Standard_True; + if (HasAnyConnection(col, theWith, theRelations, theProcessedMap)) + return Standard_True; + } + } + } + + return Standard_False; +} + +//============================================================================= +/*! + * CheckCompoundOfBlocks + */ +//============================================================================= +Standard_Boolean GEOMImpl_IBlocksOperations::CheckCompoundOfBlocks + (Handle(GEOM_Object) theCompound, + list& theErrors) +{ + SetErrorCode(KO); + + if (theCompound.IsNull()) return Standard_False; + TopoDS_Shape aBlockOrComp = theCompound->GetValue(); + + Standard_Boolean isCompOfBlocks = Standard_True; + + // Map sub-shapes and their indices + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + + // 1. Report non-blocks + TopTools_ListOfShape NOT; // Not blocks + TopTools_ListOfShape BLO; // All blocks from the given compound + AddBlocksFrom(aBlockOrComp, BLO, NOT); + + if (NOT.Extent() > 0) { + isCompOfBlocks = Standard_False; + BCError anErr; + anErr.error = NOT_BLOCK; + TopTools_ListIteratorOfListOfShape NOTit (NOT); + for (; NOTit.More(); NOTit.Next()) { + anErr.incriminated.push_back(anIndices.FindIndex(NOTit.Value())); + } + theErrors.push_back(anErr); + } + + Standard_Integer nbBlocks = BLO.Extent(); + if (nbBlocks == 0) { + isCompOfBlocks = Standard_False; + SetErrorCode(OK); + return isCompOfBlocks; + } + if (nbBlocks == 1) { + SetErrorCode(OK); + return isCompOfBlocks; + } + + // Convert list of blocks into array for easy and fast access + Standard_Integer ibl = 1; + TopTools_Array1OfShape aBlocks (1, nbBlocks); + TopTools_ListIteratorOfListOfShape BLOit (BLO); + for (; BLOit.More(); BLOit.Next(), ibl++) { + aBlocks.SetValue(ibl, BLOit.Value()); + } + + // 2. Find relations between all blocks, + // report connection errors (NOT_GLUED and INVALID_CONNECTION) + TColStd_Array2OfInteger aRelations (1, nbBlocks, 1, nbBlocks); + aRelations.Init(REL_NOT_CONNECTED); + + Standard_Integer row = 1; + for (row = 1; row <= nbBlocks; row++) { + TopoDS_Shape aBlock = aBlocks.Value(row); + + Standard_Integer col = row + 1; + for (; col <= nbBlocks; col++) { + Standard_Integer aRel = BlocksRelation(aBlock, aBlocks.Value(col)); + if (aRel != REL_NOT_CONNECTED) { + aRelations.SetValue(row, col, aRel); + aRelations.SetValue(col, row, aRel); + if (aRel == REL_NOT_GLUED) { + // report connection error + isCompOfBlocks = Standard_False; + BCError anErr; + anErr.error = NOT_GLUED; + anErr.incriminated.push_back(anIndices.FindIndex(aBlocks.Value(row))); + anErr.incriminated.push_back(anIndices.FindIndex(aBlocks.Value(col))); + theErrors.push_back(anErr); + } else if (aRel == REL_COLLISION_VV || + aRel == REL_COLLISION_FF || + aRel == REL_COLLISION_EE || + aRel == REL_UNKNOWN) { + // report connection error + isCompOfBlocks = Standard_False; + BCError anErr; + anErr.error = INVALID_CONNECTION; + anErr.incriminated.push_back(anIndices.FindIndex(aBlocks.Value(row))); + anErr.incriminated.push_back(anIndices.FindIndex(aBlocks.Value(col))); + theErrors.push_back(anErr); + } else { + } + } + } + } + + // 3. Find largest set of connected (good connection or not glued) blocks + TColStd_MapOfInteger aProcessedMap; + TColStd_MapOfInteger aLargestSet; + TColStd_MapOfInteger aCurrentSet; + for (ibl = 1; ibl <= nbBlocks; ibl++) { + if (!aProcessedMap.Contains(ibl)) { + FindConnected(ibl, aRelations, aProcessedMap, aCurrentSet); + if (aCurrentSet.Extent() > aLargestSet.Extent()) { + aLargestSet = aCurrentSet; + } + } + } + + // 4. Report all blocks, isolated from + BCError anErr; + anErr.error = NOT_CONNECTED; + Standard_Boolean hasIsolated = Standard_False; + for (ibl = 1; ibl <= nbBlocks; ibl++) { + if (!aLargestSet.Contains(ibl)) { + aProcessedMap.Clear(); + if (!HasAnyConnection(ibl, aLargestSet, aRelations, aProcessedMap)) { + // report connection absence + hasIsolated = Standard_True; + anErr.incriminated.push_back(anIndices.FindIndex(aBlocks.Value(ibl))); + } + } + } + if (hasIsolated) { + isCompOfBlocks = Standard_False; + theErrors.push_back(anErr); + } + + SetErrorCode(OK); + return isCompOfBlocks; +} + +//============================================================================= +/*! + * PrintBCErrors + */ +//============================================================================= +TCollection_AsciiString GEOMImpl_IBlocksOperations::PrintBCErrors + (Handle(GEOM_Object) theCompound, + const list& theErrors) +{ + TCollection_AsciiString aDescr; + + list::const_iterator errIt = theErrors.begin(); + int i = 0; + for (; errIt != theErrors.end(); i++, errIt++) { + BCError errStruct = *errIt; + + switch (errStruct.error) { + case NOT_BLOCK: + aDescr += "\nNot a Blocks: "; + break; + case INVALID_CONNECTION: + aDescr += "\nInvalid connection between two blocks: "; + break; + case NOT_CONNECTED: + aDescr += "\nBlocks, not connected with main body: "; + break; + case NOT_GLUED: + aDescr += "\nNot glued blocks: "; + break; + default: + break; + } + + list sshList = errStruct.incriminated; + list::iterator sshIt = sshList.begin(); + int jj = 0; + for (; sshIt != sshList.end(); jj++, sshIt++) { + if (jj > 0) + aDescr += ", "; + aDescr += TCollection_AsciiString(*sshIt); + } + } + + return aDescr; +} + +//============================================================================= +/*! + * ExplodeCompoundOfBlocks + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOMImpl_IBlocksOperations::ExplodeCompoundOfBlocks + (Handle(GEOM_Object) theCompound, + const Standard_Integer theMinNbFaces, + const Standard_Integer theMaxNbFaces) +{ + SetErrorCode(KO); + + if (theCompound.IsNull()) return NULL; + TopoDS_Shape aBlockOrComp = theCompound->GetValue(); + if (aBlockOrComp.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aBlocks = new TColStd_HSequenceOfTransient; + Handle(GEOM_Object) anObj; + Handle(GEOM_Function) aFunction; + + TopTools_MapOfShape mapShape; + TCollection_AsciiString anAsciiList = "[", anEntry; + + // Map shapes + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray; + + // Explode + try { + TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape aSolid = exp.Current(); + + TopTools_MapOfShape mapFaces; + TopExp_Explorer expF (aSolid, TopAbs_FACE); + Standard_Integer nbFaces = 0; + for (; expF.More(); expF.Next()) { + if (mapFaces.Add(expF.Current())) { + nbFaces++; + } + } + + if (theMinNbFaces <= nbFaces && nbFaces <= theMaxNbFaces) { + anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aSolid)); + anObj = GetEngine()->AddSubShape(theCompound, anArray); + aBlocks->Append(anObj); + + //Make a Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + anAsciiList += anEntry; + anAsciiList += ","; + } + } + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return aBlocks; + } + + if (aBlocks->IsEmpty()) { + SetErrorCode("There are no specified blocks in the given shape"); + return aBlocks; + } + + anAsciiList.Trunc(anAsciiList.Length() - 1); + anAsciiList += "]"; + + //The explode doesn't change object so no new function is required. + aFunction = theCompound->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString aDescr (anAsciiList); + aDescr += " = IBlocksOperations.ExplodeCompoundOfBlocks("; + TDF_Tool::Entry(theCompound->GetEntry(), anEntry); + aDescr += anEntry + ", "; + aDescr += TCollection_AsciiString(theMinNbFaces) + ", "; + aDescr += TCollection_AsciiString(theMaxNbFaces) + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aBlocks; +} + +//============================================================================= +/*! + * GetBlockNearPoint + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetBlockNearPoint + (Handle(GEOM_Object) theCompound, + Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + + //New object + Handle(GEOM_Object) aResult; + + // Arguments + if (theCompound.IsNull() || thePoint.IsNull()) return NULL; + + TopoDS_Shape aBlockOrComp = theCompound->GetValue(); + if (aBlockOrComp.IsNull()) { + SetErrorCode("Compound is null"); + return NULL; + } + if (aBlockOrComp.ShapeType() != TopAbs_COMPOUND && + aBlockOrComp.ShapeType() != TopAbs_COMPSOLID) { + SetErrorCode("Shape is neither a block, nor a compound of blocks"); + return NULL; + } + + TopoDS_Shape anArg = thePoint->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + if (anArg.ShapeType() != TopAbs_VERTEX) { + SetErrorCode("Element for block identification is not a vertex"); + return NULL; + } + + //Compute the Block value + try { + TopoDS_Shape aShape; + TopoDS_Vertex aVert = TopoDS::Vertex(anArg); + gp_Pnt aPnt = BRep_Tool::Pnt(aVert); + + // 1. Explode compound on blocks + TopTools_MapOfShape mapShape; + Standard_Integer nbSolids = 0; + TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + nbSolids++; + } + } + + mapShape.Clear(); + Standard_Integer ind = 1; + TopTools_Array1OfShape aSolids (1, nbSolids); + TColStd_Array1OfInteger aDistances (1, nbSolids); + for (exp.Init(aBlockOrComp, TopAbs_SOLID); exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape aSolid = exp.Current(); + aSolids(ind) = aSolid; + + // 2. Classify the point relatively each block + BRepClass3d_SolidClassifier SC (aSolid, aPnt, Precision::Confusion()); + if (SC.State() == TopAbs_IN) { + aDistances(ind) = -1; + } else if (SC.State() == TopAbs_ON) { + aDistances(ind) = 0; + } else { // OUT + aDistances(ind) = 1; + } + ind++; + } + } + + // 3. Define block, containing the point or having minimum distance to it + Standard_Integer nearest = 2, nbFound = 0; + for (ind = 1; ind <= nbSolids; ind++) { + if (aDistances(ind) < nearest) { + nearest = aDistances(ind); + aShape = aSolids(ind); + nbFound = 1; + } else if (aDistances(ind) == nearest) { + nbFound++; + } else { + } + } + if (nbFound > 1) { + if (nearest == 0) { + // The point is on boundary of some blocks and there are + // no blocks, having the point inside their volume + SetErrorCode("Multiple blocks near the given point are found"); + return NULL; + + } else if (nearest == 1) { + // The point is outside some blocks and there are + // no blocks, having the point inside or on boundary. + // We will get a nearest block + Standard_Real minDist = RealLast(); + for (ind = 1; ind <= nbSolids; ind++) { + if (aDistances(ind) == 1) { + BRepExtrema_DistShapeShape aDistTool (aVert, aSolids(ind)); + if (!aDistTool.IsDone()) { + SetErrorCode("Can not find a distance from the given point to one of blocks"); + return NULL; + } + Standard_Real aDist = aDistTool.Value(); + if (aDist < minDist) { + minDist = aDist; + aShape = aSolids(ind); + } + } + } + } else { // nearest == -1 + // The point is inside some blocks. + // We will get a block with nearest center + Standard_Real minDist = RealLast(); + for (ind = 1; ind <= nbSolids; ind++) { + if (aDistances(ind) == -1) { + GProp_GProps aSystem; + BRepGProp::VolumeProperties(aSolids(ind), aSystem); + gp_Pnt aCenterMass = aSystem.CentreOfMass(); + + Standard_Real aDist = aCenterMass.Distance(aPnt); + if (aDist < minDist) { + minDist = aDist; + aShape = aSolids(ind); + } + } + } + } + } + + if (nbFound == 0) { + SetErrorCode("There are no blocks near the given point"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theCompound, anArray); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetBlockNearPoint() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theCompound->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.GetBlockNearPoint("; + TDF_Tool::Entry(theCompound->GetEntry(), anEntry); + aDescr += anEntry + ", "; + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetBlockByParts + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::GetBlockByParts + (Handle(GEOM_Object) theCompound, + const Handle(TColStd_HSequenceOfTransient)& theParts) +{ + SetErrorCode(KO); + + Handle(GEOM_Object) aResult; + + if (theCompound.IsNull() || theParts.IsNull()) return NULL; + TopoDS_Shape aBlockOrComp = theCompound->GetValue(); + if (aBlockOrComp.IsNull()) return NULL; + + //Get the parts + Standard_Integer argi, aLen = theParts->Length(); + TopTools_Array1OfShape anArgs (1, aLen); + TCollection_AsciiString anEntry, aPartsDescr; + for (argi = 1; argi <= aLen; argi++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(theParts->Value(argi)); + Handle(GEOM_Function) aRef = anObj->GetLastFunction(); + if (aRef.IsNull()) return NULL; + + TopoDS_Shape anArg = aRef->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + anArgs(argi) = anArg; + + // For Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + if (argi > 1) aPartsDescr += ", "; + aPartsDescr += anEntry; + } + + //Compute the Block value + try { + // 1. Explode compound on solids + TopTools_MapOfShape mapShape; + Standard_Integer nbSolids = 0; + TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + nbSolids++; + } + } + + mapShape.Clear(); + Standard_Integer ind = 1; + TopTools_Array1OfShape aSolids (1, nbSolids); + TColStd_Array1OfInteger aNbParts (1, nbSolids); + for (exp.Init(aBlockOrComp, TopAbs_SOLID); exp.More(); exp.Next(), ind++) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape aSolid = exp.Current(); + aSolids(ind) = aSolid; + aNbParts(ind) = 0; + + // 2. Define quantity of parts, contained in each solid + TopTools_IndexedMapOfShape aSubShapes; + TopExp::MapShapes(aSolid, aSubShapes); + for (argi = 1; argi <= aLen; argi++) { + if (aSubShapes.Contains(anArgs(argi))) { + aNbParts(ind)++; + } + } + } + } + + // 3. Define solid, containing maximum quantity of parts + Standard_Integer maxNb = 0, nbFound = 0; + TopoDS_Shape aShape; + for (ind = 1; ind <= nbSolids; ind++) { + if (aNbParts(ind) > maxNb) { + maxNb = aNbParts(ind); + aShape = aSolids(ind); + nbFound = 1; + } else if (aNbParts(ind) == maxNb) { + nbFound++; + } else { + } + } + if (nbFound > 1) { + SetErrorCode("Multiple blocks, containing maximum quantity of the given parts, are found"); + return NULL; + } else if (nbFound == 0) { + SetErrorCode("There are no blocks, containing the given parts"); + return NULL; + } else { + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aShape)); + aResult = GetEngine()->AddSubShape(theCompound, anArray); + } + } catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //The GetBlockByParts() doesn't change object so no new function is required. + Handle(GEOM_Function) aFunction = theCompound->GetLastFunction(); + + //Make a Python command + TDF_Tool::Entry(aResult->GetEntry(), anEntry); + TCollection_AsciiString aDescr (anEntry); + aDescr += " = IBlocksOperations.GetBlockByParts("; + TDF_Tool::Entry(theCompound->GetEntry(), anEntry); + aDescr += anEntry + ", ["; + aDescr += aPartsDescr + "])"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aResult; +} + +//============================================================================= +/*! + * GetBlocksByParts + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOMImpl_IBlocksOperations::GetBlocksByParts + (Handle(GEOM_Object) theCompound, + const Handle(TColStd_HSequenceOfTransient)& theParts) +{ + SetErrorCode(KO); + + if (theCompound.IsNull() || theParts.IsNull()) return NULL; + TopoDS_Shape aBlockOrComp = theCompound->GetValue(); + if (aBlockOrComp.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aBlocks = new TColStd_HSequenceOfTransient; + Handle(GEOM_Object) anObj; + Handle(GEOM_Function) aFunction; + + //Get the parts + Standard_Integer argi, aLen = theParts->Length(); + TopTools_Array1OfShape anArgs (1, aLen); + TCollection_AsciiString anEntry, aPartsDescr, anAsciiList = "["; + for (argi = 1; argi <= aLen; argi++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(theParts->Value(argi)); + Handle(GEOM_Function) aRef = anObj->GetLastFunction(); + if (aRef.IsNull()) return NULL; + + TopoDS_Shape anArg = aRef->GetValue(); + if (anArg.IsNull()) { + SetErrorCode("Null shape is given as argument"); + return NULL; + } + anArgs(argi) = anArg; + + // For Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + if (argi > 1) aPartsDescr += ", "; + aPartsDescr += anEntry; + } + + //Get the Blocks + try { + TopTools_MapOfShape mapShape; + Standard_Integer nbSolids = 0; + TopExp_Explorer exp (aBlockOrComp, TopAbs_SOLID); + for (; exp.More(); exp.Next()) { + if (mapShape.Add(exp.Current())) { + nbSolids++; + } + } + + mapShape.Clear(); + Standard_Integer ind = 1; + TopTools_Array1OfShape aSolids (1, nbSolids); + TColStd_Array1OfInteger aNbParts (1, nbSolids); + for (exp.Init(aBlockOrComp, TopAbs_SOLID); exp.More(); exp.Next(), ind++) { + if (mapShape.Add(exp.Current())) { + TopoDS_Shape aSolid = exp.Current(); + aSolids(ind) = aSolid; + aNbParts(ind) = 0; + + // 2. Define quantity of parts, contained in each solid + TopTools_IndexedMapOfShape aSubShapes; + TopExp::MapShapes(aSolid, aSubShapes); + for (argi = 1; argi <= aLen; argi++) { + if (aSubShapes.Contains(anArgs(argi))) { + aNbParts(ind)++; + } + } + } + } + + // 3. Define solid, containing maximum quantity of parts + Standard_Integer maxNb = 0, nbFound = 0; + for (ind = 1; ind <= nbSolids; ind++) { + if (aNbParts(ind) > maxNb) { + maxNb = aNbParts(ind); + nbFound = 1; + } else if (aNbParts(ind) == maxNb) { + nbFound++; + } else { + } + } + if (nbFound == 0) { + SetErrorCode("There are no blocks, containing the given parts"); + return NULL; + } + + // Map shapes + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aBlockOrComp, anIndices); + Handle(TColStd_HArray1OfInteger) anArray; + + for (ind = 1; ind <= nbSolids; ind++) { + if (aNbParts(ind) == maxNb) { + anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aSolids(ind))); + anObj = GetEngine()->AddSubShape(theCompound, anArray); + aBlocks->Append(anObj); + + //Make a Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + anAsciiList += anEntry; + anAsciiList += ","; + } + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + anAsciiList.Trunc(anAsciiList.Length() - 1); + anAsciiList += "]"; + + //The GetBlocksByParts() doesn't change object so no new function is required. + aFunction = theCompound->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString aDescr (anAsciiList); + aDescr += " = IBlocksOperations.GetBlocksByParts("; + TDF_Tool::Entry(theCompound->GetEntry(), anEntry); + aDescr += anEntry + ", ["; + aDescr += aPartsDescr + "])"; + + TCollection_AsciiString aNewDescr = aFunction->GetDescription() + "\n"; + aNewDescr += aDescr; + aFunction->SetDescription(aNewDescr); + + SetErrorCode(OK); + return aBlocks; +} + +//============================================================================= +/*! + * MakeMultiTransformation1D + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D + (Handle(GEOM_Object) theObject, + const Standard_Integer theDirFace1, + const Standard_Integer theDirFace2, + const Standard_Integer theNbTimes) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_MULTI_TRANSFORM_1D); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlockTrsf aTI (aFunction); + aTI.SetOriginal(aLastFunction); + aTI.SetFace1U(theDirFace1); + aTI.SetFace2U(theDirFace2); + aTI.SetNbIterU(theNbTimes); + + //Compute the transformation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to make multi-transformation"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeMultiTransformation1D("; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += anEntry + ", "; + aDescr += TCollection_AsciiString(theDirFace1) + ", "; + aDescr += TCollection_AsciiString(theDirFace2) + ", "; + aDescr += TCollection_AsciiString(theNbTimes) + ") "; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * MakeMultiTransformation2D + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D + (Handle(GEOM_Object) theObject, + const Standard_Integer theDirFace1U, + const Standard_Integer theDirFace2U, + const Standard_Integer theNbTimesU, + const Standard_Integer theDirFace1V, + const Standard_Integer theDirFace2V, + const Standard_Integer theNbTimesV) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_BlockDriver::GetID(), BLOCK_MULTI_TRANSFORM_2D); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BlockDriver::GetID()) return NULL; + + GEOMImpl_IBlockTrsf aTI (aFunction); + aTI.SetOriginal(aLastFunction); + aTI.SetFace1U(theDirFace1U); + aTI.SetFace2U(theDirFace2U); + aTI.SetNbIterU(theNbTimesU); + aTI.SetFace1V(theDirFace1V); + aTI.SetFace2V(theDirFace2V); + aTI.SetNbIterV(theNbTimesV); + + //Compute the transformation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Block driver failed to make multi-transformation"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += anEntry + " = IBlocksOperations.MakeMultiTransformation2D("; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += anEntry + ", "; + aDescr += TCollection_AsciiString(theDirFace1U) + ", "; + aDescr += TCollection_AsciiString(theDirFace2U) + ", "; + aDescr += TCollection_AsciiString(theNbTimesU) + ", "; + aDescr += TCollection_AsciiString(theDirFace1V) + ", "; + aDescr += TCollection_AsciiString(theDirFace2V) + ", "; + aDescr += TCollection_AsciiString(theNbTimesV) + ") "; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} diff --git a/src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx b/src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx new file mode 100644 index 000000000..1ea16a053 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx @@ -0,0 +1,136 @@ + +#ifndef _GEOMImpl_IBlocksOperations_HXX_ +#define _GEOMImpl_IBlocksOperations_HXX_ + +#include "GEOM_IOperations.hxx" + +#include +#include + +#include + +class GEOM_Engine; +class Handle(GEOM_Object); +class Handle(TColStd_HArray1OfInteger); + +class GEOMImpl_IBlocksOperations : public GEOM_IOperations { + public: + GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IBlocksOperations(); + + // Creation of blocks and block faces + Handle(GEOM_Object) MakeQuad (Handle(GEOM_Object) theEdge1, + Handle(GEOM_Object) theEdge2, + Handle(GEOM_Object) theEdge3, + Handle(GEOM_Object) theEdge4); + + Handle(GEOM_Object) MakeQuad2Edges (Handle(GEOM_Object) theEdge1, + Handle(GEOM_Object) theEdge2); + + Handle(GEOM_Object) MakeQuad4Vertices (Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2, + Handle(GEOM_Object) thePoint3, + Handle(GEOM_Object) thePoint4); + + Handle(GEOM_Object) MakeHexa (Handle(GEOM_Object) theFace1, + Handle(GEOM_Object) theFace2, + Handle(GEOM_Object) theFace3, + Handle(GEOM_Object) theFace4, + Handle(GEOM_Object) theFace5, + Handle(GEOM_Object) theFace6); + + Handle(GEOM_Object) MakeHexa2Faces (Handle(GEOM_Object) theFace1, + Handle(GEOM_Object) theFace2); + + Handle(GEOM_Object) MakeBlockCompound (Handle(GEOM_Object) theCompound); + + // Extract elements of blocks and blocks compounds + Handle(GEOM_Object) GetPoint (Handle(GEOM_Object) theShape, + const Standard_Real theX, + const Standard_Real theY, + const Standard_Real theZ, + const Standard_Real theEpsilon); + + Handle(GEOM_Object) GetEdge (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); + + Handle(GEOM_Object) GetEdgeNearPoint (Handle(GEOM_Object) theBlock, + Handle(GEOM_Object) thePoint); + + Handle(GEOM_Object) GetFaceByPoints (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2, + Handle(GEOM_Object) thePoint3, + Handle(GEOM_Object) thePoint4); + + Handle(GEOM_Object) GetFaceByEdges (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) theEdge1, + Handle(GEOM_Object) theEdge2); + + Handle(GEOM_Object) GetOppositeFace (Handle(GEOM_Object) theBlock, + Handle(GEOM_Object) theFace); + + Handle(GEOM_Object) GetFaceNearPoint (Handle(GEOM_Object) theBlock, + Handle(GEOM_Object) thePoint); + + Handle(GEOM_Object) GetFaceByNormale (Handle(GEOM_Object) theBlock, + Handle(GEOM_Object) theVector); + + // Check blocks compounds + Standard_Boolean IsCompoundOfBlocks (Handle(GEOM_Object) theCompound, + const Standard_Integer theMinNbFaces, + const Standard_Integer theMaxNbFaces, + Standard_Integer& theNbBlocks); + + enum BCErrorType { + NOT_BLOCK, + INVALID_CONNECTION, + NOT_CONNECTED, + NOT_GLUED + }; + + struct BCError { + BCErrorType error; + list incriminated; + }; + + Standard_Boolean CheckCompoundOfBlocks (Handle(GEOM_Object) theCompound, + list& theErrors); + + TCollection_AsciiString PrintBCErrors (Handle(GEOM_Object) theCompound, + const list& theErrors); + + // Extract blocks from blocks compounds + Handle(TColStd_HSequenceOfTransient) ExplodeCompoundOfBlocks + (Handle(GEOM_Object) theCompound, + const Standard_Integer theMinNbFaces, + const Standard_Integer theMaxNbFaces); + + Handle(GEOM_Object) GetBlockNearPoint (Handle(GEOM_Object) theCompound, + Handle(GEOM_Object) thePoint); + + Handle(GEOM_Object) GetBlockByParts + (Handle(GEOM_Object) theCompound, + const Handle(TColStd_HSequenceOfTransient)& theParts); + + Handle(TColStd_HSequenceOfTransient) GetBlocksByParts + (Handle(GEOM_Object) theCompound, + const Handle(TColStd_HSequenceOfTransient)& theParts); + + // Operations on blocks with gluing of result + Handle(GEOM_Object) MakeMultiTransformation1D (Handle(GEOM_Object) theBlock, + const Standard_Integer theDirFace1, + const Standard_Integer theDirFace2, + const Standard_Integer theNbTimes); + + Handle(GEOM_Object) MakeMultiTransformation2D (Handle(GEOM_Object) theBlock, + const Standard_Integer theDirFace1U, + const Standard_Integer theDirFace2U, + const Standard_Integer theNbTimesU, + const Standard_Integer theDirFace1V, + const Standard_Integer theDirFace2V, + const Standard_Integer theNbTimesV); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IBoolean.hxx b/src/GEOMImpl/GEOMImpl_IBoolean.hxx new file mode 100644 index 000000000..8668bf9b8 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBoolean.hxx @@ -0,0 +1,24 @@ +//NOTE: This is an intreface to a function for the Common, Cut and Fuse creation. + + +#include "GEOM_Function.hxx" + +#define BOOL_ARG_SHAPE1 1 +#define BOOL_ARG_SHAPE2 2 + +class GEOMImpl_IBoolean +{ + public: + + GEOMImpl_IBoolean(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShape1(Handle(GEOM_Function) theRef) { _func->SetReference(BOOL_ARG_SHAPE1, theRef); } + void SetShape2(Handle(GEOM_Function) theRef) { _func->SetReference(BOOL_ARG_SHAPE2, theRef); } + + Handle(GEOM_Function) GetShape1() { return _func->GetReference(BOOL_ARG_SHAPE1); } + Handle(GEOM_Function) GetShape2() { return _func->GetReference(BOOL_ARG_SHAPE2); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx new file mode 100644 index 000000000..ad6fba6f4 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx @@ -0,0 +1,351 @@ +using namespace std; + +#include "GEOMImpl_IBooleanOperations.hxx" + +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +#include "GEOMImpl_BooleanDriver.hxx" +#include "GEOMImpl_IBoolean.hxx" + +#include "GEOMImpl_PartitionDriver.hxx" +#include "GEOMImpl_IPartition.hxx" + +#include + +#include "utilities.h" + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IBooleanOperations::~GEOMImpl_IBooleanOperations() +{ + MESSAGE("GEOMImpl_IBooleanOperations::~GEOMImpl_IBooleanOperations"); +} + + +//============================================================================= +/*! + * MakeBoolean + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean (Handle(GEOM_Object) theShape1, + Handle(GEOM_Object) theShape2, + Standard_Integer theOp) +{ + SetErrorCode(KO); + + if (theShape1.IsNull() || theShape2.IsNull()) return NULL; + + //Add a new Boolean object + Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + + //Add a new Boolean function + Handle(GEOM_Function) aFunction; + if (theOp == 1) { + aFunction = aBool->AddFunction(GEOMImpl_BooleanDriver::GetID(), BOOLEAN_COMMON); + } else if (theOp == 2) { + aFunction = aBool->AddFunction(GEOMImpl_BooleanDriver::GetID(), BOOLEAN_CUT); + } else if (theOp == 3) { + aFunction = aBool->AddFunction(GEOMImpl_BooleanDriver::GetID(), BOOLEAN_FUSE); + } else if (theOp == 4) { + aFunction = aBool->AddFunction(GEOMImpl_BooleanDriver::GetID(), BOOLEAN_SECTION); + } else { + } + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_BooleanDriver::GetID()) return NULL; + + GEOMImpl_IBoolean aCI (aFunction); + + Handle(GEOM_Function) aRef1 = theShape1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = theShape2->GetLastFunction(); + + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + aCI.SetShape1(aRef1); + aCI.SetShape2(aRef2); + + //Compute the Boolean value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Boolean driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aBool->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IBooleanOperations.MakeBoolean("; + TDF_Tool::Entry(theShape1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theShape2->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theOp)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aBool; +} + +//============================================================================= +/*! + * MakePartition + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition + (const Handle(TColStd_HSequenceOfTransient)& theShapes, + const Handle(TColStd_HSequenceOfTransient)& theTools, + const Handle(TColStd_HSequenceOfTransient)& theKeepIns, + const Handle(TColStd_HSequenceOfTransient)& theRemoveIns, + const Standard_Integer theLimit, + const Standard_Boolean theRemoveWebs, + const Handle(TColStd_HArray1OfInteger)& theMaterials) +{ + SetErrorCode(KO); + + //Add a new Partition object + Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION); + + //Add a new Partition function + Handle(GEOM_Function) aFunction = + aPartition->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_PARTITION); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL; + + GEOMImpl_IPartition aCI (aFunction); + +// int aLen = theShapes.size(); +// aCI.SetLength(aLen); + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aToolsSeq = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aKeepInsSeq = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aRemInsSeq = new TColStd_HSequenceOfTransient; + + Standard_Integer ind, aLen; + TCollection_AsciiString anEntry; + TCollection_AsciiString aShapesDescr, aToolsDescr, aKeepInsDescr, aRemoveInsDescr; + + // Shapes + aLen = theShapes->Length(); + for (ind = 1; ind <= aLen; ind++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(theShapes->Value(ind)); + Handle(GEOM_Function) aRefSh = anObj->GetLastFunction(); + if (aRefSh.IsNull()) { + SetErrorCode("NULL shape for Partition"); + return NULL; + } + aShapesSeq->Append(aRefSh); + + // For Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + if (ind > 1) aShapesDescr += ", "; + aShapesDescr += anEntry; + } + aCI.SetShapes(aShapesSeq); + + // Tools + aLen = theTools->Length(); + for (ind = 1; ind <= aLen; ind++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(theTools->Value(ind)); + Handle(GEOM_Function) aRefSh = anObj->GetLastFunction(); + if (aRefSh.IsNull()) { + SetErrorCode("NULL tool shape for Partition"); + return NULL; + } + aToolsSeq->Append(aRefSh); + + // For Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + if (ind > 1) aToolsDescr += ", "; + aToolsDescr += anEntry; + } + aCI.SetTools(aToolsSeq); + + // Keep Inside + aLen = theKeepIns->Length(); + for (ind = 1; ind <= aLen; ind++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(theKeepIns->Value(ind)); + Handle(GEOM_Function) aRefSh = anObj->GetLastFunction(); + if (aRefSh.IsNull()) { + SetErrorCode("NULL shape for Partition"); + return NULL; + } + aKeepInsSeq->Append(aRefSh); + + // For Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + if (ind > 1) aKeepInsDescr += ", "; + aKeepInsDescr += anEntry; + } + aCI.SetKeepIns(aKeepInsSeq); + + // Remove Inside + aLen = theRemoveIns->Length(); + for (ind = 1; ind <= aLen; ind++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(theRemoveIns->Value(ind)); + Handle(GEOM_Function) aRefSh = anObj->GetLastFunction(); + if (aRefSh.IsNull()) { + SetErrorCode("NULL shape for Partition"); + return NULL; + } + aRemInsSeq->Append(aRefSh); + + // For Python command + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + if (ind > 1) aRemoveInsDescr += ", "; + aRemoveInsDescr += anEntry; + } + aCI.SetRemoveIns(aRemInsSeq); + + // Limit + aCI.SetLimit(theLimit); + + // Materials + if (theRemoveWebs) { + if (theMaterials.IsNull()) { + Handle(TColStd_HArray1OfInteger) aMaterials = + new TColStd_HArray1OfInteger (1, aShapesSeq->Length()); + aCI.SetMaterials(aMaterials); + } else { + aCI.SetMaterials(theMaterials); + } + } + + //Compute the Partition + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Partition driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString aDescr; + TDF_Tool::Entry(aPartition->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IBooleanOperations.MakePartition(["; + // Shapes + aDescr += aShapesDescr + "], ["; + // Tools + aDescr += aToolsDescr + "], ["; + // Keep Ins + aDescr += aKeepInsDescr + "], ["; + // Remove Ins + aDescr += aRemoveInsDescr + "], "; + // Limit + aDescr += TCollection_AsciiString(theLimit) + ", "; + // Remove Webs + if (theRemoveWebs) aDescr += "1, ["; + else aDescr += "0, ["; + // Materials + if (theMaterials->Length() > 0) { + int i = theMaterials->Lower(); + aDescr += TCollection_AsciiString(theMaterials->Value(i)); + i++; + for (; i <= theMaterials->Upper(); i++) { + aDescr += ", "; + aDescr += TCollection_AsciiString(theMaterials->Value(i)); + } + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPartition; +} + +//============================================================================= +/*! + * MakeHalfPartition + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition + (Handle(GEOM_Object) theShape, Handle(GEOM_Object) thePlane) +{ + SetErrorCode(KO); + + if (theShape.IsNull() || thePlane.IsNull()) return NULL; + + //Add a new Boolean object + Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN); + + //Add a new Partition function + Handle(GEOM_Function) aFunction = + aPart->AddFunction(GEOMImpl_PartitionDriver::GetID(), PARTITION_HALF); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PartitionDriver::GetID()) return NULL; + + GEOMImpl_IPartition aCI (aFunction); + + Handle(GEOM_Function) aRef1 = theShape->GetLastFunction(); + Handle(GEOM_Function) aRef2 = thePlane->GetLastFunction(); + + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + aCI.SetShape(aRef1); + aCI.SetPlane(aRef2); + + //Compute the Partition value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Partition driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aPart->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IBooleanOperations.MakePartition("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePlane->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPart; +} diff --git a/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx new file mode 100644 index 000000000..baebc89e0 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx @@ -0,0 +1,36 @@ + +#ifndef _GEOMImpl_IBooleanOperations_HXX_ +#define _GEOMImpl_IBooleanOperations_HXX_ + +#include "GEOM_IOperations.hxx" + +//#include "TColStd_HSequenceOfTransient.hxx" + +#include "list" + +class GEOM_Engine; +class Handle(GEOM_Object); +class Handle(TColStd_HArray1OfInteger); + +class GEOMImpl_IBooleanOperations : public GEOM_IOperations { + public: + GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IBooleanOperations(); + + Handle(GEOM_Object) MakeBoolean (Handle(GEOM_Object) theShape1, + Handle(GEOM_Object) theShape2, + Standard_Integer theOp); + + Handle(GEOM_Object) MakePartition (const Handle(TColStd_HSequenceOfTransient)& theShapes, + const Handle(TColStd_HSequenceOfTransient)& theTools, + const Handle(TColStd_HSequenceOfTransient)& theKeepInside, + const Handle(TColStd_HSequenceOfTransient)& theRemoveInside, + const Standard_Integer theLimit, + const Standard_Boolean theRemoveWebs, + const Handle(TColStd_HArray1OfInteger)& theMaterials); + + Handle(GEOM_Object) MakeHalfPartition (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) thePlane); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IBox.hxx b/src/GEOMImpl/GEOMImpl_IBox.hxx new file mode 100644 index 000000000..45a33b5b3 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IBox.hxx @@ -0,0 +1,41 @@ +//NOTE: This is an intreface to a function for the Box creation. + + +#include "GEOM_Function.hxx" + +#define BOX_ARG_DX 1 +#define BOX_ARG_DY 2 +#define BOX_ARG_DZ 3 +#define BOX_ARG_REF1 4 +#define BOX_ARG_REF2 5 + +class GEOMImpl_IBox +{ + public: + + GEOMImpl_IBox(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetDX(double theX) { _func->SetReal(BOX_ARG_DX, theX); } + + double GetDX() { return _func->GetReal(BOX_ARG_DX); } + + void SetDY(double theY) { _func->SetReal(BOX_ARG_DY, theY); } + + double GetDY() { return _func->GetReal(BOX_ARG_DY); } + + void SetDZ(double theZ) { _func->SetReal(BOX_ARG_DZ, theZ); } + + double GetDZ() { return _func->GetReal(BOX_ARG_DZ); } + + void SetRef1(Handle(GEOM_Function) theRefPoint1) { _func->SetReference(BOX_ARG_REF1, theRefPoint1); } + + Handle(GEOM_Function) GetRef1() { return _func->GetReference(BOX_ARG_REF1); } + + void SetRef2(Handle(GEOM_Function) theRefPoint2) { _func->SetReference(BOX_ARG_REF2, theRefPoint2); } + + Handle(GEOM_Function) GetRef2() { return _func->GetReference(BOX_ARG_REF2); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IChamfer.hxx b/src/GEOMImpl/GEOMImpl_IChamfer.hxx new file mode 100644 index 000000000..c2b0d4efd --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IChamfer.hxx @@ -0,0 +1,48 @@ +//NOTE: This is an interface to a function for the Chamfer and creation. + + +#include "GEOM_Function.hxx" + +#define CHAM_ARG_SH 1 +#define CHAM_ARG_D1 2 +#define CHAM_ARG_D2 3 +#define CHAM_ARG_LENG 4 +#define CHAM_ARG_LAST 4 + +class GEOMImpl_IChamfer +{ + public: + + GEOMImpl_IChamfer(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShape(Handle(GEOM_Function) theRef) { _func->SetReference(CHAM_ARG_SH, theRef); } + + Handle(GEOM_Function) GetShape() { return _func->GetReference(CHAM_ARG_SH); } + + void SetD (double theD) { _func->SetReal(CHAM_ARG_D1, theD); } + void SetD1(double theD) { _func->SetReal(CHAM_ARG_D1, theD); } + void SetD2(double theD) { _func->SetReal(CHAM_ARG_D2, theD); } + + double GetD () { return _func->GetReal(CHAM_ARG_D1); } + double GetD1() { return _func->GetReal(CHAM_ARG_D1); } + double GetD2() { return _func->GetReal(CHAM_ARG_D2); } + + void SetLength(int theLen) { _func->SetInteger(CHAM_ARG_LENG, theLen); } + + int GetLength() { return _func->GetInteger(CHAM_ARG_LENG); } + + void SetFace(int theInd, int theFace) + { _func->SetInteger(CHAM_ARG_LAST + theInd, theFace); } + void SetFace1(int theFace) + { _func->SetInteger(CHAM_ARG_LAST + 1, theFace); } + void SetFace2(int theFace) + { _func->SetInteger(CHAM_ARG_LAST + 2, theFace); } + + int GetFace(int theInd) { return _func->GetInteger(CHAM_ARG_LAST + theInd); } + int GetFace1() { return _func->GetInteger(CHAM_ARG_LAST + 1); } + int GetFace2() { return _func->GetInteger(CHAM_ARG_LAST + 2); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ICircle.hxx b/src/GEOMImpl/GEOMImpl_ICircle.hxx new file mode 100644 index 000000000..3f7e0b925 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICircle.hxx @@ -0,0 +1,41 @@ +//NOTE: This is an intreface to a function for the Circle creation. + + +#include "GEOM_Function.hxx" + +#define CIRC_ARG_P1 1 +#define CIRC_ARG_P2 2 +#define CIRC_ARG_P3 3 + +#define CIRC_ARG_CC 4 +#define CIRC_ARG_VV 5 +#define CIRC_ARG_RR 6 + +class GEOMImpl_ICircle +{ + public: + + GEOMImpl_ICircle(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetPoint1(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_P1, theP); } + void SetPoint2(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_P2, theP); } + void SetPoint3(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_P3, theP); } + + void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(CIRC_ARG_CC, theP); } + void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(CIRC_ARG_VV, theV); } + + void SetRadius(double theR) { _func->SetReal(CIRC_ARG_RR, theR); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(CIRC_ARG_P1); } + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(CIRC_ARG_P2); } + Handle(GEOM_Function) GetPoint3() { return _func->GetReference(CIRC_ARG_P3); } + + Handle(GEOM_Function) GetCenter() { return _func->GetReference(CIRC_ARG_CC); } + Handle(GEOM_Function) GetVector() { return _func->GetReference(CIRC_ARG_VV); } + + double GetRadius() { return _func->GetReal(CIRC_ARG_RR); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ICone.hxx b/src/GEOMImpl/GEOMImpl_ICone.hxx new file mode 100644 index 000000000..cd622eb47 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICone.hxx @@ -0,0 +1,41 @@ +//NOTE: This is an intreface to a function for the Cone creation. + + +#include "GEOM_Function.hxx" + +#define CONE_ARG_R1 1 +#define CONE_ARG_R2 2 +#define CONE_ARG_H 3 +#define CONE_ARG_PNT 4 +#define CONE_ARG_VEC 5 + +class GEOMImpl_ICone +{ + public: + + GEOMImpl_ICone(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetR1(double theR) { _func->SetReal(CONE_ARG_R1, theR); } + + double GetR1() { return _func->GetReal(CONE_ARG_R1); } + + void SetR2(double theR) { _func->SetReal(CONE_ARG_R2, theR); } + + double GetR2() { return _func->GetReal(CONE_ARG_R2); } + + void SetH(double theH) { _func->SetReal(CONE_ARG_H, theH); } + + double GetH() { return _func->GetReal(CONE_ARG_H); } + + void SetPoint(Handle(GEOM_Function) theRefPoint) { _func->SetReference(CONE_ARG_PNT, theRefPoint); } + + Handle(GEOM_Function) GetPoint() { return _func->GetReference(CONE_ARG_PNT); } + + void SetVector(Handle(GEOM_Function) theRefVector) { _func->SetReference(CONE_ARG_VEC, theRefVector); } + + Handle(GEOM_Function) GetVector() { return _func->GetReference(CONE_ARG_VEC); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ICopy.hxx b/src/GEOMImpl/GEOMImpl_ICopy.hxx new file mode 100644 index 000000000..fad03bbde --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICopy.hxx @@ -0,0 +1,21 @@ +//NOTE: This is an intreface to a function for the Copy operation. + + +#include "GEOM_Function.hxx" + +#define COPY_ARG_REF 1 + +class GEOMImpl_ICopy +{ + public: + + GEOMImpl_ICopy(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(COPY_ARG_REF, theOriginal); } + + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(COPY_ARG_REF); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx new file mode 100644 index 000000000..2bf1dfc6e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx @@ -0,0 +1,596 @@ +using namespace std; + +#include "GEOMImpl_ICurvesOperations.hxx" + +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +#include "GEOMImpl_PolylineDriver.hxx" +#include "GEOMImpl_CircleDriver.hxx" +#include "GEOMImpl_SplineDriver.hxx" +#include "GEOMImpl_EllipseDriver.hxx" +#include "GEOMImpl_ArcDriver.hxx" +#include "GEOMImpl_SketcherDriver.hxx" + +#include "GEOMImpl_IPolyline.hxx" +#include "GEOMImpl_ICircle.hxx" +#include "GEOMImpl_ISpline.hxx" +#include "GEOMImpl_IEllipse.hxx" +#include "GEOMImpl_IArc.hxx" +#include "GEOMImpl_ISketcher.hxx" + +#include "utilities.h" + +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_ICurvesOperations::~GEOMImpl_ICurvesOperations() +{ + MESSAGE("GEOMImpl_ICurvesOperations::~GEOMImpl_ICurvesOperations"); +} + + +//============================================================================= +/*! + * MakePolyline + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (list thePoints) +{ + SetErrorCode(KO); + + //Add a new Polyline object + Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE); + + //Add a new Polyline function for creation a polyline relatively to points set + Handle(GEOM_Function) aFunction = + aPolyline->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PolylineDriver::GetID()) return NULL; + + GEOMImpl_IPolyline aCI (aFunction); + + int aLen = thePoints.size(); + aCI.SetLength(aLen); + + int ind = 1; + list::iterator it = thePoints.begin(); + for (; it != thePoints.end(); it++, ind++) { + Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); + if (aRefPnt.IsNull()) { + SetErrorCode("NULL point for Polyline"); + return NULL; + } + aCI.SetPoint(ind, aRefPnt); + } + + //Compute the Polyline value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Polyline driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aPolyline->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakePolyline(["; + it = thePoints.begin(); + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + it++; + aDescr += (anEntry+", "); + for (; it != thePoints.end(); it++) { + aDescr += ", "; + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + aDescr += anEntry; + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aPolyline; +} + +//============================================================================= +/*! + * MakeCircleThreePnt + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL; + + //Add a new Circle object + Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE); + + //Add a new Circle function for creation a circle relatively to three points + Handle(GEOM_Function) aFunction = + aCircle->AddFunction(GEOMImpl_CircleDriver::GetID(), CIRCLE_THREE_PNT); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_CircleDriver::GetID()) return NULL; + + GEOMImpl_ICircle aCI (aFunction); + + Handle(GEOM_Function) aRefPnt1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRefPnt2 = thePnt2->GetLastFunction(); + Handle(GEOM_Function) aRefPnt3 = thePnt3->GetLastFunction(); + + if (aRefPnt1.IsNull() || aRefPnt2.IsNull() || aRefPnt3.IsNull()) return NULL; + + aCI.SetPoint1(aRefPnt1); + aCI.SetPoint2(aRefPnt2); + aCI.SetPoint3(aRefPnt3); + + //Compute the Circle value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Circle driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aCircle->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeCircleThreePnt("; + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt3->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCircle; +} + +//============================================================================= +/*! + * MakeCirclePntVecR + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR + (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, double theR) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Circle object + Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE); + + //Add a new Circle function for creation a circle relatively to point and vector + Handle(GEOM_Function) aFunction = + aCircle->AddFunction(GEOMImpl_CircleDriver::GetID(), CIRCLE_PNT_VEC_R); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_CircleDriver::GetID()) return NULL; + + GEOMImpl_ICircle aCI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + + if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL; + + aCI.SetCenter(aRefPnt); + aCI.SetVector(aRefVec); + aCI.SetRadius(theR); + + //Compute the Circle value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Circle driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aCircle->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeCirclePntVecR("; + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCircle; +} + +//============================================================================= +/*! + * MakeEllipse + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse + (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, + double theRMajor, double theRMinor) +{ + SetErrorCode(KO); + + if (thePnt.IsNull() || theVec.IsNull()) return NULL; + + //Add a new Ellipse object + Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE); + + //Add a new Ellipse function + Handle(GEOM_Function) aFunction = + anEll->AddFunction(GEOMImpl_EllipseDriver::GetID(), ELLIPSE_PNT_VEC_RR); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_EllipseDriver::GetID()) return NULL; + + GEOMImpl_IEllipse aCI (aFunction); + + Handle(GEOM_Function) aRefPnt = thePnt->GetLastFunction(); + Handle(GEOM_Function) aRefVec = theVec->GetLastFunction(); + + if (aRefPnt.IsNull() || aRefVec.IsNull()) return NULL; + + aCI.SetCenter(aRefPnt); + aCI.SetVector(aRefVec); + aCI.SetRMajor(theRMajor); + aCI.SetRMinor(theRMinor); + + //Compute the Ellipse value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Ellipse driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(anEll->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeEllipse("; + TDF_Tool::Entry(thePnt->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVec->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theRMajor)+", "); + aDescr += (TCollection_AsciiString(theRMinor)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return anEll; +} + +//============================================================================= +/*! + * MakeArc + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArc (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL; + + //Add a new Circle Arc object + Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC); + + //Add a new Circle Arc function + Handle(GEOM_Function) aFunction = + anArc->AddFunction(GEOMImpl_ArcDriver::GetID(), CIRC_ARC_THREE_PNT); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ArcDriver::GetID()) return NULL; + + GEOMImpl_IArc aCI (aFunction); + + Handle(GEOM_Function) aRefPnt1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRefPnt2 = thePnt2->GetLastFunction(); + Handle(GEOM_Function) aRefPnt3 = thePnt3->GetLastFunction(); + + if (aRefPnt1.IsNull() || aRefPnt2.IsNull() || aRefPnt3.IsNull()) return NULL; + + aCI.SetPoint1(aRefPnt1); + aCI.SetPoint2(aRefPnt2); + aCI.SetPoint3(aRefPnt3); + + //Compute the Arc value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Arc driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(anArc->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeArc("; + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt3->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return anArc; +} + +//============================================================================= +/*! + * MakeSplineBezier + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier + (list thePoints) +{ + SetErrorCode(KO); + + //Add a new Spline object + Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE); + + //Add a new Spline function for creation a bezier curve relatively to points set + Handle(GEOM_Function) aFunction = + aSpline->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_SplineDriver::GetID()) return NULL; + + GEOMImpl_ISpline aCI (aFunction); + + int aLen = thePoints.size(); + aCI.SetLength(aLen); + + int ind = 1; + list::iterator it = thePoints.begin(); + for (; it != thePoints.end(); it++, ind++) { + Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); + + if (aRefPnt.IsNull()) return NULL; + + aCI.SetPoint(ind, aRefPnt); + } + + //Compute the Spline value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Spline driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aSpline->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeSplineBezier(["; + it = thePoints.begin(); + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + it++; + aDescr += (anEntry+", "); + for (; it != thePoints.end(); it++) { + aDescr += ", "; + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + aDescr += anEntry; + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSpline; +} + +//============================================================================= +/*! + * MakeSplineInterpolation + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation + (list thePoints) +{ + SetErrorCode(KO); + + //Add a new Spline object + Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE); + + //Add a new Spline function for creation a bezier curve relatively to points set + Handle(GEOM_Function) aFunction = + aSpline->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_SplineDriver::GetID()) return NULL; + + GEOMImpl_ISpline aCI (aFunction); + + int aLen = thePoints.size(); + aCI.SetLength(aLen); + + int ind = 1; + list::iterator it = thePoints.begin(); + for (; it != thePoints.end(); it++, ind++) { + Handle(GEOM_Function) aRefPnt = (*it)->GetLastFunction(); + + if (aRefPnt.IsNull()) return NULL; + + aCI.SetPoint(ind, aRefPnt); + } + + //Compute the Spline value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Spline driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aSpline->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeSplineInterpolation(["; + it = thePoints.begin(); + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + it++; + aDescr += (anEntry+", "); + for (; it != thePoints.end(); it++) { + aDescr += ", "; + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + aDescr += anEntry; + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSpline; +} + +//============================================================================= +/*! + * MakeSketcher + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCommand, + list theWorkingPlane) +{ + SetErrorCode(KO); + + if (!theCommand) return NULL; + if (strcmp(theCommand, "") == 0) return NULL; + + //Add a new Sketcher object + Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER); + + //Add a new Sketcher function + Handle(GEOM_Function) aFunction = + aSketcher->AddFunction(GEOMImpl_SketcherDriver::GetID(), SKETCHER_COMMAND); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_SketcherDriver::GetID()) return NULL; + + GEOMImpl_ISketcher aCI (aFunction); + + TCollection_AsciiString aCommand ((char*) theCommand); + aCI.SetCommand(aCommand); + + int ind = 1; + list::iterator it = theWorkingPlane.begin(); + for (; it != theWorkingPlane.end(); it++, ind++) + aCI.SetWorkingPlane(ind, *it); + + //Compute the Sketcher value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Sketcher driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aSketcher->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ICurvesOperations.MakeSketcher("; + aDescr += aCommand+", ["; + + it = theWorkingPlane.begin(); + aDescr += TCollection_AsciiString(*it); + it++; + for (; it != theWorkingPlane.end(); it++) { + aDescr += ", "; + aDescr += TCollection_AsciiString(*it); + } + + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSketcher; +} diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx new file mode 100644 index 000000000..0c52cc7ec --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx @@ -0,0 +1,40 @@ +using namespace std; + +#ifndef _GEOMImpl_ICurvesOperations_HXX_ +#define _GEOMImpl_ICurvesOperations_HXX_ + +#include "GEOM_IOperations.hxx" + +#include + +class GEOM_Engine; +class Handle(GEOM_Object); + +class GEOMImpl_ICurvesOperations : public GEOM_IOperations { + public: + GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_ICurvesOperations(); + + Handle(GEOM_Object) MakePolyline (list thePoints); + + Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3); + Handle(GEOM_Object) MakeCirclePntVecR (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, double theR); + + Handle(GEOM_Object) MakeEllipse (Handle(GEOM_Object) thePnt, + Handle(GEOM_Object) theVec, + double theRMajor, double theRMinor); + + Handle(GEOM_Object) MakeArc (Handle(GEOM_Object) thePnt1, + Handle(GEOM_Object) thePnt2, + Handle(GEOM_Object) thePnt3); + + Handle(GEOM_Object) MakeSplineBezier (list thePoints); + Handle(GEOM_Object) MakeSplineInterpolation (list thePoints); + + Handle(GEOM_Object) MakeSketcher (const char* theCommand, list theWorkingPlane); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ICylinder.hxx b/src/GEOMImpl/GEOMImpl_ICylinder.hxx new file mode 100644 index 000000000..4a76fd860 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICylinder.hxx @@ -0,0 +1,36 @@ +//NOTE: This is an intreface to a function for the Cylinder creation. + + +#include "GEOM_Function.hxx" + +#define CYL_ARG_R 1 +#define CYL_ARG_H 2 +#define CYL_ARG_PNT 3 +#define CYL_ARG_VEC 4 + +class GEOMImpl_ICylinder +{ + public: + + GEOMImpl_ICylinder(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetR(double theR) { _func->SetReal(CYL_ARG_R, theR); } + + double GetR() { return _func->GetReal(CYL_ARG_R); } + + void SetH(double theH) { _func->SetReal(CYL_ARG_H, theH); } + + double GetH() { return _func->GetReal(CYL_ARG_H); } + + void SetPoint(Handle(GEOM_Function) theRefPoint) { _func->SetReference(CYL_ARG_PNT, theRefPoint); } + + Handle(GEOM_Function) GetPoint() { return _func->GetReference(CYL_ARG_PNT); } + + void SetVector(Handle(GEOM_Function) theRefVector) { _func->SetReference(CYL_ARG_VEC, theRefVector); } + + Handle(GEOM_Function) GetVector() { return _func->GetReference(CYL_ARG_VEC); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IEllipse.hxx b/src/GEOMImpl/GEOMImpl_IEllipse.hxx new file mode 100644 index 000000000..b3f06595a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IEllipse.hxx @@ -0,0 +1,32 @@ +//NOTE: This is an intreface to a function for the Ellipse creation. + + +#include "GEOM_Function.hxx" + +#define ELLIPS_ARG_CC 1 +#define ELLIPS_ARG_VV 2 +#define ELLIPS_ARG_RMAJ 3 +#define ELLIPS_ARG_RMIN 4 + +class GEOMImpl_IEllipse +{ + public: + + GEOMImpl_IEllipse(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(ELLIPS_ARG_CC, theP); } + void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(ELLIPS_ARG_VV, theV); } + + void SetRMajor(double theR) { _func->SetReal(ELLIPS_ARG_RMAJ, theR); } + void SetRMinor(double theR) { _func->SetReal(ELLIPS_ARG_RMIN, theR); } + + Handle(GEOM_Function) GetCenter() { return _func->GetReference(ELLIPS_ARG_CC); } + Handle(GEOM_Function) GetVector() { return _func->GetReference(ELLIPS_ARG_VV); } + + double GetRMajor() { return _func->GetReal(ELLIPS_ARG_RMAJ); } + double GetRMinor() { return _func->GetReal(ELLIPS_ARG_RMIN); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IFillet.hxx b/src/GEOMImpl/GEOMImpl_IFillet.hxx new file mode 100644 index 000000000..9f6d3b9bd --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IFillet.hxx @@ -0,0 +1,40 @@ +//NOTE: This is an interface to a function for the Fillet and creation. + + +#include "GEOM_Function.hxx" + +#define FILLET_ARG_SH 1 +#define FILLET_ARG_R 2 +#define FILLET_ARG_LENG 3 +#define FILLET_ARG_LAST 3 + +class GEOMImpl_IFillet +{ + public: + + GEOMImpl_IFillet(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShape(Handle(GEOM_Function) theRef) { _func->SetReference(FILLET_ARG_SH, theRef); } + + Handle(GEOM_Function) GetShape() { return _func->GetReference(FILLET_ARG_SH); } + + void SetR(double theR) { _func->SetReal(FILLET_ARG_R, theR); } + + double GetR() { return _func->GetReal(FILLET_ARG_R); } + + void SetLength(int theLen) { _func->SetInteger(FILLET_ARG_LENG, theLen); } + + int GetLength() { return _func->GetInteger(FILLET_ARG_LENG); } + + void SetEdge(int theInd, int theEdge) + { _func->SetInteger(FILLET_ARG_LAST + theInd, theEdge); } + void SetFace(int theInd, int theFace) + { _func->SetInteger(FILLET_ARG_LAST + theInd, theFace); } + + int GetEdge(int theInd) { return _func->GetInteger(FILLET_ARG_LAST + theInd); } + int GetFace(int theInd) { return _func->GetInteger(FILLET_ARG_LAST + theInd); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IFilling.hxx b/src/GEOMImpl/GEOMImpl_IFilling.hxx new file mode 100644 index 000000000..e9ab36a27 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IFilling.hxx @@ -0,0 +1,37 @@ +//NOTE: This is an intreface to a function for the Filling operation. + + +#include "GEOM_Function.hxx" + +#define FILL_ARG_MINDEG 1 +#define FILL_ARG_MAXDEG 2 +#define FILL_ARG_TOL2D 3 +#define FILL_ARG_TOL3D 4 +#define FILL_ARG_SHAPE 5 +#define FILL_ARG_NBITER 6 + +class GEOMImpl_IFilling +{ + public: + + GEOMImpl_IFilling(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetTol2D(double theTol2D) { _func->SetReal(FILL_ARG_TOL2D, theTol2D); } + void SetTol3D(double theTol3D) { _func->SetReal(FILL_ARG_TOL3D, theTol3D); } + double GetTol2D() { return _func->GetReal(FILL_ARG_TOL2D); } + double GetTol3D() { return _func->GetReal(FILL_ARG_TOL3D); } + + void SetMinDeg(int theMinDeg) { _func->SetInteger(FILL_ARG_MINDEG, theMinDeg); } + void SetMaxDeg(int theMaxDeg) { _func->SetInteger(FILL_ARG_MAXDEG, theMaxDeg); } + int GetMinDeg() { return _func->GetInteger(FILL_ARG_MINDEG); } + int GetMaxDeg() { return _func->GetInteger(FILL_ARG_MAXDEG); } + void SetNbIter(int theNbIter) { _func->SetInteger(FILL_ARG_NBITER, theNbIter); } + int GetNbIter() { return _func->GetInteger(FILL_ARG_NBITER); } + + void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(FILL_ARG_SHAPE, theShape); } + Handle(GEOM_Function) GetShape() { return _func->GetReference(FILL_ARG_SHAPE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IGlue.hxx b/src/GEOMImpl/GEOMImpl_IGlue.hxx new file mode 100644 index 000000000..1cf51c9f5 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IGlue.hxx @@ -0,0 +1,28 @@ +// NOTE: This is an interface to a function for the Glueing of faces + + +#include "GEOM_Function.hxx" + +#define GLUE_ARG_BASE 1 +#define GLUE_ARG_TOLER 2 + +class GEOMImpl_IGlue +{ + public: + + GEOMImpl_IGlue(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetBase(Handle(GEOM_Function) theRefBase) + { _func->SetReference(GLUE_ARG_BASE, theRefBase); } + + Handle(GEOM_Function) GetBase() { return _func->GetReference(GLUE_ARG_BASE); } + + void SetTolerance(const Standard_Real theTolerance) + { _func->SetReal(GLUE_ARG_TOLER, theTolerance); } + + Standard_Real GetTolerance() { return _func->GetReal(GLUE_ARG_TOLER); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx new file mode 100644 index 000000000..ce66c20d6 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IGroupOperations.cxx @@ -0,0 +1,252 @@ +using namespace std; + +#include "GEOMImpl_IGroupOperations.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include +#include + +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_ISubShape.hxx" + +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IGroupOperations::~GEOMImpl_IGroupOperations() +{ + MESSAGE("GEOMImpl_IGroupOperations::~GEOMImpl_IGroupOperations"); +} + + +//============================================================================= +/*! + * CreateGroup + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IGroupOperations::CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum theShapeType) +{ + SetErrorCode(KO); + + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, -1); + + //Add a new Fillet object + Handle(GEOM_Object) aGroup = GetEngine()->AddSubShape(theMainShape, anArray); + + //Set a GROUP type + aGroup->SetType(GEOM_GROUP); + + //Set a sub shape type + TDF_Label aFreeLabel = aGroup->GetFreeLabel(); + TDataStd_Integer::Set(aFreeLabel, (Standard_Integer)theShapeType); + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aGroup->GetEntry(), anEntry); + aDescr = anEntry + " = IGroupOperations.CreateGroup("; + TDF_Tool::Entry(theMainShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString((int)theShapeType)+")"); + + Handle(GEOM_Function) aFunction = aGroup->GetFunction(1); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aGroup; +} + +//============================================================================= +/*! + * AddObject + */ +//============================================================================= +void GEOMImpl_IGroupOperations::AddObject(Handle(GEOM_Object) theGroup, int theSubShapeID) +{ + SetErrorCode(KO); + if(theGroup.IsNull()) return; + + Handle(GEOM_Function) aFunction = theGroup->GetFunction(1); + if(aFunction.IsNull()) return; + + GEOM_ISubShape aSSI(aFunction); + Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices(); + if(aSeq.IsNull()) return; + if(aSeq->Length() == 1 && aSeq->Value(1) == -1) { + aSeq->SetValue(1, theSubShapeID); + } + else { + Standard_Integer aLength = aSeq->Length(); + Handle(TColStd_HArray1OfInteger) aNewSeq = new TColStd_HArray1OfInteger(1, aLength+1); + for(Standard_Integer i = 1; i<=aLength; i++) { + aNewSeq->SetValue(i, aSeq->Value(i)); + if(aSeq->Value(i) == theSubShapeID) { + SetErrorCode(ALREADY_PRESENT); + return; // + } + } + aNewSeq->SetValue(aLength+1, theSubShapeID); + aSSI.SetIndices(aNewSeq); + } + + SetErrorCode(OK); + return; +} + +//============================================================================= +/*! + * RemoveObject + */ +//============================================================================= +void GEOMImpl_IGroupOperations::RemoveObject(Handle(GEOM_Object) theGroup, int theSubShapeID) +{ + SetErrorCode(KO); + if(theGroup.IsNull()) return; + + + Handle(GEOM_Function) aFunction = theGroup->GetFunction(1); + if(aFunction.IsNull()) return; + + + GEOM_ISubShape aSSI(aFunction); + Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices(); + if(aSeq.IsNull()) return; + if(aSeq->Length() == 1 && aSeq->Value(1) == -1) { + SetErrorCode(NOT_EXISTS); + return; + } + else { + Handle(TColStd_HArray1OfInteger) aNewSeq; + Standard_Integer aLength = aSeq->Length(); + if(aLength == 1) { + if(aSeq->Value(1) != theSubShapeID) { + SetErrorCode(NOT_EXISTS); + return; + } + aNewSeq = new TColStd_HArray1OfInteger(1,1); + aNewSeq->SetValue(1, -1); + } + else { + aNewSeq = new TColStd_HArray1OfInteger(1, aLength-1); + Standard_Boolean isFound = Standard_False; + for(Standard_Integer i = 1, k=1; i<=aLength; i++) { + if(i == aLength && !isFound) { + SetErrorCode(NOT_EXISTS); + return; + } + if(aSeq->Value(i) == theSubShapeID) { + isFound = Standard_True; + continue; + } + aNewSeq->SetValue(k, aSeq->Value(i)); + k++; + } + + if(!isFound) { + SetErrorCode(NOT_EXISTS); + return; + } + } + + aSSI.SetIndices(aNewSeq); + } + + + SetErrorCode(OK); + return; +} + +//============================================================================= +/*! + * GetType + */ +//============================================================================= +TopAbs_ShapeEnum GEOMImpl_IGroupOperations::GetType(Handle(GEOM_Object) theGroup) +{ + SetErrorCode(KO); + + TDF_Label aFreeLabel = theGroup->GetFreeLabel(); + Handle(TDataStd_Integer) anAttrib; + if(!aFreeLabel.FindAttribute(TDataStd_Integer::GetID(), anAttrib)) return TopAbs_SHAPE; + + SetErrorCode(OK); + return (TopAbs_ShapeEnum) anAttrib->Get(); +} + +//============================================================================= +/*! + * GetMainShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IGroupOperations::GetMainShape(Handle(GEOM_Object) theGroup) +{ + SetErrorCode(KO); + + if(theGroup.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction = theGroup->GetFunction(1); + if(aFunction.IsNull()) return NULL; + + GEOM_ISubShape aSSI(aFunction); + aFunction = aSSI.GetMainShape(); + if(aFunction.IsNull()) return NULL; + + TDF_Label aLabel = aFunction->GetOwnerEntry(); + Handle(GEOM_Object) aMainShape = GEOM_Object::GetObject(aLabel); + if(aMainShape.IsNull()) return NULL; + + SetErrorCode(OK); + return aMainShape; +} + +//============================================================================= +/*! + * GetObjects + */ +//============================================================================= +Handle(TColStd_HArray1OfInteger) GEOMImpl_IGroupOperations::GetObjects(Handle(GEOM_Object) theGroup) +{ + SetErrorCode(KO); + + if(theGroup.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction = theGroup->GetFunction(1); + if(aFunction.IsNull()) return NULL; + + GEOM_ISubShape aSSI(aFunction); + Handle(TColStd_HArray1OfInteger) aSeq = aSSI.GetIndices(); + if(aSeq.IsNull()) return NULL; + + if(aSeq->Length() == 1 && aSeq->Value(1) == -1) { + SetErrorCode(OK); + return NULL; + } + + SetErrorCode(OK); + return aSeq; +} diff --git a/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx b/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx new file mode 100644 index 000000000..c17db5f17 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IGroupOperations.hxx @@ -0,0 +1,32 @@ + +#ifndef _GEOMImpl_IGroupOperations_HXX_ +#define _GEOMImpl_IGroupOperations_HXX_ + +#include "Utils_SALOME_Exception.hxx" +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include +#include +#include + +class GEOMImpl_IGroupOperations : public GEOM_IOperations { + public: + GEOMImpl_IGroupOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IGroupOperations(); + + Handle(GEOM_Object) CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum theShapeType); + + void AddObject(Handle(GEOM_Object) theGroup, int theSubShapeID); + + void RemoveObject(Handle(GEOM_Object) theGroup, int theSubShapeID); + + TopAbs_ShapeEnum GetType(Handle(GEOM_Object) theGroup); + + Handle(GEOM_Object) GetMainShape(Handle(GEOM_Object) theGroup); + + Handle(TColStd_HArray1OfInteger) GetObjects(Handle(GEOM_Object) theGroup); + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IHealing.hxx b/src/GEOMImpl/GEOMImpl_IHealing.hxx new file mode 100755 index 000000000..e6d486c14 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IHealing.hxx @@ -0,0 +1,61 @@ +//NOTE: This is an intreface to a function for the Healing creation. + + +#include "GEOM_Function.hxx" + +#include +#include + +#define ARG_SHAPE_PROCESS_OPERATORS 1 +#define ARG_SHAPE_PROCESS_PARAMS 2 +#define ARG_SHAPE_PROCESS_VALUES 3 +#define ARG_ORIGINAL 4 +#define ARG_LIST_ARGUMENTS 5 +#define ARG_IS_COMMON_VERTEX 6 +#define ARG_TOLERANCE 7 +#define ARG_DEV_EDGE_VALUE 8 +#define ARG_IS_BY_PARAMETER 9 +#define ARG_SUBSHAPE_INDEX 10 + + +class GEOMImpl_IHealing +{ +public: + GEOMImpl_IHealing(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetOperators( const Handle(TColStd_HArray1OfExtendedString)& arr ) { if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_OPERATORS, arr); } + Handle(TColStd_HArray1OfExtendedString) GetOperators() { return _func->GetStringArray(ARG_SHAPE_PROCESS_OPERATORS); } + + void SetParameters( const Handle(TColStd_HArray1OfExtendedString)& arr ) { if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_PARAMS, arr); } + Handle(TColStd_HArray1OfExtendedString) GetParameters() { return _func->GetStringArray(ARG_SHAPE_PROCESS_PARAMS); } + + void SetValues( const Handle(TColStd_HArray1OfExtendedString)& arr ) { if ( !arr.IsNull() ) _func->SetStringArray(ARG_SHAPE_PROCESS_VALUES, arr); } + Handle(TColStd_HArray1OfExtendedString) GetValues() { return _func->GetStringArray(ARG_SHAPE_PROCESS_VALUES); } + + void SetOriginal( Handle(GEOM_Function)& f ) { _func->SetReference(ARG_ORIGINAL, f); } + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(ARG_ORIGINAL); } + + void SetFaces( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); } + Handle(TColStd_HArray1OfInteger) GetFaces() { return _func->GetIntegerArray(ARG_LIST_ARGUMENTS); } + + void SetWires( const Handle(TColStd_HArray1OfInteger)& arr ) { if ( !arr.IsNull() ) _func->SetIntegerArray(ARG_LIST_ARGUMENTS, arr); } + Handle(TColStd_HArray1OfInteger) GetWires() { return _func->GetIntegerArray(ARG_LIST_ARGUMENTS); } + + void SetIsCommonVertex( Standard_Boolean val ) { _func->SetInteger(ARG_IS_COMMON_VERTEX, val ? 1 : 0 ); } + Standard_Boolean GetIsCommonVertex() { return (_func->GetInteger(ARG_IS_COMMON_VERTEX) != 0 ); } + + void SetIsByParameter( Standard_Boolean val ) { _func->SetInteger(ARG_IS_BY_PARAMETER, val ? 1 : 0 ); } + Standard_Boolean GetIsByParameter() { return (_func->GetInteger(ARG_IS_BY_PARAMETER) != 0 ); } + + void SetTolerance( Standard_Real val ) { _func->SetReal(ARG_TOLERANCE, val); } + Standard_Real GetTolerance() { return _func->GetReal(ARG_TOLERANCE); } + + void SetDevideEdgeValue( Standard_Real val ) { _func->SetReal(ARG_DEV_EDGE_VALUE, val); } + Standard_Real GetDevideEdgeValue() { return _func->GetReal(ARG_DEV_EDGE_VALUE); } + + void SetIndex( Standard_Integer val ) { _func->SetInteger(ARG_SUBSHAPE_INDEX, val); } + Standard_Integer GetIndex() { return _func->GetInteger(ARG_SUBSHAPE_INDEX); } + +private: + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx new file mode 100644 index 000000000..15852e313 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IHealingOperations.cxx @@ -0,0 +1,638 @@ +using namespace std; + +#include "GEOMImpl_IHealingOperations.hxx" + +#include "GEOMImpl_HealingDriver.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_IHealing.hxx" +#include "GEOMImpl_CopyDriver.hxx" + +#include "ShHealOper_ShapeProcess.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include + +#include +#include + +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= + +GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOMImpl_IHealingOperations::~GEOMImpl_IHealingOperations() +{ + MESSAGE("GEOMImpl_IHealingOperations::~GEOMImpl_IHealingOperations"); +} + + +//============================================================================= +/*! + * ShapeProcess + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::ShapeProcess (Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfExtendedString)& theOperators, + const Handle(TColStd_HArray1OfExtendedString)& theParams, + const Handle(TColStd_HArray1OfExtendedString)& theValues) +{ + // set error code, check parameters + SetErrorCode(KO); + + if (theObject.IsNull()) + return NULL; + + if (theOperators.IsNull() || theOperators->Length() <= 0) { + SetErrorCode("No operators requested"); + return NULL; + } + + Standard_Integer nbParams = 0, nbValues = 0; + if (!theParams.IsNull()) { + nbParams = theParams->Length(); + } + if (!theValues.IsNull()) { + nbValues = theValues->Length(); + } + + if (nbParams != nbValues) { + SetErrorCode("Number of parameter values must be equal to the number of parameters"); + return NULL; + } + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SHAPE_PROCESS); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetOriginal(aLastFunction); + HI.SetOperators( theOperators ); + if (nbParams > 0) { + HI.SetParameters( theParams ); + HI.SetValues( theValues ); + } + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Shape Healing algorithm failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + +//============================================================================= +/*! + * ShapeProcess + */ +//============================================================================= +void GEOMImpl_IHealingOperations::GetShapeProcessParameters (list& theOperations, + list& theParams, + list& theValues) +{ + ShHealOper_ShapeProcess aHealer; + TColStd_SequenceOfAsciiString anOperators; + int nbOperatorErrors( 0 ), nbParamValueErrors( 0 ); + if ( aHealer.GetOperators( anOperators ) ) + { + for ( Standard_Integer i = 1; i <= anOperators.Length(); i++ ) + { + string anOperation = anOperators.Value( i ).ToCString(); + theOperations.push_back( anOperation ); + list aParams, aValues; + if ( GetParameters( anOperation, aParams ) ) + { + for ( list::iterator it = aParams.begin(); it != aParams.end(); ++it ) + { + TCollection_AsciiString aParam( (Standard_CString)(*it).c_str() ); + TCollection_AsciiString aValue; + if ( aHealer.GetParameter( aParam, aValue ) ) + { + theParams.push_back( aParam.ToCString() ); + theValues.push_back( aValue.ToCString() ); + } + else + nbParamValueErrors++; + } + } + else + nbOperatorErrors++; + } + } + else + { + SetErrorCode("ERROR retrieving operators (GEOMImpl_IHealingOperations)"); + } + + if (nbOperatorErrors || nbParamValueErrors) { + TCollection_AsciiString aMsg ("ERRORS retrieving ShapeProcess parameters (GEOMImpl_IHealingOperations): nbOperatorErrors = "); + aMsg += TCollection_AsciiString(nbOperatorErrors); + aMsg += " ,nbParamValueErrors = "; + aMsg += TCollection_AsciiString(nbParamValueErrors); + MESSAGE(aMsg.ToCString()); + } +} + +//============================================================================= +/*! + * GetParameters + */ +//============================================================================= +bool GEOMImpl_IHealingOperations::GetParameters (const string theOperation, + list& theParams) +{ + if ( theOperation == "SplitAngle" ) { + theParams.push_back( "SplitAngle.Angle" ); + theParams.push_back( "SplitAngle.MaxTolerance" ); + + } else if ( theOperation == "SplitClosedFaces" ) { + theParams.push_back( "SplitClosedFaces.NbSplitPoints" ); + + } else if ( theOperation == "FixFaceSize" ) { + theParams.push_back( "FixFaceSize.Tolerance" ); + + } else if( theOperation == "DropSmallEdges" ) { + theParams.push_back( "DropSmallEdges.Tolerance3d" ); + + } else if( theOperation == "BSplineRestriction" ) { + theParams.push_back( "BSplineRestriction.SurfaceMode" ); + theParams.push_back( "BSplineRestriction.Curve3dMode" ); + theParams.push_back( "BSplineRestriction.Curve2dMode" ); + theParams.push_back( "BSplineRestriction.Tolerance3d" ); + theParams.push_back( "BSplineRestriction.Tolerance2d" ); + theParams.push_back( "BSplineRestriction.RequiredDegree" ); + theParams.push_back( "BSplineRestriction.RequiredNbSegments" ); + theParams.push_back( "BSplineRestriction.Continuity3d" ); + theParams.push_back( "BSplineRestriction.Continuity2d" ); + + } else if( theOperation == "SplitContinuity" ) { + theParams.push_back( "SplitContinuity.Tolerance3d" ); + theParams.push_back( "SplitContinuity.SurfaceContinuity" ); + theParams.push_back( "SplitContinuity.CurveContinuity" ); + + } else if( theOperation == "ToBezier" ) { + theParams.push_back( "ToBezier.SurfaceMode" ); + theParams.push_back( "ToBezier.Curve3dMode" ); + theParams.push_back( "ToBezier.Curve2dMode" ); + theParams.push_back( "ToBezier.MaxTolerance" ); + + } else if( theOperation == "SameParameter" ) { + theParams.push_back( "SameParameter.Tolerance3d" ); + + } else if( theOperation == "FixShape" ) { + theParams.push_back( "FixShape.Tolerance3d" ); + theParams.push_back( "FixShape.MaxTolerance3d" ); + + } else { + return false; + } + + return true; +} + +//============================================================================= +/*! + * SuppressFaces + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces (Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theFaces) +{ + // set error code, check parameters + SetErrorCode(KO); + + if ( theObject.IsNull() ) // if theFaces.IsNull() - it's OK, it means that ALL faces must be removed.. + return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if(aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SUPPRESS_FACES); + + if(aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if(aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetFaces( theFaces ); + HI.SetOriginal( aLastFunction ); + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Healing driver failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + + +//============================================================================= +/*! + * CloseContour + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour (Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theWires, + bool isCommonVertex) +{ + // set error code, check parameters + SetErrorCode(KO); + + if (theObject.IsNull()) + return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CLOSE_CONTOUR); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if(aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetWires( theWires ); + HI.SetIsCommonVertex( isCommonVertex ); + HI.SetOriginal( aLastFunction ); + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Healing driver failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + +//============================================================================= +/*! + * RemoveIntWires + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveIntWires (Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theWires) +{ + // set error code, check parameters + SetErrorCode(KO); + + if (theObject.IsNull()) // if theWires is NULL it's OK, it means that ALL wires must be removed + return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INT_WIRES); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetWires( theWires ); + HI.SetOriginal( aLastFunction ); + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Healing driver failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + +//============================================================================= +/*! + * FillHoles + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theWires) +{ + // set error code, check parameters + SetErrorCode(KO); + + if (theObject.IsNull()) // if theWires is NULL it's OK, it means that ALL holes must be removed + return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), FILL_HOLES); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetWires( theWires ); + HI.SetOriginal( aLastFunction ); + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Healing driver failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + +//============================================================================= +/*! + * Sew + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::Sew (Handle(GEOM_Object) theObject, + double theTolerance) +{ + // set error code, check parameters + SetErrorCode(KO); + + if (theObject.IsNull()) + return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SEWING); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetTolerance( theTolerance ); + HI.SetOriginal( aLastFunction ); + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Healing driver failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + +//============================================================================= +/*! + * DivideEdge + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object) theObject, + int theIndex, + double theValue, + bool isByParameter) +{ + // set error code, check parameters + SetErrorCode(KO); + + if (theObject.IsNull()) + return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed + + // Add a new object + Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY ); + + //Add the function + aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_HealingDriver::GetID()) return NULL; + + // prepare "data container" class IHealing + GEOMImpl_IHealing HI(aFunction); + HI.SetIndex( theIndex ); + HI.SetDevideEdgeValue( theValue ); + HI.SetIsByParameter( isByParameter ); + HI.SetOriginal( aLastFunction ); + + //Compute the translation + try + { + if (!GetSolver()->ComputeFunction(aFunction)) + { + SetErrorCode("Healing driver failed"); + return NULL; + } + } + catch (Standard_Failure) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + // ... + // ... missing ... + + SetErrorCode(OK); + return aNewObject; +} + +//============================================================================= +/*! + * GetFreeBoundary + */ +//============================================================================= +bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(GEOM_Object) theObject, + Handle(TColStd_HSequenceOfTransient)& theClosed, + Handle(TColStd_HSequenceOfTransient)& theOpen ) +{ + // set error code, check parameters + SetErrorCode(KO); + + if ( theObject.IsNull() || theClosed.IsNull() || theOpen.IsNull() ) + return false; + + TopoDS_Shape aShape = theObject->GetValue(); + if ( aShape.IsNull() ) + return false; + + // get free boundary shapes + ShapeAnalysis_FreeBounds anAnalizer( aShape ); + TopoDS_Compound aClosed = anAnalizer.GetClosedWires(); + TopoDS_Compound anOpen = anAnalizer.GetOpenWires(); + + // iterate through shapes and append them to the return sequence + Handle(GEOM_Object) anObj; + Handle(GEOM_Function) aFunction; + TopExp_Explorer anExp; + for ( anExp.Init( aClosed, TopAbs_WIRE ); anExp.More(); anExp.Next() ) + { + anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS ); + aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF ); + TopoDS_Shape aValueShape = anExp.Current(); + aFunction->SetValue( aValueShape ); + theClosed->Append(anObj); + } + for ( anExp.Init( anOpen, TopAbs_WIRE ); anExp.More(); anExp.Next() ) + { + anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS ); + aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF ); + TopoDS_Shape aValueShape = anExp.Current(); + aFunction->SetValue( aValueShape ); + theOpen->Append(anObj); + } + + SetErrorCode(OK); + return true; +} diff --git a/src/GEOMImpl/GEOMImpl_IHealingOperations.hxx b/src/GEOMImpl/GEOMImpl_IHealingOperations.hxx new file mode 100644 index 000000000..b167bcd0d --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IHealingOperations.hxx @@ -0,0 +1,62 @@ + +#ifndef _GEOMImpl_IHealingOperations_HXX_ +#define _GEOMImpl_IHealingOperations_HXX_ + +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include +#include + +#include + +class GEOMImpl_IHealingOperations : public GEOM_IOperations { + public: + GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IHealingOperations(); + + // Apply Shape Processing to the selected Object + Handle(GEOM_Object) ShapeProcess( Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfExtendedString)& theOperations, + const Handle(TColStd_HArray1OfExtendedString)& theParams, + const Handle(TColStd_HArray1OfExtendedString)& theValues ); + + // Retrieve default Shape Process parameters (from resource file) + void GetShapeProcessParameters( list& theOperations, + list& theParams, + list& theValues ); + + // returns all parameters that are valid for the given operation (Shape Process operator) + static bool GetParameters( const string theOperation, list& theParams ); + + Handle(GEOM_Object) SuppressFaces( Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theFaces); + + Handle(GEOM_Object) CloseContour( Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theWires, + bool isCommonVertex ); + + Handle(GEOM_Object) RemoveIntWires( Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theWires); + + Handle(GEOM_Object) FillHoles( Handle(GEOM_Object) theObject, + const Handle(TColStd_HArray1OfInteger)& theWires); + + Handle(GEOM_Object) Sew( Handle(GEOM_Object) theObject, + double theTolerance ); + + Handle(GEOM_Object) DivideEdge( Handle(GEOM_Object) theObject, + int theIndex, + double theValue, + bool isByParameter ); + + // this function does not use Function-Driver mechanism, it just computes the free + // boundary edges and returns them in the sequence. It is called just for information reasons + // and it's not intended for history/undo/redo/etc.. + bool GetFreeBoundary ( Handle(GEOM_Object) theObject, + Handle(TColStd_HSequenceOfTransient)& theOutClosedWires, + Handle(TColStd_HSequenceOfTransient)& theOutOpenWires ); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IImportExport.hxx b/src/GEOMImpl/GEOMImpl_IImportExport.hxx new file mode 100644 index 000000000..d70a033a9 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IImportExport.hxx @@ -0,0 +1,32 @@ +//NOTE: This is an intreface to a function for the Import Export operation. + + +#include "GEOM_Function.hxx" + +#define EXP_ARG_REF 1 +#define EXP_ARG_FILE 2 +#define EXP_ARG_PLUG 3 + +class GEOMImpl_IImportExport +{ + public: + + GEOMImpl_IImportExport(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(EXP_ARG_REF, theOriginal); } + + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(EXP_ARG_REF); } + + void SetFileName(const TCollection_AsciiString& theFileName) { _func->SetString(EXP_ARG_FILE, theFileName); } + + TCollection_AsciiString GetFileName() { return _func->GetString(EXP_ARG_FILE); } + + void SetPluginName(const TCollection_AsciiString& theFormatName) + { _func->SetString(EXP_ARG_PLUG, theFormatName); } + + TCollection_AsciiString GetPluginName() { return _func->GetString(EXP_ARG_PLUG); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx new file mode 100644 index 000000000..520eba58f --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.cxx @@ -0,0 +1,393 @@ +using namespace std; + +#include "GEOMImpl_IInsertOperations.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include "GEOM_Function.hxx" + +#include "GEOMImpl_CopyDriver.hxx" +#include "GEOMImpl_ExportDriver.hxx" +#include "GEOMImpl_ImportDriver.hxx" + +#include "GEOMImpl_ICopy.hxx" +#include "GEOMImpl_IImportExport.hxx" + +#include "GEOMImpl_Types.hxx" + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= + +GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOMImpl_IInsertOperations::~GEOMImpl_IInsertOperations() +{ + MESSAGE("GEOMImpl_IInsertOperations::~GEOMImpl_IInsertOperations"); +} + + + +//============================================================================= +/*! + * MakeCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy(Handle(GEOM_Object) theOriginal) +{ + SetErrorCode(KO); + + if (theOriginal.IsNull()) return NULL; + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY); + + //Add a Copy function for creation a copy object + Handle(GEOM_Function) aFunction = aCopy->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITH_REF); + + //Check if the function is set correctly + if(aFunction->GetDriverGUID() != GEOMImpl_CopyDriver::GetID()) return NULL; + + GEOMImpl_ICopy aCI(aFunction); + + Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction(); + if (aRefFunction.IsNull()) return NULL; + + aCI.SetOriginal(aRefFunction); + + //Compute the Copy value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Copy driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = IInsertOperations.MakeCopy("); + TDF_Tool::Entry(theOriginal->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * Export + */ +//============================================================================= +void GEOMImpl_IInsertOperations::Export + (const Handle(GEOM_Object) theOriginal, + const char* theFileName, + const char* theFormatName) +{ + SetErrorCode(KO); + + if (theOriginal.IsNull()) return; + + Handle(GEOM_Function) aRefFunction = theOriginal->GetLastFunction(); + if (aRefFunction.IsNull()) return; //There is no function which creates an object to be exported + + //Add an Export function + Handle(GEOM_Function) aFunction = theOriginal->AddFunction(GEOMImpl_ExportDriver::GetID(), EXPORT_SHAPE); + if (aFunction.IsNull()) return; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ExportDriver::GetID()) return; + + //Set parameters + GEOMImpl_IImportExport aCI (aFunction); + aCI.SetOriginal(aRefFunction); + char* aFileName = (char*)theFileName; + aCI.SetFileName(aFileName); + + char* aFormatName = (char*)theFormatName; + Handle(TCollection_HAsciiString) aHLibName; + if (!IsSupported(Standard_False, aFormatName, aHLibName)) { + return; + } + TCollection_AsciiString aLibName = aHLibName->String(); + aCI.SetPluginName(aLibName); + + //Perform the Export + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Export driver failed"); + return; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + aDescr = "IInsertOperations.Export("; + TDF_Tool::Entry(theOriginal->GetEntry(), anEntry); + aDescr += (anEntry + ", "); + aDescr += (TCollection_AsciiString(aFileName) + ", "); + aDescr += (TCollection_AsciiString(aFormatName) + ")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); +} + +//============================================================================= +/*! + * Import + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IInsertOperations::Import + (const char* theFileName, + const char* theFormatName) +{ + SetErrorCode(KO); + + if (!theFileName || !theFormatName) return NULL; + + //Add a new result object + Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT); + + //Add an Import function + Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_ImportDriver::GetID(), IMPORT_SHAPE); + if (aFunction.IsNull()) return result; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ImportDriver::GetID()) return result; + + //Set parameters + GEOMImpl_IImportExport aCI (aFunction); + char* aFileName = (char*)theFileName; + aCI.SetFileName(aFileName); + + char* aFormatName = (char*)theFormatName; + Handle(TCollection_HAsciiString) aHLibName; + if (!IsSupported(Standard_True, aFormatName, aHLibName)) { + return result; + } + TCollection_AsciiString aLibName = aHLibName->String(); + aCI.SetPluginName(aLibName); + + //Perform the Import + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Import driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(result->GetEntry(), anEntry); + aDescr += (anEntry + " = IInsertOperations.Import("); + aDescr += (TCollection_AsciiString(aFileName) + ", "); + aDescr += (TCollection_AsciiString(aFormatName) + ")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return result; +} + +//============================================================================= +/*! + * ImportTranslators + */ +//============================================================================= +Standard_Boolean GEOMImpl_IInsertOperations::ImportTranslators + (Handle(TColStd_HSequenceOfAsciiString)& theFormats, + Handle(TColStd_HSequenceOfAsciiString)& thePatterns) +{ + if (theFormats.IsNull()) + theFormats = new TColStd_HSequenceOfAsciiString; + else + theFormats->Clear(); + + if (thePatterns.IsNull()) + thePatterns = new TColStd_HSequenceOfAsciiString; + else + thePatterns->Clear(); + + if (!InitResMgr()) return Standard_False; + + // Read Import formats list + if (myResMgr->Find("Import")) { + TCollection_AsciiString aFormats (myResMgr->Value("Import")); + TCollection_AsciiString aToken = aFormats.Token("| \t", 1); + int i = 1; + for (; !aToken.IsEmpty(); aToken = aFormats.Token("| \t", ++i)) { + theFormats->Append(aToken); + } + } + + // Read Patterns for each supported format + int j = 1, len = theFormats->Length(); + for (; j <= len; j++) { + TCollection_AsciiString aPattern; + TCollection_AsciiString aKey (theFormats->Value(j)); + aKey += ".Pattern"; + if (myResMgr->Find(aKey.ToCString())) + aPattern = myResMgr->Value(aKey.ToCString()); + else { + aPattern = theFormats->Value(j); + aPattern += " Files ( *.* )"; + } + thePatterns->Append(aPattern); + } + + return (!theFormats->IsEmpty()); +} + +//============================================================================= +/*! + * ExportTranslators + */ +//============================================================================= +Standard_Boolean GEOMImpl_IInsertOperations::ExportTranslators + (Handle(TColStd_HSequenceOfAsciiString)& theFormats, + Handle(TColStd_HSequenceOfAsciiString)& thePatterns) +{ + if (theFormats.IsNull()) + theFormats = new TColStd_HSequenceOfAsciiString; + else + theFormats->Clear(); + + if (thePatterns.IsNull()) + thePatterns = new TColStd_HSequenceOfAsciiString; + else + thePatterns->Clear(); + + if (!InitResMgr()) return Standard_False; + + // Read Export formats list + if (myResMgr->Find("Export")) { + TCollection_AsciiString aFormats (myResMgr->Value("Export")); + TCollection_AsciiString aToken = aFormats.Token("| \t", 1); + int i = 1; + for (; !aToken.IsEmpty(); aToken = aFormats.Token("| \t", ++i)) { + theFormats->Append(aToken); + } + } + + // Read Patterns for each supported format + int j = 1, len = theFormats->Length(); + for (; j <= len; j++) { + TCollection_AsciiString aPattern; + TCollection_AsciiString aKey (theFormats->Value(j)); + aKey += ".Pattern"; + if (myResMgr->Find(aKey.ToCString())) + aPattern = myResMgr->Value(aKey.ToCString()); + else { + aPattern = theFormats->Value(j); + aPattern += " Files ( *.* )"; + } + thePatterns->Append(aPattern); + } + + return (!theFormats->IsEmpty()); +} + +//============================================================================= +/*! + * IsSupported + */ +//============================================================================= +Standard_Boolean GEOMImpl_IInsertOperations::IsSupported + (const Standard_Boolean isImport, + const TCollection_AsciiString theFormat, + Handle(TCollection_HAsciiString)& theLibName) +{ + if (!InitResMgr()) return Standard_False; + + // Import/Export mode + Standard_CString aMode; + if (isImport) aMode = "Import"; + else aMode = "Export"; + + // Read supported formats for the certain mode + if (myResMgr->Find(aMode)) { + TCollection_AsciiString aFormats (myResMgr->Value(aMode)); + if (aFormats.Search(theFormat) > -1) { + // Read library name for the supported format + TCollection_AsciiString aKey (theFormat); + aKey += "."; + aKey += aMode; + if (myResMgr->Find(aKey.ToCString())) { + TCollection_AsciiString aLibName (myResMgr->Value(aKey.ToCString())); + theLibName = new TCollection_HAsciiString (aLibName); + return Standard_True; + } + } + } + + return Standard_False; +} + +//============================================================================= +/*! + * InitResMgr + */ +//============================================================================= +Standard_Boolean GEOMImpl_IInsertOperations::InitResMgr() +{ + if (myResMgr.IsNull()) { + // Initialize the Resource Manager + TCollection_AsciiString aResDir (getenv("GEOM_ROOT_DIR")); +#ifdef WNT + aResDir += "\\share\\salome\\resources"; +#else + aResDir += "/share/salome/resources"; +#endif + TCollection_AsciiString aUserResDir (getenv("HOME")); +#ifdef WNT + aUserResDir += "\\.salome\\resources"; +#else + aUserResDir += "/.salome/resources"; +#endif + myResMgr = new Resource_Manager ("ImportExport", aResDir, aUserResDir, Standard_True); + } + + if (myResMgr->Find("Import") || myResMgr->Find("Export")) + return Standard_True; + + return Standard_False; +} diff --git a/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx b/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx new file mode 100644 index 000000000..953cf3e79 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IInsertOperations.hxx @@ -0,0 +1,45 @@ + +#ifndef _GEOMImpl_IInsertOperations_HXX_ +#define _GEOMImpl_IInsertOperations_HXX_ + +#include "Utils_SALOME_Exception.hxx" +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include +#include +#include +#include + +class GEOMImpl_IInsertOperations : public GEOM_IOperations { + public: + GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IInsertOperations(); + + + Handle(GEOM_Object) MakeCopy (Handle(GEOM_Object) theOriginal); + + Handle(GEOM_Object) Import (const char* theFileName, const char* theFormatType); + + void Export (const Handle(GEOM_Object) theOriginal, + const char* theFileName, + const char* theFormatType); + + Standard_Boolean ImportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats, + Handle(TColStd_HSequenceOfAsciiString)& thePatterns); + + Standard_Boolean ExportTranslators (Handle(TColStd_HSequenceOfAsciiString)& theFormats, + Handle(TColStd_HSequenceOfAsciiString)& thePatterns); + + Standard_Boolean IsSupported (const Standard_Boolean isImport, + const TCollection_AsciiString theFormat, + Handle(TCollection_HAsciiString)& theLibName); + + private: + Standard_Boolean InitResMgr (); + + private: + Handle(Resource_Manager) myResMgr; +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ILine.hxx b/src/GEOMImpl/GEOMImpl_ILine.hxx new file mode 100644 index 000000000..7834a5746 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ILine.hxx @@ -0,0 +1,24 @@ +//NOTE: This is an intreface to a function for the vector creation. + + +#include "GEOM_Function.hxx" + +#define LINE_ARG_PNT1 1 +#define LINE_ARG_PNT2 2 + +class GEOMImpl_ILine +{ + public: + + GEOMImpl_ILine(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetPoint1(Handle(GEOM_Function) theRef) { _func->SetReference(LINE_ARG_PNT1, theRef); } + void SetPoint2(Handle(GEOM_Function) theRef) { _func->SetReference(LINE_ARG_PNT2, theRef); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(LINE_ARG_PNT1); } + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(LINE_ARG_PNT2); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx new file mode 100644 index 000000000..5df5db458 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ILocalOperations.cxx @@ -0,0 +1,554 @@ +using namespace std; + +#include "GEOMImpl_ILocalOperations.hxx" + +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" + +#include "GEOMImpl_FilletDriver.hxx" +#include "GEOMImpl_ChamferDriver.hxx" + +#include "GEOMImpl_IFillet.hxx" +#include "GEOMImpl_IChamfer.hxx" + +#include "GEOMImpl_IArchimede.hxx" +#include "GEOMImpl_ArchimedeDriver.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_ILocalOperations::~GEOMImpl_ILocalOperations() +{ + MESSAGE("GEOMImpl_ILocalOperations::~GEOMImpl_ILocalOperations"); +} + + +//============================================================================= +/*! + * MakeFilletAll + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll + (Handle(GEOM_Object) theShape, double theR) +{ + SetErrorCode(KO); + + //Add a new Fillet object + Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET); + + //Add a new Fillet function + Handle(GEOM_Function) aFunction = + aFillet->AddFunction(GEOMImpl_FilletDriver::GetID(), FILLET_SHAPE_ALL); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_FilletDriver::GetID()) return NULL; + + GEOMImpl_IFillet aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetShape(aRefShape); + aCI.SetR(theR); + + //Compute the Fillet value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Fillet driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aFillet->GetEntry(), anEntry); + aDescr = anEntry + " = ILocalOperations.MakeFilletAll("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFillet; +} + +//============================================================================= +/*! + * MakeFilletEdges + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges + (Handle(GEOM_Object) theShape, double theR, list theEdges) +{ + SetErrorCode(KO); + + //Add a new Fillet object + Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET); + + //Add a new Fillet function + Handle(GEOM_Function) aFunction = + aFillet->AddFunction(GEOMImpl_FilletDriver::GetID(), FILLET_SHAPE_EDGES); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_FilletDriver::GetID()) return NULL; + + GEOMImpl_IFillet aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetShape(aRefShape); + aCI.SetR(theR); + int aLen = theEdges.size(); + aCI.SetLength(aLen); + + int ind = 1; + list::iterator it = theEdges.begin(); + for (; it != theEdges.end(); it++, ind++) { + aCI.SetEdge(ind, (*it)); + } + + //Compute the Fillet value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Fillet driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aFillet->GetEntry(), anEntry); + aDescr = anEntry + " = ILocalOperations.MakeFilletEdges("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR)+", ["); + it = theEdges.begin(); + aDescr += (TCollection_AsciiString(*it)+", "); + it++; + for (; it != theEdges.end(); it++) { + aDescr += ", "; + aDescr += TCollection_AsciiString(*it); + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFillet; +} + +//============================================================================= +/*! + * MakeFilletFaces + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces + (Handle(GEOM_Object) theShape, double theR, list theFaces) +{ + SetErrorCode(KO); + + //Add a new Fillet object + Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET); + + //Add a new Fillet function + Handle(GEOM_Function) aFunction = + aFillet->AddFunction(GEOMImpl_FilletDriver::GetID(), FILLET_SHAPE_FACES); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_FilletDriver::GetID()) return NULL; + + GEOMImpl_IFillet aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetShape(aRefShape); + aCI.SetR(theR); + int aLen = theFaces.size(); + aCI.SetLength(aLen); + + int ind = 1; + list::iterator it = theFaces.begin(); + for (; it != theFaces.end(); it++, ind++) { + aCI.SetFace(ind, (*it)); + } + + //Compute the Fillet value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Fillet driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aFillet->GetEntry(), anEntry); + aDescr = anEntry + " = ILocalOperations.MakeFilletFaces("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theR)+", ["); + it = theFaces.begin(); + aDescr += (TCollection_AsciiString(*it)+", "); + it++; + for (; it != theFaces.end(); it++) { + aDescr += ", "; + aDescr += TCollection_AsciiString(*it); + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFillet; +} + +//============================================================================= +/*! + * MakeChamferAll + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferAll (Handle(GEOM_Object) theShape, double theD) +{ + SetErrorCode(KO); + + //Add a new Chamfer object + Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER); + + //Add a new Chamfer function + Handle(GEOM_Function) aFunction = + aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_ALL); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) return NULL; + + GEOMImpl_IChamfer aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetShape(aRefShape); + aCI.SetD(theD); + + //Compute the Chamfer value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Chamfer driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aChamfer->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ILocalOperations.MakeChamferAll("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theD)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aChamfer; +} + +//============================================================================= +/*! + * MakeChamferEdge + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge + (Handle(GEOM_Object) theShape, double theD1, double theD2, + int theFace1, int theFace2) +{ + SetErrorCode(KO); + + //Add a new Chamfer object + Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER); + + //Add a new Chamfer function + Handle(GEOM_Function) aFunction = + aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) return NULL; + + GEOMImpl_IChamfer aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetShape(aRefShape); + aCI.SetD1(theD1); + aCI.SetD2(theD2); + aCI.SetFace1(theFace1); + aCI.SetFace2(theFace2); + + //Compute the Chamfer value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Chamfer driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aChamfer->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ILocalOperations.MakeChamferEdge("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theD1)+", "); + aDescr += (TCollection_AsciiString(theD2)+", "); + aDescr += (TCollection_AsciiString(theFace1)+", "); + aDescr += (TCollection_AsciiString(theFace2)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aChamfer; +} + +//============================================================================= +/*! + * MakeChamferFaces + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces + (Handle(GEOM_Object) theShape, double theD1, double theD2, + list theFaces) +{ + SetErrorCode(KO); + + //Add a new Chamfer object + Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER); + + //Add a new Chamfer function + Handle(GEOM_Function) aFunction = + aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_FACES); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID()) return NULL; + + GEOMImpl_IChamfer aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetShape(aRefShape); + aCI.SetD1(theD1); + aCI.SetD2(theD2); + int aLen = theFaces.size(); + aCI.SetLength(aLen); + + int ind = 1; + list::iterator it = theFaces.begin(); + for (; it != theFaces.end(); it++, ind++) { + aCI.SetFace(ind, (*it)); + } + + //Compute the Chamfer value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Chamfer driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aChamfer->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ILocalOperations.MakeChamferFaces("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theD1)+", "); + aDescr += (TCollection_AsciiString(theD2)+", ["); + it = theFaces.begin(); + aDescr += (TCollection_AsciiString(*it)+", "); + it++; + for (; it != theFaces.end(); it++) { + aDescr += ", "; + aDescr += TCollection_AsciiString(*it); + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aChamfer; +} + +//============================================================================= +/*! + * Archimede + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeArchimede (Handle(GEOM_Object) theShape, + double theWeight, + double theWaterDensity, + double theMeshingDeflection) +{ + SetErrorCode(KO); + + //Add a new Archimede object + Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_ARCHIMEDE); + + //Add a new Archimede function + Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ArchimedeDriver::GetID(), ARCHIMEDE_TYPE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ArchimedeDriver::GetID()) return NULL; + + GEOMImpl_IArchimede aAI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aAI.SetBasicShape(aRefShape); + aAI.SetWeight(theWeight); + aAI.SetDensity(theWaterDensity); + aAI.SetDeflection(theMeshingDeflection); + + //Compute the Archimede value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Archimede driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aChamfer->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = ILocalOperations.MakeArchimede("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theWeight)+", "); + aDescr += (TCollection_AsciiString(theWaterDensity)+", "); + aDescr += (TCollection_AsciiString(theMeshingDeflection)+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aChamfer; +} + +//============================================================================= +/*! + * GetSubShape + */ +//============================================================================= +bool GEOMImpl_ILocalOperations::GetSubShape (const TopoDS_Shape& theShape, const int theIndex, + TopoDS_Shape& theSubShape) +{ + if (theShape.IsNull() || theIndex < 1) + return false; + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(theShape, anIndices); + if (theIndex > anIndices.Extent()) return false; + theSubShape = anIndices.FindKey(theIndex); + + return true; +} + +//============================================================================= +/*! + * GetSubShapeIndex + */ +//============================================================================= +Standard_Integer GEOMImpl_ILocalOperations::GetSubShapeIndex (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) theSubShape) +{ + SetErrorCode(KO); + + TopoDS_Shape aShape = theShape->GetValue(); + TopoDS_Shape aSubShape = theSubShape->GetValue(); + + if (aShape.IsNull() || aSubShape.IsNull()) return -1; + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + if (anIndices.Contains(aSubShape)) { + SetErrorCode(OK); + return anIndices.FindIndex(aSubShape); + } + + return -1; +} diff --git a/src/GEOMImpl/GEOMImpl_ILocalOperations.hxx b/src/GEOMImpl/GEOMImpl_ILocalOperations.hxx new file mode 100644 index 000000000..8b1110810 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ILocalOperations.hxx @@ -0,0 +1,44 @@ + +#ifndef _GEOMImpl_ILocalOperations_HXX_ +#define _GEOMImpl_ILocalOperations_HXX_ + +#include "Utils_SALOME_Exception.hxx" +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include + +#include + +class GEOMImpl_ILocalOperations : public GEOM_IOperations { + public: + GEOMImpl_ILocalOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_ILocalOperations(); + + Handle(GEOM_Object) MakeFilletAll (Handle(GEOM_Object) theShape, double theR); + Handle(GEOM_Object) MakeFilletEdges (Handle(GEOM_Object) theShape, double theR, + list theEdges); + Handle(GEOM_Object) MakeFilletFaces (Handle(GEOM_Object) theShape, double theR, + list theFaces); + + Handle(GEOM_Object) MakeChamferAll (Handle(GEOM_Object) theShape, double theD); + Handle(GEOM_Object) MakeChamferEdge (Handle(GEOM_Object) theShape, + double theD1, double theD2, + int theFace1, int theFace2); + Handle(GEOM_Object) MakeChamferFaces (Handle(GEOM_Object) theShape, + double theD1, double theD2, + list theFaces); + + Handle(GEOM_Object) MakeArchimede (Handle(GEOM_Object) theShape, + double theWeight, double theWaterDensity, + double theMeshingDeflection); + + Standard_Integer GetSubShapeIndex (Handle(GEOM_Object) theShape, + Handle(GEOM_Object) theSubShape); + + static bool GetSubShape (const TopoDS_Shape& theShape, + const int theIndex, + TopoDS_Shape& theSubShape); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IMarker.hxx b/src/GEOMImpl/GEOMImpl_IMarker.hxx new file mode 100644 index 000000000..a29e01c62 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IMarker.hxx @@ -0,0 +1,69 @@ +//NOTE: This is an interface to a function for the local coordinate system creation. + + +#include "GEOM_Function.hxx" + +#define CS_ARG_O_X 1 +#define CS_ARG_O_Y 2 +#define CS_ARG_O_Z 3 + +#define CS_ARG_X_DX 4 +#define CS_ARG_X_DY 5 +#define CS_ARG_X_DZ 6 + +#define CS_ARG_Y_DX 7 +#define CS_ARG_Y_DY 8 +#define CS_ARG_Y_DZ 9 + +class GEOMImpl_IMarker +{ + public: + + GEOMImpl_IMarker(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetOrigin (const double theX, const double theY, const double theZ) + { + _func->SetReal(CS_ARG_O_X, theX); + _func->SetReal(CS_ARG_O_Y, theY); + _func->SetReal(CS_ARG_O_Z, theZ); + } + + void SetXDir (const double theDX, const double theDY, const double theDZ) + { + _func->SetReal(CS_ARG_X_DX, theDX); + _func->SetReal(CS_ARG_X_DY, theDY); + _func->SetReal(CS_ARG_X_DZ, theDZ); + } + + void SetYDir (const double theDX, const double theDY, const double theDZ) + { + _func->SetReal(CS_ARG_Y_DX, theDX); + _func->SetReal(CS_ARG_Y_DY, theDY); + _func->SetReal(CS_ARG_Y_DZ, theDZ); + } + + void GetOrigin (double& theX, double& theY, double& theZ) + { + theX = _func->GetReal(CS_ARG_O_X); + theY = _func->GetReal(CS_ARG_O_Y); + theZ = _func->GetReal(CS_ARG_O_Z); + } + + void GetXDir (double& theDX, double& theDY, double& theDZ) + { + theDX = _func->GetReal(CS_ARG_X_DX); + theDY = _func->GetReal(CS_ARG_X_DY); + theDZ = _func->GetReal(CS_ARG_X_DZ); + } + + void GetYDir (double& theDX, double& theDY, double& theDZ) + { + theDX = _func->GetReal(CS_ARG_Y_DX); + theDY = _func->GetReal(CS_ARG_Y_DY); + theDZ = _func->GetReal(CS_ARG_Y_DZ); + } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IMeasure.hxx b/src/GEOMImpl/GEOMImpl_IMeasure.hxx new file mode 100644 index 000000000..f5b07cc77 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IMeasure.hxx @@ -0,0 +1,22 @@ +// NOTE: This is an interface to a functions for the Measurement + + +#include "GEOM_Function.hxx" + +#define MEASURE_ARG_BASE 1 + +class GEOMImpl_IMeasure +{ + public: + + GEOMImpl_IMeasure(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetBase(Handle(GEOM_Function) theRefBase) + { _func->SetReference(MEASURE_ARG_BASE, theRefBase); } + + Handle(GEOM_Function) GetBase() { return _func->GetReference(MEASURE_ARG_BASE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx new file mode 100644 index 000000000..c6c4f1c00 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -0,0 +1,911 @@ +using namespace std; + +#include "GEOMImpl_IMeasureOperations.hxx" + +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_MeasureDriver.hxx" +#include "GEOMImpl_IMeasure.hxx" + +#include "GEOM_Function.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IMeasureOperations::~GEOMImpl_IMeasureOperations() +{ + MESSAGE("GEOMImpl_IMeasureOperations::~GEOMImpl_IMeasureOperations"); +} + + +//============================================================================= +/*! + * GetCentreOfMass + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetCentreOfMass + (Handle(GEOM_Object) theShape) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return NULL; + + //Add a new CentreOfMass object + Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GetDocID(), GEOM_CDG); + + //Add a new CentreOfMass function + Handle(GEOM_Function) aFunction = + aCDG->AddFunction(GEOMImpl_MeasureDriver::GetID(), CDG_MEASURE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MeasureDriver::GetID()) return NULL; + + GEOMImpl_IMeasure aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetBase(aRefShape); + + //Compute the CentreOfMass value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Measure driver failed to compute centre of mass"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCDG->GetEntry(), anEntry); + aDescr += anEntry + " = IMeasureOperations.MakeCentreOfMass("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCDG; +} + +//============================================================================= +/*! + * GetBasicProperties + */ +//============================================================================= +void GEOMImpl_IMeasureOperations::GetBasicProperties (Handle(GEOM_Object) theShape, + Standard_Real& theLength, + Standard_Real& theSurfArea, + Standard_Real& theVolume) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return; + } + + //Compute the parameters + GProp_GProps LProps, SProps; + try { + BRepGProp::LinearProperties(aShape, LProps); + theLength = LProps.Mass(); + + BRepGProp::SurfaceProperties(aShape, SProps); + theSurfArea = SProps.Mass(); + + theVolume = 0.0; + if (aShape.ShapeType() < TopAbs_SHELL) { + for (TopExp_Explorer Exp (aShape, TopAbs_SOLID); Exp.More(); Exp.Next()) { + GProp_GProps VProps; + BRepGProp::VolumeProperties(Exp.Current(), VProps); + theVolume += VProps.Mass(); + } + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return; + } + + SetErrorCode(OK); +} + +//============================================================================= +/*! + * GetInertia + */ +//============================================================================= +void GEOMImpl_IMeasureOperations::GetInertia + (Handle(GEOM_Object) theShape, + Standard_Real& I11, Standard_Real& I12, Standard_Real& I13, + Standard_Real& I21, Standard_Real& I22, Standard_Real& I23, + Standard_Real& I31, Standard_Real& I32, Standard_Real& I33, + Standard_Real& Ix , Standard_Real& Iy , Standard_Real& Iz) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return; + } + + //Compute the parameters + GProp_GProps System; + + try { + if (aShape.ShapeType() == TopAbs_VERTEX || + aShape.ShapeType() == TopAbs_EDGE || + aShape.ShapeType() == TopAbs_WIRE) { + BRepGProp::LinearProperties(aShape, System); + } else if (aShape.ShapeType() == TopAbs_FACE || + aShape.ShapeType() == TopAbs_SHELL) { + BRepGProp::SurfaceProperties(aShape, System); + } else { + BRepGProp::VolumeProperties(aShape, System); + } + gp_Mat I = System.MatrixOfInertia(); + + I11 = I(1,1); + I12 = I(1,2); + I13 = I(1,3); + + I21 = I(2,1); + I22 = I(2,2); + I23 = I(2,3); + + I31 = I(3,1); + I32 = I(3,2); + I33 = I(3,3); + + GProp_PrincipalProps Pr = System.PrincipalProperties(); + Pr.Moments(Ix,Iy,Iz); + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return; + } + + SetErrorCode(OK); +} + +//============================================================================= +/*! + * GetBoundingBox + */ +//============================================================================= +void GEOMImpl_IMeasureOperations::GetBoundingBox + (Handle(GEOM_Object) theShape, + Standard_Real& Xmin, Standard_Real& Xmax, + Standard_Real& Ymin, Standard_Real& Ymax, + Standard_Real& Zmin, Standard_Real& Zmax) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return; + } + + //Compute the parameters + Bnd_Box B; + + try { + BRepBndLib::Add(aShape, B); + B.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax); + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return; + } + + SetErrorCode(OK); +} + +//============================================================================= +/*! + * GetTolerance + */ +//============================================================================= +void GEOMImpl_IMeasureOperations::GetTolerance + (Handle(GEOM_Object) theShape, + Standard_Real& FaceMin, Standard_Real& FaceMax, + Standard_Real& EdgeMin, Standard_Real& EdgeMax, + Standard_Real& VertMin, Standard_Real& VertMax) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return; + } + + //Compute the parameters + Standard_Real T; + FaceMin = EdgeMin = VertMin = RealLast(); + FaceMax = EdgeMax = VertMax = -RealLast(); + + try { + for (TopExp_Explorer ExF (aShape, TopAbs_FACE); ExF.More(); ExF.Next()) { + TopoDS_Face Face = TopoDS::Face(ExF.Current()); + T = BRep_Tool::Tolerance(Face); + if (T > FaceMax) + FaceMax = T; + if (T < FaceMin) + FaceMin = T; + } + for (TopExp_Explorer ExE (aShape, TopAbs_EDGE); ExE.More(); ExE.Next()) { + TopoDS_Edge Edge = TopoDS::Edge(ExE.Current()); + T = BRep_Tool::Tolerance(Edge); + if (T > EdgeMax) + EdgeMax = T; + if (T < EdgeMin) + EdgeMin = T; + } + for (TopExp_Explorer ExV (aShape, TopAbs_VERTEX); ExV.More(); ExV.Next()) { + TopoDS_Vertex Vertex = TopoDS::Vertex(ExV.Current()); + T = BRep_Tool::Tolerance(Vertex); + if (T > VertMax) + VertMax = T; + if (T < VertMin) + VertMin = T; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return; + } + + SetErrorCode(OK); +} + +//============================================================================= +/*! + * CheckShape + */ +//============================================================================= +bool GEOMImpl_IMeasureOperations::CheckShape (Handle(GEOM_Object) theShape, + TCollection_AsciiString& theDump) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return false; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return false; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return false; + } + + //Compute the parameters + bool isValid = false; + try { + BRepCheck_Analyzer ana (aShape, false); + if (ana.IsValid()) { + theDump.Clear(); + isValid = true; + } else { + StructuralDump(ana, aShape, theDump); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return false; + } + + SetErrorCode(OK); + return isValid; +} + +//============================================================================= +/*! + * WhatIs + */ +//============================================================================= +TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object) theShape) +{ + SetErrorCode(KO); + + TCollection_AsciiString Astr; + + if (theShape.IsNull()) return Astr; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return Astr; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if (aShape.IsNull()) { + SetErrorCode("The Objects has NULL Shape"); + return Astr; + } + + //Compute the parameters + if (aShape.ShapeType() == TopAbs_EDGE) { + if (BRep_Tool::Degenerated(TopoDS::Edge(aShape))) { + Astr = Astr + " It is a degenerated edge \n"; + } + } + + Astr = Astr + " Number of sub-shapes : \n"; + + try { + int iType, nbTypes [TopAbs_SHAPE]; + for (iType = 0; iType < TopAbs_SHAPE; ++iType) + nbTypes[iType] = 0; + nbTypes[aShape.ShapeType()]++; + + TopTools_MapOfShape aMapOfShape; + aMapOfShape.Add(aShape); + TopTools_ListOfShape aListOfShape; + aListOfShape.Append(aShape); + + TopTools_ListIteratorOfListOfShape itL (aListOfShape); + for (; itL.More(); itL.Next()) { + TopoDS_Iterator it (itL.Value()); + for (; it.More(); it.Next()) { + TopoDS_Shape s = it.Value(); + if (aMapOfShape.Add(s)) { + aListOfShape.Append(s); + nbTypes[s.ShapeType()]++; + } + } + } + + Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbTypes[TopAbs_VERTEX]) + "\n"; + Astr = Astr + " EDGE : " + TCollection_AsciiString(nbTypes[TopAbs_EDGE]) + "\n"; + Astr = Astr + " WIRE : " + TCollection_AsciiString(nbTypes[TopAbs_WIRE]) + "\n"; + Astr = Astr + " FACE : " + TCollection_AsciiString(nbTypes[TopAbs_FACE]) + "\n"; + Astr = Astr + " SHELL : " + TCollection_AsciiString(nbTypes[TopAbs_SHELL]) + "\n"; + Astr = Astr + " SOLID : " + TCollection_AsciiString(nbTypes[TopAbs_SOLID]) + "\n"; + Astr = Astr + " COMPSOLID : " + TCollection_AsciiString(nbTypes[TopAbs_COMPSOLID]) + "\n"; + Astr = Astr + " COMPOUND : " + TCollection_AsciiString(nbTypes[TopAbs_COMPOUND]) + "\n"; + Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent()); + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return Astr; + } + + SetErrorCode(OK); + return Astr; +} + +//============================================================================= +/*! + * GetMinDistance + */ +//============================================================================= +Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance + (Handle(GEOM_Object) theShape1, Handle(GEOM_Object) theShape2, + Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, + Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2) +{ + SetErrorCode(KO); + Standard_Real MinDist = 1.e9; + + if (theShape1.IsNull() || theShape2.IsNull()) return MinDist; + + Handle(GEOM_Function) aRefShape1 = theShape1->GetLastFunction(); + Handle(GEOM_Function) aRefShape2 = theShape2->GetLastFunction(); + if (aRefShape1.IsNull() || aRefShape2.IsNull()) return MinDist; + + TopoDS_Shape aShape1 = aRefShape1->GetValue(); + TopoDS_Shape aShape2 = aRefShape2->GetValue(); + if (aShape1.IsNull() || aShape2.IsNull()) { + SetErrorCode("One of Objects has NULL Shape"); + return MinDist; + } + + //Compute the parameters + try { + BRepExtrema_DistShapeShape dst (aShape1, aShape2); + if (dst.IsDone()) { + gp_Pnt PMin1, PMin2, P1, P2; + + for (int i = 1; i <= dst.NbSolution(); i++) { + P1 = dst.PointOnShape1(i); + P2 = dst.PointOnShape2(i); + + Standard_Real Dist = P1.Distance(P2); + if (MinDist > Dist) { + MinDist = Dist; + PMin1 = P1; + PMin2 = P2; + } + } + + PMin1.Coord(X1, Y1, Z1); + PMin2.Coord(X2, Y2, Z2); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return MinDist; + } + + SetErrorCode(OK); + return MinDist; +} + +//======================================================================= +//function : PointCoordinates +//purpose : Get coordinates of point +//======================================================================= +void GEOMImpl_IMeasureOperations::PointCoordinates( Handle(GEOM_Object) theShape, + Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ ) +{ + SetErrorCode( KO ); + + if ( theShape.IsNull() ) + return; + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if ( aRefShape.IsNull() ) + return; + + TopoDS_Shape aShape = aRefShape->GetValue(); + if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX ) + { + SetErrorCode( "Shape must be a vertex" ); + return; + } + + try + { + gp_Pnt aPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape ) ); + theX = aPnt.X(); + theY = aPnt.Y(); + theZ = aPnt.Z(); + SetErrorCode( OK ); + } + catch ( Standard_Failure ) + { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode( aFail->GetMessageString() ); + } +} + +//======================================================================= +//function : StructuralDump +//purpose : Structural (data exchange) style of output. +//======================================================================= +void GEOMImpl_IMeasureOperations::StructuralDump (const BRepCheck_Analyzer& theAna, + const TopoDS_Shape& theShape, + TCollection_AsciiString& theDump) +{ + Standard_Integer i; + theDump.Clear(); + theDump += " -- The Shape has problems :\n"; + theDump += " Check Count\n"; + theDump += " ------------------------------------------------\n"; + + Standard_Integer last_stat = (Standard_Integer)BRepCheck_CheckFail; + Handle(TColStd_HArray1OfInteger) NbProblems = + new TColStd_HArray1OfInteger(1, last_stat); + for (i = 1; i <= last_stat; i++) + NbProblems->SetValue(i,0); + + Handle(TopTools_HSequenceOfShape) sl; + sl = new TopTools_HSequenceOfShape(); + TopTools_DataMapOfShapeListOfShape theMap; + theMap.Clear(); + GetProblemShapes(theAna, theShape, sl, NbProblems, theMap); + theMap.Clear(); + + Standard_Integer count = 0; + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidPointOnCurve); + if (count > 0) { + theDump += " Invalid Point on Curve ................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidPointOnCurveOnSurface); + if (count > 0) { + theDump += " Invalid Point on CurveOnSurface .......... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidPointOnSurface); + if (count > 0) { + theDump += " Invalid Point on Surface ................. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_No3DCurve); + if (count > 0) { + theDump += " No 3D Curve .............................. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_Multiple3DCurve); + if (count > 0) { + theDump += " Multiple 3D Curve ........................ "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_Invalid3DCurve); + if (count > 0) { + theDump += " Invalid 3D Curve ......................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_NoCurveOnSurface); + if (count > 0) { + theDump += " No Curve on Surface ...................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidCurveOnSurface); + if (count > 0) { + theDump += " Invalid Curve on Surface ................. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidCurveOnClosedSurface); + if (count > 0) { + theDump += " Invalid Curve on closed Surface .......... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidSameRangeFlag); + if (count > 0) { + theDump += " Invalid SameRange Flag ................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidSameParameterFlag); + if (count > 0) { + theDump += " Invalid SameParameter Flag ............... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidDegeneratedFlag); + if (count > 0) { + theDump += " Invalid Degenerated Flag ................. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_FreeEdge); + if (count > 0) { + theDump += " Free Edge ................................ "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidMultiConnexity); + if (count > 0) { + theDump += " Invalid MultiConnexity ................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidRange); + if (count > 0) { + theDump += " Invalid Range ............................ "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_EmptyWire); + if (count > 0) { + theDump += " Empty Wire ............................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_RedundantEdge); + if (count > 0) { + theDump += " Redundant Edge ........................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_SelfIntersectingWire); + if (count > 0) { + theDump += " Self Intersecting Wire ................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_NoSurface); + if (count > 0) { + theDump += " No Surface ............................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidWire); + if (count > 0) { + theDump += " Invalid Wire ............................. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_RedundantWire); + if (count > 0) { + theDump += " Redundant Wire ........................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_IntersectingWires); + if (count > 0) { + theDump += " Intersecting Wires ....................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_InvalidImbricationOfWires); + if (count > 0) { + theDump += " Invalid Imbrication of Wires ............. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_EmptyShell); + if (count > 0) { + theDump += " Empty Shell .............................. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_RedundantFace); + if (count > 0) { + theDump += " Redundant Face ........................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_UnorientableShape); + if (count > 0) { + theDump += " Unorientable Shape ....................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_NotClosed); + if (count > 0) { + theDump += " Not Closed ............................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_NotConnected); + if (count > 0) { + theDump += " Not Connected ............................ "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_SubshapeNotInShape); + if (count > 0) { + theDump += " Subshape not in Shape .................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_BadOrientation); + if (count > 0) { + theDump += " Bad Orientation .......................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_BadOrientationOfSubshape); + if (count > 0) { + theDump += " Bad Orientation of Subshape .............. "; + theDump += TCollection_AsciiString(count) + "\n"; + } + count = NbProblems->Value((Standard_Integer)BRepCheck_CheckFail); + if (count > 0) { + theDump += " checkshape failure ....................... "; + theDump += TCollection_AsciiString(count) + "\n"; + } + + theDump += " ------------------------------------------------\n"; + theDump += "*** Shapes with problems : "; + theDump += TCollection_AsciiString(sl->Length()) + "\n"; + + Standard_Integer nbv, nbe, nbw, nbf, nbs, nbo; + nbv = nbe = nbw = nbf = nbs = nbo = 0; + + for (i = 1; i <= sl->Length(); i++) { + TopoDS_Shape shi = sl->Value(i); + TopAbs_ShapeEnum sti = shi.ShapeType(); + switch (sti) { + case TopAbs_VERTEX : nbv++; break; + case TopAbs_EDGE : nbe++; break; + case TopAbs_WIRE : nbw++; break; + case TopAbs_FACE : nbf++; break; + case TopAbs_SHELL : nbs++; break; + case TopAbs_SOLID : nbo++; break; + default : break; + } + } + + if (nbv > 0) { + theDump += "VERTEX : "; + if (nbv < 10) theDump += " "; + theDump += TCollection_AsciiString(nbv) + "\n"; + } + if (nbe > 0) { + theDump += "EDGE : "; + if (nbe < 10) theDump += " "; + theDump += TCollection_AsciiString(nbe) + "\n"; + } + if (nbw > 0) { + theDump += "WIRE : "; + if (nbw < 10) theDump += " "; + theDump += TCollection_AsciiString(nbw) + "\n"; + } + if (nbf > 0) { + theDump += "FACE : "; + if (nbf < 10) theDump += " "; + theDump += TCollection_AsciiString(nbf) + "\n"; + } + if (nbs > 0) { + theDump += "SHELL : "; + if (nbs < 10) theDump += " "; + theDump += TCollection_AsciiString(nbs) + "\n"; + } + if (nbo > 0) { + theDump += "SOLID : "; + if (nbo < 10) theDump += " "; + theDump += TCollection_AsciiString(nbo) + "\n"; + } +} + +//======================================================================= +//function : GetProblemShapes +// purpose : for StructuralDump +//======================================================================= +void GEOMImpl_IMeasureOperations::GetProblemShapes (const BRepCheck_Analyzer& theAna, + const TopoDS_Shape& theShape, + Handle(TopTools_HSequenceOfShape)& sl, + Handle(TColStd_HArray1OfInteger)& NbProblems, + TopTools_DataMapOfShapeListOfShape& theMap) +{ + for (TopoDS_Iterator iter(theShape); iter.More(); iter.Next()) { + GetProblemShapes(theAna, iter.Value(), sl, NbProblems, theMap); + } + TopAbs_ShapeEnum styp = theShape.ShapeType(); + BRepCheck_ListIteratorOfListOfStatus itl; + if (!theMap.IsBound(theShape)) { + theMap.Bind(theShape,TopTools_ListOfShape()); + + if (!theAna.Result(theShape).IsNull()) { + itl.Initialize(theAna.Result(theShape)->Status()); + // !!! May be, we have to print all the problems, not only the first one ? + if (itl.Value() != BRepCheck_NoError) { + sl->Append(theShape); + BRepCheck_Status stat = itl.Value(); + NbProblems->SetValue((Standard_Integer)stat, + NbProblems->Value((Standard_Integer)stat) + 1); + } + } + } + + switch (styp) { + case TopAbs_EDGE: + GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_VERTEX, theMap); + break; + case TopAbs_FACE: + GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_WIRE, theMap); + GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_EDGE, theMap); + GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_VERTEX, theMap); + break; + case TopAbs_SHELL: + break; + case TopAbs_SOLID: + GetProblemSub(theAna, theShape, sl, NbProblems, TopAbs_SHELL, theMap); + break; + default: + break; + } +} + +//======================================================================= +//function : Contains +//======================================================================= +static Standard_Boolean Contains (const TopTools_ListOfShape& L, + const TopoDS_Shape& S) +{ + TopTools_ListIteratorOfListOfShape it; + for (it.Initialize(L); it.More(); it.Next()) { + if (it.Value().IsSame(S)) { + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +//function : GetProblemSub +// purpose : for StructuralDump +//======================================================================= +void GEOMImpl_IMeasureOperations::GetProblemSub (const BRepCheck_Analyzer& theAna, + const TopoDS_Shape& theShape, + Handle(TopTools_HSequenceOfShape)& sl, + Handle(TColStd_HArray1OfInteger)& NbProblems, + const TopAbs_ShapeEnum Subtype, + TopTools_DataMapOfShapeListOfShape& theMap) +{ + BRepCheck_ListIteratorOfListOfStatus itl; + TopExp_Explorer exp; + for (exp.Init(theShape, Subtype); exp.More(); exp.Next()) { + const TopoDS_Shape& sub = exp.Current(); + + const Handle(BRepCheck_Result)& res = theAna.Result(sub); + for (res->InitContextIterator(); + res->MoreShapeInContext(); + res->NextShapeInContext()) { + if (res->ContextualShape().IsSame(theShape) && !Contains(theMap(sub), theShape)) { + theMap(sub).Append(theShape); + itl.Initialize(res->StatusOnShape()); + + if (itl.Value() != BRepCheck_NoError) { + Standard_Integer ii = 0; + + for (ii = 1; ii <= sl->Length(); ii++) + if (sl->Value(ii).IsSame(sub)) break; + + if (ii > sl->Length()) { + sl->Append(sub); + BRepCheck_Status stat = itl.Value(); + NbProblems->SetValue((Standard_Integer)stat, + NbProblems->Value((Standard_Integer)stat) + 1); + } + for (ii = 1; ii <= sl->Length(); ii++) + if (sl->Value(ii).IsSame(theShape)) break; + if (ii > sl->Length()) { + sl->Append(theShape); + BRepCheck_Status stat = itl.Value(); + NbProblems->SetValue((Standard_Integer)stat, + NbProblems->Value((Standard_Integer)stat) + 1); + } + } + break; + } + } + } +} diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx new file mode 100644 index 000000000..9193fb91b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx @@ -0,0 +1,74 @@ + +#ifndef _GEOMImpl_IMeasureOperations_HXX_ +#define _GEOMImpl_IMeasureOperations_HXX_ + +#include "GEOM_IOperations.hxx" + +#include +#include +#include +#include + +class GEOM_Engine; +class Handle(GEOM_Object); + +class GEOMImpl_IMeasureOperations : public GEOM_IOperations { + public: + GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IMeasureOperations(); + + Handle(GEOM_Object) GetCentreOfMass (Handle(GEOM_Object) theShape); + + void GetBasicProperties (Handle(GEOM_Object) theShape, + Standard_Real& theLength, + Standard_Real& theSurfArea, + Standard_Real& theVolume); + + void GetInertia (Handle(GEOM_Object) theShape, + Standard_Real& I11, Standard_Real& I12, Standard_Real& I13, + Standard_Real& I21, Standard_Real& I22, Standard_Real& I23, + Standard_Real& I31, Standard_Real& I32, Standard_Real& I33, + Standard_Real& Ix , Standard_Real& Iy , Standard_Real& Iz); + + void GetBoundingBox (Handle(GEOM_Object) theShape, + Standard_Real& Xmin, Standard_Real& Xmax, + Standard_Real& Ymin, Standard_Real& Ymax, + Standard_Real& Zmin, Standard_Real& Zmax); + + void GetTolerance (Handle(GEOM_Object) theShape, + Standard_Real& FaceMin, Standard_Real& FaceMax, + Standard_Real& EdgeMin, Standard_Real& EdgeMax, + Standard_Real& VertMin, Standard_Real& VertMax); + + bool CheckShape (Handle(GEOM_Object) theShape, + TCollection_AsciiString& theDump); + + TCollection_AsciiString WhatIs (Handle(GEOM_Object) theShape); + + Standard_Real GetMinDistance (Handle(GEOM_Object) theShape1, Handle(GEOM_Object) theShape2, + Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, + Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2); + + void PointCoordinates( Handle(GEOM_Object) theShape, + Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ ); + + private: + void StructuralDump (const BRepCheck_Analyzer& theAna, + const TopoDS_Shape& theShape, + TCollection_AsciiString& theDump); + + void GetProblemShapes (const BRepCheck_Analyzer& theAna, + const TopoDS_Shape& theShape, + Handle(TopTools_HSequenceOfShape)& sl, + Handle(TColStd_HArray1OfInteger)& NbProblems, + TopTools_DataMapOfShapeListOfShape& theMap); + + void GetProblemSub (const BRepCheck_Analyzer& theAna, + const TopoDS_Shape& theShape, + Handle(TopTools_HSequenceOfShape)& sl, + Handle(TColStd_HArray1OfInteger)& NbProblems, + const TopAbs_ShapeEnum Subtype, + TopTools_DataMapOfShapeListOfShape& theMap); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_IMirror.hxx b/src/GEOMImpl/GEOMImpl_IMirror.hxx new file mode 100644 index 000000000..dcaff0d19 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IMirror.hxx @@ -0,0 +1,30 @@ +//NOTE: This is an intreface to a function for the Mirror creation. + + +#include "GEOM_Function.hxx" + +#define MIRROR_ARG_ORIGINAL 1 +#define MIRROR_ARG_PLANE 2 +#define MIRROR_ARG_AXIS 3 +#define MIRROR_ARG_POINT 4 + +class GEOMImpl_IMirror +{ + public: + + GEOMImpl_IMirror(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetOriginal(Handle(GEOM_Function) theShape) { _func->SetReference(MIRROR_ARG_ORIGINAL, theShape); } + void SetPlane (Handle(GEOM_Function) thePlane) { _func->SetReference(MIRROR_ARG_PLANE, thePlane); } + void SetAxis (Handle(GEOM_Function) theAxis ) { _func->SetReference(MIRROR_ARG_AXIS , theAxis ); } + void SetPoint (Handle(GEOM_Function) thePoint) { _func->SetReference(MIRROR_ARG_POINT, thePoint); } + + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(MIRROR_ARG_ORIGINAL); } + Handle(GEOM_Function) GetPlane() { return _func->GetReference(MIRROR_ARG_PLANE); } + Handle(GEOM_Function) GetAxis () { return _func->GetReference(MIRROR_ARG_AXIS ); } + Handle(GEOM_Function) GetPoint() { return _func->GetReference(MIRROR_ARG_POINT); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IOffset.hxx b/src/GEOMImpl/GEOMImpl_IOffset.hxx new file mode 100644 index 000000000..91434247c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IOffset.hxx @@ -0,0 +1,26 @@ +//NOTE: This is an intreface to a function for the Offset creation. + + +#include "GEOM_Function.hxx" + +#define OFF_ARG_SHAPE 1 +#define OFF_ARG_VALUE 2 + +class GEOMImpl_IOffset +{ + public: + + GEOMImpl_IOffset(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(OFF_ARG_SHAPE, theShape); } + + Handle(GEOM_Function) GetShape() { return _func->GetReference(OFF_ARG_SHAPE); } + + void SetValue(double theValue) { _func->SetReal(OFF_ARG_VALUE, theValue); } + + double GetValue() { return _func->GetReal(OFF_ARG_VALUE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPartition.hxx b/src/GEOMImpl/GEOMImpl_IPartition.hxx new file mode 100644 index 000000000..d89e7796f --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPartition.hxx @@ -0,0 +1,63 @@ +//NOTE: This is an intreface to a function for the Partition creation. + + +#include "GEOM_Function.hxx" + +#include "TColStd_HSequenceOfTransient.hxx" +#include "TColStd_HArray1OfInteger.hxx" + +#define PART_ARG_LIMIT 1 +#define PART_ARG_SHAPES 2 +#define PART_ARG_TOOLS 3 +#define PART_ARG_KEEP_IN 4 +#define PART_ARG_REM_IN 5 + +#define PART_ARG_MATERIALS 6 + +#define PART_ARG_SHAPE 7 +#define PART_ARG_PLANE 8 + +class GEOMImpl_IPartition +{ + public: + + GEOMImpl_IPartition(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetLimit(int theLimit) { _func->SetInteger(PART_ARG_LIMIT, theLimit); } + + void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes) + { _func->SetReferenceList(PART_ARG_SHAPES, theShapes); } + + void SetTools(const Handle(TColStd_HSequenceOfTransient)& theShapes) + { _func->SetReferenceList(PART_ARG_TOOLS, theShapes); } + + void SetKeepIns(const Handle(TColStd_HSequenceOfTransient)& theShapes) + { _func->SetReferenceList(PART_ARG_KEEP_IN, theShapes); } + + void SetRemoveIns(const Handle(TColStd_HSequenceOfTransient)& theShapes) + { _func->SetReferenceList(PART_ARG_REM_IN, theShapes); } + + void SetMaterials(const Handle(TColStd_HArray1OfInteger)& theMaterials) + { _func->SetIntegerArray(PART_ARG_MATERIALS, theMaterials); } + + + int GetLimit() { return _func->GetInteger(PART_ARG_LIMIT); } + + Handle(TColStd_HSequenceOfTransient) GetShapes() { return _func->GetReferenceList(PART_ARG_SHAPES); } + Handle(TColStd_HSequenceOfTransient) GetTools() { return _func->GetReferenceList(PART_ARG_TOOLS); } + Handle(TColStd_HSequenceOfTransient) GetKeepIns() { return _func->GetReferenceList(PART_ARG_KEEP_IN); } + Handle(TColStd_HSequenceOfTransient) GetRemoveIns() { return _func->GetReferenceList(PART_ARG_REM_IN); } + + Handle(TColStd_HArray1OfInteger) GetMaterials() { return _func->GetIntegerArray(PART_ARG_MATERIALS); } + + + void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(PART_ARG_SHAPE, theShape); } + void SetPlane(Handle(GEOM_Function) thePlane) { _func->SetReference(PART_ARG_PLANE, thePlane); } + + Handle(GEOM_Function) GetShape() { return _func->GetReference(PART_ARG_SHAPE); } + Handle(GEOM_Function) GetPlane() { return _func->GetReference(PART_ARG_PLANE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPipe.hxx b/src/GEOMImpl/GEOMImpl_IPipe.hxx new file mode 100644 index 000000000..4c104c5d4 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPipe.hxx @@ -0,0 +1,24 @@ +//NOTE: This is an intreface to a function for the Pipe creation. + + +#include "GEOM_Function.hxx" + +#define PIPE_ARG_BASE 1 +#define PIPE_ARG_PATH 2 + +class GEOMImpl_IPipe +{ + public: + + GEOMImpl_IPipe(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetBase (Handle(GEOM_Function) theBase) { _func->SetReference(PIPE_ARG_BASE, theBase); } + void SetPath (Handle(GEOM_Function) thePath) { _func->SetReference(PIPE_ARG_PATH, thePath); } + + Handle(GEOM_Function) GetBase() { return _func->GetReference(PIPE_ARG_BASE); } + Handle(GEOM_Function) GetPath() { return _func->GetReference(PIPE_ARG_PATH); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPlane.hxx b/src/GEOMImpl/GEOMImpl_IPlane.hxx new file mode 100644 index 000000000..2353decb1 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPlane.hxx @@ -0,0 +1,47 @@ +//NOTE: This is an intreface to a function for the vector creation. + + +#include "GEOM_Function.hxx" + +#define PLN_ARG_SIZE 1 + +#define PLN_ARG_PNT1 2 +#define PLN_ARG_PNT2 3 +#define PLN_ARG_PNT3 4 + +#define PLN_ARG_VEC 5 + +#define PLN_ARG_REF 6 + +class GEOMImpl_IPlane +{ + public: + + GEOMImpl_IPlane(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetSize(double theSize) { _func->SetReal(PLN_ARG_SIZE, theSize); } + + double GetSize() { return _func->GetReal(PLN_ARG_SIZE); } + + void SetPoint (Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT1, theRef); } + void SetVector(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_VEC , theRef); } + + void SetFace (Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_REF , theRef); } + + void SetPoint1(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT1, theRef); } + void SetPoint2(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT2, theRef); } + void SetPoint3(Handle(GEOM_Function) theRef) { _func->SetReference(PLN_ARG_PNT3, theRef); } + + Handle(GEOM_Function) GetPoint () { return _func->GetReference(PLN_ARG_PNT1); } + Handle(GEOM_Function) GetVector() { return _func->GetReference(PLN_ARG_VEC ); } + + Handle(GEOM_Function) GetFace () { return _func->GetReference(PLN_ARG_REF ); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(PLN_ARG_PNT1); } + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(PLN_ARG_PNT2); } + Handle(GEOM_Function) GetPoint3() { return _func->GetReference(PLN_ARG_PNT3); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPoint.hxx b/src/GEOMImpl/GEOMImpl_IPoint.hxx new file mode 100755 index 000000000..61c424e0e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPoint.hxx @@ -0,0 +1,44 @@ +//NOTE: This is an intreface to a function for the point creation. + + +#include "GEOM_Function.hxx" + +#define ARG_X 1 +#define ARG_Y 2 +#define ARG_Z 3 + +#define ARG_REF 4 + +#define ARG_PARAM 5 +#define ARG_CURVE 6 + +class GEOMImpl_IPoint +{ + public: + + GEOMImpl_IPoint(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetX(double theX) { _func->SetReal(ARG_X, theX); } + void SetY(double theY) { _func->SetReal(ARG_Y, theY); } + void SetZ(double theZ) { _func->SetReal(ARG_Z, theZ); } + + double GetX() { return _func->GetReal(ARG_X); } + double GetY() { return _func->GetReal(ARG_Y); } + double GetZ() { return _func->GetReal(ARG_Z); } + + void SetRef(Handle(GEOM_Function) theRefPoint) { _func->SetReference(ARG_REF, theRefPoint); } + + Handle(GEOM_Function) GetRef() { return _func->GetReference(ARG_REF); } + + void SetCurve(Handle(GEOM_Function) theRef) { _func->SetReference(ARG_CURVE, theRef); } + + Handle(GEOM_Function) GetCurve() { return _func->GetReference(ARG_CURVE); } + + void SetParameter(double theParam) { _func->SetReal(ARG_PARAM, theParam); } + + double GetParameter() { return _func->GetReal(ARG_PARAM); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPolyline.hxx b/src/GEOMImpl/GEOMImpl_IPolyline.hxx new file mode 100644 index 000000000..89f424823 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPolyline.hxx @@ -0,0 +1,26 @@ +//NOTE: This is an intreface to a function for the Polyline creation. + + +#include "GEOM_Function.hxx" + +#define POLY_ARG_LENG 1 +#define POLY_ARG_LAST 1 + +class GEOMImpl_IPolyline +{ + public: + + GEOMImpl_IPolyline(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetLength(int theLen) { _func->SetInteger(POLY_ARG_LENG, theLen); } + + void SetPoint(int theId, Handle(GEOM_Function) theP) { _func->SetReference(POLY_ARG_LAST + theId, theP); } + + int GetLength() { return _func->GetInteger(POLY_ARG_LENG); } + + Handle(GEOM_Function) GetPoint(int theId) { return _func->GetReference(POLY_ARG_LAST + theId); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPosition.hxx b/src/GEOMImpl/GEOMImpl_IPosition.hxx new file mode 100644 index 000000000..1e745a7c2 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPosition.hxx @@ -0,0 +1,33 @@ +//NOTE: This is an intreface to a function for the Setting In Position. + + +#include "GEOM_Function.hxx" + +#define POSITION_ARG_SHAPE 1 +#define POSITION_ARG_START_LCS 2 +#define POSITION_ARG_END_LCS 3 + +class GEOMImpl_IPosition +{ + public: + + GEOMImpl_IPosition(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(POSITION_ARG_SHAPE, theShape); } + + Handle(GEOM_Function) GetShape() { return _func->GetReference(POSITION_ARG_SHAPE); } + + void SetStartLCS(Handle(GEOM_Function) theStartLCS) + { _func->SetReference(POSITION_ARG_START_LCS, theStartLCS); } + + Handle(GEOM_Function) GetStartLCS() { return _func->GetReference(POSITION_ARG_START_LCS); } + + void SetEndLCS(Handle(GEOM_Function) theEndLCS) + { _func->SetReference(POSITION_ARG_END_LCS, theEndLCS); } + + Handle(GEOM_Function) GetEndLCS() { return _func->GetReference(POSITION_ARG_END_LCS); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IPrism.hxx b/src/GEOMImpl/GEOMImpl_IPrism.hxx new file mode 100644 index 000000000..a3da6d399 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IPrism.hxx @@ -0,0 +1,35 @@ +//NOTE: This is an intreface to a function for the Prism creation. + + +#include "GEOM_Function.hxx" + +#define PRISM_ARG_H 1 +#define PRISM_ARG_VEC 2 +#define PRISM_ARG_BASE 3 +#define PRISM_ARG_PNT_F 4 +#define PRISM_ARG_PNT_L 5 + +class GEOMImpl_IPrism +{ + public: + + GEOMImpl_IPrism(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetBase (Handle(GEOM_Function) theRefBase ) { _func->SetReference(PRISM_ARG_BASE, theRefBase); } + void SetVector(Handle(GEOM_Function) theRefVector) { _func->SetReference(PRISM_ARG_VEC , theRefVector); } + void SetFirstPoint(Handle(GEOM_Function) thePoint) { _func->SetReference(PRISM_ARG_PNT_F, thePoint); } + void SetLastPoint (Handle(GEOM_Function) thePoint) { _func->SetReference(PRISM_ARG_PNT_L, thePoint); } + + Handle(GEOM_Function) GetBase () { return _func->GetReference(PRISM_ARG_BASE); } + Handle(GEOM_Function) GetVector() { return _func->GetReference(PRISM_ARG_VEC ); } + Handle(GEOM_Function) GetFirstPoint() { return _func->GetReference(PRISM_ARG_PNT_F ); } + Handle(GEOM_Function) GetLastPoint () { return _func->GetReference(PRISM_ARG_PNT_L ); } + + void SetH(double theH) { _func->SetReal(PRISM_ARG_H, theH); } + + double GetH() { return _func->GetReal(PRISM_ARG_H); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IRevolution.hxx b/src/GEOMImpl/GEOMImpl_IRevolution.hxx new file mode 100644 index 000000000..e630a6282 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IRevolution.hxx @@ -0,0 +1,31 @@ +//NOTE: This is an intreface to a function for the Revolution creation. + + +#include "GEOM_Function.hxx" + +#define REVOL_ARG_ANGLE 1 +#define REVOL_ARG_AXIS 2 +#define REVOL_ARG_BASE 3 + +class GEOMImpl_IRevolution +{ + public: + + GEOMImpl_IRevolution(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetAngle(double theAngle) { _func->SetReal(REVOL_ARG_ANGLE, theAngle); } + + double GetAngle() { return _func->GetReal(REVOL_ARG_ANGLE); } + + void SetAxis(Handle(GEOM_Function) theRefAxis) { _func->SetReference(REVOL_ARG_AXIS, theRefAxis); } + + Handle(GEOM_Function) GetAxis() { return _func->GetReference(REVOL_ARG_AXIS); } + + void SetBase(Handle(GEOM_Function) theRefBase) { _func->SetReference(REVOL_ARG_BASE, theRefBase); } + + Handle(GEOM_Function) GetBase() { return _func->GetReference(REVOL_ARG_BASE); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IRotate.hxx b/src/GEOMImpl/GEOMImpl_IRotate.hxx new file mode 100644 index 000000000..8b38e4dd8 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IRotate.hxx @@ -0,0 +1,47 @@ +//NOTE: This is an intreface to a function for the Rotate operation. + + +#include "GEOM_Function.hxx" + +#define ROTATE_ANGLE 1 +#define ROTATE_AXIS 2 +#define ROTATE_ORGN 3 +#define ROTATE_STEP1 4 +#define ROTATE_NBITER1 5 +#define ROTATE_NBITER2 6 + +class GEOMImpl_IRotate +{ + public: + + GEOMImpl_IRotate(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetAngle(Standard_Real theAngle) { _func->SetReal(ROTATE_ANGLE, theAngle); } + + Standard_Real GetAngle() { return _func->GetReal(ROTATE_ANGLE); } + + void SetAxis(Handle(GEOM_Function) theVector) { _func->SetReference(ROTATE_AXIS, theVector); } + + Handle(GEOM_Function) GetAxis() { return _func->GetReference(ROTATE_AXIS); } + + void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(ROTATE_ORGN, theOriginal); } + + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(ROTATE_ORGN); } + + void SetStep(double theStep) { return _func->SetReal(ROTATE_STEP1, theStep); } + + double GetStep() { return _func->GetReal(ROTATE_STEP1); } + + void SetNbIter1(int theNbIter) { _func->SetInteger(ROTATE_NBITER1, theNbIter); } + + int GetNbIter1() { return _func->GetInteger(ROTATE_NBITER1); } + + void SetNbIter2(int theNbIter) { _func->SetInteger(ROTATE_NBITER2, theNbIter); } + + int GetNbIter2() { return _func->GetInteger(ROTATE_NBITER2); } + + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IScale.hxx b/src/GEOMImpl/GEOMImpl_IScale.hxx new file mode 100644 index 000000000..15905e7d1 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IScale.hxx @@ -0,0 +1,31 @@ +//NOTE: This is an intreface to a function for the Scale creation. + + +#include "GEOM_Function.hxx" + +#define SCALE_ARG_SHAPE 1 +#define SCALE_ARG_VALUE 2 +#define SCALE_ARG_POINT 3 + +class GEOMImpl_IScale +{ + public: + + GEOMImpl_IScale(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShape(Handle(GEOM_Function) theShape) { _func->SetReference(SCALE_ARG_SHAPE, theShape); } + + Handle(GEOM_Function) GetShape() { return _func->GetReference(SCALE_ARG_SHAPE); } + + void SetFactor(double theValue) { _func->SetReal(SCALE_ARG_VALUE, theValue); } + + double GetFactor() { return _func->GetReal(SCALE_ARG_VALUE); } + + void SetPoint(Handle(GEOM_Function) thePoint) { _func->SetReference(SCALE_ARG_POINT, thePoint); } + + Handle(GEOM_Function) GetPoint() { return _func->GetReference(SCALE_ARG_POINT); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IShapes.hxx b/src/GEOMImpl/GEOMImpl_IShapes.hxx new file mode 100644 index 000000000..64845e7d8 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IShapes.hxx @@ -0,0 +1,55 @@ +// NOTE: This is an intreface to a function for the Shapes +// (Wire, Face, Shell, Solid and Compound) creation. + + +#include "GEOM_Function.hxx" + +#include "TColStd_HSequenceOfTransient.hxx" +#include "TColStd_HArray1OfInteger.hxx" + +#define SHAPE_ARG_SHAPES 1 // for Wire, Shell, Solid and Compound + +#define SHAPE_ARG_BASE 2 // for Face, Solid and Sub-shape + +#define SHAPE_ARG_PLANAR 3 // for Face + +#define SHAPE_ARG_SUBTYPE 4 // for Sub-shape +#define SHAPE_ARG_INDICES 5 // for Sub-shape + +class GEOMImpl_IShapes +{ + public: + + GEOMImpl_IShapes(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetShapes(const Handle(TColStd_HSequenceOfTransient)& theShapes) + { _func->SetReferenceList(SHAPE_ARG_SHAPES, theShapes); } + + Handle(TColStd_HSequenceOfTransient) GetShapes() + { return _func->GetReferenceList(SHAPE_ARG_SHAPES); } + + void SetBase(Handle(GEOM_Function) theRefBase) + { _func->SetReference(SHAPE_ARG_BASE, theRefBase); } + + Handle(GEOM_Function) GetBase() { return _func->GetReference(SHAPE_ARG_BASE); } + + void SetIsPlanar(const Standard_Boolean isPlanarWanted) + { _func->SetInteger(SHAPE_ARG_PLANAR, isPlanarWanted ? 1 : 0); } + + Standard_Boolean GetIsPlanar() { return (_func->GetInteger(SHAPE_ARG_PLANAR) == 1); } + + void SetSubShapeType(const Standard_Integer theType) + { _func->SetInteger(SHAPE_ARG_SUBTYPE, theType); } + + Standard_Integer GetSubShapeType() { return _func->GetInteger(SHAPE_ARG_SUBTYPE); } + + void SetIndices(const Handle(TColStd_HArray1OfInteger)& theIndices) + { _func->SetIntegerArray(SHAPE_ARG_INDICES, theIndices); } + + Handle(TColStd_HArray1OfInteger) GetIndices() + { return _func->GetIntegerArray(SHAPE_ARG_INDICES); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx new file mode 100644 index 000000000..ee637328b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.cxx @@ -0,0 +1,821 @@ +using namespace std; + +#include "GEOMImpl_IShapesOperations.hxx" + +#include "GEOMImpl_Types.hxx" + +#include "GEOMImpl_VectorDriver.hxx" +#include "GEOMImpl_ShapeDriver.hxx" +#include "GEOMImpl_CopyDriver.hxx" +#include "GEOMImpl_GlueDriver.hxx" + +#include "GEOMImpl_IVector.hxx" +#include "GEOMImpl_IShapes.hxx" +#include "GEOMImpl_IGlue.hxx" + +#include "GEOM_Function.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOMImpl_IShapesOperations::~GEOMImpl_IShapesOperations() +{ + MESSAGE("GEOMImpl_IShapesOperations::~GEOMImpl_IShapesOperations"); +} + + +//============================================================================= +/*! + * MakeEdge + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdge + (Handle(GEOM_Object) thePnt1, Handle(GEOM_Object) thePnt2) +{ + SetErrorCode(KO); + + if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL; + + //Add a new Edge object + Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE); + + //Add a new Vector function + Handle(GEOM_Function) aFunction = + anEdge->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TWO_PNT); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_VectorDriver::GetID()) return NULL; + + GEOMImpl_IVector aPI (aFunction); + + Handle(GEOM_Function) aRef1 = thePnt1->GetLastFunction(); + Handle(GEOM_Function) aRef2 = thePnt2->GetLastFunction(); + if (aRef1.IsNull() || aRef2.IsNull()) return NULL; + + aPI.SetPoint1(aRef1); + aPI.SetPoint2(aRef2); + + //Compute the Edge value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Vector driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(anEdge->GetEntry(), anEntry); + aDescr += (anEntry+" = IShapesOperations.MakeEdge("); + TDF_Tool::Entry(thePnt1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePnt2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return anEdge; +} + +//============================================================================= +/*! + * MakeWire + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeWire + (list theShapes) +{ + return MakeShape(theShapes, GEOM_WIRE, WIRE_EDGES, "MakeWire"); +} + +//============================================================================= +/*! + * MakeFace + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) theWire, + const bool isPlanarWanted) +{ + SetErrorCode(KO); + + if (theWire.IsNull()) return NULL; + + //Add a new Face object + Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE); + + //Add a new Shape function for creation of a face from a wire + Handle(GEOM_Function) aFunction = + aFace->AddFunction(GEOMImpl_ShapeDriver::GetID(), FACE_WIRE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL; + + GEOMImpl_IShapes aCI (aFunction); + + Handle(GEOM_Function) aRefWire = theWire->GetLastFunction(); + + if (aRefWire.IsNull()) return NULL; + + aCI.SetBase(aRefWire); + aCI.SetIsPlanar(isPlanarWanted); + + //Compute the Face value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Shape driver failed to compute a face"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aFace->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IShapesOperations.MakeFace("; + TDF_Tool::Entry(theWire->GetEntry(), anEntry); + aDescr += anEntry; + if (isPlanarWanted) + aDescr += ", 1)"; + + else + aDescr += ", 0)"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aFace; +} + +//============================================================================= +/*! + * MakeFaceWires + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires + (list theShapes, bool isPlanarWanted) +{ + SetErrorCode(KO); + + //Add a new object + Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE); + + //Add a new function + Handle(GEOM_Function) aFunction = + aShape->AddFunction(GEOMImpl_ShapeDriver::GetID(), FACE_WIRES); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL; + + GEOMImpl_IShapes aCI (aFunction); + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + + // Shapes + list::iterator it = theShapes.begin(); + for (; it != theShapes.end(); it++) { + Handle(GEOM_Function) aRefSh = (*it)->GetLastFunction(); + if (aRefSh.IsNull()) { + SetErrorCode("NULL argument shape for the face construction"); + return NULL; + } + aShapesSeq->Append(aRefSh); + } + aCI.SetShapes(aShapesSeq); + + aCI.SetIsPlanar(isPlanarWanted); + + //Compute the shape + try { + 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 + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aShape->GetEntry(), anEntry); + aDescr += (anEntry + " = IShapesOperations.MakeFaceWires(["); + // Shapes + it = theShapes.begin(); + if (it != theShapes.end()) { + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + it++; + aDescr += (anEntry+", "); + for (; it != theShapes.end(); it++) { + aDescr += ", "; + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + aDescr += anEntry; + } + } + if (isPlanarWanted) + aDescr += "], 1)"; + + else + aDescr += "], 0)"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aShape; +} + +//============================================================================= +/*! + * MakeShell + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShell + (list theShapes) +{ + return MakeShape(theShapes, GEOM_SHELL, SHELL_FACES, "MakeShell"); +} + +//============================================================================= +/*! + * MakeSolidShells + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidShells + (list theShapes) +{ + return MakeShape(theShapes, GEOM_SOLID, SOLID_SHELLS, "MakeSolidShells"); +} + +//============================================================================= +/*! + * MakeSolidShell + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidShell (Handle(GEOM_Object) theShell) +{ + SetErrorCode(KO); + + if (theShell.IsNull()) return NULL; + + //Add a new Solid object + Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID); + + //Add a new Solid function for creation of a solid from a shell + Handle(GEOM_Function) aFunction = + aSolid->AddFunction(GEOMImpl_ShapeDriver::GetID(), SOLID_SHELL); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL; + + GEOMImpl_IShapes aCI (aFunction); + + Handle(GEOM_Function) aRefShell = theShell->GetLastFunction(); + + if (aRefShell.IsNull()) return NULL; + + aCI.SetBase(aRefShell); + + //Compute the Solid value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Solid driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aSolid->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IShapesOperations.MakeSolidShell("; + TDF_Tool::Entry(theShell->GetEntry(), anEntry); + aDescr += (anEntry+")"); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aSolid; +} + +//============================================================================= +/*! + * MakeCompound + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeCompound + (list theShapes) +{ + return MakeShape(theShapes, GEOM_COMPOUND, COMPOUND_SHAPES, "MakeCompound"); +} + +//============================================================================= +/*! + * MakeShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape + (list theShapes, + const Standard_Integer theObjectType, + const Standard_Integer theFunctionType, + const TCollection_AsciiString theMethodName) +{ + SetErrorCode(KO); + + //Add a new object + Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), theObjectType); + + //Add a new function + Handle(GEOM_Function) aFunction = + aShape->AddFunction(GEOMImpl_ShapeDriver::GetID(), theFunctionType); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL; + + GEOMImpl_IShapes aCI (aFunction); + + Handle(TColStd_HSequenceOfTransient) aShapesSeq = new TColStd_HSequenceOfTransient; + + // Shapes + list::iterator it = theShapes.begin(); + for (; it != theShapes.end(); it++) { + Handle(GEOM_Function) aRefSh = (*it)->GetLastFunction(); + if (aRefSh.IsNull()) { + SetErrorCode("NULL argument shape for the shape construction"); + return NULL; + } + aShapesSeq->Append(aRefSh); + } + aCI.SetShapes(aShapesSeq); + + //Compute the shape + try { + 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 + TCollection_AsciiString anEntry, aDescr(""); + TDF_Tool::Entry(aShape->GetEntry(), anEntry); + aDescr += (anEntry + " = IShapesOperations."); + aDescr += (theMethodName + "(["); + // Shapes + it = theShapes.begin(); + if (it != theShapes.end()) { + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + it++; + aDescr += (anEntry+", "); + for (; it != theShapes.end(); it++) { + aDescr += ", "; + TDF_Tool::Entry((*it)->GetEntry(), anEntry); + aDescr += anEntry; + } + } + aDescr += "])"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aShape; +} + +//============================================================================= +/*! + * MakeGlueFaces + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeGlueFaces + (Handle(GEOM_Object) theShape, + const Standard_Real theTolerance) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return NULL; + + //Add a new Glued object + Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED); + + //Add a new Glue function + Handle(GEOM_Function) aFunction; + aFunction = aGlued->AddFunction(GEOMImpl_GlueDriver::GetID(), GLUE_FACES); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_GlueDriver::GetID()) return NULL; + + GEOMImpl_IGlue aCI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aCI.SetBase(aRefShape); + aCI.SetTolerance(theTolerance); + + //Compute the sub-shape value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Shape driver failed to glue faces"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aGlued->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IShapesOperations.MakeGlueFaces("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + aDescr += TCollection_AsciiString(theTolerance) + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aGlued; +} + +//============================================================================= +/*! + * MakeExplode + */ +//============================================================================= +Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode + (Handle(GEOM_Object) theShape, + const Standard_Integer theShapeType, + const Standard_Boolean isSorted) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return NULL; + TopoDS_Shape aShape = theShape->GetValue(); + if (aShape.IsNull()) return NULL; + + Handle(TColStd_HSequenceOfTransient) aSeq = new TColStd_HSequenceOfTransient; + Handle(GEOM_Object) anObj; + Handle(GEOM_Function) aFunction; + TopTools_MapOfShape mapShape; + TopTools_ListOfShape listShape; + + if (aShape.ShapeType() == TopAbs_COMPOUND && + (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE || + TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPSOLID || + TopAbs_ShapeEnum(theShapeType) == TopAbs_COMPOUND)) { + TopoDS_Iterator It (aShape, Standard_True, Standard_True); + for (; It.More(); It.Next()) { + if (mapShape.Add(It.Value())) { + if (TopAbs_ShapeEnum(theShapeType) == TopAbs_SHAPE || + TopAbs_ShapeEnum(theShapeType) == It.Value().ShapeType()) { + listShape.Append(It.Value()); + } + } + } + } else { + TopExp_Explorer exp (aShape, TopAbs_ShapeEnum(theShapeType)); + for (; exp.More(); exp.Next()) + if (mapShape.Add(exp.Current())) + listShape.Append(exp.Current()); + } + + if (listShape.IsEmpty()) { + SetErrorCode("The given shape has no sub-shapes of the requested type"); + return aSeq; + } + + if (isSorted) + SortShapes(listShape); + + TopTools_IndexedMapOfShape anIndices; + TopExp::MapShapes(aShape, anIndices); + Handle(TColStd_HArray1OfInteger) anArray; + + TopTools_ListIteratorOfListOfShape itSub (listShape); + TCollection_AsciiString anAsciiList = "[", anEntry; + for (int index = 1; itSub.More(); itSub.Next(), ++index) { + TopoDS_Shape aValue = itSub.Value(); + anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, anIndices.FindIndex(aValue)); + anObj = GetEngine()->AddSubShape(theShape, anArray); + aSeq->Append(anObj); + + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + anAsciiList += anEntry; + anAsciiList += ","; + } + + anAsciiList.Trunc(anAsciiList.Length() - 1); + anAsciiList += "]"; + + anAsciiList = TCollection_AsciiString("\n") + anAsciiList; + + //The explode doesn't change object so no new function is requiered. + aFunction = theShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString aDescr(anAsciiList); + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += " = IShapesOperations.MakeExplode("; + aDescr += (anEntry + ","); + if (isSorted) + aDescr += (TCollection_AsciiString(theShapeType) + ", 1)"); + else + aDescr += (TCollection_AsciiString(theShapeType) + ", 0)"); + + TCollection_AsciiString anOldDescr = aFunction->GetDescription(); + anOldDescr = anOldDescr + aDescr; + aFunction->SetDescription(anOldDescr); + + SetErrorCode(OK); + + return aSeq; +} + +//============================================================================= +/*! + * GetSubShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetSubShape + (Handle(GEOM_Object) theMainShape, + const Standard_Integer theID) +{ + SetErrorCode(KO); + + if (theMainShape.IsNull()) return NULL; + + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1,1); + anArray->SetValue(1, theID); + Handle(GEOM_Object) anObj = GetEngine()->AddSubShape(theMainShape, anArray); + if (anObj.IsNull()) { + SetErrorCode("Can not get a sub-shape with the given ID"); + return NULL; + } + + //The GetSubShape() doesn't change object so no new function is requiered. + Handle(GEOM_Function) aFunction = theMainShape->GetLastFunction(); + + //Make a Python command + TCollection_AsciiString aDescr ("\n"); + TCollection_AsciiString anEntry; + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + aDescr += anEntry + " = IShapesOperations.GetSubShape("; + TDF_Tool::Entry(theMainShape->GetEntry(), anEntry); + aDescr += anEntry + ", "; + aDescr += TCollection_AsciiString(theID) + ")"; + + TCollection_AsciiString anOldDescr = aFunction->GetDescription(); + anOldDescr = anOldDescr + aDescr; + aFunction->SetDescription(anOldDescr); + + SetErrorCode(OK); + return anObj; +} + + +//============================================================================= +/*! + * NumberOfFaces + */ +//============================================================================= +Standard_Integer GEOMImpl_IShapesOperations::NumberOfFaces (Handle(GEOM_Object) theShape) +{ + SetErrorCode(KO); + + Standard_Integer nb = 0; + + if (theShape.IsNull()) return -1; + TopoDS_Shape aShape = theShape->GetValue(); + if (aShape.IsNull()) return -1; + + TopTools_MapOfShape mapShape; + + TopExp_Explorer exp (aShape, TopAbs_FACE); + for (; exp.More(); exp.Next()) + if (mapShape.Add(exp.Current())) + nb++; + + SetErrorCode(OK); + return nb; +} + +//============================================================================= +/*! + * NumberOfEdges + */ +//============================================================================= +Standard_Integer GEOMImpl_IShapesOperations::NumberOfEdges (Handle(GEOM_Object) theShape) +{ + SetErrorCode(KO); + + Standard_Integer nb = 0; + + if (theShape.IsNull()) return -1; + TopoDS_Shape aShape = theShape->GetValue(); + if (aShape.IsNull()) return -1; + + TopTools_MapOfShape mapShape; + + TopExp_Explorer exp (aShape, TopAbs_EDGE); + for (; exp.More(); exp.Next()) + if (mapShape.Add(exp.Current())) + nb++; + + SetErrorCode(OK); + return nb; +} + +//============================================================================= +/*! + * ReverseShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object) theShape) +{ + SetErrorCode(KO); + + if (theShape.IsNull()) return NULL; + + //Add a new reversed object + Handle(GEOM_Object) aReversed = GetEngine()->AddObject(GetDocID(), theShape->GetType()); + + //Add a new Revese function + Handle(GEOM_Function) aFunction; + aFunction = aReversed->AddFunction(GEOMImpl_ShapeDriver::GetID(), REVERSE_ORIENTATION); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ShapeDriver::GetID()) return NULL; + + GEOMImpl_IShapes aSI (aFunction); + + Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); + if (aRefShape.IsNull()) return NULL; + + aSI.SetBase(aRefShape); + + //Compute the sub-shape value + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Shape driver failed to reverse shape"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aReversed->GetEntry(), anEntry); + aDescr += anEntry; + aDescr += " = IShapesOperations.ReverseShape("; + TDF_Tool::Entry(theShape->GetEntry(), anEntry); + aDescr += anEntry + ")"; + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aReversed; +} + + +//======================================================================= +//function : SortShapes +//purpose : +//======================================================================= +void GEOMImpl_IShapesOperations::SortShapes(TopTools_ListOfShape& SL) +{ + Standard_Integer MaxShapes = SL.Extent(); + TopTools_Array1OfShape aShapes (1,MaxShapes); + TColStd_Array1OfInteger OrderInd(1,MaxShapes); + TColStd_Array1OfReal MidXYZ (1,MaxShapes); //X,Y,Z; + TColStd_Array1OfReal Length (1,MaxShapes); //X,Y,Z; + + // Computing of CentreOfMass + Standard_Integer Index; + GProp_GProps GPr; + gp_Pnt GPoint; + TopTools_ListIteratorOfListOfShape it(SL); + for (Index=1; it.More(); Index++) + { + TopoDS_Shape S = it.Value(); + SL.Remove( it ); // == it.Next() + aShapes(Index) = S; + OrderInd.SetValue (Index, Index); + if (S.ShapeType() == TopAbs_VERTEX) + { + GPoint = BRep_Tool::Pnt( TopoDS::Vertex( S )); + Length.SetValue( Index, (Standard_Real) S.Orientation()); + } + else + { + BRepGProp::LinearProperties (S, GPr); + GPoint = GPr.CentreOfMass(); + Length.SetValue( Index, GPr.Mass() ); + } + MidXYZ.SetValue(Index, + GPoint.X()*999 + GPoint.Y()*99 + GPoint.Z()*0.9); + } + // Sorting + Standard_Integer aTemp; + Standard_Boolean exchange, Sort = Standard_True; + while (Sort) + { + Sort = Standard_False; + for (Index=1; Index < MaxShapes; Index++) + { + if (MidXYZ(OrderInd(Index)) > MidXYZ(OrderInd(Index+1))) + exchange = Standard_True; + else if (MidXYZ(OrderInd(Index)) == MidXYZ(OrderInd(Index+1)) && + Length(OrderInd(Index)) > Length(OrderInd(Index+1)) ) + exchange = Standard_True; + else + exchange = Standard_False; + if (exchange) + { + aTemp = OrderInd(Index); + OrderInd(Index) = OrderInd(Index+1); + OrderInd(Index+1) = aTemp; + Sort = Standard_True; + } + } + } + for (Index=1; Index <= MaxShapes; Index++) + SL.Append( aShapes( OrderInd(Index) )); +} diff --git a/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx new file mode 100644 index 000000000..9ae51717a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IShapesOperations.hxx @@ -0,0 +1,62 @@ + +#ifndef _GEOMImpl_IShapesOperations_HXX_ +#define _GEOMImpl_IShapesOperations_HXX_ + +#include "GEOM_IOperations.hxx" + +#include +#include + +#include + +class GEOM_Engine; +class Handle(GEOM_Object); +class Handle(TColStd_HArray1OfInteger); + +class GEOMImpl_IShapesOperations : public GEOM_IOperations { + public: + GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_IShapesOperations(); + + Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); + + Handle(GEOM_Object) MakeWire (list theEdgesAndWires); + + Handle(GEOM_Object) MakeFace (Handle(GEOM_Object) theWire, bool isPlanarWanted); + + Handle(GEOM_Object) MakeFaceWires (list theWires, bool isPlanarWanted); + + Handle(GEOM_Object) MakeShell (list theShapes); + + Handle(GEOM_Object) MakeSolidShell (Handle(GEOM_Object) theShell); + + Handle(GEOM_Object) MakeSolidShells (list theShells); + + Handle(GEOM_Object) MakeCompound (list theShapes); + + Handle(GEOM_Object) MakeGlueFaces (Handle(GEOM_Object) theShape, + const Standard_Real theTolerance); + + Handle(TColStd_HSequenceOfTransient) MakeExplode (Handle(GEOM_Object) theShape, + const Standard_Integer theShapeType, + const Standard_Boolean isSorted); + + Handle(GEOM_Object) GetSubShape (Handle(GEOM_Object) theMainShape, + const Standard_Integer theID); + + Standard_Integer NumberOfFaces (Handle(GEOM_Object) theShape); + Standard_Integer NumberOfEdges (Handle(GEOM_Object) theShape); + + Handle(GEOM_Object) ReverseShape(Handle(GEOM_Object) theShapes); + + static void SortShapes (TopTools_ListOfShape& SL); + + private: + Handle(GEOM_Object) MakeShape (list theShapes, + const Standard_Integer theObjectType, + const Standard_Integer theFunctionType, + const TCollection_AsciiString theMethodName); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ISketcher.hxx b/src/GEOMImpl/GEOMImpl_ISketcher.hxx new file mode 100644 index 000000000..74912ff38 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ISketcher.hxx @@ -0,0 +1,28 @@ +//NOTE: This is an interface to a function for the Sketcher creation. + + +#include "GEOM_Function.hxx" + +#define SKETCH_ARG_CMD 1 +#define SKETCH_ARG_WPLANE 2 + +class GEOMImpl_ISketcher +{ + public: + + GEOMImpl_ISketcher(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetCommand(const TCollection_AsciiString& theCommand) + { _func->SetString(SKETCH_ARG_CMD, theCommand); } + + TCollection_AsciiString GetCommand() { return _func->GetString(SKETCH_ARG_CMD); } + + void SetWorkingPlane(int theInd, double theValue) + { _func->SetReal(SKETCH_ARG_WPLANE + theInd, theValue); } + + double GetWorkingPlane(int theInd) { return _func->GetReal(SKETCH_ARG_WPLANE + theInd); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ISphere.hxx b/src/GEOMImpl/GEOMImpl_ISphere.hxx new file mode 100644 index 000000000..048e56cea --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ISphere.hxx @@ -0,0 +1,26 @@ +//NOTE: This is an intreface to a function for the Sphere creation. + + +#include "GEOM_Function.hxx" + +#define SPH_ARG_R 1 +#define SPH_ARG_PNT 4 + +class GEOMImpl_ISphere +{ + public: + + GEOMImpl_ISphere(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetR(double theR) { _func->SetReal(SPH_ARG_R, theR); } + + double GetR() { return _func->GetReal(SPH_ARG_R); } + + void SetPoint(Handle(GEOM_Function) theRefPoint) { _func->SetReference(SPH_ARG_PNT, theRefPoint); } + + Handle(GEOM_Function) GetPoint() { return _func->GetReference(SPH_ARG_PNT); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ISpline.hxx b/src/GEOMImpl/GEOMImpl_ISpline.hxx new file mode 100644 index 000000000..19880be21 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ISpline.hxx @@ -0,0 +1,26 @@ +//NOTE: This is an intreface to a function for the Spline creation. + + +#include "GEOM_Function.hxx" + +#define SPL_ARG_LENG 1 +#define SPL_ARG_LAST 1 + +class GEOMImpl_ISpline +{ + public: + + GEOMImpl_ISpline(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetLength(int theLen) { _func->SetInteger(SPL_ARG_LENG, theLen); } + + void SetPoint(int theId, Handle(GEOM_Function) theP) { _func->SetReference(SPL_ARG_LAST + theId, theP); } + + int GetLength() { return _func->GetInteger(SPL_ARG_LENG); } + + Handle(GEOM_Function) GetPoint(int theId) { return _func->GetReference(SPL_ARG_LAST + theId); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ITorus.hxx b/src/GEOMImpl/GEOMImpl_ITorus.hxx new file mode 100644 index 000000000..8bbca42d9 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ITorus.hxx @@ -0,0 +1,32 @@ +//NOTE: This is an intreface to a function for the Torus creation. + + +#include "GEOM_Function.hxx" + +#define TORUS_ARG_CC 1 +#define TORUS_ARG_VV 2 +#define TORUS_ARG_RMAJ 3 +#define TORUS_ARG_RMIN 4 + +class GEOMImpl_ITorus +{ + public: + + GEOMImpl_ITorus(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetCenter(Handle(GEOM_Function) theP) { _func->SetReference(TORUS_ARG_CC, theP); } + void SetVector(Handle(GEOM_Function) theV) { _func->SetReference(TORUS_ARG_VV, theV); } + + void SetRMajor(double theR) { _func->SetReal(TORUS_ARG_RMAJ, theR); } + void SetRMinor(double theR) { _func->SetReal(TORUS_ARG_RMIN, theR); } + + Handle(GEOM_Function) GetCenter() { return _func->GetReference(TORUS_ARG_CC); } + Handle(GEOM_Function) GetVector() { return _func->GetReference(TORUS_ARG_VV); } + + double GetRMajor() { return _func->GetReal(TORUS_ARG_RMAJ); } + double GetRMinor() { return _func->GetReal(TORUS_ARG_RMIN); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx new file mode 100644 index 000000000..d7e2397c0 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.cxx @@ -0,0 +1,1465 @@ +using namespace std; + +#include "GEOMImpl_ITransformOperations.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include + +#include "GEOM_Function.hxx" + +#include "GEOMImpl_TranslateDriver.hxx" +#include "GEOMImpl_MirrorDriver.hxx" +#include "GEOMImpl_OffsetDriver.hxx" +#include "GEOMImpl_ScaleDriver.hxx" +#include "GEOMImpl_RotateDriver.hxx" +#include "GEOMImpl_PositionDriver.hxx" + +#include "GEOMImpl_ITranslate.hxx" +#include "GEOMImpl_IMirror.hxx" +#include "GEOMImpl_IOffset.hxx" +#include "GEOMImpl_IScale.hxx" +#include "GEOMImpl_IRotate.hxx" +#include "GEOMImpl_IPosition.hxx" + +#include "GEOMImpl_Types.hxx" + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= + +GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine, int theDocID) +: GEOM_IOperations(theEngine, theDocID) +{ + MESSAGE("GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOMImpl_ITransformOperations::~GEOMImpl_ITransformOperations() +{ + MESSAGE("GEOMImpl_ITransformOperations::~GEOMImpl_ITransformOperations"); +} + + +//============================================================================= +/*! + * TranslateTwoPoints + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPoints + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePoint1, Handle(GEOM_Object) thePoint2) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + // Get last functions of the arguments + Handle(GEOM_Function) aP1F = thePoint1->GetLastFunction(); + Handle(GEOM_Function) aP2F = thePoint2->GetLastFunction(); + + //Add a translate function + aFunction = theObject->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_TWO_POINTS); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI (aFunction); + aTI.SetPoint1(aP1F); + aTI.SetPoint2(aP2F); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.TranslateTwoPoints("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * TranslateDXDYDZ + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZ + (Handle(GEOM_Object) theObject, double theX, double theY, double theZ) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a translate function + aFunction = theObject->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_XYZ); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetDX(theX); + aTI.SetDY(theY); + aTI.SetDZ(theZ); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.TranslateDXDXYDZ("); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theX)+", "); + aDescr += (TCollection_AsciiString(theY)+", "); + aDescr += (TCollection_AsciiString(theZ)+")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + + +//============================================================================= +/*! + * TranslateTwoPointsCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPointsCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePoint1, Handle(GEOM_Object) thePoint2) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_TWO_POINTS_COPY); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetPoint1(thePoint1->GetLastFunction()); + aTI.SetPoint2(thePoint2->GetLastFunction()); + //aTI.SetShape(theObject->GetValue()); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.TranslateTwoPointsCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint1->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint2->GetEntry(), anEntry); + aDescr += (anEntry+")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * TranslateDXDYDZCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZCopy + (Handle(GEOM_Object) theObject, double theX, double theY, double theZ) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_XYZ_COPY); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetDX(theX); + aTI.SetDY(theY); + aTI.SetDZ(theZ); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.TranslateDXDXYDZCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theX)+", "); + aDescr += (TCollection_AsciiString(theY)+", "); + aDescr += (TCollection_AsciiString(theZ)+")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + + +//============================================================================= +/*! + * TranslateVector + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVector + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theVector.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + // Get last functions of the arguments + Handle(GEOM_Function) aVF = theVector->GetLastFunction(); + + //Add a translate function + aFunction = theObject->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI (aFunction); + aTI.SetVector(aVF); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.TranslateVector("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVector->GetEntry(), anEntry); + aDescr += (anEntry+") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * TranslateVectorCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theVector.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_COPY); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetVector(theVector->GetLastFunction()); +// aTI.SetShape(theObject->GetValue()); + aTI.SetOriginal(aLastFunction); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.TranslateVectorCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVector->GetEntry(), anEntry); + aDescr += (anEntry+")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * Translate1D + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector, + double theStep, Standard_Integer theNbTimes) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theVector.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_1D); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetVector(theVector->GetLastFunction()); + aTI.SetOriginal(aLastFunction); + aTI.SetStep1(theStep); + aTI.SetNbIter1(theNbTimes); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.Translate1D("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVector->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theStep)+", "); + aDescr += (TCollection_AsciiString(theNbTimes)+") "); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * Translate2D + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theVector, + double theStep1, + Standard_Integer theNbTimes1, + Handle(GEOM_Object) theVector2, + double theStep2, + Standard_Integer theNbTimes2) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theVector.IsNull() || theVector2.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a translate function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_2D); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_TranslateDriver::GetID()) return NULL; + + GEOMImpl_ITranslate aTI(aFunction); + aTI.SetVector(theVector->GetLastFunction()); + aTI.SetVector2(theVector2->GetLastFunction()); + aTI.SetOriginal(aLastFunction); + aTI.SetStep1(theStep1); + aTI.SetNbIter1(theNbTimes1); + aTI.SetStep2(theStep2); + aTI.SetNbIter2(theNbTimes2); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Translation driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.Translate2D("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theVector->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theStep1)+", "); + aDescr += (TCollection_AsciiString(theNbTimes2)+", "); + TDF_Tool::Entry(theVector2->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theStep2)+", "); + aDescr += (TCollection_AsciiString(theNbTimes2)+") "); + + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + + +//============================================================================= +/*! + * MirrorPlane + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlane + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePlane) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePlane.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored + + // Get last functions of the arguments + Handle(GEOM_Function) aPF = thePlane->GetLastFunction(); + + //Add a mirror function + Handle(GEOM_Function) aFunction = + theObject->AddFunction(GEOMImpl_MirrorDriver::GetID(), MIRROR_PLANE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MirrorDriver::GetID()) return NULL; + + GEOMImpl_IMirror aTI (aFunction); + aTI.SetPlane(aPF); + aTI.SetOriginal(aLastFunction); + + //Compute the mirror + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Mirror driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry + " = ITransformOperations.MirrorPlane("); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(thePlane->GetEntry(), anEntry); + aDescr += (anEntry + ") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * MirrorPlaneCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlaneCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePlane) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePlane.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a mirror function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_MirrorDriver::GetID(), MIRROR_PLANE_COPY); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MirrorDriver::GetID()) return NULL; + + GEOMImpl_IMirror aTI (aFunction); + aTI.SetPlane(thePlane->GetLastFunction()); + aTI.SetOriginal(aLastFunction); + + //Compute the mirror + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Mirror driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry + " = ITransformOperations.MirrorPlaneCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(thePlane->GetEntry(), anEntry); + aDescr += (anEntry + ")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * MirrorPoint + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPoint + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePoint.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored + + // Get last functions of the arguments + Handle(GEOM_Function) aPF = thePoint->GetLastFunction(); + + //Add a mirror function + Handle(GEOM_Function) aFunction = + theObject->AddFunction(GEOMImpl_MirrorDriver::GetID(), MIRROR_POINT); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MirrorDriver::GetID()) return NULL; + + GEOMImpl_IMirror aTI (aFunction); + aTI.SetPoint(aPF); + aTI.SetOriginal(aLastFunction); + + //Compute the mirror + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Mirror driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry + " = ITransformOperations.MirrorPoint("); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += (anEntry + ") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return NULL; +} + +//============================================================================= +/*! + * MirrorPointCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPointCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePoint) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePoint.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a mirror function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_MirrorDriver::GetID(), MIRROR_POINT_COPY); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MirrorDriver::GetID()) return NULL; + + GEOMImpl_IMirror aTI (aFunction); + aTI.SetPoint(thePoint->GetLastFunction()); + aTI.SetOriginal(aLastFunction); + + //Compute the mirror + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Mirror driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry + " = ITransformOperations.MirrorPointCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += (anEntry + ")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * MirrorAxis + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxis + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theAxis.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored + + // Get last functions of the arguments + Handle(GEOM_Function) anAF = theAxis->GetLastFunction(); + + //Add a mirror function + Handle(GEOM_Function) aFunction = + theObject->AddFunction(GEOMImpl_MirrorDriver::GetID(), MIRROR_AXIS); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MirrorDriver::GetID()) return NULL; + + GEOMImpl_IMirror aTI (aFunction); + aTI.SetAxis(anAF); + aTI.SetOriginal(aLastFunction); + + //Compute the mirror + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Mirror driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry + " = ITransformOperations.MirrorAxis("); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry + ") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return NULL; +} + +//============================================================================= +/*! + * MirrorAxisCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxisCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theAxis.IsNull()) return NULL; + + Handle(GEOM_Function) aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a mirror function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_MirrorDriver::GetID(), MIRROR_AXIS_COPY); + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_MirrorDriver::GetID()) return NULL; + + GEOMImpl_IMirror aTI (aFunction); + aTI.SetAxis(theAxis->GetLastFunction()); + aTI.SetOriginal(aLastFunction); + + //Compute the mirror + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Mirror driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry + " = ITransformOperations.MirrorAxisCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry + ", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry + ")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + + +//============================================================================= +/*! + * OffsetShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShape + (Handle(GEOM_Object) theObject, double theOffset) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset + + //Add a new Offset function + Handle(GEOM_Function) aFunction = + theObject->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_SHAPE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL; + + GEOMImpl_IOffset aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetValue(theOffset); + + //Compute the offset + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Offset driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.OffsetShape("); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theOffset)+")"; + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * OffsetShapeCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy + (Handle(GEOM_Object) theObject, double theOffset) +{ + SetErrorCode(KO); + + if (theObject.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a new Offset function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_SHAPE_COPY); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_OffsetDriver::GetID()) return NULL; + + GEOMImpl_IOffset aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetValue(theOffset); + + //Compute the offset + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Offset driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.OffsetShapeCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theOffset)+")"; + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + + +//============================================================================= +/*! + * ScaleShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShape + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePoint, double theFactor) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePoint.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled + + // Get last functions of the arguments + Handle(GEOM_Function) aPF = thePoint->GetLastFunction(); + + //Add a scale function + Handle(GEOM_Function) aFunction = + theObject->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ScaleDriver::GetID()) return NULL; + + GEOMImpl_IScale aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetPoint(aPF); + aTI.SetFactor(theFactor); + + //Compute the scale + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Scale driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.ScaleShape("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theFactor)+")"; + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * ScaleShapeCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) thePoint, double theFactor) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || thePoint.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a scale function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_COPY); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_ScaleDriver::GetID()) return NULL; + + GEOMImpl_IScale aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetPoint(thePoint->GetLastFunction()); + aTI.SetFactor(theFactor); + + //Compute the scale + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Scale driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.ScaleShapeCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(thePoint->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += TCollection_AsciiString(theFactor)+")"; + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * PositionShape + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShape + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theStartLCS, Handle(GEOM_Object) theEndLCS) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theStartLCS.IsNull() || theEndLCS.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position + + // Get last functions of the arguments + Handle(GEOM_Function) aStartLCS = theStartLCS->GetLastFunction(); + Handle(GEOM_Function) aEndLCS = theEndLCS->GetLastFunction(); + + //Add a Position function + Handle(GEOM_Function) aFunction = + theObject->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_SHAPE); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PositionDriver::GetID()) return NULL; + + GEOMImpl_IPosition aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetStartLCS(aStartLCS); + aTI.SetEndLCS(aEndLCS); + + //Compute the Position + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Position driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.PositionShape("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theStartLCS->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theEndLCS->GetEntry(), anEntry); + aDescr += (anEntry+") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * PositionShapeCopy + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy + (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theStartLCS, Handle(GEOM_Object) theEndLCS) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theStartLCS.IsNull() || theEndLCS.IsNull()) return NULL; + + Handle(GEOM_Function) anOriginal = theObject->GetLastFunction(); + if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a position function + Handle(GEOM_Function) aFunction = + aCopy->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_SHAPE_COPY); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_PositionDriver::GetID()) return NULL; + + GEOMImpl_IPosition aTI (aFunction); + aTI.SetShape(anOriginal); + aTI.SetStartLCS(theStartLCS->GetLastFunction()); + aTI.SetEndLCS(theEndLCS->GetLastFunction()); + + //Compute the position + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Position driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(aCopy->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.PositionShapeCopy("); + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theStartLCS->GetEntry(), anEntry); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theEndLCS->GetEntry(), anEntry); + aDescr += (anEntry+")"); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * Rotate + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + double theAngle) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theAxis.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated + + // Get last functions of the arguments + Handle(GEOM_Function) anAF = theAxis->GetLastFunction(); + + //Add a rotate function + aFunction = theObject->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE); + + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL; + + GEOMImpl_IRotate aRI(aFunction); + aRI.SetAxis(anAF); + aRI.SetOriginal(aLastFunction); + aRI.SetAngle(theAngle); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Rotate driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.Rotate("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theAngle)+") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return theObject; +} + +//============================================================================= +/*! + * Rotate + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateCopy (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, double theAngle) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theAxis.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a rotate function + aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_COPY); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL; + + GEOMImpl_IRotate aRI(aFunction); + aRI.SetAxis(theAxis->GetLastFunction()); + aRI.SetOriginal(aLastFunction); + aRI.SetAngle(theAngle); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Rotate driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.RotateCopy("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theAngle)+") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * Rotate1D + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + Standard_Integer theNbTimes) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theAxis.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a rotate function + aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL; + + GEOMImpl_IRotate aRI(aFunction); + aRI.SetOriginal(aLastFunction); + aRI.SetAxis(theAxis->GetLastFunction()); + aRI.SetNbIter1(theNbTimes); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Rotate driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.Rotate1D("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theNbTimes)+") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} + +//============================================================================= +/*! + * Rotate2D + */ +//============================================================================= +Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + double theAngle, + Standard_Integer theNbTimes1, + double theStep, + Standard_Integer theNbTimes2) +{ + SetErrorCode(KO); + + if (theObject.IsNull() || theAxis.IsNull()) return NULL; + + Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction(); + if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated + + //Add a new Copy object + Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType()); + + //Add a rotate function + aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D); + if (aFunction.IsNull()) return NULL; + + //Check if the function is set correctly + if (aFunction->GetDriverGUID() != GEOMImpl_RotateDriver::GetID()) return NULL; + + GEOMImpl_IRotate aRI(aFunction); + aRI.SetAxis(theAxis->GetLastFunction()); + aRI.SetOriginal(aLastFunction); + aRI.SetNbIter1(theNbTimes1); + aRI.SetNbIter2(theNbTimes2); + aRI.SetAngle(theAngle); + aRI.SetStep(theStep); + + //Compute the translation + try { + if (!GetSolver()->ComputeFunction(aFunction)) { + SetErrorCode("Rotate driver failed"); + return NULL; + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + SetErrorCode(aFail->GetMessageString()); + return NULL; + } + + //Make a Python command + TCollection_AsciiString anEntry, aDescr; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + aDescr += (anEntry+" = ITransformOperations.Rotate2D("); + aDescr += (anEntry+", "); + TDF_Tool::Entry(theAxis->GetEntry(), anEntry); + aDescr += (anEntry+", "); + aDescr += (TCollection_AsciiString(theAngle)+", "); + aDescr += (TCollection_AsciiString(theNbTimes1)+", "); + aDescr += (TCollection_AsciiString(theStep)+", "); + aDescr += (TCollection_AsciiString(theNbTimes2)+") "); + aFunction->SetDescription(aDescr); + + SetErrorCode(OK); + return aCopy; +} diff --git a/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx b/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx new file mode 100644 index 000000000..5ac2879a3 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ITransformOperations.hxx @@ -0,0 +1,93 @@ + +#ifndef _GEOMImpl_ITransformOperations_HXX_ +#define _GEOMImpl_ITransformOperations_HXX_ + +#include "Utils_SALOME_Exception.hxx" +#include "GEOM_IOperations.hxx" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" +#include + +class GEOMImpl_ITransformOperations : public GEOM_IOperations { + public: + GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID); + ~GEOMImpl_ITransformOperations(); + + Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); + + Handle(GEOM_Object) TranslateTwoPointsCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint1, + Handle(GEOM_Object) thePoint2); + + Handle(GEOM_Object) TranslateDXDYDZ (Handle(GEOM_Object) theObject, double theX, double theY, double theZ); + + Handle(GEOM_Object) TranslateDXDYDZCopy (Handle(GEOM_Object) theObject, double theX, double theY, double theZ); + + Handle(GEOM_Object) TranslateVector (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theVector); + + Handle(GEOM_Object) TranslateVectorCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theVector); + + Handle(GEOM_Object) Translate1D (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector, double theStep, Standard_Integer theNbTimes); + + Handle(GEOM_Object) Translate2D (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theVector, double theStep1, Standard_Integer theNbTimes1, + Handle(GEOM_Object) theVector2, double theStep2, Standard_Integer theNbTimes2); + + Handle(GEOM_Object) MirrorPlane (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePlane); + + Handle(GEOM_Object) MirrorPlaneCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePlane); + + Handle(GEOM_Object) MirrorAxis (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis); + + Handle(GEOM_Object) MirrorAxisCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis); + + Handle(GEOM_Object) MirrorPoint (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint); + + Handle(GEOM_Object) MirrorPointCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint); + + Handle(GEOM_Object) OffsetShape (Handle(GEOM_Object) theObject, + double theOffset); + + Handle(GEOM_Object) OffsetShapeCopy (Handle(GEOM_Object) theObject, + double theOffset); + + Handle(GEOM_Object) ScaleShape (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint, + double theFactor); + + Handle(GEOM_Object) ScaleShapeCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) thePoint, + double theFactor); + + Handle(GEOM_Object) PositionShape (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theStartLCS, + Handle(GEOM_Object) theEndLCS); + + Handle(GEOM_Object) PositionShapeCopy (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theStartLCS, + Handle(GEOM_Object) theEndLCS); + + Handle(GEOM_Object) Rotate (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, double theAngle); + + Handle(GEOM_Object) RotateCopy (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, double theAngle); + + Handle(GEOM_Object) Rotate1D (Handle(GEOM_Object) theObject, Handle(GEOM_Object) theAxis, Standard_Integer theNbTimes); + + Handle(GEOM_Object) Rotate2D (Handle(GEOM_Object) theObject, + Handle(GEOM_Object) theAxis, + double theAngle, + Standard_Integer theNbTimes1, + double theStep, + Standard_Integer theNbTimes2); +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ITranslate.hxx b/src/GEOMImpl/GEOMImpl_ITranslate.hxx new file mode 100755 index 000000000..886f7744f --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ITranslate.hxx @@ -0,0 +1,82 @@ +//NOTE: This is an intreface to a function for the Translate creation. + + +#include "GEOM_Function.hxx" + +#define TRANSLATE_ARG_POINT1 1 +#define TRANSLATE_ARG_POINT2 2 +#define TRANSLATE_ARG_VECTOR 3 +#define TRANSLATE_ARG_REF 4 +#define TRANSLATE_ARG_SHAPE 5 +#define TRANSLATE_ARG_ORIGINAL 6 +#define TRANSLATE_ARG_STEP1 7 +#define TRANSLATE_ARG_NBITER1 8 +#define TRANSLATE_ARG_STEP2 9 +#define TRANSLATE_ARG_NBITER2 10 +#define TRANSLATE_ARG_VECTOR2 11 +#define TRANSLATE_ARG_DX 12 +#define TRANSLATE_ARG_DY 13 +#define TRANSLATE_ARG_DZ 14 + +class GEOMImpl_ITranslate +{ + public: + + GEOMImpl_ITranslate(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(TRANSLATE_ARG_POINT1, thePoint1); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(TRANSLATE_ARG_POINT1); } + + void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(TRANSLATE_ARG_POINT2, thePoint2); } + + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(TRANSLATE_ARG_POINT2); } + + void SetVector(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR, theVector); } + + Handle(GEOM_Function) GetVector() { return _func->GetReference(TRANSLATE_ARG_VECTOR); } + + void SetShape(const TopoDS_Shape& theShape) { _func->SetShape(TRANSLATE_ARG_SHAPE, theShape); } + + TopoDS_Shape GetShape() { return _func->GetShape(TRANSLATE_ARG_SHAPE); } + + void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(TRANSLATE_ARG_ORIGINAL, theOriginal); } + + Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRANSLATE_ARG_ORIGINAL); } + + void SetStep1(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP1, theStep); } + + double GetStep1() { return _func->GetReal(TRANSLATE_ARG_STEP1); } + + void SetNbIter1(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER1, theNbIter); } + + int GetNbIter1() { return _func->GetInteger(TRANSLATE_ARG_NBITER1); } + + void SetStep2(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP2, theStep); } + + double GetStep2() { return _func->GetReal(TRANSLATE_ARG_STEP2); } + + void SetNbIter2(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER2, theNbIter); } + + int GetNbIter2() { return _func->GetInteger(TRANSLATE_ARG_NBITER2); } + + void SetVector2(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR2, theVector); } + + Handle(GEOM_Function) GetVector2() { return _func->GetReference(TRANSLATE_ARG_VECTOR2); } + + void SetDX(double theDX) { return _func->SetReal(TRANSLATE_ARG_DX, theDX); } + + double GetDX() { return _func->GetReal(TRANSLATE_ARG_DX); } + + void SetDY(double theDY) { return _func->SetReal(TRANSLATE_ARG_DY, theDY); } + + double GetDY() { return _func->GetReal(TRANSLATE_ARG_DY); } + + void SetDZ(double theDZ) { return _func->SetReal(TRANSLATE_ARG_DZ, theDZ); } + + double GetDZ() { return _func->GetReal(TRANSLATE_ARG_DZ); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_IVector.hxx b/src/GEOMImpl/GEOMImpl_IVector.hxx new file mode 100644 index 000000000..e1a344b8d --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_IVector.hxx @@ -0,0 +1,36 @@ +//NOTE: This is an intreface to a function for the vector creation. + + +#include "GEOM_Function.hxx" + +#define VEC_ARG_DX 1 +#define VEC_ARG_DY 2 +#define VEC_ARG_DZ 3 + +#define VEC_ARG_PNT1 4 +#define VEC_ARG_PNT2 5 + +class GEOMImpl_IVector +{ + public: + + GEOMImpl_IVector(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + void SetDX(double theDX) { _func->SetReal(VEC_ARG_DX, theDX); } + void SetDY(double theDY) { _func->SetReal(VEC_ARG_DY, theDY); } + void SetDZ(double theDZ) { _func->SetReal(VEC_ARG_DZ, theDZ); } + + double GetDX() { return _func->GetReal(VEC_ARG_DX); } + double GetDY() { return _func->GetReal(VEC_ARG_DY); } + double GetDZ() { return _func->GetReal(VEC_ARG_DZ); } + + void SetPoint1(Handle(GEOM_Function) theRef) { _func->SetReference(VEC_ARG_PNT1, theRef); } + void SetPoint2(Handle(GEOM_Function) theRef) { _func->SetReference(VEC_ARG_PNT2, theRef); } + + Handle(GEOM_Function) GetPoint1() { return _func->GetReference(VEC_ARG_PNT1); } + Handle(GEOM_Function) GetPoint2() { return _func->GetReference(VEC_ARG_PNT2); } + + private: + + Handle(GEOM_Function) _func; +}; diff --git a/src/GEOMImpl/GEOMImpl_ImportDriver.cxx b/src/GEOMImpl/GEOMImpl_ImportDriver.cxx new file mode 100644 index 000000000..5f3fef221 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ImportDriver.cxx @@ -0,0 +1,142 @@ + +using namespace std; +#include "GEOMImpl_ImportDriver.hxx" +#include "GEOMImpl_IImportExport.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include "utilities.h" + +#include + +#include +#include + +#ifdef WNT +#include +#else +#include +#endif + +#ifdef WNT +#define LibHandle HMODULE +#define LoadLib( name ) LoadLibrary( name ) +#define GetProc GetProcAddress +#define UnLoadLib( handle ) FreeLibrary( handle ); +#else +#define LibHandle void* +#define LoadLib( name ) dlopen( name, RTLD_LAZY ) +#define GetProc dlsym +#define UnLoadLib( handle ) dlclose( handle ); +#endif + +typedef TopoDS_Shape (*funcPoint)(const TCollection_AsciiString&, TCollection_AsciiString&); + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ImportDriver::GetID() +{ + static Standard_GUID aImportDriver("FF1BBB60-5D14-4df2-980B-3A668264EA16"); + return aImportDriver; +} + + +//======================================================================= +//function : GEOMImpl_ImportDriver +//purpose : +//======================================================================= +GEOMImpl_ImportDriver::GEOMImpl_ImportDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ImportDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IImportExport aCI (aFunction); + //Standard_Integer aType = aFunction->GetType(); + + // retrieve the file and plugin library names + TCollection_AsciiString aFileName = aCI.GetFileName(); + TCollection_AsciiString aLibName = aCI.GetPluginName(); + if (aFileName.IsEmpty() || aLibName.IsEmpty()) + return 0; + + // load plugin library + LibHandle anImportLib = LoadLib( aLibName.ToCString() ); + funcPoint fp = 0; + if ( anImportLib ) + fp = (funcPoint)GetProc( anImportLib, "Import" ); + + if ( !fp ) + return 0; + + // perform the import + TCollection_AsciiString anError; + TopoDS_Shape aShape = fp( aFileName, anError ); + + // unload plugin library + UnLoadLib( anImportLib ); + + if ( aShape.IsNull() ) { + StdFail_NotDone::Raise(anError.ToCString()); + return 0; + } + + // set the function result + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ImportDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ImportDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ImportDriver", + sizeof(GEOMImpl_ImportDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ImportDriver) Handle(GEOMImpl_ImportDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ImportDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ImportDriver))) { + _anOtherObject = Handle(GEOMImpl_ImportDriver)((Handle(GEOMImpl_ImportDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ImportDriver.hxx b/src/GEOMImpl/GEOMImpl_ImportDriver.hxx new file mode 100644 index 000000000..8fcb48451 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ImportDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ImportDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ImportDriver_HeaderFile +#define _GEOMImpl_ImportDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ImportDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ImportDriver); + +class Handle(GEOMImpl_ImportDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ImportDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ImportDriver)(const Handle(GEOMImpl_ImportDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ImportDriver)(const GEOMImpl_ImportDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ImportDriver)& operator=(const Handle(GEOMImpl_ImportDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ImportDriver)& operator=(const GEOMImpl_ImportDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ImportDriver* operator->() + { + return (GEOMImpl_ImportDriver *)ControlAccess(); + } + + GEOMImpl_ImportDriver* operator->() const + { + return (GEOMImpl_ImportDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ImportDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ImportDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ImportDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ImportDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ImportDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ImportDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ImportDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ImportDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_LineDriver.cxx b/src/GEOMImpl/GEOMImpl_LineDriver.cxx new file mode 100644 index 000000000..57903e3d2 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_LineDriver.cxx @@ -0,0 +1,154 @@ + +using namespace std; +#include "GEOMImpl_LineDriver.hxx" +#include "GEOMImpl_ILine.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_LineDriver::GetID() +{ + static Standard_GUID aLineDriver("FF1BBB06-5D14-4df2-980B-3A668264EA16"); + return aLineDriver; +} + + +//======================================================================= +//function : GEOMImpl_LineDriver +//purpose : +//======================================================================= +GEOMImpl_LineDriver::GEOMImpl_LineDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_LineDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ILine aPI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == LINE_TWO_PNT) { + Handle(GEOM_Function) aRefPnt1 = aPI.GetPoint1(); + Handle(GEOM_Function) aRefPnt2 = aPI.GetPoint2(); + TopoDS_Shape aShape1 = aRefPnt1->GetValue(); + TopoDS_Shape aShape2 = aRefPnt2->GetValue(); + if (aShape1.ShapeType() != TopAbs_VERTEX || + aShape2.ShapeType() != TopAbs_VERTEX) return 0; + if (aShape1.IsSame(aShape2)) { + Standard_ConstructionError::Raise("The end points must be different"); + } + gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1)); + gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2)); + if (P1.Distance(P2) < Precision::Confusion()) { + Standard_ConstructionError::Raise("The end points are too close"); + } + aShape = BRepBuilderAPI_MakeEdge(P1, P2).Shape(); + + } else if (aType == LINE_PNT_DIR) { + Handle(GEOM_Function) aRefPnt = aPI.GetPoint1(); + Handle(GEOM_Function) aRefDir = aPI.GetPoint2(); + TopoDS_Shape aShape1 = aRefPnt->GetValue(); + TopoDS_Shape aShape2 = aRefDir->GetValue(); + if (aShape1.ShapeType() != TopAbs_VERTEX || + aShape2.ShapeType() != TopAbs_EDGE) return 0; + if (aShape1.IsSame(aShape2)) { + Standard_ConstructionError::Raise("The end points must be different"); + } + gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1)); + + TopoDS_Edge anE = TopoDS::Edge(aShape2); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + Standard_NullObject::Raise("Line creation aborted: vector is not defined"); + } + gp_Pnt PV1 = BRep_Tool::Pnt(V1); + gp_Pnt PV2 = BRep_Tool::Pnt(V2); + if (PV1.Distance(PV2) < Precision::Confusion()) { + Standard_ConstructionError::Raise("Vector with null magnitude"); + } + + gp_Pnt P2 (P1.XYZ() + PV2.XYZ() - PV1.XYZ()); + aShape = BRepBuilderAPI_MakeEdge(P1, P2).Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + aShape.Infinite(true); + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_LineDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_LineDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_LineDriver", + sizeof(GEOMImpl_LineDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_LineDriver) Handle(GEOMImpl_LineDriver)::DownCast + (const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_LineDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_LineDriver))) { + _anOtherObject = Handle(GEOMImpl_LineDriver)((Handle(GEOMImpl_LineDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_LineDriver.hxx b/src/GEOMImpl/GEOMImpl_LineDriver.hxx new file mode 100644 index 000000000..d134835ef --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_LineDriver.hxx @@ -0,0 +1,138 @@ +// File : GEOMImpl_LineDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_LineDriver_HeaderFile +#define _GEOMImpl_LineDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_LineDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_LineDriver); + +class Handle(GEOMImpl_LineDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_LineDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_LineDriver)(const Handle(GEOMImpl_LineDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_LineDriver)(const GEOMImpl_LineDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_LineDriver)& operator=(const Handle(GEOMImpl_LineDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_LineDriver)& operator=(const GEOMImpl_LineDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_LineDriver* operator->() + { + return (GEOMImpl_LineDriver *)ControlAccess(); + } + + GEOMImpl_LineDriver* operator->() const + { + return (GEOMImpl_LineDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_LineDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_LineDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_LineDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_LineDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_LineDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_LineDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_LineDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_LineDriver) == AType || TFunction_Driver::IsKind(AType)); } + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_MarkerDriver.cxx b/src/GEOMImpl/GEOMImpl_MarkerDriver.cxx new file mode 100644 index 000000000..e5594d16e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_MarkerDriver.cxx @@ -0,0 +1,140 @@ + +using namespace std; +#include "GEOMImpl_MarkerDriver.hxx" +#include "GEOMImpl_IMarker.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_MarkerDriver::GetID() +{ + static Standard_GUID aMarkerDriver("FF1BBB07-5D14-4df2-980B-3A668264EA16"); + return aMarkerDriver; +} + + +//======================================================================= +//function : GEOMImpl_MarkerDriver +//purpose : +//======================================================================= +GEOMImpl_MarkerDriver::GEOMImpl_MarkerDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_MarkerDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IMarker aPI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == MARKER_CS) { + double OX, OY, OZ; + double XDX, XDY, XDZ; + double YDX, YDY, YDZ; + aPI.GetOrigin(OX, OY, OZ); + aPI.GetXDir(XDX, XDY, XDZ); + aPI.GetYDir(YDX, YDY, YDZ); + + gp_Pnt aPO (OX, OY, OZ); + gp_Vec aVX (XDX, XDY, XDZ); + gp_Vec aVY (YDX, YDY, YDZ); + Standard_Real aTol = Precision::Confusion(); + if (aVX.Magnitude() < aTol || + aVY.Magnitude() < aTol || + aVX.IsParallel(aVY, Precision::Angular())) { + Standard_ConstructionError::Raise("Degenerated or parallel directions given"); + } + + gp_Vec aN = aVX ^ aVY; + gp_Ax3 anA (aPO, aN, aVX); + gp_Pln aPln (anA); + + double aTrimSize = 100.0; + aShape = BRepBuilderAPI_MakeFace(aPln, -aTrimSize, +aTrimSize, -aTrimSize, +aTrimSize).Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_MarkerDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_MarkerDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MarkerDriver", + sizeof(GEOMImpl_MarkerDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_MarkerDriver) Handle(GEOMImpl_MarkerDriver)::DownCast + (const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_MarkerDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MarkerDriver))) { + _anOtherObject = Handle(GEOMImpl_MarkerDriver)((Handle(GEOMImpl_MarkerDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_MarkerDriver.hxx b/src/GEOMImpl/GEOMImpl_MarkerDriver.hxx new file mode 100644 index 000000000..cf1a069f4 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_MarkerDriver.hxx @@ -0,0 +1,138 @@ +// File : GEOMImpl_MarkerDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_MarkerDriver_HeaderFile +#define _GEOMImpl_MarkerDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_MarkerDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_MarkerDriver); + +class Handle(GEOMImpl_MarkerDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_MarkerDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_MarkerDriver)(const Handle(GEOMImpl_MarkerDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_MarkerDriver)(const GEOMImpl_MarkerDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_MarkerDriver)& operator=(const Handle(GEOMImpl_MarkerDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_MarkerDriver)& operator=(const GEOMImpl_MarkerDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_MarkerDriver* operator->() + { + return (GEOMImpl_MarkerDriver *)ControlAccess(); + } + + GEOMImpl_MarkerDriver* operator->() const + { + return (GEOMImpl_MarkerDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_MarkerDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_MarkerDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_MarkerDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_MarkerDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_MarkerDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_MarkerDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_MarkerDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_MarkerDriver) == AType || TFunction_Driver::IsKind(AType)); } + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_MeasureDriver.cxx b/src/GEOMImpl/GEOMImpl_MeasureDriver.cxx new file mode 100644 index 000000000..c2b5a15d3 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_MeasureDriver.cxx @@ -0,0 +1,134 @@ + +using namespace std; +#include "GEOMImpl_MeasureDriver.hxx" +#include "GEOMImpl_IMeasure.hxx" +#include "GEOMImpl_IMeasureOperations.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_MeasureDriver::GetID() +{ + static Standard_GUID aMeasureDriver("FF1BBB65-5D14-4df2-980B-3A668264EA16"); + return aMeasureDriver; +} + + +//======================================================================= +//function : GEOMImpl_MeasureDriver +//purpose : +//======================================================================= +GEOMImpl_MeasureDriver::GEOMImpl_MeasureDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_MeasureDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IMeasure aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == CDG_MEASURE) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + if (aShapeBase.IsNull()) { + Standard_NullObject::Raise("Shape for centre of mass calculation is null"); + } + + GProp_GProps aSystem; + gp_Pnt aCenterMass; + + if (aShapeBase.ShapeType() == TopAbs_VERTEX) { + aCenterMass = BRep_Tool::Pnt(TopoDS::Vertex(aShapeBase)); + } else if (aShapeBase.ShapeType() == TopAbs_EDGE || aShapeBase.ShapeType() == TopAbs_WIRE) { + BRepGProp::LinearProperties(aShapeBase, aSystem); + aCenterMass = aSystem.CentreOfMass(); + } else if (aShapeBase.ShapeType() == TopAbs_FACE || aShapeBase.ShapeType() == TopAbs_SHELL) { + BRepGProp::SurfaceProperties(aShapeBase, aSystem); + aCenterMass = aSystem.CentreOfMass(); + } else { + BRepGProp::VolumeProperties(aShapeBase, aSystem); + aCenterMass = aSystem.CentreOfMass(); + } + + aShape = BRepBuilderAPI_MakeVertex(aCenterMass).Shape(); + + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_MeasureDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_MeasureDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MeasureDriver", + sizeof(GEOMImpl_MeasureDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_MeasureDriver) Handle(GEOMImpl_MeasureDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_MeasureDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MeasureDriver))) { + _anOtherObject = Handle(GEOMImpl_MeasureDriver)((Handle(GEOMImpl_MeasureDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_MeasureDriver.hxx b/src/GEOMImpl/GEOMImpl_MeasureDriver.hxx new file mode 100644 index 000000000..3286f06c6 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_MeasureDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_MeasureDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_MeasureDriver_HeaderFile +#define _GEOMImpl_MeasureDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_MeasureDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_MeasureDriver); + +class Handle(GEOMImpl_MeasureDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_MeasureDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_MeasureDriver)(const Handle(GEOMImpl_MeasureDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_MeasureDriver)(const GEOMImpl_MeasureDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_MeasureDriver)& operator=(const Handle(GEOMImpl_MeasureDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_MeasureDriver)& operator=(const GEOMImpl_MeasureDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_MeasureDriver* operator->() + { + return (GEOMImpl_MeasureDriver *)ControlAccess(); + } + + GEOMImpl_MeasureDriver* operator->() const + { + return (GEOMImpl_MeasureDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_MeasureDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_MeasureDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_MeasureDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_MeasureDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_MeasureDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_MeasureDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_MeasureDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_MeasureDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx b/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx new file mode 100644 index 000000000..fefb1531d --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_MirrorDriver.cxx @@ -0,0 +1,166 @@ + +using namespace std; +#include "GEOMImpl_MirrorDriver.hxx" + +#include +#include +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_MirrorDriver::GetID() +{ + static Standard_GUID aMirrorDriver("FF1BBB57-5D14-4df2-980B-3A668264EA16"); + return aMirrorDriver; +} + + +//======================================================================= +//function : GEOMImpl_MirrorDriver +//purpose : +//======================================================================= + +GEOMImpl_MirrorDriver::GEOMImpl_MirrorDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_MirrorDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + if (aFunction.IsNull()) return 0; + + TopoDS_Shape aShape; + gp_Trsf aTrsf; + + GEOMImpl_IMirror TI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + Handle(GEOM_Function) anOriginalFunction = TI.GetOriginal(); + if (anOriginalFunction.IsNull()) return 0; + + TopoDS_Shape anOriginal = anOriginalFunction->GetValue(); + if (anOriginal.IsNull()) return 0; + + if (aType == MIRROR_PLANE || aType == MIRROR_PLANE_COPY) { + Handle(GEOM_Function) aPlane = TI.GetPlane(); + if (aPlane.IsNull()) return 0; + TopoDS_Shape aFaceShape = aPlane->GetValue(); + if (aFaceShape.IsNull() || aFaceShape.ShapeType() != TopAbs_FACE) return 0; + TopoDS_Face aFace = TopoDS::Face(aFaceShape); + + Handle(Geom_Surface) surf = BRep_Tool::Surface(aFace); + Handle(Geom_Plane) myPlane = Handle(Geom_Plane)::DownCast(surf); + const gp_Ax3 pos = myPlane->Position(); + const gp_Pnt loc = pos.Location(); /* location of the plane */ + const gp_Dir dir = pos.Direction(); /* Main direction of the plane (Z axis) */ + gp_Ax2 aPln (loc, dir); + aTrsf.SetMirror(aPln); + + } else if (aType == MIRROR_AXIS || aType == MIRROR_AXIS_COPY) { + Handle(GEOM_Function) anAxis = TI.GetAxis(); + if (anAxis.IsNull()) return 0; + TopoDS_Shape anAxisShape = anAxis->GetValue(); + if (anAxisShape.IsNull() || anAxisShape.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(anAxisShape); + + gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex (anEdge)); + gp_Vec aV (aP1, aP2); + gp_Ax1 anAx1 (aP1, aV); + aTrsf.SetMirror(anAx1); + + } else if (aType == MIRROR_POINT || aType == MIRROR_POINT_COPY) { + Handle(GEOM_Function) aPoint = TI.GetPoint(); + if (aPoint.IsNull()) return 0; + TopoDS_Shape aVertexShape = aPoint->GetValue(); + if (aVertexShape.IsNull() || aVertexShape.ShapeType() != TopAbs_VERTEX) return 0; + TopoDS_Vertex aVertex = TopoDS::Vertex(aVertexShape); + + gp_Pnt aP = BRep_Tool::Pnt(aVertex); + aTrsf.SetMirror(aP); + } else { + return 0; + } + + BRepBuilderAPI_Transform aTransformation (anOriginal, aTrsf, Standard_False); + aShape = aTransformation.Shape(); + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_MirrorDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_MirrorDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_MirrorDriver", + sizeof(GEOMImpl_MirrorDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_MirrorDriver) Handle(GEOMImpl_MirrorDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_MirrorDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_MirrorDriver))) { + _anOtherObject = Handle(GEOMImpl_MirrorDriver)((Handle(GEOMImpl_MirrorDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_MirrorDriver.hxx b/src/GEOMImpl/GEOMImpl_MirrorDriver.hxx new file mode 100644 index 000000000..b9ad4a31b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_MirrorDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_MirrorDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_MirrorDriver_HeaderFile +#define _GEOMImpl_MirrorDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_MirrorDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_MirrorDriver); + +class Handle(GEOMImpl_MirrorDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_MirrorDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_MirrorDriver)(const Handle(GEOMImpl_MirrorDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_MirrorDriver)(const GEOMImpl_MirrorDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_MirrorDriver)& operator=(const Handle(GEOMImpl_MirrorDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_MirrorDriver)& operator=(const GEOMImpl_MirrorDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_MirrorDriver* operator->() + { + return (GEOMImpl_MirrorDriver *)ControlAccess(); + } + + GEOMImpl_MirrorDriver* operator->() const + { + return (GEOMImpl_MirrorDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_MirrorDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_MirrorDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_MirrorDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_MirrorDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_MirrorDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_MirrorDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_MirrorDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_MirrorDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx new file mode 100644 index 000000000..5d82b97b4 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_OffsetDriver.cxx @@ -0,0 +1,128 @@ + +using namespace std; +#include "GEOMImpl_OffsetDriver.hxx" +#include "GEOMImpl_IOffset.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_OffsetDriver::GetID() +{ + static Standard_GUID aOffsetDriver("FF1BBB51-5D14-4df2-980B-3A668264EA16"); + return aOffsetDriver; +} + + +//======================================================================= +//function : GEOMImpl_OffsetDriver +//purpose : +//======================================================================= +GEOMImpl_OffsetDriver::GEOMImpl_OffsetDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_OffsetDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IOffset aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == OFFSET_SHAPE || aType == OFFSET_SHAPE_COPY) { + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + TopoDS_Shape aShapeBase = aRefShape->GetValue(); + Standard_Real anOffset = aCI.GetValue(); + Standard_Real aTol = Precision::Confusion(); + + if (Abs(anOffset) < aTol) { + TCollection_AsciiString aMsg ("Absolute value of offset can not be less than the tolerance value ("); + aMsg += TCollection_AsciiString(aTol); + aMsg += ")"; + StdFail_NotDone::Raise(aMsg.ToCString()); + } + + BRepOffsetAPI_MakeOffsetShape MO (aShapeBase, + aCI.GetValue(), + aTol); + if (MO.IsDone()) { + aShape = MO.Shape(); + } else { + StdFail_NotDone::Raise("Offset construction failed"); + } + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_OffsetDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_OffsetDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_OffsetDriver", + sizeof(GEOMImpl_OffsetDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_OffsetDriver) Handle(GEOMImpl_OffsetDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_OffsetDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_OffsetDriver))) { + _anOtherObject = Handle(GEOMImpl_OffsetDriver)((Handle(GEOMImpl_OffsetDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_OffsetDriver.hxx b/src/GEOMImpl/GEOMImpl_OffsetDriver.hxx new file mode 100644 index 000000000..a9d34d745 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_OffsetDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_OffsetDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_OffsetDriver_HeaderFile +#define _GEOMImpl_OffsetDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_OffsetDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_OffsetDriver); + +class Handle(GEOMImpl_OffsetDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_OffsetDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_OffsetDriver)(const Handle(GEOMImpl_OffsetDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_OffsetDriver)(const GEOMImpl_OffsetDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_OffsetDriver)& operator=(const Handle(GEOMImpl_OffsetDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_OffsetDriver)& operator=(const GEOMImpl_OffsetDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_OffsetDriver* operator->() + { + return (GEOMImpl_OffsetDriver *)ControlAccess(); + } + + GEOMImpl_OffsetDriver* operator->() const + { + return (GEOMImpl_OffsetDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_OffsetDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_OffsetDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_OffsetDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_OffsetDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_OffsetDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_OffsetDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_OffsetDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_OffsetDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx new file mode 100644 index 000000000..5f284c488 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -0,0 +1,224 @@ + +using namespace std; +#include "GEOMImpl_PartitionDriver.hxx" +#include "GEOMImpl_IPartition.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PartitionDriver::GetID() +{ + static Standard_GUID aPartitionDriver("FF1BBB22-5D14-4df2-980B-3A668264EA16"); + return aPartitionDriver; +} + + +//======================================================================= +//function : GEOMImpl_PartitionDriver +//purpose : +//======================================================================= +GEOMImpl_PartitionDriver::GEOMImpl_PartitionDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PartitionDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPartition aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == PARTITION_PARTITION) { + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + Handle(TColStd_HSequenceOfTransient) aTools = aCI.GetTools(); + Handle(TColStd_HSequenceOfTransient) aKeepIns = aCI.GetKeepIns(); + Handle(TColStd_HSequenceOfTransient) aRemIns = aCI.GetRemoveIns(); + Handle(TColStd_HArray1OfInteger) aMaterials = aCI.GetMaterials(); + Standard_Boolean DoRemoveWebs = !aMaterials.IsNull(); + + unsigned int ind, nbshapes = 0; + nbshapes += aShapes->Length() + aTools->Length(); + nbshapes += aKeepIns->Length() + aRemIns->Length(); + + NMTAlgo_Splitter1 PS; + TopTools_MapOfShape ShapesMap(nbshapes), ToolsMap(nbshapes); + + // add object shapes that are in ListShapes; + for (ind = 1; ind <= aShapes->Length(); ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("In Partition a shape is null"); + } + if (ShapesMap.Add(aShape_i)) { + PS.AddShape(aShape_i); + if (DoRemoveWebs) { + if (aMaterials->Length() >= ind) + PS.SetMaterial(aShape_i, aMaterials->Value(ind)); + } + } + } + + // add tool shapes that are in ListTools and not in ListShapes; + for (ind = 1; ind <= aTools->Length(); ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aTools->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("In Partition a tool shape is null"); + } + if (!ShapesMap.Contains(aShape_i) && ToolsMap.Add(aShape_i)) + PS.AddTool(aShape_i); + } + + // add shapes that are in ListKeepInside, as object shapes; + for (ind = 1; ind <= aKeepIns->Length(); ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aKeepIns->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("In Partition a Keep Inside shape is null"); + } + if (!ToolsMap.Contains(aShape_i) && ShapesMap.Add(aShape_i)) + PS.AddShape(aShape_i); + } + + // add shapes that are in ListRemoveInside, as object shapes; + for (ind = 1; ind <= aRemIns->Length(); ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aRemIns->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("In Partition a Remove Inside shape is null"); + } + if (!ToolsMap.Contains(aShape_i) && ShapesMap.Add(aShape_i)) + PS.AddShape(aShape_i); + } + + PS.Compute(); + PS.SetRemoveWebs(DoRemoveWebs); + PS.Build((TopAbs_ShapeEnum) aCI.GetLimit()); + + // suppress result outside of shapes in KInsideMap + for (ind = 1; ind <= aKeepIns->Length(); ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aKeepIns->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + PS.KeepShapesInside(aShape_i); + } + + // suppress result inside of shapes in RInsideMap + for (ind = 1; ind <= aRemIns->Length(); ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aRemIns->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + PS.RemoveShapesInside(aShape_i); + } + + aShape = PS.Shape(); + + if (!BRepAlgo::IsValid(aShape)) { + Standard_ConstructionError::Raise("Partition aborted : non valid shape result"); + } + } else if (aType == PARTITION_HALF) { + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + Handle(GEOM_Function) aRefPlane = aCI.GetPlane(); + TopoDS_Shape aShapeArg = aRefShape->GetValue(); + TopoDS_Shape aPlaneArg = aRefPlane->GetValue(); + + if (aShapeArg.IsNull() || aPlaneArg.IsNull()) { + Standard_NullObject::Raise("In Half Partition a shape or a plane is null"); + } + + NMTAlgo_Splitter1 PS; + + // add object shapes that are in ListShapes; + PS.AddShape(aShapeArg); + + // add tool shapes that are in ListTools and not in ListShapes; + PS.AddTool(aPlaneArg); + + PS.Compute(); + PS.SetRemoveWebs(Standard_False); + PS.Build(aShapeArg.ShapeType()); + + aShape = PS.Shape(); + + if (!BRepAlgo::IsValid(aShape)) { + Standard_ConstructionError::Raise("Partition aborted : non valid shape result"); + } + } + else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PartitionDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PartitionDriver", + sizeof(GEOMImpl_PartitionDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_PartitionDriver) Handle(GEOMImpl_PartitionDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PartitionDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PartitionDriver))) { + _anOtherObject = Handle(GEOMImpl_PartitionDriver)((Handle(GEOMImpl_PartitionDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.hxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.hxx new file mode 100644 index 000000000..f71c6a2ec --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_PartitionDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PartitionDriver_HeaderFile +#define _GEOMImpl_PartitionDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PartitionDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PartitionDriver); + +class Handle(GEOMImpl_PartitionDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PartitionDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PartitionDriver)(const Handle(GEOMImpl_PartitionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PartitionDriver)(const GEOMImpl_PartitionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PartitionDriver)& operator=(const Handle(GEOMImpl_PartitionDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PartitionDriver)& operator=(const GEOMImpl_PartitionDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PartitionDriver* operator->() + { + return (GEOMImpl_PartitionDriver *)ControlAccess(); + } + + GEOMImpl_PartitionDriver* operator->() const + { + return (GEOMImpl_PartitionDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PartitionDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PartitionDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PartitionDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PartitionDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PartitionDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PartitionDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PartitionDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PartitionDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.cxx b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx new file mode 100644 index 000000000..54b81eddc --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.cxx @@ -0,0 +1,139 @@ + +using namespace std; +#include "GEOMImpl_PipeDriver.hxx" +#include "GEOMImpl_IPipe.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PipeDriver::GetID() +{ + static Standard_GUID aPipeDriver("FF1BBB19-5D14-4df2-980B-3A668264EA16"); + return aPipeDriver; +} + + +//======================================================================= +//function : GEOMImpl_PipeDriver +//purpose : +//======================================================================= +GEOMImpl_PipeDriver::GEOMImpl_PipeDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PipeDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPipe aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == PIPE_BASE_PATH) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + Handle(GEOM_Function) aRefPath = aCI.GetPath(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + TopoDS_Shape aShapePath = aRefPath->GetValue(); + if (aShapeBase.IsNull() || aShapePath.IsNull()) { + Standard_NullObject::Raise("MakePipe aborted : null shape argument"); + } + + // Get path contour + TopoDS_Wire aWire; + if (aShapePath.ShapeType() == TopAbs_WIRE) { + aWire = TopoDS::Wire(aShapePath); + } else { + if (aShapePath.ShapeType() == TopAbs_EDGE) { + TopoDS_Edge anEdge = TopoDS::Edge(aShapePath); + aWire = BRepBuilderAPI_MakeWire(anEdge); + } else { + Standard_TypeMismatch::Raise("MakePipe aborted : path shape is neither a wire nor an edge"); + } + } + + // Make pipe + aShape = BRepOffsetAPI_MakePipe(aWire, aShapeBase); + } + else { + } + + if (aShape.IsNull()) return 0; + + BRepCheck_Analyzer ana (aShape, Standard_False); + if (!ana.IsValid()) { + Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result"); + } + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PipeDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PipeDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PipeDriver", + sizeof(GEOMImpl_PipeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_PipeDriver) Handle(GEOMImpl_PipeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PipeDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PipeDriver))) { + _anOtherObject = Handle(GEOMImpl_PipeDriver)((Handle(GEOMImpl_PipeDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_PipeDriver.hxx b/src/GEOMImpl/GEOMImpl_PipeDriver.hxx new file mode 100644 index 000000000..819b5b143 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PipeDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_PipeDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PipeDriver_HeaderFile +#define _GEOMImpl_PipeDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PipeDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PipeDriver); + +class Handle(GEOMImpl_PipeDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PipeDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PipeDriver)(const Handle(GEOMImpl_PipeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PipeDriver)(const GEOMImpl_PipeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PipeDriver)& operator=(const Handle(GEOMImpl_PipeDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PipeDriver)& operator=(const GEOMImpl_PipeDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PipeDriver* operator->() + { + return (GEOMImpl_PipeDriver *)ControlAccess(); + } + + GEOMImpl_PipeDriver* operator->() const + { + return (GEOMImpl_PipeDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PipeDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PipeDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PipeDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PipeDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PipeDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PipeDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PipeDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PipeDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx b/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx new file mode 100644 index 000000000..510d7a291 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PlaneDriver.cxx @@ -0,0 +1,163 @@ + +using namespace std; +#include "GEOMImpl_PlaneDriver.hxx" +#include "GEOMImpl_IPlane.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PlaneDriver::GetID() +{ + static Standard_GUID aPlaneDriver("FF1BBB05-5D14-4df2-980B-3A668264EA16"); + return aPlaneDriver; +} + + +//======================================================================= +//function : GEOMImpl_PlaneDriver +//purpose : +//======================================================================= +GEOMImpl_PlaneDriver::GEOMImpl_PlaneDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PlaneDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPlane aPI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + double aSize = aPI.GetSize() / 2.0; + if (aType == PLANE_PNT_VEC) { + Handle(GEOM_Function) aRefPnt = aPI.GetPoint(); + Handle(GEOM_Function) aRefVec = aPI.GetVector(); + TopoDS_Shape aShape1 = aRefPnt->GetValue(); + TopoDS_Shape aShape2 = aRefVec->GetValue(); + if (aShape1.ShapeType() != TopAbs_VERTEX || + aShape2.ShapeType() != TopAbs_EDGE) return 0; + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShape1)); + TopoDS_Edge anE = TopoDS::Edge(aShape2); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (!V1.IsNull() && !V2.IsNull()) { + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + gp_Pln aPln (aP, aV); + aShape = BRepBuilderAPI_MakeFace(aPln, -aSize, +aSize, -aSize, +aSize).Shape(); + } + } else if (aType == PLANE_THREE_PNT) { + Handle(GEOM_Function) aRefPnt1 = aPI.GetPoint1(); + Handle(GEOM_Function) aRefPnt2 = aPI.GetPoint2(); + Handle(GEOM_Function) aRefPnt3 = aPI.GetPoint3(); + TopoDS_Shape aShape1 = aRefPnt1->GetValue(); + TopoDS_Shape aShape2 = aRefPnt2->GetValue(); + TopoDS_Shape aShape3 = aRefPnt3->GetValue(); + if (aShape1.ShapeType() != TopAbs_VERTEX || + aShape2.ShapeType() != TopAbs_VERTEX || + aShape3.ShapeType() != TopAbs_VERTEX) return 0; + gp_Pnt aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2)); + gp_Pnt aP3 = BRep_Tool::Pnt(TopoDS::Vertex(aShape3)); + if (aP1.Distance(aP2) < gp::Resolution() || + aP1.Distance(aP3) < gp::Resolution() || + aP2.Distance(aP3) < gp::Resolution()) + Standard_ConstructionError::Raise("Plane creation aborted: coincident points given"); + if (gp_Vec(aP1, aP2).IsParallel(gp_Vec(aP1, aP3), Precision::Angular())) + Standard_ConstructionError::Raise("Plane creation aborted: points lay on one line"); + GC_MakePlane aMakePlane (aP1, aP2, aP3); + aShape = BRepBuilderAPI_MakeFace(aMakePlane, -aSize, +aSize, -aSize, +aSize).Shape(); + } else if (aType == PLANE_FACE) { + Handle(GEOM_Function) aRef = aPI.GetFace(); + TopoDS_Shape aRefShape = aRef->GetValue(); + if (aRefShape.ShapeType() != TopAbs_FACE) return 0; + Handle(Geom_Surface) aGS = BRep_Tool::Surface(TopoDS::Face(aRefShape)); + if (!aGS->IsKind(STANDARD_TYPE(Geom_Plane))) { + Standard_TypeMismatch::Raise("Plane creation aborted: non-planar face given as argument"); + } + aShape = BRepBuilderAPI_MakeFace(aGS, -aSize, +aSize, -aSize, +aSize).Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PlaneDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PlaneDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PlaneDriver", + sizeof(GEOMImpl_PlaneDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_PlaneDriver) Handle(GEOMImpl_PlaneDriver)::DownCast + (const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PlaneDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PlaneDriver))) { + _anOtherObject = Handle(GEOMImpl_PlaneDriver)((Handle(GEOMImpl_PlaneDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_PlaneDriver.hxx b/src/GEOMImpl/GEOMImpl_PlaneDriver.hxx new file mode 100644 index 000000000..8245b280a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PlaneDriver.hxx @@ -0,0 +1,138 @@ +// File : GEOMImpl_PlaneDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PlaneDriver_HeaderFile +#define _GEOMImpl_PlaneDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PlaneDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PlaneDriver); + +class Handle(GEOMImpl_PlaneDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PlaneDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PlaneDriver)(const Handle(GEOMImpl_PlaneDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PlaneDriver)(const GEOMImpl_PlaneDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PlaneDriver)& operator=(const Handle(GEOMImpl_PlaneDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PlaneDriver)& operator=(const GEOMImpl_PlaneDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PlaneDriver* operator->() + { + return (GEOMImpl_PlaneDriver *)ControlAccess(); + } + + GEOMImpl_PlaneDriver* operator->() const + { + return (GEOMImpl_PlaneDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PlaneDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PlaneDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PlaneDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PlaneDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PlaneDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PlaneDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PlaneDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PlaneDriver) == AType || TFunction_Driver::IsKind(AType)); } + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PointDriver.cxx b/src/GEOMImpl/GEOMImpl_PointDriver.cxx new file mode 100644 index 000000000..98a839b58 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PointDriver.cxx @@ -0,0 +1,138 @@ + +using namespace std; +#include "GEOMImpl_PointDriver.hxx" +#include "GEOMImpl_IPoint.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PointDriver::GetID() +{ + static Standard_GUID aPointDriver("FF1BBB02-5D14-4df2-980B-3A668264EA16"); + return aPointDriver; +} + + +//======================================================================= +//function : GEOMImpl_PointDriver +//purpose : +//======================================================================= +GEOMImpl_PointDriver::GEOMImpl_PointDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PointDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPoint aPI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + gp_Pnt aPnt; + + if (aType == POINT_XYZ) { + aPnt = gp_Pnt(aPI.GetX(), aPI.GetY(), aPI.GetZ()); + + } else if (aType == POINT_XYZ_REF) { + + Handle(GEOM_Function) aRefPoint = aPI.GetRef(); + TopoDS_Shape aRefShape = aRefPoint->GetValue(); + if (aRefShape.ShapeType() != TopAbs_VERTEX) { + Standard_TypeMismatch::Raise + ("Point creation aborted : referenced shape is not a vertex"); + } + gp_Pnt P = BRep_Tool::Pnt(TopoDS::Vertex(aRefShape)); + aPnt = gp_Pnt(P.X() + aPI.GetX(), P.Y() + aPI.GetY(), P.Z() + aPI.GetZ()); + + } else if (aType == POINT_CURVE_PAR) { + + Handle(GEOM_Function) aRefCurve = aPI.GetCurve(); + TopoDS_Shape aRefShape = aRefCurve->GetValue(); + if (aRefShape.ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise + ("Point On Curve creation aborted : curve shape is not an edge"); + } + Standard_Real aFP, aLP, aP; + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(TopoDS::Edge(aRefShape), aFP, aLP); + aP = aFP + (aLP - aFP) * aPI.GetParameter(); + aPnt = aCurve->Value(aP); + + } else { + return 0; + } + + BRepBuilderAPI_MakeVertex mkVertex (aPnt); + TopoDS_Shape aShape = mkVertex.Shape(); + aShape.Infinite(Standard_True); + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PointDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PointDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PointDriver", + sizeof(GEOMImpl_PointDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_PointDriver) Handle(GEOMImpl_PointDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PointDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PointDriver))) { + _anOtherObject = Handle(GEOMImpl_PointDriver)((Handle(GEOMImpl_PointDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_PointDriver.hxx b/src/GEOMImpl/GEOMImpl_PointDriver.hxx new file mode 100644 index 000000000..13bcb999f --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PointDriver.hxx @@ -0,0 +1,138 @@ +// File : GEOMImpl_PointDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PointDriver_HeaderFile +#define _GEOMImpl_PointDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PointDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PointDriver); + +class Handle(GEOMImpl_PointDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PointDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PointDriver)(const Handle(GEOMImpl_PointDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PointDriver)(const GEOMImpl_PointDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PointDriver)& operator=(const Handle(GEOMImpl_PointDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PointDriver)& operator=(const GEOMImpl_PointDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PointDriver* operator->() + { + return (GEOMImpl_PointDriver *)ControlAccess(); + } + + GEOMImpl_PointDriver* operator->() const + { + return (GEOMImpl_PointDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PointDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PointDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PointDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PointDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PointDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PointDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PointDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PointDriver) == AType || TFunction_Driver::IsKind(AType)); } + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx new file mode 100644 index 000000000..83dde5be4 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx @@ -0,0 +1,124 @@ + +using namespace std; +#include "GEOMImpl_PolylineDriver.hxx" +#include "GEOMImpl_IPolyline.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PolylineDriver::GetID() +{ + static Standard_GUID aPolylineDriver("FF1BBB31-5D14-4df2-980B-3A668264EA16"); + return aPolylineDriver; +} + + +//======================================================================= +//function : GEOMImpl_PolylineDriver +//purpose : +//======================================================================= +GEOMImpl_PolylineDriver::GEOMImpl_PolylineDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPolyline aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == POLYLINE_POINTS) { + int aLen = aCI.GetLength(); + int ind = 1; + BRepBuilderAPI_MakePolygon aMakePoly; + for (; ind <= aLen; ind++) + { + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + if (aShapePnt.ShapeType() == TopAbs_VERTEX) { + aMakePoly.Add(TopoDS::Vertex(aShapePnt)); +// if (!aMakePoly.Added()) return 0; + } + } + if (false) aMakePoly.Close(); + if (aMakePoly.IsDone()) { + aShape = aMakePoly.Wire(); + } + } + else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PolylineDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PolylineDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PolylineDriver", + sizeof(GEOMImpl_PolylineDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_PolylineDriver) Handle(GEOMImpl_PolylineDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PolylineDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PolylineDriver))) { + _anOtherObject = Handle(GEOMImpl_PolylineDriver)((Handle(GEOMImpl_PolylineDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_PolylineDriver.hxx b/src/GEOMImpl/GEOMImpl_PolylineDriver.hxx new file mode 100644 index 000000000..3a6a2bd77 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PolylineDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_PolylineDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PolylineDriver_HeaderFile +#define _GEOMImpl_PolylineDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PolylineDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PolylineDriver); + +class Handle(GEOMImpl_PolylineDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PolylineDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PolylineDriver)(const Handle(GEOMImpl_PolylineDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PolylineDriver)(const GEOMImpl_PolylineDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PolylineDriver)& operator=(const Handle(GEOMImpl_PolylineDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PolylineDriver)& operator=(const GEOMImpl_PolylineDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PolylineDriver* operator->() + { + return (GEOMImpl_PolylineDriver *)ControlAccess(); + } + + GEOMImpl_PolylineDriver* operator->() const + { + return (GEOMImpl_PolylineDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PolylineDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PolylineDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PolylineDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PolylineDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PolylineDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PolylineDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PolylineDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PolylineDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PositionDriver.cxx b/src/GEOMImpl/GEOMImpl_PositionDriver.cxx new file mode 100644 index 000000000..8bbf2e3bd --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PositionDriver.cxx @@ -0,0 +1,173 @@ + +using namespace std; +#include "GEOMImpl_PositionDriver.hxx" +#include "GEOMImpl_IPosition.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PositionDriver::GetID() +{ + static Standard_GUID aPositionDriver("FF1BBB69-5D14-4df2-980B-3A668264EA16"); + return aPositionDriver; +} + + +//======================================================================= +//function : GEOMImpl_PositionDriver +//purpose : +//======================================================================= +GEOMImpl_PositionDriver::GEOMImpl_PositionDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PositionDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPosition aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == POSITION_SHAPE || aType == POSITION_SHAPE_COPY) { + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + Handle(GEOM_Function) aRefStartLCS = aCI.GetStartLCS(); + Handle(GEOM_Function) aRefEndLCS = aCI.GetEndLCS(); + + TopoDS_Shape aShapeBase = aRefShape->GetValue(); + TopoDS_Shape aShapeStartLCS = aRefStartLCS->GetValue(); + TopoDS_Shape aShapeEndLCS = aRefEndLCS->GetValue(); + + if (aShapeBase.IsNull() || aShapeStartLCS.IsNull() || + aShapeEndLCS.IsNull() || aShapeEndLCS.ShapeType() != TopAbs_FACE) + return 0; + + gp_Trsf aTrsf; + gp_Ax3 aStartAx3, aDestAx3; + aStartAx3.Transform(aShapeStartLCS.Location().Transformation()); + aDestAx3.Transform(aShapeEndLCS.Location().Transformation()); + + Handle(Geom_Surface) aGS2 = BRep_Tool::Surface( TopoDS::Face( aShapeEndLCS ) ); + if (!aGS2.IsNull() && aGS2->IsKind( STANDARD_TYPE( Geom_Plane ) ) ) { + Handle(Geom_Plane) aGPlane2 = Handle(Geom_Plane)::DownCast( aGS2 ); + gp_Pln aPln2 = aGPlane2->Pln(); + aDestAx3 = aPln2.Position(); + } + + if(aShapeStartLCS.ShapeType() == TopAbs_FACE) { + Handle(Geom_Surface) aGS = BRep_Tool::Surface( TopoDS::Face( aShapeStartLCS ) ); + if (!aGS.IsNull() && aGS->IsKind( STANDARD_TYPE( Geom_Plane ) ) ) { + Handle(Geom_Plane) aGPlane = Handle(Geom_Plane)::DownCast( aGS ); + gp_Pln aPln = aGPlane->Pln(); + aStartAx3 = aPln.Position(); + } + aTrsf.SetDisplacement(aStartAx3, aDestAx3); + } + else { + gp_Trsf aTrsf1, aTrsf2; + aTrsf1.SetDisplacement(aStartAx3, aDestAx3); + BRepBuilderAPI_Transform aBT (aShapeBase, aTrsf1, Standard_False); + TopoDS_Shape aNewShape = aBT.Shape(); + + gp_Pnt aPnt; + if (aNewShape.ShapeType() == TopAbs_VERTEX) { + aPnt = BRep_Tool::Pnt(TopoDS::Vertex(aNewShape)); + } + else { + GProp_GProps aSystem; + if (aNewShape.ShapeType() == TopAbs_EDGE || aNewShape.ShapeType() == TopAbs_WIRE) + BRepGProp::LinearProperties(aNewShape, aSystem); + else if (aNewShape.ShapeType() == TopAbs_FACE || aNewShape.ShapeType() == TopAbs_SHELL) + BRepGProp::SurfaceProperties(aNewShape, aSystem); + else + BRepGProp::VolumeProperties(aNewShape, aSystem); + + aPnt = aSystem.CentreOfMass(); + } + + gp_Vec aVec(aPnt, aDestAx3.Location()); + aTrsf2.SetTranslation(aVec); + aTrsf = aTrsf2 * aTrsf1; + } + + BRepBuilderAPI_Transform aBRepTrsf (aShapeBase, aTrsf, Standard_False); + aShape = aBRepTrsf.Shape(); + } + else + return 0; + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PositionDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PositionDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PositionDriver", + sizeof(GEOMImpl_PositionDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_PositionDriver) Handle(GEOMImpl_PositionDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PositionDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PositionDriver))) { + _anOtherObject = Handle(GEOMImpl_PositionDriver)((Handle(GEOMImpl_PositionDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_PositionDriver.hxx b/src/GEOMImpl/GEOMImpl_PositionDriver.hxx new file mode 100644 index 000000000..785fed132 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PositionDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_PositionDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PositionDriver_HeaderFile +#define _GEOMImpl_PositionDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PositionDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PositionDriver); + +class Handle(GEOMImpl_PositionDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PositionDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PositionDriver)(const Handle(GEOMImpl_PositionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PositionDriver)(const GEOMImpl_PositionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PositionDriver)& operator=(const Handle(GEOMImpl_PositionDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PositionDriver)& operator=(const GEOMImpl_PositionDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PositionDriver* operator->() + { + return (GEOMImpl_PositionDriver *)ControlAccess(); + } + + GEOMImpl_PositionDriver* operator->() const + { + return (GEOMImpl_PositionDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PositionDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PositionDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PositionDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PositionDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PositionDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PositionDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PositionDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PositionDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_PrismDriver.cxx b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx new file mode 100644 index 000000000..71b460c5a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PrismDriver.cxx @@ -0,0 +1,145 @@ + +using namespace std; +#include "GEOMImpl_PrismDriver.hxx" +#include "GEOMImpl_IPrism.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_PrismDriver::GetID() +{ + static Standard_GUID aPrismDriver("FF1BBB17-5D14-4df2-980B-3A668264EA16"); + return aPrismDriver; +} + + +//======================================================================= +//function : GEOMImpl_PrismDriver +//purpose : +//======================================================================= +GEOMImpl_PrismDriver::GEOMImpl_PrismDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_PrismDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IPrism aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == PRISM_BASE_VEC_H) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + Handle(GEOM_Function) aRefVector = aCI.GetVector(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + TopoDS_Shape aShapeVec = aRefVector->GetValue(); + if (aShapeVec.ShapeType() == TopAbs_EDGE) { + TopoDS_Edge anE = TopoDS::Edge(aShapeVec); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (!V1.IsNull() && !V2.IsNull()) { + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + if (Abs(aCI.GetH()) < Precision::Confusion()) { + Standard_ConstructionError::Raise("Absolute value of prism height is too small"); + } + if (aV.Magnitude() > Precision::Confusion()) { + aV.Normalize(); + aShape = BRepPrimAPI_MakePrism(aShapeBase, aV * aCI.GetH(), Standard_False).Shape(); + } + } + } + } else if (aType == PRISM_BASE_TWO_PNT) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + Handle(GEOM_Function) aRefPnt1 = aCI.GetFirstPoint(); + Handle(GEOM_Function) aRefPnt2 = aCI.GetLastPoint(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + TopoDS_Shape aShapePnt1 = aRefPnt1->GetValue(); + TopoDS_Shape aShapePnt2 = aRefPnt2->GetValue(); + if (aShapePnt1.ShapeType() == TopAbs_VERTEX && + aShapePnt2.ShapeType() == TopAbs_VERTEX) { + TopoDS_Vertex V1 = TopoDS::Vertex(aShapePnt1); + TopoDS_Vertex V2 = TopoDS::Vertex(aShapePnt2); + if (!V1.IsNull() && !V2.IsNull()) { + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + if (aV.Magnitude() > gp::Resolution()) { + aShape = BRepPrimAPI_MakePrism(aShapeBase, aV, Standard_False).Shape(); + } + } + } + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_PrismDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_PrismDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_PrismDriver", + sizeof(GEOMImpl_PrismDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_PrismDriver) Handle(GEOMImpl_PrismDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_PrismDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_PrismDriver))) { + _anOtherObject = Handle(GEOMImpl_PrismDriver)((Handle(GEOMImpl_PrismDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_PrismDriver.hxx b/src/GEOMImpl/GEOMImpl_PrismDriver.hxx new file mode 100644 index 000000000..7dcb76403 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_PrismDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_PrismDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_PrismDriver_HeaderFile +#define _GEOMImpl_PrismDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_PrismDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_PrismDriver); + +class Handle(GEOMImpl_PrismDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_PrismDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_PrismDriver)(const Handle(GEOMImpl_PrismDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_PrismDriver)(const GEOMImpl_PrismDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_PrismDriver)& operator=(const Handle(GEOMImpl_PrismDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_PrismDriver)& operator=(const GEOMImpl_PrismDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_PrismDriver* operator->() + { + return (GEOMImpl_PrismDriver *)ControlAccess(); + } + + GEOMImpl_PrismDriver* operator->() const + { + return (GEOMImpl_PrismDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_PrismDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_PrismDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_PrismDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_PrismDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_PrismDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_PrismDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_PrismDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_PrismDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx b/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx new file mode 100644 index 000000000..60222bcdf --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_RevolutionDriver.cxx @@ -0,0 +1,135 @@ + +using namespace std; +#include "GEOMImpl_RevolutionDriver.hxx" +#include "GEOMImpl_IRevolution.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_RevolutionDriver::GetID() +{ + static Standard_GUID aRevolutionDriver("FF1BBB18-5D14-4df2-980B-3A668264EA16"); + return aRevolutionDriver; +} + + +//======================================================================= +//function : GEOMImpl_RevolutionDriver +//purpose : +//======================================================================= +GEOMImpl_RevolutionDriver::GEOMImpl_RevolutionDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_RevolutionDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IRevolution aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == REVOLUTION_BASE_AXIS_ANGLE) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + Handle(GEOM_Function) aRefAxis = aCI.GetAxis(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + TopoDS_Shape aShapeAxis = aRefAxis->GetValue(); + if (aShapeAxis.ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise("Revolution Axis must be an edge"); + } + + TopoDS_Edge anE = TopoDS::Edge(aShapeAxis); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + Standard_ConstructionError::Raise("Bad edge for the Revolution Axis given"); + } + + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + if (aV.Magnitude() < Precision::Confusion()) { + Standard_ConstructionError::Raise + ("End vertices of edge, defining the Revolution Axis, are too close"); + } + + gp_Ax1 anAxis (BRep_Tool::Pnt(V1), aV); + BRepPrimAPI_MakeRevol MR (aShapeBase, anAxis, aCI.GetAngle(), Standard_False); + if (!MR.IsDone()) MR.Build(); + if (!MR.IsDone()) StdFail_NotDone::Raise("Revolution algorithm has failed"); + aShape = MR.Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_RevolutionDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_RevolutionDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RevolutionDriver", + sizeof(GEOMImpl_RevolutionDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_RevolutionDriver) Handle(GEOMImpl_RevolutionDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_RevolutionDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_RevolutionDriver))) { + _anOtherObject = Handle(GEOMImpl_RevolutionDriver)((Handle(GEOMImpl_RevolutionDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_RevolutionDriver.hxx b/src/GEOMImpl/GEOMImpl_RevolutionDriver.hxx new file mode 100644 index 000000000..e994b9381 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_RevolutionDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_RevolutionDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_RevolutionDriver_HeaderFile +#define _GEOMImpl_RevolutionDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_RevolutionDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_RevolutionDriver); + +class Handle(GEOMImpl_RevolutionDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_RevolutionDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_RevolutionDriver)(const Handle(GEOMImpl_RevolutionDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_RevolutionDriver)(const GEOMImpl_RevolutionDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_RevolutionDriver)& operator=(const Handle(GEOMImpl_RevolutionDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_RevolutionDriver)& operator=(const GEOMImpl_RevolutionDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_RevolutionDriver* operator->() + { + return (GEOMImpl_RevolutionDriver *)ControlAccess(); + } + + GEOMImpl_RevolutionDriver* operator->() const + { + return (GEOMImpl_RevolutionDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_RevolutionDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_RevolutionDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_RevolutionDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_RevolutionDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_RevolutionDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_RevolutionDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_RevolutionDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_RevolutionDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_RotateDriver.cxx b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx new file mode 100644 index 000000000..4f656dd5e --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_RotateDriver.cxx @@ -0,0 +1,243 @@ + +using namespace std; +#include "GEOMImpl_RotateDriver.hxx" +#include +#include +#include "GEOM_Function.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_RotateDriver::GetID() +{ + static Standard_GUID aRotateDriver("FF1BBB56-5D14-4df2-980B-3A668264EA16"); + return aRotateDriver; +} + + +//======================================================================= +//function : GEOMImpl_RotateDriver +//purpose : +//======================================================================= + +GEOMImpl_RotateDriver::GEOMImpl_RotateDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_RotateDriver::Execute(TFunction_Logbook& log) const +{ + if(Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + if(aFunction.IsNull()) return 0; + + GEOMImpl_IRotate RI(aFunction); + gp_Trsf aTrsf; + Standard_Integer aType = aFunction->GetType(); + Handle(GEOM_Function) anOriginalFunction = RI.GetOriginal(); + if(anOriginalFunction.IsNull()) return 0; + TopoDS_Shape aShape, anOriginal = anOriginalFunction->GetValue(); + if(anOriginal.IsNull()) return 0; + + if(aType == ROTATE || aType == ROTATE_COPY) { + Handle(GEOM_Function) anAxis = RI.GetAxis(); + if(anAxis.IsNull()) return 0; + TopoDS_Shape A = anAxis->GetValue(); + if(A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(A); + + gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge)); + gp_Dir aDir(gp_Vec(aP1, aP2)); + gp_Ax1 anAx1(aP1, aDir); + Standard_Real anAngle = RI.GetAngle(); + aTrsf.SetRotation(anAx1, anAngle); + + BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False); + aShape = aTransformation.Shape(); + } + else if(aType == ROTATE_1D) { + //Get direction + Handle(GEOM_Function) anAxis = RI.GetAxis(); + if(anAxis.IsNull()) return 0; + TopoDS_Shape A = anAxis->GetValue(); + if(A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(A); + + gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge)); + gp_Dir D(gp_Vec(aP1, aP2)) ; + + gp_Ax1 AX1(aP1, D) ; + + Standard_Integer nbtimes = RI.GetNbIter1(); + Standard_Real angle = 360.0/nbtimes ; + + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound( aCompound ); + + for (int i = 0; i < nbtimes; i++ ) { + aTrsf.SetRotation(AX1, i*angle*PI180) ; + BRepBuilderAPI_Transform myBRepTransformation(anOriginal, aTrsf, Standard_False) ; + B.Add( aCompound, myBRepTransformation.Shape() ); + } + + aShape = aCompound ; + } + else if(aType == ROTATE_2D) { + Standard_Real DX, DY, DZ ; + + //Get direction + Handle(GEOM_Function) anAxis = RI.GetAxis(); + if(anAxis.IsNull()) return 0; + TopoDS_Shape A = anAxis->GetValue(); + if(A.IsNull() || A.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(A); + gp_Pnt aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)); + gp_Pnt aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge)); + gp_Dir D(gp_Vec(aP1, aP2)) ; + + gp_Ax1 AX1(aP1, D) ; + + + gp_Trsf theTransformation1 ; + gp_Trsf theTransformation2 ; + gp_Pnt P1 ; + GProp_GProps System ; + + if ( anOriginal.ShapeType() == TopAbs_VERTEX) { + P1 = BRep_Tool::Pnt(TopoDS::Vertex( anOriginal )); + } + else if ( anOriginal.ShapeType() == TopAbs_EDGE || anOriginal.ShapeType() == TopAbs_WIRE ) { + BRepGProp::LinearProperties(anOriginal, System); + P1 = System.CentreOfMass() ; + } + else if ( anOriginal.ShapeType() == TopAbs_FACE || anOriginal.ShapeType() == TopAbs_SHELL ) { + BRepGProp::SurfaceProperties(anOriginal, System); + P1 = System.CentreOfMass() ; + } + else { + BRepGProp::VolumeProperties(anOriginal, System); + P1 = System.CentreOfMass() ; + } + + Handle(Geom_Line) Line = new Geom_Line(AX1); + gp_Pnt P2 = GeomAPI_ProjectPointOnCurve( P1, Line ) ; + + if ( P1.IsEqual(P2, Precision::Confusion() ) ) return 0; + + gp_Vec Vec(P1.X()-P2.X(), P1.Y()-P2.Y(), P1.Z()-P2.Z()) ; + Vec.Normalize(); + + Standard_Integer nbtimes2 = RI.GetNbIter2(); + Standard_Integer nbtimes1 = RI.GetNbIter1(); + Standard_Real step = RI.GetStep(); + Standard_Real ang = RI.GetAngle(); + + gp_Vec myVec ; + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound( aCompound ); + for (int i = 0; i < nbtimes2; i++ ) { + for (int j = 0; j < nbtimes1; j++ ) { + DX = i * step * Vec.X() ; + DY = i * step * Vec.Y() ; + DZ = i * step * Vec.Z() ; + myVec.SetCoord( DX, DY, DZ ) ; + theTransformation1.SetTranslation(myVec) ; + theTransformation2.SetRotation(AX1, j*ang*PI180) ; + BRepBuilderAPI_Transform myBRepTransformation1(anOriginal, theTransformation1, Standard_False) ; + BRepBuilderAPI_Transform myBRepTransformation2(myBRepTransformation1.Shape(), theTransformation2, Standard_False) ; + B.Add( aCompound, myBRepTransformation2.Shape() ); + } + } + + aShape = aCompound; + + } + else return 0; + + + + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_RotateDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_RotateDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_RotateDriver", + sizeof(GEOMImpl_RotateDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_RotateDriver) Handle(GEOMImpl_RotateDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_RotateDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_RotateDriver))) { + _anOtherObject = Handle(GEOMImpl_RotateDriver)((Handle(GEOMImpl_RotateDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_RotateDriver.hxx b/src/GEOMImpl/GEOMImpl_RotateDriver.hxx new file mode 100644 index 000000000..7db4c00dd --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_RotateDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_RotateDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_RotateDriver_HeaderFile +#define _GEOMImpl_RotateDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_RotateDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_RotateDriver); + +class Handle(GEOMImpl_RotateDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_RotateDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_RotateDriver)(const Handle(GEOMImpl_RotateDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_RotateDriver)(const GEOMImpl_RotateDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_RotateDriver)& operator=(const Handle(GEOMImpl_RotateDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_RotateDriver)& operator=(const GEOMImpl_RotateDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_RotateDriver* operator->() + { + return (GEOMImpl_RotateDriver *)ControlAccess(); + } + + GEOMImpl_RotateDriver* operator->() const + { + return (GEOMImpl_RotateDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_RotateDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_RotateDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_RotateDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_RotateDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_RotateDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_RotateDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_RotateDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_RotateDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx new file mode 100644 index 000000000..4e707cb72 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ScaleDriver.cxx @@ -0,0 +1,118 @@ + +using namespace std; +#include "GEOMImpl_ScaleDriver.hxx" +#include "GEOMImpl_IScale.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ScaleDriver::GetID() +{ + static Standard_GUID aScaleDriver("FF1BBB52-5D14-4df2-980B-3A668264EA16"); + return aScaleDriver; +} + + +//======================================================================= +//function : GEOMImpl_ScaleDriver +//purpose : +//======================================================================= +GEOMImpl_ScaleDriver::GEOMImpl_ScaleDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ScaleDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IScale aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == SCALE_SHAPE || aType == SCALE_SHAPE_COPY) { + Handle(GEOM_Function) aRefShape = aCI.GetShape(); + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); + TopoDS_Shape aShapeBase = aRefShape->GetValue(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + if (aShapeBase.IsNull() || aShapePnt.IsNull()) return 0; + if (aShapePnt.ShapeType() != TopAbs_VERTEX) return 0; + + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + gp_Trsf aTrsf; + aTrsf.SetScale(aP, aCI.GetFactor()); + BRepBuilderAPI_Transform aBRepTrsf (aShapeBase, aTrsf, Standard_False); + aShape = aBRepTrsf.Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ScaleDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ScaleDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ScaleDriver", + sizeof(GEOMImpl_ScaleDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ScaleDriver) Handle(GEOMImpl_ScaleDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ScaleDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ScaleDriver))) { + _anOtherObject = Handle(GEOMImpl_ScaleDriver)((Handle(GEOMImpl_ScaleDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ScaleDriver.hxx b/src/GEOMImpl/GEOMImpl_ScaleDriver.hxx new file mode 100644 index 000000000..a2fc5907b --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ScaleDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ScaleDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ScaleDriver_HeaderFile +#define _GEOMImpl_ScaleDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ScaleDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ScaleDriver); + +class Handle(GEOMImpl_ScaleDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ScaleDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ScaleDriver)(const Handle(GEOMImpl_ScaleDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ScaleDriver)(const GEOMImpl_ScaleDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ScaleDriver)& operator=(const Handle(GEOMImpl_ScaleDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ScaleDriver)& operator=(const GEOMImpl_ScaleDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ScaleDriver* operator->() + { + return (GEOMImpl_ScaleDriver *)ControlAccess(); + } + + GEOMImpl_ScaleDriver* operator->() const + { + return (GEOMImpl_ScaleDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ScaleDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ScaleDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ScaleDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ScaleDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ScaleDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ScaleDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ScaleDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ScaleDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx new file mode 100644 index 000000000..09e2190a9 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -0,0 +1,352 @@ + +using namespace std; +#include "GEOMImpl_ShapeDriver.hxx" +#include "GEOMImpl_IShapes.hxx" +#include "GEOMImpl_IShapesOperations.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_ShapeDriver::GetID() +{ + static Standard_GUID aShapeDriver("FF1BBB54-5D14-4df2-980B-3A668264EA16"); + return aShapeDriver; +} + + +//======================================================================= +//function : GEOMImpl_ShapeDriver +//purpose : +//======================================================================= +GEOMImpl_ShapeDriver::GEOMImpl_ShapeDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_ShapeDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IShapes aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + BRep_Builder B; + + if (aType == WIRE_EDGES) { + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + unsigned int ind, nbshapes = aShapes->Length(); + + // add edges + BRepBuilderAPI_MakeWire MW; + for (ind = 1; ind <= nbshapes; ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("Shape for wire construction is null"); + } + if (aShape_i.ShapeType() == TopAbs_EDGE) + MW.Add(TopoDS::Edge(aShape_i)); + else if (aShape_i.ShapeType() == TopAbs_WIRE) + MW.Add(TopoDS::Wire(aShape_i)); + else + Standard_TypeMismatch::Raise + ("Shape for wire construction is neither an edge nor a wire"); + } + + if (!MW.IsDone()) { + Standard_ConstructionError::Raise("Wire construction failed"); + } + aShape = MW; + + } else if (aType == FACE_WIRE) { + Handle(GEOM_Function) aRefBase = aCI.GetBase(); + TopoDS_Shape aShapeBase = aRefBase->GetValue(); + if (aShapeBase.IsNull() || aShapeBase.ShapeType() != TopAbs_WIRE) { + Standard_NullObject::Raise + ("Shape for face construction is null or not a wire"); + } + TopoDS_Wire W = TopoDS::Wire(aShapeBase); + BRepBuilderAPI_MakeFace MF (W, aCI.GetIsPlanar()); + if (!MF.IsDone()) { + Standard_ConstructionError::Raise("Face construction failed"); + } + aShape = MF.Shape(); + + } else if (aType == FACE_WIRES) { + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + + // first wire + 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"); + } + TopoDS_Wire W = TopoDS::Wire(aWire); + + // basic face + BRepBuilderAPI_MakeFace MF (W, aCI.GetIsPlanar()); + if (!MF.IsDone()) { + Standard_ConstructionError::Raise("Face construction failed"); + } + TopoDS_Shape FFace = MF.Shape(); + if (!FFace.IsNull()) { + unsigned int ind, nbshapes = aShapes->Length(); + if (nbshapes == 1) { + aShape = FFace; + + } else if (nbshapes >= 2) { + TopoDS_Compound C; + BRep_Builder aBuilder; + aBuilder.MakeCompound(C); + BRepAlgo_FaceRestrictor FR; + + TopAbs_Orientation OriF = FFace.Orientation(); + TopoDS_Shape aLocalS = FFace.Oriented(TopAbs_FORWARD); + FR.Init(TopoDS::Face(aLocalS), Standard_False, Standard_True); + + for (ind = 1; ind <= nbshapes; ind++) { + 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)); + } + + FR.Perform(); + + if (FR.IsDone()) { + int k = 0; + TopoDS_Shape aFace; + for (; FR.More(); FR.Next()) { + aFace = FR.Current().Oriented(OriF); + aBuilder.Add(C, aFace); + k++; + } + if (k == 1) { + aShape = aFace; + } else { + aShape = C; + } + } + } + } + } else if (aType == SHELL_FACES) { + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + unsigned int ind, nbshapes = aShapes->Length(); + + // add faces + BRepAlgo_Sewing aSewing(Precision::Confusion()*10.0); + for (ind = 1; ind <= nbshapes; ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("Face for shell construction is null"); + } + aSewing.Add(aShape_i); + } + + aSewing.Perform(); + + TopExp_Explorer exp (aSewing.SewedShape(), TopAbs_SHELL); + Standard_Integer ish = 0; + for (; exp.More(); exp.Next()) { + aShape = exp.Current(); + ish++; + } + + if (ish != 1) + aShape = aSewing.SewedShape(); + + } else if (aType == SOLID_SHELL) { + Handle(GEOM_Function) aRefShell = aCI.GetBase(); + TopoDS_Shape aShapeShell = aRefShell->GetValue(); + if (aShapeShell.IsNull() || aShapeShell.ShapeType() != TopAbs_SHELL) { + Standard_NullObject::Raise("Shape for solid construction is null or not a shell"); + } + + BRepCheck_Shell chkShell(TopoDS::Shell(aShapeShell)); + if(chkShell.Closed() == BRepCheck_NotClosed) return 0; + + TopoDS_Solid Sol; + B.MakeSolid(Sol); + B.Add(Sol, aShapeShell); + BRepClass3d_SolidClassifier SC (Sol); + SC.PerformInfinitePoint(Precision::Confusion()); + if (SC.State() == TopAbs_IN) { + B.MakeSolid(Sol); + B.Add(Sol, aShapeShell.Reversed()); + } + + aShape = Sol; + + } else if (aType == SOLID_SHELLS) { + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + unsigned int ind, nbshapes = aShapes->Length(); + Standard_Integer ish = 0; + TopoDS_Solid Sol; + TopoDS_Compound Res; + B.MakeCompound(Res); + + // add shapes + for (ind = 1; ind <= nbshapes; ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); + TopoDS_Shape aShapeShell = aRefShape->GetValue(); + if (aShapeShell.IsNull()) { + Standard_NullObject::Raise("Shell for solid construction is null"); + } + if (aShapeShell.ShapeType() == TopAbs_SHELL) { + B.MakeSolid(Sol); + B.Add(Sol, aShapeShell); + BRepClass3d_SolidClassifier SC (Sol); + SC.PerformInfinitePoint(Precision::Confusion()); + if (SC.State() == TopAbs_IN) { + B.MakeSolid(Sol); + B.Add(Sol, aShapeShell.Reversed()); + } + B.Add(Res, Sol); + ish++; + } + } + if (ish == 1) aShape = Sol; + else aShape = Res; + + } else if (aType == COMPOUND_SHAPES) { + Handle(TColStd_HSequenceOfTransient) aShapes = aCI.GetShapes(); + unsigned int ind, nbshapes = aShapes->Length(); + + // add shapes + TopoDS_Compound C; + B.MakeCompound(C); + for (ind = 1; ind <= nbshapes; ind++) { + Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind)); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("Shape for compound construction is null"); + } + B.Add(C, aShape_i); + } + + aShape = C; + + } else if (aType == REVERSE_ORIENTATION) { + Handle(GEOM_Function) aRefShape = aCI.GetBase(); + TopoDS_Shape aShape_i = aRefShape->GetValue(); + if (aShape_i.IsNull()) { + Standard_NullObject::Raise("Shape for reverse is null"); + } + + BRepBuilderAPI_Copy Copy(aShape_i); + if( Copy.IsDone() ) { + TopoDS_Shape tds = Copy.Shape(); + if( tds.IsNull() ) { + Standard_ConstructionError::Raise("Orientation aborted : Can not reverse the shape"); + } + + if( tds.Orientation() == TopAbs_FORWARD) + tds.Orientation(TopAbs_REVERSED) ; + else + tds.Orientation(TopAbs_FORWARD) ; + + aShape = tds; + } + } + + if (aShape.IsNull()) return 0; + + // Check shape validity + BRepCheck_Analyzer ana (aShape, false); + if (!ana.IsValid()) { + Standard_ConstructionError::Raise("Algorithm have produced an invalid shape result"); + } + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_ShapeDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_ShapeDriver", + sizeof(GEOMImpl_ShapeDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_ShapeDriver) Handle(GEOMImpl_ShapeDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_ShapeDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_ShapeDriver))) { + _anOtherObject = Handle(GEOMImpl_ShapeDriver)((Handle(GEOMImpl_ShapeDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.hxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.hxx new file mode 100644 index 000000000..191a176bc --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_ShapeDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_ShapeDriver_HeaderFile +#define _GEOMImpl_ShapeDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_ShapeDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_ShapeDriver); + +class Handle(GEOMImpl_ShapeDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_ShapeDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_ShapeDriver)(const Handle(GEOMImpl_ShapeDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_ShapeDriver)(const GEOMImpl_ShapeDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_ShapeDriver)& operator=(const Handle(GEOMImpl_ShapeDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_ShapeDriver)& operator=(const GEOMImpl_ShapeDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_ShapeDriver* operator->() + { + return (GEOMImpl_ShapeDriver *)ControlAccess(); + } + + GEOMImpl_ShapeDriver* operator->() const + { + return (GEOMImpl_ShapeDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_ShapeDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_ShapeDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_ShapeDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_ShapeDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_ShapeDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_ShapeDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_ShapeDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_ShapeDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx b/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx new file mode 100644 index 000000000..0b79130b2 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SketcherDriver.cxx @@ -0,0 +1,129 @@ + +using namespace std; +#include "GEOMImpl_SketcherDriver.hxx" +#include "GEOMImpl_ISketcher.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include + +#include + +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_SketcherDriver::GetID() +{ + static Standard_GUID aSketcherDriver("FF1BBB64-5D14-4df2-980B-3A668264EA16"); + return aSketcherDriver; +} + + +//======================================================================= +//function : GEOMImpl_SketcherDriver +//purpose : +//======================================================================= +GEOMImpl_SketcherDriver::GEOMImpl_SketcherDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_SketcherDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ISketcher aCI (aFunction); + //Standard_Integer aType = aFunction->GetType(); + + // retrieve the command + TCollection_AsciiString aCommand = aCI.GetCommand(); + if (aCommand.IsEmpty()) + return 0; + + TopoDS_Shape aShape; + + // create sketcher + Sketcher_Profile aProfile (aCommand.ToCString()); + + if (!aProfile.IsDone()) { + Standard_ConstructionError::Raise("Sketcher creation failed"); + } + + aShape = aProfile.GetShape(); + if (aShape.IsNull()) + return 0; + + gp_Trsf aTrans; + gp_Pnt aOrigin = gp_Pnt(aCI.GetWorkingPlane(1), aCI.GetWorkingPlane(2), aCI.GetWorkingPlane(3)); + gp_Dir aDirZ = gp_Dir(aCI.GetWorkingPlane(4), aCI.GetWorkingPlane(5), aCI.GetWorkingPlane(6)); + gp_Dir aDirX = gp_Dir(aCI.GetWorkingPlane(7), aCI.GetWorkingPlane(8), aCI.GetWorkingPlane(9)); + gp_Ax3 aWPlane = gp_Ax3(aOrigin, aDirZ, aDirX); + + aTrans.SetTransformation(aWPlane); + aTrans.Invert(); + BRepBuilderAPI_Transform aTransformation (aShape, aTrans, Standard_False); + aShape = aTransformation.Shape(); + + if (aShape.IsNull()) + return 0; + + // set the function result + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_SketcherDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_SketcherDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SketcherDriver", + sizeof(GEOMImpl_SketcherDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_SketcherDriver) Handle(GEOMImpl_SketcherDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_SketcherDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SketcherDriver))) { + _anOtherObject = Handle(GEOMImpl_SketcherDriver)((Handle(GEOMImpl_SketcherDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_SketcherDriver.hxx b/src/GEOMImpl/GEOMImpl_SketcherDriver.hxx new file mode 100644 index 000000000..de9cfd9e9 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SketcherDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_SketcherDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_SketcherDriver_HeaderFile +#define _GEOMImpl_SketcherDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_SketcherDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SketcherDriver); + +class Handle(GEOMImpl_SketcherDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_SketcherDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_SketcherDriver)(const Handle(GEOMImpl_SketcherDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_SketcherDriver)(const GEOMImpl_SketcherDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_SketcherDriver)& operator=(const Handle(GEOMImpl_SketcherDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_SketcherDriver)& operator=(const GEOMImpl_SketcherDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_SketcherDriver* operator->() + { + return (GEOMImpl_SketcherDriver *)ControlAccess(); + } + + GEOMImpl_SketcherDriver* operator->() const + { + return (GEOMImpl_SketcherDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_SketcherDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_SketcherDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_SketcherDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_SketcherDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_SketcherDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SketcherDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_SketcherDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_SketcherDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_SphereDriver.cxx b/src/GEOMImpl/GEOMImpl_SphereDriver.cxx new file mode 100644 index 000000000..af97bbc45 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SphereDriver.cxx @@ -0,0 +1,113 @@ + +using namespace std; +#include "GEOMImpl_SphereDriver.hxx" +#include "GEOMImpl_ISphere.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_SphereDriver::GetID() +{ + static Standard_GUID aSphereDriver("FF1BBB16-5D14-4df2-980B-3A668264EA16"); + return aSphereDriver; +} + + +//======================================================================= +//function : GEOMImpl_SphereDriver +//purpose : +//======================================================================= +GEOMImpl_SphereDriver::GEOMImpl_SphereDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_SphereDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ISphere aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == SPHERE_R) { + aShape = BRepPrimAPI_MakeSphere(aCI.GetR()).Shape(); + } + else if (aType == SPHERE_PNT_R) { + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + if (aShapePnt.ShapeType() == TopAbs_VERTEX) { + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + aShape = BRepPrimAPI_MakeSphere(aP, aCI.GetR()).Shape(); + } + } + else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_SphereDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_SphereDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SphereDriver", + sizeof(GEOMImpl_SphereDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_SphereDriver) Handle(GEOMImpl_SphereDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_SphereDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SphereDriver))) { + _anOtherObject = Handle(GEOMImpl_SphereDriver)((Handle(GEOMImpl_SphereDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_SphereDriver.hxx b/src/GEOMImpl/GEOMImpl_SphereDriver.hxx new file mode 100644 index 000000000..ea5a4b09a --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SphereDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_SphereDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_SphereDriver_HeaderFile +#define _GEOMImpl_SphereDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_SphereDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SphereDriver); + +class Handle(GEOMImpl_SphereDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_SphereDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_SphereDriver)(const Handle(GEOMImpl_SphereDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_SphereDriver)(const GEOMImpl_SphereDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_SphereDriver)& operator=(const Handle(GEOMImpl_SphereDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_SphereDriver)& operator=(const GEOMImpl_SphereDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_SphereDriver* operator->() + { + return (GEOMImpl_SphereDriver *)ControlAccess(); + } + + GEOMImpl_SphereDriver* operator->() const + { + return (GEOMImpl_SphereDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_SphereDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_SphereDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_SphereDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_SphereDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_SphereDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SphereDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_SphereDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_SphereDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_SplineDriver.cxx b/src/GEOMImpl/GEOMImpl_SplineDriver.cxx new file mode 100644 index 000000000..f63021373 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SplineDriver.cxx @@ -0,0 +1,156 @@ + +using namespace std; +#include "GEOMImpl_SplineDriver.hxx" +#include "GEOMImpl_ISpline.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +//#include +#include + +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_SplineDriver::GetID() +{ + static Standard_GUID aSplineDriver("FF1BBB33-5D14-4df2-980B-3A668264EA16"); + return aSplineDriver; +} + + +//======================================================================= +//function : GEOMImpl_SplineDriver +//purpose : +//======================================================================= +GEOMImpl_SplineDriver::GEOMImpl_SplineDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_SplineDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ISpline aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == SPLINE_BEZIER || aType == SPLINE_INTERPOLATION) { + int ind, aLen = aCI.GetLength(); + if (aLen < 2) return 0; + Standard_Boolean isSeveral = Standard_False; + gp_Pnt aPrevP; + TColgp_Array1OfPnt CurvePoints (1, aLen); + for (ind = 1; ind <= aLen; ind++) { + Handle(GEOM_Function) aRefPoint = aCI.GetPoint(ind); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + if (aShapePnt.ShapeType() == TopAbs_VERTEX) { + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + if (!isSeveral && ind > 1) { + if (aP.Distance(aPrevP) > Precision::Confusion()) { + isSeveral = Standard_True; + } + } + CurvePoints.SetValue(ind, aP); + aPrevP = aP; + } + } + if (aType == SPLINE_BEZIER) { + if (!isSeveral) { + Standard_ConstructionError::Raise("Points for Bezier Curve are too close"); + } + Handle(Geom_BezierCurve) GBC = new Geom_BezierCurve(CurvePoints); + aShape = BRepBuilderAPI_MakeEdge(GBC).Edge(); + } else { +// GeomAPI_PointsToBSpline GBC (CurvePoints); +// aShape = BRepBuilderAPI_MakeEdge(GBC).Edge(); + Handle(TColgp_HArray1OfPnt) aHCurvePoints = new TColgp_HArray1OfPnt(1, aLen); + for (ind = 1; ind <= aLen; ind++) { + aHCurvePoints->SetValue(ind, CurvePoints.Value(ind)); + } + GeomAPI_Interpolate GBC (aHCurvePoints, Standard_False, gp::Resolution()); + GBC.Perform(); + if (GBC.IsDone()) + aShape = BRepBuilderAPI_MakeEdge(GBC).Edge(); + else + return 0; + } + } + else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_SplineDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_SplineDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_SplineDriver", + sizeof(GEOMImpl_SplineDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_SplineDriver) Handle(GEOMImpl_SplineDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_SplineDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_SplineDriver))) { + _anOtherObject = Handle(GEOMImpl_SplineDriver)((Handle(GEOMImpl_SplineDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_SplineDriver.hxx b/src/GEOMImpl/GEOMImpl_SplineDriver.hxx new file mode 100644 index 000000000..c3c7d2db6 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_SplineDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_SplineDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_SplineDriver_HeaderFile +#define _GEOMImpl_SplineDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_SplineDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_SplineDriver); + +class Handle(GEOMImpl_SplineDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_SplineDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_SplineDriver)(const Handle(GEOMImpl_SplineDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_SplineDriver)(const GEOMImpl_SplineDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_SplineDriver)& operator=(const Handle(GEOMImpl_SplineDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_SplineDriver)& operator=(const GEOMImpl_SplineDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_SplineDriver* operator->() + { + return (GEOMImpl_SplineDriver *)ControlAccess(); + } + + GEOMImpl_SplineDriver* operator->() const + { + return (GEOMImpl_SplineDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_SplineDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_SplineDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_SplineDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_SplineDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_SplineDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_SplineDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_SplineDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_SplineDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_Template.cxx b/src/GEOMImpl/GEOMImpl_Template.cxx new file mode 100644 index 000000000..1db7d00d3 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Template.cxx @@ -0,0 +1,87 @@ + +using namespace std; +#include "GEOMImpl_Template.hxx" +#include "GEOM_Function.hxx" +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_Template::GetID() +{ + static Standard_GUID aTemplate("Insert the correct GUID here"); + return aTemplate; +} + + +//======================================================================= +//function : GEOMImpl_Template +//purpose : +//======================================================================= + +GEOMImpl_Template::GEOMImpl_Template() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_Template::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + if(aFunction.IsNull()) return 0; + + //Add implemetation here + + log.SetTouched(Label()); + return 1; +} + + +//======================================================================= +//function : GEOMImpl_Template_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_Template_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_Template", + sizeof(GEOMImpl_Template), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_Template) Handle(GEOMImpl_Template)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_Template) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_Template))) { + _anOtherObject = Handle(GEOMImpl_Template)((Handle(GEOMImpl_Template)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_Template.hxx b/src/GEOMImpl/GEOMImpl_Template.hxx new file mode 100644 index 000000000..d44f28c24 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Template.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_Template.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_Template_HeaderFile +#define _GEOMImpl_Template_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_Template; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_Template); + +class Handle(GEOMImpl_Template) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_Template)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_Template)(const Handle(GEOMImpl_Template)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_Template)(const GEOMImpl_Template* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_Template)& operator=(const Handle(GEOMImpl_Template)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_Template)& operator=(const GEOMImpl_Template* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_Template* operator->() + { + return (GEOMImpl_Template *)ControlAccess(); + } + + GEOMImpl_Template* operator->() const + { + return (GEOMImpl_Template *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_Template)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_Template) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_Template : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_Template(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_Template() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_Template_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_Template) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_Template) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_TorusDriver.cxx b/src/GEOMImpl/GEOMImpl_TorusDriver.cxx new file mode 100644 index 000000000..17b93936c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_TorusDriver.cxx @@ -0,0 +1,142 @@ + +using namespace std; +#include "GEOMImpl_TorusDriver.hxx" +#include "GEOMImpl_ITorus.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_TorusDriver::GetID() +{ + static Standard_GUID aTorusDriver("FF1BBB12-5D14-4df2-980B-3A668264EA16"); + return aTorusDriver; +} + + +//======================================================================= +//function : GEOMImpl_TorusDriver +//purpose : +//======================================================================= +GEOMImpl_TorusDriver::GEOMImpl_TorusDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_TorusDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_ITorus aCI (aFunction); + Standard_Integer aType = aFunction->GetType(); + + TopoDS_Shape aShape; + + if (aType == TORUS_RR) { + aShape = BRepPrimAPI_MakeTorus(aCI.GetRMajor(), aCI.GetRMinor()).Shape(); + + } else if (aType == TORUS_PNT_VEC_RR) { + Handle(GEOM_Function) aRefPoint = aCI.GetCenter(); + Handle(GEOM_Function) aRefVector = aCI.GetVector(); + TopoDS_Shape aShapePnt = aRefPoint->GetValue(); + TopoDS_Shape aShapeVec = aRefVector->GetValue(); + if (aShapePnt.ShapeType() != TopAbs_VERTEX) { + Standard_TypeMismatch::Raise("Torus Center must be a vertex"); + } + if (aShapeVec.ShapeType() != TopAbs_EDGE) { + Standard_TypeMismatch::Raise("Torus Axis must be an edge"); + } + + gp_Pnt aP = BRep_Tool::Pnt(TopoDS::Vertex(aShapePnt)); + TopoDS_Edge anE = TopoDS::Edge(aShapeVec); + TopoDS_Vertex V1, V2; + TopExp::Vertices(anE, V1, V2, Standard_True); + if (V1.IsNull() || V2.IsNull()) { + Standard_ConstructionError::Raise("Bad edge for the Torus Axis given"); + } + + gp_Vec aV (BRep_Tool::Pnt(V1), BRep_Tool::Pnt(V2)); + if (aV.Magnitude() < Precision::Confusion()) { + Standard_ConstructionError::Raise + ("End vertices of edge, defining the Torus Axis, are too close"); + } + + gp_Ax2 anAxes (aP, aV); + BRepPrimAPI_MakeTorus MT (anAxes, aCI.GetRMajor(), aCI.GetRMinor()); + if (!MT.IsDone()) MT.Build(); + if (!MT.IsDone()) StdFail_NotDone::Raise("Torus construction algorithm has failed"); + aShape = MT.Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_TorusDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_TorusDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TorusDriver", + sizeof(GEOMImpl_TorusDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_TorusDriver) Handle(GEOMImpl_TorusDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_TorusDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_TorusDriver))) { + _anOtherObject = Handle(GEOMImpl_TorusDriver)((Handle(GEOMImpl_TorusDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_TorusDriver.hxx b/src/GEOMImpl/GEOMImpl_TorusDriver.hxx new file mode 100644 index 000000000..d31eadb40 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_TorusDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_TorusDriver.ixx +// Module : GEOMImpl + +#ifndef _GEOMImpl_TorusDriver_HeaderFile +#define _GEOMImpl_TorusDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_TorusDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_TorusDriver); + +class Handle(GEOMImpl_TorusDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_TorusDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_TorusDriver)(const Handle(GEOMImpl_TorusDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_TorusDriver)(const GEOMImpl_TorusDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_TorusDriver)& operator=(const Handle(GEOMImpl_TorusDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_TorusDriver)& operator=(const GEOMImpl_TorusDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_TorusDriver* operator->() + { + return (GEOMImpl_TorusDriver *)ControlAccess(); + } + + GEOMImpl_TorusDriver* operator->() const + { + return (GEOMImpl_TorusDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_TorusDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_TorusDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_TorusDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_TorusDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_TorusDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_TorusDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_TorusDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_TorusDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx new file mode 100644 index 000000000..699209886 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx @@ -0,0 +1,223 @@ + +using namespace std; +#include "GEOMImpl_TranslateDriver.hxx" +#include +#include +#include "GEOM_Function.hxx" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_TranslateDriver::GetID() +{ + static Standard_GUID aTranslateDriver("FF1BBB03-5D14-4df2-980B-3A668264EA16"); + return aTranslateDriver; +} + + +//======================================================================= +//function : GEOMImpl_TranslateDriver +//purpose : +//======================================================================= + +GEOMImpl_TranslateDriver::GEOMImpl_TranslateDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const +{ + if(Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + if(aFunction.IsNull()) return 0; + + GEOMImpl_ITranslate TI(aFunction); + gp_Trsf aTrsf; + gp_Pnt aP1, aP2; + Standard_Integer aType = aFunction->GetType(); + + Handle(GEOM_Function) anOriginalFunction = TI.GetOriginal(); + if(anOriginalFunction.IsNull()) return 0; + TopoDS_Shape aShape, anOriginal = anOriginalFunction->GetValue(); + if(anOriginal.IsNull()) return 0; + + if(aType == TRANSLATE_TWO_POINTS || aType == TRANSLATE_TWO_POINTS_COPY) { + Handle(GEOM_Function) aPoint1 = TI.GetPoint1(); + Handle(GEOM_Function) aPoint2 = TI.GetPoint2(); + if(aPoint1.IsNull() || aPoint2.IsNull()) return 0; + TopoDS_Shape aV1 = aPoint1->GetValue(); + TopoDS_Shape aV2 = aPoint2->GetValue(); + if(aV1.IsNull() || aV1.ShapeType() != TopAbs_VERTEX) return 0; + if(aV2.IsNull() || aV2.ShapeType() != TopAbs_VERTEX) return 0; + + aP1 = BRep_Tool::Pnt(TopoDS::Vertex(aV1)); + aP2 = BRep_Tool::Pnt(TopoDS::Vertex(aV2)); + + aTrsf.SetTranslation(aP1, aP2); + BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False); + aShape = aTransformation.Shape(); + + } else if(aType == TRANSLATE_VECTOR || aType == TRANSLATE_VECTOR_COPY) { + Handle(GEOM_Function) aVector = TI.GetVector(); + if(aVector.IsNull()) return 0; + TopoDS_Shape aV = aVector->GetValue(); + if(aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(aV); + + aP1 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)); + aP2 = BRep_Tool::Pnt(TopExp::LastVertex(anEdge)); + + aTrsf.SetTranslation(aP1, aP2); + BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False); + aShape = aTransformation.Shape(); + } + else if(aType == TRANSLATE_XYZ || aType == TRANSLATE_XYZ_COPY) { + gp_Vec aVec(TI.GetDX(), TI.GetDY(), TI.GetDZ()); + aTrsf.SetTranslation(aVec); + BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False); + aShape = aTransformation.Shape(); + } + else if(aType == TRANSLATE_1D) { + Standard_Real DX, DY, DZ, step = TI.GetStep1(); + Standard_Integer nbtimes = TI.GetNbIter1(); + gp_Vec myVec ; + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound( aCompound ); + + Handle(GEOM_Function) aVector = TI.GetVector(); + if(aVector.IsNull()) return 0; + TopoDS_Shape aV = aVector->GetValue(); + if(aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(aV); + + gp_Vec Vec(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge))); + Vec.Normalize(); + + for (int i = 0; i < nbtimes; i++ ) { + DX = i * step * Vec.X() ; + DY = i * step * Vec.Y() ; + DZ = i * step * Vec.Z() ; + myVec.SetCoord( DX, DY, DZ ) ; + aTrsf.SetTranslation(myVec) ; + BRepBuilderAPI_Transform aTransformation(anOriginal, aTrsf, Standard_False) ; + B.Add(aCompound , aTransformation.Shape() ); + } + aShape = aCompound; + } + else if(aType == TRANSLATE_2D) { + Standard_Integer nbtimes1 = TI.GetNbIter1(), nbtimes2 = TI.GetNbIter2(); + Standard_Real DX, DY, DZ, step1 = TI.GetStep1(), step2 = TI.GetStep2(); + gp_Vec myVec ; + Handle(GEOM_Function) aVector = TI.GetVector(); + if(aVector.IsNull()) return 0; + TopoDS_Shape aV = aVector->GetValue(); + if(aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; + TopoDS_Edge anEdge = TopoDS::Edge(aV); + + gp_Vec Vec1(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge))); + Vec1.Normalize(); + + Handle(GEOM_Function) aVector2 = TI.GetVector2(); + if(aVector2.IsNull()) return 0; + aV = aVector2->GetValue(); + if(aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; + anEdge = TopoDS::Edge(aV); + + gp_Vec Vec2(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge))); + Vec2.Normalize(); + + TopoDS_Compound aCompound; + BRep_Builder B; + B.MakeCompound( aCompound ); + + for (int i = 0; i < nbtimes1; i++ ) { + for (int j = 0; j < nbtimes2; j++ ) { + DX = i * step1 * Vec1.X() + j * step2 * Vec2.X() ; + DY = i * step1 * Vec1.Y() + j * step2 * Vec2.Y() ; + DZ = i * step1 * Vec1.Z() + j * step2 * Vec2.Z() ; + myVec.SetCoord( DX, DY, DZ ) ; + aTrsf.SetTranslation(myVec) ; + BRepBuilderAPI_Transform myBRepTransformation(anOriginal, aTrsf, Standard_False) ; + B.Add(aCompound , myBRepTransformation.Shape() ); + } + } + aShape = aCompound; + } + else return 0; + + + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_TranslateDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_TranslateDriver", + sizeof(GEOMImpl_TranslateDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= + +const Handle(GEOMImpl_TranslateDriver) Handle(GEOMImpl_TranslateDriver)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_TranslateDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_TranslateDriver))) { + _anOtherObject = Handle(GEOMImpl_TranslateDriver)((Handle(GEOMImpl_TranslateDriver)&)AnObject); + } + } + + return _anOtherObject ; +} + + diff --git a/src/GEOMImpl/GEOMImpl_TranslateDriver.hxx b/src/GEOMImpl/GEOMImpl_TranslateDriver.hxx new file mode 100644 index 000000000..baceff741 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_TranslateDriver.hxx @@ -0,0 +1,139 @@ +// File : GEOMImpl_TranslateDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_TranslateDriver_HeaderFile +#define _GEOMImpl_TranslateDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_TranslateDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_TranslateDriver); + +class Handle(GEOMImpl_TranslateDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_TranslateDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_TranslateDriver)(const Handle(GEOMImpl_TranslateDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_TranslateDriver)(const GEOMImpl_TranslateDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_TranslateDriver)& operator=(const Handle(GEOMImpl_TranslateDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_TranslateDriver)& operator=(const GEOMImpl_TranslateDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_TranslateDriver* operator->() + { + return (GEOMImpl_TranslateDriver *)ControlAccess(); + } + + GEOMImpl_TranslateDriver* operator->() const + { + return (GEOMImpl_TranslateDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_TranslateDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_TranslateDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_TranslateDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_TranslateDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_TranslateDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_TranslateDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_TranslateDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_TranslateDriver) == AType || TFunction_Driver::IsKind(AType)); } + + +}; + +#endif diff --git a/src/GEOMImpl/GEOMImpl_Types.hxx b/src/GEOMImpl/GEOMImpl_Types.hxx new file mode 100755 index 000000000..fa8aed6dc --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_Types.hxx @@ -0,0 +1,208 @@ +//GEOM_Object types + +#define GEOM_COPY 0 +#define GEOM_IMPORT 1 + +#define GEOM_POINT 2 +#define GEOM_VECTOR 3 +#define GEOM_PLANE 4 +#define GEOM_LINE 5 + +#define GEOM_TORUS 6 +#define GEOM_BOX 7 +#define GEOM_CYLINDER 8 +#define GEOM_CONE 9 +#define GEOM_SPHERE 10 + +#define GEOM_PRISM 11 +#define GEOM_REVOLUTION 12 + +#define GEOM_BOOLEAN 13 +#define GEOM_PARTITION 14 + +#define GEOM_POLYLINE 15 +#define GEOM_CIRCLE 16 +#define GEOM_SPLINE 17 +#define GEOM_ELLIPSE 18 +#define GEOM_CIRC_ARC 19 + +#define GEOM_FILLET 20 +#define GEOM_CHAMFER 21 + +#define GEOM_EDGE 22 +#define GEOM_WIRE 23 +#define GEOM_FACE 24 +#define GEOM_SHELL 25 +#define GEOM_SOLID 26 +#define GEOM_COMPOUND 27 + +#define GEOM_SUBSHAPE 28 + +#define GEOM_PIPE 29 + +#define GEOM_ARCHIMEDE 30 + +#define GEOM_FILLING 31 + +#define GEOM_EXPLODE 32 + +#define GEOM_GLUED 33 + +#define GEOM_SKETCHER 34 + +#define GEOM_CDG 35 + +#define GEOM_FREE_BOUNDS 36 + +#define GEOM_GROUP 37 + +#define GEOM_BLOCK 38 + +#define GEOM_MARKER 39 + +//GEOM_Function types + +#define COPY_WITH_REF 1 +#define COPY_WITHOUT_REF 2 + +#define EXPORT_SHAPE 1 +#define IMPORT_SHAPE 1 + +#define POINT_XYZ 1 +#define POINT_XYZ_REF 2 +#define POINT_CURVE_PAR 3 + +#define VECTOR_TWO_PNT 1 +#define VECTOR_DX_DY_DZ 2 + +#define PLANE_PNT_VEC 1 +#define PLANE_FACE 2 +#define PLANE_THREE_PNT 3 + +#define LINE_TWO_PNT 1 +#define LINE_PNT_DIR 2 + +#define TRANSLATE_TWO_POINTS 1 +#define TRANSLATE_VECTOR 2 +#define TRANSLATE_TWO_POINTS_COPY 3 +#define TRANSLATE_VECTOR_COPY 4 +#define TRANSLATE_1D 5 +#define TRANSLATE_2D 6 +#define TRANSLATE_XYZ 7 +#define TRANSLATE_XYZ_COPY 8 + +#define ROTATE 1 +#define ROTATE_COPY 2 +#define ROTATE_1D 3 +#define ROTATE_2D 4 + +#define MIRROR_PLANE 1 +#define MIRROR_PLANE_COPY 2 +#define MIRROR_AXIS 3 +#define MIRROR_AXIS_COPY 4 +#define MIRROR_POINT 5 +#define MIRROR_POINT_COPY 6 + +#define OFFSET_SHAPE 1 +#define OFFSET_SHAPE_COPY 2 + +#define SCALE_SHAPE 1 +#define SCALE_SHAPE_COPY 2 + +#define POSITION_SHAPE 1 +#define POSITION_SHAPE_COPY 2 + +#define TORUS_RR 1 +#define TORUS_PNT_VEC_RR 2 + +#define BOX_DX_DY_DZ 1 +#define BOX_TWO_PNT 2 + +#define CYLINDER_R_H 1 +#define CYLINDER_PNT_VEC_R_H 2 + +#define CONE_R1_R2_H 1 +#define CONE_PNT_VEC_R1_R2_H 2 + +#define SPHERE_R 1 +#define SPHERE_PNT_R 2 + +#define PRISM_BASE_VEC_H 1 +#define PRISM_BASE_TWO_PNT 2 + +#define REVOLUTION_BASE_AXIS_ANGLE 1 + +#define PIPE_BASE_PATH 1 + +#define BOOLEAN_COMMON 1 +#define BOOLEAN_CUT 2 +#define BOOLEAN_FUSE 3 +#define BOOLEAN_SECTION 4 + +#define PARTITION_PARTITION 1 +#define PARTITION_HALF 2 + +#define POLYLINE_POINTS 1 + +#define CIRCLE_THREE_PNT 1 +#define CIRCLE_PNT_VEC_R 2 + +#define SPLINE_BEZIER 1 +#define SPLINE_INTERPOLATION 2 + +#define ELLIPSE_PNT_VEC_RR 1 + +#define CIRC_ARC_THREE_PNT 1 + +#define FILLET_SHAPE_ALL 1 +#define FILLET_SHAPE_EDGES 2 +#define FILLET_SHAPE_FACES 3 + +#define CHAMFER_SHAPE_ALL 1 +#define CHAMFER_SHAPE_EDGE 2 +#define CHAMFER_SHAPE_FACES 3 + +#define WIRE_EDGES 1 +#define FACE_WIRE 2 +#define SHELL_FACES 3 +#define SOLID_SHELL 4 +#define SOLID_SHELLS 5 +#define COMPOUND_SHAPES 6 +#define SUBSHAPE_SORTED 7 +#define SUBSHAPE_NOT_SORTED 8 +#define FACE_WIRES 9 +#define REVERSE_ORIENTATION 10 + +#define ARCHIMEDE_TYPE 1 + +// Shape Healing operators +#define SHAPE_PROCESS 1 +#define SUPPRESS_FACES 2 +#define CLOSE_CONTOUR 3 +#define REMOVE_INT_WIRES 4 +#define FILL_HOLES 5 +#define SEWING 6 +#define DIVIDE_EDGE 7 + +#define BASIC_FILLING 1 + +#define GLUE_FACES 1 + +#define SKETCHER_COMMAND 1 + +#define CDG_MEASURE 1 + +#define GROUP_FUNCTION 1 + +// Blocks +#define BLOCK_FACE_FOUR_PNT 1 +#define BLOCK_FACE_FOUR_EDGES 2 +#define BLOCK_FACE_TWO_EDGES 3 +#define BLOCK_SIX_FACES 4 +#define BLOCK_TWO_FACES 5 +#define BLOCK_MULTI_TRANSFORM_1D 6 +#define BLOCK_MULTI_TRANSFORM_2D 7 +#define BLOCK_COMPOUND_GLUE 8 + +// Marker +#define MARKER_CS 1 diff --git a/src/GEOMImpl/GEOMImpl_VectorDriver.cxx b/src/GEOMImpl/GEOMImpl_VectorDriver.cxx new file mode 100644 index 000000000..312fe4b23 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_VectorDriver.cxx @@ -0,0 +1,134 @@ + +using namespace std; +#include "GEOMImpl_VectorDriver.hxx" +#include "GEOMImpl_IVector.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOM_Function.hxx" + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +//======================================================================= +//function : GetID +//purpose : +//======================================================================= +const Standard_GUID& GEOMImpl_VectorDriver::GetID() +{ + static Standard_GUID aVectorDriver("FF1BBB04-5D14-4df2-980B-3A668264EA16"); + return aVectorDriver; +} + + +//======================================================================= +//function : GEOMImpl_VectorDriver +//purpose : +//======================================================================= +GEOMImpl_VectorDriver::GEOMImpl_VectorDriver() +{ +} + +//======================================================================= +//function : Execute +//purpose : +//======================================================================= +Standard_Integer GEOMImpl_VectorDriver::Execute(TFunction_Logbook& log) const +{ + if (Label().IsNull()) return 0; + Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label()); + + GEOMImpl_IVector aPI (aFunction); + Standard_Integer aType = aFunction->GetType(); + if (aType != VECTOR_DX_DY_DZ && aType != VECTOR_TWO_PNT) return 0; + + TopoDS_Shape aShape; + + if (aType == VECTOR_DX_DY_DZ) { + gp_Pnt P1 = gp::Origin(); + gp_Pnt P2 (aPI.GetDX(), aPI.GetDY(), aPI.GetDZ()); + if (P1.Distance(P2) < Precision::Confusion()) { + TCollection_AsciiString aMsg ("Can not build vector with length, less than "); + aMsg += TCollection_AsciiString(Precision::Confusion()); + Standard_ConstructionError::Raise(aMsg.ToCString()); + } + aShape = BRepBuilderAPI_MakeEdge(P1, P2).Shape(); + } else if (aType == VECTOR_TWO_PNT) { + Handle(GEOM_Function) aRefPnt1 = aPI.GetPoint1(); + Handle(GEOM_Function) aRefPnt2 = aPI.GetPoint2(); + TopoDS_Shape aShape1 = aRefPnt1->GetValue(); + TopoDS_Shape aShape2 = aRefPnt2->GetValue(); + if (aShape1.ShapeType() != TopAbs_VERTEX || + aShape2.ShapeType() != TopAbs_VERTEX) return 0; + if (aShape1.IsSame(aShape2)) { + Standard_ConstructionError::Raise("The end points must be different"); + } + gp_Pnt P1 = BRep_Tool::Pnt(TopoDS::Vertex(aShape1)); + gp_Pnt P2 = BRep_Tool::Pnt(TopoDS::Vertex(aShape2)); + if (P1.Distance(P2) < Precision::Confusion()) { + Standard_ConstructionError::Raise("The end points are too close"); + } + aShape = BRepBuilderAPI_MakeEdge(P1, P2).Shape(); + } else { + } + + if (aShape.IsNull()) return 0; + + aFunction->SetValue(aShape); + + log.SetTouched(Label()); + + return 1; +} + + +//======================================================================= +//function : GEOMImpl_VectorDriver_Type_ +//purpose : +//======================================================================= +Standard_EXPORT Handle_Standard_Type& GEOMImpl_VectorDriver_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_VectorDriver", + sizeof(GEOMImpl_VectorDriver), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + +//======================================================================= +//function : DownCast +//purpose : +//======================================================================= +const Handle(GEOMImpl_VectorDriver) Handle(GEOMImpl_VectorDriver)::DownCast + (const Handle(Standard_Transient)& AnObject) +{ + Handle(GEOMImpl_VectorDriver) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_VectorDriver))) { + _anOtherObject = Handle(GEOMImpl_VectorDriver)((Handle(GEOMImpl_VectorDriver)&)AnObject); + } + } + + return _anOtherObject ; +} diff --git a/src/GEOMImpl/GEOMImpl_VectorDriver.hxx b/src/GEOMImpl/GEOMImpl_VectorDriver.hxx new file mode 100644 index 000000000..7802c123c --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_VectorDriver.hxx @@ -0,0 +1,138 @@ +// File : GEOMImpl_VectorDriver.hxx +// Module : GEOMImpl + +#ifndef _GEOMImpl_VectorDriver_HeaderFile +#define _GEOMImpl_VectorDriver_HeaderFile + +#ifndef _TColStd_SequenceOfExtendedString_HeaderFile +#include +#endif +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_GUID_HeaderFile +#include +#endif + +#ifndef _Handle_TFunction_Driver_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TFunction_Driver); +class GEOMImpl_VectorDriver; + +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(GEOMImpl_VectorDriver); + +class Handle(GEOMImpl_VectorDriver) : public Handle(TFunction_Driver) { + public: + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + Handle(GEOMImpl_VectorDriver)():Handle(TFunction_Driver)() {} + Handle(GEOMImpl_VectorDriver)(const Handle(GEOMImpl_VectorDriver)& aHandle) : Handle(TFunction_Driver)(aHandle) + { + } + + Handle(GEOMImpl_VectorDriver)(const GEOMImpl_VectorDriver* anItem) : Handle(TFunction_Driver)((TFunction_Driver *)anItem) + { + } + + Handle(GEOMImpl_VectorDriver)& operator=(const Handle(GEOMImpl_VectorDriver)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(GEOMImpl_VectorDriver)& operator=(const GEOMImpl_VectorDriver* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + GEOMImpl_VectorDriver* operator->() + { + return (GEOMImpl_VectorDriver *)ControlAccess(); + } + + GEOMImpl_VectorDriver* operator->() const + { + return (GEOMImpl_VectorDriver *)ControlAccess(); + } + + Standard_EXPORT ~Handle(GEOMImpl_VectorDriver)() {}; + + Standard_EXPORT static const Handle(GEOMImpl_VectorDriver) DownCast(const Handle(Standard_Transient)& AnObject); +}; + +#ifndef _TFunction_Driver_HeaderFile +#include +#endif +#ifndef _TFunction_Logbook_HeaderFile +#include +#endif +#ifndef _Standard_CString_HeaderFile +#include +#endif + +class TColStd_SequenceOfExtendedString; + + +class GEOMImpl_VectorDriver : public TFunction_Driver { + +public: + + inline void* operator new(size_t,void* anAddress) + { + return anAddress; + } + inline void* operator new(size_t size) + { + return Standard::Allocate(size); + } + inline void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + + // Methods PUBLIC + // +Standard_EXPORT GEOMImpl_VectorDriver(); +Standard_EXPORT virtual Standard_Integer Execute(TFunction_Logbook& log) const; +Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {} +Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; } +Standard_EXPORT static const Standard_GUID& GetID(); +Standard_EXPORT ~GEOMImpl_VectorDriver() {}; + + + // Type management + // +Standard_EXPORT friend Handle_Standard_Type& GEOMImpl_VectorDriver_Type_(); +Standard_EXPORT const Handle(Standard_Type)& DynamicType() const { return STANDARD_TYPE(GEOMImpl_VectorDriver) ; } +Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)& AType) const { return (STANDARD_TYPE(GEOMImpl_VectorDriver) == AType || TFunction_Driver::IsKind(AType)); } + +}; + +#endif diff --git a/src/GEOMImpl/GUID.txt b/src/GEOMImpl/GUID.txt new file mode 100755 index 000000000..285d047d6 --- /dev/null +++ b/src/GEOMImpl/GUID.txt @@ -0,0 +1,69 @@ +FF1BBB02-5D14-4df2-980B-3A668264EA16 // Point + +FF1BBB03-5D14-4df2-980B-3A668264EA16 // Translation + +FF1BBB04-5D14-4df2-980B-3A668264EA16 // Vector +FF1BBB05-5D14-4df2-980B-3A668264EA16 // Plane +FF1BBB06-5D14-4df2-980B-3A668264EA16 // Line +FF1BBB07-5D14-4df2-980B-3A668264EA16 // Marker + +FF1BBB00-5D14-4df2-980B-3A668264EA16 // GUID for Functions tree +FF1BBB10-5D14-4df2-980B-3A668264EA16 // GUID for References tree + +FF1BBB12-5D14-4df2-980B-3A668264EA16 // Torus +FF1BBB13-5D14-4df2-980B-3A668264EA16 // Box +FF1BBB14-5D14-4df2-980B-3A668264EA16 // Cylinder +FF1BBB15-5D14-4df2-980B-3A668264EA16 // Cone +FF1BBB16-5D14-4df2-980B-3A668264EA16 // Sphere +FF1BBB17-5D14-4df2-980B-3A668264EA16 // Prism (Extrusion) +FF1BBB18-5D14-4df2-980B-3A668264EA16 // Revolution +FF1BBB19-5D14-4df2-980B-3A668264EA16 // Pipe + +FF1BBB21-5D14-4df2-980B-3A668264EA16 // Boolean +FF1BBB22-5D14-4df2-980B-3A668264EA16 // Partition + +FF1BBB31-5D14-4df2-980B-3A668264EA16 // Polyline +FF1BBB32-5D14-4df2-980B-3A668264EA16 // Circle +FF1BBB33-5D14-4df2-980B-3A668264EA16 // Spline +FF1BBB34-5D14-4df2-980B-3A668264EA16 // Ellipse +FF1BBB35-5D14-4df2-980B-3A668264EA16 // Arc of circle + +FF1BBB41-5D14-4df2-980B-3A668264EA16 // Fillet +FF1BBB42-5D14-4df2-980B-3A668264EA16 // Chamfer + +FF1BBB51-5D14-4df2-980B-3A668264EA16 // Offset +FF1BBB52-5D14-4df2-980B-3A668264EA16 // Scale + +FF1BBB53-5D14-4df2-980B-3A668264EA16 // Copy + +FF1BBB54-5D14-4df2-980B-3A668264EA16 // Shape (Wire, Face, Shell, Solid, Compound) + +FF1BBB55-5D14-4df2-980B-3A668264EA16 // Subshape + +FF1BBB56-5D14-4df2-980B-3A668264EA16 // Rotate + +FF1BBB57-5D14-4df2-980B-3A668264EA16 // Mirror + +FF1BBB58-5D14-4df2-980B-3A668264EA16 // Export + +FF1BBB59-5D14-4df2-980B-3A668264EA16 // Archimede + +FF1BBB60-5D14-4df2-980B-3A668264EA16 // Import + +FF1BBB61-5D14-4df2-980B-3A668264EA16 // Shape Healing + +FF1BBB62-5D14-4df2-980B-3A668264EA16 // Filling + +FF1BBB63-5D14-4df2-980B-3A668264EA16 // Glue Faces + +FF1BBB64-5D14-4df2-980B-3A668264EA16 // Sketcher + +FF1BBB65-5D14-4df2-980B-3A668264EA16 // Measurements + +FF1BBB66-5D14-4df2-980B-3A668264EA16 // Group + +FF1BBB67-5D14-4df2-980B-3A668264EA16 // Blocks + +FF1BBB68-5D14-4df2-980B-3A668264EA16 // Sub shape GUID + +FF1BBB69-5D14-4df2-980B-3A668264EA16 // Modify the Location diff --git a/src/GEOMImpl/Makefile.in b/src/GEOMImpl/Makefile.in new file mode 100644 index 000000000..05cbe7e7a --- /dev/null +++ b/src/GEOMImpl/Makefile.in @@ -0,0 +1,182 @@ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +# Libraries targets + +LIB = libGEOMimpl.la +LIB_SRC = GEOMImpl_IBasicOperations.cxx \ + GEOMImpl_ITransformOperations.cxx \ + GEOMImpl_IHealingOperations.cxx \ + GEOMImpl_I3DPrimOperations.cxx \ + GEOMImpl_IShapesOperations.cxx \ + GEOMImpl_IBlocksOperations.cxx \ + GEOMImpl_IBooleanOperations.cxx \ + GEOMImpl_ICurvesOperations.cxx \ + GEOMImpl_ILocalOperations.cxx \ + GEOMImpl_IInsertOperations.cxx \ + GEOMImpl_IMeasureOperations.cxx \ + GEOMImpl_IGroupOperations.cxx \ + GEOMImpl_Gen.cxx \ + GEOMImpl_PointDriver.cxx \ + GEOMImpl_VectorDriver.cxx \ + GEOMImpl_LineDriver.cxx \ + GEOMImpl_PlaneDriver.cxx \ + GEOMImpl_MarkerDriver.cxx \ + GEOMImpl_TranslateDriver.cxx \ + GEOMImpl_MirrorDriver.cxx \ + GEOMImpl_OffsetDriver.cxx \ + GEOMImpl_ScaleDriver.cxx \ + GEOMImpl_PositionDriver.cxx \ + GEOMImpl_BoxDriver.cxx \ + GEOMImpl_ConeDriver.cxx \ + GEOMImpl_CylinderDriver.cxx \ + GEOMImpl_SphereDriver.cxx \ + GEOMImpl_TorusDriver.cxx \ + GEOMImpl_PrismDriver.cxx \ + GEOMImpl_PipeDriver.cxx \ + GEOMImpl_RevolutionDriver.cxx \ + GEOMImpl_ShapeDriver.cxx \ + GEOMImpl_BlockDriver.cxx \ + GEOMImpl_Block6Explorer.cxx \ + GEOMImpl_MeasureDriver.cxx \ + GEOMImpl_PolylineDriver.cxx \ + GEOMImpl_CircleDriver.cxx \ + GEOMImpl_EllipseDriver.cxx \ + GEOMImpl_ArcDriver.cxx \ + GEOMImpl_SplineDriver.cxx \ + GEOMImpl_SketcherDriver.cxx \ + GEOMImpl_FilletDriver.cxx \ + GEOMImpl_ChamferDriver.cxx \ + GEOMImpl_BooleanDriver.cxx \ + GEOMImpl_PartitionDriver.cxx \ + GEOMImpl_CopyDriver.cxx \ + GEOMImpl_ExportDriver.cxx \ + GEOMImpl_ImportDriver.cxx \ + GEOMImpl_RotateDriver.cxx \ + GEOMImpl_ArchimedeDriver.cxx \ + GEOMImpl_HealingDriver.cxx \ + GEOMImpl_FillingDriver.cxx \ + GEOMImpl_GlueDriver.cxx + +LIB_CLIENT_IDL = +LIB_SERVER_IDL = + +# Executables targets +BIN = +BIN_SRC = +BIN_CLIENT_IDL = +BIN_SERVER_IDL = + +# header files +EXPORT_HEADERS= GEOMImpl_Gen.hxx \ + GEOMImpl_IBasicOperations.hxx \ + GEOMImpl_ITransformOperations.hxx \ + GEOMImpl_IHealingOperations.hxx \ + GEOMImpl_I3DPrimOperations.hxx \ + GEOMImpl_IShapesOperations.hxx \ + GEOMImpl_IBlocksOperations.hxx \ + GEOMImpl_IBooleanOperations.hxx \ + GEOMImpl_ICurvesOperations.hxx \ + GEOMImpl_ILocalOperations.hxx \ + GEOMImpl_IInsertOperations.hxx \ + GEOMImpl_IMeasureOperations.hxx \ + GEOMImpl_IGroupOperations.hxx \ + GEOMImpl_PointDriver.hxx \ + GEOMImpl_VectorDriver.hxx \ + GEOMImpl_LineDriver.hxx \ + GEOMImpl_PlaneDriver.hxx \ + GEOMImpl_MarkerDriver.hxx \ + GEOMImpl_TranslateDriver.hxx \ + GEOMImpl_MirrorDriver.hxx \ + GEOMImpl_PositionDriver.hxx \ + GEOMImpl_OffsetDriver.hxx \ + GEOMImpl_ScaleDriver.hxx \ + GEOMImpl_BoxDriver.hxx \ + GEOMImpl_ConeDriver.hxx \ + GEOMImpl_CylinderDriver.hxx \ + GEOMImpl_SphereDriver.hxx \ + GEOMImpl_TorusDriver.hxx \ + GEOMImpl_PrismDriver.hxx \ + GEOMImpl_PipeDriver.hxx \ + GEOMImpl_RevolutionDriver.hxx \ + GEOMImpl_ShapeDriver.hxx \ + GEOMImpl_BlockDriver.hxx \ + GEOMImpl_MeasureDriver.hxx \ + GEOMImpl_PolylineDriver.hxx \ + GEOMImpl_CircleDriver.hxx \ + GEOMImpl_EllipseDriver.hxx \ + GEOMImpl_ArcDriver.hxx \ + GEOMImpl_SplineDriver.hxx \ + GEOMImpl_SketcherDriver.hxx \ + GEOMImpl_FilletDriver.hxx \ + GEOMImpl_ChamferDriver.hxx \ + GEOMImpl_BooleanDriver.hxx \ + GEOMImpl_PartitionDriver.hxx \ + GEOMImpl_CopyDriver.hxx \ + GEOMImpl_ExportDriver.hxx \ + GEOMImpl_ImportDriver.hxx \ + GEOMImpl_RotateDriver.hxx \ + GEOMImpl_ArchimedeDriver.hxx \ + GEOMImpl_FillingDriver.hxx \ + GEOMImpl_GlueDriver.hxx \ + GEOMImpl_IArchimede.hxx \ + GEOMImpl_IPoint.hxx \ + GEOMImpl_IVector.hxx \ + GEOMImpl_ILine.hxx \ + GEOMImpl_IPlane.hxx \ + GEOMImpl_IMarker.hxx \ + GEOMImpl_IMirror.hxx \ + GEOMImpl_IOffset.hxx \ + GEOMImpl_IScale.hxx \ + GEOMImpl_IPosition.hxx \ + GEOMImpl_IBox.hxx \ + GEOMImpl_ICone.hxx \ + GEOMImpl_ICylinder.hxx \ + GEOMImpl_ISphere.hxx \ + GEOMImpl_ITorus.hxx \ + GEOMImpl_IPrism.hxx \ + GEOMImpl_IPipe.hxx \ + GEOMImpl_IRevolution.hxx \ + GEOMImpl_IShapes.hxx \ + GEOMImpl_IBlocks.hxx \ + GEOMImpl_IMeasure.hxx \ + GEOMImpl_IPolyline.hxx \ + GEOMImpl_ICircle.hxx \ + GEOMImpl_IEllipse.hxx \ + GEOMImpl_IArc.hxx \ + GEOMImpl_ISpline.hxx \ + GEOMImpl_ISketcher.hxx \ + GEOMImpl_IFillet.hxx \ + GEOMImpl_IChamfer.hxx \ + GEOMImpl_IBoolean.hxx \ + GEOMImpl_IPartition.hxx \ + GEOMImpl_ICopy.hxx \ + GEOMImpl_IImportExport.hxx \ + GEOMImpl_ITranslate.hxx \ + GEOMImpl_IRotate.hxx \ + GEOMImpl_IBlockTrsf.hxx \ + GEOMImpl_Types.hxx \ + GEOMImpl_IHealing.hxx \ + GEOMImpl_IFilling.hxx \ + GEOMImpl_IGlue.hxx \ + GEOMImpl_HealingDriver.hxx + +# additionnal information to compil and link file +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS) +CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +LDFLAGS += -L${KERNEL_ROOT_DIR}/lib/salome $(CAS_LDPATH) -lTKCAF -lCASCatch -lGEOMbasic -lNMTAlgo -lShHealOper + + +# additional file to be cleaned +MOSTLYCLEAN = +CLEAN = +DISTCLEAN = + +@CONCLUDE@ + diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index e4aab6706..9be35edb9 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -21,59 +21,101 @@ // // // -// File : GEOMToolsGUI.cxx +// File : GEOMBase_Tools.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #include "GEOMToolsGUI.h" +#include "GeometryGUI.h" +#include "GEOM_Actor.h" +#include "GEOMBase.h" +#include "GEOM_Operation.h" +#include "GEOM_Displayer.h" -#include "QAD_Config.h" +#include "QAD_Desktop.h" #include "QAD_FileDlg.h" #include "QAD_Tools.h" #include "QAD_MessageBox.h" #include "QAD_RightFrame.h" -#include "QAD_PyEditor.h" +#include "QAD_WaitCursor.h" #include "OCCViewer_Viewer3d.h" #include "VTKViewer_ViewFrame.h" +#include "VTKViewer_RenderWindowInteractor.h" #include "SALOME_ListIteratorOfListIO.hxx" -#include "SALOMEGUI_NameDlg.h" #include "SALOMEGUI_ImportOperation.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" -#include -#include -#include +#include +#include -#include -#include -#include -#include -#include +#include "utilities.h" -#include -#include -#include +using namespace std; -#include "GEOMToolsGUI_NbIsosDlg.h" // Method ISOS adjustement -#include "GEOMToolsGUI_TransparencyDlg.h" // Method TRANSPARENCY adjustement +GEOMToolsGUI* GEOMToolsGUI::myGUIObject = 0; -#include "utilities.h" +typedef QMap FilterMap; -using namespace std; +//======================================================================= +// function : getFileName +// purpose : Selection of a file name for Import/Export. Returns also +// the selected file type code through argument. +//======================================================================= +static QString getFileName( QWidget* parent, + const QString& initial, + const FilterMap& filterMap, + const QString& caption, + bool open, + QString& format ) +{ + static QString lastUsedFilter; + QStringList filters; + for ( FilterMap::const_iterator it = filterMap.begin(); it != filterMap.end(); ++it ) + filters.push_back( it.key() ); + + QAD_FileDlg* fd = new QAD_FileDlg( parent, open, true, true ); + if ( !caption.isEmpty() ) + fd->setCaption( caption ); + + if ( !initial.isEmpty() ) + fd->setSelection( initial ); + + if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) ) + fd->setSelectedFilter( lastUsedFilter ); + + fd->setFilters( filters ); + + fd->exec(); + QString filename = fd->selectedFile(); + format = filterMap[fd->selectedFilter()]; + lastUsedFilter = fd->selectedFilter(); + delete fd; + qApp->processEvents(); + return filename; +} + +//======================================================================= +// function : GetGEOMToolsGUI() +// purpose : Get the only GEOMToolsGUI object [ static ] +//======================================================================= +GEOMToolsGUI* GEOMToolsGUI::GetGEOMToolsGUI() +{ + if ( myGUIObject == 0 ) { + // init GEOMToolsGUI only once + myGUIObject = new GEOMToolsGUI(); + } + return myGUIObject; +} //======================================================================= // function : GEOMToolsGUI() // purpose : Constructor //======================================================================= -GEOMToolsGUI::GEOMToolsGUI() : - QObject() +GEOMToolsGUI::GEOMToolsGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -92,8 +134,7 @@ GEOMToolsGUI::~GEOMToolsGUI() //======================================================================= bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - GEOMToolsGUI* myGEOMToolsGUI = new GEOMToolsGUI(); - myGEOMToolsGUI->myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); @@ -101,444 +142,86 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { case 31: // COPY { - myGEOMToolsGUI->OnEditCopy(); + OnEditCopy(); break; } case 33: // DELETE { - myGEOMToolsGUI->OnEditDelete(); + OnEditDelete(); break; } case 111: // IMPORT BREP - { - myGEOMToolsGUI->Import(theCommandID); - break; - } case 112: // IMPORT IGES - { - myGEOMToolsGUI->Import(theCommandID); - break; - } case 113: // IMPORT STEP { - myGEOMToolsGUI->Import(theCommandID); + Import(); break; } case 121: // EXPORT BREP - { - myGEOMToolsGUI->Export(theCommandID); - break; - } case 122: // EXPORT IGES - { - myGEOMToolsGUI->Export(theCommandID); - break; - } case 123: // EXPORT STEP { - myGEOMToolsGUI->Export(theCommandID); + Export(); break; } case 411: // SETTINGS - ADD IN STUDY { - QMenuBar* Mb = QAD_Application::getDesktop()->getMainMenuBar(); - QMenuData* pp; - QMenuItem* item = parent->menuBar()->findItem(411, &pp); - bool check = !pp->isItemChecked(411); - pp->setItemChecked(411,check); - //myGEOMToolsGUI->myGeomGUI->GetSettings_AddInStudy() = check; - QAD_CONFIG->addSetting("Geometry:SettingsAddInStudy", check); + // SAN -- TO BE REMOVED !!! break; } case 412: // SETTINGS - SHADING COLOR { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - break; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - QString SCr = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorRed"); - QString SCg = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorGreen"); - QString SCb = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorBlue"); - QColor color; - if(!SCr.isEmpty() && !SCg.isEmpty() && !SCb.isEmpty()) { - color = QColor (SCr.toInt(), SCg.toInt(), SCb.toInt()); - } - else { - Quantity_Color Default = Quantity_Color(); - color = QColor ((int)( Default.Red() * 255.0 ), (int)( Default.Green() * 255.0 ), (int)( Default.Blue() * 255.0 ) ); - } - - QColor c = QColorDialog::getColor(color, QAD_Application::getDesktop()); - if(c.isValid()) { - //myGEOMToolsGUI->myGeomGUI->GetShadingColor() = Quantity_Color(c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0, Quantity_TOC_RGB); - - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - List.Append(List1); - - AIS_ListIteratorOfListOfInteractive ite(List); - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - aSh->SetShadingColor(Quantity_Color(c.red() / 255.0, c.green() / 255.0, c.blue() / 255.0, Quantity_TOC_RGB)); - ic->Redisplay(aSh, Standard_True, Standard_True); - } - ite.Next(); - } - - ic->UpdateCurrentViewer(); - - QAD_CONFIG->addSetting("Geometry:SettingsShadingColorRed", c.red()); - QAD_CONFIG->addSetting("Geometry:SettingsShadingColorGreen", c.green()); - QAD_CONFIG->addSetting("Geometry:SettingsShadingColorBlue", c.blue()); - } + OnSettingsColor(); break; } case 413: // SETTINGS - ISOS { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - break; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - QString IsoU = QAD_CONFIG->getSetting("Geometry:SettingsIsoU"); - QString IsoV = QAD_CONFIG->getSetting("Geometry:SettingsIsoV"); - if(!IsoU.isEmpty()) - ic->DefaultDrawer()->UIsoAspect()->SetNumber(IsoU.toInt()); - else - IsoU = "1"; - if (!IsoV.isEmpty()) - ic->DefaultDrawer()->VIsoAspect()->SetNumber(IsoV.toInt()); - else - IsoV = "1"; - - GEOMToolsGUI_NbIsosDlg* NbIsosDlg = new GEOMToolsGUI_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE); - int UIso = IsoU.toInt(); - int VIso = IsoV.toInt(); - - NbIsosDlg->SpinBoxU->setValue(UIso); - NbIsosDlg->SpinBoxV->setValue(VIso); - - if(NbIsosDlg->exec()) { - UIso = NbIsosDlg->SpinBoxU->text().toInt(); - VIso = NbIsosDlg->SpinBoxV->text().toInt(); - - ic->DefaultDrawer()->UIsoAspect()->SetNumber(UIso); - ic->DefaultDrawer()->VIsoAspect()->SetNumber(VIso); - QAD_CONFIG->addSetting("Geometry:SettingsIsoU", NbIsosDlg->SpinBoxU->text()); /* text format */ - QAD_CONFIG->addSetting("Geometry:SettingsIsoV", NbIsosDlg->SpinBoxV->text()); /* text format */ - } - - AIS_ListOfInteractive List; - ic->DisplayedObjects(List); - AIS_ListOfInteractive List1; - ic->ObjectsInCollector(List1); - List.Append(List1); - - AIS_ListIteratorOfListOfInteractive ite(List); - ic->InitCurrent(); - if(ic->NbCurrents()) - while(ite.More()) { - if(ite.Value()->IsInstance(STANDARD_TYPE(GEOM_AISShape))) { - Handle(GEOM_AISShape) aSh = Handle(GEOM_AISShape)::DownCast(ite.Value()); - Handle (AIS_Drawer) CurDrawer; - CurDrawer = aSh->Attributes(); - CurDrawer->UIsoAspect()->SetNumber(UIso); - CurDrawer->VIsoAspect()->SetNumber(VIso); - ic->SetLocalAttributes(aSh, CurDrawer); - ic->Redisplay(aSh); - } - ite.Next(); - } - ic->UpdateCurrentViewer(); + OnSettingsIsos(); break; } case 414: // SETTINGS : STEP VALUE FOR SPIN BOXES { - QString step = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - if(step.isEmpty()) - step = "100.0"; - - Standard_Boolean res = false; - double dd = myGEOMToolsGUI->myGeomBase->Parameter(res, QString("%1").arg(step), tr("GEOM_MEN_STEP_LABEL"), tr("GEOM_STEP_TITLE"), 0.001, 10000.0, 3); - if(res) { - QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", QString("%1").arg(dd)); - - /* Emit signal to GeometryGUI_SpinBoxes */ - myGEOMToolsGUI->myGeomGUI->EmitSignalDefaultStepValueChanged(dd); - } - else - parent->putInfo(tr("GEOM_PRP_ABORT")); + OnSettingsStep(); break; } case 804: // ADD IN STUDY - POPUP VIEWER { - const SALOME_ListIO& ListSelected = Sel->StoredIObjects(); - SALOME_ListIteratorOfListIO It(ListSelected); - for(; It.More(); It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - myGEOMToolsGUI->myGeomBase->AddInStudy(true, IObject); - } - /* Is set on the dialog box */ - QApplication::restoreOverrideCursor(); + // SAN -- TO BE REMOVED !!!! break; } case 901: // RENAME { - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - for(; It.More(); It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IObject->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeName")) { - aName = SALOMEDS::AttributeName::_narrow(anAttr); - - QString nm = QString(aName->Value()); - nm = SALOMEGUI_NameDlg::getName(QAD_Application::getDesktop(), nm); - if(!nm.isEmpty()) { - QApplication::setOverrideCursor(Qt::waitCursor); - QAD_Application::getDesktop()->getActiveStudy()->renameIObject(IObject, nm); - QApplication::restoreOverrideCursor(); - } - } - } - } + OnRename(); break; } case 5103: // CHECK GEOMETRY { - QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor(); - PyEditor->setText("from GEOM_usinggeom import *\n"); - //PyEditor->setText(">>> "); - PyEditor->handleReturn(); + OnCheckGeometry(); break; } case 5104: // LOAD SCRIPT { - QStringList filtersList; - filtersList.append(tr("GEOM_MEN_LOAD_SCRIPT")); - filtersList.append(tr("GEOM_MEN_ALL_FILES")); - - QString aFile = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), "", filtersList, tr("GEOM_MEN_IMPORT"), true); - if(!aFile.isEmpty()) { - QFileInfo file = aFile; - QApplication::setOverrideCursor(Qt::waitCursor); - QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor(); - - PyEditor->setText("import geompy\n"); - PyEditor->handleReturn(); - - QStringList aTextList = QStringList::split(".", file.fileName()); - PyEditor->setText("geompy.Path('" + file.dirPath() + "')\n"); - PyEditor->handleReturn(); - - PyEditor->setText("from " + aTextList.first() + " import *\n"); - PyEditor->handleReturn(); - } - QApplication::restoreOverrideCursor(); + OnLoadScript(); break; } case 8032: // COLOR - POPUP VIEWER { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { - // VTK - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); - - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) FirstIOS = Sel->firstIObject(); - if(!FirstIOS.IsNull()) { - QColor initcolor = myRenderInter->GetColor(FirstIOS); - QColor c = QColorDialog::getColor( initcolor, QAD_Application::getDesktop()); - - if(c.isValid()) { - QApplication::setOverrideCursor(Qt::waitCursor); - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IOS = It.Value(); - myRenderInter->SetColor(IOS,c); - } - } - QApplication::restoreOverrideCursor(); - } - } - else if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - Handle(SALOME_InteractiveObject) IO = Sel->firstIObject(); - Standard_Boolean found; - Handle(GEOM_AISShape) Shape = myGEOMToolsGUI->myGeomBase->ConvertIOinGEOMAISShape(IO, found, true); - if(found) { - Quantity_Color CSFColor; - Shape->Color(CSFColor); - - QColor c = QColorDialog::getColor(QColor((int)(CSFColor.Red() * 255.0), (int)(CSFColor.Green() * 255.0), (int)(CSFColor.Blue() * 255.0)), QAD_Application::getDesktop()); - - if(c.isValid()) { - CSFColor = Quantity_Color (c.red()/255., c.green()/255., c.blue()/255., Quantity_TOC_RGB); - QApplication::setOverrideCursor( Qt::waitCursor ); - - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - Standard_Boolean found; - Handle(GEOM_AISShape) Shape = myGEOMToolsGUI->myGeomBase->ConvertIOinGEOMAISShape(IObject, found, true); - if(found) { - Shape->SetColor(CSFColor); - Shape->SetShadingColor(CSFColor); - } - } - } - } - } - QApplication::restoreOverrideCursor(); + OnColor(); break; } case 8033: // TRANSPARENCY - POPUP VIEWER { - Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - GEOMToolsGUI_TransparencyDlg *aDlg = new GEOMToolsGUI_TransparencyDlg(parent, "", Sel, ic); + OnTransparency(); break; } case 8034: // ISOS - POPUP VIEWER { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - break; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - ic->InitCurrent(); - if(ic->MoreCurrent()) { - Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current()); - QString IsoU = QAD_CONFIG->getSetting("Geometry:SettingsIsoU"); - QString IsoV = QAD_CONFIG->getSetting("Geometry:SettingsIsoV"); - - if(!IsoU.isEmpty()) - ic->DefaultDrawer()->UIsoAspect()->SetNumber(IsoU.toInt()); - else - IsoU = "1"; - if (!IsoV.isEmpty()) - ic->DefaultDrawer()->VIsoAspect()->SetNumber(IsoV.toInt()); - else - IsoV = "1"; - - GEOMToolsGUI_NbIsosDlg * NbIsosDlg = - new GEOMToolsGUI_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE); - - NbIsosDlg->SpinBoxU->setValue(IsoU.toInt()); - NbIsosDlg->SpinBoxV->setValue(IsoV.toInt()); - - if(NbIsosDlg->exec()) { - QApplication::setOverrideCursor(Qt::waitCursor); - for(; ic->MoreCurrent(); ic->NextCurrent()) { - Handle(AIS_Drawer) CurDrawer; - - CurDrawer = ic->Current()->Attributes(); - CurDrawer->UIsoAspect()->SetNumber(NbIsosDlg->SpinBoxU->text().toInt()); - CurDrawer->VIsoAspect()->SetNumber(NbIsosDlg->SpinBoxV->text().toInt()); - - ic->SetLocalAttributes(CurObject, CurDrawer); - ic->Redisplay(CurObject); - } - } - } - QApplication::restoreOverrideCursor(); + OnNbIsos(); break; } case 9024 : // OPEN - OBJBROSER POPUP { - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); - Handle(SALOME_InteractiveObject) anIObject; - for(;It.More();It.Next()) { - anIObject = It.Value(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID(anIObject->getEntry()); - SALOMEDS::AttributePersistentRef_var aPersist; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - // this SObject may be GEOM module root SObject - SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(obj); - SALOMEDS::GenericAttribute_var anAttr; - bool useSubItems = false; - while (anIter->More() && !useSubItems) { - SALOMEDS::SObject_var subobj = anIter->Value(); - if (subobj->FindAttribute(anAttr, "AttributePersistentRef")) { - useSubItems = true; - obj = subobj; - } - else - anIter->Next(); - } - obj->FindAttribute(anAttr, "AttributePersistentRef"); - - while(useSubItems?anIter->More():!anAttr->_is_nil()) { - if(!obj->FindAttribute(anAttr, "AttributeIOR") && - obj->FindAttribute(anAttr, "AttributePersistentRef")) { - - SALOMEDS::SComponent_var FComp = obj->GetFatherComponent(); - if (!CORBA::is_nil(FComp)) { - if (FComp->FindAttribute(anAttr, "AttributeName")) { - SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr); - QString compName = parent->getComponentName(aName->Value()); - // parent->loadComponentData(parent->getComponentName(aName->Value())); - Engines::Component_var comp ; - if ( compName.compare("SUPERV") == 0 ) { - comp = parent->getEngine( "SuperVisionContainer", compName) ; - } - else { - comp = parent->getEngine( "FactoryServer", compName); - if ( comp->_is_nil() ) - comp = parent->getEngine( "FactoryServerPy", compName); - } - - if (!CORBA::is_nil(comp)) { - SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); - if (!CORBA::is_nil(driver)) { - SALOMEDS::StudyBuilder_var B = aStudy->NewBuilder(); - if (!CORBA::is_nil(B)) { - B->LoadWith(FComp,driver); - } else { - return false; - } - } else { - MESSAGE("loadComponentData(): Driver is null"); - return false; - } - } else { - MESSAGE("loadComponentData(): Engine is null"); - return false; - } - // // load - // Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM"); - // if (!CORBA::is_nil(comp)) { - // SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); - // SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - // SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); - // if (!CORBA::is_nil(SC)) - // aStudyBuilder->LoadWith(SC,driver); - } - } - else { - MESSAGE("Component is null"); - } - } - if(useSubItems) { - anIter->Next(); - obj = anIter->Value(); - } - else - anAttr = SALOMEDS::GenericAttribute::_nil(); - } - } - } + OnOpen(); break; } default: @@ -557,102 +240,118 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) //=============================================================================== void GEOMToolsGUI::OnEditDelete() { - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - if(Sel->IObjectCount() == 0) + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + if ( Sel->IObjectCount() == 0 ) return; - - if(QAD_MessageBox::warn2(QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_REALLY_DELETE"), tr("GEOM_BUT_YES"), tr("GEOM_BUT_NO"), 1, 0, 0) != 1) + + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + + bool aLocked = aStudy->GetProperties()->IsLocked(); + if ( aLocked ) { + QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); + return; + } + + if ( QAD_MessageBox::warn2( QAD_Application::getDesktop(), + tr( "GEOM_WRN_WARNING" ), + tr( "GEOM_REALLY_DELETE" ), + tr( "GEOM_BUT_YES" ), + tr( "GEOM_BUT_NO" ), 1, 0, 0 ) != 1 ) return; - + int nbSf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); - + Standard_Boolean found; - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; + SALOMEDS::AttributeIOR_var anIOR; + + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); - SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); QAD_Operation* op = new SALOMEGUI_ImportOperation( QAD_Application::getDesktop()->getActiveStudy() ); + op->start(); - Standard_Boolean deleted = false; - for(;It.More();It.Next()) { - Handle(SALOME_InteractiveObject) IObject = It.Value(); - if(IObject->hasEntry()) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var SO = aStudy->FindObjectID(IObject->getEntry()); - - /* Erase child graphical objects */ - SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator(SO); - for(; it->More();it->Next()) { - SALOMEDS::SObject_var CSO= it->Value(); - if(CSO->FindAttribute(anAttr, "AttributeIOR") ) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - /* Delete child(s) shape in Client : */ - const TCollection_AsciiString ASCior(anIOR->Value()) ; - myGeomGUI->GetShapeReader().RemoveShapeFromBuffer(ASCior); - - for(int i = 0; i < nbSf; i++) { - QAD_StudyFrame* sf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i); - if(sf->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) myContext = v3d->getAISContext(); - Handle(GEOM_AISShape) Result = myGeomBase->ConvertIORinGEOMAISShape(anIOR->Value(), found); - if(found) - myContext->Erase(Result, true, false); - } - else if(sf->getTypeView() == VIEW_VTK) { - //vtkRenderer* Renderer = ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRenderer(); - VTKViewer_RenderWindowInteractor* myRenderInter = ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRWInteractor(); - GEOM_Actor* ac = myGeomBase->ConvertIORinGEOMActor(anIOR->Value(), found); - if(found) { - //Renderer->RemoveActor(ac); - if(ac->hasIO()) - myRenderInter->Remove(ac->getIO()); - } - } - } - } - } - - /* Erase main graphical object */ - for(int i = 0; i < nbSf; i++) { - QAD_StudyFrame* sf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i); - if(sf->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) myContext = v3d->getAISContext(); - Handle(GEOM_AISShape) Result = myGeomBase->ConvertIOinGEOMAISShape(IObject, found ); - if(found) - myContext->Erase(Result, true, false); - } - else if(sf->getTypeView() == VIEW_VTK) { - VTKViewer_RenderWindowInteractor* myRenderInter= ((VTKViewer_ViewFrame*)sf->getRightFrame()->getViewFrame())->getRWInteractor(); - myRenderInter->Remove( IObject ); - } - } - - /* Delete main shape in Client : */ - if(SO->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - const TCollection_AsciiString ASCIor(anIOR->Value()) ; - myGeomGUI->GetShapeReader().RemoveShapeFromBuffer(ASCIor); - } + + Standard_Boolean deleted = false; + + for ( ;It.More();It.Next() ) + { + Handle( SALOME_InteractiveObject ) IObject = It.Value(); + + if ( !IObject->hasEntry() ) + continue; + + SALOMEDS::SObject_var SO = aStudy->FindObjectID( IObject->getEntry() ); + + /* Erase child graphical objects */ - /* Erase objects in Study */ - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IObject->getEntry()); - if(!obj->_is_nil()) { - aStudyBuilder->RemoveObject(obj); - deleted = true; + SALOMEDS::ChildIterator_var it = aStudy->NewChildIterator( SO ); + for ( ; it->More();it->Next() ) + { + SALOMEDS::SObject_var CSO = it->Value(); + + if ( CSO->FindAttribute( anAttr, "AttributeIOR" ) ) + { + anIOR = SALOMEDS::AttributeIOR::_narrow( anAttr ); + + // Delete child( s ) shape in Client : + + const TCollection_AsciiString ASCior( anIOR->Value() ) ; + GeometryGUI::GetGeomGUI()->GetShapeReader().RemoveShapeFromBuffer( ASCior ); + + for ( int i = 0; i < nbSf; i++ ) + { + GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( CSO->GetObject() ); + if ( !aGeomObj->_is_nil() ) + GEOM_Displayer().Erase( aGeomObj, true ); + } } + } - } /* IObject->hasEntry() */ - } /* more/next */ + /* Erase main graphical object */ - if (deleted) op->finish(); - else op->abort(); + for ( int i = 0; i < nbSf; i++ ) + { + QAD_StudyFrame* sf = QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame( i ); + GEOM_Displayer().Erase( IObject, true ); + } + + /* Delete main shape in Client : */ + + if ( SO->FindAttribute( anAttr, "AttributeIOR" ) ) + { + anIOR = SALOMEDS::AttributeIOR::_narrow( anAttr ); + const TCollection_AsciiString ASCIor( anIOR->Value() ) ; + GeometryGUI::GetGeomGUI()->GetShapeReader().RemoveShapeFromBuffer( ASCIor ); + } + + /* Erase objects in Study */ + + SALOMEDS::SObject_var obj = aStudy->FindObjectID( IObject->getEntry() ); + if ( !obj->_is_nil() ) + { + SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + aStudyBuilder->RemoveObject( obj ); + + GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( obj->GetObject() ); + if ( !aGeomObj->_is_nil() ) + GeometryGUI::GetGeomGUI()->GetGeomGen()->RemoveObject( aGeomObj ); + + deleted = true; + } + } + + if ( deleted ) + op->finish(); + else + op->abort(); /* Clear any previous selection */ - Sel->ClearIObjects(); + Sel->ClearIObjects(); QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); } @@ -662,9 +361,10 @@ void GEOMToolsGUI::OnEditDelete() // purpose : //============================================================================== void GEOMToolsGUI::OnEditCopy() -{ - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); - GEOM::GEOM_Gen::ListOfIOR_var listIOR = new GEOM::GEOM_Gen::ListOfIOR; +{ +/* + SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + GEOM::string_array_var listIOR = new GEOM::string_array; const SALOME_ListIO& List = Sel->StoredIObjects(); @@ -672,11 +372,14 @@ void GEOMToolsGUI::OnEditCopy() Sel->ClearIObjects(); + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + int aStudyID = aStudy->StudyId(); + for (unsigned int ind = 0; ind < listIOR->length();ind++) { - GEOM::GEOM_Shape_var aShapeInit = myGeom->GetIORFromString(listIOR[ind]); + GEOM::GEOM_Object_var aShapeInit = myGeom->GetIORFromString(listIOR[ind]); try { - GEOM::GEOM_Shape_var result = myGeom->MakeCopy(aShapeInit) ; - result->NameType( aShapeInit->NameType() ); + GEOM::GEOM_IInsertOperations_var IOp = myGeom->GetIInsertOperations(aStudyID); + GEOM::GEOM_Object_var result = IOp->MakeCopy(aShapeInit) ; myGeomBase->Display(result); } catch (const SALOME::SALOME_Exception& S_ex) { @@ -685,6 +388,7 @@ void GEOMToolsGUI::OnEditCopy() } QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_READY")); +*/ } @@ -692,115 +396,73 @@ void GEOMToolsGUI::OnEditCopy() // function : Import // purpose : BRep, Iges, Step //===================================================================================== -bool GEOMToolsGUI::Import(int aState) +bool GEOMToolsGUI::Import() { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - - GEOM::GEOM_Shape_var aShape; - QString file; - QStringList filtersList; + QAD_Study* aDoc = QAD_Application::getDesktop()->getActiveStudy(); + SALOMEDS::Study_var aStudy = aDoc->getStudyDocument(); + + bool aLocked = aStudy->GetProperties()->IsLocked(); + if ( aLocked ) { + QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); + return false; + } + + GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGUI()->GetGeomGen()->GetIInsertOperations( aStudy->StudyId() ); + if ( aInsOp->_is_nil() ) + return false; - switch(aState) - { - case 111 : // Import BREP - { - filtersList.append(tr("GEOM_MEN_IMPORT_BREP")); - filtersList.append(tr("GEOM_MEN_ALL_FILES")); - - file = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), "", filtersList, tr("GEOM_MEN_IMPORT"), true); - if(!file.isEmpty()) { - QApplication::setOverrideCursor(Qt::waitCursor); - try { - aShape = myGeom->ImportBREP(file.latin1()); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - } - break; - } - case 112 : // Import IGES - { - filtersList.append( tr("GEOM_MEN_IMPORT_IGES") ) ; - filtersList.append( tr("GEOM_MEN_ALL_FILES") ) ; - - file = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), - "", - filtersList, - tr("GEOM_MEN_IMPORT"), - true); - if ( !file.isEmpty() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); - try { - aShape = myGeom->ImportIGES( file.latin1() ); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - } - break; - } - case 113 : // Import STEP - { - filtersList.append( tr("GEOM_MEN_IMPORT_STEP") ) ; - filtersList.append( tr("GEOM_MEN_ALL_FILES") ) ; - - file = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), - "", - filtersList, - tr("GEOM_MEN_IMPORT"), - true); - if ( !file.isEmpty() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); - try { - aShape = myGeom->ImportSTEP( file.latin1() ); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - } - break; - } - } + GEOM::GEOM_Object_var anObj; + + // Obtain a list of available import formats + FilterMap aMap; + GEOM::string_array_var aFormats, aPatterns; + aInsOp->ImportTranslators( aFormats, aPatterns ); + for ( int i = 0, n = aFormats->length(); i < n; i++ ) + aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] ); + + QString fileType; + + QString file = getFileName(QAD_Application::getDesktop(), "", aMap, tr("GEOM_MEN_IMPORT"), true, fileType ); + if( file.isEmpty() || fileType.isEmpty() ) + return false; - if ( !file.isEmpty() ) { + GEOM_Operation* anOp = new GEOM_Operation( aDoc, aInsOp.in() ); + try { + QAD_WaitCursor wc; QAD_Application::getDesktop()->putInfo( tr("GEOM_PRP_LOADING").arg(QAD_Tools::getFileNameFromPath( file )) ); - SALOMEDS::SComponent_var father = aStudy->FindComponent("GEOM"); - SALOMEDS::SObject_var fatherSF = aStudy->FindObjectID(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->entry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeName_var aName; - SALOMEDS::AttributePixMap_var aPixmap; - int aLocked = false; - if (father->_is_nil()) { - QAD_Operation* op = new SALOMEGUI_ImportOperation(QAD_Application::getDesktop()->getActiveStudy() ); - op->start(); - aLocked = aStudy->GetProperties()->IsLocked(); - if (aLocked) aStudy->GetProperties()->SetLocked(false); - father = aStudyBuilder->NewComponent("GEOM"); - anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributeName"); - aName = SALOMEDS::AttributeName::_narrow(anAttr); - // aName->SetValue( tr("GEOM_MEN_COMPONENT") ); - aName->SetValue(QAD_Application::getDesktop()->getComponentUserName( "GEOM" ) ); - anAttr = aStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap"); - aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); - aPixmap->SetPixMap( "ICON_OBJBROWSER_Geometry" ); - aStudyBuilder->DefineComponentInstance( father, myGeom ); - if (aLocked) aStudy->GetProperties()->SetLocked(true); - op->finish(); - } -// if (aLocked) return false; - father->ComponentIOR(myGeomGUI->GetFatherior()); + anOp->start(); - QString nameShape = QAD_Tools::getFileNameFromPath(file,false) + QString("_%1").arg(myGeomGUI->myNbGeom++); + anObj = aInsOp->Import( file.latin1(), fileType.latin1() ); - if(myGeomBase->Display(aShape, (char*)nameShape.latin1())) { - QAD_Application::getDesktop()->getActiveStudy()->setMessage( tr("GEOM_INF_LOADED").arg(QAD_Tools::getFileNameFromPath( file )) ); - QAD_Application::getDesktop()->putInfo( tr("GEOM_PRP_READY")); + if ( !anObj->_is_nil() && aInsOp->IsDone() ) { + anObj->SetName( GEOMBase::GetDefaultName( QObject::tr( "GEOM_IMPORT" ) ).latin1() ); + QString aPublishObjName = GEOMBase::GetDefaultName( QAD_Tools::getFileNameFromPath( file )); + GeometryGUI::GetGeomGUI()->GetGeomGen()->PublishInStudy( + aStudy, SALOMEDS::SObject::_nil(), anObj, aPublishObjName ); + + GEOM_Displayer().Display( anObj.in() ); + + anOp->finish(); } + else { + anOp->abort(); + wc.stop(); + QAD_MessageBox::error1( QAD_Application::getDesktop(), + QObject::tr( "GEOM_ERROR" ), + QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ), + QObject::tr("BUT_OK") ); + } + } + catch(const SALOME::SALOME_Exception& S_ex) { + QtCatchCorbaException(S_ex); + anOp->abort(); + return false; } - QApplication::restoreOverrideCursor(); + return true; } @@ -809,140 +471,62 @@ bool GEOMToolsGUI::Import(int aState) // function : Export // purpose : BRep, Iges, Step //===================================================================================== -bool GEOMToolsGUI::Export(int aState) +bool GEOMToolsGUI::Export() { SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - - GEOM::GEOM_Shape_var aShape; - - static QString filters[] = { tr("GEOM_MEN_IMPORT_BREP"), - tr("GEOM_MEN_IMPORT_IGES"), - tr("GEOM_MEN_IMPORT_STEP") }; + GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGUI()->GetGeomGen()->GetIInsertOperations( aStudy->StudyId() ); + if ( aInsOp->_is_nil() ) + return false; + + // Obtain a list of available export formats + FilterMap aMap; + GEOM::string_array_var aFormats, aPatterns; + aInsOp->ExportTranslators( aFormats, aPatterns ); + for ( int i = 0, n = aFormats->length(); i < n; i++ ) + aMap.insert( (char*)aPatterns[i], (char*)aFormats[i] ); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); - switch (aState) - { - case 121 : - { - for(;It.More();It.Next()) { - QApplication::restoreOverrideCursor(); - Handle(SALOME_InteractiveObject) IObject = It.Value(); - Standard_Boolean found; - GEOM::GEOM_Shape_var aShape = myGeomBase->ConvertIOinGEOMShape(IObject, found); - // Handle(GEOM_AISShape) Shape = myGeomGUI->ConvertIOinGEOMAISShape(IObject, found, true); - if ( found ) { - QString file = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), - QString( IObject->getName() ) + ".brep", - tr("GEOM_MEN_IMPORT_BREP"), - tr("GEOM_MEN_EXPORT"), - false); - if ( !file.isEmpty() && !aShape->_is_nil() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); - // Standard_Boolean result = BRepTools::Write(Shape->Shape(), strdup(file.latin1()) ); - try { - myGeom->ExportBREP((char*)file.latin1(), aShape); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - } - } - } - break; - } - case 122 : - { - for(;It.More();It.Next()) { - QApplication::restoreOverrideCursor(); - Handle(SALOME_InteractiveObject) IObject = It.Value(); - Standard_Boolean found; - GEOM::GEOM_Shape_var aShape = myGeomBase->ConvertIOinGEOMShape(IObject, found); - // Handle(GEOM_AISShape) Shape = myGeomGUI->ConvertIOinGEOMAISShape(IObject, found, true); - if ( found ) { - QString file = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), - QString( IObject->getName() ) + ".igs", - tr("GEOM_MEN_IMPORT_IGES"), - tr("GEOM_MEN_EXPORT"), - false); - if ( !file.isEmpty() && !aShape->_is_nil() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); - try { - myGeom->ExportIGES((char*)file.latin1(), aShape); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } -// //VRV: OCC 4.0 migration -// IGESControl_Controller::Init(); -// IGESControl_Writer ICW (Interface_Static::CVal("XSTEP.iges.unit"), -// Interface_Static::IVal("XSTEP.iges.writebrep.mode")); -// //VRV: OCC 4.0 migration - -// ICW.AddShape (Shape->Shape()); -// ICW.ComputeModel(); -// Standard_Boolean result = ICW.Write( strdup(file.latin1()) ); - } - } - } - break; - } + for(;It.More();It.Next()) { + Handle(SALOME_InteractiveObject) IObject = It.Value(); + Standard_Boolean found; + GEOM::GEOM_Object_var anObj = GEOMBase::ConvertIOinGEOMObject(IObject, found); - case 123 : - { -// bool test = false ; -// IFSelect_ReturnStatus status ; -// //VRV: OCC 4.0 migration -// STEPControl_Writer aWriter; -// //VRV: OCC 4.0 migration - QString file; - - for( ; It.More(); It.Next() ) { -// GEOM::GEOM_Shape_var aShape = myGeomBase->ConvertIOinGEOMShape(IObject, found); - QApplication::restoreOverrideCursor(); - Handle(SALOME_InteractiveObject) IObject = It.Value(); - Standard_Boolean found; - GEOM::GEOM_Shape_var aShape = myGeomBase->ConvertIOinGEOMShape(IObject, found); - // Handle(GEOM_AISShape) Shape = myGeomBase->ConvertIOinGEOMAISShape(IObject, found, true); - if ( found ) { - file = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), - QString( IObject->getName() ) + ".stp", - tr("GEOM_MEN_IMPORT_STEP"), - tr("GEOM_MEN_EXPORT"), - false); - if ( !file.isEmpty() && !aShape->_is_nil() ) { - - QApplication::setOverrideCursor( Qt::waitCursor ) ; - try { - myGeom->ExportSTEP((char*)file.latin1(), aShape); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } -// //VRV: OCC 4.0 migration -// status = aWriter.Transfer( Shape->Shape(), STEPControl_ManifoldSolidBrep ) ; -// //VRV: OCC 4.0 migration -// test = true ; -// if ( status != IFSelect_RetDone ) { -// QApplication::restoreOverrideCursor() ; -// return false ; -// } - } - } - } -// if(test) { -// status = aWriter.Write( strdup(file.latin1()) ) ; -// QApplication::restoreOverrideCursor() ; -// return status ; -// } - break; - } + if ( !found || anObj->_is_nil() ) + continue; + + QString fileType; + QString file = getFileName(QAD_Application::getDesktop(), + QString( IObject->getName() ), + aMap, + tr("GEOM_MEN_EXPORT"), + false, + fileType); + + // User has pressed "Cancel" --> stop the operation + if ( file.isEmpty() || fileType.isEmpty() ) + return false; + // Standard_Boolean result = BRepTools::Write(Shape->Shape(), strdup(file.latin1()) ); + try { + QAD_WaitCursor wc; + aInsOp->Export( anObj, file, fileType.latin1() ); + if ( !aInsOp->IsDone() ) { + wc.stop(); + QAD_MessageBox::error1( QAD_Application::getDesktop(), + QObject::tr( "GEOM_ERROR" ), + QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ), + QObject::tr("BUT_OK") ); + return false; + } + } + catch (const SALOME::SALOME_Exception& S_ex) { + QtCatchCorbaException(S_ex); } - QApplication::restoreOverrideCursor() ; - return true; + } + + return true; } @@ -951,6 +535,8 @@ bool GEOMToolsGUI::Export(int aState) //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return GEOMToolsGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return GEOMToolsGUI::GetGEOMToolsGUI(); + } } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index 8296fdb69..4927db5d5 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -21,41 +21,56 @@ // // // -// File : GEOMBase_Tools.h +// File : GEOMToolsGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef GEOMTOOLSGUI_H #define GEOMTOOLSGUI_H -#include "GEOMBase.h" +#include "GEOMGUI.h" //================================================================================= -// class : GEOMBase_Tools +// class : GEOMToolsGUI // purpose : //================================================================================= -class GEOMToolsGUI : public QObject +class GEOMToolsGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + GEOMToolsGUI(); // hide constructor to avoid direct creation public : - GEOMToolsGUI(); ~GEOMToolsGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only GEOMToolsGUI object + static GEOMToolsGUI* GetGEOMToolsGUI(); + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + +private: /* Import and export topology methods */ - bool Import(int aState); - bool Export(int aState); + bool Import(); + bool Export(); void OnEditCopy(); void OnEditDelete(); - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + void OnSettingsColor(); + void OnSettingsIsos(); + void OnSettingsStep(); + void OnRename(); + void OnCheckGeometry(); + void OnLoadScript(); + + // Popup commands + void OnColor(); + void OnTransparency(); + void OnNbIsos(); + void OnOpen(); +private: + static GEOMToolsGUI* myGUIObject; // the only GEOMToolsGUI object }; #endif diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx new file mode 100644 index 000000000..499106347 --- /dev/null +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -0,0 +1,451 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GEOMToolsGUI_1.cxx +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#include "GEOMToolsGUI.h" +#include "GeometryGUI.h" +#include "GEOM_Actor.h" +#include "GEOMBase.h" + +#include "QAD_Desktop.h" +#include "QAD_Config.h" +#include "QAD_FileDlg.h" +#include "QAD_PyEditor.h" +#include "QAD_RightFrame.h" +#include "QAD_MessageBox.h" +#include "SALOMEGUI_NameDlg.h" + +#include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" +#include "VTKViewer_ViewFrame.h" +#include "VTKViewer_RenderWindowInteractor.h" + +#include "SALOME_ListIO.hxx" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "GEOMToolsGUI_NbIsosDlg.h" // Method ISOS adjustement +#include "GEOMToolsGUI_TransparencyDlg.h" // Method TRANSPARENCY adjustement + +#include "utilities.h" + +using namespace std; + +void GEOMToolsGUI::OnSettingsColor() +{ + + QString aSCr = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorRed"); + QString aSCg = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorGreen"); + QString aSCb = QAD_CONFIG->getSetting("Geometry:SettingsShadingColorBlue"); + QColor anInitColor; + if(!aSCr.isEmpty() && !aSCg.isEmpty() && !aSCb.isEmpty()) { + anInitColor = QColor (aSCr.toInt(), aSCg.toInt(), aSCb.toInt()); + } + else { + Quantity_Color aDefColor = Quantity_Color(); + anInitColor = + QColor ((int)( aDefColor.Red() * 255.0 ), (int)( aDefColor.Green() * 255.0 ), (int)( aDefColor.Blue() * 255.0 ) ); + } + + QColor aDialogColor = QColorDialog::getColor(anInitColor, QAD_Application::getDesktop()); + if(aDialogColor.isValid()) { + QApplication::setOverrideCursor(Qt::waitCursor); + + if( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC && + QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_VTK ) + MESSAGE("Settings Color is not supported for current Viewer"); + + QAD_CONFIG->addSetting("Geometry:SettingsShadingColorRed", aDialogColor.red()); + QAD_CONFIG->addSetting("Geometry:SettingsShadingColorGreen", aDialogColor.green()); + QAD_CONFIG->addSetting("Geometry:SettingsShadingColorBlue", aDialogColor.blue()); + QApplication::restoreOverrideCursor(); + } +} + +void GEOMToolsGUI::OnSettingsIsos() +{ + if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) + return; + + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); + Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); + + QString IsoU = QAD_CONFIG->getSetting("Geometry:SettingsIsoU"); + QString IsoV = QAD_CONFIG->getSetting("Geometry:SettingsIsoV"); + + if(!IsoU.isEmpty()) + ic->DefaultDrawer()->UIsoAspect()->SetNumber(IsoU.toInt()); + else + IsoU = "1"; + if (!IsoV.isEmpty()) + ic->DefaultDrawer()->VIsoAspect()->SetNumber(IsoV.toInt()); + else + IsoV = "1"; + + GEOMBase_NbIsosDlg* NbIsosDlg = new GEOMBase_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE); + int UIso = IsoU.toInt(); + int VIso = IsoV.toInt(); + + NbIsosDlg->SpinBoxU->setValue(UIso); + NbIsosDlg->SpinBoxV->setValue(VIso); + + if(NbIsosDlg->exec()) { + UIso = NbIsosDlg->SpinBoxU->text().toInt(); + VIso = NbIsosDlg->SpinBoxV->text().toInt(); + + ic->DefaultDrawer()->UIsoAspect()->SetNumber(UIso); + ic->DefaultDrawer()->VIsoAspect()->SetNumber(VIso); + QAD_CONFIG->addSetting("Geometry:SettingsIsoU", NbIsosDlg->SpinBoxU->text()); /* text format */ + QAD_CONFIG->addSetting("Geometry:SettingsIsoV", NbIsosDlg->SpinBoxV->text()); /* text format */ + } +} + +void GEOMToolsGUI::OnSettingsStep() +{ + QString step = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); + if(step.isEmpty()) + step = "100.0"; + + Standard_Boolean res = false; + double dd = GEOMBase::Parameter(res, QString("%1").arg(step), tr("GEOM_MEN_STEP_LABEL"), tr("GEOM_STEP_TITLE"), 0.001, 10000.0, 3); + if(res) { + QAD_CONFIG->addSetting("Geometry:SettingsGeomStep", QString("%1").arg(dd)); + + /* Emit signal to GeometryGUI_SpinBoxes */ + GeometryGUI::GetGeomGUI()->EmitSignalDefaultStepValueChanged(dd); + } + else + QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); +} + +void GEOMToolsGUI::OnRename() +{ + SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + + bool aLocked = aStudy->GetProperties()->IsLocked(); + if ( aLocked ) { + QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); + return; + } + + SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); + for(; It.More(); It.Next()) { + Handle(SALOME_InteractiveObject) IObject = It.Value(); + + SALOMEDS::SObject_var obj = aStudy->FindObjectID(IObject->getEntry()); + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::AttributeName_var aName; + if(!obj->_is_nil()) { + if(obj->FindAttribute(anAttr, "AttributeName")) { + aName = SALOMEDS::AttributeName::_narrow(anAttr); + + QString nm = QString(aName->Value()); + nm = SALOMEGUI_NameDlg::getName(QAD_Application::getDesktop(), nm); + if(!nm.isEmpty()) { + QApplication::setOverrideCursor(Qt::waitCursor); + QAD_Application::getDesktop()->getActiveStudy()->renameIObject(IObject, nm); + QApplication::restoreOverrideCursor(); + } + } + } + } +} + +void GEOMToolsGUI::OnCheckGeometry() +{ + QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor(); + PyEditor->setText("from GEOM_usinggeom import *\n"); + PyEditor->handleReturn(); +} + +void GEOMToolsGUI::OnLoadScript() +{ + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + bool aLocked = aStudy->GetProperties()->IsLocked(); + if ( aLocked ) { + QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); + return; + } + + QStringList filtersList; + filtersList.append(tr("GEOM_MEN_LOAD_SCRIPT")); + filtersList.append(tr("GEOM_MEN_ALL_FILES")); + + QString aFile = QAD_FileDlg::getFileName(QAD_Application::getDesktop(), "", filtersList, tr("GEOM_MEN_IMPORT"), true); + if(!aFile.isEmpty()) { + QFileInfo file = aFile; + QApplication::setOverrideCursor(Qt::waitCursor); + QAD_PyEditor* PyEditor = QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getPyEditor(); + + QStringList aTextList = QStringList::split(".", file.fileName()); + + PyEditor->setText("import geompy; geompy.addPath('" + file.dirPath() + "'); from " + aTextList.first() + " import *\n" ); + PyEditor->handleReturn(); + } + QApplication::restoreOverrideCursor(); +} + +void GEOMToolsGUI::OnColor() +{ + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + if ( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK ) + { + VTKViewer_RenderWindowInteractor* myRenderInter = + ( (VTKViewer_ViewFrame*)QAD_Application::getDesktop()-> + getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getRWInteractor(); + + SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); + Handle(SALOME_InteractiveObject) FirstIOS = Sel->firstIObject(); + if ( !FirstIOS.IsNull() ) + { + QColor initcolor = myRenderInter->GetColor(FirstIOS); + QColor c = QColorDialog::getColor( initcolor, QAD_Application::getDesktop() ); + + if ( c.isValid() ) + { + QApplication::setOverrideCursor( Qt::waitCursor ); + for ( ;It.More();It.Next() ) + { + Handle(SALOME_InteractiveObject) IOS = It.Value(); + myRenderInter->SetColor(IOS,c); + } + } + QApplication::restoreOverrideCursor(); + } + } + else if( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC ) + { + Handle(AIS_InteractiveObject) anIO = GEOMBase::GetAIS( Sel->firstIObject() ); + if ( !anIO.IsNull() ) + { + Quantity_Color aColor; + anIO->Color( aColor ); + + QColor qColor = QColorDialog::getColor( QColor( (int)( aColor.Red() * 255.0 ), + (int)( aColor.Green() * 255.0 ), + (int)( aColor.Blue() * 255.0 ) ), + QAD_Application::getDesktop()); + + if ( qColor.isValid() ) + { + aColor = Quantity_Color( qColor.red() / 255., + qColor.green() / 255., + qColor.blue() / 255., + Quantity_TOC_RGB ); + + QApplication::setOverrideCursor( Qt::waitCursor ); + + SALOME_ListIteratorOfListIO anIter ( Sel->StoredIObjects() ); + for( ;anIter.More();anIter.Next() ) + { + Handle(SALOME_InteractiveObject) IObject = anIter.Value(); + Handle(AIS_InteractiveObject) anIO = GEOMBase::GetAIS( IObject, true ); + if ( !anIO.IsNull() ) + { + anIO->SetColor( aColor ); + + if ( anIO->IsKind( STANDARD_TYPE(GEOM_AISShape) ) ) + Handle(GEOM_AISShape)::DownCast( anIO )->SetShadingColor( aColor ); + + anIO->Redisplay( Standard_True ); + } + } + } + } + } + + QApplication::restoreOverrideCursor(); +} + +void GEOMToolsGUI::OnTransparency() +{ + Handle(AIS_InteractiveContext) ic; + SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); + ic = v3d->getAISContext(); + } + new GEOMBase_TransparencyDlg(QAD_Application::getDesktop(), "", Sel, ic); +} + +void GEOMToolsGUI::OnNbIsos() +{ + if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) + return; + + OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); + Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); + + ic->InitCurrent(); + if(ic->MoreCurrent()) { + Handle(GEOM_AISShape) CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current()); + Handle(AIS_Drawer) CurDrawer = CurObject->Attributes(); + + int UIso = CurDrawer->UIsoAspect()->Number(); + int VIso = CurDrawer->VIsoAspect()->Number(); + + GEOMBase_NbIsosDlg * NbIsosDlg = + new GEOMBase_NbIsosDlg(QAD_Application::getDesktop(), tr("GEOM_MEN_ISOS"), TRUE); + + NbIsosDlg->SpinBoxU->setValue( UIso ); + NbIsosDlg->SpinBoxV->setValue( VIso ); + + if(NbIsosDlg->exec()) { + QApplication::setOverrideCursor(Qt::waitCursor); + for(; ic->MoreCurrent(); ic->NextCurrent()) { + CurObject = Handle(GEOM_AISShape)::DownCast(ic->Current()); + Handle(AIS_Drawer) CurDrawer = CurObject->Attributes(); + + int nbUIso = NbIsosDlg->SpinBoxU->text().toInt(); + int nbVIso = NbIsosDlg->SpinBoxV->text().toInt(); + + CurDrawer->SetUIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , nbUIso) ); + CurDrawer->SetVIsoAspect( new Prs3d_IsoAspect(Quantity_NOC_GRAY75, Aspect_TOL_SOLID, 0.5 , nbVIso) ); + + ic->SetLocalAttributes(CurObject, CurDrawer); + ic->Redisplay(CurObject); + } + } + } + QApplication::restoreOverrideCursor(); +} + +void GEOMToolsGUI::OnOpen() +{ + SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); + + SALOME_ListIteratorOfListIO It(Sel->StoredIObjects()); + Handle(SALOME_InteractiveObject) anIObject; + for(;It.More();It.Next()) { + anIObject = It.Value(); + SALOMEDS::SObject_var obj = aStudy->FindObjectID(anIObject->getEntry()); + SALOMEDS::AttributePersistentRef_var aPersist; + SALOMEDS::AttributeIOR_var anIOR; + if(!obj->_is_nil()) { + // this SObject may be GEOM module root SObject + SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(obj); + SALOMEDS::GenericAttribute_var anAttr; + bool useSubItems = false; + while (anIter->More() && !useSubItems) { + SALOMEDS::SObject_var subobj = anIter->Value(); + if (subobj->FindAttribute(anAttr, "AttributePersistentRef")) { + useSubItems = true; + obj = subobj; + } + else + anIter->Next(); + } + obj->FindAttribute(anAttr, "AttributePersistentRef"); + + while(useSubItems?anIter->More():!anAttr->_is_nil()) { + if(!obj->FindAttribute(anAttr, "AttributeIOR") && + obj->FindAttribute(anAttr, "AttributePersistentRef")) { + SALOMEDS::SComponent_var FComp = obj->GetFatherComponent(); + if (!CORBA::is_nil(FComp)) { + if (FComp->FindAttribute(anAttr, "AttributeName")) { + SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr); + QString compName = QAD_Application::getDesktop()->getComponentName(aName->Value()); + // parent->loadComponentData(parent->getComponentName(aName->Value())); + Engines::Component_var comp ; + if ( compName.compare("SUPERV") == 0 ) { + comp = QAD_Application::getDesktop()->getEngine( "SuperVisionContainer", compName) ; + } + else { + comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", compName); + if ( comp->_is_nil() ) + comp = QAD_Application::getDesktop()->getEngine( "FactoryServerPy", compName); + } + + if (!CORBA::is_nil(comp)) { + SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); + if (!CORBA::is_nil(driver)) { + SALOMEDS::StudyBuilder_var B = aStudy->NewBuilder(); + if (!CORBA::is_nil(B)) { + B->LoadWith(FComp,driver); + } else { + return; + } + } + else { + MESSAGE("loadComponentData(): Driver is null"); + return; + } + } + else { + MESSAGE("loadComponentData(): Engine is null"); + return; + } + // // load + // Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer","GEOM"); + // if (!CORBA::is_nil(comp)) { + // SALOMEDS::Driver_var driver = SALOMEDS::Driver::_narrow(comp); + // SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + // SALOMEDS::SComponent_var SC = aStudy->FindComponent("GEOM"); + // if (!CORBA::is_nil(SC)) + // aStudyBuilder->LoadWith(SC,driver); + } + } + else { + MESSAGE("Component is null"); + } + } + if(useSubItems) { + anIter->Next(); + obj = anIter->Value(); + } + else + anAttr = SALOMEDS::GenericAttribute::_nil(); + } + } + } +} diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx index 842332015..5ef80f650 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.cxx @@ -21,7 +21,7 @@ // // // -// File : GEOMToolsGUI_NbIsosDlg.cxx +// File : GEOMBase_NbIsosDlg.cxx // Author : // Module : GEOM // $Header: @@ -37,17 +37,17 @@ using namespace std; #include //================================================================================= -// class : GEOMToolsGUI_NbIsosDlg() -// purpose : Constructs a GEOMToolsGUI_NbIsosDlg which is a child of 'parent', with the +// class : GEOMBase_NbIsosDlg() +// purpose : Constructs a GEOMBase_NbIsosDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent, const char* name, bool modal, WFlags fl) +GEOMBase_NbIsosDlg::GEOMBase_NbIsosDlg(QWidget* parent, const char* name, bool modal, WFlags fl) :QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { if( !name ) - setName("GEOMToolsGUI_NbIsosDlg"); + setName("GEOMBase_NbIsosDlg"); setCaption(name); setSizeGripEnabled(TRUE); QGridLayout* MyDialogLayout = new QGridLayout(this); @@ -122,10 +122,10 @@ GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent, const char* name //================================================================================= -// function : ~GEOMToolsGUI_NbIsosDlg() +// function : ~GEOMBase_NbIsosDlg() // purpose : Destroys the object and frees any allocated resources //================================================================================= -GEOMToolsGUI_NbIsosDlg::~GEOMToolsGUI_NbIsosDlg() +GEOMBase_NbIsosDlg::~GEOMBase_NbIsosDlg() { // no need to delete child widgets, Qt does it all for us } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h index 07e471200..48c70c563 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_NbIsosDlg.h @@ -21,13 +21,13 @@ // // // -// File : GEOMToolsGUI_NbIsosDlg.h +// File : GEOMBase_NbIsosDlg.h // Author : // Module : GEOM // $Header: -#ifndef GEOMTOOLSGUI_NBISOSDLG_H -#define GEOMTOOLSGUI_NBISOSDLG_H +#ifndef GEOMBASE_NBISOSDLG_H +#define GEOMBASE_NBISOSDLG_H #include @@ -36,16 +36,16 @@ class QSpinBox; class QPushButton; //================================================================================= -// class : GEOMToolsGUI_NbIsosDlg +// class : GEOMBase_NbIsosDlg // purpose : //================================================================================= -class GEOMToolsGUI_NbIsosDlg : public QDialog +class GEOMBase_NbIsosDlg : public QDialog { Q_OBJECT public: - GEOMToolsGUI_NbIsosDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0); - ~GEOMToolsGUI_NbIsosDlg(); + GEOMBase_NbIsosDlg(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0); + ~GEOMBase_NbIsosDlg(); QPushButton* buttonOk; QPushButton* buttonCancel; @@ -56,4 +56,4 @@ public: }; -#endif // GEOMTOOLSGUI_NBISOSDLG_H +#endif // GEOMETRYGUI_NBISOSDLG_H diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx index 12beaaaa5..f681d13c7 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.cxx @@ -21,16 +21,18 @@ // // // -// File : GEOMToolsGUI_TransparencyDlg.cxx +// File : GEOMBase_TransparencyDlg.cxx // Author : Lucien PIGNOLONI // Module : GEOM using namespace std; #include "GEOMToolsGUI_TransparencyDlg.h" +#include "QAD_Desktop.h" #include "QAD_RightFrame.h" #include "SALOME_ListIteratorOfListIO.hxx" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_ViewFrame.h" #include #include @@ -48,24 +50,24 @@ using namespace std; #include "VTKViewer_RenderWindowInteractor.h" //================================================================================= -// class : GEOMToolsGUI_TransparencyDlg() +// class : GEOMBase_TransparencyDlg() // purpose : Constructs a GEOMBase_SUBSHAPE which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // // : WARNING : this dialog is modal ! // //================================================================================= -GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, const Handle(AIS_InteractiveContext)& ic, bool modal, WFlags fl) +GEOMBase_TransparencyDlg::GEOMBase_TransparencyDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, const Handle(AIS_InteractiveContext)& ic, bool modal, WFlags fl) :QDialog(parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { if(!name) - setName("GEOMToolsGUI_TransparencyDlg"); + setName("GEOMBase_TransparencyDlg"); resize(152, 107); setCaption(tr("GEOM_TRANSPARENCY_TITLE")); setSizeGripEnabled(TRUE); - GEOMToolsGUI_TransparencyDlgLayout = new QGridLayout(this); - GEOMToolsGUI_TransparencyDlgLayout->setSpacing(6); - GEOMToolsGUI_TransparencyDlgLayout->setMargin(11); + GEOMBase_TransparencyDlgLayout = new QGridLayout(this); + GEOMBase_TransparencyDlgLayout->setSpacing(6); + GEOMBase_TransparencyDlgLayout->setMargin(11); /*************************************************************************/ QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" ); @@ -112,11 +114,10 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg(QWidget* parent, cons GroupC1Layout->addMultiCellWidget( Slider1, 1, 1, 0, 2 ); /*************************************************************************/ - GEOMToolsGUI_TransparencyDlgLayout->addWidget(GroupC1, 0, 0); - GEOMToolsGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0); + GEOMBase_TransparencyDlgLayout->addWidget(GroupC1, 0, 0); + GEOMBase_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0); /* Initialisations */ - this->myGeomGUI = GEOMContext::GetGeomGUI(); this->myGeomBase = new GEOMBase(); this->myIc = ic; this->mySel = Sel; @@ -133,18 +134,18 @@ GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg(QWidget* parent, cons connect(Slider1, SIGNAL(valueChanged(int)), this, SLOT(ValueHasChanged(int))); /* Move widget on the botton right corner of main widget */ -// int x, y ; -// myGeomBase->DefineDlgPosition(this, x, y); -// this->move(x, y) ; + int x, y ; + myGeomBase->DefineDlgPosition(this, x, y); + this->move(x, y) ; this->show() ; /* Displays this Dialog */ } //================================================================================= -// function : ~GEOMToolsGUI_TransparencyDlg() +// function : ~GEOMBase_TransparencyDlg() // purpose : //================================================================================= -GEOMToolsGUI_TransparencyDlg::~GEOMToolsGUI_TransparencyDlg() +GEOMBase_TransparencyDlg::~GEOMBase_TransparencyDlg() { // no need to delete child widgets, Qt does it all for us } @@ -154,7 +155,7 @@ GEOMToolsGUI_TransparencyDlg::~GEOMToolsGUI_TransparencyDlg() // function : ClickOnOk() // purpose : //======================================================================= -void GEOMToolsGUI_TransparencyDlg::ClickOnOk() +void GEOMBase_TransparencyDlg::ClickOnOk() { accept(); return; @@ -165,7 +166,7 @@ void GEOMToolsGUI_TransparencyDlg::ClickOnOk() // function : ClickOnClose() // purpose : //======================================================================= -void GEOMToolsGUI_TransparencyDlg::ClickOnClose() +void GEOMBase_TransparencyDlg::ClickOnClose() { accept(); return; @@ -177,7 +178,7 @@ void GEOMToolsGUI_TransparencyDlg::ClickOnClose() // purpose : Called when value of slider change // : or the first time as initilisation //================================================================================= -void GEOMToolsGUI_TransparencyDlg::ValueHasChanged(int newValue) +void GEOMBase_TransparencyDlg::ValueHasChanged(int newValue) { if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_VTK) { // VTK @@ -191,6 +192,7 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged(int newValue) this->myFirstInit = false; float transp = (myRenderInter->GetTransparency(FirstIOS))*10.0; this->Slider1->setValue(int(transp)); + return; } } @@ -199,6 +201,7 @@ void GEOMToolsGUI_TransparencyDlg::ValueHasChanged(int newValue) Handle(SALOME_InteractiveObject) IOS = It.Value(); myRenderInter->SetTransparency(IOS, newValue/10.0); } + myRenderInter->Render(); QApplication::restoreOverrideCursor(); } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h index 8ae122d1b..94889f6ef 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI_TransparencyDlg.h @@ -21,7 +21,7 @@ // // // -// File : GEOMToolsGUI_TransparencyDlg.h +// File : GEOMBase_TransparencyDlg.h // Author : Lucien PIGNOLONI // Module : GEOM // $Header$ @@ -51,28 +51,27 @@ class QSlider; //================================================================================= -// class : GEOMToolsGUI_TransparencyDlg +// class : GEOMBase_TransparencyDlg // purpose : // : WARNING : that is a MODAL dialog. //================================================================================= -class GEOMToolsGUI_TransparencyDlg : public QDialog +class GEOMBase_TransparencyDlg : public QDialog { Q_OBJECT public: - GEOMToolsGUI_TransparencyDlg( QWidget* parent = 0, + GEOMBase_TransparencyDlg( QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, const Handle(AIS_InteractiveContext)& ic = 0, bool modal = TRUE, WFlags fl = 0 ); - ~GEOMToolsGUI_TransparencyDlg(); + ~GEOMBase_TransparencyDlg(); private : - GEOMContext* myGeomGUI ; /* Current GeomGUI object */ - GEOMBase* myGeomBase ; /* Current GeomGUI object */ + GEOMBase* myGeomBase ; /* Current GeomGUI object */ bool myFirstInit ; /* Inform for the first init */ SALOME_Selection* mySel; /* User selection */ Handle(AIS_InteractiveContext) myIc ; /* Interactive context */ @@ -89,7 +88,7 @@ public slots: void ValueHasChanged( int newValue ) ; protected: - QGridLayout* GEOMToolsGUI_TransparencyDlgLayout; + QGridLayout* GEOMBase_TransparencyDlgLayout; QHBoxLayout* Layout1; QHBoxLayout* Layout2; }; diff --git a/src/GEOMToolsGUI/Makefile.in b/src/GEOMToolsGUI/Makefile.in index 95cc8b8f8..0614a6d83 100644 --- a/src/GEOMToolsGUI/Makefile.in +++ b/src/GEOMToolsGUI/Makefile.in @@ -41,6 +41,7 @@ LIB = libGEOMToolsGUI.la EXPORT_HEADERS= LIB_SRC = GEOMToolsGUI.cxx \ + GEOMToolsGUI_1.cxx \ GEOMToolsGUI_NbIsosDlg.cxx \ GEOMToolsGUI_TransparencyDlg.cxx @@ -49,7 +50,7 @@ LIB_MOC = \ GEOMToolsGUI_NbIsosDlg.h \ GEOMToolsGUI_TransparencyDlg.h -LIB_CLIENT_IDL = SALOMEDS_Attributes.idl +LIB_CLIENT_IDL = SALOMEDS_Attributes.idl SALOME_GenericObj.idl LIB_SERVER_IDL = diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc new file mode 100644 index 000000000..f87278d4a --- /dev/null +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -0,0 +1,839 @@ +using namespace std; + +#include "GEOM_Gen_i.hh" +#include "GEOM_Object_i.hh" +#include "SALOMEDS_Tool.hxx" + +#include "Utils_CorbaException.hxx" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" +#include "utilities.h" + +#include "GEOM_Object_i.hh" +#include "GEOM_Object.hxx" +#include "GEOM_Function.hxx" +#include "GEOMImpl_Types.hxx" +#include "GEOMImpl_CopyDriver.hxx" + +// Cascade headers +#include +#include +#include +#include +#include +#include +#include + +//============================================================================ +// function : GEOM_Gen_i() +// purpose : constructor to be called for servant creation. +//============================================================================ +GEOM_Gen_i::GEOM_Gen_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName) +{ + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + name_service = new SALOME_NamingService(_orb); + + _impl = new ::GEOMImpl_Gen; + +} + + + +//============================================================================ +// function : ~GEOM_Gen_i() +// purpose : destructor +//============================================================================ +GEOM_Gen_i::~GEOM_Gen_i() { + delete name_service; + delete _impl; +} + + +//============================================================================ +// function : IORToLocalPersistentID() +// purpose : +//============================================================================ +char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) +{ + GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(IORString)); + if (!CORBA::is_nil(anObject)) { + return strdup(anObject->GetEntry()); + } + return 0; +} + + +//============================================================================ +// function : LocalPersistentIDToIOR() +// purpose : Create/Load CORBA object from a persistent ref (an entry) +// : Used when a study is loaded +// : The IOR (IORName) of object created is returned +//============================================================================ +char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) +{ + SALOMEDS::Study_var aStudy = theSObject->GetStudy(); + + Handle(GEOM_Object) anObject = _impl->GetObject(aStudy->StudyId(), const_cast(aLocalPersistentID)); + TCollection_AsciiString anEntry; + TDF_Tool::Entry(anObject->GetEntry(), anEntry); + GEOM::GEOM_Object_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString()); + + CORBA::String_var aPersRefString = _orb->object_to_string(obj); + return strdup(aPersRefString); +} + +//============================================================================ +// function : CanPublishInStudy +// purpose : +//============================================================================ +bool GEOM_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) +{ + GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(theIOR); + return !(anObject->_is_nil()); +} + + +//============================================================================ +// function : PublishInStudy +// purpose : +//============================================================================ +SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName) throw (SALOME::SALOME_Exception) +{ + Unexpect aCatch(SALOME_SalomeException); + SALOMEDS::SObject_var aResultSO; + if(CORBA::is_nil(theObject) || theStudy->_is_nil()) return aResultSO; + + GEOM::GEOM_Object_var aShape = GEOM::GEOM_Object::_narrow(theObject); + if(aShape->_is_nil()) return aResultSO; + + SALOMEDS::GenericAttribute_var anAttr; + SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + + SALOMEDS::SComponent_var aFather = theStudy->FindComponent("GEOM"); + if (aFather->_is_nil()) { + aFather = aStudyBuilder->NewComponent("GEOM"); + anAttr = aStudyBuilder->FindOrCreateAttribute(aFather, "AttributeName"); + SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr); + aName->SetValue("Geometry"); + anAttr = aStudyBuilder->FindOrCreateAttribute(aFather, "AttributePixMap"); + SALOMEDS::AttributePixMap::_narrow(anAttr)->SetPixMap("ICON_OBJBROWSER_Geometry"); + aStudyBuilder->DefineComponentInstance(aFather, GEOM_Gen::_this()); + } + if (aFather->_is_nil()) return aResultSO; + + if (CORBA::is_nil(theSObject)) { + aResultSO = aStudyBuilder->NewObject(aFather); + } else { + if (!theSObject->ReferencedObject(aResultSO)) + aResultSO = SALOMEDS::SObject::_duplicate(theSObject); //SRN: Added Aug 24,2004 : for the method AddInStudy with theFather argumenet != NULL + //THROW_SALOME_CORBA_EXCEPTION("Publish in study supervision graph error",SALOME::BAD_PARAM); + } + anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeIOR"); + SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + char *aGeomObjIOR = _orb->object_to_string(theObject); + anIOR->SetValue(strdup(aGeomObjIOR)); + + anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributePixMap"); + SALOMEDS::AttributePixMap_var aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr); + TCollection_AsciiString aShapeName("Shape_"); + + if ( aShape->GetType() == GEOM_GROUP ) { + GEOM::GEOM_IGroupOperations_var anOp = GetIGroupOperations( theStudy->StudyId() ); + switch ( (TopAbs_ShapeEnum)anOp->GetType( aShape ) ) { + case TopAbs_VERTEX: + aPixmap->SetPixMap( "ICON_OBJBROWSER_GROUP_PNT" ); + aShapeName = "Group_Of_Vertices_"; + break; + case TopAbs_EDGE: + aPixmap->SetPixMap( "ICON_OBJBROWSER_GROUP_EDGE" ); + aShapeName = "Group_Of_Edges_"; + break; + case TopAbs_FACE: + aPixmap->SetPixMap( "ICON_OBJBROWSER_GROUP_FACE" ); + aShapeName = "Group_Of_Faces_"; + break; + case TopAbs_SOLID: + aPixmap->SetPixMap( "ICON_OBJBROWSER_GROUP_SOLID" ); + aShapeName = "Group_Of_Solids_"; + break; + } + } else if ( aShape->GetType() == GEOM_MARKER ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_LCS" ); + aShapeName = "LocalCS_"; + } else if ( aShape->GetShapeType() == GEOM::COMPOUND ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_COMPOUND" ); + aShapeName = "Compound_"; + } else if ( aShape->GetShapeType() == GEOM::COMPSOLID ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_COMPSOLID" ); + aShapeName = "Compsolid_"; + } else if ( aShape->GetShapeType() == GEOM::SOLID ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_SOLID" ); + aShapeName = "Solid_"; + } else if ( aShape->GetShapeType() == GEOM::SHELL ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_SHELL" ); + aShapeName = "Shell_"; + } else if ( aShape->GetShapeType() == GEOM::FACE ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_FACE" ); + aShapeName = "Face_"; + } else if ( aShape->GetShapeType() == GEOM::WIRE ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_WIRE" ); + aShapeName = "Wire_"; + } else if ( aShape->GetShapeType() == GEOM::EDGE ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_EDGE" ); + aShapeName = "Edge_"; + } else if ( aShape->GetShapeType() == GEOM::VERTEX ) { + aPixmap->SetPixMap( "ICON_OBJBROWSER_VERTEX" ); + aShapeName = "Vertex_"; + } + if (strlen(theName) == 0) aShapeName += TCollection_AsciiString(aResultSO->Tag()); + else aShapeName = TCollection_AsciiString(strdup(theName)); + + //Set the study entry as a name of the published GEOM_Object + aShape->SetStudyEntry(aResultSO->GetID()); + + //Set a name of the added shape + anAttr = aStudyBuilder->FindOrCreateAttribute(aResultSO, "AttributeName"); + SALOMEDS::AttributeName_var aNameAttrib = SALOMEDS::AttributeName::_narrow(anAttr); + aNameAttrib->SetValue(aShapeName.ToCString()); + + return aResultSO._retn(); +} + + +//============================================================================ +// function : Save() +// purpose : save OCAF/Geom document +//============================================================================ +SALOMEDS::TMPFile* GEOM_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) { + SALOMEDS::TMPFile_var aStreamFile; + // Get a temporary directory to store a file + std::string aTmpDir = (isMultiFile)?theURL:SALOMEDS_Tool::GetTmpDir(); + // Create a list to store names of created files + SALOMEDS::ListOfFileNames_var aSeq = new SALOMEDS::ListOfFileNames; + aSeq->length(1); + // Prepare a file name to open + TCollection_AsciiString aNameWithExt(""); + if (isMultiFile) + aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL())).c_str()); + aNameWithExt += TCollection_AsciiString("_GEOM.sgd"); + aSeq[0] = CORBA::string_dup(aNameWithExt.ToCString()); + // Build a full file name of temporary file + TCollection_AsciiString aFullName = TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt; + // Save GEOM component in this file + _impl->Save(theComponent->GetStudy()->StudyId(), aFullName.ToCString()); + // Conver a file to the byte stream + aStreamFile = SALOMEDS_Tool::PutFilesToStream(aTmpDir.c_str(), aSeq.in(), isMultiFile); + // Remove the created file and tmp directory + if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true); + + // Return the created byte stream + return aStreamFile._retn(); +} + + +//============================================================================ +// function : SaveASCII() +// purpose : +//============================================================================ +SALOMEDS::TMPFile* GEOM_Gen_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) { + SALOMEDS::TMPFile_var aStreamFile = Save(theComponent, theURL, isMultiFile); + return aStreamFile._retn(); +} + + +//============================================================================ +// function : Load() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile) { + + if (theStream.length() <= 9) { + MESSAGE("The TMPFile is too short : " << theStream.length() << " bytes "); + return false; + } + + // Get a temporary directory for a file + std::string aTmpDir = isMultiFile?theURL:SALOMEDS_Tool::GetTmpDir(); + // Conver the byte stream theStream to a file and place it in tmp directory + SALOMEDS::ListOfFileNames_var aSeq = SALOMEDS_Tool::PutStreamToFiles(theStream, aTmpDir.c_str(), isMultiFile); + + // Prepare a file name to open + TCollection_AsciiString aNameWithExt(""); + if (isMultiFile) + aNameWithExt = TCollection_AsciiString((char*)(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL())).c_str()); + aNameWithExt += TCollection_AsciiString("_GEOM.sgd"); + TCollection_AsciiString aFullName = (TCollection_AsciiString((char*)aTmpDir.c_str()) + aNameWithExt); + + // Open document + if (!_impl->Load(theComponent->GetStudy()->StudyId(), aFullName.ToCString())) return false; + + // Remove the created file and tmp directory + if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(aTmpDir.c_str(), aSeq.in(), true); + + SALOMEDS::Study_var Study = theComponent->GetStudy(); + TCollection_AsciiString name( strdup(Study->Name()) ); + + return true; +} + + +//============================================================================ +// function : LoadASCII() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile) { + return Load(theComponent, theStream, theURL, isMultiFile); +} + + +//============================================================================ +// function : Close() +// purpose : +//============================================================================ +void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent) +{ + _impl->Close(theComponent->GetStudy()->StudyId()); +} + +//============================================================================ +// function : CanCopy() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Gen_i::CanCopy(SALOMEDS::SObject_ptr theObject) { + // Try to retrieve known by Geometry component GEOM_Object by given IOR + SALOMEDS::GenericAttribute_var anAttr; + if (!theObject->FindAttribute(anAttr, "AttributeIOR")) return false; + + SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); + + GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(anIOR->Value())); + // If the object is null one it can't be copied: return false + if (anObject->_is_nil()) return false; + return true; +} + +//============================================================================ +// function : CopyFrom() +// purpose : +//============================================================================ +SALOMEDS::TMPFile* GEOM_Gen_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID) { + // Declare a sequence of the byte to store the copied object + SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile; + + // Try to get GEOM_Object object by given SObject + SALOMEDS::GenericAttribute_var anAttr; + if (!theObject->FindAttribute(anAttr, "AttributeIOR")) return aStreamFile._retn(); + GEOM::GEOM_Object_var anObject = GEOM::GEOM_Object::_narrow(_orb->string_to_object(SALOMEDS::AttributeIOR::_narrow(anAttr)->Value())); + if (anObject->_is_nil()) return aStreamFile._retn(); + + aStreamFile = anObject->GetShapeStream(); + + // Assign an ID the type of GEOM_Object + theObjectID = anObject->GetType(); + + // Return created TMPFile + return aStreamFile._retn(); +} + +//============================================================================ +// function : CanPaste() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Gen_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID) { + // The Geometry component can paste only objects copied by Geometry component + // and with the object type = 1 + if (strcmp(theComponentName, ComponentDataType()) != 0) return false; + return true; +} + +//============================================================================ +// function : PasteInto() +// purpose : +//============================================================================ +SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theObject) { + // Find the current Study and StudyBuilder + SALOMEDS::Study_var aStudy = theObject->GetStudy(); + SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + + // Retrieve a TopoDS_Shape from byte stream + TopoDS_Shape aTopology; + istrstream aStreamedBrep((char*) &theStream[0], theStream.length()); + BRep_Builder aBuilder; + try { + BRepTools::Read(aTopology, aStreamedBrep, aBuilder); + } catch (Standard_Failure) { + return false; + } + + // SObject of the created shape is theObject or new Child of Component if theObject == geom component + SALOMEDS::SObject_var aNewSO; + if (strcmp(theObject->GetFatherComponent()->GetID(),theObject->GetID()) == 0) { + aNewSO = aStudyBuilder->NewObject(theObject); + } else aNewSO = SALOMEDS::SObject::_duplicate(theObject); + + + //Create a new GEOM_Object + Handle(GEOM_Object) anObj = _impl->AddObject(aNewSO->GetStudy()->StudyId(), theObjectID); + Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF); + aFunction->SetValue(aTopology); + + TCollection_AsciiString anEntry; + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + GEOM::GEOM_Object_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString()); + + // 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); + anIOR->SetValue(_orb->object_to_string(obj)); + + // Return the created in the Study SObject + return aNewSO._retn(); +} + +//============================================================================ +// function : ComponentDataType() +// purpose : +//============================================================================ +char* GEOM_Gen_i::ComponentDataType() +{ + return strdup("GEOM"); +} + +//============================================================================ +// function : AddInStudy +// purpose : +//============================================================================ +SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM::GEOM_Object_ptr theObject, const char* theName, GEOM::GEOM_Object_ptr theFather) +{ + SALOMEDS::SObject_var aResultSO; + if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO; + + SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + char* IOR; + + if(!theFather->_is_nil()) { + IOR = _orb->object_to_string(theFather); + SALOMEDS::SObject_var aFatherSO = theStudy->FindObjectIOR(IOR); + if(aFatherSO->_is_nil()) return aResultSO._retn(); + aResultSO = aStudyBuilder->NewObject(aFatherSO); + //aStudyBuilder->Addreference(aResultSO, aResultSO); + } + + aResultSO = PublishInStudy(theStudy, aResultSO, theObject, theName); + if(aResultSO->_is_nil()) return aResultSO._retn(); + + GEOM::ListOfGO_var aList = theObject->GetDependency(); + Standard_Integer aLength = aList->length(); + if(aLength < 1) return aResultSO._retn(); + + //Publish the arguments + for(Standard_Integer i = 0; i< aLength; i++) { + GEOM::GEOM_Object_var anObject = aList[i]; + if(anObject->_is_nil()) continue; + IOR = _orb->object_to_string(anObject); + SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(IOR); + if(aSO->_is_nil()) continue; + SALOMEDS::SObject_var aSubSO = aStudyBuilder->NewObject(aResultSO); + aStudyBuilder->Addreference(aSubSO, aSO); + } + + return aResultSO._retn(); +} + +//============================================================================ +// function : register() +// purpose : register 'name' in 'name_service' +//============================================================================ +void GEOM_Gen_i::register_name(char * name) +{ + GEOM::GEOM_Gen_ptr g = GEOM::GEOM_Gen::_narrow(POA_GEOM::GEOM_Gen::_this()); + name_service->Register(g, strdup(name)); +} + +//============================================================================ +// function : Undo +// purpose : +//============================================================================ +void GEOM_Gen_i::Undo(CORBA::Long theStudyID) +{ + _impl->Undo(theStudyID); +} + +//============================================================================ +// function : Redo +// purpose : +//============================================================================ +void GEOM_Gen_i::Redo(CORBA::Long theStudyID) +{ + _impl->Redo(theStudyID); +} + +//============================================================================ +// function : GetIBasicOperations +// purpose : +//============================================================================ +GEOM::GEOM_IBasicOperations_ptr GEOM_Gen_i::GetIBasicOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIBasicOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IBasicOperations_i* aServant = + new GEOM_IBasicOperations_i(_poa, engine, _impl->GetIBasicOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IBasicOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetITransformOperations +// purpose : +//============================================================================ +GEOM::GEOM_ITransformOperations_ptr GEOM_Gen_i::GetITransformOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetITransformOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_ITransformOperations_i* aServant = + new GEOM_ITransformOperations_i(_poa, engine, _impl->GetITransformOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_ITransformOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetI3DPrimOperations +// purpose : +//============================================================================ +GEOM::GEOM_I3DPrimOperations_ptr GEOM_Gen_i::GetI3DPrimOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetI3DPrimOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_I3DPrimOperations_i* aServant = + new GEOM_I3DPrimOperations_i(_poa, engine, _impl->GetI3DPrimOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_I3DPrimOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIShapesOperations +// purpose : +//============================================================================ +GEOM::GEOM_IShapesOperations_ptr GEOM_Gen_i::GetIShapesOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIShapesOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IShapesOperations_i* aServant = + new GEOM_IShapesOperations_i(_poa, engine, _impl->GetIShapesOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IShapesOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIBlocksOperations +// purpose : +//============================================================================ +GEOM::GEOM_IBlocksOperations_ptr GEOM_Gen_i::GetIBlocksOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIBlocksOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IBlocksOperations_i* aServant = + new GEOM_IBlocksOperations_i(_poa, engine, _impl->GetIBlocksOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IBlocksOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIBooleanOperations +// purpose : +//============================================================================ +GEOM::GEOM_IBooleanOperations_ptr GEOM_Gen_i::GetIBooleanOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIBooleanOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IBooleanOperations_i* aServant = + new GEOM_IBooleanOperations_i(_poa, engine, _impl->GetIBooleanOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IBooleanOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetICurvesOperations +// purpose : +//============================================================================ +GEOM::GEOM_ICurvesOperations_ptr GEOM_Gen_i::GetICurvesOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetICurvesOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_ICurvesOperations_i* aServant = + new GEOM_ICurvesOperations_i(_poa, engine, _impl->GetICurvesOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_ICurvesOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetILocalOperations +// purpose : +//============================================================================ +GEOM::GEOM_ILocalOperations_ptr GEOM_Gen_i::GetILocalOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetILocalOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_ILocalOperations_i* aServant = + new GEOM_ILocalOperations_i(_poa, engine, _impl->GetILocalOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_ILocalOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIHealingOperations +// purpose : +//============================================================================ +GEOM::GEOM_IHealingOperations_ptr GEOM_Gen_i::GetIHealingOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::IHealingOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IHealingOperations_i* aServant = + new GEOM_IHealingOperations_i(_poa, engine, _impl->GetIHealingOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IHealingOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIInsertOperations +// purpose : +//============================================================================ +GEOM::GEOM_IInsertOperations_ptr GEOM_Gen_i::GetIInsertOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIInsertOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IInsertOperations_i* aServant = + new GEOM_IInsertOperations_i(_poa, engine, _impl->GetIInsertOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IInsertOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIMeasureOperations +// purpose : +//============================================================================ +GEOM::GEOM_IMeasureOperations_ptr GEOM_Gen_i::GetIMeasureOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIMeasureOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IMeasureOperations_i* aServant = + new GEOM_IMeasureOperations_i(_poa, engine, _impl->GetIMeasureOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IMeasureOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================ +// function : GetIGroupOperations +// purpose : +//============================================================================ +GEOM::GEOM_IGroupOperations_ptr GEOM_Gen_i::GetIGroupOperations(CORBA::Long theStudyID) + throw ( SALOME::SALOME_Exception ) +{ + Unexpect aCatch(SALOME_SalomeException); + MESSAGE( "GEOM_Gen_i::GetIGroupOperations" ); + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + + GEOM_IGroupOperations_i* aServant = + new GEOM_IGroupOperations_i(_poa, engine, _impl->GetIGroupOperations(theStudyID)); + + // activate the CORBA servant + GEOM::GEOM_IGroupOperations_var operations = aServant->_this(); + return operations._retn(); +} + +//============================================================================= +/*! + * AddSubShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape(GEOM::GEOM_Object_ptr theMainShape, const GEOM::ListOfLong& theIndices) +{ + if(theMainShape == NULL || theIndices.length() < 1) return GEOM::GEOM_Object::_nil(); + Handle(GEOM_Object) aMainsShape = _impl->GetObject(theMainShape->GetStudyID(), theMainShape->GetEntry()); + if (aMainsShape.IsNull()) return GEOM::GEOM_Object::_nil(); + + Handle(TColStd_HArray1OfInteger) anArray = new TColStd_HArray1OfInteger(1, theIndices.length()); + for(Standard_Integer i = 0; iSetValue(i+1, theIndices[i]); + + Handle(GEOM_Object) anObject = _impl->AddSubShape(aMainsShape, anArray); + if(anObject.IsNull()) return GEOM::GEOM_Object::_nil(); + + TCollection_AsciiString anEntry; + TDF_Tool::Entry(anObject->GetEntry(), anEntry); + return GetObject(anObject->GetDocID(), anEntry.ToCString()); +} + +//============================================================================= +/*! + * RemoveObject + */ +//============================================================================= +void GEOM_Gen_i::RemoveObject(GEOM::GEOM_Object_ptr theObject) +{ + Handle(GEOM_Object) anObject = _impl->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return; + _impl->RemoveObject(anObject); + return; +} + + +//================================================================================= +// function : GetStringFromIOR() +// purpose : returns a string that represents a 'GEOM::GEOM_Object_var' +//================================================================================= +char* GEOM_Gen_i::GetStringFromIOR(GEOM::GEOM_Object_ptr theObject) { + return _orb->object_to_string(theObject); +} + + +//================================================================================= +// function : GetIORFromString() +// purpose : returns a 'GEOM::GEOM_Object_var' from a string representing it +//================================================================================= +GEOM::GEOM_Object_ptr GEOM_Gen_i::GetIORFromString(const char* stringIOR) { + GEOM::GEOM_Object_var aGeomObject; + if(strcmp(stringIOR,"") != 0){ + CORBA::Object_var anObject = _orb->string_to_object(stringIOR); + if(!CORBA::is_nil(anObject)) + aGeomObject = GEOM::GEOM_Object::_narrow(anObject.in()) ; + } + return aGeomObject._retn() ; +} + +//================================================================================= +// function : GetObject() +// purpose : +//================================================================================= +GEOM::GEOM_Object_ptr GEOM_Gen_i::GetObject(CORBA::Long theStudyID, const char* theEntry) +{ + GEOM::GEOM_Object_var obj; + Handle(GEOM_Object) handle_object = _impl->GetObject(theStudyID, (char*)theEntry); + if(handle_object.IsNull()) return NULL; + TCollection_AsciiString stringIOR = handle_object->GetIOR(); + if(stringIOR.Length() > 1) { + CORBA::Object_var corba_object = _orb->string_to_object(stringIOR.ToCString()); + if(!CORBA::is_nil(corba_object)) obj = GEOM::GEOM_Object::_narrow(corba_object); + return obj._retn(); + } + + GEOM::GEOM_Gen_ptr engine = POA_GEOM::GEOM_Gen::_this(); + GEOM_Object_i* servant = new GEOM_Object_i(_poa, engine, handle_object); + + obj = servant->_this(); + stringIOR = _orb->object_to_string(obj); + handle_object->SetIOR(stringIOR); + return obj._retn(); +} + + +//===================================================================================== +// EXPORTED METHODS +//===================================================================================== +extern "C" +{ + PortableServer::ObjectId * GEOMEngine_factory(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char * interfaceName) + { + GEOM_Gen_i * myGEOM_Gen_i = new GEOM_Gen_i(orb, poa, contId, instanceName, interfaceName); + myGEOM_Gen_i->register_name("/myGEOM_Gen"); // NRI : 11/07/2002 : Add for Supervision example + return myGEOM_Gen_i->getId() ; + } +} + diff --git a/src/GEOM_I/GEOM_Gen_i.hh b/src/GEOM_I/GEOM_Gen_i.hh new file mode 100644 index 000000000..f8537d7d3 --- /dev/null +++ b/src/GEOM_I/GEOM_Gen_i.hh @@ -0,0 +1,191 @@ +#ifndef __GEOM_GEN_I_H__ +#define __GEOM_GEN_I_H__ + +#include "GEOMImpl_Gen.hxx" + +// IDL headers +#include +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include CORBA_SERVER_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) + +#include "SALOME_Component_i.hxx" + +#include "SALOME_NamingService.hxx" + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +#include "GEOM_IBasicOperations_i.hh" +#include "GEOM_ITransformOperations_i.hh" +#include "GEOM_I3DPrimOperations_i.hh" +#include "GEOM_IShapesOperations_i.hh" +#include "GEOM_IBlocksOperations_i.hh" +#include "GEOM_IBooleanOperations_i.hh" +#include "GEOM_ICurvesOperations_i.hh" +#include "GEOM_ILocalOperations_i.hh" +#include "GEOM_IHealingOperations_i.hh" +#include "GEOM_IInsertOperations_i.hh" +#include "GEOM_IMeasureOperations_i.hh" +#include "GEOM_IGroupOperations_i.hh" + +//===================================================================== +// GEOM_Gen_i : class definition +//===================================================================== +class GEOM_Gen_i: public POA_GEOM::GEOM_Gen, public Engines_Component_i +{ + public: + + //-----------------------------------------------------------------------// + // Constructor / Destructor // + //-----------------------------------------------------------------------// + // constructor to be called for servant creation. + GEOM_Gen_i(); + GEOM_Gen_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName); + + // destructor, doing nothing (for now) + virtual ~GEOM_Gen_i(); + + // generic method to be put in a super class + void register_name(char * name); + + + //-----------------------------------------------------------------------// + // Inherited methods from SALOMEDS::Driver // + //-----------------------------------------------------------------------// + + SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); + + SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); + + CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile); + + CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile); + + void Close(SALOMEDS::SComponent_ptr theComponent); + char* ComponentDataType(); + + + char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); + char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); + + bool CanPublishInStudy(CORBA::Object_ptr theIOR); + SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName) throw (SALOME::SALOME_Exception) ; + + CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject); + SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID); + CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID); + SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream, + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theObject); + + //Adds theObject in the study with a name = theName, if theFather is not null the object is placed under theFather + SALOMEDS::SObject_ptr AddInStudy(SALOMEDS::Study_ptr theStudy, GEOM::GEOM_Object_ptr theObject, const char* theName, GEOM::GEOM_Object_ptr theFather); + + //-----------------------------------------------------------------------// + // Transaction methods // + //-----------------------------------------------------------------------// + + //Undos one transaction in the document associated with theStudyID + virtual void Undo(CORBA::Long theStudyID); + + //Redos one transaction in the document associated with theStudyID + virtual void Redo(CORBA::Long theStudyID); + + //-----------------------------------------------------------------------// + // Operations methods // + //-----------------------------------------------------------------------// + + //Returns a pointer to BasicOperations interface + virtual GEOM::GEOM_IBasicOperations_ptr GetIBasicOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to TransformOperations interface + virtual GEOM::GEOM_ITransformOperations_ptr GetITransformOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to 3DPrimOperations interface + virtual GEOM::GEOM_I3DPrimOperations_ptr GetI3DPrimOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to ShapesOperations interface + virtual GEOM::GEOM_IShapesOperations_ptr GetIShapesOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to BlocksOperations interface + virtual GEOM::GEOM_IBlocksOperations_ptr GetIBlocksOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to BooleanOperations interface + virtual GEOM::GEOM_IBooleanOperations_ptr GetIBooleanOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to CurvesOperations interface + virtual GEOM::GEOM_ICurvesOperations_ptr GetICurvesOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to LocalOperations interface + virtual GEOM::GEOM_ILocalOperations_ptr GetILocalOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to HealingOperations interface + virtual GEOM::GEOM_IHealingOperations_ptr GetIHealingOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to InsertOperations interface + virtual GEOM::GEOM_IInsertOperations_ptr GetIInsertOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to MeasureOperations interface + virtual GEOM::GEOM_IMeasureOperations_ptr GetIMeasureOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Returns a pointer to GroupOperations interface + virtual GEOM::GEOM_IGroupOperations_ptr GetIGroupOperations (CORBA::Long theStudyID) + throw (SALOME::SALOME_Exception); + + //Adds a new sub shape + virtual GEOM::GEOM_Object_ptr AddSubShape(GEOM::GEOM_Object_ptr theMainShape, const GEOM::ListOfLong& theIndices); + + virtual void RemoveObject(GEOM::GEOM_Object_ptr theObject); + + virtual char* GetStringFromIOR(GEOM::GEOM_Object_ptr theObject); + + virtual GEOM::GEOM_Object_ptr GetIORFromString(const char* stringIOR); + + //********************************************************************************************************// + // Internal methods + //********************************************************************************************************// + virtual GEOM::GEOM_Object_ptr GetObject(CORBA::Long theStudyID, const char* theEntry); + + private: + + ::GEOMImpl_Gen* _impl; + SALOME_NamingService * name_service; + char * _name; + +}; + +#endif diff --git a/src/GEOM_I/GEOM_I3DPrimOperations_i.cc b/src/GEOM_I/GEOM_I3DPrimOperations_i.cc new file mode 100644 index 000000000..e6f153bce --- /dev/null +++ b/src/GEOM_I/GEOM_I3DPrimOperations_i.cc @@ -0,0 +1,467 @@ +using namespace std; + +#include "GEOM_I3DPrimOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_I3DPrimOperations_i::GEOM_I3DPrimOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_I3DPrimOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_I3DPrimOperations_i::GEOM_I3DPrimOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_I3DPrimOperations_i::~GEOM_I3DPrimOperations_i() +{ + MESSAGE("GEOM_I3DPrimOperations_i::~GEOM_I3DPrimOperations_i"); +} + + +//============================================================================= +/*! + * MakeBoxDXDYDZ + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeBoxDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the Box + Handle(GEOM_Object) anObject = GetOperations()->MakeBoxDXDYDZ(theDX, theDY, theDZ); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeBoxTwoPnt + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeBoxTwoPnt + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + + if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn(); + + //Create the Box + Handle(GEOM_Object) anObject = GetOperations()->MakeBoxTwoPnt(aPnt1, aPnt2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeCylinderRH + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderRH (CORBA::Double theR, + CORBA::Double theH) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the Cylinder + Handle(GEOM_Object) anObject = GetOperations()->MakeCylinderRH(theR, theH); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeCylinderPntVecRH + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeCylinderPntVecRH + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theR, CORBA::Double theH) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + + if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn(); + + //Create the Cylinder + Handle(GEOM_Object) anObject = GetOperations()->MakeCylinderPntVecRH(aPnt, aVec, theR, theH); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeConeR1R2H + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeConeR1R2H (CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theH) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the Cone + Handle(GEOM_Object) anObject = GetOperations()->MakeConeR1R2H(theR1, theR2, theH); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeConePntVecR1R2H + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeConePntVecR1R2H + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theR1, CORBA::Double theR2, CORBA::Double theH) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + + if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn(); + + //Create the Cone + Handle(GEOM_Object) anObject = + GetOperations()->MakeConePntVecR1R2H(aPnt, aVec, theR1, theR2, theH); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSphereR + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeSphereR (CORBA::Double theR) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the Cone + Handle(GEOM_Object) anObject = GetOperations()->MakeSphereR(theR); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSpherePntR + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeSpherePntR + (GEOM::GEOM_Object_ptr thePnt, CORBA::Double theR) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL) return aGEOMObject._retn(); + + //Get the reference point + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + + if (aPnt.IsNull()) return aGEOMObject._retn(); + + //Create the Sphere + Handle(GEOM_Object) anObject = + GetOperations()->MakeSpherePntR(aPnt, theR); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeTorusRR + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeTorusRR + (CORBA::Double theRMajor, CORBA::Double theRMinor) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + // Make Torus + Handle(GEOM_Object) anObject = + GetOperations()->MakeTorusRR(theRMajor, theRMinor); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeTorusPntVecRR + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeTorusPntVecRR + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theRMajor, CORBA::Double theRMinor) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + + if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn(); + + // Make Torus + Handle(GEOM_Object) anObject = + GetOperations()->MakeTorusPntVecRR(aPnt, aVec, theRMajor, theRMinor); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePrismVecH + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePrismVecH + (GEOM::GEOM_Object_ptr theBase, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theH) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theBase == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject + (theBase->GetStudyID(), theBase->GetEntry()); + Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + + if (aBase.IsNull() || aVec.IsNull()) return aGEOMObject._retn(); + + //Create the Prism + Handle(GEOM_Object) anObject = + GetOperations()->MakePrismVecH(aBase, aVec, theH); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePrismTwoPnt + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePrismTwoPnt + (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theBase == NULL || thePoint1 == NULL || thePoint2 == NULL) + return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject + (theBase->GetStudyID(), theBase->GetEntry()); + Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject + (thePoint1->GetStudyID(), thePoint1->GetEntry()); + Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject + (thePoint2->GetStudyID(), thePoint2->GetEntry()); + + if (aBase.IsNull() || aPoint1.IsNull() || aPoint2.IsNull()) + return aGEOMObject._retn(); + + //Create the Prism + Handle(GEOM_Object) anObject = + GetOperations()->MakePrismTwoPnt(aBase, aPoint1, aPoint2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePipe + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakePipe + (GEOM::GEOM_Object_ptr theBase, GEOM::GEOM_Object_ptr thePath) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theBase == NULL || thePath == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject + (theBase->GetStudyID(), theBase->GetEntry()); + Handle(GEOM_Object) aPath = GetOperations()->GetEngine()->GetObject + (thePath->GetStudyID(), thePath->GetEntry()); + + if (aBase.IsNull() || aPath.IsNull()) return aGEOMObject._retn(); + + //Create the Pipe + Handle(GEOM_Object) anObject = + GetOperations()->MakePipe(aBase, aPath); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeRevolutionAxisAngle + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeRevolutionAxisAngle + (GEOM::GEOM_Object_ptr theBase, GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theBase == NULL || theAxis == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aBase = GetOperations()->GetEngine()->GetObject + (theBase->GetStudyID(), theBase->GetEntry()); + Handle(GEOM_Object) anAxis = GetOperations()->GetEngine()->GetObject + (theAxis->GetStudyID(), theAxis->GetEntry()); + + if (aBase.IsNull() || anAxis.IsNull()) return aGEOMObject._retn(); + + //Create the Revolution + Handle(GEOM_Object) anObject = + GetOperations()->MakeRevolutionAxisAngle(aBase, anAxis, theAngle); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeFilling + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_I3DPrimOperations_i::MakeFilling(GEOM::GEOM_Object_ptr theShape, + CORBA::Long theMinDeg, + CORBA::Long theMaxDeg, + CORBA::Double theTol2D, + CORBA::Double theTol3D, + CORBA::Long theNbIter) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return aGEOMObject._retn(); + + //Create the Solid + Handle(GEOM_Object) anObject = GetOperations()->MakeFilling(aShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} diff --git a/src/GEOM_I/GEOM_I3DPrimOperations_i.hh b/src/GEOM_I/GEOM_I3DPrimOperations_i.hh new file mode 100644 index 000000000..bcd42446a --- /dev/null +++ b/src/GEOM_I/GEOM_I3DPrimOperations_i.hh @@ -0,0 +1,82 @@ + +#ifndef _GEOM_I3DPrimOperations_i_HeaderFile +#define _GEOM_I3DPrimOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_I3DPrimOperations.hxx" + +class GEOM_I3DPrimOperations_i : + public virtual POA_GEOM::GEOM_I3DPrimOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_I3DPrimOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_I3DPrimOperations* theImpl); + ~GEOM_I3DPrimOperations_i(); + + GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ); + + GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + + GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR, + CORBA::Double theH); + + GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theR, + CORBA::Double theH); + + GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theH); + + GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theH); + + GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR); + + GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, + CORBA::Double theR); + + GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor, + CORBA::Double theRMinor); + + GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theRMajor, + CORBA::Double theRMinor); + + GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theH); + + GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePath); + + GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle); + + GEOM::GEOM_Object_ptr MakeFilling(GEOM::GEOM_Object_ptr theShape, CORBA::Long theMinDeg, CORBA::Long theMaxDeg, CORBA::Double theTol2D, CORBA::Double theTol3D, CORBA::Long theNbIter); + + ::GEOMImpl_I3DPrimOperations* GetOperations() + { return (::GEOMImpl_I3DPrimOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IBasicOperations_i.cc b/src/GEOM_I/GEOM_IBasicOperations_i.cc new file mode 100644 index 000000000..0cf0e8366 --- /dev/null +++ b/src/GEOM_I/GEOM_IBasicOperations_i.cc @@ -0,0 +1,371 @@ +using namespace std; + +#include "GEOM_IBasicOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IBasicOperations_i::GEOM_IBasicOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IBasicOperations* theImpl) + :GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IBasicOperations_i::GEOM_IBasicOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IBasicOperations_i::~GEOM_IBasicOperations_i() +{ + MESSAGE("GEOM_IBasicOperations_i::~GEOM_IBasicOperations_i"); +} + + +//============================================================================= +/*! + * MakePointXYZ + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointXYZ + (CORBA::Double theX, CORBA::Double theY, CORBA::Double theZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the point + + Handle(GEOM_Object) anObject = GetOperations()->MakePointXYZ(theX, theY, theZ); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePointWithReference + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointWithReference + (GEOM::GEOM_Object_ptr theReference, CORBA::Double theX, CORBA::Double theY, CORBA::Double theZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if(theReference == NULL) return aGEOMObject._retn(); + + //Get the reference point + + Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject + (theReference->GetStudyID(), theReference->GetEntry()); + if (aRefernce.IsNull()) return aGEOMObject._retn(); + + //Create the point + + Handle(GEOM_Object) anObject = + GetOperations()->MakePointWithReference(aRefernce, theX, theY, theZ); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePointOnCurve + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePointOnCurve + (GEOM::GEOM_Object_ptr theCurve, CORBA::Double theParameter) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCurve == NULL) return aGEOMObject._retn(); + + //Get the reference curve + + Handle(GEOM_Object) aRefernce = GetOperations()->GetEngine()->GetObject + (theCurve->GetStudyID(), theCurve->GetEntry()); + if (aRefernce.IsNull()) return aGEOMObject._retn(); + + //Create the point + + Handle(GEOM_Object) anObject = + GetOperations()->MakePointOnCurve(aRefernce, theParameter); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * MakeVectorDXDYDZ + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorDXDYDZ + (CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the Vector + + Handle(GEOM_Object) anObject = GetOperations()->MakeVectorDXDYDZ(theDX, theDY, theDZ); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeVectorTwoPnt + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeVectorTwoPnt + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn(); + + //Get the reference points + + Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn(); + + //Create the vector + + Handle(GEOM_Object) anObject = + GetOperations()->MakeVectorTwoPnt(aRef1, aRef2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * MakeLine + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLine + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theDir) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theDir == NULL) return aGEOMObject._retn(); + + //Get the reference objects + + Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject + (theDir->GetStudyID(), theDir->GetEntry()); + if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn(); + + //Create the Line + + Handle(GEOM_Object) anObject = + GetOperations()->MakeLine(aRef1, aRef2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeLineTwoPnt + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeLineTwoPnt + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn(); + + //Get the reference points + + Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn(); + + //Create the Line + + Handle(GEOM_Object) anObject = + GetOperations()->MakeLineTwoPnt(aRef1, aRef2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * MakePlanePntVec + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlanePntVec + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theTrimSize) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the references + + Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + if (aRef1.IsNull() || aRef2.IsNull()) return aGEOMObject._retn(); + + //Create the plane + + Handle(GEOM_Object) anObject = + GetOperations()->MakePlanePntVec(aRef1, aRef2, theTrimSize); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePlaneThreePnt + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneThreePnt + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, CORBA::Double theTrimSize) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) + return aGEOMObject._retn(); + + //Get the reference points + + Handle(GEOM_Object) aRef1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aRef2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + Handle(GEOM_Object) aRef3 = GetOperations()->GetEngine()->GetObject + (thePnt3->GetStudyID(), thePnt3->GetEntry()); + if (aRef1.IsNull() || aRef2.IsNull() || aRef3.IsNull()) + return aGEOMObject._retn(); + + //Create the plane + + Handle(GEOM_Object) anObject = + GetOperations()->MakePlaneThreePnt(aRef1, aRef2, aRef3, theTrimSize); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePlaneFace + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakePlaneFace + (GEOM::GEOM_Object_ptr theFace, CORBA::Double theTrimSize) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theFace == NULL) return aGEOMObject._retn(); + + //Get the reference face + + Handle(GEOM_Object) aRef = GetOperations()->GetEngine()->GetObject + (theFace->GetStudyID(), theFace->GetEntry()); + if (aRef.IsNull()) return aGEOMObject._retn(); + + //Create the plane + + Handle(GEOM_Object) anObject = + GetOperations()->MakePlaneFace(aRef, theTrimSize); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * MakeMarker + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBasicOperations_i::MakeMarker + (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ, + CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ, + CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Create the point + Handle(GEOM_Object) anObject = GetOperations()->MakeMarker(theOX , theOY , theOZ, + theXDX, theXDY, theXDZ, + theYDX, theYDY, theYDZ); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} diff --git a/src/GEOM_I/GEOM_IBasicOperations_i.hh b/src/GEOM_I/GEOM_IBasicOperations_i.hh new file mode 100644 index 000000000..5bedb15a9 --- /dev/null +++ b/src/GEOM_I/GEOM_IBasicOperations_i.hh @@ -0,0 +1,68 @@ + +#ifndef _GEOM_IBasicOperations_i_HeaderFile +#define _GEOM_IBasicOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IBasicOperations.hxx" + +class GEOM_IBasicOperations_i : + public virtual POA_GEOM::GEOM_IBasicOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IBasicOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IBasicOperations* theImpl); + ~GEOM_IBasicOperations_i(); + + GEOM::GEOM_Object_ptr MakePointXYZ (CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ); + + GEOM::GEOM_Object_ptr MakePointWithReference (GEOM::GEOM_Object_ptr theReference, + CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ); + + GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theCurve, + CORBA::Double theParameter); + + GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ); + + GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + + GEOM::GEOM_Object_ptr MakeLine (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theDir); + + GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + + GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, + CORBA::Double theTrimSize); + + GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theTrimSize); + + GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace, + CORBA::Double theTrimSize); + + GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ, + CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ, + CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ); + + ::GEOMImpl_IBasicOperations* GetOperations() { return (::GEOMImpl_IBasicOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IBlocksOperations_i.cc b/src/GEOM_I/GEOM_IBlocksOperations_i.cc new file mode 100644 index 000000000..a5aeb7ee8 --- /dev/null +++ b/src/GEOM_I/GEOM_IBlocksOperations_i.cc @@ -0,0 +1,939 @@ +using namespace std; + +#include "GEOM_IBlocksOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IBlocksOperations_i::GEOM_IBlocksOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IBlocksOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IBlocksOperations_i::GEOM_IBlocksOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IBlocksOperations_i::~GEOM_IBlocksOperations_i() +{ + MESSAGE("GEOM_IBlocksOperations_i::~GEOM_IBlocksOperations_i"); +} + + +//============================================================================= +/*! + * MakeQuad + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad + (GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2, + GEOM::GEOM_Object_ptr theEdge3, GEOM::GEOM_Object_ptr theEdge4) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theEdge1 == NULL || theEdge2 == NULL || + theEdge3 == NULL || theEdge4 == NULL) return aGEOMObject._retn(); + + //Get the reference edges + Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject + (theEdge1->GetStudyID(), theEdge1->GetEntry()); + Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject + (theEdge2->GetStudyID(), theEdge2->GetEntry()); + Handle(GEOM_Object) anEdge3 = GetOperations()->GetEngine()->GetObject + (theEdge3->GetStudyID(), theEdge3->GetEntry()); + Handle(GEOM_Object) anEdge4 = GetOperations()->GetEngine()->GetObject + (theEdge4->GetStudyID(), theEdge4->GetEntry()); + + if (anEdge1.IsNull() || anEdge2.IsNull() || + anEdge3.IsNull() || anEdge4.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->MakeQuad(anEdge1, anEdge2, anEdge3, anEdge4); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeQuad2Edges + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad2Edges + (GEOM::GEOM_Object_ptr theEdge1, GEOM::GEOM_Object_ptr theEdge2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theEdge1 == NULL || theEdge2 == NULL) return aGEOMObject._retn(); + + //Get the reference edges + Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject + (theEdge1->GetStudyID(), theEdge1->GetEntry()); + Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject + (theEdge2->GetStudyID(), theEdge2->GetEntry()); + + if (anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->MakeQuad2Edges(anEdge1, anEdge2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeQuad4Vertices + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeQuad4Vertices + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, GEOM::GEOM_Object_ptr thePnt4) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL || + thePnt3 == NULL || thePnt4 == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject + (thePnt3->GetStudyID(), thePnt3->GetEntry()); + Handle(GEOM_Object) aPnt4 = GetOperations()->GetEngine()->GetObject + (thePnt4->GetStudyID(), thePnt4->GetEntry()); + + if (aPnt1.IsNull() || aPnt2.IsNull() || + aPnt3.IsNull() || aPnt4.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->MakeQuad4Vertices(aPnt1, aPnt2, aPnt3, aPnt4); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeHexa + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeHexa + (GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2, + GEOM::GEOM_Object_ptr theFace3, GEOM::GEOM_Object_ptr theFace4, + GEOM::GEOM_Object_ptr theFace5, GEOM::GEOM_Object_ptr theFace6) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theFace1 == NULL || theFace2 == NULL || + theFace3 == NULL || theFace4 == NULL || + theFace5 == NULL || theFace6 == NULL) return aGEOMObject._retn(); + + //Get the reference Faces + Handle(GEOM_Object) anFace1 = GetOperations()->GetEngine()->GetObject + (theFace1->GetStudyID(), theFace1->GetEntry()); + Handle(GEOM_Object) anFace2 = GetOperations()->GetEngine()->GetObject + (theFace2->GetStudyID(), theFace2->GetEntry()); + Handle(GEOM_Object) anFace3 = GetOperations()->GetEngine()->GetObject + (theFace3->GetStudyID(), theFace3->GetEntry()); + Handle(GEOM_Object) anFace4 = GetOperations()->GetEngine()->GetObject + (theFace4->GetStudyID(), theFace4->GetEntry()); + Handle(GEOM_Object) anFace5 = GetOperations()->GetEngine()->GetObject + (theFace5->GetStudyID(), theFace5->GetEntry()); + Handle(GEOM_Object) anFace6 = GetOperations()->GetEngine()->GetObject + (theFace6->GetStudyID(), theFace6->GetEntry()); + + if (anFace1.IsNull() || anFace2.IsNull() || + anFace3.IsNull() || anFace4.IsNull() || + anFace5.IsNull() || anFace6.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = GetOperations()->MakeHexa + (anFace1, anFace2, anFace3, anFace4, anFace5, anFace6); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeHexa2Faces + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeHexa2Faces + (GEOM::GEOM_Object_ptr theFace1, GEOM::GEOM_Object_ptr theFace2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theFace1 == NULL || theFace2 == NULL) return aGEOMObject._retn(); + + //Get the reference Faces + Handle(GEOM_Object) anFace1 = GetOperations()->GetEngine()->GetObject + (theFace1->GetStudyID(), theFace1->GetEntry()); + Handle(GEOM_Object) anFace2 = GetOperations()->GetEngine()->GetObject + (theFace2->GetStudyID(), theFace2->GetEntry()); + + if (anFace1.IsNull() || anFace2.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->MakeHexa2Faces(anFace1, anFace2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeBlockCompound + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeBlockCompound + (GEOM::GEOM_Object_ptr theCompound) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL) return aGEOMObject._retn(); + + //Get the reference Compound + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + + if (aCompound.IsNull()) return aGEOMObject._retn(); + + //Create the Blocks Compound + Handle(GEOM_Object) anObject = + GetOperations()->MakeBlockCompound(aCompound); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetPoint + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetPoint (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theX, + const CORBA::Double theY, + const CORBA::Double theZ, + const CORBA::Double theEpsilon) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return aGEOMObject._retn(); + + //Create the Point + Handle(GEOM_Object) anObject = + GetOperations()->GetPoint(aShape, theX, theY, theZ, theEpsilon); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetEdge + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetEdge (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || + thePoint1 == NULL || thePoint2 == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject + (thePoint1->GetStudyID(), thePoint1->GetEntry()); + Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject + (thePoint2->GetStudyID(), thePoint2->GetEntry()); + + if (aShape.IsNull() || + aPoint1.IsNull() || aPoint2.IsNull()) return aGEOMObject._retn(); + + //Create the Point + Handle(GEOM_Object) anObject = + GetOperations()->GetEdge(aShape, aPoint1, aPoint2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetEdgeNearPoint + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || thePoint == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject + (thePoint->GetStudyID(), thePoint->GetEntry()); + + if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn(); + + //Create the Edge + Handle(GEOM_Object) anObject = + GetOperations()->GetEdgeNearPoint(aShape, aPoint); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetFaceByPoints + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByPoints + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2, + GEOM::GEOM_Object_ptr thePoint3, + GEOM::GEOM_Object_ptr thePoint4) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || + thePoint1 == NULL || thePoint2 == NULL || + thePoint3 == NULL || thePoint4 == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aPoint1 = GetOperations()->GetEngine()->GetObject + (thePoint1->GetStudyID(), thePoint1->GetEntry()); + Handle(GEOM_Object) aPoint2 = GetOperations()->GetEngine()->GetObject + (thePoint2->GetStudyID(), thePoint2->GetEntry()); + Handle(GEOM_Object) aPoint3 = GetOperations()->GetEngine()->GetObject + (thePoint3->GetStudyID(), thePoint3->GetEntry()); + Handle(GEOM_Object) aPoint4 = GetOperations()->GetEngine()->GetObject + (thePoint4->GetStudyID(), thePoint4->GetEntry()); + + if (aShape.IsNull() || + aPoint1.IsNull() || aPoint2.IsNull() || + aPoint3.IsNull() || aPoint4.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->GetFaceByPoints(aShape, aPoint1, aPoint2, aPoint3, aPoint4); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetFaceByEdges + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByEdges + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || + theEdge1 == NULL || theEdge2 == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) anEdge1 = GetOperations()->GetEngine()->GetObject + (theEdge1->GetStudyID(), theEdge1->GetEntry()); + Handle(GEOM_Object) anEdge2 = GetOperations()->GetEngine()->GetObject + (theEdge2->GetStudyID(), theEdge2->GetEntry()); + + if (aShape.IsNull() || + anEdge1.IsNull() || anEdge2.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->GetFaceByEdges(aShape, anEdge1, anEdge2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetOppositeFace + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetOppositeFace (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theFace) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theFace == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aFace = GetOperations()->GetEngine()->GetObject + (theFace->GetStudyID(), theFace->GetEntry()); + + if (aShape.IsNull() || aFace.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->GetOppositeFace(aShape, aFace); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetFaceNearPoint + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || thePoint == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject + (thePoint->GetStudyID(), thePoint->GetEntry()); + + if (aShape.IsNull() || aPoint.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->GetFaceNearPoint(aShape, aPoint); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetFaceByNormale + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theVector) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || theVector == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject + (theVector->GetStudyID(), theVector->GetEntry()); + + if (aShape.IsNull() || aVector.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = + GetOperations()->GetFaceByNormale(aShape, aVector); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * ExplodeCompoundOfBlocks + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IBlocksOperations_i::ExplodeCompoundOfBlocks + (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL) return aSeq._retn(); + + //Get the reference Compound + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + + if (aCompound.IsNull()) return aSeq._retn(); + + //Explode + Handle(TColStd_HSequenceOfTransient) aHSeq = + GetOperations()->ExplodeCompoundOfBlocks(aCompound, theMinNbFaces, theMaxNbFaces); + 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(); +} + +//============================================================================= +/*! + * IsCompoundOfBlocks + */ +//============================================================================= +CORBA::Boolean GEOM_IBlocksOperations_i::IsCompoundOfBlocks + (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces, + CORBA::Long& theNbBlocks) +{ + theNbBlocks = 0; + CORBA::Boolean isComp = false; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL) return isComp; + + //Get the reference Compound + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + + if (aCompound.IsNull()) return isComp; + + //Check + Standard_Integer nbBlocks = 0; + isComp = GetOperations()->IsCompoundOfBlocks(aCompound, + theMinNbFaces, + theMaxNbFaces, + nbBlocks); + if (!GetOperations()->IsDone()) + return isComp; + + theNbBlocks = nbBlocks; + return isComp; +} + +//============================================================================= +/*! + * CheckCompoundOfBlocks + */ +//============================================================================= +CORBA::Boolean GEOM_IBlocksOperations_i::CheckCompoundOfBlocks + (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors) +{ + CORBA::Boolean isComp = false; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL) return isComp; + + //Get the reference Compound + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + + if (aCompound.IsNull()) return isComp; + + //Check + list errList; + isComp = GetOperations()->CheckCompoundOfBlocks(aCompound, errList); + if (!GetOperations()->IsDone()) + return isComp; + + const int nbErr = errList.size(); + GEOM::GEOM_IBlocksOperations::BCErrors_var anErrArray = + new GEOM::GEOM_IBlocksOperations::BCErrors(); + anErrArray->length(nbErr); + + // fill the local CORBA array with values from lists + list::iterator errIt = errList.begin(); + int i = 0; + for (; errIt != errList.end(); i++, errIt++) { + GEOM::GEOM_IBlocksOperations::BCError_var anError = + new GEOM::GEOM_IBlocksOperations::BCError(); + + GEOMImpl_IBlocksOperations::BCError errStruct = *errIt; + + switch (errStruct.error) { + case GEOMImpl_IBlocksOperations::NOT_BLOCK: + anError->error = GEOM::GEOM_IBlocksOperations::NOT_BLOCK; + break; + case GEOMImpl_IBlocksOperations::INVALID_CONNECTION: + anError->error = GEOM::GEOM_IBlocksOperations::INVALID_CONNECTION; + break; + case GEOMImpl_IBlocksOperations::NOT_CONNECTED: + anError->error = GEOM::GEOM_IBlocksOperations::NOT_CONNECTED; + break; + case GEOMImpl_IBlocksOperations::NOT_GLUED: + anError->error = GEOM::GEOM_IBlocksOperations::NOT_GLUED; + break; + default: + break; + } + + list sshList = errStruct.incriminated; + GEOM::ListOfLong_var anIncrims = new GEOM::ListOfLong(); + anIncrims->length(sshList.size()); + + list::iterator sshIt = sshList.begin(); + int jj = 0; + for (; sshIt != sshList.end(); jj++, sshIt++) { + anIncrims[jj] = *sshIt; + } + + anError->incriminated = anIncrims; + + anErrArray[i] = anError; + } + + // initialize out-parameter with local array + theErrors = anErrArray._retn(); + + return isComp; +} + +//============================================================================= +/*! + * PrintBCErrors + */ +//============================================================================= +char* GEOM_IBlocksOperations_i::PrintBCErrors + (GEOM::GEOM_Object_ptr theCompound, + const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors) +{ + //Get the reference Compound + if (theCompound == NULL) return NULL; + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + if (aCompound.IsNull()) return NULL; + + // Convert the errors sequence + list anErrors; + int nbErr = theErrors.length(); + int ie = 0; + for (; ie < nbErr; ie++) { + const GEOM::GEOM_IBlocksOperations::BCError err = theErrors[ie]; + const GEOM::GEOM_IBlocksOperations::BCErrorType typ = err.error; + const GEOM::ListOfLong incrims = err.incriminated; + + GEOMImpl_IBlocksOperations::BCError errStruct; + switch (typ) { + case GEOM::GEOM_IBlocksOperations::NOT_BLOCK: + errStruct.error = GEOMImpl_IBlocksOperations::NOT_BLOCK; + break; + case GEOM::GEOM_IBlocksOperations::INVALID_CONNECTION: + errStruct.error = GEOMImpl_IBlocksOperations::INVALID_CONNECTION; + break; + case GEOM::GEOM_IBlocksOperations::NOT_CONNECTED: + errStruct.error = GEOMImpl_IBlocksOperations::NOT_CONNECTED; + break; + case GEOM::GEOM_IBlocksOperations::NOT_GLUED: + errStruct.error = GEOMImpl_IBlocksOperations::NOT_GLUED; + break; + default: + break; + } + + int ii = 0; + int aLen = incrims.length(); + for (; ii < aLen; ii++) { + errStruct.incriminated.push_back(incrims[ii]); + } + + anErrors.push_back(errStruct); + } + + TCollection_AsciiString aDescr = GetOperations()->PrintBCErrors(aCompound, anErrors); + return CORBA::string_dup(aDescr.ToCString()); +} + +//============================================================================= +/*! + * GetBlockNearPoint + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_Object_ptr thePoint) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL || thePoint == NULL) return aGEOMObject._retn(); + + //Get the reference Objects + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + Handle(GEOM_Object) aPoint = GetOperations()->GetEngine()->GetObject + (thePoint->GetStudyID(), thePoint->GetEntry()); + + if (aCompound.IsNull() || aPoint.IsNull()) return aGEOMObject._retn(); + + //Get the block + Handle(GEOM_Object) anObject = + GetOperations()->GetBlockNearPoint(aCompound, aPoint); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetBlockByParts + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL) return aGEOMObject._retn(); + + //Get the reference Compound + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + + if (aCompound.IsNull()) return aGEOMObject._retn(); + + //Get the parts + int ind, aLen; + Handle(TColStd_HSequenceOfTransient) aParts = new TColStd_HSequenceOfTransient; + + aLen = theParts.length(); + for (ind = 0; ind < aLen; ind++) { + if (theParts[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theParts[ind]->GetStudyID(), theParts[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aParts->Append(aSh); + } + + //Get the Block + Handle(GEOM_Object) anObject = + GetOperations()->GetBlockByParts(aCompound, aParts); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetBlocksByParts + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IBlocksOperations_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theCompound == NULL) return aSeq._retn(); + + //Get the reference Compound + Handle(GEOM_Object) aCompound = GetOperations()->GetEngine()->GetObject + (theCompound->GetStudyID(), theCompound->GetEntry()); + + if (aCompound.IsNull()) return aSeq._retn(); + + //Get the parts + int ind, aLen; + Handle(TColStd_HSequenceOfTransient) aParts = new TColStd_HSequenceOfTransient; + + aLen = theParts.length(); + for (ind = 0; ind < aLen; ind++) { + if (theParts[ind] == NULL) return aSeq._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theParts[ind]->GetStudyID(), theParts[ind]->GetEntry()); + if (aSh.IsNull()) return aSeq._retn(); + aParts->Append(aSh); + } + + //Get the Block + Handle(TColStd_HSequenceOfTransient) aHSeq = + GetOperations()->GetBlocksByParts(aCompound, aParts); + 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(); +} + +//============================================================================= +/*! + * MakeMultiTransformation1D + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeMultiTransformation1D + (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1, + const CORBA::Long theDirFace2, + const CORBA::Long theNbTimes) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theBlock == NULL) return aGEOMObject._retn(); + + //Get the object itself and the vector of translation + Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject + (theBlock->GetStudyID(), theBlock->GetEntry()); + + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Perform the transformation + Handle(GEOM_Object) anObject = GetOperations()->MakeMultiTransformation1D + (aBasicObject, theDirFace1, theDirFace2, theNbTimes); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeMultiTransformation2D + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBlocksOperations_i::MakeMultiTransformation2D + (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1U, + const CORBA::Long theDirFace2U, + const CORBA::Long theNbTimesU, + const CORBA::Long theDirFace1V, + const CORBA::Long theDirFace2V, + const CORBA::Long theNbTimesV) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theBlock == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject + (theBlock->GetStudyID(), theBlock->GetEntry()); + + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Perform the transformation + Handle(GEOM_Object) anObject = GetOperations()->MakeMultiTransformation2D + (aBasicObject, + theDirFace1U, theDirFace2U, theNbTimesU, + theDirFace1V, theDirFace2V, theNbTimesV); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} diff --git a/src/GEOM_I/GEOM_IBlocksOperations_i.hh b/src/GEOM_I/GEOM_IBlocksOperations_i.hh new file mode 100644 index 000000000..32c5085da --- /dev/null +++ b/src/GEOM_I/GEOM_IBlocksOperations_i.hh @@ -0,0 +1,126 @@ + +#ifndef _GEOM_IBlocksOperations_i_HeaderFile +#define _GEOM_IBlocksOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IBlocksOperations.hxx" + +class GEOM_IBlocksOperations_i : + public virtual POA_GEOM::GEOM_IBlocksOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IBlocksOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IBlocksOperations* theImpl); + ~GEOM_IBlocksOperations_i(); + + // Creation of blocks and block faces + GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2, + GEOM::GEOM_Object_ptr theEdge3, + GEOM::GEOM_Object_ptr theEdge4); + + GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2); + + GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, + GEOM::GEOM_Object_ptr thePnt4); + + GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1, + GEOM::GEOM_Object_ptr theFace2, + GEOM::GEOM_Object_ptr theFace3, + GEOM::GEOM_Object_ptr theFace4, + GEOM::GEOM_Object_ptr theFace5, + GEOM::GEOM_Object_ptr theFace6); + + GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1, + GEOM::GEOM_Object_ptr theFace2); + + GEOM::GEOM_Object_ptr MakeBlockCompound (GEOM::GEOM_Object_ptr theCompound); + + // Extract elements of blocks and blocks compounds + GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theX, + const CORBA::Double theY, + const CORBA::Double theZ, + const CORBA::Double theEpsilon); + + GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint); + + GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2, + GEOM::GEOM_Object_ptr thePoint3, + GEOM::GEOM_Object_ptr thePoint4); + + GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2); + + GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock, + GEOM::GEOM_Object_ptr theFace); + + GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint); + + GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock, + GEOM::GEOM_Object_ptr theVector); + + // Check blocks compound + CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces, + CORBA::Long& theNbBlocks); + + CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors); + + char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound, + const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors); + + // Extract blocks from blocks compounds + GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces); + + GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_Object_ptr thePoint); + + GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts); + + GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts); + + // Operations on blocks with gluing of result + GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1, + const CORBA::Long theDirFace2, + const CORBA::Long theNbTimes); + + GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1U, + const CORBA::Long theDirFace2U, + const CORBA::Long theNbTimesU, + const CORBA::Long theDirFace1V, + const CORBA::Long theDirFace2V, + const CORBA::Long theNbTimesV); + + ::GEOMImpl_IBlocksOperations* GetOperations() + { return (::GEOMImpl_IBlocksOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.cc b/src/GEOM_I/GEOM_IBooleanOperations_i.cc new file mode 100644 index 000000000..4bfaba4af --- /dev/null +++ b/src/GEOM_I/GEOM_IBooleanOperations_i.cc @@ -0,0 +1,183 @@ +using namespace std; + +#include "GEOM_IBooleanOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IBooleanOperations_i::GEOM_IBooleanOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IBooleanOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IBooleanOperations_i::GEOM_IBooleanOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IBooleanOperations_i::~GEOM_IBooleanOperations_i() +{ + MESSAGE("GEOM_IBooleanOperations_i::~GEOM_IBooleanOperations_i"); +} + + +//============================================================================= +/*! + * MakeBoolean + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeBoolean + (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2, + CORBA::Long theOp) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape1 == NULL || theShape2 == NULL) return aGEOMObject._retn(); + + //Get the reference shapes + Handle(GEOM_Object) aSh1 = GetOperations()->GetEngine()->GetObject + (theShape1->GetStudyID(), theShape1->GetEntry()); + Handle(GEOM_Object) aSh2 = GetOperations()->GetEngine()->GetObject + (theShape2->GetStudyID(), theShape2->GetEntry()); + + if (aSh1.IsNull() || aSh2.IsNull()) return aGEOMObject._retn(); + + // Make Boolean + Handle(GEOM_Object) anObject = GetOperations()->MakeBoolean(aSh1, aSh2, theOp); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePartition + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakePartition + (const GEOM::ListOfGO& theShapes, + const GEOM::ListOfGO& theTools, + const GEOM::ListOfGO& theKeepIns, + const GEOM::ListOfGO& theRemoveIns, + const CORBA::Short theLimit, + const CORBA::Boolean theRemoveWebs, + const GEOM::ListOfLong& theMaterials) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + Handle(TColStd_HSequenceOfTransient) aShapes = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aTools = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aKeepIns = new TColStd_HSequenceOfTransient; + Handle(TColStd_HSequenceOfTransient) aRemIns = new TColStd_HSequenceOfTransient; + Handle(TColStd_HArray1OfInteger) aMaterials; + + //Get the shapes + aLen = theShapes.length(); + for (ind = 0; ind < aLen; ind++) { + if (theShapes[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes->Append(aSh); + } + + //Get the tools + aLen = theTools.length(); + for (ind = 0; ind < aLen; ind++) { + if (theTools[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theTools[ind]->GetStudyID(), theTools[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aTools->Append(aSh); + } + + //Get the keep inside shapes + aLen = theKeepIns.length(); + for (ind = 0; ind < aLen; ind++) { + if (theKeepIns[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theKeepIns[ind]->GetStudyID(), theKeepIns[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aKeepIns->Append(aSh); + } + + //Get the remove inside shapes + aLen = theRemoveIns.length(); + for (ind = 0; ind < aLen; ind++) { + if (theRemoveIns[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theRemoveIns[ind]->GetStudyID(), theRemoveIns[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aRemIns->Append(aSh); + } + + //Get the materials + aLen = theMaterials.length(); + aMaterials = new TColStd_HArray1OfInteger (1, aLen); + for (ind = 0; ind < aLen; ind++) { + aMaterials->SetValue(ind+1, theMaterials[ind]); + } + + // Make Partition + Handle(GEOM_Object) anObject = + GetOperations()->MakePartition(aShapes, aTools, aKeepIns, aRemIns, + theLimit, theRemoveWebs, aMaterials); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeHalfPartition + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IBooleanOperations_i::MakeHalfPartition + (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePlane) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL || thePlane == NULL) return aGEOMObject._retn(); + + //Get the reference shapes + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aPl = GetOperations()->GetEngine()->GetObject + (thePlane->GetStudyID(), thePlane->GetEntry()); + + if (aSh.IsNull() || aPl.IsNull()) return aGEOMObject._retn(); + + // Make Half Partition + Handle(GEOM_Object) anObject = GetOperations()->MakeHalfPartition(aSh, aPl); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} diff --git a/src/GEOM_I/GEOM_IBooleanOperations_i.hh b/src/GEOM_I/GEOM_IBooleanOperations_i.hh new file mode 100644 index 000000000..48db54c99 --- /dev/null +++ b/src/GEOM_I/GEOM_IBooleanOperations_i.hh @@ -0,0 +1,43 @@ + +#ifndef _GEOM_IBooleanOperations_i_HeaderFile +#define _GEOM_IBooleanOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IBooleanOperations.hxx" + +class GEOM_IBooleanOperations_i : + public virtual POA_GEOM::GEOM_IBooleanOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IBooleanOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IBooleanOperations* theImpl); + ~GEOM_IBooleanOperations_i(); + + GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2, + CORBA::Long theOp); + + GEOM::GEOM_Object_ptr MakePartition (const GEOM::ListOfGO& theShapes, + const GEOM::ListOfGO& theTools, + const GEOM::ListOfGO& theKeepInside, + const GEOM::ListOfGO& theRemoveInside, + const CORBA::Short theLimit, + const CORBA::Boolean theRemoveWebs, + const GEOM::ListOfLong& theMaterials); + + + GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePlane); + + ::GEOMImpl_IBooleanOperations* GetOperations() + { return (::GEOMImpl_IBooleanOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_ICurvesOperations_i.cc b/src/GEOM_I/GEOM_ICurvesOperations_i.cc new file mode 100644 index 000000000..ba436bb03 --- /dev/null +++ b/src/GEOM_I/GEOM_ICurvesOperations_i.cc @@ -0,0 +1,305 @@ +using namespace std; + +#include "GEOM_ICurvesOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_ICurvesOperations_i::GEOM_ICurvesOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_ICurvesOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_ICurvesOperations_i::GEOM_ICurvesOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_ICurvesOperations_i::~GEOM_ICurvesOperations_i() +{ + MESSAGE("GEOM_ICurvesOperations_i::~GEOM_ICurvesOperations_i"); +} + + +//============================================================================= +/*! + * MakeCirclePntVecR + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCirclePntVecR + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theR) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + + if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn(); + + // Make Circle + Handle(GEOM_Object) anObject = + GetOperations()->MakeCirclePntVecR(aPnt, aVec, theR); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeCircleThreePnt + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeCircleThreePnt + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject + (thePnt3->GetStudyID(), thePnt3->GetEntry()); + + if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn(); + + // Make Circle + Handle(GEOM_Object) anObject = + GetOperations()->MakeCircleThreePnt(aPnt1, aPnt2, aPnt3); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeEllipse + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeEllipse + (GEOM::GEOM_Object_ptr thePnt, GEOM::GEOM_Object_ptr theVec, + CORBA::Double theRMajor, double theRMinor) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt == NULL || theVec == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePnt->GetStudyID(), thePnt->GetEntry()); + Handle(GEOM_Object) aVec = GetOperations()->GetEngine()->GetObject + (theVec->GetStudyID(), theVec->GetEntry()); + + if (aPnt.IsNull() || aVec.IsNull()) return aGEOMObject._retn(); + + // Make Ellipse + Handle(GEOM_Object) anObject = + GetOperations()->MakeEllipse(aPnt, aVec, theRMajor, theRMinor); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeArc + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeArc + (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL || thePnt3 == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + Handle(GEOM_Object) aPnt3 = GetOperations()->GetEngine()->GetObject + (thePnt3->GetStudyID(), thePnt3->GetEntry()); + + if (aPnt1.IsNull() || aPnt2.IsNull() || aPnt3.IsNull()) return aGEOMObject._retn(); + + // Make Arc + Handle(GEOM_Object) anObject = + GetOperations()->MakeArc(aPnt1, aPnt2, aPnt3); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakePolyline + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakePolyline + (const GEOM::ListOfGO& thePoints) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the reference point + int ind = 0; + int aLen = thePoints.length(); + list aPoints; + for (; ind < aLen; ind++) { + if (thePoints[ind] == NULL) return aGEOMObject._retn(); + + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry()); + + if (aPnt.IsNull()) return aGEOMObject._retn(); + aPoints.push_back(aPnt); + } + + // Make Polyline + Handle(GEOM_Object) anObject = + GetOperations()->MakePolyline(aPoints); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSplineBezier + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineBezier + (const GEOM::ListOfGO& thePoints) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the reference point + int ind = 0; + int aLen = thePoints.length(); + list aPoints; + for (; ind < aLen; ind++) { + if (thePoints[ind] == NULL) return aGEOMObject._retn(); + + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry()); + + if (aPnt.IsNull()) return aGEOMObject._retn(); + aPoints.push_back(aPnt); + } + + // Make Bezier curve + Handle(GEOM_Object) anObject = + GetOperations()->MakeSplineBezier(aPoints); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSplineInterpolation + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSplineInterpolation + (const GEOM::ListOfGO& thePoints) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Get the reference point + int ind = 0; + int aLen = thePoints.length(); + list aPoints; + for (; ind < aLen; ind++) { + if (thePoints[ind] == NULL) return aGEOMObject._retn(); + + Handle(GEOM_Object) aPnt = GetOperations()->GetEngine()->GetObject + (thePoints[ind]->GetStudyID(), thePoints[ind]->GetEntry()); + + if (aPnt.IsNull()) return aGEOMObject._retn(); + aPoints.push_back(aPnt); + } + + // Make Polyline + Handle(GEOM_Object) anObject = + GetOperations()->MakeSplineInterpolation(aPoints); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSketcher + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ICurvesOperations_i::MakeSketcher (const char* theCommand, const GEOM::ListOfDouble& theWorkingPlane) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind = 0; + int aLen = theWorkingPlane.length(); + list aWorkingPlane; + for (; ind < aLen; ind++) + aWorkingPlane.push_back(theWorkingPlane[ind]); + + // Make Sketcher + Handle(GEOM_Object) anObject = + GetOperations()->MakeSketcher(theCommand, aWorkingPlane); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} diff --git a/src/GEOM_I/GEOM_ICurvesOperations_i.hh b/src/GEOM_I/GEOM_ICurvesOperations_i.hh new file mode 100644 index 000000000..6308621f8 --- /dev/null +++ b/src/GEOM_I/GEOM_ICurvesOperations_i.hh @@ -0,0 +1,51 @@ + +#ifndef _GEOM_ICurvesOperations_i_HeaderFile +#define _GEOM_ICurvesOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_ICurvesOperations.hxx" + +class GEOM_ICurvesOperations_i : + public virtual POA_GEOM::GEOM_ICurvesOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_ICurvesOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_ICurvesOperations* theImpl); + ~GEOM_ICurvesOperations_i(); + + GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + double theR); + + GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3); + + GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + double theRMajor, double theRMinor); + + GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3); + + GEOM::GEOM_Object_ptr MakePolyline (const GEOM::ListOfGO& thePoints); + + GEOM::GEOM_Object_ptr MakeSplineBezier (const GEOM::ListOfGO& thePoints); + + GEOM::GEOM_Object_ptr MakeSplineInterpolation (const GEOM::ListOfGO& thePoints); + + GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, const GEOM::ListOfDouble& theWorkingPlane); + + ::GEOMImpl_ICurvesOperations* GetOperations() + { return (::GEOMImpl_ICurvesOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IGroupOperations_i.cc b/src/GEOM_I/GEOM_IGroupOperations_i.cc new file mode 100644 index 000000000..3ff5c9bb6 --- /dev/null +++ b/src/GEOM_I/GEOM_IGroupOperations_i.cc @@ -0,0 +1,179 @@ +using namespace std; + +#include "GEOM_IGroupOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IGroupOperations_i::GEOM_IGroupOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IGroupOperations* theImpl) + :GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IGroupOperations_i::GEOM_IGroupOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IGroupOperations_i::~GEOM_IGroupOperations_i() +{ + MESSAGE("GEOM_IGroupOperations_i::~GEOM_IGroupOperations_i"); +} + + +//============================================================================= +/*! + * CreateGroup + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IGroupOperations_i::CreateGroup(GEOM::GEOM_Object_ptr theMainShape, CORBA::Long theShapeType) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theMainShape == NULL || theShapeType < 0) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject(theMainShape->GetStudyID(), theMainShape->GetEntry()); + + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Create the Fillet + Handle(GEOM_Object) anObject = GetOperations()->CreateGroup(aShapeRef, (TopAbs_ShapeEnum)theShapeType); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * AddObject + */ +//============================================================================= +void GEOM_IGroupOperations_i::AddObject(GEOM::GEOM_Object_ptr theGroup, CORBA::Long theSubShapeId) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return; + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry()); + if (aGroupRef.IsNull()) return; + + GetOperations()->AddObject(aGroupRef, theSubShapeId); + return; +} + +//============================================================================= +/*! + * RemoveObject + */ +//============================================================================= +void GEOM_IGroupOperations_i::RemoveObject(GEOM::GEOM_Object_ptr theGroup, CORBA::Long theSubShapeId) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return; + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry()); + if (aGroupRef.IsNull()) return; + + GetOperations()->RemoveObject(aGroupRef, theSubShapeId); + + return; +} + +//============================================================================= +/*! + * GetType + */ +//============================================================================= +CORBA::Long GEOM_IGroupOperations_i::GetType(GEOM::GEOM_Object_ptr theGroup) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return -1; + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry()); + + if (aGroupRef.IsNull()) return -1; + + return GetOperations()->GetType(aGroupRef); +} + +//============================================================================= +/*! + * GetMainShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IGroupOperations_i::GetMainShape(GEOM::GEOM_Object_ptr theGroup) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return aGEOMObject._retn(); + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry()); + if (aGroupRef.IsNull()) return aGEOMObject._retn(); + + Handle(GEOM_Object) anObject = GetOperations()->GetMainShape(aGroupRef); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetObjects + */ +//============================================================================= +GEOM::ListOfLong* GEOM_IGroupOperations_i::GetObjects(GEOM::GEOM_Object_ptr theGroup) +{ + GEOM::ListOfLong_var aList; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theGroup == NULL) return aList._retn(); + + //Get the reference group + Handle(GEOM_Object) aGroupRef = GetOperations()->GetEngine()->GetObject(theGroup->GetStudyID(), theGroup->GetEntry()); + if (aGroupRef.IsNull()) return aList._retn(); + + aList = new GEOM::ListOfLong; + + Handle(TColStd_HArray1OfInteger) aSeq = GetOperations()->GetObjects(aGroupRef); + if (!GetOperations()->IsDone() || aSeq.IsNull()) return aList._retn(); + + aList->length(aSeq->Length()); + for(int i = 1; i<=aSeq->Length(); i++) aList[i-1] = aSeq->Value(i); + + return aList._retn(); +} + diff --git a/src/GEOM_I/GEOM_IGroupOperations_i.hh b/src/GEOM_I/GEOM_IGroupOperations_i.hh new file mode 100644 index 000000000..14ccec8aa --- /dev/null +++ b/src/GEOM_I/GEOM_IGroupOperations_i.hh @@ -0,0 +1,39 @@ + +#ifndef _GEOM_IGroupOperations_i_HeaderFile +#define _GEOM_IGroupOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IGroupOperations.hxx" + +class GEOM_IGroupOperations_i : + public virtual POA_GEOM::GEOM_IGroupOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IGroupOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IGroupOperations* theImpl); + ~GEOM_IGroupOperations_i(); + + GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape, CORBA::Long theShapeType); + + void AddObject (GEOM::GEOM_Object_ptr theGroup, CORBA::Long theSubShapeId); + + void RemoveObject (GEOM::GEOM_Object_ptr theGroup, CORBA::Long theSubShapeId); + + CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup); + + GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup); + + GEOM::ListOfLong* GetObjects (GEOM::GEOM_Object_ptr theGroup); + + ::GEOMImpl_IGroupOperations* GetOperations() + { return (::GEOMImpl_IGroupOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IHealingOperations_i.cc b/src/GEOM_I/GEOM_IHealingOperations_i.cc new file mode 100644 index 000000000..ea8fe487f --- /dev/null +++ b/src/GEOM_I/GEOM_IHealingOperations_i.cc @@ -0,0 +1,401 @@ +#include +using namespace std; + +#include "GEOM_IHealingOperations_i.hh" +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= + +GEOM_IHealingOperations_i::GEOM_IHealingOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IHealingOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IHealingOperations_i::GEOM_IHealingOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOM_IHealingOperations_i::~GEOM_IHealingOperations_i() +{ + MESSAGE("GEOM_IHealingOperations_i::~GEOM_IHealingOperations_i"); +} + +//============================================================================= +/*! + * Convert + */ +//============================================================================= +Handle(TColStd_HArray1OfInteger) GEOM_IHealingOperations_i::Convert + (const GEOM::short_array& theInArray) +{ + Handle(TColStd_HArray1OfInteger) anOutArray; + int n = theInArray.length(); + if ( n <= 0 ) + return anOutArray; + anOutArray = new TColStd_HArray1OfInteger( 1, n ); + for (int i = 0; i < n; i++) + anOutArray->SetValue( i+1, theInArray[i] ); + return anOutArray; +} + +//============================================================================= +/*! + * Convert + */ +//============================================================================= +Handle(TColStd_HArray1OfExtendedString) GEOM_IHealingOperations_i::Convert + (const GEOM::string_array& theInArray) +{ + Handle(TColStd_HArray1OfExtendedString) anOutArray; + int n = theInArray.length(); + if ( n <= 0 ) + return anOutArray; + anOutArray = new TColStd_HArray1OfExtendedString( 1, n ); + char* str; + for ( int i = 0; i < n; i++ ) + { + str = CORBA::string_dup( theInArray[i] ); + anOutArray->SetValue( i+1, TCollection_ExtendedString( str ) ); + } + return anOutArray; +} + +//============================================================================= +/*! + * ProcessShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::ProcessShape (GEOM::GEOM_Object_ptr theObject, + const GEOM::string_array& theOperations, + const GEOM::string_array& theParams, + const GEOM::string_array& theValues) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) + return aGEOMObject._retn(); + + // Check if theOperations has more than 0 elements and theParams and theValues have the same length +// if ( theOperations.length() <= 0 || theParams.length() != theValues.length() ) +// return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if ( anObject.IsNull() ) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = GetOperations()->ShapeProcess( anObject, + Convert( theOperations ), Convert( theParams ), Convert( theValues ) ); + if ( !GetOperations()->IsDone() || aNewObject.IsNull() ) + return aGEOMObject._retn(); + + return GetObject( aNewObject ); +} + +//============================================================================= +/*! + * GetShapeProcessParameters + */ +//============================================================================= +void GEOM_IHealingOperations_i::GetShapeProcessParameters(GEOM::string_array_out theOperations, + GEOM::string_array_out theParams, + GEOM::string_array_out theValues) +{ + // retrieve the values as stl-lists + list operationsList, paramsList, valuesList; + GetOperations()->GetShapeProcessParameters( operationsList, paramsList, valuesList ); + const int opSize = operationsList.size(), + parSize = paramsList.size(), + valSize = valuesList.size(); + + // returns in case of an error + if ( opSize < 0 || parSize < 0 || parSize != valSize ) + return; + + // allocate the CORBA arrays, sizes == returned lists' sizes + GEOM::string_array_var anOpArray = new GEOM::string_array(); + GEOM::string_array_var aParArray = new GEOM::string_array(); + GEOM::string_array_var aValArray = new GEOM::string_array(); + anOpArray->length(opSize); + aParArray->length(parSize); + aValArray->length(valSize); + + // fill the local CORBA arrays with values from lists + list::iterator opIt, parIt, valIt; + int i = 0; + for ( opIt = operationsList.begin(); opIt != operationsList.end(); i++,++opIt ) + anOpArray[i] = CORBA::string_dup( (*opIt).c_str() ); + + for ( i = 0, parIt = paramsList.begin(), valIt = valuesList.begin(); + parIt != paramsList.end(); i++, ++parIt,++valIt ) + { + aParArray[i] = CORBA::string_dup( (*parIt).c_str() ); + aValArray[i] = CORBA::string_dup( (*valIt).c_str() ); + } + + // initialize out-parameters with local arrays + theOperations = anOpArray._retn(); + theParams = aParArray._retn(); + theValues = aValArray._retn(); +} + +//============================================================================= +/*! + * SuppressFaces + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::SuppressFaces (GEOM::GEOM_Object_ptr theObject, + const GEOM::short_array& theFaces) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) // if theFaces is empty - it's OK, it means that ALL faces must be removed + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->SuppressFaces( anObject, Convert( theFaces ) ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject( aNewObject ); +} + +//============================================================================= +/*! + * CloseContour + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::CloseContour (GEOM::GEOM_Object_ptr theObject, + const GEOM::short_array& theWires, + CORBA::Boolean isCommonVertex) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->CloseContour( anObject, Convert( theWires ), isCommonVertex ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aNewObject); +} + +//============================================================================= +/*! + * RemoveIntWires + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::RemoveIntWires (GEOM::GEOM_Object_ptr theObject, + const GEOM::short_array& theWires) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) // if theWires is empty - it's OK, it means that ALL wires should be removed + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->RemoveIntWires( anObject, Convert( theWires ) ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aNewObject); +} + +//============================================================================= +/*! + * FillHoles + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::FillHoles (GEOM::GEOM_Object_ptr theObject, + const GEOM::short_array& theWires) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) ) // if theWires is empty - it's OK, it means that ALL wires should be removed + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->FillHoles( anObject, Convert( theWires ) ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aNewObject); +} + +//============================================================================= +/*! + * Sew + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::Sew (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theTolerance) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) || theTolerance < 0 ) + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->Sew( anObject, theTolerance ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aNewObject); +} + +//============================================================================= +/*! + * DivideEdge + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IHealingOperations_i::DivideEdge (GEOM::GEOM_Object_ptr theObject, + CORBA::Short theIndex, + CORBA::Double theValue, + CORBA::Boolean isByParameter) +{ + GEOM::GEOM_Object_var aGEOMObject; + + // Set a not done flag + GetOperations()->SetNotDone(); + + // Check parameters + if ( CORBA::is_nil(theObject) || theValue < 0 || theValue > 1 ) + return aGEOMObject._retn(); + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return aGEOMObject._retn(); + + // Perform + Handle(GEOM_Object) aNewObject = + GetOperations()->DivideEdge( anObject, theIndex, theValue, isByParameter ); + if (!GetOperations()->IsDone() || aNewObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(aNewObject); +} + +//============================================================================= +/*! + * GetFreeBoundary + */ +//============================================================================= +CORBA::Boolean GEOM_IHealingOperations_i::GetFreeBoundary ( GEOM::GEOM_Object_ptr theObject, + GEOM::ListOfGO_out theClosedWires, + GEOM::ListOfGO_out theOpenWires ) +{ + theClosedWires = new GEOM::ListOfGO; + theOpenWires = new GEOM::ListOfGO; + + // Set a not done flag + GetOperations()->SetNotDone(); + + if ( CORBA::is_nil(theObject) ) + return false; + + // Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) + return false; + + Handle(TColStd_HSequenceOfTransient) aClosed = new TColStd_HSequenceOfTransient(); + Handle(TColStd_HSequenceOfTransient) anOpen = new TColStd_HSequenceOfTransient(); + bool res = GetOperations()->GetFreeBoundary( anObject, aClosed, anOpen ); + + if ( !GetOperations()->IsDone() || !res ) + return false; + + int i, n = aClosed->Length(); + theClosedWires->length( n ); + for ( i = 1; i <= n; i++ ) + (*theClosedWires)[i-1] = GetObject(Handle(GEOM_Object)::DownCast(aClosed->Value(i))); + + n = anOpen->Length(); + theOpenWires->length( n ); + for ( i = 1, n = anOpen->Length(); i <= n; i++ ) + (*theOpenWires)[i-1] = GetObject(Handle(GEOM_Object)::DownCast(anOpen->Value(i))); + + return true; +} diff --git a/src/GEOM_I/GEOM_IHealingOperations_i.hh b/src/GEOM_I/GEOM_IHealingOperations_i.hh new file mode 100644 index 000000000..f26f5dc99 --- /dev/null +++ b/src/GEOM_I/GEOM_IHealingOperations_i.hh @@ -0,0 +1,51 @@ + +#ifndef _GEOM_IHealingOperations_i_HeaderFile +#define _GEOM_IHealingOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IHealingOperations.hxx" + +#include +#include + +class GEOM_IHealingOperations_i : + public virtual POA_GEOM::GEOM_IHealingOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IHealingOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_IHealingOperations* theImpl); + ~GEOM_IHealingOperations_i(); + + GEOM::GEOM_Object_ptr ProcessShape(GEOM::GEOM_Object_ptr theObject, const GEOM::string_array& theOperations, const GEOM::string_array& theParams, const GEOM::string_array& theValues); + + void GetShapeProcessParameters(GEOM::string_array_out theOperations, GEOM::string_array_out theParams, GEOM::string_array_out theValues); + + GEOM::GEOM_Object_ptr SuppressFaces(GEOM::GEOM_Object_ptr theObject, const GEOM::short_array& theFaces); + + GEOM::GEOM_Object_ptr CloseContour (GEOM::GEOM_Object_ptr theObject, const GEOM::short_array& theWires, CORBA::Boolean isCommonVertex); + + GEOM::GEOM_Object_ptr RemoveIntWires (GEOM::GEOM_Object_ptr theObject, const GEOM::short_array& theWires); + + GEOM::GEOM_Object_ptr FillHoles (GEOM::GEOM_Object_ptr theObject, const GEOM::short_array& theWires); + + GEOM::GEOM_Object_ptr Sew (GEOM::GEOM_Object_ptr theObject, CORBA::Double theTolerance); + + GEOM::GEOM_Object_ptr DivideEdge (GEOM::GEOM_Object_ptr theObject, CORBA::Short theIndex, CORBA::Double theValue, CORBA::Boolean isByParameter); + + CORBA::Boolean GetFreeBoundary(GEOM::GEOM_Object_ptr theObject, GEOM::ListOfGO_out theClosedWires, GEOM::ListOfGO_out theOpenWires ); + + ::GEOMImpl_IHealingOperations* GetOperations() { return (::GEOMImpl_IHealingOperations*)GetImpl(); } + +private: + Handle(TColStd_HArray1OfExtendedString) Convert( const GEOM::string_array& ); + Handle(TColStd_HArray1OfInteger) Convert( const GEOM::short_array& ); + +}; + +#endif diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.cc b/src/GEOM_I/GEOM_IInsertOperations_i.cc new file mode 100644 index 000000000..8585c7049 --- /dev/null +++ b/src/GEOM_I/GEOM_IInsertOperations_i.cc @@ -0,0 +1,194 @@ +using namespace std; + +#include "GEOM_IInsertOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IInsertOperations_i::GEOM_IInsertOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IInsertOperations* theImpl) + :GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IInsertOperations_i::GEOM_IInsertOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IInsertOperations_i::~GEOM_IInsertOperations_i() +{ + MESSAGE("GEOM_IInsertOperations_i::~GEOM_IInsertOperations_i"); +} + + +//============================================================================= +/*! + * MakeCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IInsertOperations_i::MakeCopy(GEOM::GEOM_Object_ptr theOriginal) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theOriginal == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) anOriginal = + GetOperations()->GetEngine()->GetObject(theOriginal->GetStudyID(), + theOriginal->GetEntry()); + + if (anOriginal.IsNull()) return aGEOMObject._retn(); + + //Create the copy + Handle(GEOM_Object) anObject = GetOperations()->MakeCopy(anOriginal); + + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * Export + */ +//============================================================================= +void GEOM_IInsertOperations_i::Export + (GEOM::GEOM_Object_ptr theOriginal, + const char* theFileName, + const char* theFormatName) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theOriginal); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theOriginal == NULL) return; + + //Get the reference shape + Handle(GEOM_Object) anOriginal = + GetOperations()->GetEngine()->GetObject(theOriginal->GetStudyID(), + theOriginal->GetEntry()); + + if (anOriginal.IsNull()) return; + + //Export the shape to the file + char* aFileName = strdup(theFileName); + char* aFormatName = strdup(theFormatName); + GetOperations()->Export(anOriginal, aFileName, aFormatName); + free(aFileName); + free(aFormatName); + + return; +} + +//============================================================================= +/*! + * Import + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IInsertOperations_i::Import + (const char* theFileName, + const char* theFormatName) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + //Import the shape from the file + char* aFileName = strdup(theFileName); + char* aFormatName = strdup(theFormatName); + Handle(GEOM_Object) anObject = GetOperations()->Import(aFileName, aFormatName); + free(aFileName); + free(aFormatName); + + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * ImportTranslators + */ +//============================================================================= +void GEOM_IInsertOperations_i::ImportTranslators + (GEOM::string_array_out theFormats, GEOM::string_array_out thePatterns) +{ + // Get sequences of available formats + Handle(TColStd_HSequenceOfAsciiString) aFormats = new TColStd_HSequenceOfAsciiString; + Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString; + if (!GetOperations()->ImportTranslators(aFormats, aPatterns)) return; + + const int formSize = aFormats->Length(), pattSize = aPatterns->Length(); + if (formSize != pattSize) return; + + // allocate the CORBA arrays + GEOM::string_array_var aFormatsArray = new GEOM::string_array(); + GEOM::string_array_var aPatternsArray = new GEOM::string_array(); + aFormatsArray->length(formSize); + aPatternsArray->length(formSize); + + // fill the local CORBA arrays with values from sequences + CORBA::Long i = 1; + for (; i <= formSize; i++) { + aFormatsArray[i-1] = CORBA::string_dup(aFormats->Value(i).ToCString()); + aPatternsArray[i-1] = CORBA::string_dup(aPatterns->Value(i).ToCString()); + } + + // initialize out-parameters with local arrays + theFormats = aFormatsArray._retn(); + thePatterns = aPatternsArray._retn(); +} + +//============================================================================= +/*! + * ExportTranslators + */ +//============================================================================= +void GEOM_IInsertOperations_i::ExportTranslators + (GEOM::string_array_out theFormats, GEOM::string_array_out thePatterns) +{ + // Get sequences of available formats + Handle(TColStd_HSequenceOfAsciiString) aFormats = new TColStd_HSequenceOfAsciiString; + Handle(TColStd_HSequenceOfAsciiString) aPatterns = new TColStd_HSequenceOfAsciiString; + if (!GetOperations()->ExportTranslators(aFormats, aPatterns)) return; + + const int formSize = aFormats->Length(), pattSize = aPatterns->Length(); + if (formSize != pattSize) return; + + // allocate the CORBA arrays + GEOM::string_array_var aFormatsArray = new GEOM::string_array(); + GEOM::string_array_var aPatternsArray = new GEOM::string_array(); + aFormatsArray->length(formSize); + aPatternsArray->length(formSize); + + // fill the local CORBA arrays with values from sequences + CORBA::Long i = 1; + for (; i <= formSize; i++) { + aFormatsArray[i-1] = CORBA::string_dup(aFormats->Value(i).ToCString()); + aPatternsArray[i-1] = CORBA::string_dup(aPatterns->Value(i).ToCString()); + } + + // initialize out-parameters with local arrays + theFormats = aFormatsArray._retn(); + thePatterns = aPatternsArray._retn(); +} diff --git a/src/GEOM_I/GEOM_IInsertOperations_i.hh b/src/GEOM_I/GEOM_IInsertOperations_i.hh new file mode 100644 index 000000000..d4822ce98 --- /dev/null +++ b/src/GEOM_I/GEOM_IInsertOperations_i.hh @@ -0,0 +1,42 @@ + +#ifndef _GEOM_IInsertOperations_i_HeaderFile +#define _GEOM_IInsertOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IInsertOperations.hxx" + +class GEOM_IInsertOperations_i : + public virtual POA_GEOM::GEOM_IInsertOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IInsertOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IInsertOperations* theImpl); + ~GEOM_IInsertOperations_i(); + + GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal); + + void Export (GEOM::GEOM_Object_ptr theOriginal, + const char* theFileName, + const char* theFormatName); + + GEOM::GEOM_Object_ptr Import (const char* theFileName, + const char* theFormatName); + + void ImportTranslators (GEOM::string_array_out theFormats, + GEOM::string_array_out thePatterns); + + void ExportTranslators (GEOM::string_array_out theFormats, + GEOM::string_array_out thePatterns); + + ::GEOMImpl_IInsertOperations* GetOperations() + { return (::GEOMImpl_IInsertOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_ILocalOperations_i.cc b/src/GEOM_I/GEOM_ILocalOperations_i.cc new file mode 100644 index 000000000..cfd948da1 --- /dev/null +++ b/src/GEOM_I/GEOM_ILocalOperations_i.cc @@ -0,0 +1,275 @@ +using namespace std; + +#include "GEOM_ILocalOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_ILocalOperations_i::GEOM_ILocalOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_ILocalOperations* theImpl) + :GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_ILocalOperations_i::GEOM_ILocalOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_ILocalOperations_i::~GEOM_ILocalOperations_i() +{ + MESSAGE("GEOM_ILocalOperations_i::~GEOM_ILocalOperations_i"); +} + + +//============================================================================= +/*! + * MakeFilletAll + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletAll + (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Create the Fillet + Handle(GEOM_Object) anObject = + GetOperations()->MakeFilletAll(aShapeRef, theR); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeFilletEdges + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletEdges + (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, + const GEOM::ListOfLong& theEdges) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Get the reference edges + int ind = 0; + int aLen = theEdges.length(); + list anEdges; + for (; ind < aLen; ind++) { + anEdges.push_back(theEdges[ind]); + } + + //Create the Fillet + Handle(GEOM_Object) anObject = + GetOperations()->MakeFilletEdges(aShapeRef, theR, anEdges); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeFilletFaces + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeFilletFaces + (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, + const GEOM::ListOfLong& theFaces) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Get the reference faces + int ind = 0; + int aLen = theFaces.length(); + list aFaces; + for (; ind < aLen; ind++) { + aFaces.push_back(theFaces[ind]); + } + + //Create the Fillet + Handle(GEOM_Object) anObject = + GetOperations()->MakeFilletFaces(aShapeRef, theR, aFaces); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeChamferAll + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferAll + (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Create the Chamfer + Handle(GEOM_Object) anObject = + GetOperations()->MakeChamferAll(aShapeRef, theD); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeChamferEdge + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferEdge + (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + CORBA::Long theFace1, CORBA::Long theFace2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Create the Chamfer + Handle(GEOM_Object) anObject = + GetOperations()->MakeChamferEdge(aShapeRef, theD1, theD2, theFace1, theFace2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeChamferFaces + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeChamferFaces + (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + const GEOM::ListOfLong& theFaces) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Get the reference faces + int ind = 0; + int aLen = theFaces.length(); + list aFaces; + for (; ind < aLen; ind++) { + aFaces.push_back(theFaces[ind]); + } + + //Create the Chamfer + Handle(GEOM_Object) anObject = + GetOperations()->MakeChamferFaces(aShapeRef, theD1, theD2, aFaces); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeArchimede + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ILocalOperations_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theWeight, + CORBA::Double theWaterDensity, + CORBA::Double theMeshingDeflection) +{ + GEOM::GEOM_Object_var aGEOMObject; + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + if (aShapeRef.IsNull()) return aGEOMObject._retn(); + + //Create the Archimede + Handle(GEOM_Object) anObject = GetOperations()->MakeArchimede + (aShapeRef, theWeight, theWaterDensity, theMeshingDeflection); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetSubShapeIndex + */ +//============================================================================= +CORBA::Long GEOM_ILocalOperations_i::GetSubShapeIndex + (GEOM::GEOM_Object_ptr theShape, GEOM::GEOM_Object_ptr theSubShape) +{ + if (theShape == NULL || theSubShape == NULL) return -1; + + //Get the reference shapes + Handle(GEOM_Object) aShapeRef = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + Handle(GEOM_Object) aSubShapeRef = GetOperations()->GetEngine()->GetObject + (theSubShape->GetStudyID(), theSubShape->GetEntry()); + if (aShapeRef.IsNull() || aSubShapeRef.IsNull()) return -1; + + //Get the unique ID of inside + CORBA::Long anID = GetOperations()->GetSubShapeIndex(aShapeRef, aSubShapeRef); + if (!GetOperations()->IsDone()) + return -1; + + return anID; +} diff --git a/src/GEOM_I/GEOM_ILocalOperations_i.hh b/src/GEOM_I/GEOM_ILocalOperations_i.hh new file mode 100644 index 000000000..50e37fde8 --- /dev/null +++ b/src/GEOM_I/GEOM_ILocalOperations_i.hh @@ -0,0 +1,50 @@ + +#ifndef _GEOM_ILocalOperations_i_HeaderFile +#define _GEOM_ILocalOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_ILocalOperations.hxx" + +class GEOM_ILocalOperations_i : + public virtual POA_GEOM::GEOM_ILocalOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_ILocalOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_ILocalOperations* theImpl); + ~GEOM_ILocalOperations_i(); + + GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theR); + GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, + const GEOM::ListOfLong& theEdges); + GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, + const GEOM::ListOfLong& theFaces); + + GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD); + GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + CORBA::Long theFace1, CORBA::Long theFace2); + GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + const GEOM::ListOfLong& theFaces); + + GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theWeight, + CORBA::Double theWaterDensity, + CORBA::Double theMeshingDeflection); + + CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theSubShape); + + ::GEOMImpl_ILocalOperations* GetOperations() + { return (::GEOMImpl_ILocalOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.cc b/src/GEOM_I/GEOM_IMeasureOperations_i.cc new file mode 100644 index 000000000..6ff28f176 --- /dev/null +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.cc @@ -0,0 +1,275 @@ +using namespace std; + +#include "GEOM_IMeasureOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IMeasureOperations_i::GEOM_IMeasureOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IMeasureOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IMeasureOperations_i::GEOM_IMeasureOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IMeasureOperations_i::~GEOM_IMeasureOperations_i() +{ + MESSAGE("GEOM_IMeasureOperations_i::~GEOM_IMeasureOperations_i"); +} + + +//============================================================================= +/*! + * GetCentreOfMass + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IMeasureOperations_i::GetCentreOfMass + (GEOM::GEOM_Object_ptr theShape) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return aGEOMObject._retn(); + + // Make Point - centre of mass of theShape + Handle(GEOM_Object) anObject = GetOperations()->GetCentreOfMass(aShape); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * GetBasicProperties + */ +//============================================================================= +void GEOM_IMeasureOperations_i::GetBasicProperties (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& theLength, + CORBA::Double& theSurfArea, + CORBA::Double& theVolume) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return; + + // Get shape parameters + GetOperations()->GetBasicProperties(aShape, theLength, theSurfArea, theVolume); +} + +//============================================================================= +/*! + * GetInertia + */ +//============================================================================= +void GEOM_IMeasureOperations_i::GetInertia + (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13, + CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23, + CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33, + CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return; + + // Get shape parameters + GetOperations()->GetInertia(aShape, + I11, I12, I13, + I21, I22, I23, + I31, I32, I33, + Ix , Iy , Iz); +} + +//============================================================================= +/*! + * GetBoundingBox + */ +//============================================================================= +void GEOM_IMeasureOperations_i::GetBoundingBox (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& Xmin, CORBA::Double& Xmax, + CORBA::Double& Ymin, CORBA::Double& Ymax, + CORBA::Double& Zmin, CORBA::Double& Zmax) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return; + + // Get shape parameters + GetOperations()->GetBoundingBox(aShape, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax); +} + +//============================================================================= +/*! + * GetTolerance + */ +//============================================================================= +void GEOM_IMeasureOperations_i::GetTolerance + (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& FaceMin, CORBA::Double& FaceMax, + CORBA::Double& EdgeMin, CORBA::Double& EdgeMax, + CORBA::Double& VertMin, CORBA::Double& VertMax) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return; + + // Get shape parameters + GetOperations()->GetTolerance(aShape, + FaceMin, FaceMax, + EdgeMin, EdgeMax, + VertMin, VertMax); +} + +//============================================================================= +/*! + * CheckShape + */ +//============================================================================= +CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theShape, + CORBA::String_out theDescription) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return 0; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return 0; + + // Get shape parameters + TCollection_AsciiString aDump; + if (GetOperations()->CheckShape(aShape, aDump)) return 1; + + theDescription = CORBA::string_dup(aDump.ToCString()); + return 0; +} + +//============================================================================= +/*! + * WhatIs + */ +//============================================================================= +char* GEOM_IMeasureOperations_i::WhatIs (GEOM::GEOM_Object_ptr theShape) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return NULL; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return NULL; + + // Get shape parameters + TCollection_AsciiString aDescription = GetOperations()->WhatIs(aShape); + return strdup(aDescription.ToCString()); +} + +//============================================================================= +/*! + * GetMinDistance + */ +//============================================================================= +CORBA::Double GEOM_IMeasureOperations_i::GetMinDistance + (GEOM::GEOM_Object_ptr theShape1, GEOM::GEOM_Object_ptr theShape2, + CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1, + CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape1 == NULL || theShape2 == NULL) return -1.0; + + //Get the reference shape + Handle(GEOM_Object) aShape1 = GetOperations()->GetEngine()->GetObject + (theShape1->GetStudyID(), theShape1->GetEntry()); + Handle(GEOM_Object) aShape2 = GetOperations()->GetEngine()->GetObject + (theShape2->GetStudyID(), theShape2->GetEntry()); + + if (aShape1.IsNull() || aShape2.IsNull()) return -1.0; + + // Get shape parameters + return GetOperations()->GetMinDistance(aShape1, aShape2, X1, Y1, Z1, X2, Y2, Z2); +} + +//============================================================================= +/*! + * PointCoordinates + */ +//============================================================================= +void GEOM_IMeasureOperations_i::PointCoordinates( + GEOM::GEOM_Object_ptr theShape, CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z ) + +{ + //Set a not done flag + GetOperations()->SetNotDone(); + + if ( theShape->_is_nil() ) + return; + + //Get the reference shape + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject( + theShape->GetStudyID(), theShape->GetEntry() ); + + if ( aShape.IsNull() ) + return; + + // Get shape parameters + GetOperations()->PointCoordinates( aShape, X, Y, Z ); +} diff --git a/src/GEOM_I/GEOM_IMeasureOperations_i.hh b/src/GEOM_I/GEOM_IMeasureOperations_i.hh new file mode 100644 index 000000000..6e26f873e --- /dev/null +++ b/src/GEOM_I/GEOM_IMeasureOperations_i.hh @@ -0,0 +1,64 @@ + +#ifndef _GEOM_IMeasureOperations_i_HeaderFile +#define _GEOM_IMeasureOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IMeasureOperations.hxx" + +class GEOM_IMeasureOperations_i : + public virtual POA_GEOM::GEOM_IMeasureOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IMeasureOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IMeasureOperations* theImpl); + ~GEOM_IMeasureOperations_i(); + + void GetBasicProperties (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& theLength, + CORBA::Double& theSurfArea, + CORBA::Double& theVolume); + + GEOM::GEOM_Object_ptr GetCentreOfMass (GEOM::GEOM_Object_ptr theShape); + + void GetInertia (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& I11, CORBA::Double& I12, CORBA::Double& I13, + CORBA::Double& I21, CORBA::Double& I22, CORBA::Double& I23, + CORBA::Double& I31, CORBA::Double& I32, CORBA::Double& I33, + CORBA::Double& Ix , CORBA::Double& Iy , CORBA::Double& Iz); + + void GetBoundingBox (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& Xmin, CORBA::Double& Xmax, + CORBA::Double& Ymin, CORBA::Double& Ymax, + CORBA::Double& Zmin, CORBA::Double& Zmax); + + void GetTolerance (GEOM::GEOM_Object_ptr theShape, + CORBA::Double& FaceMin, CORBA::Double& FaceMax, + CORBA::Double& EdgeMin, CORBA::Double& EdgeMax, + CORBA::Double& VertMin, CORBA::Double& VertMax); + + CORBA::Boolean CheckShape (GEOM::GEOM_Object_ptr theShape, + CORBA::String_out theDescription); + + char* WhatIs (GEOM::GEOM_Object_ptr theShape); + + CORBA::Double GetMinDistance (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2, + CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1, + CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2); + + + void PointCoordinates( GEOM::GEOM_Object_ptr theShape, + CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z ); + + ::GEOMImpl_IMeasureOperations* GetOperations() + { return (::GEOMImpl_IMeasureOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_IOperations_i.cc b/src/GEOM_I/GEOM_IOperations_i.cc new file mode 100644 index 000000000..d570efe16 --- /dev/null +++ b/src/GEOM_I/GEOM_IOperations_i.cc @@ -0,0 +1,123 @@ +using namespace std; + +#include "GEOM_IOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" + +#include "GEOM_Gen_i.hh" + +#include +#include + +//============================================================================= +/*! + * default constructor: + */ +//============================================================================= + +GEOM_IOperations_i::GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl) +:SALOME::GenericObj_i( thePOA ), _impl(theImpl), _engine(theEngine) +{ + thePOA->activate_object(this); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOM_IOperations_i::~GEOM_IOperations_i() +{} + + +//============================================================================= +/*! + * IsDone + */ +//============================================================================= +CORBA::Boolean GEOM_IOperations_i::IsDone() +{ + return _impl->IsDone(); +} + + +//============================================================================= +/*! + * SetErrorCode + */ +//============================================================================= +void GEOM_IOperations_i::SetErrorCode(const char* theErrorCode) +{ + _impl->SetErrorCode((char*)theErrorCode); +} + +//============================================================================= +/*! + * GetErrorCode + */ +//============================================================================= +char* GEOM_IOperations_i::GetErrorCode() +{ + return _impl->GetErrorCode(); +} + +//============================================================================= +/*! + * GetStudyID + */ +//============================================================================= +CORBA::Long GEOM_IOperations_i::GetStudyID() +{ + return _impl->GetDocID(); +} + +//============================================================================= +/*! + * StartOperation + */ +//============================================================================= +void GEOM_IOperations_i::StartOperation() +{ + _impl->StartOperation(); +} + +//============================================================================= +/*! + * FinishOperation + */ +//============================================================================= +void GEOM_IOperations_i::FinishOperation() +{ + _impl->FinishOperation(); +} + + +//============================================================================= +/*! + * AboutOperation + */ +//============================================================================= +void GEOM_IOperations_i::AbortOperation() +{ + _impl->AbortOperation(); +} + +//============================================================================= +/*! + * GetObject + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IOperations_i::GetObject(Handle(GEOM_Object) theObject) +{ + if(theObject.IsNull()) return NULL; + TCollection_AsciiString anEntry; + TDF_Tool::Entry(theObject->GetEntry(), anEntry); + GEOM::GEOM_Object_var GO = GEOM::GEOM_Object::_duplicate(_engine->GetObject(theObject->GetDocID(), anEntry.ToCString())); + return GO._retn(); +} + diff --git a/src/GEOM_I/GEOM_IOperations_i.hh b/src/GEOM_I/GEOM_IOperations_i.hh new file mode 100644 index 000000000..b881fcbe4 --- /dev/null +++ b/src/GEOM_I/GEOM_IOperations_i.hh @@ -0,0 +1,45 @@ + +#ifndef _GEOM_IOperations_i_HeaderFile +#define _GEOM_IOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "SALOME_GenericObj_i.hh" +#include "GEOM_IOperations.hxx" +#include "GEOM_Object_i.hh" +#include "GEOM_Object.hxx" + +class GEOM_IOperations_i : public virtual POA_GEOM::GEOM_IOperations, public virtual SALOME::GenericObj_i +{ + public: + GEOM_IOperations_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, ::GEOM_IOperations* theImpl); + ~GEOM_IOperations_i(); + + virtual CORBA::Boolean IsDone(); + + virtual void SetErrorCode(const char* theErrorCode); + + virtual char* GetErrorCode(); + + virtual CORBA::Long GetStudyID(); + + virtual GEOM::GEOM_Object_ptr GetObject(Handle(GEOM_Object) theObject); + + virtual void StartOperation(); + + virtual void FinishOperation(); + + virtual void AbortOperation(); + + + ::GEOM_IOperations* GetImpl() { return _impl; } + + private: + + ::GEOM_IOperations* _impl; + GEOM::GEOM_Gen_ptr _engine; +}; + +#endif diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.cc b/src/GEOM_I/GEOM_IShapesOperations_i.cc new file mode 100644 index 000000000..4f8236d4a --- /dev/null +++ b/src/GEOM_I/GEOM_IShapesOperations_i.cc @@ -0,0 +1,451 @@ +using namespace std; + +#include "GEOM_IShapesOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#include +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= +GEOM_IShapesOperations_i::GEOM_IShapesOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IShapesOperations* theImpl) +:GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_IShapesOperations_i::GEOM_IShapesOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= +GEOM_IShapesOperations_i::~GEOM_IShapesOperations_i() +{ + MESSAGE("GEOM_IShapesOperations_i::~GEOM_IShapesOperations_i"); +} + + +//============================================================================= +/*! + * MakeEdge + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeEdge + (GEOM::GEOM_Object_ptr thePnt1, GEOM::GEOM_Object_ptr thePnt2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePnt1 == NULL || thePnt2 == NULL) return aGEOMObject._retn(); + + //Get the reference points + Handle(GEOM_Object) aPnt1 = GetOperations()->GetEngine()->GetObject + (thePnt1->GetStudyID(), thePnt1->GetEntry()); + Handle(GEOM_Object) aPnt2 = GetOperations()->GetEngine()->GetObject + (thePnt2->GetStudyID(), thePnt2->GetEntry()); + + if (aPnt1.IsNull() || aPnt2.IsNull()) return aGEOMObject._retn(); + + //Create the Edge + Handle(GEOM_Object) anObject = GetOperations()->MakeEdge(aPnt1, aPnt2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeWire + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeWire + (const GEOM::ListOfGO& theEdgesAndWires) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + list aShapes; + + //Get the shapes + aLen = theEdgesAndWires.length(); + for (ind = 0; ind < aLen; ind++) { + if (theEdgesAndWires[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theEdgesAndWires[ind]->GetStudyID(), theEdgesAndWires[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes.push_back(aSh); + } + + // Make Solid + Handle(GEOM_Object) anObject = + GetOperations()->MakeWire(aShapes); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeFace + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFace + (GEOM::GEOM_Object_ptr theWire, CORBA::Boolean isPlanarWanted) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theWire == NULL) return aGEOMObject._retn(); + + //Get the reference wire + Handle(GEOM_Object) aWire = GetOperations()->GetEngine()->GetObject + (theWire->GetStudyID(), theWire->GetEntry()); + + if (aWire.IsNull()) return aGEOMObject._retn(); + + //Create the Face + Handle(GEOM_Object) anObject = GetOperations()->MakeFace(aWire, isPlanarWanted); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeFaceWires + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeFaceWires + (const GEOM::ListOfGO& theWires, + CORBA::Boolean isPlanarWanted) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + list aShapes; + + //Get the shapes + aLen = theWires.length(); + for (ind = 0; ind < aLen; ind++) { + if (theWires[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theWires[ind]->GetStudyID(), theWires[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes.push_back(aSh); + } + + // Make Face + Handle(GEOM_Object) anObject = + GetOperations()->MakeFaceWires(aShapes, isPlanarWanted); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeShell + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeShell + (const GEOM::ListOfGO& theFacesAndShells) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + list aShapes; + + //Get the shapes + aLen = theFacesAndShells.length(); + for (ind = 0; ind < aLen; ind++) { + if (theFacesAndShells[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theFacesAndShells[ind]->GetStudyID(), theFacesAndShells[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes.push_back(aSh); + } + + // Make Solid + Handle(GEOM_Object) anObject = + GetOperations()->MakeShell(aShapes); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSolidShell + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShell + (GEOM::GEOM_Object_ptr theShell) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShell == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShell = GetOperations()->GetEngine()->GetObject + (theShell->GetStudyID(), theShell->GetEntry()); + + if (aShell.IsNull()) return aGEOMObject._retn(); + + //Create the Solid + Handle(GEOM_Object) anObject = GetOperations()->MakeSolidShell(aShell); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeSolidShells + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeSolidShells + (const GEOM::ListOfGO& theShells) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + list aShapes; + + //Get the shapes + aLen = theShells.length(); + for (ind = 0; ind < aLen; ind++) { + if (theShells[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theShells[ind]->GetStudyID(), theShells[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes.push_back(aSh); + } + + // Make Solid + Handle(GEOM_Object) anObject = + GetOperations()->MakeSolidShells(aShapes); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeCompound + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeCompound + (const GEOM::ListOfGO& theShapes) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + int ind, aLen; + list aShapes; + + //Get the shapes + aLen = theShapes.length(); + for (ind = 0; ind < aLen; ind++) { + if (theShapes[ind] == NULL) return aGEOMObject._retn(); + Handle(GEOM_Object) aSh = GetOperations()->GetEngine()->GetObject + (theShapes[ind]->GetStudyID(), theShapes[ind]->GetEntry()); + if (aSh.IsNull()) return aGEOMObject._retn(); + aShapes.push_back(aSh); + } + + // Make Solid + Handle(GEOM_Object) anObject = + GetOperations()->MakeCompound(aShapes); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeGlueFaces + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::MakeGlueFaces + (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theTolerance) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return aGEOMObject._retn(); + + //Perform the glueing + Handle(GEOM_Object) anObject = + GetOperations()->MakeGlueFaces(aShape, theTolerance); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MakeExplode + */ +//============================================================================= +GEOM::ListOfGO* GEOM_IShapesOperations_i::MakeExplode (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + const CORBA::Boolean isSorted) +{ + GEOM::ListOfGO_var aSeq = new GEOM::ListOfGO; + if (theShape == NULL) return aSeq._retn(); + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject(theShape->GetStudyID(), theShape->GetEntry()); + Handle(TColStd_HSequenceOfTransient) aHSeq = GetOperations()->MakeExplode(aShape, theShapeType, isSorted); + 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(); +} + +//============================================================================= +/*! + * GetSubShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::GetSubShape + (GEOM::GEOM_Object_ptr theMainShape, + const CORBA::Long theID) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theMainShape == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theMainShape->GetStudyID(), theMainShape->GetEntry()); + + if (aShape.IsNull()) return aGEOMObject._retn(); + + Handle(GEOM_Object) anObject = GetOperations()->GetSubShape(aShape, theID); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * NumberOfFaces + */ +//============================================================================= +CORBA::Long GEOM_IShapesOperations_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape) +{ + if (theShape == NULL) return -1; + + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + CORBA::Long aNb = GetOperations()->NumberOfFaces(aShape); + if (!GetOperations()->IsDone()) return -1; + + return aNb; +} + +//============================================================================= +/*! + * NumberOfEdges + */ +//============================================================================= +CORBA::Long GEOM_IShapesOperations_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape) +{ + if (theShape == NULL) return -1; + + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + CORBA::Long aNb = GetOperations()->NumberOfEdges(aShape); + if (!GetOperations()->IsDone()) return -1; + + return aNb; +} + +//============================================================================= +/*! + * ReverseOrientation + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_IShapesOperations_i::ChangeOrientation + (GEOM::GEOM_Object_ptr theShape) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theShape == NULL) return aGEOMObject._retn(); + + //Get the reference objects + Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject + (theShape->GetStudyID(), theShape->GetEntry()); + + if (aShape.IsNull()) return aGEOMObject._retn(); + + //Create the Solid + Handle(GEOM_Object) anObject = GetOperations()->ReverseShape(aShape); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + diff --git a/src/GEOM_I/GEOM_IShapesOperations_i.hh b/src/GEOM_I/GEOM_IShapesOperations_i.hh new file mode 100644 index 000000000..4a63bb1f5 --- /dev/null +++ b/src/GEOM_I/GEOM_IShapesOperations_i.hh @@ -0,0 +1,61 @@ + +#ifndef _GEOM_IShapesOperations_i_HeaderFile +#define _GEOM_IShapesOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_IShapesOperations.hxx" + +class GEOM_IShapesOperations_i : + public virtual POA_GEOM::GEOM_IShapesOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_IShapesOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_IShapesOperations* theImpl); + ~GEOM_IShapesOperations_i(); + + GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + + GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires); + + GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire, + CORBA::Boolean isPlanarWanted); + + GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires, + CORBA::Boolean isPlanarWanted); + + GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells); + + GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell); + + GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells); + + GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes); + + GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theTolerance); + + GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + const CORBA::Boolean isSorted); + + GEOM::GEOM_Object_ptr GetSubShape (GEOM::GEOM_Object_ptr theMainShape, + const CORBA::Long theID); + + CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape); + CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape); + + GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape); + + ::GEOMImpl_IShapesOperations* GetOperations() + { return (::GEOMImpl_IShapesOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.cc b/src/GEOM_I/GEOM_ITransformOperations_i.cc new file mode 100644 index 000000000..07f027b5e --- /dev/null +++ b/src/GEOM_I/GEOM_ITransformOperations_i.cc @@ -0,0 +1,944 @@ +using namespace std; + +#include "GEOM_ITransformOperations_i.hh" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" + +#include +#include +#include +#include "GEOM_Engine.hxx" +#include "GEOM_Object.hxx" + +#define SUBSHAPE_ERROR "Sub shape cannot be transformed" + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= + +GEOM_ITransformOperations_i::GEOM_ITransformOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_ITransformOperations* theImpl) + :GEOM_IOperations_i(thePOA, theEngine, theImpl) +{ + MESSAGE("GEOM_ITransformOperations_i::GEOM_ITransformOperations_i"); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOM_ITransformOperations_i::~GEOM_ITransformOperations_i() +{ + MESSAGE("GEOM_ITransformOperations_i::~GEOM_ITransformOperations_i"); +} + + +//============================================================================= +/*! + * TranslateTwoPoints + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPoints + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + GEOM::GEOM_Object_var aGEOMObject; + + if (thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the first point of translation + Handle(GEOM_Object) aPoint1 = + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + if (aPoint1.IsNull()) return aGEOMObject._retn(); + + //Get the second point of translation + Handle(GEOM_Object) aPoint2 = + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + if (aPoint2.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + GetOperations()->TranslateTwoPoints(anObject, aPoint1, aPoint2); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * TranslateTwoPointsCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateTwoPointsCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePoint1 == NULL || thePoint2 == NULL || theObject == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the first point of translation + Handle(GEOM_Object) aPoint1 = + GetOperations()->GetEngine()->GetObject(thePoint1->GetStudyID(), thePoint1->GetEntry()); + if (aPoint1.IsNull()) return aGEOMObject._retn(); + + //Get the second point of translation + Handle(GEOM_Object) aPoint2 = + GetOperations()->GetEngine()->GetObject(thePoint2->GetStudyID(), thePoint2->GetEntry()); + if (aPoint2.IsNull()) return aGEOMObject._retn(); + + //Create the translated shape + Handle(GEOM_Object) anObject = + GetOperations()->TranslateTwoPointsCopy(aBasicObject, aPoint1, aPoint2); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * TranslateDXDYDZ + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + GEOM::GEOM_Object_var aGEOMObject ; + + if (theObject == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + GetOperations()->TranslateDXDYDZ(anObject, theDX, theDY, theDZ); + + return aGEOMObject._retn(); +} + + +//============================================================================= +/*! + * TranslateDXDYDZCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateDXDYDZCopy + (GEOM::GEOM_Object_ptr theObject, CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + + + //Create the translated shape + Handle(GEOM_Object) anObject = + GetOperations()->TranslateDXDYDZCopy(aBasicObject, theDX, theDY, theDZ); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * TranslateVector + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVector + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + GEOM::GEOM_Object_var aGEOMObject; + + if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + Handle(GEOM_Object) aVector = + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + if (aVector.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + GetOperations()->TranslateVector(anObject, aVector); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * TranslateVectorCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::TranslateVectorCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + Handle(GEOM_Object) aVector = + GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + if (aVector.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + Handle(GEOM_Object) anObject = GetOperations()->TranslateVectorCopy(aBasicObject, aVector); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * Rotate + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::Rotate (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle) +{ + //Set a not done flag + GetOperations()->SetNotDone(); + GEOM::GEOM_Object_var aGEOMObject; + + if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Get the object itself + Handle(GEOM_Object) anObject = GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the axis of revolution + Handle(GEOM_Object) anAxis = + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + if (anAxis.IsNull()) return aGEOMObject._retn(); + + //Perform the rotation + GetOperations()->Rotate(anObject, anAxis, theAngle); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * RotateCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::RotateCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the axis of rotation + Handle(GEOM_Object) anAxis = + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + if (anAxis.IsNull()) return aGEOMObject._retn(); + + //Perform the rotation + Handle(GEOM_Object) anObject = GetOperations()->RotateCopy(aBasicObject, anAxis, theAngle); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * MirrorPlane + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlane + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the plane + Handle(GEOM_Object) aPlane = + GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), thePlane->GetEntry()); + if (aPlane.IsNull()) return aGEOMObject._retn(); + + //Perform the mirror + GetOperations()->MirrorPlane(anObject, aPlane); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * MirrorPlaneCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPlaneCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || thePlane == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + Handle(GEOM_Object) aPlane = + GetOperations()->GetEngine()->GetObject(thePlane->GetStudyID(), thePlane->GetEntry()); + if (aPlane.IsNull()) return aGEOMObject._retn(); + + //Perform the mirror + Handle(GEOM_Object) anObject = GetOperations()->MirrorPlaneCopy(aBasicObject, aPlane); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MirrorAxis + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxis + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the axis + Handle(GEOM_Object) aAxis = + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + if (aAxis.IsNull()) return aGEOMObject._retn(); + + //Perform the mirror + GetOperations()->MirrorAxis(anObject, aAxis); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * MirrorAxisCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorAxisCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theAxis == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + Handle(GEOM_Object) aAxis = + GetOperations()->GetEngine()->GetObject(theAxis->GetStudyID(), theAxis->GetEntry()); + if (aAxis.IsNull()) return aGEOMObject._retn(); + + //Perform the mirror + Handle(GEOM_Object) anObject = GetOperations()->MirrorAxisCopy(aBasicObject, aAxis); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MirrorPoint + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPoint + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the point + Handle(GEOM_Object) aPoint = + GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); + if (aPoint.IsNull()) return aGEOMObject._retn(); + + //Perform the mirror + GetOperations()->MirrorPoint(anObject, aPoint); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * MirrorPointCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MirrorPointCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || thePoint == NULL) return aGEOMObject._retn(); + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + Handle(GEOM_Object) aPoint = + GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); + if (aPoint.IsNull()) return aGEOMObject._retn(); + + //Perform the mirror + Handle(GEOM_Object) anObject = GetOperations()->MirrorPointCopy(aBasicObject, aPoint); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * OffsetShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShape + (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + + //Get the basic object + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Create the offset shape + GetOperations()->OffsetShape(aBasicObject, theOffset); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * OffsetShapeCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::OffsetShapeCopy + (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL) return aGEOMObject._retn(); + + //Get the basic object + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Create the offset shape + Handle(GEOM_Object) anObject = GetOperations()->OffsetShapeCopy(aBasicObject, theOffset); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + + +//============================================================================= +/*! + * ScaleShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShape + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePoint == NULL || theObject == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the point + Handle(GEOM_Object) aPoint = + GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); + if (aPoint.IsNull()) return aGEOMObject._retn(); + + //Perform the scale + GetOperations()->ScaleShape(anObject, aPoint, theFactor); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * ScaleShapeCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::ScaleShapeCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (thePoint == NULL || theObject == NULL) return aGEOMObject._retn(); + + //Get the basic object + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the point + Handle(GEOM_Object) aPoint = + GetOperations()->GetEngine()->GetObject(thePoint->GetStudyID(), thePoint->GetEntry()); + if (aPoint.IsNull()) return aGEOMObject._retn(); + + //Perform the scale + Handle(GEOM_Object) anObject = + GetOperations()->ScaleShapeCopy(aBasicObject, aPoint, theFactor); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * PositionShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShape + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS) +{ + GEOM::GEOM_Object_var aGEOMObject = GEOM::GEOM_Object::_duplicate(theObject); + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theStartLCS == NULL || theEndLCS == NULL) + return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the basic object + Handle(GEOM_Object) anObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (anObject.IsNull()) return aGEOMObject._retn(); + + //Get the Start LCS + Handle(GEOM_Object) aStartLCS = + GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), theStartLCS->GetEntry()); + if (aStartLCS.IsNull()) return aGEOMObject._retn(); + + //Get the End LCS + Handle(GEOM_Object) aEndLCS = + GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), theEndLCS->GetEntry()); + if (aEndLCS.IsNull()) return aGEOMObject._retn(); + + //Perform the Position + GetOperations()->PositionShape(anObject, aStartLCS, aEndLCS); + + return aGEOMObject._retn(); +} + +//============================================================================= +/*! + * PositionShapeCopy + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::PositionShapeCopy + (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theStartLCS == NULL || theEndLCS == NULL) + return aGEOMObject._retn(); + + //Get the basic object + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the Start LCS + Handle(GEOM_Object) aStartLCS = + GetOperations()->GetEngine()->GetObject(theStartLCS->GetStudyID(), theStartLCS->GetEntry()); + if (aStartLCS.IsNull()) return aGEOMObject._retn(); + + //Get the End LCS + Handle(GEOM_Object) aEndLCS = + GetOperations()->GetEngine()->GetObject(theEndLCS->GetStudyID(), theEndLCS->GetEntry()); + if (aEndLCS.IsNull()) return aGEOMObject._retn(); + + //Perform the position + Handle(GEOM_Object) anObject = + GetOperations()->PositionShapeCopy(aBasicObject, aStartLCS, aEndLCS); + if (!GetOperations()->IsDone() || anObject.IsNull()) + return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MultiTranslate1D + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector, CORBA::Double theStep, CORBA::Long theNbTimes) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector of translation + Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + if (aVector.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + Handle(GEOM_Object) anObject = GetOperations()->Translate1D(aBasicObject, aVector, theStep, theNbTimes); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MultiTranslate2D + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector1, + CORBA::Double theStep1, + CORBA::Long theNbTimes1, + GEOM::GEOM_Object_ptr theVector2, + CORBA::Double theStep2, + CORBA::Long theNbTimes2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theVector1 == NULL || theVector2 == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the vector1 of translation + Handle(GEOM_Object) aVector1 = GetOperations()->GetEngine()->GetObject(theVector1->GetStudyID(), theVector1->GetEntry()); + if (aVector1.IsNull()) return aGEOMObject._retn(); + + //Get the vector2 of translation + Handle(GEOM_Object) aVector2 = GetOperations()->GetEngine()->GetObject(theVector2->GetStudyID(), theVector2->GetEntry()); + if (aVector2.IsNull()) return aGEOMObject._retn(); + + //Perform the translation + Handle(GEOM_Object) anObject = GetOperations()->Translate2D(aBasicObject, aVector1, theStep1, theNbTimes1, aVector2, theStep2, theNbTimes2); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MultiRotate1D + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Long theNbTimes) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) aBasicObject = + GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + //Get the a directon of rotation + Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + if (aVector.IsNull()) return aGEOMObject._retn(); + + + //Perform the rotation + Handle(GEOM_Object) anObject = GetOperations()->Rotate1D(aBasicObject, aVector, theNbTimes); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} + +//============================================================================= +/*! + * MultiRotate2D + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_ITransformOperations_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theAngle, + CORBA::Long theNbTimes1, + CORBA::Double theStep, + CORBA::Long theNbTimes2) +{ + GEOM::GEOM_Object_var aGEOMObject; + + //Set a not done flag + GetOperations()->SetNotDone(); + + if (theObject == NULL || theVector == NULL) return aGEOMObject._retn(); + + //check if the object is a subshape + if(!theObject->IsMainShape()) { + GetOperations()->SetErrorCode(SUBSHAPE_ERROR); + return aGEOMObject._retn(); + } + + //Get the object itself + Handle(GEOM_Object) aBasicObject = GetOperations()->GetEngine()->GetObject(theObject->GetStudyID(), theObject->GetEntry()); + if (aBasicObject.IsNull()) return aGEOMObject._retn(); + + + //Get the a directon of rotation + Handle(GEOM_Object) aVector = GetOperations()->GetEngine()->GetObject(theVector->GetStudyID(), theVector->GetEntry()); + if (aVector.IsNull()) return aGEOMObject._retn(); + + + //Perform the rotation + Handle(GEOM_Object) anObject = GetOperations()->Rotate2D(aBasicObject, aVector, theAngle, theNbTimes1, theStep, theNbTimes2); + if (!GetOperations()->IsDone() || anObject.IsNull()) return aGEOMObject._retn(); + + return GetObject(anObject); +} diff --git a/src/GEOM_I/GEOM_ITransformOperations_i.hh b/src/GEOM_I/GEOM_ITransformOperations_i.hh new file mode 100644 index 000000000..4b721ef5f --- /dev/null +++ b/src/GEOM_I/GEOM_ITransformOperations_i.hh @@ -0,0 +1,111 @@ + +#ifndef _GEOM_ITransformOperations_i_HeaderFile +#define _GEOM_ITransformOperations_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(GEOM_Gen) +#include "GEOM_IOperations_i.hh" +#include "GEOM_Object_i.hh" + +#include "GEOMImpl_ITransformOperations.hxx" + +class GEOM_ITransformOperations_i : + public virtual POA_GEOM::GEOM_ITransformOperations, + public virtual GEOM_IOperations_i +{ + public: + GEOM_ITransformOperations_i (PortableServer::POA_ptr thePOA, + GEOM::GEOM_Gen_ptr theEngine, + ::GEOMImpl_ITransformOperations* theImpl); + ~GEOM_ITransformOperations_i(); + + GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + + GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject, CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ); + + + GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject, CORBA::Double theDX, CORBA::Double theDY, CORBA::Double theDZ); + + GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector); + + GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector); + + GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector, CORBA::Double theStep, CORBA::Long theNbTimes); + + GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject, GEOM::GEOM_Object_ptr theVector1, CORBA::Double theStep1, CORBA::Long theNbTimes1, + GEOM::GEOM_Object_ptr theVector2, CORBA::Double theStep2, CORBA::Long theNbTimes2); + + GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle); + + GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Long theNbTimes); + + + GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theAngle, + CORBA::Long theNbTimes1, + CORBA::Double theStep, + CORBA::Long theNbTimes2); + + GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle); + + GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane); + + GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane); + + GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis); + + GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis); + + GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint); + + GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint); + + GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset); + + GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset); + + GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor); + + GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor); + + GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS); + + GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS); + + ::GEOMImpl_ITransformOperations* GetOperations() { return (::GEOMImpl_ITransformOperations*)GetImpl(); } +}; + +#endif diff --git a/src/GEOM_I/GEOM_Object_i.cc b/src/GEOM_I/GEOM_Object_i.cc new file mode 100644 index 000000000..2af09b209 --- /dev/null +++ b/src/GEOM_I/GEOM_Object_i.cc @@ -0,0 +1,292 @@ +using namespace std; + +#include "GEOM_Object_i.hh" +#include "GEOM_Gen_i.hh" +#include "GEOM_ISubShape.hxx" +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" +#include "OpUtil.hxx" +#include "Utils_ExceptHandlers.hxx" +#include +#include +#include + +#include +#include + +#include +#include +#include + +//============================================================================= +/*! + * constructor: + */ +//============================================================================= + +GEOM_Object_i::GEOM_Object_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, + Handle(GEOM_Object) theImpl) +:SALOME::GenericObj_i( thePOA ), _engine(theEngine), _impl(theImpl) +{ + thePOA->activate_object(this); +} + +//============================================================================= +/*! + * destructor + */ +//============================================================================= + +GEOM_Object_i::~GEOM_Object_i() +{} + + +//============================================================================= +/*! + * GetEntry + */ +//============================================================================= +char* GEOM_Object_i::GetEntry() +{ + const TDF_Label& aLabel = _impl->GetEntry(); + TCollection_AsciiString anEntry; + TDF_Tool::Entry(aLabel, anEntry); + return CORBA::string_dup(anEntry.ToCString()); +} + +//============================================================================= +/*! + * GetStudyID + */ +//============================================================================= +CORBA::Long GEOM_Object_i::GetStudyID() +{ + return _impl->GetDocID(); +} + + +//============================================================================= +/*! + * GetType + */ +//============================================================================= +CORBA::Long GEOM_Object_i::GetType() +{ + return _impl->GetType(); +} + +//============================================================================= +/*! + * GetShapeType + */ +//============================================================================= +GEOM::shape_type GEOM_Object_i::GetShapeType() +{ + TopoDS_Shape _geom = _impl->GetValue(); + if(_geom.IsNull()) return GEOM::SHAPE; + return (GEOM::shape_type)_geom.ShapeType(); +} + +//============================================================================= +/*! + * SetName + */ +//============================================================================= +void GEOM_Object_i::SetName(const char* theName) +{ + _impl->SetName(theName); +} + + +//============================================================================= +/*! + * GetName + */ +//============================================================================= +char* GEOM_Object_i::GetName() +{ + char* aName = _impl->GetName(); + if(aName) return strdup(aName); + return strdup(""); +} + +//============================================================================= +/*! + * SetStudyEntry + */ +//============================================================================= +void GEOM_Object_i::SetStudyEntry(const char* theEntry) +{ + _impl->SetAuxData(theEntry); +} + + +//============================================================================= +/*! + * GetStudyEntry + */ +//============================================================================= +char* GEOM_Object_i::GetStudyEntry() +{ + char* anEntry = _impl->GetAuxData(); + if(anEntry) return strdup(anEntry); + return strdup(""); +} + + +//============================================================================= +/*! + * GetDependency + */ +//============================================================================= +GEOM::ListOfGO* GEOM_Object_i::GetDependency() +{ + GEOM::ListOfGO_var aList = new GEOM::ListOfGO(); + aList->length(0); + + Handle(TColStd_HSequenceOfTransient) aSeq = _impl->GetAllDependency(); + if (aSeq.IsNull()) return aList._retn(); + int aLength = aSeq->Length(); + if (aLength == 0) return aList._retn(); + + aList->length(aLength); + + TCollection_AsciiString anEntry; + + for (int i = 1; i<=aLength; i++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(aSeq->Value(i)); + if (anObj.IsNull()) continue; + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_duplicate(_engine->GetObject(anObj->GetDocID(), anEntry.ToCString())); + aList[i-1] = obj; + } + + return aList._retn(); +} + +//============================================================================= +/*! + * GetLastDependency + */ +//============================================================================= +GEOM::ListOfGO* GEOM_Object_i::GetLastDependency() +{ + GEOM::ListOfGO_var aList = new GEOM::ListOfGO(); + aList->length(0); + + Handle(TColStd_HSequenceOfTransient) aSeq = _impl->GetLastDependency(); + if (aSeq.IsNull()) return aList._retn(); + int aLength = aSeq->Length(); + if (aLength == 0) return aList._retn(); + + aList->length(aLength); + + TCollection_AsciiString anEntry; + + for (int i = 1; i<=aLength; i++) { + Handle(GEOM_Object) anObj = Handle(GEOM_Object)::DownCast(aSeq->Value(i)); + if (anObj.IsNull()) continue; + TDF_Tool::Entry(anObj->GetEntry(), anEntry); + GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_duplicate(_engine->GetObject(anObj->GetDocID(), anEntry.ToCString())); + aList[i-1] = obj; + } + + return aList._retn(); +} + +//================================================================================= +// function : GetShapeStream +// Transfer resulting shape to client as sequence of bytes +//client can extract shape from stream using BrepTools::Read function +//================================================================================= +SALOMEDS::TMPFile* GEOM_Object_i::GetShapeStream() +{ + TopoDS_Shape aShape = _impl->GetValue(); + + if(aShape.IsNull()) return NULL; + + ostrstream streamShape; + //Write TopoDS_Shape in ASCII format to the stream + BRepTools::Write(aShape, streamShape); + //Returns the number of bytes that have been stored in the stream's buffer. + int size = streamShape.pcount(); + char* buf = new char [size]; + //Get pointer on internal character array in ostrstream + char* valueOfStream = streamShape.str(); + //Create copy of ostrstream content + memcpy(buf, valueOfStream, size); + //Allow automatic deletion of ostrstream content + streamShape.rdbuf()->freeze(0); + + CORBA::Octet* OctetBuf = (CORBA::Octet*)buf; + SALOMEDS::TMPFile_var SeqFile = new SALOMEDS::TMPFile(size,size,OctetBuf,1); + return SeqFile._retn(); + +} + + +//======================================================================= +//function : getShape +//purpose : return the TopoDS_Shape when client and servant are colocated, be careful +//======================================================================= +long GEOM_Object_i::getShape() { + _geom = _impl->GetValue(); + return((long)(&_geom)); +} + +//============================================================================= +/*! + * GetSubShapeIndices + */ +//============================================================================= +GEOM::ListOfLong* GEOM_Object_i::GetSubShapeIndices() +{ + GEOM::ListOfLong_var anIndices = new GEOM::ListOfLong; + + if(!_impl->IsMainShape()) { + Handle(GEOM_Function) aFunction = _impl->GetFunction(1); //Get SubShape function (always the first (and last) one) + if(aFunction.IsNull()) return anIndices._retn(); + GEOM_ISubShape ISS(aFunction); + Handle(TColStd_HArray1OfInteger) anArray = ISS.GetIndices(); + if(anArray.IsNull() || anArray->Length() < 1) return anIndices._retn(); + anIndices->length(anArray->Length()); + for(int i=1; i<=anArray->Length(); i++) anIndices[i-1] = anArray->Value(i); + } + else { + anIndices->length(0); + } + + return anIndices._retn(); +} + + +//============================================================================= +/*! + * GetMainShape + */ +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Object_i::GetMainShape() +{ + GEOM::GEOM_Object_var obj; + if(!_impl->IsMainShape()) { + Handle(GEOM_Function) aFunction = _impl->GetFunction(1); //Get SubShape function (always the first (and last) one) + if(aFunction.IsNull()) return obj._retn(); + GEOM_ISubShape ISS(aFunction); + + aFunction = ISS.GetMainShape(); + if(aFunction.IsNull()) return obj._retn(); + TDF_Label aLabel = aFunction->GetOwnerEntry(); + if(aLabel.IsNull()) return obj._retn(); + TCollection_AsciiString anEntry; + TDF_Tool::Entry(aLabel, anEntry); + return GEOM::GEOM_Object::_duplicate(_engine->GetObject(_impl->GetDocID(), anEntry.ToCString())); + } + + return obj._retn(); +} + +bool GEOM_Object_i::IsShape() +{ + return !_impl->GetValue().IsNull() && _impl->GetType() != GEOM_MARKER; +} diff --git a/src/GEOM_I/GEOM_Object_i.hh b/src/GEOM_I/GEOM_Object_i.hh new file mode 100644 index 000000000..06bea0b09 --- /dev/null +++ b/src/GEOM_I/GEOM_Object_i.hh @@ -0,0 +1,62 @@ + +#ifndef _GEOM_Object_i_HeaderFile +#define _GEOM_Object_i_HeaderFile + + +#include + +#include CORBA_SERVER_HEADER(SALOMEDS) +#include CORBA_SERVER_HEADER(GEOM_Gen) + +#include "SALOME_GenericObj_i.hh" +#include "GEOM_Object.hxx" +#include + +class GEOM_Object_i : public virtual POA_GEOM::GEOM_Object, public virtual SALOME::GenericObj_i +{ + public: + GEOM_Object_i(PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine, Handle(GEOM_Object) theImpl); + ~GEOM_Object_i(); + + virtual char* GetEntry(); + + virtual CORBA::Long GetStudyID(); + + virtual CORBA::Long GetType(); + + virtual GEOM::shape_type GetShapeType(); + + virtual void SetName(const char* theName); + + virtual char* GetName(); + + virtual void SetStudyEntry(const char* theEntry); + + virtual char* GetStudyEntry(); + + virtual GEOM::ListOfGO* GetDependency(); + + virtual GEOM::ListOfGO* GetLastDependency(); + + virtual SALOMEDS::TMPFile* GetShapeStream(); + + long getShape(); + + virtual bool IsMainShape() { return _impl->IsMainShape(); } + + virtual GEOM::ListOfLong* GetSubShapeIndices(); + + virtual GEOM::GEOM_Object_ptr GetMainShape(); + + virtual bool IsShape(); + + Handle(GEOM_Object) GetImpl() { return _impl; } + + private: + + GEOM::GEOM_Gen_ptr _engine; + Handle(GEOM_Object) _impl; + TopoDS_Shape _geom; +}; + +#endif diff --git a/src/GEOM_I/Makefile.in b/src/GEOM_I/Makefile.in new file mode 100644 index 000000000..ce1b86325 --- /dev/null +++ b/src/GEOM_I/Makefile.in @@ -0,0 +1,93 @@ +# GEOM GEOM : implementaion of GEOM_Gen.idl +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Patrick GOLDBRONN (CEA) +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + +@COMMENCE@ + +# Libraries targets + +LIB = libGEOMEngine.la +LIB_SRC = \ + GEOM_Object_i.cc \ + GEOM_IOperations_i.cc \ + GEOM_IBasicOperations_i.cc \ + GEOM_IHealingOperations_i.cc \ + GEOM_I3DPrimOperations_i.cc \ + GEOM_IShapesOperations_i.cc \ + GEOM_IBlocksOperations_i.cc \ + GEOM_IBooleanOperations_i.cc \ + GEOM_ICurvesOperations_i.cc \ + GEOM_ILocalOperations_i.cc \ + GEOM_IInsertOperations_i.cc \ + GEOM_ITransformOperations_i.cc \ + GEOM_IMeasureOperations_i.cc \ + GEOM_IGroupOperations_i.cc \ + GEOM_Gen_i.cc + +LIB_SERVER_IDL = SALOME_Component.idl SALOMEDS.idl SALOME_Exception.idl \ + GEOM_Gen.idl SALOME_GenericObj.idl + +# Executables targets +BIN = +BIN_SRC = +BIN_CLIENT_IDL = +BIN_SERVER_IDL = + +#This export required to compile GEOM_Superv_i.lo library +EXPORT_HEADERS = GEOM_Object_i.hh \ + GEOM_IOperations_i.hh \ + GEOM_IBasicOperations_i.hh \ + GEOM_IHealingOperations_i.hh \ + GEOM_I3DPrimOperations_i.hh \ + GEOM_IShapesOperations_i.hh \ + GEOM_IBlocksOperations_i.hh \ + GEOM_IBooleanOperations_i.hh \ + GEOM_ICurvesOperations_i.hh \ + GEOM_ILocalOperations_i.hh \ + GEOM_IInsertOperations_i.hh \ + GEOM_ITransformOperations_i.hh \ + GEOM_IMeasureOperations_i.hh \ + GEOM_IGroupOperations_i.hh \ + GEOM_Gen_i.hh + +# additionnal information to compil and link file +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS) +CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +LDFLAGS += -lTOOLSDS -lSalomeNS -lSalomeContainer -lGEOMPartition -lGEOMArchimede -lGEOMbasic -lGEOMimpl $(CAS_LDPATH) -lTKIGES -lTKSTEP -lTKFillet -lTKOffset -lGEOMSketcher -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeGenericObj + +# additional file to be cleaned +MOSTLYCLEAN = +CLEAN = +DISTCLEAN = + +@CONCLUDE@ + diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.cc b/src/GEOM_I_Superv/GEOM_Superv_i.cc new file mode 100644 index 000000000..360ad2686 --- /dev/null +++ b/src/GEOM_I_Superv/GEOM_Superv_i.cc @@ -0,0 +1,1747 @@ +using namespace std; + +#include "GEOM_Superv_i.hh" + +//============================================================================= +// constructor: +//============================================================================= +GEOM_Superv_i::GEOM_Superv_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) : + Engines_Component_i(orb, poa, contId, instanceName, interfaceName) +{ + MESSAGE("GEOM_Superv_i::GEOM_Superv_i"); + + _thisObj = this ; + _id = _poa->activate_object(_thisObj); + name_service = new SALOME_NamingService(_orb); + + myGeomEngine = GEOM::GEOM_Gen::_nil(); + myStudyID = -1; + + myBasicOp = GEOM::GEOM_IBasicOperations::_nil(); + my3DPrimOp = GEOM::GEOM_I3DPrimOperations::_nil(); + myBoolOp = GEOM::GEOM_IBooleanOperations::_nil(); + myInsOp = GEOM::GEOM_IInsertOperations::_nil(); + myTransfOp = GEOM::GEOM_ITransformOperations::_nil(); + myShapesOp = GEOM::GEOM_IShapesOperations::_nil(); + myBlocksOp = GEOM::GEOM_IBlocksOperations::_nil(); + myCurvesOp = GEOM::GEOM_ICurvesOperations::_nil(); + myLocalOp = GEOM::GEOM_ILocalOperations::_nil(); + myGroupOp = GEOM::GEOM_IGroupOperations::_nil(); +} + +//============================================================================= +// destructor +//============================================================================= +GEOM_Superv_i::~GEOM_Superv_i() +{ + MESSAGE("GEOM_Superv_i::~GEOM_Superv_i"); + delete name_service; +} + +//============================================================================ +// function : register() +// purpose : register 'name' in 'name_service' +//============================================================================ +void GEOM_Superv_i::register_name(char * name) +{ + GEOM::GEOM_Superv_ptr g = GEOM::GEOM_Superv::_narrow(POA_GEOM::GEOM_Superv::_this()); + name_service->Register(g, strdup(name)); +} + +//============================================================================= +// setGEOMEngine: +//============================================================================= +void GEOM_Superv_i::setGeomEngine() +{ + // get GEOM_Gen engine + SALOME_LifeCycleCORBA* lcc = new SALOME_LifeCycleCORBA( name_service ); + Engines::Component_var comp = lcc->FindOrLoad_Component( "FactoryServer", "GEOM" ); + + myGeomEngine = GEOM::GEOM_Gen::_narrow(comp); +} + +//============================================================================= +// SetStudyID: +//============================================================================= +void GEOM_Superv_i::SetStudyID( CORBA::Long theId ) +{ + myStudyID = theId; +} + +//============================================================================= +// getBasicOp: +//============================================================================= +void GEOM_Superv_i::getBasicOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IBasicOperations interface + myBasicOp = myGeomEngine->GetIBasicOperations(myStudyID); +} + +//============================================================================= +// get3DPrimOp: +//============================================================================= +void GEOM_Superv_i::get3DPrimOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_I3DPrimOperations interface + my3DPrimOp = myGeomEngine->GetI3DPrimOperations(myStudyID); +} + +//============================================================================= +// getBoolOp: +//============================================================================= +void GEOM_Superv_i::getBoolOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IBooleanOperations interface + myBoolOp = myGeomEngine->GetIBooleanOperations(myStudyID); +} + +//============================================================================= +// getInsOp: +//============================================================================= +void GEOM_Superv_i::getInsOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IInsertOperations interface + myInsOp = myGeomEngine->GetIInsertOperations(myStudyID); +} + +//============================================================================= +// getTransfOp: +//============================================================================= +void GEOM_Superv_i::getTransfOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_ITransformOperations interface + myTransfOp = myGeomEngine->GetITransformOperations(myStudyID); +} + +//============================================================================= +// getShapesOp: +//============================================================================= +void GEOM_Superv_i::getShapesOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IShapesOperations interface + myShapesOp = myGeomEngine->GetIShapesOperations(myStudyID); +} + +//============================================================================= +// getBlocksOp: +//============================================================================= +void GEOM_Superv_i::getBlocksOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IBlocksOperations interface + myBlocksOp = myGeomEngine->GetIBlocksOperations(myStudyID); +} + +//============================================================================= +// getCurvesOp: +//============================================================================= +void GEOM_Superv_i::getCurvesOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_ICurvesOperations interface + myCurvesOp = myGeomEngine->GetICurvesOperations(myStudyID); +} + +//============================================================================= +// getLocalOp: +//============================================================================= +void GEOM_Superv_i::getLocalOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_ILocalOperations interface + myLocalOp = myGeomEngine->GetILocalOperations(myStudyID); +} + +//============================================================================= +// getGroupOp: +//============================================================================= +void GEOM_Superv_i::getGroupOp() +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + // get GEOM_IGroupOperations interface + myGroupOp = myGeomEngine->GetIGroupOperations(myStudyID); +} + +//============================================================================ +// function : Save() +// purpose : save OCAF/Geom document +//============================================================================ +SALOMEDS::TMPFile* GEOM_Superv_i::Save(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) +{ + SALOMEDS::TMPFile_var aStreamFile; + return aStreamFile._retn(); +} + +//============================================================================ +// function : SaveASCII() +// purpose : +//============================================================================ +SALOMEDS::TMPFile* GEOM_Superv_i::SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile) +{ + SALOMEDS::TMPFile_var aStreamFile; + return aStreamFile._retn(); +} + +//============================================================================ +// function : Load() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Superv_i::Load(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile) +{ + return false; +} + +//============================================================================ +// function : LoadASCII() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Superv_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile) +{ + return false; +} + +//============================================================================ +// function : Close() +// purpose : +//============================================================================ +void GEOM_Superv_i::Close(SALOMEDS::SComponent_ptr theComponent) +{} + +//============================================================================ +// function : ComponentDataType() +// purpose : +//============================================================================ +char* GEOM_Superv_i::ComponentDataType() +{ + return 0; +} + +//============================================================================ +// function : IORToLocalPersistentID() +// purpose : +//============================================================================ +char* GEOM_Superv_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) +{ + return 0; +} + +//============================================================================ +// function : LocalPersistentIDToIOR() +// purpose : Create/Load CORBA object from a persistent ref (an entry) +// : Used when a study is loaded +// : The IOR (IORName) of object created is returned +//============================================================================ +char* GEOM_Superv_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII) +{ + return 0; +} + +//============================================================================ +// function : CanPublishInStudy +// purpose : +//============================================================================ +bool GEOM_Superv_i::CanPublishInStudy(CORBA::Object_ptr theIOR) +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + return myGeomEngine->CanPublishInStudy(theIOR); +} + +//============================================================================ +// function : PublishInStudy +// purpose : +//============================================================================ +SALOMEDS::SObject_ptr GEOM_Superv_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName) throw (SALOME::SALOME_Exception) +{ + if (CORBA::is_nil(myGeomEngine)) + setGeomEngine(); + return myGeomEngine->PublishInStudy(theStudy, theSObject, theObject, theName); +} + +//============================================================================ +// function : CanCopy() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Superv_i::CanCopy(SALOMEDS::SObject_ptr theObject) +{ + return false; +} + +//============================================================================ +// function : CopyFrom() +// purpose : +//============================================================================ +SALOMEDS::TMPFile* GEOM_Superv_i::CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID) +{ + SALOMEDS::TMPFile_var aStreamFile; + return aStreamFile._retn(); +} + +//============================================================================ +// function : CanPaste() +// purpose : +//============================================================================ +CORBA::Boolean GEOM_Superv_i::CanPaste(const char* theComponentName, CORBA::Long theObjectID) +{ + return false; +} + +//============================================================================ +// function : PasteInto() +// purpose : +//============================================================================ +SALOMEDS::SObject_ptr GEOM_Superv_i::PasteInto(const SALOMEDS::TMPFile& theStream, + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theObject) +{ + SALOMEDS::SObject_var aNewSO; + return aNewSO._retn(); +} + +//================= Primitives Construction : BasicOperations ================= +//============================================================================= +// MakePointXYZ: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointXYZ(CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ) +{ + MESSAGE("GEOM_Superv_i::MakePointXYZ"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + // make vertex and return + return myBasicOp->MakePointXYZ(theX, theY, theZ); +} + +//============================================================================= +// MakePointWithReference: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointWithReference (GEOM::GEOM_Object_ptr theReference, + CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ) +{ + MESSAGE("GEOM_Superv_i::MakePointWithReference"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakePointWithReference(theReference, theX, theY, theZ); +} + +//============================================================================= +// MakePointOnCurve: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve, + CORBA::Double theParameter) +{ + MESSAGE("GEOM_Superv_i::MakePointOnCurve"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakePointOnCurve(theRefCurve, theParameter); +} + +//============================================================================= +// MakeVectorDXDYDZ: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ) +{ + MESSAGE("GEOM_Superv_i::MakeVectorDXDYDZ"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakeVectorDXDYDZ(theDX, theDY, theDZ); +} + +//============================================================================= +// MakeVectorTwoPnt: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2) +{ + MESSAGE("GEOM_Superv_i::MakeVector"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakeVectorTwoPnt(thePnt1, thePnt2); +} + +//============================================================================= +// MakeLineTwoPnt: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2) +{ + MESSAGE("GEOM_Superv_i::MakeLineTwoPnt"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakeLineTwoPnt(thePnt1, thePnt2); +} + +//============================================================================= +// MakePlaneThreePnt: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, + CORBA::Double theTrimSize) +{ + MESSAGE("GEOM_Superv_i::MakePlaneThreePnt"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize); +} + +//============================================================================= +// MakePlanePntVec: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theTrimSize) +{ + MESSAGE("GEOM_Superv_i::MakePlanePntVec"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakePlanePntVec(thePnt, theVec, theTrimSize); +} + +//============================================================================= +// MakePlaneFace: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePlaneFace (GEOM::GEOM_Object_ptr theFace, + CORBA::Double theTrimSize) +{ + MESSAGE("GEOM_Superv_i::MakePlaneFace"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakePlaneFace(theFace, theTrimSize); +} + +//============================================================================= +// MakeMarker: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMarker +(CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ, + CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ, + CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ) +{ + MESSAGE("GEOM_Superv_i::MakeMarker"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + return myBasicOp->MakeMarker(theOX, theOY, theOZ, theXDX, theXDY, theXDZ, theYDX, theYDY, theYDZ); +} + +//================= Primitives Construction : 3DPrimOperations ================ +//============================================================================= +// MakeBox: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBox (CORBA::Double theX1, + CORBA::Double theY1, + CORBA::Double theZ1, + CORBA::Double theX2, + CORBA::Double theY2, + CORBA::Double theZ2) +{ + MESSAGE("GEOM_Superv_i::MakeBox"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeBoxTwoPnt(myBasicOp->MakePointXYZ(theX1, theY1, theZ1), + myBasicOp->MakePointXYZ(theX2, theY2, theZ2)); +} + +//============================================================================= +// MakeBoxDXDYDZ: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ) +{ + MESSAGE("GEOM_Superv_i::MakeBoxDXDYDZ"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeBoxDXDYDZ(theDX, theDY, theDZ); +} + +//============================================================================= +// MakeBoxTwoPnt: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2) +{ + MESSAGE("GEOM_Superv_i::MakeBoxTwoPnt"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeBoxTwoPnt(thePnt1, thePnt2); +} + +//============================================================================= +// MakeCylinderPntVecRH: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theRadius, + CORBA::Double theHeight) +{ + MESSAGE("GEOM_Superv_i::MakeCylinderPntVecRH"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeCylinderPntVecRH(thePnt, theAxis, theRadius, theHeight); +} + +//============================================================================= +// MakeCylinderRH: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCylinderRH (CORBA::Double theR, + CORBA::Double theH) +{ + MESSAGE("GEOM_Superv_i::MakeCylinderRH"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeCylinderRH(theR, theH); +} + +//============================================================================= +// MakeSphere: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphere (CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ, + CORBA::Double theRadius) +{ + MESSAGE("GEOM_Superv_i::MakeSphepe"); + if (CORBA::is_nil(myBasicOp)) getBasicOp(); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeSpherePntR(myBasicOp->MakePointXYZ(theX, theY, theZ), theRadius); +} + +//============================================================================= +// MakeSphereR: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSphereR (CORBA::Double theR) +{ + MESSAGE("GEOM_Superv_i::MakeSphereR"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeSphereR(theR); +} + +//============================================================================= +// MakeSpherePntR: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, + CORBA::Double theR) +{ + MESSAGE("GEOM_Superv_i::MakeSpherePntR"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeSpherePntR(thePnt, theR); +} + +//============================================================================= +// MakeTorusPntVecRR: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theRMajor, + CORBA::Double theRMinor) +{ + MESSAGE("GEOM_Superv_i::MakeTorusPntVecRR"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor); +} + +//============================================================================= +// MakeTorusRR: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeTorusRR (CORBA::Double theRMajor, + CORBA::Double theRMinor) +{ + MESSAGE("GEOM_Superv_i::MakeTorusRR"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeTorusRR(theRMajor, theRMinor); +} + +//============================================================================= +// MakeConePntVecR1R2H: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theHeight) +{ + MESSAGE("GEOM_Superv_i::MakeConePntVecR1R2H"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theHeight); +} + +//============================================================================= +// MakeConeR1R2H: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeConeR1R2H (CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theHeight) +{ + MESSAGE("GEOM_Superv_i::MakeConeR1R2H"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeConeR1R2H(theR1, theR2, theHeight); +} + +//============================================================================= +// MakePrismVecH: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismVecH (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theH) +{ + MESSAGE("GEOM_Superv_i::MakePrismVecH"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakePrismVecH(theBase, theVec, theH); +} + + +//============================================================================= +// MakePrismTwoPnt: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + MESSAGE("GEOM_Superv_i::MakePrismTwoPnt"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakePrismTwoPnt(theBase, thePoint1, thePoint2); +} + +//============================================================================= +// MakePipe: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePipe (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePath) +{ + MESSAGE("GEOM_Superv_i::MakePipe"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakePipe(theBase, thePath); +} + +//============================================================================= +// MakeRevolutionAxisAngle: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle) +{ + MESSAGE("GEOM_Superv_i::MakeRevolutionAxisAngle"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeRevolutionAxisAngle(theBase, theAxis, theAngle); +} + +//============================================================================= +// MakeFilling: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilling (GEOM::GEOM_Object_ptr theShape, + CORBA::Long theMinDeg, CORBA::Long theMaxDeg, + CORBA::Double theTol2D, CORBA::Double theTol3D, + CORBA::Long theNbIter) +{ + MESSAGE("GEOM_Superv_i::MakeFilling"); + if (CORBA::is_nil(my3DPrimOp)) get3DPrimOp(); + return my3DPrimOp->MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter); +} + +//============================= BooleanOperations ============================= +//============================================================================= +// MakeBoolean: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeBoolean (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2, + CORBA::Long theOperation) +{ + // theOperation indicates the operation to be done: + // 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section + MESSAGE("GEOM_Superv_i::MakeBoolean"); + if (CORBA::is_nil(myBoolOp)) getBoolOp(); + return myBoolOp->MakeBoolean(theShape1, theShape2, theOperation); +} + +//============================================================================= +// MakeFuse: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFuse (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2) +{ + MESSAGE("GEOM_Superv_i::MakeFuse"); + if (CORBA::is_nil(myBoolOp)) getBoolOp(); + return myBoolOp->MakeBoolean(theShape1, theShape2, 3); +} + +//============================================================================= +// MakePartition: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePartition (const GEOM::ListOfGO& theShapes, + const GEOM::ListOfGO& theTools, + const GEOM::ListOfGO& theKeepInside, + const GEOM::ListOfGO& theRemoveInside, + const CORBA::Short theLimit, + const CORBA::Boolean theRemoveWebs, + const GEOM::ListOfLong& theMaterials) +{ + MESSAGE("GEOM_Superv_i::MakePartition"); + if (CORBA::is_nil(myBoolOp)) getBoolOp(); + return myBoolOp->MakePartition(theShapes, theTools, theKeepInside, theRemoveInside, + theLimit, theRemoveWebs, theMaterials); +} + +//============================================================================= +// MakeHalfPartition: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHalfPartition (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePlane) +{ + MESSAGE("GEOM_Superv_i::MakeHalfPartition"); + if (CORBA::is_nil(myBoolOp)) getBoolOp(); + return myBoolOp->MakeHalfPartition(theShape, thePlane); +} + +//============================== InsertOperations ============================= +//============================================================================= +// MakeCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCopy (GEOM::GEOM_Object_ptr theOriginal) +{ + MESSAGE("GEOM_Superv_i::MakeCopy"); + if (CORBA::is_nil(myInsOp)) getInsOp(); + return myInsOp->MakeCopy(theOriginal); +} + +//============================================================================= +// Export: +//============================================================================= +void GEOM_Superv_i::Export (GEOM::GEOM_Object_ptr theObject, + const char* theFileName, + const char* theFormatName) +{ + MESSAGE("GEOM_Superv_i::Export"); + if (CORBA::is_nil(myInsOp)) getInsOp(); + myInsOp->Export(theObject, theFileName, theFormatName); +} + +//============================================================================= +// Import: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::Import (const char* theFileName, + const char* theFormatName) +{ + MESSAGE("GEOM_Superv_i::Import"); + if (CORBA::is_nil(myInsOp)) getInsOp(); + return myInsOp->Import(theFileName, theFormatName); +} + +//============================================================================= +// ImportTranslators: +//============================================================================= +void GEOM_Superv_i::ImportTranslators (GEOM::string_array_out theFormats, + GEOM::string_array_out thePatterns) +{ + MESSAGE("GEOM_Superv_i::ImportTranslators"); + if (CORBA::is_nil(myInsOp)) getInsOp(); + myInsOp->ImportTranslators(theFormats, thePatterns); +} + +//============================================================================= +// ExportTranslators: +//============================================================================= +void GEOM_Superv_i::ExportTranslators (GEOM::string_array_out theFormats, + GEOM::string_array_out thePatterns) +{ + MESSAGE("GEOM_Superv_i::ExportTranslators"); + if (CORBA::is_nil(myInsOp)) getInsOp(); + myInsOp->ExportTranslators(theFormats, thePatterns); +} + +//============================= TransformOperations =========================== +//============================================================================= +// TranslateTwoPoints: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + MESSAGE("GEOM_Superv_i::TranslateTwoPoints"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->TranslateTwoPoints(theObject, thePoint1, thePoint2); +} + +//============================================================================= +// TranslateTwoPointsCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + MESSAGE("GEOM_Superv_i::TranslateTwoPointsCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->TranslateTwoPointsCopy(theObject, thePoint1, thePoint2); +} + +//============================================================================= +// TranslateDXDYDZ: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ) +{ + MESSAGE("GEOM_Superv_i::TranslateDXDYDZ"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->TranslateDXDYDZ(theObject, theDX, theDY, theDZ); +} + +//============================================================================= +// TranslateDXDYDZCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ) +{ + MESSAGE("GEOM_Superv_i::TranslateDXDYDZCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ); +} + +//============================================================================= +// TranslateVector: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVector (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector) +{ + MESSAGE("GEOM_Superv_i::TranslateVector"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->TranslateVector(theObject, theVector); +} + +//============================================================================= +// TranslateVectorCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector) +{ + MESSAGE("GEOM_Superv_i::TranslateVectorCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->TranslateVectorCopy(theObject, theVector); +} + +//============================================================================= +// MultiTranslate1D: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate1D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theStep, + CORBA::Long theNbTimes) +{ + MESSAGE("GEOM_Superv_i::MultiTranslate1D"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MultiTranslate1D(theObject, theVector, theStep, theNbTimes); +} + +//============================================================================= +// MultiTranslate2D: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiTranslate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector1, + CORBA::Double theStep1, + CORBA::Long theNbTimes1, + GEOM::GEOM_Object_ptr theVector2, + CORBA::Double theStep2, + CORBA::Long theNbTimes2) +{ + MESSAGE("GEOM_Superv_i::MultiTranslate2D"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1, + theVector2, theStep2, theNbTimes2); +} + +//============================================================================= +// Rotate: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::Rotate (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle) +{ + MESSAGE("GEOM_Superv_i::Rotate"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->Rotate(theObject, theAxis, theAngle); +} + +//============================================================================= +// RotateCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::RotateCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle) +{ + MESSAGE("GEOM_Superv_i::RotateCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->RotateCopy(theObject, theAxis, theAngle); +} + +//============================================================================= +// MultiRotate1D: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate1D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Long theNbTimes) +{ + MESSAGE("GEOM_Superv_i::MultiRotate1D"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MultiRotate1D(theObject, theAxis, theNbTimes); +} + +//============================================================================= +// MultiRotate2D: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MultiRotate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle, + CORBA::Long theNbTimes1, + CORBA::Double theStep, + CORBA::Long theNbTimes2) +{ + MESSAGE("GEOM_Superv_i::MultiRotate2D"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2); +} + +//============================================================================= +// MirrorPlane: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlane (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane) +{ + MESSAGE("GEOM_Superv_i::MirrorPlane"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MirrorPlane(theObject, thePlane); +} + +//============================================================================= +// MirrorPlaneCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane) +{ + MESSAGE("GEOM_Superv_i::MirrorPlaneCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MirrorPlaneCopy(theObject, thePlane); +} + +//============================================================================= +// MirrorAxis: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxis (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis) +{ + MESSAGE("GEOM_Superv_i::MirrorAxis"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MirrorAxis(theObject, theAxis); +} + +//============================================================================= +// MirrorAxisCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis) +{ + MESSAGE("GEOM_Superv_i::MirrorAxisCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MirrorAxisCopy(theObject, theAxis); +} + +//============================================================================= +// MirrorPoint: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPoint (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint) +{ + MESSAGE("GEOM_Superv_i::MirrorPoint"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MirrorPoint(theObject, thePoint); +} + +//============================================================================= +// MirrorPointCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint) +{ + MESSAGE("GEOM_Superv_i::MirrorPointCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->MirrorPointCopy(theObject, thePoint); +} + +//============================================================================= +// OffsetShape: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShape (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset) +{ + MESSAGE("GEOM_Superv_i::OffsetShape"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->OffsetShape(theObject, theOffset); +} + +//============================================================================= +// OffsetShapeCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset) +{ + MESSAGE("GEOM_Superv_i::OffsetShapeCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->OffsetShapeCopy(theObject, theOffset); +} + +//============================================================================= +// ScaleShape: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShape (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor) +{ + MESSAGE("GEOM_Superv_i::ScaleShape"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->ScaleShape(theObject, thePoint, theFactor); +} + +//============================================================================= +// ScaleShapeCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor) +{ + MESSAGE("GEOM_Superv_i::ScaleShapeCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->ScaleShapeCopy(theObject, thePoint, theFactor); +} + +//============================================================================= +// PositionShape: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShape (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS) +{ + MESSAGE("GEOM_Superv_i::PositionShape"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->PositionShape(theObject, theStartLCS, theEndLCS); +} + +//============================================================================= +// PositionShapeCopy: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::PositionShapeCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS) +{ + MESSAGE("GEOM_Superv_i::PositionShapeCopy"); + if (CORBA::is_nil(myTransfOp)) getTransfOp(); + return myTransfOp->PositionShapeCopy(theObject, theStartLCS, theEndLCS); +} + +//=============================== ShapesOperations ============================ +//============================================================================= +// Make: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEdge (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2) +{ + MESSAGE("GEOM_Superv_i::MakeEdge"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeEdge(thePnt1, thePnt2); +} + +//============================================================================= +// MakeWire: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeWire (const GEOM::ListOfGO& theEdgesAndWires) +{ + MESSAGE("GEOM_Superv_i::MakeWire"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeWire(theEdgesAndWires); +} + +//============================================================================= +// MakeFace: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFace (GEOM::GEOM_Object_ptr theWire, + CORBA::Boolean isPlanarWanted) +{ + MESSAGE("GEOM_Superv_i::MakeFace"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeFace(theWire, isPlanarWanted); +} + +//============================================================================= +// MakeFaceWires: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFaceWires (const GEOM::ListOfGO& theWires, + CORBA::Boolean isPlanarWanted) +{ + MESSAGE("GEOM_Superv_i::MakeFaceWires"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeFaceWires(theWires, isPlanarWanted); +} + +//============================================================================= +// MakeShell: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeShell (const GEOM::ListOfGO& theFacesAndShells) +{ + MESSAGE("GEOM_Superv_i::MakeShell"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeShell(theFacesAndShells); +} + +//============================================================================= +// MakeSolidShell: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShell (GEOM::GEOM_Object_ptr theShell) +{ + MESSAGE("GEOM_Superv_i::MakeSolidShell"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeSolidShell(theShell); +} + +//============================================================================= +// MakeSolidShells: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSolidShells (const GEOM::ListOfGO& theShells) +{ + MESSAGE("GEOM_Superv_i::MakeSolidShells"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeSolidShells(theShells); +} + +//============================================================================= +// MakeCompound: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCompound (const GEOM::ListOfGO& theShapes) +{ + MESSAGE("GEOM_Superv_i::MakeCompound"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeCompound(theShapes); +} + +//============================================================================= +// MakeGlueFaces: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeGlueFaces (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theTolerance) +{ + MESSAGE("GEOM_Superv_i::MakeGlueFaces"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeGlueFaces(theShape, theTolerance); +} + +//============================================================================= +// MakeExplode: +//============================================================================= +GEOM::ListOfGO* GEOM_Superv_i::MakeExplode (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + const CORBA::Boolean isSorted) +{ + MESSAGE("GEOM_Superv_i::MakeExplode"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->MakeExplode(theShape, theShapeType, isSorted); +} + +//============================================================================= +// NumberOfFaces: +//============================================================================= +CORBA::Long GEOM_Superv_i::NumberOfFaces (GEOM::GEOM_Object_ptr theShape) +{ + MESSAGE("GEOM_Superv_i::NumberOfFaces"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->NumberOfFaces(theShape); +} + +//============================================================================= +// NumberOfEdges: +//============================================================================= +CORBA::Long GEOM_Superv_i::NumberOfEdges (GEOM::GEOM_Object_ptr theShape) +{ + MESSAGE("GEOM_Superv_i::NumberOfEdges"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->NumberOfEdges(theShape); +} + +//============================================================================= +// ChangeOrientation: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::ChangeOrientation (GEOM::GEOM_Object_ptr theShape) +{ + MESSAGE("GEOM_Superv_i::ChangeOrientation"); + if (CORBA::is_nil(myShapesOp)) getShapesOp(); + return myShapesOp->ChangeOrientation(theShape); +} + + +//=============================== BlocksOperations ============================ +//============================================================================= +// MakeQuad4Vertices: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, + GEOM::GEOM_Object_ptr thePnt4) +{ + MESSAGE("GEOM_Superv_i::MakeQuad4Vertices"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeQuad4Vertices(thePnt1, thePnt2, thePnt3, thePnt4); +} + +//============================================================================= +// MakeQuad: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad (GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2, + GEOM::GEOM_Object_ptr theEdge3, + GEOM::GEOM_Object_ptr theEdge4) +{ + MESSAGE("GEOM_Superv_i::MakeQuad"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeQuad(theEdge1, theEdge2, theEdge3, theEdge4); +} + +//============================================================================= +// MakeQuad2Edges: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2) +{ + MESSAGE("GEOM_Superv_i::MakeQuad2Edges"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeQuad2Edges(theEdge1, theEdge2); +} + +//============================================================================= +// MakeHexa: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa (GEOM::GEOM_Object_ptr theFace1, + GEOM::GEOM_Object_ptr theFace2, + GEOM::GEOM_Object_ptr theFace3, + GEOM::GEOM_Object_ptr theFace4, + GEOM::GEOM_Object_ptr theFace5, + GEOM::GEOM_Object_ptr theFace6) +{ + MESSAGE("GEOM_Superv_i::MakeHexa"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeHexa(theFace1, theFace2, theFace3, theFace4, theFace5, theFace6); +} + +//============================================================================= +// MakeHexa2Faces: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1, + GEOM::GEOM_Object_ptr theFace2) +{ + MESSAGE("GEOM_Superv_i::MakeHexa2Faces"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeHexa2Faces(theFace1, theFace2); +} + +//============================================================================= +// GetPoint: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetPoint (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theX, + const CORBA::Double theY, + const CORBA::Double theZ, + const CORBA::Double theEpsilon) +{ + MESSAGE("GEOM_Superv_i::GetPoint"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetPoint(theShape, theX, theY, theZ, theEpsilon); +} + +//============================================================================= +// GetEdge: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdge (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2) +{ + MESSAGE("GEOM_Superv_i::GetEdge"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetEdge(theShape, thePoint1, thePoint2); +} + +//============================================================================= +// GetEdgeNearPoint: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint) +{ + MESSAGE("GEOM_Superv_i::GetEdgeNearPoint"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetEdgeNearPoint(theShape, thePoint); +} + +//============================================================================= +// GetFaceByPoints: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByPoints (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2, + GEOM::GEOM_Object_ptr thePoint3, + GEOM::GEOM_Object_ptr thePoint4) +{ + MESSAGE("GEOM_Superv_i::GetFaceByPoints"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetFaceByPoints(theShape, thePoint1, thePoint2, thePoint3, thePoint4); +} + +//============================================================================= +// GetFaceByEdges: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByEdges (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2) +{ + MESSAGE("GEOM_Superv_i::GetFaceByEdges"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetFaceByEdges(theShape, theEdge1, theEdge2); +} + +//============================================================================= +// GetOppositeFace: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetOppositeFace (GEOM::GEOM_Object_ptr theBlock, + GEOM::GEOM_Object_ptr theFace) +{ + MESSAGE("GEOM_Superv_i::GetOppositeFace"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetOppositeFace(theBlock, theFace); +} + +//============================================================================= +// GetFaceNearPoint: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint) +{ + MESSAGE("GEOM_Superv_i::GetFaceNearPoint"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetFaceNearPoint(theShape, thePoint); +} + +//============================================================================= +// GetFaceByNormale: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock, + GEOM::GEOM_Object_ptr theVector) +{ + MESSAGE("GEOM_Superv_i::GetFaceByNormale"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetFaceByNormale(theBlock, theVector); +} + +//============================================================================= +// IsCompoundOfBlocks: +//============================================================================= +CORBA::Boolean GEOM_Superv_i::IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces, + CORBA::Long& theNbBlocks) +{ + MESSAGE("GEOM_Superv_i::IsCompoundOfBlocks"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->IsCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces, theNbBlocks); +} + +//============================================================================= +// CheckCompoundOfBlocks: +//============================================================================= +CORBA::Boolean GEOM_Superv_i::CheckCompoundOfBlocks +(GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors) +{ + MESSAGE("GEOM_Superv_i::CheckCompoundOfBlocks"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->CheckCompoundOfBlocks(theCompound, theErrors); +} + +//============================================================================= +// PrintBCErrors: +//============================================================================= +char* GEOM_Superv_i::PrintBCErrors (GEOM::GEOM_Object_ptr theCompound, + const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors) +{ + MESSAGE("GEOM_Superv_i::PrintBCErrors"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->PrintBCErrors(theCompound, theErrors); +} + +//============================================================================= +// ExplodeCompoundOfBlocks: +//============================================================================= +GEOM::ListOfGO* GEOM_Superv_i::ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces) +{ + MESSAGE("GEOM_Superv_i::ExplodeCompoundOfBlocks"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces); +} + +//============================================================================= +// GetBlockNearPoint: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_Object_ptr thePoint) +{ + MESSAGE("GEOM_Superv_i::GetBlockNearPoint"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetBlockNearPoint(theCompound, thePoint); +} + +//============================================================================= +// GetBlockByParts: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts) +{ + MESSAGE("GEOM_Superv_i::GetBlockByParts"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetBlockByParts(theCompound, theParts); +} + +//============================================================================= +// GetBlocksByParts: +//============================================================================= +GEOM::ListOfGO* GEOM_Superv_i::GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts) +{ + MESSAGE("GEOM_Superv_i::GetBlocksByParts"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->GetBlocksByParts(theCompound, theParts); +} + +//============================================================================= +// MakeMultiTransformation1D: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1, + const CORBA::Long theDirFace2, + const CORBA::Long theNbTimes) +{ + MESSAGE("GEOM_Superv_i::MakeMultiTransformation1D"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeMultiTransformation1D(theBlock, theDirFace1, theDirFace2, theNbTimes); +} + +//============================================================================= +// MakeMultiTransformation2D: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeMultiTransformation2D +(GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1U, + const CORBA::Long theDirFace2U, + const CORBA::Long theNbTimesU, + const CORBA::Long theDirFace1V, + const CORBA::Long theDirFace2V, + const CORBA::Long theNbTimesV) +{ + MESSAGE("GEOM_Superv_i::MakeMultiTransformation2D"); + if (CORBA::is_nil(myBlocksOp)) getBlocksOp(); + return myBlocksOp->MakeMultiTransformation2D(theBlock, + theDirFace1U, theDirFace2U, theNbTimesU, + theDirFace1V, theDirFace2V, theNbTimesV); +} + +//=============================== CurvesOperations ============================ +//============================================================================= +// MakeCirclePntVecR: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theR) +{ + MESSAGE("GEOM_Superv_i::MakeCirclePntVecR"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeCirclePntVecR(theCenter, theVector, theR); +} + +//============================================================================= +// MakeCircleThreePnt: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3) +{ + MESSAGE("GEOM_Superv_i::MakeCircleThreePnt"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeCircleThreePnt(thePnt1, thePnt2, thePnt3); +} + +//============================================================================= +// MakeEllipse: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeEllipse (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theRMajor, + CORBA::Double theRMinor) +{ + MESSAGE("GEOM_Superv_i::MakeEllipse"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeEllipse(theCenter, theVector, theRMajor, theRMinor); +} + +//============================================================================= +// MakeArc: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArc (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3) +{ + MESSAGE("GEOM_Superv_i::MakeArc"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeArc(thePnt1, thePnt2, thePnt3); +} + +//============================================================================= +// MakePolyline: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakePolyline (const GEOM::ListOfGO& thePoints) +{ + MESSAGE("GEOM_Superv_i::MakePolyline"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakePolyline(thePoints); +} + +//============================================================================= +// MakeSplineBezier: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineBezier (const GEOM::ListOfGO& thePoints) +{ + MESSAGE("GEOM_Superv_i::MakeSplineBezier"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeSplineBezier(thePoints); +} + +//============================================================================= +// MakeSplineInterpolation: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSplineInterpolation (const GEOM::ListOfGO& thePoints) +{ + MESSAGE("GEOM_Superv_i::MakeSplineInterpolation"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeSplineInterpolation(thePoints); +} + +//============================================================================= +// MakeSketcher: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeSketcher (const char* theCommand, + const GEOM::ListOfDouble& theWorkingPlane) +{ + MESSAGE("GEOM_Superv_i::MakeSketcher"); + if (CORBA::is_nil(myCurvesOp)) getCurvesOp(); + return myCurvesOp->MakeSketcher(theCommand, theWorkingPlane); +} + +//=============================== LocalOperations ============================= +//============================================================================= +// MakeFilletAll: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletAll (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theR) +{ + MESSAGE("GEOM_Superv_i::MakeFilletAllMakeSketcher"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeFilletAll(theShape, theR); +} + +//============================================================================= +// MakeFilletEdges: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theR, + const GEOM::ListOfLong& theEdges) +{ + MESSAGE("GEOM_Superv_i::MakeFilletEdges"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeFilletEdges(theShape, theR, theEdges); +} + +//============================================================================= +// MakeFilletFaces: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theR, + const GEOM::ListOfLong& theFaces) +{ + MESSAGE("GEOM_Superv_i::MakeFilletFaces"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeFilletFaces(theShape, theR, theFaces); +} + +//============================================================================= +// MakeChamferAll: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD) +{ + MESSAGE("GEOM_Superv_i::MakeChamferAll"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeChamferAll(theShape, theD); +} + +//============================================================================= +// MakeChamferEdge: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferEdge (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + CORBA::Long theFace1, CORBA::Long theFace2) +{ + MESSAGE("GEOM_Superv_i::MakeChamferEdge"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2); +} + +//============================================================================= +// MakeChamferFaces: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeChamferFaces (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + const GEOM::ListOfLong& theFaces) +{ + MESSAGE("GEOM_Superv_i::MakeChamferFaces"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeChamferFaces(theShape, theD1, theD2, theFaces); +} + +//============================================================================= +// MakeArchimede: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::MakeArchimede (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theWeight, + CORBA::Double theWaterDensity, + CORBA::Double theMeshingDeflection) +{ + MESSAGE("GEOM_Superv_i::MakeArchimede"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->MakeArchimede(theShape, theWeight, theWaterDensity, theMeshingDeflection); +} + +//============================================================================= +// GetSubShapeIndexMakeFilletAll: +//============================================================================= +CORBA::Long GEOM_Superv_i::GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theSubShape) +{ + MESSAGE("GEOM_Superv_i::GetSubShapeIndexMakeArchimede"); + if (CORBA::is_nil(myLocalOp)) getLocalOp(); + return myLocalOp->GetSubShapeIndex(theShape, theSubShape); +} + +//=============================== GroupOperations ============================= +//============================================================================= +// CreateGroup: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::CreateGroup (GEOM::GEOM_Object_ptr theMainShape, + CORBA::Long theShapeType) +{ + MESSAGE("GEOM_Superv_i::CreateGroup"); + if (CORBA::is_nil(myGroupOp)) getGroupOp(); + return myGroupOp->CreateGroup(theMainShape, theShapeType); +} + +//============================================================================= +// AddObject: +//============================================================================= +void GEOM_Superv_i::AddObject (GEOM::GEOM_Object_ptr theGroup, + CORBA::Long theSubShapeId) +{ + MESSAGE("GEOM_Superv_i::AddObject"); + if (CORBA::is_nil(myGroupOp)) getGroupOp(); + myGroupOp->AddObject(theGroup, theSubShapeId); +} + +//============================================================================= +// RemoveObject: +//============================================================================= +void GEOM_Superv_i::RemoveObject (GEOM::GEOM_Object_ptr theGroup, + CORBA::Long theSubShapeId) +{ + MESSAGE("GEOM_Superv_i::RemoveObject"); + if (CORBA::is_nil(myGroupOp)) getGroupOp(); + myGroupOp->RemoveObject(theGroup, theSubShapeId); +} + +//============================================================================= +// GetType: +//============================================================================= +CORBA::Long GEOM_Superv_i::GetType (GEOM::GEOM_Object_ptr theGroup) +{ + MESSAGE("GEOM_Superv_i::GetType"); + if (CORBA::is_nil(myGroupOp)) getGroupOp(); + return myGroupOp->GetType(theGroup); +} + +//============================================================================= +// GetMainShape: +//============================================================================= +GEOM::GEOM_Object_ptr GEOM_Superv_i::GetMainShape (GEOM::GEOM_Object_ptr theGroup) +{ + MESSAGE("GEOM_Superv_i::GetMainShape"); + if (CORBA::is_nil(myGroupOp)) getGroupOp(); + return myGroupOp->GetMainShape(theGroup); +} + +//============================================================================= +// GetObjects: +//============================================================================= +GEOM::ListOfLong* GEOM_Superv_i::GetObjects (GEOM::GEOM_Object_ptr theGroup) +{ + MESSAGE("GEOM_Superv_i::GetObjects"); + if (CORBA::is_nil(myGroupOp)) getGroupOp(); + return myGroupOp->GetObjects(theGroup); +} + +//===================================================================================== +// EXPORTED METHODS +//===================================================================================== +extern "C" +{ + PortableServer::ObjectId * GEOM_SupervEngine_factory(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char * interfaceName) + { + GEOM_Superv_i * myGEOM_Superv_i = new GEOM_Superv_i(orb, poa, contId, instanceName, interfaceName); + myGEOM_Superv_i->register_name("/myGEOM_Superv"); + return myGEOM_Superv_i->getId() ; + } +} diff --git a/src/GEOM_I_Superv/GEOM_Superv_i.hh b/src/GEOM_I_Superv/GEOM_Superv_i.hh new file mode 100644 index 000000000..67f780c10 --- /dev/null +++ b/src/GEOM_I_Superv/GEOM_Superv_i.hh @@ -0,0 +1,462 @@ +#ifndef __GEOM_SUPERV_I_H__ +#define __GEOM_SUPERV_I_H__ + +// IDL headers +#include +#include CORBA_SERVER_HEADER(GEOM_Superv) + +#include "GEOM_Gen_i.hh" + +#include "QAD_Study.h" +#include "QAD_Application.h" +#include "QAD_Desktop.h" + +class GEOM_Superv_i : public virtual POA_GEOM::GEOM_Superv, + public Engines_Component_i +{ +public: + GEOM_Superv_i(CORBA::ORB_ptr orb, + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName); + ~GEOM_Superv_i(); + + // generic method to be put in a super class + void register_name(char * name); + void setGeomEngine(); + + void getBasicOp(); + void get3DPrimOp(); + void getBoolOp(); + void getInsOp(); + void getTransfOp(); + void getShapesOp(); + void getBlocksOp(); + void getCurvesOp(); + void getLocalOp(); + void getGroupOp(); + + //-----------------------------------------------------------------------// + // Set current stydy ID // + //-----------------------------------------------------------------------// + void SetStudyID( CORBA::Long theId ); + + //-----------------------------------------------------------------------// + // Inherited methods from SALOMEDS::Driver // + //-----------------------------------------------------------------------// + + SALOMEDS::TMPFile* Save(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); + + SALOMEDS::TMPFile* SaveASCII(SALOMEDS::SComponent_ptr theComponent, + const char* theURL, + bool isMultiFile); + + CORBA::Boolean Load(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile); + + CORBA::Boolean LoadASCII(SALOMEDS::SComponent_ptr theComponent, + const SALOMEDS::TMPFile& theStream, + const char* theURL, + bool isMultiFile); + + void Close(SALOMEDS::SComponent_ptr theComponent); + char* ComponentDataType(); + + + char* IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject, + const char* IORString, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); + char* LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject, + const char* aLocalPersistentID, + CORBA::Boolean isMultiFile, + CORBA::Boolean isASCII); + + bool CanPublishInStudy(CORBA::Object_ptr theIOR); + SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject, + CORBA::Object_ptr theObject, + const char* theName) throw (SALOME::SALOME_Exception) ; + + CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject); + SALOMEDS::TMPFile* CopyFrom(SALOMEDS::SObject_ptr theObject, CORBA::Long& theObjectID); + CORBA::Boolean CanPaste(const char* theComponentName, CORBA::Long theObjectID); + SALOMEDS::SObject_ptr PasteInto(const SALOMEDS::TMPFile& theStream, + CORBA::Long theObjectID, + SALOMEDS::SObject_ptr theObject); + + //-----------------------------------------------------------// + // Primitives Construction : BasicOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakePointXYZ (CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ); + GEOM::GEOM_Object_ptr MakePointWithReference (GEOM::GEOM_Object_ptr theReference, + CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ); + GEOM::GEOM_Object_ptr MakePointOnCurve (GEOM::GEOM_Object_ptr theRefCurve, + CORBA::Double theParameter); + GEOM::GEOM_Object_ptr MakeVectorDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ); + GEOM::GEOM_Object_ptr MakeVectorTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + GEOM::GEOM_Object_ptr MakeLineTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + GEOM::GEOM_Object_ptr MakePlaneThreePnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, + CORBA::Double theTrimSize); + GEOM::GEOM_Object_ptr MakePlanePntVec (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theTrimSize); + GEOM::GEOM_Object_ptr MakePlaneFace (GEOM::GEOM_Object_ptr theFace, + CORBA::Double theTrimSize); + GEOM::GEOM_Object_ptr MakeMarker (CORBA::Double theOX , CORBA::Double theOY , CORBA::Double theOZ, + CORBA::Double theXDX, CORBA::Double theXDY, CORBA::Double theXDZ, + CORBA::Double theYDX, CORBA::Double theYDY, CORBA::Double theYDZ); + + //-----------------------------------------------------------// + // Primitives Construction : 3DPrimOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeBox (CORBA::Double theX1, + CORBA::Double theY1, + CORBA::Double theZ1, + CORBA::Double theX2, + CORBA::Double theY2, + CORBA::Double theZ2); + GEOM::GEOM_Object_ptr MakeBoxDXDYDZ (CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ); + GEOM::GEOM_Object_ptr MakeBoxTwoPnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + GEOM::GEOM_Object_ptr MakeCylinderPntVecRH (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theRadius, + CORBA::Double theHeight); + GEOM::GEOM_Object_ptr MakeCylinderRH (CORBA::Double theR, + CORBA::Double theH); + GEOM::GEOM_Object_ptr MakeSphere (CORBA::Double theX, + CORBA::Double theY, + CORBA::Double theZ, + CORBA::Double theRadius); + GEOM::GEOM_Object_ptr MakeSphereR (CORBA::Double theR); + GEOM::GEOM_Object_ptr MakeSpherePntR (GEOM::GEOM_Object_ptr thePnt, + CORBA::Double theR); + GEOM::GEOM_Object_ptr MakeTorusPntVecRR (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theRMajor, + CORBA::Double theRMinor); + GEOM::GEOM_Object_ptr MakeTorusRR (CORBA::Double theRMajor, + CORBA::Double theRMinor); + GEOM::GEOM_Object_ptr MakeConePntVecR1R2H (GEOM::GEOM_Object_ptr thePnt, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theHeight); + GEOM::GEOM_Object_ptr MakeConeR1R2H (CORBA::Double theR1, + CORBA::Double theR2, + CORBA::Double theHeight); + GEOM::GEOM_Object_ptr MakePrismVecH (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr theVec, + CORBA::Double theH); + GEOM::GEOM_Object_ptr MakePrismTwoPnt (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + GEOM::GEOM_Object_ptr MakePipe (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr thePath); + GEOM::GEOM_Object_ptr MakeRevolutionAxisAngle (GEOM::GEOM_Object_ptr theBase, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle); + GEOM::GEOM_Object_ptr MakeFilling (GEOM::GEOM_Object_ptr theShape, + CORBA::Long theMinDeg, CORBA::Long theMaxDeg, + CORBA::Double theTol2D, CORBA::Double theTol3D, + CORBA::Long theNbIter); + + //-----------------------------------------------------------// + // BooleanOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeBoolean (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2, + CORBA::Long theOperation); + GEOM::GEOM_Object_ptr MakeFuse (GEOM::GEOM_Object_ptr theShape1, + GEOM::GEOM_Object_ptr theShape2); + GEOM::GEOM_Object_ptr MakePartition (const GEOM::ListOfGO& theShapes, + const GEOM::ListOfGO& theTools, + const GEOM::ListOfGO& theKeepInside, + const GEOM::ListOfGO& theRemoveInside, + const CORBA::Short theLimit, + const CORBA::Boolean theRemoveWebs, + const GEOM::ListOfLong& theMaterials); + GEOM::GEOM_Object_ptr MakeHalfPartition (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePlane); + + //-----------------------------------------------------------// + // InsertOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeCopy (GEOM::GEOM_Object_ptr theOriginal); + void Export (GEOM::GEOM_Object_ptr theObject, + const char* theFileName, + const char* theFormatName); + GEOM::GEOM_Object_ptr Import (const char* theFileName, + const char* theFormatName); + void ImportTranslators (GEOM::string_array_out theFormats, + GEOM::string_array_out thePatterns); + void ExportTranslators (GEOM::string_array_out theFormats, + GEOM::string_array_out thePatterns); + + //-----------------------------------------------------------// + // TransformOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr TranslateTwoPoints (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + GEOM::GEOM_Object_ptr TranslateTwoPointsCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + GEOM::GEOM_Object_ptr TranslateDXDYDZ (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ); + GEOM::GEOM_Object_ptr TranslateDXDYDZCopy (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theDX, + CORBA::Double theDY, + CORBA::Double theDZ); + GEOM::GEOM_Object_ptr TranslateVector (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector); + GEOM::GEOM_Object_ptr TranslateVectorCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector); + GEOM::GEOM_Object_ptr MultiTranslate1D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theStep, + CORBA::Long theNbTimes); + GEOM::GEOM_Object_ptr MultiTranslate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theVector1, + CORBA::Double theStep1, + CORBA::Long theNbTimes1, + GEOM::GEOM_Object_ptr theVector2, + CORBA::Double theStep2, + CORBA::Long theNbTimes2); + GEOM::GEOM_Object_ptr Rotate (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle); + GEOM::GEOM_Object_ptr RotateCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle); + GEOM::GEOM_Object_ptr MultiRotate1D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Long theNbTimes); + GEOM::GEOM_Object_ptr MultiRotate2D (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis, + CORBA::Double theAngle, + CORBA::Long theNbTimes1, + CORBA::Double theStep, + CORBA::Long theNbTimes2); + GEOM::GEOM_Object_ptr MirrorPlane (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane); + GEOM::GEOM_Object_ptr MirrorPlaneCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePlane); + GEOM::GEOM_Object_ptr MirrorAxis (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis); + GEOM::GEOM_Object_ptr MirrorAxisCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theAxis); + GEOM::GEOM_Object_ptr MirrorPoint (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr MirrorPointCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr OffsetShape (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset); + GEOM::GEOM_Object_ptr OffsetShapeCopy (GEOM::GEOM_Object_ptr theObject, + CORBA::Double theOffset); + GEOM::GEOM_Object_ptr ScaleShape (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor); + GEOM::GEOM_Object_ptr ScaleShapeCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr thePoint, + CORBA::Double theFactor); + GEOM::GEOM_Object_ptr PositionShape (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS); + GEOM::GEOM_Object_ptr PositionShapeCopy (GEOM::GEOM_Object_ptr theObject, + GEOM::GEOM_Object_ptr theStartLCS, + GEOM::GEOM_Object_ptr theEndLCS); + + //-----------------------------------------------------------// + // ShapesOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeEdge (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2); + GEOM::GEOM_Object_ptr MakeWire (const GEOM::ListOfGO& theEdgesAndWires); + GEOM::GEOM_Object_ptr MakeFace (GEOM::GEOM_Object_ptr theWire, + CORBA::Boolean isPlanarWanted); + GEOM::GEOM_Object_ptr MakeFaceWires (const GEOM::ListOfGO& theWires, + CORBA::Boolean isPlanarWanted); + GEOM::GEOM_Object_ptr MakeShell (const GEOM::ListOfGO& theFacesAndShells); + GEOM::GEOM_Object_ptr MakeSolidShell (GEOM::GEOM_Object_ptr theShell); + GEOM::GEOM_Object_ptr MakeSolidShells (const GEOM::ListOfGO& theShells); + GEOM::GEOM_Object_ptr MakeCompound (const GEOM::ListOfGO& theShapes); + GEOM::GEOM_Object_ptr MakeGlueFaces (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theTolerance); + GEOM::ListOfGO* MakeExplode (GEOM::GEOM_Object_ptr theShape, + const CORBA::Long theShapeType, + const CORBA::Boolean isSorted); + CORBA::Long NumberOfFaces (GEOM::GEOM_Object_ptr theShape); + CORBA::Long NumberOfEdges (GEOM::GEOM_Object_ptr theShape); + GEOM::GEOM_Object_ptr ChangeOrientation (GEOM::GEOM_Object_ptr theShape); + + //-----------------------------------------------------------// + // BlocksOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3, + GEOM::GEOM_Object_ptr thePnt4); + GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2, + GEOM::GEOM_Object_ptr theEdge3, + GEOM::GEOM_Object_ptr theEdge4); + GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2); + GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1, + GEOM::GEOM_Object_ptr theFace2, + GEOM::GEOM_Object_ptr theFace3, + GEOM::GEOM_Object_ptr theFace4, + GEOM::GEOM_Object_ptr theFace5, + GEOM::GEOM_Object_ptr theFace6); + GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1, + GEOM::GEOM_Object_ptr theFace2); + GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape, + const CORBA::Double theX, + const CORBA::Double theY, + const CORBA::Double theZ, + const CORBA::Double theEpsilon); + GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2); + GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint1, + GEOM::GEOM_Object_ptr thePoint2, + GEOM::GEOM_Object_ptr thePoint3, + GEOM::GEOM_Object_ptr thePoint4); + GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theEdge1, + GEOM::GEOM_Object_ptr theEdge2); + GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock, + GEOM::GEOM_Object_ptr theFace); + GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock, + GEOM::GEOM_Object_ptr theVector); + CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces, + CORBA::Long& theNbBlocks); + CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors); + char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound, + const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors); + GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound, + const CORBA::Long theMinNbFaces, + const CORBA::Long theMaxNbFaces); + GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound, + GEOM::GEOM_Object_ptr thePoint); + GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts); + GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound, + const GEOM::ListOfGO& theParts); + GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1, + const CORBA::Long theDirFace2, + const CORBA::Long theNbTimes); + GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock, + const CORBA::Long theDirFace1U, + const CORBA::Long theDirFace2U, + const CORBA::Long theNbTimesU, + const CORBA::Long theDirFace1V, + const CORBA::Long theDirFace2V, + const CORBA::Long theNbTimesV); + + //-----------------------------------------------------------// + // CurvesOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeCirclePntVecR (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theR); + GEOM::GEOM_Object_ptr MakeCircleThreePnt (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3); + GEOM::GEOM_Object_ptr MakeEllipse (GEOM::GEOM_Object_ptr theCenter, + GEOM::GEOM_Object_ptr theVector, + CORBA::Double theRMajor, CORBA::Double theRMinor); + GEOM::GEOM_Object_ptr MakeArc (GEOM::GEOM_Object_ptr thePnt1, + GEOM::GEOM_Object_ptr thePnt2, + GEOM::GEOM_Object_ptr thePnt3); + GEOM::GEOM_Object_ptr MakePolyline (const GEOM::ListOfGO& thePoints); + GEOM::GEOM_Object_ptr MakeSplineBezier (const GEOM::ListOfGO& thePoints); + GEOM::GEOM_Object_ptr MakeSplineInterpolation (const GEOM::ListOfGO& thePoints); + GEOM::GEOM_Object_ptr MakeSketcher (const char* theCommand, + const GEOM::ListOfDouble& theWorkingPlane); + + //-----------------------------------------------------------// + // LocalOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr MakeFilletAll (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theR); + GEOM::GEOM_Object_ptr MakeFilletEdges (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, + const GEOM::ListOfLong& theEdges); + GEOM::GEOM_Object_ptr MakeFilletFaces (GEOM::GEOM_Object_ptr theShape, CORBA::Double theR, + const GEOM::ListOfLong& theFaces); + GEOM::GEOM_Object_ptr MakeChamferAll (GEOM::GEOM_Object_ptr theShape, CORBA::Double theD); + GEOM::GEOM_Object_ptr MakeChamferEdge (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + CORBA::Long theFace1, CORBA::Long theFace2); + GEOM::GEOM_Object_ptr MakeChamferFaces (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theD1, CORBA::Double theD2, + const GEOM::ListOfLong& theFaces); + GEOM::GEOM_Object_ptr MakeArchimede (GEOM::GEOM_Object_ptr theShape, + CORBA::Double theWeight, + CORBA::Double theWaterDensity, + CORBA::Double theMeshingDeflection); + CORBA::Long GetSubShapeIndex (GEOM::GEOM_Object_ptr theShape, + GEOM::GEOM_Object_ptr theSubShape); + + //-----------------------------------------------------------// + // GroupOperations // + //-----------------------------------------------------------// + GEOM::GEOM_Object_ptr CreateGroup (GEOM::GEOM_Object_ptr theMainShape, + CORBA::Long theShapeType); + void AddObject (GEOM::GEOM_Object_ptr theGroup, + CORBA::Long theSubShapeId); + void RemoveObject (GEOM::GEOM_Object_ptr theGroup, + CORBA::Long theSubShapeId); + CORBA::Long GetType (GEOM::GEOM_Object_ptr theGroup); + GEOM::GEOM_Object_ptr GetMainShape (GEOM::GEOM_Object_ptr theGroup); + GEOM::ListOfLong* GetObjects (GEOM::GEOM_Object_ptr theGroup); + +private: + SALOME_NamingService * name_service; + GEOM::GEOM_Gen_ptr myGeomEngine; + CORBA::Long myStudyID; + + GEOM::GEOM_IBasicOperations_ptr myBasicOp; + GEOM::GEOM_I3DPrimOperations_ptr my3DPrimOp; + GEOM::GEOM_IBooleanOperations_ptr myBoolOp; + GEOM::GEOM_IInsertOperations_ptr myInsOp; + GEOM::GEOM_ITransformOperations_ptr myTransfOp; + GEOM::GEOM_IShapesOperations_ptr myShapesOp; + GEOM::GEOM_IBlocksOperations_ptr myBlocksOp; + GEOM::GEOM_ICurvesOperations_ptr myCurvesOp; + GEOM::GEOM_ILocalOperations_ptr myLocalOp; + GEOM::GEOM_IGroupOperations_ptr myGroupOp; + +}; + +#endif diff --git a/src/GEOMDS/Makefile.in b/src/GEOM_I_Superv/Makefile.in similarity index 64% rename from src/GEOMDS/Makefile.in rename to src/GEOM_I_Superv/Makefile.in index b58244fd1..14c03b7bf 100644 --- a/src/GEOMDS/Makefile.in +++ b/src/GEOM_I_Superv/Makefile.in @@ -1,4 +1,4 @@ -# GEOM GEOMDS : implementation of Geometry component data structure and Geometry documents management +# GEOM GEOM : implementaion of GEOM_Superv.idl # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -31,39 +31,29 @@ top_builddir=../.. srcdir=@srcdir@ VPATH=.:@srcdir@:@top_srcdir@/idl - @COMMENCE@ # Libraries targets -LIB = libGEOMDS.la -LIB_SRC = GEOMDS_Application.cxx \ - GEOMDS_Commands.cxx \ - GEOMDS_Explorer.cxx \ - GEOMDS_DataMapIteratorOfDataMapOfIntegerTransient_0.cxx \ - GEOMDS_DataMapNodeOfDataMapOfIntegerTransient_0.cxx \ - GEOMDS_DataMapOfIntegerTransient_0.cxx -LIB_CLIENT_IDL = -LIB_SERVER_IDL = +LIB = libGEOM_SupervEngine.la +LIB_SRC = \ + GEOM_Superv_i.cc + +LIB_SERVER_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Exception.idl \ + SALOME_GenericObj.idl SALOME_ModuleCatalog.idl GEOM_Gen.idl GEOM_Superv.idl \ # Executables targets -BIN = -BIN_SRC = +BIN = +BIN_SRC = BIN_CLIENT_IDL = -BIN_SERVER_IDL = +BIN_SERVER_IDL = -# header files -EXPORT_HEADERS= GEOMDS_Application.hxx \ - GEOMDS_DataMapOfIntegerTransient.hxx \ - Handle_GEOMDS_DataMapNodeOfDataMapOfIntegerTransient.hxx \ - Handle_GEOMDS_Application.hxx \ - GEOMDS_Commands.hxx \ - GEOMDS_Explorer.hxx +EXPORT_HEADERS = # additionnal information to compil and link file -CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CPPFLAGS += $(OCC_INCLUDES) $(QT_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome $(BOOST_CPPFLAGS) CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += $(CAS_LDPATH) -lTKCAF +LDFLAGS += -lGEOMEngine -lSalomeNS -lSalomeContainer -L${KERNEL_ROOT_DIR}/lib/salome -lSalomeGenericObj # additional file to be cleaned MOSTLYCLEAN = diff --git a/src/GEOM_SWIG/GEOM_Partition1.py b/src/GEOM_SWIG/GEOM_Partition1.py index 4eea3ff99..3a6118833 100755 --- a/src/GEOM_SWIG/GEOM_Partition1.py +++ b/src/GEOM_SWIG/GEOM_Partition1.py @@ -8,7 +8,7 @@ # Module : GEOM #%Make geometry (like CEA script (A1)) using Partition algorithm% -# appel: +# appel: # import alveole_3D_01_GEOM # reload(alveole_3D_01_GEOM) @@ -38,61 +38,49 @@ boolean_section = 4 # -- +pnt0 = geompy.MakeVertex(0.,0.,0.) +vecz = geompy.MakeVectorDXDYDZ(0.,0.,1.) + barier = geompy.MakeCylinder( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,0.,1.)), + pnt0, + vecz, barier_radius, barier_height) # -- -colis = geompy.MakeCylinder( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,0.,1.)), - colis_radius, - barier_height) +colis = geompy.MakeCylinder(pnt0, vecz, colis_radius, barier_height) -cc = geompy.MakeCylinder( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,0.,1.)), - cc_radius, - barier_height) +cc = geompy.MakeCylinder(pnt0, vecz, cc_radius, barier_height) -colis_cc = geompy.MakeCompound( - [colis._get_Name(), cc._get_Name()]) +colis_cc = geompy.MakeCompound([colis, cc]) -colis_cc = geompy.MakeTranslation( - colis_cc, colis_center, 0.0, 0.0) +colis_cc = geompy.MakeTranslation(colis_cc, colis_center, 0.0, 0.0) -colis_cc_multi = geompy.MakeMultiRotation1D( - colis_cc, - geom.MakeDirection(geom.MakePointStruct(0.,0.,1.)), - geom.MakePointStruct(0.,0.,0.), - 4) +colis_cc_multi = geompy.MultiRotate1D(colis_cc, vecz, 4) # -- -alveole = geompy.Partition( - [colis_cc_multi._get_Name(), barier._get_Name()]) +alveole = geompy.MakePartition([colis_cc_multi, barier]) -subshapes = geompy.SubShapeAll( alveole, geompy.ShapeType["SHAPE"] ) +geompy.addToStudy(alveole, "alveole before explode") -## there are 9 subshapes +subshapes = geompy.SubShapeAll(alveole, geompy.ShapeType["SHAPE"]) -comp1 = geompy.MakeCompound( [ subshapes[0]._get_Name(), subshapes[1]._get_Name() ] ); -comp2 = geompy.MakeCompound( [ subshapes[2]._get_Name(), subshapes[3]._get_Name() ] ); -comp3 = geompy.MakeCompound( [ subshapes[4]._get_Name(), subshapes[5]._get_Name() ] ); -comp4 = geompy.MakeCompound( [ subshapes[6]._get_Name(), subshapes[7]._get_Name() ] ); +## there are 9 subshapes -compIORs = [] -compIORs.append( comp1._get_Name() ); -compIORs.append( comp2._get_Name() ); -compIORs.append( comp3._get_Name() ); -compIORs.append( comp4._get_Name() ); -comp = geompy.MakeCompound( compIORs ); +comp1 = geompy.MakeCompound([subshapes[0], subshapes[1]]); +comp2 = geompy.MakeCompound([subshapes[2], subshapes[3]]); +comp3 = geompy.MakeCompound([subshapes[4], subshapes[5]]); +comp4 = geompy.MakeCompound([subshapes[6], subshapes[7]]); -alveole = geompy.MakeCompound( [ comp._get_Name(), subshapes[8]._get_Name() ]); - -geompy.addToStudy(alveole, "alveole") +compGOs = [] +compGOs.append(comp1); +compGOs.append(comp2); +compGOs.append(comp3); +compGOs.append(comp4); +comp = geompy.MakeCompound(compGOs); +alveole = geompy.MakeCompound([comp, subshapes[8]]); +geompy.addToStudy(alveole, "alveole") diff --git a/src/GEOM_SWIG/GEOM_Partition2.py b/src/GEOM_SWIG/GEOM_Partition2.py index db8ce8ec6..2a4ca4e73 100755 --- a/src/GEOM_SWIG/GEOM_Partition2.py +++ b/src/GEOM_SWIG/GEOM_Partition2.py @@ -19,6 +19,9 @@ import geompy geom = geompy.geom +vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.) +vecy = geompy.MakeVectorDXDYDZ(0.,1.,0.) + # -- colis colis_xmin = 05.76 @@ -26,8 +29,8 @@ colis_xmax = 19.83 colis_radius = 0.3 colis = geompy.MakeCylinder( - geom.MakePointStruct(colis_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(colis_xmin,0.,0.), + vecx, colis_radius, colis_xmax-colis_xmin) @@ -38,8 +41,8 @@ bo_xmax = colis_xmax bo_radius = 1.23 bo = geompy.MakeCylinder( - geom.MakePointStruct(bo_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(bo_xmin,0.,0.), + vecx, bo_radius, bo_xmax-bo_xmin) @@ -51,8 +54,8 @@ alvRup_xmax = colis_xmax alvRup_radius = 1.6 alvRup = geompy.MakeCylinder( - geom.MakePointStruct(alvRup_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(alvRup_xmin,0.,0.), + vecx, alvRup_radius, alvRup_xmax-alvRup_xmin) @@ -64,8 +67,8 @@ bouchon_xmax = 22.83 bouchon_radius = alvRup_radius bouchon = geompy.MakeCylinder( - geom.MakePointStruct(bouchon_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(bouchon_xmin,0.,0.), + vecx, bouchon_radius, bouchon_xmax-bouchon_xmin) @@ -75,9 +78,11 @@ galerie_xmax = 25.0 galerie_radius = 3.0 box_y = 30.0 +pnt_galerie_xmax = geompy.MakeVertex(galerie_xmax,0.,0.) + galerie = geompy.MakeCylinder( - geom.MakePointStruct(galerie_xmax,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,1.,0.)), + pnt_galerie_xmax, + vecy, galerie_radius, box_y) galerie = geompy.MakeTranslation(galerie, 0, -box_y/2, 0) @@ -94,8 +99,8 @@ galRup_xmax = galerie_xmax galRup_radius = 3.9 galRup = geompy.MakeCylinder( - geom.MakePointStruct(galerie_xmax,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,1.,0.)), + pnt_galerie_xmax, + vecy, galRup_radius, box_y) galRup = geompy.MakeTranslation(galRup, 0, -box_y/2, 0) @@ -105,11 +110,7 @@ galRup = geompy.MakeTranslation(galRup, 0, -box_y/2, 0) galEnd_xmax = galerie_xmax galEnd_radius = 4.6 -galEnd = geompy.MakeCylinder( - geom.MakePointStruct(galerie_xmax,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,1.,0.)), - galEnd_radius, - box_y) +galEnd = geompy.MakeCylinder(pnt_galerie_xmax, vecy, galEnd_radius, box_y) galEnd = geompy.MakeTranslation(galEnd, 0, -box_y/2, 0) # -- endommagement alveole @@ -119,30 +120,26 @@ alvEnd_xmax = galerie_xmax alvEnd_radius = 2.46 alvEnd = geompy.MakeCylinder( - geom.MakePointStruct(alvEnd_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(alvEnd_xmin,0.,0.), + vecx, alvEnd_radius, alvEnd_xmax-alvEnd_xmin) # remove internal parts of galEnd intersecting alvEnd -galEnd_alvEnd = geompy.Partition( - [ alvEnd._get_Name() ] , [], [], [ galEnd._get_Name() ] ) +galEnd_alvEnd = geompy.MakePartition([alvEnd], [], [], [galEnd]) -iorL = [ colis._get_Name() ] -iorL += [ bo._get_Name() ] -iorL += [ alvRup._get_Name() ] -#iorL += [ galerie._get_Name() ] -iorL += [ galRup._get_Name() ] -iorL += [ galEnd_alvEnd._get_Name() ] +GOList = [colis] +GOList += [bo] +GOList += [alvRup] +#GOList += [galerie ] +GOList += [galRup] +GOList += [galEnd_alvEnd] # -- # remove section parts outside bo and inside bouchon -callovo = geompy.Partition( - iorL, [], [ box._get_Name() ], [galerie._get_Name(), bouchon._get_Name()] ) - - +callovo = geompy.MakePartition(GOList, [], [box], [galerie, bouchon]) geompy.addToStudy(callovo, "callovo perp. 2") diff --git a/src/GEOM_SWIG/GEOM_Partition3.py b/src/GEOM_SWIG/GEOM_Partition3.py index d325f848e..9f35f08b8 100755 --- a/src/GEOM_SWIG/GEOM_Partition3.py +++ b/src/GEOM_SWIG/GEOM_Partition3.py @@ -15,6 +15,8 @@ import geompy geom = geompy.geom +vecx = geompy.MakeVectorDXDYDZ(1.,0.,0.) + # -- colis colis_xmin = 05.76 @@ -22,12 +24,12 @@ colis_xmax = 19.83 colis_radius = 0.3 colis = geompy.MakeCylinder( - geom.MakePointStruct(colis_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(colis_xmin,0.,0.), + vecx, colis_radius, colis_xmax-colis_xmin) -iorL = [colis._get_Name()] +GOList = [colis] # -- bo @@ -36,12 +38,12 @@ bo_xmax = colis_xmax bo_radius = 1.23 bo = geompy.MakeCylinder( - geom.MakePointStruct(bo_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(bo_xmin,0.,0.), + vecx, bo_radius, bo_xmax-bo_xmin) -iorL.append(bo._get_Name()) +GOList.append(bo) # -- rupture alveole @@ -50,12 +52,12 @@ alvRup_xmax = colis_xmax alvRup_radius = 1.6 alvRup = geompy.MakeCylinder( - geom.MakePointStruct(alvRup_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(alvRup_xmin,0.,0.), + vecx, alvRup_radius, alvRup_xmax-alvRup_xmin) -iorL.append(alvRup._get_Name()) +GOList.append(alvRup) # bouchon @@ -64,12 +66,12 @@ bouchon_xmax = 22.83 bouchon_radius = alvRup_radius bouchon = geompy.MakeCylinder( - geom.MakePointStruct(bouchon_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(bouchon_xmin,0.,0.), + vecx, bouchon_radius, bouchon_xmax-bouchon_xmin) -#iorL.append(bouchon._get_Name()) +#GOList.append(bouchon) # -- endommagement alveole @@ -78,12 +80,12 @@ alvEnd_xmax = 20.66 alvEnd_radius = 2.46 alvEnd = geompy.MakeCylinder( - geom.MakePointStruct(alvEnd_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(alvEnd_xmin,0.,0.), + vecx, alvEnd_radius, alvEnd_xmax-alvEnd_xmin) -iorL.append(alvEnd._get_Name()) +GOList.append(alvEnd) # galerie @@ -92,12 +94,12 @@ galerie_xmax = 25.0 galerie_radius = 2.17 galerie = geompy.MakeCylinder( - geom.MakePointStruct(galerie_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(galerie_xmin,0.,0.), + vecx, galerie_radius, galerie_xmax-galerie_xmin) -iorL.append(galerie._get_Name()) +GOList.append(galerie) # -- rupture galerie @@ -106,12 +108,12 @@ galRup_xmax = galerie_xmax galRup_radius = 2.82 galRup = geompy.MakeCylinder( - geom.MakePointStruct(galRup_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(galRup_xmin,0.,0.), + vecx, galRup_radius, galRup_xmax-galRup_xmin) -iorL.append(galRup._get_Name()) +GOList.append(galRup) # -- endom. galerie @@ -120,12 +122,12 @@ galEnd_xmax = galerie_xmax galEnd_radius = 4.34 galEnd = geompy.MakeCylinder( - geom.MakePointStruct(galEnd_xmin,0.,0.), - geom.MakeDirection(geom.MakePointStruct(1.,0.,0.)), + geompy.MakeVertex(galEnd_xmin,0.,0.), + vecx, galEnd_radius, galEnd_xmax-galEnd_xmin) -iorL.append(galEnd._get_Name()) +GOList.append(galEnd) # -- @@ -133,9 +135,9 @@ box_y = 30.0 box = geompy.MakeBox(0., 0., 0., galerie_xmax, box_y, box_y) box = geompy.MakeTranslation(box, 0.0, -box_y/2, -box_y/2) -iorL.append(box._get_Name()) +GOList.append(box) # -- -callovo = geompy.Partition(iorL,[],[], [bouchon._get_Name()]) +callovo = geompy.MakePartition(GOList, [], [], [bouchon]) geompy.addToStudy(callovo, "callovo 2") diff --git a/src/GEOM_SWIG/GEOM_Partition4.py b/src/GEOM_SWIG/GEOM_Partition4.py index 17c7632c9..96dd0d4f8 100755 --- a/src/GEOM_SWIG/GEOM_Partition4.py +++ b/src/GEOM_SWIG/GEOM_Partition4.py @@ -39,49 +39,45 @@ geom = geompy.geom # -- Construction de backfill -backA = geompy.MakeBox(0.0,0.0,0.0,baDx,baDy,baDz) -back = geompy.MakeTranslation(backA,-baDx/2,-baDy/2,-baDz/2) +backA = geompy.MakeBox(0.0, 0.0, 0.0, baDx, baDy, baDz) +back = geompy.MakeTranslation(backA, -baDx/2, -baDy/2, -baDz/2) # -- Construction de alveolus import math -alveA = geompy.MakeBox(0.0,0.0,0.0,alDx,alDy,alDz) -alveB = geompy.MakeTranslation(alveA,-alDx/2,baDy/2,-alDz/2) -axis = geompy.geom.MakeAxisStruct(0.0,0.0,0.0,1.0,0.0,0.0) -alve1 = geompy.MakeRotation(alveB,axis,math.pi) -alve2 = geompy.MakeTranslation(alveB,+alSepx/2,0.0,0.0) -alve3 = geompy.MakeTranslation(alveB,-alSepx/2,0.0,0.0) -IORlist = [] -IORlist.append(alve1._get_Name()) -IORlist.append(alve2._get_Name()) -IORlist.append(alve3._get_Name()) -alve = geompy.MakeCompound(IORlist) +alveA = geompy.MakeBox(0.0, 0.0, 0.0, alDx, alDy, alDz) +alveB = geompy.MakeTranslation(alveA, -alDx/2, baDy/2, -alDz/2) +axis = geompy.MakeVectorDXDYDZ(1.0, 0.0, 0.0) +alve1 = geompy.MakeRotation(alveB, axis, math.pi) +alve2 = geompy.MakeTranslation(alveB, +alSepx/2, 0.0, 0.0) +alve3 = geompy.MakeTranslation(alveB, -alSepx/2, 0.0, 0.0) +GOlist = [] +GOlist.append(alve1) +GOlist.append(alve2) +GOlist.append(alve3) +alve = geompy.MakeCompound(GOlist) # -- Construction de geological medium -geolA = geompy.MakeBox(0.0,0.0,0.0,gmDx,gmDy,gmDz) -geol = geompy.MakeTranslation(geolA,-gmDx/2,-gmDy/2,-gmDz/2) +geolA = geompy.MakeBox(0.0, 0.0, 0.0, gmDx, gmDy, gmDz) +geol = geompy.MakeTranslation(geolA, -gmDx/2, -gmDy/2, -gmDz/2) -geol = geompy.Partition( - [alve._get_Name(), geol._get_Name(), back._get_Name()]) +geol = geompy.MakePartition([alve, geol, back]) -subshapes = geompy.SubShapeAll( geol, geompy.ShapeType["SHAPE"] ) +subshapes = geompy.SubShapeAll(geol, geompy.ShapeType["SHAPE"]) -IORlist = [] -IORlist.append(subshapes[0]._get_Name()) -IORlist.append(subshapes[1]._get_Name()) -IORlist.append(subshapes[2]._get_Name()) -alve = geompy.MakeCompound(IORlist) +GOlist = [] +GOlist.append(subshapes[0]) +GOlist.append(subshapes[1]) +GOlist.append(subshapes[2]) +alve = geompy.MakeCompound(GOlist) geol = subshapes[3] back = subshapes[4] # -- -geol = geompy.MakeCompound( - [geol._get_Name(), back._get_Name(), alve._get_Name()]) - -geompy.addToStudy(geol,"couplex2 2") - +geol = geompy.MakeCompound([geol, back, alve]) +geompy.addToStudy(geol, "couplex2 2") diff --git a/src/GEOM_SWIG/GEOM_Partition5.py b/src/GEOM_SWIG/GEOM_Partition5.py index cbc1c5c5f..ca6d5de81 100755 --- a/src/GEOM_SWIG/GEOM_Partition5.py +++ b/src/GEOM_SWIG/GEOM_Partition5.py @@ -19,29 +19,26 @@ geom = geompy.geom # -- Dimensions de la boite entiˆre LX, LY, LZ = 300.0, 150.0, 150.0 +p0 = geompy.MakeVertex(0.,0.,0.) +vy = geompy.MakeVectorDXDYDZ(0.,1.,0.) # -- D‰finition du plan de sym‰trie (O,Ox,Oz) -symPlane = geompy.MakePlane ( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,1.,0.)), - 10.0 ) +symPlane = geompy.MakePlane(p0, vy, 10.0) # -- bo -bo = geompy.MakeBox(0.0,0.0,0.0,LX,LY,LZ) -bo = geompy.MakeTranslation(bo,0.0,-LY/2,-LZ/2) +bo = geompy.MakeBoxDXDYDZ(LX, LY, LZ) +bo = geompy.MakeTranslation(bo, 0.0, -LY/2, -LZ/2) # -- Galerie principale gal_diam = 80.0 gal_lony = LY gal_x = LX-20.0-gal_diam/2 -gal = geompy.MakeCylinder( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,1.,0.)), - gal_diam/2,gal_lony) -gal = geompy.MakeTranslation(gal,gal_x,-gal_lony/2,0.0) + +gal = geompy.MakeCylinder(p0, vy, gal_diam/2, gal_lony) +gal = geompy.MakeTranslation(gal, gal_x, -gal_lony/2, 0.0) # -- Galerie perpendiculaire # -- Dimensions de la galerie perpendiculaire @@ -51,53 +48,46 @@ gal = geompy.MakeTranslation(gal,gal_x,-gal_lony/2,0.0) gpe_long, gpe_diam = 200.0, 60.0 gpe_x = gal_x gpe = geompy.MakeCylinder( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(-1.,0.,0.)), + p0, + geompy.MakeVectorDXDYDZ(-1.,0.,0.), gpe_diam/2,gpe_long) -gpe = geompy.MakeTranslation(gpe,gpe_x,0,0) +gpe = geompy.MakeTranslation(gpe, gpe_x, 0, 0) # -- Dimensions d'une alveole # -- Construction d'une alv‰ole alv_long, alv_diam = 60.0, 18.0 -alv01 = geompy.MakeCylinder( - geom.MakePointStruct(0.,0.,0.), - geom.MakeDirection(geom.MakePointStruct(0.,1.,0.)), - alv_diam/2,alv_long) -alv02 = geompy.MakeMirrorByPlane(alv01,symPlane) -alv0 = geompy.MakeCompound( [ alv01._get_Name(), alv02._get_Name() ] ) +alv01 = geompy.MakeCylinder(p0, vy, alv_diam/2, alv_long) +alv02 = geompy.MakeMirrorByPlane(alv01, symPlane) +alv0 = geompy.MakeCompound([alv01, alv02]) # -- Construction des alv‰oles alv_del, alv_sep = 40.0, 35.0 -alv1 = geompy.MakeTranslation ( - alv0,gal_x-gal_diam/2-alv_sep,0.0,0.0 ) -alv2 = geompy.MakeTranslation ( - alv1,-alv_del,0.0,0.0 ) -alv3 = geompy.MakeTranslation ( - alv2,-alv_del,0.0,0.0 ) -alv = geompy.MakeCompound( [ alv1._get_Name(), alv2._get_Name(), alv3._get_Name() ] ) +alv1 = geompy.MakeTranslation(alv0, gal_x-gal_diam/2-alv_sep, 0.0, 0.0) +alv2 = geompy.MakeTranslation(alv1, -alv_del, 0.0, 0.0 ) +alv3 = geompy.MakeTranslation(alv2, -alv_del, 0.0, 0.0 ) +alv = geompy.MakeCompound([alv1, alv2, alv3]) # -- Remplissage de la BO -gallery = geompy.Partition( - [ alv._get_Name(), bo._get_Name() ], [], [], [ gal._get_Name(), gpe._get_Name() ]) +gallery = geompy.MakePartition([alv, bo], [], [], [gal, gpe]) -subshapes = geompy.SubShapeAll( gallery, geompy.ShapeType["SHAPE"] ) +subshapes = geompy.SubShapeAll(gallery, geompy.ShapeType["SHAPE"]) -alvIORs = [] -alvIORs.append( subshapes[0]._get_Name() ) -alvIORs.append( subshapes[1]._get_Name() ) -alvIORs.append( subshapes[2]._get_Name() ) -alvIORs.append( subshapes[3]._get_Name() ) -alvIORs.append( subshapes[4]._get_Name() ) -alvIORs.append( subshapes[5]._get_Name() ) -alvcomp = geompy.MakeCompound( alvIORs ) +alvGOs = [] +alvGOs.append(subshapes[0]) +alvGOs.append(subshapes[1]) +alvGOs.append(subshapes[2]) +alvGOs.append(subshapes[3]) +alvGOs.append(subshapes[4]) +alvGOs.append(subshapes[5]) +alvcomp = geompy.MakeCompound(alvGOs) -boIOR = subshapes[6]._get_Name() -galIOR = subshapes[7]._get_Name() -gpeIOR = subshapes[8]._get_Name() +boGO = subshapes[6] +galGO = subshapes[7] +gpeGO = subshapes[8] -gallery = geompy.MakeCompound( [ boIOR, alvcomp._get_Name(), gpeIOR, galIOR ] ) +gallery = geompy.MakeCompound([boGO, alvcomp, gpeGO, galGO]) geompy.addToStudy(gallery,"Gallery 2") diff --git a/src/GEOM_SWIG/GEOM_Spanner.py b/src/GEOM_SWIG/GEOM_Spanner.py new file mode 100644 index 000000000..fd08520ac --- /dev/null +++ b/src/GEOM_SWIG/GEOM_Spanner.py @@ -0,0 +1,533 @@ +# GEOM GEOM_SWIG : binding of C++ implementaion with Python +# +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : GEOM_Spanner.py +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +def GetFaceNearPoint (geompy, block, pnt): + anObj = geompy.BlocksOp.GetFaceNearPoint(block, pnt) + if anObj is None: + print "GetFaceNearPoint : ", geompy.BlocksOp.GetErrorCode() + return anObj + +def GetOppositeFace (geompy, block, face): + anObj = geompy.BlocksOp.GetOppositeFace(block, face) + if anObj is None: + print "GetOppositeFace : ", geompy.BlocksOp.GetErrorCode() + return anObj + +def GetFaceByNormale (geompy, block, vec): + anObj = geompy.BlocksOp.GetFaceByNormale(block, vec) + if anObj is None: + print "GetFaceByNormale : ", geompy.BlocksOp.GetErrorCode() + return anObj + +def GetBlockNearPoint (geompy, comp, pnt): + anObj = geompy.BlocksOp.GetBlockNearPoint(comp, pnt) + if anObj is None: + print "GetBlockNearPoint : ", geompy.BlocksOp.GetErrorCode() + return anObj + +############# MakeSpanner ############# + +def MakeSpanner (salome, geompy, math, isBlocksTest = 0, isMeshTest = 0, smesh = None, hasGUI = 0): + + ### Variables ### + + th = 4.0 + + ### BlocksOp ### + + BlocksOp = geompy.BlocksOp + + ### Basic points and directions ### + + p0 = geompy.MakeVertex(0., 0., 0.) + pth = geompy.MakeVertex(0., 0., th) + + vx = geompy.MakeVectorDXDYDZ(1., 0., 0.) + vy = geompy.MakeVectorDXDYDZ(0., 1., 0.) + vz = geompy.MakeVectorDXDYDZ(0., 0., 1.) + + vxy = geompy.MakeVectorDXDYDZ(1., 1., 0.) + + ### Block 1 ### + + p_10_0 = geompy.MakeVertex(10., 0., 0.) + p_10_25 = geompy.MakeVertex(10., 25., 0.) + p_0_35 = geompy.MakeVertex( 0., 35., 0.) + p_0_10 = geompy.MakeVertex( 0., 10., 0.) + + Face11 = geompy.MakeQuad4Vertices(p_10_0, p_10_25, p_0_10, p_0_35); + id_face11 = geompy.addToStudy(Face11, "1 Face for Block 1") + + Face12 = geompy.MakeTranslationTwoPoints(Face11, p0, pth) + id_face12 = geompy.addToStudy(Face12, "2 Face for Block 1") + + Block1 = geompy.MakeHexa2Faces(Face11, Face12) + id_block1 = geompy.addToStudy(Block1, "Block 1") + + ### Block 2 ### + + p_15_0 = geompy.MakeVertex(15., 0., 0.) + p_15_20 = geompy.MakeVertex(15., 20., 0.) + + Edge21 = geompy.MakeEdge(p_15_0, p_15_20) + id_edge21 = geompy.addToStudy(Edge21, "1 Edge for Block 2") + + Edge22 = BlocksOp.GetEdge(Block1, p_10_0, p_10_25) + if Edge22 is None: + print "BlocksOp.GetEdge(Block1, p_10_0, p_10_25) : ", BlocksOp.GetErrorCode() + id_edge22 = geompy.addToStudy(Edge22, "2 Edge for Block 2") + + Face21 = geompy.MakeQuad2Edges(Edge21, Edge22); + id_face21 = geompy.addToStudy(Face21, "1 Face for Block 2") + + Face22 = geompy.MakeTranslationTwoPoints(Face21, p0, pth) + id_face22 = geompy.addToStudy(Face22, "2 Face for Block 2") + + Block2 = geompy.MakeHexa2Faces(Face21, Face22) + id_block2 = geompy.addToStudy(Block2, "Block 2") + + ### Block 3 ### + + p_15_10_1 = geompy.MakeVertex(15., 10., 1.) + + Face31 = GetFaceNearPoint(geompy, Block2, p_15_10_1) + id_face31 = geompy.addToStudy(Face31, "1 Face for Block 3") + + Prism1 = geompy.MakePrismVecH(Face31, vx, 5); + id_prism1 = geompy.addToStudy(Prism1, "Prism to be Block 3") + + nbFaces = geompy.ShapesOp.NumberOfFaces(Prism1) + if nbFaces == 6: + print "Prism 1 is a hexahedral solid" + else: + print "Prism 1 is not a hexahedral solid" + + Prism1_faces = geompy.SubShapeAllSorted(Prism1, geompy.ShapeType["FACE"]) + ii = 1 + for aFace in Prism1_faces: + name = geompy.SubShapeName(aFace, Prism1) + Id_Face = geompy.addToStudyInFather(Prism1, aFace, name) + ii = ii + 1 + + Block3 = geompy.MakeHexa(Prism1_faces[0], Prism1_faces[1], + Prism1_faces[2], Prism1_faces[3], + Prism1_faces[4], Prism1_faces[5]); + id_block3 = geompy.addToStudy(Block3, "Block 3") + + ### Block 4 ### + + Face41 = GetOppositeFace(geompy, Block3, Face31) + id_face41 = geompy.addToStudy(Face41, "1 Face for Block 4") + + p_25_5 = geompy.MakeVertex(25., 5., 0.) + p_25_20 = geompy.MakeVertex(25., 20., 0.) + + Edge41 = geompy.MakeEdge(p_25_5, p_25_20) + id_edge41 = geompy.addToStudy(Edge41, "1 Edge for Block 4") + + p_25_5_2 = geompy.MakeVertex(25., 5., th) + p_25_20_2 = geompy.MakeVertex(25., 20., th) + + Edge42 = geompy.MakeEdge(p_25_5_2, p_25_20_2) + id_edge42 = geompy.addToStudy(Edge42, "2 Edge for Block 4") + + Edge43 = geompy.MakeEdge(p_25_5, p_25_5_2) + id_edge43 = geompy.addToStudy(Edge43, "3 Edge for Block 4") + + Edge44 = geompy.MakeEdge(p_25_20, p_25_20_2) + id_edge44 = geompy.addToStudy(Edge44, "4 Edge for Block 4") + + Face42 = geompy.MakeQuad(Edge41, Edge42, Edge43, Edge44) + id_face42 = geompy.addToStudy(Face42, "2 Face for Block 4") + + Block4 = geompy.MakeHexa2Faces(Face41, Face42) + id_block4 = geompy.addToStudy(Block4, "Block 4") + + ### Block 5 ### + + p_25_30 = geompy.MakeVertex(25., 30., 0.) + p_25_30_1 = geompy.MakeVertex(25., 30., 1) + axis_rot = geompy.MakeVector(p_25_30, p_25_30_1) + + Face51 = Face42 + Face52 = geompy.MakeRotation(Face51, axis_rot, math.pi/2.) + id_face52 = geompy.addToStudy(Face52, "2 Face for Block 5") + + Block5 = geompy.MakeHexa2Faces(Face51, Face52) + id_block5 = geompy.addToStudy(Block5, "Block 5") + + ### Compound of blocks 1 - 4 ### + + Comp1234 = geompy.MakeCompound([Block1, Block2, Block3, Block4]) + Glue1234 = geompy.MakeGlueFaces(Comp1234, 1e-5) + id_glue1234 = geompy.addToStudy(Glue1234, "Glue 1234") + + plane_mirror = geompy.MakePlane(p_25_30, vxy, 100.) + #id_plane_mirror = geompy.addToStudy(plane_mirror, "Plane for mirror") + + Mirror1 = geompy.MakeMirrorByPlane(Glue1234, plane_mirror) + id_mirror1 = geompy.addToStudy(Mirror1, "Mirror 1") + + ### The second end ### + + p_18_0 = geompy.MakeVertex(18., 0., 0.) + p_20_0 = geompy.MakeVertex(20., 0., 0.) + p_40_0 = geompy.MakeVertex(40., 0., 0.) + + Edge1s = geompy.MakeEdge(p_20_0, p_40_0) + id_edge1s = geompy.addToStudy(Edge1s, "1 Edge for Block 1s") + + Edge2s = geompy.MakeRotation(Edge1s, vz, math.pi/12.) + id_edge2s = geompy.addToStudy(Edge2s, "2 Edge for Block 1s") + + p_18_0_r = geompy.MakeRotation(p_18_0, vz, math.pi/24.) + p_20_0_r = geompy.MakeRotation(p_20_0, vz, math.pi/12.) + p_40_0_r = geompy.MakeRotation(p_40_0, vz, math.pi/12.) + + Edge3s = geompy.MakeEdge(p_40_0, p_40_0_r) + id_edge3s = geompy.addToStudy(Edge3s, "3 Edge for Block 1s") + + Edge4s = geompy.MakeArc(p_20_0, p_18_0_r, p_20_0_r) + id_edge4s = geompy.addToStudy(Edge4s, "4 Edge for Block 1s") + + Face1s = geompy.MakeQuad(Edge1s, Edge2s, Edge3s, Edge4s) + id_face1s = geompy.addToStudy(Face1s, "1 Face for Block 1s") + + Block1s = geompy.MakePrismVecH(Face1s, vz, th); + id_block1s = geompy.addToStudy(Block1s, "Block 1s") + + p_30_0_1 = geompy.MakeVertex(30., 0., 1.) + + Face2s = GetFaceNearPoint(geompy, Block1s, p_30_0_1) + id_face2s = geompy.addToStudy(Face2s, "2 Face of Block 1s") + + f2s_ind = geompy.LocalOp.GetSubShapeIndex(Block1s, Face2s) + + Block1s_tr1 = geompy.MakeMultiTransformation1D(Block1s, f2s_ind, 0, 24) + id_block1s_tr1 = geompy.addToStudy(Block1s_tr1, "Multi-transformed Block 1s") + + p_60_150_0 = geompy.MakeVertex(60., -150., 0.) + Gear = geompy.MakeTranslationTwoPoints(Block1s_tr1, p0, p_60_150_0) + id_gear = geompy.addToStudy(Gear, "Gear") + + ### Link two parts ### + + ### Linking Block 1 ### + + p_55_0_1 = geompy.MakeVertex(55., 0., 1.) + p_55_110_1 = geompy.MakeVertex(55., -110., 1.) + + Face11l = GetFaceNearPoint(geompy, Block5, p_55_0_1) + id_face11l = geompy.addToStudy(Face11l, "1 Face for Linking Block 1") + + Face12l = GetFaceNearPoint(geompy, Gear, p_55_110_1) + id_face12l = geompy.addToStudy(Face12l, "2 Face for Linking Block 1") + + Block1l = geompy.MakeHexa2Faces(Face11l, Face12l) + id_block1l = geompy.addToStudy(Block1l, "Linking Block 1") + + ### Linking Block 2 ### + + p_25_0_1 = geompy.MakeVertex(25., 0., 1.) + p_45_110_1 = geompy.MakeVertex(45., -110., 1.) + + Face21l = GetFaceNearPoint(geompy, Block4, p_25_0_1) + id_face21l = geompy.addToStudy(Face21l, "1 Face for Linking Block 2") + + Face22l = GetFaceNearPoint(geompy, Gear, p_45_110_1) + id_face22l = geompy.addToStudy(Face22l, "2 Face for Linking Block 2") + + Block2l = geompy.MakeHexa2Faces(Face21l, Face22l) + id_block2l = geompy.addToStudy(Block2l, "Linking Block 2") + + ### Linking Block 3 ### + + p_55_30_1 = geompy.MakeVertex(55., 30., 1.) + p_65_110_1 = geompy.MakeVertex(65., -110., 1.) + + Face31l = GetFaceNearPoint(geompy, Mirror1, p_55_30_1) + id_face31l = geompy.addToStudy(Face31l, "1 Face for Linking Block 3") + + Face32l = GetFaceNearPoint(geompy, Gear, p_65_110_1) + id_face32l = geompy.addToStudy(Face32l, "2 Face for Linking Block 3") + + Block3l = geompy.MakeHexa2Faces(Face31l, Face32l) + id_block3l = geompy.addToStudy(Block3l, "Linking Block 3") + + ### Handle ### + + CompLB = geompy.MakeCompound([Block1l, Block2l, Block3l]) + Handle = geompy.MakeGlueFaces(CompLB, 1e-5) + id_handle = geompy.addToStudy(Handle, "Handle") + + Block1h = GetBlockNearPoint(geompy, Handle, p_45_110_1) + id_block1h = geompy.addToStudyInFather(Handle, Block1h, "Block 1 of Handle") + + Block2h = GetBlockNearPoint(geompy, Handle, p_65_110_1) + id_block2h = geompy.addToStudyInFather(Handle, Block2h, "Block 2 of Handle") + + Face11h = GetFaceByNormale(geompy, Block1h, vx) + id_face11h = geompy.addToStudyInFather(Block1h, Face11h, "Face 1") + + Face12h = GetOppositeFace(geompy, Block1h, Face11h) + id_face12h = geompy.addToStudyInFather(Block1h, Face12h, "Face 2") + + Face21h = GetFaceByNormale(geompy, Block2h, vx) + id_face21h = geompy.addToStudyInFather(Block2h, Face21h, "Face 1") + + Face22h = GetOppositeFace(geompy, Block2h, Face21h) + id_face22h = geompy.addToStudyInFather(Block2h, Face22h, "Face 2") + + Block3h = BlocksOp.GetBlockByParts(Handle, [Face11h, Face21h]) + if BlocksOp.IsDone() == 0: + Block3h = BlocksOp.GetBlockByParts(Handle, [Face11h, Face22h]) + if BlocksOp.IsDone() == 0: + Block3h = BlocksOp.GetBlockByParts(Handle, [Face12h, Face21h]) + if BlocksOp.IsDone() == 0: + Block3h = BlocksOp.GetBlockByParts(Handle, [Face12h, Face22h]) + if BlocksOp.IsDone() == 0: + print "ERROR: BlocksOp.GetBlockByParts() failed : ", BlocksOp.GetErrorCode() + else: + id_block3h = geompy.addToStudyInFather(Handle, Block3h, "Block 3 of Handle") + + ### The whole shape ### + + CompALL = geompy.MakeCompound([Glue1234, Block5, Mirror1, Handle, Gear]) + Spanner = geompy.MakeGlueFaces(CompALL, 1e-5) + id_glueALL = geompy.addToStudy(Spanner, "The Spanner") + + ### Check the Spanner ### + + isCompOfBlocks6 = BlocksOp.IsCompoundOfBlocks(Spanner, 6, 6) + if isCompOfBlocks6 == 0: + print "Spanner is not a compound of hexahedral solids" + else: + print "Spanner is a compound of hexahedral solids" + + if isBlocksTest == 1: + + print "##################### Test More #####################" + + ### Get Blocks 4 and 5 from the spanner ### + + Face42_sp = BlocksOp.GetFaceByEdges(Spanner, Edge41, Edge42) + if Face42_sp is None: + print "BlocksOp.GetFaceByEdges(Spanner, Edge41, Edge42) : ", BlocksOp.GetErrorCode() + id_face42_sp = geompy.addToStudyInFather(Spanner, Face42_sp, "Face 4_2") + + Blocks_f4_sp = BlocksOp.GetBlocksByParts(Spanner, [Face42_sp]) + if Blocks_f4_sp is None: + print "BlocksOp.GetBlocksByParts() : ", BlocksOp.GetErrorCode() + + for aBlock in Blocks_f4_sp: + name = geompy.SubShapeName(aBlock, Spanner) + Id_block = geompy.addToStudyInFather(Spanner, aBlock, name) + + f42_sp_ind = geompy.LocalOp.GetSubShapeIndex(aBlock, Face42_sp) + + Face_5_horiz = GetFaceByNormale(geompy, aBlock, vz) + f_5_horiz_ind = geompy.LocalOp.GetSubShapeIndex(aBlock, Face_5_horiz) + + MRot = geompy.MakeMultiTransformation2D(aBlock, f42_sp_ind, 0, 3, f_5_horiz_ind, 0, 5) + if MRot is not None: + p_z100 = geompy.MakeVertex(0., 0., 100.) + MRot_tr = geompy.MakeTranslationTwoPoints(MRot, p0, p_z100) + id_MRot_tr = geompy.addToStudy(MRot_tr, "Multi-rotated block 5") + + if BlocksOp.IsDone() == 0: + print "Operation failed" + + ### Get one face of the Gear ### + + p_20_0_tr = geompy.MakeTranslationTwoPoints(p_20_0 , p0, p_60_150_0) + p_20_0_r_tr = geompy.MakeTranslationTwoPoints(p_20_0_r, p0, p_60_150_0) + p_40_0_tr = geompy.MakeTranslationTwoPoints(p_40_0 , p0, p_60_150_0) + p_40_0_r_tr = geompy.MakeTranslationTwoPoints(p_40_0_r, p0, p_60_150_0) + + Face_g_1 = BlocksOp.GetFaceByPoints(Gear, p_20_0_tr, p_20_0_r_tr, p_40_0_tr, p_40_0_r_tr) + if Face_g_1 is None: + print "BlocksOp.GetFaceByPoints(Gear, ...) : ", BlocksOp.GetErrorCode() + id_face_g_1 = geompy.addToStudyInFather(Gear, Face_g_1, "Face of Gear by four points") + + edgesNb = geompy.ShapesOp.NumberOfEdges(Face_g_1) + print "Face of Gear has ", edgesNb, " edges" + + Face_g_1_tr = geompy.MakeTranslationTwoPoints(Face_g_1, p0, pth) + id_face_g_1_tr = geompy.addToStudyInFather(Gear, Face_g_1_tr, "Face of Gear by four points, translated") + + ### equivalent of Block1s, but made as block + + Block_new = geompy.MakeHexa2Faces(Face_g_1, Face_g_1_tr) + id_block_new = geompy.addToStudy(Block_new, "Block New") + + if isMeshTest == 1: + + print "##################### Build Mesh #####################" + + import StdMeshers + + # ---- add a middle block of spanner handle in study + + p_45_0_1 = geompy.MakeVertex(45., 0., 1.) + BlockMh = GetBlockNearPoint(geompy, Spanner, p_45_0_1) + id_blockMh = geompy.addToStudyInFather(Spanner, BlockMh, "Middle Block of Spanner Handle") + + # ---- add the top face of the middle block in study + + FaceTop = GetFaceByNormale(geompy, BlockMh, vz) + id_facetop = geompy.addToStudyInFather(BlockMh, FaceTop, "Top Face") + + # ---- add long edges of the top face in study + + FaceTop_edges = geompy.SubShapeAllSorted(FaceTop, geompy.ShapeType["EDGE"]) + Edge1 = FaceTop_edges[0] + Edge2 = FaceTop_edges[3] + Id_Edge1 = geompy.addToStudyInFather(FaceTop, Edge1, "Edge 1") + Id_Edge2 = geompy.addToStudyInFather(FaceTop, Edge2, "Edge 2") + + # ---- launch SMESH + + 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() + + 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"); + + print "-------------------------- Regular_1D" + + algoReg = smesh.CreateHypothesis("Regular_1D", "libStdMeshersEngine.so") + listHyp = algoReg.GetCompatibleHypothesis() + for hyp in listHyp: + print hyp + print algoReg.GetName() + print algoReg.GetId() + + if hasGUI == 1: + idreg = salome.ObjectToID(algoReg) + smeshgui.SetName(idreg, "Regular_1D"); + + print "-------------------------- Quadrangle_2D" + + algoQuad = smesh.CreateHypothesis("Quadrangle_2D", "libStdMeshersEngine.so") + 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) + + print "-------------------------- add hypothesis to the Middle Block" + + submesh_bl = mesh.GetSubMesh(BlockMh, "SubMesh Middle Block") + mesh.AddHypothesis(BlockMh, hypLen1) + + 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) + + print "-------------------------- compute the mesh" + smesh.Compute(mesh, Spanner) + + print "Information about the Mesh:" + print "Number of nodes : ", mesh.NbNodes() + print "Number of edges : ", mesh.NbEdges() + print "Number of faces : ", mesh.NbFaces() + print "Number of triangles : ", mesh.NbTriangles() + print "Number of quadrangles : ", mesh.NbQuadrangles() + print "Number of volumes : ", mesh.NbVolumes() + print "Number of tetrahedrons: ", mesh.NbTetras() + + return Spanner diff --git a/src/GEOM_SWIG/GEOM_TestAll.py b/src/GEOM_SWIG/GEOM_TestAll.py new file mode 100644 index 000000000..4d24d8009 --- /dev/null +++ b/src/GEOM_SWIG/GEOM_TestAll.py @@ -0,0 +1,327 @@ +# GEOM GEOM_SWIG : binding of C++ omplementaion with Python +# +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# File : GEOM_usinggeom.py +# Author : Damien COQUERET, Open CASCADE +# Module : GEOM +# $Header$ + +def TestAll (geompy, math): + + #Create base Variables + nbtimes1 = 5 #Short + nbtimes2 = 5 + mindeg = 2 + maxdeg = 5 + nbiter = 5 + ShapeTypeFace = geompy.ShapeType["FACE"] + ShapeTypeEdge = geompy.ShapeType["EDGE"] + WantPlanarFace = 1 #True + + radius = 10. #Double + radius1 = 100. + radius2 = 200. + height = 200. + d1 = 10. + d2 = 10. + step1 = 250. + step2 = 250. + angle = 45. + angle1 = angle * math.pi / 180 + angle2 = 2 * angle1 + factor = 2. + tol3d = 0.0001 + tol2d = 0.0001 + weight = 1000000. + waterdensity = 1. + meshingdeflection = 0.01 + trimsize = 1000. + precision = 0.00001 + + #Create base points + p0 = geompy.MakeVertex(0. , 0. , 0. ) #(3 Doubles)->GEOM_Object_ptr + px = geompy.MakeVertex(100., 0. , 0. ) + py = geompy.MakeVertex(0. , 100., 0. ) + pz = geompy.MakeVertex(0. , 0. , 100.) + pxyz = geompy.MakeVertex(100., 100., 100.) + + p200 = geompy.MakeVertexWithRef(pxyz, 100., 100., 100.) #(GEOM_Object_ptr, 3 Doubles)->GEOM_Object_ptr + + #Create base directions + vx = geompy.MakeVector(p0, px) #(GEOM_Object_ptr, GEOM_Object_ptr)->GEOM_Object_ptr + vy = geompy.MakeVector(p0, py) + vz = geompy.MakeVector(p0, pz) + vxy = geompy.MakeVector(px, py) + + vxyz = geompy.MakeVectorDXDYDZ(100., 100., 100.) #(3 Doubles)->GEOM_Object_ptr + + #Create local coordinate systems + cs1 = geompy.MakeMarker(50,50,50, 1,0,0, 0,1,0) + cs2 = geompy.MakeMarker(70,80,10, 1,0,1, 1,1,0) + + #Create base geometry 2D + Line = geompy.MakeLineTwoPnt(p0, pxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Line1 = geompy.MakeLine(pz, vxy) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Plane = geompy.MakePlane(pz, vxyz, trimsize) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + Plane1 = geompy.MakePlaneThreePnt(px, pz, p200, trimsize) #(4 Doubles)->GEOM_Object_ptr + + Arc = geompy.MakeArc(py, pz, px) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Circle = geompy.MakeCircle(p0, vz, radius1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + Circle1 = geompy.MakeCircleThreePnt(p0, pxyz, px) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Ellipse = geompy.MakeEllipse(p0, vy, radius2, radius1) #(2 GEOM_Object_ptr, 2 Doubles)->GEOM_Object_ptr + Polyline = geompy.MakePolyline([p0, pz, py, p200]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + Bezier = geompy.MakeBezier([p0, pz, p200, px]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + Interpol = geompy.MakeInterpol([px, py, p200, pxyz]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + Sketcher = geompy.MakeSketcher("Sketcher:F -100 -100:TT 250 -100:R 0:C 100 150:R 0:L 300:WW", + [100,0,0, 1,1,1, -1,1,0]) #(String, List of Doubles)->GEOM_Object_ptr + + #Test point on curve creation + p_on_arc = geompy.MakeVertexOnCurve(Arc, 0.25) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + + #Create base geometry 3D + Box = geompy.MakeBoxTwoPnt(p0, p200) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Box1 = geompy.MakeBoxDXDYDZ(10, 20, 30) #(3 Doubles)->GEOM_Object_ptr + Box2 = geompy.MakeBox(10,20,30, 15,25,35) #(6 Doubles)->GEOM_Object_ptr + Cylinder = geompy.MakeCylinder(p0, vz, radius1, height) #(2 GEOM_Object_ptr, 2 Doubles)->GEOM_Object_ptr + Cyl1 = geompy.MakeCylinderRH(radius2, height) #(2 Doubles)->GEOM_Object_ptr + Sphere = geompy.MakeSpherePntR(p0, radius1) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + Sphere1 = geompy.MakeSphereR(radius) #(Double)->GEOM_Object_ptr + Sphere2 = geompy.MakeSphere(50, 70, 30, radius) #(4 Doubles)->GEOM_Object_ptr + Cone = geompy.MakeCone(p0, vz, radius2, radius, height) #(2 GEOM_Object_ptr, 3 Doubles)->GEOM_Object_ptr + Cone1 = geompy.MakeConeR1R2H(radius1, radius, height) #(3 Doubles)->GEOM_Object_ptr + Torus = geompy.MakeTorus(p0, vz, radius2, radius) #(2 GEOM_Object_ptr, 2 Doubles)->GEOM_Object_ptr + Torus1 = geompy.MakeTorusRR(radius2, radius1) #(2 Doubles)->GEOM_Object_ptr + + #Boolean (Common, Cut, Fuse, Section) + Common = geompy.MakeBoolean(Box, Sphere, 1) #(2 GEOM_Object_ptr, Short)->GEOM_Object_ptr + Cut = geompy.MakeBoolean(Box, Sphere, 2) + Fuse = geompy.MakeBoolean(Box, Sphere, 3) + Section = geompy.MakeBoolean(Box, Sphere, 4) + + #Create base objects + Edge = geompy.MakeEdge(p0, pxyz) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Wire = geompy.MakeWire([vxy, Arc]) #(List Of GEOM_Object_ptr)->GEOM_Object_ptr + Face = geompy.MakeFace(Wire, WantPlanarFace) #(GEOM_Object_ptr, Boolean)->GEOM_Object_ptr + Face1 = geompy.MakeFaceWires([Wire, Sketcher], + WantPlanarFace) #(List of GEOM_Object_ptr, Boolean)->GEOM_Object_ptr + Face2 = geompy.MakeFace(Sketcher, WantPlanarFace) + Shell = geompy.MakeShell([Face, Face1]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + + Prism1 = geompy.MakePrism(Face2, p0, pxyz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + prism1_faces = geompy.SubShapeAllSorted(Prism1, ShapeTypeFace) + Shell1 = geompy.MakeShell([prism1_faces[0], prism1_faces[1], + prism1_faces[3], prism1_faces[4], + prism1_faces[5], prism1_faces[2]]) + Solid = geompy.MakeSolid([Shell1]) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + + ShapeListCompound = [] + i = 0 + while i <= 3 : + S = geompy.MakeTranslation(Arc, i * 100., i * 100., i * 100.) + ShapeListCompound.append(S) + i = i + 1 + Compound = geompy.MakeCompound(ShapeListCompound) #(List of GEOM_Object_ptr)->GEOM_Object_ptr + + # Test plane from existing face creation + Plane2 = geompy.MakePlaneFace(Face, trimsize) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + + #ShapeList for Sewing + S = geompy.MakeRotation(Face, vxy, angle1) + + #Create advanced objects + Copy = geompy.MakeCopy(Box) #(GEOM_Object_ptr)->GEOM_Object_ptr + Prism = geompy.MakePrismVecH(Face, vz, 100.0) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + Revolution = geompy.MakeRevolution(Face, vz, angle2) # + Filling = geompy.MakeFilling(Compound, mindeg, maxdeg, + tol2d, tol3d, nbiter) #(GEOM_Object_ptr, 4 Doubles, Short)->GEOM_Object_ptr + Pipe = geompy.MakePipe(Wire, Edge) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Sewing = geompy.MakeSewing([Face, S], precision) #(List Of GEOM_Object_ptr, Double)->GEOM_Object_ptr + + #Transform objects + Translation = geompy.MakeTranslationTwoPoints(Box, px, pz) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Rotation = geompy.MakeRotation(Box, vz, angle1) #(2 GEOM_Object_ptr, Double)->GEOM_Object_ptr + Scale = geompy.MakeScaleTransform(Box, p0, factor) # + Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(2 GEOM_Object_ptr)->GEOM_Object_ptr + Position = geompy.MakePosition(Box, cs1, cs2) #(3 GEOM_Object_ptr)->GEOM_Object_ptr + Offset = geompy.MakeOffset(Box, 10.) #(GEOM_Object_ptr, Double)->GEOM_Object_ptr + Orientation = geompy.ChangeOrientation(Box) + + #IDList for Fillet/Chamfer + prism_edges = geompy.SubShapeAllSorted(Prism, ShapeTypeEdge) + + for anEdge in prism_edges: + eid = geompy.GetSubShapeID(Prism, anEdge) + sse = geompy.GetSubShape(Prism, [eid]) + + sse_id = geompy.GetSubShapeID(Prism, sse) + if sse_id != eid: + print "Error: GetSubShape() or GetSubShapeID() has failed!" + + IDlist_e = [] + IDlist_e.append(geompy.GetSubShapeID(Prism, prism_edges[0])) + IDlist_e.append(geompy.GetSubShapeID(Prism, prism_edges[1])) + IDlist_e.append(geompy.GetSubShapeID(Prism, prism_edges[2])) + + prism_faces = geompy.SubShapeAllSorted(Prism, ShapeTypeFace) + + f_ind_1 = geompy.GetSubShapeID(Prism, prism_faces[0]) + f_ind_2 = geompy.GetSubShapeID(Prism, prism_faces[1]) + + IDlist_f = [f_ind_1, f_ind_2] + + #Local operations + Fillet = geompy.MakeFillet (Prism, radius, ShapeTypeEdge, + IDlist_e) #(GEOM_Object_ptr, Double, Short, ListOfLong)->GEOM_Object_ptr + Chamfer = geompy.MakeChamferEdge(Prism, d1, d2, + f_ind_1, f_ind_2) #(GEOM_Object_ptr, 2 Doubles, 2 Long)->GEOM_Object_ptr + Chamfer2 = geompy.MakeChamferFaces(Prism, d1, d2, + IDlist_f) #(GEOM_Object_ptr, 2 Doubles, ListOfLong)->GEOM_Object_ptr + + #Create Patterns + MultiTrans1D = geompy.MakeMultiTranslation1D(Fillet, vz, step1, nbtimes1) + MultiTrans2D = geompy.MakeMultiTranslation2D(Fillet, vz, step1, nbtimes1, vy, step2, nbtimes2) + #!!!!Angle In Degree!!!! + MultiRot1D = geompy.MultiRotate1D(Chamfer, vx, nbtimes1) + MultiRot2D = geompy.MultiRotate2D(Chamfer, vx, angle, nbtimes1, step1, nbtimes2) + + #Create Informations objects + CDG = geompy.MakeCDG(Prism) #(GEOM_Object_ptr)->GEOM_Object_ptr + Archimede = geompy.Archimede(Box, weight, waterdensity, + meshingdeflection) #(GEOM_Object_ptr, 3 Doubles)->GEOM_Object_ptr + CheckShape = geompy.CheckShape(Prism) #(GEOM_Object_ptr)->Boolean + print "CheckShape(Prism) = ", CheckShape + + #Partition objects + Partition = geompy.MakePartition([Box], [Plane]) #(2 Lists Of GEOM_Object_ptr)->GEOM_Object_ptr + + #Add In Study + + id_p0 = geompy.addToStudy(p0, "Vertex 0") + id_px = geompy.addToStudy(px, "Vertex X") + id_py = geompy.addToStudy(py, "Vertex Y") + id_pz = geompy.addToStudy(pz, "Vertex Z") + id_pxyz = geompy.addToStudy(pxyz, "Vertex XYZ") + id_p200 = geompy.addToStudy(p200, "Vertex 200") + + id_vx = geompy.addToStudy(vx, "Vector X") + id_vy = geompy.addToStudy(vy, "Vector Y") + id_vz = geompy.addToStudy(vz, "Vector Z") + id_vxy = geompy.addToStudy(vxy, "Vector XY") + id_vxyz = geompy.addToStudy(vxyz, "Vector XYZ") + + id_cs1 = geompy.addToStudy(cs1, "CS 50,50,50, 1,0,0, 0,1,0") + id_cs2 = geompy.addToStudy(cs2, "CS 70,80,10, 1,0,1, 1,1,0") + + id_Line = geompy.addToStudy(Line, "Line") + id_Line1 = geompy.addToStudy(Line1, "Line by point and vector") + id_Plane = geompy.addToStudy(Plane, "Plane") + id_Plane1 = geompy.addToStudy(Plane1, "Plane by 3 points") + + id_Arc = geompy.addToStudy(Arc, "Arc") + id_Circle = geompy.addToStudy(Circle, "Circle") + id_Circle1 = geompy.addToStudy(Circle1, "Circle by 3 points") + id_Ellipse = geompy.addToStudy(Ellipse, "Ellipse") + id_Polyline = geompy.addToStudy(Polyline, "Polyline") + id_Bezier = geompy.addToStudy(Bezier, "Bezier") + id_Interpol = geompy.addToStudy(Interpol, "Interpol") + id_Sketcher = geompy.addToStudy(Sketcher, "Sketcher") + + id_p_on_arc = geompy.addToStudy(p_on_arc, "Vertex on Arc") + + id_Box = geompy.addToStudy(Box, "Box") + id_Box1 = geompy.addToStudy(Box1, "Box 10x20x30") + id_Box2 = geompy.addToStudy(Box2, "Box (10,20,30)-(15,25,35)") + id_Cylinder = geompy.addToStudy(Cylinder, "Cylinder") + id_Cyl1 = geompy.addToStudy(Cyl1, "Cylinder RH") + id_Sphere = geompy.addToStudy(Sphere, "Sphere Pnt R") + id_Sphere1 = geompy.addToStudy(Sphere1, "Sphere R") + id_Sphere2 = geompy.addToStudy(Sphere2, "Sphere") + id_Cone = geompy.addToStudy(Cone, "Cone") + id_Cone1 = geompy.addToStudy(Cone1, "Cone R1R2H") + id_Torus = geompy.addToStudy(Torus, "Torus") + id_Torus1 = geompy.addToStudy(Torus1, "Torus RR") + + id_Common = geompy.addToStudy(Common, "Common") + id_Cut = geompy.addToStudy(Cut, "Cut") + id_Fuse = geompy.addToStudy(Fuse, "Fuse") + id_Section = geompy.addToStudy(Section, "Section") + + id_Edge = geompy.addToStudy(Edge, "Edge") + id_Wire = geompy.addToStudy(Wire, "Wire") + id_Face = geompy.addToStudy(Face, "Face") + id_Face1 = geompy.addToStudy(Face1, "Face from two wires") + id_Face2 = geompy.addToStudy(Face2, "Face from Sketcher") + id_Shell = geompy.addToStudy(Shell, "Shell") + + id_Prism1 = geompy.addToStudy(Prism1, "Prism by Two Pnt") + id_Shell1 = geompy.addToStudy(Shell1, "Shell from Prism1 faces") + id_Solid = geompy.addToStudy(Solid, "Solid") + id_Compound = geompy.addToStudy(Compound, "Compound") + + id_Plane2 = geompy.addToStudy(Plane2, "Plane on Face") + + id_Copy = geompy.addToStudy(Copy, "Copy") + id_Prism = geompy.addToStudy(Prism, "Prism") + id_Revolution = geompy.addToStudy(Revolution, "Revolution") + id_Filling = geompy.addToStudy(Filling, "Filling") + id_Pipe = geompy.addToStudy(Pipe, "Pipe") + id_Sewing = geompy.addToStudy(Sewing, "Sewing") + + id_Translation = geompy.addToStudy(Translation, "Translation") + id_Rotation = geompy.addToStudy(Rotation, "Rotation") + id_Scale = geompy.addToStudy(Scale, "Scale") + id_Mirror = geompy.addToStudy(Mirror, "Mirror") + id_Position = geompy.addToStudy(Position, "Positioned box") + id_Offset = geompy.addToStudy(Offset, "Offset") + id_Orientation = geompy.addToStudy(Orientation, "Orientation") + + id_Fillet = geompy.addToStudy(Fillet, "Fillet") + id_Chamfer = geompy.addToStudy(Chamfer, "Chamfer on Edge") + id_Chamfer2 = geompy.addToStudy(Chamfer2, "Chamfer on Faces") + + id_MultiTrans1D = geompy.addToStudy(MultiTrans1D, "MultiTrans1D") + id_MultiTrans2D = geompy.addToStudy(MultiTrans2D, "MultiTrans2D") + id_MultiRot1D = geompy.addToStudy(MultiRot1D, "MultiRot1D") + id_MultiRot2D = geompy.addToStudy(MultiRot2D, "MultiRot2D") + + id_CDG = geompy.addToStudy(CDG, "CDG") + id_Archimede = geompy.addToStudy(Archimede, "Archimede") + + id_Partition = geompy.addToStudy(Partition, "Partition") + + #Decompose objects + SubFace = geompy.SubShape(Box, geompy.ShapeType["FACE"], [2]) + name = geompy.SubShapeName(SubFace, Box) + id_SubFace = geompy.addToStudyInFather(Box, SubFace, name) + + SubFaceS = geompy.SubShapeSorted(Box, geompy.ShapeType["FACE"], [5]) + nameS = geompy.SubShapeName(SubFaceS, Box) + id_SubFace = geompy.addToStudyInFather(Box, SubFaceS, nameS) + + SubEdgeList = geompy.SubShapeAll(SubFace, geompy.ShapeType["EDGE"]) + i=0 + for SubEdge in SubEdgeList : + name = geompy.SubShapeName(SubEdge, SubFace) + id_SubEdge = geompy.addToStudyInFather(SubFace, SubEdge, name) + + #------------------- + + print "DONE" diff --git a/src/GEOM_SWIG/GEOM_TestHealing.py b/src/GEOM_SWIG/GEOM_TestHealing.py new file mode 100644 index 000000000..4ad4a1ca3 --- /dev/null +++ b/src/GEOM_SWIG/GEOM_TestHealing.py @@ -0,0 +1,331 @@ +# GEOM GEOM_SWIG : binding of C++ implementaion with Python +# +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# File : GEOM_TestHealing.py +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +def TestProcessShape (geompy): + + ##Load shape from BREP file + #import os + #datadir = os.getenv("GEOM_TEST") + #if datadir != 0: + # datadir = datadir + "/Resources/" + #else: + # "Please, define GEOM_TEST variable !" + # + #print "Import ", datadir + "aze2.brep" + #Shape = batchmode_geompy.Import(datadir + "aze2.brep", "BREP") + + p1 = geompy.MakeVertex(0,0,0) + p2 = geompy.MakeVertex(200,0,0) + p3 = geompy.MakeVertex(100,150,0) + + edge = geompy.MakeEdge(p1,p2) + arc = geompy.MakeArc(p1,p3,p2) + wire = geompy.MakeWire([edge,arc]) + face = geompy.MakeFace(wire, 1) + + theShape = geompy.MakePrismVecH(face, edge, 130) + + #Check shape + print "Before ProcessShape:" + isValid = geompy.CheckShape(theShape) + if isValid == 0: + print "The shape is not valid" + else: + print "The shape seems to be valid" + + #Process Shape + Operators = ["FixShape"] + Parameters = ["FixShape.Tolerance3d"] + Values = ["1e-7"] + + PS = geompy.ProcessShape(theShape, Operators, Parameters, Values) + + #Check shape + print "After ProcessShape:" + isValid = geompy.CheckShape(PS) + if isValid == 0: + print "The shape is not valid" + raise RuntimeError, "It seems, that the ProcessShape() has failed" + else: + print "The shape seems to be valid" + + #Add In Study + Id_Shape = geompy.addToStudy(theShape, "Invalid Shape") + Id_PS = geompy.addToStudy(PS, "Processed Shape") + +def TestSuppressFaces (geompy): + + #Create base geometry 3D + Box = geompy.MakeBoxDXDYDZ(200., 200., 200.) + + #IDList for SuppHole + faces = [] + faces = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"]) + + f_glob_id = geompy.GetSubShapeID(Box, faces[5]) + + #Transform objects + SuppFace = geompy.SuppressFaces(Box, [f_glob_id]) + + #Add In Study + Id_SuppFace = geompy.addToStudy(SuppFace, "SuppFace") + +def TestSuppressInternalWires (geompy): + + #Create Face with hole + p11 = geompy.MakeVertex( 0, 0, 0) + p12 = geompy.MakeVertex(30, 0, 0) + p13 = geompy.MakeVertex(30, 30, 0) + p14 = geompy.MakeVertex( 0, 30, 0) + + p21 = geompy.MakeVertex(10, 10, 0) + p22 = geompy.MakeVertex(20, 10, 0) + p23 = geompy.MakeVertex(20, 20, 0) + p24 = geompy.MakeVertex(10, 20, 0) + + e11 = geompy.MakeEdge(p11, p12) + e12 = geompy.MakeEdge(p12, p13) + e13 = geompy.MakeEdge(p13, p14) + e14 = geompy.MakeEdge(p14, p11) + + e21 = geompy.MakeEdge(p21, p22) + e22 = geompy.MakeEdge(p22, p23) + e23 = geompy.MakeEdge(p23, p24) + e24 = geompy.MakeEdge(p24, p21) + + w1 = geompy.MakeWire([e11, e12, e13, e14]) + w2 = geompy.MakeWire([e21, e22, e23, e24]) + + id_w1 = geompy.addToStudy(w1, "Outside Wire") + id_w2 = geompy.addToStudy(w2, "Inside Wire") + + f12 = geompy.MakeFaceWires([w1, w2], 0) + id_f12 = geompy.addToStudy(f12, "Face WO + WI") + + #Get Free Boundary + Res1 = geompy.GetFreeBoundary(f12) + isSuccess1 = Res1[0] + ClosedWires1 = Res1[1] + OpenWires1 = Res1[2] + nbw1 = 0 + + for wire in ClosedWires1: + nbw1 = nbw1 + 1 + + if nbw1 != 2: + raise RuntimeError, "GetFreeBoundary(f12) must return 2 closed wires, but returned ", nbw1 + + #SuppressInternalWires + face = geompy.SuppressInternalWires(f12, []) + + #Get Free Boundary + Res2 = geompy.GetFreeBoundary(face) + isSuccess2 = Res2[0] + ClosedWires2 = Res2[1] + OpenWires2 = Res2[2] + nbw2 = 0 + + for wire in ClosedWires2: + nbw2 = nbw2 + 1 + + if nbw2 != 1: + print "GetFreeBoundary(face) must return 1 closed wires, but returned ", nbw2 + raise RuntimeError, "SuppressInternalWires() works not correctly" + + #Add In Study + Id_face = geompy.addToStudy(face, "Face without internal wires") + +def TestCloseContour (geompy): + + ##Load shape from BREP file + #import os + #datadir = os.getenv("GEOM_TEST") + #if datadir != 0: + # datadir = datadir + "/Resources/" + #else: + # "Please, define GEOM_TEST variable !" + # + #print "Import ", datadir + "open_cont.brep" + #Shape = geompy.Import(datadir + "open_cont.brep", "BREP") + + p0 = geompy.MakeVertex(0. , 0. , 0. ) + py = geompy.MakeVertex(0. , 100., 0. ) + pz = geompy.MakeVertex(0. , 0. , 100.) + p200 = geompy.MakeVertex(200., 200., 200.) + + Shape = geompy.MakePolyline([p0, pz, py, p200]) + + #Check shape + print "Before closing contour:" + isValid = geompy.CheckShape(Shape) + if isValid == 0: + print "The shape is not valid" + else: + print "The shape seems to be valid" + + #Close Contour + IsCommonVertex = 0 # false + + shape_wires = geompy.SubShapeAll(Shape, geompy.ShapeType["WIRE"]) + Wires = [] + wi = 0 + + for wire in shape_wires: + Wires.append(geompy.GetSubShapeID(Shape, shape_wires[wi])) + wi = wi + 1 + + CC = geompy.CloseContour(Shape, Wires, IsCommonVertex) + + #Check shape + print "After closing contour:" + isValid = geompy.CheckShape(CC) + if isValid == 0: + print "The shape is not valid" + raise RuntimeError, "It seems, that the contour was not closed" + else: + print "The shape seems to be valid" + + #Add In Study + Id_Shape = geompy.addToStudy(Shape, "Shape with open wire") + Id_CC = geompy.addToStudy(CC, "Shape with closed wire") + +def TestSuppressHoles (geompy): + + #Create base Variables + radius = 50. + height = 300. + + #Create base points + p1 = geompy.MakeVertex(100., 100., 50.) + + #Create base directions + vz = geompy.MakeVectorDXDYDZ(0., 0., 100.) + + #Create base geometry 3D + Box = geompy.MakeBoxDXDYDZ(200., 200., 200.) + Cylinder = geompy.MakeCylinder(p1, vz, radius, height) + + #Boolean (Cut) + Cut = geompy.MakeBoolean(Box, Cylinder, 2) + idCut = geompy.addToStudy(Cut, "CUT") + + #IDList for SuppressFaces + faces = [] + faces = geompy.SubShapeAllSorted(Cut, geompy.ShapeType["FACE"]) + ind = 0 + for face in faces: + f_name = "FACE %d"%(ind) + f_id = geompy.addToStudyInFather(Cut, face, f_name) + + f_glob_id = geompy.GetSubShapeID(Cut, face) + print "face ", ind, " global index = ", f_glob_id + ind = ind + 1 + + f_glob_id_0 = geompy.GetSubShapeID(Cut, faces[0]) + cut_without_f_0 = geompy.SuppressFaces(Cut, [f_glob_id_0]) + + faces1 = [] + faces1 = geompy.SubShapeAllSorted(cut_without_f_0, geompy.ShapeType["FACE"]) + ind = 0 + for face in faces1: + f_name = "FACE %d"%(ind) + f_id = geompy.addToStudyInFather(cut_without_f_0, face, f_name) + + f_glob_id = geompy.GetSubShapeID(cut_without_f_0, face) + print "face ", ind, " global index = ", f_glob_id + ind = ind + 1 + + f_glob_id_5 = geompy.GetSubShapeID(cut_without_f_0, faces1[5]) + cut_without_f_0_5 = geompy.SuppressFaces(cut_without_f_0, [f_glob_id_5]) + cut_without_f_0_5_id = geompy.addToStudy(cut_without_f_0_5, "Cut without faces 0 and 5") + + #IDList for SuppHole + wires = [] + wires = geompy.SubShapeAllSorted(cut_without_f_0_5, geompy.ShapeType["WIRE"]) + ind = 0 + for wire in wires: + w_name = "WIRE %d"%(ind) + w_id = geompy.addToStudyInFather(cut_without_f_0_5, wire, w_name) + + w_glob_id = geompy.GetSubShapeID(cut_without_f_0_5, wire) + print "wire ", ind, " global index = ", w_glob_id + ind = ind + 1 + + w_3 = geompy.GetSubShapeID(cut_without_f_0_5, wires[3]) + + SuppHole3 = geompy.SuppressHoles(cut_without_f_0_5, [w_3]) + SuppHole3_id = geompy.addToStudy(SuppHole3, "Supp Hole 3") + +def TestMakeSewing (geompy, math): + + #Create base points + px = geompy.MakeVertex(100., 0., 0.) + py = geompy.MakeVertex(0., 100., 0.) + pz = geompy.MakeVertex(0., 0., 100.) + + #Create base geometry 2D & 3D + Vector = geompy.MakeVector(px, py) + Arc = geompy.MakeArc(py, pz, px) + + #Create base objects + angle = 45. * math.pi / 180 + WantPlanarFace = 1 #True + + Wire = geompy.MakeWire([Vector, Arc]) + Face = geompy.MakeFace(Wire, WantPlanarFace) + S = geompy.MakeRotation(Face, Vector, angle) + + #Make Sewing + precision = 0.00001 + Sewing = geompy.MakeSewing([Face, S], precision) + + #Add In Study + id_Sewing = geompy.addToStudy(Sewing, "Sewing") + +def TestDivideEdge (geompy): + + #Create Box + Box = geompy.MakeBoxDXDYDZ(200., 200., 200.) + + #Divide Edge + box_edges = geompy.SubShapeAllSorted(Box, geompy.ShapeType["EDGE"]) + edge_ind = geompy.GetSubShapeID(Box, box_edges[1]) + + Divide = geompy.DivideEdge(Box, edge_ind, 0.5, 1) # Obj, ind, param, is_curve_param + + #Add In Study + Id_Box = geompy.addToStudy(Box, "Box") + Id_Divide = geompy.addToStudy(Divide, "Box with Divided Edge") + +def TestHealingOperations (geompy, math): + + TestMakeSewing(geompy, math) + TestDivideEdge(geompy) + TestSuppressHoles(geompy) + TestSuppressInternalWires(geompy) + TestCloseContour(geompy) + TestSuppressFaces(geompy) + TestProcessShape(geompy) diff --git a/src/GEOM_SWIG/GEOM_TestMeasures.py b/src/GEOM_SWIG/GEOM_TestMeasures.py new file mode 100644 index 000000000..53604ea18 --- /dev/null +++ b/src/GEOM_SWIG/GEOM_TestMeasures.py @@ -0,0 +1,102 @@ +def TestMeasureOperations (geompy, math): + + p0 = geompy.MakeVertex(0 , 0, 0) + p137 = geompy.MakeVertex(10, 30, 70) + + box = geompy.MakeBoxTwoPnt(p0, p137) + + p678 = geompy.MakeVertex(60, 70, 80) + p789 = geompy.MakeVertex(70, 80, 90) + + cube = geompy.MakeBoxTwoPnt(p678, p789) + + ####### PointCoordinates ####### + + Coords = geompy.PointCoordinates(p137) + if Coords[0] != 10 or Coords[1] != 30 or Coords[2] != 70: + print "Coordinates of p137 must be (10, 30, 70), but returned (", Coords[0], ", ", Coords[1], ", ", Coords[2], ")" + + ####### CheckShape ####### + + IsValid = geompy.CheckShape(box) + if IsValid == 0: + raise RuntimeError, "Invalid box created" + else: + print "\nBox is valid" + + ####### WhatIs ####### + + Descr = geompy.WhatIs(box) + print "\nBox 10x30x70 description:" + print Descr + + ####### BasicProperties ####### + + Props = geompy.BasicProperties(box) + print "\nBox 10x30x70 Basic Properties:" + print " Wires length: ", Props[0] + print " Surface area: ", Props[1] + print " Volume : ", Props[2] + + dl = math.sqrt((Props[0] - 880)*(Props[0] - 880)) + da = math.sqrt((Props[1] - 6200)*(Props[1] - 6200)) + dv = math.sqrt((Props[2] - 21000)*(Props[2] - 21000)) + #print "|Props[0] - 880| = ", dl + + if dl > 1e-7 or da > 1e-7 or dv > 1e-7: + print "While must be:" + print " Wires length: ", 880 + print " Surface area: ", 6200 + print " Volume : ", 21000 + + ####### BoundingBox ####### + + BB = geompy.BoundingBox(box) + print "\nBounding Box of box 10x30x70:" + print " Xmin = ", BB[0], ", Xmax = ", BB[1] + print " Ymin = ", BB[2], ", Ymax = ", BB[3] + print " Zmin = ", BB[4], ", Zmax = ", BB[5] + + ####### Inertia ####### + + In = geompy.Inertia(box) + print "\nInertia matrix of box 10x30x70:" + print " (", In[0], ", ", In[1], ", ", In[2], ")" + print " (", In[3], ", ", In[4], ", ", In[5], ")" + print " (", In[6], ", ", In[7], ", ", In[8], ")" + print "Main moments of inertia of box 10x30x70:" + print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11] + + ####### Tolerance ####### + + Toler = geompy.Tolerance(box) + print "\nBox 10x30x70 tolerance:" + print " Face min. tolerance: ", Toler[0] + print " Face max. tolerance: ", Toler[1] + print " Edge min. tolerance: ", Toler[2] + print " Edge max. tolerance: ", Toler[3] + print " Vertex min. tolerance: ", Toler[4] + print " Vertex max. tolerance: ", Toler[5] + + ####### MakeCDG ####### + + pcdg = geompy.MakeCDG(box) + if pcdg is None: + raise RuntimeError, "MakeCDG(box) failed" + else: + print "\nCentre of gravity of box has been successfully obtained:" + Coords = geompy.PointCoordinates(pcdg) + print "(", Coords[0], ", ", Coords[1], ", ", Coords[2], ")" + if Coords[0] != 5 or Coords[1] != 15 or Coords[2] != 35: + print "But must be (5, 15, 35)" + + ####### MinDistance ####### + + MinDist = geompy.MinDistance(box, cube) + + #print "\nMinimal distance between Box and Cube = ", MinDist[0] + #print "It is reached at points:" + #print " On Box (", MinDist[1], ", ", MinDist[2], ", ", MinDist[3], ")" + #print " On Cube (", MinDist[4], ", ", MinDist[5], ", ", MinDist[6], ")" + + print "\nMinimal distance between Box and Cube = ", MinDist diff --git a/src/GEOM_SWIG/GEOM_TestOthers.py b/src/GEOM_SWIG/GEOM_TestOthers.py new file mode 100644 index 000000000..9ef7d1e5e --- /dev/null +++ b/src/GEOM_SWIG/GEOM_TestOthers.py @@ -0,0 +1,209 @@ +# GEOM GEOM_SWIG : binding of C++ implementaion with Python +# +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# File : GEOM_TestOthers.py +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +def TestOtherOperations (geompy, math, BATCHMODE = None): + + # MakeFaces + p11 = geompy.MakeVertex( 0, 0, 0) + p12 = geompy.MakeVertex(30, 0, 0) + p13 = geompy.MakeVertex(30, 30, 0) + p14 = geompy.MakeVertex( 0, 30, 0) + + p21 = geompy.MakeVertex(10, 10, 0) + p22 = geompy.MakeVertex(20, 10, 0) + p23 = geompy.MakeVertex(20, 20, 0) + p24 = geompy.MakeVertex(10, 20, 0) + + e11 = geompy.MakeEdge(p11, p12) + e12 = geompy.MakeEdge(p12, p13) + e13 = geompy.MakeEdge(p13, p14) + e14 = geompy.MakeEdge(p14, p11) + + e21 = geompy.MakeEdge(p21, p22) + e22 = geompy.MakeEdge(p22, p23) + e23 = geompy.MakeEdge(p23, p24) + e24 = geompy.MakeEdge(p24, p21) + + w1 = geompy.MakeWire([e11, e12, e13, e14]) + w2 = geompy.MakeWire([e21, e22, e23, e24]) + w3 = geompy.MakeTranslation(w2, 0, 0, 10) + + id_w1 = geompy.addToStudy(w1, "Outside Wire") + id_w2 = geompy.addToStudy(w2, "Inside Wire") + id_w3 = geompy.addToStudy(w3, "Inside Wire, translated along OZ") + + f12 = geompy.MakeFaces([w1, w2], 0) + id_f12 = geompy.addToStudy(f12, "MakeFaces WO + WI") + + # OrientationChange + Box = geompy.MakeBoxDXDYDZ(200, 200, 200) + Orientation = geompy.OrientationChange(Box) + id_Orientation = geompy.addToStudy(Orientation, "OrientationChange") + + # MakeCommon, MakeCut, MakeFuse, MakeSection + Sphere = geompy.MakeSphereR(100) + + Common = geompy.MakeCommon (Box, Sphere) + Cut = geompy.MakeCut (Box, Sphere) + Fuse = geompy.MakeFuse (Box, Sphere) + Section = geompy.MakeSection(Box, Sphere) + + id_Common = geompy.addToStudy(Common, "Common") + id_Cut = geompy.addToStudy(Cut, "Cut") + id_Fuse = geompy.addToStudy(Fuse, "Fuse") + id_Section = geompy.addToStudy(Section, "Section") + + # Partition + p100 = geompy.MakeVertex(100, 100, 100) + p300 = geompy.MakeVertex(300, 300, 300) + Box1 = geompy.MakeBoxTwoPnt(p100, p300) + Partition = geompy.Partition([Box], [Box1], [], [Box]) + id_Partition = geompy.addToStudy(Partition, "Partition of Box by Box1") + + # MakeMultiRotation1D, MakeMultiRotation2D + pz = geompy.MakeVertex(0, 0, 100) + vy = geompy.MakeVectorDXDYDZ(0, 100, 0) + + MultiRot1D = geompy.MakeMultiRotation1D(f12, vy, pz, 6) + MultiRot2D = geompy.MakeMultiRotation2D(f12, vy, pz, 45, 6, 30, 3) + + id_MultiRot1D = geompy.addToStudy(MultiRot1D, "MakeMultiRotation1D") + id_MultiRot2D = geompy.addToStudy(MultiRot2D, "MakeMultiRotation2D") + + # MakeFilletAll + radius_fillet = 10. + face5 = geompy.SubShapeSorted(Box, geompy.ShapeType["FACE"], [5]) + f_glob_id = geompy.GetSubShapeID(Box, face5) + SuppFace = geompy.SuppressFaces(Box, [f_glob_id]) + + MakeFilletAll = geompy.MakeFilletAll(SuppFace, radius_fillet) + id_MakeFilletAll = geompy.addToStudy(MakeFilletAll, "MakeFilletAll") + + # MakeChamferAll + dimension_chamfer = 10. + MakeChamferAll = geompy.MakeChamferAll(SuppFace, dimension_chamfer) + id_MakeChamferAll = geompy.addToStudy(MakeChamferAll, "MakeChamferAll") + + # MakeChamfer + d1 = 13. + d2 = 7. + box_faces = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"]) + f_ind_1 = geompy.GetSubShapeID(Box, box_faces[0]) + f_ind_2 = geompy.GetSubShapeID(Box, box_faces[1]) + f_ind_3 = geompy.GetSubShapeID(Box, box_faces[2]) + + MakeChamfer = geompy.MakeChamfer(Box, d1, d2, geompy.ShapeType["FACE"], + [f_ind_1, f_ind_2, f_ind_3]) + id_MakeChamfer = geompy.addToStudy(MakeChamfer, "MakeChamfer") + + # Export + geompy.Export(f12, "/tmp/testExportImport.brep", "BREP") + + # ExportBREP, ExportIGES, ExportSTEP + if BATCHMODE is not None: + geompy.Export(f12, "/tmp/testExportImportBREP.brep","BREP") + geompy.Export(f12, "/tmp/testExportImportIGES.iges","IGES") + geompy.Export(f12, "/tmp/testExportImportSTEP.step","STEP") + else: + geompy.ExportBREP(f12, "/tmp/testExportImportBREP.brep") + geompy.ExportIGES(f12, "/tmp/testExportImportIGES.iges") + geompy.ExportSTEP(f12, "/tmp/testExportImportSTEP.step") + + # Import + Import = geompy.Import("/tmp/testExportImport.brep", "BREP") + + id_Import = geompy.addToStudy(Import, "Import") + + # ImportBREP, ImportIGES, ImportSTEP + if BATCHMODE is not None: + ImportBREP = geompy.Import("/tmp/testExportImportBREP.brep","BREP") + ImportIGES = geompy.Import("/tmp/testExportImportIGES.iges","IGES") + ImportSTEP = geompy.Import("/tmp/testExportImportSTEP.step","STEP") + else: + ImportBREP = geompy.ImportBREP("/tmp/testExportImportBREP.brep") + ImportIGES = geompy.ImportIGES("/tmp/testExportImportIGES.iges") + ImportSTEP = geompy.ImportSTEP("/tmp/testExportImportSTEP.step") + + id_ImportBREP = geompy.addToStudy(ImportBREP, "ImportBREP") + id_ImportIGES = geompy.addToStudy(ImportIGES, "ImportIGES") + id_ImportSTEP = geompy.addToStudy(ImportSTEP, "ImportSTEP") + + # MakeBlockExplode + Compound = geompy.MakeCompound([Box, Sphere]) + MakeBlockExplode = geompy.MakeBlockExplode(Compound, 6, 6) + + id_MakeBlockExplode = geompy.addToStudy(MakeBlockExplode[0], "MakeBlockExplode") + + # CheckCompoundOfBlocks + p1 = geompy.MakeVertex(200, 0, 0) + p2 = geompy.MakeVertex(400, 200, 200) + p3 = geompy.MakeVertex(400, 50, 50) + p4 = geompy.MakeVertex(600, 250, 250) + + Box2 = geompy.MakeBoxTwoPnt(p1, p2) + Box3 = geompy.MakeBoxTwoPnt(p3, p4) + Cyl = geompy.MakeCylinderRH(50, 300) + Cone = geompy.MakeConeR1R2H(150, 10, 400) + + Compound1 = geompy.MakeCompound([Box, Cyl, Cone, Box3, Box2]) + + IsValid = geompy.CheckCompoundOfBlocks(Compound1) + if IsValid == 0: + print "The Blocks Compound is NOT VALID" + else: + print "The Blocks Compound is VALID" + + IsValid = geompy.CheckCompoundOfBlocks(Box) + if IsValid == 0: + print "The Box is NOT VALID" + else: + print "The Box is VALID" + + # test geometrical groups + + # CreateGroup + CreateGroup = geompy.CreateGroup(Box, geompy.ShapeType["FACE"]) + + id_CreateGroup = geompy.addToStudy(CreateGroup, "CreateGroup") + + # AddObject + f_ind_4 = geompy.GetSubShapeID(Box, box_faces[3]) + f_ind_5 = geompy.GetSubShapeID(Box, box_faces[4]) + f_ind_6 = geompy.GetSubShapeID(Box, box_faces[5]) + + geompy.AddObject(CreateGroup, f_ind_6) + geompy.AddObject(CreateGroup, f_ind_1) + geompy.AddObject(CreateGroup, f_ind_4) + + # RemoveObject(theGroup, theSubShapeID) + geompy.RemoveObject(CreateGroup, f_ind_1) + + # GetObjectIDs + GetObjectIDs = geompy.GetObjectIDs(CreateGroup) + + print "Group of Box's faces includes the following IDs:" + for ObjectID in GetObjectIDs: + print " ", ObjectID diff --git a/src/GEOM_SWIG/GEOM_blocks.py b/src/GEOM_SWIG/GEOM_blocks.py new file mode 100644 index 000000000..fca4d3fb6 --- /dev/null +++ b/src/GEOM_SWIG/GEOM_blocks.py @@ -0,0 +1,41 @@ +# GEOM GEOM_SWIG : binding of C++ implementaion with Python +# +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : GEOM_blocks.py +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +import salome +import geompy +import math + +import GEOM_Spanner + +isBlocksTest = 0 # False +isMeshTest = 0 # False + +smesh = None + +GEOM_Spanner.MakeSpanner(salome, geompy, math, isBlocksTest, isMeshTest, smesh) + +salome.sg.updateObjBrowser(1); diff --git a/src/GEOM_SWIG/GEOM_example.py b/src/GEOM_SWIG/GEOM_example.py index e293a3e57..6feb7b453 100644 --- a/src/GEOM_SWIG/GEOM_example.py +++ b/src/GEOM_SWIG/GEOM_example.py @@ -39,9 +39,16 @@ while ind < 5: y2 = 20. * (ind+1) z2 = 30. * (ind+1) print x1, y1, z1, x2, y2, z2 + + point1 = geompy.MakeVertex(x1, y1, z1) + name1 = "point1_%d"%(ind) + id_pt1 = geompy.addToStudy(point1, name1) + point2 = geompy.MakeVertex(x2, y2, z2) + name2 = "point2_%d"%(ind) + id_pt2 = geompy.addToStudy(point2, name2) + name = "box%d"%(ind) - box = geompy.MakeBox(x1, y1, z1, x2, y2, z2) + box = geompy.MakeBoxTwoPnt(point1, point2) id_box = geompy.addToStudy(box, name) boxlist.append(box) - ind = ind +1 - + ind = ind + 1 diff --git a/src/GEOM_SWIG/GEOM_example2.py b/src/GEOM_SWIG/GEOM_example2.py index 147e6a4c7..87ae39ddc 100644 --- a/src/GEOM_SWIG/GEOM_example2.py +++ b/src/GEOM_SWIG/GEOM_example2.py @@ -33,32 +33,36 @@ import math geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") myBuilder = salome.myStudy.NewBuilder() -point0 = geom.MakePointStruct(0.,0.,0.) -pointz1 = geom.MakePointStruct(0.,0.,1.) -dirz = geom.MakeDirection(pointz1) +BasicOp = geom.GetIBasicOperations(salome.myStudyId) +PrimOp = geom.GetI3DPrimOperations(salome.myStudyId) +InsertOp = geom.GetIInsertOperations(salome.myStudyId) +TrsfOp = geom.GetITransformOperations(salome.myStudyId) -torus1 = geompy.MakeTorus(point0,dirz,150.,25.) +point0 = BasicOp.MakePointXYZ(0.,0.,0.) +pointz1 = BasicOp.MakePointXYZ(0.,0.,1.) +dirz = BasicOp.MakeVectorTwoPnt(point0,pointz1) + +torus1 = PrimOp.MakeTorusPntVecRR(point0,dirz,150.,25.) id_torus1 = geompy.addToStudy(torus1,"torus1") -torus2 = geom.MakeCopy(torus1) -torus2 = geom.MakeTranslation(torus2,0.,0.,100.) +torus2 = InsertOp.MakeCopy(torus1) + +vec1 = BasicOp.MakeVectorDXDYDZ(0.,0.,100.) +torus2 = TrsfOp.TranslateVectorCopy(torus2,vec1) id_torus2 = geompy.addToStudy(torus2,"torus2") -cylz1 = geompy.MakeCylinder(point0,dirz,25.,100.) +cylz1 = PrimOp.MakeCylinderPntVecRH(point0,dirz,25.,100.) ind = 0 cyllist = [] while ind < 6: - acyl = geom.MakeCopy(cylz1) + acyl = InsertOp.MakeCopy(cylz1) x = 150. * math.cos(ind * math.pi/3.) y = 150. * math.sin(ind * math.pi/3.) z = 0. + vec_i = BasicOp.MakeVectorDXDYDZ(x,y,z) name = "cyl%d"%(ind) - acyl = geompy.MakeTranslation(acyl,x,y,z) + acyl = TrsfOp.TranslateVectorCopy(acyl,vec_i) id_acyl = geompy.addToStudy(acyl,name) cyllist.append(acyl) - ind = ind +1 - - - - + ind = ind + 1 diff --git a/src/GEOM_SWIG/GEOM_example3.py b/src/GEOM_SWIG/GEOM_example3.py index e98ecd11d..1287f6853 100644 --- a/src/GEOM_SWIG/GEOM_example3.py +++ b/src/GEOM_SWIG/GEOM_example3.py @@ -36,31 +36,39 @@ myBuilder = salome.myStudy.NewBuilder() gg = salome.ImportComponentGUI("GEOM") -point0 = geom.MakePointStruct(0.,0.,0.) -pointz1 = geom.MakePointStruct(0.,0.,1.) -dirz = geom.MakeDirection(pointz1) +BasicOp = geom.GetIBasicOperations(salome.myStudyId) +PrimOp = geom.GetI3DPrimOperations(salome.myStudyId) +InsertOp = geom.GetIInsertOperations(salome.myStudyId) +TrsfOp = geom.GetITransformOperations(salome.myStudyId) -torus1 = geompy.MakeTorus(point0,dirz,150.,25.) +point0 = BasicOp.MakePointXYZ(0.,0.,0.) +pointz1 = BasicOp.MakePointXYZ(0.,0.,1.) +dirz = BasicOp.MakeVectorTwoPnt(point0,pointz1) + +torus1 = PrimOp.MakeTorusPntVecRR(point0,dirz,150.,25.) id_torus1 = geompy.addToStudy(torus1,"torus1") gg.createAndDisplayGO(id_torus1) -torus2 = geom.MakeCopy(torus1) -torus2 = geom.MakeTranslation(torus2,0.,0.,100.) +torus2 = InsertOp.MakeCopy(torus1) + +vec1 = BasicOp.MakeVectorDXDYDZ(0.,0.,100.) +torus2 = TrsfOp.TranslateVectorCopy(torus2,vec1) id_torus2 = geompy.addToStudy(torus2,"torus2") gg.createAndDisplayGO(id_torus2) -cylz1 = geompy.MakeCylinder(point0,dirz,25.,100.) +cylz1 = PrimOp.MakeCylinderPntVecRH(point0,dirz,25.,100.) ind = 0 shapeList = [] idList = [] while ind < 6: - acyl = geom.MakeCopy(cylz1) + acyl = InsertOp.MakeCopy(cylz1) x = 150. * math.cos(ind * math.pi/3.) y = 150. * math.sin(ind * math.pi/3.) z = 0. + vec_i = BasicOp.MakeVectorDXDYDZ(x,y,z) name = "cyl%d"%(ind) - acyl = geompy.MakeTranslation(acyl,x,y,z) + acyl = TrsfOp.TranslateVectorCopy(acyl,vec_i) id_acyl = geompy.addToStudy(acyl,name) gg.createAndDisplayGO(id_acyl) shapeList.append(acyl) @@ -72,11 +80,7 @@ shapeList.append(torus2) idList.append(id_torus1) idList.append(id_torus2) -iorStringList = [] -for shape in shapeList: - iorStringList.append(shape._get_Name()) - -cage = geompy.MakeCompound(iorStringList) +cage = geompy.MakeCompound(shapeList) id_cage = geompy.addToStudy(cage,"cage") gg.createAndDisplayGO(id_cage) diff --git a/src/GEOM_SWIG/GEOM_example4.py b/src/GEOM_SWIG/GEOM_example4.py index 7d50005a5..631ef13ca 100755 --- a/src/GEOM_SWIG/GEOM_example4.py +++ b/src/GEOM_SWIG/GEOM_example4.py @@ -24,12 +24,11 @@ # File : GEOM_example4.py # Module : GEOM -import SMESH -import smeshpy +#import SMESH +#import smeshpy import salome from salome import sg import math -#import SMESH_BasicHypothesis_idl import geompy @@ -37,8 +36,8 @@ geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") myBuilder = salome.myStudy.NewBuilder() from geompy import gg -smeshgui = salome.ImportComponentGUI("SMESH") -smeshgui.Init(salome.myStudyId); +#smeshgui = salome.ImportComponentGUI("SMESH") +#smeshgui.Init(salome.myStudyId); ShapeTypeCompSolid = 1 ShapeTypeSolid = 2 @@ -69,24 +68,17 @@ rc2=150 rc3=150 rc4=300 # --------------------------------------------- -point_0 = geom.MakePointStruct(0, 0, 0) -point_z = geom.MakePointStruct(0, 0, 1) +point_0 = geompy.MakeVertex(0, 0, 0) +point_z = geompy.MakeVertex(0, 0, 1) -point_a = geom.MakePointStruct(xa, ya, za) -point_b = geom.MakePointStruct(xb, yb, zb) -point_c = geom.MakePointStruct(xc, yc, zc) +point_a = geompy.MakeVertex(xa, ya, za) +point_b = geompy.MakeVertex(xb, yb, zb) +point_c = geompy.MakeVertex(xc, yc, zc) -dir_z = geom.MakeDirection(point_z) -axe_z = geom.MakeAxisStruct(0, 0, 0, 0, 0, 1) - -dir_a = geom.MakeDirection(point_a) -axe_a = geom.MakeAxisStruct(0, 0, 0, xa, ya, za) - -dir_b = geom.MakeDirection(point_b) -axe_b = geom.MakeAxisStruct(0, 0, 0, xb, yb, zb) - -dir_c = geom.MakeDirection(point_c) -axe_c = geom.MakeAxisStruct(0, 0, 0, xc, yc, zc) +dir_z = geompy.MakeVector(point_0,point_z) +dir_a = geompy.MakeVector(point_0,point_a) +dir_b = geompy.MakeVector(point_0,point_b) +dir_c = geompy.MakeVector(point_0,point_c) cyl_1 = geompy.MakeCylinder(point_0, dir_z, rc1, hc1) @@ -100,7 +92,7 @@ cyl_b = geompy.MakeTranslation(cyl_t, -1.2*rc1, -0.1*rc1, -0.5*hc1) hc4=2*hc1 cyl_t = geompy.MakeCylinder(point_0, dir_c, rc4, hc4) -cyl_t = geompy.MakeRotation(cyl_t, axe_c, pi/2) +cyl_t = geompy.MakeRotation(cyl_t, dir_c, pi/2) cyl_c = geompy.MakeTranslation(cyl_t, -hc1, 0, 0) cyl_d = geompy.MakeTranslation(cyl_t, -hc1, 0, 1.3*rc4) diff --git a/src/GEOM_SWIG/GEOM_example5.py b/src/GEOM_SWIG/GEOM_example5.py new file mode 100644 index 000000000..c26239ba4 --- /dev/null +++ b/src/GEOM_SWIG/GEOM_example5.py @@ -0,0 +1,54 @@ +# GEOM GEOM_SWIG : binding of C++ omplementaion with Python +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : GEOM_example5.py +# Author : Damien COQUERET, Open CASCADE +# Module : GEOM +# $Header$ + +import salome +import geompy + +geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") + +#Create Points +BasicOp = geom.GetIBasicOperations(salome.myStudyId) +Vertex1 = BasicOp.MakePointXYZ(0., 0., 0.) +Vertex2 = BasicOp.MakePointXYZ(100., 20., 30.) +Vertex3 = BasicOp.MakePointXYZ(150., 100., -25.) +Vertex4 = BasicOp.MakePointXYZ(40., -80., 79.) + +#GEOM_Objects List for Splines +GOList = [] +GOList.append(Vertex1) +GOList.append(Vertex2) +GOList.append(Vertex3) +GOList.append(Vertex4) + +#Create Splines +Bezier = geompy.MakeBezier(GOList) +Interpol = geompy.MakeInterpol(GOList) + +#Add In Study +id_Bezier = geompy.addToStudy(Bezier, "Bezier") +id_Interpol = geompy.addToStudy(Interpol, "Interpol") diff --git a/src/GEOM_SWIG/GEOM_moteur.py b/src/GEOM_SWIG/GEOM_moteur.py index 2e8e30ed4..dfe87ae27 100644 --- a/src/GEOM_SWIG/GEOM_moteur.py +++ b/src/GEOM_SWIG/GEOM_moteur.py @@ -1,23 +1,23 @@ # GEOM GEOM_SWIG : binding of C++ omplementaion with Python # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # # # @@ -40,7 +40,7 @@ PosZ = 0 NbBranches = 7 #>2 HauteurT = 70 #Hauteur total du stator -#Varaibles +#Variables Angle1 = 2 * math.pi / NbBranches Angle2 = Angle1 / 2 HauteurR = HauteurT / 3 @@ -56,30 +56,32 @@ PosCour = PosZ + HauteurT * 4 / 7 PosRot = PosZ + 0.9 * HauteurT #Points -P0 = geom.MakePointStruct(0, 0, 1) -P1 = geom.MakePointStruct(PosX, PosY, PosZ) -P2 = geom.MakePointStruct(PosX, PosY, PosZ + Ep) -P3 = geom.MakePointStruct(PosX, PosY, PosCour) -P4 = geom.MakePointStruct(PosX, PosY, PosCour + Ep) -P5 = geom.MakePointStruct(PosX, PosY, PosRot) -P6 = geom.MakePointStruct(Pos1C, Pos1S, PosZ) -P7 = geom.MakePointStruct(PosX + DExtExt, Pos1S, PosZ) -P8 = geom.MakePointStruct(Pos1C, Pos1S, PosZ + HauteurT) +BasicOp = geom.GetIBasicOperations(salome.myStudyId) +OO = BasicOp.MakePointXYZ(0, 0, 0) +P0 = BasicOp.MakePointXYZ(0, 0, 1) +P1 = BasicOp.MakePointXYZ(PosX, PosY, PosZ) +P2 = BasicOp.MakePointXYZ(PosX, PosY, PosZ + Ep) +P3 = BasicOp.MakePointXYZ(PosX, PosY, PosCour) +P4 = BasicOp.MakePointXYZ(PosX, PosY, PosCour + Ep) +P5 = BasicOp.MakePointXYZ(PosX, PosY, PosRot) +P6 = BasicOp.MakePointXYZ(Pos1C, Pos1S, PosZ) +P7 = BasicOp.MakePointXYZ(PosX + DExtExt, Pos1S, PosZ) +P8 = BasicOp.MakePointXYZ(Pos1C, Pos1S, PosZ + HauteurT) #Vecteurs -V1 = geom.MakeDirection(P0) -V2 = geom.MakeAxisStruct(PosX, PosY, PosZ, 0, 0, 1) -V3 = geom.MakeAxisStruct(Pos1C, Pos1S, PosZ, 0, 0, 1) +V1 = BasicOp.MakeVectorTwoPnt(OO,P0) +V2 = BasicOp.MakeVectorTwoPnt(P1,P2) +V3 = BasicOp.MakeVectorTwoPnt(P6,P8) #Cylindre central -C0 = geompy.MakeCylinder(P1, V1, DIntInt, PosCour + Ep - PosZ) +C0 = geompy.MakeCylinder(P1, V1, DIntInt, PosCour + Ep - PosZ) C01 = geompy.MakeCylinder(P1, V1, DIntExt, PosCour + Ep - PosZ) Cylindre = geompy.MakeBoolean(C01, C0, 2) #Id_Cyl = geompy.addToStudy(Cylindre, "Cylindre") #Camemberts de coupe -B1 = geompy.MakeVector(P6, P7) -B2 = geompy.MakePrism(B1, P6, P8) +B1 = BasicOp.MakeVectorTwoPnt(P6, P7) +B2 = geompy.MakePrismVecH(B1, V1, HauteurT) S0 = geompy.MakeRevolution(B2, V3, Angle1) CoupeList = [] CoupeList.append(S0) @@ -88,10 +90,7 @@ while Ind < NbBranches : S = geompy.MakeRotation(S0, V2, Ind * Angle1) CoupeList.append(S) Ind = Ind + 1 -IorCoupeList = [] -for CoupeShape in CoupeList : - IorCoupeList.append(CoupeShape._get_Name()) -Coupe1 = geompy.MakeCompound(IorCoupeList) +Coupe1 = geompy.MakeCompound(CoupeList) #Id_Coupe1 = geompy.addToStudy(Coupe1, "Coupe1") #Couronne1 @@ -117,10 +116,7 @@ C10 = geompy.MakeCylinder(P5, V1, DIntExt / 4, 2 * HauteurR) Rotor1List = [] Rotor1List.append(C9) Rotor1List.append(C10) -IorRotor1List = [] -for Rotor1Shape in Rotor1List : - IorRotor1List.append(Rotor1Shape._get_Name()) -Rotor1 = geompy.MakeCompound(IorRotor1List) +Rotor1 = geompy.MakeCompound(Rotor1List) Id_Rotor1 = geompy.addToStudy(Rotor1, "Rotor1") #Rotor2 @@ -132,10 +128,7 @@ while Ind < NbBranches : R = geompy.MakeRotation(D0, V2, Ind * Angle1) Rotor2List.append(R) Ind = Ind + 1 -IorRotor2List = [] -for Rotor2Shape in Rotor2List : - IorRotor2List.append(Rotor2Shape._get_Name()) -Rotor2 = geompy.MakeCompound(IorRotor2List) +Rotor2 = geompy.MakeCompound(Rotor2List) Id_Rotor2 = geompy.addToStudy(Rotor2, "Rotor2") #Rotor3 @@ -147,8 +140,5 @@ StatorList = [] StatorList.append(Cylindre) StatorList.append(Couronne1) StatorList.append(Couronne2) -IorStatorList = [] -for StatorShape in StatorList : - IorStatorList.append(StatorShape._get_Name()) -Stator = geompy.MakeCompound(IorStatorList) +Stator = geompy.MakeCompound(StatorList) Id_Stator = geompy.addToStudy(Stator, "Stator") diff --git a/src/GEOM_SWIG/GEOM_usinggeom.py b/src/GEOM_SWIG/GEOM_usinggeom.py index 976526928..08fdc0864 100644 --- a/src/GEOM_SWIG/GEOM_usinggeom.py +++ b/src/GEOM_SWIG/GEOM_usinggeom.py @@ -1,23 +1,23 @@ # GEOM GEOM_SWIG : binding of C++ omplementaion with Python # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # # # @@ -26,227 +26,15 @@ # Module : GEOM # $Header$ -import salome import geompy import math -geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") -myBuilder = salome.myStudy.NewBuilder() - -from geompy import gg - -#Create base Variables -nbtimes1 = 5 #Short -nbtimes2 = 5 -mindeg = 2 -maxdeg = 5 -nbiter = 5 -ShapeTypeFace = 4 -ShapeTypeEdge = 6 -WantPlanarFace = 1 #True - -radius = 10. #Double -radius1 = 100. -radius2 = 200. -height = 200. -d1 = 10. -d2 = 10. -step1 = 250. -step2 = 250. -angle = 45. -angle1 = angle * math.pi / 180 -angle2 = 2 * angle1 -factor = 2. -tol3d = 0.0001 -tol2d = 0.0001 -weight = 1000000. -waterdensity = 1. -meshingdeflection = 0.01 -trimsize = 1000. -precision = 0.00001 - -#Create base points -p0 = geom.MakePointStruct(0., 0., 0.) #(Double, Double, Double)->PointStruct -px = geom.MakePointStruct(100., 0., 0.) -py = geom.MakePointStruct(0., 100., 0.) -pz = geom.MakePointStruct(0., 0., 100.) -pxyz = geom.MakePointStruct(100., 100., 100.) - -#Create base directions -vx = geom.MakeDirection(px) #(PointStruct)->DirStruct -vy = geom.MakeDirection(py) -vz = geom.MakeDirection(pz) -vxyz = geom.MakeDirection(pxyz) -ax = geom.MakeAxisStruct(0., 0., 0., 100., 0., 0.) #(Double, Double, Double, Double, Double, Double)->AxisStruct -axy = geom.MakeAxisStruct(100., 0., 0., -100., 100., 0.) -ay = geom.MakeAxisStruct(0., 0., 0., 0., 100., 0.) -az = geom.MakeAxisStruct(0., 0., 0., 0., 0., 100.) - -#Create base geometry 2D -Vertex = geom.MakeVertex(100., 50., 200.) #(Double, Double, Double)->GEOM_Shape_ptr -Vector = geom.MakeVector(px, py) #(PointStruct, PointStruct)->GEOM_Shape_ptr -Line = geom.MakeLine(p0, vxyz) #(PointStruct, DirStruct)->GEOM_Shape_ptr -Arc = geom.MakeArc(py, pz, px) #(PointStruct, PointStruct, PointStruct)->GEOM_Shape_ptr -Circle = geom.MakeCircle(p0, vz, radius1) #(PointStruct, DirStruct, Double)->GEOM_Shape_ptr -Plane = geom.MakePlane(pz, vxyz, trimsize) #(PointStruct, DirStruct, Double)->GEOM_Shape_ptr - -#Create base geometry 3D -Box = geompy.MakeBox(0., 0., 0., 200., 200., 200.) #(Double, Double, Double)->GEOM_Shape_ptr -Cylinder = geompy.MakeCylinder(p0, vz, radius1, height) #(Double, Double, Double)->GEOM_Shape_ptr -Sphere = geompy.MakeSphere(0., 0., 0., radius1) #(Double, Double, Double)->GEOM_Shape_ptr -Cone = geompy.MakeCone(p0, vz, radius2, radius, height) #(PointStruct)->DirStruct -Torus = geompy.MakeTorus(p0, vz, radius2, radius) #(Double, Double, Double)->GEOM_Shape_ptr - -#Boolean (Common, Cut, Fuse, Section) -Common = geompy.MakeBoolean(Box, Sphere, 1) #(GEOM_Shape_ptr, GEOM_Shape_ptr, Short)->GEOM_Shape_ptr -Cut = geompy.MakeBoolean(Box, Sphere, 2) -Fuse = geompy.MakeBoolean(Box, Sphere, 3) -Section = geompy.MakeBoolean(Box, Sphere, 4) - -#IORList for Wire -ShapeListWire = [] -IORListWire = [] -ShapeListWire.append(Vector) -ShapeListWire.append(Arc) -for Shape in ShapeListWire : - IORListWire.append(Shape._get_Name()) - -#IORList for Compound -ShapeListCompound = [] -IORListCompound = [] -i = 0 -while i <= 3 : - S = geompy.MakeTranslation(Arc, i * 100., i * 100., i * 100.) - ShapeListCompound.append(S) - i = i + 1 -for Shape in ShapeListCompound : - IORListCompound.append(Shape._get_Name()) - -#Create base objects -Edge = geompy.MakeEdge(p0, pxyz) #(PointStruct, PointStruct)->GEOM_Shape_ptr -Wire = geompy.MakeWire(IORListWire) #(ListOfIOR)->GEOM_Shape_ptr -Face = geompy.MakeFace(Wire, WantPlanarFace) #(GEOM_Shape_ptr, Boolean)->GEOM_Shape_ptr -Compound = geompy.MakeCompound(IORListCompound) #(ListOfIOR)->GEOM_Shape_ptr - -#IORList for Sewing -ShapeListSewing = [] -IORListSewing = [] -ShapeListSewing.append(Face) -S = geompy.MakeRotation(Face, axy, angle1) -ShapeListSewing.append(S) -for Shape in ShapeListSewing : - IORListSewing.append(Shape._get_Name()) - -#Create advanced objects -Copy = geompy.MakeCopy(Box) #(GEOM_Shape_ptr)->GEOM_Shape_ptr -Prism = geompy.MakePrism(Face, p0, pz) #(GEOM_Shape_ptr, PointStruct, PointStruct)->GEOM_Shape_ptr -#Revolution = geompy.MakeRevolution(Face, az, angle2) #(GEOM_Shape_ptr, AxisStruct, Double)->GEOM_Shape_ptr -Filling = geompy.MakeFilling(Compound, mindeg, maxdeg, tol3d, tol2d, nbiter) #(GEOM_Shape_ptr, Short, Short, Double, Double, Short)->GEOM_Shape_ptr -Pipe = geompy.MakePipe(Edge, Wire) #(GEOM_Shape_ptr, GEOM_Shape_ptr)->GEOM_Shape_ptr -Sewing = geompy.MakeSewing(IORListSewing, precision) #(ListOfIOR, Double)->GEOM_Shape_ptr - -#IDList for Fillet/Chamfer -IDlist = [] -i = 1 -while i <= 3 : - IDlist.append(i) - i = i + 1 - -#Transform objects -Translation = geompy.MakeTranslation(Box, 300., 300., 300.) #(GEOM_Shape_ptr, Double, Double, Double)->GEOM_Shape_ptr -Rotation = geompy.MakeRotation(Box, az, angle1) #(GEOM_Shape_ptr, AxisStruct, Double)->GEOM_Shape_ptr -Scale = geompy.MakeScaleTransform(Box, p0, factor) #(GEOM_Shape_ptr, PointStruct, Double)->GEOM_Shape_ptr -Mirror = geompy.MakeMirrorByPlane(Box, Plane) #(GEOM_Shape_ptr, GEOM_Shape_ptr)->GEOM_Shape_ptr -Orientation = geompy.OrientationChange(Box) #(GEOM_Shape_ptr)->GEOM_Shape_ptr -Fillet = geompy.MakeFillet (Prism, radius, ShapeTypeEdge, IDlist) #(GEOM_Shape_ptr, Double, Short, ListOfSubShapeID)->GEOM_Shape_ptr -Chamfer = geompy.MakeChamfer(Prism, d1, d2, ShapeTypeEdge, IDlist) #(GEOM_Shape_ptr, Double, Double, Short, ListOfSubShapeID)->GEOM_Shape_ptr - -#Create Patterns -MultiTrans1D = geompy.MakeMultiTranslation1D(Fillet, vz, step1, nbtimes1) #(GEOM_Shape_ptr, DirStruct, Double, Short)->GEOM_Shape_ptr -MultiTrans2D = geompy.MakeMultiTranslation2D(Fillet, vz, step1, nbtimes1, vy, step2, nbtimes2) #(GEOM_Shape_ptr, DirStruct, Double, Short, DirStruct, Double, Short)->GEOM_Shape_ptr -#!!!!Angle In Degree!!!! -MultiRot1D = geompy.MakeMultiRotation1D(Chamfer, vx, px, nbtimes1) #(GEOM_Shape_ptr, DirStruct, PointStruct, Short)->GEOM_Shape_ptr -MultiRot2D = geompy.MakeMultiRotation2D(Chamfer, vx, px, angle, nbtimes1, step1, nbtimes2) #(GEOM_Shape_ptr, DirStruct, PointStruct, Double, Short, Double, Short)->GEOM_Shape_ptr - -#IDList for Partition -ShapeListPartition1 = [] -ShapeListPartition1.append(Box) -IORListPartition1 = [] -for Shape in ShapeListPartition1 : - IORListPartition1.append(Shape._get_Name()) -ShapeListPartition2 = [] -ShapeListPartition2.append(Plane) -IORListPartition2 = [] -for Shape in ShapeListPartition2 : - IORListPartition2.append(Shape._get_Name()) - -#IDList for SubShape -IDlistSubShape = [] -IDlistSubShape.append(3) - -#Create Informations objects -CDG = geompy.MakeCDG(Prism) #(GEOM_Shape_ptr)->GEOM_Shape_ptr -Archimede = geompy.Archimede(Box, weight, waterdensity, meshingdeflection) #(GEOM_Shape_ptr, Double, Double, Double)->GEOM_Shape_ptr -CheckShape = geompy.CheckShape(Prism) #(GEOM_Shape_ptr)->Boolean - -#Partition objects -Partition = geompy.Partition(IORListPartition1, IORListPartition2) #(ListOfIOR, ListOfIOR)->GEOM_Shape_ptr - -#Add In Study -id_Vertex = geompy.addToStudy(Vertex, "Vertex") -id_Vector = geompy.addToStudy(Vector, "Vector") -id_Line = geompy.addToStudy(Line, "Line") -id_Arc = geompy.addToStudy(Arc, "Arc") -id_Circle = geompy.addToStudy(Circle, "Circle") -id_Plane = geompy.addToStudy(Plane, "Plane") - -id_Box = geompy.addToStudy(Box, "Box") -id_Cylinder = geompy.addToStudy(Cylinder, "Cylinder") -id_Sphere = geompy.addToStudy(Sphere, "Sphere") -id_Cone = geompy.addToStudy(Cone, "Cone") -id_Torus = geompy.addToStudy(Torus, "Torus") - -id_Edge = geompy.addToStudy(Edge, "Edge") -id_Wire = geompy.addToStudy(Wire, "Wire") -id_Face = geompy.addToStudy(Face, "Face") -id_Compound = geompy.addToStudy(Compound, "Compound") - -id_Common = geompy.addToStudy(Common, "Common") -id_Cut = geompy.addToStudy(Cut, "Cut") -id_Fuse = geompy.addToStudy(Fuse, "Fuse") -id_Section = geompy.addToStudy(Section, "Section") - -id_Copy = geompy.addToStudy(Copy, "Copy") -id_Prism = geompy.addToStudy(Prism, "Prism") -#id_Revolution = geompy.addToStudy(Revolution, "Revolution") -id_Filling = geompy.addToStudy(Filling, "Filling") -id_Pipe = geompy.addToStudy(Pipe, "Pipe") -id_Sewing = geompy.addToStudy(Sewing, "Sewing") - -Id_Translation = geompy.addToStudy(Translation, "Translation") -Id_Rotation = geompy.addToStudy(Rotation, "Rotation") -Id_Scale = geompy.addToStudy(Scale, "Scale") -Id_Mirror = geompy.addToStudy(Mirror, "Mirror") -Id_Orientation = geompy.addToStudy(Orientation, "Orientation") -Id_Fillet = geompy.addToStudy(Fillet, "Fillet") -Id_Chamfer = geompy.addToStudy(Chamfer, "Chamfer") - -Id_MultiTrans1D = geompy.addToStudy(MultiTrans1D, "MultiTrans1D") -Id_MultiTrans2D = geompy.addToStudy(MultiTrans2D, "MultiTrans2D") -Id_MultiRot1D = geompy.addToStudy(MultiRot1D, "MultiRot1D") -Id_MultiRot2D = geompy.addToStudy(MultiRot2D, "MultiRot2D") - -Id_Partition = geompy.addToStudy(Partition, "Partition") -Id_CDG = geompy.addToStudy(CDG, "CDG") -Id_Archimede = geompy.addToStudy(Archimede, "Archimede") - -#Decompose objects -SubShape = geompy.SubShape(Box, ShapeTypeFace, IDlistSubShape) #(GEOM_Shape_ptr, Short, ListOfSubShapeID)->GEOM_Shape_ptr -name = geompy.SubShapeName( SubShape._get_Name(), Box._get_Name() ) -Id_SubShape = geompy.addToStudyInFather(Box, SubShape, name) +import GEOM_TestAll +import GEOM_TestOthers +import GEOM_TestHealing +import GEOM_TestMeasures -SubShapeAllList = [] -SubShapeAllList = geompy.SubShapeAll(SubShape, ShapeTypeEdge) #(GEOM_Shape_ptr, Short)->ListOfGeomShapes -for Shape in SubShapeAllList : - name = geompy.SubShapeName( Shape._get_Name(), Box._get_Name() ) - Id_SubShapeAll = geompy.addToStudyInFather(SubShape, Shape, name) +GEOM_TestMeasures.TestMeasureOperations(geompy, math) +GEOM_TestHealing.TestHealingOperations(geompy, math) +GEOM_TestOthers.TestOtherOperations(geompy, math) +GEOM_TestAll.TestAll(geompy, math) diff --git a/src/GEOM_SWIG/Makefile.in b/src/GEOM_SWIG/Makefile.in index a053a12a1..51fb02ed1 100644 --- a/src/GEOM_SWIG/Makefile.in +++ b/src/GEOM_SWIG/Makefile.in @@ -1,23 +1,23 @@ # GEOM GEOM_SWIG : binding of C++ omplementaion with Python # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # # # @@ -37,29 +37,39 @@ VPATH=.:@srcdir@:@top_srcdir@/idl # Libraries targets LIB = libGEOM_Swigcmodule.la -LIB_SRC = +LIB_SRC = SWIG_DEF = libGEOM_Swig.i -EXPORT_PYSCRIPTS = libGEOM_Swig.py geompy.py batchmode_geompy.py \ - GEOM_example.py \ - GEOM_example2.py \ - GEOM_example3.py \ - GEOM_example4.py \ - GEOM_moteur.py \ - GEOM_usinggeom.py \ - GEOM_Partition1.py \ - GEOM_Partition2.py \ - GEOM_Partition3.py \ - GEOM_Partition4.py \ - GEOM_Partition5.py \ - GEOM_Sketcher.py +EXPORT_PYSCRIPTS = \ + libGEOM_Swig.py \ + geompy.py \ + batchmode_geompy.py \ + GEOM_Spanner.py \ + GEOM_blocks.py \ + GEOM_example.py \ + GEOM_example2.py \ + GEOM_example3.py \ + GEOM_example4.py \ + GEOM_example5.py \ + GEOM_moteur.py \ + GEOM_TestAll.py \ + GEOM_TestOthers.py \ + GEOM_TestHealing.py \ + GEOM_TestMeasures.py \ + GEOM_usinggeom.py \ + GEOM_Partition1.py \ + GEOM_Partition2.py \ + GEOM_Partition3.py \ + GEOM_Partition4.py \ + GEOM_Partition5.py \ + GEOM_Sketcher.py LIB_CLIENT_IDL = SALOMEDS.idl \ SALOMEDS_Attributes.idl \ SALOME_Exception.idl \ GEOM_Gen.idl \ - GEOM_Shape.idl \ - SALOME_Component.idl + SALOME_Component.idl \ + SALOME_GenericObj.idl EXPORT_SHAREDPYSCRIPTS=\ GEOM_shared_modules.py diff --git a/src/GEOM_SWIG/batchmode_geompy.py b/src/GEOM_SWIG/batchmode_geompy.py index 041330f6a..93e695b96 100644 --- a/src/GEOM_SWIG/batchmode_geompy.py +++ b/src/GEOM_SWIG/batchmode_geompy.py @@ -1,6 +1,23 @@ # GEOM GEOM_SWIG : binding of C++ omplementaion with Python # -# Copyright (C) 2003 CEA/DEN, EDF R&D +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # # # @@ -12,378 +29,576 @@ from batchmode_salome import * import GEOM -#-------------------------------------------------------------------------- -modulecatalog = naming_service.Resolve("/Kernel/ModulCatalog") - -geom = lcc.FindOrLoadComponent("FactoryServer", "GEOM") -geom.GetCurrentStudy(myStudyId) +g=None +step = 0 +while step < 50 and g == None: + g = lcc.FindOrLoadComponent("FactoryServer", "GEOM") + step = step + 1 + time.sleep(4) +geom = g._narrow( GEOM.GEOM_Gen ) myBuilder = myStudy.NewBuilder() father = myStudy.FindComponent("GEOM") if father is None: father = myBuilder.NewComponent("GEOM") - A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName"); + A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName") FName = A1._narrow(SALOMEDS.AttributeName) -# FName.SetValue("Geometry") - - Comp = modulecatalog.GetComponent( "GEOM" ) - FName.SetValue( Comp._get_componentusername() ) - - A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap"); - aPixmap = A2._narrow(SALOMEDS.AttributePixMap); - aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" ); + FName.SetValue("Geometry") + A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap") + aPixmap = A2._narrow(SALOMEDS.AttributePixMap) + aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry") myBuilder.DefineComponentInstance(father,geom) - # ----------------------------------------------------------------------------- -# add To Study +# add To Study # ----------------------------------------------------------------------------- -def SubShapeName(aSubId, aMainId): -# index = gg.getIndexTopology(aSubId, aMainId) -# print index -# name = gg.getShapeTypeString(aSubId) + "_%d"%(index) - name = "Shape" +def SubShapeName(aSubObj, aMainObj): + name = "SubShape" print name return name -def addArguments(aShape): - ListIOR = [] - ListIOR = geom.GetReferencedObjects(aShape) - - if aShape._get_StudyShapeId()!="": - father = IDToSObject(aShape._get_StudyShapeId()) - - myBuilder.NewCommand() - if len(ListIOR) > 0: - Arg = myBuilder.NewObject(father) - A1 = myBuilder.FindOrCreateAttribute(Arg, "AttributeName"); - ArgName = A1._narrow(SALOMEDS.AttributeName) - ArgName.SetValue("Arguments") - A2 = myBuilder.FindOrCreateAttribute(Arg, "AttributeSelectable"); - SelAttr = A2._narrow(SALOMEDS.AttributeSelectable); - SelAttr.SetSelectable(0); - - OneObject = 0 - for anIOR in ListIOR: - Shape = orb.string_to_object(anIOR) - if Shape is not None: - if Shape._get_StudyShapeId()!="": - Obj = IDToSObject(Shape._get_StudyShapeId()) - if Obj is not None: - Obj1 = myBuilder.NewObject(Arg) - myBuilder.Addreference(Obj1,Obj) - OneObject = 1 - - if OneObject == 0: - myBuilder.RemoveObject(Arg) - - myBuilder.CommitCommand() - return 1 +# ----------------------------------------------------------------------------- +# Operations +# ----------------------------------------------------------------------------- def addToStudy(aShape, aName): - try: - myBuilder.NewCommand() - newObj = myBuilder.NewObject(father) - ior = orb.object_to_string(aShape) - A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR"); - ObjIOR = A1._narrow(SALOMEDS.AttributeIOR) - ObjIOR.SetValue(ior) - A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName"); - ObjName = A2._narrow(SALOMEDS.AttributeName) - ObjName.SetValue(aName) - id = newObj.GetID() - aShape._set_StudyShapeId(id) - myBuilder.CommitCommand() - - addArguments( aShape ) - + try: + aSObject = geom.AddInStudy(myStudy, aShape, aName, None) except: - return None - return id + print "addToStudy() failed" + return "" + return aShape.GetStudyEntry() def addToStudyInFather(aFather, aShape, aName): - myBuilder.NewCommand() - newObj = myBuilder.NewObject( IDToSObject(aFather._get_StudyShapeId()) ) - ior = orb.object_to_string(aShape) - A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR"); - ObjIOR = A1._narrow(SALOMEDS.AttributeIOR) - ObjIOR.SetValue(ior) - A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName"); - ObjName = A2._narrow(SALOMEDS.AttributeName) - ObjName.SetValue(aName) - id = newObj.GetID() - aShape._set_StudyShapeId(id) - myBuilder.CommitCommand() - addArguments( aShape ) - return id + try: +# myBuilder.NewCommand() + aSObject = geom.AddInStudy(myStudy, aShape, aName, aFather) +# myBuilder.CommitCommand() + except: + print "addToStudyInFather() failed" + return "" + return aShape.GetStudyEntry() + +# ----------------------------------------------------------------------------- +# enumeration ShapeType as a dictionary +# ----------------------------------------------------------------------------- + +ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} # ----------------------------------------------------------------------------- -# Create Geometry 2D +# Get Operations Interfaces +# ----------------------------------------------------------------------------- + +BasicOp = geom.GetIBasicOperations (myStudyId) +CurvesOp = geom.GetICurvesOperations (myStudyId) +PrimOp = geom.GetI3DPrimOperations (myStudyId) +ShapesOp = geom.GetIShapesOperations (myStudyId) +HealOp = geom.GetIHealingOperations (myStudyId) +InsertOp = geom.GetIInsertOperations (myStudyId) +BoolOp = geom.GetIBooleanOperations (myStudyId) +TrsfOp = geom.GetITransformOperations(myStudyId) +LocalOp = geom.GetILocalOperations (myStudyId) +MeasuOp = geom.GetIMeasureOperations (myStudyId) +BlocksOp = geom.GetIBlocksOperations (myStudyId) +GroupOp = geom.GetIGroupOperations (myStudyId) + +# ----------------------------------------------------------------------------- +# Basic primitives # ----------------------------------------------------------------------------- def MakeVertex(x,y,z): - anObj = geom.MakeVertex(x,y,z) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = BasicOp.MakePointXYZ(x,y,z) + if BasicOp.IsDone() == 0: + print "MakePointXYZ : ", BasicOp.GetErrorCode() + return anObj + +def MakeVertexWithRef(vertex,x,y,z): + anObj = BasicOp.MakePointWithReference(vertex,x,y,z) + if BasicOp.IsDone() == 0: + print "MakePointWithReference : ", BasicOp.GetErrorCode() + return anObj + +def MakeVertexOnCurve(curve,par): + anObj = BasicOp.MakePointOnCurve(curve,par) + if BasicOp.IsDone() == 0: + print "MakePointOnCurve : ", BasicOp.GetErrorCode() + return anObj + +def MakeVectorDXDYDZ(dx,dy,dz): + anObj = BasicOp.MakeVectorDXDYDZ(dx,dy,dz) + if BasicOp.IsDone() == 0: + print "MakeVectorDXDYDZ : ", BasicOp.GetErrorCode() return anObj def MakeVector(p1,p2): - anObj = geom.MakeVector(p1,p2) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = BasicOp.MakeVectorTwoPnt(p1, p2) + if BasicOp.IsDone() == 0: + print "MakeVectorTwoPnt : ", BasicOp.GetErrorCode() + return anObj + +def MakeLine(p1, d1): + anObj = BasicOp.MakeLine(p1,d1) + if BasicOp.IsDone() == 0: + print "MakeLine : ", BasicOp.GetErrorCode() + return anObj + +def MakeLineTwoPnt(p1, p2): + anObj = BasicOp.MakeLineTwoPnt(p1,p2) + if BasicOp.IsDone() == 0: + print "MakeLineTwoPnt : ", BasicOp.GetErrorCode() + return anObj + +def MakePlane(p1,v1,trimsize): + anObj = BasicOp.MakePlanePntVec(p1,v1,trimsize) + if BasicOp.IsDone() == 0: + print "MakePlanePntVec : ", BasicOp.GetErrorCode() return anObj -def MakeLine(p1,d1): - anObj = geom.MakeLine(p1,d1) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakePlaneThreePnt(p1,p2,p3,trimsize): + anObj = BasicOp.MakePlaneThreePnt(p1,p2,p3,trimsize) + if BasicOp.IsDone() == 0: + print "MakePlaneThreePnt : ", BasicOp.GetErrorCode() return anObj +def MakePlaneFace(face,trimsize): + anObj = BasicOp.MakePlaneFace(face,trimsize) + if BasicOp.IsDone() == 0: + print "MakePlaneFace : ", BasicOp.GetErrorCode() + return anObj + +def MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ): + anObj = BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ) + if BasicOp.IsDone() == 0: + print "MakeMarker : ", BasicOp.GetErrorCode() + return anObj + +# ----------------------------------------------------------------------------- +# Curves +# ----------------------------------------------------------------------------- + def MakeArc(p1,p2,p3): - anObj = geom.MakeArc(p1,p2,p3) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = CurvesOp.MakeArc(p1,p2,p3) + if CurvesOp.IsDone() == 0: + print "MakeArc : ", CurvesOp.GetErrorCode() + return anObj + +def MakeCircle(p1,v1,radius): + anObj = CurvesOp.MakeCirclePntVecR(p1,v1,radius) + if CurvesOp.IsDone() == 0: + print "MakeCirclePntVecR : ", CurvesOp.GetErrorCode() + return anObj + +def MakeCircleThreePnt(p1,p2,p3): + anObj = CurvesOp.MakeCircleThreePnt(p1,p2,p3) + if CurvesOp.IsDone() == 0: + print "MakeCircleThreePnt : ", CurvesOp.GetErrorCode() + return anObj + +def MakeEllipse(p1,v1,radiusMaj,radiusMin): + anObj = CurvesOp.MakeEllipse(p1,v1,radiusMaj, radiusMin) + if CurvesOp.IsDone() == 0: + print "MakeEllipse : ", CurvesOp.GetErrorCode() return anObj -def MakeCircle(p1,d1,radius): - anObj = geom.MakeCircle(p1,d1,radius) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakePolyline(ListShape): + anObj = CurvesOp.MakePolyline(ListShape) + if CurvesOp.IsDone() == 0: + print "MakePolyline : ", CurvesOp.GetErrorCode() return anObj -def MakeEllipse(p1,d1,radiusMaj,radiusMin): - anObj = geom.MakeEllipse(p1,d1,radiusMaj, radiusMin) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeBezier(ListShape): + anObj = CurvesOp.MakeSplineBezier(ListShape) + if CurvesOp.IsDone() == 0: + print "MakeSplineBezier : ", CurvesOp.GetErrorCode() return anObj -def MakePlane(p1,d1,trimsize): - anObj = geom.MakePlane(p1,d1,trimsize) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeInterpol(ListShape): + anObj = CurvesOp.MakeSplineInterpolation(ListShape) + if CurvesOp.IsDone() == 0: + print "MakeSplineInterpolation : ", CurvesOp.GetErrorCode() return anObj -def MakeSketcher(Cmd): - anObj = geom.MakeSketcher(Cmd) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +# : Nine double values, defining origin, +# OZ and OX directions of the working plane. +def MakeSketcher(Cmd, WPL = [0,0,0, 0,0,1, 1,0,0]): + anObj = CurvesOp.MakeSketcher(Cmd, WPL) + if CurvesOp.IsDone() == 0: + print "MakeSketcher : ", CurvesOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Create Geometry 3D +# Create 3D Primitives # ----------------------------------------------------------------------------- def MakeBox(x1,y1,z1,x2,y2,z2): - anObj = geom.MakeBox(x1,y1,z1,x2,y2,z2) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + pnt1 = MakeVertex(x1,y1,z1) + pnt2 = MakeVertex(x2,y2,z2) + return MakeBoxTwoPnt(pnt1,pnt2) + +def MakeBoxDXDYDZ(dx,dy,dz): + anObj = PrimOp.MakeBoxDXDYDZ(dx,dy,dz) + if PrimOp.IsDone() == 0: + print "MakeBoxDXDYDZ : ", PrimOp.GetErrorCode() + return anObj + +def MakeBoxTwoPnt(point1, point2): + anObj = PrimOp.MakeBoxTwoPnt(point1, point2) + if PrimOp.IsDone() == 0: + print "MakeBoxTwoPnt : ", PrimOp.GetErrorCode() return anObj -def MakeCylinder(p1,d1,radius,height): - anObj = geom.MakeCylinder(p1,d1,radius,height) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeCylinder(p1,v1,radius,height): + anObj = PrimOp.MakeCylinderPntVecRH(p1,v1,radius,height) + if PrimOp.IsDone() == 0: + print "MakeCylinderPntVecRH : ", PrimOp.GetErrorCode() + return anObj + +def MakeCylinderRH(radius,height): + anObj = PrimOp.MakeCylinderRH(radius,height) + if PrimOp.IsDone() == 0: + print "MakeCylinderRH : ", PrimOp.GetErrorCode() + return anObj + +def MakeSpherePntR(point,radius): + anObj = PrimOp.MakeSpherePntR(point,radius) + if PrimOp.IsDone() == 0: + print "MakeSpherePntR : ", PrimOp.GetErrorCode() return anObj def MakeSphere(x,y,z,radius): - anObj = geom.MakeSphere(x,y,z,radius) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + point = MakeVertex(x,y,z) + anObj = MakeSpherePntR(point,radius) + return anObj + +def MakeSphereR(radius): + anObj = PrimOp.MakeSphereR(radius) + if PrimOp.IsDone() == 0: + print "MakeSphereR : ", PrimOp.GetErrorCode() + return anObj + +def MakeCone(p1,v1,radius1,radius2,height): + anObj = PrimOp.MakeConePntVecR1R2H(p1,v1,radius1,radius2,height) + if PrimOp.IsDone() == 0: + print "MakeConePntVecR1R2H : ", PrimOp.GetErrorCode() + return anObj + +def MakeConeR1R2H(radius1,radius2,height): + anObj = PrimOp.MakeConeR1R2H(radius1,radius2,height) + if PrimOp.IsDone() == 0: + print "MakeConeR1R2H : ", PrimOp.GetErrorCode() + return anObj + +def MakeTorus(p1,v1,major_radius,minor_radius): + anObj = PrimOp.MakeTorusPntVecRR(p1,v1,major_radius,minor_radius) + if PrimOp.IsDone() == 0: + print "MakeTorusPntVecRR : ", PrimOp.GetErrorCode() + return anObj + +def MakeTorusRR(major_radius,minor_radius): + anObj = PrimOp.MakeTorusRR(major_radius,minor_radius) + if PrimOp.IsDone() == 0: + print "MakeTorusRR : ", PrimOp.GetErrorCode() + return anObj + +def MakePrism(baseShape,point1,point2): + anObj = PrimOp.MakePrismTwoPnt(baseShape,point1,point2) + if PrimOp.IsDone() == 0: + print "MakePrismTwoPnt : ", PrimOp.GetErrorCode() return anObj -def MakeCone(p1,d1,radius1,radius2,height): - anObj = geom.MakeCone(p1,d1,radius1,radius2,height) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakePrismVecH(baseShape,vector,height): + anObj = PrimOp.MakePrismVecH(baseShape,vector,height) + if PrimOp.IsDone() == 0: + print "MakePrismVecH : ", PrimOp.GetErrorCode() return anObj -def MakeTorus(p1,d1,major_radius,minor_radius): - anObj = geom.MakeTorus(p1,d1,major_radius,minor_radius) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakePipe(baseShape,pathShape): + anObj = PrimOp.MakePipe(baseShape,pathShape) + if PrimOp.IsDone() == 0: + print "MakePipe : ", PrimOp.GetErrorCode() + return anObj + +def MakeRevolution(aShape,axis,angle): + anObj = PrimOp.MakeRevolutionAxisAngle(aShape,axis,angle) + if PrimOp.IsDone() == 0: + print "MakeRevolutionAxisAngle : ", PrimOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Create base objects +# Create base shapes # ----------------------------------------------------------------------------- def MakeEdge(p1,p2): - anObj = geom.MakeEdge(p1,p2) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = ShapesOp.MakeEdge(p1,p2) + if ShapesOp.IsDone() == 0: + print "MakeEdge : ", ShapesOp.GetErrorCode() return anObj def MakeWire(ListShape): - anObj = geom.MakeWire(ListShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = ShapesOp.MakeWire(ListShape) + if ShapesOp.IsDone() == 0: + print "MakeWire : ", ShapesOp.GetErrorCode() return anObj def MakeFace(aShapeWire,WantPlanarFace): - anObj = geom.MakeFace(aShapeWire,WantPlanarFace) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = ShapesOp.MakeFace(aShapeWire,WantPlanarFace) + if ShapesOp.IsDone() == 0: + print "MakeFace : ", ShapesOp.GetErrorCode() + return anObj + +def MakeFaceWires(ListWires,WantPlanarFace): + anObj = ShapesOp.MakeFaceWires(ListWires,WantPlanarFace) + if ShapesOp.IsDone() == 0: + print "MakeFaceWires : ", ShapesOp.GetErrorCode() + return anObj + +def MakeFaces(ListWires,WantPlanarFace): + anObj = MakeFaceWires(ListWires,WantPlanarFace) return anObj -def MakeFaces(ListShape,WantPlanarFace): - anObj = geom.MakeFaces(ListShape,WantPlanarFace) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeShell(ListOfShapes): + anObj = ShapesOp.MakeShell(ListOfShapes) + if ShapesOp.IsDone() == 0: + print "MakeShell : ", ShapesOp.GetErrorCode() + return anObj + +def MakeSolid(ListOfShells): + anObj = ShapesOp.MakeSolidShells(ListOfShells) + if ShapesOp.IsDone() == 0: + print "MakeSolid : ", ShapesOp.GetErrorCode() return anObj def MakeCompound(ListShape): - anObj = geom.MakeCompound(ListShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = ShapesOp.MakeCompound(ListShape) + if ShapesOp.IsDone() == 0: + print "MakeCompound : ", ShapesOp.GetErrorCode() + return anObj + +def ChangeOrientation(Shape): + anObj = ShapesOp.ChangeOrientation(Shape) + if ShapesOp.IsDone() == 0: + print "ChangeOrientation : ", ShapesOp.GetErrorCode() + return anObj + +def OrientationChange(Shape): + anObj = ChangeOrientation(Shape) return anObj # ----------------------------------------------------------------------------- -# Create advanced objects +# Access to sub-shapes by their unique IDs inside the main shape. # ----------------------------------------------------------------------------- -def MakeCopy(aShape): - anObj = geom.MakeCopy(aShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +# Obtain a composite sub-shape of , composed from sub-shapes +# of , selected by their unique IDs inside +def GetSubShape(aShape, ListOfID): + anObj = geom.AddSubShape(aShape,ListOfID) return anObj -def MakePrism(baseShape,p1,p2): - anObj = geom.MakePrism(baseShape,p1,p2) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +# Obtain unique ID of sub-shape inside +def GetSubShapeID(aShape, aSubShape): + anID = LocalOp.GetSubShapeIndex(aShape, aSubShape) + if LocalOp.IsDone() == 0: + print "GetSubShapeIndex : ", LocalOp.GetErrorCode() + return anID + +# ----------------------------------------------------------------------------- +# Decompose objects +# ----------------------------------------------------------------------------- + +def SubShapeAll(aShape, aType): + ListObj = ShapesOp.MakeExplode(aShape,aType,0) + if ShapesOp.IsDone() == 0: + print "MakeExplode : ", ShapesOp.GetErrorCode() + return ListObj + +def SubShapeAllSorted(aShape,aType): + ListObj = ShapesOp.MakeExplode(aShape,aType,1) + if ShapesOp.IsDone() == 0: + print "MakeExplode : ", ShapesOp.GetErrorCode() + return ListObj + +# Obtain a compound of sub-shapes of , +# selected by they indices in list of all sub-shapes of type +def SubShape(aShape, aType, ListOfInd): + ListOfIDs = [] + AllShapeList = SubShapeAll(aShape, aType) + for ind in ListOfInd: + ListOfIDs.append(GetSubShapeID(aShape, AllShapeList[ind - 1])) + anObj = GetSubShape(aShape, ListOfIDs) return anObj -def MakeRevolution(aShape,axis,angle): - anObj = geom.MakeRevolution(aShape,axis,angle) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +# Obtain a compound of sub-shapes of , +# selected by they indices in sorted list of all sub-shapes of type +def SubShapeSorted(aShape, aType, ListOfInd): + ListOfIDs = [] + AllShapeList = SubShapeAllSorted(aShape, aType) + for ind in ListOfInd: + ListOfIDs.append(GetSubShapeID(aShape, AllShapeList[ind - 1])) + anObj = GetSubShape(aShape, ListOfIDs) return anObj -def MakeFilling(aShape,mindeg,maxdeg,tol3d,tol2d,nbiter): - anObj = geom.MakeFilling(aShape,mindeg,maxdeg,tol3d,tol2d,nbiter) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +# ----------------------------------------------------------------------------- +# Healing operations +# ----------------------------------------------------------------------------- + +def ProcessShape(Shape, Operators, Parameters, Values): + anObj = HealOp.ProcessShape(Shape, Operators, Parameters, Values) + if HealOp.IsDone() == 0: + print "ProcessShape : ", HealOp.GetErrorCode() return anObj -def MakePipe(pathShape,baseShape): - anObj = geom.MakePipe(pathShape,baseShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def SuppressFaces(aShape,ListOfId): + anObj = HealOp.SuppressFaces(aShape,ListOfId) + if HealOp.IsDone() == 0: + print "SuppressFaces : ", HealOp.GetErrorCode() return anObj def MakeSewing(ListShape,precision): - anObj = geom.MakeSewing(ListShape,precision) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + comp = MakeCompound(ListShape) + anObj = Sew(comp,precision) return anObj -# ----------------------------------------------------------------------------- -# Boolean (Common, Cut, Fuse, Section) -# ----------------------------------------------------------------------------- +def Sew(aShape,precision): + anObj = HealOp.Sew(aShape,precision) + if HealOp.IsDone() == 0: + print "Sew : ", HealOp.GetErrorCode() + return anObj -def MakeBoolean(shape1,shape2,operation): - anObj = geom.MakeBoolean(shape1,shape2,operation) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def SuppressInternalWires(aShape, Wires): + anObj = HealOp.RemoveIntWires(aShape, Wires) + if HealOp.IsDone() == 0: + print "SuppressInternalWires : ", HealOp.GetErrorCode() + return anObj + +def SuppressHoles(aShape, ListOfId): + anObj = HealOp.FillHoles(aShape,ListOfId) + if HealOp.IsDone() == 0: + print "SuppressHoles : ", HealOp.GetErrorCode() + return anObj + +def CloseContour(aShape, Wires, IsCommonVertex): + anObj = HealOp.CloseContour(aShape, Wires, IsCommonVertex) + if HealOp.IsDone() == 0: + print "CloseContour : ", HealOp.GetErrorCode() + return anObj + +def DivideEdge(aShape, EdgeID, Value, IsByParameter): + anObj = HealOp.DivideEdge(aShape, EdgeID, Value, IsByParameter) + if HealOp.IsDone() == 0: + print "DivideEdge : ", HealOp.GetErrorCode() + return anObj + +def GetFreeBoundary(Shape): + anObj = HealOp.GetFreeBoundary(Shape) + if HealOp.IsDone() == 0: + print "GetFreeBoundaries : ", HealOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Transform objects +# Create advanced objects # ----------------------------------------------------------------------------- -def MakeTranslation(aShape,x,y,z): - anObj = geom.MakeTranslation(aShape,x,y,z) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeCopy(aShape): + anObj = InsertOp.MakeCopy(aShape) + if InsertOp.IsDone() == 0: + print "MakeCopy : ", InsertOp.GetErrorCode() return anObj -def MakeRotation(aShape,axis,angle): - anObj = geom.MakeRotation(aShape,axis,angle) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter): + anObj = PrimOp.MakeFilling(aShape,mindeg,maxdeg,tol2d,tol3d,nbiter) + if PrimOp.IsDone() == 0: + print "MakeFilling : ", PrimOp.GetErrorCode() return anObj -def MakeScaleTransform(aShape,theCenterofScale,factor): - anObj = geom.MakeScaleTransform(aShape,theCenterofScale,factor) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeGlueFaces(aShape,aTolerance): + anObj = ShapesOp.MakeGlueFaces(aShape,aTolerance) + if ShapesOp.IsDone() == 0: + print "MakeGlueFaces : ", ShapesOp.GetErrorCode() return anObj -def MakeMirrorByPlane(aShape,aPlane): - anObj = geom.MakeMirrorByPlane(aShape,aPlane) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) - return anObj +# ----------------------------------------------------------------------------- +# Boolean (Common, Cut, Fuse, Section) +# ----------------------------------------------------------------------------- -def OrientationChange(aShape): - anObj = geom.OrientationChange(aShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeBoolean(shape1,shape2,operation): + anObj = BoolOp.MakeBoolean(shape1,shape2,operation) + if BoolOp.IsDone() == 0: + print "MakeBoolean : ", BoolOp.GetErrorCode() return anObj -def MakeFillet(aShape,radius,ShapeType,ListShape): - anObj = geom.MakeFillet(aShape,radius,ShapeType,ListShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeCommon(s1, s2): + return MakeBoolean(s1, s2, 1) + +def MakeCut(s1, s2): + return MakeBoolean(s1, s2, 2) + +def MakeFuse(s1, s2): + return MakeBoolean(s1, s2, 3) + +def MakeSection(s1, s2): + return MakeBoolean(s1, s2, 4) + +def MakePartition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], + Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]): + anObj = BoolOp.MakePartition(ListShapes, ListTools, + ListKeepInside, ListRemoveInside, + Limit, RemoveWebs, ListMaterials); + if BoolOp.IsDone() == 0: + print "MakePartition : ", BoolOp.GetErrorCode() return anObj -def MakeChamfer(aShape,d1,d2,ShapeType,ListShape): - anObj = geom.MakeChamfer(aShape,d1,d2,ShapeType,ListShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], + Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]): + anObj = MakePartition(ListShapes, ListTools, + ListKeepInside, ListRemoveInside, + Limit, RemoveWebs, ListMaterials); return anObj # ----------------------------------------------------------------------------- -# Decompose objects +# Transform objects # ----------------------------------------------------------------------------- -def SubShape(aShape,type,ListOfId): - anObj = geom.SubShape(aShape,type, ListOfId) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeTranslationTwoPoints(aShape,point1,point2): + anObj = TrsfOp.TranslateTwoPointsCopy(aShape,point1,point2) + if TrsfOp.IsDone() == 0: + print "TranslateTwoPointsCopy : ", TrsfOp.GetErrorCode() return anObj -def SubShapeAll(aShape,type): - ListObj = geom.SubShapeAll(aShape,type) - for anObj in ListObj : - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) - return ListObj - -def SubShapeSorted(aShape,type,ListOfId): - anObj = geom.SubShapeSorted(aShape,type, ListOfId) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeTranslation(aShape,dx,dy,dz): + anObj = TrsfOp.TranslateDXDYDZCopy(aShape,dx,dy,dz) + if TrsfOp.IsDone() == 0: + print "TranslateDXDYDZCopy : ", TrsfOp.GetErrorCode() return anObj -def SubShapeAllSorted(aShape,type): - ListObj = geom.SubShapeAllSorted(aShape,type) - for anObj in ListObj : - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) - return ListObj +def MakeRotation(aShape,axis,angle): + anObj = TrsfOp.RotateCopy(aShape,axis,angle) + if TrsfOp.IsDone() == 0: + print "RotateCopy : ", TrsfOp.GetErrorCode() + return anObj -# -- enumeration ShapeType as a dictionary -- -ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} +def MakeScaleTransform(aShape,theCenterofScale,factor): + anObj = TrsfOp.ScaleShapeCopy(aShape,theCenterofScale,factor) + if TrsfOp.IsDone() == 0: + print "ScaleShapeCopy : ", TrsfOp.GetErrorCode() + return anObj -def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["SHAPE"]): - anObj = geom.Partition(ListShapes, ListTools, ListKeepInside, ListRemoveInside, Limit); - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeMirrorByPlane(aShape,aPlane): + anObj = TrsfOp.MirrorPlaneCopy(aShape,aPlane) + if TrsfOp.IsDone() == 0: + print "MirrorPlaneCopy : ", TrsfOp.GetErrorCode() return anObj -def SuppressFaces(aShape,ListOfId): - ListObj = geom.SuppressFaces(aShape,ListOfId) - for anObj in ListObj : - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) - return ListObj +def MakePosition(aShape,theStartLCS,theEndLCS): + anObj = TrsfOp.PositionShapeCopy(aShape,theStartLCS,theEndLCS) + if TrsfOp.IsDone() == 0: + print "PositionShapeCopy : ", TrsfOp.GetErrorCode() + return anObj -def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace): - anObj = geom.SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeOffset(aShape, anOffset): + anObj = TrsfOp.OffsetShapeCopy(aShape, anOffset) + if TrsfOp.IsDone() == 0: + print "OffsetShapeCopy : ", TrsfOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- @@ -391,79 +606,257 @@ def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace): # ----------------------------------------------------------------------------- def MakeMultiTranslation1D(aShape,aDir,aStep,aNbTimes): - anObj = geom.MakeMultiTranslation1D(aShape,aDir,aStep,aNbTimes) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = TrsfOp.MultiTranslate1D(aShape,aDir,aStep,aNbTimes) + if TrsfOp.IsDone() == 0: + print "MultiTranslate1D : ", TrsfOp.GetErrorCode() return anObj def MakeMultiTranslation2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2): - anObj = geom.MakeMultiTranslation2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + anObj = TrsfOp.MultiTranslate2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2) + if TrsfOp.IsDone() == 0: + print "MultiTranslate2D : ", TrsfOp.GetErrorCode() + return anObj + +def MultiRotate1D(aShape,aVec,aNbTimes): + anObj = TrsfOp.MultiRotate1D(aShape,aVec,aNbTimes) + if TrsfOp.IsDone() == 0: + print "MultiRotate1D : ", TrsfOp.GetErrorCode() + return anObj + +def MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2): + anObj = TrsfOp.MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) + if TrsfOp.IsDone() == 0: + print "MultiRotate2D : ", TrsfOp.GetErrorCode() return anObj def MakeMultiRotation1D(aShape,aDir,aPoint,aNbTimes): - anObj = geom.MakeMultiRotation1D(aShape,aDir,aPoint,aNbTimes) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + aVec = MakeLine(aPoint,aDir) + anObj = MultiRotate1D(aShape,aVec,aNbTimes) return anObj def MakeMultiRotation2D(aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): - anObj = geom.MakeMultiRotation2D(aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) + aVec = MakeLine(aPoint,aDir) + anObj = MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) return anObj # ----------------------------------------------------------------------------- -# Import objects +# Local operations # ----------------------------------------------------------------------------- -def ImportBREP(filename): - anObj = geom.ImportBREP(filename) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeFilletAll(aShape,radius): + anObj = LocalOp.MakeFilletAll(aShape,radius) + if LocalOp.IsDone() == 0: + print "MakeFilletAll : ", LocalOp.GetErrorCode() + return anObj + +def MakeFillet(aShape,radius,aShapeType,ListShape): + anObj = None + if aShapeType == ShapeType["EDGE"]: + anObj = LocalOp.MakeFilletEdges(aShape,radius,ListShape) + else: + anObj = LocalOp.MakeFilletFaces(aShape,radius,ListShape) + if LocalOp.IsDone() == 0: + print "MakeFillet : ", LocalOp.GetErrorCode() + return anObj + +def MakeChamferAll(aShape,d): + anObj = LocalOp.MakeChamferAll(aShape,d) + if LocalOp.IsDone() == 0: + print "MakeChamferAll : ", LocalOp.GetErrorCode() return anObj -def ImportIGES(filename): - anObj = geom.ImportIGES(filename) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeChamferEdge(aShape,d1,d2,face1,face2): + anObj = LocalOp.MakeChamferEdge(aShape,d1,d2,face1,face2) + if LocalOp.IsDone() == 0: + print "MakeChamferEdge : ", LocalOp.GetErrorCode() return anObj -def ImportSTEP(filename): - anObj = geom.ImportSTEP(filename) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeChamferFaces(aShape,d1,d2,ListShape): + anObj = LocalOp.MakeChamferFaces(aShape,d1,d2,ListShape) + if LocalOp.IsDone() == 0: + print "MakeChamferFaces : ", LocalOp.GetErrorCode() return anObj +def MakeChamfer(aShape,d1,d2,aShapeType,ListShape): + anObj = None + if aShapeType == ShapeType["EDGE"]: + anObj = MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1]) + else: + anObj = MakeChamferFaces(aShape,d1,d2,ListShape) + return anObj + +def Archimede(aShape,weight,WaterDensity,MeshingDeflection): + anObj = LocalOp.MakeArchimede(aShape,weight,WaterDensity,MeshingDeflection) + if LocalOp.IsDone() == 0: + print "MakeArchimede : ", LocalOp.GetErrorCode() + return anObj + +# ----------------------------------------------------------------------------- +# Information objects # ----------------------------------------------------------------------------- -# Export objects + +def PointCoordinates(Point): + aTuple = MeasuOp.PointCoordinates(Point) + if MeasuOp.IsDone() == 0: + print "PointCoordinates : ", MeasuOp.GetErrorCode() + return aTuple + +def BasicProperties(Shape): + aTuple = MeasuOp.GetBasicProperties(Shape) + if MeasuOp.IsDone() == 0: + print "BasicProperties : ", MeasuOp.GetErrorCode() + return aTuple + +def BoundingBox(Shape): + aTuple = MeasuOp.GetBoundingBox(Shape) + if MeasuOp.IsDone() == 0: + print "BoundingBox : ", MeasuOp.GetErrorCode() + return aTuple + +def Inertia(Shape): + aTuple = MeasuOp.GetInertia(Shape) + if MeasuOp.IsDone() == 0: + print "Inertia : ", MeasuOp.GetErrorCode() + return aTuple + +def MinDistance(Shape1, Shape2): + aTuple = MeasuOp.GetMinDistance(Shape1, Shape2) + if MeasuOp.IsDone() == 0: + print "MinDistance : ", MeasuOp.GetErrorCode() + return aTuple[0] + +def Tolerance(Shape): + aTuple = MeasuOp.GetTolerance(Shape) + if MeasuOp.IsDone() == 0: + print "Tolerance : ", MeasuOp.GetErrorCode() + return aTuple + +def WhatIs(Shape): + aDescr = MeasuOp.WhatIs(Shape) + if MeasuOp.IsDone() == 0: + print "WhatIs : ", MeasuOp.GetErrorCode() + return aDescr + +def MakeCDG(aShape): + anObj = MeasuOp.GetCentreOfMass(aShape) + if MeasuOp.IsDone() == 0: + print "GetCentreOfMass : ", MeasuOp.GetErrorCode() + return anObj + +def CheckShape(aShape): + (IsValid, Status) = MeasuOp.CheckShape(aShape) + if MeasuOp.IsDone() == 0: + print "CheckShape : ", MeasuOp.GetErrorCode() + else: + if IsValid == 0: + print Status + return IsValid + +# ----------------------------------------------------------------------------- +# Import/Export objects # ----------------------------------------------------------------------------- -def ExportBREP(filename,aShape): - geom.ExportBREP(filename,aShape) -def ExportIGES(filename,aShape): - geom.ExportIGES(filename,aShape) +def Import(filename, formatname): + anObj = InsertOp.Import(filename, formatname) + if InsertOp.IsDone() == 0: + print "Import : ", InsertOp.GetErrorCode() + return anObj -def ExportSTEP(filename,aShape): - geom.ExportSTEP(filename,aShape) +def Export(aShape, filename, formatname): + InsertOp.Export(aShape, filename, formatname) + if InsertOp.IsDone() == 0: + print "Export : ", InsertOp.GetErrorCode() # ----------------------------------------------------------------------------- -# Information objects +# Block operations # ----------------------------------------------------------------------------- -def MakeCDG(aShape): - anObj = geom.MakeCDG(aShape) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeQuad(E1, E2, E3, E4): + anObj = BlocksOp.MakeQuad(E1, E2, E3, E4) + if BlocksOp.IsDone() == 0: + print "MakeQuad : ", BlocksOp.GetErrorCode() + return anObj + +def MakeQuad2Edges(E1, E2): + anObj = BlocksOp.MakeQuad2Edges(E1, E2) + if BlocksOp.IsDone() == 0: + print "MakeQuad2Edges : ", BlocksOp.GetErrorCode() + return anObj + +def MakeQuad4Vertices(V1, V2, V3, V4): + anObj = BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4) + if BlocksOp.IsDone() == 0: + print "MakeQuad4Vertices : ", BlocksOp.GetErrorCode() + return anObj + +def MakeHexa(F1, F2, F3, F4, F5, F6): + anObj = BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6) + if BlocksOp.IsDone() == 0: + print "MakeHexa : ", BlocksOp.GetErrorCode() + return anObj + +def MakeHexa2Faces(F1, F2): + anObj = BlocksOp.MakeHexa2Faces(F1, F2) + if BlocksOp.IsDone() == 0: + print "MakeHexa2Faces : ", BlocksOp.GetErrorCode() + return anObj + +def MakeMultiTransformation1D(Block, DirFaceID1, DirFaceID2, NbTimes): + anObj = BlocksOp.MakeMultiTransformation1D(Block, DirFaceID1, DirFaceID2, NbTimes) + if BlocksOp.IsDone() == 0: + print "MakeMultiTransformation1D : ", BlocksOp.GetErrorCode() return anObj -def Archimede(aShape,weight,WaterDensity,MeshingDeflection): - anObj = geom.Archimede(aShape,weight,WaterDensity,MeshingDeflection) - ior = orb.object_to_string(anObj) - anObj._set_Name(ior) +def MakeMultiTransformation2D(Block, DirFaceID1U, DirFaceID2U, NbTimesU, + DirFaceID1V, DirFaceID2V, NbTimesV): + anObj = BlocksOp.MakeMultiTransformation2D(Block, DirFaceID1U, DirFaceID2U, NbTimesU, + DirFaceID1V, DirFaceID2V, NbTimesV) + if BlocksOp.IsDone() == 0: + print "MakeMultiTransformation2D : ", BlocksOp.GetErrorCode() return anObj -def CheckShape(aShape): - Status = geom.CheckShape(aShape) - return Status +def MakeBlockExplode(Compound, MinNbFaces, MaxNbFaces): + aList = BlocksOp.ExplodeCompoundOfBlocks(Compound, MinNbFaces, MaxNbFaces) + if BlocksOp.IsDone() == 0: + print "MakeBlockExplode : ", BlocksOp.GetErrorCode() + return aList + +def CheckCompoundOfBlocks(Compound): + (IsValid, BCErrors) = BlocksOp.CheckCompoundOfBlocks(Compound) + if BlocksOp.IsDone() == 0: + print "CheckCompoundOfBlocks : ", BlocksOp.GetErrorCode() + else: + if IsValid == 0: + Descr = BlocksOp.PrintBCErrors(Compound, BCErrors) + print Descr + return IsValid + +# ----------------------------------------------------------------------------- +# Group operations +# ----------------------------------------------------------------------------- + +def CreateGroup(MainShape, ShapeType): + anObj = GroupOp.CreateGroup(MainShape, ShapeType) + if GroupOp.IsDone() == 0: + print "CreateGroup : ", GroupOp.GetErrorCode() + return anObj + +def AddObject(Group, SubShapeID): + GroupOp.AddObject(Group, SubShapeID) + if GroupOp.IsDone() == 0: + print "AddObject : ", GroupOp.GetErrorCode() + +def RemoveObject(Group, SubShapeID): + GroupOp.RemoveObject(Group, SubShapeID) + if GroupOp.IsDone() == 0: + print "RemoveObject : ", GroupOp.GetErrorCode() + +def GetObjectIDs(Group): + ListIDs = GroupOp.GetObjects(Group) + if GroupOp.IsDone() == 0: + print "GetObjectIDs : ", GroupOp.GetErrorCode() + return ListIDs + +def addPath(Path): + if (sys.path.count(Path) < 1): + sys.path.append(Path) diff --git a/src/GEOM_SWIG/geompy.py b/src/GEOM_SWIG/geompy.py index 6d0fca32a..b2bc785ac 100644 --- a/src/GEOM_SWIG/geompy.py +++ b/src/GEOM_SWIG/geompy.py @@ -1,23 +1,23 @@ # GEOM GEOM_SWIG : binding of C++ omplementaion with Python # # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org # # # @@ -26,470 +26,1755 @@ # Module : GEOM # $Header$ -import salome -import SALOMEDS -#import SALOMEDS_Attributes_idl +from salome import * +import GEOM -#NRI : BugID 1682 : from libSALOME_Swig import * +g = lcc.FindOrLoadComponent("FactoryServer", "GEOM") +geom = g._narrow( GEOM.GEOM_Gen ) +myBuilder = myStudy.NewBuilder() -geom = salome.lcc.FindOrLoadComponent("FactoryServer", "GEOM") -geom.GetCurrentStudy(salome.myStudyId) -myBuilder = salome.myStudy.NewBuilder() - -gg = salome.ImportComponentGUI("GEOM") - -father = salome.myStudy.FindComponent("GEOM") +father = myStudy.FindComponent("GEOM") if father is None: father = myBuilder.NewComponent("GEOM") - A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName"); + A1 = myBuilder.FindOrCreateAttribute(father, "AttributeName") FName = A1._narrow(SALOMEDS.AttributeName) - FName.SetValue( salome.sg.getComponentUserName("GEOM") ) - A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap"); - aPixmap = A2._narrow(SALOMEDS.AttributePixMap); - aPixmap.SetPixMap( "ICON_OBJBROWSER_Geometry" ); + FName.SetValue("Geometry") + A2 = myBuilder.FindOrCreateAttribute(father, "AttributePixMap") + aPixmap = A2._narrow(SALOMEDS.AttributePixMap) + aPixmap.SetPixMap("ICON_OBJBROWSER_Geometry") myBuilder.DefineComponentInstance(father,geom) +gg = ImportComponentGUI("GEOM") -# ----------------------------------------------------------------------------- -# add To Study -# ----------------------------------------------------------------------------- - -def SubShapeName(aSubId, aMainId): +# * Get name for sub-shape aSubObj of shape aMainObj +# +# * Example: see GEOM_TestAll.py +# +def SubShapeName(aSubObj, aMainObj): + aSubId = orb.object_to_string(aSubObj) + aMainId = orb.object_to_string(aMainObj) index = gg.getIndexTopology(aSubId, aMainId) name = gg.getShapeTypeString(aSubId) + "_%d"%(index) return name -def addArguments(aShape): - ListIOR = [] - ListIOR = geom.GetReferencedObjects(aShape) - - if aShape._get_StudyShapeId()!="": - father = salome.IDToSObject(aShape._get_StudyShapeId()) - - myBuilder.NewCommand() - if len(ListIOR) > 0: - Arg = myBuilder.NewObject(father) - A1 = myBuilder.FindOrCreateAttribute(Arg, "AttributeName"); - ArgName = A1._narrow(SALOMEDS.AttributeName) - ArgName.SetValue("Arguments") - A2 = myBuilder.FindOrCreateAttribute(Arg, "AttributeSelectable"); - SelAttr = A2._narrow(SALOMEDS.AttributeSelectable); - SelAttr.SetSelectable(0); - - OneObject = 0 - for anIOR in ListIOR: - Shape = salome.orb.string_to_object(anIOR) - if Shape is not None: - if Shape._get_StudyShapeId()!="": - Obj = salome.IDToSObject(Shape._get_StudyShapeId()) - if Obj is not None: - Obj1 = myBuilder.NewObject(Arg) - myBuilder.Addreference(Obj1,Obj) - OneObject = 1 - - if OneObject == 0: - myBuilder.RemoveObject(Arg) - - myBuilder.CommitCommand() - return 1 - +# * Publish in study aShape with name aName +# +# * Example: see GEOM_TestAll.py +# def addToStudy(aShape, aName): - myBuilder.NewCommand() - newObj = myBuilder.NewObject(father) - ior = salome.orb.object_to_string(aShape) - A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR"); - ObjIOR = A1._narrow(SALOMEDS.AttributeIOR) - ObjIOR.SetValue(ior) - A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName"); - ObjName = A2._narrow(SALOMEDS.AttributeName) - ObjName.SetValue(aName) - A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap"); - ObjPixmap = A3._narrow(SALOMEDS.AttributePixMap) - anIcon = gg.getShapeTypeIcon(ior); - ObjPixmap.SetPixMap(anIcon) - id = newObj.GetID() - aShape._set_StudyShapeId(id) - myBuilder.CommitCommand() - - addArguments( aShape ) - -#NRI : BugID 1682 : sg = SALOMEGUI_Swig() -#NRI : BugID 1682 : sg.updateObjBrowser(0) -# salome.sg.updateObjBrowser(0) - return id - + try: + aSObject = geom.AddInStudy(myStudy, aShape, aName, None) + except: + print "addToStudy() failed" + return "" + return aShape.GetStudyEntry() + +# * Publish in study aShape with name aName as sub-object of previously published aFather +# +# * Example: see GEOM_TestAll.py +# def addToStudyInFather(aFather, aShape, aName): + try: + aSObject = geom.AddInStudy(myStudy, aShape, aName, aFather) + except: + print "addToStudyInFather() failed" + return "" + return aShape.GetStudyEntry() + +# ----------------------------------------------------------------------------- +# enumeration ShapeType as a dictionary +# ----------------------------------------------------------------------------- -#NRI : BugID 1682 : sg = SALOMEGUI_Swig() - myBuilder.NewCommand() - newObj = myBuilder.NewObject( salome.IDToSObject(aFather._get_StudyShapeId()) ) - ior = salome.orb.object_to_string(aShape) - A1 = myBuilder.FindOrCreateAttribute(newObj, "AttributeIOR"); - ObjIOR = A1._narrow(SALOMEDS.AttributeIOR) - ObjIOR.SetValue(ior) - A2 = myBuilder.FindOrCreateAttribute(newObj, "AttributeName"); - ObjName = A2._narrow(SALOMEDS.AttributeName) - ObjName.SetValue(aName) - A3 = myBuilder.FindOrCreateAttribute(newObj, "AttributePixMap"); - ObjPixmap = A3._narrow(SALOMEDS.AttributePixMap) - anIcon = gg.getShapeTypeIcon(ior); - ObjPixmap.SetPixMap(anIcon) - id = newObj.GetID() - aShape._set_StudyShapeId(id) - myBuilder.CommitCommand() +ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} - addArguments( aShape ) +# ----------------------------------------------------------------------------- +# Get Operations Interfaces +# ----------------------------------------------------------------------------- -#NRI : BugID 1682 : sg.updateObjBrowser(0) -# salome.sg.updateObjBrowser(0) - return id +BasicOp = geom.GetIBasicOperations (myStudyId) +CurvesOp = geom.GetICurvesOperations (myStudyId) +PrimOp = geom.GetI3DPrimOperations (myStudyId) +ShapesOp = geom.GetIShapesOperations (myStudyId) +HealOp = geom.GetIHealingOperations (myStudyId) +InsertOp = geom.GetIInsertOperations (myStudyId) +BoolOp = geom.GetIBooleanOperations (myStudyId) +TrsfOp = geom.GetITransformOperations(myStudyId) +LocalOp = geom.GetILocalOperations (myStudyId) +MeasuOp = geom.GetIMeasureOperations (myStudyId) +BlocksOp = geom.GetIBlocksOperations (myStudyId) +GroupOp = geom.GetIGroupOperations (myStudyId) # ----------------------------------------------------------------------------- -# Create Geometry 2D +# Basic primitives # ----------------------------------------------------------------------------- -def MakeVertex(x,y,z): - anObj = geom.MakeVertex(x,y,z) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create point by three coordinates. +# * \param theX The X coordinate of the point. +# * \param theY The Y coordinate of the point. +# * \param theZ The Z coordinate of the point. +# * \return New GEOM_Object, containing the created point. +# +# * Example: see GEOM_TestAll.py +# +def MakeVertex(theX, theY, theZ): + anObj = BasicOp.MakePointXYZ(theX, theY, theZ) + if BasicOp.IsDone() == 0: + print "MakePointXYZ : ", BasicOp.GetErrorCode() return anObj -def MakeVector(p1,p2): - anObj = geom.MakeVector(p1,p2) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a point, distant from the referenced point +# * on the given distances along the coordinate axes. +# * \param theReference The referenced point. +# * \param theX Displacement from the referenced point along OX axis. +# * \param theY Displacement from the referenced point along OY axis. +# * \param theZ Displacement from the referenced point along OZ axis. +# * \return New GEOM_Object, containing the created point. +# +# * Example: see GEOM_TestAll.py +# +def MakeVertexWithRef(theReference, theX, theY, theZ): + anObj = BasicOp.MakePointWithReference(theReference, theX, theY, theZ) + if BasicOp.IsDone() == 0: + print "MakePointWithReference : ", BasicOp.GetErrorCode() + return anObj + +# * Create a point, corresponding to the given parameter on the given curve. +# * \param theRefCurve The referenced curve. +# * \param theParameter Value of parameter on the referenced curve. +# * \return New GEOM_Object, containing the created point. +# +# * Example: see GEOM_TestAll.py +# +def MakeVertexOnCurve(theRefCurve, theParameter): + anObj = BasicOp.MakePointOnCurve(theRefCurve, theParameter) + if BasicOp.IsDone() == 0: + print "MakePointOnCurve : ", BasicOp.GetErrorCode() return anObj -def MakeLine(p1,d1): - anObj = geom.MakeLine(p1,d1) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a vector with the given components. +# * \param theDX X component of the vector. +# * \param theDY Y component of the vector. +# * \param theDZ Z component of the vector. +# * \return New GEOM_Object, containing the created vector. +# +# * Example: see GEOM_TestAll.py +# +def MakeVectorDXDYDZ(theDX, theDY, theDZ): + anObj = BasicOp.MakeVectorDXDYDZ(theDX, theDY, theDZ) + if BasicOp.IsDone() == 0: + print "MakeVectorDXDYDZ : ", BasicOp.GetErrorCode() + return anObj + +# * Create a vector between two points. +# * \param thePnt1 Start point for the vector. +# * \param thePnt2 End point for the vector. +# * \return New GEOM_Object, containing the created vector. +# +# * Example: see GEOM_TestAll.py +# +def MakeVector(thePnt1, thePnt2): + anObj = BasicOp.MakeVectorTwoPnt(thePnt1, thePnt2) + if BasicOp.IsDone() == 0: + print "MakeVectorTwoPnt : ", BasicOp.GetErrorCode() return anObj -def MakeArc(p1,p2,p3): - anObj = geom.MakeArc(p1,p2,p3) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a line, passing through the given point +# * and parrallel to the given direction +# * \param thePnt Point. The resulting line will pass through it. +# * \param theDir Direction. The resulting line will be parallel to it. +# * \return New GEOM_Object, containing the created line. +# +# * Example: see GEOM_TestAll.py +# +def MakeLine(thePnt, theDir): + anObj = BasicOp.MakeLine(thePnt, theDir) + if BasicOp.IsDone() == 0: + print "MakeLine : ", BasicOp.GetErrorCode() return anObj -def MakeCircle(p1,d1,radius): - anObj = geom.MakeCircle(p1,d1,radius) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a line, passing through the given points +# * \param thePnt1 First of two points, defining the line. +# * \param thePnt2 Second of two points, defining the line. +# * \return New GEOM_Object, containing the created line. +# +# * Example: see GEOM_TestAll.py +# +def MakeLineTwoPnt(thePnt1, thePnt2): + anObj = BasicOp.MakeLineTwoPnt(thePnt1, thePnt2) + if BasicOp.IsDone() == 0: + print "MakeLineTwoPnt : ", BasicOp.GetErrorCode() return anObj -def MakeEllipse(p1,d1,radiusMaj,radiusMin): - anObj = geom.MakeEllipse(p1,d1,radiusMaj, radiusMin) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a plane, passing through the given point +# * and normal to the given vector. +# * \param thePnt Point, the plane has to pass through. +# * \param theVec Vector, defining the plane normal direction. +# * \param theTrimSize Half size of a side of quadrangle face, representing the plane. +# * \return New GEOM_Object, containing the created plane. +# +# * Example: see GEOM_TestAll.py +# +def MakePlane(thePnt, theVec, theTrimSize): + anObj = BasicOp.MakePlanePntVec(thePnt, theVec, theTrimSize) + if BasicOp.IsDone() == 0: + print "MakePlanePntVec : ", BasicOp.GetErrorCode() return anObj -def MakePlane(p1,d1,trimsize): - anObj = geom.MakePlane(p1,d1,trimsize) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a plane, passing through the three given points +# * \param thePnt1 First of three points, defining the plane. +# * \param thePnt2 Second of three points, defining the plane. +# * \param thePnt3 Fird of three points, defining the plane. +# * \param theTrimSize Half size of a side of quadrangle face, representing the plane. +# * \return New GEOM_Object, containing the created plane. +# +# * Example: see GEOM_TestAll.py +# +def MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize): + anObj = BasicOp.MakePlaneThreePnt(thePnt1, thePnt2, thePnt3, theTrimSize) + if BasicOp.IsDone() == 0: + print "MakePlaneThreePnt : ", BasicOp.GetErrorCode() return anObj -def MakeSketcher(Cmd): - anObj = geom.MakeSketcher(Cmd) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a plane, similar to the existing one, but with another size of representing face. +# * \param theFace Referenced plane. +# * \param theTrimSize New half size of a side of quadrangle face, representing the plane. +# * \return New GEOM_Object, containing the created plane. +# +# * Example: see GEOM_TestAll.py +# +def MakePlaneFace(theFace, theTrimSize): + anObj = BasicOp.MakePlaneFace(theFace, theTrimSize) + if BasicOp.IsDone() == 0: + print "MakePlaneFace : ", BasicOp.GetErrorCode() + return anObj + +# * Create a local coordinate system. +# * \param OX,OY,OZ Three coordinates of coordinate system origin. +# * \param XDX,XDY,XDZ Three components of OX direction +# * \param YDX,YDY,YDZ Three components of OY direction +# * \return New GEOM_Object, containing the created coordinate system. +# +# * Example: see GEOM_TestAll.py +# +def MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ): + anObj = BasicOp.MakeMarker(OX,OY,OZ, XDX,XDY,XDZ, YDX,YDY,YDZ) + if BasicOp.IsDone() == 0: + print "MakeMarker : ", BasicOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Create Geometry 3D +# Curves # ----------------------------------------------------------------------------- -def MakeBox(x1,y1,z1,x2,y2,z2): - anObj = geom.MakeBox(x1,y1,z1,x2,y2,z2) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create an arc of circle, passing through three given points. +# * \param thePnt1 Start point of the arc. +# * \param thePnt2 Middle point of the arc. +# * \param thePnt3 End point of the arc. +# * \return New GEOM_Object, containing the created arc. +# +# * Example: see GEOM_TestAll.py +# +def MakeArc(thePnt1, thePnt2, thePnt3): + anObj = CurvesOp.MakeArc(thePnt1, thePnt2, thePnt3) + if CurvesOp.IsDone() == 0: + print "MakeArc : ", CurvesOp.GetErrorCode() + return anObj + +# * Create a circle with given center, normal vector and radius. +# * \param thePnt Circle center. +# * \param theVec Vector, normal to the plane of the circle. +# * \param theR Circle radius. +# * \return New GEOM_Object, containing the created circle. +# +# * Example: see GEOM_TestAll.py +# +def MakeCircle(thePnt, theVec, theR): + anObj = CurvesOp.MakeCirclePntVecR(thePnt, theVec, theR) + if CurvesOp.IsDone() == 0: + print "MakeCirclePntVecR : ", CurvesOp.GetErrorCode() + return anObj + +# * Create a circle, passing through three given points +# * \param thePnt1,thePnt2,thePnt3 Points, defining the circle. +# * \return New GEOM_Object, containing the created circle. +# +# * Example: see GEOM_TestAll.py +# +def MakeCircleThreePnt(thePnt1, thePnt2, thePnt3): + anObj = CurvesOp.MakeCircleThreePnt(thePnt1, thePnt2, thePnt3) + if CurvesOp.IsDone() == 0: + print "MakeCircleThreePnt : ", CurvesOp.GetErrorCode() + return anObj + +# * Create an ellipse with given center, normal vector and radiuses. +# * \param thePnt Ellipse center. +# * \param theVec Vector, normal to the plane of the ellipse. +# * \param theRMajor Major ellipse radius. +# * \param theRMinor Minor ellipse radius. +# * \return New GEOM_Object, containing the created ellipse. +# +# * Example: see GEOM_TestAll.py +# +def MakeEllipse(thePnt, theVec, theRMajor, theRMinor): + anObj = CurvesOp.MakeEllipse(thePnt, theVec, theRMajor, theRMinor) + if CurvesOp.IsDone() == 0: + print "MakeEllipse : ", CurvesOp.GetErrorCode() return anObj -def MakeCylinder(p1,d1,radius,height): - anObj = geom.MakeCylinder(p1,d1,radius,height) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a polyline on the set of points. +# * \param thePoints Sequence of points for the polyline. +# * \return New GEOM_Object, containing the created polyline. +# +# * Example: see GEOM_TestAll.py +# +def MakePolyline(thePoints): + anObj = CurvesOp.MakePolyline(thePoints) + if CurvesOp.IsDone() == 0: + print "MakePolyline : ", CurvesOp.GetErrorCode() return anObj -def MakeSphere(x,y,z,radius): - anObj = geom.MakeSphere(x,y,z,radius) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create bezier curve on the set of points. +# * \param thePoints Sequence of points for the bezier curve. +# * \return New GEOM_Object, containing the created bezier curve. +# +# * Example: see GEOM_TestAll.py +# +def MakeBezier(thePoints): + anObj = CurvesOp.MakeSplineBezier(thePoints) + if CurvesOp.IsDone() == 0: + print "MakeSplineBezier : ", CurvesOp.GetErrorCode() return anObj -def MakeCone(p1,d1,radius1,radius2,height): - anObj = geom.MakeCone(p1,d1,radius1,radius2,height) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create B-Spline curve on the set of points. +# * \param thePoints Sequence of points for the B-Spline curve. +# * \return New GEOM_Object, containing the created B-Spline curve. +# +# * Example: see GEOM_TestAll.py +# +def MakeInterpol(thePoints): + anObj = CurvesOp.MakeSplineInterpolation(thePoints) + if CurvesOp.IsDone() == 0: + print "MakeSplineInterpolation : ", CurvesOp.GetErrorCode() return anObj -def MakeTorus(p1,d1,major_radius,minor_radius): - anObj = geom.MakeTorus(p1,d1,major_radius,minor_radius) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a sketcher (wire or face), following the textual description, +# * passed through \a theCommand argument. \n +# * Edges of the resulting wire or face will be arcs of circles and/or linear segments. \n +# * Format of the description string have to be the following: +# * +# * "Sketcher[:F x1 y1]:CMD[:CMD[:CMD...]]" +# * +# * Where: +# * - x1, y1 are coordinates of the first sketcher point (zero by default), +# * - CMD is one of +# * - "R angle" : Set the direction by angle +# * - "D dx dy" : Set the direction by DX & DY +# * . +# * \n +# * - "TT x y" : Create segment by point at X & Y +# * - "T dx dy" : Create segment by point with DX & DY +# * - "L length" : Create segment by direction & Length +# * - "IX x" : Create segment by direction & Intersect. X +# * - "IY y" : Create segment by direction & Intersect. Y +# * . +# * \n +# * - "C radius length" : Create arc by direction, radius and length(in degree) +# * . +# * \n +# * - "WW" : Close Wire (to finish) +# * - "WF" : Close Wire and build face (to finish) +# * +# * \param theCommand String, defining the sketcher in local +# * coordinates of the working plane. +# * \param theWorkingPlane Nine double values, defining origin, +# * OZ and OX directions of the working plane. +# * \return New GEOM_Object, containing the created wire. +# +# * Example: see GEOM_TestAll.py +# +def MakeSketcher(theCommand, theWorkingPlane = [0,0,0, 0,0,1, 1,0,0]): + anObj = CurvesOp.MakeSketcher(theCommand, theWorkingPlane) + if CurvesOp.IsDone() == 0: + print "MakeSketcher : ", CurvesOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Create base objects +# Create 3D Primitives # ----------------------------------------------------------------------------- -def MakeEdge(p1,p2): - anObj = geom.MakeEdge(p1,p2) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a box by coordinates of two opposite vertices. +# +# * Example: see GEOM_TestAll.py +# +def MakeBox(x1,y1,z1,x2,y2,z2): + pnt1 = MakeVertex(x1,y1,z1) + pnt2 = MakeVertex(x2,y2,z2) + return MakeBoxTwoPnt(pnt1,pnt2) + +# * Create a box with specified dimensions along the coordinate axes +# * and with edges, parallel to the coordinate axes. +# * Center of the box will be at point (DX/2, DY/2, DZ/2). +# * \param theDX Length of Box edges, parallel to OX axis. +# * \param theDY Length of Box edges, parallel to OY axis. +# * \param theDZ Length of Box edges, parallel to OZ axis. +# * \return New GEOM_Object, containing the created box. +# +# * Example: see GEOM_TestAll.py +# +def MakeBoxDXDYDZ(theDX, theDY, theDZ): + anObj = PrimOp.MakeBoxDXDYDZ(theDX, theDY, theDZ) + if PrimOp.IsDone() == 0: + print "MakeBoxDXDYDZ : ", PrimOp.GetErrorCode() + return anObj + +# * Create a box with two specified opposite vertices, +# * and with edges, parallel to the coordinate axes +# * \param thePnt1 First of two opposite vertices. +# * \param thePnt2 Second of two opposite vertices. +# * \return New GEOM_Object, containing the created box. +# +# * Example: see GEOM_TestAll.py +# +def MakeBoxTwoPnt(thePnt1, thePnt2): + anObj = PrimOp.MakeBoxTwoPnt(thePnt1, thePnt2) + if PrimOp.IsDone() == 0: + print "MakeBoxTwoPnt : ", PrimOp.GetErrorCode() + return anObj + +# * Create a cylinder with given base point, axis, radius and height. +# * \param thePnt Central point of cylinder base. +# * \param theAxis Cylinder axis. +# * \param theR Cylinder radius. +# * \param theH Cylinder height. +# * \return New GEOM_Object, containing the created cylinder. +# +# * Example: see GEOM_TestAll.py +# +def MakeCylinder(thePnt, theAxis, theR, theH): + anObj = PrimOp.MakeCylinderPntVecRH(thePnt, theAxis, theR, theH) + if PrimOp.IsDone() == 0: + print "MakeCylinderPntVecRH : ", PrimOp.GetErrorCode() + return anObj + +# * Create a cylinder with given radius and height at +# * the origin of coordinate system. Axis of the cylinder +# * will be collinear to the OZ axis of the coordinate system. +# * \param theR Cylinder radius. +# * \param theH Cylinder height. +# * \return New GEOM_Object, containing the created cylinder. +# +# * Example: see GEOM_TestAll.py +# +def MakeCylinderRH(theR, theH): + anObj = PrimOp.MakeCylinderRH(theR, theH) + if PrimOp.IsDone() == 0: + print "MakeCylinderRH : ", PrimOp.GetErrorCode() + return anObj + +# * Create a sphere with given center and radius. +# * \param thePnt Sphere center. +# * \param theR Sphere radius. +# * \return New GEOM_Object, containing the created sphere. +# +# * Example: see GEOM_TestAll.py +# +def MakeSpherePntR(thePnt, theR): + anObj = PrimOp.MakeSpherePntR(thePnt, theR) + if PrimOp.IsDone() == 0: + print "MakeSpherePntR : ", PrimOp.GetErrorCode() + return anObj + +# * Create a sphere with given center and radius. +# * \param x,y,z Coordinates of sphere center. +# * \param theR Sphere radius. +# * \return New GEOM_Object, containing the created sphere. +# +# * Example: see GEOM_TestAll.py +# +def MakeSphere(x, y, z, theR): + point = MakeVertex(x, y, z) + anObj = MakeSpherePntR(point, theR) return anObj -def MakeWire(ListShape): - anObj = geom.MakeWire(ListShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a sphere with given radius at the origin of coordinate system. +# * \param theR Sphere radius. +# * \return New GEOM_Object, containing the created sphere. +# +# * Example: see GEOM_TestAll.py +# +def MakeSphereR(theR): + anObj = PrimOp.MakeSphereR(theR) + if PrimOp.IsDone() == 0: + print "MakeSphereR : ", PrimOp.GetErrorCode() return anObj -def MakeFace(aShapeWire,WantPlanarFace): - anObj = geom.MakeFace(aShapeWire,WantPlanarFace) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a cone with given base point, axis, height and radiuses. +# * \param thePnt Central point of the first cone base. +# * \param theAxis Cone axis. +# * \param theR1 Radius of the first cone base. +# * \param theR2 Radius of the second cone base. +# * \note If both radiuses are non-zero, the cone will be truncated. +# * \note If the radiuses are equal, a cylinder will be created instead. +# * \param theH Cone height. +# * \return New GEOM_Object, containing the created cone. +# +# * Example: see GEOM_TestAll.py +# +def MakeCone(thePnt, theAxis, theR1, theR2, theH): + anObj = PrimOp.MakeConePntVecR1R2H(thePnt, theAxis, theR1, theR2, theH) + if PrimOp.IsDone() == 0: + print "MakeConePntVecR1R2H : ", PrimOp.GetErrorCode() return anObj -def MakeFaces(ListShape,WantPlanarFace): - anObj = geom.MakeFaces(ListShape,WantPlanarFace) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a cone with given height and radiuses at +# * the origin of coordinate system. Axis of the cone will +# * be collinear to the OZ axis of the coordinate system. +# * \param theR1 Radius of the first cone base. +# * \param theR2 Radius of the second cone base. +# * \note If both radiuses are non-zero, the cone will be truncated. +# * \note If the radiuses are equal, a cylinder will be created instead. +# * \param theH Cone height. +# * \return New GEOM_Object, containing the created cone. +# +# * Example: see GEOM_TestAll.py +# +def MakeConeR1R2H(theR1, theR2, theH): + anObj = PrimOp.MakeConeR1R2H(theR1, theR2, theH) + if PrimOp.IsDone() == 0: + print "MakeConeR1R2H : ", PrimOp.GetErrorCode() return anObj -def MakeCompound(ListShape): - anObj = geom.MakeCompound(ListShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a torus with given center, normal vector and radiuses. +# * \param thePnt Torus central point. +# * \param theVec Torus axis of symmetry. +# * \param theRMajor Torus major radius. +# * \param theRMinor Torus minor radius. +# * \return New GEOM_Object, containing the created torus. +# +# * Example: see GEOM_TestAll.py +# +def MakeTorus(thePnt, theVec, theRMajor, theRMinor): + anObj = PrimOp.MakeTorusPntVecRR(thePnt, theVec, theRMajor, theRMinor) + if PrimOp.IsDone() == 0: + print "MakeTorusPntVecRR : ", PrimOp.GetErrorCode() + return anObj + +# * Create a torus with given radiuses at the origin of coordinate system. +# * \param theRMajor Torus major radius. +# * \param theRMinor Torus minor radius. +# * \return New GEOM_Object, containing the created torus. +# +# * Example: see GEOM_TestAll.py +# +def MakeTorusRR(theRMajor, theRMinor): + anObj = PrimOp.MakeTorusRR(theRMajor, theRMinor) + if PrimOp.IsDone() == 0: + print "MakeTorusRR : ", PrimOp.GetErrorCode() + return anObj + +# * Create a shape by extrusion of the base shape along a vector, defined by two points. +# * \param theBase Base shape to be extruded. +# * \param thePoint1 First end of extrusion vector. +# * \param thePoint2 Second end of extrusion vector. +# * \return New GEOM_Object, containing the created prism. +# +# * Example: see GEOM_TestAll.py +# +def MakePrism(theBase, thePoint1, thePoint2): + anObj = PrimOp.MakePrismTwoPnt(theBase, thePoint1, thePoint2) + if PrimOp.IsDone() == 0: + print "MakePrismTwoPnt : ", PrimOp.GetErrorCode() + return anObj + +# * Create a shape by extrusion of the base shape along the vector, +# * i.e. all the space, transfixed by the base shape during its translation +# * along the vector on the given distance. +# * \param theBase Base shape to be extruded. +# * \param theVec Direction of extrusion. +# * \param theH Prism dimension along theVec. +# * \return New GEOM_Object, containing the created prism. +# +# * Example: see GEOM_TestAll.py +# +def MakePrismVecH(theBase, theVec, theH): + anObj = PrimOp.MakePrismVecH(theBase, theVec, theH) + if PrimOp.IsDone() == 0: + print "MakePrismVecH : ", PrimOp.GetErrorCode() + return anObj + +# * Create a shape by extrusion of the base shape along +# * the path shape. The path shape can be a wire or an edge. +# * \param theBase Base shape to be extruded. +# * \param thePath Path shape to extrude the base shape along it. +# * \return New GEOM_Object, containing the created pipe. +# +# * Example: see GEOM_TestAll.py +# +def MakePipe(theBase, thePath): + anObj = PrimOp.MakePipe(theBase, thePath) + if PrimOp.IsDone() == 0: + print "MakePipe : ", PrimOp.GetErrorCode() + return anObj + +# * Create a shape by revolution of the base shape around the axis +# * on the given angle, i.e. all the space, transfixed by the base +# * shape during its rotation around the axis on the given angle. +# * \param theBase Base shape to be rotated. +# * \param theAxis Rotation axis. +# * \param theAngle Rotation angle in radians. +# * \return New GEOM_Object, containing the created revolution. +# +# * Example: see GEOM_TestAll.py +# +def MakeRevolution(theBase, theAxis, theAngle): + anObj = PrimOp.MakeRevolutionAxisAngle(theBase, theAxis, theAngle) + if PrimOp.IsDone() == 0: + print "MakeRevolutionAxisAngle : ", PrimOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Create advanced objects +# Create base shapes # ----------------------------------------------------------------------------- -def MakeCopy(aShape): - anObj = geom.MakeCopy(aShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a linear edge with specified ends. +# * \param thePnt1 Point for the first end of edge. +# * \param thePnt2 Point for the second end of edge. +# * \return New GEOM_Object, containing the created edge. +# +# * Example: see GEOM_TestAll.py +# +def MakeEdge(thePnt1, thePnt2): + anObj = ShapesOp.MakeEdge(thePnt1, thePnt2) + if ShapesOp.IsDone() == 0: + print "MakeEdge : ", ShapesOp.GetErrorCode() + return anObj + +# * Create a wire from the set of edges and wires. +# * \param theEdgesAndWires List of edges and/or wires. +# * \return New GEOM_Object, containing the created wire. +# +# * Example: see GEOM_TestAll.py +# +def MakeWire(theEdgesAndWires): + anObj = ShapesOp.MakeWire(theEdgesAndWires) + if ShapesOp.IsDone() == 0: + print "MakeWire : ", ShapesOp.GetErrorCode() return anObj -def MakePrism(baseShape,p1,p2): - anObj = geom.MakePrism(baseShape,p1,p2) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a face on the given wire. +# * \param theWire Wire 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. +# +# * Example: see GEOM_TestAll.py +# +def MakeFace(theWire, isPlanarWanted): + anObj = ShapesOp.MakeFace(theWire, isPlanarWanted) + if ShapesOp.IsDone() == 0: + print "MakeFace : ", ShapesOp.GetErrorCode() return anObj -def MakeRevolution(aShape,axis,angle): - anObj = geom.MakeRevolution(aShape,axis,angle) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a face on the given wires set. +# * \param theWires List of wires 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. +# +# * Example: see GEOM_TestAll.py +# +def MakeFaceWires(theWires, isPlanarWanted): + anObj = ShapesOp.MakeFaceWires(theWires, isPlanarWanted) + if ShapesOp.IsDone() == 0: + print "MakeFaceWires : ", ShapesOp.GetErrorCode() return anObj -def MakeFilling(aShape,mindeg,maxdeg,tol3d,tol2d,nbiter): - anObj = geom.MakeFilling(aShape,mindeg,maxdeg,tol3d,tol2d,nbiter) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Shortcut to MakeFaceWires() +# +# * Example: see GEOM_TestOthers.py +# +def MakeFaces(theWires, isPlanarWanted): + anObj = MakeFaceWires(theWires, isPlanarWanted) return anObj -def MakePipe(pathShape,baseShape): - anObj = geom.MakePipe(pathShape,baseShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a shell from the set of faces and shells. +# * \param theFacesAndShells List of faces and/or shells. +# * \return New GEOM_Object, containing the created shell. +# +# * Example: see GEOM_TestAll.py +# +def MakeShell(theFacesAndShells): + anObj = ShapesOp.MakeShell(theFacesAndShells) + if ShapesOp.IsDone() == 0: + print "MakeShell : ", ShapesOp.GetErrorCode() return anObj -def MakeSewing(ListShape,precision): - anObj = geom.MakeSewing(ListShape,precision) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a solid, bounded by the given shells. +# * \param theShells Sequence of bounding shells. +# * \return New GEOM_Object, containing the created solid. +# +# * Example: see GEOM_TestAll.py +# +def MakeSolid(theShells): + anObj = ShapesOp.MakeSolidShells(theShells) + if ShapesOp.IsDone() == 0: + print "MakeSolid : ", ShapesOp.GetErrorCode() + return anObj + +# * Create a compound of the given shapes. +# * \param theShapes List of shapes to put in compound. +# * \return New GEOM_Object, containing the created compound. +# +# * Example: see GEOM_TestAll.py +# +def MakeCompound(theShapes): + anObj = ShapesOp.MakeCompound(theShapes) + if ShapesOp.IsDone() == 0: + print "MakeCompound : ", ShapesOp.GetErrorCode() + return anObj + +# * Reverses an orientation the given shape. +# * \param theShape Shape to be reversed. +# * \return The reversed copy of theShape. +# +# * Example: see GEOM_TestAll.py +# +def ChangeOrientation(theShape): + anObj = ShapesOp.ChangeOrientation(theShape) + if ShapesOp.IsDone() == 0: + print "ChangeOrientation : ", ShapesOp.GetErrorCode() + return anObj + +# * Shortcut to ChangeOrientation() +# +# * Example: see GEOM_TestOthers.py +# +def OrientationChange(theShape): + anObj = ChangeOrientation(theShape) return anObj # ----------------------------------------------------------------------------- -# Boolean (Common, Cut, Fuse, Section) +# Access to sub-shapes by their unique IDs inside the main shape. # ----------------------------------------------------------------------------- -def MakeBoolean(shape1,shape2,operation): - anObj = geom.MakeBoolean(shape1,shape2,operation) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Obtain a composite sub-shape of , composed from sub-shapes +# * of , selected by their unique IDs inside +# +# * Example: see GEOM_TestAll.py +# +def GetSubShape(aShape, ListOfID): + anObj = geom.AddSubShape(aShape,ListOfID) return anObj +# * Obtain unique ID of sub-shape inside +# +# * Example: see GEOM_TestAll.py +# +def GetSubShapeID(aShape, aSubShape): + anID = LocalOp.GetSubShapeIndex(aShape, aSubShape) + if LocalOp.IsDone() == 0: + print "GetSubShapeIndex : ", LocalOp.GetErrorCode() + return anID + # ----------------------------------------------------------------------------- -# Transform objects +# Decompose objects # ----------------------------------------------------------------------------- -def MakeTranslation(aShape,x,y,z): - anObj = geom.MakeTranslation(aShape,x,y,z) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Explode a shape on subshapes of a given type. +# * \param theShape Shape to be exploded. +# * \param theShapeType Type of sub-shapes to be retrieved. +# * \return List of sub-shapes of type theShapeType, contained in theShape. +# +# * Example: see GEOM_TestAll.py +# +def SubShapeAll(aShape, aType): + ListObj = ShapesOp.MakeExplode(aShape,aType,0) + if ShapesOp.IsDone() == 0: + print "MakeExplode : ", ShapesOp.GetErrorCode() + return ListObj + +# * Explode a shape on subshapes of a given type. +# * Sub-shapes will be sorted by coordinates of their gravity centers. +# * \param theShape Shape to be exploded. +# * \param theShapeType Type of sub-shapes to be retrieved. +# * \return List of sub-shapes of type theShapeType, contained in theShape. +# +# * Example: see GEOM_TestAll.py +# +def SubShapeAllSorted(aShape, aType): + ListObj = ShapesOp.MakeExplode(aShape,aType,1) + if ShapesOp.IsDone() == 0: + print "MakeExplode : ", ShapesOp.GetErrorCode() + return ListObj + +# * Obtain a compound of sub-shapes of , +# * selected by they indices in list of all sub-shapes of type . +# * Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] +# +# * Example: see GEOM_TestAll.py +# +def SubShape(aShape, aType, ListOfInd): + ListOfIDs = [] + AllShapeList = SubShapeAll(aShape, aType) + for ind in ListOfInd: + ListOfIDs.append(GetSubShapeID(aShape, AllShapeList[ind - 1])) + anObj = GetSubShape(aShape, ListOfIDs) + return anObj + +# * Obtain a compound of sub-shapes of , +# * selected by they indices in sorted list of all sub-shapes of type . +# * Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type] +# +# * Example: see GEOM_TestAll.py +# +def SubShapeSorted(aShape, aType, ListOfInd): + ListOfIDs = [] + AllShapeList = SubShapeAllSorted(aShape, aType) + for ind in ListOfInd: + ListOfIDs.append(GetSubShapeID(aShape, AllShapeList[ind - 1])) + anObj = GetSubShape(aShape, ListOfIDs) return anObj -def MakeRotation(aShape,axis,angle): - anObj = geom.MakeRotation(aShape,axis,angle) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# ----------------------------------------------------------------------------- +# Healing operations +# ----------------------------------------------------------------------------- + +# * Apply a sequence of Shape Healing operators to the given object. +# * \param theShape Shape to be processed. +# * \param theOperators List of names of operators ("FixShape", "SplitClosedFaces", etc.). +# * \param theParameters List of names of parameters +# * ("FixShape.Tolerance3d", "SplitClosedFaces.NbSplitPoints", etc.). +# * \param theValues List of values of parameters, in the same order +# * as parameters are listed in \a theParameters list. +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see GEOM_TestHealing.py +# +def ProcessShape(theShape, theOperators, theParameters, theValues): + anObj = HealOp.ProcessShape(theShape, theOperators, theParameters, theValues) + if HealOp.IsDone() == 0: + print "ProcessShape : ", HealOp.GetErrorCode() return anObj -def MakeScaleTransform(aShape,theCenterofScale,factor): - anObj = geom.MakeScaleTransform(aShape,theCenterofScale,factor) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Remove faces from the given object (shape). +# * \param theObject Shape to be processed. +# * \param theFaces Indices of faces to be removed, if EMPTY then the method +# * removes ALL faces of the given object. +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see GEOM_TestHealing.py +# +def SuppressFaces(theObject, theFaces): + anObj = HealOp.SuppressFaces(theObject, theFaces) + if HealOp.IsDone() == 0: + print "SuppressFaces : ", HealOp.GetErrorCode() return anObj -def MakeMirrorByPlane(aShape,aPlane): - anObj = geom.MakeMirrorByPlane(aShape,aPlane) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Sewing of some shapes into single shape. +# +# * Example: see GEOM_TestHealing.py +# +def MakeSewing(ListShape, theTolerance): + comp = MakeCompound(ListShape) + anObj = Sew(comp, theTolerance) return anObj -def OrientationChange(aShape): - anObj = geom.OrientationChange(aShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Sewing of the given object. +# * \param theObject Shape to be processed. +# * \param theTolerance Required tolerance value. +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see MakeSewing() above +# +def Sew(theObject, theTolerance): + anObj = HealOp.Sew(theObject, theTolerance) + if HealOp.IsDone() == 0: + print "Sew : ", HealOp.GetErrorCode() return anObj -def MakeFillet(aShape,radius,ShapeType,ListShape): - anObj = geom.MakeFillet(aShape,radius,ShapeType,ListShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Remove internal wires and edges from the given object (face). +# * \param theObject Shape to be processed. +# * \param theWires Indices of wires to be removed, if EMPTY then the method +# * removes ALL internal wires of the given object. +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see GEOM_TestHealing.py +# +def SuppressInternalWires(theObject, theWires): + anObj = HealOp.RemoveIntWires(theObject, theWires) + if HealOp.IsDone() == 0: + print "SuppressInternalWires : ", HealOp.GetErrorCode() return anObj -def MakeChamfer(aShape,d1,d2,ShapeType,ListShape): - anObj = geom.MakeChamfer(aShape,d1,d2,ShapeType,ListShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Remove internal closed contours (holes) from the given object. +# * \param theObject Shape to be processed. +# * \param theWires Indices of wires to be removed, if EMPTY then the method +# * removes ALL internal holes of the given object +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see GEOM_TestHealing.py +# +def SuppressHoles(theObject, theWires): + anObj = HealOp.FillHoles(theObject, theWires) + if HealOp.IsDone() == 0: + print "SuppressHoles : ", HealOp.GetErrorCode() + return anObj + +# * Close an open wire. +# * \param theObject Shape to be processed. +# * \param theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape, +# * if -1, then theObject itself is a wire. +# * \param isCommonVertex If TRUE : closure by creation of a common vertex, +# * If FALS : closure by creation of an edge between ends. +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see GEOM_TestHealing.py +# +def CloseContour(theObject, theWires, isCommonVertex): + anObj = HealOp.CloseContour(theObject, theWires, isCommonVertex) + if HealOp.IsDone() == 0: + print "CloseContour : ", HealOp.GetErrorCode() + return anObj + +# * Addition of a point to a given edge object. +# * \param theObject Shape to be processed. +# * \param theEdgeIndex Index of edge to be divided within theObject's shape, +# * if -1, then theObject itself is the edge. +# * \param theValue Value of parameter on edge or length parameter, +# * depending on \a isByParameter. +# * \param isByParameter If TRUE : \a theValue is treated as a curve parameter [0..1], +# * if FALSE : \a theValue is treated as a length parameter [0..1] +# * \return New GEOM_Object, containing processed shape. +# +# * Example: see GEOM_TestHealing.py +# +def DivideEdge(theObject, theEdgeIndex, theValue, isByParameter): + anObj = HealOp.DivideEdge(theObject, theEdgeIndex, theValue, isByParameter) + if HealOp.IsDone() == 0: + print "DivideEdge : ", HealOp.GetErrorCode() + return anObj + +# * Get a list of wires (wrapped in GEOM_Object-s), +# * that constitute a free boundary of the given shape. +# * \param theObject Shape to get free boundary of. +# * \return [status, theClosedWires, theOpenWires] +# * status: FALSE, if an error(s) occured during the method execution. +# * theClosedWires: Closed wires on the free boundary of the given shape. +# * theOpenWires: Open wires on the free boundary of the given shape. +# +# * Example: see GEOM_TestHealing.py +# +def GetFreeBoundary(theObject): + anObj = HealOp.GetFreeBoundary(theObject) + if HealOp.IsDone() == 0: + print "GetFreeBoundaries : ", HealOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Decompose objects +# Create advanced objects # ----------------------------------------------------------------------------- -def SubShape(aShape,type,ListOfId): - anObj = geom.SubShape(aShape,type, ListOfId) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a copy of the given object +# +# * Example: see GEOM_TestAll.py +# +def MakeCopy(theOriginal): + anObj = InsertOp.MakeCopy(theOriginal) + if InsertOp.IsDone() == 0: + print "MakeCopy : ", InsertOp.GetErrorCode() return anObj -def SubShapeAll(aShape,type): - ListObj = geom.SubShapeAll(aShape,type) - for anObj in ListObj : - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) - return ListObj +# * Create a filling from the given compound of contours. +# * \param theShape the compound of contours +# * \param theMinDeg a minimal degree +# * \param theMaxDeg a maximal degree +# * \param theTol2D a 2d tolerance +# * \param theTol3D a 3d tolerance +# * \param theNbIter a number of iteration +# * \return New GEOM_Object, containing the created filling surface. +# +# * Example: see GEOM_TestAll.py +# +def MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter): + anObj = PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter) + if PrimOp.IsDone() == 0: + print "MakeFilling : ", PrimOp.GetErrorCode() + return anObj -def SubShapeSorted(aShape,type,ListOfId): - anObj = geom.SubShapeSorted(aShape,type, ListOfId) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Replace coincident faces in theShape by one face. +# * \param theShape Initial shape. +# * \param theTolerance Maximum distance between faces, which can be considered as coincident. +# * \return New GEOM_Object, containing a copy of theShape without coincident faces. +# +# * Example: see GEOM_Spanner.py +# +def MakeGlueFaces(theShape, theTolerance): + anObj = ShapesOp.MakeGlueFaces(theShape, theTolerance) + if ShapesOp.IsDone() == 0: + print "MakeGlueFaces : ", ShapesOp.GetErrorCode() return anObj -def SubShapeAllSorted(aShape,type): - ListObj = geom.SubShapeAllSorted(aShape,type) - for anObj in ListObj : - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) - return ListObj +# ----------------------------------------------------------------------------- +# Boolean (Common, Cut, Fuse, Section) +# ----------------------------------------------------------------------------- -# -- enumeration ShapeType as a dictionary -- -ShapeType = {"COMPOUND":0, "COMPSOLID":1, "SOLID":2, "SHELL":3, "FACE":4, "WIRE":5, "EDGE":6, "VERTEX":7, "SHAPE":8} +# * Perform one of boolean operations on two given shapes. +# * \param theShape1 First argument for boolean operation. +# * \param theShape2 Second argument for boolean operation. +# * \param theOperation Indicates the operation to be done: +# * 1 - Common, 2 - Cut, 3 - Fuse, 4 - Section. +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_TestAll.py +# +def MakeBoolean(theShape1, theShape2, theOperation): + anObj = BoolOp.MakeBoolean(theShape1, theShape2, theOperation) + if BoolOp.IsDone() == 0: + print "MakeBoolean : ", BoolOp.GetErrorCode() + return anObj -def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], Limit=ShapeType["SHAPE"]): - anObj = geom.Partition(ListShapes, ListTools, ListKeepInside, ListRemoveInside, Limit); - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Shortcuts to MakeBoolean() for certain operations +# +# * Example: see GEOM_TestOthers.py +# +def MakeCommon(s1, s2): + return MakeBoolean(s1, s2, 1) +# +def MakeCut(s1, s2): + return MakeBoolean(s1, s2, 2) +# +def MakeFuse(s1, s2): + return MakeBoolean(s1, s2, 3) +# +def MakeSection(s1, s2): + return MakeBoolean(s1, s2, 4) + +# * Perform partition operation. +# * \param ListShapes Shapes to be intersected. +# * \param ListTools Shapes to intersect theShapes. +# * \param ListKeepInside Shapes, outside which the results will be deleted. +# * Each shape from theKeepInside must belong to theShapes also. +# * \param ListRemoveInside Shapes, inside which the results will be deleted. +# * Each shape from theRemoveInside must belong to theShapes also. +# * \param Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum). +# * \param RemoveWebs If TRUE, perform Glue 3D algorithm. +# * \param ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE. +# * \return New GEOM_Object, containing the result shapes. +# +# * Example: see GEOM_TestAll.py +# +def MakePartition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], + Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]): + anObj = BoolOp.MakePartition(ListShapes, ListTools, + ListKeepInside, ListRemoveInside, + Limit, RemoveWebs, ListMaterials); + if BoolOp.IsDone() == 0: + print "MakePartition : ", BoolOp.GetErrorCode() return anObj -def SuppressFaces(aShape,ListOfId): - ListObj = geom.SuppressFaces(aShape,ListOfId) - for anObj in ListObj : - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) - return ListObj +# * Shortcut to MakePartition() +# +# * Example: see GEOM_TestOthers.py +# +def Partition(ListShapes, ListTools=[], ListKeepInside=[], ListRemoveInside=[], + Limit=ShapeType["SHAPE"], RemoveWebs=0, ListMaterials=[]): + anObj = MakePartition(ListShapes, ListTools, + ListKeepInside, ListRemoveInside, + Limit, RemoveWebs, ListMaterials); + return anObj + +# ----------------------------------------------------------------------------- +# Transform objects +# ----------------------------------------------------------------------------- -def SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace): - anObj = geom.SuppressHole(aShape,ListOfFace,ListOfWire,ListOfEndFace) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Translate the given object along the vector, specified +# * by its end points, creating its copy before the translation. +# * \param theObject The object to be translated. +# * \param thePoint1 Start point of translation vector. +# * \param thePoint2 End point of translation vector. +# * \return New GEOM_Object, containing the translated object. +# +# * Example: see GEOM_TestAll.py +# +def MakeTranslationTwoPoints(theObject, thePoint1, thePoint2): + anObj = TrsfOp.TranslateTwoPointsCopy(theObject, thePoint1, thePoint2) + if TrsfOp.IsDone() == 0: + print "TranslateTwoPointsCopy : ", TrsfOp.GetErrorCode() + return anObj + +# * Translate the given object along the vector, specified +# * by its components, creating its copy before the translation. +# * \param theObject The object to be translated. +# * \param theDX,theDY,theDZ Components of translation vector. +# * \return New GEOM_Object, containing the translated object. +# +# * Example: see GEOM_TestAll.py +# +def MakeTranslation(theObject, theDX, theDY, theDZ): + anObj = TrsfOp.TranslateDXDYDZCopy(theObject, theDX, theDY, theDZ) + if TrsfOp.IsDone() == 0: + print "TranslateDXDYDZCopy : ", TrsfOp.GetErrorCode() + return anObj + +# * Rotate the given object around the given axis +# * on the given angle, creating its copy before the rotatation. +# * \param theObject The object to be rotated. +# * \param theAxis Rotation axis. +# * \param theAngle Rotation angle in radians. +# * \return New GEOM_Object, containing the rotated object. +# +# * Example: see GEOM_TestAll.py +# +def MakeRotation(theObject, theAxis, theAngle): + anObj = TrsfOp.RotateCopy(theObject, theAxis, theAngle) + if TrsfOp.IsDone() == 0: + print "RotateCopy : ", TrsfOp.GetErrorCode() + return anObj + +# * Scale the given object by the factor, creating its copy before the scaling. +# * \param theObject The object to be scaled. +# * \param thePoint Center point for scaling. +# * \param theFactor Scaling factor value. +# * \return New GEOM_Object, containing the scaled shape. +# +# * Example: see GEOM_TestAll.py +# +def MakeScaleTransform(theObject, thePoint, theFactor): + anObj = TrsfOp.ScaleShapeCopy(theObject, thePoint, theFactor) + if TrsfOp.IsDone() == 0: + print "ScaleShapeCopy : ", TrsfOp.GetErrorCode() + return anObj + +# * Create an object, symmetrical +# * to the given one relatively the given plane. +# * \param theObject The object to be mirrored. +# * \param thePlane Plane of symmetry. +# * \return New GEOM_Object, containing the mirrored shape. +# +# * Example: see GEOM_TestAll.py +# +def MakeMirrorByPlane(theObject, thePlane): + anObj = TrsfOp.MirrorPlaneCopy(theObject, thePlane) + if TrsfOp.IsDone() == 0: + print "MirrorPlaneCopy : ", TrsfOp.GetErrorCode() + return anObj + +# * Modify the Location of the given object by LCS +# * creating its copy before the setting +# +# * Example: see GEOM_TestAll.py +# +def MakePosition(theObject, theStartLCS, theEndLCS): + anObj = TrsfOp.PositionShapeCopy(theObject, theStartLCS, theEndLCS) + if TrsfOp.IsDone() == 0: + print "PositionShapeCopy : ", TrsfOp.GetErrorCode() + return anObj + +# * Create new object as offset of the given one. +# * \param theObject The base object for the offset. +# * \param theOffset Offset value. +# * \return New GEOM_Object, containing the offset object. +# +# * Example: see GEOM_TestAll.py +# +def MakeOffset(theObject, theOffset): + anObj = TrsfOp.OffsetShapeCopy(theObject, theOffset) + if TrsfOp.IsDone() == 0: + print "OffsetShapeCopy : ", TrsfOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- # Patterns # ----------------------------------------------------------------------------- -def MakeMultiTranslation1D(aShape,aDir,aStep,aNbTimes): - anObj = geom.MakeMultiTranslation1D(aShape,aDir,aStep,aNbTimes) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Translate the given object along the given vector a given number times +# * \param theObject The object to be translated. +# * \param theVector Direction of the translation. +# * \param theStep Distance to translate on. +# * \param theNbTimes Quantity of translations to be done. +# * \return New GEOM_Object, containing compound of all +# * the shapes, obtained after each translation. +# +# * Example: see GEOM_TestAll.py +# +def MakeMultiTranslation1D(theObject, theVector, theStep, theNbTimes): + anObj = TrsfOp.MultiTranslate1D(theObject, theVector, theStep, theNbTimes) + if TrsfOp.IsDone() == 0: + print "MultiTranslate1D : ", TrsfOp.GetErrorCode() + return anObj + +# * Conseqently apply two specified translations to theObject specified number of times. +# * \param theObject The object to be translated. +# * \param theVector1 Direction of the first translation. +# * \param theStep1 Step of the first translation. +# * \param theNbTimes1 Quantity of translations to be done along theVector1. +# * \param theVector2 Direction of the second translation. +# * \param theStep2 Step of the second translation. +# * \param theNbTimes2 Quantity of translations to be done along theVector2. +# * \return New GEOM_Object, containing compound of all +# * the shapes, obtained after each translation. +# +# * Example: see GEOM_TestAll.py +# +def MakeMultiTranslation2D(theObject, theVector1, theStep1, theNbTimes1, + theVector2, theStep2, theNbTimes2): + anObj = TrsfOp.MultiTranslate2D(theObject, theVector1, theStep1, theNbTimes1, + theVector2, theStep2, theNbTimes2) + if TrsfOp.IsDone() == 0: + print "MultiTranslate2D : ", TrsfOp.GetErrorCode() + return anObj + +# * Rotate the given object around the given axis a given number times. +# * Rotation angle will be 2*PI/theNbTimes. +# * \param theObject The object to be rotated. +# * \param theAxis The rotation axis. +# * \param theNbTimes Quantity of rotations to be done. +# * \return New GEOM_Object, containing compound of all the +# * shapes, obtained after each rotation. +# +# * Example: see GEOM_TestAll.py +# +def MultiRotate1D(theObject, theAxis, theNbTimes): + anObj = TrsfOp.MultiRotate1D(theObject, theAxis, theNbTimes) + if TrsfOp.IsDone() == 0: + print "MultiRotate1D : ", TrsfOp.GetErrorCode() return anObj -def MakeMultiTranslation2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2): - anObj = geom.MakeMultiTranslation2D(aShape,d1,step1,nbtimes1,d2,step2,nbtimes2) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Rotate the given object around the +# * given axis on the given angle a given number +# * times and multi-translate each rotation result. +# * Translation direction passes through center of gravity +# * of rotated shape and its projection on the rotation axis. +# * \param theObject The object to be rotated. +# * \param theAxis Rotation axis. +# * \param theAngle Rotation angle in graduces. +# * \param theNbTimes1 Quantity of rotations to be done. +# * \param theStep Translation distance. +# * \param theNbTimes2 Quantity of translations to be done. +# * \return New GEOM_Object, containing compound of all the +# * shapes, obtained after each transformation. +# +# * Example: see GEOM_TestAll.py +# +def MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2): + anObj = TrsfOp.MultiRotate2D(theObject, theAxis, theAngle, theNbTimes1, theStep, theNbTimes2) + if TrsfOp.IsDone() == 0: + print "MultiRotate2D : ", TrsfOp.GetErrorCode() return anObj +# * The same, as MultiRotate1D(), but axis is given by direction and point +# +# * Example: see GEOM_TestOthers.py +# def MakeMultiRotation1D(aShape,aDir,aPoint,aNbTimes): - anObj = geom.MakeMultiRotation1D(aShape,aDir,aPoint,aNbTimes) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) + aVec = MakeLine(aPoint,aDir) + anObj = MultiRotate1D(aShape,aVec,aNbTimes) return anObj +# * The same, as MultiRotate2D(), but axis is given by direction and point +# +# * Example: see GEOM_TestOthers.py +# def MakeMultiRotation2D(aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2): - anObj = geom.MakeMultiRotation2D(aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) + aVec = MakeLine(aPoint,aDir) + anObj = MultiRotate2D(aShape,aVec,anAngle,nbtimes1,aStep,nbtimes2) return anObj # ----------------------------------------------------------------------------- -# Import objects +# Local operations # ----------------------------------------------------------------------------- -def ImportBREP(filename): - anObj = geom.ImportBREP(filename) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Perform a fillet on all edges of the given shape. +# * \param theShape Shape, to perform fillet on. +# * \param theR Fillet radius. +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_TestOthers.py +# +def MakeFilletAll(theShape, theR): + anObj = LocalOp.MakeFilletAll(theShape, theR) + if LocalOp.IsDone() == 0: + print "MakeFilletAll : ", LocalOp.GetErrorCode() + return anObj + +# * Perform a fillet on the specified edges/faces of the given shape +# * \param theShape Shape, to perform fillet on. +# * \param theR Fillet radius. +# * \param theShapeType Type of shapes in . +# * \param theListShapes Global indices of edges/faces to perform fillet on. +# * \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_TestAll.py +# +def MakeFillet(theShape, theR, theShapeType, theListShapes): + anObj = None + if theShapeType == ShapeType["EDGE"]: + anObj = LocalOp.MakeFilletEdges(theShape, theR, theListShapes) + else: + anObj = LocalOp.MakeFilletFaces(theShape, theR, theListShapes) + if LocalOp.IsDone() == 0: + print "MakeFillet : ", LocalOp.GetErrorCode() return anObj -def ImportIGES(filename): - anObj = geom.ImportIGES(filename) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Perform a symmetric chamfer on all edges of the given shape. +# * \param theShape Shape, to perform chamfer on. +# * \param theD Chamfer size along each face. +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_TestOthers.py +# +def MakeChamferAll(theShape, theD): + anObj = LocalOp.MakeChamferAll(theShape, theD) + if LocalOp.IsDone() == 0: + print "MakeChamferAll : ", LocalOp.GetErrorCode() return anObj -def ImportSTEP(filename): - anObj = geom.ImportSTEP(filename) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Perform a chamfer on edges, common to the specified faces, +# * with distance D1 on the Face1 +# * \param theShape Shape, to perform chamfer on. +# * \param theD1 Chamfer size along \a theFace1. +# * \param theD2 Chamfer size along \a theFace2. +# * \param theFace1,theFace2 Global indices of two faces of \a theShape. +# * \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeID(). +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_TestAll.py +# +def MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2): + anObj = LocalOp.MakeChamferEdge(theShape, theD1, theD2, theFace1, theFace2) + if LocalOp.IsDone() == 0: + print "MakeChamferEdge : ", LocalOp.GetErrorCode() + return anObj + +# * Perform a chamfer on all edges of the specified faces, +# * with distance D1 on the first specified face (if several for one edge) +# * \param theShape Shape, to perform chamfer on. +# * \param theD1 Chamfer size along face from \a theFaces. If both faces, +# * connected to the edge, are in \a theFaces, \a theD1 +# * will be get along face, which is nearer to \a theFaces beginning. +# * \param theD2 Chamfer size along another of two faces, connected to the edge. +# * \param theFaces Sequence of global indices of faces of \a theShape. +# * \note Global index of sub-shape can be obtained, using method geompy.GetSubShapeIndex(). +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_TestAll.py +# +def MakeChamferFaces(theShape, theD1, theD2, theFaces): + anObj = LocalOp.MakeChamferFaces(theShape, theD1, theD2, theFaces) + if LocalOp.IsDone() == 0: + print "MakeChamferFaces : ", LocalOp.GetErrorCode() + return anObj + +# * Shortcut to MakeChamferEdge() and MakeChamferFaces() +# +# * Example: see GEOM_TestOthers.py +# +def MakeChamfer(aShape,d1,d2,aShapeType,ListShape): + anObj = None + if aShapeType == ShapeType["EDGE"]: + anObj = MakeChamferEdge(aShape,d1,d2,ListShape[0],ListShape[1]) + else: + anObj = MakeChamferFaces(aShape,d1,d2,ListShape) + return anObj + +# * Perform an Archimde operation on the given shape with given parameters. +# * The object presenting the resulting face is returned +# * \param theShape Shape to be put in water. +# * \param theWeight Weight og the shape. +# * \param theWaterDensity Density of the water. +# * \param theMeshDeflection Deflection of the mesh, using to compute the section. +# * \return New GEOM_Object, containing a section of \a theShape +# * by a plane, corresponding to water level. +# +# * Example: see GEOM_TestAll.py +# +def Archimede(theShape, theWeight, theWaterDensity, theMeshDeflection): + anObj = LocalOp.MakeArchimede(theShape, theWeight, theWaterDensity, theMeshDeflection) + if LocalOp.IsDone() == 0: + print "MakeArchimede : ", LocalOp.GetErrorCode() return anObj # ----------------------------------------------------------------------------- -# Export objects +# Information objects # ----------------------------------------------------------------------------- -def ExportBREP(filename,aShape): - geom.ExportBREP(filename,aShape) -def ExportIGES(filename,aShape): - geom.ExportIGES(filename,aShape) +# * Get point coordinates +# * \return [x, y, z] +# +# * Example: see GEOM_TestMeasures.py +# +def PointCoordinates(Point): + aTuple = MeasuOp.PointCoordinates(Point) + if MeasuOp.IsDone() == 0: + print "PointCoordinates : ", MeasuOp.GetErrorCode() + return aTuple + +# * Get summarized length of all wires, +# * area of surface and volume of the given shape. +# * \param theShape Shape to define properties of. +# * \return [theLength, theSurfArea, theVolume] +# * theLength: Summarized length of all wires of the given shape. +# * theSurfArea: Area of surface of the given shape. +# * theVolume: Volume of the given shape. +# +# * Example: see GEOM_TestMeasures.py +# +def BasicProperties(theShape): + aTuple = MeasuOp.GetBasicProperties(theShape) + if MeasuOp.IsDone() == 0: + print "BasicProperties : ", MeasuOp.GetErrorCode() + return aTuple + +# * Get parameters of bounding box of the given shape +# * \param theShape Shape to obtain bounding box of. +# * \return [Xmin,Xmax, Ymin,Ymax, Zmin,Zmax] +# * Xmin,Xmax: Limits of shape along OX axis. +# * Ymin,Ymax: Limits of shape along OY axis. +# * Zmin,Zmax: Limits of shape along OZ axis. +# +# * Example: see GEOM_TestMeasures.py +# +def BoundingBox(theShape): + aTuple = MeasuOp.GetBoundingBox(theShape) + if MeasuOp.IsDone() == 0: + print "BoundingBox : ", MeasuOp.GetErrorCode() + return aTuple + +# * Get inertia matrix and moments of inertia of theShape. +# * \param theShape Shape to calculate inertia of. +# * \return [I11,I12,I13, I21,I22,I23, I31,I32,I33, Ix,Iy,Iz] +# * I(1-3)(1-3): Components of the inertia matrix of the given shape. +# * Ix,Iy,Iz: Moments of inertia of the given shape. +# +# * Example: see GEOM_TestMeasures.py +# +def Inertia(theShape): + aTuple = MeasuOp.GetInertia(theShape) + if MeasuOp.IsDone() == 0: + print "Inertia : ", MeasuOp.GetErrorCode() + return aTuple + +# * Get minimal distance between the given shapes. +# * \param theShape1,theShape2 Shapes to find minimal distance between. +# * \return Value of the minimal distance between the given shapes. +# +# * Example: see GEOM_TestMeasures.py +# +def MinDistance(theShape1, theShape2): + aTuple = MeasuOp.GetMinDistance(theShape1, theShape2) + if MeasuOp.IsDone() == 0: + print "MinDistance : ", MeasuOp.GetErrorCode() + return aTuple[0] + +# * Get min and max tolerances of sub-shapes of theShape +# * \param theShape Shape, to get tolerances of. +# * \return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax] +# * FaceMin,FaceMax: Min and max tolerances of the faces. +# * EdgeMin,EdgeMax: Min and max tolerances of the edges. +# * VertMin,VertMax: Min and max tolerances of the vertices. +# +# * Example: see GEOM_TestMeasures.py +# +def Tolerance(theShape): + aTuple = MeasuOp.GetTolerance(theShape) + if MeasuOp.IsDone() == 0: + print "Tolerance : ", MeasuOp.GetErrorCode() + return aTuple + +# * Obtain description of the given shape (number of sub-shapes of each type) +# * \param theShape Shape to be described. +# * \return Description of the given shape. +# +# * Example: see GEOM_TestMeasures.py +# +def WhatIs(theShape): + aDescr = MeasuOp.WhatIs(theShape) + if MeasuOp.IsDone() == 0: + print "WhatIs : ", MeasuOp.GetErrorCode() + return aDescr + +# * Get a point, situated at the centre of mass of theShape. +# * \param theShape Shape to define centre of mass of. +# * \return New GEOM_Object, containing the created point. +# +# * Example: see GEOM_TestMeasures.py +# +def MakeCDG(theShape): + anObj = MeasuOp.GetCentreOfMass(theShape) + if MeasuOp.IsDone() == 0: + print "GetCentreOfMass : ", MeasuOp.GetErrorCode() + return anObj -def ExportSTEP(filename,aShape): - geom.ExportSTEP(filename,aShape) +# * Check a topology of the given shape. +# * \param theShape Shape to check validity of. +# * \return TRUE, if the shape "seems to be valid" from the topological point of view. +# * If theShape is invalid, prints a description of problem. +# +# * Example: see GEOM_TestMeasures.py +# +def CheckShape(theShape): + (IsValid, Status) = MeasuOp.CheckShape(theShape) + if MeasuOp.IsDone() == 0: + print "CheckShape : ", MeasuOp.GetErrorCode() + else: + if IsValid == 0: + print Status + return IsValid # ----------------------------------------------------------------------------- -# Information objects +# Import/Export objects +# ----------------------------------------------------------------------------- + +# * Import a shape from the BREP or IGES or STEP file +# * (depends on given format) with given name. +# * \param theFileName The file, containing the shape. +# * \param theFormatName Specify format for the file reading. +# * Available formats can be obtained with InsertOp.ImportTranslators() method. +# * \return New GEOM_Object, containing the imported shape. +# +# * Example: see GEOM_TestOthers.py +# +def Import(theFileName, theFormatName): + anObj = InsertOp.Import(theFileName, theFormatName) + if InsertOp.IsDone() == 0: + print "Import : ", InsertOp.GetErrorCode() + return anObj + +# * Shortcuts to Import() for certain formats +# +# * Example: see GEOM_TestOthers.py +# +def ImportBREP(theFileName): + return Import(theFileName, "BREP") +# +def ImportIGES(theFileName): + return Import(theFileName, "IGES") +# +def ImportSTEP(theFileName): + return Import(theFileName, "STEP") + +# * Export the given shape into a file with given name. +# * \param theObject Shape to be stored in the file. +# * \param theFileName Name of the file to store the given shape in. +# * \param theFormatName Specify format for the shape storage. +# * Available formats can be obtained with InsertOp.ImportTranslators() method. +# +# * Example: see GEOM_TestOthers.py +# +def Export(theObject, theFileName, theFormatName): + InsertOp.Export(theObject, theFileName, theFormatName) + if InsertOp.IsDone() == 0: + print "Export : ", InsertOp.GetErrorCode() + +# * Shortcuts to Export() for certain formats +# +# * Example: see GEOM_TestOthers.py +# +def ExportBREP(theObject, theFileName): + return Export(theObject, theFileName, "BREP") +# +def ExportIGES(theObject, theFileName): + return Export(theObject, theFileName, "IGES") +# +def ExportSTEP(theObject, theFileName): + return Export(theObject, theFileName, "STEP") + +# ----------------------------------------------------------------------------- +# Block operations # ----------------------------------------------------------------------------- -def MakeCDG(aShape): - anObj = geom.MakeCDG(aShape) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Create a quadrangle face from four edges. Order of Edges is not +# * important. It is not necessary that edges share the same vertex. +# * \param E1,E2,E3,E4 Edges for the face bound. +# * \return New GEOM_Object, containing the created face. +# +# * Example: see GEOM_Spanner.py +# +def MakeQuad(E1, E2, E3, E4): + anObj = BlocksOp.MakeQuad(E1, E2, E3, E4) + if BlocksOp.IsDone() == 0: + print "MakeQuad : ", BlocksOp.GetErrorCode() + return anObj + +# * Create a quadrangle face on two edges. +# * The missing edges will be built by creating the shortest ones. +# * \param E1,E2 Two opposite edges for the face. +# * \return New GEOM_Object, containing the created face. +# +# * Example: see GEOM_Spanner.py +# +def MakeQuad2Edges(E1, E2): + anObj = BlocksOp.MakeQuad2Edges(E1, E2) + if BlocksOp.IsDone() == 0: + print "MakeQuad2Edges : ", BlocksOp.GetErrorCode() + return anObj + +# * Create a quadrangle face with specified corners. +# * The missing edges will be built by creating the shortest ones. +# * \param V1,V2,V3,V4 Corner vertices for the face. +# * \return New GEOM_Object, containing the created face. +# +# * Example: see GEOM_Spanner.py +# +def MakeQuad4Vertices(V1, V2, V3, V4): + anObj = BlocksOp.MakeQuad4Vertices(V1, V2, V3, V4) + if BlocksOp.IsDone() == 0: + print "MakeQuad4Vertices : ", BlocksOp.GetErrorCode() + return anObj + +# * Create a hexahedral solid, bounded by the six given faces. Order of +# * faces is not important. It is not necessary that Faces share the same edge. +# * \param F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid. +# * \return New GEOM_Object, containing the created solid. +# +# * Example: see GEOM_Spanner.py +# +def MakeHexa(F1, F2, F3, F4, F5, F6): + anObj = BlocksOp.MakeHexa(F1, F2, F3, F4, F5, F6) + if BlocksOp.IsDone() == 0: + print "MakeHexa : ", BlocksOp.GetErrorCode() + return anObj + +# * Create a hexahedral solid between two given faces. +# * The missing faces will be built by creating the smallest ones. +# * \param F1,F2 Two opposite faces for the hexahedral solid. +# * \return New GEOM_Object, containing the created solid. +# +# * Example: see GEOM_Spanner.py +# +def MakeHexa2Faces(F1, F2): + anObj = BlocksOp.MakeHexa2Faces(F1, F2) + if BlocksOp.IsDone() == 0: + print "MakeHexa2Faces : ", BlocksOp.GetErrorCode() + return anObj + +# * Multi-transformate block and glue the result. +# * Transformation is defined so, as to superpose direction faces. +# * \param Block Hexahedral solid to be multi-transformed. +# * \param DirFace1 ID of First direction face. +# * \param DirFace2 ID of Second direction face. +# * \param NbTimes Quantity of transformations to be done. +# * \note Unique ID of sub-shape can be obtained, using method GetSubShapeID(). +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_Spanner.py +# +def MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes): + anObj = BlocksOp.MakeMultiTransformation1D(Block, DirFace1, DirFace2, NbTimes) + if BlocksOp.IsDone() == 0: + print "MakeMultiTransformation1D : ", BlocksOp.GetErrorCode() + return anObj + +# * Multi-transformate block and glue the result. +# * \param Block Hexahedral solid to be multi-transformed. +# * \param DirFace1U,DirFace2U IDs of Direction faces for the first transformation. +# * \param DirFace1V,DirFace2V IDs of Direction faces for the second transformation. +# * \param NbTimesU,NbTimesV Quantity of transformations to be done. +# * \return New GEOM_Object, containing the result shape. +# +# * Example: see GEOM_Spanner.py +# +def MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU, + DirFace1V, DirFace2V, NbTimesV): + anObj = BlocksOp.MakeMultiTransformation2D(Block, DirFace1U, DirFace2U, NbTimesU, + DirFace1V, DirFace2V, NbTimesV) + if BlocksOp.IsDone() == 0: + print "MakeMultiTransformation2D : ", BlocksOp.GetErrorCode() return anObj -def Archimede(aShape,weight,WaterDensity,MeshingDeflection): - anObj = geom.Archimede(aShape,weight,WaterDensity,MeshingDeflection) - ior = salome.orb.object_to_string(anObj) - anObj._set_Name(ior) +# * Get all the blocks, contained in the given compound. +# * \param theCompound The compound to explode. +# * \param theMinNbFaces If solid has lower number of faces, it is not a block. +# * \param theMaxNbFaces If solid has higher number of faces, it is not a block. +# * \note If theMaxNbFaces = 0, the maximum number of faces is not restricted. +# * \return List of GEOM_Objects, containing the retrieved blocks. +# +# * Example: see GEOM_TestOthers.py +# +def MakeBlockExplode(theCompound, theMinNbFaces, theMaxNbFaces): + aList = BlocksOp.ExplodeCompoundOfBlocks(theCompound, theMinNbFaces, theMaxNbFaces) + if BlocksOp.IsDone() == 0: + print "MakeBlockExplode : ", BlocksOp.GetErrorCode() + return aList + +# * Check, if the compound of blocks is given. +# * To be considered as a compound of blocks, the +# * given shape must satisfy the following conditions: +# * - Each element of the compound should be a Block (6 faces and 12 edges). +# * - A connection between two Blocks should be an entire quadrangle face or an entire edge. +# * - The compound should be connexe. +# * - The glue between two quadrangle faces should be applied. +# * \param theCompound The compound to check. +# * \return TRUE, if the given shape is a compound of blocks. +# * If theCompound is not valid, prints all discovered errors. +# +# * Example: see GEOM_TestOthers.py +# +def CheckCompoundOfBlocks(theCompound): + (IsValid, BCErrors) = BlocksOp.CheckCompoundOfBlocks(theCompound) + if BlocksOp.IsDone() == 0: + print "CheckCompoundOfBlocks : ", BlocksOp.GetErrorCode() + else: + if IsValid == 0: + Descr = BlocksOp.PrintBCErrors(theCompound, BCErrors) + print Descr + return IsValid + +# ----------------------------------------------------------------------------- +# Group operations +# ----------------------------------------------------------------------------- + +# * Creates a new group which will store sub shapes of theMainShape +# * \param theMainShape is a GEOM object on which the group is selected +# * \param theShapeType defines a shape type of the group +# * \return a newly created GEOM group +# +# * Example: see GEOM_TestOthers.py +# +def CreateGroup(theMainShape, theShapeType): + anObj = GroupOp.CreateGroup(theMainShape, theShapeType) + if GroupOp.IsDone() == 0: + print "CreateGroup : ", GroupOp.GetErrorCode() return anObj -def CheckShape(aShape): - Status = geom.CheckShape(aShape) - return Status +# * Adds a sub object with ID theSubShapeId to the group +# * \param theGroup is a GEOM group to which the new sub shape is added +# * \param theSubShapeID is a sub shape ID in the main object. +# * \note Use method GetSubShapeID() to get an unique ID of the sub shape +# +# * Example: see GEOM_TestOthers.py +# +def AddObject(theGroup, theSubShapeID): + GroupOp.AddObject(theGroup, theSubShapeID) + if GroupOp.IsDone() == 0: + print "AddObject : ", GroupOp.GetErrorCode() + +# * Removes a sub object with ID \a theSubShapeId from the group +# * \param theGroup is a GEOM group from which the new sub shape is removed +# * \param theSubShapeID is a sub shape ID in the main object. +# * \note Use method GetSubShapeID() to get an unique ID of the sub shape +# +# * Example: see GEOM_TestOthers.py +# +def RemoveObject(theGroup, theSubShapeID): + GroupOp.RemoveObject(theGroup, theSubShapeID) + if GroupOp.IsDone() == 0: + print "RemoveObject : ", GroupOp.GetErrorCode() + +# * Returns a list of sub objects ID stored in the group +# * \param theGroup is a GEOM group for which a list of IDs is requested +# +# * Example: see GEOM_TestOthers.py +# +def GetObjectIDs(theGroup): + ListIDs = GroupOp.GetObjects(theGroup) + if GroupOp.IsDone() == 0: + print "GetObjectIDs : ", GroupOp.GetErrorCode() + return ListIDs + +# Add Path to the system path +# +def addPath(Path): + if (sys.path.count(Path) < 1): + sys.path.append(Path) diff --git a/src/GenerationGUI/GenerationGUI.cxx b/src/GenerationGUI/GenerationGUI.cxx index 78bc4fdeb..b6ba761b3 100644 --- a/src/GenerationGUI/GenerationGUI.cxx +++ b/src/GenerationGUI/GenerationGUI.cxx @@ -24,28 +24,39 @@ // File : GenerationGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "GenerationGUI.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "QAD_Desktop.h" #include "GenerationGUI_PrismDlg.h" // Method PRISM #include "GenerationGUI_RevolDlg.h" // Method REVOL #include "GenerationGUI_FillingDlg.h" // Method FILLING #include "GenerationGUI_PipeDlg.h" // Method PIPE +GenerationGUI* GenerationGUI::myGUIObject = 0; + +//======================================================================= +// function : GetGenerationGUI() +// purpose : Get the only GenerationGUI object [ static ] +//======================================================================= +GenerationGUI* GenerationGUI::GetGenerationGUI() +{ + if ( myGUIObject == 0 ) + myGUIObject = new GenerationGUI(); + + return myGUIObject; +} + //======================================================================= // function : GenerationGUI() // purpose : Constructor //======================================================================= -GenerationGUI::GenerationGUI() : - QObject() +GenerationGUI::GenerationGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -62,164 +73,29 @@ GenerationGUI::~GenerationGUI() // function : OnGUIEvent() // purpose : //======================================================================= -bool GenerationGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) +bool GenerationGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) { - GenerationGUI* myGenerationGUI = new GenerationGUI(); - myGenerationGUI->myGeomGUI->EmitSignalDeactivateDialog(); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - - switch (theCommandID) - { - case 4031: // PRISM - { - GenerationGUI_PrismDlg *aDlg = new GenerationGUI_PrismDlg(parent, "", myGenerationGUI, Sel); - break; - } - case 4032: // REVOL - { - GenerationGUI_RevolDlg *aDlg = new GenerationGUI_RevolDlg(parent, "", myGenerationGUI, Sel); - break; - } - case 4033: // FILLING - { - GenerationGUI_FillingDlg *aDlg = new GenerationGUI_FillingDlg(parent, "", myGenerationGUI, Sel); - break; - } - case 4034: // PIPE - { - GenerationGUI_PipeDlg *aDlg = new GenerationGUI_PipeDlg(parent, "", myGenerationGUI, Sel); - break; - } - default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } - return true; -} - - -//======================================================================= -// function : MakePrismAndDisplay() -// purpose : P1 and P2 is to define a vector for prism -//======================================================================= -void GenerationGUI::MakePrismAndDisplay(GEOM::GEOM_Shape_ptr BaseShape, const gp_Pnt P1, const gp_Pnt P2) -{ - try { - if(BaseShape->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - - GEOM::PointStruct PS1 = myGeom->MakePointStruct(P1.X(), P1.Y(), P1.Z()); - GEOM::PointStruct PS2 = myGeom->MakePointStruct(P2.X(), P2.Y(), P2.Z()); - GEOM::GEOM_Shape_ptr result = myGeom->MakePrism(BaseShape, PS1, PS2); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + QDialog* aDlg = NULL; + + switch ( theCommandID ) + { + case 4031: aDlg = new GenerationGUI_PrismDlg ( parent, "", Sel ); break; + case 4032: aDlg = new GenerationGUI_RevolDlg ( parent, "", Sel ); break; + case 4033: aDlg = new GenerationGUI_FillingDlg ( parent, "", Sel ); break; + case 4034: aDlg = new GenerationGUI_PipeDlg ( parent, "", Sel ); break; + + default: parent->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); break; } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//======================================================================================= -// function : MakeRevolutionAndDisplay() -// purpose : -//======================================================================================= -void GenerationGUI::MakeRevolutionAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Pnt loc, const gp_Dir dir, const Standard_Real revolAngle) -{ - try { - GEOM::AxisStruct axis = myGeom->MakeAxisStruct(loc.X(), loc.Y(), loc.Z(), dir.X(), dir.Y(), dir.Z()); - GEOM::GEOM_Shape_ptr result = myGeom->MakeRevolution(Shape, axis, revolAngle) ; - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeFillingAndDisplay() -// purpose : -//===================================================================================== -void GenerationGUI::MakeFillingAndDisplay(GEOM::GEOM_Shape_ptr SectionShape, const short mindeg, - const short maxdeg, const double tol3d, - const double tol2d, const short nbiter) -{ - try { - GEOM::GEOM_Shape_ptr result = myGeom->MakeFilling(SectionShape, mindeg, maxdeg, - tol3d, tol2d, nbiter); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - return; - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakePipeAndDisplay() -// purpose : -//===================================================================================== -void GenerationGUI::MakePipeAndDisplay(GEOM::GEOM_Shape_ptr aPath, GEOM::GEOM_Shape_ptr aBase) -{ - try { - GEOM::GEOM_Shape_ptr result = myGeom->MakePipe(aPath, aBase); - if (!result->_is_nil() && myGeomBase->Display(result)) { - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - else { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - } - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; + if ( aDlg != NULL ) + aDlg->show(); + + return true; } @@ -228,6 +104,8 @@ void GenerationGUI::MakePipeAndDisplay(GEOM::GEOM_Shape_ptr aPath, GEOM::GEOM_Sh //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return GenerationGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return GenerationGUI::GetGenerationGUI(); + } } diff --git a/src/GenerationGUI/GenerationGUI.h b/src/GenerationGUI/GenerationGUI.h index c565bda16..cde32bc34 100644 --- a/src/GenerationGUI/GenerationGUI.h +++ b/src/GenerationGUI/GenerationGUI.h @@ -21,41 +21,35 @@ // // // -// File : BooleanGUI.h +// File : GenerationGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef GENERATIONGUI_H #define GENERATIONGUI_H -#include "GEOMBase.h" +#include "GEOMGUI.h" //================================================================================= // class : GenerationGUI // purpose : //================================================================================= -class GenerationGUI : public QObject +class GenerationGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + GenerationGUI(); // hide constructor to avoid direct creation public : - GenerationGUI(); ~GenerationGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only GenerationGUI object + static GenerationGUI* GetGenerationGUI(); - void MakePrismAndDisplay(GEOM::GEOM_Shape_ptr BaseShape, const gp_Pnt P1, const gp_Pnt P2); - void MakeRevolutionAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Pnt loc, - const gp_Dir dir, Standard_Real revolAngle); - void MakeFillingAndDisplay(GEOM::GEOM_Shape_ptr SectionShape, const short mindeg, const short maxdeg, - const double tol3d, const double tol2d, const short nbiter); - void MakePipeAndDisplay(GEOM::GEOM_Shape_ptr aPath, GEOM::GEOM_Shape_ptr aBase); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent( int theCommandID, QAD_Desktop* parent ); +private: + static GenerationGUI* myGUIObject; // the only GenerationGUI object }; #endif diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx index 85d0203b8..2a5478e77 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.cxx @@ -30,6 +30,7 @@ #include "QAD_WaitCursor.h" #include "QAD_Config.h" +#include "QAD_Desktop.h" #include #include @@ -42,11 +43,10 @@ #include #include #include +#include "GEOMImpl_Types.hxx" #include "utilities.h" -using namespace std; - //================================================================================= // class : GenerationGUI_FillingDlg() // purpose : Constructs a GenerationGUI_FillingDlg which is a child of 'parent', with the @@ -54,7 +54,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(QWidget* parent, const char* name, GenerationGUI* theGenerationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_FILLING"))); @@ -77,12 +77,12 @@ GenerationGUI_FillingDlg::GenerationGUI_FillingDlg(QWidget* parent, const char* GroupPoints->TextLabel5->setText(tr("GEOM_FILLING_MAX_DEG")); GroupPoints->TextLabel6->setText(tr("GEOM_FILLING_TOL_3D")); GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myGenerationGUI = theGenerationGUI; Init(); } @@ -105,16 +105,16 @@ void GenerationGUI_FillingDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); myMinDeg = 2; myMaxDeg = 5; myTol3D = 0.0001; myTol2D = 0.0001; myNbIter = 5; - myOkSectionShape = false; + myOkCompound = false; - myCompoundFilter = new GEOM_ShapeTypeFilter(TopAbs_COMPOUND, myGeom); - mySelection->AddFilter(myCompoundFilter); + globalSelection( GEOM_COMPOUND ); double SpecificStep1 = 1; double SpecificStep2 = 0.0001; @@ -152,11 +152,7 @@ void GenerationGUI_FillingDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName(tr("GEOM_FILLING")); } @@ -166,9 +162,8 @@ void GenerationGUI_FillingDlg::Init() //================================================================================= void GenerationGUI_FillingDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -176,18 +171,13 @@ void GenerationGUI_FillingDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void GenerationGUI_FillingDlg::ClickOnApply() +bool GenerationGUI_FillingDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkSectionShape) - myGenerationGUI->MakeFillingAndDisplay(myGeomShape, myMinDeg, myMaxDeg, myTol3D, myTol2D, myNbIter); - return; + initName(); + return true; } @@ -197,39 +187,40 @@ void GenerationGUI_FillingDlg::ClickOnApply() //================================================================================= void GenerationGUI_FillingDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + erasePreview(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { + + if(mySelection->IObjectCount() != 1) { if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkSectionShape = false; + myOkCompound = false; return; } // nbSel == 1 - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, mySectionShape)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if (!testResult) return; - if(myEditCurrentArgument == GroupPoints->LineEdit1 && mySectionShape.ShapeType() == TopAbs_COMPOUND) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - // mySectionShape should be a compound of edges - for ( TopoDS_Iterator it( mySectionShape ); it.More(); it.Next() ) - if ( it.Value().ShapeType() != TopAbs_EDGE ) - return; - myEditCurrentArgument->setText(aString); - myOkSectionShape = true; + if(myEditCurrentArgument == GroupPoints->LineEdit1) { + TopoDS_Shape S; + myOkCompound = false; + + if ( GEOMBase::GetShape(aSelectedObject, S) && + S.ShapeType() == TopAbs_COMPOUND) + { + // myCompound should be a compound of edges + for ( TopoDS_Iterator it( S ); it.More(); it.Next() ) + if ( it.Value().ShapeType() != TopAbs_EDGE ) + return; + myCompound = aSelectedObject; + myOkCompound = true; + } } - - if(myOkSectionShape) - this->MakeFillingSimulationAndDisplay(); - return; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + displayPreview(); } @@ -240,16 +231,14 @@ void GenerationGUI_FillingDlg::SelectionIntoArgument() void GenerationGUI_FillingDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); + globalSelection( GEOM_ALLSHAPES ); if(send == GroupPoints->PushButton1) { GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myCompoundFilter); + globalSelection( GEOM_COMPOUND ); this->SelectionIntoArgument(); } - - return; } @@ -261,12 +250,10 @@ void GenerationGUI_FillingDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -278,10 +265,8 @@ void GenerationGUI_FillingDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - mySelection->AddFilter(myCompoundFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + globalSelection( GEOM_COMPOUND ); + displayPreview(); } @@ -291,10 +276,8 @@ void GenerationGUI_FillingDlg::ActivateThisDialog() //================================================================================= void GenerationGUI_FillingDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -317,70 +300,41 @@ void GenerationGUI_FillingDlg::ValueChangedInSpinBox(double newValue) else if(send == GroupPoints->SpinBox_5) myTol3D = newValue; - if(myOkSectionShape) - this->MakeFillingSimulationAndDisplay(); - return; + displayPreview(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr GenerationGUI_FillingDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); } +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool GenerationGUI_FillingDlg::isValid( QString& ) +{ + return myOkCompound > 0; +} //================================================================================= -// function : MakeFillingSimulationAndDisplay() +// function : execute // purpose : //================================================================================= -void GenerationGUI_FillingDlg::MakeFillingSimulationAndDisplay() +bool GenerationGUI_FillingDlg::execute( ObjectList& objects ) { - QAD_WaitCursor wc; - - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - /* we verify the contents of the shape */ - TopExp_Explorer Ex; - TopoDS_Shape Scurrent; - Standard_Real First, Last; - Handle(Geom_Curve) C; - GeomFill_SectionGenerator Section; - - Standard_Integer i = 0; - for(Ex.Init(mySectionShape, TopAbs_EDGE); Ex.More(); Ex.Next()) { - Scurrent = Ex.Current(); - if( Scurrent.IsNull() || Scurrent.ShapeType() != TopAbs_EDGE) - return; - C = BRep_Tool::Curve(TopoDS::Edge(Scurrent), First, Last); - if (C.IsNull()) continue; - C = new Geom_TrimmedCurve(C, First, Last); - Section.AddCurve(C) ; - i++ ; - } - - /* a 'tolerance' is used to compare 2 knots : see GeomFill_Generator.cdl */ - /* We set 'tolerance' = tol3d */ - // Section.Perform( tol3d ) ; NRI */ - Section.Perform(Precision::Confusion()); - Handle(GeomFill_Line) Line = new GeomFill_Line(i); - - GeomFill_AppSurf App(myMinDeg, myMaxDeg, myTol3D, myTol2D, myNbIter) ; /* user parameters */ - App.Perform(Line, Section); - - if(!App.IsDone()) - return; + GEOM::GEOM_Object_var anObj; - Standard_Integer UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots; - App.SurfShape(UDegree, VDegree, NbUPoles, NbVPoles, NbUKnots, NbVKnots); - Handle(Geom_BSplineSurface) GBS = new Geom_BSplineSurface(App.SurfPoles(), App.SurfWeights(), App.SurfUKnots(), App.SurfVKnots(), App.SurfUMults(), App.SurfVMults(), App.UDegree(), App.VDegree()); - - if(GBS.IsNull()) - return; - mySimulationTopoDs = BRepBuilderAPI_MakeFace(GBS); - if(mySimulationTopoDs.IsNull()) - return; - else - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakePrismSimulationAndDisplay" << endl); - return; - } - return; + anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakeFilling( + myCompound, myMinDeg, myMaxDeg, myTol2D, myTol3D, myNbIter ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } + diff --git a/src/GenerationGUI/GenerationGUI_FillingDlg.h b/src/GenerationGUI/GenerationGUI_FillingDlg.h index 967c9d78c..885630cc2 100644 --- a/src/GenerationGUI/GenerationGUI_FillingDlg.h +++ b/src/GenerationGUI/GenerationGUI_FillingDlg.h @@ -32,10 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel5Spin.h" -#include "GenerationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" - //================================================================================= // class : GenerationGUI_FillingDlg // purpose : @@ -45,32 +41,32 @@ class GenerationGUI_FillingDlg : public GEOMBase_Skeleton Q_OBJECT public: - GenerationGUI_FillingDlg(QWidget* parent = 0, const char* name = 0, GenerationGUI* theGenerationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + GenerationGUI_FillingDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~GenerationGUI_FillingDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent* e); - void MakeFillingSimulationAndDisplay(); - - GenerationGUI* myGenerationGUI; - - Handle(GEOM_ShapeTypeFilter) myCompoundFilter; /* Filter selection */ - GEOM::GEOM_Shape_var myGeomShape; /* is mySectionShape */ - TopoDS_Shape mySectionShape; + GEOM::GEOM_Object_var myCompound; /* compound of curves */ Standard_Integer myMinDeg; Standard_Integer myMaxDeg; Standard_Real myTol3D; Standard_Real myTol2D; Standard_Integer myNbIter; - bool myOkSectionShape; /* to check when arguments is defined */ + bool myOkCompound; /* to check when curv. compound is defined */ DlgRef_1Sel5Spin* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx index adb21593b..51674226a 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.cxx @@ -37,9 +37,10 @@ #include #endif -#include "utilities.h" +#include "GEOMImpl_Types.hxx" -using namespace std; +#include "QAD_Desktop.h" +#include "utilities.h" //================================================================================= // class : GenerationGUI_PipeDlg() @@ -48,7 +49,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -GenerationGUI_PipeDlg::GenerationGUI_PipeDlg(QWidget* parent, const char* name, GenerationGUI* theGenerationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +GenerationGUI_PipeDlg::GenerationGUI_PipeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PIPE"))); @@ -68,12 +69,13 @@ GenerationGUI_PipeDlg::GenerationGUI_PipeDlg(QWidget* parent, const char* name, GroupPoints->TextLabel2->setText(tr("GEOM_PATH_OBJECT")); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myGenerationGUI = theGenerationGUI; Init(); } @@ -96,8 +98,10 @@ void GenerationGUI_PipeDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - myOkShape1 = myOkShape2 = false; + myOkBase = myOkPath = false; /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -111,11 +115,9 @@ void GenerationGUI_PipeDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); + initName(tr("GEOM_PIPE")); - return; + globalSelection( GEOM_ALLSHAPES ); } @@ -125,9 +127,8 @@ void GenerationGUI_PipeDlg::Init() //================================================================================= void GenerationGUI_PipeDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -135,18 +136,13 @@ void GenerationGUI_PipeDlg::ClickOnOk() // function : ClickOnAply() // purpose : //================================================================================= -void GenerationGUI_PipeDlg::ClickOnApply() +bool GenerationGUI_PipeDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkShape1 && myOkShape2) - myGenerationGUI->MakePipeAndDisplay(myGeomShape2 ,myGeomShape1); - - return; + initName(); + return true; } @@ -156,53 +152,52 @@ void GenerationGUI_PipeDlg::ClickOnApply() //================================================================================= void GenerationGUI_PipeDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + erasePreview(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { + if(mySelection->IObjectCount() != 1) { if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkShape1 = false; + myOkBase = false; else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkShape2 = false; + myOkPath = false; return; } // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if (!testResult) return; + TopoDS_Shape S; + if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myOkShape1 = false; - if(S.ShapeType() != TopAbs_COMPSOLID && S.ShapeType() != TopAbs_COMPOUND && S.ShapeType() != TopAbs_SOLID && S.ShapeType() != TopAbs_SHAPE) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myOkShape1 = true; - myShape1 = S; - } + myOkBase = false; + + if(!GEOMBase::GetShape(aSelectedObject, S) || + S.ShapeType() == TopAbs_COMPSOLID || + S.ShapeType() == TopAbs_COMPOUND || + S.ShapeType() == TopAbs_SOLID || + S.ShapeType() == TopAbs_SHAPE) + return; + + myBase = aSelectedObject; + myOkBase = true; } else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - myOkShape2 = false; - if(S.ShapeType() == TopAbs_WIRE || S.ShapeType() == TopAbs_EDGE ) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myOkShape2 = true; - myShape2 = S; - } + myOkPath = false; + + if(!GEOMBase::GetShape(aSelectedObject, S) || + !(S.ShapeType() == TopAbs_WIRE || S.ShapeType() == TopAbs_EDGE) ) + return; + + myPath = aSelectedObject; + myOkPath = true; } - - if(myOkShape1 && myOkShape2) - this->MakePipeSimulationAndDisplay(); - return; + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -222,9 +217,7 @@ void GenerationGUI_PipeDlg::SetEditCurrentArgument() GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; } - this->SelectionIntoArgument(); - - return; + SelectionIntoArgument(); } @@ -235,15 +228,12 @@ void GenerationGUI_PipeDlg::SetEditCurrentArgument() void GenerationGUI_PipeDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -253,10 +243,8 @@ void GenerationGUI_PipeDlg::LineEditReturnPressed() //================================================================================= void GenerationGUI_PipeDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -267,47 +255,46 @@ void GenerationGUI_PipeDlg::enterEvent(QEvent* e) void GenerationGUI_PipeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + displayPreview(); } //================================================================================= -// function : MakeMirrorSimulationAndDisplay() -// purpose : S1 is a shape and S2 a mirror. +// function : createOperation +// purpose : //================================================================================= -void GenerationGUI_PipeDlg::MakePipeSimulationAndDisplay() +GEOM::GEOM_IOperations_ptr GenerationGUI_PipeDlg::createOperation() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - TopoDS_Wire aWire; - - if(myShape2.ShapeType() == TopAbs_WIRE) - aWire = TopoDS::Wire(myShape2); - else if(myShape2.ShapeType() == TopAbs_EDGE) { - TopoDS_Edge aEdge = TopoDS::Edge(myShape2); - aWire = BRepBuilderAPI_MakeWire(aEdge); - } + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); +} - TopoDS_Shape tds = BRepOffsetAPI_MakePipe(aWire,myShape1); -#if OCC_VERSION_MAJOR >= 5 - if(BRepAlgo::IsValid(tds)) -#else - if(BRepAlgoAPI::IsValid(tds)) -#endif - { - //Draw Pipe - mySimulationTopoDs = tds; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakePipeSimulationAndDisplay"); - return; - } - return; +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool GenerationGUI_PipeDlg::isValid( QString& ) +{ + return myOkBase && myOkPath; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool GenerationGUI_PipeDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( + getOperation() )->MakePipe( myBase, myPath ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } + + + diff --git a/src/GenerationGUI/GenerationGUI_PipeDlg.h b/src/GenerationGUI/GenerationGUI_PipeDlg.h index 795c36ed4..6df389000 100644 --- a/src/GenerationGUI/GenerationGUI_PipeDlg.h +++ b/src/GenerationGUI/GenerationGUI_PipeDlg.h @@ -32,8 +32,6 @@ #include "GEOMBase_Skeleton.h" #include "DlgRef_2Sel_QTD.h" -#include "GenerationGUI.h" - //================================================================================= // class : GenerationGUI_PipeDlg // purpose : @@ -43,28 +41,29 @@ class GenerationGUI_PipeDlg : public GEOMBase_Skeleton Q_OBJECT public: - GenerationGUI_PipeDlg(QWidget* parent = 0, const char* name = 0, GenerationGUI* theGenerationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + GenerationGUI_PipeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~GenerationGUI_PipeDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private: void Init(); void enterEvent(QEvent* e); - void MakePipeSimulationAndDisplay(); - - GenerationGUI* myGenerationGUI; - TopoDS_Shape myShape1; /* topology used */ - TopoDS_Shape myShape2; /* topology used */ - GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */ - GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */ - bool myOkShape1; - bool myOkShape2; /* to check when arguments are defined */ + GEOM::GEOM_Object_var myBase; /* Base shape */ + GEOM::GEOM_Object_var myPath; /* Shape, defining the path */ + bool myOkBase; + bool myOkPath ; /* to check when arguments are defined */ DlgRef_2Sel_QTD* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx index 90fc67b70..bd18da9b4 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.cxx @@ -29,11 +29,15 @@ #include "GenerationGUI_PrismDlg.h" #include +#include +#include #include "QAD_Config.h" +#include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" -#include "utilities.h" +#include -using namespace std; +#include "utilities.h" //================================================================================= // class : GenerationGUI_PrismDlg() @@ -42,7 +46,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -GenerationGUI_PrismDlg::GenerationGUI_PrismDlg(QWidget* parent, const char* name, GenerationGUI* theGenerationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +GenerationGUI_PrismDlg::GenerationGUI_PrismDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PRISM"))); @@ -56,20 +60,22 @@ GenerationGUI_PrismDlg::GenerationGUI_PrismDlg(QWidget* parent, const char* name RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_2Sel1Spin1Check(this, "GroupPoints"); + GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); + GroupPoints->CheckButton1->hide(); GroupPoints->GroupBox1->setTitle(tr("GEOM_PRISM_BSV")); GroupPoints->TextLabel1->setText(tr("GEOM_BASE")); GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); GroupPoints->TextLabel3->setText(tr("GEOM_HEIGHT")); - GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE")); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myGenerationGUI = theGenerationGUI; Init(); } @@ -92,20 +98,18 @@ void GenerationGUI_PrismDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - myHeight = 100.000; - myDx = myDy = myDz = 0.0; - myOkBase = myOkLine = false; - - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - + myOkBase = myOkVec = false; + /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myHeight); + GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, +999.999, step, 3); + GroupPoints->SpinBox_DX->SetValue(100.0); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -117,17 +121,16 @@ void GenerationGUI_PrismDlg::Init() connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseVector(int))); - + + connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse())); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); + initName(tr("GEOM_PRISM")); - return; + globalSelection( GEOM_ALLSHAPES ); } @@ -137,9 +140,8 @@ void GenerationGUI_PrismDlg::Init() //================================================================================= void GenerationGUI_PrismDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -147,33 +149,13 @@ void GenerationGUI_PrismDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void GenerationGUI_PrismDlg::ClickOnApply() +bool GenerationGUI_PrismDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - gp_Pnt P1, P2; - - try { - gp_Vec Vec(myDx, myDy, myDz); - Vec.Normalize(); - Vec *= myHeight; - P1.SetCoord(0.0, 0.0, 0.0); - P2.SetCoord(Vec.X(), Vec.Y(), Vec.Z()); - - if(myOkBase && myOkLine) - myGenerationGUI->MakePrismAndDisplay(myGeomShape, P1, P2); - } - catch(Standard_Failure) { - MESSAGE("Exception intercepted in GenerationGUI_PrismDlg" << endl); - return; - } - - return; + initName(); + return true; } @@ -183,48 +165,43 @@ void GenerationGUI_PrismDlg::ClickOnApply() //================================================================================= void GenerationGUI_PrismDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + erasePreview(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkBase = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkLine = false; - return; - } + if(mySelection->IObjectCount() != 1) + { + if(myEditCurrentArgument == GroupPoints->LineEdit1) + myOkBase = false; + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + myOkVec = false; + return; + } // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - gp_Pnt aPoint1, aPoint2; + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + if (!testResult) + return; + if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - if(S.ShapeType() <= 2) + myOkBase = false; + TopoDS_Shape S; + + if ( !GEOMBase::GetShape(aSelectedObject, S) || + S.ShapeType() <= 2) return; - myEditCurrentArgument->setText(aString); + + myBase = aSelectedObject; myOkBase = true; - myBaseTopo = S; } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->LinearEdgeExtremities(S, aPoint1, aPoint2)) { - myGeomBase->GetBipointDxDyDz(aPoint1, aPoint2, myDx, myDy, myDz); - myEditCurrentArgument->setText(aString); - myOkLine = true; + else if(myEditCurrentArgument == GroupPoints->LineEdit2) { + myVec = aSelectedObject; + myOkVec = true; } - - if(myOkBase && myOkLine) - this->MakePrismSimulationAndDisplay(); - return; + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -235,7 +212,7 @@ void GenerationGUI_PrismDlg::SelectionIntoArgument() void GenerationGUI_PrismDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); + globalSelection( GEOM_ALLSHAPES ); if(send == GroupPoints->PushButton1) { GroupPoints->LineEdit1->setFocus(); @@ -244,11 +221,9 @@ void GenerationGUI_PrismDlg::SetEditCurrentArgument() else if(send == GroupPoints->PushButton2) { GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + SelectionIntoArgument(); } @@ -259,28 +234,22 @@ void GenerationGUI_PrismDlg::SetEditCurrentArgument() void GenerationGUI_PrismDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } - //================================================================================= // function : enterEvent() // purpose : when mouse enter onto the QWidget //================================================================================= void GenerationGUI_PrismDlg::enterEvent(QEvent * e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -291,12 +260,11 @@ void GenerationGUI_PrismDlg::enterEvent(QEvent * e) void GenerationGUI_PrismDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + displayPreview(); } @@ -304,52 +272,66 @@ void GenerationGUI_PrismDlg::ActivateThisDialog() // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void GenerationGUI_PrismDlg::ValueChangedInSpinBox(double newValue) +void GenerationGUI_PrismDlg::ValueChangedInSpinBox() { - myHeight = newValue; - if(myOkBase && myOkLine) - this->MakePrismSimulationAndDisplay(); - return; + displayPreview(); } + //================================================================================= -// function : ReverseVector() -// purpose : 'state' not used here +// function : getHeight() +// purpose : //================================================================================= -void GenerationGUI_PrismDlg::ReverseVector(int state) +double GenerationGUI_PrismDlg::getHeight() const { - myDx = -myDx; - myDy = -myDy; - myDz = -myDz; - if(myOkBase && myOkLine) - this->MakePrismSimulationAndDisplay(); - return; -} + return GroupPoints->SpinBox_DX->GetValue(); +} +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr GenerationGUI_PrismDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); +} //================================================================================= -// function : MakePrismSimulationAndDisplay() +// function : isValid // purpose : //================================================================================= -void GenerationGUI_PrismDlg::MakePrismSimulationAndDisplay() +bool GenerationGUI_PrismDlg::isValid( QString& ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - gp_Vec Vec(myDx, myDy, myDz); - Vec.Normalize(); - Vec *= myHeight; - mySimulationTopoDs = BRepPrimAPI_MakePrism(myBaseTopo, Vec, Standard_False).Shape(); - if(mySimulationTopoDs.IsNull()) - return; - else - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakePrismSimulationAndDisplay" << endl); - return; - } - return; + return myOkBase && myOkVec; } + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool GenerationGUI_PrismDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_I3DPrimOperations::_narrow(getOperation() )->MakePrismVecH ( myBase, myVec, getHeight() ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + + +//================================================================================= +// function : onReverse() +// purpose : +//================================================================================= +void GenerationGUI_PrismDlg::onReverse() +{ + double anOldValue = GroupPoints->SpinBox_DX->GetValue(); + GroupPoints->SpinBox_DX->SetValue( -anOldValue ); +} + + + diff --git a/src/GenerationGUI/GenerationGUI_PrismDlg.h b/src/GenerationGUI/GenerationGUI_PrismDlg.h index 77b47a410..3b90b2ecb 100644 --- a/src/GenerationGUI/GenerationGUI_PrismDlg.h +++ b/src/GenerationGUI/GenerationGUI_PrismDlg.h @@ -30,11 +30,7 @@ #define DIALOGBOX_PRISM_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin1Check.h" - -#include "GenerationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" +#include "DlgRef_2Sel1Spin2Check.h" //================================================================================= // class : GenerationGUI_PrismDlg @@ -45,40 +41,37 @@ class GenerationGUI_PrismDlg : public GEOMBase_Skeleton Q_OBJECT public: - GenerationGUI_PrismDlg(QWidget* parent = 0, const char* name = 0, GenerationGUI* theGenerationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + GenerationGUI_PrismDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~GenerationGUI_PrismDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private : void Init(); void enterEvent(QEvent* e); - void MakePrismSimulationAndDisplay(); + double getHeight() const; - GenerationGUI* myGenerationGUI; + GEOM::GEOM_Object_var myBase; /* Base shape */ + GEOM::GEOM_Object_var myVec; /* Vector, defining the direction */ - double step; - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */ - - Standard_Real myDx; - Standard_Real myDy; - Standard_Real myDz; - Standard_Real myHeight; /* Height used for prism (extrusion) */ - TopoDS_Shape myBaseTopo; /* topology used as base of prism */ - GEOM::GEOM_Shape_var myGeomShape; /* that is myBaseTopo */ bool myOkBase; - bool myOkLine; /* to check when arguments myDx, myDy, myDz are defined */ + bool myOkVec; - DlgRef_2Sel1Spin1Check* GroupPoints; + DlgRef_2Sel1Spin2Check* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ReverseVector(int state); - void ValueChangedInSpinBox(double newValue); - + void ValueChangedInSpinBox(); + void onReverse(); }; #endif // DIALOGBOX_PRISM_H diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx index 0aa52712c..f811dba46 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.cxx +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.cxx @@ -32,12 +32,14 @@ #include #include #include "QAD_Config.h" +#include "QAD_Desktop.h" #include #include +#include "GEOMImpl_Types.hxx" -#include "utilities.h" +#include -using namespace std; +#include "utilities.h" //================================================================================= // class : GenerationGUI_RevolDlg() @@ -46,7 +48,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -GenerationGUI_RevolDlg::GenerationGUI_RevolDlg(QWidget* parent, const char* name, GenerationGUI* theGenerationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +GenerationGUI_RevolDlg::GenerationGUI_RevolDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_REVOL"))); @@ -60,20 +62,22 @@ GenerationGUI_RevolDlg::GenerationGUI_RevolDlg(QWidget* parent, const char* name RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_2Sel1Spin1Check(this, "GroupPoints"); + GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); + GroupPoints->CheckButton1->hide(); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); GroupPoints->TextLabel2->setText(tr("GEOM_AXIS")); GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE")); - GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE")); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myGenerationGUI = theGenerationGUI; Init(); } @@ -96,16 +100,15 @@ void GenerationGUI_RevolDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - myAngle = 45.0; myOkBase = myOkAxis = false; - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - double SpecificStep = 5; /* min, max, step and decimals for spin boxes & initial values */ GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); - GroupPoints->SpinBox_DX->SetValue(myAngle); + GroupPoints->SpinBox_DX->SetValue(45.0); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -117,18 +120,16 @@ void GenerationGUI_RevolDlg::Init() connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse())); - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle(int))); - + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); + initName(tr("GEOM_REVOLUTION")); - return; + globalSelection( GEOM_ALLSHAPES ); } @@ -138,9 +139,8 @@ void GenerationGUI_RevolDlg::Init() //================================================================================= void GenerationGUI_RevolDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -148,18 +148,13 @@ void GenerationGUI_RevolDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void GenerationGUI_RevolDlg::ClickOnApply() +bool GenerationGUI_RevolDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkBase && myOkAxis) - myGenerationGUI->MakeRevolutionAndDisplay(myGeomShape, myLoc, myDir, myAngle*PI180); - return; + initName(); + return true; } //======================================================================= @@ -195,48 +190,41 @@ static bool isAcceptableBase(const TopoDS_Shape& theBase) //================================================================================= void GenerationGUI_RevolDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + erasePreview(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { + if(mySelection->IObjectCount() != 1) { if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkBase = false; + myOkBase = false; else if(myEditCurrentArgument == GroupPoints->LineEdit2) myOkAxis = false; return; } // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if (!testResult) return; - + if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - if( !isAcceptableBase( S )) + TopoDS_Shape S; + myOkBase = false; + + if ( !GEOMBase::GetShape(aSelectedObject, S) || !isAcceptableBase( S ) ) return; - myEditCurrentArgument->setText(aString); + + myBase = aSelectedObject; myOkBase = true; - myBase = S; } else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - myLoc = curv.Line().Location(); - myEditCurrentArgument->setText(aString); + myAxis = aSelectedObject; myOkAxis = true; } + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); - if(myOkBase && myOkAxis) - this->MakeRevolutionSimulationAndDisplay(); - return; + displayPreview(); } @@ -247,7 +235,7 @@ void GenerationGUI_RevolDlg::SelectionIntoArgument() void GenerationGUI_RevolDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); + globalSelection( GEOM_ALLSHAPES ); if(send == GroupPoints->PushButton1) { GroupPoints->LineEdit1->setFocus(); @@ -256,11 +244,9 @@ void GenerationGUI_RevolDlg::SetEditCurrentArgument() else if(send == GroupPoints->PushButton2) { GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + SelectionIntoArgument(); } @@ -271,15 +257,12 @@ void GenerationGUI_RevolDlg::SetEditCurrentArgument() void GenerationGUI_RevolDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -290,12 +273,11 @@ void GenerationGUI_RevolDlg::LineEditReturnPressed() void GenerationGUI_RevolDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + displayPreview(); } @@ -305,10 +287,8 @@ void GenerationGUI_RevolDlg::ActivateThisDialog() //================================================================================= void GenerationGUI_RevolDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -316,49 +296,63 @@ void GenerationGUI_RevolDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void GenerationGUI_RevolDlg::ValueChangedInSpinBox(double newValue) -{ - myAngle = newValue; - if(myOkBase && myOkAxis) - this->MakeRevolutionSimulationAndDisplay(); - return; +void GenerationGUI_RevolDlg::ValueChangedInSpinBox() +{ + displayPreview(); } //================================================================================= -// function : ReverseAngle() -// purpose : 'state' not used here +// function : getAngle() +// purpose : +//================================================================================= +double GenerationGUI_RevolDlg::getAngle() const +{ + return GroupPoints->SpinBox_DX->GetValue(); +} + +//================================================================================= +// function : createOperation +// purpose : //================================================================================= -void GenerationGUI_RevolDlg::ReverseAngle(int state) +GEOM::GEOM_IOperations_ptr GenerationGUI_RevolDlg::createOperation() { - myAngle = -myAngle; - GroupPoints->SpinBox_DX->SetValue(myAngle); - if(myOkBase && myOkAxis) - this->MakeRevolutionSimulationAndDisplay(); - return; + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); } +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool GenerationGUI_RevolDlg::isValid( QString& ) +{ + return myOkBase && myOkAxis; +} //================================================================================= -// function : MakeRevolutionSimulationAndDisplay() +// function : execute // purpose : //================================================================================= -void GenerationGUI_RevolDlg::MakeRevolutionSimulationAndDisplay() +bool GenerationGUI_RevolDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + GEOM::GEOM_Object_var anObj; - if (!isAcceptableBase( myBase )) - return; + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( + getOperation() )->MakeRevolutionAxisAngle( myBase, myAxis, getAngle() * PI180 ); - try { - gp_Ax1 AX(myLoc, myDir); - mySimulationTopoDs = BRepPrimAPI_MakeRevol(myBase, AX, myAngle*PI180); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeRevolutionSimulationAndDisplay"); - return; - } - return; + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + + +//================================================================================= +// function : onReverse() +// purpose : +//================================================================================= +void GenerationGUI_RevolDlg::onReverse() +{ + double anOldValue = GroupPoints->SpinBox_DX->GetValue(); + GroupPoints->SpinBox_DX->SetValue( -anOldValue ); } diff --git a/src/GenerationGUI/GenerationGUI_RevolDlg.h b/src/GenerationGUI/GenerationGUI_RevolDlg.h index eddc3c30f..acc71d3d0 100644 --- a/src/GenerationGUI/GenerationGUI_RevolDlg.h +++ b/src/GenerationGUI/GenerationGUI_RevolDlg.h @@ -30,11 +30,8 @@ #define DIALOGBOX_REVOLUTION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin1Check.h" +#include "DlgRef_2Sel1Spin2Check.h" -#include "GenerationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" #include //================================================================================= @@ -46,37 +43,36 @@ class GenerationGUI_RevolDlg : public GEOMBase_Skeleton Q_OBJECT public: - GenerationGUI_RevolDlg(QWidget* parent = 0, const char* name = 0, GenerationGUI* theGenerationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + GenerationGUI_RevolDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~GenerationGUI_RevolDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + private : void Init(); void enterEvent(QEvent* e); - void MakeRevolutionSimulationAndDisplay(); - - GenerationGUI* myGenerationGUI; - - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */ + double getAngle() const; - TopoDS_Shape myBase; - GEOM::GEOM_Shape_var myGeomShape; /* is myBase */ - gp_Pnt myLoc; - gp_Dir myDir; - Standard_Real myAngle; + GEOM::GEOM_Object_var myBase; /* Base shape */ + GEOM::GEOM_Object_var myAxis; /* Axis of the revolution */ bool myOkBase; bool myOkAxis; - DlgRef_2Sel1Spin1Check* GroupPoints; + DlgRef_2Sel1Spin2Check* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ActivateThisDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ReverseAngle(int state); - void ValueChangedInSpinBox(double newValue); + void ValueChangedInSpinBox(); + void onReverse(); }; diff --git a/src/GenerationGUI/Makefile.in b/src/GenerationGUI/Makefile.in index 06eb796c0..66f3f7df3 100644 --- a/src/GenerationGUI/Makefile.in +++ b/src/GenerationGUI/Makefile.in @@ -47,15 +47,14 @@ LIB_SRC = GenerationGUI.cxx \ GenerationGUI_PipeDlg.cxx LIB_MOC = \ - GenerationGUI.h \ GenerationGUI_PrismDlg.h \ GenerationGUI_RevolDlg.h \ GenerationGUI_FillingDlg.h \ GenerationGUI_PipeDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file diff --git a/src/GroupGUI/GroupGUI.cxx b/src/GroupGUI/GroupGUI.cxx new file mode 100644 index 000000000..6252e88bd --- /dev/null +++ b/src/GroupGUI/GroupGUI.cxx @@ -0,0 +1,134 @@ +// 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.org +// +// +// +// File : GroupGUI.cxx +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#include "GroupGUI.h" +#include "GroupGUI_GroupDlg.h" + +#include "GEOMImpl_Types.hxx" + +#include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "QAD_Desktop.h" +#include "QAD_MessageBox.h" + +GroupGUI* GroupGUI::myGUIObject = 0; + +//======================================================================= +// function : GetGroupGUI() +// purpose : Get the only GroupGUI object [ static ] +//======================================================================= +GroupGUI* GroupGUI::GetGroupGUI() +{ + if ( myGUIObject == 0 ) + myGUIObject = new GroupGUI(); + + return myGUIObject; +} + +//======================================================================= +// function : GroupGUI() +// purpose : Constructor +//======================================================================= +GroupGUI::GroupGUI() +: GEOMGUI() +{ +} + + +//======================================================================= +// function : ~GroupGUI() +// purpose : Destructor +//======================================================================= +GroupGUI::~GroupGUI() +{ +} + + +//======================================================================= +// function : OnGUIEvent() +// purpose : +//======================================================================= +bool GroupGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) +{ + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + QDialog* aDlg = NULL; + + if ( QAD_Application::getDesktop()->getActiveStudy()->isLocked() ) { + QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED"), + QObject::tr("BUT_OK") ); + return false; + } + + switch ( theCommandID ) { + case 800: + aDlg = new GroupGUI_GroupDlg( GroupGUI_GroupDlg::CreateGroup, parent, "", Sel ); + break; + case 801: + { + if ( Sel->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( Sel->firstIObject(), aResult ); + + if ( aResult && !CORBA::is_nil( anObj ) && anObj->GetType() == GEOM_GROUP ) { + aDlg = new GroupGUI_GroupDlg( GroupGUI_GroupDlg::EditGroup, parent, "", Sel ); + break; + } + } + QAD_MessageBox::warn1 ( QAD_Application::getDesktop(), + tr("WRN_WARNING"), + tr("NO_GROUP"), + tr("BUT_OK") ); + break; + } + default: + parent->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); + break; + } + + if ( aDlg != NULL ) + aDlg->show(); + + return true; +} + +//===================================================================================== +// EXPORTED METHODS +//===================================================================================== +extern "C" +{ + GEOMGUI* GetLibGUI() + { + return GroupGUI::GetGroupGUI(); + } +} diff --git a/src/GroupGUI/GroupGUI.h b/src/GroupGUI/GroupGUI.h new file mode 100644 index 000000000..dd3fd8de9 --- /dev/null +++ b/src/GroupGUI/GroupGUI.h @@ -0,0 +1,57 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GroupGUI.h +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#ifndef GROUPGUI_H +#define GROUPGUI_H + +#include "GEOMGUI.h" + +//================================================================================= +// class : GroupGUI +// purpose : +//================================================================================= +class GroupGUI : public GEOMGUI +{ + Q_OBJECT + +protected: + GroupGUI(); // hide constructor to avoid direct creation + +public : + ~GroupGUI(); + + // Get the only GroupGUI object + static GroupGUI* GetGroupGUI(); + + bool OnGUIEvent( int theCommandID, QAD_Desktop* parent ); + +private: + static GroupGUI* myGUIObject; // the only GroupGUI object +}; + +#endif diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx new file mode 100644 index 000000000..0559aaff7 --- /dev/null +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -0,0 +1,648 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GroupGUI_GroupDlg.cxx +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#include "GroupGUI_GroupDlg.h" + +#include "GEOMBase.h" + +#include "GEOMImpl_Types.hxx" + +#include "QAD_Desktop.h" + +#include +#include +#include +#include + +#include +#include + +GroupGUI_GroupDlg::GroupGUI_GroupDlg(Mode mode, + QWidget* parent, + const char* name, + SALOME_Selection* Sel, + bool modal, + WFlags fl) + :GEOMBase_Skeleton( parent, "GroupGUI_GroupDlg", Sel, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu), + myMode( mode ), + myBusy( false ) +{ + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_VERTEX" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_EDGE" ) ) ); + QPixmap image2( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_FACE" ) ) ); + QPixmap image3( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_OBJBROWSER_SOLID" ) ) ); + + QPixmap iconSelect( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); + + setCaption( myMode == CreateGroup ? tr( "CREATE_GROUP_TITLE" ) : tr( "EDIT_GROUP_TITLE" ) ); + + // Shape type button group + GroupConstructors->setEnabled( myMode == CreateGroup ); + GroupConstructors->setTitle( tr( "SHAPE_TYPE" ) ); + RadioButton1->setPixmap( image0 ); + RadioButton2->setPixmap( image1 ); + RadioButton3->setPixmap( image2 ); + RadioButton4->setPixmap( image3 ); + RadioButton4->show(); + + // Group name + GroupBoxName->setTitle( tr( "GROUP_NAME" ) ); + + // Main shape and sub-shapes + GroupMedium = new QGroupBox( 1, Qt::Vertical, tr( "MAIN_SUB_SHAPES" ), this ); + GroupMedium->setInsideMargin( 10 ); + Layout1->addWidget( GroupMedium, 2, 0 ); + + QWidget* aFrame = new QWidget( GroupMedium ); + QGridLayout* aMedLayout = new QGridLayout( aFrame, 4, 4, 0, 6 ); + + QLabel* aMainLabel = new QLabel( tr( "MAIN_SHAPE" ), aFrame ); + + mySelBtn = new QPushButton( aFrame ); + mySelBtn->setPixmap( iconSelect ); + mySelBtn->setEnabled( myMode == CreateGroup ); + + myMainName = new QLineEdit( aFrame ); + myMainName->setReadOnly( true ); + myMainName->setEnabled( myMode == CreateGroup ); + + mySelSubBtn = new QPushButton( tr( "SELECT_SUB_SHAPES" ), aFrame ); + mySelAllBtn = new QPushButton( tr( "SELECT_ALL" ), aFrame ); + myAddBtn = new QPushButton( tr( "ADD" ), aFrame ); + myRemBtn = new QPushButton( tr( "REMOVE" ), aFrame ); + myIdList = new QListBox( aFrame ); + + myIdList->setSelectionMode( QListBox::Extended ); + myIdList->setRowMode( QListBox::FitToWidth ); + + aMedLayout->addWidget( aMainLabel, 0, 0 ); + aMedLayout->addWidget( mySelBtn, 0, 1 ); + aMedLayout->addMultiCellWidget( myMainName, 0, 0, 2, 3 ); + aMedLayout->addMultiCellWidget( mySelSubBtn, 1, 1, 0, 2 ); + aMedLayout->addWidget( mySelAllBtn, 1, 3 ); + aMedLayout->addMultiCellWidget( myIdList, 2, 3, 0, 2 ); + aMedLayout->addWidget( myAddBtn, 2, 3 ); + aMedLayout->addWidget( myRemBtn, 3, 3 ); + + Init( Sel ); +} + +GroupGUI_GroupDlg::~GroupGUI_GroupDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::Init( SALOME_Selection* Sel ) +{ + mySelection = Sel; + + // san -- TODO: clear selected sub-shapes... + + if ( myMode == CreateGroup ) { + initName( tr( "GROUP_PREFIX" ) ); + + // Get ready for main shape selection + myEditCurrentArgument = myMainName; + + connect( GroupConstructors, SIGNAL( clicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) ); + connect( mySelBtn, SIGNAL( clicked() ), this, SLOT(SetEditCurrentArgument())); + } + else if ( myMode == EditGroup && Sel->IObjectCount() ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( Sel->firstIObject(), aResult ); + + if ( aResult && !CORBA::is_nil( anObj ) && anObj->GetType() == GEOM_GROUP ) { + myGroup = anObj; + + ResultName->setText( GEOMBase::GetName( myGroup ) ); + + GEOM::GEOM_IGroupOperations_var anOp = GEOM::GEOM_IGroupOperations::_narrow( getOperation() ); + myMainObj = anOp->GetMainShape( myGroup ); + if ( !CORBA::is_nil( myMainObj ) ) + myMainName->setText( GEOMBase::GetName( myMainObj ) ); + + setShapeType( (TopAbs_ShapeEnum)anOp->GetType( myGroup ) ); + + GEOM::ListOfLong_var aCurrList = anOp->GetObjects( myGroup ); + QListBoxItem* anItem; + for ( int i = 0, n = aCurrList->length(); i < n; i++ ) { + anItem = new QListBoxText( QString( "%1" ).arg(aCurrList[i] ) ); + myIdList->insertItem( anItem ); + } + + myEditCurrentArgument = 0; + } + } + + connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + + connect( mySelSubBtn, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( mySelAllBtn, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( mySelection,SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + connect( mySelAllBtn, SIGNAL( clicked() ), this, SLOT( selectAllSubShapes() ) ); + connect( myAddBtn, SIGNAL( clicked() ), this, SLOT( add() ) ); + connect( myRemBtn, SIGNAL( clicked() ), this, SLOT( remove() ) ); + connect( myIdList, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) ); + + activateSelection(); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::enterEvent( QEvent* e ) +{ + if ( !buttonCancel->isEnabled() ) + this->ActivateThisDialog(); +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool GroupGUI_GroupDlg::ClickOnApply() +{ + if ( !onAccept( myMode == CreateGroup, true ) ) + return false; + + if ( myMode == CreateGroup ) + initName(); + return true; +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + + connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + + activateSelection(); +} + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::LineEditReturnPressed() +{ + QLineEdit* send = ( QLineEdit* )sender(); + + if ( send == myMainName && !myEditCurrentArgument ) { + myEditCurrentArgument = myMainName; + activateSelection(); + } + else + GEOMBase_Skeleton::LineEditReturnPressed(); + + updateState(); +} + + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if ( send == mySelBtn ) + myEditCurrentArgument = myMainName; + else if ( send == mySelSubBtn || send == mySelAllBtn ) + myEditCurrentArgument = 0; + + activateSelection(); + updateState(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void GroupGUI_GroupDlg::SelectionIntoArgument() +{ + if ( myEditCurrentArgument ) { // Selection of a main shape is active + myEditCurrentArgument->setText( "" ); + + if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() && GEOMBase::IsShape( anObj ) ) { + myMainObj = anObj; + myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) ); + updateState(); + return; + } + } + + myMainObj = GEOM::GEOM_Object::_nil(); + } + else { // an attempt to synchronize list box selection with 3d viewer + if ( myBusy ) + return; + + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); + myIdList->clearSelection(); + + if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) { + QMap aMap; + for ( int i = 0, n = myIdList->count(); i < n; i++ ) + aMap.insert( myIdList->item( i )->text().toInt(), i ); + + TColStd_IndexedMapOfInteger aMapIndex; + mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); + for ( int ii = 1, nn = aMapIndex.Extent(); ii <= nn; ii++ ) { + if ( aMap.contains( aMapIndex( ii ) ) ) + myIdList->setSelected( aMap[aMapIndex( ii )], true ); + } + } + } + + myIdList->blockSignals( isBlocked ); + } + + updateState(); +} + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void GroupGUI_GroupDlg::ConstructorsClicked( int constructorId ) +{ + myIdList->clear(); + activateSelection(); + updateState(); +} + +//================================================================================= +// function : selectAllSubShapes +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::selectAllSubShapes() +{ + if ( CORBA::is_nil( myMainObj ) ) + return; + + GEOM::GEOM_IShapesOperations_var aShOp = getGeomEngine()->GetIShapesOperations( getStudyId() ); + GEOM::GEOM_ILocalOperations_var aLocOp = getGeomEngine()->GetILocalOperations( getStudyId() ); + + GEOM::ListOfGO_var aSubShapes = aShOp->MakeExplode( myMainObj, getShapeType(), false ); + if ( !aShOp->IsDone() ) + return; + + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); + myIdList->clear(); + + QListBoxItem* anItem; + for ( int i = 0, n = aSubShapes->length(); i < n; i++ ) { + CORBA::Long anIndex = aLocOp->GetSubShapeIndex( myMainObj, aSubShapes[i] ); + if ( anIndex < 0 ) + continue; + + anItem = new QListBoxText( QString( "%1" ).arg( anIndex ) ); + myIdList->insertItem( anItem ); + myIdList->setSelected( anItem, true ); + } + + myIdList->blockSignals( isBlocked ); + highlightSubShapes(); + updateState(); +} + +//================================================================================= +// function : add +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::add() +{ + TColStd_MapOfInteger aMap; + for ( int i = 0, n = myIdList->count(); i < n; i++ ) + aMap.Add( myIdList->item( i )->text().toInt() ); + + if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) { + TColStd_IndexedMapOfInteger aMapIndex; + mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); + QListBoxItem* anItem; + bool isBlocked = myIdList->signalsBlocked(); + myIdList->blockSignals( true ); + + for ( int i = 1, n = aMapIndex.Extent(); i <= n; i++ ) { + if ( aMap.Contains( aMapIndex( i ) ) ) + continue; + + anItem = new QListBoxText( QString( "%1" ).arg( aMapIndex( i ) ) ); + myIdList->insertItem( anItem ); + myIdList->setSelected( anItem, true ); + } + + myIdList->blockSignals( isBlocked ); + } + } + updateState(); +} + +//================================================================================= +// function : remove +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::remove() +{ + for ( int i = myIdList->count() - 1; i >= 0; i-- ) { + if ( myIdList->isSelected( i ) ) + myIdList->removeItem( i ); + } + updateState(); +} + + +//================================================================================= +// function : getConstructorId() +// purpose : +//================================================================================= +int GroupGUI_GroupDlg::getConstructorId() const +{ + return GroupConstructors->id( GroupConstructors->selected() ); +} + +//================================================================================= +// function : getShapeType() +// purpose : +//================================================================================= +TopAbs_ShapeEnum GroupGUI_GroupDlg::getShapeType() const +{ + switch ( getConstructorId() ) { + case 0: return TopAbs_VERTEX; + case 1: return TopAbs_EDGE; + case 2: return TopAbs_FACE; + case 3: return TopAbs_SOLID; + default: return TopAbs_SHAPE; + } +} + +//================================================================================= +// function : setShapeType() +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::setShapeType( const TopAbs_ShapeEnum theType ) +{ + int anId = 0; + switch ( theType ) { + case TopAbs_VERTEX: anId = 0; break; + case TopAbs_EDGE: anId = 1; break; + case TopAbs_FACE: anId = 2; break; + case TopAbs_SOLID: anId = 3; break; + } + GroupConstructors->setButton( anId ); +} + + +//================================================================================= +// function : activateSelection +// purpose : Activate selection in accordance with myEditCurrentArgument +//================================================================================= +void GroupGUI_GroupDlg::activateSelection() +{ + globalSelection( GEOM_ALLSHAPES ); + + if ( !myMainObj->_is_nil() && !myEditCurrentArgument ) { + localSelection( myMainObj, getShapeType() ); + } + + SelectionIntoArgument(); +} + +//================================================================================= +// function : updateState +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::updateState() +{ + bool isAdd = false; + if ( mySelection->IObjectCount() == 1 ) { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) { + TColStd_IndexedMapOfInteger aMapIndex; + mySelection->GetIndex( mySelection->firstIObject(), aMapIndex ); + isAdd = aMapIndex.Extent() > 0; + } + } + myAddBtn->setEnabled( !myEditCurrentArgument && !CORBA::is_nil( myMainObj ) && isAdd ); + bool hasSel = false; + for ( int ii = 0, nn = myIdList->count(); !hasSel && ii < nn; ii++ ) + hasSel = myIdList->isSelected( ii ); + myRemBtn->setEnabled( hasSel ); + mySelSubBtn->setEnabled( !CORBA::is_nil( myMainObj ) ); + mySelAllBtn->setEnabled( !CORBA::is_nil( myMainObj ) ); +} + +//================================================================================= +// function : selectionChanged +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::selectionChanged() +{ + highlightSubShapes(); +} + +//================================================================================= +// function : highlightSubShapes +// purpose : +//================================================================================= +void GroupGUI_GroupDlg::highlightSubShapes() +{ + if ( CORBA::is_nil( myMainObj ) ) + return; + + Standard_Boolean isOk; + Handle(GEOM_AISShape) aSh = + GEOMBase::ConvertIORinGEOMAISShape( GEOMBase::GetIORFromObject( myMainObj ), isOk, true ); + if ( !isOk || aSh.IsNull() ) + return; + + TColStd_MapOfInteger anIds; + + myBusy = true; + + for ( int ii = 0, nn = myIdList->count(); ii < nn; ii++ ) + if ( myIdList->isSelected( ii ) ) + anIds.Add( myIdList->item( ii )->text().toInt() ); + + mySelection->ClearIObjects(); + mySelection->AddOrRemoveIndex( aSh->getIO(), anIds, false, true ); + + myBusy = false; + + updateState(); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr GroupGUI_GroupDlg::createOperation() +{ + return getGeomEngine()->GetIGroupOperations( getStudyId() ); +} + +#define RETURN_WITH_MSG(a, b) \ + if ( !(a) ) { \ + theMessage += (b); \ + return false; \ + } + +//================================================================================= +// function : isValid() +// purpose : Verify validity of input data +//================================================================================= +bool GroupGUI_GroupDlg::isValid( QString& theMessage ) +{ + QAD_Study* study = getStudy(); + ASSERT(study); + RETURN_WITH_MSG ( !study->getStudyDocument()->GetProperties()->IsLocked(), tr( "GEOM_STUDY_LOCKED" ) ) + + if ( myMode == CreateGroup ) { + RETURN_WITH_MSG( !CORBA::is_nil( myMainObj ), tr( "NO_MAIN_OBJ" ) ) + } + else { + RETURN_WITH_MSG( !CORBA::is_nil( myMainObj ), tr( "NO_GROUP" ) ) + } + + const char* aName = getNewObjectName(); + RETURN_WITH_MSG ( aName && strlen( aName ), tr( "EMPTY_NAME" ) ) + + RETURN_WITH_MSG ( myIdList->count(), tr( "EMPTY_LIST" ) ) + return true; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool GroupGUI_GroupDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_IGroupOperations_var anOp = GEOM::GEOM_IGroupOperations::_narrow( getOperation() ); + + GEOM::GEOM_Object_var aGroup; + if ( myMode == CreateGroup ) + aGroup = anOp->CreateGroup( myMainObj, getShapeType() ); + else if ( myMode == EditGroup ) + aGroup = myGroup; + + if ( CORBA::is_nil( aGroup ) || ( myMode == CreateGroup && !anOp->IsDone() ) ) + return false; + + GEOM::ListOfLong_var aCurrList = anOp->GetObjects( aGroup ); + if ( !anOp->IsDone() ) + return false; + + for ( int i = 0, n = aCurrList->length(); i < n; i++ ) { + anOp->RemoveObject( aGroup, aCurrList[i] ); + if ( !anOp->IsDone() ) + return false; + } + + for ( int ii = 0, nn = myIdList->count(); ii < nn; ii++ ) { + anOp->AddObject( aGroup, myIdList->item( ii )->text().toInt() ); + if ( !anOp->IsDone() ) + return false; + } + + QAD_Study* study = getStudy(); + if ( study ) { + string IOR = GEOMBase::GetIORFromObject( aGroup ); + if ( IOR != "" ) { + SALOMEDS::SObject_var SO = study->getStudyDocument()->FindObjectIOR( IOR.c_str() ); + if ( !SO->_is_nil() ) { + SALOMEDS::StudyBuilder_var aBuilder = study->getStudyDocument()->NewBuilder(); + aBuilder->SetName( SO, getNewObjectName() ); + } + } + } + + objects.push_back( aGroup._retn() ); + + return true; +} + +//================================================================ +// Function : getFather +// Purpose : Get father object for object to be added in study +// ( called with addInStudy method ) +//================================================================ +GEOM::GEOM_Object_ptr GroupGUI_GroupDlg::getFather( GEOM::GEOM_Object_ptr theObj ) +{ + GEOM::GEOM_Object_var aFatherObj; + if ( theObj->GetType() == GEOM_GROUP ) { + GEOM::GEOM_IGroupOperations_var anOp = GEOM::GEOM_IGroupOperations::_narrow( getOperation() ); + aFatherObj = anOp->GetMainShape( theObj ); + } + return aFatherObj._retn(); +} diff --git a/src/GroupGUI/GroupGUI_GroupDlg.h b/src/GroupGUI/GroupGUI_GroupDlg.h new file mode 100644 index 000000000..d2da0e231 --- /dev/null +++ b/src/GroupGUI/GroupGUI_GroupDlg.h @@ -0,0 +1,103 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2004 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.org +// +// +// +// File : GroupGUI_GroupDlg.h +// Author : Sergey ANIKIN +// Module : GEOM +// $Header$ + +#ifndef GROUPGUI_GROUPDLG_H +#define GROUPGUI_GROUPDLG_H + +#include "GEOMBase_Skeleton.h" + +#include + +class QLineEdit; +class QListBox; + +//================================================================================= +// class : GroupGUI_GroupDlg +// purpose : +//================================================================================= +class GroupGUI_GroupDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + typedef enum { + CreateGroup, + EditGroup + } Mode; + + GroupGUI_GroupDlg(Mode mode, QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~GroupGUI_GroupDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + virtual GEOM::GEOM_Object_ptr getFather( GEOM::GEOM_Object_ptr theObj ); + + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void ConstructorsClicked( int constructorId ); + + void selectAllSubShapes(); + void add(); + void remove(); + void selectionChanged(); + +private: + void Init( SALOME_Selection* ); + void enterEvent( QEvent* e ); + int getConstructorId() const; + TopAbs_ShapeEnum getShapeType() const; + void setShapeType( const TopAbs_ShapeEnum ); + void activateSelection(); + void updateState(); + void highlightSubShapes(); + +private: + Mode myMode; + bool myBusy; + GEOM::GEOM_Object_var myMainObj; + GEOM::GEOM_Object_var myGroup; + + QPushButton* mySelBtn; + QLineEdit* myMainName; + QPushButton* mySelSubBtn; + QPushButton* mySelAllBtn; + QPushButton* myAddBtn; + QPushButton* myRemBtn; + QListBox* myIdList; +}; + +#endif diff --git a/src/GroupGUI/Makefile.in b/src/GroupGUI/Makefile.in new file mode 100755 index 000000000..c615b7d85 --- /dev/null +++ b/src/GroupGUI/Makefile.in @@ -0,0 +1,60 @@ +# GEOM BUILDGUI : +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Sergey ANIKIN (OCC) +# Module : GEOM +# $Header: + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + + +@COMMENCE@ + +# header files +EXPORT_HEADERS= + +# Libraries targets +LIB = libGroupGUI.la + +LIB_SRC = GroupGUI.cxx \ + GroupGUI_GroupDlg.cxx + +LIB_MOC = GroupGUI.h \ + GroupGUI_GroupDlg.h + +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl + +LIB_SERVER_IDL = + +# additionnal information to compil and link file + +CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS += -lGEOMFiltersSelection -lGEOMBase + +@CONCLUDE@ diff --git a/src/IGESExport/IGESExport.cxx b/src/IGESExport/IGESExport.cxx new file mode 100644 index 000000000..8ce7f9933 --- /dev/null +++ b/src/IGESExport/IGESExport.cxx @@ -0,0 +1,48 @@ +// File: IGESExport.cxx +// Created: Wed May 19 14:49:45 2004 +// Author: Pavel TELKOV +// + +#include "utilities.h" + +#include +#include +#include + +#include +#include + +//============================================================================= +/*! + * + */ +//============================================================================= + +extern "C" +{ +#ifdef WNT + __declspec(__dllexport) +#endif + int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName) + { + MESSAGE("Export IGES into file " << theFileName.ToCString()); + try + { + //VRV: OCC 4.0 migration + IGESControl_Controller::Init(); + IGESControl_Writer ICW (Interface_Static::CVal("XSTEP.iges.unit"), + Interface_Static::IVal("XSTEP.iges.writebrep.mode")); + //VRV: OCC 4.0 migration + + ICW.AddShape( theShape ); + ICW.ComputeModel(); + if ( ICW.Write( theFileName.ToCString() ) ) + return 1; + } + catch(Standard_Failure) + { + //THROW_SALOME_CORBA_EXCEPTION("Exception catched in IGESExport", SALOME::BAD_PARAM); + } + return 0; + } +} diff --git a/src/IGESExport/Makefile.in b/src/IGESExport/Makefile.in new file mode 100644 index 000000000..d9abe4c34 --- /dev/null +++ b/src/IGESExport/Makefile.in @@ -0,0 +1,45 @@ +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Pavel TELKOV +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + +@COMMENCE@ + +# Libraries targets + +LIB= libIGESExport.la + +LIB_SRC = IGESExport.cxx + +# additionnal information to compil and link file +CPPFLAGS+= $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS+= $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS+= $(CAS_LDPATH) -lTKIGES -L${KERNEL_ROOT_DIR}/lib/salome + +@CONCLUDE@ diff --git a/src/IGESImport/IGESImport.cxx b/src/IGESImport/IGESImport.cxx new file mode 100644 index 000000000..f0cb68c8b --- /dev/null +++ b/src/IGESImport/IGESImport.cxx @@ -0,0 +1,72 @@ +// File: IGESImport.cxx +// Created: Wed May 19 14:36:35 2004 +// Author: Pavel TELKOV +// + +#include "utilities.h" + +#include +#include + +#include +#include + +//============================================================================= +/*! + * + */ +//============================================================================= + +extern "C" +{ +#ifdef WNT + __declspec(__dllexport) +#endif + TopoDS_Shape Import (const TCollection_AsciiString& theFileName, + TCollection_AsciiString& theError) + { + IGESControl_Reader aReader; + TopoDS_Shape aResShape; + try { + IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString()); + + if (status == IFSelect_RetDone) { + MESSAGE("ImportIGES : all Geometry Transfer"); + //OCC 5.1.2 porting + // aReader.Clear(); + // aReader.TransferRoots(false); + aReader.ClearShapes(); + aReader.TransferRoots(); + + MESSAGE("ImportIGES : count of shapes produced = " << aReader.NbShapes()); + aResShape = aReader.OneShape(); + + } else { +// switch (status) { +// case IFSelect_RetVoid: +// theError = "Nothing created or No data to process"; +// break; +// case IFSelect_RetError: +// theError = "Error in command or input data"; +// break; +// case IFSelect_RetFail: +// theError = "Execution was run, but has failed"; +// break; +// case IFSelect_RetStop: +// theError = "Execution has been stopped. Quite possible, an exception was raised"; +// break; +// default: +// break; +// } + theError = "Wrong format of the imported file. Can't import file."; + aResShape.Nullify(); + } + } + catch(Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + theError = aFail->GetMessageString(); + aResShape.Nullify(); + } + return aResShape; + } +} diff --git a/src/IGESImport/Makefile.in b/src/IGESImport/Makefile.in new file mode 100644 index 000000000..e9aaaa840 --- /dev/null +++ b/src/IGESImport/Makefile.in @@ -0,0 +1,45 @@ +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Pavel TELKOV +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + +@COMMENCE@ + +# Libraries targets + +LIB= libIGESImport.la + +LIB_SRC = IGESImport.cxx + +# additionnal information to compil and link file +CPPFLAGS+= $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS+= $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS+= $(CAS_LDPATH) -lTKIGES -L${KERNEL_ROOT_DIR}/lib/salome + +@CONCLUDE@ diff --git a/src/Makefile.in b/src/Makefile.in index 766733aad..7fed1dceb 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -32,6 +32,6 @@ VPATH=.:@srcdir@ @COMMENCE@ -SUBDIRS = OBJECT ARCHIMEDE PARTITION SKETCHER GEOMDS GEOM GEOMClient GEOMFiltersSelection DlgRef GEOMContext GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GEOMGUI GEOM_SWIG +SUBDIRS = OBJECT ARCHIMEDE NMTDS NMTTools NMTAlgo SKETCHER PARTITION GEOM BREPExport BREPImport IGESExport IGESImport STEPExport STEPImport ShHealOper GEOMImpl GEOM_I GEOMClient DlgRef GEOMFiltersSelection GEOMGUI GEOMBase DisplayGUI GEOMToolsGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI BooleanGUI TransformationGUI OperationGUI RepairGUI MeasureGUI GroupGUI BlocksGUI GEOM_SWIG GEOM_I_Superv @MODULE@ diff --git a/src/MeasureGUI/Makefile.in b/src/MeasureGUI/Makefile.in index 2b983be0d..dd2706fd9 100644 --- a/src/MeasureGUI/Makefile.in +++ b/src/MeasureGUI/Makefile.in @@ -55,10 +55,10 @@ LIB_SRC = MeasureGUI.cxx \ MeasureGUI_DistanceDlg.cxx \ MeasureGUI_MaxToleranceDlg.cxx \ MeasureGUI_WhatisDlg.cxx \ - MeasureGUI_CheckShapeDlg.cxx + MeasureGUI_CheckShapeDlg.cxx \ + MeasureGUI_PointDlg.cxx LIB_MOC = \ - MeasureGUI.h \ MeasureGUI_Skeleton_QTD.h \ MeasureGUI_1Sel3LineEdit_QTD.h \ MeasureGUI_1Sel6LineEdit_QTD.h \ @@ -73,11 +73,12 @@ LIB_MOC = \ MeasureGUI_DistanceDlg.h \ MeasureGUI_MaxToleranceDlg.h \ MeasureGUI_WhatisDlg.h \ - MeasureGUI_CheckShapeDlg.h + MeasureGUI_CheckShapeDlg.h \ + MeasureGUI_PointDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file diff --git a/src/MeasureGUI/MeasureGUI.cxx b/src/MeasureGUI/MeasureGUI.cxx index d2a67dac4..2eb28d73e 100644 --- a/src/MeasureGUI/MeasureGUI.cxx +++ b/src/MeasureGUI/MeasureGUI.cxx @@ -24,10 +24,10 @@ // File : MeasureGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ -using namespace std; #include "MeasureGUI.h" +#include "QAD_Desktop.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" @@ -39,17 +39,29 @@ using namespace std; #include "MeasureGUI_MaxToleranceDlg.h" // Method MAXTOLERANCE #include "MeasureGUI_WhatisDlg.h" // Method WHATIS #include "MeasureGUI_CheckShapeDlg.h" // Method CHECKSHAPE +#include "MeasureGUI_PointDlg.h" // Method POINTCOORDINATES + +MeasureGUI* MeasureGUI::myGUIObject = 0; + +//======================================================================= +// function : GetMeasureGUI() +// purpose : Get the only MeasureGUI object [ static ] +//======================================================================= +MeasureGUI* MeasureGUI::GetMeasureGUI() +{ + if ( myGUIObject == 0 ) { + // init MeasureGUI only once + myGUIObject = new MeasureGUI(); + } + return myGUIObject; +} //======================================================================= // function : MeasureGUI() // purpose : Constructor //======================================================================= -MeasureGUI::MeasureGUI() : - QObject() +MeasureGUI::MeasureGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -66,60 +78,27 @@ MeasureGUI::~MeasureGUI() // function : OnGUIEvent() // purpose : //======================================================================= -bool MeasureGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) +bool MeasureGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) { - MeasureGUI* myMeasureGUI = new MeasureGUI(); - myMeasureGUI->myGeomGUI->EmitSignalDeactivateDialog(); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + MeasureGUI* myMeasureGUI = GetMeasureGUI(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); - switch (theCommandID) - { - case 701: // PROPERTIES (Length, surface, volume) - { - MeasureGUI_PropertiesDlg *aDlg = new MeasureGUI_PropertiesDlg(parent, "", Sel); - break; - } - case 702: // CDG : Center of mass - { - MeasureGUI_CenterMassDlg *aDlg = new MeasureGUI_CenterMassDlg(parent, "", myMeasureGUI, Sel); - break; - } - case 703: // INERTIA - { - MeasureGUI_InertiaDlg *aDlg = new MeasureGUI_InertiaDlg(parent, "", Sel); - break; - } - case 7041: // BOUNDING BOX - { - MeasureGUI_BndBoxDlg *aDlg = new MeasureGUI_BndBoxDlg(parent, "", Sel); - break; - } - case 7042: // MIN DISTANCE - { - MeasureGUI_DistanceDlg *aDlg = new MeasureGUI_DistanceDlg(parent, "", Sel); - break; - } - case 705: // MAXTOLERANCE - { - MeasureGUI_MaxToleranceDlg *aDlg = new MeasureGUI_MaxToleranceDlg(parent, "", Sel); - break; - } - case 706: // WHATIS - { - MeasureGUI_WhatisDlg *aDlg = new MeasureGUI_WhatisDlg(parent, "", Sel); - break; - } - case 707: // CHECKSHAPE - { - MeasureGUI_CheckShapeDlg *aDlg = new MeasureGUI_CheckShapeDlg(parent, "", Sel); - break; - } - default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } + switch ( theCommandID ) + { + case 701 : new MeasureGUI_PropertiesDlg ( parent, Sel ); break; // LENGTH, AREA AND VOLUME + case 702 : new MeasureGUI_CenterMassDlg ( parent, Sel ); break; // CENTER MASS + case 703 : new MeasureGUI_InertiaDlg ( parent, Sel ); break; // INERTIA + case 7041: new MeasureGUI_BndBoxDlg ( parent, Sel ); break; // BOUNDING BOX + case 7042: new MeasureGUI_DistanceDlg ( parent, Sel ); break; // MIN DISTANCE + case 705 : new MeasureGUI_MaxToleranceDlg( parent, Sel ); break; // MAXTOLERANCE + case 706 : new MeasureGUI_WhatisDlg ( parent, Sel ); break; // WHATIS + case 707 : new MeasureGUI_CheckShapeDlg ( parent, Sel ); break; // CHECKSHAPE + case 708 : new MeasureGUI_PointDlg ( parent, Sel ); break; // POINT COORDINATES + + default: parent->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); break; + } return true; } @@ -128,8 +107,10 @@ bool MeasureGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) // function : MakeCDGAndDisplay() // purpose : //===================================================================================== -void MeasureGUI::MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape) +/*void MeasureGUI::MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape) { + QAD_Application::getDesktop()->putInfo("MakeCDGAndDisplay method from MeasureGUI should be reimplemented ..."); + try { GEOM::GEOM_Shape_var result = myGeom->MakeCDG(Shape); if(result->_is_nil()) { @@ -142,9 +123,11 @@ void MeasureGUI::MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape) } catch(const SALOME::SALOME_Exception& S_ex) { QtCatchCorbaException(S_ex); - } + } + return; } +*/ //===================================================================================== @@ -152,6 +135,8 @@ void MeasureGUI::MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape) //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return MeasureGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return MeasureGUI::GetMeasureGUI(); + } } diff --git a/src/MeasureGUI/MeasureGUI.h b/src/MeasureGUI/MeasureGUI.h index 751574e47..b3eaadea7 100644 --- a/src/MeasureGUI/MeasureGUI.h +++ b/src/MeasureGUI/MeasureGUI.h @@ -24,33 +24,29 @@ // File : MeasureGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef MEASUREGUI_H #define MEASUREGUI_H -#include "GEOMBase.h" +#include "GEOMGUI.h" //================================================================================= // class : MeasureGUI // purpose : //================================================================================= -class MeasureGUI : public QObject +class MeasureGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + MeasureGUI(); public : - MeasureGUI(); - ~MeasureGUI(); - - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); - - void MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + ~MeasureGUI(); + static MeasureGUI* GetMeasureGUI(); + bool OnGUIEvent( int , QAD_Desktop* ); +private: + static MeasureGUI* myGUIObject; }; #endif diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx index 838f140e7..cc7349832 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx @@ -27,13 +27,22 @@ // $Header$ #include "MeasureGUI_BndBoxDlg.h" +#include "MeasureGUI_1Sel6LineEdit_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" + +#include "GEOMBase.h" +#include "GEOM_Displayer.h" #include -#include #include "utilities.h" +#include "QAD_Desktop.h" -using namespace std; +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_BndBoxDlg() @@ -42,39 +51,44 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_PropertiesDlg", Sel ) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BOUNDING_BOX"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_BOUNDING_BOX" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_BNDBOX_TITLE")); + setCaption( tr( "GEOM_BNDBOX_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_BNDBOX")); - RadioButton1->setPixmap(image0); - - GroupC1 = new MeasureGUI_1Sel6LineEdit_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_BNDBOX_OBJDIM")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextLabel2->setText(tr("GEOM_MIN")); - GroupC1->TextLabel3->setText(tr("GEOM_MAX")); - GroupC1->TextLabel4->setText(tr("GEOM_X")); - GroupC1->TextLabel5->setText(tr("GEOM_Y")); - GroupC1->TextLabel6->setText(tr("GEOM_Z")); - GroupC1->LineEdit11->setReadOnly(TRUE); - GroupC1->LineEdit12->setReadOnly(TRUE); - GroupC1->LineEdit21->setReadOnly(TRUE); - GroupC1->LineEdit22->setReadOnly(TRUE); - GroupC1->LineEdit31->setReadOnly(TRUE); - GroupC1->LineEdit32->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupC1, 1, 0); + + GroupConstructors->setTitle( tr( "GEOM_BNDBOX" ) ); + RadioButton1->setPixmap( image0 ); + + myGrp = new MeasureGUI_1Sel6LineEdit_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_BNDBOX_OBJDIM" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextLabel2->setText( tr( "GEOM_MIN" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_MAX" ) ); + myGrp->TextLabel4->setText( tr( "GEOM_X" ) ); + myGrp->TextLabel5->setText( tr( "GEOM_Y" ) ); + myGrp->TextLabel6->setText( tr( "GEOM_Z" ) ); + myGrp->LineEdit11->setReadOnly( TRUE ); + myGrp->LineEdit12->setReadOnly( TRUE ); + myGrp->LineEdit21->setReadOnly( TRUE ); + myGrp->LineEdit22->setReadOnly( TRUE ); + myGrp->LineEdit31->setReadOnly( TRUE ); + myGrp->LineEdit32->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); + /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -84,7 +98,6 @@ MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg(QWidget* parent, const char* name, SA //================================================================================= MeasureGUI_BndBoxDlg::~MeasureGUI_BndBoxDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -92,155 +105,105 @@ MeasureGUI_BndBoxDlg::~MeasureGUI_BndBoxDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_BndBoxDlg::Init() +void MeasureGUI_BndBoxDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - /* signals and slots connections */ - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupC1->show(); - this->show(); - - return; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + MeasureGUI_Skeleton::Init( Sel ); } - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case //================================================================================= -void MeasureGUI_BndBoxDlg::SelectionIntoArgument() -{ - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myEditCurrentArgument->setText(""); - QString aString = ""; - - GroupC1->LineEdit11->setText(""); - GroupC1->LineEdit12->setText(""); - GroupC1->LineEdit21->setText(""); - GroupC1->LineEdit22->setText(""); - GroupC1->LineEdit31->setText(""); - GroupC1->LineEdit32->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull()) - return; - - GroupC1->LineEdit1->setText(aString); - - this->CalculateAndDisplayBndBox(S); - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() +// function : processObject // purpose : //================================================================================= -void MeasureGUI_BndBoxDlg::SetEditCurrentArgument() +void MeasureGUI_BndBoxDlg::processObject() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; + double aXMin, aXMax, aYMin, aYMax, aZMin, aZMax; + + if ( !getParameters( aXMin, aXMax, aYMin, aYMax, aZMin, aZMax ) ) + { + mySelEdit->setText( "" ); + myGrp->LineEdit11->setText( "" ); + myGrp->LineEdit12->setText( "" ); + myGrp->LineEdit21->setText( "" ); + myGrp->LineEdit22->setText( "" ); + myGrp->LineEdit31->setText( "" ); + myGrp->LineEdit32->setText( "" ); } + else + { + + myGrp->LineEdit11->setText( tr( "%1" ).arg( aXMin, 12, 'f', 6 ) ); + myGrp->LineEdit12->setText( tr( "%1" ).arg( aXMax, 12, 'f', 6 ) ); - this->SelectionIntoArgument(); - return; -} + myGrp->LineEdit21->setText( tr( "%1" ).arg( aYMin, 12, 'f', 6 ) ); + myGrp->LineEdit22->setText( tr( "%1" ).arg( aYMax, 12, 'f', 6 ) ); + myGrp->LineEdit31->setText( tr( "%1" ).arg( aZMin, 12, 'f', 6 ) ); + myGrp->LineEdit32->setText( tr( "%1" ).arg( aZMax, 12, 'f', 6 ) ); + } +} //================================================================================= -// function : LineEditReturnPressed() +// function : getParameters // purpose : //================================================================================= -void MeasureGUI_BndBoxDlg::LineEditReturnPressed() +bool MeasureGUI_BndBoxDlg::getParameters( double& theXmin, double& theXmax, + double& theYmin, double& theYmax, + double& theZmin, double& theZmax ) { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; + if ( myObj->_is_nil() ) + return false; else - return; - - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; + { + try + { + GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetBoundingBox( + myObj, theXmin, theXmax, theYmin, theYmax, theZmin, theZmax ); + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } + + return getOperation()->IsDone(); + } } - //================================================================================= -// function : ActivateThisDialog() +// function : buildPrs // purpose : //================================================================================= -void MeasureGUI_BndBoxDlg::ActivateThisDialog() +SALOME_Prs* MeasureGUI_BndBoxDlg::buildPrs() { - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; -} + double aXMin, aYMin, aZMin, aXMax, aYMax, aZMax; + if ( myObj->_is_nil() || !getParameters( aXMin, aXMax, aYMin, aYMax, aZMin, aZMax ) ) + return 0; + + TopoDS_Shape aShape = BRepPrimAPI_MakeBox( gp_Pnt( aXMin, aYMin, aZMin ), + gp_Pnt( aXMax, aYMax, aZMax ) ).Shape(); + + return !aShape.IsNull() ? getDisplayer()->BuildPrs( aShape ) : 0; -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void MeasureGUI_BndBoxDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; } -//================================================================================= -// function : CalculateAndDisplayBndBox() -// purpose : -//================================================================================= -void MeasureGUI_BndBoxDlg::CalculateAndDisplayBndBox(const TopoDS_Shape& S) -{ - GroupC1->LineEdit11->setText(""); - GroupC1->LineEdit12->setText(""); - GroupC1->LineEdit21->setText(""); - GroupC1->LineEdit22->setText(""); - GroupC1->LineEdit31->setText(""); - GroupC1->LineEdit32->setText(""); - - if(S.IsNull()) - return; - - Standard_Real axmin, aymin, azmin, axmax, aymax, azmax; - Bnd_Box B; - - try { - BRepBndLib::Add(S,B); - B.Get(axmin, aymin, azmin, axmax, aymax, azmax); - GroupC1->LineEdit11->setText(tr("%1").arg(axmin, 12, 'f', 6)); - GroupC1->LineEdit12->setText(tr("%1").arg(axmax, 12, 'f', 6)); - GroupC1->LineEdit21->setText(tr("%1").arg(aymin, 12, 'f', 6)); - GroupC1->LineEdit22->setText(tr("%1").arg(aymax, 12, 'f', 6)); - GroupC1->LineEdit31->setText(tr("%1").arg(azmin, 12, 'f', 6)); - GroupC1->LineEdit32->setText(tr("%1").arg(azmax, 12, 'f', 6)); - - mySimulationTopoDs = BRepPrimAPI_MakeBox(gp_Pnt(axmin, aymin, azmin), gp_Pnt(axmax, aymax, azmax)).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in CalculateAndDisplayBndBox()"); - } - return; -} + + + + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h index ee17c7008..50e24820b 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h @@ -30,9 +30,8 @@ #define DIALOGBOX_BNDBOX_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel6LineEdit_QTD.h" -#include "MeasureGUI.h" +class MeasureGUI_1Sel6LineEdit_QTD; //================================================================================= // class : DialogBox_PROPERTIES @@ -43,22 +42,39 @@ class MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton Q_OBJECT public: - MeasureGUI_BndBoxDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_BndBoxDlg(); + MeasureGUI_BndBoxDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_BndBoxDlg(); +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + virtual SALOME_Prs* buildPrs(); private: - void Init(); - void enterEvent(QEvent* e); - void CalculateAndDisplayBndBox(const TopoDS_Shape& S); - MeasureGUI_1Sel6LineEdit_QTD* GroupC1; + void Init( SALOME_Selection* Sel ); + bool getParameters( double& Xmin, double& Xmax, + double& Ymin, double& Ymax, + double& Zmin, double& Zmax ); -private slots: - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); +private: + MeasureGUI_1Sel6LineEdit_QTD* myGrp; }; #endif // DIALOGBOX_BNDBOX_H + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx index 2ddbc82f0..ed0a1087e 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -27,54 +27,56 @@ // $Header$ #include "MeasureGUI_CenterMassDlg.h" - -#include -#include -#include -#include - +#include "MeasureGUI_1Sel3LineEdit_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" #include "utilities.h" +#include "QAD_Desktop.h" -using namespace std; +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_CenterMassDlg() -// purpose : Constructs a MeasureGUI_CenterMassDlg which is a child of 'parent', with the +// purpose : Constructs a MeasureGUI_CenterMassDlg 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. //================================================================================= -MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg(QWidget* parent, const char* name, MeasureGUI* theMeasureGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg( QWidget* parent, SALOME_Selection* Sel ) +: GEOMBase_Skeleton( parent, "MeasureGUI_CenterMassDlg", Sel, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CENTERMASS"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr( "ICON_DLG_CENTERMASS" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_CMASS_TITLE")); + setCaption( tr( "GEOM_CMASS_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_CMASS")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupC1 = new MeasureGUI_1Sel3LineEdit_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_CENTER")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextLabel2->setText(tr("GEOM_X")); - GroupC1->TextLabel3->setText(tr("GEOM_Y")); - GroupC1->TextLabel4->setText(tr("GEOM_Z")); - GroupC1->LineEdit2->setReadOnly(TRUE); - GroupC1->LineEdit3->setReadOnly(TRUE); - GroupC1->LineEdit4->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupC1, 1, 0); + + GroupConstructors->setTitle( tr( "GEOM_CMASS" ) ); + RadioButton1->setPixmap( image0 ); + RadioButton2->close( TRUE ); + RadioButton3->close( TRUE ); + + myGrp = new MeasureGUI_1Sel3LineEdit_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_CENTER" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextLabel2->setText( tr( "GEOM_X" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_Y" ) ); + myGrp->TextLabel4->setText( tr( "GEOM_Z" ) ); + myGrp->LineEdit2->setReadOnly( TRUE ); + myGrp->LineEdit3->setReadOnly( TRUE ); + myGrp->LineEdit4->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 2, 0 ); /***************************************************************/ /* Initialisation */ - myMeasureGUI = theMeasureGUI; - Init(); + Init( Sel ); } @@ -84,7 +86,6 @@ MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg(QWidget* parent, const char* //================================================================================= MeasureGUI_CenterMassDlg::~MeasureGUI_CenterMassDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -92,27 +93,28 @@ MeasureGUI_CenterMassDlg::~MeasureGUI_CenterMassDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_CenterMassDlg::Init() +void MeasureGUI_CenterMassDlg::Init( SALOME_Selection* Sel ) { /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - myOkCenterMass = false; + mySelection = Sel; + myEditCurrentArgument = myGrp->LineEdit1; /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + + connect( myGrp->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + initName( tr( "GEOM_POINT") ); + globalSelection(); + SelectionIntoArgument(); /* displays Dialog */ - GroupC1->show(); + myGrp->show(); this->show(); - - return; } @@ -122,9 +124,8 @@ void MeasureGUI_CenterMassDlg::Init() //================================================================================= void MeasureGUI_CenterMassDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -132,17 +133,15 @@ void MeasureGUI_CenterMassDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void MeasureGUI_CenterMassDlg::ClickOnApply() +bool MeasureGUI_CenterMassDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkCenterMass) - myMeasureGUI->MakeCDGAndDisplay(myGeomShape); - return; + initName(); + return true; + +// myMeasureGUI->MakeCDGAndDisplay( myGeomShape ); } @@ -152,34 +151,28 @@ void MeasureGUI_CenterMassDlg::ClickOnApply() //================================================================================= void MeasureGUI_CenterMassDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - myEditCurrentArgument->setText(""); - QString aString = ""; - - myOkCenterMass = false; - GroupC1->LineEdit2->setText(""); - GroupC1->LineEdit3->setText(""); - GroupC1->LineEdit4->setText(""); + erasePreview(); + myObj = GEOM::GEOM_Object::_nil(); - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) + if ( mySelection->IObjectCount() != 1 ) + { + processObject(); return; + } - /* nbSel == 1 */ - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, this->myShape)) - return; + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); - Standard_Boolean testResult; - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) + if ( !testResult || aSelectedObject->_is_nil() ) + { + processObject(); return; + } - myEditCurrentArgument->setText(aString); - - if(this->CalculateAndDisplayCenterMass()) - myOkCenterMass = true; - return; + myObj = aSelectedObject; + processObject(); + displayPreview(); } @@ -189,15 +182,9 @@ void MeasureGUI_CenterMassDlg::SelectionIntoArgument() //================================================================================= void MeasureGUI_CenterMassDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; - } - - this->SelectionIntoArgument(); - return; + myGrp->LineEdit1->setFocus(); + myEditCurrentArgument = myGrp->LineEdit1; + SelectionIntoArgument(); } @@ -207,14 +194,12 @@ void MeasureGUI_CenterMassDlg::SetEditCurrentArgument() //================================================================================= void MeasureGUI_CenterMassDlg::LineEditReturnPressed() { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + QLineEdit* send = ( QLineEdit* )sender(); + if ( send == myGrp->LineEdit1 ) + { + myEditCurrentArgument = myGrp->LineEdit1; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -225,10 +210,41 @@ void MeasureGUI_CenterMassDlg::LineEditReturnPressed() void MeasureGUI_CenterMassDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + connect( mySelection, SIGNAL( currentSelectionChanged() ), + this, SLOT ( SelectionIntoArgument() ) ); + + globalSelection(); + displayPreview(); +} + +//================================================================================= +// function : processObject() +// purpose : Fill dialog fields in accordance with myObj +//================================================================================= +void MeasureGUI_CenterMassDlg::processObject() +{ + if ( myObj->_is_nil() ) + { + myGrp->LineEdit1->setText( "" ); + myGrp->LineEdit2->setText( "" ); + myGrp->LineEdit3->setText( "" ); + myGrp->LineEdit4->setText( "" ); + erasePreview(); + } + else + { + double x = 0, y = 0, z = 0; + + getParameters( x, y, z ); + + myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) ); + myGrp->LineEdit2->setText( QString( "%1" ).arg( x ) ); + myGrp->LineEdit3->setText( QString( "%1" ).arg( y ) ); + myGrp->LineEdit4->setText( QString( "%1" ).arg( z ) ); + + displayPreview(); + } } @@ -236,65 +252,85 @@ void MeasureGUI_CenterMassDlg::ActivateThisDialog() // function : enterEvent() // purpose : //================================================================================= -void MeasureGUI_CenterMassDlg::enterEvent(QEvent* e) +void MeasureGUI_CenterMassDlg::enterEvent( QEvent* e ) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr MeasureGUI_CenterMassDlg::createOperation() +{ + return getGeomEngine()->GetIMeasureOperations( getStudyId() ); +} //================================================================================= -// function : CalculateAndDisplayCenterMass() +// function : isValid // purpose : //================================================================================= -bool MeasureGUI_CenterMassDlg::CalculateAndDisplayCenterMass() +bool MeasureGUI_CenterMassDlg::isValid( QString& ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - QString resString; - GProp_GProps System; - - if(myShape.ShapeType() == TopAbs_VERTEX) - myGeomBase->VertexToPoint(myShape, myCenterMass); - else if(myShape.ShapeType() == TopAbs_EDGE || myShape.ShapeType() == TopAbs_WIRE) { - BRepGProp::LinearProperties(myShape, System); - myCenterMass = System.CentreOfMass(); - } - else if(myShape.ShapeType() == TopAbs_FACE || myShape.ShapeType() == TopAbs_SHELL) { - BRepGProp::SurfaceProperties(myShape, System); - myCenterMass = System.CentreOfMass(); - } - else { - BRepGProp::VolumeProperties(myShape, System); - myCenterMass = System.CentreOfMass(); - } - - BRepBuilderAPI_MakeVertex V(myCenterMass); - mySimulationTopoDs = V.Shape(); - - resString = tr("%1").arg(myCenterMass.X(), 12, 'f', 6); - GroupC1->LineEdit2->setText(resString); - - resString = tr("%1").arg(myCenterMass.Y(), 12, 'f', 6); - GroupC1->LineEdit3->setText(resString); - - resString = tr("%1").arg(myCenterMass.Z(), 12, 'f', 6); - GroupC1->LineEdit4->setText(resString); - - - if(!mySimulationTopoDs.IsNull()) { - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + return !myObj->_is_nil(); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool MeasureGUI_CenterMassDlg::getParameters( double& theX, double& theY, double& theZ ) +{ + if ( myObj->_is_nil() ) + return false; + else + { + try + { + GEOM::GEOM_Object_var anObj; + anObj = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetCentreOfMass( myObj ); + if ( !getOperation()->IsDone() ) + return false; + + TopoDS_Shape aShape; + if ( !GEOMBase::GetShape( anObj, aShape ) || + aShape.IsNull() || + aShape.ShapeType() != TopAbs_VERTEX ) + return false; + + TopoDS_Vertex aVertex = TopoDS::Vertex( aShape ); + + gp_Pnt aPnt = BRep_Tool::Pnt( aVertex ); + + theX = aPnt.X(); + theY = aPnt.Y(); + theZ = aPnt.Z(); + return true; } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in CalculateAndDisplayCenterMass()"); - } - return false; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool MeasureGUI_CenterMassDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetCentreOfMass( myObj ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h index e67a67ccf..74703bce9 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -29,46 +29,48 @@ #define DIALOGBOX_CMASS_H #include "GEOMBase_Skeleton.h" -#include "MeasureGUI_1Sel3LineEdit_QTD.h" - -#include "MeasureGUI.h" -#include +class MeasureGUI_1Sel3LineEdit_QTD; //================================================================================= // class : MeasureGUI_CenterMassDlg // purpose : //================================================================================= class MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton -{ +{ Q_OBJECT public: - MeasureGUI_CenterMassDlg(QWidget* parent = 0, const char* name = 0, MeasureGUI* theMeasureGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_CenterMassDlg(); + MeasureGUI_CenterMassDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_CenterMassDlg(); -private: - void Init(); - void enterEvent(QEvent* e); - bool CalculateAndDisplayCenterMass(); +protected: + + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); - MeasureGUI* myMeasureGUI; +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); - GEOM::GEOM_Shape_var myGeomShape; /* is myBase */ - TopoDS_Shape myShape; /* Shape argument */ - gp_Pnt myCenterMass; - bool myOkCenterMass; /* true after center of mass simulation calculation */ +private: - MeasureGUI_1Sel3LineEdit_QTD* GroupC1; - -private slots: - void ClickOnOk(); - void ClickOnApply(); - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); + void Init( SALOME_Selection* ); + void enterEvent( QEvent* e ); + void processObject(); + bool getParameters( double&, double&, double& ); +private: + + GEOM::GEOM_Object_var myObj; + MeasureGUI_1Sel3LineEdit_QTD* myGrp; }; #endif // DIALOGBOX_CMASS_H diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx index 407824be7..3ed0566df 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -27,45 +27,61 @@ // $Header$ #include "MeasureGUI_CheckShapeDlg.h" +#include "MeasureGUI_1Sel1TextView_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" -#include +#include "utilities.h" +#include "QAD_Desktop.h" #include +#include +#include +#include +#include +#include -#include "utilities.h" - -using namespace std; +#define TEXTEDIT_FONT_FAMILY "Courier" +#define TEXTEDIT_FONT_SIZE 11 //================================================================================= // class : MeasureGUI_CheckShapeDlg() -// purpose : Constructs a MeasureGUI_CheckShapeDlg which is a child of 'parent', with the +// purpose : Constructs a MeasureGUI_CheckShapeDlg 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. //================================================================================= -MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_CheckShapeDlg", Sel ) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHECKSHAPE"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_CHECKSHAPE" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_CHECK_TITLE")); + setCaption( tr( "GEOM_CHECK_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_CHECK_SHAPE")); - RadioButton1->setPixmap(image0); - GroupC1 = new MeasureGUI_1Sel1TextView_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_CHECK_INFOS")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextEdit1->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); + GroupConstructors->setTitle( tr( "GEOM_CHECK_SHAPE" ) ); + RadioButton1->setPixmap( image0 ); + + myGrp = new MeasureGUI_1Sel1TextView_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_CHECK_INFOS" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextEdit1->setReadOnly( TRUE ); + + QFont aFont( TEXTEDIT_FONT_FAMILY, TEXTEDIT_FONT_SIZE ); + aFont.setStyleHint( QFont::TypeWriter, QFont::PreferAntialias ); + myGrp->TextEdit1->setFont( aFont ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); - Layout1->addWidget(GroupC1, 1, 0); /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -75,7 +91,6 @@ MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg(QWidget* parent, const char* //================================================================================= MeasureGUI_CheckShapeDlg::~MeasureGUI_CheckShapeDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -83,132 +98,60 @@ MeasureGUI_CheckShapeDlg::~MeasureGUI_CheckShapeDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_CheckShapeDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - /* signals and slots connections */ - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupC1->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case -//================================================================================= -void MeasureGUI_CheckShapeDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - SelectedName = ""; /* future the name of selection */ - GroupC1->TextEdit1->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(S.IsNull()) - return; - - myEditCurrentArgument->setText(SelectedName); - this->Check(S); - - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void MeasureGUI_CheckShapeDlg::SetEditCurrentArgument() +void MeasureGUI_CheckShapeDlg::Init( SALOME_Selection* Sel ) { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; - } - - this->SelectionIntoArgument(); - return; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + MeasureGUI_Skeleton::Init( Sel ); } - //================================================================================= -// function : LineEditReturnPressed() +// function : getParameters // purpose : //================================================================================= -void MeasureGUI_CheckShapeDlg::LineEditReturnPressed() +bool MeasureGUI_CheckShapeDlg::getParameters ( bool& theIsValid, QString& theMsg ) { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; + if ( myObj->_is_nil() ) + return false; else - return; - - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void MeasureGUI_CheckShapeDlg::ActivateThisDialog() -{ - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void MeasureGUI_CheckShapeDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + { + try + { + char* aMsg; + theIsValid = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->CheckShape( myObj, aMsg ); + theMsg = aMsg; + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } + + return getOperation()->IsDone(); + } } //================================================================================= -// function : Check() +// function : processObject // purpose : //================================================================================= -void MeasureGUI_CheckShapeDlg::Check(const TopoDS_Shape S) +void MeasureGUI_CheckShapeDlg::processObject() { - if(S.IsNull()) + bool isShapeValid; + QString aMsg; + if ( !getParameters( isShapeValid, aMsg ) ) + { + myGrp->TextEdit1->setText( "" ); return; - - try { - BRepCheck_Analyzer ana(S,false); - if(ana.IsValid()) - GroupC1->TextEdit1->setText("This Shape seems to be valid."); - else - GroupC1->TextEdit1->setText("This Shape is not valid."); } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in Check()"); + + if (isShapeValid) { + myGrp->TextEdit1->setText("This Shape seems to be valid."); + } else { + QString aDescr ("This Shape is not valid.\n"); + aDescr += aMsg; + myGrp->TextEdit1->setText(aDescr); +// myGrp->TextEdit1->setText("This Shape is not valid."); } - return; } diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h index 1c80efd27..514d06065 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -30,35 +30,35 @@ #define DIALOGBOX_CHECKSHAPEDLG_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel1TextView_QTD.h" -#include "MeasureGUI.h" +class MeasureGUI_1Sel1TextView_QTD; //================================================================================= // class : MeasureGUI_CheckShapeDlg // purpose : //================================================================================= class MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton -{ +{ Q_OBJECT public: - MeasureGUI_CheckShapeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_CheckShapeDlg(); + MeasureGUI_CheckShapeDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_CheckShapeDlg(); +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); private: - void Init(); - void enterEvent(QEvent* e); - void Check(const TopoDS_Shape S); - QString SelectedName; - MeasureGUI_1Sel1TextView_QTD* GroupC1; + void Init( SALOME_Selection* Sel ); + bool getParameters( bool& theIsValid, + QString& theMsg); + +private: -private slots: - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); + MeasureGUI_1Sel1TextView_QTD* myGrp; }; diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx index f33a3415b..2e9a3934a 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -27,13 +27,17 @@ // $Header$ #include "MeasureGUI_DistanceDlg.h" - +#include "MeasureGUI_2Sel1LineEdit_QTD.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" #include "OCCViewer_Viewer3d.h" +#include "OCCViewer_Prs.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" #include #include -#include #include #include #include @@ -43,41 +47,51 @@ #include "utilities.h" -using namespace std; +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_DistanceDlg() -// purpose : Constructs a MeasureGUI_DistanceDlg which is a child of 'parent', with the +// purpose : Constructs a MeasureGUI_DistanceDlg 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. //================================================================================= -MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_DistanceDlg", Sel ) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MINDIST"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_MINDIST" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_MINDIST_TITLE")); + setCaption( tr( "GEOM_MINDIST_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_DISTANCE")); - RadioButton1->setPixmap(image0); - - GroupC1 = new MeasureGUI_2Sel1LineEdit_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_MINDIST_OBJ")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); - GroupC1->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); - GroupC1->TextLabel3->setText(tr("GEOM_LENGTH")); - GroupC1->LineEdit3->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); - GroupC1->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupC1, 1, 0); + + GroupConstructors->setTitle( tr( "GEOM_DISTANCE" ) ); + RadioButton1->setPixmap( image0 ); + + myGrp = new MeasureGUI_2Sel1LineEdit_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_MINDIST_OBJ" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT_I" ).arg( "1" ) ); + myGrp->TextLabel2->setText( tr( "GEOM_OBJECT_I" ).arg( "2" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_LENGTH" ) ); + myGrp->LineEdit3->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->PushButton2->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + myGrp->LineEdit2->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); + /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -86,8 +100,7 @@ MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg(QWidget* parent, const char* name // purpose : Destroys the object and frees any allocated resources //================================================================================= MeasureGUI_DistanceDlg::~MeasureGUI_DistanceDlg() -{ - /* no need to delete child widgets, Qt does it all for us */ +{ } @@ -95,97 +108,98 @@ MeasureGUI_DistanceDlg::~MeasureGUI_DistanceDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_DistanceDlg::Init() +void MeasureGUI_DistanceDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + mySelBtn2 = myGrp->PushButton2; + mySelEdit2 = myGrp->LineEdit2; + + myEditCurrentArgument = mySelEdit; - myOkShape1 = myOkShape2 = false; + connect( mySelEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - /* signals and slots connections */ - connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); - connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); - connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + MeasureGUI_Skeleton::Init( Sel ); - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); +} - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupC1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void MeasureGUI_DistanceDlg::SelectionIntoArgument() +{ + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); - /* displays Dialog */ - GroupC1->show(); - this->show(); + if ( !testResult ) + aSelectedObject = GEOM::GEOM_Object::_nil(); - return; -} + if ( myEditCurrentArgument == mySelEdit ) + myObj = aSelectedObject; + else + myObj2 = aSelectedObject; + processObject(); +} //================================================================================= -// function : ClickOnCancel() -// purpose : +// function : processObject() +// purpose : Fill dialogs fileds in accordance with myObj and myObj2 //================================================================================= -void MeasureGUI_DistanceDlg::ClickOnCancel() +void MeasureGUI_DistanceDlg::processObject() { - this->EraseDistance(); - MeasureGUI_Skeleton::ClickOnCancel(); - return; + myGrp->LineEdit1->setText( !myObj->_is_nil() ? GEOMBase::GetName( myObj ) : "" ); + myGrp->LineEdit2->setText( !myObj2->_is_nil() ? GEOMBase::GetName( myObj2 ) : "" ); + + gp_Pnt aPnt1, aPnt2; + double aDist = 0.; + if ( getParameters( aDist, aPnt1, aPnt2 ) ) + { + myGrp->LineEdit3->setText( QString( "%1" ).arg( aDist ) ); + redisplayPreview(); + } + else + { + myGrp->LineEdit3->setText( "" ); + erasePreview(); + } + } - //================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection has changed +// function : getParameters() +// purpose : Get distance between objects //================================================================================= -void MeasureGUI_DistanceDlg::SelectionIntoArgument() +bool MeasureGUI_DistanceDlg::getParameters( double& theDistance, + gp_Pnt& thePnt1, + gp_Pnt& thePnt2 ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - this->EraseDistance(); - myEditCurrentArgument->setText(""); - QString aString = ""; - - GroupC1->LineEdit3->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupC1->LineEdit1) - myOkShape1 = false; - else if(myEditCurrentArgument == GroupC1->LineEdit2) - myOkShape2 = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; + QString msg; + if ( !isValid( msg ) ) + return false; + else + { + try + { + double x1, y1, z1, x2, y2, z2; + theDistance = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetMinDistance( + myObj, myObj2, x1, y1, z1, x2, y2, z2 ); + + thePnt1.SetCoord( x1, y1, z1 ); + thePnt2.SetCoord( x2, y2, z2 ); + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(myEditCurrentArgument == GroupC1->LineEdit1) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myShape1 = S; - myEditCurrentArgument->setText(aString); - myOkShape1 = true; - } - else if(myEditCurrentArgument == GroupC1->LineEdit2) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myShape2 = S; - myEditCurrentArgument->setText(aString); - myOkShape2 = true; + return getOperation()->IsDone(); } - - if(myOkShape1 && myOkShape2) - this->MakeDistanceSimulationAndDisplay(myShape1 ,myShape2); - return; } @@ -195,19 +209,20 @@ void MeasureGUI_DistanceDlg::SelectionIntoArgument() //================================================================================= void MeasureGUI_DistanceDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); + QPushButton* send = ( QPushButton* )sender(); - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; + if( send == mySelBtn ) + { + mySelEdit->setFocus(); + myEditCurrentArgument = mySelEdit; } - else if(send == GroupC1->PushButton2) { - GroupC1->LineEdit2->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit2; + else + { + mySelEdit2->setFocus(); + myEditCurrentArgument = mySelEdit2; } - this->SelectionIntoArgument(); - return; + SelectionIntoArgument(); } @@ -217,157 +232,101 @@ void MeasureGUI_DistanceDlg::SetEditCurrentArgument() //================================================================================= void MeasureGUI_DistanceDlg::LineEditReturnPressed() { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; - else if(send == GroupC1->LineEdit2) - myEditCurrentArgument = GroupC1->LineEdit2; + QLineEdit* send = ( QLineEdit* )sender(); + + if( send == mySelEdit ) + myEditCurrentArgument = mySelEdit; else - return; + myEditCurrentArgument = mySelEdit2; - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; + if ( GEOMBase::SelectionByNameInDialogs( this, mySelEdit->text(), mySelection ) ) + mySelEdit->setText( mySelEdit->text() ); } //================================================================================= -// function : ActivateThisDialog() +// function : buildPrs() // purpose : //================================================================================= -void MeasureGUI_DistanceDlg::ActivateThisDialog() +SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() { - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; -} - + double aDist = 0.; + gp_Pnt aPnt1( 0, 0, 0 ), aPnt2( 0, 0, 0 ); + + if ( myObj->_is_nil() || myObj2->_is_nil() || !getParameters( aDist, aPnt1, aPnt2 ) || + QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC ) + return 0; + + try + { + if( aDist <= 1.e-9 ) + { + BRepBuilderAPI_MakeVertex aMaker( aPnt1 ); + return getDisplayer()->BuildPrs( aMaker.Vertex() ); + } + else + { + BRepBuilderAPI_MakeEdge MakeEdge( aPnt1, aPnt2 ); + TopoDS_Vertex aVert1 = BRepBuilderAPI_MakeVertex( aPnt1 ); + TopoDS_Vertex aVert2 = BRepBuilderAPI_MakeVertex( aPnt2 ); -//================================================================================= -// function : enterEvent() -// purpose : when mouse enter onto the QWidget -//================================================================================= -void MeasureGUI_DistanceDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} + QString aLabel; + aLabel.sprintf( "%.1f", aDist ); + gp_Pnt aPnt3( ( aPnt1.X() + aPnt2.X() ) / 2, + ( aPnt1.Y() + aPnt2.Y() ) / 2, + ( aPnt1.Z() + aPnt2.Z() ) / 2 + 100 ); -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void MeasureGUI_DistanceDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - this->ClickOnCancel(); - return; -} + gp_Vec va( aPnt3, aPnt1 ); + gp_Vec vb( aPnt3, aPnt2 ); -//================================================================================= -// function : MakeDistanceSimulationAndDisplay() -// purpose : -//================================================================================= -void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2) -{ - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - GroupC1->LineEdit3->setText(""); - - BRepExtrema_DistShapeShape dst(S1, S2); - - try { - if(dst.IsDone()) { - gp_Pnt P1, P2; - Standard_Real Dist = 1.e9; - for(int i = 1; i <= dst.NbSolution(); i++) { - P1 = (dst.PointOnShape1(i)); - P2 = (dst.PointOnShape2(i)); - - Standard_Real MinDist = P1.Distance(P2); - if(Dist > MinDist) - Dist = MinDist; + if ( va.IsParallel( vb, Precision::Angular() ) ) + { + aPnt3.SetY( ( aPnt1.Y() + aPnt2.Y() ) / 2 + 100 ); + aPnt3.SetZ( ( aPnt1.Z() + aPnt2.Z() ) / 2 ); } + + gce_MakePln gce_MP( aPnt1, aPnt2, aPnt3 ); + Handle( Geom_Plane ) P = new Geom_Plane( gce_MP.Value() ); - if(Dist <= 1.e-9) { - BRepBuilderAPI_MakeVertex MakeVertex(P1); - mySimulationTopoDs = MakeVertex.Vertex(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - - GroupC1->LineEdit3->setText("0.0"); - } - else { - BRepBuilderAPI_MakeEdge MakeEdge(P1, P2); - mySimulationTopoDs = MakeEdge.Edge(); - - TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(P1); - TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(P2); - - QString S; - S.sprintf("%.1f", Dist); - - gp_Pnt P3; - P3.SetX((P1.X() + P2.X()) / 2); - P3.SetY((P1.Y() + P2.Y()) / 2); - P3.SetZ(((P1.Z() + P2.Z()) / 2) + 100); - gp_Vec va(P3, P1); - gp_Vec vb(P3, P2); - if(va.IsParallel(vb, Precision::Angular())) { - P3.SetY(((P1.Y() + P2.Y()) / 2) + 100); - P3.SetZ(((P1.Z() + P2.Z()) / 2)); - } - gce_MakePln gce_MP(P1, P2, P3); - gp_Pln gp_P = gce_MP.Value(); - Handle(Geom_Plane) P = new Geom_Plane(gp_P); - - char* aCopyS = CORBA::string_dup(S); - Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(aCopyS)); - delete(aCopyS); - - GroupC1->LineEdit3->setText(S); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - ic->Display(Distance); - ic->UpdateCurrentViewer(); - } - } + Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension( + aVert1, aVert2, P, aDist, TCollection_ExtendedString( (Standard_CString)aLabel.latin1() ) ); + + QAD_ViewFrame* vf = GEOM_Displayer::GetActiveView(); + OCCViewer_Prs* aPrs = dynamic_cast( vf->CreatePrs( 0 ) ); + + if ( aPrs ) + aPrs->AddObject( anIO ); + + return aPrs; } } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in MakeDistanceSimulationAndDisplay()"); + catch( Standard_Failure ) + { + return 0; } - return; } - //================================================================================= -// function : EraseDistance() +// function : isValid() // purpose : //================================================================================= -void MeasureGUI_DistanceDlg::EraseDistance() +bool MeasureGUI_DistanceDlg::isValid( QString& msg ) { - int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount(); - for(int i = 0; i < count; i++) { - if (QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC ) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - AIS_ListOfInteractive L; - ic->DisplayedObjects(AIS_KOI_Relation, -1, L); - AIS_ListIteratorOfListOfInteractive ite(L); - while (ite.More()) { - ic->Remove(ite.Value()); - ic->UpdateCurrentViewer(); - ite.Next(); - } - } - } - return; + return MeasureGUI_Skeleton::isValid( msg ) && !myObj2->_is_nil(); } + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.h b/src/MeasureGUI/MeasureGUI_DistanceDlg.h index 50718dd40..25c60f9d5 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.h +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.h @@ -30,9 +30,10 @@ #define DIALOGBOX_DISTANCE_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_2Sel1LineEdit_QTD.h" -#include "MeasureGUI.h" +class MeasureGUI_2Sel1LineEdit_QTD; +class gp_Pnt; + //================================================================================= // class : MeasureGUI_DistanceDlg @@ -43,31 +44,33 @@ class MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton Q_OBJECT public: - MeasureGUI_DistanceDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_DistanceDlg(); + MeasureGUI_DistanceDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_DistanceDlg(); +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + virtual SALOME_Prs* buildPrs(); + virtual void SelectionIntoArgument(); + virtual void LineEditReturnPressed(); + virtual void SetEditCurrentArgument(); + virtual bool isValid( QString& msg ); private: - void Init(); - void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); - void MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2); - void EraseDistance(); - TopoDS_Shape myShape1; - TopoDS_Shape myShape2; - GEOM::GEOM_Shape_var myGeomShape1; - GEOM::GEOM_Shape_var myGeomShape2; - bool myOkShape1; - bool myOkShape2; /* to check when arguments are defined */ + void Init( SALOME_Selection* Sel ); + bool getParameters( double& theDistance, + gp_Pnt& thePnt1, + gp_Pnt& thePnt2 ); +private: - MeasureGUI_2Sel1LineEdit_QTD* GroupC1; + QLineEdit* myEditCurrentArgument; + QLineEdit* mySelEdit2; + QPushButton* mySelBtn2; -private slots: - void ClickOnCancel(); - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); + MeasureGUI_2Sel1LineEdit_QTD* myGrp; + GEOM::GEOM_Object_var myObj2; }; diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx index 8ceaea053..96c38a341 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx @@ -26,60 +26,77 @@ // Module : GEOM #include "MeasureGUI_InertiaDlg.h" +#include "MeasureGUI_1Sel12LineEdit_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" + +#include "GEOMBase.h" #include #include #include +#include +#include #include "utilities.h" +#include "QAD_Desktop.h" -using namespace std; +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_InertiaDlg() -// purpose : Constructs a MeasureGUI_InertiaDlg which is a child of 'parent', with the +// purpose : Constructs a MeasureGUI_InertiaDlg 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. //================================================================================= -MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_INERTIA"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_INERTIA_TITLE")); - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_INERTIA_CONSTR")); - RadioButton1->setPixmap(image0); +MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_InertiaDlg", Sel ) +{ + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_INERTIA" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - GroupC1 = new MeasureGUI_1Sel12LineEdit_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_MATRIX")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextLabel2->setText(tr("GEOM_INERTIA_I").arg("1")); - GroupC1->TextLabel3->setText(tr("GEOM_INERTIA_I").arg("2")); - GroupC1->TextLabel4->setText(tr("GEOM_INERTIA_I").arg("3")); - GroupC1->TextLabel5->setText(tr("GEOM_INERTIA_IXYZ")); - GroupC1->LineEdit11->setReadOnly(TRUE); - GroupC1->LineEdit12->setReadOnly(TRUE); - GroupC1->LineEdit13->setReadOnly(TRUE); - GroupC1->LineEdit21->setReadOnly(TRUE); - GroupC1->LineEdit22->setReadOnly(TRUE); - GroupC1->LineEdit23->setReadOnly(TRUE); - GroupC1->LineEdit31->setReadOnly(TRUE); - GroupC1->LineEdit32->setReadOnly(TRUE); - GroupC1->LineEdit33->setReadOnly(TRUE); - GroupC1->LineEdit41->setReadOnly(TRUE); - GroupC1->LineEdit42->setReadOnly(TRUE); - GroupC1->LineEdit43->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); + setCaption( tr( "GEOM_INERTIA_TITLE" ) ); - Layout1->addWidget(GroupC1, 1, 0); + /***************************************************************/ + + GroupConstructors->setTitle( tr( "GEOM_INERTIA_CONSTR" ) ); + RadioButton1->setPixmap( image0 ); + + myGrp = new MeasureGUI_1Sel12LineEdit_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_MATRIX" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextLabel2->setText( tr( "GEOM_INERTIA_I" ).arg( "1" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_INERTIA_I" ).arg( "2" ) ); + myGrp->TextLabel4->setText( tr( "GEOM_INERTIA_I" ).arg( "3" ) ); + myGrp->TextLabel5->setText( tr( "GEOM_INERTIA_IXYZ" ) ); + myGrp->LineEdit11->setReadOnly( TRUE ); + myGrp->LineEdit12->setReadOnly( TRUE ); + myGrp->LineEdit13->setReadOnly( TRUE ); + myGrp->LineEdit21->setReadOnly( TRUE ); + myGrp->LineEdit22->setReadOnly( TRUE ); + myGrp->LineEdit23->setReadOnly( TRUE ); + myGrp->LineEdit31->setReadOnly( TRUE ); + myGrp->LineEdit32->setReadOnly( TRUE ); + myGrp->LineEdit33->setReadOnly( TRUE ); + myGrp->LineEdit41->setReadOnly( TRUE ); + myGrp->LineEdit42->setReadOnly( TRUE ); + myGrp->LineEdit43->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); + /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -89,7 +106,6 @@ MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg(QWidget* parent, const char* name, //================================================================================= MeasureGUI_InertiaDlg::~MeasureGUI_InertiaDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -97,193 +113,91 @@ MeasureGUI_InertiaDlg::~MeasureGUI_InertiaDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_InertiaDlg::Init() +void MeasureGUI_InertiaDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - /* signals and slots connections */ - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupC1->show(); - this->show(); - - return; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + MeasureGUI_Skeleton::Init( Sel ); } - //================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case -//================================================================================= -void MeasureGUI_InertiaDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - QString aString = ""; - - GroupC1->LineEdit11->setText(""); - GroupC1->LineEdit12->setText(""); - GroupC1->LineEdit13->setText(""); - GroupC1->LineEdit21->setText(""); - GroupC1->LineEdit22->setText(""); - GroupC1->LineEdit23->setText(""); - GroupC1->LineEdit31->setText(""); - GroupC1->LineEdit32->setText(""); - GroupC1->LineEdit33->setText(""); - GroupC1->LineEdit41->setText(""); - GroupC1->LineEdit42->setText(""); - GroupC1->LineEdit43->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull()) - return; - - GroupC1->LineEdit1->setText(aString); - - this->CalculateAndDisplayInertia(S); - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() +// function : processObject // purpose : //================================================================================= -void MeasureGUI_InertiaDlg::SetEditCurrentArgument() +void MeasureGUI_InertiaDlg::processObject() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; - } - - this->SelectionIntoArgument(); - return; -} + gp_XYZ anIXYZ; + gp_Mat aMat; + if ( !getParameters( aMat, anIXYZ ) ) + { + mySelEdit->setText( "" ); + + myGrp->LineEdit11->setText( "" ); + myGrp->LineEdit12->setText( "" ); + myGrp->LineEdit13->setText( "" ); + + myGrp->LineEdit21->setText( "" ); + myGrp->LineEdit22->setText( "" ); + myGrp->LineEdit23->setText( "" ); + + myGrp->LineEdit31->setText( "" ); + myGrp->LineEdit32->setText( "" ); + myGrp->LineEdit33->setText( "" ); -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void MeasureGUI_InertiaDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; + myGrp->LineEdit41->setText( "" ); + myGrp->LineEdit42->setText( "" ); + myGrp->LineEdit43->setText( "" ); + } else - return; - - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void MeasureGUI_InertiaDlg::ActivateThisDialog() -{ - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void MeasureGUI_InertiaDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + { + myGrp->LineEdit11->setText( QString( "%1" ).arg( aMat( 1, 1 ), 12, 'e', 4 ) ); + myGrp->LineEdit12->setText( QString( "%1" ).arg( aMat( 1, 2 ), 12, 'e', 4 ) ); + myGrp->LineEdit13->setText( QString( "%1" ).arg( aMat( 1, 3 ), 12, 'e', 4 ) ); + + myGrp->LineEdit21->setText( QString( "%1" ).arg( aMat( 2, 1 ), 12, 'e', 4 ) ); + myGrp->LineEdit22->setText( QString( "%1" ).arg( aMat( 2, 2 ), 12, 'e', 4 ) ); + myGrp->LineEdit23->setText( QString( "%1" ).arg( aMat( 2, 3 ), 12, 'e', 4 ) ); + + myGrp->LineEdit31->setText( QString( "%1" ).arg( aMat( 3, 1 ), 12, 'e', 4 ) ); + myGrp->LineEdit32->setText( QString( "%1" ).arg( aMat( 3, 2 ), 12, 'e', 4 ) ); + myGrp->LineEdit33->setText( QString( "%1" ).arg( aMat( 3, 3 ), 12, 'e', 4 ) ); + + myGrp->LineEdit41->setText( QString( "%1" ).arg( anIXYZ.X(), 12, 'e', 4 ) ); + myGrp->LineEdit42->setText( QString( "%1" ).arg( anIXYZ.Y(), 12, 'e', 4 ) ); + myGrp->LineEdit43->setText( QString( "%1" ).arg( anIXYZ.Z(), 12, 'e', 4 ) ); + } } - //================================================================================= -// function : CalculateAndDisplayInertia() +// function : getParameters // purpose : //================================================================================= -void MeasureGUI_InertiaDlg::CalculateAndDisplayInertia(const TopoDS_Shape& S) +bool MeasureGUI_InertiaDlg::getParameters( gp_Mat& I, + gp_XYZ& theIXYZ ) { - GroupC1->LineEdit11->setText(""); - GroupC1->LineEdit12->setText(""); - GroupC1->LineEdit13->setText(""); - GroupC1->LineEdit21->setText(""); - GroupC1->LineEdit22->setText(""); - GroupC1->LineEdit23->setText(""); - GroupC1->LineEdit31->setText(""); - GroupC1->LineEdit32->setText(""); - GroupC1->LineEdit33->setText(""); - GroupC1->LineEdit41->setText(""); - GroupC1->LineEdit42->setText(""); - GroupC1->LineEdit43->setText(""); - - if(S.IsNull()) - return; - - QString resString; - GProp_GProps System; - - try { - if(S.ShapeType() == TopAbs_VERTEX || S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) - BRepGProp::LinearProperties(S, System); - else if(S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL) - BRepGProp::SurfaceProperties(S, System); - else - BRepGProp::VolumeProperties(S, System); - - gp_Mat I = System.MatrixOfInertia() ; - GProp_PrincipalProps Pr = System.PrincipalProperties(); - Standard_Real Ix,Iy,Iz; - Pr.Moments(Ix,Iy,Iz); - - /* matrix 3x3 */ - resString = tr("%1").arg(I(1,1), 12, 'f', 6); - GroupC1->LineEdit11->setText(resString); - resString = tr("%1").arg(I(1,2), 12, 'f', 6); - GroupC1->LineEdit12->setText(resString); - resString = tr("%1").arg(I(1,3), 12, 'f', 6); - GroupC1->LineEdit13->setText(resString); - - resString = tr("%1").arg(I(2,1), 12, 'f', 6); - GroupC1->LineEdit21->setText(resString); - resString = tr("%1").arg(I(2,2), 12, 'f', 6); - GroupC1->LineEdit22->setText(resString); - resString = tr("%1").arg(I(2,3), 12, 'f', 6); - GroupC1->LineEdit23->setText(resString); - - resString = tr("%1").arg(I(3,1), 12, 'f', 6); - GroupC1->LineEdit31->setText(resString); - resString = tr("%1").arg(I(3,2), 12, 'f', 6); - GroupC1->LineEdit32->setText(resString); - resString = tr("%1").arg(I(3,3), 12, 'f', 6); - GroupC1->LineEdit33->setText(resString); - - /* moments */ - resString = tr("%1").arg(Ix, 12, 'f', 6); - GroupC1->LineEdit41->setText(resString); - resString = tr("%1").arg(Ix, 12, 'f', 6); - GroupC1->LineEdit42->setText(resString); - resString = tr("%1").arg(Iz, 12, 'f', 6); - GroupC1->LineEdit43->setText(resString); - } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in CalculateAndDisplayInertia()"); + if ( myObj->_is_nil() ) + return false; + else + { + try + { + double x, y, z; + GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetInertia( myObj, + I( 1, 1 ), I( 1, 2 ), I( 1, 3 ), + I( 2, 1 ), I( 2, 2 ), I( 2, 3 ), + I( 3, 1 ), I( 3, 2 ), I( 3, 3 ), + x, y, z ); + + theIXYZ.SetCoord( x, y, z ); + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } + + return getOperation()->IsDone(); } - return; } + diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.h b/src/MeasureGUI/MeasureGUI_InertiaDlg.h index 4e6bc2f02..0a45b87d2 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.h +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.h @@ -30,35 +30,38 @@ #define DIALOGBOX_INERTIA_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel12LineEdit_QTD.h" -#include "MeasureGUI.h" +class MeasureGUI_1Sel12LineEdit_QTD; +class gp_XYZ; +class gp_Mat; //================================================================================= // class : MeasureGUI_InertiaDlg -// purpose : +// purpose : Dialog for displaying moment of inertia //================================================================================= + class MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton { Q_OBJECT public: - MeasureGUI_InertiaDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_InertiaDlg(); + MeasureGUI_InertiaDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_InertiaDlg(); +protected: -private: - void Init(); - void enterEvent(QEvent* e); - void CalculateAndDisplayInertia(const TopoDS_Shape& S); + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); - MeasureGUI_1Sel12LineEdit_QTD* GroupC1; +private: -private slots: - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); + void Init( SALOME_Selection* Sel ); + bool getParameters( gp_Mat& theMatrix, + gp_XYZ& theMoment ); +private: + + MeasureGUI_1Sel12LineEdit_QTD* myGrp; }; #endif // DIALOGBOX_INERTIA_H diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx index 04b810b89..7fb4de9f6 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx @@ -27,57 +27,63 @@ // $Header$ #include "MeasureGUI_MaxToleranceDlg.h" - -#include -#include -#include -#include -#include +#include "MeasureGUI_1Sel6LineEdit_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" #include "utilities.h" +#include "QAD_Desktop.h" -using namespace std; +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_MaxToleranceDlg() -// purpose : Constructs a MeasureGUI_MaxToleranceDlg which is a child of 'parent', with the +// purpose : Constructs a MeasureGUI_MaxToleranceDlg 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. //================================================================================= -MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_MaxToleranceDlg", Sel ) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TOLERANCE"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_TOLERANCE" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_TOLERANCE_TITLE")); + setCaption( tr( "GEOM_TOLERANCE_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_TOLERANCE")); - RadioButton1->setPixmap(image0); - - GroupC1 = new MeasureGUI_1Sel6LineEdit_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_TOLERANCE_CONSTR")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextLabel2->setText(tr("GEOM_MIN")); - GroupC1->TextLabel3->setText(tr("GEOM_MAX")); - GroupC1->TextLabel4->setText(tr("GEOM_TOLERANCE_FACE")); - GroupC1->TextLabel5->setText(tr("GEOM_TOLERANCE_EDGE")); - GroupC1->TextLabel6->setText(tr("GEOM_TOLERANCE_VERTEX")); - GroupC1->LineEdit11->setReadOnly(TRUE); - GroupC1->LineEdit12->setReadOnly(TRUE); - GroupC1->LineEdit21->setReadOnly(TRUE); - GroupC1->LineEdit22->setReadOnly(TRUE); - GroupC1->LineEdit31->setReadOnly(TRUE); - GroupC1->LineEdit32->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupC1, 1, 0); + + GroupConstructors->setTitle( tr( "GEOM_TOLERANCE" ) ); + RadioButton1->setPixmap( image0 ); + + myGrp = new MeasureGUI_1Sel6LineEdit_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_TOLERANCE_CONSTR" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextLabel2->setText( tr( "GEOM_MIN" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_MAX" ) ); + myGrp->TextLabel4->setText( tr( "GEOM_TOLERANCE_FACE" ) ); + myGrp->TextLabel5->setText( tr( "GEOM_TOLERANCE_EDGE" ) ); + myGrp->TextLabel6->setText( tr( "GEOM_TOLERANCE_VERTEX" ) ); + myGrp->LineEdit11->setReadOnly( TRUE ); + myGrp->LineEdit12->setReadOnly( TRUE ); + myGrp->LineEdit21->setReadOnly( TRUE ); + myGrp->LineEdit22->setReadOnly( TRUE ); + myGrp->LineEdit31->setReadOnly( TRUE ); + myGrp->LineEdit32->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); + /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -87,7 +93,6 @@ MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg(QWidget* parent, const ch //================================================================================= MeasureGUI_MaxToleranceDlg::~MeasureGUI_MaxToleranceDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -95,193 +100,102 @@ MeasureGUI_MaxToleranceDlg::~MeasureGUI_MaxToleranceDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_MaxToleranceDlg::Init() +void MeasureGUI_MaxToleranceDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - /* signals and slots connections */ - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupC1->show(); - this->show(); - - return; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + MeasureGUI_Skeleton::Init( Sel ); } - //================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case +// function : processObject +// purpose : //================================================================================= -void MeasureGUI_MaxToleranceDlg::SelectionIntoArgument() +void MeasureGUI_MaxToleranceDlg::processObject() { - myEditCurrentArgument->setText(""); - QString aString = ""; - - GroupC1->LineEdit11->setText(""); - GroupC1->LineEdit12->setText(""); - GroupC1->LineEdit21->setText(""); - GroupC1->LineEdit22->setText(""); - GroupC1->LineEdit31->setText(""); - GroupC1->LineEdit32->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) - return; + double aMinFaceToler, aMaxFaceToler; + double aMinEdgeToler, aMaxEdgeToler; + double aMinVertexToler, aMaxVertexToler; + + if ( !getParameters( aMinFaceToler, aMaxFaceToler, + aMinEdgeToler, aMaxEdgeToler, + aMinVertexToler, aMaxVertexToler ) ) + { + myGrp->LineEdit11->setText( "" ); + myGrp->LineEdit12->setText( "" ); + + myGrp->LineEdit21->setText( "" ); + myGrp->LineEdit22->setText( "" ); + + myGrp->LineEdit31->setText( "" ); + myGrp->LineEdit32->setText( "" ); - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull()) return; + } - if(S.IsNull()) - return; + double invalidMin = RealLast(); + double invalidMax = -RealLast(); - GroupC1->LineEdit1->setText(aString); + myGrp->LineEdit11->setText( aMinFaceToler != invalidMin ? QString( "%1" ).arg( aMinFaceToler, 5, 'e', 8 ) : QString("") ); + myGrp->LineEdit12->setText( aMaxFaceToler != invalidMax ? QString( "%1" ).arg( aMaxFaceToler, 5, 'e', 8 ) : QString("") ); - this->CalculateMaxTolerance(S); - return; -} + myGrp->LineEdit21->setText( aMinEdgeToler != invalidMin ? QString( "%1" ).arg( aMinEdgeToler, 5, 'e', 8 ) : QString("") ); + myGrp->LineEdit22->setText( aMaxEdgeToler != invalidMax ? QString( "%1" ).arg( aMaxEdgeToler, 5, 'e', 8 ) : QString("") ); + myGrp->LineEdit31->setText( aMinVertexToler != invalidMin ? QString( "%1" ).arg( aMinVertexToler, 5, 'e', 8 ) : QString("") ); + myGrp->LineEdit32->setText( aMaxVertexToler != invalidMax ? QString( "%1" ).arg( aMaxVertexToler, 5, 'e', 8 ) : QString("") ); +} //================================================================================= -// function : SetEditCurrentArgument() -// purpose : +// function : getParameters +// purpose : Get tolerances. Returns false is myObj is nill. If there is no a +// type of entity ( face, edge or vertex ) in selected object then corresponding +// tolerances is less than 0 //================================================================================= -void MeasureGUI_MaxToleranceDlg::SetEditCurrentArgument() +bool MeasureGUI_MaxToleranceDlg::getParameters( double& theMinFaceToler, + double& theMaxFaceToler, + double& theMinEdgeToler, + double& theMaxEdgeToler, + double& theMinVertexToler, + double& theMaxVertexToler ) { - QPushButton* send = (QPushButton*)sender(); + if ( myObj->_is_nil() ) + return false; + else + { + try + { + GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetTolerance( myObj, + theMinFaceToler, theMaxFaceToler, theMinEdgeToler, + theMaxEdgeToler, theMinVertexToler, theMaxVertexToler ); + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; + return getOperation()->IsDone(); } - - this->SelectionIntoArgument(); - return; } -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void MeasureGUI_MaxToleranceDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; - else - return; - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; -} -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void MeasureGUI_MaxToleranceDlg::ActivateThisDialog() -{ - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void MeasureGUI_MaxToleranceDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} -//================================================================================= -// function : CalculateMaxTolerance() -// purpose : -//================================================================================= -void MeasureGUI_MaxToleranceDlg::CalculateMaxTolerance(const TopoDS_Shape& S) -{ - GroupC1->LineEdit11->setText(""); - GroupC1->LineEdit12->setText(""); - GroupC1->LineEdit21->setText(""); - GroupC1->LineEdit22->setText(""); - GroupC1->LineEdit31->setText(""); - GroupC1->LineEdit32->setText(""); - - if(S.IsNull()) - return; - Standard_Real T, TMF, TME, TMV, TmF, TmE, TmV; - Standard_Integer nbF, nbE, nbV; - bool m_isFace, m_isEdge, m_isVertex; - - TMF = TME = TMV = -RealLast(); - TmF = TmE = TmV = RealLast(); - nbF = nbE = nbV = 0; - m_isFace = m_isEdge = m_isVertex = false; - - try { - for(TopExp_Explorer ExF(S,TopAbs_FACE); ExF.More(); ExF.Next()) { - m_isFace = true; - TopoDS_Face Face=TopoDS::Face(ExF.Current()); - T=BRep_Tool::Tolerance(Face); - if(T>TMF) - TMF=T; - if(TTME) - TME=T; - if(TTMV) - TMV=T; - if(TLineEdit11->setText(tr("%1").arg(TmF, 5, 'e', 8)); - GroupC1->LineEdit12->setText(tr("%1").arg(TMF, 5, 'e', 8)); - } - if(m_isEdge) { - GroupC1->LineEdit21->setText(tr("%1").arg(TmE, 5, 'e', 8)); - GroupC1->LineEdit22->setText(tr("%1").arg(TME, 5, 'e', 8)); - } - if(m_isVertex) { - GroupC1->LineEdit31->setText(tr("%1").arg(TmV, 5, 'e', 8)); - GroupC1->LineEdit32->setText(tr("%1").arg(TMV, 5, 'e', 8)); - } - } - catch(Standard_Failure) - { - MESSAGE("Catch intercepted in CalculateMaxTolerance()"); - } - return; -} + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h index 5513582b7..e580873db 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h @@ -30,9 +30,8 @@ #define DIALOGBOX_MAXTOLERANCE_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel6LineEdit_QTD.h" -#include "MeasureGUI.h" +class MeasureGUI_1Sel6LineEdit_QTD; //================================================================================= // class : DialogBox_PROPERTIES @@ -43,22 +42,40 @@ class MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton Q_OBJECT public: - MeasureGUI_MaxToleranceDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_MaxToleranceDlg(); + MeasureGUI_MaxToleranceDlg( QWidget* parent, + SALOME_Selection* ); + ~MeasureGUI_MaxToleranceDlg(); + +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); private: - void Init(); - void enterEvent(QEvent* e); - void CalculateMaxTolerance(const TopoDS_Shape& S); - MeasureGUI_1Sel6LineEdit_QTD* GroupC1; + void Init( SALOME_Selection* Sel ); + bool getParameters( double& theMinFaceToler, + double& theMaxFaceToler, + double& theMinEdgeToler, + double& theMaxEdgeToler, + double& theMinVertexToler, + double& theMaxVertexToler ); + -private slots: - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); +private: + + MeasureGUI_1Sel6LineEdit_QTD* myGrp; }; #endif // DIALOGBOX_MAXTOLERANCE_H + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.cxx b/src/MeasureGUI/MeasureGUI_PointDlg.cxx new file mode 100644 index 000000000..5747f70b9 --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_PointDlg.cxx @@ -0,0 +1,219 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MeasureGUI_PointDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#include "MeasureGUI_PointDlg.h" +#include "utilities.h" +#include "QAD_Desktop.h" +#include "GEOMBase.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================================= +// class : MeasureGUI_PointDlg() +// purpose : Constructs a MeasureGUI_PointDlg which is a child of 'parent' +// +//================================================================================= +MeasureGUI_PointDlg::MeasureGUI_PointDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_PointDlg", Sel ) +{ + QPixmap iconPnt( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_POINT" ) ) ); + + QPixmap iconSelect( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); + + setCaption( tr( "CAPTION" ) ); + + GroupConstructors->setTitle( tr( "CAPTION" ) ); + RadioButton1->setPixmap( iconPnt ); + + QGroupBox* aGrp = new QGroupBox( 2, Qt::Horizontal, tr( "COORDINATES" ), this ); + + new QLabel( tr( "POINT" ), aGrp ); + QFrame* aFrame = new QFrame( aGrp ); + mySelBtn = new QPushButton( aFrame ); + mySelBtn->setPixmap( iconSelect ); + mySelEdit = new QLineEdit( aFrame ); + QHBoxLayout* aLay = new QHBoxLayout( aFrame, 0, 10 ); + aLay->addWidget( mySelBtn ); + aLay->addWidget( mySelEdit ); + + new QLabel( tr( "X" ), aGrp ); + myX = new QLineEdit( aGrp ); + new QLabel( tr( "Y" ), aGrp ); + myY = new QLineEdit( aGrp ); + new QLabel( tr( "Z" ), aGrp ); + myZ = new QLineEdit( aGrp ); + + mySelEdit->setReadOnly( true ); + myX->setReadOnly( true ); + myY->setReadOnly( true ); + myZ->setReadOnly( true ); + + Layout1->addWidget( aGrp, 1, 0 ); + + Init( Sel ); +} + + +//================================================================================= +// function : ~MeasureGUI_PointDlg() +// purpose : Destroys the object and frees any allocated resources +//======================myX->setReadOnly( true );=========================================================== +MeasureGUI_PointDlg::~MeasureGUI_PointDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void MeasureGUI_PointDlg::Init( SALOME_Selection* Sel ) +{ + QSize aSize( size() ); + resize( (int)(aSize.width() *0.75 ), aSize.height() ); + MeasureGUI_Skeleton::Init( Sel ); +} + +//================================================================================= +// function : activateSelection +// purpose : +//================================================================================= +void MeasureGUI_PointDlg::activateSelection() +{ + localSelection( GEOM::GEOM_Object::_nil(), TopAbs_VERTEX ); +} + +//================================================================================= +// function : SelectionIntoArgument +// purpose : +//================================================================================= +void MeasureGUI_PointDlg::SelectionIntoArgument() +{ + try + { + myObj = GEOM::GEOM_Object::_nil(); + mySelEdit->setText( "" ); + myX->setText( "" ); + myY->setText( "" ); + myZ->setText( "" ); + + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if( !testResult || aSelectedObject->_is_nil() ) + return; + + myObj = aSelectedObject; + + TColStd_IndexedMapOfInteger anIndexes; + mySelection->GetIndex( mySelection->firstIObject(), anIndexes ); + + TopoDS_Shape aShape; + if ( anIndexes.Extent() > 1 || !GEOMBase::GetShape( myObj, aShape ) || aShape.IsNull() ) + return; + + TopoDS_Vertex aPoint; + QString aName = GEOMBase::GetName( myObj ); + if ( anIndexes.Extent() == 0 ) + { + if ( aShape.ShapeType() == TopAbs_VERTEX ) + aPoint = TopoDS::Vertex( aShape ); + } + else + { + int i = anIndexes( 1 ); + + TopTools_IndexedMapOfShape aShapes; + TopExp::MapShapes( aShape, aShapes ); + + if ( aShape != aShapes( i ) ) + aName += QString( ":%1" ).arg( i ); + + aPoint = TopoDS::Vertex( aShapes( i ) ); + } + + if ( !aPoint.IsNull() ) + { + gp_Pnt aPnt = BRep_Tool::Pnt( aPoint ); + mySelEdit->setText( aName ); + myX->setText( QString( "%1" ).arg( aPnt.X() ) ); + myY->setText( QString( "%1" ).arg( aPnt.Y() ) ); + myZ->setText( QString( "%1" ).arg( aPnt.Z() ) ); + } + } + catch( ... ) + { + myObj = GEOM::GEOM_Object::_nil(); + mySelEdit->setText( "" ); + myX->setText( "" ); + myY->setText( "" ); + myZ->setText( "" ); + } +} + + + + + + + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.h b/src/MeasureGUI/MeasureGUI_PointDlg.h new file mode 100644 index 000000000..a79072547 --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_PointDlg.h @@ -0,0 +1,79 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : MeasureGUI_PointDlg.h +// Author : Sergey LITONIN +// Module : GEOM + +#ifndef MEASUREGUI_POINTDLG_H +#define MEASUREGUI_POINTDLG_H + +#include "MeasureGUI_Skeleton.h" + +class QLineEdit; + +//================================================================================= +// class : MeasureGUI_PointDlg +// purpose : Dialog for displaying point coordinates +//================================================================================= + +class MeasureGUI_PointDlg : public MeasureGUI_Skeleton +{ + Q_OBJECT + +public: + MeasureGUI_PointDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_PointDlg(); + +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void activateSelection(); + virtual void SelectionIntoArgument(); + +private: + + void Init( SALOME_Selection* Sel ); +private: + QLineEdit* myX; + QLineEdit* myY; + QLineEdit* myZ; + +}; + +#endif // DIALOGBOX_PROPERTIES_H + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx index ede6403fa..b26488704 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx @@ -27,15 +27,21 @@ // $Header$ #include "MeasureGUI_PropertiesDlg.h" - -#include -#include -#include -#include - +#include "MeasureGUI_1Sel3LineEdit_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "GEOM_Displayer.h" #include "utilities.h" +#include "QAD_Desktop.h" +#include "GEOMImpl_Types.hxx" +#include "GEOMBase.h" -using namespace std; +#include + +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_PropertiesDlg() @@ -44,34 +50,39 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_PropertiesDlg", Sel ) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BASICPROPERTIES"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_BASICPROPERTIES" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_PROPERTIES_TITLE")); + setCaption( tr( "GEOM_PROPERTIES_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_PROPERTIES")); - RadioButton1->setPixmap(image0); - - GroupC1 = new MeasureGUI_1Sel3LineEdit_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_PROPERTIES_CONSTR")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextLabel2->setText(tr("GEOM_LENGTH")); - GroupC1->TextLabel3->setText(tr("GEOM_PROPERTIES_SURFACE")); - GroupC1->TextLabel4->setText(tr("GEOM_PROPERTIES_VOLUME")); - GroupC1->LineEdit2->setReadOnly(TRUE); - GroupC1->LineEdit3->setReadOnly(TRUE); - GroupC1->LineEdit4->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupC1, 1, 0); + + GroupConstructors->setTitle( tr( "GEOM_PROPERTIES" ) ); + RadioButton1->setPixmap( image0 ); + + myGrp = new MeasureGUI_1Sel3LineEdit_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_PROPERTIES_CONSTR" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextLabel2->setText( tr( "GEOM_LENGTH" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_PROPERTIES_SURFACE" ) ); + myGrp->TextLabel4->setText( tr( "GEOM_PROPERTIES_VOLUME" ) ); + myGrp->LineEdit2->setReadOnly( TRUE ); + myGrp->LineEdit3->setReadOnly( TRUE ); + myGrp->LineEdit4->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); + /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -81,7 +92,6 @@ MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg(QWidget* parent, const char* //================================================================================= MeasureGUI_PropertiesDlg::~MeasureGUI_PropertiesDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -89,173 +99,121 @@ MeasureGUI_PropertiesDlg::~MeasureGUI_PropertiesDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_PropertiesDlg::Init() +void MeasureGUI_PropertiesDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - /* signals and slots connections */ - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupC1->show(); - this->show(); - - return; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + MeasureGUI_Skeleton::Init( Sel ); } - //================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case +// function : activateSelection +// purpose : //================================================================================= -void MeasureGUI_PropertiesDlg::SelectionIntoArgument() +void MeasureGUI_PropertiesDlg::activateSelection() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myEditCurrentArgument->setText(""); - QString aString = ""; - - GroupC1->LineEdit2->setText(""); - GroupC1->LineEdit3->setText(""); - GroupC1->LineEdit4->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - - if(S.IsNull() || S.ShapeType() == TopAbs_VERTEX) - return; - - GroupC1->LineEdit1->setText(aString); - - /* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */ - if(myGeomBase->CreateArrowForLinearEdge(S, mySimulationTopoDs)) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + static TColStd_MapOfInteger aTypes; + if ( aTypes.IsEmpty() ) + { + aTypes.Add( GEOM_COMPOUND ); +// aTypes.Add( TopAbs_COMPSOLID ); + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_SHELL ); + aTypes.Add( GEOM_FACE ); + aTypes.Add( GEOM_WIRE ); + aTypes.Add( GEOM_EDGE ); + } - this->CalculateAndDisplayProperties(S); - return; + globalSelection( aTypes ); } - //================================================================================= -// function : SetEditCurrentArgument() +// function : processObject // purpose : //================================================================================= -void MeasureGUI_PropertiesDlg::SetEditCurrentArgument() +void MeasureGUI_PropertiesDlg::processObject() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; + double aLength, anArea, aVolume; + + if ( !getParameters( aLength, anArea, aVolume ) ) + { + mySelEdit->setText( "" ); + myGrp->LineEdit2->setText( "" ); + myGrp->LineEdit3->setText( "" ); + myGrp->LineEdit4->setText( "" ); + } + else + { + myGrp->LineEdit2->setText( QString( "%1" ).arg( aLength ) ); + myGrp->LineEdit3->setText( QString( "%1" ).arg( anArea ) ); + myGrp->LineEdit4->setText( QString( "%1" ).arg( aVolume ) ); } - - this->SelectionIntoArgument(); - return; } - //================================================================================= -// function : LineEditReturnPressed() +// function : getParameters // purpose : //================================================================================= -void MeasureGUI_PropertiesDlg::LineEditReturnPressed() +bool MeasureGUI_PropertiesDlg::getParameters( double& theLength, + double& theArea, + double& theVolume ) { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; + if ( myObj->_is_nil() ) + return false; else - return; + { + try + { + GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetBasicProperties( + myObj, theLength, theArea, theVolume ); + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; + } - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; + return getOperation()->IsDone(); + } } - //================================================================================= -// function : ActivateThisDialog() +// function : createOperation // purpose : //================================================================================= -void MeasureGUI_PropertiesDlg::ActivateThisDialog() +SALOME_Prs* MeasureGUI_PropertiesDlg::buildPrs() { - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + TopoDS_Shape aShape, aResult; + + if ( myObj->_is_nil() || + !GEOMBase::GetShape( myObj, aShape )|| + aShape.IsNull() || + aShape.ShapeType() != TopAbs_EDGE || + !GEOMBase::CreateArrowForLinearEdge( aShape, aResult ) || + aResult.IsNull() ) + return 0; + + return getDisplayer()->BuildPrs( aResult ); + } -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void MeasureGUI_PropertiesDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} -//================================================================================= -// function : CalculateAndDisplayProperties() -// purpose : -//================================================================================= -void MeasureGUI_PropertiesDlg::CalculateAndDisplayProperties(const TopoDS_Shape& S) -{ - GroupC1->LineEdit2->setText(""); - GroupC1->LineEdit3->setText(""); - GroupC1->LineEdit4->setText(""); - - if(S.IsNull()) - return; - - Standard_Real result; - GProp_GProps LProps, SProps; - QString resString; - - try { - BRepGProp::LinearProperties(S,LProps); - result = LProps.Mass(); - if(!IsEqual(result, 0.0)) { - resString = tr("%1").arg(result, 12, 'f', 6); - GroupC1->LineEdit2->setText(resString); - } - BRepGProp::SurfaceProperties(S, SProps); - result = SProps.Mass(); - if(!IsEqual(result, 0.0)) { - resString = tr("%1").arg(result, 12, 'f', 6); - GroupC1->LineEdit3->setText(resString); - } - - result = 0.0; - if(S.ShapeType() < TopAbs_SHELL) { - for(TopExp_Explorer Exp(S,TopAbs_SOLID); Exp.More(); Exp.Next()) { - GProp_GProps VProps; - BRepGProp::VolumeProperties(Exp.Current(), VProps); - result += VProps.Mass(); - } - } - if (!IsEqual(result, 0.0)) { - resString = tr("%1").arg(result, 12, 'f', 6); - GroupC1->LineEdit4->setText(resString); - } - } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in CalculateAndDisplayProperties()"); - } - return; -} + + + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h index d2402393d..d52ea9d8a 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h @@ -29,35 +29,53 @@ #define DIALOGBOX_PROPERTIES_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel3LineEdit_QTD.h" - -#include "MeasureGUI.h" +class MeasureGUI_1Sel3LineEdit_QTD; //================================================================================= // class : MeasureGUI_PropertiesDlg -// purpose : +// purpose : Dialog for displaying length, area and volume //================================================================================= + class MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton { Q_OBJECT public: - MeasureGUI_PropertiesDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_PropertiesDlg(); + MeasureGUI_PropertiesDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_PropertiesDlg(); + +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + virtual void activateSelection(); + virtual SALOME_Prs* buildPrs(); private: - void Init(); - void enterEvent(QEvent* e); - void CalculateAndDisplayProperties(const TopoDS_Shape& S); - MeasureGUI_1Sel3LineEdit_QTD* GroupC1; + void Init( SALOME_Selection* Sel ); + bool getParameters( double& theLength, + double& theArea, + double& theVolume ); -private slots: - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); +private: + MeasureGUI_1Sel3LineEdit_QTD* myGrp; }; #endif // DIALOGBOX_PROPERTIES_H + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index 39498d509..39bcaf04f 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -24,10 +24,21 @@ // File : MeasureGUI_Skeleton.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ -using namespace std; #include "MeasureGUI_Skeleton.h" +#include "QAD_Desktop.h" +#include "QAD_WaitCursor.h" +#include "GEOMBase.h" +#include "GEOM_Displayer.h" +#include "GeometryGUI.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" + +#include +#include +#include +#include +#include //================================================================================= // class : MeasureGUI_Skeleton() @@ -36,18 +47,26 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -MeasureGUI_Skeleton::MeasureGUI_Skeleton(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton_QTD(parent, name, modal, fl) +MeasureGUI_Skeleton::MeasureGUI_Skeleton( QWidget* parent, + const char* name, + SALOME_Selection* Sel ) +: MeasureGUI_Skeleton_QTD( parent, name, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ) { - if (!name) - setName("MeasureGUI_Skeleton"); - buttonClose->setText(tr("GEOM_BUT_CLOSE")); + mySelBtn = 0; + mySelEdit = 0; + myDisplayer = 0; + + if ( !name ) + setName( "MeasureGUI_Skeleton" ); + + buttonClose->setText( tr( "GEOM_BUT_CLOSE" ) ); - GroupMedium->close(TRUE); - resize(350, 0); + buttonClose->setAutoDefault( false ); - Init(Sel); + GroupMedium->close( TRUE ); + resize( 350, 0 ); } @@ -57,8 +76,8 @@ MeasureGUI_Skeleton::MeasureGUI_Skeleton(QWidget* parent, const char* name, SALO //================================================================================= MeasureGUI_Skeleton::~MeasureGUI_Skeleton() { - // no need to delete child widgets, Qt does it all for us - this->destroy(TRUE, TRUE); + myGeomGUI->SetActiveDialogBox( 0 ); + delete myDisplayer; } @@ -66,30 +85,42 @@ MeasureGUI_Skeleton::~MeasureGUI_Skeleton() // function : Init() // purpose : //================================================================================= -void MeasureGUI_Skeleton::Init(SALOME_Selection* Sel) +void MeasureGUI_Skeleton::Init( SALOME_Selection* Sel ) { + myGeomGUI = GeometryGUI::GetGeomGUI(); + /* init variables */ mySelection = Sel; - mySimulationTopoDs.Nullify(); - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); myGeomGUI->SetActiveDialogBox((QDialog*)this); - myGeom = myGeomGUI->myComponentGeom; /* signals and slots connections */ - connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); - connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); - connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + + connect( buttonClose, SIGNAL( clicked() ), + this, SLOT( ClickOnCancel() ) ); + + connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), + this, SLOT ( DeactivateActiveDialog() ) ); + + connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), + this, SLOT ( ClickOnCancel() ) ); - /* Move widget on the botton right corner of main widget */ -// int x, y; -// myGeomBase->DefineDlgPosition( this, x, y ); + connect( mySelEdit, SIGNAL( returnPressed() ), + this, SLOT( LineEditReturnPressed() ) ); + + connect( mySelBtn, SIGNAL( clicked() ), + this, SLOT ( SetEditCurrentArgument() ) ); + + if ( mySelection ) + connect( mySelection, SIGNAL( currentSelectionChanged() ), + this, SLOT ( SelectionIntoArgument() ) ); /* displays Dialog */ - RadioButton1->setChecked(TRUE); + RadioButton1->setChecked( TRUE ); - return; + activateSelection(); + SelectionIntoArgument(); + show(); } @@ -99,14 +130,7 @@ void MeasureGUI_Skeleton::Init(SALOME_Selection* Sel) //================================================================================= void MeasureGUI_Skeleton::ClickOnCancel() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - disconnect(mySelection, 0, this, 0); - //myGeomGUI->ResetState(); - reject(); - - return; + close(); } @@ -119,12 +143,12 @@ void MeasureGUI_Skeleton::LineEditReturnPressed() /* User name of object input management */ /* If successfull the selection is changed and signal emitted... */ /* so SelectionIntoArgument() is automatically called. */ - const QString objectUserName = myEditCurrentArgument->text(); - QWidget* thisWidget = (QWidget*)this; - if(myGeomBase->SelectionByNameInDialogs(thisWidget, objectUserName, mySelection)) - myEditCurrentArgument->setText(objectUserName); - - return; + + const QString objectUserName = mySelEdit->text(); + QWidget* thisWidget = ( QWidget* )this; + + if ( GEOMBase::SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) + mySelEdit->setText( objectUserName ); } @@ -134,12 +158,14 @@ void MeasureGUI_Skeleton::LineEditReturnPressed() //================================================================================= void MeasureGUI_Skeleton::DeactivateActiveDialog() { - this->setEnabled(false); - //myGeomGUI->ResetState(); - disconnect(mySelection, 0, this, 0); - myGeomBase->EraseSimulationShape(); - myGeomGUI->SetActiveDialogBox(0); - return; + setEnabled( false ); + + if ( mySelection ) + disconnect( mySelection, 0, this, 0 ); + + myGeomGUI->SetActiveDialogBox( 0 ); + + globalSelection(); } @@ -149,21 +175,186 @@ void MeasureGUI_Skeleton::DeactivateActiveDialog() //================================================================================= void MeasureGUI_Skeleton::ActivateThisDialog() { - /* Emit a signal to deactivate the active dialog */ myGeomGUI->EmitSignalDeactivateDialog(); - this->setEnabled(true); - myGeomGUI->SetActiveDialogBox((QDialog*)this); - return; + + setEnabled( true ); + + myGeomGUI->SetActiveDialogBox( ( QDialog* )this ); + + if ( mySelection ) + connect( mySelection, SIGNAL( currentSelectionChanged() ), + this, SLOT ( SelectionIntoArgument() ) ); + + redisplayPreview(); + activateSelection(); +} + +//================================================================================= +// function : SetEditCurrentArgument +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::SetEditCurrentArgument() +{ + mySelEdit->setFocus(); + SelectionIntoArgument(); +} + +//================================================================================= +// function : SelectionIntoArgument +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::SelectionIntoArgument() +{ + myObj = GEOM::GEOM_Object::_nil(); + + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if( !testResult || aSelectedObject->_is_nil() ) + { + mySelEdit->setText( "" ); + processObject(); + erasePreview(); + return; + } + + myObj = aSelectedObject; + mySelEdit->setText( GEOMBase::GetName( myObj ) ); + processObject(); + redisplayPreview(); } +//================================================================================= +// function : processObject +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::processObject() +{ +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::closeEvent( QCloseEvent* e ) +{ + disconnect( mySelection, 0, this, 0 ); + QDialog::closeEvent( e ); +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::enterEvent(QEvent* e) +{ + if ( GroupConstructors->isEnabled() ) + return; + + ActivateThisDialog(); +} + +//================================================================================= +// function : buildPrs +// purpose : Build presentation for "preview" +//================================================================================= +SALOME_Prs* MeasureGUI_Skeleton::buildPrs() +{ + return 0; +} //================================================================================= // function : closeEvent() +// purpose : Build presentation for "preview" +//================================================================================= +void MeasureGUI_Skeleton::redisplayPreview() +{ + QString aMess; + if ( !isValid( aMess ) ) + { + erasePreview( true ); + return; + } + + erasePreview( false ); + + try + { + QAD_WaitCursor wc; + + getDisplayer()->SetColor( Quantity_NOC_VIOLET ); + getDisplayer()->SetToActivate( false ); + + if ( SALOME_Prs* aPrs = buildPrs() ) + displayPreview( aPrs ); + } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + } + +} + +//================================================================================= +// function : activateSelection +// purpose : +//================================================================================= +void MeasureGUI_Skeleton::activateSelection() +{ + globalSelection( GEOM_ALLSHAPES ); +} + +//================================================================================= +// function : isValid // purpose : //================================================================================= -void MeasureGUI_Skeleton::closeEvent(QCloseEvent* e) +bool MeasureGUI_Skeleton::isValid( QString& ) { - /* same than click on cancel button */ - this->ClickOnCancel(); - return; + return !myObj->_is_nil(); } + +//================================================================ +// Function : getDisplayer +// Purpose : +//================================================================ +GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer() +{ + if ( !myDisplayer ) + myDisplayer = new GEOM_Displayer(); + return myDisplayer; +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr MeasureGUI_Skeleton::createOperation() +{ + return getGeomEngine()->GetIMeasureOperations( getStudyId() ); +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.h b/src/MeasureGUI/MeasureGUI_Skeleton.h index 299c51a85..664ee5a33 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton.h @@ -30,44 +30,71 @@ #define MEASUREGUI_SKELETON_H #include "MeasureGUI_Skeleton_QTD.h" +#include "GEOMBase_Helper.h" -#include "GEOMBase.h" +class GeometryGUI; +class QWidget; +class QLineEdit; +class QPushButton; +class SALOME_Selection; +class GEOM_Displayer; -#include -#include -#include -#include -#include -#include -#include - -class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD +class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD, + public GEOMBase_Helper { Q_OBJECT public: - MeasureGUI_Skeleton(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_Skeleton(); + MeasureGUI_Skeleton( QWidget* parent, + const char* name, + SALOME_Selection* Sel = 0 ); + ~MeasureGUI_Skeleton(); + +protected slots: -private : - void Init(SALOME_Selection* Sel); + virtual void ClickOnCancel(); + virtual void DeactivateActiveDialog(); + virtual void ActivateThisDialog(); + virtual void SelectionIntoArgument(); + virtual void LineEditReturnPressed(); + virtual void SetEditCurrentArgument(); protected: - void closeEvent(QCloseEvent* e); - TopoDS_Shape mySimulationTopoDs; /* Shape used for simulation display */ - QLineEdit* myEditCurrentArgument; /* Current LineEdit */ - SALOME_Selection* mySelection; /* User shape selection */ - GEOM::GEOM_Gen_var myGeom; /* Current GeomI object */ - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; /* Current GeomGUI object */ + void Init( SALOME_Selection* Sel ); -protected slots: - void ClickOnCancel(); - void LineEditReturnPressed(); - void DeactivateActiveDialog(); - void ActivateThisDialog(); + void enterEvent( QEvent* e ); + void closeEvent( QCloseEvent* e ); + void redisplayPreview(); + GEOM_Displayer* getDisplayer(); + + virtual bool isValid( QString& msg ); + virtual SALOME_Prs* buildPrs(); + virtual void processObject(); + virtual void activateSelection(); + virtual GEOM::GEOM_IOperations_ptr createOperation(); + +protected: + + QPushButton* mySelBtn; + QLineEdit* mySelEdit; + GEOM::GEOM_Object_var myObj; + + SALOME_Selection* mySelection; + GeometryGUI* myGeomGUI; + GEOM_Displayer* myDisplayer; }; #endif // MEASUREGUI_SKELETON_H + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx index 3fddd8492..0f30aaed2 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx @@ -27,51 +27,64 @@ // $Header$ #include "MeasureGUI_WhatisDlg.h" +#include "MeasureGUI_1Sel1TextView_QTD.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "GEOMBase.h" #include #include #include #include +#include #include -#include - #include #include "utilities.h" +#include "QAD_Desktop.h" -using namespace std; +#include +#include +#include +#include +#include +#include //================================================================================= -// class : MeasureGUI_WhatisDlg() -// purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the +// class : MeasureGUI_WhatisDlg( ) +// purpose : Constructs a MeasureGUI_WhatisDlg 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. //================================================================================= -MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) - :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( QWidget* parent, SALOME_Selection* Sel ) +: MeasureGUI_Skeleton( parent, "MeasureGUI_WhatisDlg", Sel ) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WHATIS"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_DLG_WHATIS" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( + "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_WHATIS_TITLE")); + setCaption( tr( "GEOM_WHATIS_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_WHATIS")); - RadioButton1->setPixmap(image0); + + GroupConstructors->setTitle( tr( "GEOM_WHATIS" ) ); + RadioButton1->setPixmap( image0 ); - GroupC1 = new MeasureGUI_1Sel1TextView_QTD(this, "GroupC1"); - GroupC1->GroupBox1->setTitle(tr("GEOM_WHATIS_OBJECT")); - GroupC1->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupC1->TextEdit1->setReadOnly(TRUE); - GroupC1->PushButton1->setPixmap(image1); + myGrp = new MeasureGUI_1Sel1TextView_QTD( this, "myGrp" ); + myGrp->GroupBox1->setTitle( tr( "GEOM_WHATIS_OBJECT" ) ); + myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); + myGrp->TextEdit1->setReadOnly( TRUE ); + myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( myGrp, 1, 0 ); - Layout1->addWidget(GroupC1, 1, 0); /***************************************************************/ /* Initialisation */ - Init(); + Init( Sel ); } @@ -81,7 +94,6 @@ MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg(QWidget* parent, const char* name, SA //================================================================================= MeasureGUI_WhatisDlg::~MeasureGUI_WhatisDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -89,179 +101,47 @@ MeasureGUI_WhatisDlg::~MeasureGUI_WhatisDlg() // function : Init() // purpose : //================================================================================= -void MeasureGUI_WhatisDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupC1->LineEdit1; - - /* signals and slots connections */ - connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupC1->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case -//================================================================================= -void MeasureGUI_WhatisDlg::SelectionIntoArgument() +void MeasureGUI_WhatisDlg::Init( SALOME_Selection* Sel ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - myEditCurrentArgument->setText(""); - SelectedName = ""; /* future the name of selection */ - GroupC1->TextEdit1->setText(""); - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(S.IsNull()) - return; - - /* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */ - if(myGeomBase->CreateArrowForLinearEdge(S, mySimulationTopoDs)) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - - GroupC1->LineEdit1->setText(SelectedName); - this->CalculateWhatis(S); - - return; + mySelBtn = myGrp->PushButton1; + mySelEdit = myGrp->LineEdit1; + MeasureGUI_Skeleton::Init( Sel ); } - //================================================================================= -// function : SetEditCurrentArgument() +// function : processObject // purpose : //================================================================================= -void MeasureGUI_WhatisDlg::SetEditCurrentArgument() +void MeasureGUI_WhatisDlg::processObject() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupC1->PushButton1) { - GroupC1->LineEdit1->setFocus(); - myEditCurrentArgument = GroupC1->LineEdit1; - } - - this->SelectionIntoArgument(); - return; + QString aText; + myGrp->TextEdit1->setText( getParameters( aText ) ? aText : QString("") ); } //================================================================================= -// function : LineEditReturnPressed() +// function : getParameters // purpose : //================================================================================= -void MeasureGUI_WhatisDlg::LineEditReturnPressed() +bool MeasureGUI_WhatisDlg::getParameters( QString& theText ) { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupC1->LineEdit1) - myEditCurrentArgument = GroupC1->LineEdit1; + if ( myObj->_is_nil() ) + return false; else - return; - - MeasureGUI_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void MeasureGUI_WhatisDlg::ActivateThisDialog() -{ - MeasureGUI_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void MeasureGUI_WhatisDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} - - -//================================================================================= -// function : CalculateWhatis() -// purpose : -//================================================================================= -void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S) -{ - if(S.IsNull()) - return; - - TCollection_AsciiString Astr; - - if ( S.ShapeType() == TopAbs_EDGE ) { - if( BRep_Tool::Degenerated(TopoDS::Edge(S)) ) { - Astr = Astr + " " + CORBA::string_dup(SelectedName.latin1()) + " is a degenerated edge \n"; + { + try + { + theText = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->WhatIs( myObj ); } - } - - Astr = Astr + " Number of shapes in " + CORBA::string_dup(SelectedName.latin1()) + " : \n"; - - try { - int iType, nbTypes [TopAbs_SHAPE]; - for(iType = 0; iType < TopAbs_SHAPE; ++iType) - nbTypes[iType] = 0; - nbTypes[S.ShapeType()]++; - - TopTools_MapOfShape aMapOfShape; - aMapOfShape.Add(S); - TopTools_ListOfShape aListOfShape; - aListOfShape.Append(S); - - TopTools_ListIteratorOfListOfShape itL(aListOfShape); - for(; itL.More(); itL.Next()) { - TopoDS_Iterator it(itL.Value()); - for(; it.More(); it.Next()) { - TopoDS_Shape s = it.Value(); - if(aMapOfShape.Add(s)) { - aListOfShape.Append(s); - nbTypes[s.ShapeType()]++; - } - } + catch( const SALOME::SALOME_Exception& e ) + { + QtCatchCorbaException( e ); + return false; } - Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbTypes[TopAbs_VERTEX]) + "\n"; - Astr = Astr + " EDGE : " + TCollection_AsciiString(nbTypes[TopAbs_EDGE]) + "\n"; - Astr = Astr + " WIRE : " + TCollection_AsciiString(nbTypes[TopAbs_WIRE]) + "\n"; - Astr = Astr + " FACE : " + TCollection_AsciiString(nbTypes[TopAbs_FACE]) + "\n"; - Astr = Astr + " SHELL : " + TCollection_AsciiString(nbTypes[TopAbs_SHELL]) + "\n"; - Astr = Astr + " SOLID : " + TCollection_AsciiString(nbTypes[TopAbs_SOLID]) + "\n"; - Astr = Astr + " COMPSOLID : " + TCollection_AsciiString(nbTypes[TopAbs_COMPSOLID]) + "\n"; - Astr = Astr + " COMPOUND : " + TCollection_AsciiString(nbTypes[TopAbs_COMPOUND]) + "\n"; - Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent()); - - GroupC1->TextEdit1->setText(Astr.ToCString()); - } - catch(Standard_Failure) { - MESSAGE("Catch intercepted in CalculateWhatis()"); + return getOperation()->IsDone(); } - return; } + + + diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.h b/src/MeasureGUI/MeasureGUI_WhatisDlg.h index 2714f0b26..e94d8dd0a 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.h +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.h @@ -30,9 +30,8 @@ #define DIALOGBOX_WHATIS_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel1TextView_QTD.h" -#include "MeasureGUI.h" +class MeasureGUI_1Sel1TextView_QTD; //================================================================================= // class : DialogBox_PROPERTIES @@ -43,22 +42,23 @@ class MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton Q_OBJECT public: - MeasureGUI_WhatisDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~MeasureGUI_WhatisDlg(); + MeasureGUI_WhatisDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~MeasureGUI_WhatisDlg(); + +protected: + + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); private: - void Init(); - void enterEvent(QEvent* e); - void CalculateWhatis(const TopoDS_Shape& S); - QString SelectedName; - MeasureGUI_1Sel1TextView_QTD* GroupC1; + void Init( SALOME_Selection* Sel ); + bool getParameters( QString& ); + +private: -private slots: - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); - void ActivateThisDialog(); + MeasureGUI_1Sel1TextView_QTD* myGrp; }; diff --git a/src/NMTAlgo/Makefile.in b/src/NMTAlgo/Makefile.in new file mode 100644 index 000000000..1dac5fc5f --- /dev/null +++ b/src/NMTAlgo/Makefile.in @@ -0,0 +1,70 @@ +# GEOM NMTAlgo : partition algorithm +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ + + +@COMMENCE@ + +# Libraries targets +LIB = libNMTAlgo.la +LIB_SRC = \ + NMTAlgo_Algo.cxx \ + NMTAlgo_Builder.cxx \ + NMTAlgo_Loop3d.cxx \ + NMTAlgo_Splitter.cxx \ + NMTAlgo_Splitter1.cxx \ + NMTAlgo_Splitter_1.cxx \ + NMTAlgo_Splitter_2.cxx \ + NMTAlgo_Tools.cxx + +LIB_CLIENT_IDL = +LIB_SERVER_IDL = + +# header files +EXPORT_HEADERS = \ + NMTAlgo_Splitter1.hxx \ + NMTAlgo_Splitter.hxx \ + NMTAlgo_Builder.hxx \ + NMTAlgo_Algo.hxx + +# idl files +EXPORT_IDLS= + + +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +LDFLAGS += $(CAS_LDPATH) -lNMTTools -lTKBool -lTKBO -L${KERNEL_ROOT_DIR}/lib/salome + +%_moc.cxx: %.h + $(MOC) $< -o $@ + +@CONCLUDE@ diff --git a/src/NMTAlgo/NMTAlgo.cdl b/src/NMTAlgo/NMTAlgo.cdl new file mode 100644 index 000000000..19f52dad4 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo.cdl @@ -0,0 +1,40 @@ +-- File: NMTAlgo.cdl +-- Created: Tue Jan 27 14:39:05 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +package NMTAlgo + + ---Purpose: + +uses + TCollection, + TColStd, + gp, + TopAbs, + TopoDS, + TopTools, + + BooleanOperations, + BOPTColStd, + IntTools, + BOPTools, + BOP, + + NMTDS, + NMTTools, + + BRep, + BRepAlgo + +is + deferred class Algo; + class Splitter; + class Splitter1; --modified by NIZNHY-PKV Wed Feb 11 14:28:50 2004 + class Builder; + class Tools; + class Loop3d; + +end NMTAlgo; diff --git a/src/NMTAlgo/NMTAlgo_Algo.cdl b/src/NMTAlgo/NMTAlgo_Algo.cdl new file mode 100644 index 000000000..cad765560 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Algo.cdl @@ -0,0 +1,59 @@ +-- File: NMTAlgo_Algo.cdl +-- Created: Tue Jan 27 14:41:04 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +deferred class Algo from NMTAlgo + + ---Purpose: + +uses + Shape from TopoDS, + + DSFiller from NMTTools, + PDSFiller from NMTTools + +--raises + +is + Initialize + returns Algo from NMTAlgo; + ---C++: alias "Standard_EXPORT virtual ~NMTAlgo_Algo();" + + + SetFiller(me:out; + aDSF: DSFiller from NMTTools); + + Filler(me) + returns DSFiller from NMTTools; + ---C++: return const & + + ComputeWithFiller(me:out; + aDSF: DSFiller from NMTTools) + is virtual; + + Clear (me:out) + is virtual; + + Shape (me) + returns Shape from TopoDS; + ---C++: return const & + + IsDone(me) + returns Boolean from Standard; + + ErrorStatus (me) + returns Integer from Standard; + +fields + myDSFiller : PDSFiller from NMTTools is protected; + myShape : Shape from TopoDS is protected; + -- + myIsDone : Boolean from Standard is protected; + myIsComputed : Boolean from Standard is protected; + myErrorStatus : Integer from Standard is protected; + myDraw : Integer from Standard is protected; + +end Algo; diff --git a/src/NMTAlgo/NMTAlgo_Algo.cxx b/src/NMTAlgo/NMTAlgo_Algo.cxx new file mode 100644 index 000000000..1b77cbceb --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Algo.cxx @@ -0,0 +1,119 @@ +// File: NMTAlgo_Algo.cxx +// Created: Tue Jan 27 14:58:21 2004 +// Author: Peter KURNEV +// + + +#include +#include +//======================================================================= +// function: NMTAlgo_Algo::NMTAlgo_Algo +// purpose: +//======================================================================= + NMTAlgo_Algo::NMTAlgo_Algo() +: + myDSFiller(NULL), + myIsDone(Standard_False), + myIsComputed(Standard_False), + myErrorStatus(1) +{ + myDraw=0; + // + char* xr=getenv("MDISP"); + if (xr!=NULL) { + if (!strcmp (xr, "yes")) { + myDraw=1; + } + } +} +//======================================================================= +// function: NMTAlgo_Algo +// purpose: +//======================================================================= + NMTAlgo_Algo::~NMTAlgo_Algo() +{ + Clear(); +} +//======================================================================= +// function: Clear +// purpose: +//======================================================================= + void NMTAlgo_Algo::Clear() +{ + myIsDone=Standard_False; + myIsComputed=Standard_False; + myErrorStatus=1; +} +//======================================================================= +// function: SetFiller +// purpose: +//======================================================================= + void NMTAlgo_Algo::SetFiller(const NMTTools_DSFiller& aDSF) +{ + myDSFiller=(NMTTools_DSFiller *)&aDSF; +} +//======================================================================= +// function: Filler +// purpose: +//======================================================================= + const NMTTools_DSFiller& NMTAlgo_Algo::Filler()const +{ + return *myDSFiller; +} +//======================================================================= +// function: ComputeWithFiller +// purpose: +//======================================================================= + void NMTAlgo_Algo::ComputeWithFiller(const NMTTools_DSFiller& aDSF) +{ + SetFiller(aDSF); +} +//======================================================================= +// function: Shape +// purpose: +//======================================================================= + const TopoDS_Shape& NMTAlgo_Algo::Shape()const +{ + return myShape; +} +//======================================================================= +// function: IsDone +// purpose: +//======================================================================= + Standard_Boolean NMTAlgo_Algo::IsDone()const +{ + return myIsDone; +} +//======================================================================= +// function: ErrorStatus +// purpose: +//======================================================================= + Standard_Integer NMTAlgo_Algo::ErrorStatus()const +{ + return myErrorStatus; +} +/* +//======================================================================= +// function: Compute +// purpose: +//======================================================================= + void NMTAlgo_Algo::Compute() +{ +} +//======================================================================= +// function: SetCompositeShape +// purpose: +//======================================================================= + void NMTAlgo_Algo::SetCompositeShape(const TopoDS_Shape& aS) +{ + myCompositeShape=aS; +} +//======================================================================= +// function: CompositeShape +// purpose: +//======================================================================= + const TopoDS_Shape& NMTAlgo_Algo::CompositeShape()const +{ + return myCompositeShape; +} +*/ diff --git a/src/NMTAlgo/NMTAlgo_Algo.hxx b/src/NMTAlgo/NMTAlgo_Algo.hxx new file mode 100644 index 000000000..afa9726cd --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Algo.hxx @@ -0,0 +1,109 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTAlgo_Algo_HeaderFile +#define _NMTAlgo_Algo_HeaderFile + +#ifndef _NMTTools_PDSFiller_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +class NMTTools_DSFiller; +class TopoDS_Shape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTAlgo_Algo { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT void SetFiller(const NMTTools_DSFiller& aDSF) ; +Standard_EXPORT const NMTTools_DSFiller& Filler() const; +Standard_EXPORT virtual void ComputeWithFiller(const NMTTools_DSFiller& aDSF) ; +Standard_EXPORT virtual void Clear() ; +Standard_EXPORT const TopoDS_Shape& Shape() const; +Standard_EXPORT Standard_Boolean IsDone() const; +Standard_EXPORT Standard_Integer ErrorStatus() const; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT NMTAlgo_Algo(); +Standard_EXPORT virtual ~NMTAlgo_Algo(); + + + // Fields PROTECTED + // +NMTTools_PDSFiller myDSFiller; +TopoDS_Shape myShape; +Standard_Boolean myIsDone; +Standard_Boolean myIsComputed; +Standard_Integer myErrorStatus; +Standard_Integer myDraw; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTAlgo/NMTAlgo_Algo.ixx b/src/NMTAlgo/NMTAlgo_Algo.ixx new file mode 100644 index 000000000..0d5a23360 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Algo.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTAlgo/NMTAlgo_Algo.jxx b/src/NMTAlgo/NMTAlgo_Algo.jxx new file mode 100644 index 000000000..a31f1b55c --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Algo.jxx @@ -0,0 +1,9 @@ +#ifndef _NMTTools_DSFiller_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Algo_HeaderFile +#include +#endif diff --git a/src/NMTAlgo/NMTAlgo_Builder.cdl b/src/NMTAlgo/NMTAlgo_Builder.cdl new file mode 100644 index 000000000..8587477fe --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Builder.cdl @@ -0,0 +1,79 @@ +-- File: NMTAlgo_Builder.cdl +-- Created: Tue Jan 27 15:09:45 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +class Builder from NMTAlgo + inherits Algo from NMTAlgo + + ---Purpose: + +uses + Shape from TopoDS, + Face from TopoDS, + Edge from TopoDS, + IndexedMapOfShape from TopTools, + IndexedDataMapOfShapeListOfShape from TopTools, + IndexedDataMapOfShapeShape from TopTools, + Image from BRepAlgo, + DSFiller from NMTTools +--raises + +is + Create + returns Builder from NMTAlgo; + ---C++: alias "Standard_EXPORT virtual ~NMTAlgo_Builder();" + + Clear (me:out) + is redefined; + + ComputeWithFiller(me:out; + aDSF: DSFiller from NMTTools) + is redefined; + + FillImagesEdges (me:out) + is protected; + + FillIn2DParts (me:out) + is protected; + + FillImagesFaces (me:out) + is protected; + + FillSDFaces (me:out) + is protected; + + --- Queries + SplitVertices (me:out) + is protected; + + IsSectionEdge (me; + E : Edge from TopoDS) + returns Boolean from Standard + is protected; + + HasSameDomainF(me; + F : Face from TopoDS) + returns Boolean from Standard + is protected; + + IsSameDomainF(me; + F1 : Face from TopoDS; + F2 : Face from TopoDS) + returns Boolean from Standard + is protected; + +fields + + myImagesEdges : Image from BRepAlgo is protected; + myImagesFaces : Image from BRepAlgo is protected; + + myQueryShapes : IndexedMapOfShape from TopTools is protected; + -- + myIn2DParts : IndexedDataMapOfShapeListOfShape from TopTools is protected; + mySectionParts : IndexedDataMapOfShapeListOfShape from TopTools is protected; + mySDFaces : IndexedDataMapOfShapeShape from TopTools is protected; + -- +end Builder; diff --git a/src/NMTAlgo/NMTAlgo_Builder.cxx b/src/NMTAlgo/NMTAlgo_Builder.cxx new file mode 100644 index 000000000..c7a902f06 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Builder.cxx @@ -0,0 +1,637 @@ +// File: NMTAlgo_Inter3d.cxx +// Created: Tue Jan 27 15:14:13 2004 +// Author: Peter KURNEV +// + + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +//======================================================================= +// function: NMTAlgo_Inter3d::NMTAlgo_Inter3d() +// purpose: +//======================================================================= + NMTAlgo_Builder::NMTAlgo_Builder() +: + NMTAlgo_Algo() +{ +} +//======================================================================= +// function: ~NMTAlgo_Builder +// purpose: +//======================================================================= + NMTAlgo_Builder::~NMTAlgo_Builder() +{ + Clear(); +} +//======================================================================= +// function: Clear +// purpose: +//======================================================================= + void NMTAlgo_Builder::Clear() +{ + NMTAlgo_Algo::Clear(); + // + myImagesEdges.Clear(); + myImagesFaces.Clear(); + myIn2DParts.Clear(); + mySectionParts.Clear(); + mySDFaces.Clear(); +} +//======================================================================= +// function: ComputeWithFiller +// purpose: +//======================================================================= + void NMTAlgo_Builder::ComputeWithFiller(const NMTTools_DSFiller& aDSF) +{ + myErrorStatus=0; + myIsDone=Standard_False; + // + SetFiller(aDSF); + // edges + FillImagesEdges(); + // faces + FillIn2DParts(); + FillImagesFaces(); + FillSDFaces(); +} + +//======================================================================= +// function: FillSDFaces +// purpose: +//======================================================================= + void NMTAlgo_Builder::FillSDFaces() +{ + const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS(); + NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller()); + BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*)&myDSFiller->InterfPool(); + BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); + IntTools_Context& aCtx= pPF->ChangeContext(); + // + Standard_Boolean bIsSDF; + Standard_Integer i, j, aNbFF, nF1, nF2, aNbPBInOn, aNbC; + TopTools_ListIteratorOfListOfShape aItF1, aItF2; + NMTTools_ListOfCoupleOfShape aLCS; + // + mySDFaces.Clear(); + // + // 1. For each FF find among images of faces + // all pairs of same domain faces (SDF) [=> aLCS] + aNbFF=aFFs.Extent(); + for (i=1; i<=aNbFF; ++i) { + BOPTools_SSInterference& aFF=aFFs(i); + aFF.Indices(nF1, nF2); + // + const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1)); + const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2)); + // + // if there are no in/on 2D split parts the faces nF1, nF2 + // can not be SDF + const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks(); + aNbPBInOn=aLPBInOn.Extent(); + if (!aNbPBInOn) { + continue; + } + // + // if there is at least one section edge between faces nF1, nF2 + // they can not be SDF + BOPTools_SequenceOfCurves& aSC=aFF.Curves(); + aNbC=aSC.Length(); + if (aNbC) { + continue; + } + // + // the faces are suspected to be SDF. + // Try to find SDF among images of nF1, nF2 + const TopTools_ListOfShape& aLF1=myImagesFaces.Image(aF1); + const TopTools_ListOfShape& aLF2=myImagesFaces.Image(aF2); + // + aItF1.Initialize(aLF1); + for (; aItF1.More(); aItF1.Next()) { + const TopoDS_Face& aF1x=TopoDS::Face(aItF1.Value()); + // + aItF2.Initialize(aLF2); + for (; aItF2.More(); aItF2.Next()) { + const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value()); + bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx); + if (bIsSDF) { + NMTTools_CoupleOfShape aCS; + // + aCS.SetShape1(aF1x); + aCS.SetShape2(aF2y); + aLCS.Append(aCS); + } + } + } + }//for (i=1; i<=aNbFF; ++i) + // + aNbC=aLCS.Extent(); + if (!aNbC) { + return; + } + // + // 2. Find Chains + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC; + // + NMTTools_Tools::FindChains(aLCS, aMC); + // + // 3. Fill the map of SDF mySDFaces + aNbC=aMC.Extent(); + for (i=1; i<=aNbC; ++i) { + const TopoDS_Shape& aF=aMC.FindKey(i); + const TopTools_IndexedMapOfShape& aMSDF=aMC(i); + // + aNbFF=aMSDF.Extent(); + for (j=1; j<=aNbFF; ++j) { + const TopoDS_Shape& aFSD=aMSDF(j); + mySDFaces.Add(aFSD, aF); + } + } + // +} +//======================================================================= +// function: FillImagesFaces +// purpose: +//======================================================================= + void NMTAlgo_Builder::FillImagesFaces() +{ + const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS(); + NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller()); + IntTools_Context& aCtx= pPF->ChangeContext(); + // + Standard_Integer i, j, aNb, aNbE; + TopTools_IndexedMapOfShape aMFence, aME; + TColStd_IndexedMapOfInteger aMFP; + // + // 1. Select Faces to process (MFP) + aNb=aDS.NumberOfShapesOfTheObject(); + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aF=aDS.Shape(i); + if (aF.ShapeType()!=TopAbs_FACE) { + continue; + } + if (aMFence.Contains(aF)) { + continue; + } + aMFence.Add(aF); + // + if (myIn2DParts.Contains(aF)) { + aMFP.Add(i); + continue; + } + // + if (mySectionParts.Contains(aF)) { + aMFP.Add(i); + continue; + } + // + aME.Clear(); + TopExp::MapShapes(aF, TopAbs_EDGE, aME); + // + aNbE=aME.Extent(); + for(j=1; j<=aNbE; ++j) { + const TopoDS_Shape& aE=aME(j); + // + if (myImagesEdges.HasImage(aE)) { + aMFP.Add(i); + break; + } + } + }// for (i=1; i<=aNb; ++i) + // + // 2. ProcessFaces + Standard_Boolean bToReverse, bIsClosed, bIsDegenerated; + Standard_Integer aNbF, nF; + TopoDS_Face aFF; + TopoDS_Edge aSp; + TopExp_Explorer anExp; + TopTools_ListIteratorOfListOfShape aIt; + BRepAlgo_Image aImagesFaces; + TopAbs_Orientation anOriF; + // + aNbF=aMFP.Extent(); + for (i=1; i<=aNbF; ++i) { + nF=aMFP(i); + const TopoDS_Face& aF=TopoDS::Face(aDS.Shape(nF)); + anOriF=aF.Orientation(); + aFF=aF; + aFF.Orientation(TopAbs_FORWARD); + // + aMFence.Clear(); + // + // 2.1. Fill WES + BOP_WireEdgeSet aWES; + aWES.Initialize(aFF); + // + // 2.1.1. Add Split parts + anExp.Init(aFF, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current()); + // + if (!myImagesEdges.HasImage(aE)) { + aWES.AddStartElement(aE); + continue; + } + // + bIsDegenerated=BRep_Tool::Degenerated(aE); + bIsClosed=BRep_Tool::IsClosed(aE, aF); + // + const TopTools_ListOfShape& aLIE=myImagesEdges.Image(aE); + aIt.Initialize(aLIE); + for (; aIt.More(); aIt.Next()) { + aSp=TopoDS::Edge(aIt.Value()); + // + if (bIsDegenerated) { + aSp.Orientation(aE.Orientation()); + aWES.AddStartElement(aSp); + continue; + } + // + if (bIsClosed){ + if (!aMFence.Contains(aSp)){ + aMFence.Add(aSp); + // + if (!BRep_Tool::IsClosed(aSp, aF)){ + BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF); + } + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + continue; + } + } + // + bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx); + if (bToReverse) { + aSp.Reverse(); + } + aWES.AddStartElement(aSp); + } + } + // + // 2.1.2. Add In2D Parts + if (myIn2DParts.Contains(aF)) { + const TopTools_ListOfShape& aLE=myIn2DParts.FindFromKey(aF); + aIt.Initialize(aLE); + for (; aIt.More(); aIt.Next()) { + aSp=TopoDS::Edge(aIt.Value()); + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + } + } + // + // 2.1.3. Add Section Parts + if (mySectionParts.Contains(aF)) { + const TopTools_ListOfShape& aLE=mySectionParts.FindFromKey(aF); + aIt.Initialize(aLE); + for (; aIt.More(); aIt.Next()) { + aSp=TopoDS::Edge(aIt.Value()); + // + aSp.Orientation(TopAbs_FORWARD); + aWES.AddStartElement(aSp); + // + aSp.Orientation(TopAbs_REVERSED); + aWES.AddStartElement(aSp); + } + } + // + // 2.2. Build images Faces + BOP_FaceBuilder aFB; + // + aFB.SetTreatment(0); // 0-Do Internal Edges + aFB.SetTreatSDScales(0); // what is 0 ?? + // + aFB.Do(aWES); + // + TopTools_ListOfShape aLFR; + // + const TopTools_ListOfShape& aLF=aFB.NewFaces(); + + aIt.Initialize(aLF); + for (; aIt.More(); aIt.Next()) { + TopoDS_Shape& aFR=aIt.Value(); + if (anOriF==TopAbs_REVERSED) { + aFR.Orientation(TopAbs_REVERSED); + } + aLFR.Append(aFR); + } + + // + // 2.3. Collect images Faces + myImagesFaces.Bind(aF, aLFR); + }//for (i=1; i<=aNbF; ++i) +} +//======================================================================= +// function: FillIn2DParts +// purpose: +//======================================================================= + void NMTAlgo_Builder::FillIn2DParts() +{ + const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS(); + NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller()); + BOPTools_InterferencePool* pIP=(BOPTools_InterferencePool*)&myDSFiller->InterfPool(); + BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences(); + // + Standard_Integer i, j, aNb, nF1, nF2, aNbFF, iFF, nSpIn, nSpSc, aNbCurves; + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aFFMap; + BOPTools_ListOfPaveBlock aLPBIn, aLPBSc; + BOPTools_ListIteratorOfListOfPaveBlock aItPBIn, aItPBSc; + TopTools_IndexedMapOfShape aMF, aMFence; + TopTools_ListOfShape aLSpIn, aLSpSc; + // + BOP_BuilderTools::DoMap(aFFs, aFFMap); + // + // 1. Collect Splits In 2D (myIn2DParts) and + // Section Edges (mySectionParts) + // for each source face that involved in FF + aNb=aFFMap.Extent(); + for (i=1; i<=aNb; ++i) { + nF1=aFFMap.FindKey(i); + const TopoDS_Shape& aF=aDS.Shape(nF1); + // + if (aMF.Contains(aF)) { + continue; + } + aMF.Add(aF); + // + aLPBIn.Clear(); + aLPBSc.Clear(); + // + const TColStd_IndexedMapOfInteger& aFFIndicesMap=aFFMap.FindFromIndex(i); + // + aNbFF=aFFIndicesMap.Extent(); + for (j=1; j<=aNbFF; ++j) { + iFF=aFFIndicesMap(j); + BOPTools_SSInterference& aFF=aFFs(iFF); + nF2=aFF.OppositeIndex(nF1); + // + // In 2D + pPF->RealSplitsInFace(0, nF2, nF1, aLPBIn); + // + // Sections + BOPTools_SequenceOfCurves& aSC=aFF.Curves(); + aNbCurves=aSC.Length(); + if (!aNbCurves) { + continue; + } + // + const BOPTools_Curve& aBC=aSC(1); + const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks(); + // + aItPBSc.Initialize(aLPB); + for (; aItPBSc.More(); aItPBSc.Next()) { + const BOPTools_PaveBlock& aPBSc=aItPBSc.Value(); + aLPBSc.Append(aPBSc); + } + }// for (j=1; j<=aNbFF; ++j) + // + // In 2D Parts + aMFence.Clear(); + // + aLSpIn.Clear(); + aItPBIn.Initialize(aLPBIn); + for (; aItPBIn.More(); aItPBIn.Next()) { + const BOPTools_PaveBlock& aPBR=aItPBIn.Value(); + nSpIn=aPBR.Edge(); + const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn); + if (!aMFence.Contains(aSpIn)){ + aMFence.Add(aSpIn); + aLSpIn.Append(aSpIn); + } + } + myIn2DParts.Add(aF, aLSpIn); + // + // Section Parts + aLSpSc.Clear(); + aItPBSc.Initialize(aLPBSc); + for (; aItPBSc.More(); aItPBSc.Next()) { + const BOPTools_PaveBlock& aPBSc=aItPBSc.Value(); + nSpSc=aPBSc.Edge(); + const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc); + if (!aMFence.Contains(aSpSc)){ + aMFence.Add(aSpSc); + aLSpSc.Append(aSpSc); + } + } + mySectionParts.Add(aF, aLSpSc); + } //for (i=1; i<=aNb; ++i) +} + +//======================================================================= +// function: FillImagesEdges +// purpose: +//======================================================================= + void NMTAlgo_Builder::FillImagesEdges() +{ + const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS(); + NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller()); + const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool(); + // + Standard_Integer nE, aNb, aNbSp, nSp; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + TopTools_IndexedMapOfShape aMFence; + TopTools_ListOfShape aLSp; + // + aNb=aDS.NumberOfShapesOfTheObject(); + for (nE=1; nE<=aNb; ++nE) { + const TopoDS_Shape& aE=aDS.Shape(nE); + if (aE.ShapeType()!=TopAbs_EDGE) { + continue; + } + if (aMFence.Contains(aE)) { + continue; + } + aMFence.Add(aE); + // + const BOPTools_ListOfPaveBlock& aLPB=aSSP(aDS.RefEdge(nE)); + aNbSp=aLPB.Extent(); + // + if (!aNbSp) {// no splits + //myImagesEdges.Bind(aE, aE); + continue; + } + // + aLSp.Clear(); + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB); + nSp=aPBR.Edge(); + const TopoDS_Shape& aSp=aDS.Shape(nSp); + aLSp.Append(aSp); + } + myImagesEdges.Bind(aE, aLSp); + } +} +//======================================================================= +// function: SplitVertices +// purpose: +//======================================================================= + void NMTAlgo_Builder::SplitVertices() +{ + const NMTDS_ShapesDataStructure& aDS=myDSFiller->DS(); + NMTTools_PaveFiller* pPF=(NMTTools_PaveFiller*)&(myDSFiller->PaveFiller()); + const BOPTools_SplitShapesPool& aSSP=pPF->SplitShapesPool(); + // + Standard_Integer nE, aNb, aNbSp, nV1, nV2; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + // + myQueryShapes.Clear(); + // + aNb=aDS.NumberOfShapesOfTheObject(); + for (nE=1; nE<=aNb; ++nE) { + const TopoDS_Shape& aE=aDS.Shape(nE); + if (aE.ShapeType()!=TopAbs_EDGE) { + continue; + } + // + const BOPTools_ListOfPaveBlock& aLPB=aSSP(aDS.RefEdge(nE)); + aNbSp=aLPB.Extent(); + // + if (!aNbSp) {// no splits + continue; + } + // + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + const BOPTools_PaveBlock& aPBR=pPF->RealPaveBlock(aPB); + // + nV1=aPBR.Pave1().Index(); + if (aDS.IsNewShape(nV1)) { + const TopoDS_Shape& aV1=aDS.Shape(nV1); + myQueryShapes.Add(aV1); + } + // + nV2=aPBR.Pave2().Index(); + if (aDS.IsNewShape(nV2)) { + const TopoDS_Shape& aV2=aDS.Shape(nV2); + myQueryShapes.Add(aV2); + } + } + } +} +//======================================================================= +// function: IsSectionEdge +// purpose: +//======================================================================= + Standard_Boolean NMTAlgo_Builder::IsSectionEdge(const TopoDS_Edge& aE)const +{ + return myImagesEdges.HasImage(aE); +} +//======================================================================= +// function: IsSameDomainF +// purpose: +//======================================================================= + Standard_Boolean NMTAlgo_Builder::HasSameDomainF(const TopoDS_Face& aF1)const +{ + Standard_Boolean bFlag=Standard_False; + TopTools_ListIteratorOfListOfShape aItF1; + // + const TopTools_ListOfShape& aLF1=myImagesFaces.Image(aF1); + aItF1.Initialize(aLF1); + for (; aItF1.More(); aItF1.Next()) { + const TopoDS_Shape& aF1x=aItF1.Value(); + // + if (mySDFaces.Contains(aF1x)){ + return !bFlag; + } + } + return bFlag; +} +//======================================================================= +// function: IsSameDomainF +// purpose: +//======================================================================= + Standard_Boolean NMTAlgo_Builder::IsSameDomainF(const TopoDS_Face& aF1, + const TopoDS_Face& aF2)const +{ + Standard_Boolean bFlag=Standard_False; + TopTools_ListIteratorOfListOfShape aItF1, aItF2; + // + const TopTools_ListOfShape& aLF1=myImagesFaces.Image(aF1); + const TopTools_ListOfShape& aLF2=myImagesFaces.Image(aF2); + // + aItF1.Initialize(aLF1); + for (; aItF1.More(); aItF1.Next()) { + const TopoDS_Shape& aF1x=aItF1.Value(); + // + if (!mySDFaces.Contains(aF1x)){ + continue; + } + const TopoDS_Shape& aFSD1x=mySDFaces.FindFromKey(aF1x); + // + aItF2.Initialize(aLF2); + for (; aItF2.More(); aItF2.Next()) { + const TopoDS_Shape& aF2y=aItF2.Value(); + if (!mySDFaces.Contains(aF2y)){ + continue; + } + const TopoDS_Shape& aFSD2y=mySDFaces.FindFromKey(aF2y); + if (aFSD1x.IsSame(aFSD2y)) { + return !bFlag; + } + } + } + return bFlag; +} diff --git a/src/NMTAlgo/NMTAlgo_Builder.hxx b/src/NMTAlgo/NMTAlgo_Builder.hxx new file mode 100644 index 000000000..a39a1c505 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Builder.hxx @@ -0,0 +1,119 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTAlgo_Builder_HeaderFile +#define _NMTAlgo_Builder_HeaderFile + +#ifndef _BRepAlgo_Image_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedDataMapOfShapeShape_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Algo_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class NMTTools_DSFiller; +class TopoDS_Edge; +class TopoDS_Face; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTAlgo_Builder : public NMTAlgo_Algo { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTAlgo_Builder(); +Standard_EXPORT virtual ~NMTAlgo_Builder(); +Standard_EXPORT virtual void Clear() ; +Standard_EXPORT virtual void ComputeWithFiller(const NMTTools_DSFiller& aDSF) ; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT void FillImagesEdges() ; +Standard_EXPORT void FillIn2DParts() ; +Standard_EXPORT void FillImagesFaces() ; +Standard_EXPORT void FillSDFaces() ; +Standard_EXPORT void SplitVertices() ; +Standard_EXPORT Standard_Boolean IsSectionEdge(const TopoDS_Edge& E) const; +Standard_EXPORT Standard_Boolean HasSameDomainF(const TopoDS_Face& F) const; +Standard_EXPORT Standard_Boolean IsSameDomainF(const TopoDS_Face& F1,const TopoDS_Face& F2) const; + + + // Fields PROTECTED + // +BRepAlgo_Image myImagesEdges; +BRepAlgo_Image myImagesFaces; +TopTools_IndexedMapOfShape myQueryShapes; +TopTools_IndexedDataMapOfShapeListOfShape myIn2DParts; +TopTools_IndexedDataMapOfShapeListOfShape mySectionParts; +TopTools_IndexedDataMapOfShapeShape mySDFaces; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTAlgo/NMTAlgo_Builder.ixx b/src/NMTAlgo/NMTAlgo_Builder.ixx new file mode 100644 index 000000000..09480b40e --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Builder.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTAlgo/NMTAlgo_Builder.jxx b/src/NMTAlgo/NMTAlgo_Builder.jxx new file mode 100644 index 000000000..00dfa436e --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Builder.jxx @@ -0,0 +1,12 @@ +#ifndef _NMTTools_DSFiller_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Builder_HeaderFile +#include +#endif diff --git a/src/NMTAlgo/NMTAlgo_Loop3d.cdl b/src/NMTAlgo/NMTAlgo_Loop3d.cdl new file mode 100644 index 000000000..f029d889b --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Loop3d.cdl @@ -0,0 +1,66 @@ + +class Loop3d from NMTAlgo + + ---Purpose: Builds the shells from a set of faces. + -- Provides methods for comparing faces mutual + -- location. + +uses + Vec from gp, + MapOfOrientedShape from TopTools, + IndexedDataMapOfShapeListOfShape from TopTools, + Face from TopoDS, + Edge from TopoDS, + ListOfShape from TopTools, + Shape from TopoDS + +is + + Create + returns Loop3d from NMTAlgo ; + + AddConstFaces (me:out; + S : Shape from TopoDS) + ---Purpose: Add faces of as unique faces in the result. + is static; + + AddSectionFaces (me:out; + S : Shape from TopoDS) + ---Purpose: Add faces of as double faces in the result. + is static; + + MakeShells (me:out; + AvoidFacesMap : MapOfOrientedShape from TopTools) + returns ListOfShape from TopTools is static; + ---Purpose: Make and return shells. + -- can contain faces that must not be + -- added to result shells. + ---C++: return const & + + + ---Category: class methods + + IsInside (myclass; E : Edge from TopoDS; + F1, F2 : Face from TopoDS; + CountDot : Boolean from Standard; + Dot : in out Real from Standard; + GoodOri : in out Boolean from Standard) + returns Boolean from Standard; + ---Purpose: check if is inside by edge . + -- if , compute : scalar production of + -- normalized vectors pointing inside faces, and + -- check if faces are oriented well for sewing + + Normal (myclass; E : Edge from TopoDS; + F : Face from TopoDS) + returns Vec from gp; + + +fields + + myNewShells : ListOfShape from TopTools; -- result + + myFaces : ListOfShape from TopTools; + myEFMap : IndexedDataMapOfShapeListOfShape from TopTools; + +end Loop3d; diff --git a/src/NMTAlgo/NMTAlgo_Loop3d.cxx b/src/NMTAlgo/NMTAlgo_Loop3d.cxx new file mode 100644 index 000000000..9aceec61d --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Loop3d.cxx @@ -0,0 +1,330 @@ + +//using namespace std; + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static + TopoDS_Edge FindEinF(const TopoDS_Edge&, const TopoDS_Face&); +static + gp_Vec NextNormal(const TopoDS_Edge&, const TopoDS_Face&); + +//======================================================================= +//function : +//purpose : +//======================================================================= + NMTAlgo_Loop3d::NMTAlgo_Loop3d() +{ +} + +//======================================================================= +//function : AddConstFaces +//purpose : Add faces of as unique faces in the result. +//======================================================================= + void NMTAlgo_Loop3d::AddConstFaces(const TopoDS_Shape& S) +{ + TopExp_Explorer FaceExp(S, TopAbs_FACE); + for (; FaceExp.More(); FaceExp.Next()){ + myFaces.Append( FaceExp.Current() ); + } + TopExp::MapShapesAndAncestors(S, TopAbs_EDGE, TopAbs_FACE, myEFMap); +} + +//======================================================================= +//function : AddSectionFaces +//purpose : Add faces of as double faces in the result. +//======================================================================= + void NMTAlgo_Loop3d::AddSectionFaces(const TopoDS_Shape& S) +{ + AddConstFaces( S ); + AddConstFaces( S.Reversed() ); +} + +//======================================================================= +//function : MakeShells +//purpose : Make and return shells. +// can contain faces that must not be +// added to result shells. +//======================================================================= + const TopTools_ListOfShape& NMTAlgo_Loop3d::MakeShells + (const TopTools_MapOfOrientedShape& AvoidFacesMap) +{ + myNewShells.Clear(); + + BRep_Builder Builder; + TopTools_MapOfShape CheckedEdgesMap; + TopTools_MapOfOrientedShape AddedFacesMap; + + TopTools_ListIteratorOfListOfShape itF (myFaces); + for (; itF.More(); itF.Next()) { + const TopoDS_Shape& FF = itF.Value(); + if (AvoidFacesMap.Contains( FF ) || + ! AddedFacesMap.Add( FF ) ) + continue; + + // make a new shell + TopoDS_Shell Shell; + Builder.MakeShell(Shell); + Builder.Add(Shell,FF); + + // clear the maps from shapes added to previous Shell + TopTools_MapIteratorOfMapOfShape itEM (CheckedEdgesMap); + for (; itEM.More(); itEM.Next()) { + TopTools_ListOfShape& FL = myEFMap.ChangeFromKey( itEM.Key()); + TopTools_ListIteratorOfListOfShape it (FL); + while ( it.More()) { + if (AddedFacesMap.Contains( it.Value())) + FL.Remove( it ); + else + it.Next(); + } + } + CheckedEdgesMap.Clear(); + + + // loop on faces added to Shell; add their neighbor faces to Shell and so on + TopoDS_Iterator itAddedF (Shell); + for (; itAddedF.More(); itAddedF.Next()){ + const TopoDS_Face& F = TopoDS::Face (itAddedF.Value()); + + // loop on edges of F; find a good neighbor face of F by E + TopExp_Explorer EdgeExp(F, TopAbs_EDGE); + for (; EdgeExp.More(); EdgeExp.Next()){ + const TopoDS_Edge& E = TopoDS::Edge( EdgeExp.Current()); + if (! CheckedEdgesMap.Add( E )) + continue; + + // candidate faces list + const TopTools_ListOfShape& FL = myEFMap.ChangeFromKey(E); + if (FL.IsEmpty()) + continue; + // select one of neighbors + TopoDS_Face SelF; + if (FL.Extent() == 2) { + if (! F.IsSame( FL.First() )) + SelF = TopoDS::Face( FL.First() ); + else if (!F.IsSame( FL.Last() )) + SelF = TopoDS::Face( FL.Last() ); + } + else { + // check if a face already added to Shell shares E + TopTools_ListIteratorOfListOfShape it (FL); + Standard_Boolean found = Standard_False; + for (; !found && it.More(); it.Next()) + if (F != it.Value()) + found = AddedFacesMap.Contains( it.Value() ); + if (found) + continue; + // select basing on geometrical check + Standard_Boolean GoodOri, inside; + Standard_Real dot, MaxDot = -100; + TopTools_ListOfShape TangFL; // tangent faces + for ( it.Initialize( FL ) ; it.More(); it.Next()) { + const TopoDS_Face& NeighborF = TopoDS::Face( it.Value()); + if (NeighborF.IsSame( F )) + continue; + inside = NMTAlgo_Loop3d::IsInside( E, F, NeighborF, 1, dot, GoodOri); + if (!GoodOri) + continue; + if (!inside) + dot = -dot - 3; + if (dot < MaxDot) + continue; + if ( IsEqual( dot, MaxDot)) + TangFL.Append(SelF); + else + TangFL.Clear(); + MaxDot = dot; + SelF = NeighborF; + } + if (!TangFL.IsEmpty()) { + for (it.Initialize( TangFL ); it.More(); it.Next()) { + const TopoDS_Face& NeighborF = TopoDS::Face( it.Value()); + if (NMTAlgo_Loop3d:: IsInside( E, SelF , NeighborF, 0, dot, GoodOri)) + SelF = NeighborF; + } + } + } + if (!SelF.IsNull() && + AddedFacesMap.Add( SelF ) && + !AvoidFacesMap.Contains( SelF )) + Builder.Add( Shell, SelF); + + } // loop on edges of F + + } // loop on the faces added to Shell + + // Shell is complete + myNewShells.Append( Shell ); + + } // loop on myFaces + + + // prepare to the next call + myFaces.Clear(); + myEFMap.Clear(); + + return myNewShells; +} +//======================================================================= +//function : Normal +//purpose : +//======================================================================= + gp_Vec NMTAlgo_Loop3d::Normal(const TopoDS_Edge& E, + const TopoDS_Face& F) +{ + gp_Vec Norm, V1, V2; + Standard_Real First, Last; + gp_Pnt Ps; + + Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface (E, F, First, Last); + Handle(Geom_Surface) Sf = BRep_Tool::Surface(F); + + gp_Pnt2d p = C2d->Value( 0.5*(First+Last) ); + Sf->D1(p.X(), p.Y(), Ps, V1, V2); + Norm = V1.Crossed(V2); + + if (F.Orientation() == TopAbs_REVERSED ) + Norm.Reverse(); + + return Norm; +} +//======================================================================= +//function : IsInside +//purpose : check if is inside by edge . +// if , compute : scalar production of +// normalized vectors pointing inside faces, and +// check if faces are oriented well for sewing +//======================================================================= + Standard_Boolean NMTAlgo_Loop3d::IsInside(const TopoDS_Edge& E, + const TopoDS_Face& F1, + const TopoDS_Face& F2, + const Standard_Boolean CountDot, + Standard_Real& Dot, + Standard_Boolean& GoodOri) +{ + Standard_Real f, l; + gp_Pnt P; + gp_Vec Vc1, Vc2, Vin1, Vin2, Nf1, Nf2; + Handle(Geom_Curve) Curve = BRep_Tool::Curve(E,f,l); + Curve->D1( 0.5*(f + l), P, Vc2); + TopoDS_Edge E1, E2 = FindEinF (E, F2); + if (E2.Orientation() == TopAbs_REVERSED ) Vc2.Reverse(); + + Nf1 = Normal(E,F1); + Nf2 = Normal(E,F2); + + Standard_Real sin = + Nf1.CrossSquareMagnitude(Nf2) / Nf1.SquareMagnitude() / Nf2.SquareMagnitude(); + Standard_Boolean tangent = sin < 0.001; + + Standard_Boolean inside = 0; + if (tangent) { + E1 = FindEinF (E, F1); + gp_Vec NNf1 = NextNormal(E1,F1); + gp_Vec NNf2 = NextNormal(E2,F2); + Vin2 = NNf2.Crossed(Vc2); + inside = Vin2 * NNf1 < 0; + } + else { + Vin2 = Nf2.Crossed(Vc2); + inside = Vin2 * Nf1 < 0; + } + + if (!CountDot) return inside; + + if (tangent) + Vin2 = Nf2.Crossed(Vc2); + else + E1 = FindEinF (E, F1); + + Vc1 = Vc2; + if (E1.Orientation() != E2.Orientation()) + Vc1.Reverse(); + Vin1 = Nf1.Crossed(Vc1); + + if (tangent) { + Standard_Real N1N2 = Nf1 * Nf2; + GoodOri = (Vin2 * Vin1 < 0) ? N1N2 > 0 : N1N2 < 0; + } + else { + Standard_Real V1N2 = Vin1 * Nf2; + GoodOri = ( inside ? V1N2 <= 0 : V1N2 >= 0); + } + + Vin1.Normalize(); + Vin2.Normalize(); + + Dot = Vin2 * Vin1; + + return inside; +} +//======================================================================= +//function : NextNormal +//purpose : find normal to F at point a little inside F near the middle of E +//warning : E must be properly oriented in F. +//======================================================================= +gp_Vec NextNormal(const TopoDS_Edge& E, + const TopoDS_Face& F) +{ + Standard_Real First, Last; + + Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface (E, F, First, Last); + Handle(Geom_Surface) Sf = BRep_Tool::Surface(F); + + gp_Pnt2d p; + gp_Vec2d v; + C2d->D1( 0.5*(First+Last), p, v); + if (E.Orientation() != F.Orientation()) + v.Reverse(); + gp_Dir2d dir( -v.Y(), v.X() ); // dir inside F + + Standard_Real duv = 1e-6; // this is not Ok and may give incorrect result if + // resolutionUV of compared faces is very different. To have a good result, + //it is necessary to get normal to faces at points equidistant from E in 3D + + p.SetX( p.X() + dir.X()*duv ); + p.SetY( p.Y() + dir.Y()*duv ); + + gp_Pnt Ps; + gp_Vec Norm, V1, V2, VV1, VV2; + Sf->D1( p.X(), p.Y(), Ps, V1, V2); + Norm = V1.Crossed(V2); + + if (F.Orientation() == TopAbs_REVERSED ) + Norm.Reverse(); + + return Norm; +} +//======================================================================= +//function : FindEinF +//purpose : find E in F +//======================================================================= +TopoDS_Edge FindEinF(const TopoDS_Edge& E, + const TopoDS_Face& F) +{ + TopExp_Explorer expl (F, TopAbs_EDGE); + for (; expl.More(); expl.Next()) + if( E.IsSame( expl.Current() )) + return TopoDS::Edge(expl.Current()); + TopoDS_Edge nullE; + return nullE; +} diff --git a/src/NMTAlgo/NMTAlgo_Loop3d.hxx b/src/NMTAlgo/NMTAlgo_Loop3d.hxx new file mode 100644 index 000000000..707b3aec4 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Loop3d.hxx @@ -0,0 +1,107 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTAlgo_Loop3d_HeaderFile +#define _NMTAlgo_Loop3d_HeaderFile + +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _Standard_Real_HeaderFile +#include +#endif +class TopoDS_Shape; +class TopTools_ListOfShape; +class TopTools_MapOfOrientedShape; +class TopoDS_Edge; +class TopoDS_Face; +class gp_Vec; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTAlgo_Loop3d { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTAlgo_Loop3d(); +Standard_EXPORT void AddConstFaces(const TopoDS_Shape& S) ; +Standard_EXPORT void AddSectionFaces(const TopoDS_Shape& S) ; +Standard_EXPORT const TopTools_ListOfShape& MakeShells(const TopTools_MapOfOrientedShape& AvoidFacesMap) ; +Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Edge& E,const TopoDS_Face& F1,const TopoDS_Face& F2,const Standard_Boolean CountDot,Standard_Real& Dot,Standard_Boolean& GoodOri) ; +Standard_EXPORT static gp_Vec Normal(const TopoDS_Edge& E,const TopoDS_Face& F) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +TopTools_ListOfShape myNewShells; +TopTools_ListOfShape myFaces; +TopTools_IndexedDataMapOfShapeListOfShape myEFMap; + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTAlgo/NMTAlgo_Loop3d.ixx b/src/NMTAlgo/NMTAlgo_Loop3d.ixx new file mode 100644 index 000000000..e546fd196 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Loop3d.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTAlgo/NMTAlgo_Loop3d.jxx b/src/NMTAlgo/NMTAlgo_Loop3d.jxx new file mode 100644 index 000000000..f63b0450a --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Loop3d.jxx @@ -0,0 +1,21 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_MapOfOrientedShape_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _gp_Vec_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Loop3d_HeaderFile +#include +#endif diff --git a/src/NMTAlgo/NMTAlgo_Splitter.cdl b/src/NMTAlgo/NMTAlgo_Splitter.cdl new file mode 100644 index 000000000..761c051f3 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter.cdl @@ -0,0 +1,170 @@ +-- File: NMTAlgo_Splitter.cdl +-- Created: Tue Jan 27 15:09:45 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +class Splitter from NMTAlgo + inherits Builder from NMTAlgo + + ---Purpose: + +uses + Builder from BRep, + ShapeEnum from TopAbs, + Compound from TopoDS, + Face from TopoDS, + Edge from TopoDS, + Shape from TopoDS, + MapOfOrientedShape from TopTools, + IndexedMapOfShape from TopTools, + DataMapOfShapeShape from TopTools, + ListOfShape from TopTools, + MapOfShape from TopTools, + AsDes from BRepAlgo, + Image from BRepAlgo, + + DSFiller from NMTTools + +--raises + +is + Create + returns Splitter from NMTAlgo; + ---C++: alias "Standard_EXPORT virtual ~NMTAlgo_Splitter();" + + AddShape (me:out; + S : Shape from TopoDS) + is virtual; + + AddTool (me:out; + S : Shape from TopoDS) + is virtual; + + Compute(me:out) + is virtual; + + Build (me:out; + aLimit:ShapeEnum from TopAbs=TopAbs_SHAPE) + is virtual; + + ComputeWithFiller(me:out; + aDSF: DSFiller from NMTTools) + is redefined; + +----vv + KeepShapesInside (me:out; + S : Shape from TopoDS); + ---Purpose: remove shapes that are outside of S from result. + -- S should be an object shape. + ---Warning: call it after Build() + + RemoveShapesInside (me:out; + S : Shape from TopoDS); + ---Purpose: remove shapes that are inside S from result. + -- S should be an object shape. + ---Warning: call it after Build() + + Modified(me:out; + S : Shape from TopoDS) + returns ListOfShape from TopTools; + ---Purpose: Returns the list of shapes modified from the shape . + ---C++: return const & + ---Level: Public + + Generated(me:out; + S : Shape from TopoDS) + returns ListOfShape from TopTools; + ---Purpose: Returns the list of shapes generated from the shape . + ---C++: return const & + ---Level: Public + + IsDeleted (me:out; + S : Shape from TopoDS) + returns Boolean from Standard; +----^^ + + Clear (me:out) + is redefined; + + SourceShapes(me) + returns ListOfShape from TopTools; + ---C++: return const & + + FillResult(me:out) + is protected; + + FillImageShape(me:out) + is protected; + + SplittedFaces (me:out) + is protected; + + SplittedWires (me:out) + is protected; + + SplitsAndSections (me:out) + is protected; + + ShellsAndSolids(me:out) + is protected; + + MakeShells(me:out; + aS :Shape from TopoDS; + aLNS:out ListOfShape from TopTools) + is protected; + + MakeSolids (me:out; + Solid : Shape from TopoDS; + Shells: out ListOfShape from TopTools) + is protected; + + FindFacesInside (me:out; + S : Shape from TopoDS; + CheckClosed : Boolean from Standard= Standard_False; + All : Boolean from Standard= Standard_False) + returns Shape from TopoDS + is protected; + + IsInside (myclass; + S1,S2 : Shape from TopoDS) + returns Boolean from Standard is protected; + ---Purpose: Return True if the first vertex of S1 inside S2. + -- If S1.IsNull(), check infinite point against S2. + + GetOriginalShape(me; + aShape : Shape from TopoDS) + returns Shape from TopoDS + is protected; + +fields + myDoneStep : ShapeEnum from TopAbs is protected; -- rebuilt level + myBuilder : Builder from BRep is protected; + + myListShapes : ListOfShape from TopTools is protected; -- object shapes + myMapFaces : MapOfShape from TopTools is protected; -- object faces + myMapTools : MapOfShape from TopTools is protected; -- tool faces + myEqualEdges : MapOfShape from TopTools is protected; -- equal splits + myNewSection : MapOfShape from TopTools is protected; -- new secton edges + myClosedShapes : MapOfShape from TopTools is protected; + myWrappingSolid: MapOfShape from TopTools is protected; -- solids having other shapes inside + myFaceShapeMap : DataMapOfShapeShape from TopTools is protected; -- to find a shape by face + + myInternalFaces: DataMapOfShapeShape from TopTools is protected; -- shape and its internal faces + myIntNotClFaces: DataMapOfShapeShape from TopTools is protected; -- internal but not closed + + myImageShape : Image from BRepAlgo is protected; + + -- avoid rebuilding twice commont part of solids + myAddedFacesMap: MapOfOrientedShape from TopTools is protected; + --***-- + mySourceShapes : ListOfShape from TopTools is protected; + myLimit : ShapeEnum from TopAbs is protected; + myToolShapes : MapOfShape from TopTools is protected; + myObjShapes : MapOfShape from TopTools is protected; + myMapSIFC : DataMapOfShapeShape from TopTools is protected; +----vv + myGenerated : ListOfShape from TopTools is protected; +----^^ +end Splitter; diff --git a/src/NMTAlgo/NMTAlgo_Splitter.cxx b/src/NMTAlgo/NMTAlgo_Splitter.cxx new file mode 100644 index 000000000..83b82b84d --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter.cxx @@ -0,0 +1,573 @@ +// File: NMTAlgo_Splitter.cxx +// Created: Thu Jan 29 17:13:03 2004 +// Author: Peter KURNEV +// + + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +// +#include +#include +#include +#include + + +static + Standard_Boolean isClosed(const TopoDS_Shape& theShape); + +//======================================================================= +//function : NMTAlgo_Spliter::NMTAlgo_Splitter +//purpose : +//======================================================================= + NMTAlgo_Splitter::NMTAlgo_Splitter() +: + NMTAlgo_Builder() +{ + myErrorStatus=0; +} +//======================================================================= +// function: ~NMTAlgo_Splitter +// purpose: +//======================================================================= + NMTAlgo_Splitter::~NMTAlgo_Splitter() +{ + Clear(); + + if (myDSFiller){ + delete myDSFiller; + } +} +//======================================================================= +// function: SourceShapes +// purpose: +//======================================================================= + const TopTools_ListOfShape& NMTAlgo_Splitter::SourceShapes()const +{ + return mySourceShapes; +} +//======================================================================= +//function : Clear +//purpose : +//======================================================================= + void NMTAlgo_Splitter::Clear() +{ + NMTAlgo_Builder::Clear(); + // + myListShapes.Clear(); + myMapFaces.Clear(); + myMapTools.Clear(); + myClosedShapes.Clear(); + myEqualEdges.Clear(); + myNewSection.Clear(); + myWrappingSolid.Clear(); + myFaceShapeMap.Clear(); + myInternalFaces.Clear(); + myIntNotClFaces.Clear(); + // + myImageShape.Clear(); + myAddedFacesMap.Clear(); + // + myDoneStep = TopAbs_SHAPE; + myIsComputed=Standard_False; + mySourceShapes.Clear(); + myObjShapes.Clear(); + myToolShapes.Clear(); + myMapSIFC.Clear(); + myErrorStatus=0; +} +//======================================================================= +//function : AddShape +//purpose : add object Shape to be splited +//======================================================================= + void NMTAlgo_Splitter::AddShape(const TopoDS_Shape& aS) +{ + myErrorStatus=0; + if (myIsComputed) { + // DS is already computed + myErrorStatus=100; + return; + } + // + if (aS.IsNull()){ + // Null shape is not allowed here + myErrorStatus=101; + return; + } + // + TopAbs_ShapeEnum aType=aS.ShapeType(); + // + if (aType < TopAbs_SOLID) { + // compound or compsolid + TopoDS_Iterator it (aS); + for (; it.More(); it.Next()) { + const TopoDS_Shape& aSS=it.Value(); + AddShape(aSS); + // to know compound by shape + myFaceShapeMap.Bind(aSS, aS); + } + return; + } + //--- + myObjShapes.Add(aS); + mySourceShapes.Append(aS); + //--- + // + TopExp_Explorer exp(aS, TopAbs_FACE); + if (!exp.More()) { + // do not split edges and vertices + return; + } + // not to add twice the same S + Standard_Integer nbFacesBefore = myMapFaces.Extent(); + // + for (; exp.More(); exp.Next()) { + const TopoDS_Shape& aFace = exp.Current(); + if (!myFaceShapeMap.IsBound(aFace)) { + // keep shape of tool face added as object + myFaceShapeMap.Bind(aFace, aS); + } + if (myMapFaces.Add(aFace)){ + myImagesFaces.SetRoot(aFace); + } + } + // + if (nbFacesBefore == myMapFaces.Extent()){ + return; + } + // solids must be processed before all + if (aType==TopAbs_SOLID){ + myListShapes.Prepend(aS); + } + else{ + myListShapes.Append(aS); + } + if (isClosed(aS)){ + myClosedShapes.Add(aS); + } +} +//======================================================================= +//function : AddTool +//purpose : add cutting tool that will _NOT_ be in result +//======================================================================= + void NMTAlgo_Splitter::AddTool(const TopoDS_Shape& aS) +{ + myErrorStatus=0; + if (myIsComputed) { + // DS is already computed + myErrorStatus=100; + return; + } + // + if (aS.IsNull()){ + // Null shape is not allowed here + myErrorStatus=101; + return; + } + // + TopAbs_ShapeEnum aType=aS.ShapeType(); + + if (aType < TopAbs_SOLID) { // compound or compsolid + TopoDS_Iterator it (aS); + for (; it.More(); it.Next()) { + const TopoDS_Shape& aSS=it.Value(); + AddTool(aSS); + myFaceShapeMap.Bind(aSS, aS); // to know compound by shape + } + return; + } + //--- + myToolShapes.Add(aS); + mySourceShapes.Append(aS); + //--- + // + TopExp_Explorer exp(aS, TopAbs_FACE); + for (; exp.More(); exp.Next()) { + const TopoDS_Shape& aFace = exp.Current(); + myMapTools.Add(aFace); + myFaceShapeMap.Bind(aFace, aS); + } + // + // solids must be processed before all + if (aType==TopAbs_SOLID){ + myListShapes.Prepend(aS); + } + else{ + myListShapes.Append(aS); + } + // + if (isClosed(aS)) { + myClosedShapes.Add(aS); + } +} +//======================================================================= +// function: Compute +// purpose: +//======================================================================= + void NMTAlgo_Splitter::Compute() +{ + if (!mySourceShapes.Extent()){ + // No source shapes to treat + myErrorStatus=103; + return; + } + // + BRep_Builder aBB; + TopoDS_Compound aCS; + TopTools_ListIteratorOfListOfShape aIt; + // + aBB.MakeCompound(aCS); + // + aIt.Initialize(mySourceShapes); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aS=aIt.Value(); + aBB.Add(aCS, aS); + } + // + NMTTools_DSFiller* pDSF=new NMTTools_DSFiller; + // + pDSF->SetCompositeShape(aCS); + pDSF->Perform(); + // + myIsComputed=Standard_False; + // + NMTAlgo_Splitter::ComputeWithFiller(*pDSF); +} +//======================================================================= +// function: ComputeWithFiller +// purpose: +//======================================================================= + void NMTAlgo_Splitter::ComputeWithFiller(const NMTTools_DSFiller& aDSF) +{ + myErrorStatus=0; + // + if (myIsComputed) { + // DS is already computed + myErrorStatus=100; + return; + } + // + if (!mySourceShapes.Extent()){ + // No source shapes to treat + myErrorStatus=103; + return; + } + // + NMTAlgo_Builder::ComputeWithFiller(aDSF); + // + myIsComputed=Standard_True; +} +//======================================================================= +//function : Build +//purpose : +//======================================================================= + void NMTAlgo_Splitter::Build(const TopAbs_ShapeEnum aLimit) +{ + myErrorStatus=0; + myLimit=aLimit; + // + if (!myIsComputed){ + myErrorStatus=102;// DS is not computed + return; + } + // + TopoDS_Compound aCShape; + // + myBuilder.MakeCompound(aCShape); + myShape=aCShape; + // + // 1. VERTEX + // + if (myLimit==TopAbs_VERTEX) { + SplitVertices(); + FillResult(); + return; + } + // + // 2. EDGE + if (myLimit==TopAbs_EDGE) { + SplitsAndSections(); + FillResult(); + return; + } + // + // 3. WIRE + FillImageShape(); + // + if (myLimit==TopAbs_WIRE) { + SplittedWires(); + FillResult(); + return; + } + // + // 4. FACE + // + if (myLimit==TopAbs_FACE) { + SplittedFaces(); + FillResult(); + return; + } + // + // 5.6. SHELL / SOLID + ShellsAndSolids(); + BOP_CorrectTolerances::CorrectTolerances(myShape, 0.01); +} +//======================================================================= +// function: SplitsAndSections +// purpose: +//======================================================================= + void NMTAlgo_Splitter::SplitsAndSections() +{ + Standard_Integer i, aNbE, aNbF; + TopTools_ListIteratorOfListOfShape aItLS, aIt; + TopTools_IndexedMapOfShape aME, aMF; + // + myQueryShapes.Clear(); + // + // 1. Splits / no splits + aItLS.Initialize(myListShapes); + for ( ;aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aS=aItLS.Value(); + // + if (myToolShapes.Contains(aS)) { + continue; // skip tool Shapes + } + // + TopExp::MapShapes(aS, TopAbs_EDGE, aME); + TopExp::MapShapes(aS, TopAbs_FACE, aMF); + } + // + // 1. Splits / no splits + aNbE=aME.Extent(); + for (i=1; i<=aNbE; ++i) { + const TopoDS_Shape& aE=aME(i); + // + if (!myImagesEdges.HasImage(aE)) { + myQueryShapes.Add(aE); + } + else { + const TopTools_ListOfShape& aLSp=myImagesEdges.Image(aE); + // + aIt.Initialize(aLSp); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSp=aIt.Value(); + myQueryShapes.Add(aSp); + } + } + } + // + // 2. Sections + aNbF=aMF.Extent(); + for (i=1; i<=aNbF; ++i) { + const TopoDS_Shape& aF=aMF(i); + if (mySectionParts.Contains(aF)) { + const TopTools_ListOfShape& aLSc=mySectionParts.FindFromKey(aF); + aIt.Initialize(aLSc); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSc=aIt.Value(); + myQueryShapes.Add(aSc); + } + } + } +} +//======================================================================= +// function: SplittedWires +// purpose: +//======================================================================= + void NMTAlgo_Splitter::SplittedWires() +{ + Standard_Integer i, aNbF; + TopoDS_Iterator aIt; + TopTools_IndexedMapOfShape aMF; + // + SplittedFaces(); + // + aMF=myQueryShapes; + myQueryShapes.Clear(); + // + aNbF=aMF.Extent(); + for (i=1; i<=aNbF; ++i) { + const TopoDS_Shape& aF=aMF(i); + aIt.Initialize(aF); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aW=aIt.Value(); + myQueryShapes.Add(aW); + } + } +} +//======================================================================= +// function: SplittedFaces +// purpose: +//======================================================================= + void NMTAlgo_Splitter::SplittedFaces() +{ + TopTools_ListIteratorOfListOfShape aIt; + TopoDS_Iterator aItF; + // + myQueryShapes.Clear(); + // + aIt.Initialize(myListShapes); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aS=aIt.Value(); + // + if (myToolShapes.Contains(aS)) { + continue; + } + // + const TopoDS_Shape& aFC = myImageShape.Image(aS).First(); + aItF.Initialize(aFC); + for (; aItF.More(); aItF.Next()) { + const TopoDS_Shape& aF=aItF.Value(); + myQueryShapes.Add(aF); + } + } +} +//======================================================================= +//function : FillImageShape +//purpose : +//======================================================================= + void NMTAlgo_Splitter::FillImageShape() +{ + Standard_Integer i, aNbF, iSense; + TopTools_ListIteratorOfListOfShape aItS, aItFI; + TopExp_Explorer aExp; + TopAbs_Orientation aOriFS; + TopoDS_Face aFIx; + BRep_Builder aBB; + // + myImageShape.Clear(); + // + aItS.Initialize(myListShapes); + for ( ;aItS.More(); aItS.Next()) { + const TopoDS_Shape& aS=aItS.Value(); + // + myQueryShapes.Clear(); + // + aExp.Init(aS, TopAbs_FACE); + for (; aExp.More(); aExp.Next()) { + const TopoDS_Face& aFS=TopoDS::Face(aExp.Current()); + aOriFS= aFS.Orientation(); + // + if (!myImagesFaces.HasImage(aFS)) { + myQueryShapes.Add(aFS); + continue; + } + // + const TopTools_ListOfShape& aLFI=myImagesFaces.Image(aFS); + aItFI.Initialize(aLFI); + for (; aItFI.More(); aItFI.Next()) { + const TopoDS_Face& aFI=TopoDS::Face(aItFI.Value()); + aFIx=aFI; + aFIx.Orientation(aOriFS); + // + if (mySDFaces.Contains(aFIx)) { + const TopoDS_Face& aFSDI=TopoDS::Face(mySDFaces.FindFromKey(aFIx)); + TopoDS_Face aFSDIx=aFSDI; + // + iSense=NMTAlgo_Tools::Sense(aFIx, aFSDIx); + // + if (iSense < 0) { + aFSDIx.Reverse(); + } + myQueryShapes.Add(aFSDIx); + } + else { + myQueryShapes.Add(aFIx); + } + } + }//for (; aExp.More(); aExp.Next()) { + // + TopoDS_Compound aCompound; + // + aBB.MakeCompound(aCompound); + // + aNbF=myQueryShapes.Extent(); + for (i=1; i<=aNbF; ++i) { + const TopoDS_Shape& aF=myQueryShapes(i); + aBB.Add(aCompound, aF); + } + // + myImageShape.Bind(aS, aCompound); + }// for ( ;aItS.More(); aItS.Next()) + // + myQueryShapes.Clear(); +} +//======================================================================= +//function : FillResult +//purpose : +//======================================================================= + void NMTAlgo_Splitter::FillResult() +{ + Standard_Integer i, aNb; + // + aNb=myQueryShapes.Extent(); + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aS=myQueryShapes(i); + myBuilder.Add (myShape, aS); + } + BOP_CorrectTolerances::CorrectTolerances(myShape, 0.01); +} +//======================================================================= +//function : isClosed +//purpose : check id a shape is closed, ie is a solid or a closed shell +//======================================================================= + Standard_Boolean isClosed(const TopoDS_Shape& theShape) +{ + Standard_Boolean isClosed = (theShape.ShapeType() == TopAbs_SOLID); + // + if (!isClosed && theShape.ShapeType() == TopAbs_SHELL) { + TopTools_IndexedDataMapOfShapeListOfShape MEF; + TopExp::MapShapesAndAncestors(theShape, TopAbs_EDGE, TopAbs_FACE, MEF); + for (Standard_Integer i=1; isClosed && i<=MEF.Extent(); ++i) + isClosed = ( MEF(i).Extent() != 1 ); + } + // + return isClosed; +} +// +// myErrorStatus +// +// 100 - DS is already computed +// 101 - Null shape is not allowed here +// 102 - DS is not computed +// 103 - No source shapes to treat diff --git a/src/NMTAlgo/NMTAlgo_Splitter.hxx b/src/NMTAlgo/NMTAlgo_Splitter.hxx new file mode 100644 index 000000000..0609ad516 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter.hxx @@ -0,0 +1,155 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTAlgo_Splitter_HeaderFile +#define _NMTAlgo_Splitter_HeaderFile + +#ifndef _TopAbs_ShapeEnum_HeaderFile +#include +#endif +#ifndef _BRep_Builder_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_MapOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_DataMapOfShapeShape_HeaderFile +#include +#endif +#ifndef _BRepAlgo_Image_HeaderFile +#include +#endif +#ifndef _TopTools_MapOfOrientedShape_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Builder_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class TopoDS_Shape; +class NMTTools_DSFiller; +class TopTools_ListOfShape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTAlgo_Splitter : public NMTAlgo_Builder { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTAlgo_Splitter(); +Standard_EXPORT virtual ~NMTAlgo_Splitter(); +Standard_EXPORT virtual void AddShape(const TopoDS_Shape& S) ; +Standard_EXPORT virtual void AddTool(const TopoDS_Shape& S) ; +Standard_EXPORT virtual void Compute() ; +Standard_EXPORT virtual void Build(const TopAbs_ShapeEnum aLimit = TopAbs_SHAPE) ; +Standard_EXPORT virtual void ComputeWithFiller(const NMTTools_DSFiller& aDSF) ; +Standard_EXPORT void KeepShapesInside(const TopoDS_Shape& S) ; +Standard_EXPORT void RemoveShapesInside(const TopoDS_Shape& S) ; +Standard_EXPORT const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ; +Standard_EXPORT const TopTools_ListOfShape& Generated(const TopoDS_Shape& S) ; +Standard_EXPORT Standard_Boolean IsDeleted(const TopoDS_Shape& S) ; +Standard_EXPORT virtual void Clear() ; +Standard_EXPORT const TopTools_ListOfShape& SourceShapes() const; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT void FillResult() ; +Standard_EXPORT void FillImageShape() ; +Standard_EXPORT void SplittedFaces() ; +Standard_EXPORT void SplittedWires() ; +Standard_EXPORT void SplitsAndSections() ; +Standard_EXPORT void ShellsAndSolids() ; +Standard_EXPORT void MakeShells(const TopoDS_Shape& aS,TopTools_ListOfShape& aLNS) ; +Standard_EXPORT void MakeSolids(const TopoDS_Shape& Solid,TopTools_ListOfShape& Shells) ; +Standard_EXPORT TopoDS_Shape FindFacesInside(const TopoDS_Shape& S,const Standard_Boolean CheckClosed = Standard_False,const Standard_Boolean All = Standard_False) ; +Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Shape& S1,const TopoDS_Shape& S2) ; +Standard_EXPORT TopoDS_Shape GetOriginalShape(const TopoDS_Shape& aShape) const; + + + // Fields PROTECTED + // +TopAbs_ShapeEnum myDoneStep; +BRep_Builder myBuilder; +TopTools_ListOfShape myListShapes; +TopTools_MapOfShape myMapFaces; +TopTools_MapOfShape myMapTools; +TopTools_MapOfShape myEqualEdges; +TopTools_MapOfShape myNewSection; +TopTools_MapOfShape myClosedShapes; +TopTools_MapOfShape myWrappingSolid; +TopTools_DataMapOfShapeShape myFaceShapeMap; +TopTools_DataMapOfShapeShape myInternalFaces; +TopTools_DataMapOfShapeShape myIntNotClFaces; +BRepAlgo_Image myImageShape; +TopTools_MapOfOrientedShape myAddedFacesMap; +TopTools_ListOfShape mySourceShapes; +TopAbs_ShapeEnum myLimit; +TopTools_MapOfShape myToolShapes; +TopTools_MapOfShape myObjShapes; +TopTools_DataMapOfShapeShape myMapSIFC; +TopTools_ListOfShape myGenerated; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTAlgo/NMTAlgo_Splitter.ixx b/src/NMTAlgo/NMTAlgo_Splitter.ixx new file mode 100644 index 000000000..fdec89e46 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTAlgo/NMTAlgo_Splitter.jxx b/src/NMTAlgo/NMTAlgo_Splitter.jxx new file mode 100644 index 000000000..e27984c18 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter.jxx @@ -0,0 +1,12 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTTools_DSFiller_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Splitter_HeaderFile +#include +#endif diff --git a/src/NMTAlgo/NMTAlgo_Splitter1.cdl b/src/NMTAlgo/NMTAlgo_Splitter1.cdl new file mode 100644 index 000000000..eafb3127c --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter1.cdl @@ -0,0 +1,73 @@ +-- File: NMTAlgo_Splitter1.cdl +-- Created: Wed Feb 11 14:23:25 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +class Splitter1 from NMTAlgo + inherits Splitter from NMTAlgo + + ---Purpose: + +uses + ShapeEnum from TopAbs, + Shape from TopoDS, + DataMapOfShapeInteger from TopTools + +--raises + +is + Create + returns Splitter1 from NMTAlgo; + ---C++: alias "Standard_EXPORT virtual ~NMTAlgo_Splitter1();" + + Clear (me:out) + is redefined; + + AddShape (me:out; + aS : Shape from TopoDS) + is redefined; + + + AddTool(me:out; + aS : Shape from TopoDS) + is redefined; + + + SetMaterial (me:out; + aS : Shape from TopoDS; + aM : Integer from Standard=0); + + SetRemoveWebs(me:out; + bFlag:Boolean from Standard); + + RemoveWebs(me) + returns Boolean from Standard; + + GetMaterialTable(me) + returns DataMapOfShapeInteger from TopTools; + ---C++: return const & + + Build (me:out; + Limit:ShapeEnum from TopAbs=TopAbs_SHAPE) + is redefined; + + -- protected block + TreatSolids (me:out) + is protected; + + TreatWebs (me:out) + is protected; + + RestParts (me:out) + is protected; + + +fields + myRemoveWebs : Boolean from Standard is protected; + myMapSWM : DataMapOfShapeInteger from TopTools is protected; + myMapSWMOut : DataMapOfShapeInteger from TopTools is protected; + myRestParts : Shape from TopoDS is protected; + +end Splitter1; diff --git a/src/NMTAlgo/NMTAlgo_Splitter1.cxx b/src/NMTAlgo/NMTAlgo_Splitter1.cxx new file mode 100644 index 000000000..260ac90ec --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter1.cxx @@ -0,0 +1,348 @@ +// File: NMTAlgo_Splitter1.cxx +// Created: Wed Feb 11 14:26:27 2004 +// Author: Peter KURNEV +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : NMTAlgo_Spliter1::NMTAlgo_Splitter1 +//purpose : +//======================================================================= + NMTAlgo_Splitter1::NMTAlgo_Splitter1() +: + NMTAlgo_Splitter() +{ + myRemoveWebs=Standard_False; +} +//======================================================================= +// function: ~NMTAlgo_Splitter1 +// purpose: +//======================================================================= + NMTAlgo_Splitter1::~NMTAlgo_Splitter1() +{ + Clear(); +} +//======================================================================= +//function : Clear +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::Clear() +{ + NMTAlgo_Splitter::Clear(); + // + myRemoveWebs=Standard_False; + myMapSWM.Clear(); + myMapSWMOut.Clear(); +} +//======================================================================= +//function : SetRemoveWebs +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::SetRemoveWebs(const Standard_Boolean bFlag) +{ + myRemoveWebs=bFlag; +} +//======================================================================= +//function : RemoveWebs +//purpose : +//======================================================================= + Standard_Boolean NMTAlgo_Splitter1::RemoveWebs()const +{ + return myRemoveWebs; +} +//======================================================================= +//function : GetMaterialTable +//purpose : +//======================================================================= + const TopTools_DataMapOfShapeInteger& NMTAlgo_Splitter1::GetMaterialTable()const +{ + return myMapSWMOut; +} +//======================================================================= +//function : SetMaterial +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::SetMaterial(const TopoDS_Shape& aS, + const Standard_Integer iMt) +{ + TopExp_Explorer aExp; + // + aExp.Init(aS, TopAbs_SOLID); + for(; aExp.More(); aExp.Next()) { + const TopoDS_Shape& aSd=aExp.Current(); + myMapSWM.Bind(aSd, iMt); + } +} +//======================================================================= +//function : AddShape +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::AddShape(const TopoDS_Shape& aS) +{ + SetMaterial(aS, 0); + NMTAlgo_Splitter::AddShape(aS); +} +//======================================================================= +//function : AddToolWithMaterial +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::AddTool(const TopoDS_Shape& aS) + +{ + SetMaterial(aS, 0); + NMTAlgo_Splitter::AddTool(aS); +} +//======================================================================= +//function : Build +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::Build(const TopAbs_ShapeEnum aLimit) +{ + NMTAlgo_Splitter::Build(aLimit); + // + myMapSWMOut.Clear(); + // + TreatSolids(); + // + if (myRemoveWebs && myMapSWMOut.Extent()) { + RestParts(); + TreatWebs(); + } +} +//======================================================================= +//function : TreatWebs +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::TreatWebs() +{ + Standard_Integer nMt; + TopTools_DataMapOfIntegerListOfShape aMMLS; + TopoDS_Iterator aIt; + TopTools_DataMapIteratorOfDataMapOfShapeInteger aIt2; + TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape aIt1; + TopTools_ListIteratorOfListOfShape aItS; + TopoDS_Compound aCx; + TopoDS_Shape aCSR; + // + aIt2.Initialize(myMapSWMOut); + for (; aIt2.More(); aIt2.Next()) { + const TopoDS_Shape& aS=aIt2.Key(); + nMt=aIt2.Value(); + // + if (aMMLS.IsBound(nMt)){ + TopTools_ListOfShape& aLS=aMMLS.ChangeFind(nMt); + aLS.Append(aS); + } + else { + TopTools_ListOfShape aLS; + aLS.Append(aS); + aMMLS.Bind(nMt, aLS); + } + } + // + myMapSWMOut.Clear(); + myBuilder.MakeCompound(aCx); + // + aIt1.Initialize(aMMLS); + for (; aIt1.More(); aIt1.Next()) { + nMt=aIt1.Key(); + // + TopoDS_Compound aCS; + myBuilder.MakeCompound(aCS); + const TopTools_ListOfShape& aLS=aIt1.Value(); + aItS.Initialize(aLS); + for (; aItS.More(); aItS.Next()) { + const TopoDS_Shape& aS=aItS.Value(); + myBuilder.Add(aCS, aS); + } + // + NMTAlgo_Tools::BreakWebs(aCS, aCSR); + // + aIt.Initialize(aCSR); + for(; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aS=aIt.Value(); + myBuilder.Add(aCx, aS); + // + myMapSWMOut.Bind(aS, nMt); + } + } + // + aIt.Initialize(myRestParts); + for(; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aS=aIt.Value(); + myBuilder.Add(aCx, aS); + } + // + myShape=aCx; +} + +//======================================================================= +//function : RestParts +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::RestParts() +{ + TopoDS_Iterator aIt; + TopoDS_Compound aR; + // + myBuilder.MakeCompound(aR); + // + aIt.Initialize(myShape); + for(; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aS=aIt.Value(); + if (aS.ShapeType()==TopAbs_SOLID){ + if (myMapSWMOut.IsBound(aS)) { + continue; + } + } + myBuilder.Add(aR, aS); + } + myRestParts=aR; +} +//======================================================================= +//function : TreatSolids +//purpose : +//======================================================================= + void NMTAlgo_Splitter1::TreatSolids() +{ + Standard_Integer i, j, aNbSd, aNbSdx, nMtMax, nMt; + TopAbs_ShapeEnum aType; + TopoDS_Iterator aIt; + TopTools_IndexedMapOfShape aMSo, aMSd; + TopTools_IndexedDataMapOfShapeListOfShape aMFS; + TopTools_ListIteratorOfListOfShape aItS, aItLS; + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMCS; + // + TopExp::MapShapesAndAncestors(myShape, TopAbs_FACE, TopAbs_SOLID, aMFS); + TopExp::MapShapes(myShape, TopAbs_SOLID, aMSo); + // + aNbSd=aMSo.Extent(); + if (!aNbSd) { + return; + } + // + aItS.Initialize(myListShapes); + for ( ;aItS.More(); aItS.Next()) { + const TopoDS_Shape& aS=aItS.Value(); + // + aType=aS.ShapeType(); + if (aType != TopAbs_SOLID) { + continue; + } + // + if (myToolShapes.Contains(aS)) { + continue; + } + // + if (!myMapSIFC.IsBound(aS)){ + continue; + } + // + aMSd.Clear(); + // + const TopoDS_Shape& aIFC=myMapSIFC.Find(aS); + // + aIt.Initialize(aIFC); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aIF=aIt.Value(); + if (aMFS.Contains(aIF)) { + const TopTools_ListOfShape& aLS=aMFS.FindFromKey(aIF); + aItLS.Initialize(aLS); + for ( ;aItLS.More(); aItLS.Next()) { + const TopoDS_Shape& aSd=aItLS.Value(); + if (!aMSd.Contains(aSd)) { + aMSd.Add(aSd); + } + } + } + } + // + aNbSd=aMSd.Extent(); + if (!aNbSd) { + TopoDS_Shape aSd; + // + const TopoDS_Shape& aFC=myImageShape.Image(aS).First(); + NMTAlgo_Tools::FindImageSolid(aFC, aMSo, aSd); + // + aMSd.Add(aSd); + } + aMCS.Add(aS, aMSd); + } //for ( ;aItS.More(); aItS.Next()) + // + aMFS.Clear(); + // + aNbSd=aMCS.Extent(); + for (i=1; i<=aNbSd; ++i) { + const TopoDS_Shape& aSd=aMCS.FindKey(i); + const TopTools_IndexedMapOfShape& aMSdx=aMCS(i); + aNbSdx=aMSdx.Extent(); + for (j=1; j<=aNbSdx; ++j) { + const TopoDS_Shape& aSdx=aMSdx(j); + // + if (aMFS.Contains(aSdx)) { + TopTools_ListOfShape& aLS=aMFS.ChangeFromKey(aSdx); + aLS.Append(aSd); + } + else { + TopTools_ListOfShape aLS; + aLS.Append(aSd); + aMFS.Add(aSdx, aLS); + } + } + } + // + // Assign materials values to subsolids + // + myMapSWMOut.Clear(); + // + aNbSdx=aMFS.Extent(); + for (i=1; i<=aNbSdx; ++i) { + const TopoDS_Shape& aSdx=aMFS.FindKey(i); + const TopTools_ListOfShape& aLS=aMFS(i); + aItLS.Initialize(aLS); + for (j=0; aItLS.More(); aItLS.Next(), ++j) { + const TopoDS_Shape& aSd=aItLS.Value(); + // + if (!myMapSWM.IsBound(aSd)){ + continue; + } + // + nMt=myMapSWM.Find(aSd); + if (!j) { + nMtMax=nMt; + continue; + } + if (nMt>nMtMax) { + nMtMax=nMt; + } + } + myMapSWMOut.Bind(aSdx, nMtMax); + } + // +} diff --git a/src/NMTAlgo/NMTAlgo_Splitter1.hxx b/src/NMTAlgo/NMTAlgo_Splitter1.hxx new file mode 100644 index 000000000..1948d3508 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter1.hxx @@ -0,0 +1,117 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTAlgo_Splitter1_HeaderFile +#define _NMTAlgo_Splitter1_HeaderFile + +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Splitter_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _TopAbs_ShapeEnum_HeaderFile +#include +#endif +class TopoDS_Shape; +class TopTools_DataMapOfShapeInteger; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTAlgo_Splitter1 : public NMTAlgo_Splitter { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTAlgo_Splitter1(); +Standard_EXPORT virtual ~NMTAlgo_Splitter1(); +Standard_EXPORT virtual void Clear() ; +Standard_EXPORT virtual void AddShape(const TopoDS_Shape& aS) ; +Standard_EXPORT virtual void AddTool(const TopoDS_Shape& aS) ; +Standard_EXPORT void SetMaterial(const TopoDS_Shape& aS,const Standard_Integer aM = 0) ; +Standard_EXPORT void SetRemoveWebs(const Standard_Boolean bFlag) ; +Standard_EXPORT Standard_Boolean RemoveWebs() const; +Standard_EXPORT const TopTools_DataMapOfShapeInteger& GetMaterialTable() const; +Standard_EXPORT virtual void Build(const TopAbs_ShapeEnum Limit = TopAbs_SHAPE) ; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT void TreatSolids() ; +Standard_EXPORT void TreatWebs() ; +Standard_EXPORT void RestParts() ; + + + // Fields PROTECTED + // +Standard_Boolean myRemoveWebs; +TopTools_DataMapOfShapeInteger myMapSWM; +TopTools_DataMapOfShapeInteger myMapSWMOut; +TopoDS_Shape myRestParts; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTAlgo/NMTAlgo_Splitter1.ixx b/src/NMTAlgo/NMTAlgo_Splitter1.ixx new file mode 100644 index 000000000..c036c0734 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter1.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTAlgo/NMTAlgo_Splitter1.jxx b/src/NMTAlgo/NMTAlgo_Splitter1.jxx new file mode 100644 index 000000000..b589b4d38 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter1.jxx @@ -0,0 +1,9 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TopTools_DataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Splitter1_HeaderFile +#include +#endif diff --git a/src/NMTAlgo/NMTAlgo_Splitter_1.cxx b/src/NMTAlgo/NMTAlgo_Splitter_1.cxx new file mode 100644 index 000000000..2c057d7f0 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter_1.cxx @@ -0,0 +1,689 @@ +// File: NMTAlgo_Splitter_1.cxx +// Created: Mon Feb 2 14:58:54 2004 +// Author: Peter KURNEV +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : ShellsAndSolids +//purpose : +//======================================================================= + void NMTAlgo_Splitter::ShellsAndSolids() +{ + Standard_Boolean bMakeSolids; + TopAbs_ShapeEnum aType; + TopTools_ListIteratorOfListOfShape aItS; + TopTools_ListOfShape aLNS; + // + myAddedFacesMap.Clear(); + bMakeSolids=(myLimit==TopAbs_SHAPE || myLimit TopAbs_SHELL) { + continue;//face,wire,... + } + // + aLNS.Clear(); + // + MakeShells (aS, aLNS); + // + if (bMakeSolids && aType==TopAbs_SOLID) { + MakeSolids(aS, aLNS); + } + // + TopTools_ListIteratorOfListOfShape it (aLNS); + for (; it.More(); it.Next()) { + myBuilder.Add (myShape, it.Value()); + } + } + // + // add split faces + aItS.Initialize(myListShapes); + for ( ;aItS.More(); aItS.Next()) { + const TopoDS_Shape& aS=aItS.Value(); + // + aType=aS.ShapeType(); + if (aType!=TopAbs_FACE || myMapTools.Contains(aS)) { + continue; + } + // + const TopoDS_Shape& aCSF=myImageShape.Image(aS).First(); + TopoDS_Iterator itS(aCSF); + for (; itS.More(); itS.Next()){ + const TopoDS_Shape& aF=itS.Value(); + if (!myAddedFacesMap.Contains(aF)){ + myBuilder.Add (myShape, aF); + } + } + } +} +//======================================================================= +//function : MakeShells +//purpose : split S into compound of shells +//======================================================================= + void NMTAlgo_Splitter::MakeShells(const TopoDS_Shape& aS, + TopTools_ListOfShape& aLNS) +{ + NMTAlgo_Loop3d aShellMaker; + // + // get compound of split faces of aS + const TopoDS_Shape& aFC=myImageShape.Image(aS).First(); + aShellMaker.AddConstFaces(aFC); + // + // add split faces inside aS + if (myClosedShapes.Contains(aS)) { + // + // internal faces compound + TopoDS_Shape aIFC=FindFacesInside(aS, Standard_True); + aShellMaker.AddSectionFaces(aIFC); + } + // + aLNS=aShellMaker.MakeShells(myAddedFacesMap); + // + // Add faces added to new shell to myAddedFacesMap: + // avoid rebuilding twice common part of 2 solids. + + TopTools_ListIteratorOfListOfShape itS(aLNS); + TopExp_Explorer expF; + for (; itS.More(); itS.Next()) { + const TopoDS_Shape& aSh=itS.Value(); + expF.Init (aSh, TopAbs_FACE); + for (; expF.More(); expF.Next()){ + myAddedFacesMap.Add (expF.Current()); + } + } + +} +//======================================================================= +//function : MakeSolids +//purpose : make solids out of Shells +//======================================================================= + void NMTAlgo_Splitter::MakeSolids(const TopoDS_Shape& theSolid, + TopTools_ListOfShape& theShellList) +{ + // for a solid wrapping other shells or solids without intersection, + // it is necessary to find shells making holes in it + Standard_Boolean isWrapping; + TopTools_ListOfShape aNewSolids; // result + TopTools_ListOfShape aHoleShells; + TopoDS_Shape anInfinitePointShape; + TopTools_DataMapOfShapeShape aInOutMap; + TopTools_ListIteratorOfListOfShape aShellIt, aSolisIt; + // + isWrapping = myWrappingSolid.Contains(theSolid); + if (!isWrapping && !theShellList.IsEmpty()) { + // check if theSolid initially has internal shells + TopoDS_Iterator aShellExp (theSolid); + aShellExp.Next(); + isWrapping = aShellExp.More(); + } + // + aShellIt.Initialize(theShellList); + for ( ; aShellIt.More(); aShellIt.Next()) { + const TopoDS_Shape & aShell = aShellIt.Value(); + // check if a shell is a hole of theSolid + if (isWrapping && IsInside(anInfinitePointShape, aShell)){ + aHoleShells.Append(aShell); + } + else { + // make a solid from a shell + TopoDS_Solid Solid; + myBuilder.MakeSolid( Solid ); + myBuilder.Add (Solid, aShell); + + aNewSolids.Append (Solid); + } + } + // + // find outer a shell most close to each hole shell + aShellIt.Initialize(aHoleShells); + for (; aShellIt.More(); aShellIt.Next()){ + const TopoDS_Shape & aHole = aShellIt.Value(); + // + aSolisIt.Initialize(aNewSolids); + for ( ; aSolisIt.More(); aSolisIt.Next()) { + const TopoDS_Shape & aSolid = aSolisIt.Value(); + // + if (! IsInside(aHole, aSolid)){ + continue; + } + // + if ( aInOutMap.IsBound (aHole)){ + const TopoDS_Shape & aSolid2 = aInOutMap( aHole ); + if ( IsInside( aSolid, aSolid2 )) { + aInOutMap.UnBind( aHole ); + aInOutMap.Bind ( aHole, aSolid ); + } + } + else{ + aInOutMap.Bind (aHole, aSolid); + } + } + // + // add aHole to a solid + if (aInOutMap.IsBound( aHole )){ + TopoDS_Shape & aSolid=aInOutMap(aHole); + myBuilder.Add (aSolid, aHole); + } + } + theShellList.Clear(); + theShellList.Append( aNewSolids ); +} + +//======================================================================= +//function : FindFacesInside +//purpose : return compound of faces of other shapes that are +// inside . +// is an object shape. +// makes avoid faces that do not form a +// closed shell +// makes return already added faces +//======================================================================= + TopoDS_Shape NMTAlgo_Splitter::FindFacesInside(const TopoDS_Shape& theShape, + const Standard_Boolean CheckClosed, + const Standard_Boolean All) +{ + TopExp_Explorer expl; + // + // ================================================ + // check if internal faces have been already found + // ================================================ + if (myInternalFaces.IsBound(theShape)) { + TopoDS_Shape aIntFComp = myInternalFaces.Find (theShape); + TopoDS_Shape aIntRemFComp = myIntNotClFaces.Find (theShape); + + expl.Init( aIntRemFComp, TopAbs_FACE); + if (CheckClosed || !expl.More()){ + return aIntFComp; + } + // + TopoDS_Compound C; + myBuilder.MakeCompound( C ); + // add removed faces + for (; expl.More(); expl.Next()){ + myBuilder.Add( C, expl.Current() ); + } + // add good internal faces + expl.Init( aIntFComp, TopAbs_FACE); + for (; expl.More(); expl.Next()) { + myBuilder.Add( C, expl.Current() ); + } + // + return C; + } + + // =================================== + // get data for internal faces search + // =================================== + // + // compound of split faces of theShape + const TopoDS_Shape& CSF = myImageShape.Image(theShape).First(); + // + TopTools_MapOfShape MSE, MFP; + TopTools_DataMapOfShapeListOfShape DMSEFP; + TopTools_MapIteratorOfMapOfShape itm; + TopTools_ListOfShape EmptyL; + TopTools_ListIteratorOfListOfShape itl; + + // MSE filling: map of new section edges of CSF + expl.Init(CSF, TopAbs_EDGE); + for (; expl.More(); expl.Next()) { + const TopoDS_Shape& aE = expl.Current() ; + MSE.Add(aE); + } + // + // DMEF: map edge of CSF - faces of CSF + TopTools_IndexedDataMapOfShapeListOfShape DMEF; + TopExp::MapShapesAndAncestors(CSF, TopAbs_EDGE, TopAbs_FACE, DMEF); + // + // Fill + // 1. MFP - a map of faces to process: map of resulting faces except + // those of theShape; we`ll add to C those of them which are inside CSF + // 2. DMSEFP - edge of MSE => faces of MFP + // + itl.Initialize(myListShapes); + for (;itl.More(); itl.Next()) { + const TopoDS_Shape& aShape = itl.Value(); + // + if ( theShape.IsSame(aShape)) { + continue; + } + // fill maps + // iterate on split faces of aShape + const TopoDS_Shape& CSF1 = myImageShape.Image(aShape).First(); + TopoDS_Iterator itF (CSF1); + for ( ; itF.More(); itF.Next()) { + const TopoDS_Shape& aF1 = itF.Value(); + MFP.Add(aF1); + // iterate on edges of split faces of aShape, + // add to DMSEFP edges that are new + expl.Init(aF1, TopAbs_EDGE); + for (; expl.More(); expl.Next()) { + TopoDS_Shape aE1 = expl.Current(); + if ( MSE.Contains(aE1)) {// section edge + if (!DMSEFP.IsBound(aE1)) { + DMSEFP.Bind(aE1, EmptyL); + } + DMSEFP(aE1).Append(aF1); + } + } + } + }//for (;itl.More(); itl.Next()) + // + // add tool faces... (is absent) + // + // =========================== + // find faces inside theShape + // =========================== + Standard_Boolean skipAlreadyAdded = Standard_False; + Standard_Boolean GoodOri, inside; + Standard_Real dot; + TopTools_ListOfShape KeepFaces; + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape Mapit; + + // iterate on section edges, check faces of other shapes + // sharing section edges and put internal faces to KeepFaces + Mapit.Initialize(DMSEFP); + for (; Mapit.More() ; Mapit.Next() ) { + // a new edge of theShape + const TopoDS_Edge& E = TopoDS::Edge (Mapit.Key()); + // an original edge of which E is a split + //const TopoDS_Edge& OrigE = TopoDS::Edge (myImagesEdges.Root(E)); + // does OrigE itself splits a face + Standard_Boolean isSectionE=IsSectionEdge(E);//(OrigE); + + // split faces of other shapes sharing E + TopTools_ListOfShape& LSF = DMSEFP.ChangeFind(E); + itl.Initialize( LSF ); + while (itl.More()) { + // a split faces of other shape + TopoDS_Face aFace1 = TopoDS::Face(itl.Value()); + // remove aFace1 form DMSEFP and MFP + LSF.Remove( itl ); // == itl.Next(); + if (!MFP.Remove( aFace1 )) + continue; // was not is MFP ( i.e already checked) + // check if aFace1 was already added to 2 shells + if (!All && + myAddedFacesMap.Contains(aFace1) && + myAddedFacesMap.Contains(aFace1.Reversed())) { + skipAlreadyAdded = Standard_True; + //modified by NIZNHY-PKV Wed Feb 11 16:11:53 2004 f + //continue; + //modified by NIZNHY-PKV Wed Feb 11 16:35:48 2004 t + } + // + // find another face which originates from the same face as aFace1: + // usually aFace2 is internal if aFace1 is not and vice versa + TopoDS_Shape anOrigFace = aFace1; + if (myImagesFaces.IsImage(aFace1)){ + anOrigFace = myImagesFaces.Root(aFace1); + } + // + TopoDS_Shape aFace2; + if ( !isSectionE ) { + while (itl.More()) { + aFace2 = itl.Value(); + // + TopoDS_Shape anOrigFace2 = aFace2; + if (myImagesFaces.IsImage(aFace2)) { + anOrigFace2 = myImagesFaces.Root(aFace2); + } + // + if (!MFP.Contains( aFace2 )) { + LSF.Remove( itl ); + continue; + } + //if (anOrigFace.IsSame( myImagesFaces.Root( aFace2 ))) + if (anOrigFace.IsSame(anOrigFace2)) { + break; + } + itl.Next(); + } + if (itl.More()) { // aFace2 found, remove it from maps + LSF.Remove( itl ); + MFP.Remove(aFace2); + } + else{ + aFace2.Nullify(); + } + itl.Initialize( LSF ); + } + + // check that anOrigFace is not same domain with CSF faces it intersects + + const TopTools_ListOfShape& FL = DMEF.FindFromKey(E); //faces of CSF sharing E + + const TopoDS_Shape& origF1 = myImagesFaces.IsImage(FL.First()) ? + myImagesFaces.Root(FL.First()) : FL.First(); + const TopoDS_Shape& origF2 = myImagesFaces.IsImage(FL.Last()) ? + myImagesFaces.Root(FL.Last()) : FL.Last(); + // + Standard_Boolean sameDom1 = anOrigFace.IsSame( origF1 ); + Standard_Boolean sameDom2 = anOrigFace.IsSame( origF2 ); + + if (!(sameDom1 || sameDom2) && HasSameDomainF( TopoDS::Face(anOrigFace) )) { + sameDom1 = IsSameDomainF( TopoDS::Face(anOrigFace), TopoDS::Face(origF1)); + if (origF1 == origF2) { + sameDom2 = sameDom1; + } + else{ + IsSameDomainF( TopoDS::Face(anOrigFace), TopoDS::Face(origF2)); + } + } + if (sameDom1 && sameDom2){ + continue; + } + if (sameDom1 || sameDom2) { + inside = NMTAlgo_Loop3d::IsInside (E, + TopoDS::Face(FL.First()), + TopoDS::Face(FL.Last()), + 1, dot, GoodOri); + if (inside || (dot + Precision::Angular() >= 1.0)) + continue; // E is convex between origF1 and origF2 or they are tangent + } + // + // keep one of found faces + + //face of CSF sharing E + const TopoDS_Shape& aShapeFace = sameDom1 ? FL.Last() : FL.First(); + // analyse aFace1 state + inside = NMTAlgo_Loop3d::IsInside (E, TopoDS::Face(aShapeFace), aFace1, + 1, dot, GoodOri); +// if (inside && isSectionE) { + if (inside) { //IFV 27.08.04 + // aFace1 must be tested with both adjacent faces of CSF + const TopoDS_Shape& aShapeFace2 = sameDom1 ? FL.First() : FL.Last(); + if (aShapeFace2 != aShapeFace){ + inside = NMTAlgo_Loop3d::IsInside (E, TopoDS::Face(aShapeFace2), aFace1, + 1, dot, GoodOri); + } + } + // + // store internal face + if (inside) + KeepFaces.Append(aFace1); + + else if (!aFace2.IsNull()) { + if (dot + Precision::Angular() >= 1.0) { + // aFace2 state is not clear, it will be analysed alone, + // put it back to the maps + MFP.Add( aFace2 ); + LSF.Append( aFace2 ); + } + else + KeepFaces.Append(aFace2); + } + } + } + + // =================================================== + // add not distributed faces connected with KeepFaces + // =================================================== + + // ultimate list of internal faces + TopTools_ListOfShape KeptFaces; + // + // add to MFP not split tool faces as well, they may be connected with + // tool faces interfering with theShape + /* + itm.Initialize(myMapTools); + for (; itm.More(); itm.Next() ) { + const TopoDS_Shape& aToolFace = itm.Key(); + if (!myImageShape.HasImage(aToolFace)){ + MFP.Add (aToolFace); + } + } + */ + // + if (MFP.IsEmpty()) + KeptFaces.Append (KeepFaces); + // + while (!KeepFaces.IsEmpty()) { + // KeepEdges : map of edges of faces kept last time + TopTools_IndexedMapOfShape KeepEdges; + for ( itl.Initialize(KeepFaces); itl.More(); itl.Next() ) { + TopExp::MapShapes( itl.Value(), TopAbs_EDGE, KeepEdges); + KeptFaces.Append( itl.Value() ); + } + // + KeepFaces.Clear(); + // + // keep faces connected with already kept faces by KeepEdges + for ( itm.Initialize(MFP); itm.More(); itm.Next() ) { + const TopoDS_Shape& FP = itm.Key(); + for (expl.Init(FP,TopAbs_EDGE); expl.More(); expl.Next()) { + const TopoDS_Shape& se = expl.Current(); + if (!MSE.Contains(se) && KeepEdges.Contains(se) ) { + KeepFaces.Append(FP); + MFP.Remove(FP); + break; + } + } + } + } + + // =============================================================== + // here MFP contains faces outer of theShape and those of shapes + // which do not interfere with theShape at all and between which + // there may be those wrapped by theShape and whose faces may be + // needed to be returned as well + // =============================================================== + + Standard_Boolean isSolid = (theShape.ShapeType() == TopAbs_SOLID); + if (All || isSolid) // All is for sub-result removal + { + for ( itm.Initialize( MFP ); itm.More(); itm.Next() ) { + TopoDS_Shape aFace = itm.Key(); + + // find a shape aFace originates from + TopoDS_Shape anOrigShape = GetOriginalShape( aFace ); + + // find out if all faces of anOrigShape are not in MFP + // and by the way remove them from MFP + Standard_Boolean isAllOut = Standard_True; + TopoDS_Shape aSplitFaces = anOrigShape; + if (myImageShape.HasImage(anOrigShape)) + aSplitFaces = myImageShape.Image(anOrigShape).First(); + + TopTools_ListOfShape aSplitFaceL; + for (expl.Init( aSplitFaces, TopAbs_FACE ); expl.More(); expl.Next()) + { + const TopoDS_Shape & aSpFace = expl.Current(); + // a tool face which become object has image but the whole tool shape has not + if (myImageShape.HasImage( aSpFace )) + { + TopExp_Explorer exF (myImageShape.Image( aSpFace ).First(), TopAbs_FACE ); + for ( ; exF.More(); exF.Next() ) + { + aSplitFaceL.Append( exF.Current() ); + if ( ! MFP.Remove( exF.Current() )) + isAllOut = Standard_False; + } + } + else + { + aSplitFaceL.Append( aSpFace ); + if ( ! MFP.Remove( aSpFace )) + isAllOut = Standard_False; + } + } + itm.Initialize( MFP ); + if ( !isAllOut ) + continue; + + // classify anOrigShape against theShape + if (IsInside (anOrigShape, theShape)) { + if (isSolid && myClosedShapes.Contains(anOrigShape)) { + // to make a special care at solid reconstruction + myWrappingSolid.Add ( theShape ); + } + // keep faces of an internal shape anOrigShape + KeptFaces.Append( aSplitFaceL ); + } + } + } + + // ==================================================== + // check if kept faces form a shell without free edges + // ==================================================== + + DMEF.Clear(); // edge - kept faces + MFP.Clear(); // reuse it for wrong faces + if (CheckClosed) { + for (itl.Initialize(KeptFaces); itl.More(); itl.Next() ) + TopExp::MapShapesAndAncestors(itl.Value(), TopAbs_EDGE, TopAbs_FACE, DMEF); + + Standard_Integer i, nb = DMEF.Extent(); + Standard_Boolean isClosed = Standard_False; + while (!isClosed) { + isClosed = Standard_True; + for (i=1; isClosed && i<=nb; ++i) { + const TopoDS_Shape& E = DMEF.FindKey( i ); + if (! BRep_Tool::Degenerated( TopoDS::Edge( E )) && + ! MSE.Contains( E )) + isClosed = ( DMEF(i).Extent() != 1 ); + } + if (!isClosed) { + const TopoDS_Shape& F = DMEF.FindFromIndex( i-1 ).First(); // bad face + MFP.Add( F ); + // remove bad face from DMEF + for (expl.Init( F, TopAbs_EDGE); expl.More(); expl.Next()) { + const TopoDS_Shape& E = expl.Current(); + TopTools_ListOfShape& FL = DMEF.ChangeFromKey( E ); + for (itl.Initialize( FL ); itl.More(); itl.Next() ) { + if ( F.IsSame( itl.Value() )) { + FL.Remove( itl ); + break; + } + } + } + } + } + } + + // ============== + // make a result + // ============== + + TopoDS_Compound C; + // compound of removed internal faces + TopoDS_Compound CNotCl; + + myBuilder.MakeCompound(C); + myBuilder.MakeCompound(CNotCl); + + // add to compounds + itl.Initialize(KeptFaces); + for (; itl.More(); itl.Next() ) { + TopoDS_Shape & aIntFace = itl.Value(); + // + if (!All && + myAddedFacesMap.Contains(aIntFace) && + myAddedFacesMap.Contains(aIntFace.Reversed())) { + continue; + } + // + if (! MFP.Contains( aIntFace )){ + myBuilder.Add(C, aIntFace); + } + else{ + myBuilder.Add(CNotCl, aIntFace); + } + } + // + if (!skipAlreadyAdded && CheckClosed) { + myInternalFaces.Bind(theShape, C); + myIntNotClFaces.Bind(theShape, CNotCl); + } + // + // + if (!myMapSIFC.IsBound(theShape)) { + TopoDS_Compound aCIF; + myBuilder.MakeCompound(aCIF); + // + itl.Initialize(KeptFaces); + for (; itl.More(); itl.Next() ) { + TopoDS_Shape & aIntFace = itl.Value(); + if (! MFP.Contains(aIntFace )){ + myBuilder.Add(aCIF, aIntFace); + } + } + myMapSIFC.Bind(theShape, aCIF); + } + // + return C; +} +//======================================================================= +//function : IsInside +//purpose : Return True if the first vertex of S1 inside S2. +// If S1.IsNull(), check infinite point against S2. +//======================================================================= + Standard_Boolean NMTAlgo_Splitter::IsInside (const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2) +{ + BRepClass3d_SolidClassifier aClassifier( theS2 ); + // + TopExp_Explorer expl(theS1, TopAbs_VERTEX); + // + if (!expl.More()){ + aClassifier.PerformInfinitePoint( ::RealSmall()); + } + else { + const TopoDS_Vertex & aVertex = TopoDS::Vertex( expl.Current() ); + aClassifier.Perform (BRep_Tool::Pnt( aVertex ), + BRep_Tool::Tolerance( aVertex )); + } + // + return ( aClassifier.State() == TopAbs_IN ); +} + +//======================================================================= +//function : GetOriginalShape +//purpose : Return the shape aShape originates from. aShape +// should be a face or more complex result shape +//======================================================================= + TopoDS_Shape NMTAlgo_Splitter::GetOriginalShape(const TopoDS_Shape& theShape) const +{ + TopoDS_Shape anOrigShape; + + TopExp_Explorer expl( theShape, TopAbs_FACE); + if (expl.More()) { + TopoDS_Shape aFace = expl.Current(); + if (myImagesFaces.IsImage( aFace )) + aFace = myImagesFaces.Root( aFace ); + anOrigShape = myFaceShapeMap.Find( aFace ); + } + return anOrigShape; +} diff --git a/src/NMTAlgo/NMTAlgo_Splitter_2.cxx b/src/NMTAlgo/NMTAlgo_Splitter_2.cxx new file mode 100644 index 000000000..0c1dc8f04 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Splitter_2.cxx @@ -0,0 +1,515 @@ +// File: NMTAlgo_Splitter_2.cxx +// Created: Mon Feb 9 15:07:51 2004 +// Author: Igor FEOKTISTOV +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : KeepShapesInside +//purpose : remove shapes that are outside of S from resul +//======================================================================= + void NMTAlgo_Splitter::KeepShapesInside (const TopoDS_Shape& S) +{ + TopoDS_Iterator it; + if (S.ShapeType() < TopAbs_SOLID) { // compound or compsolid + for (it.Initialize( S ); it.More(); it.Next()) + KeepShapesInside( it.Value()); + return; + } + + Standard_Boolean isTool = Standard_False; + if (!myImageShape.HasImage( S )) { + //isTool = CheckTool( S ); + //if (!isTool) return; + return; + } + + // build map of internal faces + TopTools_IndexedMapOfShape MIF; + TopoDS_Shape IntFacesComp = FindFacesInside( S, Standard_False, Standard_True); + TopExp::MapShapes( IntFacesComp, TopAbs_FACE, MIF ); + + TopoDS_Compound C; + myBuilder.MakeCompound(C); + + TopAbs_ShapeEnum anInternalShapeType = TopAbs_SHAPE; + if (!MIF.IsEmpty()) + { + // leave in the result only those shapes having a face in MIF + for (it.Initialize( myShape ); it.More(); it.Next()) { + const TopoDS_Shape & aResShape = it.Value(); + TopExp_Explorer expResF( aResShape, TopAbs_FACE ); + for (; expResF.More(); expResF.Next()) { + if ( MIF.Contains( expResF.Current())) { + myBuilder.Add( C, aResShape ); + if (aResShape.ShapeType() < anInternalShapeType) + anInternalShapeType = aResShape.ShapeType(); + break; + } + } + } + } + + // may be S was not split by internal faces then it is missing + // in myShape, add it + if (!isTool && + (anInternalShapeType > TopAbs_SOLID || S.ShapeType() > TopAbs_SOLID)) + { + TopTools_IndexedMapOfShape MSF; // map of split faces of S + TopExp::MapShapes( myImageShape.Image(S).First(), TopAbs_FACE, MSF); + + // find a shape having all faces in MSF + for (it.Initialize( myShape ); it.More(); it.Next()) { + TopExp_Explorer expResF( it.Value(), TopAbs_FACE ); + for (; expResF.More(); expResF.Next()) { + if (! MSF.Contains( expResF.Current())) + break; + } + if (! expResF.More()) { + myBuilder.Add( C, it.Value() ); + break; + } + } + } + + myShape = C; +} + +//======================================================================= +//function : RemoveShapesInside +//purpose : remove shapes that are inside S from resul +//======================================================================= + void NMTAlgo_Splitter::RemoveShapesInside (const TopoDS_Shape& S) +{ + TopoDS_Iterator it; + if (S.ShapeType() < TopAbs_SOLID) { // compound or compsolid + for (it.Initialize( S ); it.More(); it.Next()) + RemoveShapesInside( it.Value()); + return; + } + Standard_Boolean isTool = Standard_False; + if (!myImageShape.HasImage( S )) { + //isTool = CheckTool( S ); + //if (!isTool) return; + return; + } + + TopoDS_Shape IntFacesComp = FindFacesInside( S, Standard_False, Standard_True); + TopTools_IndexedMapOfShape MIF; // map of internal faces + TopExp::MapShapes( IntFacesComp, TopAbs_FACE, MIF); + + if (MIF.IsEmpty()) return; + + // add to MIF split faces of S + if (myImageShape.HasImage(S)) + TopExp::MapShapes( myImageShape.Image(S).First(), TopAbs_FACE, MIF); + + // leave in the result only those shapes not having all face in MIF + + TopoDS_Compound C; + myBuilder.MakeCompound(C); + + // RMF : faces of removed shapes that encounter once + TopTools_MapOfShape RFM; + + for (it.Initialize( myShape ); it.More(); it.Next()) { + + TopExp_Explorer expResF( it.Value(), TopAbs_FACE ); + for (; expResF.More(); expResF.Next()) + if (!MIF.Contains( expResF.Current())) + break; + + if (expResF.More()) + // add shape to result + myBuilder.Add( C, it.Value() ); + else + // add faces of a removed shape to RFM + for (expResF.ReInit(); expResF.More(); expResF.Next()) { + const TopoDS_Shape& F = expResF.Current(); + if ( ! RFM.Remove ( F )) + RFM.Add( F ); + } + } + + if (!isTool) { + + // rebuild S, it must remain in the result + + Standard_Boolean isClosed = Standard_False; + switch (S.ShapeType()) { + case TopAbs_SOLID : + isClosed = Standard_True; break; + case TopAbs_SHELL: { + TopTools_IndexedDataMapOfShapeListOfShape MEF; + TopExp::MapShapesAndAncestors(S, TopAbs_EDGE, TopAbs_FACE, MEF); + Standard_Integer i; + for (i=1; isClosed && i<=MEF.Extent(); ++i) + isClosed = ( MEF(i).Extent() != 1 ); + break; + } + default: + isClosed = Standard_False; + } + if (isClosed) { + + // add to a new shape external faces of removed shapes, ie those in RFM + + TopoDS_Shell Shell; + myBuilder.MakeShell( Shell ); + + // exclude redundant internal face with edges encounterd only once + TopTools_IndexedDataMapOfShapeListOfShape MEF; + TopTools_MapIteratorOfMapOfShape itF (RFM); + for ( ; itF.More(); itF.Next()) + TopExp::MapShapesAndAncestors(itF.Key(), TopAbs_EDGE, TopAbs_FACE, MEF); + + // add only faces forming a closed shell + for (itF.Reset() ; itF.More(); itF.Next()) + { + TopExp_Explorer expE (itF.Key(), TopAbs_EDGE); + for (; expE.More(); expE.Next()) + if (MEF.FindFromKey(expE.Current()).Extent() == 1) + break; + if (!expE.More()) + myBuilder.Add( Shell, itF.Key()); + } + + if (S.ShapeType() == TopAbs_SOLID) { + TopoDS_Solid Solid; + myBuilder.MakeSolid( Solid ); + myBuilder.Add (Solid, Shell); + myBuilder.Add (C, Solid); + } + else + myBuilder.Add (C, Shell); + } + else { + if (myImageShape.HasImage( S )) { + for (it.Initialize( myImageShape.Image(S).First()); it.More(); it.Next()) + myBuilder.Add (C, it.Value()); + } + } + } + + myShape = C; +} + +//======================================================================= +//function : Modified +//purpose : +//======================================================================= + const TopTools_ListOfShape& NMTAlgo_Splitter::Modified (const TopoDS_Shape& S) + +{ + myGenerated.Clear(); + TopTools_ListIteratorOfListOfShape it; + TopTools_MapOfShape aMap; + TopExp_Explorer anExp; + + if(S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_EDGE) { + + if(S.ShapeType() == TopAbs_FACE) { + if (myImagesFaces.HasImage( S )) { + it.Initialize(myImagesFaces.Image(S)); + anExp.Init(myShape, TopAbs_FACE); + } + } + else { + if (myImagesEdges.HasImage( S )) { + it.Initialize(myImagesEdges.Image(S)); + anExp.Init(myShape, TopAbs_EDGE); + } + } + + for(; anExp.More(); anExp.Next()) { + aMap.Add(anExp.Current()); + } + + for (; it.More(); it.Next()) { + if(aMap.Contains(it.Value())) { + myGenerated.Append(it.Value()); + } + } + + return myGenerated; + + } + + if(S.ShapeType() == TopAbs_VERTEX) { + + const NMTTools_DSFiller& aDSF = Filler(); + const NMTTools_PaveFiller& aPF = aDSF.PaveFiller(); + const NMTDS_ShapesDataStructure& aDS = aDSF.DS(); + + Standard_Integer aNbS = aDS.NumberOfSourceShapes(); + Standard_Integer anIndex = 0, i; + + for(i = 1; i <= aNbS; ++i) { + + const TopoDS_Shape& aS = aDS.Shape(i); + if(S.IsSame(aS)) { + anIndex = i; + break; + } + + } + + if(anIndex == 0) return myGenerated; + + Standard_Integer aSDVInd = aPF.FindSDVertex(anIndex); + + if(aSDVInd == 0) return myGenerated; + + const TopoDS_Shape aSDV = aDS.Shape(aSDVInd); + + anExp.Init(myShape, TopAbs_VERTEX); + for(; anExp.More(); anExp.Next()) { + + if(aSDV.IsSame(anExp.Current())) { + myGenerated.Append(aSDV); + break; + } + + } + + } + + return myGenerated; +} +//======================================================================= +//function : Generated +//purpose : +//======================================================================= + const TopTools_ListOfShape& NMTAlgo_Splitter::Generated(const TopoDS_Shape& S) +{ + myGenerated.Clear(); + TopTools_ListIteratorOfListOfShape it; + TopTools_MapOfShape aMap; + TopExp_Explorer anExp; + Standard_Boolean bCheckVert = Standard_False; + + if(S.ShapeType() == TopAbs_FACE) { + if (mySectionParts.Contains(S)) { + it.Initialize(mySectionParts.FindFromKey(S)); + anExp.Init(myShape, TopAbs_EDGE); + + for(; anExp.More(); anExp.Next()) { + aMap.Add(anExp.Current()); + } + + for (; it.More(); it.Next()) { + if(aMap.Contains(it.Value())) { + myGenerated.Append(it.Value()); + } + } + } + + NMTTools_PaveFiller& aPF = myDSFiller->ChangePaveFiller(); + const NMTDS_ShapesDataStructure& aDS = myDSFiller->DS(); + const BOPTools_PInterferencePool& anIP = aPF.InterfPool(); + + Standard_Integer aNbS = aDS.NumberOfSourceShapes(); + Standard_Integer anIndex = 0, i; + + for(i = 1; i <= aNbS; ++i) { + + const TopoDS_Shape& aS = aDS.Shape(i); + if(S.IsSame(aS)) { + anIndex = i; + break; + } + + } + + if(anIndex == 0) return myGenerated; + if(!anIP->HasInterference(anIndex)) return myGenerated; + + const BOPTools_CArray1OfESInterference& aESs = anIP->ESInterferences(); + Standard_Integer aNbI = aESs.Extent(); + + if(aNbI == 0) return myGenerated; + + for(i = 1; i <= aNbI; ++i) { + + const BOPTools_ESInterference& aES = aESs(i); + Standard_Integer ind1, ind2; + aES.Indices(ind1, ind2); + + if(ind1 == anIndex || ind2 == anIndex) { + + Standard_Integer aNSI = aES.NewShape(); + if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { + myGenerated.Append(aDS.Shape(aNSI)); + bCheckVert = Standard_True; + } + + } + + } + + if(bCheckVert) { + aMap.Clear(); + anExp.Init(myShape, TopAbs_VERTEX); + + for(; anExp.More(); anExp.Next()) { + aMap.Add(anExp.Current()); + } + + it.Initialize(myGenerated); + for (; it.More(); it.Next()) { + + if(it.Value().ShapeType() != TopAbs_VERTEX) continue; + + if(!aMap.Contains(it.Value())) { + myGenerated.Remove(it); + } + + } + } + + return myGenerated; + } + + if(S.ShapeType() == TopAbs_EDGE) { + + NMTTools_PaveFiller& aPF = myDSFiller->ChangePaveFiller(); + const NMTDS_ShapesDataStructure& aDS = myDSFiller->DS(); + const BOPTools_PInterferencePool& anIP = aPF.InterfPool(); + + Standard_Integer aNbS = aDS.NumberOfSourceShapes(); + Standard_Integer anIndex = 0, i; + + for(i = 1; i <= aNbS; ++i) { + + const TopoDS_Shape& aS = aDS.Shape(i); + if(S.IsSame(aS)) { + anIndex = i; + break; + } + + } + + if(anIndex == 0) return myGenerated; + if(!anIP->HasInterference(anIndex)) return myGenerated; + + const BOPTools_CArray1OfEEInterference& aEEs = anIP->EEInterferences(); + Standard_Integer aNbI = aEEs.Extent(); + + for(i = 1; i <= aNbI; ++i) { + + const BOPTools_EEInterference& aEE = aEEs(i); + Standard_Integer ind1, ind2; + aEE.Indices(ind1, ind2); + + if(ind1 == anIndex || ind2 == anIndex) { + + Standard_Integer aNSI = aEE.NewShape(); + if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { + myGenerated.Append(aDS.Shape(aNSI)); + bCheckVert = Standard_True; + } + + } + + } + + const BOPTools_CArray1OfESInterference& aESs = anIP->ESInterferences(); + aNbI = aESs.Extent(); + + for(i = 1; i <= aNbI; ++i) { + + const BOPTools_ESInterference& aES = aESs(i); + Standard_Integer ind1, ind2; + aES.Indices(ind1, ind2); + + if(ind1 == anIndex || ind2 == anIndex) { + + Standard_Integer aNSI = aES.NewShape(); + if(aDS.GetShapeType(aNSI) == TopAbs_VERTEX) { + myGenerated.Append(aDS.Shape(aNSI)); + bCheckVert = Standard_True; + } + + } + + } + + if(bCheckVert) { + aMap.Clear(); + anExp.Init(myShape, TopAbs_VERTEX); + + for(; anExp.More(); anExp.Next()) { + aMap.Add(anExp.Current()); + } + + it.Initialize(myGenerated); + for (; it.More(); it.Next()) { + + if(!aMap.Contains(it.Value())) { + myGenerated.Remove(it); + } + + } + } + + return myGenerated; + + } + + return myGenerated; +} + +//======================================================================= +//function : IsDeleted +//purpose : +//======================================================================= + Standard_Boolean NMTAlgo_Splitter::IsDeleted (const TopoDS_Shape& S) + +{ + const TopTools_ListOfShape& aL = Modified(S); + if(aL.Extent() != 0) return Standard_False; + + TopTools_MapOfShape aMap; + TopExp_Explorer anExp; + + TopAbs_ShapeEnum aType = S.ShapeType(); + + if(aType == TopAbs_VERTEX || + aType == TopAbs_EDGE || + aType == TopAbs_FACE ) { + + anExp.Init(myShape, aType); + for(; anExp.More(); anExp.Next()) { + if(S.IsSame(anExp.Current())) return Standard_False; + } + + } + + return Standard_True; +} + diff --git a/src/NMTAlgo/NMTAlgo_Tools.cdl b/src/NMTAlgo/NMTAlgo_Tools.cdl new file mode 100644 index 000000000..9b067fdad --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Tools.cdl @@ -0,0 +1,71 @@ +-- File: NMTAlgo_Tools.cdl +-- Created: Fri Jan 30 16:29:14 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +class Tools from NMTAlgo + + ---Purpose: + +uses + Orientation from TopAbs, + + Shape from TopoDS, + Edge from TopoDS, + Face from TopoDS, + Shell from TopoDS, + + ListOfShape from TopTools, + IndexedMapOfShape from TopTools +--raises + +is + OrientFacesOnShell (myclass; + aShell: Shell from TopoDS; + aShellNew: out Shell from TopoDS); + + OrientFacesOnShell (myclass; + aF : Face from TopoDS; + aSh : out Shell from TopoDS); + + Orientation(myclass; + aE: Edge from TopoDS; + aF: Face from TopoDS) + returns Orientation from TopAbs; + + Sense (myclass; + aF1: Face from TopoDS; + aF2: Face from TopoDS) + returns Integer from Standard; + + IsInside (myclass; + aS1: Shape from TopoDS; + aS2: Shape from TopoDS) + returns Boolean from Standard; + + MakeShells(myclass; + aFC:Shape from TopoDS; + aLS:out ListOfShape from TopTools); + + MakeSolids(myclass; + aLS:out ListOfShape from TopTools); + + MakeSolids(myclass; + aFC:Shape from TopoDS; + aLS:out ListOfShape from TopTools); + + BreakWebs (myclass; + aS1: Shape from TopoDS; + aS2:out Shape from TopoDS); + + FindImageSolid (myclass; + aFC : Shape from TopoDS; + aMSo : IndexedMapOfShape from TopTools; + aSo : out Shape from TopoDS) + returns Boolean from Standard; + +--fields + +end Tools; diff --git a/src/NMTAlgo/NMTAlgo_Tools.cxx b/src/NMTAlgo/NMTAlgo_Tools.cxx new file mode 100644 index 000000000..2e95ca512 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Tools.cxx @@ -0,0 +1,498 @@ +// File: NMTAlgo_Tools.cxx +// Created: Fri Jan 30 16:30:45 2004 +// Author: Peter KURNEV +// + + +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include + + +//======================================================================= +// function: Sense +// purpose: +//======================================================================= + Standard_Integer NMTAlgo_Tools::Sense (const TopoDS_Face& aF1, + const TopoDS_Face& aF2) +{ + Standard_Integer iSense=0; + gp_Dir aDNF1, aDNF2; + TopoDS_Edge aE1, aE2; + TopExp_Explorer anExp; + // + anExp.Init(aF1, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + aE1=TopoDS::Edge(anExp.Current()); + if (!BRep_Tool::Degenerated(aE1)) { + if (!BRep_Tool::IsClosed(aE1, aF1)) { + break; + } + } + } + // + anExp.Init(aF2, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + aE2=TopoDS::Edge(anExp.Current()); + if (!BRep_Tool::Degenerated(aE2)) { + if (!BRep_Tool::IsClosed(aE2, aF2)) { + if (aE2.IsSame(aE1)) { + iSense=1; + break; + } + } + } + } + // + if (!iSense) { + return iSense; + } + // + BOPTools_Tools3D::GetNormalToFaceOnEdge(aE1, aF1, aDNF1); + BOPTools_Tools3D::GetNormalToFaceOnEdge(aE2, aF2, aDNF2); + // + iSense=BOPTools_Tools3D::SenseFlag(aDNF1, aDNF2); + // + return iSense; +} + +//======================================================================= +// function: OrientFacesOnShell +// purpose: +//======================================================================= + void NMTAlgo_Tools::OrientFacesOnShell (const TopoDS_Face& aF1, + TopoDS_Shell& aSh) +{ + Standard_Integer aNbFSh, iSenseFlag; + gp_Dir aDNF1, aDNF2; + TopExp_Explorer anExp; + TopoDS_Edge aE1, aESh; + TopTools_IndexedDataMapOfShapeListOfShape aMEFSh; + // + anExp.Init(aF1, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + aE1=TopoDS::Edge(anExp.Current()); + if (!BRep_Tool::Degenerated(aE1)) { + break; + } + } + // + BOPTools_Tools3D::GetNormalToFaceOnEdge(aE1, aF1, aDNF1); + // + TopExp::MapShapesAndAncestors(aSh, TopAbs_EDGE, TopAbs_FACE, aMEFSh); + if (aMEFSh.Contains(aE1)) { + const TopTools_ListOfShape& aLFSh=aMEFSh.FindFromKey(aE1); + aNbFSh=aLFSh.Extent(); + if (aNbFSh==1) { + const TopoDS_Face& aFSh=TopoDS::Face(aLFSh.First()); + // + BOPTools_Tools3D::OrientEdgeOnFace(aE1, aFSh, aESh); + BOPTools_Tools3D::GetNormalToFaceOnEdge(aESh, aFSh, aDNF2); + // + iSenseFlag=BOPTools_Tools3D::SenseFlag(aDNF1, aDNF2); + if (iSenseFlag==1) { + return; + } + // + anExp.Init(aSh, TopAbs_FACE); + for (; anExp.More(); anExp.Next()) { + const TopoDS_Shape& aFx=anExp.Current(); + TopoDS_Shape *pFx=(TopoDS_Shape *)&aFx; + pFx->Reverse(); + } + } + } +} +//======================================================================= +// function: OrientFacesOnShell +// purpose: +//======================================================================= + void NMTAlgo_Tools::OrientFacesOnShell (const TopoDS_Shell& aShell, + TopoDS_Shell& aShellNew) +{ + Standard_Boolean bIsProcessed1, bIsProcessed2; + Standard_Integer i, aNbE, aNbF, j; + TopAbs_Orientation anOrE1, anOrE2; + + TopTools_IndexedDataMapOfShapeListOfShape aEFMap; + TopTools_IndexedMapOfShape aProcessedFaces; + BRep_Builder aBB; + + aBB.MakeShell(aShellNew); + + TopExp::MapShapesAndAncestors(aShell, TopAbs_EDGE, TopAbs_FACE, aEFMap); + + aNbE=aEFMap.Extent(); + // + // One seam edge in aEFMap contains 2 equivalent faces. + for (i=1; i<=aNbE; i++) { + TopTools_ListOfShape& aLF=aEFMap.ChangeFromIndex(i); + + if (aLF.Extent()>1) { + TopTools_ListOfShape aLFTmp; + TopTools_IndexedMapOfShape aFM; + + TopTools_ListIteratorOfListOfShape anIt(aLF); + for (; anIt.More(); anIt.Next()) { + const TopoDS_Shape& aF=anIt.Value(); + if (!aFM.Contains(aF)) { + aFM.Add(aF); + aLFTmp.Append(aF); + } + } + aLF.Clear(); + aLF=aLFTmp; + } + } + // + // Do + for (i=1; i<=aNbE; i++) { + const TopoDS_Edge& aE=TopoDS::Edge(aEFMap.FindKey(i)); + + if (BRep_Tool::Degenerated(aE)) { + continue; + } + + const TopTools_ListOfShape& aLF=aEFMap.FindFromIndex(i); + aNbF=aLF.Extent(); + + if (aNbF==2) { + TopoDS_Face& aF1=TopoDS::Face(aLF.First()); + TopoDS_Face& aF2=TopoDS::Face(aLF.Last() ); + + + bIsProcessed1=aProcessedFaces.Contains(aF1); + bIsProcessed2=aProcessedFaces.Contains(aF2); + + if (bIsProcessed1 && bIsProcessed2) { + continue; + } + + if (!bIsProcessed1 && !bIsProcessed2) { + aProcessedFaces.Add(aF1); + aBB.Add(aShellNew, aF1); + + bIsProcessed1=!bIsProcessed1; + } + + // + TopoDS_Face aF1x, aF2x; + + aF1x=aF1; + if (bIsProcessed1) { + j=aProcessedFaces.FindIndex(aF1); + aF1x=TopoDS::Face(aProcessedFaces.FindKey(j)); + } + + aF2x=aF2; + if (bIsProcessed2) { + j=aProcessedFaces.FindIndex(aF2); + aF2x=TopoDS::Face(aProcessedFaces.FindKey(j)); + } + // + + anOrE1=NMTAlgo_Tools::Orientation(aE, aF1x); + anOrE2=NMTAlgo_Tools::Orientation(aE, aF2x); + + if (bIsProcessed1 && !bIsProcessed2) { + + if (anOrE1==anOrE2) { + if (!BRep_Tool::IsClosed(aE, aF1) && + !BRep_Tool::IsClosed(aE, aF2)) { + aF2.Reverse(); + } + } + aProcessedFaces.Add(aF2); + aBB.Add(aShellNew, aF2); + } + + else if (!bIsProcessed1 && bIsProcessed2) { + if (anOrE1==anOrE2) { + if (!BRep_Tool::IsClosed(aE, aF1) && + !BRep_Tool::IsClosed(aE, aF2)) { + aF1.Reverse(); + } + } + aProcessedFaces.Add(aF1); + aBB.Add(aShellNew, aF1); + } + } + } + // + // + for (i=1; i<=aNbE; i++) { + const TopoDS_Edge& aE=TopoDS::Edge(aEFMap.FindKey(i)); + + if (BRep_Tool::Degenerated(aE)) { + continue; + } + + const TopTools_ListOfShape& aLF=aEFMap.FindFromIndex(i); + aNbF=aLF.Extent(); + if (aNbF!=2) { + TopTools_ListIteratorOfListOfShape anIt(aLF); + for(; anIt.More(); anIt.Next()) { + const TopoDS_Face& aF=TopoDS::Face(anIt.Value()); + if (!aProcessedFaces.Contains(aF)) { + aProcessedFaces.Add(aF); + aBB.Add(aShellNew, aF); + } + } + } + } +} +//======================================================================= +//function : Orientation +//purpose : +//======================================================================= + TopAbs_Orientation NMTAlgo_Tools::Orientation(const TopoDS_Edge& anE, + const TopoDS_Face& aF) +{ + TopAbs_Orientation anOr=TopAbs_INTERNAL; + + TopExp_Explorer anExp; + anExp.Init(aF, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + const TopoDS_Edge& anEF1=TopoDS::Edge(anExp.Current()); + if (anEF1.IsSame(anE)) { + anOr=anEF1.Orientation(); + break; + } + } + return anOr; +} +//======================================================================= +//function : IsInside +//purpose : Return True if the first vertex of S1 inside S2. +// If S1.IsNull(), check infinite point against S2. +//======================================================================= + Standard_Boolean NMTAlgo_Tools::IsInside (const TopoDS_Shape& theS1, + const TopoDS_Shape& theS2) +{ + BRepClass3d_SolidClassifier aClassifier( theS2 ); + // + TopExp_Explorer expl(theS1, TopAbs_VERTEX); + // + if (!expl.More()){ + aClassifier.PerformInfinitePoint( ::RealSmall()); + } + else { + const TopoDS_Vertex & aVertex = TopoDS::Vertex( expl.Current() ); + aClassifier.Perform (BRep_Tool::Pnt( aVertex ), + BRep_Tool::Tolerance( aVertex )); + } + // + return ( aClassifier.State() == TopAbs_IN ); +} +//======================================================================= +//function : MakeShells +//purpose : +//======================================================================= + void NMTAlgo_Tools::MakeShells (const TopoDS_Shape& aFC, + TopTools_ListOfShape& aLNS) +{ + NMTAlgo_Loop3d aShellMaker; + TopTools_MapOfOrientedShape aMTmp; + // + aShellMaker.AddConstFaces(aFC); + aLNS=aShellMaker.MakeShells(aMTmp); +} +//======================================================================= +//function : MakeSolids +//purpose : +//======================================================================= + void NMTAlgo_Tools::MakeSolids(const TopoDS_Shape& aFC, + TopTools_ListOfShape& theShellList) +{ + NMTAlgo_Tools::MakeShells(aFC, theShellList); + NMTAlgo_Tools::MakeSolids(theShellList); +} +//======================================================================= +//function : MakeSolids +//purpose : +//======================================================================= + void NMTAlgo_Tools::MakeSolids(TopTools_ListOfShape& theShellList) +{ + TopTools_ListOfShape aHoleShells, aNewSolids; + TopoDS_Shape anInfinitePointShape; + TopTools_DataMapOfShapeShape aInOutMap; + TopTools_ListIteratorOfListOfShape aShellIt, aSolisIt; + BRep_Builder aBB; + // + aShellIt.Initialize(theShellList); + for ( ; aShellIt.More(); aShellIt.Next()) { + const TopoDS_Shape & aShell = aShellIt.Value(); + // check if a shell is a hole of theSolid + if (NMTAlgo_Tools::IsInside(anInfinitePointShape, aShell)){ + aHoleShells.Append(aShell); + } + else { + // make a solid from a shell + TopoDS_Solid Solid; + aBB.MakeSolid( Solid ); + aBB.Add (Solid, aShell); + aNewSolids.Append (Solid); + } + } + // + // find outer a shell most close to each hole shell + aShellIt.Initialize(aHoleShells); + for (; aShellIt.More(); aShellIt.Next()){ + const TopoDS_Shape & aHole = aShellIt.Value(); + // + aSolisIt.Initialize(aNewSolids); + for ( ; aSolisIt.More(); aSolisIt.Next()) { + const TopoDS_Shape & aSolid = aSolisIt.Value(); + // + if (! NMTAlgo_Tools::IsInside(aHole, aSolid)){ + continue; + } + // + if ( aInOutMap.IsBound (aHole)){ + const TopoDS_Shape & aSolid2 = aInOutMap( aHole ); + if ( IsInside( aSolid, aSolid2 )) { + aInOutMap.UnBind( aHole ); + aInOutMap.Bind ( aHole, aSolid ); + } + } + else{ + aInOutMap.Bind (aHole, aSolid); + } + } + // + // add aHole to a solid + if (aInOutMap.IsBound( aHole )){ + TopoDS_Shape & aSolid=aInOutMap(aHole); + aBB.Add (aSolid, aHole); + } + } + theShellList.Clear(); + theShellList.Append( aNewSolids ); +} +//======================================================================= +//function : BreakWebs +//purpose : +//======================================================================= + void NMTAlgo_Tools::BreakWebs(const TopoDS_Shape& aCS, + TopoDS_Shape& aCSR) +{ + Standard_Integer i, aNbF, aNbS; + TopTools_IndexedDataMapOfShapeListOfShape aMFS; + TopTools_MapOfShape aMF; + + TopoDS_Compound aFC, aCR; + BRep_Builder aBB; + // + aBB.MakeCompound(aFC); + TopExp::MapShapesAndAncestors(aCS, TopAbs_FACE, TopAbs_SOLID, aMFS); + // + aNbF=aMFS.Extent(); + for (i=1; i<=aNbF; ++i) { + const TopoDS_Shape& aF=aMFS.FindKey(i); + const TopTools_ListOfShape& aLS=aMFS(i); + aNbS=aLS.Extent(); + if (aNbS==2) { + aMF.Add(aF); + } + else { + aBB.Add(aFC, aF); + } + } + // + if (!aMF.Extent()) { + aCSR=aCS; + return; + } + // + TopTools_ListOfShape aLNS; + TopTools_ListIteratorOfListOfShape aItS; + // + NMTAlgo_Tools::MakeShells(aFC, aLNS); + NMTAlgo_Tools::MakeSolids(aLNS); + // + aBB.MakeCompound(aCR); + aItS.Initialize(aLNS); + for ( ;aItS.More(); aItS.Next()) { + const TopoDS_Shape& aS=aItS.Value(); + aBB.Add(aCR, aS); + } + aCSR=aCR; +} +//======================================================================= +//function : FindImageSolid +//purpose : +//======================================================================= + Standard_Boolean NMTAlgo_Tools::FindImageSolid(const TopoDS_Shape& aFC, + const TopTools_IndexedMapOfShape& aMSo, + TopoDS_Shape& aSox) +{ + Standard_Boolean bFound=Standard_False; + Standard_Integer i, j, aNbSo, aNbF, aNbFSo; + TopoDS_Iterator aIt; + TopTools_IndexedMapOfShape aMFC, aMFSo; + // + aIt.Initialize(aFC); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aF=aIt.Value(); + aMFC.Add(aF); + } + // + aNbF=aMFC.Extent(); + aNbSo=aMSo.Extent(); + for (i=1; i<=aNbSo; ++i) { + const TopoDS_Shape& aSo=aMSo(i); + // + bFound=Standard_True; + aMFSo.Clear(); + TopExp::MapShapes(aSo, TopAbs_FACE, aMFSo); + // + aNbFSo=aMFSo.Extent(); + if (aNbFSo!=aNbF) { + continue; + } + // + for (j=1; j<=aNbFSo; ++j) { + const TopoDS_Shape& aFSo=aMFSo(j); + if (!aMFC.Contains(aFSo)) { + bFound=Standard_False; + break; + } + } + if (bFound) { + aSox=aSo; + return bFound; + } + } + return bFound; +} diff --git a/src/NMTAlgo/NMTAlgo_Tools.hxx b/src/NMTAlgo/NMTAlgo_Tools.hxx new file mode 100644 index 000000000..78e211eb0 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Tools.hxx @@ -0,0 +1,105 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTAlgo_Tools_HeaderFile +#define _NMTAlgo_Tools_HeaderFile + +#ifndef _TopAbs_Orientation_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class TopoDS_Shell; +class TopoDS_Face; +class TopoDS_Edge; +class TopoDS_Shape; +class TopTools_ListOfShape; +class TopTools_IndexedMapOfShape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTAlgo_Tools { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT static void OrientFacesOnShell(const TopoDS_Shell& aShell,TopoDS_Shell& aShellNew) ; +Standard_EXPORT static void OrientFacesOnShell(const TopoDS_Face& aF,TopoDS_Shell& aSh) ; +Standard_EXPORT static TopAbs_Orientation Orientation(const TopoDS_Edge& aE,const TopoDS_Face& aF) ; +Standard_EXPORT static Standard_Integer Sense(const TopoDS_Face& aF1,const TopoDS_Face& aF2) ; +Standard_EXPORT static Standard_Boolean IsInside(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) ; +Standard_EXPORT static void MakeShells(const TopoDS_Shape& aFC,TopTools_ListOfShape& aLS) ; +Standard_EXPORT static void MakeSolids(TopTools_ListOfShape& aLS) ; +Standard_EXPORT static void MakeSolids(const TopoDS_Shape& aFC,TopTools_ListOfShape& aLS) ; +Standard_EXPORT static void BreakWebs(const TopoDS_Shape& aS1,TopoDS_Shape& aS2) ; +Standard_EXPORT static Standard_Boolean FindImageSolid(const TopoDS_Shape& aFC,const TopTools_IndexedMapOfShape& aMSo,TopoDS_Shape& aSo) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTAlgo/NMTAlgo_Tools.ixx b/src/NMTAlgo/NMTAlgo_Tools.ixx new file mode 100644 index 000000000..63e0dbaca --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Tools.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTAlgo/NMTAlgo_Tools.jxx b/src/NMTAlgo/NMTAlgo_Tools.jxx new file mode 100644 index 000000000..ce06e1a68 --- /dev/null +++ b/src/NMTAlgo/NMTAlgo_Tools.jxx @@ -0,0 +1,21 @@ +#ifndef _TopoDS_Shell_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _NMTAlgo_Tools_HeaderFile +#include +#endif diff --git a/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx new file mode 100644 index 000000000..b97122941 --- /dev/null +++ b/src/NMTDS/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger); + +class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {} + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() + { + return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); + } + + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const + { + return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); + + Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx new file mode 100644 index 000000000..7ea8762ea --- /dev/null +++ b/src/NMTDS/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors); + +class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {} + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() + { + return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); + } + + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const + { + return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); + + Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTDS/Makefile.in b/src/NMTDS/Makefile.in new file mode 100644 index 000000000..7bba78233 --- /dev/null +++ b/src/NMTDS/Makefile.in @@ -0,0 +1,72 @@ +# GEOM NMTAlgo : partition algorithm +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ + + +@COMMENCE@ + +# Libraries targets +LIB = libNMTDS.la + +LIB_SRC = \ + NMTDS_CArray1OfIndexRange_0.cxx \ + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \ + NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx \ + NMTDS_IndexRange.cxx \ + NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ + NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx \ + NMTDS_ShapesDataStructure.cxx + +LIB_CLIENT_IDL = +LIB_SERVER_IDL = + +# header files +EXPORT_HEADERS = \ + NMTDS_ShapesDataStructure.hxx \ + NMTDS_PShapesDataStructure.hxx \ + NMTDS_CArray1OfIndexRange.hxx \ + NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx \ + Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx + +# idl files +EXPORT_IDLS= + + +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +LDFLAGS += $(CAS_LDPATH) -lTKBool -lTKBO -L${KERNEL_ROOT_DIR}/lib/salome + +%_moc.cxx: %.h + $(MOC) $< -o $@ + +@CONCLUDE@ diff --git a/src/NMTDS/NMTDS.cdl b/src/NMTDS/NMTDS.cdl new file mode 100644 index 000000000..19f4c097f --- /dev/null +++ b/src/NMTDS/NMTDS.cdl @@ -0,0 +1,39 @@ +-- File: NMTDS.cdl +-- Created: Fri Nov 28 10:13:19 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +package NMTDS + + ---Purpose: + +uses + + TCollection, + TColStd, + Bnd, + TopoDS, + TopAbs, + TopTools, + BooleanOperations, + BOPTColStd +is + class ShapesDataStructure; + class IndexRange; + + pointer PShapesDataStructure to ShapesDataStructure from NMTDS; + + class CArray1OfIndexRange instantiates + CArray1 from BOPTColStd(IndexRange from NMTDS); + + class ListOfIndexedDataMapOfShapeAncestorsSuccessors instantiates + List from TCollection(IndexedDataMapOfShapeAncestorsSuccessors from BooleanOperations); + + class IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger instantiates + IndexedDataMap from TCollection(Integer from Standard, + IndexedDataMapOfShapeInteger from BooleanOperations, + MapIntegerHasher from TColStd); + +end NMTDS; diff --git a/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx b/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx new file mode 100644 index 000000000..ad5d74299 --- /dev/null +++ b/src/NMTDS/NMTDS_CArray1OfIndexRange.hxx @@ -0,0 +1,132 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile +#define _NMTDS_CArray1OfIndexRange_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_OutOfRange; +class Standard_OutOfMemory; +class NMTDS_IndexRange; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTDS_CArray1OfIndexRange { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTDS_CArray1OfIndexRange(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5); +Standard_EXPORT void Resize(const Standard_Integer theNewLength) ; +Standard_EXPORT void Destroy() ; +~NMTDS_CArray1OfIndexRange() +{ + Destroy(); +} + +Standard_EXPORT Standard_Integer Length() const; +Standard_EXPORT Standard_Integer Extent() const; +Standard_EXPORT Standard_Integer FactLength() const; +Standard_EXPORT Standard_Integer Append(const NMTDS_IndexRange& Value) ; +Standard_EXPORT void Remove(const Standard_Integer Index) ; +Standard_EXPORT const NMTDS_IndexRange& Value(const Standard_Integer Index) const; + const NMTDS_IndexRange& operator ()(const Standard_Integer Index) const +{ + return Value(Index); +} + +Standard_EXPORT NMTDS_IndexRange& ChangeValue(const Standard_Integer Index) ; + NMTDS_IndexRange& operator ()(const Standard_Integer Index) +{ + return ChangeValue(Index); +} + +Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ; +Standard_EXPORT Standard_Integer BlockLength() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTDS_CArray1OfIndexRange(const NMTDS_CArray1OfIndexRange& AnArray); +Standard_EXPORT NMTDS_CArray1OfIndexRange& Assign(const NMTDS_CArray1OfIndexRange& Other) ; + NMTDS_CArray1OfIndexRange& operator =(const NMTDS_CArray1OfIndexRange& Other) +{ + return Assign(Other); +} + +Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const; + + + // Fields PRIVATE + // +Standard_Address myStart; +Standard_Integer myLength; +Standard_Integer myFactLength; +Standard_Integer myBlockLength; +Standard_Boolean myIsAllocated; + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx b/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx new file mode 100644 index 000000000..c6bf6ef6e --- /dev/null +++ b/src/NMTDS/NMTDS_CArray1OfIndexRange_0.cxx @@ -0,0 +1,33 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_OutOfMemory_HeaderFile +#include +#endif +#ifndef _NMTDS_IndexRange_HeaderFile +#include +#endif + + +#define Array1Item NMTDS_IndexRange +#define Array1Item_hxx +#define BOPTColStd_CArray1 NMTDS_CArray1OfIndexRange +#define BOPTColStd_CArray1_hxx +#include + diff --git a/src/NMTDS/NMTDS_IndexRange.cdl b/src/NMTDS/NMTDS_IndexRange.cdl new file mode 100644 index 000000000..6ffa3b86b --- /dev/null +++ b/src/NMTDS/NMTDS_IndexRange.cdl @@ -0,0 +1,39 @@ +-- File: NMTDS_IndexRange.cdl +-- Created: Fri Nov 28 10:31:05 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class IndexRange from NMTDS + + ---Purpose: + +--uses +--raises + +is + Create + returns IndexRange from NMTDS; + + SetFirst(me:out; + aFirst:Integer from Standard); + + SetLast(me:out; + aLast:Integer from Standard); + + First(me) + returns Integer from Standard; + + Last(me) + returns Integer from Standard; + + IsInRange(me; + aIndex:Integer from Standard) + returns Boolean from Standard; + +fields + myFirst : Integer from Standard is protected; + myLast : Integer from Standard is protected; + +end IndexRange; diff --git a/src/NMTDS/NMTDS_IndexRange.cxx b/src/NMTDS/NMTDS_IndexRange.cxx new file mode 100644 index 000000000..fc406ac30 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexRange.cxx @@ -0,0 +1,57 @@ +// File: NMTDS_IndexRange.cxx +// Created: Fri Nov 28 10:34:59 2003 +// Author: Peter KURNEV +// + + +#include +//======================================================================= +//function :NMTDS_IndexRange::NMTDS_IndexRange +//purpose : +//======================================================================= + NMTDS_IndexRange::NMTDS_IndexRange() +: + myFirst(0), + myLast(0) +{ +} +//======================================================================= +//function :SetFirst +//purpose : +//======================================================================= + void NMTDS_IndexRange::SetFirst(const Standard_Integer aFirst) +{ + myFirst=aFirst; +} +//======================================================================= +//function :First +//purpose : +//======================================================================= + Standard_Integer NMTDS_IndexRange::First()const +{ + return myFirst; +} +//======================================================================= +//function :SetLast +//purpose : +//======================================================================= + void NMTDS_IndexRange::SetLast(const Standard_Integer aLast) +{ + myLast=aLast; +} +//======================================================================= +//function :Last +//purpose : +//======================================================================= + Standard_Integer NMTDS_IndexRange::Last()const +{ + return myLast; +} +//======================================================================= +//function :IsInRange +//purpose : +//======================================================================= + Standard_Boolean NMTDS_IndexRange::IsInRange(const Standard_Integer aIndex)const +{ + return (Standard_Boolean)(aIndex>=myFirst && aIndex<=myLast); +} diff --git a/src/NMTDS/NMTDS_IndexRange.hxx b/src/NMTDS/NMTDS_IndexRange.hxx new file mode 100644 index 000000000..76984233d --- /dev/null +++ b/src/NMTDS/NMTDS_IndexRange.hxx @@ -0,0 +1,94 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTDS_IndexRange_HeaderFile +#define _NMTDS_IndexRange_HeaderFile + +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTDS_IndexRange { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTDS_IndexRange(); +Standard_EXPORT void SetFirst(const Standard_Integer aFirst) ; +Standard_EXPORT void SetLast(const Standard_Integer aLast) ; +Standard_EXPORT Standard_Integer First() const; +Standard_EXPORT Standard_Integer Last() const; +Standard_EXPORT Standard_Boolean IsInRange(const Standard_Integer aIndex) const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +Standard_Integer myFirst; +Standard_Integer myLast; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_IndexRange.ixx b/src/NMTDS/NMTDS_IndexRange.ixx new file mode 100644 index 000000000..0f8218223 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexRange.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTDS/NMTDS_IndexRange.jxx b/src/NMTDS/NMTDS_IndexRange.jxx new file mode 100644 index 000000000..6c8407321 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexRange.jxx @@ -0,0 +1,3 @@ +#ifndef _NMTDS_IndexRange_HeaderFile +#include +#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx new file mode 100644 index 000000000..18d90fc36 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -0,0 +1,136 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#define _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#include +#endif + +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +class BooleanOperations_IndexedDataMapOfShapeInteger; +class TColStd_MapIntegerHasher; +class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; + + +class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer& K1,const Standard_Integer K2,const BooleanOperations_IndexedDataMapOfShapeInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + Standard_Integer& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + BooleanOperations_IndexedDataMapOfShapeInteger& Value() const; +Standard_EXPORT ~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Integer myKey1; +Standard_Integer myKey2; +BooleanOperations_IndexedDataMapOfShapeInteger myValue; +TCollection_MapNodePtr myNext2; + + +}; + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() +#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMap_hxx + +#include + +#undef TheKey +#undef TheKey_hxx +#undef TheItem +#undef TheItem_hxx +#undef Hasher +#undef Hasher_hxx +#undef TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_hxx +#undef Handle_TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_Type_ +#undef TCollection_IndexedDataMap +#undef TCollection_IndexedDataMap_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx new file mode 100644 index 000000000..a69179f00 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx @@ -0,0 +1,93 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger", + sizeof(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger))) { + _anOtherObject = Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)((Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::DynamicType() const +{ + return STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) ; +} +Standard_Boolean NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger::~Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() {} +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() +#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx new file mode 100644 index 000000000..94e036470 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -0,0 +1,133 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#define _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_OutOfRange; +class Standard_NoSuchObject; +class BooleanOperations_IndexedDataMapOfShapeInteger; +class TColStd_MapIntegerHasher; +class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger : public TCollection_BasicMap { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const Standard_Integer NbBuckets = 1); +Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Assign(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other) ; + NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& operator =(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other) +{ + return Assign(Other); +} + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +Standard_EXPORT void Clear() ; +~NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger() +{ + Clear(); +} + +Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& I) ; +Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const BooleanOperations_IndexedDataMapOfShapeInteger& T) ; +Standard_EXPORT void RemoveLast() ; +Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const; +Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const; +Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromIndex(const Standard_Integer I) const; + const BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I) const +{ + return FindFromIndex(I); +} + +Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromIndex(const Standard_Integer I) ; + BooleanOperations_IndexedDataMapOfShapeInteger& operator ()(const Standard_Integer I) +{ + return ChangeFromIndex(I); +} + +Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const; +Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& FindFromKey(const Standard_Integer& K) const; +Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeInteger& ChangeFromKey(const Standard_Integer& K) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger(const NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx new file mode 100644 index 000000000..f3a1280e0 --- /dev/null +++ b/src/NMTDS/NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_0.cxx @@ -0,0 +1,50 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_DomainError_HeaderFile +#include +#endif +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#include +#endif + + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem BooleanOperations_IndexedDataMapOfShapeInteger +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMapNode_Type_() NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_Type_() +#define TCollection_IndexedDataMap NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx new file mode 100644 index 000000000..9994af005 --- /dev/null +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -0,0 +1,124 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoMoreObject; +class Standard_NoSuchObject; +class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; +class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; +class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors(); +Standard_EXPORT NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L); +Standard_EXPORT void Initialize(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& L) ; + Standard_Boolean More() const; +Standard_EXPORT void Next() ; +Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const; + + +friend class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Address current; +Standard_Address previous; + + +}; + +#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors +#define Item_hxx +#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx new file mode 100644 index 000000000..bca4ea7df --- /dev/null +++ b/src/NMTDS/NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -0,0 +1,45 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_NoMoreObject_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif + + +#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors +#define Item_hxx +#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_List_hxx +#include + diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx new file mode 100644 index 000000000..5de01f304 --- /dev/null +++ b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -0,0 +1,123 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif + +#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; +class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors; +class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; + + +class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,const TCollection_MapNodePtr& n); + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Value() const; +Standard_EXPORT ~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors myValue; + + +}; + +#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors +#define Item_hxx +#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx new file mode 100644 index 000000000..f7566ef5f --- /dev/null +++ b/src/NMTDS/NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -0,0 +1,91 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors", + sizeof(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors))) { + _anOtherObject = Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)((Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::DynamicType() const +{ + return STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) ; +} +Standard_Boolean NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors::~Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors() {} +#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors +#define Item_hxx +#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_List_hxx +#include + diff --git a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx new file mode 100644 index 000000000..600531c53 --- /dev/null +++ b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -0,0 +1,150 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define _NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; +class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors; +class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(); +Standard_EXPORT void Assign(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ; + void operator=(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) +{ + Assign(Other); +} + +Standard_EXPORT Standard_Integer Extent() const; +Standard_EXPORT void Clear() ; +~NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors() +{ + Clear(); +} + + Standard_Boolean IsEmpty() const; +Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ; +Standard_EXPORT void Prepend(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ; +Standard_EXPORT void Prepend(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ; +Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I) ; +Standard_EXPORT void Append(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& theIt) ; +Standard_EXPORT void Append(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other) ; +Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& First() const; +Standard_EXPORT BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& Last() const; +Standard_EXPORT void RemoveFirst() ; +Standard_EXPORT void Remove(NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; +Standard_EXPORT void InsertBefore(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; +Standard_EXPORT void InsertBefore(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; +Standard_EXPORT void InsertAfter(const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& I,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; +Standard_EXPORT void InsertAfter(NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other,NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors& It) ; + + +friend class NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors(const NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors& Other); + + + // Fields PRIVATE + // +Standard_Address myFirst; +Standard_Address myLast; + + +}; + +#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors +#define Item_hxx +#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx new file mode 100644 index 000000000..f4bdab6ef --- /dev/null +++ b/src/NMTDS/NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors_0.cxx @@ -0,0 +1,42 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif +#ifndef _NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#include +#endif + + +#define Item BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors +#define Item_hxx +#define TCollection_ListNode NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_ListNode_Type_() NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_Type_() +#define TCollection_List NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors +#define TCollection_List_hxx +#include + diff --git a/src/NMTDS/NMTDS_PShapesDataStructure.hxx b/src/NMTDS/NMTDS_PShapesDataStructure.hxx new file mode 100644 index 000000000..11b37cb09 --- /dev/null +++ b/src/NMTDS/NMTDS_PShapesDataStructure.hxx @@ -0,0 +1,22 @@ +// File generated by CPPExt (Pointer) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTDS_PShapesDataStructure_HeaderFile +#define _NMTDS_PShapesDataStructure_HeaderFile + +class NMTDS_ShapesDataStructure; + +typedef NMTDS_ShapesDataStructure* NMTDS_PShapesDataStructure; + +#endif diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cdl b/src/NMTDS/NMTDS_ShapesDataStructure.cdl new file mode 100644 index 000000000..23391971c --- /dev/null +++ b/src/NMTDS/NMTDS_ShapesDataStructure.cdl @@ -0,0 +1,56 @@ +-- File: NMTDS_ShapesDataStructure.cdl +-- Created: Mon Dec 1 10:17:05 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class ShapesDataStructure from NMTDS + inherits ShapesDataStructure from BooleanOperations + + ---Purpose: + +uses + Shape from TopoDS, + CArray1OfIndexRange from NMTDS, + IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS +--raises + +is + Create + returns ShapesDataStructure from NMTDS; + + SetCompositeShape(me:out; + aS:Shape from TopoDS); + + Init(me:out); + + Ranges(me) + returns CArray1OfIndexRange from NMTDS; + ---C++: return const & + + CompositeShape(me) + returns Shape from TopoDS; + ---C++: return const & + + ShapeRangeIndex(me; + aId:Integer from Standard) + returns Integer from Standard; + + Rank (me; + anIndex:Integer from Standard) + returns Integer from Standard + is redefined; + + ShapeIndex (me; + aS:Shape from TopoDS; + iRank:Integer from Standard) + returns Integer from Standard + is redefined; +fields + myCompositeShape: Shape from TopoDS is protected; + myRanges : CArray1OfIndexRange from NMTDS is protected; + myShapeIndexMap : IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger from NMTDS is protected; + +end ShapesDataStructure; + diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.cxx b/src/NMTDS/NMTDS_ShapesDataStructure.cxx new file mode 100644 index 000000000..6388a1655 --- /dev/null +++ b/src/NMTDS/NMTDS_ShapesDataStructure.cxx @@ -0,0 +1,226 @@ +// File: NMTDS_ShapesDataStructure.cxx +// Created: Mon Dec 1 10:21:04 2003 +// Author: Peter KURNEV +// + + +#include +#include +#include +#include +#include +#include +#include +#include + +//=========================================================================== +//function : NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure +//purpose : +//=========================================================================== + NMTDS_ShapesDataStructure::NMTDS_ShapesDataStructure() +: + BooleanOperations_ShapesDataStructure() +{} +//=========================================================================== +//function : SetCompositeShape +//purpose : +//=========================================================================== + void NMTDS_ShapesDataStructure::SetCompositeShape(const TopoDS_Shape& aS) +{ + myCompositeShape=aS; +} +//=========================================================================== +//function : CompositeShape +//purpose : +//=========================================================================== + const TopoDS_Shape& NMTDS_ShapesDataStructure::CompositeShape()const +{ + return myCompositeShape; +} +//=========================================================================== +//function : Ranges +//purpose : +//=========================================================================== + const NMTDS_CArray1OfIndexRange& NMTDS_ShapesDataStructure::Ranges()const +{ + return myRanges; +} +//=========================================================================== +//function : Init +//purpose : +//=========================================================================== + void NMTDS_ShapesDataStructure::Init() +{ + Standard_Integer i, j, aNbSx, aNbS, aShift, aNbRanges; + Standard_Integer iFirst, iLast; + NMTDS_ListOfIndexedDataMapOfShapeAncestorsSuccessors aLx; + NMTDS_ListIteratorOfListOfIndexedDataMapOfShapeAncestorsSuccessors aLit; + TopoDS_Iterator anIt; + // + aNbS=0; + anIt.Initialize(myCompositeShape); + for (i=0; anIt.More(); anIt.Next(), ++i) { + const TopoDS_Shape& aSx=anIt.Value(); + BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors aIndDatMapShape; + FillIndexedMapOfShapesAncestorsAndSuccessors(aSx, aIndDatMapShape); + aNbSx=aIndDatMapShape.Extent(); + aNbS+=aNbSx; + aLx.Append(aIndDatMapShape); + } + // + // Fill myRanges + myRanges.Resize(i); + aLit.Initialize(aLx); + for (i=1; aLit.More(); aLit.Next(), ++i) { + const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aM=aLit.Value(); + aNbSx=aM.Extent(); + if (i==1) { + iFirst=1; + iLast=aNbSx; + myRanges(i).SetFirst(iFirst); + myRanges(i).SetLast(iLast); + continue; + } + iFirst=myRanges(i-1).Last()+1; + iLast=iFirst+aNbSx-1; + myRanges(i).SetFirst(iFirst); + myRanges(i).SetLast(iLast); + } + // + myNumberOfShapesOfTheObject=aNbS; + myNumberOfShapesOfTheTool=aNbS; + myLength=3*aNbS; + // + // Allocate the whole Table + myListOfShapeAndInterferences = (BooleanOperations_PShapeAndInterferences) + Standard::Allocate(myLength*sizeof(BooleanOperations_ShapeAndInterferences)); + // + // Fill the table + for (i=0; i<2; ++i) { + aShift=0; + if (i) { + aShift=myNumberOfShapesOfTheObject; + } + aLit.Initialize(aLx); + for (; aLit.More(); aLit.Next()) { + const BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& aM=aLit.Value(); + aNbSx=aM.Extent(); + for (j=1; j<=aNbSx; ++j) { + const TopoDS_Shape& aSx=aM.FindKey(j); + const BooleanOperations_AncestorsSeqAndSuccessorsSeq& aASx=aM.FindFromIndex(j); + InsertShapeAndAncestorsSuccessors(aSx, aASx, aShift); + } + aShift+=aNbSx; + } + } + // + // myShapeIndexMap + myShapeIndexMap.Clear(); + // + aNbRanges=myRanges.Extent(); + for (i=1; i<=aNbRanges; ++i){ + BooleanOperations_IndexedDataMapOfShapeInteger aSIM; + // + const NMTDS_IndexRange& aR=myRanges(i); + iFirst=aR.First(); + iLast =aR.Last(); + for (j=iFirst; j<=iLast; ++j) { + const TopoDS_Shape& aS=GetShape(j); + aSIM.Add(aS, j); + } + myShapeIndexMap.Add(i, aSIM); + } + // + // myRefEdges + iLast=myNumberOfShapesOfTheObject+myNumberOfShapesOfTheTool; + myRefEdges.Resize(iLast); + + for (i=1; i<=iLast; ++i) { + const TopoDS_Shape& aS=Shape(i); + myRefEdges(i)=0; + if (aS.ShapeType()==TopAbs_EDGE) { + myNbEdges++; + myRefEdges(i)=myNbEdges; + } + } +} +//=========================================================================== +//function : ShapeRangeIndex +//purpose : +//=========================================================================== + Standard_Integer NMTDS_ShapesDataStructure::ShapeRangeIndex(const Standard_Integer aId)const +{ + Standard_Boolean bFound; + Standard_Integer i, aNbR, aIdx, aNbS, aZero=0; + // + aNbS=myNumberOfShapesOfTheObject+myNumberOfShapesOfTheTool; + + aIdx=aId; + if (aIdx > aNbS || aIdx < 1){ + return aZero; + } + // + if (aIdx > myNumberOfShapesOfTheObject) { + aIdx-=myNumberOfShapesOfTheObject; + } + // + aNbR=myRanges.Extent(); + for (i=1; i<=aNbR; ++i) { + const NMTDS_IndexRange& aRange=myRanges(i); + bFound=aRange.IsInRange(aIdx); + if (bFound) { + return i; + } + } + return aZero; +} +//=========================================================================== +//function : Rank +//purpose : +//=========================================================================== + Standard_Integer NMTDS_ShapesDataStructure::Rank(const Standard_Integer aId)const +{ + Standard_Boolean bFound; + Standard_Integer i, aNbR, aNbS, aZero=0; + // + aNbS=myNumberOfShapesOfTheObject; + + if (aId > aNbS || aId < 1){ + return aZero; + } + // + aNbR=myRanges.Extent(); + for (i=1; i<=aNbR; ++i) { + const NMTDS_IndexRange& aRange=myRanges(i); + bFound=aRange.IsInRange(aId); + if (bFound) { + return i; + } + } + return aZero; +} +//=========================================================================== +//function : ShapeIndex +//purpose : +//=========================================================================== + Standard_Integer NMTDS_ShapesDataStructure::ShapeIndex(const TopoDS_Shape& aS, + const Standard_Integer aRank)const +{ + Standard_Boolean bFound; + Standard_Integer aIndex=0; + // + bFound=myShapeIndexMap.Contains(aRank); + if (!bFound) { + return aIndex; + } + // + const BooleanOperations_IndexedDataMapOfShapeInteger& aSIM=myShapeIndexMap.FindFromKey(aRank); + // + bFound=aSIM.Contains(aS); + if (!bFound) { + return aIndex; + } + // + aIndex=aSIM.FindFromKey(aS); + return aIndex; +} diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.hxx b/src/NMTDS/NMTDS_ShapesDataStructure.hxx new file mode 100644 index 000000000..167ccc337 --- /dev/null +++ b/src/NMTDS/NMTDS_ShapesDataStructure.hxx @@ -0,0 +1,108 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTDS_ShapesDataStructure_HeaderFile +#define _NMTDS_ShapesDataStructure_HeaderFile + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile +#include +#endif +#ifndef _NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _BooleanOperations_ShapesDataStructure_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +class TopoDS_Shape; +class NMTDS_CArray1OfIndexRange; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTDS_ShapesDataStructure : public BooleanOperations_ShapesDataStructure { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTDS_ShapesDataStructure(); +Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ; +Standard_EXPORT void Init() ; +Standard_EXPORT const NMTDS_CArray1OfIndexRange& Ranges() const; +Standard_EXPORT const TopoDS_Shape& CompositeShape() const; +Standard_EXPORT Standard_Integer ShapeRangeIndex(const Standard_Integer aId) const; +Standard_EXPORT virtual Standard_Integer Rank(const Standard_Integer anIndex) const; +Standard_EXPORT virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,const Standard_Integer iRank) const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +TopoDS_Shape myCompositeShape; +NMTDS_CArray1OfIndexRange myRanges; +NMTDS_IndexedDataMapOfIntegerIndexedDataMapOfShapeInteger myShapeIndexMap; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.ixx b/src/NMTDS/NMTDS_ShapesDataStructure.ixx new file mode 100644 index 000000000..755a41624 --- /dev/null +++ b/src/NMTDS/NMTDS_ShapesDataStructure.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTDS/NMTDS_ShapesDataStructure.jxx b/src/NMTDS/NMTDS_ShapesDataStructure.jxx new file mode 100644 index 000000000..fc29ab68f --- /dev/null +++ b/src/NMTDS/NMTDS_ShapesDataStructure.jxx @@ -0,0 +1,9 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTDS_CArray1OfIndexRange_HeaderFile +#include +#endif +#ifndef _NMTDS_ShapesDataStructure_HeaderFile +#include +#endif diff --git a/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx b/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx new file mode 100644 index 000000000..b97122941 --- /dev/null +++ b/src/NMTTools/Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile +#define _Handle_NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger); + +class Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)():Handle(TCollection_MapNode)() {} + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)& operator=(const NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() + { + return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); + } + + NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger* operator->() const + { + return (NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger)(); + + Standard_EXPORT static const Handle(NMTDS_IndexedDataMapNodeOfIndexedDataMapOfIntegerIndexedDataMapOfShapeInteger) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx b/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx new file mode 100644 index 000000000..7ea8762ea --- /dev/null +++ b/src/NMTTools/Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile +#define _Handle_NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors); + +class Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)():Handle(TCollection_MapNode)() {} + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)& operator=(const NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() + { + return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); + } + + NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors* operator->() const + { + return (NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors)(); + + Standard_EXPORT static const Handle(NMTDS_ListNodeOfListOfIndexedDataMapOfShapeAncestorsSuccessors) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx new file mode 100644 index 000000000..17949ac4a --- /dev/null +++ b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile +#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger); + +class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)():Handle(TCollection_MapNode)() {} + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() + { + return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess(); + } + + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger* operator->() const + { + return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)(); + + Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx new file mode 100644 index 000000000..cbcf4a002 --- /dev/null +++ b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape); + +class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)():Handle(TCollection_MapNode)() {} + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() + { + return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess(); + } + + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape* operator->() const + { + return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)(); + + Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx new file mode 100644 index 000000000..8dfb499b2 --- /dev/null +++ b/src/NMTTools/Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile +#define _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock); + +class Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)():Handle(TCollection_MapNode)() {} + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& operator=(const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)& operator=(const NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() + { + return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess(); + } + + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock* operator->() const + { + return (NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)(); + + Standard_EXPORT static const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx new file mode 100644 index 000000000..a77311063 --- /dev/null +++ b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCommonBlock.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#define _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTTools_ListNodeOfListOfCommonBlock; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock); + +class Handle(NMTTools_ListNodeOfListOfCommonBlock) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTTools_ListNodeOfListOfCommonBlock)():Handle(TCollection_MapNode)() {} + Handle(NMTTools_ListNodeOfListOfCommonBlock)(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTTools_ListNodeOfListOfCommonBlock)(const NMTTools_ListNodeOfListOfCommonBlock* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTTools_ListNodeOfListOfCommonBlock)& operator=(const Handle(NMTTools_ListNodeOfListOfCommonBlock)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTTools_ListNodeOfListOfCommonBlock)& operator=(const NMTTools_ListNodeOfListOfCommonBlock* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTTools_ListNodeOfListOfCommonBlock* operator->() + { + return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess(); + } + + NMTTools_ListNodeOfListOfCommonBlock* operator->() const + { + return (NMTTools_ListNodeOfListOfCommonBlock *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCommonBlock)(); + + Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCommonBlock) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx new file mode 100644 index 000000000..66f885016 --- /dev/null +++ b/src/NMTTools/Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx @@ -0,0 +1,85 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#define _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile + +#ifndef _Standard_Macro_HeaderFile +#include +#endif +#ifndef _Standard_HeaderFile +#include +#endif + +#ifndef _Handle_TCollection_MapNode_HeaderFile +#include +#endif + +class Standard_Transient; +class Handle_Standard_Type; +class Handle(TCollection_MapNode); +class NMTTools_ListNodeOfListOfCoupleOfShape; +Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape); + +class Handle(NMTTools_ListNodeOfListOfCoupleOfShape) : public Handle(TCollection_MapNode) { + public: + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + Handle(NMTTools_ListNodeOfListOfCoupleOfShape)():Handle(TCollection_MapNode)() {} + Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) : Handle(TCollection_MapNode)(aHandle) + { + } + + Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(const NMTTools_ListNodeOfListOfCoupleOfShape* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) + { + } + + Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& operator=(const Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& aHandle) + { + Assign(aHandle.Access()); + return *this; + } + + Handle(NMTTools_ListNodeOfListOfCoupleOfShape)& operator=(const NMTTools_ListNodeOfListOfCoupleOfShape* anItem) + { + Assign((Standard_Transient *)anItem); + return *this; + } + + NMTTools_ListNodeOfListOfCoupleOfShape* operator->() + { + return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess(); + } + + NMTTools_ListNodeOfListOfCoupleOfShape* operator->() const + { + return (NMTTools_ListNodeOfListOfCoupleOfShape *)ControlAccess(); + } + + Standard_EXPORT ~Handle(NMTTools_ListNodeOfListOfCoupleOfShape)(); + + Standard_EXPORT static const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) DownCast(const Handle(Standard_Transient)& AnObject); +}; +#endif diff --git a/src/NMTTools/Makefile.in b/src/NMTTools/Makefile.in new file mode 100644 index 000000000..9d5cbe8c2 --- /dev/null +++ b/src/NMTTools/Makefile.in @@ -0,0 +1,103 @@ +# GEOM NMTTools : partition algorithm +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Julia DOROVSKIKH +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ + + +@COMMENCE@ + +# Libraries targets +LIB = libNMTTools.la +LIB_SRC = \ + NMTTools_CommonBlock.cxx \ + NMTTools_CommonBlockAPI.cxx \ + NMTTools_CommonBlockPool_0.cxx \ + NMTTools_CoupleOfShape.cxx \ + NMTTools_DEProcessor.cxx \ + NMTTools_DSFiller.cxx \ + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx \ + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx \ + NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx \ + NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx \ + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx \ + NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx \ + NMTTools_IteratorOfCoupleOfShape.cxx \ + NMTTools_ListIteratorOfListOfCommonBlock_0.cxx \ + NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx \ + NMTTools_ListNodeOfListOfCommonBlock_0.cxx \ + NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx \ + NMTTools_ListOfCommonBlock_0.cxx \ + NMTTools_ListOfCoupleOfShape_0.cxx \ + NMTTools_PaveFiller.cxx \ + NMTTools_PaveFiller_0.cxx \ + NMTTools_PaveFiller_1.cxx \ + NMTTools_PaveFiller_2.cxx \ + NMTTools_PaveFiller_3.cxx \ + NMTTools_PaveFiller_4.cxx \ + NMTTools_PaveFiller_5.cxx \ + NMTTools_PaveFiller_6.cxx \ + NMTTools_PaveFiller_7.cxx \ + NMTTools_PaveFiller_8.cxx \ + NMTTools_PaveFiller_9.cxx \ + NMTTools_PCurveMaker.cxx \ + NMTTools_Tools.cxx + +LIB_CLIENT_IDL = +LIB_SERVER_IDL = + +# header files +EXPORT_HEADERS = \ + NMTTools_PDSFiller.hxx \ + NMTTools_DSFiller.hxx \ + NMTTools_PPaveFiller.hxx \ + NMTTools_PaveFiller.hxx \ + NMTTools_ListOfCoupleOfShape.hxx \ + NMTTools_Tools.hxx \ + NMTTools_CoupleOfShape.hxx \ + NMTTools_ListIteratorOfListOfCoupleOfShape.hxx \ + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx \ + NMTTools_IteratorOfCoupleOfShape.hxx \ + NMTTools_CommonBlockPool.hxx \ + Handle_NMTTools_ListNodeOfListOfCoupleOfShape.hxx \ + Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx + +# idl files +EXPORT_IDLS= + + +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome +LDFLAGS += $(CAS_LDPATH) -lNMTDS -lTKBool -lTKBO -L${KERNEL_ROOT_DIR}/lib/salome + +%_moc.cxx: %.h + $(MOC) $< -o $@ + +@CONCLUDE@ diff --git a/src/NMTTools/NMTTools.cdl b/src/NMTTools/NMTTools.cdl new file mode 100644 index 000000000..78ba75d76 --- /dev/null +++ b/src/NMTTools/NMTTools.cdl @@ -0,0 +1,66 @@ +-- File: NMTTools.cdl +-- Created: Thu Dec 4 16:55:49 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +package NMTTools + + ---Purpose: + +uses + + TCollection, + TColStd, + gp, + TopAbs, + TopoDS, + TopTools, + Geom2d, + BooleanOperations, + BOPTColStd, + IntTools, + BOPTools, + + NMTDS + +is + class IteratorOfCoupleOfShape; + class DSFiller; + class PaveFiller; + class Tools; + class CommonBlock; + class CommonBlockAPI; + class PCurveMaker; + class DEProcessor; + class CoupleOfShape; + + pointer PPaveFiller to PaveFiller from NMTTools; + pointer PDSFiller to DSFiller from NMTTools; + + class ListOfCommonBlock instantiates + List from TCollection(CommonBlock from NMTTools); + + class CommonBlockPool instantiates + CArray1 from BOPTColStd (ListOfCommonBlock from NMTTools); + + class IndexedDataMapOfIndexedMapOfInteger instantiates + IndexedDataMap from TCollection (Integer from Standard, + IndexedMapOfInteger from TColStd, + MapIntegerHasher from TColStd); + + class IndexedDataMapOfShapePaveBlock instantiates + IndexedDataMap from TCollection (Shape from TopoDS, + PaveBlock from BOPTools, + ShapeMapHasher from TopTools); + + class IndexedDataMapOfShapeIndexedMapOfShape instantiates + IndexedDataMap from TCollection (Shape from TopoDS, + IndexedMapOfShape from TopTools, + ShapeMapHasher from TopTools); + + class ListOfCoupleOfShape instantiates + List from TCollection(CoupleOfShape from NMTTools); + +end NMTTools; diff --git a/src/NMTTools/NMTTools_CommonBlock.cdl b/src/NMTTools/NMTTools_CommonBlock.cdl new file mode 100644 index 000000000..5971991f6 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlock.cdl @@ -0,0 +1,88 @@ +-- File: NMTTools_CommonBlock.cdl +-- Created: Tue Dec 9 12:11:48 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class CommonBlock from NMTTools + + ---Purpose: + +uses + ListOfInteger from TColStd, + PaveBlock from BOPTools, + ListOfPaveBlock from BOPTools + +--raises + +is + Create + returns CommonBlock from NMTTools; + + AddPaveBlock(me:out; + aPB : PaveBlock from BOPTools); + + AddFace(me:out; + aF : Integer from Standard); + + AddFaces(me:out; + aLF: ListOfInteger from TColStd); + + PaveBlocks(me) + returns ListOfPaveBlock from BOPTools; + ---C++: return const & + + Faces (me) + returns ListOfInteger from TColStd; + ---C++: return const & + + PaveBlock1 (me) + returns PaveBlock from BOPTools; + ---C++: return const & + + PaveBlock1 (me:out; + anIx: Integer from Standard) + returns PaveBlock from BOPTools; + ---C++: return & + + PaveBlockOnEdge (me:out; + anIndex: Integer from Standard) + returns PaveBlock from BOPTools; + ---C++: return & + + IsPaveBlockOnFace (me; + anIndex: Integer from Standard) + returns Boolean from Standard; + + IsPaveBlockOnEdge (me; + anIndex: Integer from Standard) + returns Boolean from Standard; + + IsEqual (me; + aCB:CommonBlock from NMTTools) + returns Boolean from Standard; + + Contains(me; + aPB:PaveBlock from BOPTools) + returns Boolean from Standard; + +-- SetEdge (me:out; +-- anEdge:Integer from Standard); + +-- Edge (me) +-- returns Integer from Standard; + +fields + myPaveBlocks: ListOfPaveBlock from BOPTools is protected; + myFaces : ListOfInteger from TColStd is protected; + +end CommonBlock; + + + + + + + + diff --git a/src/NMTTools/NMTTools_CommonBlock.cxx b/src/NMTTools/NMTTools_CommonBlock.cxx new file mode 100644 index 000000000..80ab56142 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlock.cxx @@ -0,0 +1,227 @@ +// File: NMTTools_CommonBlock.cxx +// Created: Tue Dec 9 12:23:29 2003 +// Author: Peter KURNEV +// + + +#include + +#include +#include + +//======================================================================= +// function: NMTTools_CommonBlock::NMTTools_CommonBlock() +// purpose: +//======================================================================= + NMTTools_CommonBlock::NMTTools_CommonBlock() +{ +} +//======================================================================= +// function: AddPaveBlock +// purpose: +//======================================================================= + void NMTTools_CommonBlock::AddPaveBlock(const BOPTools_PaveBlock& aPB) +{ + myPaveBlocks.Append(aPB); +} +//======================================================================= +// function: AddFace +// purpose: +//======================================================================= + void NMTTools_CommonBlock::AddFace(const Standard_Integer aF) +{ + myFaces.Append(aF); +} +//======================================================================= +// function: AddFaces +// purpose: +//======================================================================= + void NMTTools_CommonBlock::AddFaces(const TColStd_ListOfInteger& aLF) +{ + TColStd_ListIteratorOfListOfInteger aIt(aLF); + // + for (; aIt.More(); aIt.Next()) { + myFaces.Append(aIt.Value()); + } +} +//======================================================================= +// function: PaveBlocks +// purpose: +//======================================================================= + const BOPTools_ListOfPaveBlock& NMTTools_CommonBlock::PaveBlocks()const +{ + return myPaveBlocks; +} +//======================================================================= +// function: Faces +// purpose: +//======================================================================= + const TColStd_ListOfInteger& NMTTools_CommonBlock::Faces()const +{ + return myFaces; +} +//======================================================================= +// function: PaveBlock1 +// purpose: +//======================================================================= + const BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1()const +{ + return myPaveBlocks.First(); +} +//======================================================================= +// function: PaveBlock1 +// purpose: +//======================================================================= + BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlock1(const Standard_Integer aIx) +{ + return PaveBlockOnEdge(aIx); +} +//======================================================================= +// function: PaveBlockOnEdge +// purpose: +//======================================================================= + BOPTools_PaveBlock& NMTTools_CommonBlock::PaveBlockOnEdge(const Standard_Integer aIx) +{ + static BOPTools_PaveBlock aPBs; + Standard_Integer aIOr; + BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks); + // + for (; anIt.More(); anIt.Next()) { + BOPTools_PaveBlock& aPB=anIt.Value(); + aIOr=aPB.OriginalEdge(); + if (aIOr==aIx){ + return aPB; + } + } + return aPBs; +} +//======================================================================= +// function: IsPaveBlockOnFace +// purpose: +//======================================================================= + Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnFace(const Standard_Integer aIx)const +{ + Standard_Boolean bFound=Standard_False; + Standard_Integer nF; + TColStd_ListIteratorOfListOfInteger anIt(myFaces); + // + for (; anIt.More(); anIt.Next()) { + nF=anIt.Value(); + if (nF==aIx){ + return !bFound; + } + } + return bFound; +} +//======================================================================= +// function: IsPaveBlockOnEdge +// purpose: +//======================================================================= + Standard_Boolean NMTTools_CommonBlock::IsPaveBlockOnEdge(const Standard_Integer aIx)const +{ + Standard_Boolean bFound=Standard_False; + Standard_Integer aIOr; + BOPTools_ListIteratorOfListOfPaveBlock anIt(myPaveBlocks); + // + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + aIOr=aPB.OriginalEdge(); + if (aIOr==aIx){ + return !bFound; + } + } + return bFound; +} +//======================================================================= +// function: IsEqual +// purpose: +//======================================================================= + Standard_Boolean NMTTools_CommonBlock::IsEqual(const NMTTools_CommonBlock& aOther)const +{ + Standard_Boolean bFound=Standard_True; + Standard_Integer aNb1, aNb2; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + aNb1=myPaveBlocks.Extent(); + aNb2=aOther.myPaveBlocks.Extent(); + // + if (!aNb1 && !aNb2) { + return bFound; + } + if (!aNb1) { + return !bFound; + } + if (!aNb2) { + return !bFound; + } + // + const BOPTools_PaveBlock& aPB=PaveBlock1(); + // + anIt.Initialize(aOther.myPaveBlocks); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPBOther=anIt.Value(); + if (aPB.IsEqual(aPBOther)){ + return bFound; + } + } + return !bFound; +} +//======================================================================= +// function: Contains +// purpose: +//======================================================================= + Standard_Boolean NMTTools_CommonBlock::Contains(const BOPTools_PaveBlock& aPBx)const +{ + Standard_Boolean bFound=Standard_False; + Standard_Integer aNb1; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + aNb1=myPaveBlocks.Extent(); + // + if (!aNb1) { + return bFound; + } + // + anIt.Initialize(myPaveBlocks); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + if (aPB.IsEqual(aPBx)) { + return !bFound; + } + } + return bFound; +} +/* +//======================================================================= +// function: SetEdge +// purpose: +//======================================================================= + void NMTTools_CommonBlock::SetEdge(const Standard_Integer anEdge) +{ + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + anIt.Initialize(myPaveBlocks); + for (; anIt.More(); anIt.Next()) { + BOPTools_PaveBlock& aPB=anIt.Value(); + aPB.SetEdge(anEdge); + } +} +//======================================================================= +// function: Edge +// purpose: +//======================================================================= + Standard_Integer NMTTools_CommonBlock::Edge()const +{ + Standard_Integer aNb; + // + aNb=myPaveBlocks.Extent(); + // + if (!aNb) { + return aNb; + } + // + const BOPTools_PaveBlock& aPB=PaveBlock1(); + aNb=aPB.Edge(); + return aNb; +} +*/ diff --git a/src/NMTTools/NMTTools_CommonBlock.hxx b/src/NMTTools/NMTTools_CommonBlock.hxx new file mode 100644 index 000000000..4964ae8ea --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlock.hxx @@ -0,0 +1,110 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_CommonBlock_HeaderFile +#define _NMTTools_CommonBlock_HeaderFile + +#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#endif +#ifndef _TColStd_ListOfInteger_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class BOPTools_PaveBlock; +class TColStd_ListOfInteger; +class BOPTools_ListOfPaveBlock; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_CommonBlock { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_CommonBlock(); +Standard_EXPORT void AddPaveBlock(const BOPTools_PaveBlock& aPB) ; +Standard_EXPORT void AddFace(const Standard_Integer aF) ; +Standard_EXPORT void AddFaces(const TColStd_ListOfInteger& aLF) ; +Standard_EXPORT const BOPTools_ListOfPaveBlock& PaveBlocks() const; +Standard_EXPORT const TColStd_ListOfInteger& Faces() const; +Standard_EXPORT const BOPTools_PaveBlock& PaveBlock1() const; +Standard_EXPORT BOPTools_PaveBlock& PaveBlock1(const Standard_Integer anIx) ; +Standard_EXPORT BOPTools_PaveBlock& PaveBlockOnEdge(const Standard_Integer anIndex) ; +Standard_EXPORT Standard_Boolean IsPaveBlockOnFace(const Standard_Integer anIndex) const; +Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge(const Standard_Integer anIndex) const; +Standard_EXPORT Standard_Boolean IsEqual(const NMTTools_CommonBlock& aCB) const; +Standard_EXPORT Standard_Boolean Contains(const BOPTools_PaveBlock& aPB) const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +BOPTools_ListOfPaveBlock myPaveBlocks; +TColStd_ListOfInteger myFaces; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_CommonBlock.ixx b/src/NMTTools/NMTTools_CommonBlock.ixx new file mode 100644 index 000000000..334b58a7d --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlock.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_CommonBlock.jxx b/src/NMTTools/NMTTools_CommonBlock.jxx new file mode 100644 index 000000000..dc32fca23 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlock.jxx @@ -0,0 +1,12 @@ +#ifndef _BOPTools_PaveBlock_HeaderFile +#include +#endif +#ifndef _TColStd_ListOfInteger_HeaderFile +#include +#endif +#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.cdl b/src/NMTTools/NMTTools_CommonBlockAPI.cdl new file mode 100644 index 000000000..63d08dc71 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockAPI.cdl @@ -0,0 +1,54 @@ +-- File: NMTTools_CommonBlockAPI.cdl +-- Created: Mon Dec 15 11:35:46 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class CommonBlockAPI from NMTTools + + ---Purpose: + +uses + ListOfCommonBlock from NMTTools, + ListOfPaveBlock from BOPTools, + PaveBlock from BOPTools, + CommonBlock from NMTTools + +--raises + +is + Create (aList:ListOfCommonBlock from NMTTools) + returns CommonBlockAPI from NMTTools; + + List(me) + returns ListOfCommonBlock from NMTTools; + ---C++: return const & + ---Purpose: + --- Selector + --- + CommonPaveBlocks(me; + anE:Integer from Standard) + returns ListOfPaveBlock from BOPTools; + ---C++: return const & + ---Purpose: + --- Returns all PaveBlock-s (from the list) that are + --- common for the given edge with DS-index + --- + IsCommonBlock (me; + aPB: PaveBlock from BOPTools) + returns Boolean from Standard; + ---Purpose: + --- Returns TRUE if given PaveBlock is + --- common for the Blocks from the list + + CommonBlock(me; + aPB: PaveBlock from BOPTools) + returns CommonBlock from NMTTools; + ---C++: return & + +fields + myListOfCommonBlock :Address from Standard; + myListOfPaveBlock :ListOfPaveBlock from BOPTools; + +end CommonBlockAPI; diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.cxx b/src/NMTTools/NMTTools_CommonBlockAPI.cxx new file mode 100644 index 000000000..ceb097361 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockAPI.cxx @@ -0,0 +1,114 @@ +// File: NMTTools_CommonBlockAPI.cxx +// Created: Mon Dec 15 11:38:04 2003 +// Author: Peter KURNEV +// + + +#include + +#include +#include +#include + +#include +#include +#include + +//======================================================================= +// function: NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI +// purpose: +//======================================================================= + NMTTools_CommonBlockAPI::NMTTools_CommonBlockAPI (const NMTTools_ListOfCommonBlock& aLCB) +{ + myListOfCommonBlock=(void *)&aLCB; +} +//======================================================================= +// function: List +// purpose: +//======================================================================= + const NMTTools_ListOfCommonBlock& NMTTools_CommonBlockAPI::List () const +{ + NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock; + return *pListOfCommonBlock; +} +//======================================================================= +// function: CommonPaveBlocks +// purpose: get all CommonPaveBlocks +//======================================================================= + const BOPTools_ListOfPaveBlock& NMTTools_CommonBlockAPI::CommonPaveBlocks(const Standard_Integer anE) const +{ + Standard_Integer anECurrent; + BOPTools_ListIteratorOfListOfPaveBlock anItPB; + // + BOPTools_ListOfPaveBlock* pmyListOfPaveBlock=(BOPTools_ListOfPaveBlock*) &myListOfPaveBlock; + pmyListOfPaveBlock->Clear(); + + NMTTools_ListOfCommonBlock* pListOfCommonBlock=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock; + + NMTTools_ListIteratorOfListOfCommonBlock anIt(*pListOfCommonBlock); + for (; anIt.More(); anIt.Next()) { + const NMTTools_CommonBlock& aCB=anIt.Value(); + // + const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); + anItPB.Initialize(aLPB); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPB=anItPB.Value(); + anECurrent=aPB.OriginalEdge(); + if (anECurrent==anE) { + pmyListOfPaveBlock->Append(aPB); + break; + } + } + } + return myListOfPaveBlock; +} +//======================================================================= +// function: IsCommonBlock +// purpose: +//======================================================================= + Standard_Boolean NMTTools_CommonBlockAPI::IsCommonBlock(const BOPTools_PaveBlock& aPB) const +{ + Standard_Integer anE; + // + anE=aPB.OriginalEdge(); + // + CommonPaveBlocks(anE); + // + BOPTools_ListIteratorOfListOfPaveBlock anIt(myListOfPaveBlock); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB1=anIt.Value(); + if (aPB1.IsEqual(aPB)) { + return Standard_True; + } + } + return Standard_False; +} + +//======================================================================= +// function: CommonBlock +// purpose: +//======================================================================= + NMTTools_CommonBlock& NMTTools_CommonBlockAPI::CommonBlock(const BOPTools_PaveBlock& aPB)const +{ + static NMTTools_CommonBlock aCBTMP; + // + NMTTools_ListIteratorOfListOfCommonBlock anItCB; + BOPTools_ListIteratorOfListOfPaveBlock anItPB; + // + NMTTools_ListOfCommonBlock* pLCB=(NMTTools_ListOfCommonBlock*)myListOfCommonBlock; + // + anItCB.Initialize(*pLCB); + for (; anItCB.More(); anItCB.Next()) { + NMTTools_CommonBlock& aCB=anItCB.Value(); + // + const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); + anItPB.Initialize(aLPB); + for (; anItPB.More(); anItPB.Next()) { + const BOPTools_PaveBlock& aPBx=anItPB.Value(); + if (aPBx.IsEqual(aPB)) { + return aCB; + } + } + } + return aCBTMP; +} diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.hxx b/src/NMTTools/NMTTools_CommonBlockAPI.hxx new file mode 100644 index 000000000..37e84f4b7 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockAPI.hxx @@ -0,0 +1,103 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_CommonBlockAPI_HeaderFile +#define _NMTTools_CommonBlockAPI_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class NMTTools_ListOfCommonBlock; +class BOPTools_ListOfPaveBlock; +class BOPTools_PaveBlock; +class NMTTools_CommonBlock; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_CommonBlockAPI { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_CommonBlockAPI(const NMTTools_ListOfCommonBlock& aList); +Standard_EXPORT const NMTTools_ListOfCommonBlock& List() const; +Standard_EXPORT const BOPTools_ListOfPaveBlock& CommonPaveBlocks(const Standard_Integer anE) const; +Standard_EXPORT Standard_Boolean IsCommonBlock(const BOPTools_PaveBlock& aPB) const; +Standard_EXPORT NMTTools_CommonBlock& CommonBlock(const BOPTools_PaveBlock& aPB) const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Address myListOfCommonBlock; +BOPTools_ListOfPaveBlock myListOfPaveBlock; + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.ixx b/src/NMTTools/NMTTools_CommonBlockAPI.ixx new file mode 100644 index 000000000..983092a69 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockAPI.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_CommonBlockAPI.jxx b/src/NMTTools/NMTTools_CommonBlockAPI.jxx new file mode 100644 index 000000000..49570db30 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockAPI.jxx @@ -0,0 +1,15 @@ +#ifndef _NMTTools_ListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#endif +#ifndef _BOPTools_PaveBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlockAPI_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_CommonBlockPool.hxx b/src/NMTTools/NMTTools_CommonBlockPool.hxx new file mode 100644 index 000000000..01e53c6dd --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockPool.hxx @@ -0,0 +1,132 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_CommonBlockPool_HeaderFile +#define _NMTTools_CommonBlockPool_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_OutOfRange; +class Standard_OutOfMemory; +class NMTTools_ListOfCommonBlock; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_CommonBlockPool { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_CommonBlockPool(const Standard_Integer Length = 0,const Standard_Integer BlockLength = 5); +Standard_EXPORT void Resize(const Standard_Integer theNewLength) ; +Standard_EXPORT void Destroy() ; +~NMTTools_CommonBlockPool() +{ + Destroy(); +} + +Standard_EXPORT Standard_Integer Length() const; +Standard_EXPORT Standard_Integer Extent() const; +Standard_EXPORT Standard_Integer FactLength() const; +Standard_EXPORT Standard_Integer Append(const NMTTools_ListOfCommonBlock& Value) ; +Standard_EXPORT void Remove(const Standard_Integer Index) ; +Standard_EXPORT const NMTTools_ListOfCommonBlock& Value(const Standard_Integer Index) const; + const NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) const +{ + return Value(Index); +} + +Standard_EXPORT NMTTools_ListOfCommonBlock& ChangeValue(const Standard_Integer Index) ; + NMTTools_ListOfCommonBlock& operator ()(const Standard_Integer Index) +{ + return ChangeValue(Index); +} + +Standard_EXPORT void SetBlockLength(const Standard_Integer aBL) ; +Standard_EXPORT Standard_Integer BlockLength() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTTools_CommonBlockPool(const NMTTools_CommonBlockPool& AnArray); +Standard_EXPORT NMTTools_CommonBlockPool& Assign(const NMTTools_CommonBlockPool& Other) ; + NMTTools_CommonBlockPool& operator =(const NMTTools_CommonBlockPool& Other) +{ + return Assign(Other); +} + +Standard_EXPORT Standard_Boolean IsInvalidIndex(const Standard_Integer Index) const; + + + // Fields PRIVATE + // +Standard_Address myStart; +Standard_Integer myLength; +Standard_Integer myFactLength; +Standard_Integer myBlockLength; +Standard_Boolean myIsAllocated; + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_CommonBlockPool_0.cxx b/src/NMTTools/NMTTools_CommonBlockPool_0.cxx new file mode 100644 index 000000000..33f0f2541 --- /dev/null +++ b/src/NMTTools/NMTTools_CommonBlockPool_0.cxx @@ -0,0 +1,33 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_OutOfMemory_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCommonBlock_HeaderFile +#include +#endif + + +#define Array1Item NMTTools_ListOfCommonBlock +#define Array1Item_hxx +#define BOPTColStd_CArray1 NMTTools_CommonBlockPool +#define BOPTColStd_CArray1_hxx +#include + diff --git a/src/NMTTools/NMTTools_CoupleOfShape.cdl b/src/NMTTools/NMTTools_CoupleOfShape.cdl new file mode 100644 index 000000000..cf3e0839b --- /dev/null +++ b/src/NMTTools/NMTTools_CoupleOfShape.cdl @@ -0,0 +1,39 @@ +-- File: NMTTools_CoupleOfShape.cdl +-- Created: Wed Jan 28 15:03:39 2004 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2004 + + +class CoupleOfShape from NMTTools + + ---Purpose: + +uses + Shape from TopoDS + +--raises + +is + Create + returns CoupleOfShape from NMTTools; + + SetShape1(me:out; + aS: Shape from TopoDS); + + SetShape2(me:out; + aS: Shape from TopoDS); + + Shape1(me) + returns Shape from TopoDS; + ---C++: return const & + + Shape2(me) + returns Shape from TopoDS; + ---C++: return const & + +fields + myShape1:Shape from TopoDS is protected; + myShape2:Shape from TopoDS is protected; + +end CoupleOfShape; diff --git a/src/NMTTools/NMTTools_CoupleOfShape.cxx b/src/NMTTools/NMTTools_CoupleOfShape.cxx new file mode 100644 index 000000000..91847f60c --- /dev/null +++ b/src/NMTTools/NMTTools_CoupleOfShape.cxx @@ -0,0 +1,45 @@ +// File: NMTTools_CoupleOfShape.cxx +// Created: Wed Jan 28 15:06:11 2004 +// Author: Peter KURNEV +// + +#include + +//======================================================================= +// function: NMTTools_CoupleOfShape::NMTTools_CoupleOfShape +// purpose: +//======================================================================= + NMTTools_CoupleOfShape::NMTTools_CoupleOfShape() +{} +//======================================================================= +// function: SetShape1 +// purpose: +//======================================================================= + void NMTTools_CoupleOfShape::SetShape1(const TopoDS_Shape& aS) +{ + myShape1=aS; +} +//======================================================================= +// function: SetShape2 +// purpose: +//======================================================================= + void NMTTools_CoupleOfShape::SetShape2(const TopoDS_Shape& aS) +{ + myShape2=aS; +} +//======================================================================= +// function: Shape1 +// purpose: +//======================================================================= + const TopoDS_Shape& NMTTools_CoupleOfShape::Shape1()const +{ + return myShape1; +} +//======================================================================= +// function: Shape2 +// purpose: +//======================================================================= + const TopoDS_Shape& NMTTools_CoupleOfShape::Shape2()const +{ + return myShape2; +} diff --git a/src/NMTTools/NMTTools_CoupleOfShape.hxx b/src/NMTTools/NMTTools_CoupleOfShape.hxx new file mode 100644 index 000000000..9a140f7b5 --- /dev/null +++ b/src/NMTTools/NMTTools_CoupleOfShape.hxx @@ -0,0 +1,91 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_CoupleOfShape_HeaderFile +#define _NMTTools_CoupleOfShape_HeaderFile + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +class TopoDS_Shape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_CoupleOfShape { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_CoupleOfShape(); +Standard_EXPORT void SetShape1(const TopoDS_Shape& aS) ; +Standard_EXPORT void SetShape2(const TopoDS_Shape& aS) ; +Standard_EXPORT const TopoDS_Shape& Shape1() const; +Standard_EXPORT const TopoDS_Shape& Shape2() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +TopoDS_Shape myShape1; +TopoDS_Shape myShape2; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_CoupleOfShape.ixx b/src/NMTTools/NMTTools_CoupleOfShape.ixx new file mode 100644 index 000000000..1895c6b5a --- /dev/null +++ b/src/NMTTools/NMTTools_CoupleOfShape.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_CoupleOfShape.jxx b/src/NMTTools/NMTTools_CoupleOfShape.jxx new file mode 100644 index 000000000..9acf2b8d7 --- /dev/null +++ b/src/NMTTools/NMTTools_CoupleOfShape.jxx @@ -0,0 +1,6 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTTools_CoupleOfShape_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_DEProcessor.cdl b/src/NMTTools/NMTTools_DEProcessor.cdl new file mode 100644 index 000000000..8d286d50f --- /dev/null +++ b/src/NMTTools/NMTTools_DEProcessor.cdl @@ -0,0 +1,105 @@ +-- File: NMTTools_DEProcessor.cdl +-- Created: Wed Sep 12 12:08:37 2001 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2001 + + +class DEProcessor from NMTTools + + ---Purpose: + -- + -- The Algorithm to compute and store in interferences' pool + --- and in the Data Structure the following values + --- for degenerated edges + --- 1. Paves/Pave set(s) + --- 2. Split parts + --- 3. States (3D) for split parts + --- + +uses + + Vertex from TopoDS, + Edge from TopoDS, + Face from TopoDS, + + PPaveFiller from NMTTools, + PaveFiller from NMTTools, + --PDSFiller from NMTTools, + ListOfPaveBlock from BOPTools, + PShapesDataStructure from NMTDS, + IndexedDataMapOfIntegerDEInfo from BOPTools + + +is + --Create (aFiller:out PDSFiller from NMTTools) + -- returns DEProcessor from NMTTools; + ---Purpose: + --- Constructor + --- + Create (aFiller:out PaveFiller from NMTTools) + returns DEProcessor from NMTTools; + ---Purpose: + --- Constructor + --- + Do(me:out); + ---Purpose: + --- Launches the processor + --- + IsDone(me) + returns Boolean from Standard; + ---Purpose: + --- Returns TRUE if it is Ok + --- + --- + --- Private block + --- + --- + FindDegeneratedEdges (me:out) + is protected; + + DoPaves (me:out) + is protected; + + FindPaveBlocks (me:out; + nED:Integer from Standard; + nVD:Integer from Standard; + nFD:Integer from Standard; + aLPB:out ListOfPaveBlock from BOPTools) + is protected; + + FillPaveSet (me:out; + nED:Integer from Standard; + nVD:Integer from Standard; + nFD:Integer from Standard; + aLPB: ListOfPaveBlock from BOPTools) + is protected; + + FillSplitEdgesPool(me:out; + nED:Integer from Standard) + is protected; + + MakeSplitEdges(me:out; + nED:Integer from Standard; + nFD:Integer from Standard) + is protected; + + MakeSplitEdge (me:out; + aS1: Edge from TopoDS; + aF : Face from TopoDS; + aV1: Vertex from TopoDS; + aP1: Real from Standard; + aV2: Vertex from TopoDS; + aP2: Real from Standard; + aNewEdge:out Edge from TopoDS) + is protected; + +fields + + --myDSFiller: PDSFiller from NMTTools is protected; + myFiller : PPaveFiller from NMTTools is protected; + myDS : PShapesDataStructure from NMTDS is protected; + myIsDone : Boolean from Standard is protected; + myDEMap : IndexedDataMapOfIntegerDEInfo from BOPTools is protected; + +end DEProcessor; diff --git a/src/NMTTools/NMTTools_DEProcessor.cxx b/src/NMTTools/NMTTools_DEProcessor.cxx new file mode 100644 index 000000000..1c6ea3068 --- /dev/null +++ b/src/NMTTools/NMTTools_DEProcessor.cxx @@ -0,0 +1,492 @@ +// File: BOPTools_DEProcessor.cxx +// Created: Wed Sep 12 12:10:52 2001 +// Author: Peter KURNEV +// + +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +//#include +#include +// +#include +#include + + + +//======================================================================= +// function: NMTTools_DEProcessor::NMTTools_DEProcessor +// purpose: +//======================================================================= + NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PaveFiller& aPaveFiller) +: + myIsDone(Standard_False) +{ + myFiller=(NMTTools_PaveFiller*) &aPaveFiller; + myDS=myFiller->DS(); +} +//======================================================================= +// function: IsDone +// purpose: +//======================================================================= + Standard_Boolean NMTTools_DEProcessor::IsDone() const +{ + return myIsDone; +} +//======================================================================= +// function: Do +// purpose: +//======================================================================= + void NMTTools_DEProcessor::Do() +{ + Standard_Integer aNbE; + myIsDone=Standard_False; + + FindDegeneratedEdges(); + aNbE=myDEMap.Extent(); + + if (!aNbE) { + myIsDone=Standard_True; + return; + } + DoPaves(); +} +//======================================================================= +// function: FindDegeneratedEdges +// purpose: +//======================================================================= + void NMTTools_DEProcessor::FindDegeneratedEdges() +{ + Standard_Integer i, aNb, nV, nF, nVx, ip, iRankE; + TopTools_IndexedDataMapOfShapeListOfShape aMEF; + // + aNb=myDS->NumberOfShapesOfTheObject(); + // + for (i=1; i<=aNb; 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); + if (aS.ShapeType()==TopAbs_EDGE) { + const TopoDS_Edge& aE=TopoDS::Edge(aS); + + if (BRep_Tool::Degenerated(aE)) { + iRankE=myDS->Rank(i); + + TopoDS_Vertex aV=TopExp::FirstVertex(aE); + + nVx=myDS->ShapeIndex(aV, iRankE); + // + nV=nVx; + ip=myFiller->FindSDVertex(nV); + if (ip) { + nV=ip; + } + // + TColStd_ListOfInteger aLFn; + const TopTools_ListOfShape& aLF=aMEF.FindFromKey(aE); + TopTools_ListIteratorOfListOfShape anIt(aLF); + for (; anIt.More(); anIt.Next()) { + const TopoDS_Shape& aF=anIt.Value(); + nF=myDS->ShapeIndex(aF, iRankE); + aLFn.Append(nF); + } + BOPTools_DEInfo aDEInfo; + aDEInfo.SetVertex(nV); + aDEInfo.SetFaces(aLFn); + + myDEMap.Add (i, aDEInfo); + } + } + } +} +//======================================================================= +// function: DoPaves +// purpose: +//======================================================================= + void NMTTools_DEProcessor::DoPaves() +{ + + Standard_Integer i, aNbE, nED, nVD, nFD=0; + // + aNbE=myDEMap.Extent(); + for (i=1; i<=aNbE; i++) { + nED=myDEMap.FindKey(i); + + const BOPTools_DEInfo& aDEInfo=myDEMap(i); + nVD=aDEInfo.Vertex(); + // Fill PaveSet for the edge nED + const TColStd_ListOfInteger& nLF=aDEInfo.Faces(); + TColStd_ListIteratorOfListOfInteger anIt(nLF); + for (; anIt.More(); anIt.Next()) { + nFD=anIt.Value(); + + BOPTools_ListOfPaveBlock aLPB; + FindPaveBlocks(nED, nVD, nFD, aLPB); + FillPaveSet (nED, nVD, nFD, aLPB); + } + // + // Fill aSplitEdges for the edge nED + FillSplitEdgesPool(nED); + // + // MakeSplitEdges + MakeSplitEdges(nED, nFD); + // + }// next nED +} +//======================================================================= +// function: FindPaveBlocks +// purpose: +//======================================================================= + void NMTTools_DEProcessor::FindPaveBlocks(const Standard_Integer , + const Standard_Integer nVD, + const Standard_Integer nFD, + BOPTools_ListOfPaveBlock& aLPBOut) +{ + BOPTools_ListIteratorOfListOfPaveBlock anIt; + Standard_Integer i, aNb, nF2, nV; + // + BOPTools_CArray1OfSSInterference& aFFs=(myFiller->InterfPool())->SSInterferences(); + // + aNb=aFFs.Extent(); + for (i=1; i<=aNb; ++i) { + BOPTools_SSInterference& aFF=aFFs(i); + // + nF2=aFF.OppositeIndex(nFD); + if (!nF2) { + continue; + } + // + // Split Parts + const BOPTools_ListOfPaveBlock& aLPBSplits=aFF.PaveBlocks(); + anIt.Initialize(aLPBSplits); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPBSp=anIt.Value(); + // + const BOPTools_Pave& aPave1=aPBSp.Pave1(); + nV=aPave1.Index(); + if (nV==nVD) { + aLPBOut.Append(aPBSp); + continue; + } + // + const BOPTools_Pave& aPave2=aPBSp.Pave2(); + nV=aPave2.Index(); + if (nV==nVD) { + aLPBOut.Append(aPBSp); + continue; + } + } + // + // Section Parts + Standard_Integer j, aNbCurves; + BOPTools_SequenceOfCurves& aSC=aFF.Curves(); + aNbCurves=aSC.Length(); + + for (j=1; j<=aNbCurves; j++) { + const BOPTools_Curve& aBC=aSC(j); + const BOPTools_ListOfPaveBlock& aLPBSe=aBC.NewPaveBlocks(); + + anIt.Initialize(aLPBSe); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPBSe=anIt.Value(); + + const BOPTools_Pave& aPv1=aPBSe.Pave1(); + nV=aPv1.Index(); + if (nV==nVD) { + aLPBOut.Append(aPBSe); + continue; + } + + const BOPTools_Pave& aPv2=aPBSe.Pave2(); + nV=aPv2.Index(); + if (nV==nVD) { + aLPBOut.Append(aPBSe); + continue; + } + } + } + } +} +//======================================================================= +// function: FillPaveSet +// purpose: +//======================================================================= + void NMTTools_DEProcessor::FillPaveSet (const Standard_Integer nED, + const Standard_Integer nVD, + const Standard_Integer nFD, + const BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Boolean bIsDone, bXDir, bRejectFlag; + Standard_Integer nE, aNbPoints, j; + Standard_Real aTD1, aTD2, aT1, aT2, aTolInter, aX, aDT; + // + aDT=Precision::PConfusion(); + // + BOPTools_PaveSet& aPaveSet= (myFiller->ChangePavePool()).ChangeValue(myDS->RefEdge(nED)); + // + // Clear aPaveSet, aSplitEdges + aPaveSet.ChangeSet().Clear(); + // + 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); + // + // Choose direction for Degenerated Edge + gp_Pnt2d aP2d1, aP2d2; + aC2DDE->D0(aTD1, aP2d1); + aC2DDE->D0(aTD2, aP2d2); + + bXDir=Standard_False; + if (fabs(aP2d1.Y()-aP2d2.Y()) < aDT){ + bXDir=!bXDir; + } + // + // Prepare bounding Paves + BOPTools_Pave aPave1 (nVD, aTD1, BooleanOperations_UnknownInterference); + aPaveSet.Append(aPave1); + BOPTools_Pave aPave2 (nVD, aTD2, BooleanOperations_UnknownInterference); + aPaveSet.Append(aPave2); + // + // Fill other paves + BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + nE=aPB.Edge(); + const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + + Handle(Geom2d_Curve) aC2D=BRep_Tool::CurveOnSurface(aE, aDF, aT1, aT2); + // + // Intersection + aTolInter=0.001; + + Geom2dAdaptor_Curve aGAC1, aGAC2; + + aGAC1.Load(aC2DDE, aTD1, aTD2); + Handle(Geom2d_Line) aL2D= Handle(Geom2d_Line)::DownCast(aC2D); + if (!aL2D.IsNull()) { + aGAC2.Load(aC2D); + } + else { + aGAC2.Load(aC2D, aT1, aT2); + } + + Geom2dInt_GInter aGInter(aGAC1, aGAC2, aTolInter, aTolInter); + + bIsDone=aGInter.IsDone(); + if(bIsDone) { + aNbPoints=aGInter.NbPoints(); + if (aNbPoints) { + for (j=1; j<=aNbPoints; ++j) { + gp_Pnt2d aP2D=aGInter.Point(j).Value(); + // + aX=(bXDir) ? aP2D.X(): aP2D.Y(); + // + if (fabs (aX-aTD1) < aDT || fabs (aX-aTD2) < aDT) { + continue; + } + if (aX < aTD1 || aX > aTD2) { + continue; + } + // + bRejectFlag=Standard_False; + const BOPTools_ListOfPave& aListOfPave=aPaveSet.Set(); + BOPTools_ListIteratorOfListOfPave aPaveIt(aListOfPave); + for (; aPaveIt.More(); aPaveIt.Next()) { + const BOPTools_Pave& aPavex=aPaveIt.Value(); + Standard_Real aXx=aPavex.Param(); + if (fabs (aX-aXx) < aDT) { + bRejectFlag=Standard_True; + break; + } + } + if (bRejectFlag) { + continue; + } + // + BOPTools_Pave aPave(nVD, aX, BooleanOperations_UnknownInterference); + aPaveSet.Append(aPave); + } + } + } + } +} +//======================================================================= +// function: FillSplitEdgesPool +// purpose: +//======================================================================= + void NMTTools_DEProcessor::FillSplitEdgesPool (const Standard_Integer nED) +{ + BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->ChangeSplitShapesPool(); + BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool.ChangeValue(myDS->RefEdge(nED)); + // + aSplitEdges.Clear(); + // + const BOPTools_PavePool& aPavePool=myFiller->PavePool(); + BOPTools_PavePool* pPavePool=(BOPTools_PavePool*) &aPavePool; + BOPTools_PaveSet& aPaveSet= pPavePool->ChangeValue(myDS->RefEdge(nED)); + + BOPTools_PaveBlockIterator aPBIt(nED, aPaveSet); + for (; aPBIt.More(); aPBIt.Next()) { + BOPTools_PaveBlock& aPB=aPBIt.Value(); + aSplitEdges.Append(aPB); + } +} +//======================================================================= +// function: MakeSplitEdges +// purpose: +//======================================================================= + void NMTTools_DEProcessor::MakeSplitEdges (const Standard_Integer nED, + const Standard_Integer nFD) +{ + const BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->SplitShapesPool(); + const BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool(myDS->RefEdge(nED)); + + Standard_Integer nV1, nV2, aNewShapeIndex; + Standard_Real t1, t2; + 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)); + + BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges); + + for (; aPBIt.More(); aPBIt.Next()) { + BOPTools_PaveBlock& aPB=aPBIt.Value(); + + const BOPTools_Pave& aPave1=aPB.Pave1(); + nV1=aPave1.Index(); + t1=aPave1.Param(); + aV1=TopoDS::Vertex(myDS->GetShape(nV1)); + aV1.Orientation(TopAbs_FORWARD); + + const BOPTools_Pave& aPave2=aPB.Pave2(); + nV2=aPave2.Index(); + t2=aPave2.Param(); + aV2=TopoDS::Vertex(myDS->GetShape(nV2)); + aV2.Orientation(TopAbs_REVERSED); + + MakeSplitEdge(aDE, aDF, aV1, t1, aV2, t2, aESplit); + // + // Add Split Part of the Original Edge to the DS + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + + anASSeq.SetNewSuccessor(nV1); + anASSeq.SetNewOrientation(aV1.Orientation()); + + anASSeq.SetNewSuccessor(nV2); + anASSeq.SetNewOrientation(aV2.Orientation()); + + myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq); + aNewShapeIndex=myDS->NumberOfInsertedShapes(); + myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN); + // + // Fill Split Set for the Original Edge + aPB.SetEdge(aNewShapeIndex); + // + } +} +//======================================================================= +// function: MakeSplitEdge +// purpose: +//======================================================================= + void NMTTools_DEProcessor::MakeSplitEdge (const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const TopoDS_Vertex& aV1, + const Standard_Real aP1, + const TopoDS_Vertex& aV2, + const Standard_Real aP2, + TopoDS_Edge& aNewEdge) +{ + Standard_Real aTol=1.e-7; + + TopoDS_Edge E=aE; + + E.EmptyCopy(); + BRep_Builder BB; + BB.Add (E, aV1); + BB.Add (E, aV2); + + BB.Range(E, aF, aP1, aP2); + + BB.Degenerated(E, Standard_True); + + BB.UpdateEdge(E, aTol); + aNewEdge=E; +} +/* +//======================================================================= +// function: NMTTools_DEProcessor::NMTTools_DEProcessor +// purpose: +//======================================================================= + NMTTools_DEProcessor::NMTTools_DEProcessor(NMTTools_PDSFiller& pDSFiller) +: + myIsDone(Standard_False) +{ + myDSFiller=pDSFiller; + myFiller=(NMTTools_PaveFiller*) &(myDSFiller->PaveFiller()); + myDS=myFiller->DS(); +} +*/ diff --git a/src/NMTTools/NMTTools_DEProcessor.hxx b/src/NMTTools/NMTTools_DEProcessor.hxx new file mode 100644 index 000000000..fb3ccbb37 --- /dev/null +++ b/src/NMTTools/NMTTools_DEProcessor.hxx @@ -0,0 +1,117 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_DEProcessor_HeaderFile +#define _NMTTools_DEProcessor_HeaderFile + +#ifndef _NMTTools_PPaveFiller_HeaderFile +#include +#endif +#ifndef _NMTDS_PShapesDataStructure_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _BOPTools_IndexedDataMapOfIntegerDEInfo_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Real_HeaderFile +#include +#endif +class NMTTools_PaveFiller; +class BOPTools_ListOfPaveBlock; +class TopoDS_Edge; +class TopoDS_Face; +class TopoDS_Vertex; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_DEProcessor { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_DEProcessor(NMTTools_PaveFiller& aFiller); +Standard_EXPORT void Do() ; +Standard_EXPORT Standard_Boolean IsDone() const; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT void FindDegeneratedEdges() ; +Standard_EXPORT void DoPaves() ; +Standard_EXPORT void FindPaveBlocks(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,BOPTools_ListOfPaveBlock& aLPB) ; +Standard_EXPORT void FillPaveSet(const Standard_Integer nED,const Standard_Integer nVD,const Standard_Integer nFD,const BOPTools_ListOfPaveBlock& aLPB) ; +Standard_EXPORT void FillSplitEdgesPool(const Standard_Integer nED) ; +Standard_EXPORT void MakeSplitEdges(const Standard_Integer nED,const Standard_Integer nFD) ; +Standard_EXPORT void MakeSplitEdge(const TopoDS_Edge& aS1,const TopoDS_Face& aF,const TopoDS_Vertex& aV1,const Standard_Real aP1,const TopoDS_Vertex& aV2,const Standard_Real aP2,TopoDS_Edge& aNewEdge) ; + + + // Fields PROTECTED + // +NMTTools_PPaveFiller myFiller; +NMTDS_PShapesDataStructure myDS; +Standard_Boolean myIsDone; +BOPTools_IndexedDataMapOfIntegerDEInfo myDEMap; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_DEProcessor.ixx b/src/NMTTools/NMTTools_DEProcessor.ixx new file mode 100644 index 000000000..68448380c --- /dev/null +++ b/src/NMTTools/NMTTools_DEProcessor.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_DEProcessor.jxx b/src/NMTTools/NMTTools_DEProcessor.jxx new file mode 100644 index 000000000..a8c418d4e --- /dev/null +++ b/src/NMTTools/NMTTools_DEProcessor.jxx @@ -0,0 +1,18 @@ +#ifndef _NMTTools_PaveFiller_HeaderFile +#include +#endif +#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _TopoDS_Vertex_HeaderFile +#include +#endif +#ifndef _NMTTools_DEProcessor_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_DSFiller.cdl b/src/NMTTools/NMTTools_DSFiller.cdl new file mode 100644 index 000000000..069e82c7c --- /dev/null +++ b/src/NMTTools/NMTTools_DSFiller.cdl @@ -0,0 +1,80 @@ +-- File: NMTTools_DSFiller.cdl +-- Created: Fri Dec 5 13:57:03 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class DSFiller from NMTTools + + ---Purpose: + +uses + Shape from TopoDS, + InterferencePool from BOPTools, + PInterferencePool from BOPTools, + ShapesDataStructure from NMTDS, + PShapesDataStructure from NMTDS, + PPaveFiller from NMTTools, + PaveFiller from NMTTools +--raises + +is + Create + returns DSFiller from NMTTools; + + Destroy (me:out); + ---C++: alias ~ + ---Purpose: Destructor + -- + -- Selectors/Modifiers + SetCompositeShape (me:out; + aS: Shape from TopoDS); + + CompositeShape(me) + returns Shape from TopoDS; + ---C++: return const& + + SetNewFiller(me; + aFlag:Boolean from Standard); + + IsNewFiller(me) + returns Boolean from Standard; + -- + -- Perform the algo + Perform (me:out); + -- + -- Protected section + Clear (me:out) + is protected; + -- + -- Query section + DS (me) + returns ShapesDataStructure from NMTDS; + ---C++: return const & + + InterfPool (me) + returns InterferencePool from BOPTools; + ---C++: return const & + + IsDone(me) + returns Boolean from Standard; + + PaveFiller(me) + returns PaveFiller from NMTTools; + ---C++: return const & + + ChangePaveFiller (me:out) + returns PaveFiller from NMTTools; + ---C++: return & + +fields + myCompositeShape : Shape from TopoDS is protected; + myDS : PShapesDataStructure from NMTDS is protected; + myInterfPool : PInterferencePool from BOPTools is protected; + myPaveFiller : PPaveFiller from NMTTools is protected; + + myIsDone : Boolean from Standard is protected; + myIsNewFiller : Boolean from Standard is protected; + +end DSFiller; diff --git a/src/NMTTools/NMTTools_DSFiller.cxx b/src/NMTTools/NMTTools_DSFiller.cxx new file mode 100644 index 000000000..d0e53b50c --- /dev/null +++ b/src/NMTTools/NMTTools_DSFiller.cxx @@ -0,0 +1,149 @@ +// File: NMTTools_DSFiller.cxx +// Created: Fri Dec 5 14:06:34 2003 +// Author: Peter KURNEV +// + + +#include +#include + +//======================================================================= +// function: NMTTools_DSFiller::NMTTools_DSFiller +// purpose: +//======================================================================= + NMTTools_DSFiller::NMTTools_DSFiller() +{ + myPaveFiller=NULL; + myInterfPool=NULL; + myDS=NULL; + myIsNewFiller=Standard_True; + myIsDone=Standard_False; +} +//======================================================================= +// function:Destroy +// purpose: +//======================================================================= + void NMTTools_DSFiller::Destroy() +{ + Clear(); +} +//======================================================================= +// function: Clear +// purpose: +//======================================================================= + void NMTTools_DSFiller::Clear() +{ + if (myPaveFiller!=NULL) { + delete myPaveFiller; + } + if (myInterfPool!=NULL) { + delete myInterfPool; + } + if (myDS!=NULL) { + delete myDS; + } + myPaveFiller=NULL; + myInterfPool=NULL; + myDS=NULL; +} +//======================================================================= +// function: SetCompositeShape +// purpose: +//======================================================================= + void NMTTools_DSFiller::SetCompositeShape(const TopoDS_Shape& aS) +{ + myCompositeShape=aS; +} +//======================================================================= +// function: CompositeShape +// purpose: +//======================================================================= + const TopoDS_Shape& NMTTools_DSFiller::CompositeShape()const +{ + return myCompositeShape; +} +//======================================================================= +// function: SetNewFiller +// purpose: +//======================================================================= + void NMTTools_DSFiller::SetNewFiller(const Standard_Boolean aFlag) const +{ + NMTTools_DSFiller* pDSFiller=(NMTTools_DSFiller*)this; + pDSFiller->myIsNewFiller=aFlag; +} +//======================================================================= +// function: IsNewFiller +// purpose: +//======================================================================= + Standard_Boolean NMTTools_DSFiller::IsNewFiller() const +{ + return myIsNewFiller; +} +//======================================================================= +// function: DS +// purpose: +//======================================================================= + const NMTDS_ShapesDataStructure& NMTTools_DSFiller::DS () const +{ + return *myDS; +} +//======================================================================= +// function: InterfPool +// purpose: +//======================================================================= + const BOPTools_InterferencePool& NMTTools_DSFiller::InterfPool () const +{ + return *myInterfPool; +} +//======================================================================= +// function: IsDone +// purpose: +//======================================================================= + Standard_Boolean NMTTools_DSFiller::IsDone()const +{ + return myIsDone; +} +//======================================================================= +// function: PaveFiller +// purpose: +//======================================================================= + const NMTTools_PaveFiller& NMTTools_DSFiller::PaveFiller()const +{ + return *myPaveFiller; +} +//======================================================================= +// function: ChangePaveFiller +// purpose: +//======================================================================= + NMTTools_PaveFiller& NMTTools_DSFiller::ChangePaveFiller() +{ + return *myPaveFiller; +} +//======================================================================= +// function: Perform +// purpose: +//======================================================================= + void NMTTools_DSFiller::Perform() +{ + myIsDone=Standard_False; + // + if (myCompositeShape.IsNull()) { + return; + } + // + // + // Clear contents of the DS if it was before + Clear(); + // + myIsNewFiller=Standard_True; + // + myDS = new NMTDS_ShapesDataStructure; + myDS->SetCompositeShape(myCompositeShape); + myDS->Init(); + // + myInterfPool= new BOPTools_InterferencePool (*myDS); + // + myPaveFiller = new NMTTools_PaveFiller(*myInterfPool); + myPaveFiller->Perform(); + myIsDone=myPaveFiller->IsDone(); +} diff --git a/src/NMTTools/NMTTools_DSFiller.hxx b/src/NMTTools/NMTTools_DSFiller.hxx new file mode 100644 index 000000000..09c398e8e --- /dev/null +++ b/src/NMTTools/NMTTools_DSFiller.hxx @@ -0,0 +1,123 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_DSFiller_HeaderFile +#define _NMTTools_DSFiller_HeaderFile + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTDS_PShapesDataStructure_HeaderFile +#include +#endif +#ifndef _BOPTools_PInterferencePool_HeaderFile +#include +#endif +#ifndef _NMTTools_PPaveFiller_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class TopoDS_Shape; +class NMTDS_ShapesDataStructure; +class BOPTools_InterferencePool; +class NMTTools_PaveFiller; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_DSFiller { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_DSFiller(); +Standard_EXPORT void Destroy() ; +~NMTTools_DSFiller() +{ + Destroy(); +} + +Standard_EXPORT void SetCompositeShape(const TopoDS_Shape& aS) ; +Standard_EXPORT const TopoDS_Shape& CompositeShape() const; +Standard_EXPORT void SetNewFiller(const Standard_Boolean aFlag) const; +Standard_EXPORT Standard_Boolean IsNewFiller() const; +Standard_EXPORT void Perform() ; +Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const; +Standard_EXPORT const BOPTools_InterferencePool& InterfPool() const; +Standard_EXPORT Standard_Boolean IsDone() const; +Standard_EXPORT const NMTTools_PaveFiller& PaveFiller() const; +Standard_EXPORT NMTTools_PaveFiller& ChangePaveFiller() ; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT void Clear() ; + + + // Fields PROTECTED + // +TopoDS_Shape myCompositeShape; +NMTDS_PShapesDataStructure myDS; +BOPTools_PInterferencePool myInterfPool; +NMTTools_PPaveFiller myPaveFiller; +Standard_Boolean myIsDone; +Standard_Boolean myIsNewFiller; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_DSFiller.ixx b/src/NMTTools/NMTTools_DSFiller.ixx new file mode 100644 index 000000000..e55cf6738 --- /dev/null +++ b/src/NMTTools/NMTTools_DSFiller.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_DSFiller.jxx b/src/NMTTools/NMTTools_DSFiller.jxx new file mode 100644 index 000000000..078fd15ab --- /dev/null +++ b/src/NMTTools/NMTTools_DSFiller.jxx @@ -0,0 +1,15 @@ +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _NMTDS_ShapesDataStructure_HeaderFile +#include +#endif +#ifndef _BOPTools_InterferencePool_HeaderFile +#include +#endif +#ifndef _NMTTools_PaveFiller_HeaderFile +#include +#endif +#ifndef _NMTTools_DSFiller_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx new file mode 100644 index 000000000..cf09e4f59 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger.hxx @@ -0,0 +1,136 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile +#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile +#include +#endif + +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _TColStd_IndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +class TColStd_IndexedMapOfInteger; +class TColStd_MapIntegerHasher; +class NMTTools_IndexedDataMapOfIndexedMapOfInteger; + + +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(const Standard_Integer& K1,const Standard_Integer K2,const TColStd_IndexedMapOfInteger& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + Standard_Integer& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TColStd_IndexedMapOfInteger& Value() const; +Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Integer myKey1; +Standard_Integer myKey2; +TColStd_IndexedMapOfInteger myValue; +TCollection_MapNodePtr myNext2; + + +}; + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem TColStd_IndexedMapOfInteger +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMap_hxx + +#include + +#undef TheKey +#undef TheKey_hxx +#undef TheItem +#undef TheItem_hxx +#undef Hasher +#undef Hasher_hxx +#undef TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_hxx +#undef Handle_TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_Type_ +#undef TCollection_IndexedDataMap +#undef TCollection_IndexedDataMap_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx new file mode 100644 index 000000000..1d989956b --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_0.cxx @@ -0,0 +1,93 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _TColStd_IndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile +#include +#endif +NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger", + sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger))) { + _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::DynamicType() const +{ + return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) ; +} +Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger() {} +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem TColStd_IndexedMapOfInteger +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx new file mode 100644 index 000000000..7721dd936 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -0,0 +1,140 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#include +#endif + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +class TopoDS_Shape; +class TopTools_IndexedMapOfShape; +class TopTools_ShapeMapHasher; +class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; + + +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(const TopoDS_Shape& K1,const Standard_Integer K2,const TopTools_IndexedMapOfShape& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + TopoDS_Shape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + TopTools_IndexedMapOfShape& Value() const; +Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +TopoDS_Shape myKey1; +Standard_Integer myKey2; +TopTools_IndexedMapOfShape myValue; +TCollection_MapNodePtr myNext2; + + +}; + +#define TheKey TopoDS_Shape +#define TheKey_hxx +#define TheItem TopTools_IndexedMapOfShape +#define TheItem_hxx +#define Hasher TopTools_ShapeMapHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMap_hxx + +#include + +#undef TheKey +#undef TheKey_hxx +#undef TheItem +#undef TheItem_hxx +#undef Hasher +#undef Hasher_hxx +#undef TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_hxx +#undef Handle_TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_Type_ +#undef TCollection_IndexedDataMap +#undef TCollection_IndexedDataMap_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx new file mode 100644 index 000000000..beaae44e7 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_0.cxx @@ -0,0 +1,96 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_ShapeMapHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#include +#endif +NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape", + sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape))) { + _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::DynamicType() const +{ + return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) ; +} +Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape() {} +#define TheKey TopoDS_Shape +#define TheKey_hxx +#define TheItem TopTools_IndexedMapOfShape +#define TheItem_hxx +#define Hasher TopTools_ShapeMapHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx new file mode 100644 index 000000000..453715207 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock.hxx @@ -0,0 +1,140 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile +#define _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile +#include +#endif + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _BOPTools_PaveBlock_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +class TopoDS_Shape; +class BOPTools_PaveBlock; +class TopTools_ShapeMapHasher; +class NMTTools_IndexedDataMapOfShapePaveBlock; + + +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(const TopoDS_Shape& K1,const Standard_Integer K2,const BOPTools_PaveBlock& I,const TCollection_MapNodePtr& n1,const TCollection_MapNodePtr& n2); + TopoDS_Shape& Key1() const; + Standard_Integer& Key2() const; + TCollection_MapNodePtr& Next2() const; + BOPTools_PaveBlock& Value() const; +Standard_EXPORT ~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +TopoDS_Shape myKey1; +Standard_Integer myKey2; +BOPTools_PaveBlock myValue; +TCollection_MapNodePtr myNext2; + + +}; + +#define TheKey TopoDS_Shape +#define TheKey_hxx +#define TheItem BOPTools_PaveBlock +#define TheItem_hxx +#define Hasher TopTools_ShapeMapHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMap_hxx + +#include + +#undef TheKey +#undef TheKey_hxx +#undef TheItem +#undef TheItem_hxx +#undef Hasher +#undef Hasher_hxx +#undef TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_hxx +#undef Handle_TCollection_IndexedDataMapNode +#undef TCollection_IndexedDataMapNode_Type_ +#undef TCollection_IndexedDataMap +#undef TCollection_IndexedDataMap_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx new file mode 100644 index 000000000..fe39f5347 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_0.cxx @@ -0,0 +1,96 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _BOPTools_PaveBlock_HeaderFile +#include +#endif +#ifndef _TopTools_ShapeMapHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile +#include +#endif +NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock", + sizeof(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock))) { + _anOtherObject = Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)((Handle(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::DynamicType() const +{ + return STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) ; +} +Standard_Boolean NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock::~Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock() {} +#define TheKey TopoDS_Shape +#define TheKey_hxx +#define TheItem BOPTools_PaveBlock +#define TheItem_hxx +#define Hasher TopTools_ShapeMapHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx new file mode 100644 index 000000000..f7e220d8e --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx @@ -0,0 +1,133 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile +#define _NMTTools_IndexedDataMapOfIndexedMapOfInteger_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_OutOfRange; +class Standard_NoSuchObject; +class TColStd_IndexedMapOfInteger; +class TColStd_MapIntegerHasher; +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_IndexedDataMapOfIndexedMapOfInteger : public TCollection_BasicMap { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const Standard_Integer NbBuckets = 1); +Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger& Assign(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other) ; + NMTTools_IndexedDataMapOfIndexedMapOfInteger& operator =(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other) +{ + return Assign(Other); +} + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +Standard_EXPORT void Clear() ; +~NMTTools_IndexedDataMapOfIndexedMapOfInteger() +{ + Clear(); +} + +Standard_EXPORT Standard_Integer Add(const Standard_Integer& K,const TColStd_IndexedMapOfInteger& I) ; +Standard_EXPORT void Substitute(const Standard_Integer I,const Standard_Integer& K,const TColStd_IndexedMapOfInteger& T) ; +Standard_EXPORT void RemoveLast() ; +Standard_EXPORT Standard_Boolean Contains(const Standard_Integer& K) const; +Standard_EXPORT const Standard_Integer& FindKey(const Standard_Integer I) const; +Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromIndex(const Standard_Integer I) const; + const TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I) const +{ + return FindFromIndex(I); +} + +Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromIndex(const Standard_Integer I) ; + TColStd_IndexedMapOfInteger& operator ()(const Standard_Integer I) +{ + return ChangeFromIndex(I); +} + +Standard_EXPORT Standard_Integer FindIndex(const Standard_Integer& K) const; +Standard_EXPORT const TColStd_IndexedMapOfInteger& FindFromKey(const Standard_Integer& K) const; +Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFromKey(const Standard_Integer& K) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTTools_IndexedDataMapOfIndexedMapOfInteger(const NMTTools_IndexedDataMapOfIndexedMapOfInteger& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx new file mode 100644 index 000000000..0c4124fbc --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapOfIndexedMapOfInteger_0.cxx @@ -0,0 +1,50 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_DomainError_HeaderFile +#include +#endif +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _TColStd_IndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _TColStd_MapIntegerHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_HeaderFile +#include +#endif + + +#define TheKey Standard_Integer +#define TheKey_hxx +#define TheItem TColStd_IndexedMapOfInteger +#define TheItem_hxx +#define Hasher TColStd_MapIntegerHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfIndexedMapOfInteger_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfIndexedMapOfInteger +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx new file mode 100644 index 000000000..9a7265cde --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx @@ -0,0 +1,134 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#define _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_OutOfRange; +class Standard_NoSuchObject; +class TopoDS_Shape; +class TopTools_IndexedMapOfShape; +class TopTools_ShapeMapHasher; +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape : public TCollection_BasicMap { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const Standard_Integer NbBuckets = 1); +Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Assign(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other) ; + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& operator =(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other) +{ + return Assign(Other); +} + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +Standard_EXPORT void Clear() ; +~NMTTools_IndexedDataMapOfShapeIndexedMapOfShape() +{ + Clear(); +} + +Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& I) ; +Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const TopTools_IndexedMapOfShape& T) ; +Standard_EXPORT void RemoveLast() ; +Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromIndex(const Standard_Integer I) const; + const TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) const +{ + return FindFromIndex(I); +} + +Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromIndex(const Standard_Integer I) ; + TopTools_IndexedMapOfShape& operator ()(const Standard_Integer I) +{ + return ChangeFromIndex(I); +} + +Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; +Standard_EXPORT const TopTools_IndexedMapOfShape& FindFromKey(const TopoDS_Shape& K) const; +Standard_EXPORT TopTools_IndexedMapOfShape& ChangeFromKey(const TopoDS_Shape& K) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTTools_IndexedDataMapOfShapeIndexedMapOfShape(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx new file mode 100644 index 000000000..44fb79552 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_0.cxx @@ -0,0 +1,53 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_DomainError_HeaderFile +#include +#endif +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _TopTools_IndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _TopTools_ShapeMapHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#include +#endif + + +#define TheKey TopoDS_Shape +#define TheKey_hxx +#define TheItem TopTools_IndexedMapOfShape +#define TheItem_hxx +#define Hasher TopTools_ShapeMapHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapeIndexedMapOfShape_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapeIndexedMapOfShape +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx new file mode 100644 index 000000000..7880c6c78 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock.hxx @@ -0,0 +1,134 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile +#define _NMTTools_IndexedDataMapOfShapePaveBlock_HeaderFile + +#ifndef _TCollection_BasicMap_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_DomainError; +class Standard_OutOfRange; +class Standard_NoSuchObject; +class TopoDS_Shape; +class BOPTools_PaveBlock; +class TopTools_ShapeMapHasher; +class NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_IndexedDataMapOfShapePaveBlock : public TCollection_BasicMap { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const Standard_Integer NbBuckets = 1); +Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock& Assign(const NMTTools_IndexedDataMapOfShapePaveBlock& Other) ; + NMTTools_IndexedDataMapOfShapePaveBlock& operator =(const NMTTools_IndexedDataMapOfShapePaveBlock& Other) +{ + return Assign(Other); +} + +Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; +Standard_EXPORT void Clear() ; +~NMTTools_IndexedDataMapOfShapePaveBlock() +{ + Clear(); +} + +Standard_EXPORT Standard_Integer Add(const TopoDS_Shape& K,const BOPTools_PaveBlock& I) ; +Standard_EXPORT void Substitute(const Standard_Integer I,const TopoDS_Shape& K,const BOPTools_PaveBlock& T) ; +Standard_EXPORT void RemoveLast() ; +Standard_EXPORT Standard_Boolean Contains(const TopoDS_Shape& K) const; +Standard_EXPORT const TopoDS_Shape& FindKey(const Standard_Integer I) const; +Standard_EXPORT const BOPTools_PaveBlock& FindFromIndex(const Standard_Integer I) const; + const BOPTools_PaveBlock& operator ()(const Standard_Integer I) const +{ + return FindFromIndex(I); +} + +Standard_EXPORT BOPTools_PaveBlock& ChangeFromIndex(const Standard_Integer I) ; + BOPTools_PaveBlock& operator ()(const Standard_Integer I) +{ + return ChangeFromIndex(I); +} + +Standard_EXPORT Standard_Integer FindIndex(const TopoDS_Shape& K) const; +Standard_EXPORT const BOPTools_PaveBlock& FindFromKey(const TopoDS_Shape& K) const; +Standard_EXPORT BOPTools_PaveBlock& ChangeFromKey(const TopoDS_Shape& K) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTTools_IndexedDataMapOfShapePaveBlock(const NMTTools_IndexedDataMapOfShapePaveBlock& Other); + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx new file mode 100644 index 000000000..4f55cebf3 --- /dev/null +++ b/src/NMTTools/NMTTools_IndexedDataMapOfShapePaveBlock_0.cxx @@ -0,0 +1,53 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_DomainError_HeaderFile +#include +#endif +#ifndef _Standard_OutOfRange_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _TopoDS_Shape_HeaderFile +#include +#endif +#ifndef _BOPTools_PaveBlock_HeaderFile +#include +#endif +#ifndef _TopTools_ShapeMapHasher_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_HeaderFile +#include +#endif + + +#define TheKey TopoDS_Shape +#define TheKey_hxx +#define TheItem BOPTools_PaveBlock +#define TheItem_hxx +#define Hasher TopTools_ShapeMapHasher +#define Hasher_hxx +#define TCollection_IndexedDataMapNode NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMapNode_hxx +#define Handle_TCollection_IndexedDataMapNode Handle_NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMapNode_Type_() NMTTools_IndexedDataMapNodeOfIndexedDataMapOfShapePaveBlock_Type_() +#define TCollection_IndexedDataMap NMTTools_IndexedDataMapOfShapePaveBlock +#define TCollection_IndexedDataMap_hxx +#include + diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl new file mode 100644 index 000000000..1d59d74b8 --- /dev/null +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cdl @@ -0,0 +1,55 @@ +-- File: NMTTools_IteratorOfCoupleOfShape.cdl +-- Created: Thu Dec 4 16:57:48 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class IteratorOfCoupleOfShape from NMTTools + inherits IteratorOfCoupleOfShape from BOPTools + + ---Purpose: + +uses + ShapeEnum from TopAbs, + IndexedMapOfCoupleOfInteger from BOPTools, + PShapesDataStructure from NMTDS, + ShapesDataStructure from NMTDS + +raises + NoSuchObject from Standard + +is + Create + returns IteratorOfCoupleOfShape from NMTTools; + + SetDS(me:out; + pDS:PShapesDataStructure from NMTDS); + + Initialize(me: in out; + Type1: ShapeEnum from TopAbs; + Type2: ShapeEnum from TopAbs) + raises NoSuchObject from Standard + is redefined; + + Current(me; Index1: in out Integer from Standard; + Index2: in out Integer from Standard; + WithSubShape: out Boolean from Standard) + is redefined; + + More(me) + returns Boolean from Standard + is redefined; + + DS(me) + returns ShapesDataStructure from NMTDS; + ---C++:return const & + +fields + myPNMTPS : PShapesDataStructure from NMTDS is protected; + myMap : IndexedMapOfCoupleOfInteger from BOPTools is protected; + myIndex1 : Integer from Standard is protected; + myIndex2 : Integer from Standard is protected; + myWithSubShapeFlag: Boolean from Standard is protected; + +end IteratorOfCoupleOfShape; diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx new file mode 100644 index 000000000..155b9b843 --- /dev/null +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.cxx @@ -0,0 +1,140 @@ +// File: NMTTools_IteratorOfCoupleOfShape.cxx +// Created: Thu Dec 4 17:00:03 2003 +// Author: Peter KURNEV +// + + +#include +#include +#include +#include +#include +#include + +//======================================================================= +// function: +// purpose: +//======================================================================= + NMTTools_IteratorOfCoupleOfShape::NMTTools_IteratorOfCoupleOfShape() +: + BOPTools_IteratorOfCoupleOfShape() +{ + myIndex1=0; + myIndex2=0; + myWithSubShapeFlag=Standard_False; +} +//======================================================================= +// function: SetDS +// purpose: +//======================================================================= + void NMTTools_IteratorOfCoupleOfShape::SetDS(const NMTDS_PShapesDataStructure& PDS) +{ + myPNMTPS=PDS; + SetDataStructure(myPNMTPS); +} +//======================================================================= +// function: Initialize +// purpose: +//======================================================================= + void NMTTools_IteratorOfCoupleOfShape::Initialize(const TopAbs_ShapeEnum Type1, + const TopAbs_ShapeEnum Type2) +{ + if(myPDS==NULL) { + Standard_NoSuchObject::Raise("NMTTools_IteratorOfCoupleOfShape::Initialize: myPDS==NULL"); + } + // + myType1 = Type1; + myType2 = Type2; + myCurrentIndex1 = -1; + myCurrentIndex2 = -1; + // + myFirstLowerIndex=1; + myFirstUpperIndex=myPNMTPS->NumberOfShapesOfTheObject(); + mySecondLowerIndex=myFirstUpperIndex+1; + mySecondUpperIndex=myFirstUpperIndex+myPNMTPS->NumberOfShapesOfTheTool(); + // + Standard_Integer n1, n2, aIR1, aIR2;//, aN1, aN2, aNS; + // + const NMTDS_CArray1OfIndexRange& aRanges=myPNMTPS->Ranges(); + // + //aNS=myPNMTPS->NumberOfShapesOfTheObject(); + myIndex1=0; + myIndex2=0; + myWithSubShapeFlag=Standard_False; + // + myListOfCouple.Clear(); + myMap.Clear(); + // + NextP(); + for (; MoreP(); NextP()) { + CurrentP(n1, n2); + // + aIR1=myPNMTPS->ShapeRangeIndex(n1); + aIR2=myPNMTPS->ShapeRangeIndex(n2); + if (aIR1==aIR2){ + continue; + } + // + BOPTools_CoupleOfInteger aCouple(n1, n2); + myListOfCouple.Append(aCouple); + // + /* + aN1=(n1>aNS)? n1-aNS : n1; + aN2=(n2>aNS)? n2-aNS : n2; + BOPTools_CoupleOfInteger aCoupleX(aN1, aN2); + myMap.Add(aCoupleX); + */ + } + myIterator.Initialize(myListOfCouple); +} +//======================================================================= +// function: Current +// purpose: +//======================================================================= + void NMTTools_IteratorOfCoupleOfShape::Current(Standard_Integer& aIndex1, + Standard_Integer& aIndex2, + Standard_Boolean& aWithSubShape) const +{ + aIndex1=myIndex1; + aIndex2=myIndex2; + aWithSubShape=myWithSubShapeFlag; +} +//======================================================================= +// function: More +// purpose: +//======================================================================= + Standard_Boolean NMTTools_IteratorOfCoupleOfShape::More()const +{ + Standard_Boolean bMore, bWithSubShape; + Standard_Integer n1, n2, aNS, aN1, aN2; + BOPTools_CoupleOfInteger aCoupleX; + NMTTools_IteratorOfCoupleOfShape* pIt=(NMTTools_IteratorOfCoupleOfShape*)this; + // + aNS=myPNMTPS->NumberOfShapesOfTheObject(); + pIt->myIndex1=0; + pIt->myIndex2=0; + pIt->myWithSubShapeFlag=Standard_False; + // + while (1) { + bMore=myIterator.More(); + if (!bMore) { + break; + } + // + BOPTools_IteratorOfCoupleOfShape::Current(n1, n2, bWithSubShape); + aN1=(n1>aNS)? n1-aNS : n1; + aN2=(n2>aNS)? n2-aNS : n2; + aCoupleX.SetCouple(aN1, aN2); + if (!myMap.Contains(aCoupleX)) { + pIt->myMap.Add(aCoupleX); + // + pIt->myIndex1=aN1; + pIt->myIndex2=aN2; + pIt->myWithSubShapeFlag=bWithSubShape; + break; + } + // + pIt->Next(); + } + return bMore; +} diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx new file mode 100644 index 000000000..bcd6d0ef0 --- /dev/null +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.hxx @@ -0,0 +1,111 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_IteratorOfCoupleOfShape_HeaderFile +#define _NMTTools_IteratorOfCoupleOfShape_HeaderFile + +#ifndef _NMTDS_PShapesDataStructure_HeaderFile +#include +#endif +#ifndef _BOPTools_IndexedMapOfCoupleOfInteger_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _BOPTools_IteratorOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _TopAbs_ShapeEnum_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class NMTDS_ShapesDataStructure; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_IteratorOfCoupleOfShape : public BOPTools_IteratorOfCoupleOfShape { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_IteratorOfCoupleOfShape(); +Standard_EXPORT void SetDS(const NMTDS_PShapesDataStructure& pDS) ; +Standard_EXPORT virtual void Initialize(const TopAbs_ShapeEnum Type1,const TopAbs_ShapeEnum Type2) ; +Standard_EXPORT virtual void Current(Standard_Integer& Index1,Standard_Integer& Index2,Standard_Boolean& WithSubShape) const; +Standard_EXPORT virtual Standard_Boolean More() const; +Standard_EXPORT const NMTDS_ShapesDataStructure& DS() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +NMTDS_PShapesDataStructure myPNMTPS; +BOPTools_IndexedMapOfCoupleOfInteger myMap; +Standard_Integer myIndex1; +Standard_Integer myIndex2; +Standard_Boolean myWithSubShapeFlag; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx new file mode 100644 index 000000000..f83e9fb6a --- /dev/null +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx new file mode 100644 index 000000000..de093960b --- /dev/null +++ b/src/NMTTools/NMTTools_IteratorOfCoupleOfShape.jxx @@ -0,0 +1,9 @@ +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTDS_ShapesDataStructure_HeaderFile +#include +#endif +#ifndef _NMTTools_IteratorOfCoupleOfShape_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx new file mode 100644 index 000000000..362033001 --- /dev/null +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock.hxx @@ -0,0 +1,124 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile +#define _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoMoreObject; +class Standard_NoSuchObject; +class NMTTools_ListOfCommonBlock; +class NMTTools_CommonBlock; +class NMTTools_ListNodeOfListOfCommonBlock; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_ListIteratorOfListOfCommonBlock { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock(); +Standard_EXPORT NMTTools_ListIteratorOfListOfCommonBlock(const NMTTools_ListOfCommonBlock& L); +Standard_EXPORT void Initialize(const NMTTools_ListOfCommonBlock& L) ; + Standard_Boolean More() const; +Standard_EXPORT void Next() ; +Standard_EXPORT NMTTools_CommonBlock& Value() const; + + +friend class NMTTools_ListOfCommonBlock; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Address current; +Standard_Address previous; + + +}; + +#define Item NMTTools_CommonBlock +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() +#define TCollection_List NMTTools_ListOfCommonBlock +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx new file mode 100644 index 000000000..10f53977d --- /dev/null +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCommonBlock_0.cxx @@ -0,0 +1,45 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_NoMoreObject_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#include +#endif + + +#define Item NMTTools_CommonBlock +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() +#define TCollection_List NMTTools_ListOfCommonBlock +#define TCollection_List_hxx +#include + diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx new file mode 100644 index 000000000..3430c79f8 --- /dev/null +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape.hxx @@ -0,0 +1,124 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile +#define _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoMoreObject; +class Standard_NoSuchObject; +class NMTTools_ListOfCoupleOfShape; +class NMTTools_CoupleOfShape; +class NMTTools_ListNodeOfListOfCoupleOfShape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_ListIteratorOfListOfCoupleOfShape { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape(); +Standard_EXPORT NMTTools_ListIteratorOfListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& L); +Standard_EXPORT void Initialize(const NMTTools_ListOfCoupleOfShape& L) ; + Standard_Boolean More() const; +Standard_EXPORT void Next() ; +Standard_EXPORT NMTTools_CoupleOfShape& Value() const; + + +friend class NMTTools_ListOfCoupleOfShape; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +Standard_Address current; +Standard_Address previous; + + +}; + +#define Item NMTTools_CoupleOfShape +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +#define TCollection_List NMTTools_ListOfCoupleOfShape +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx new file mode 100644 index 000000000..9cba93370 --- /dev/null +++ b/src/NMTTools/NMTTools_ListIteratorOfListOfCoupleOfShape_0.cxx @@ -0,0 +1,45 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_NoMoreObject_HeaderFile +#include +#endif +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_CoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#include +#endif + + +#define Item NMTTools_CoupleOfShape +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +#define TCollection_List NMTTools_ListOfCoupleOfShape +#define TCollection_List_hxx +#include + diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx new file mode 100644 index 000000000..88cf5854a --- /dev/null +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock.hxx @@ -0,0 +1,123 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#define _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#include +#endif + +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class NMTTools_CommonBlock; +class NMTTools_ListOfCommonBlock; +class NMTTools_ListIteratorOfListOfCommonBlock; + + +class NMTTools_ListNodeOfListOfCommonBlock : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTTools_ListNodeOfListOfCommonBlock(const NMTTools_CommonBlock& I,const TCollection_MapNodePtr& n); + NMTTools_CommonBlock& Value() const; +Standard_EXPORT ~NMTTools_ListNodeOfListOfCommonBlock(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +NMTTools_CommonBlock myValue; + + +}; + +#define Item NMTTools_CommonBlock +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() +#define TCollection_List NMTTools_ListOfCommonBlock +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx new file mode 100644 index 000000000..ad488952f --- /dev/null +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCommonBlock_0.cxx @@ -0,0 +1,91 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile +#include +#endif +NMTTools_ListNodeOfListOfCommonBlock::~NMTTools_ListNodeOfListOfCommonBlock() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCommonBlock_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTTools_ListNodeOfListOfCommonBlock", + sizeof(NMTTools_ListNodeOfListOfCommonBlock), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTTools_ListNodeOfListOfCommonBlock) Handle(NMTTools_ListNodeOfListOfCommonBlock)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTTools_ListNodeOfListOfCommonBlock) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock))) { + _anOtherObject = Handle(NMTTools_ListNodeOfListOfCommonBlock)((Handle(NMTTools_ListNodeOfListOfCommonBlock)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCommonBlock::DynamicType() const +{ + return STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) ; +} +Standard_Boolean NMTTools_ListNodeOfListOfCommonBlock::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCommonBlock) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTTools_ListNodeOfListOfCommonBlock::~Handle_NMTTools_ListNodeOfListOfCommonBlock() {} +#define Item NMTTools_CommonBlock +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() +#define TCollection_List NMTTools_ListOfCommonBlock +#define TCollection_List_hxx +#include + diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx new file mode 100644 index 000000000..cde01ee9b --- /dev/null +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape.hxx @@ -0,0 +1,123 @@ +// File generated by CPPExt (Transient) +// +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#define _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#include +#endif + +#ifndef _NMTTools_CoupleOfShape_HeaderFile +#include +#endif +#ifndef _TCollection_MapNode_HeaderFile +#include +#endif +#ifndef _TCollection_MapNodePtr_HeaderFile +#include +#endif +class NMTTools_CoupleOfShape; +class NMTTools_ListOfCoupleOfShape; +class NMTTools_ListIteratorOfListOfCoupleOfShape; + + +class NMTTools_ListNodeOfListOfCoupleOfShape : public TCollection_MapNode { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +NMTTools_ListNodeOfListOfCoupleOfShape(const NMTTools_CoupleOfShape& I,const TCollection_MapNodePtr& n); + NMTTools_CoupleOfShape& Value() const; +Standard_EXPORT ~NMTTools_ListNodeOfListOfCoupleOfShape(); + + + + + // Type management + // + Standard_EXPORT friend Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Type_(); + Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; + Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // +NMTTools_CoupleOfShape myValue; + + +}; + +#define Item NMTTools_CoupleOfShape +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +#define TCollection_List NMTTools_ListOfCoupleOfShape +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx new file mode 100644 index 000000000..296236fcb --- /dev/null +++ b/src/NMTTools/NMTTools_ListNodeOfListOfCoupleOfShape_0.cxx @@ -0,0 +1,91 @@ +// File generated by CPPExt (Transient) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_TypeMismatch_HeaderFile +#include +#endif + +#ifndef _NMTTools_CoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile +#include +#endif +NMTTools_ListNodeOfListOfCoupleOfShape::~NMTTools_ListNodeOfListOfCoupleOfShape() {} + + + +Standard_EXPORT Handle_Standard_Type& NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +{ + + static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); + if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); + static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); + if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); + static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); + if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); + + + static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; + static Handle_Standard_Type _aType = new Standard_Type("NMTTools_ListNodeOfListOfCoupleOfShape", + sizeof(NMTTools_ListNodeOfListOfCoupleOfShape), + 1, + (Standard_Address)_Ancestors, + (Standard_Address)NULL); + + return _aType; +} + + +// DownCast method +// allow safe downcasting +// +const Handle(NMTTools_ListNodeOfListOfCoupleOfShape) Handle(NMTTools_ListNodeOfListOfCoupleOfShape)::DownCast(const Handle(Standard_Transient)& AnObject) +{ + Handle(NMTTools_ListNodeOfListOfCoupleOfShape) _anOtherObject; + + if (!AnObject.IsNull()) { + if (AnObject->IsKind(STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape))) { + _anOtherObject = Handle(NMTTools_ListNodeOfListOfCoupleOfShape)((Handle(NMTTools_ListNodeOfListOfCoupleOfShape)&)AnObject); + } + } + + return _anOtherObject ; +} +const Handle(Standard_Type)& NMTTools_ListNodeOfListOfCoupleOfShape::DynamicType() const +{ + return STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) ; +} +Standard_Boolean NMTTools_ListNodeOfListOfCoupleOfShape::IsKind(const Handle(Standard_Type)& AType) const +{ + return (STANDARD_TYPE(NMTTools_ListNodeOfListOfCoupleOfShape) == AType || TCollection_MapNode::IsKind(AType)); +} +Handle_NMTTools_ListNodeOfListOfCoupleOfShape::~Handle_NMTTools_ListNodeOfListOfCoupleOfShape() {} +#define Item NMTTools_CoupleOfShape +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +#define TCollection_List NMTTools_ListOfCoupleOfShape +#define TCollection_List_hxx +#include + diff --git a/src/NMTTools/NMTTools_ListOfCommonBlock.hxx b/src/NMTTools/NMTTools_ListOfCommonBlock.hxx new file mode 100644 index 000000000..372139c0a --- /dev/null +++ b/src/NMTTools/NMTTools_ListOfCommonBlock.hxx @@ -0,0 +1,150 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_ListOfCommonBlock_HeaderFile +#define _NMTTools_ListOfCommonBlock_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class NMTTools_ListIteratorOfListOfCommonBlock; +class NMTTools_CommonBlock; +class NMTTools_ListNodeOfListOfCommonBlock; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_ListOfCommonBlock { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_ListOfCommonBlock(); +Standard_EXPORT void Assign(const NMTTools_ListOfCommonBlock& Other) ; + void operator=(const NMTTools_ListOfCommonBlock& Other) +{ + Assign(Other); +} + +Standard_EXPORT Standard_Integer Extent() const; +Standard_EXPORT void Clear() ; +~NMTTools_ListOfCommonBlock() +{ + Clear(); +} + + Standard_Boolean IsEmpty() const; +Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I) ; +Standard_EXPORT void Prepend(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ; +Standard_EXPORT void Prepend(NMTTools_ListOfCommonBlock& Other) ; +Standard_EXPORT void Append(const NMTTools_CommonBlock& I) ; +Standard_EXPORT void Append(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& theIt) ; +Standard_EXPORT void Append(NMTTools_ListOfCommonBlock& Other) ; +Standard_EXPORT NMTTools_CommonBlock& First() const; +Standard_EXPORT NMTTools_CommonBlock& Last() const; +Standard_EXPORT void RemoveFirst() ; +Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCommonBlock& It) ; +Standard_EXPORT void InsertBefore(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ; +Standard_EXPORT void InsertBefore(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ; +Standard_EXPORT void InsertAfter(const NMTTools_CommonBlock& I,NMTTools_ListIteratorOfListOfCommonBlock& It) ; +Standard_EXPORT void InsertAfter(NMTTools_ListOfCommonBlock& Other,NMTTools_ListIteratorOfListOfCommonBlock& It) ; + + +friend class NMTTools_ListIteratorOfListOfCommonBlock; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTTools_ListOfCommonBlock(const NMTTools_ListOfCommonBlock& Other); + + + // Fields PRIVATE + // +Standard_Address myFirst; +Standard_Address myLast; + + +}; + +#define Item NMTTools_CommonBlock +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() +#define TCollection_List NMTTools_ListOfCommonBlock +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx b/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx new file mode 100644 index 000000000..d90f47b4c --- /dev/null +++ b/src/NMTTools/NMTTools_ListOfCommonBlock_0.cxx @@ -0,0 +1,42 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTTools_ListIteratorOfListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_ListNodeOfListOfCommonBlock_HeaderFile +#include +#endif + + +#define Item NMTTools_CommonBlock +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCommonBlock +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCommonBlock +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCommonBlock_Type_() +#define TCollection_List NMTTools_ListOfCommonBlock +#define TCollection_List_hxx +#include + diff --git a/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx b/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx new file mode 100644 index 000000000..f92f99443 --- /dev/null +++ b/src/NMTTools/NMTTools_ListOfCoupleOfShape.hxx @@ -0,0 +1,150 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile +#define _NMTTools_ListOfCoupleOfShape_HeaderFile + +#ifndef _Standard_Address_HeaderFile +#include +#endif +#ifndef _Handle_NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +class Standard_NoSuchObject; +class NMTTools_ListIteratorOfListOfCoupleOfShape; +class NMTTools_CoupleOfShape; +class NMTTools_ListNodeOfListOfCoupleOfShape; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_ListOfCoupleOfShape { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_ListOfCoupleOfShape(); +Standard_EXPORT void Assign(const NMTTools_ListOfCoupleOfShape& Other) ; + void operator=(const NMTTools_ListOfCoupleOfShape& Other) +{ + Assign(Other); +} + +Standard_EXPORT Standard_Integer Extent() const; +Standard_EXPORT void Clear() ; +~NMTTools_ListOfCoupleOfShape() +{ + Clear(); +} + + Standard_Boolean IsEmpty() const; +Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I) ; +Standard_EXPORT void Prepend(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ; +Standard_EXPORT void Prepend(NMTTools_ListOfCoupleOfShape& Other) ; +Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I) ; +Standard_EXPORT void Append(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& theIt) ; +Standard_EXPORT void Append(NMTTools_ListOfCoupleOfShape& Other) ; +Standard_EXPORT NMTTools_CoupleOfShape& First() const; +Standard_EXPORT NMTTools_CoupleOfShape& Last() const; +Standard_EXPORT void RemoveFirst() ; +Standard_EXPORT void Remove(NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; +Standard_EXPORT void InsertBefore(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; +Standard_EXPORT void InsertBefore(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; +Standard_EXPORT void InsertAfter(const NMTTools_CoupleOfShape& I,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; +Standard_EXPORT void InsertAfter(NMTTools_ListOfCoupleOfShape& Other,NMTTools_ListIteratorOfListOfCoupleOfShape& It) ; + + +friend class NMTTools_ListIteratorOfListOfCoupleOfShape; + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // +Standard_EXPORT NMTTools_ListOfCoupleOfShape(const NMTTools_ListOfCoupleOfShape& Other); + + + // Fields PRIVATE + // +Standard_Address myFirst; +Standard_Address myLast; + + +}; + +#define Item NMTTools_CoupleOfShape +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +#define TCollection_List NMTTools_ListOfCoupleOfShape +#define TCollection_List_hxx + +#include + +#undef Item +#undef Item_hxx +#undef TCollection_ListNode +#undef TCollection_ListNode_hxx +#undef TCollection_ListIterator +#undef TCollection_ListIterator_hxx +#undef Handle_TCollection_ListNode +#undef TCollection_ListNode_Type_ +#undef TCollection_List +#undef TCollection_List_hxx + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx b/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx new file mode 100644 index 000000000..047fbfa59 --- /dev/null +++ b/src/NMTTools/NMTTools_ListOfCoupleOfShape_0.cxx @@ -0,0 +1,42 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + +#ifndef _Standard_NoSuchObject_HeaderFile +#include +#endif +#ifndef _NMTTools_ListIteratorOfListOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_CoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_ListNodeOfListOfCoupleOfShape_HeaderFile +#include +#endif + + +#define Item NMTTools_CoupleOfShape +#define Item_hxx +#define TCollection_ListNode NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_hxx +#define TCollection_ListIterator NMTTools_ListIteratorOfListOfCoupleOfShape +#define TCollection_ListIterator_hxx +#define Handle_TCollection_ListNode Handle_NMTTools_ListNodeOfListOfCoupleOfShape +#define TCollection_ListNode_Type_() NMTTools_ListNodeOfListOfCoupleOfShape_Type_() +#define TCollection_List NMTTools_ListOfCoupleOfShape +#define TCollection_List_hxx +#include + diff --git a/src/NMTTools/NMTTools_PCurveMaker.cdl b/src/NMTTools/NMTTools_PCurveMaker.cdl new file mode 100644 index 000000000..0211e9d6e --- /dev/null +++ b/src/NMTTools/NMTTools_PCurveMaker.cdl @@ -0,0 +1,35 @@ +-- File: NMTTools_PCurveMaker.cdl +-- Created: +-- Author: Peter KURNEV +-- + +class PCurveMaker from NMTTools + + ---Purpose: + -- Class provides computation p-curves for the edges and theirs + --- split parts + +uses + PDSFiller from NMTTools + +is + Create (aFiller:out PDSFiller from NMTTools) + returns PCurveMaker from NMTTools; + ---Purpose: + --- Constructor + --- + Do(me:out); + ---Purpose: + --- Launch the processor + --- + IsDone(me) + returns Boolean from Standard; + ---Purpose: + --- Returns TRUE if Ok + --- + +fields + myDSFiller: PDSFiller from NMTTools is protected; + myIsDone : Boolean from Standard is protected; + +end PCurveMaker; diff --git a/src/NMTTools/NMTTools_PCurveMaker.cxx b/src/NMTTools/NMTTools_PCurveMaker.cxx new file mode 100644 index 000000000..aa85b1fec --- /dev/null +++ b/src/NMTTools/NMTTools_PCurveMaker.cxx @@ -0,0 +1,109 @@ +// File: NMTTools_PCurveMaker.cxx +// Created: +// Author: Peter KURNEV +// + + +#include + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + + +//======================================================================= +// function: NMTTools_PCurveMaker +// purpose: +//======================================================================= + NMTTools_PCurveMaker::NMTTools_PCurveMaker(NMTTools_PDSFiller& pDSFiller) +: + myIsDone(Standard_False) +{ + myDSFiller=pDSFiller; +} +//======================================================================= +// function: IsDone +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PCurveMaker::IsDone() const +{ + return myIsDone; +} +//======================================================================= +// function: Do +// purpose: +//======================================================================= + void NMTTools_PCurveMaker::Do() +{ + Standard_Integer i, aNb, nF1, nF2, nE; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + TopoDS_Face aF1FWD, aF2FWD; + // + NMTTools_PaveFiller *pFiller=(NMTTools_PaveFiller*) &(myDSFiller->PaveFiller()); + NMTDS_ShapesDataStructure *pDS=pFiller->DS(); + // + BOPTools_CArray1OfSSInterference& aFFs=(pFiller->InterfPool())->SSInterferences(); + // + aNb=aFFs.Extent(); + for (i=1; i<=aNb; ++i) { + BOPTools_SSInterference& aFF=aFFs(i); + // Faces + aFF.Indices(nF1, nF2); + const TopoDS_Face& aF1=TopoDS::Face(pDS->Shape(nF1)); + const TopoDS_Face& aF2=TopoDS::Face(pDS->Shape(nF2)); + // + // 1.Forwarding the Faces + aF1FWD=aF1; + aF1FWD.Orientation(TopAbs_FORWARD); + aF2FWD=aF2; + aF2FWD.Orientation(TopAbs_FORWARD); + // + // 2. In, On parts processing + const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks(); + anIt.Initialize(aLPBInOn); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + const BOPTools_PaveBlock& aPBInOn=pFiller->RealPaveBlock(aPB); + // + nE=aPBInOn.Edge(); + const TopoDS_Edge& aE=TopoDS::Edge(pDS->Shape(nE)); + + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); + } + } // for (i=1; i<=aNb; i++) + myIsDone=Standard_True; +} + diff --git a/src/NMTTools/NMTTools_PCurveMaker.hxx b/src/NMTTools/NMTTools_PCurveMaker.hxx new file mode 100644 index 000000000..5a5397802 --- /dev/null +++ b/src/NMTTools/NMTTools_PCurveMaker.hxx @@ -0,0 +1,91 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_PCurveMaker_HeaderFile +#define _NMTTools_PCurveMaker_HeaderFile + +#ifndef _NMTTools_PDSFiller_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_PCurveMaker { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_PCurveMaker(NMTTools_PDSFiller& aFiller); +Standard_EXPORT void Do() ; +Standard_EXPORT Standard_Boolean IsDone() const; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // +NMTTools_PDSFiller myDSFiller; +Standard_Boolean myIsDone; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_PCurveMaker.ixx b/src/NMTTools/NMTTools_PCurveMaker.ixx new file mode 100644 index 000000000..28e9ca58d --- /dev/null +++ b/src/NMTTools/NMTTools_PCurveMaker.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_PCurveMaker.jxx b/src/NMTTools/NMTTools_PCurveMaker.jxx new file mode 100644 index 000000000..48e34586c --- /dev/null +++ b/src/NMTTools/NMTTools_PCurveMaker.jxx @@ -0,0 +1,3 @@ +#ifndef _NMTTools_PCurveMaker_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_PDSFiller.hxx b/src/NMTTools/NMTTools_PDSFiller.hxx new file mode 100644 index 000000000..5cc952848 --- /dev/null +++ b/src/NMTTools/NMTTools_PDSFiller.hxx @@ -0,0 +1,22 @@ +// File generated by CPPExt (Pointer) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_PDSFiller_HeaderFile +#define _NMTTools_PDSFiller_HeaderFile + +class NMTTools_DSFiller; + +typedef NMTTools_DSFiller* NMTTools_PDSFiller; + +#endif diff --git a/src/NMTTools/NMTTools_PPaveFiller.hxx b/src/NMTTools/NMTTools_PPaveFiller.hxx new file mode 100644 index 000000000..eddf3ed10 --- /dev/null +++ b/src/NMTTools/NMTTools_PPaveFiller.hxx @@ -0,0 +1,22 @@ +// File generated by CPPExt (Pointer) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#ifndef _NMTTools_PPaveFiller_HeaderFile +#define _NMTTools_PPaveFiller_HeaderFile + +class NMTTools_PaveFiller; + +typedef NMTTools_PaveFiller* NMTTools_PPaveFiller; + +#endif diff --git a/src/NMTTools/NMTTools_PaveFiller.cdl b/src/NMTTools/NMTTools_PaveFiller.cdl new file mode 100644 index 000000000..5013a1085 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller.cdl @@ -0,0 +1,430 @@ +-- File: NMTTools_PaveFiller.cdl +-- Created: Fri Dec 5 14:35:00 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class PaveFiller from NMTTools + + ---Purpose: + +uses + ListOfInteger from TColStd, + Pnt from gp, + ShapeEnum from TopAbs, + Vertex from TopoDS, + Face from TopoDS, + + Context from IntTools, + ShrunkRange from IntTools, + + IndexedDataMapOfShapeInteger from BooleanOperations, + + InterferencePool from BOPTools, + PInterferencePool from BOPTools, + PavePool from BOPTools, + PaveBlock from BOPTools, + ListOfPaveBlock from BOPTools, + SplitShapesPool from BOPTools, + Pave from BOPTools, + PaveSet from BOPTools, + Curve from BOPTools, + SSInterference from BOPTools, + + IDMapOfPaveBlockIMapOfPaveBlock from BOPTools, + IDMapOfPaveBlockIMapOfInteger from BOPTools, + SSIntersectionAttribute from BOPTools, + + CommonBlockPool from NMTTools, + CommonBlock from NMTTools, + ListOfCommonBlock from NMTTools, + IteratorOfCoupleOfShape from NMTTools, + + ShapesDataStructure from NMTDS, + PShapesDataStructure from NMTDS + +--raises + +is + Create + returns PaveFiller from NMTTools; + + Create(aIP:InterferencePool from BOPTools) + returns PaveFiller from NMTTools; + + Destroy (me: in out) + is virtual; + ---C++: alias "Standard_EXPORT virtual ~NMTTools_PaveFiller(){Destroy();}" + -- + -- Selectors/Modifiers + SetInterferencePool(me:out; + aIP:InterferencePool from BOPTools); + + InterfPool(me:out) + returns PInterferencePool from BOPTools; + -- + -- Perform the algo + Init (me:out) + is protected; + + Perform (me:out) + is virtual; + + PerformVV (me:out) + is virtual protected; + + PerformVE (me:out) + is virtual protected; + + PerformVF (me:out) + is virtual protected; + + PerformEE (me:out) + is virtual protected; + + PerformEF (me:out) + is virtual protected; + + PerformFF (me:out) + is virtual protected; + + MakeSplitEdges(me:out) + is protected; + + PreparePaveBlocks (me:out; + aType1: ShapeEnum from TopAbs; + aType2: ShapeEnum from TopAbs) + is virtual protected; + + CorrectShrunkRanges(me:out; + aSide: Integer from Standard; + aPave: Pave from BOPTools; + aSR : out ShrunkRange from IntTools) + is protected; + + PreparePaveBlocks (me:out; + anE:Integer from Standard) + is virtual protected; + + PerformNewVertices (me:out) + is virtual protected; + + PrepareEdges (me:out) + is virtual protected; + + SortTypes (me; + anInd1:in out Integer from Standard; + anInd2:in out Integer from Standard) + is protected; + + ExpectedPoolLength(me) + returns Integer from Standard + is protected; + -- + -- Query section + IsDone(me) + returns Boolean from Standard; + + DS(me:out) + returns PShapesDataStructure from NMTDS; + + Context(me) + returns Context from IntTools; + ---C++:return const & + + ChangeContext(me:out) + returns Context from IntTools; + ---C++:return & + + PavePool(me) + returns PavePool from BOPTools; + ---C++:return const & + + ChangePavePool(me:out) + returns PavePool from BOPTools; + ---C++:return & + + CommonBlockPool(me) + returns CommonBlockPool from NMTTools; + ---C++:return const & + + ChangeCommonBlockPool(me:out) + returns CommonBlockPool from NMTTools; + ---C++:return & + + SplitShapesPool(me) + returns SplitShapesPool from BOPTools; + ---C++:return const & + + ChangeSplitShapesPool(me:out) + returns SplitShapesPool from BOPTools; + ---C++:return & + + FindSDVertex (me; + nV: Integer from Standard) + returns Integer from Standard; + + IsSuccesstorsComputed (me; + iF1:Integer from Standard; + iF2:Integer from Standard) + returns Boolean from Standard + is protected; + + IsBlocksCoinside (me; + aPB1:PaveBlock from BOPTools; + aPB2:PaveBlock from BOPTools) + returns Boolean from Standard + is protected; + + RefinePavePool(me:out) + is protected; + + CheckFacePaves(me:out; + aV : Vertex from TopoDS; + nF: Integer from Standard) + returns Integer from Standard + is protected; + + ReplaceCommonBlocks (me:out; + aLCB: ListOfCommonBlock from NMTTools) + is protected; + + RemoveCommonBlocks (me:out; + aLCB: ListOfCommonBlock from NMTTools) + is protected; + + SplitCommonBlocks (me:out; + aLCB: ListOfCommonBlock from NMTTools) + is protected; + + SplitCommonBlock (me:out; + aCB : CommonBlock from NMTTools; + aLCB: out ListOfCommonBlock from NMTTools) + is protected; + + EECommonBlocks(me:out; + aM:IDMapOfPaveBlockIMapOfPaveBlock from BOPTools) + is protected; + + EFCommonBlocks(me:out; + aMapCB:IDMapOfPaveBlockIMapOfInteger from BOPTools) + is protected; + + EENewVertices (me:out; + aM:IndexedDataMapOfShapeInteger from BooleanOperations) + is protected; + + EENewVertices (me:out; + aV:Vertex from TopoDS; + aM:IndexedDataMapOfShapeInteger from BooleanOperations) + is protected; + + EFNewVertices (me:out; + aM:IndexedDataMapOfShapeInteger from BooleanOperations) + is protected; + + EFNewVertices (me:out; + aV:Vertex from TopoDS; + aM:IndexedDataMapOfShapeInteger from BooleanOperations) + is protected; + + UpdateCommonBlocks(me:out) + is protected; + + UpdatePaveBlocks(me:out) + is protected; + + SplitIndex(me; + aPB:PaveBlock from BOPTools) + returns Integer from Standard + is protected; + + MakeBlocks(me:out) + is protected; + + -------------------------------------------------------------- + --- + --- Some API FUNCTIONS + --- + SplitsInFace(me:out; + aBid:Integer from Standard; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfInteger from TColStd) + returns Integer from Standard; + + SplitsInFace(me:out; + nE1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfInteger from TColStd) + returns Integer from Standard; + + SplitsOnEdge(me:out; + nE1 :Integer from Standard; + nE2 :Integer from Standard; + aLs :out ListOfInteger from TColStd) + returns Integer from Standard; + + SplitsOnFace(me:out; + nE1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfInteger from TColStd) + returns Integer from Standard; + + SplitsOnFace(me:out; + aBid:Integer from Standard; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfInteger from TColStd) + returns Integer from Standard; + + SplitsInFace(me:out; + aBid:Integer from Standard; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools) + returns Integer from Standard; + + SplitsInFace(me:out; + nE1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools) + returns Integer from Standard; + + SplitsOnEdge(me:out; + nE1 :Integer from Standard; + nE2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools) + returns Integer from Standard; + + SplitsOnFace(me:out; + nE1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools) + returns Integer from Standard; + + SplitsOnFace(me:out; + aBid:Integer from Standard; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools) + returns Integer from Standard; + -- + SplitsFace (me:out; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools) + returns Integer from Standard; + + SplitsFace (me:out; + nF2 :Integer from Standard; + aLs :out ListOfInteger from TColStd) + returns Integer from Standard; + + CommonBlocksFace (me:out; + nF :Integer from Standard; + aLCB:out ListOfCommonBlock from NMTTools) + returns Integer from Standard; + + PrepareFace(me:out; + nF : Integer from Standard; + aF : out Face from TopoDS); + + -- + RealPaveBlock(me:out; + aPB:PaveBlock from BOPTools) + returns PaveBlock from BOPTools; + ---C++: return const & + -- + RealSplitsFace (me:out; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools); + + HasRealSplitsInOnFace (me:out; + nF1 :Integer from Standard; + nF2 :Integer from Standard) + returns Boolean from Standard; + + RealSplitsInFace(me:out; + aBid:Integer from Standard; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools); + + RealSplitsInFace(me:out; + nE1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools); + + RealSplitsOnEdge(me:out; + nE1 :Integer from Standard; + nE2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools); + + RealSplitsOnFace(me:out; + nE1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools); + + RealSplitsOnFace(me:out; + aBid:Integer from Standard; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aLs :out ListOfPaveBlock from BOPTools); + -- + PrepareSetForFace(me:out; + nF1 :Integer from Standard; + nF2 :Integer from Standard; + aPSF:out PaveSet from BOPTools); + + PutPaveOnCurve(me:out; + aPSF: PaveSet from BOPTools; + aTol: Real from Standard; + aBC : out Curve from BOPTools); + + PutBoundPaveOnCurve (me:out; + aBC :out Curve from BOPTools; + aFF :out SSInterference from BOPTools); + + PutBoundPaveOnCurve (me:out; + aP : Pnt from gp; + aT : Real from Standard; + aBC :out Curve from BOPTools; + aFF :out SSInterference from BOPTools); + + FindPave (me:out; + aP : Pnt from gp; + aTpV: Real from Standard; + aPS : PaveSet from BOPTools; + aPV :out Pave from BOPTools) + returns Boolean from Standard; + + CheckIntermediatePoint(me:out; + aPB : PaveBlock from BOPTools; + aPBR: PaveBlock from BOPTools; + aTol: Real from Standard) + returns Integer from Standard; + + IsExistingPaveBlock (me:out; + aPB : PaveBlock from BOPTools; + aFF : SSInterference from BOPTools) + returns Boolean from Standard; + + MakePCurves (me:out); + +fields + myIntrPool : PInterferencePool from BOPTools is protected; + myDS : PShapesDataStructure from NMTDS is protected; + myIsDone : Boolean from Standard is protected; + myNbSources : Integer from Standard is protected; + myNbEdges : Integer from Standard is protected; + myDSIt : IteratorOfCoupleOfShape from NMTTools is protected; + -- + myPavePool : PavePool from BOPTools is protected; + myPavePoolNew : PavePool from BOPTools is protected; + myCommonBlockPool : CommonBlockPool from NMTTools is protected; + mySplitShapesPool : SplitShapesPool from BOPTools is protected; + -- + myContext : Context from IntTools is protected; + mySectionAttribute : SSIntersectionAttribute from BOPTools is protected; +end PaveFiller; diff --git a/src/NMTTools/NMTTools_PaveFiller.cxx b/src/NMTTools/NMTTools_PaveFiller.cxx new file mode 100644 index 000000000..231482f38 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller.cxx @@ -0,0 +1,211 @@ +// File: NMTTools_PaveFiller.cxx +// Created: Fri Dec 5 14:58:54 2003 +// Author: Peter KURNEV +// +// +#include +// +#include +#include +#include +#include "utilities.h" + +//======================================================================= +// function: NMTTools_PaveFiller::NMTTools_PaveFiller +// purpose: +//======================================================================= + NMTTools_PaveFiller::NMTTools_PaveFiller() +{ + myIntrPool=NULL; + myDS=NULL; + myIsDone=Standard_False; + myNbSources=0; + myNbEdges=0; +} +//======================================================================= +// function:NMTTools_PaveFiller::NMTTools_PaveFiller +// purpose: +//======================================================================= + NMTTools_PaveFiller::NMTTools_PaveFiller(const BOPTools_InterferencePool& aIP) +{ + SetInterferencePool(aIP); +} +//======================================================================= +// function: Destroy +// purpose: +//======================================================================= + void NMTTools_PaveFiller::Destroy() +{ +} +//======================================================================= +// function: SetInterferencePool +// purpose: +//======================================================================= + void NMTTools_PaveFiller::SetInterferencePool(const BOPTools_InterferencePool& aIP) +{ + myIsDone=Standard_False; + // + myIntrPool=(BOPTools_InterferencePool*)&aIP; + myDS=(NMTDS_ShapesDataStructure*)myIntrPool->DS(); + myNbSources=myDS->NumberOfShapesOfTheObject()+myDS->NumberOfShapesOfTheTool(); + myNbEdges=myDS->NbEdges(); +} +//======================================================================= +// function: InterfPool +// purpose: +//======================================================================= + BOPTools_PInterferencePool NMTTools_PaveFiller::InterfPool() +{ + return myIntrPool; +} +//======================================================================= +// function:IsDone +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::IsDone() const +{ + return myIsDone; +} +//======================================================================= +// function: DS +// purpose: +//======================================================================= + NMTDS_PShapesDataStructure NMTTools_PaveFiller::DS() +{ + return myDS; +} +//======================================================================= +// function: Context +// purpose: +//======================================================================= + const IntTools_Context& NMTTools_PaveFiller::Context() const +{ + return myContext; +} +//======================================================================= +// function: ChangeContext +// purpose: +//======================================================================= + IntTools_Context& NMTTools_PaveFiller::ChangeContext() +{ + return myContext; +} +//======================================================================= +// function: PavePool +// purpose: +//======================================================================= + const BOPTools_PavePool& NMTTools_PaveFiller::PavePool() const +{ + return myPavePool; +} +//======================================================================= +// function: ChangePavePool +// purpose: +//======================================================================= + BOPTools_PavePool& NMTTools_PaveFiller::ChangePavePool() +{ + return myPavePool; +} +//======================================================================= +// function: CommonBlockPool +// purpose: +//======================================================================= + const NMTTools_CommonBlockPool& NMTTools_PaveFiller::CommonBlockPool() const +{ + return myCommonBlockPool; +} +//======================================================================= +// function: ChangeCommonBlockPool +// purpose: +//======================================================================= + NMTTools_CommonBlockPool& NMTTools_PaveFiller::ChangeCommonBlockPool() +{ + return myCommonBlockPool; +} +//======================================================================= +// function: SplitShapesPool +// purpose: +//======================================================================= + const BOPTools_SplitShapesPool& NMTTools_PaveFiller::SplitShapesPool() const +{ + return mySplitShapesPool; +} + +//======================================================================= +// function: ChangeSplitShapesPool +// purpose: +//======================================================================= + BOPTools_SplitShapesPool& NMTTools_PaveFiller::ChangeSplitShapesPool() +{ + return mySplitShapesPool; +} +//======================================================================= +// function: Init +// purpose: +//======================================================================= + void NMTTools_PaveFiller::Init() +{ + myDSIt.SetDS(myDS); +} +//======================================================================= +// function: Perform +// purpose: +//======================================================================= + void NMTTools_PaveFiller::Perform() +{ + try { + // 0. + Init();//myDSIt.SetDS(myDS); + // + //1.VV + PerformVV(); + PerformNewVertices(); + // + // 2.VE + myPavePool.Resize (myNbEdges); + PrepareEdges(); + PerformVE(); + // + // 3.VF + PerformVF(); + // + // 4.EE + myCommonBlockPool.Resize (myNbEdges); + mySplitShapesPool.Resize (myNbEdges); + myPavePoolNew .Resize (myNbEdges); + + PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE); + PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE); + // + PerformEE(); + // + RefinePavePool (); + // + myPavePoolNew.Destroy(); + myPavePoolNew.Resize (myNbEdges); + // + // 5.EF + PreparePaveBlocks(TopAbs_EDGE, TopAbs_FACE); + PerformEF(); + RefinePavePool(); + // + myPavePoolNew.Destroy(); + MakeSplitEdges(); + UpdateCommonBlocks(); + // + // 6. FF + PerformFF (); + MakeBlocks(); + MakePCurves(); + // + // 7.Postprocessing + UpdatePaveBlocks(); + // + NMTTools_DEProcessor aDEP(*this); + aDEP.Do(); + // + } + catch (BOPTColStd_Failure& x) { + MESSAGE(x.Message() << flush); + } +} diff --git a/src/NMTTools/NMTTools_PaveFiller.hxx b/src/NMTTools/NMTTools_PaveFiller.hxx new file mode 100644 index 000000000..5b5563563 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller.hxx @@ -0,0 +1,230 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_PaveFiller_HeaderFile +#define _NMTTools_PaveFiller_HeaderFile + +#ifndef _BOPTools_PInterferencePool_HeaderFile +#include +#endif +#ifndef _NMTDS_PShapesDataStructure_HeaderFile +#include +#endif +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _Standard_Integer_HeaderFile +#include +#endif +#ifndef _NMTTools_IteratorOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _BOPTools_PavePool_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlockPool_HeaderFile +#include +#endif +#ifndef _BOPTools_SplitShapesPool_HeaderFile +#include +#endif +#ifndef _IntTools_Context_HeaderFile +#include +#endif +#ifndef _BOPTools_SSIntersectionAttribute_HeaderFile +#include +#endif +#ifndef _TopAbs_ShapeEnum_HeaderFile +#include +#endif +#ifndef _Standard_Real_HeaderFile +#include +#endif +class BOPTools_InterferencePool; +class BOPTools_Pave; +class IntTools_ShrunkRange; +class IntTools_Context; +class BOPTools_PavePool; +class NMTTools_CommonBlockPool; +class BOPTools_SplitShapesPool; +class BOPTools_PaveBlock; +class TopoDS_Vertex; +class NMTTools_ListOfCommonBlock; +class NMTTools_CommonBlock; +class BOPTools_IDMapOfPaveBlockIMapOfPaveBlock; +class BOPTools_IDMapOfPaveBlockIMapOfInteger; +class BooleanOperations_IndexedDataMapOfShapeInteger; +class TColStd_ListOfInteger; +class BOPTools_ListOfPaveBlock; +class TopoDS_Face; +class BOPTools_PaveSet; +class BOPTools_Curve; +class BOPTools_SSInterference; +class gp_Pnt; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_PaveFiller { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT NMTTools_PaveFiller(); +Standard_EXPORT NMTTools_PaveFiller(const BOPTools_InterferencePool& aIP); +Standard_EXPORT virtual void Destroy() ; +Standard_EXPORT virtual ~NMTTools_PaveFiller(){Destroy();} +Standard_EXPORT void SetInterferencePool(const BOPTools_InterferencePool& aIP) ; +Standard_EXPORT BOPTools_PInterferencePool InterfPool() ; +Standard_EXPORT virtual void Perform() ; +Standard_EXPORT Standard_Boolean IsDone() const; +Standard_EXPORT NMTDS_PShapesDataStructure DS() ; +Standard_EXPORT const IntTools_Context& Context() const; +Standard_EXPORT IntTools_Context& ChangeContext() ; +Standard_EXPORT const BOPTools_PavePool& PavePool() const; +Standard_EXPORT BOPTools_PavePool& ChangePavePool() ; +Standard_EXPORT const NMTTools_CommonBlockPool& CommonBlockPool() const; +Standard_EXPORT NMTTools_CommonBlockPool& ChangeCommonBlockPool() ; +Standard_EXPORT const BOPTools_SplitShapesPool& SplitShapesPool() const; +Standard_EXPORT BOPTools_SplitShapesPool& ChangeSplitShapesPool() ; +Standard_EXPORT Standard_Integer FindSDVertex(const Standard_Integer nV) const; +Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; +Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; +Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,TColStd_ListOfInteger& aLs) ; +Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; +Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; +Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Integer SplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Integer SplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Integer SplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Integer SplitsFace(const Standard_Integer nF2,TColStd_ListOfInteger& aLs) ; +Standard_EXPORT Standard_Integer CommonBlocksFace(const Standard_Integer nF,NMTTools_ListOfCommonBlock& aLCB) ; +Standard_EXPORT void PrepareFace(const Standard_Integer nF,TopoDS_Face& aF) ; +Standard_EXPORT const BOPTools_PaveBlock& RealPaveBlock(const BOPTools_PaveBlock& aPB) ; +Standard_EXPORT void RealSplitsFace(const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT Standard_Boolean HasRealSplitsInOnFace(const Standard_Integer nF1,const Standard_Integer nF2) ; +Standard_EXPORT void RealSplitsInFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT void RealSplitsInFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT void RealSplitsOnEdge(const Standard_Integer nE1,const Standard_Integer nE2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT void RealSplitsOnFace(const Standard_Integer nE1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT void RealSplitsOnFace(const Standard_Integer aBid,const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_ListOfPaveBlock& aLs) ; +Standard_EXPORT void PrepareSetForFace(const Standard_Integer nF1,const Standard_Integer nF2,BOPTools_PaveSet& aPSF) ; +Standard_EXPORT void PutPaveOnCurve(const BOPTools_PaveSet& aPSF,const Standard_Real aTol,BOPTools_Curve& aBC) ; +Standard_EXPORT void PutBoundPaveOnCurve(BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; +Standard_EXPORT void PutBoundPaveOnCurve(const gp_Pnt& aP,const Standard_Real aT,BOPTools_Curve& aBC,BOPTools_SSInterference& aFF) ; +Standard_EXPORT Standard_Boolean FindPave(const gp_Pnt& aP,const Standard_Real aTpV,const BOPTools_PaveSet& aPS,BOPTools_Pave& aPV) ; +Standard_EXPORT Standard_Integer CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,const BOPTools_PaveBlock& aPBR,const Standard_Real aTol) ; +Standard_EXPORT Standard_Boolean IsExistingPaveBlock(const BOPTools_PaveBlock& aPB,const BOPTools_SSInterference& aFF) ; +Standard_EXPORT void MakePCurves() ; + + + + + +protected: + + // Methods PROTECTED + // +Standard_EXPORT void Init() ; +Standard_EXPORT virtual void PerformVV() ; +Standard_EXPORT virtual void PerformVE() ; +Standard_EXPORT virtual void PerformVF() ; +Standard_EXPORT virtual void PerformEE() ; +Standard_EXPORT virtual void PerformEF() ; +Standard_EXPORT virtual void PerformFF() ; +Standard_EXPORT void MakeSplitEdges() ; +Standard_EXPORT virtual void PreparePaveBlocks(const TopAbs_ShapeEnum aType1,const TopAbs_ShapeEnum aType2) ; +Standard_EXPORT void CorrectShrunkRanges(const Standard_Integer aSide,const BOPTools_Pave& aPave,IntTools_ShrunkRange& aSR) ; +Standard_EXPORT virtual void PreparePaveBlocks(const Standard_Integer anE) ; +Standard_EXPORT virtual void PerformNewVertices() ; +Standard_EXPORT virtual void PrepareEdges() ; +Standard_EXPORT void SortTypes(Standard_Integer& anInd1,Standard_Integer& anInd2) const; +Standard_EXPORT Standard_Integer ExpectedPoolLength() const; +Standard_EXPORT Standard_Boolean IsSuccesstorsComputed(const Standard_Integer iF1,const Standard_Integer iF2) const; +Standard_EXPORT Standard_Boolean IsBlocksCoinside(const BOPTools_PaveBlock& aPB1,const BOPTools_PaveBlock& aPB2) const; +Standard_EXPORT void RefinePavePool() ; +Standard_EXPORT Standard_Integer CheckFacePaves(const TopoDS_Vertex& aV,const Standard_Integer nF) ; +Standard_EXPORT void ReplaceCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; +Standard_EXPORT void RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; +Standard_EXPORT void SplitCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) ; +Standard_EXPORT void SplitCommonBlock(const NMTTools_CommonBlock& aCB,NMTTools_ListOfCommonBlock& aLCB) ; +Standard_EXPORT void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aM) ; +Standard_EXPORT void EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) ; +Standard_EXPORT void EENewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; +Standard_EXPORT void EENewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; +Standard_EXPORT void EFNewVertices(const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; +Standard_EXPORT void EFNewVertices(const TopoDS_Vertex& aV,const BooleanOperations_IndexedDataMapOfShapeInteger& aM) ; +Standard_EXPORT void UpdateCommonBlocks() ; +Standard_EXPORT void UpdatePaveBlocks() ; +Standard_EXPORT Standard_Integer SplitIndex(const BOPTools_PaveBlock& aPB) const; +Standard_EXPORT void MakeBlocks() ; + + + // Fields PROTECTED + // +BOPTools_PInterferencePool myIntrPool; +NMTDS_PShapesDataStructure myDS; +Standard_Boolean myIsDone; +Standard_Integer myNbSources; +Standard_Integer myNbEdges; +NMTTools_IteratorOfCoupleOfShape myDSIt; +BOPTools_PavePool myPavePool; +BOPTools_PavePool myPavePoolNew; +NMTTools_CommonBlockPool myCommonBlockPool; +BOPTools_SplitShapesPool mySplitShapesPool; +IntTools_Context myContext; +BOPTools_SSIntersectionAttribute mySectionAttribute; + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_PaveFiller.ixx b/src/NMTTools/NMTTools_PaveFiller.ixx new file mode 100644 index 000000000..1ef3b7ab3 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_PaveFiller.jxx b/src/NMTTools/NMTTools_PaveFiller.jxx new file mode 100644 index 000000000..9e8e7ce2a --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller.jxx @@ -0,0 +1,66 @@ +#ifndef _BOPTools_InterferencePool_HeaderFile +#include +#endif +#ifndef _BOPTools_Pave_HeaderFile +#include +#endif +#ifndef _IntTools_ShrunkRange_HeaderFile +#include +#endif +#ifndef _IntTools_Context_HeaderFile +#include +#endif +#ifndef _BOPTools_PavePool_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlockPool_HeaderFile +#include +#endif +#ifndef _BOPTools_SplitShapesPool_HeaderFile +#include +#endif +#ifndef _BOPTools_PaveBlock_HeaderFile +#include +#endif +#ifndef _TopoDS_Vertex_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCommonBlock_HeaderFile +#include +#endif +#ifndef _NMTTools_CommonBlock_HeaderFile +#include +#endif +#ifndef _BOPTools_IDMapOfPaveBlockIMapOfPaveBlock_HeaderFile +#include +#endif +#ifndef _BOPTools_IDMapOfPaveBlockIMapOfInteger_HeaderFile +#include +#endif +#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile +#include +#endif +#ifndef _TColStd_ListOfInteger_HeaderFile +#include +#endif +#ifndef _BOPTools_ListOfPaveBlock_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _BOPTools_PaveSet_HeaderFile +#include +#endif +#ifndef _BOPTools_Curve_HeaderFile +#include +#endif +#ifndef _BOPTools_SSInterference_HeaderFile +#include +#endif +#ifndef _gp_Pnt_HeaderFile +#include +#endif +#ifndef _NMTTools_PaveFiller_HeaderFile +#include +#endif diff --git a/src/NMTTools/NMTTools_PaveFiller_0.cxx b/src/NMTTools/NMTTools_PaveFiller_0.cxx new file mode 100644 index 000000000..d6b3251a3 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_0.cxx @@ -0,0 +1,118 @@ +// File: NMTTools_PaveFiller_0.cxx +// Created: Mon Dec 8 11:45:51 2003 +// Author: Peter KURNEV +// + + +#include + +#include +#include +#include +#include + +//======================================================================= +//function : SortTypes +//purpose : +//======================================================================= + void NMTTools_PaveFiller::SortTypes(Standard_Integer& theWhat, + Standard_Integer& theWith)const +{ + Standard_Boolean aReverseFlag=Standard_True; + + TopAbs_ShapeEnum aType1= myDS->GetShapeType(theWhat), + aType2= myDS->GetShapeType(theWith); + + if (aType1==aType2) + return; + + if (aType1==TopAbs_EDGE && aType2==TopAbs_FACE){ + aReverseFlag=Standard_False; + } + + if (aType1==TopAbs_VERTEX && + (aType2==TopAbs_FACE || aType2==TopAbs_EDGE)) { + aReverseFlag=Standard_False; + } + + Standard_Integer aWhat, aWith; + aWhat=(aReverseFlag) ? theWith : theWhat; + aWith=(aReverseFlag) ? theWhat : theWith; + + theWhat=aWhat; + theWith=aWith; +} +//======================================================================= +// function: ExpectedPoolLength +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::ExpectedPoolLength()const +{ + Standard_Integer aNbIIs; + Standard_Real aCfPredict=.5; + + const BOPTools_ListOfCoupleOfInteger& aLC=myDSIt.ListOfCouple(); + aNbIIs=aLC.Extent(); + // + if (aNbIIs==1) { + return aNbIIs; + } + // + aNbIIs=(Standard_Integer) (aCfPredict*(Standard_Real)aNbIIs); + + return aNbIIs; +} +//======================================================================= +// function:IsSuccesstorsComputed +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::IsSuccesstorsComputed(const Standard_Integer aN1, + const Standard_Integer aN2)const +{ + Standard_Integer nSuc, n1, n2; + + BooleanOperations_OnceExplorer aExp(*myDS); + TopAbs_ShapeEnum aType=myDS->GetShapeType(aN1); + + n1=aN1; + n2=aN2; + + if (aType!=TopAbs_VERTEX) { + Standard_Integer ntmp=n1; + n1=n2; + n2=ntmp; + } + + aType=myDS->GetShapeType(n2); + if (aType==TopAbs_EDGE) { + aExp.Init(n2, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + nSuc=aExp.Current(); + if (myIntrPool->IsComputed(n1, nSuc)) { + return Standard_True; + } + } + return Standard_False; + } + + else if (aType==TopAbs_FACE) { + aExp.Init(n2, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + nSuc=aExp.Current(); + if (myIntrPool->IsComputed(n1, nSuc)) { + return Standard_True; + } + } + + aExp.Init(n2, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nSuc=aExp.Current(); + if (myIntrPool->IsComputed(n1, nSuc)) { + return Standard_True; + } + } + return Standard_False; + } + + return Standard_False; +} diff --git a/src/NMTTools/NMTTools_PaveFiller_1.cxx b/src/NMTTools/NMTTools_PaveFiller_1.cxx new file mode 100644 index 000000000..5d1fa79cc --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_1.cxx @@ -0,0 +1,170 @@ +// File: NMTTools_PaveFiller_1.cxx +// Created: Mon Dec 8 11:47:55 2003 +// Author: Peter KURNEV +// + + +#include + +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + + + +//======================================================================= +// function: PerformVV +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformVV() +{ + myIsDone=Standard_False; + // + Standard_Integer n1, n2,anIndexIn, aFlag, aWhat, aWith, aNbVVs, aBlockLength; + Standard_Boolean bJustAddInterference; + // + BOPTools_CArray1OfVVInterference& aVVs=myIntrPool->VVInterferences(); + // + // BlockLength correction + aNbVVs=ExpectedPoolLength(); + aBlockLength=aVVs.BlockLength(); + if (aNbVVs > aBlockLength) { + aVVs.SetBlockLength(aNbVVs); + } + // + // V/V BooleanOperations_VertexVertex + myDSIt.Initialize(TopAbs_VERTEX, TopAbs_VERTEX); + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, bJustAddInterference); + // + if (!myIntrPool->IsComputed(n1, n2)) { + anIndexIn=0; + aWhat=n1; + aWith=n2; + SortTypes(aWhat, aWith); + if (!bJustAddInterference) { + 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); + aFlag=IntTools_Tools::ComputeVV (aV1, aV2); + // + if (!aFlag) { + BOPTools_VVInterference anInterf (aWhat, aWith); + anIndexIn=aVVs.Append(anInterf); + } + } + myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexVertex, anIndexIn); + } + } + myIsDone=Standard_True; +} +//======================================================================= +// function: PerformNewVertices +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformNewVertices() +{ + myIsDone=Standard_False; + // + Standard_Integer i, aNb, anIndex1, anIndex2, aNewShape; + TopoDS_Vertex aNewVertex; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + Standard_Integer aNbChains, j, aNbV, aIdV, aNbL; + TColStd_IndexedMapOfInteger aMapWhole; + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapChains;//aMCV + TopTools_ListOfShape aLV; + TopTools_IndexedMapOfShape aM; + // + // 1. VV Interferences + BOPTools_CArray1OfVVInterference& VVs=myIntrPool->VVInterferences(); + // + NMTTools_Tools::FindChains(VVs, aMapChains); + // + aNbChains=aMapChains.Extent(); + for (i=1; i<=aNbChains; ++i) { + const TColStd_IndexedMapOfInteger& aChain=aMapChains(i); + // + aM.Clear(); + aLV.Clear(); + aNbV=aChain.Extent(); + for (j=1; j<=aNbV; ++j) { + aIdV=aChain(j); + const TopoDS_Shape& aV=myDS->Shape(aIdV); + if (!aM.Contains(aV)) { + aM.Add(aV); + aLV.Append(aV); + } + } + // + aNbL=aLV.Extent(); + if (aNbL==1){ + aNewShape=aChain(1); + } + else if (aNbL>1) { + // + // Make new Vertex + NMTTools_Tools::MakeNewVertex(aLV, aNewVertex); + // Insert New Vertex in DS; + // aNewShape is # of DS-line, where aNewVertex is kept + myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); + aNewShape=myDS->NumberOfInsertedShapes(); + // + // State of New Vertex is ON + myDS->SetState (aNewShape, BooleanOperations_ON); + } + // + // Insert New Vertex in Interference + aNb=VVs.Extent(); + for (j=1; j<=aNb; ++j) { + BOPTools_VVInterference& VV=VVs(j); + anIndex1=VV.Index1(); + anIndex2=VV.Index2(); + if (aChain.Contains(anIndex1) || aChain.Contains(anIndex2)) { + VV.SetNewShape(aNewShape); + } + } + } + myIsDone=Standard_True; +} + +//======================================================================= +// function: FindSDVertex +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::FindSDVertex(const Standard_Integer nV)const +{ + Standard_Integer i, aNb, anIndex1, anIndex2, aNewShape=0; + + BOPTools_CArray1OfVVInterference& VVs=myIntrPool->VVInterferences(); + aNb=VVs.Extent(); + + for (i=1; i<=aNb; i++) { + const BOPTools_VVInterference& VV=VVs(i); + anIndex1=VV.Index1(); + anIndex2=VV.Index2(); + if (nV==anIndex1 || nV==anIndex2) { + aNewShape=VV.NewShape(); + return aNewShape; + } + } + return aNewShape; +} diff --git a/src/NMTTools/NMTTools_PaveFiller_2.cxx b/src/NMTTools/NMTTools_PaveFiller_2.cxx new file mode 100644 index 000000000..041519246 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_2.cxx @@ -0,0 +1,211 @@ +// File: NMTTools_PaveFiller_2.cxx +// Created: Mon Dec 8 12:02:56 2003 +// Author: Peter KURNEV +// + + +#include + +#include + +#include + +#include + +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include +// +#include +#include + +//======================================================================= +// function: PrepareEdges +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PrepareEdges() +{ + Standard_Integer i, nV, ii, aNBSuc, ip, aNbShapesObject; + Standard_Real aT; + TopAbs_Orientation anOr; + TopoDS_Edge aE; + TopoDS_Vertex aV; + // + aNbShapesObject=myDS->NumberOfShapesOfTheObject(); + for (i=1; i<=myNbSources; ++i) { + if (myDS->GetShapeType(i)==TopAbs_EDGE) { + aE=TopoDS::Edge(myDS->Shape(i)); + // + if (BRep_Tool::Degenerated(aE)){ + continue; + } + // + BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(i)); + // + // A <- + aNBSuc=myDS->NumberOfSuccessors(i); + for (ii=1; ii <=aNBSuc; ii++) { + nV=myDS->GetSuccessor(i, ii); + anOr=myDS->GetOrientation(i, ii); + aV=TopoDS::Vertex(myDS->Shape(nV)); + aV.Orientation(anOr); + aT=BRep_Tool::Parameter(aV, aE); + // + ip=FindSDVertex(nV); + if (ip) { + aV=TopoDS::Vertex(myDS->Shape(ip)); + aV.Orientation(anOr);// XX ? if the edge is closed it'll be amazing result + nV=ip; + } + // + BOPTools_Pave aPave(nV, aT); + aPaveSet.Append (aPave); + } + } + } +} +//======================================================================= +// function: PerformVE +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformVE() +{ + myIsDone=Standard_False; + // + Standard_Boolean bJustAddInterference; + Standard_Integer n1, n2, anIndexIn, aFlag, aWhat, aWith, aNbVEs, aBlockLength, iSDV, nV1; + Standard_Real aT; + TopoDS_Vertex aV1; + TopoDS_Edge aE2; + BOPTools_IndexedMapOfCoupleOfInteger aSnareMap; + BOPTools_CoupleOfInteger aCouple; + // + BOPTools_CArray1OfVEInterference& aVEs=myIntrPool->VEInterferences(); + // + myDSIt.Initialize (TopAbs_VERTEX, TopAbs_EDGE); + // + // BlockLength correction + aNbVEs=ExpectedPoolLength(); + aBlockLength=aVEs.BlockLength(); + if (aNbVEs > aBlockLength) { + aVEs.SetBlockLength(aNbVEs); + } + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, bJustAddInterference); + // + if (! myIntrPool->IsComputed(n1, n2)) { + if (! IsSuccesstorsComputed(n1, n2)) { + anIndexIn=0; + aWhat=n1; // Vertex + aWith=n2; // Edge + SortTypes(aWhat, aWith); + // + if(bJustAddInterference) { + myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); + continue; + } + // Edge + aE2=TopoDS::Edge(myDS->Shape(aWith)); + // + if (BRep_Tool::Degenerated(aE2)){ + continue; + } + // Vertex + nV1=aWhat; + aV1=TopoDS::Vertex(myDS->Shape(aWhat)); + // + iSDV=FindSDVertex(aWhat); + if (iSDV) { + nV1=iSDV; + aV1=TopoDS::Vertex(myDS->Shape(nV1)); + } + // + aFlag=myContext.ComputeVE (aV1, aE2, aT); + // + if (!aFlag) { + // + // Add Interference to the Pool + BOPTools_VEInterference anInterf (aWhat, aWith, aT); + anIndexIn=aVEs.Append(anInterf); + // + // Add Pave to the Edge's myPavePool + aCouple.SetCouple(nV1, aWith); + if (!aSnareMap.Contains(aCouple)){ + aSnareMap.Add(aCouple); + // + BOPTools_Pave aPave(nV1, aT, BooleanOperations_VertexEdge); + aPave.SetInterference(anIndexIn); + BOPTools_PaveSet& aPaveSet= myPavePool(myDS->RefEdge(aWith)); + aPaveSet.Append(aPave); + } + // + // State for the Vertex in DS; + myDS->SetState (aWhat, BooleanOperations_ON); + // Insert Vertex in Interference Object + BOPTools_VEInterference& aVE=aVEs(anIndexIn); + aVE.SetNewShape(aWhat); + } + myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexEdge, anIndexIn); + } + } + } + myIsDone=Standard_True; +} + +/* +// A +// + // cto900/M2 + // Some of Edges can be [Semi] Infinite. Such Edges have no + // vertices on correspondant INF ends. So we must provide + // these vertices formally (to obtain Shrunk Ranges for e.g). + // In reality this vertex(-es) does not belong to the INF Edge. + // It just has reference in the DS. + // PKV Tue Apr 23 10:21:45 2002 + { + Standard_Real aT1, aT2, aTolE; + Standard_Boolean bInf1, bInf2; + gp_Pnt aPx; + TopoDS_Vertex aVx; + BRep_Builder aBB; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + aTolE=BRep_Tool::Tolerance(aE); + Handle(Geom_Curve) aC3D=BRep_Tool::Curve (aE, aT1, aT2); + bInf1=Precision::IsNegativeInfinite(aT1); + bInf2=Precision::IsPositiveInfinite(aT2); + + if (bInf1) { + aC3D->D0(aT1, aPx); + aBB.MakeVertex(aVx, aPx, aTolE); + myDS->InsertShapeAndAncestorsSuccessors(aVx, anASSeq); + nV=myDS->NumberOfInsertedShapes(); + BOPTools_Pave aPave(nV, aT1); + aPaveSet.Append (aPave); + } + + if (bInf2) { + aC3D->D0(aT2, aPx); + aBB.MakeVertex(aVx, aPx, aTolE); + myDS->InsertShapeAndAncestorsSuccessors(aVx, anASSeq); + nV=myDS->NumberOfInsertedShapes(); + BOPTools_Pave aPave(nV, aT2); + aPaveSet.Append (aPave); + } + } +*/ diff --git a/src/NMTTools/NMTTools_PaveFiller_3.cxx b/src/NMTTools/NMTTools_PaveFiller_3.cxx new file mode 100644 index 000000000..149eed7fc --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_3.cxx @@ -0,0 +1,88 @@ +// File: NMTTools_PaveFiller_3.cxx +// Created: Mon Dec 8 16:06:56 2003 +// Author: Peter KURNEV +// + + +#include + +#include +#include +#include +#include + +#include +#include + +#include + +//======================================================================= +// function: PerformVF +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformVF() +{ + myIsDone=Standard_False; + // + Standard_Boolean aJustAddInterference; + Standard_Integer n1, n2, anIndexIn, aFlag, aWhat, aWith, aNbVSs, aBlockLength, iSDV; + Standard_Real aU, aV; + TopoDS_Vertex aV1; + TopoDS_Face aF2; + // + BOPTools_CArray1OfVSInterference& aVSs=myIntrPool->VSInterferences(); + // + // V/E Interferences + myDSIt.Initialize(TopAbs_VERTEX, TopAbs_FACE); + // + // BlockLength correction + aNbVSs=ExpectedPoolLength(); + aBlockLength=aVSs.BlockLength(); + if (aNbVSs > aBlockLength) { + aVSs.SetBlockLength(aNbVSs); + } + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, aJustAddInterference); + // + if (! myIntrPool->IsComputed(n1, n2)) { + if (! IsSuccesstorsComputed(n1, n2)) { + anIndexIn=0; + aWhat=n1; // Vertex + aWith=n2; // Face + SortTypes(aWhat, aWith); + // + iSDV=FindSDVertex(aWhat); + // + if(aJustAddInterference) { + myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); + continue; + } + // + aV1=TopoDS::Vertex(myDS->Shape(aWhat)); + if (iSDV) { + aV1=TopoDS::Vertex(myDS->Shape(iSDV)); + } + // + aF2=TopoDS::Face(myDS->Shape(aWith)); + // + aFlag=myContext.ComputeVS (aV1, aF2, aU, aV); + // + if (!aFlag) { + // + // Add Interference to the Pool + BOPTools_VSInterference anInterf (aWhat, aWith, aU, aV); + anIndexIn=aVSs.Append(anInterf); + // + // SetState for Vertex in DS; + myDS->SetState (aWhat, BooleanOperations_ON); + // Insert Vertex in Interference Object + BOPTools_VSInterference& aVS=aVSs(anIndexIn); + aVS.SetNewShape(aWhat); + } + myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn); + } + } + } + myIsDone=Standard_True; +} diff --git a/src/NMTTools/NMTTools_PaveFiller_4.cxx b/src/NMTTools/NMTTools_PaveFiller_4.cxx new file mode 100644 index 000000000..65baf7b9c --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_4.cxx @@ -0,0 +1,1079 @@ +// File: NMTTools_PaveFiller_4.cxx +// Created: Mon Dec 8 17:08:58 2003 +// Author: Peter KURNEV +// + + +#include +// +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include + +// +static + void VertexParameters(const IntTools_CommonPrt& aCPart, + Standard_Real& aT1, + Standard_Real& aT2); +static + Standard_Boolean IsOnPave(const Standard_Real& aT1, + const IntTools_Range& aRange, + const Standard_Real& aTolerance); +static + void EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB); + +static + void ProcessBlock(const BOPTools_PaveBlock& aPB, + const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, + BOPTools_IMapOfPaveBlock& aProcessedBlocks, + BOPTools_IMapOfPaveBlock& aChain); +static + void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, + NMTTools_ListOfCommonBlock& aLCB); + +//======================================================================= +// function: PerformEE +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformEE() +{ + myIsDone=Standard_False; + // + Standard_Boolean bJustAdd; + Standard_Integer n1, n2, anIndexIn, nE1, nE2, aNbVEs, aBlockLength; + Standard_Integer aTmp, aWhat, aWith, i, aNbCPrts, aDiscretize=30; + Standard_Real aTolE1, aTolE2, aDeflection=0.01; + BOPTools_ListIteratorOfListOfPaveBlock anIt1, anIt2; + TopoDS_Edge aEWhat, aEWith; + TopoDS_Vertex aNewVertex; + BooleanOperations_IndexedDataMapOfShapeInteger aMapVI; + BOPTools_IDMapOfPaveBlockIMapOfPaveBlock aMapCB; + // + BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences(); + // + // BlockLength correction + aNbVEs=ExpectedPoolLength(); + aBlockLength=aEEs.BlockLength(); + if (aNbVEs > aBlockLength) { + aEEs.SetBlockLength(aNbVEs); + } + // + myDSIt.Initialize(TopAbs_EDGE, TopAbs_EDGE); + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, bJustAdd); + anIndexIn = 0; + // + if (myIntrPool->IsComputed(n1, n2)) { + continue; + } + // + nE1=n1; + nE2=n2; + SortTypes(nE1, nE2); + // + if(bJustAdd) { + myIntrPool->AddInterference (nE1, nE2, BooleanOperations_EdgeEdge, anIndexIn); + continue; + } + // + 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; + } + // + aTolE1=BRep_Tool::Tolerance(aE1); + aTolE2=BRep_Tool::Tolerance(aE2); + // + BOPTools_ListOfPaveBlock& aLPB1=mySplitShapesPool(myDS->RefEdge(nE1)); + // + for (anIt1.Initialize(aLPB1); anIt1.More(); anIt1.Next()) { + BOPTools_PaveBlock& aPB1=anIt1.Value(); + const IntTools_ShrunkRange& aShrunkRange1=aPB1.ShrunkRange(); + // + const IntTools_Range& aSR1=aShrunkRange1.ShrunkRange(); + const Bnd_Box& aBB1=aShrunkRange1.BndBox(); + // + BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2)); + // + for (anIt2.Initialize(aLPB2); anIt2.More(); anIt2.Next()) { + BOPTools_PaveBlock& aPB2=anIt2.Value(); + const IntTools_ShrunkRange& aShrunkRange2=aPB2.ShrunkRange(); + + const IntTools_Range& aSR2=aShrunkRange2.ShrunkRange(); + const Bnd_Box& aBB2=aShrunkRange2.BndBox(); + // + if (aBB1.IsOut (aBB2)) { + continue; + } + // + // EE + IntTools_EdgeEdge aEE; + aEE.SetEdge1 (aE1); + aEE.SetEdge2 (aE2); + aEE.SetTolerance1 (aTolE1); + aEE.SetTolerance2 (aTolE2); + aEE.SetDiscretize (aDiscretize); + aEE.SetDeflection (aDeflection); + // + IntTools_Range anewSR1 = aSR1; + IntTools_Range anewSR2 = aSR2; + // + BOPTools_Tools::CorrectRange (aE1, aE2, aSR1, anewSR1); + BOPTools_Tools::CorrectRange (aE2, aE1, aSR2, anewSR2); + // + aEE.SetRange1(anewSR1); + aEE.SetRange2(anewSR2); + + aEE.Perform(); + // + anIndexIn=0; + // + if (aEE.IsDone()) { + // reverse order if it is necessary + aEWhat=aE1; + aEWith=aE2; + aWhat=nE1; + aWith=nE2; + if (aEE.Order()) { + aTmp=aWhat; + aWhat=aWith; + aWith=aTmp; + aEWhat=aE2; + aEWith=aE1; + } + // + const IntTools_SequenceOfCommonPrts& aCPrts=aEE.CommonParts(); + aNbCPrts=aCPrts.Length(); + for (i=1; i<=aNbCPrts; i++) { + const IntTools_CommonPrt& aCPart=aCPrts(i); + const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2(); + // + anIndexIn=0; + // + TopAbs_ShapeEnum aType=aCPart.Type(); + switch (aType) { + case TopAbs_VERTEX: { + Standard_Real aT1, aT2, aTol=Precision::PConfusion(); + Standard_Boolean bIsOnPave1, bIsOnPave2; + IntTools_Range aR1, aR2; + // + VertexParameters(aCPart, aT1, aT2); + // + //decide to keep the pave or not + aR1 = (aEE.Order()) ? anewSR2 : anewSR1; + aR2 = (aEE.Order()) ? anewSR1 : anewSR2; + // + bIsOnPave1=IsOnPave(aT1, aR1, aTol); + bIsOnPave2=IsOnPave(aT2, aR2, aTol); + // + if(bIsOnPave1 || bIsOnPave2) { + myIntrPool->AddInterference (aWhat, aWith, BooleanOperations_EdgeEdge, anIndexIn); + continue; + } + // + BOPTools_Tools::MakeNewVertex(aEWhat, aT1, aEWith, aT2, aNewVertex); + // + // Add Interference to the Pool + BOPTools_EEInterference anInterf (aWhat, aWith, aCPart); + // + anIndexIn=aEEs.Append(anInterf); + myIntrPool->AddInterference (aWhat, aWith, BooleanOperations_EdgeEdge, anIndexIn); + // + // Collect + aMapVI.Add(aNewVertex, anIndexIn); + } + break; + + case TopAbs_EDGE: { + Standard_Integer aNbComPrt2; + Standard_Boolean aCoinsideFlag; + // + aNbComPrt2=aRanges2.Length(); + aCoinsideFlag=IsBlocksCoinside(aPB1, aPB2); + // + if (aNbComPrt2>1 || !aCoinsideFlag) { + myIntrPool->AddInterference (aWhat, aWith, BooleanOperations_EdgeEdge, anIndexIn); + break; + } + // + // Fill aMapCB + if (aMapCB.Contains(aPB1)) { + BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB1); + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + } + else { + BOPTools_IMapOfPaveBlock aMapPB; + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + aMapCB.Add(aPB1, aMapPB); + } + // + if (aMapCB.Contains(aPB2)) { + BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.ChangeFromKey(aPB2); + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + } + else { + BOPTools_IMapOfPaveBlock aMapPB; + aMapPB.Add(aPB1); + aMapPB.Add(aPB2); + aMapCB.Add(aPB2, aMapPB); + } + } + break; + default: + break; + } // switch (aType) + } // for (i=1; i<=aNbCPrts; i++) + }// if (aEE.IsDone()) + } // for (; anIt2.More(); anIt2.Next()) + } // for (; anIt1.More(); anIt1.Next()) + }// for (; myDSIt.More(); myDSIt.Next()) + // + EENewVertices (aMapVI); + EECommonBlocks(aMapCB); + // + myIsDone=Standard_True; +} +//======================================================================= +// function:EECommonBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::EECommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB) +{ + NMTTools_ListOfCommonBlock aLCB; + // + FindChains(aMapCB, aLCB); + ReplaceCommonBlocks(aLCB); +} +//======================================================================= +// function:EENewVertices +// purpose: +//======================================================================= + void NMTTools_PaveFiller::EENewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) +{ + Standard_Integer aNb, i, j, aNewShape, aNbEdges, aNbIEE, aNbVV, aNbSimple; + Standard_Integer aWhat, aWith, i1, i2, nE1, nE2, nE, nV, aFlag; + Standard_Real aT; + TopoDS_Compound aCompound; + BRep_Builder aBB; + NMTTools_IndexedDataMapOfIndexedMapOfInteger aMNVE, aMNVIEE; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + BOPTools_Pave aPave; + TopoDS_Vertex aNewVertex; + TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple; + // + BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences(); + // + aNb=aMapVI.Extent(); + // + if (!aNb) { // no new vertices, no new problems + return; + } + // + // 0. + if (aNb==1) { + aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1)); + EENewVertices(aNewVertex, aMapVI); + return; + } + // + // 1. Make compound from new vertices + aBB.MakeCompound(aCompound); + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aV=aMapVI.FindKey(i); + aBB.Add(aCompound, aV); + } + // + // 2. VV intersection between these vertices + // using the auxiliary Filler + NMTDS_ShapesDataStructure tDS; + // + tDS.SetCompositeShape(aCompound); + tDS.Init(); + // + BOPTools_InterferencePool tInterfPool(tDS); + NMTTools_PaveFiller tPaveFiller(tInterfPool); + // + tPaveFiller.Init(); + // + tPaveFiller.PerformVV(); + tPaveFiller.PerformNewVertices(); + // + const BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterfs(); + // + // 3. Separate Comlex and Simple new vertices + aNbVV=aVVInterfs.Extent(); + for (i=1; i<=aNbVV; ++i) { + const BOPTools_VVInterference& aVV=aVVInterfs(i); + aVV.Indices(aWhat, aWith); + const TopoDS_Shape& aV1=tDS.Shape(aWhat); + const TopoDS_Shape& aV2=tDS.Shape(aWith); + aMNVComplex.Add(aV1); + aMNVComplex.Add(aV2); + } + // + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aV=aMapVI.FindKey(i); + if (!aMNVComplex.Contains(aV)) { + aMNVSimple.Add(aV); + } + } + // + // 4. Treat Simple new Vertices + aNbSimple=aMNVSimple.Extent(); + for (i=1; i<=aNbSimple; ++i) { + const TopoDS_Vertex& aV=TopoDS::Vertex(aMNVSimple(i)); + EENewVertices(aV, aMapVI); + } + // + // 3. Fill Maps : NewVertex-edges (aMNVE) + // NewVertex-interferences (aMNVIEE) + for (i=1; i<=aNbVV; ++i) { + const BOPTools_VVInterference& aVV=aVVInterfs(i); + aNewShape=aVV.NewShape(); + if (!aNewShape) { + continue; + } + // + if (!aMNVE.Contains(aNewShape)) { + TColStd_IndexedMapOfInteger aMx; + aMNVE.Add(aNewShape, aMx); + } + if (!aMNVIEE.Contains(aNewShape)) { + TColStd_IndexedMapOfInteger aMx; + aMNVIEE.Add(aNewShape, aMx); + } + // + TColStd_IndexedMapOfInteger& aME=aMNVE.ChangeFromKey(aNewShape); + TColStd_IndexedMapOfInteger& aMIEE=aMNVIEE.ChangeFromKey(aNewShape); + // + aVV.Indices(aWhat, aWith); + //aWhat + const TopoDS_Shape& aV1=tDS.Shape(aWhat); + i1=aMapVI.FindFromKey(aV1); + const BOPTools_EEInterference& aEE1=aEEs(i1); + aEE1.Indices(nE1, nE2); + aME.Add(nE1); + aME.Add(nE2); + aMIEE.Add(i1); + //aWith + const TopoDS_Shape& aV2=tDS.Shape(aWith); + i2=aMapVI.FindFromKey(aV2); + const BOPTools_EEInterference& aEE2=aEEs(i2); + aEE2.Indices(nE1, nE2); + aME.Add(nE1); + aME.Add(nE2); + aMIEE.Add(i2); + // + //printf(" VV: (%d, %d) -> %d\n", aWhat, aWith, aNewShape); + } + // + // 4. Process new vertices + aNb=aMNVE.Extent(); + for (i=1; i<=aNb; ++i) { // xx + // + // new Vertex + nV=aMNVE.FindKey(i); + aNewVertex=TopoDS::Vertex(tDS.Shape(nV)); + // + // Insert New Vertex in DS; + myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); + aNewShape=myDS->NumberOfInsertedShapes(); + myDS->SetState (aNewShape, BooleanOperations_ON); + // + // Update index of NewShape in EE interferences + const TColStd_IndexedMapOfInteger& aMIEE=aMNVIEE.FindFromKey(nV);//(i); + aNbIEE=aMIEE.Extent(); + for (j=1; j<=aNbIEE; ++j) { + i1=aMIEE(j); + BOPTools_EEInterference& aEE1=aEEs(i1); + aEE1.SetNewShape(aNewShape); + } + // + // Update Paves on edges + const TColStd_IndexedMapOfInteger& aME=aMNVE(i); + aNbEdges=aME.Extent(); + for (j=1; j<=aNbEdges; ++j) { + nE=aME(j); + const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + // + aFlag=myContext.ComputeVE (aNewVertex, aE, aT); + // + if (!aFlag) { + aPave.SetInterference(-1); + aPave.SetType (BooleanOperations_EdgeEdge); + aPave.SetIndex(aNewShape); + aPave.SetParam(aT); + // + BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); + aPaveSet.Append(aPave); + } + } + }// for (i=1; i<=aNb; ++i) {// xx +} +//======================================================================= +// function:EENewVertices +// purpose: +//======================================================================= + void NMTTools_PaveFiller::EENewVertices (const TopoDS_Vertex& aNewVertex, + const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) +{ + Standard_Integer i, aNewShape, nE1, nE2; + Standard_Real aT1, aT2; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + BOPTools_Pave aPave; + // + BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences(); + // + // one new vertex case is treated in usual way + // + // Insert New Vertex in DS; + myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); + aNewShape=myDS->NumberOfInsertedShapes(); + myDS->SetState (aNewShape, BooleanOperations_ON); + // Insert New Vertex in EE Interference + i=aMapVI.FindFromKey(aNewVertex); + BOPTools_EEInterference& aEEInterf= aEEs(i); + aEEInterf.SetNewShape(aNewShape); + // Extact interference info + aEEInterf.Indices(nE1, nE2); + const IntTools_CommonPrt& aCPart=aEEInterf.CommonPrt(); + VertexParameters(aCPart, aT1, aT2); + // + // Add Paves to the myPavePoolNew + aPave.SetInterference(i); + aPave.SetType (BooleanOperations_EdgeEdge); + aPave.SetIndex(aNewShape); + // Pave for edge nE1 + aPave.SetParam(aT1); + BOPTools_PaveSet& aPaveSet1=myPavePoolNew(myDS->RefEdge(nE1)); + aPaveSet1.Append(aPave); + // Pave for edge nE2 + aPave.SetParam(aT2); + BOPTools_PaveSet& aPaveSet2=myPavePoolNew(myDS->RefEdge(nE2)); + aPaveSet2.Append(aPave); +} +//======================================================================= +// function: RefinePavePool +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RefinePavePool() +{ + Standard_Integer i, aNbNew; + + for (i=1; i<=myNbSources; i++) { + + if ((myDS->GetShape(i)).ShapeType()==TopAbs_EDGE) { + BOPTools_PaveSet& aPS= myPavePool(myDS->RefEdge(i)); + // + BOPTools_PaveSet& aNewPS= myPavePoolNew(myDS->RefEdge(i)); + BOPTools_ListOfPave& aNewLP=aNewPS.ChangeSet(); + // + aNbNew=aNewLP.Extent(); + if (aNbNew) { + BOPTools_ListIteratorOfListOfPave anIt(aNewLP); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPave=anIt.Value(); + aPS.Append(aPave); + } + // Clear the ListOfPaveBlock + BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(i)); + aLPB.Clear(); + // Prepare the paveBlocks for that egde again + PreparePaveBlocks(i); + } + aNewLP.Clear(); + } + } +} +//======================================================================= +// function: PreparePaveBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PreparePaveBlocks(const TopAbs_ShapeEnum aType1, + const TopAbs_ShapeEnum aType2) +{ + myIsDone=Standard_False; + // + Standard_Boolean Ok1, Ok2, Ok3; + Ok1= (aType1==TopAbs_VERTEX) && (aType2==TopAbs_EDGE) ; + Ok2= (aType1==TopAbs_EDGE) && (aType2==TopAbs_EDGE) ; + Ok3= (aType1==TopAbs_EDGE) && (aType2==TopAbs_FACE) ; + if (!Ok1 && !Ok2 && !Ok3) { + // error: Type mismatch + return; + } + // + Standard_Boolean aFlag = Standard_False; + Standard_Integer n1, n2, nE1, nE2, aNbSplits; + TColStd_MapOfInteger aMap; + // + myDSIt.Initialize(aType1, aType2); + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, aFlag); + nE1=n1; + nE2=n2; + SortTypes(nE1, nE2); + // + if (aType1==TopAbs_EDGE) { + BOPTools_ListOfPaveBlock& aLPB1=mySplitShapesPool(myDS->RefEdge(nE1)); + aNbSplits=aLPB1.Extent(); + if (!aNbSplits) { + if (!aMap.Contains(nE1)) { + aMap.Add(nE1); + PreparePaveBlocks(nE1); + // + if (!myIsDone) { + return; + } + } + } + } + // + if (aType2==TopAbs_EDGE) { + BOPTools_ListOfPaveBlock& aLPB2=mySplitShapesPool(myDS->RefEdge(nE2)); + aNbSplits=aLPB2.Extent(); + if (!aNbSplits) { + if (!aMap.Contains(nE2)) { + aMap.Add(nE2); + PreparePaveBlocks(nE2); + // + if (!myIsDone) { + return; + } + } + } + }// if (aType2==TopAbs_EDGE) + }// for (; myDSIt.More(); myDSIt.Next()) + + myIsDone=Standard_True; +} +//======================================================================= +// function: PreparePaveBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PreparePaveBlocks(const Standard_Integer nE) +{ + myIsDone=Standard_False; + + Standard_Integer nV1, nV2; + + TopoDS_Edge aE; + TopoDS_Vertex aV1, aV2; + + // SplitShapesPool + BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); + // Edge + aE=TopoDS::Edge(myDS->Shape(nE)); + // + if (!BRep_Tool::Degenerated(aE)){ + // + BOPTools_PaveSet& aPS=myPavePool(myDS->RefEdge(nE)); + + BOPTools_PaveBlockIterator aPBIt(nE, aPS); + for (; aPBIt.More(); aPBIt.Next()) { + BOPTools_PaveBlock& aPB=aPBIt.Value(); + + const IntTools_Range& aRange=aPB.Range(); + + const BOPTools_Pave& aPave1=aPB.Pave1(); + nV1=aPave1.Index(); + aV1=TopoDS::Vertex(myDS->GetShape(nV1)); + + const BOPTools_Pave& aPave2=aPB.Pave2(); + nV2=aPave2.Index(); + aV2=TopoDS::Vertex(myDS->GetShape(nV2)); + // + // ShrunkRange + IntTools_ShrunkRange aSR (aE, aV1, aV2, aRange, myContext); + // + Standard_Integer anErrorStatus; + anErrorStatus=aSR.ErrorStatus(); + + char buf[512]; + if (!aSR.IsDone()) { + sprintf (buf, "Can not obtain ShrunkRange for Edge %d\n", nE); + BOPTColStd_Dump::PrintMessage(buf); + sprintf (buf, "Can not obtain ShrunkRange for Edge %d", nE); + throw + BOPTColStd_Failure(buf) ; + } + // + if (anErrorStatus==6) { + sprintf(buf, + "Warning: [PreparePaveBlocks()] Max.Dummy Shrunk Range for Edge %d\n", nE); + BOPTColStd_Dump::PrintMessage(buf); + } + else { + // Check left paves and correct ShrunkRange if it is necessary + CorrectShrunkRanges (0, aPave1, aSR); + CorrectShrunkRanges (1, aPave2, aSR); + } + // + aPB.SetShrunkRange(aSR); + aLPB.Append(aPB); + } //for (; aPBIt1.More(); aPBIt1.Next()) + } + myIsDone=Standard_True; +} +//======================================================================= +// function: CorrectShrunkRanges +// purpose: +//======================================================================= + void NMTTools_PaveFiller::CorrectShrunkRanges(const Standard_Integer aSide, + const BOPTools_Pave& aPave, + IntTools_ShrunkRange& aShrunkRange) +{ + BooleanOperations_KindOfInterference aType; + Standard_Integer anIndexInterf ; + // + aType=aPave.Type(); + if (aType!=BooleanOperations_EdgeEdge) { + return; + } + // + anIndexInterf=aPave.Interference(); + if (anIndexInterf<0) { + // it can be EE interf between E and (e1,e2,..en) -> vertex + // so we can't decide which aEE.CommonPrt() we should take. + return; + } + + BOPTools_CArray1OfEEInterference& aEEs=myIntrPool->EEInterferences(); + const BOPTools_EEInterference& aEE=aEEs(anIndexInterf); + const IntTools_CommonPrt& aCP=aEE.CommonPrt(); + const TopoDS_Edge& aE1=aCP.Edge1(); + const TopoDS_Edge& aE2=aCP.Edge2(); + + const IntTools_Range& aSR=aShrunkRange.ShrunkRange(); + const TopoDS_Edge& aE=aShrunkRange.Edge(); + + IntTools_Range aNewRange; + IntTools_Range aCPRange; + + if (aE1.IsSame(aE)) { + const IntTools_Range& aR1=aCP.Range1(); + aCPRange=aR1; + } + if (aE2.IsSame(aE)) { + const IntTools_SequenceOfRanges& aSeqR=aCP.Ranges2(); + const IntTools_Range& aR2=aSeqR(1); + aCPRange=aR2; + } + // + Standard_Real aCoeff=1.05, tV, tNV; + tV=aPave.Param(); + if (aSide==0) { // Left + if (aCPRange.Last() > aSR.First()) { + tNV=aCPRange.Last(); + tNV=tV+aCoeff*(tNV-tV); + aNewRange.SetFirst(tNV); + aNewRange.SetLast (aSR.Last()); + + if(aNewRange.First() > aNewRange.Last()) { + aShrunkRange.SetShrunkRange(aNewRange); + } + } + } + else { // Right + if (aCPRange.First() < aSR.Last()) { + tNV=aCPRange.First(); + tNV=tV-aCoeff*(tV-tNV); + aNewRange.SetFirst(aSR.First()); + aNewRange.SetLast (tNV); + + if(aNewRange.First() < aNewRange.Last()) { + aShrunkRange.SetShrunkRange(aNewRange); + } + } + } +} +//======================================================================= +// function: IsBlocksCoinside +// purpose: +//======================================================================= + Standard_Boolean + NMTTools_PaveFiller::IsBlocksCoinside(const BOPTools_PaveBlock& aPB1, + const BOPTools_PaveBlock& aPB2) const +{ + Standard_Boolean bRetFlag=Standard_True; + Standard_Real aTolV11, aTolV12, aTolV21, aTolV22; + 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())); + + aTolV11=BRep_Tool::Tolerance(aV11); + aTolV12=BRep_Tool::Tolerance(aV12); + aTolV21=BRep_Tool::Tolerance(aV21); + aTolV22=BRep_Tool::Tolerance(aV22); + + aP11=BRep_Tool::Pnt(aV11); + aP12=BRep_Tool::Pnt(aV12); + aP21=BRep_Tool::Pnt(aV21); + aP22=BRep_Tool::Pnt(aV22); + + d1121=aP11.Distance(aP21); + aTolSum=aCoeff*(aTolV11+aTolV21); + if (d1121RefEdge(nE)); + aLCBE.Append(aCBx); + } + } + } +} +//======================================================================= +// function: RemoveCommonBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RemoveCommonBlocks(const NMTTools_ListOfCommonBlock& aLCB) +{ + Standard_Integer nE; + NMTTools_ListOfCommonBlock aLCBx; + NMTTools_ListIteratorOfListOfCommonBlock anItCB, anItCBE; + BOPTools_ListIteratorOfListOfPaveBlock anItLPB; + // + anItCB.Initialize(aLCB); + for (; anItCB.More(); anItCB.Next()) { + const NMTTools_CommonBlock& aCB=anItCB.Value(); + const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); + // + // Remove aCB from each edge + anItLPB.Initialize(aLPB); + for (; anItLPB.More(); anItLPB.Next()) { + const BOPTools_PaveBlock& aPB=anItLPB.Value(); + nE=aPB.OriginalEdge(); + // + NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); + anItCBE.Initialize(aLCBE); + for (; anItCBE.More(); anItCBE.Next()) { + const NMTTools_CommonBlock& aCBE=anItCBE.Value(); + if (aCBE.IsEqual(aCB)) { + aLCBE.Remove(anItCBE); + break; + } + } + } + } +} +//======================================================================= +// function: SplitCommonBlock +// purpose: +//======================================================================= + void NMTTools_PaveFiller::SplitCommonBlock(const NMTTools_CommonBlock& aCB, + NMTTools_ListOfCommonBlock& aLCBx) +{ + Standard_Integer i, j, k, nE, aNbE, aNbSPBx, aNbPB; + BOPTools_SequenceOfPaveBlock aSPBx; + BOPTools_ListIteratorOfListOfPaveBlock anItLPB; + BOPTools_ListIteratorOfListOfPave anIt; + + BOPTools_PaveBlockIterator anPBIt; + // + const BOPTools_ListOfPaveBlock& aLPB=aCB.PaveBlocks(); + aNbE=aLPB.Extent(); + // + // 1. Whether we realy need to split the common block ? + anItLPB.Initialize(aLPB); + for (; anItLPB.More(); anItLPB.Next()) { + const BOPTools_PaveBlock& aPB=anItLPB.Value(); + nE=aPB.OriginalEdge(); + BOPTools_PaveSet& aPSE=myPavePoolNew(myDS->RefEdge(nE)); + aPSE.SortSet(); + // + BOPTools_PaveSet aPSx; + // + const BOPTools_ListOfPave& aLPE=aPSE.Set(); + anIt.Initialize(aLPE); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPx=anIt.Value(); + if (aPB.IsInBlock(aPx)) { + aPSx.Append(aPx); + } + } + aNbPB=aPSx.Set().Extent(); + break; + } + // + if (!aNbPB) { + // we need not split it + aLCBx.Append(aCB); + return; + } + // + // 2. Get sequence of pave Blocks containing all new pave blocks + // for each edges's source pave Block + anItLPB.Initialize(aLPB); + for (; anItLPB.More(); anItLPB.Next()) { + const BOPTools_PaveBlock& aPB=anItLPB.Value(); + const BOPTools_Pave& aPave1=aPB.Pave1(); + const BOPTools_Pave& aPave2=aPB.Pave2(); + nE=aPB.OriginalEdge(); + // + BOPTools_PaveSet aPSx; + // + // the set aPsx will contain bounadry paves aPave1, aPave2 and + // all paves of the edge nE that are inside block aPB + aPSx.Append(aPave1); + aPSx.Append(aPave2); + // + BOPTools_PaveSet& aPSE=myPavePoolNew(myDS->RefEdge(nE)); + aPSE.SortSet(); + // + const BOPTools_ListOfPave& aLPE=aPSE.Set(); + anIt.Initialize(aLPE); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPx=anIt.Value(); + if (aPB.IsInBlock(aPx)) { + aPSx.Append(aPx); + } + } + // + // Form pave blocks from aPSx and collect them in aSPBx + anPBIt.Initialize(nE, aPSx); + for (; anPBIt.More(); anPBIt.Next()) { + const BOPTools_PaveBlock& aPBx=anPBIt.Value(); + aSPBx.Append(aPBx); + } + } + // + // 3. Do new common blocks + // + const TColStd_ListOfInteger& aLF=aCB.Faces(); + aNbSPBx=aSPBx.Length(); + aNbPB=aNbSPBx/aNbE; + // + for (i=1; i<=aNbPB; ++i) { + NMTTools_CommonBlock aCBx; + // + aCBx.AddFaces(aLF); + // + for (j=1; j<=aNbE; ++j) { + k=i+(j-1)*aNbPB; + const BOPTools_PaveBlock& aPB=aSPBx(k); + aCBx.AddPaveBlock(aPB); + } + aLCBx.Append(aCBx); + } +} + +//======================================================================= +// function: VertexParameters +// purpose: +//======================================================================= +void VertexParameters(const IntTools_CommonPrt& aCPart, + Standard_Real& aT1, + Standard_Real& aT2) +{ + const IntTools_Range& aR1=aCPart.Range1(); + aT1=0.5*(aR1.First()+aR1.Last()); + // + if((aCPart.VertexParameter1() >= aR1.First()) && + (aCPart.VertexParameter1() <= aR1.Last())) { + aT1 = aCPart.VertexParameter1(); + } + // + const IntTools_SequenceOfRanges& aRanges2=aCPart.Ranges2(); + const IntTools_Range& aR2=aRanges2(1); + aT2=0.5*(aR2.First()+aR2.Last()); + // + if((aCPart.VertexParameter2() >= aR2.First()) && + (aCPart.VertexParameter2() <= aR2.Last())) { + aT2 = aCPart.VertexParameter2(); + } +} +//======================================================================= +// function: KeepPave +// purpose: +//======================================================================= +Standard_Boolean IsOnPave(const Standard_Real& aT1, + const IntTools_Range& aRange, + const Standard_Real& aTolerance) +{ + Standard_Boolean firstisonpave1, firstisonpave2, bIsOnPave; + // + firstisonpave1 = (Abs(aRange.First() - aT1) < aTolerance); + firstisonpave2 = (Abs(aRange.Last() - aT1) < aTolerance); + bIsOnPave=(firstisonpave1 || firstisonpave2); + return bIsOnPave; +} + +//======================================================================= +// function:FindChains +// purpose: +//======================================================================= +void FindChains(const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, + NMTTools_ListOfCommonBlock& aLCB) +{ + Standard_Integer i, j, aNbCB, aNbPB; + BOPTools_IMapOfPaveBlock aProcessedBlocks, aChain; + // + aNbCB=aMapCB.Extent(); + for (i=1; i<=aNbCB; ++i) { + const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i); + if (aProcessedBlocks.Contains(aPB)) { + continue; + } + // + aProcessedBlocks.Add(aPB); + aChain.Add(aPB); + // + const BOPTools_IMapOfPaveBlock& aMapPB=aMapCB(i); + aNbPB=aMapPB.Extent(); + for (j=1; j<=aNbPB; ++j) { + const BOPTools_PaveBlock& aPBx=aMapPB(j); + ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain); + } + // + NMTTools_CommonBlock aCB; + // + aNbPB=aChain.Extent(); + for (j=1; j<=aNbPB; ++j) { + const BOPTools_PaveBlock& aPBx=aChain(j); + aCB.AddPaveBlock(aPBx); + } + aLCB.Append(aCB); + aChain.Clear(); + } +} +//======================================================================= +// function:ProcessBlock +// purpose: +//======================================================================= +void ProcessBlock(const BOPTools_PaveBlock& aPB, + const BOPTools_IDMapOfPaveBlockIMapOfPaveBlock& aMapCB, + BOPTools_IMapOfPaveBlock& aProcessedBlocks, + BOPTools_IMapOfPaveBlock& aChain) +{ + Standard_Integer j, aNbPB; + // + if (aProcessedBlocks.Contains(aPB)) { + return; + } + aProcessedBlocks.Add(aPB); + aChain.Add(aPB); + // + const BOPTools_IMapOfPaveBlock& aMapPB=aMapCB.FindFromKey(aPB); + aNbPB=aMapPB.Extent(); + for (j=1; j<=aNbPB; ++j) { + const BOPTools_PaveBlock& aPBx=aMapPB(j); + ProcessBlock(aPBx, aMapCB, aProcessedBlocks, aChain); + } +} diff --git a/src/NMTTools/NMTTools_PaveFiller_5.cxx b/src/NMTTools/NMTTools_PaveFiller_5.cxx new file mode 100644 index 000000000..392267f3d --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_5.cxx @@ -0,0 +1,605 @@ +// File: NMTTools_PaveFiller_5.cxx +// Created: Mon Dec 15 11:28:33 2003 +// Author: Peter KURNEV +// + + +#include + +#include + +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +static + void VertexParameter(const IntTools_CommonPrt& aCPart, + Standard_Real& aT); +static + Standard_Boolean IsOnPave(const Standard_Real& aTR, + const IntTools_Range& aCPRange, + const Standard_Real& aTolerance); + +//======================================================================= +// function: PerformEF +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformEF() +{ + myIsDone=Standard_False; + + Standard_Integer n1, n2, anIndexIn=0, nE, nF, aNbEFs, aBlockLength; + Standard_Boolean bJustAdd; + Standard_Real aTolE, aTolF, aDeflection=0.01; + Standard_Integer aDiscretize=35; + BooleanOperations_IndexedDataMapOfShapeInteger aMapVI; + BOPTools_IDMapOfPaveBlockIMapOfInteger aMapCB; + BOPTools_IMapOfPaveBlock aIMPBx; + + // + BOPTools_CArray1OfESInterference& aEFs=myIntrPool->ESInterferences(); + // + myDSIt.Initialize(TopAbs_EDGE, TopAbs_FACE); + // + // BlockLength correction + aNbEFs=ExpectedPoolLength(); + aBlockLength=aEFs.BlockLength(); + if (aNbEFs > aBlockLength) { + aEFs.SetBlockLength(aNbEFs); + } + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, bJustAdd); + anIndexIn = 0; + // + if (myIntrPool->IsComputed(n1, n2)) { + continue; + } + // + nE=n1; + nF=n2; + SortTypes(nE, nF); + // + // all Common Blocks for face nF + //XXX + NMTTools_ListOfCommonBlock aLCBF; + CommonBlocksFace(nF, aLCBF); + NMTTools_CommonBlockAPI aCBAPIF(aLCBF); + //XXX + if(bJustAdd) { + myIntrPool->AddInterference (nE, nF, BooleanOperations_EdgeSurface, anIndexIn); + continue; + } + // Edge + 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)); + aTolF=BRep_Tool::Tolerance(aF); + const Bnd_Box& aBBF=myDS->GetBoundingBox(nF); + // + // Process each PaveBlock on edge nE + BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); + // + BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); + for (; anIt.More(); anIt.Next()) { + BOPTools_PaveBlock& aPB=anIt.Value(); + //XXX + if (aCBAPIF.IsCommonBlock(aPB)) { + continue; + } + //XXX + const IntTools_ShrunkRange& aShrunkRange=aPB.ShrunkRange(); + const IntTools_Range& aSR =aShrunkRange.ShrunkRange(); + const Bnd_Box& aBBE=aShrunkRange.BndBox(); + // + if (aBBF.IsOut (aBBE)) { + continue; + } + // + // EF + IntTools_EdgeFace aEF; + aEF.SetEdge (aE); + aEF.SetFace (aF); + aEF.SetTolE (aTolE); + aEF.SetTolF (aTolF); + aEF.SetDiscretize (aDiscretize); + aEF.SetDeflection (aDeflection); + // + aEF.SetContext((IntTools_PContext)&myContext); + // + IntTools_Range anewSR = aSR; + // + // Correction of the Shrunk Range + BOPTools_Tools::CorrectRange(aE, aF, aSR, anewSR); + aEF.SetRange (anewSR); + // + aEF.Perform(); + // + if (aEF.IsDone()) { + const IntTools_SequenceOfCommonPrts& aCPrts=aEF.CommonParts(); + Standard_Integer i, aNbCPrts; + aNbCPrts=aCPrts.Length(); + for (i=1; i<=aNbCPrts; i++) { + // + anIndexIn=0; + // + const IntTools_CommonPrt& aCPart=aCPrts(i); + TopAbs_ShapeEnum aType=aCPart.Type(); + switch (aType) { + + case TopAbs_VERTEX: { + Standard_Boolean bIsOnPave1, bIsOnPave2; + Standard_Integer nVF; + Standard_Real aT, aTolToDecide; + TopoDS_Vertex aNewVertex; + // + const IntTools_Range& aR=aCPart.Range1(); + // + // New Vertex + VertexParameter(aCPart, aT); + BOPTools_Tools::MakeNewVertex(aE, aT, aF, aNewVertex); + // + //decide to add pave or not + aTolToDecide=5.e-8; + // + bIsOnPave1=IsOnPave(anewSR.First(), aR, aTolToDecide); + bIsOnPave2=IsOnPave(anewSR.Last() , aR, aTolToDecide); + // + if (!bIsOnPave1 && !bIsOnPave2) { + nVF=CheckFacePaves(aNewVertex, nF); + if (!nVF) { + // really new vertex + // Add Interference to the Pool + BOPTools_ESInterference anInterf (nE, nF, aCPart); + anIndexIn=aEFs.Append(anInterf); + anInterf.SetNewShape(0); + // + aMapVI.Add(aNewVertex, anIndexIn); + aIMPBx.Add(aPB); + // + }// if (!nVF) + }// if (!bIsOnPave1 && !bIsOnPave2) + myIntrPool->AddInterference (nE, nF, BooleanOperations_EdgeSurface, anIndexIn); + }// case TopAbs_VERTEX: + break; + // + case TopAbs_EDGE: { + Standard_Boolean aCoinsideFlag; + // + aCoinsideFlag=BOPTools_Tools::IsBlockInOnFace(aPB, aF, myContext); + if (!aCoinsideFlag) { + myIntrPool->AddInterference (nE, nF, BooleanOperations_EdgeSurface, anIndexIn); + break; + } + // + // Fill aMapCB + if (aMapCB.Contains(aPB)) { + TColStd_IndexedMapOfInteger& aMapF=aMapCB.ChangeFromKey(aPB); + aMapF.Add(nF); + } + else { + TColStd_IndexedMapOfInteger aMapF; + aMapF.Add(nF); + aMapCB.Add(aPB, aMapF); + } + //modified by NIZNHY-PKV Fri Jan 23 14:13:08 2004 f + aIMPBx.Add(aPB); + //modified by NIZNHY-PKV Fri Jan 23 14:13:10 2004 t + }// case TopAbs_EDGE: + break; + + default: + break; + } // switch (aType) + } // for (i=1; i<=aNbCPrts; i++) + } //if (aEF.IsDone()) + } // for (; anIt.More(); anIt.Next()) + }// for (; myDSIt.More(); myDSIt.Next()) + // + // Treat New vertices + EFNewVertices(aMapVI); + // + // Add draft Common Blocks of EF type + EFCommonBlocks(aMapCB); + // + // Collect all CB we suspected to split by new vertices + NMTTools_ListOfCommonBlock aLCBx; + { + Standard_Integer i, aNbPBx, nEx; + BOPTools_IMapOfPaveBlock aMx; + // + aNbPBx=aIMPBx.Extent(); + for (i=1; i<=aNbPBx; ++i) { + const BOPTools_PaveBlock& aPBx=aIMPBx(i); + nEx=aPBx.OriginalEdge(); + NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nEx)); + if (aLCB.Extent()) { + NMTTools_CommonBlockAPI aCBAPIx(aLCB); + if (aCBAPIx.IsCommonBlock(aPBx)) { + NMTTools_CommonBlock& aCBx=aCBAPIx.CommonBlock(aPBx); + const BOPTools_PaveBlock& aPB1=aCBx.PaveBlock1(); + if (!aMx.Contains(aPB1)){ + aMx.Add(aPB1); + aLCBx.Append(aCBx); + } + } + } + } + } + // + // Split the common blocks above + if (aLCBx.Extent()) { + ReplaceCommonBlocks(aLCBx); + } + // + myIsDone=Standard_True; +} +//======================================================================= +// function:EFCommonBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::EFCommonBlocks(const BOPTools_IDMapOfPaveBlockIMapOfInteger& aMapCB) +{ + Standard_Integer i, aNbPB, nE, j, aNbF, nF; + // + aNbPB=aMapCB.Extent(); + // + for (i=1; i<=aNbPB; ++i) { + const BOPTools_PaveBlock& aPB=aMapCB.FindKey(i); + const TColStd_IndexedMapOfInteger& aMapF=aMapCB.FindFromIndex(i); + aNbF=aMapF.Extent(); + // + nE=aPB.OriginalEdge(); + // + NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE)); + // + NMTTools_CommonBlockAPI aCBAPI(aLCB); + if (aCBAPI.IsCommonBlock(aPB)) { + NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); + for (j=1; j<=aNbF; ++j) { + nF=aMapF(j); + aCB.AddFace(nF); + } + } + else { + NMTTools_CommonBlock aCB; + // + aCB.AddPaveBlock(aPB); + for (j=1; j<=aNbF; ++j) { + nF=aMapF(j); + aCB.AddFace(nF); + } + aLCB.Append(aCB); + } + } +} +//======================================================================= +// function:EFNewVertices +// purpose: +//======================================================================= + void NMTTools_PaveFiller::EFNewVertices (const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) +{ + Standard_Integer i, j, aNb, aNewShape, aFlag, iX, aNbVV, aNbSimple; + Standard_Integer aWhat, aWith, nE, nF, nV, aNbIEF, aNbEdges; + Standard_Real aT; + TopoDS_Compound aCompound; + TopoDS_Vertex aNewVertex; + BRep_Builder aBB; + BOPTools_Pave aPave; + NMTTools_IndexedDataMapOfIndexedMapOfInteger aMNVE, aMNVIEF; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + TopTools_IndexedMapOfShape aMNVComplex, aMNVSimple; + // + BOPTools_CArray1OfESInterference& aEFs=myIntrPool->ESInterferences(); + // + aNb=aMapVI.Extent(); + // + if (!aNb) { // no new vertices, no new problems + return; + } + // + // 0. + if (aNb==1) { + aNewVertex=TopoDS::Vertex(aMapVI.FindKey(1)); + EFNewVertices(aNewVertex, aMapVI); + return; + } + // + // 1. Make compound from new vertices + aBB.MakeCompound(aCompound); + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aV=aMapVI.FindKey(i); + aBB.Add(aCompound, aV); + } + // + // 2. VV intersection between these vertices + // using the auxiliary Filler + NMTDS_ShapesDataStructure tDS; + // + tDS.SetCompositeShape(aCompound); + tDS.Init(); + // + BOPTools_InterferencePool tInterfPool(tDS); + NMTTools_PaveFiller tPaveFiller(tInterfPool); + // + tPaveFiller.Init(); + // + tPaveFiller.PerformVV(); + tPaveFiller.PerformNewVertices(); + // + const BOPTools_CArray1OfVVInterference& aVVInterfs=tInterfPool.VVInterfs(); + // + // 3. Separate Comlex and Simple new vertices + aNbVV=aVVInterfs.Extent(); + for (i=1; i<=aNbVV; ++i) { + const BOPTools_VVInterference& aVV=aVVInterfs(i); + aVV.Indices(aWhat, aWith); + const TopoDS_Shape& aV1=tDS.Shape(aWhat); + const TopoDS_Shape& aV2=tDS.Shape(aWith); + aMNVComplex.Add(aV1); + aMNVComplex.Add(aV2); + } + // + for (i=1; i<=aNb; ++i) { + const TopoDS_Shape& aV=aMapVI.FindKey(i); + if (!aMNVComplex.Contains(aV)) { + aMNVSimple.Add(aV); + } + } + // + // 4. Treat Simple new Vertices + aNbSimple=aMNVSimple.Extent(); + for (i=1; i<=aNbSimple; ++i) { + const TopoDS_Vertex& aV=TopoDS::Vertex(aMNVSimple(i)); + EFNewVertices(aV, aMapVI); + } + // + // 3. Fill Maps : NewVertex-edges (aMNVE) + // NewVertex-interferences (aMNVIEE) + aNb=aVVInterfs.Extent(); + for (i=1; i<=aNb; ++i) { + const BOPTools_VVInterference& aVV=aVVInterfs(i); + aNewShape=aVV.NewShape(); + if (!aNewShape) { + continue; + } + // + if (!aMNVE.Contains(aNewShape)) { + TColStd_IndexedMapOfInteger aMx; + aMNVE.Add(aNewShape, aMx); + } + if (!aMNVIEF.Contains(aNewShape)) { + TColStd_IndexedMapOfInteger aMx; + aMNVIEF.Add(aNewShape, aMx); + } + // + TColStd_IndexedMapOfInteger& aME=aMNVE.ChangeFromKey(aNewShape); + TColStd_IndexedMapOfInteger& aMIEF=aMNVIEF.ChangeFromKey(aNewShape); + // + aVV.Indices(aWhat, aWith); + //aWhat + const TopoDS_Shape& aV1=tDS.Shape(aWhat); + iX=aMapVI.FindFromKey(aV1); + const BOPTools_ESInterference& aEF1=aEFs(iX); + aEF1.Indices(nE, nF); + SortTypes(nE, nF); + aME.Add(nE); + aMIEF.Add(iX); + //aWith + const TopoDS_Shape& aV2=tDS.Shape(aWith); + iX=aMapVI.FindFromKey(aV2); + const BOPTools_ESInterference& aEF2=aEFs(iX); + aEF2.Indices(nE, nF); + SortTypes(nE, nF); + aME.Add(nE); + aMIEF.Add(iX); + } + // 4. Process new vertices + aNb=aMNVE.Extent(); + for (i=1; i<=aNb; ++i) { // xx + // + // new Vertex + nV=aMNVE.FindKey(i); + aNewVertex=TopoDS::Vertex(tDS.Shape(nV)); + // + // Insert New Vertex in DS; + myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); + aNewShape=myDS->NumberOfInsertedShapes(); + myDS->SetState (aNewShape, BooleanOperations_ON); + // + // Update index of NewShape in EF interferences + const TColStd_IndexedMapOfInteger& aMIEF=aMNVIEF.FindFromKey(nV); + aNbIEF=aMIEF.Extent(); + for (j=1; j<=aNbIEF; ++j) { + iX=aMIEF(j); + BOPTools_ESInterference& aEF=aEFs(iX); + aEF.SetNewShape(aNewShape); + } + // + // Update Paves on all edges + const TColStd_IndexedMapOfInteger& aME=aMNVE(i); + aNbEdges=aME.Extent(); + for (j=1; j<=aNbEdges; ++j) { + nE=aME(j); + const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + // + aFlag=myContext.ComputeVE (aNewVertex, aE, aT); + // + if (!aFlag) { + aPave.SetInterference(-1); + aPave.SetType (BooleanOperations_EdgeSurface); + aPave.SetIndex(aNewShape); + aPave.SetParam(aT); + // + BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); + aPaveSet.Append(aPave); + } + } + } +} +//======================================================================= +// function:EFNewVertices +// purpose: +//======================================================================= + void NMTTools_PaveFiller::EFNewVertices (const TopoDS_Vertex& aNewVertex, + const BooleanOperations_IndexedDataMapOfShapeInteger& aMapVI) +{ + Standard_Integer i, aNewShape, nE, nF; + Standard_Real aT; + BOPTools_Pave aPave; + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + BOPTools_CArray1OfESInterference& aEFs=myIntrPool->ESInterferences(); + // + // Insert New Vertex in DS; + myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); + aNewShape=myDS->NumberOfInsertedShapes(); + myDS->SetState (aNewShape, BooleanOperations_ON); + // Insert New Vertex in EFInterference + i=aMapVI.FindFromKey(aNewVertex); + BOPTools_ESInterference& aEFInterf= aEFs(i); + aEFInterf.SetNewShape(aNewShape); + // Extract interference info + aEFInterf.Indices(nE, nF); + SortTypes(nE, nF); + const IntTools_CommonPrt& aCPart=aEFInterf.CommonPrt(); + VertexParameter(aCPart, aT); + // + // Pave for edge nE + aPave.SetInterference(i); + aPave.SetType (BooleanOperations_EdgeSurface); + aPave.SetIndex(aNewShape); + aPave.SetParam(aT); + // Append the Pave to the myPavePoolNew + BOPTools_PaveSet& aPaveSet=myPavePoolNew(myDS->RefEdge(nE)); + aPaveSet.Append(aPave); + // +} +//======================================================================= +// function: CheckFacePaves +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::CheckFacePaves (const TopoDS_Vertex& aNewVertex, + const Standard_Integer nF) +{ + Standard_Integer nEF, nVF, iFlag, i, aNbV; + BOPTools_ListIteratorOfListOfPave anIt; + TColStd_IndexedMapOfInteger aMVF; + // + BooleanOperations_OnceExplorer aExp(*myDS); + // + aExp.Init(nF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nEF=aExp.Current(); + BOPTools_PaveSet& aPaveSet=myPavePool(myDS->RefEdge(nEF)); + const BOPTools_ListOfPave& aLP=aPaveSet.Set(); + anIt.Initialize(aLP); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPave=anIt.Value(); + nVF=aPave.Index(); + aMVF.Add(nVF); + } + } + // + aNbV=aMVF.Extent(); + for (i=1; i<=aNbV; ++i) { + nVF=aMVF(i); + const TopoDS_Vertex& aVF=TopoDS::Vertex(myDS->Shape(nVF)); + iFlag=IntTools_Tools::ComputeVV(aNewVertex, aVF); + if (!iFlag) { + return nVF; + } + } + return 0; +} + +// +//======================================================================= +// function: VertexParameter +// purpose: +//======================================================================= +void VertexParameter(const IntTools_CommonPrt& aCPart, + Standard_Real& aT) +{ + const IntTools_Range& aR=aCPart.Range1(); + aT=0.5*(aR.First()+aR.Last()); + // + if((aCPart.VertexParameter1() >= aR.First()) && + (aCPart.VertexParameter1() <= aR.Last())) { + aT = aCPart.VertexParameter1(); + } +} +//======================================================================= +// function: IsOnPave +// purpose: +//======================================================================= +Standard_Boolean IsOnPave(const Standard_Real& aTR, + const IntTools_Range& aCPRange, + const Standard_Real& aTolerance) +{ + Standard_Boolean bIsOnPave; + Standard_Real aT1, aT2, dT1, dT2; + // + aT1=aCPRange.First(); + aT2=aCPRange.Last(); + bIsOnPave=(aTR>=aT1 && aTR<=aT1); + if (bIsOnPave) { + return bIsOnPave; + } + dT1=Abs(aTR-aT1); + dT2=Abs(aTR-aT2); + bIsOnPave=(dT1<=aTolerance || dT2<=aTolerance); + return bIsOnPave; +} diff --git a/src/NMTTools/NMTTools_PaveFiller_6.cxx b/src/NMTTools/NMTTools_PaveFiller_6.cxx new file mode 100644 index 000000000..d308457f9 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_6.cxx @@ -0,0 +1,1151 @@ +// File: NMTTools_PaveFiller_6.cxx +// Created: Fri Dec 19 10:27:31 2003 +// Author: Peter KURNEV +// + +#include + +#include + +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +static + Standard_Boolean IsPairFound(const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_InterferencePool* myIntrPool, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapWhat, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapWith); + +static + void FMapWhat(const Standard_Integer nF, + BOPTools_InterferencePool* myIntrPool, + TColStd_IndexedMapOfInteger& aMapWhat); +static + void FMapWith(const Standard_Integer nF, + BOPTools_InterferencePool* myIntrPool, + TColStd_IndexedMapOfInteger& aMapWith); +static + Standard_Boolean IsFound(const TColStd_IndexedMapOfInteger& aMapWhat, + const TColStd_IndexedMapOfInteger& aMapWith); + +//======================================================================= +// function: PerformFF +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PerformFF() +{ + myIsDone=Standard_False; + // + Standard_Boolean bIsFound, bJustAdd, bIsComputed; + Standard_Integer n1, n2, anIndexIn, nF1, nF2, aBlockLength, aNbFFs; + Standard_Boolean bToApproxC3d, bToApproxC2dOnS1, bToApproxC2dOnS2, bIsDone; + Standard_Integer aNbCurves, aNbPoints; + Standard_Real anApproxTol, aTolR3D, aTolR2D; + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith; + IntTools_SequenceOfPntOn2Faces aPnts; + IntTools_SequenceOfCurves aCvs; + BooleanOperations_KindOfInterference aTypeFF=BooleanOperations_SurfaceSurface; + // + BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences(); + // + // F/F Interferences [BooleanOperations_SurfaceSurface] + myDSIt.Initialize(TopAbs_FACE, TopAbs_FACE); + // + // BlockLength correction + aNbFFs=ExpectedPoolLength(); + aBlockLength=aFFs.BlockLength(); + if (aNbFFs > aBlockLength) { + aFFs.SetBlockLength(aNbFFs); + } + // + for (; myDSIt.More(); myDSIt.Next()) { + myDSIt.Current(n1, n2, bJustAdd); + // + bIsComputed=myIntrPool->IsComputed(n1, n2); + if (bIsComputed) { + continue; + } + // + nF1 = n2; + nF2 = n1; + if(n1 < n2) { + nF1 = n1; + nF2 = n2; + } + anIndexIn=0; + aPnts.Clear(); + aCvs.Clear(); + // + bIsFound=IsPairFound(nF1, nF2, myIntrPool, aMapWhat, aMapWith); + // + if (bJustAdd) { + if (!bIsFound) { + myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); + } + else{ + BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); + anIndexIn=aFFs.Append(anInterf); + myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); + } + continue; + } + // + const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); + const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); + // + // FF + bToApproxC3d = mySectionAttribute.Approximation(); + bToApproxC2dOnS1 = mySectionAttribute.PCurveOnS1(); + bToApproxC2dOnS2 = mySectionAttribute.PCurveOnS2(); + // + anApproxTol=1.e-7; + // + IntTools_FaceFace aFF; + // + aFF.SetParameters (bToApproxC3d, bToApproxC2dOnS1, + bToApproxC2dOnS2, anApproxTol); + // + aFF.Perform(aF1, aF2); + // + bIsDone=aFF.IsDone(); + // + if (!bIsDone) { + if (!bIsFound) { + myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); + } + else { + BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); + anIndexIn=aFFs.Append(anInterf); + myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); + } + continue; + } + // + aTolR3D=aFF.TolReached3d(); + aTolR2D=aFF.TolReached2d(); + if (aTolR3D < 1.e-7){ + aTolR3D=1.e-7; + } + // + aFF.PrepareLines3D(); + // + const IntTools_SequenceOfCurves& aCvsX=aFF.Lines(); + const IntTools_SequenceOfPntOn2Faces& aPntsX=aFF.Points(); + // + aNbCurves=aCvsX.Length(); + aNbPoints=aPntsX.Length(); + // + if (!aNbCurves && !aNbPoints) { + BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts); + anIndexIn=aFFs.Append(anInterf); + myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); + continue; + } + // + { + BOPTools_SSInterference anInterf (nF1, nF2, aTolR3D, aTolR2D, aCvsX, aPntsX); + anIndexIn=aFFs.Append(anInterf); + myIntrPool->AddInterference (nF1, nF2, aTypeFF, anIndexIn); + } + // + }// for (; myDSIt.More(); myDSIt.Next()) + // + myIsDone=Standard_True; +} +//======================================================================= +// function: MakeBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::MakeBlocks() +{ + myIsDone=Standard_False; + // + Standard_Boolean bIsExistingPaveBlock, bIsValidIn2D; + Standard_Integer i, aNbFFs, nF1, nF2, aBid=0; + Standard_Integer nV1, nV2, j, aNbCurves; + Standard_Real aTolR3D, aTol2D, aT1, aT2, aTolPPC=Precision::PConfusion(); + TColStd_MapOfInteger aMap; + NMTTools_IndexedDataMapOfShapePaveBlock aMEPB; + BooleanOperations_IndexedDataMapOfShapeInteger aMapEI; + // + BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences(); + // + // 1. Produce Section Edges from intersection curves + // between each pair of faces + // + aNbFFs=aFFs.Extent(); + for (i=1; i<=aNbFFs; ++i) { + BOPTools_SSInterference& aFFi=aFFs(i); + // + // Faces + aFFi.Indices(nF1, nF2); + const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); + const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); + // + // Add blocks that are existing ones for this FF-interference + BOPTools_ListOfPaveBlock aLPB; + RealSplitsInFace (aBid, nF1, nF2, aLPB); + RealSplitsInFace (aBid, nF2, nF1, aLPB); + RealSplitsOnFace (aBid, nF1, nF2, aLPB); + // + aMap.Clear(); + BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + aFFi.AppendBlock(aPB); + nV1=aPB.Pave1().Index(); + nV2=aPB.Pave2().Index(); + aMap.Add(nV1); + aMap.Add(nV2); + } + // + BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); + aNbCurves=aSCvs.Length(); + if (!aNbCurves) { + continue; + } + // + aTolR3D=aFFi.TolR3D(); + aTol2D=(aTolR3D < 1.e-3) ? 1.e-3 : aTolR3D; + // + BOPTools_PaveSet aPSF; + // + PrepareSetForFace (nF1, nF2, aPSF); + // + // Put Paves On Curves + for (j=1; j<=aNbCurves; ++j) { + BOPTools_Curve& aBC=aSCvs(j); + // DEBUG + const IntTools_Curve& aC=aBC.Curve(); + Handle (Geom_Curve) aC3D= aC.Curve(); + // + PutPaveOnCurve (aPSF, aTolR3D, aBC); + } + // + // Put bounding paves on curves + for (j=1; j<=aNbCurves; ++j) { + BOPTools_Curve& aBC=aSCvs(j); + PutBoundPaveOnCurve (aBC, aFFi); + } + // + // Pave Blocks on Curves + for (j=1; j<=aNbCurves; ++j) { + BOPTools_Curve& aBC=aSCvs(j); + const IntTools_Curve& aIC= aBC.Curve(); + BOPTools_PaveSet& aPaveSet=aBC.Set(); + // + BOPTools_PaveBlockIterator aPBIter(0, aPaveSet); + for (; aPBIter.More(); aPBIter.Next()) { + BOPTools_PaveBlock& aPBNew=aPBIter.Value(); + aPBNew.SetCurve(aIC); + aPBNew.SetFace1(nF1); + aPBNew.SetFace2(nF2); + // + nV1=aPBNew.Pave1().Index(); + nV2=aPBNew.Pave2().Index(); + aT1=aPBNew.Pave1().Param(); + aT2=aPBNew.Pave2().Param(); + // ??? + if((nV1==nV2) && (Abs(aT2 - aT1) < aTolPPC)) { + continue;// mkk ft + } + // + bIsExistingPaveBlock=IsExistingPaveBlock(aPBNew, aFFi); + if (bIsExistingPaveBlock) { + // aPBNew was (or just lays) boundary PB + continue; + } + // Checking of validity in 2D + // + bIsValidIn2D=myContext.IsValidBlockForFaces(aT1, aT2, aIC, aF1, aF2, aTol2D); + if (!bIsValidIn2D) { + continue; + } + // + //aBC.AppendNewBlock(aPBNew); + // + // Make Section Edge + TopoDS_Edge aES; + // + 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); + // + { + Standard_Real aTolR2D; + // + aTolR2D=aFFi.TolR2D(); + Handle(Geom2d_Curve) aC2D1=aIC.FirstCurve2d(); + Handle(Geom2d_Curve) aC2D2=aIC.SecondCurve2d(); + // + NMTTools_Tools::MakePCurve(aES, aF1, aC2D1, aTolR2D); + NMTTools_Tools::MakePCurve(aES, aF2, aC2D2, aTolR2D); + } + // + aMEPB.Add(aES, aPBNew); + aMapEI.Add(aES, i); + } + } // end of for (j=1; j<=aNbCurves; ++j) + }// for (i=1; i<=aNbFFs; ++i) + //============================================================= + // + // II. Post treatment + // + // Input data: aMEPB, aMapEI + // Result : section edges in myDS + // + Standard_Integer aNbSE; + // + aNbSE=aMEPB.Extent(); + if (!aNbSE) { + // there is nothing to do here + return; + } + // + BRep_Builder aBB; + TopoDS_Compound aCompound; + // + // 1. Make compound from SE + aBB.MakeCompound(aCompound); + for (i=1; i<=aNbSE; ++i) { + const TopoDS_Shape& aSE=aMEPB.FindKey(i); + aBB.Add(aCompound, aSE); + } + // + // + // 2. Intersect SE using auxiliary Filler + NMTDS_ShapesDataStructure tDS; + // + tDS.SetCompositeShape(aCompound); + tDS.Init(); + // + BOPTools_InterferencePool tIP(tDS); + NMTTools_PaveFiller tPF(tIP); + // + // 2.1.VV + tPF.Init(); + tPF.PerformVV(); + tPF.PerformNewVertices(); + // + // 2.2.VE + tPF.myPavePool.Resize (tPF.myNbEdges); + tPF.PrepareEdges(); + tPF.PerformVE(); + // + // 2.3.VF + tPF.PerformVF(); + // + // 2.4.EE + tPF.myCommonBlockPool.Resize (tPF.myNbEdges); + tPF.mySplitShapesPool.Resize (tPF.myNbEdges); + tPF.myPavePoolNew .Resize (tPF.myNbEdges); + + tPF.PreparePaveBlocks(TopAbs_VERTEX, TopAbs_EDGE); + tPF.PreparePaveBlocks(TopAbs_EDGE, TopAbs_EDGE); + // + tPF.PerformEE(); + // + tPF.RefinePavePool (); + // + tPF.myPavePoolNew.Destroy(); + // + tPF.MakeSplitEdges(); + tPF.UpdateCommonBlocks(); + // + // 3. Treatment of the result of intersection + // + Standard_Integer aNbOld, aNbLines, aNbPB, mV1, mV2, nE, mE, iFF; + TopAbs_ShapeEnum aType; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTColStd_IndexedDataMapOfIntegerInteger aMNewOld; + // + const BOPTools_SplitShapesPool& aSSP=tPF.mySplitShapesPool; + const NMTTools_CommonBlockPool& aCBP=tPF.myCommonBlockPool; + // + aNbLines=tDS.NumberOfInsertedShapes(); + aNbOld=tDS.NumberOfShapesOfTheObject(); + // + // 3.1 Links between indices in tDS and DS (kept in aMNewOld) + // + // 3.1.1.Old vertices [ links ] + for (i=1; i<=aNbOld; ++i) { + const TopoDS_Shape& aV=tDS.Shape(i); + aType=aV.ShapeType(); + if (aType!=TopAbs_VERTEX) { + continue; + } + // + for (j=1; j<=aNbSE; ++j) { + const BOPTools_PaveBlock& aPBSE=aMEPB(j); + nV1=aPBSE.Pave1().Index(); + 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); + if (aV2.IsSame(aV)) { + aMNewOld.Add(i, nV2); + break; + } + } + } + // + // 3.1.2. New vertices [ links ] + i=tDS.NumberOfSourceShapes()+1; + for (; i<=aNbLines; ++i) { + const TopoDS_Shape& aV=tDS.Shape(i); + aType=aV.ShapeType(); + if (aType!=TopAbs_VERTEX) { + continue; + } + // + // Insert new vertex in myDS + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + myDS->InsertShapeAndAncestorsSuccessors(aV, anASSeq); + nV1=myDS->NumberOfInsertedShapes(); + // link + aMNewOld.Add(i, nV1); + } + // + // 3.2. Treatment of section edges (SE) + for (i=1; i<=aNbOld; ++i) { + const TopoDS_Shape& aE=tDS.Shape(i); + aType=aE.ShapeType(); + if (aType!=TopAbs_EDGE) { + continue; + } + // + // block of section edge that we already have for this SE + BOPTools_PaveBlock& aPBSE=aMEPB.ChangeFromKey(aE); + // + // Corresponding FF-interference + iFF=aMapEI.FindFromKey(aE); + BOPTools_SSInterference& aFFi=aFFs(iFF); + BOPTools_SequenceOfCurves& aSCvs=aFFi.Curves(); + // + BOPTools_Curve& aBC=aSCvs(1); + // + const BOPTools_ListOfPaveBlock& aLPB=aSSP(tDS.RefEdge(i)); + aNbPB=aLPB.Extent(); + // + if (!aNbPB) { + // no pave blocks -> use aPBSE and whole edge aE + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + nV1=aPBSE.Pave1().Index(); + const TopoDS_Shape& aV1=myDS->Shape(nV1); + nV2=aPBSE.Pave2().Index(); + const TopoDS_Shape& aV2=myDS->Shape(nV2); + // + anASSeq.SetNewSuccessor(nV1); + anASSeq.SetNewOrientation(aV1.Orientation()); + anASSeq.SetNewSuccessor(nV2); + anASSeq.SetNewOrientation(aV2.Orientation()); + // + myDS->InsertShapeAndAncestorsSuccessors(aE, anASSeq); + nE=myDS->NumberOfInsertedShapes(); + // + aPBSE.SetEdge(nE); + aBC.AppendNewBlock(aPBSE); + // + continue; + } + // + nF1=aPBSE.Face1(); + nF2=aPBSE.Face2(); + const TopoDS_Face& aF1=TopoDS::Face(myDS->Shape(nF1)); + const TopoDS_Face& aF2=TopoDS::Face(myDS->Shape(nF2)); + // + const NMTTools_ListOfCommonBlock& aLCB=aCBP(tDS.RefEdge(i)); + NMTTools_CommonBlockAPI aCBAPI(aLCB); + // + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + BOPTools_PaveBlock aPB=aIt.Value(); + // + if (aCBAPI.IsCommonBlock(aPB)) { + // it can be Common Block + Standard_Boolean bHasPCOnF, bFound; + Standard_Integer nF, k, nEOrx, nF1x, nF2x; + Standard_Real aTolEx, aT1x, aT2x; + BOPTools_ListIteratorOfListOfPaveBlock aItPBx; + // + NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); + const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); + // + aPB=aCB.PaveBlock1(); + mE=aPB.Edge(); // index of edge in tDS + const TopoDS_Edge& aEx=TopoDS::Edge(tDS.Shape(mE)); + aTolEx=BRep_Tool::Tolerance(aEx); + // + for (k=0; k<2; ++k) { + nF=(!k) ? nF1 : nF2; + const TopoDS_Face& aF=TopoDS::Face(myDS->Shape(nF)); + // + bHasPCOnF=BOPTools_Tools2D::HasCurveOnSurface(aEx, aF); + if (bHasPCOnF) { + continue; + } + // + bFound=Standard_False; + aItPBx.Initialize(aLPBx); + for (; aItPBx.More(); aItPBx.Next()) { + BOPTools_PaveBlock& aPBx=aIt.Value(); + nEOrx=aPBx.OriginalEdge(); + const TopoDS_Shape& aEOrx=tDS.Shape(nEOrx); + BOPTools_PaveBlock& aPBSEx=aMEPB.ChangeFromKey(aEOrx); + aT1x=aPBSEx.Pave1().Param(); + aT2x=aPBSEx.Pave2().Param(); + const IntTools_Curve& aICx=aPBSEx.Curve(); + // + nF1x=aPBSEx.Face1(); + nF2x=aPBSEx.Face2(); + // + if (nF1x==nF) { + Handle(Geom2d_Curve) aC2D1x=aICx.FirstCurve2d(); + Handle(Geom2d_TrimmedCurve)aC2D1xT =new Geom2d_TrimmedCurve(aC2D1x, aT1x, aT2x); + aBB.UpdateEdge(aEx, aC2D1xT, aF, aTolEx); + bFound=!bFound; + break; + } + // + if (nF2x==nF) { + Handle(Geom2d_Curve) aC2D2x=aICx.SecondCurve2d(); + Handle(Geom2d_TrimmedCurve)aC2D2xT =new Geom2d_TrimmedCurve(aC2D2x, aT1x, aT2x); + aBB.UpdateEdge(aEx, aC2D2xT, aF, aTolEx); + bFound=!bFound; + break; + } + } + if (bFound){ + BRepLib::SameParameter(aEx, aTolEx, Standard_True); + } + } + } //if (aCBAPI.IsCommonBlock(aPB)) + // + // new SE + mE=aPB.Edge(); // index of edge in tDS + const TopoDS_Shape& aSp=tDS.Shape(mE); + // + const BOPTools_Pave& aPave1=aPB.Pave1(); + aT1=aPave1.Param(); + mV1=aPave1.Index(); // index in tDS + nV1=aMNewOld.FindFromKey(mV1); // index in myDS + 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); + // + if (!aMNewOld.Contains(mE)) { + // add new SE to the myDS + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + // + anASSeq.SetNewSuccessor(nV1); + anASSeq.SetNewOrientation(aV1.Orientation()); + + anASSeq.SetNewSuccessor(nV2); + anASSeq.SetNewOrientation(aV2.Orientation()); + + myDS->InsertShapeAndAncestorsSuccessors(aSp, anASSeq); + nE=myDS->NumberOfInsertedShapes(); + // + aMNewOld.Add(mE, nE); + } + else { + nE=aMNewOld.FindFromKey(mE); + } + // Form PaveBlock; + BOPTools_PaveBlock aPBx; + BOPTools_Pave aP1, aP2; + // + aPBx.SetFace1(nF1); + aPBx.SetFace1(nF2); + // + aP1.SetIndex(nV1); + aP1.SetParam(aT1); + // + aP2.SetIndex(nV2); + aP2.SetParam(aT2); + // + aPBx.SetPave1(aP1); + aPBx.SetPave2(aP2); + // + aPBx.SetEdge(nE); + // + aBC.AppendNewBlock(aPBx); + }// for (; aIt.More(); aIt.Next()) + }// for (i=1; i<=aNbOld; ++i) + // + myIsDone=Standard_True; +} +//======================================================================= +// function: MakePCurves +// purpose: +//======================================================================= + void NMTTools_PaveFiller::MakePCurves() +{ + Standard_Integer i, aNb, nF1, nF2, nE; + TopoDS_Face aF1FWD, aF2FWD; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences(); + // + aNb=aFFs.Extent(); + for (i=1; i<=aNb; i++) { + 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)); + // + aF1FWD=aF1; + aF1FWD.Orientation(TopAbs_FORWARD); + aF2FWD=aF2; + aF2FWD.Orientation(TopAbs_FORWARD); + // + // In, On parts processing + const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks(); + // + anIt.Initialize(aLPBInOn); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + nE=aPB.Edge(); + const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); + } + // + // Section Edges processing + /* + Standard_Integer aNbCurves, k, aNbV; + Standard_Real aTolEdge, aTolR2D, aTolFact, aTolV, aTolVmax; + BRep_Builder aBB; + // + BOPTools_SequenceOfCurves& aSC=aFF.Curves(); + aNbCurves=aSC.Length(); + if (!aNbCurves) { + continue; + } + // + const BOPTools_Curve& aBC=aSC(1); + const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks(); + anIt.Initialize(aLPB); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + nE=aPB.Edge(); + const TopoDS_Edge& aE=TopoDS::Edge(myDS->Shape(nE)); + // + aTolEdge=BRep_Tool::Tolerance(aE); + aTolR2D=aFF.TolR2D(); + aTolFact=Max(aTolEdge, aTolR2D); + // + // Check vertices tolerances and correct them if necessary + // to prevent situation when TolE > TolV + // + TopTools_IndexedMapOfShape aVMap; + TopExp::MapShapes(aE, TopAbs_VERTEX, aVMap); + + aTolVmax=-1.; + aNbV=aVMap.Extent(); + for (k=1; k<=aNbV; ++k) { + const TopoDS_Vertex& aV=TopoDS::Vertex(aVMap(k)); + aTolV=BRep_Tool::Tolerance(aV); + if (aTolV>aTolVmax) { + aTolVmax=aTolV; + } + } + // + if (aTolFact>aTolVmax) { + aTolFact=aTolVmax; + } + // + Standard_Real aTFirst, aTLast, aOutFirst, aOutLast, aOutTol; + Handle(Geom2d_Curve) aC2D1, aC2D1A, aC2D2, aC2D2A; + Handle(Geom_TrimmedCurve)aC3DETrim; + // + const Handle(Geom_Curve)& aC3DE=BRep_Tool::Curve(aE, aTFirst, aTLast); + aC3DETrim=new Geom_TrimmedCurve(aC3DE, aTFirst, aTLast); + // + // first P-Curve + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF1FWD); + BOPTools_Tools2D::CurveOnSurface(aE, aF1FWD, aC2D1, aOutFirst, aOutLast, aOutTol, Standard_True); + // + if (aC3DE->IsPeriodic()) { + BOPTools_Tools2D::AdjustPCurveOnFace(aF1FWD, aTFirst, aTLast, aC2D1, aC2D1A); + } + else { + BOPTools_Tools2D::AdjustPCurveOnFace(aF1FWD, aC3DETrim, aC2D1, aC2D1A); + } + // + aBB.UpdateEdge(aE, aC2D1A, aF1FWD, aTolFact); + // + // second P-Curve + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aF2FWD); + BOPTools_Tools2D::CurveOnSurface(aE, aF2FWD, aC2D2, aOutFirst, aOutLast, aOutTol, Standard_True); + // + if (aC3DE->IsPeriodic()) { + BOPTools_Tools2D::AdjustPCurveOnFace(aF2FWD, aTFirst, aTLast, aC2D2, aC2D2A); + } + else { + BOPTools_Tools2D::AdjustPCurveOnFace(aF2FWD, aC3DETrim, aC2D2, aC2D2A); + } + // + aBB.UpdateEdge(aE, aC2D2A, aF2FWD, aTolFact); + } + */ + } + +} +//======================================================================= +// function: IsExistingPaveBlock +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::IsExistingPaveBlock(const BOPTools_PaveBlock& aPBNew, + const BOPTools_SSInterference& aFFi) +{ + Standard_Boolean bFlag=Standard_False; + Standard_Integer nVNew1, nVNew2, nV1, nV2, iC; + Standard_Real aTolR3D; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + aTolR3D=aFFi.TolR3D(); + // + nVNew1=aPBNew.Pave1().Index(); + nVNew2=aPBNew.Pave2().Index(); + // + const BOPTools_ListOfPaveBlock& aLPBR=aFFi.PaveBlocks(); + anIt.Initialize(aLPBR); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPBR=anIt.Value(); + nV1=aPBR.Pave1().Index(); + nV2=aPBR.Pave2().Index(); + if (nVNew1==nV1 || nVNew1==nV2 || nVNew2==nV1 || nVNew2==nV2) { + // + iC=CheckIntermediatePoint(aPBNew, aPBR, aTolR3D); + if (!iC) { + return !bFlag; + } + } + } + return bFlag; +} +//======================================================================= +// function: CheckIntermediatePoint +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB, + const BOPTools_PaveBlock& aPBR, + const Standard_Real aTolC) + +{ + Standard_Real aT11, aT12, aTM, aTmp; + Standard_Integer iVM, nE2; + gp_Pnt aPM; + BRep_Builder aBB; + TopoDS_Vertex aVM; + // + // Vertex + const BOPTools_Pave& aPave11=aPB.Pave1(); + aT11=aPave11.Param(); + // + const BOPTools_Pave& aPave12=aPB.Pave2(); + aT12=aPave12.Param(); + // + aTM=IntTools_Tools::IntermediatePoint (aT11, aT12); + // + const IntTools_Curve& aIC=aPB.Curve(); + aIC.D0(aTM, aPM); + // + aBB.MakeVertex (aVM, aPM, aTolC); + // + //Edge + nE2=aPBR.Edge(); + const TopoDS_Edge& aE2=TopoDS::Edge(myDS->GetShape(nE2)); + // VE + iVM=myContext.ComputeVE(aVM, aE2, aTmp); + // + return iVM; +} +//======================================================================= +// function: PutBoundPaveOnCurve +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PutBoundPaveOnCurve(BOPTools_Curve& aBC, + BOPTools_SSInterference& aFFi) +{ + Standard_Boolean bHasBounds, bVF; + Standard_Integer nF1, nF2; + Standard_Real aT1, aT2, aTolR3D; + gp_Pnt aP1, aP2; + // + const IntTools_Curve& aIC=aBC.Curve(); + bHasBounds=aIC.HasBounds (); + if (!bHasBounds){ + return; + } + // + // Bounds + aIC.Bounds (aT1, aT2, aP1, aP2); + // + // Faces + 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)); + // + bVF=myContext.IsValidPointForFaces (aP1, aF1, aF2, aTolR3D); + if (bVF) { + PutBoundPaveOnCurve (aP1, aT1, aBC, aFFi); + } + // + bVF=myContext.IsValidPointForFaces (aP2, aF1, aF2, aTolR3D); + if (bVF) { + PutBoundPaveOnCurve (aP2, aT2, aBC, aFFi); + } +} +//======================================================================= +// function: PutBoundPaveOnCurve +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PutBoundPaveOnCurve(const gp_Pnt& aP, + const Standard_Real aT, + BOPTools_Curve& aBC, + BOPTools_SSInterference& aFFi) +{ + Standard_Boolean bFound1, bFound2; + Standard_Integer nV; + Standard_Real aTolV=aFFi.TolR3D(); + + BOPTools_Pave aPave1, aPave2, aPave; + BOPTools_PaveSet& aCPS=aBC.Set(); + BOPTools_PaveSet& aFFiPS=aFFi.NewPaveSet(); + const IntTools_Curve& aIC=aBC.Curve(); + // + bFound1=FindPave(aP, aTolV, aCPS , aPave1); + bFound2=FindPave(aP, aTolV, aFFiPS, aPave2); + // + if (!bFound1 && !bFound2) { + TopoDS_Vertex aNewVertex; + BOPTools_Tools::MakeNewVertex(aP, aTolV, aNewVertex); + // + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + myDS->InsertShapeAndAncestorsSuccessors(aNewVertex, anASSeq); + nV=myDS->NumberOfInsertedShapes(); + aPave.SetIndex(nV); + aPave.SetParam(aT); + + aCPS.Append(aPave); + aFFiPS.Append(aPave); + // + // Append Techno Vertex to the Curve + 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)); + BOPTools_Tools::UpdateVertex (aIC, aT, aV); + } + + if (!bFound1 && bFound2) { + nV=aPave2.Index(); + aPave.SetIndex(nV); + aPave.SetParam(aT); + aCPS.Append(aPave); + // + const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + BOPTools_Tools::UpdateVertex (aIC, aT, aV); + } +} +//======================================================================= +// function: FindPave +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::FindPave(const gp_Pnt& aP, + const Standard_Real aTolPV, + const BOPTools_PaveSet& aPS, + BOPTools_Pave& aPave) +{ + Standard_Integer nV; + Standard_Boolean bIsVertex=Standard_False; + + const BOPTools_ListOfPave& aLP=aPS.Set(); + BOPTools_ListIteratorOfListOfPave anIt(aLP); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPC=anIt.Value(); + nV=aPC.Index(); + const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + bIsVertex=IntTools_Tools::IsVertex (aP, aTolPV, aV); + if (bIsVertex) { + aPave=aPC; + return bIsVertex; + } + } + return bIsVertex; +} +//======================================================================= +// function: PrepareSetForFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_PaveSet& aPSF) +{ + Standard_Integer nV1, nV2; + TColStd_MapOfInteger aMap; + BOPTools_ListOfPaveBlock aLPB1, aLPB2; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + RealSplitsFace(nF1, aLPB1); + RealSplitsFace(nF2, aLPB2); + // + aLPB1.Append(aLPB2); + // + anIt.Initialize(aLPB1); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + const BOPTools_Pave& aPave1=aPB.Pave1(); + nV1=aPave1.Index(); + if (!aMap.Contains(nV1)) { + aMap.Add(nV1); + aPSF.Append(aPave1); + } + const BOPTools_Pave& aPave2=aPB.Pave2(); + nV2=aPave2.Index(); + if (!aMap.Contains(nV2)) { + aMap.Add(nV2); + aPSF.Append(aPave2); + } + } +} +//======================================================================= +// function: PutPaveOnCurve +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet, + const Standard_Real aTolR3D, + BOPTools_Curve& aBC) +{ + Standard_Integer nV; + Standard_Boolean bIsVertexOnLine; + Standard_Real aT; + BOPTools_ListIteratorOfListOfPave anIt; + Bnd_Box aBBC; + GeomAdaptor_Curve aGAC; + // + const IntTools_Curve& aC=aBC.Curve(); + Handle (Geom_Curve) aC3D= aC.Curve(); + aGAC.Load(aC3D); + BndLib_Add3dCurve::Add(aGAC, aTolR3D, aBBC); + // + const BOPTools_ListOfPave& aLP=aPaveSet.Set(); + anIt.Initialize(aLP); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Pave& aPave=anIt.Value(); + // + nV=aPave.Index(); + const TopoDS_Vertex& aV=TopoDS::Vertex(myDS->Shape(nV)); + // + Bnd_Box aBBV; + BRepBndLib::Add(aV, aBBV); + if (aBBC.IsOut(aBBV)){ + continue; + } + // + bIsVertexOnLine=myContext.IsVertexOnLine(aV, aC, aTolR3D, aT); + // + if (bIsVertexOnLine) { + BOPTools_Pave aPaveNew(nV, aT, BooleanOperations_SurfaceSurface); + BOPTools_PaveSet& aPS=aBC.Set(); + aPS.Append(aPaveNew); + //<-B + BOPTools_Tools::UpdateVertex (aC, aT, aV); + } + } +} +///////////// +//======================================================================= +// function: IsPairFound +// purpose: +//======================================================================= +Standard_Boolean IsPairFound(const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_InterferencePool* myIntrPool, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapWhat, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapWith) +{ + Standard_Boolean bIsFound; + // + if (!aMapWhat.Contains(nF1)) { + TColStd_IndexedMapOfInteger aMWhat; + FMapWhat(nF1, myIntrPool, aMWhat); + aMapWhat.Add(nF1, aMWhat); + } + // + if (!aMapWith.Contains(nF2)) { + TColStd_IndexedMapOfInteger aMWith; + FMapWith(nF2, myIntrPool, aMWith); + aMapWith.Add(nF2, aMWith); + } + // + const TColStd_IndexedMapOfInteger& aMWht=aMapWhat.FindFromKey(nF1); + const TColStd_IndexedMapOfInteger& aMWit=aMapWith.FindFromKey(nF2); + // + bIsFound=IsFound(aMWht, aMWit); + // + return bIsFound; +} +//======================================================================= +// function: FMapWhat +// purpose: +//======================================================================= +void FMapWhat(const Standard_Integer nF, + BOPTools_InterferencePool* myIntrPool, + TColStd_IndexedMapOfInteger& aMapWhat) + +{ + Standard_Integer nE, nV; + + + + BooleanOperations_ShapesDataStructure* myDS=myIntrPool->DS(); + BooleanOperations_OnceExplorer aExp(*myDS); + // + // What + aMapWhat.Add(nF); + aExp.Init(nF, TopAbs_VERTEX); + for (; aExp.More(); aExp.Next()) { + nV=aExp.Current(); + aMapWhat.Add(nV); + } + // + aExp.Init(nF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE=aExp.Current(); + aMapWhat.Add(nE); + } +} +//======================================================================= +// function: FMapWith +// purpose: +//======================================================================= +void FMapWith(const Standard_Integer nF, + BOPTools_InterferencePool* myIntrPool, + TColStd_IndexedMapOfInteger& aMapWith) +{ + TColStd_IndexedMapOfInteger aMapWhat; + + FMapWhat(nF, myIntrPool, aMapWhat); + // + // With + Standard_Integer i, aNb, anIndex, aWhat, aWith; + BOPTools_ListIteratorOfListOfInterference anIt; + + const BOPTools_CArray1OfInterferenceLine& anArrIL= myIntrPool->InterferenceTable(); + + aNb=aMapWhat.Extent(); + for (i=1; i<=aNb; i++) { + aWhat=aMapWhat(i); + + const BOPTools_InterferenceLine& aWithLine=anArrIL(aWhat); + + const BOPTools_ListOfInterference& aLI=aWithLine.List(); + anIt.Initialize(aLI); + for (; anIt.More(); anIt.Next()) { + const BOPTools_Interference& anIntf=anIt.Value(); + anIndex=anIntf.Index(); + if (anIndex) { + aWith=anIntf.With(); + aMapWith.Add(aWith); + } + } + } +} +//======================================================================= +// function: IsFound +// purpose: +//======================================================================= +Standard_Boolean IsFound(const TColStd_IndexedMapOfInteger& aMapWhat, + const TColStd_IndexedMapOfInteger& aMapWith) +{ + Standard_Boolean bFlag=Standard_False; + Standard_Integer i, aNb, aWhat; + + aNb=aMapWhat.Extent(); + for (i=1; i<=aNb; i++) { + aWhat=aMapWhat(i); + if (aMapWith.Contains(aWhat)) { + return !bFlag; + } + } + return bFlag; +} diff --git a/src/NMTTools/NMTTools_PaveFiller_7.cxx b/src/NMTTools/NMTTools_PaveFiller_7.cxx new file mode 100644 index 000000000..5f8f5fe66 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_7.cxx @@ -0,0 +1,261 @@ +// File: NMTTools_PaveFiller_7.cxx +// Created: Thu Dec 18 15:14:55 2003 +// Author: Peter KURNEV +// + + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +// function: MakeSplitEdges +// purpose: +//======================================================================= + void NMTTools_PaveFiller::MakeSplitEdges() +{ + myIsDone=Standard_False; + // + Standard_Boolean bIsNewVertex1, bIsNewVertex2; + Standard_Integer i, aNbS, nV1, nV2, aNbPaveBlocks, aNewShapeIndex; + Standard_Real t1, t2; + TopAbs_Orientation anOri; + TopoDS_Edge aE, aESplit; + TopoDS_Vertex aV1, aV2; + // + aNbS=myDS->NumberOfShapesOfTheObject(); + for (i=1; i<=aNbS; ++i) { + if (myDS->GetShapeType(i) != TopAbs_EDGE) + continue; + // + // Original Edge + aE=TopoDS::Edge(myDS->Shape(i)); + if (BRep_Tool::Degenerated(aE)){ + continue; + } + // + anOri=aE.Orientation(); + aE.Orientation(TopAbs_FORWARD); + // + // Making Split Edges + // + // Split Set for the Original Edge i + BOPTools_ListOfPaveBlock& aSplitEdges=mySplitShapesPool(myDS->RefEdge(i)); + BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges); + // + aNbPaveBlocks=aSplitEdges.Extent(); + + for (; aPBIt.More(); aPBIt.Next()) { + BOPTools_PaveBlock& aPB=aPBIt.Value(); + // aPave1 + const BOPTools_Pave& aPave1=aPB.Pave1(); + nV1=aPave1.Index(); + t1=aPave1.Param(); + aV1=TopoDS::Vertex(myDS->GetShape(nV1)); + aV1.Orientation(TopAbs_FORWARD); + // aPave2 + const BOPTools_Pave& aPave2=aPB.Pave2(); + nV2=aPave2.Index(); + t2=aPave2.Param(); + aV2=TopoDS::Vertex(myDS->GetShape(nV2)); + aV2.Orientation(TopAbs_REVERSED); + //xx + if (aNbPaveBlocks==1) { + bIsNewVertex1=myDS->IsNewShape (nV1); + bIsNewVertex2=myDS->IsNewShape (nV2); + if (!bIsNewVertex1 && !bIsNewVertex2) { + aPB.SetEdge(i); + continue; + } + } + //xx + BOPTools_Tools::MakeSplitEdge(aE, aV1, t1, aV2, t2, aESplit); + // + // Add Split Part of the Original Edge to the DS + BooleanOperations_AncestorsSeqAndSuccessorsSeq anASSeq; + + anASSeq.SetNewSuccessor(nV1); + anASSeq.SetNewOrientation(aV1.Orientation()); + + anASSeq.SetNewSuccessor(nV2); + anASSeq.SetNewOrientation(aV2.Orientation()); + // + if (anOri==TopAbs_INTERNAL) { + anASSeq.SetNewAncestor(i); + aESplit.Orientation(anOri); + } + // + myDS->InsertShapeAndAncestorsSuccessors(aESplit, anASSeq); + aNewShapeIndex=myDS->NumberOfInsertedShapes(); + myDS->SetState(aNewShapeIndex, BooleanOperations_UNKNOWN); + // + // Fill Split Set for the Original Edge + aPB.SetEdge(aNewShapeIndex); + // + } + } + myIsDone=Standard_True; +} +//======================================================================= +// function: UpdateCommonBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::UpdateCommonBlocks() +{ + myIsDone=Standard_False; + // + Standard_Integer nE, aNbS, nSp, nEx, nSpx; + NMTTools_ListIteratorOfListOfCommonBlock aCBIt; + BOPTools_ListIteratorOfListOfPaveBlock aPBIt; + // + aNbS=myDS->NumberOfShapesOfTheObject(); + // + for (nE=1; nE<=aNbS; ++nE) { + if (myDS->GetShapeType(nE)!=TopAbs_EDGE){ + continue; + } + if (BRep_Tool::Degenerated(TopoDS::Edge(myDS->Shape(nE)))){ + continue; + } + // + NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE)); + BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool (myDS->RefEdge(nE)); + // + aCBIt.Initialize(aLCB); + for (; aCBIt.More(); aCBIt.Next()) { + NMTTools_CommonBlock& aCB=aCBIt.Value(); + BOPTools_PaveBlock& aPB=aCB.PaveBlock1(nE); + nSp=SplitIndex(aPB); + aPB.SetEdge(nSp); + // + const BOPTools_ListOfPaveBlock& aCBLPB=aCB.PaveBlocks(); + aPBIt.Initialize(aCBLPB); + for (; aPBIt.More(); aPBIt.Next()) { + BOPTools_PaveBlock& aPBx=aPBIt.Value(); + nEx=aPBx.OriginalEdge(); + if (nEx==nE) { + continue; + } + // + nSpx=SplitIndex(aPBx); + aPBx.SetEdge(nSpx); + } + // + } + } +} +//======================================================================= +// function: SplitIndex +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitIndex(const BOPTools_PaveBlock& aPBx)const +{ + Standard_Integer anOriginalEdge, anEdgeIndex=0; + + anOriginalEdge=aPBx.OriginalEdge(); + + const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(anOriginalEdge)); + // + BOPTools_ListIteratorOfListOfPaveBlock anIt(aLPB); + for (; anIt.More(); anIt.Next()) { + BOPTools_PaveBlock& aPB=anIt.Value(); + if (aPB.IsEqual(aPBx)) { + anEdgeIndex=aPB.Edge(); + return anEdgeIndex; + } + } + return anEdgeIndex; +} +//======================================================================= +// function: UpdatePaveBlocks +// purpose: +//======================================================================= + void NMTTools_PaveFiller::UpdatePaveBlocks() +{ + myIsDone=Standard_False; + // + + Standard_Integer i, aNbFFs, nF1, nF2, aNbF, nF, iRankF, nE, nV1, nV2, aNbPB; + Standard_Real aT1, aT2; + TColStd_IndexedMapOfInteger aMF, aME; + TopExp_Explorer aExp; + TopoDS_Vertex aV1, aV2; + TopoDS_Edge aE; + BOPTools_Pave aPave1, aPave2; + BOPTools_PaveBlock aPB; + // + BOPTools_CArray1OfSSInterference& aFFs=myIntrPool->SSInterferences(); + // + aNbFFs=aFFs.Extent(); + for (i=1; i<=aNbFFs; ++i) { + BOPTools_SSInterference& aFFi=aFFs(i); + aFFi.Indices(nF1, nF2); + aMF.Add(nF1); + aMF.Add(nF2); + } + // + aNbF=aMF.Extent(); + for(i=1; i<=aNbF; ++i) { + nF=aMF(i); + iRankF=myDS->Rank(nF); + const TopoDS_Shape& aF=myDS->Shape(nF); + aExp.Init(aF, TopAbs_EDGE); + for(; aExp.More(); aExp.Next()) { + aE=TopoDS::Edge(aExp.Current()); + // + if (BRep_Tool::Degenerated(aE)) { + continue; + } + // + nE=myDS->ShapeIndex(aE, iRankF); + // + if (aME.Contains(nE)) { + continue; + } + aME.Add(nE); + // + BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); + aNbPB=aLPB.Extent(); + if (aNbPB) { + continue; + } + TopExp::Vertices(aE, aV1, aV2); + // + nV1=myDS->ShapeIndex(aV1, iRankF); + aT1=BRep_Tool::Parameter(aV1, aE); + aPave1.SetIndex(nV1); + aPave1.SetParam(aT1); + // + nV2=myDS->ShapeIndex(aV2, iRankF); + aT2=BRep_Tool::Parameter(aV2, aE); + aPave2.SetIndex(nV2); + aPave2.SetParam(aT2); + // + aPB.SetEdge(nE); + aPB.SetOriginalEdge(nE); + aPB.SetPave1(aPave1); + aPB.SetPave2(aPave2); + // + aLPB.Append(aPB); + } + } +} diff --git a/src/NMTTools/NMTTools_PaveFiller_8.cxx b/src/NMTTools/NMTTools_PaveFiller_8.cxx new file mode 100644 index 000000000..174c52379 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_8.cxx @@ -0,0 +1,595 @@ +// File: NMTTools_PaveFiller_8.cxx +// Created: Fri Dec 19 11:15:53 2003 +// Author: Peter KURNEV +// + + +#include + +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include +#include +#include +#include + +//======================================================================= +// function: RealPaveBlock +// purpose: +//======================================================================= + const BOPTools_PaveBlock& NMTTools_PaveFiller::RealPaveBlock(const BOPTools_PaveBlock& aPB) +{ + Standard_Integer nE; + // + nE=aPB.OriginalEdge(); + const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); + NMTTools_CommonBlockAPI aCBAPI(aLCBE); + if (aCBAPI.IsCommonBlock(aPB)) { + NMTTools_CommonBlock& aCB=aCBAPI.CommonBlock(aPB); + const BOPTools_PaveBlock& aPBx=aCB.PaveBlock1(); + return aPBx; + } + return aPB; +} +//======================================================================= +// function: CommonBlocksFace +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::CommonBlocksFace(const Standard_Integer nF, + NMTTools_ListOfCommonBlock& aLCB) +{ + Standard_Integer nE; + TopAbs_ShapeEnum aT; + NMTTools_ListIteratorOfListOfCommonBlock anIt; + // + aT=myDS->GetShapeType(nF); + // + if (aT!=TopAbs_FACE) { + return 1; // Type mismatch + } + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + // + aExp.Init(nF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE=aExp.Current(); + const NMTTools_ListOfCommonBlock& aLCBE=myCommonBlockPool(myDS->RefEdge(nE)); + anIt.Initialize(aLCBE); + for (; anIt.More(); anIt.Next()) { + const NMTTools_CommonBlock& aCBE=anIt.Value(); + aLCB.Append(aCBE); + } + } + return 0; //Ok +} +// +// 1 RealSplits +// +// +//======================================================================= +// function: RealSplitsFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RealSplitsFace(const Standard_Integer nF, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + // + aExp.Init(nF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE=aExp.Current(); + const BOPTools_ListOfPaveBlock& aLPBE=mySplitShapesPool(myDS->RefEdge(nE)); + anIt.Initialize(aLPBE); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB=anIt.Value(); + const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB); + aLPB.Append(aPBR); + } + } +} +//======================================================================= +// function: HasRealSplitsInOnFace +// purpose: +//======================================================================= + Standard_Boolean NMTTools_PaveFiller::HasRealSplitsInOnFace(const Standard_Integer nF1, + const Standard_Integer nF2) +{ + Standard_Boolean bFlag; + BOPTools_ListOfPaveBlock aLPB; + // + RealSplitsInFace(0, nF1, nF2, aLPB); + // + bFlag=!aLPB.IsEmpty(); + if (bFlag) { + return bFlag; + } + // + RealSplitsInFace(0, nF1, nF2, aLPB); + // + bFlag=!aLPB.IsEmpty(); + return bFlag; +} +//======================================================================= +// function: RealSplitsInFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer ,//for overriding + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE1; + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + aExp.Init(nF1, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE1=aExp.Current(); + RealSplitsInFace (nE1, nF2, aLPB); + } +} +//======================================================================= +// function: RealSplitsInFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RealSplitsInFace(const Standard_Integer nE1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nF1; + // + TColStd_ListIteratorOfListOfInteger anItLFCB; + NMTTools_ListIteratorOfListOfCommonBlock anItCB; + // + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); + // + anItCB.Initialize(aLCB); + for (; anItCB.More(); anItCB.Next()) { + NMTTools_CommonBlock& aCB=anItCB.Value(); + const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); + const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1); + + const TColStd_ListOfInteger& aLFCB=aCB.Faces(); + anItLFCB.Initialize(aLFCB); + for (; anItLFCB.More(); anItLFCB.Next()) { + nF1=anItLFCB.Value(); + if (nF1==nF2) { + aLPB.Append(aPB1R); + } + } + } +} +//======================================================================= +// function: RealSplitsOnEdge +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RealSplitsOnEdge(const Standard_Integer nE1, + const Standard_Integer nE2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE; + // + BOPTools_ListIteratorOfListOfPaveBlock anIt; + NMTTools_ListIteratorOfListOfCommonBlock anItCB; + // + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); + + anItCB.Initialize(aLCB); + for (; anItCB.More(); anItCB.Next()) { + NMTTools_CommonBlock& aCB=anItCB.Value(); + const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); + const BOPTools_PaveBlock& aPB1R=RealPaveBlock(aPB1); + // + const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); + anIt.Initialize(aLPBx); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB2=anIt.Value(); + nE=aPB2.OriginalEdge(); + if (nE==nE2) { + aLPB.Append(aPB1R); + } + } + } +} +//======================================================================= +// function: RealSplitsOnFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer nE1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE2; + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + aExp.Init(nF2, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE2=aExp.Current(); + RealSplitsOnEdge(nE1, nE2, aLPB); + } +} +//======================================================================= +// function: RealSplitsOnFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::RealSplitsOnFace(const Standard_Integer ,//for overriding + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE1; + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*myDS); + aExp.Init(nF1, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE1=aExp.Current(); + RealSplitsOnFace(nE1, nF2, aLPB); + } +} + +// 2 SimpleSplits +//======================================================================= +// function: SplitsFace +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE; + TopAbs_ShapeEnum aT; + BOPTools_ListIteratorOfListOfPaveBlock anIt; + // + aT=myDS->GetShapeType(nF); + // + if (aT!=TopAbs_FACE) { + return 1; // Type mismatch + } + // + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + // + aExp.Init(nF, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE=aExp.Current(); + const BOPTools_ListOfPaveBlock& aLPBE=mySplitShapesPool(myDS->RefEdge(nE)); + anIt.Initialize(aLPBE); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPBE=anIt.Value(); + aLPB.Append(aPBE); + } + } + return 0; //Ok +} + +//======================================================================= +// function: SplitsInFace +// purpose: splits of edges from nF1 in nF2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE1; + TopAbs_ShapeEnum aT1, aT2; + + aT1=myDS->GetShapeType(nF1); + aT2=myDS->GetShapeType(nF2); + + if (aT1!=TopAbs_FACE || aT2!=TopAbs_FACE) { + return 1; // Type mismatch + } + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + aExp.Init(nF1, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE1=aExp.Current(); + SplitsInFace (nE1, nF2, aLPB); + } + return 0; //Ok +} +//======================================================================= +// function: SplitsInFace +// purpose: splits of edge nE1 in aFace2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nF1; + TopAbs_ShapeEnum aT1, aT2; + + aT1=myDS->GetShapeType(nE1); + aT2=myDS->GetShapeType(nF2); + + if (aT1!=TopAbs_EDGE || aT2!=TopAbs_FACE) { + return 1; // Type mismatch + } + // + TColStd_ListIteratorOfListOfInteger anItLFCB; + NMTTools_ListIteratorOfListOfCommonBlock anItCB; + // + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); + // + anItCB.Initialize(aLCB); + for (; anItCB.More(); anItCB.Next()) { + NMTTools_CommonBlock& aCB=anItCB.Value(); + const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1); + + const TColStd_ListOfInteger& aLFCB=aCB.Faces(); + anItLFCB.Initialize(aLFCB); + for (; anItLFCB.More(); anItLFCB.Next()) { + nF1=anItLFCB.Value(); + if (nF1==nF2) { + aLPB.Append(aPB1); + } + } + } + return 0; //Ok +} +//======================================================================= +// function: SplitsOnEdge +// purpose: splits of edge nE1 on nE2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1, + const Standard_Integer nE2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE; + TopAbs_ShapeEnum aT1, aT2; + + aT1=myDS->GetShapeType(nE1); + aT2=myDS->GetShapeType(nE2); + + if (aT1!=TopAbs_EDGE || aT2!=TopAbs_EDGE) { + return 1; // Type mismatch + } + // + BOPTools_ListIteratorOfListOfPaveBlock anIt; + NMTTools_ListIteratorOfListOfCommonBlock anItCB; + // + const NMTTools_ListOfCommonBlock& aLCB=myCommonBlockPool(myDS->RefEdge(nE1)); + + anItCB.Initialize(aLCB); + for (; anItCB.More(); anItCB.Next()) { + NMTTools_CommonBlock& aCB=anItCB.Value(); + const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1(nE1);//XXX + // + const BOPTools_ListOfPaveBlock& aLPBx=aCB.PaveBlocks(); + anIt.Initialize(aLPBx); + for (; anIt.More(); anIt.Next()) { + const BOPTools_PaveBlock& aPB2=anIt.Value(); + nE=aPB2.OriginalEdge(); + if (nE==nE2) { + aLPB.Append(aPB1); + } + } + } + return 0; //Ok +} +//======================================================================= +// function: SplitsOnFace +// purpose: splits of edge nE1 on face nF2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE2, ip; + TopAbs_ShapeEnum aT1, aT2; + + aT1=myDS->GetShapeType(nE1); + aT2=myDS->GetShapeType(nF2); + + if (aT1!=TopAbs_EDGE || aT2!=TopAbs_FACE) { + return 1; // Type mismatch + } + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*pDS); + aExp.Init(nF2, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE2=aExp.Current(); + ip=SplitsOnEdge(nE1, nE2, aLPB); + if (ip) { + return ip; + } + } + return 0; //Ok +} +//======================================================================= +// function: SplitsOnFace +// purpose: splits of edges from face nF1 on face nF2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding + const Standard_Integer nF1, + const Standard_Integer nF2, + BOPTools_ListOfPaveBlock& aLPB) +{ + Standard_Integer nE1, ip; + TopAbs_ShapeEnum aT1, aT2; + + aT1=myDS->GetShapeType(nF1); + aT2=myDS->GetShapeType(nF2); + + if (aT1!=TopAbs_FACE || aT2!=TopAbs_FACE) { + return 1; // Type mismatch + } + BooleanOperations_ShapesDataStructure *pDS=myDS; + BooleanOperations_OnceExplorer aExp(*myDS); + aExp.Init(nF1, TopAbs_EDGE); + for (; aExp.More(); aExp.Next()) { + nE1=aExp.Current(); + ip=SplitsOnFace(nE1, nF2, aLPB); + if (ip) { + return ip; + } + } + return 0; //Ok +} + +// 3 Simple Splits indices +//======================================================================= +// function: SplitsFace +// purpose: +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsFace(const Standard_Integer nF, + TColStd_ListOfInteger& aSplits) +{ + Standard_Integer nE, iErr; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTools_ListOfPaveBlock aLPB; + // + iErr=SplitsFace(nF, aLPB); + if (iErr) { + return iErr; + } + + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + nE=aPB.Edge(); + aSplits.Append(nE); + } + return 0; //Ok +} + +//======================================================================= +// function: SplitsInFace +// purpose: splits of edges from nF1 in nF2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer ,//for overriding + const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) +{ + Standard_Integer nE, iErr; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTools_ListOfPaveBlock aLPB; + // + iErr=SplitsInFace(0, nF1, nF2, aLPB); + if (iErr) { + return iErr; + } + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + nE=aPB.Edge(); + aSplits.Append(nE); + } + return iErr; +} +//======================================================================= +// function: SplitsInFace +// purpose: splits of edge nE1 in aFace2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsInFace(const Standard_Integer nE1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) +{ + Standard_Integer nE, iErr; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTools_ListOfPaveBlock aLPB; + // + iErr=SplitsInFace(nE1, nF2, aLPB); + if (iErr) { + return iErr; + } + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + nE=aPB.Edge(); + aSplits.Append(nE); + } + return iErr; +} +//======================================================================= +// function: SplitsOnEdge +// purpose: splits of edge nE1 on nE2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsOnEdge(const Standard_Integer nE1, + const Standard_Integer nE2, + TColStd_ListOfInteger& aSplits) +{ + Standard_Integer nE, iErr; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTools_ListOfPaveBlock aLPB; + // + iErr=SplitsOnEdge(nE1, nE2, aLPB); + if (iErr) { + return iErr; + } + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + nE=aPB.Edge(); + aSplits.Append(nE); + } + return iErr; +} +//======================================================================= +// function: SplitsOnFace +// purpose: splits of edge nE1 on face nF2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer nE1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) +{ + Standard_Integer nE, iErr; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTools_ListOfPaveBlock aLPB; + // + iErr=SplitsOnEdge(nE1, nF2, aLPB); + if (iErr) { + return iErr; + } + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + nE=aPB.Edge(); + aSplits.Append(nE); + } + return iErr; +} +//======================================================================= +// function: SplitsOnFace +// purpose: splits of edges from face nF1 on face nF2 +//======================================================================= + Standard_Integer NMTTools_PaveFiller::SplitsOnFace(const Standard_Integer ,//for overriding + const Standard_Integer nF1, + const Standard_Integer nF2, + TColStd_ListOfInteger& aSplits) +{ + Standard_Integer nE, iErr; + BOPTools_ListIteratorOfListOfPaveBlock aIt; + BOPTools_ListOfPaveBlock aLPB; + // + iErr=SplitsOnFace(0, nF1, nF2, aLPB); + if (iErr) { + return iErr; + } + + aIt.Initialize(aLPB); + for (; aIt.More(); aIt.Next()) { + const BOPTools_PaveBlock& aPB=aIt.Value(); + nE=aPB.Edge(); + aSplits.Append(nE); + } + return 0; //Ok +} diff --git a/src/NMTTools/NMTTools_PaveFiller_9.cxx b/src/NMTTools/NMTTools_PaveFiller_9.cxx new file mode 100644 index 000000000..2e525fd26 --- /dev/null +++ b/src/NMTTools/NMTTools_PaveFiller_9.cxx @@ -0,0 +1,105 @@ +// File: NMTTools_PaveFiller_9.cxx +// Created: Fri Dec 19 11:15:53 2003 +// Author: Peter KURNEV +// + +#include + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include +#include + + +//======================================================================= +// function: PrepareFace +// purpose: +//======================================================================= + void NMTTools_PaveFiller::PrepareFace(const Standard_Integer nF, + TopoDS_Face& newFace) +{ + Standard_Boolean bToReverse, bIsDegenerated; + Standard_Integer iRankF, nE, nSp, aNbPB; + Standard_Real aTol; + TopLoc_Location aLoc; + TopoDS_Face aF; + TopoDS_Wire newWire; + TopoDS_Edge aSp; + TopAbs_Orientation anOrF, anOrE; + BRep_Builder aBB; + TopExp_Explorer aExpW, aExpE; + BOPTools_ListIteratorOfListOfPaveBlock aItPB; + // + iRankF=myDS->Rank(nF); + aF=TopoDS::Face(myDS->Shape(nF)); + anOrF=aF.Orientation(); + aF.Orientation(TopAbs_FORWARD); + // + Handle(Geom_Surface) aS=BRep_Tool::Surface(aF, aLoc); + aTol=BRep_Tool::Tolerance(aF); + // + aBB.MakeFace (newFace, aS, aLoc, aTol); + // + aExpW.Init(aF, TopAbs_WIRE); + for (; aExpW.More(); aExpW.Next()) { + const TopoDS_Shape& aW=aExpW.Current(); + aBB.MakeWire(newWire); + // + aExpE.Init(aW, TopAbs_EDGE); + for (; aExpE.More(); aExpE.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current()); + bIsDegenerated=BRep_Tool::Degenerated(aE); + anOrE=aE.Orientation(); + // + nE=myDS->ShapeIndex(aE, iRankF); + const BOPTools_ListOfPaveBlock& aLPB=mySplitShapesPool(myDS->RefEdge(nE)); + aNbPB=aLPB.Extent(); + if (!aNbPB) { + aBB.Add(newWire, aE); + continue; + } + // + aItPB.Initialize(aLPB); + for (; aItPB.More(); aItPB.Next()) { + const BOPTools_PaveBlock& aPB=aItPB.Value(); + const BOPTools_PaveBlock& aPBR=RealPaveBlock(aPB); + nSp=aPBR.Edge(); + // + aSp=TopoDS::Edge(myDS->Shape(nSp)); + if (!bIsDegenerated) { + bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, myContext); + if (bToReverse) { + aSp.Reverse(); + } + } + else { + aSp.Orientation(anOrE); + } + aBB.Add(newWire, aSp); + } + } + aBB.Add(newFace, newWire); + } + newFace.Orientation(anOrF); +} diff --git a/src/NMTTools/NMTTools_Tools.cdl b/src/NMTTools/NMTTools_Tools.cdl new file mode 100644 index 000000000..5e6e5cf63 --- /dev/null +++ b/src/NMTTools/NMTTools_Tools.cdl @@ -0,0 +1,72 @@ +-- File: NMTTools_Tools.cdl +-- Created: Mon Dec 8 10:32:34 2003 +-- Author: Peter KURNEV +-- +---Copyright: Matra Datavision 2003 + + +class Tools from NMTTools + + ---Purpose: + +uses + Vertex from TopoDS, + Edge from TopoDS, + Face from TopoDS, + Context from IntTools, + Curve from Geom2d, + + ListOfShape from TopTools, + IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd, + CArray1OfVVInterference from BOPTools, + CArray1OfSSInterference from BOPTools, + ListOfCoupleOfShape from NMTTools, + IndexedDataMapOfShapeIndexedMapOfShape from NMTTools + +--raises + +is + MakeNewVertex (myclass; + aLV : ListOfShape from TopTools; + aNewVertex: out Vertex from TopoDS); + FindChains(myclass; + aVVs:CArray1OfVVInterference from BOPTools; + aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd); + + FindChains(myclass; + aVVs:CArray1OfSSInterference from BOPTools; + aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd); + + FindChains(myclass; + aMCV: IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd; + aMCX: out IndexedDataMapOfIntegerIndexedMapOfInteger from BOPTColStd); + + + IsSplitInOnFace(myclass; + aE : Edge from TopoDS; + aF : Face from TopoDS; + aCtx:out Context from IntTools) + returns Boolean from Standard; + + AreFacesSameDomain(myclass; + aF1 : Face from TopoDS; + aF2 : Face from TopoDS; + aCtx : out Context from IntTools) + returns Boolean from Standard; + + FindChains(myclass; + aLCS:ListOfCoupleOfShape from NMTTools; + aM :out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools); + + FindChains(myclass; + aM1: IndexedDataMapOfShapeIndexedMapOfShape from NMTTools; + aM2:out IndexedDataMapOfShapeIndexedMapOfShape from NMTTools); + + MakePCurve(myclass; + aE : Edge from TopoDS; + aF : Face from TopoDS; + aC2D: Curve from Geom2d; + aTolR2D: Real from Standard); +--fields + +end Tools; diff --git a/src/NMTTools/NMTTools_Tools.cxx b/src/NMTTools/NMTTools_Tools.cxx new file mode 100644 index 000000000..40cc24aab --- /dev/null +++ b/src/NMTTools/NMTTools_Tools.cxx @@ -0,0 +1,550 @@ +// File: NMTTools_Tools.cxx +// Created: Mon Dec 8 10:35:15 2003 +// Author: Peter KURNEV +// + + +#include + +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static + void ProcessBlock(const Standard_Integer iV, + const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, + TColStd_IndexedMapOfInteger& aProcessed, + TColStd_IndexedMapOfInteger& aChain); +static + void ProcessBlock(const TopoDS_Shape& aF, + const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, + TopTools_IndexedMapOfShape& aProcessed, + TopTools_IndexedMapOfShape& aChain); + +//======================================================================= +// function: MakePCurve +// purpose: +//======================================================================= + void NMTTools_Tools::MakePCurve(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + const Handle(Geom2d_Curve)& aC2Dx, + const Standard_Real aTolR2D) +{ + Standard_Integer k, aNbV; + Standard_Real aTolEdge, aTolFact, aTolV, aTolVmax; + Standard_Real aTFirst, aTLast, aOutFirst, aOutLast, aOutTol; + TopoDS_Face aFFWD; + TopTools_IndexedMapOfShape aVMap; + BRep_Builder aBB; + // + aFFWD=aF; + aFFWD.Orientation(TopAbs_FORWARD); + // + aTolEdge=BRep_Tool::Tolerance(aE); + aTolFact=Max(aTolEdge, aTolR2D); + // + TopExp::MapShapes(aE, TopAbs_VERTEX, aVMap); + // + aTolVmax=-1.; + aNbV=aVMap.Extent(); + for (k=1; k<=aNbV; ++k) { + const TopoDS_Vertex& aV=TopoDS::Vertex(aVMap(k)); + aTolV=BRep_Tool::Tolerance(aV); + if (aTolV>aTolVmax) { + aTolVmax=aTolV; + } + } + // + if (aTolFact>aTolVmax) { + aTolFact=aTolVmax; + } + // + const Handle(Geom_Curve)& aC3DE=BRep_Tool::Curve(aE, aTFirst, aTLast); + Handle(Geom_TrimmedCurve)aC3DETrim=new Geom_TrimmedCurve(aC3DE, aTFirst, aTLast); + // + Handle(Geom2d_Curve) aC2D, aC2DA; + // + aC2D=aC2Dx; + if (aC2D.IsNull()) { + BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aE, aFFWD); + BOPTools_Tools2D::CurveOnSurface(aE, aFFWD, aC2D, aOutFirst, aOutLast, aOutTol, Standard_True); + } + if (aC3DE->IsPeriodic()) { + BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aTFirst, aTLast, aC2D, aC2DA); + } + else { + BOPTools_Tools2D::AdjustPCurveOnFace(aFFWD, aC3DETrim, aC2D, aC2DA); + } + // + aBB.UpdateEdge(aE, aC2DA, aFFWD, aTolFact); + BRepLib::SameParameter(aE); +} + +//======================================================================= +// function: IsSplitInOnFace +// purpose: +//======================================================================= + Standard_Boolean NMTTools_Tools::IsSplitInOnFace(const TopoDS_Edge& aE, + const TopoDS_Face& aF, + IntTools_Context& aContext) +{ + Standard_Boolean bFlag; + Standard_Real aT, aTolE, aTolF, aTol, aDist, aU, aV; + gp_Pnt aP; + gp_Pnt2d aP2D; + // + aTolE=BRep_Tool::Tolerance(aE); + aTolF=BRep_Tool::Tolerance(aF); + aTol=aTolE+aTolF; + // + GeomAPI_ProjectPointOnSurf& aProjector=aContext.ProjPS(aF); + // + aT=BOPTools_Tools2D::IntermediatePoint(aE); + BOPTools_Tools::PointOnEdge(aE, aT, aP); + // + aProjector.Perform(aP); + bFlag=aProjector.IsDone(); + if (!bFlag) { + return bFlag; + } + // + aDist=aProjector.LowerDistance(); + bFlag=(aDist <= aTol); + if (!bFlag) { + return bFlag; + } + // + aProjector.LowerDistanceParameters(aU, aV); + aP2D.SetCoord(aU, aV); + bFlag=aContext.IsPointInOnFace (aF, aP2D); + return bFlag; +} +//======================================================================= +// function: NMTTools_Tools::MakeNewVertex +// purpose : +//======================================================================= + void NMTTools_Tools::MakeNewVertex(const TopTools_ListOfShape& aLVs, + TopoDS_Vertex& aNewVertex) +{ + Standard_Integer aNb; + Standard_Real aTi, aDi, aDmax=-1.e5; + gp_Pnt aPi, aP; + gp_XYZ aXYZ(0.,0.,0.), aXYZi; + TopTools_ListIteratorOfListOfShape anIt; + // + aNb=aLVs.Extent(); + if (!aNb) { + return; + } + // + anIt.Initialize(aLVs); + for (; anIt.More(); anIt.Next()) { + TopoDS_Vertex aVi=TopoDS::Vertex(anIt.Value()); + aPi=BRep_Tool::Pnt(aVi); + aXYZi=aPi.XYZ(); + aXYZ=aXYZ+aXYZi; + } + // + aXYZ.Divide((Standard_Real)aNb); + aP.SetXYZ(aXYZ); + // + anIt.Initialize(aLVs); + for (; anIt.More(); anIt.Next()) { + TopoDS_Vertex aVi=TopoDS::Vertex(anIt.Value()); + aPi=BRep_Tool::Pnt(aVi); + aTi=BRep_Tool::Tolerance(aVi); + aDi=aP.Distance(aPi); + aDi=aDi+aTi; + if (aDi > aDmax) { + aDmax=aDi; + } + } + BRep_Builder aBB; + aBB.MakeVertex (aNewVertex, aP, aDmax); +} +//======================================================================= +// function: FindChains +// purpose : +//======================================================================= + void NMTTools_Tools::FindChains(const BOPTools_CArray1OfSSInterference& FFs, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) +{ + Standard_Boolean bIsTangentFaces; + Standard_Integer j, aNb, anIndex1, anIndex2; + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV; + // + aNb=FFs.Extent(); + for (j=1; j<=aNb; ++j) { + const BOPTools_SSInterference& aFF=FFs(j); + // + bIsTangentFaces=aFF.IsTangentFaces(); + if (!bIsTangentFaces) { + continue; + } + // + aFF.Indices(anIndex1, anIndex2); + // + if (aMCV.Contains(anIndex1)) { + TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex1); + aMV.Add(anIndex1); + aMV.Add(anIndex2); + } + else { + TColStd_IndexedMapOfInteger aMV; + aMV.Add(anIndex1); + aMV.Add(anIndex2); + aMCV.Add(anIndex1, aMV); + } + // + if (aMCV.Contains(anIndex2)) { + TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex2); + aMV.Add(anIndex1); + aMV.Add(anIndex2); + } + else { + TColStd_IndexedMapOfInteger aMV; + aMV.Add(anIndex1); + aMV.Add(anIndex2); + aMCV.Add(anIndex2, aMV); + } + } + NMTTools_Tools::FindChains(aMCV, aMapChains); +} +//======================================================================= +// function: FindChains +// purpose : +//======================================================================= + void NMTTools_Tools::FindChains(const BOPTools_CArray1OfVVInterference& VVs, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) +{ + Standard_Integer j, aNb, anIndex1, anIndex2; + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMCV; + // + aNb=VVs.Extent(); + for (j=1; j<=aNb; ++j) { + const BOPTools_VVInterference& VV=VVs(j); + VV.Indices(anIndex1, anIndex2); + // + if (aMCV.Contains(anIndex1)) { + TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex1); + aMV.Add(anIndex1); + aMV.Add(anIndex2); + } + else { + TColStd_IndexedMapOfInteger aMV; + aMV.Add(anIndex1); + aMV.Add(anIndex2); + aMCV.Add(anIndex1, aMV); + } + // + if (aMCV.Contains(anIndex2)) { + TColStd_IndexedMapOfInteger& aMV=aMCV.ChangeFromKey(anIndex2); + aMV.Add(anIndex1); + aMV.Add(anIndex2); + } + else { + TColStd_IndexedMapOfInteger aMV; + aMV.Add(anIndex1); + aMV.Add(anIndex2); + aMCV.Add(anIndex2, aMV); + } + } + NMTTools_Tools::FindChains(aMCV, aMapChains); +} + +//======================================================================= +// function: FindChains +// purpose : +//======================================================================= + void NMTTools_Tools::FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, + BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapChains) +{ + Standard_Integer i, j, aNbCV, aNbV, iV, iVx; + TColStd_IndexedMapOfInteger aProcessed, aChain; + // + aNbCV=aMCV.Extent(); + for (i=1; i<=aNbCV; ++i) { + iV=aMCV.FindKey(i); + if (aProcessed.Contains(iV)) { + continue; + } + // + aProcessed.Add(iV); + aChain.Add(iV); + // + const TColStd_IndexedMapOfInteger& aMV=aMCV(i); + aNbV=aMV.Extent(); + for (j=1; j<=aNbV; ++j) { + iVx=aMV(j); + ProcessBlock(iVx, aMCV, aProcessed, aChain); + } + aMapChains.Add(i, aChain); + aChain.Clear(); + } +} +//======================================================================= +// function: ProcessBlock +// purpose: +//======================================================================= +void ProcessBlock(const Standard_Integer iV, + const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV, + TColStd_IndexedMapOfInteger& aProcessed, + TColStd_IndexedMapOfInteger& aChain) +{ + Standard_Integer j, aNbV, iVx; + // + if (aProcessed.Contains(iV)) { + return; + } + aProcessed.Add(iV); + aChain.Add(iV); + // + const TColStd_IndexedMapOfInteger& aMV=aMCV.FindFromKey(iV); + aNbV=aMV.Extent(); + for (j=1; j<=aNbV; ++j) { + iVx=aMV(j); + ProcessBlock(iVx, aMCV, aProcessed, aChain); + } +} +//======================================================================= +// function: AreFacesSameDomain +// purpose : +//======================================================================= + Standard_Boolean NMTTools_Tools::AreFacesSameDomain(const TopoDS_Face& aF1x, + const TopoDS_Face& aF2y, + IntTools_Context& aCtx) +{ + Standard_Boolean bFlag; + Standard_Integer i, aNbE1, aNbE2; + + TopTools_IndexedMapOfShape aME1, aME2; + TopoDS_Edge aEF1, aEF2; + TopoDS_Face aF1, aF2; + // + aF1=aF1x; + aF1.Orientation(TopAbs_FORWARD); + aF2=aF2y; + aF2.Orientation(TopAbs_FORWARD); + // + TopExp::MapShapes(aF1, TopAbs_EDGE, aME1); + TopExp::MapShapes(aF2, TopAbs_EDGE, aME2); + // + bFlag=Standard_False; + // + aNbE1=aME1.Extent(); + aNbE2=aME2.Extent(); + // + if(!aNbE1 || !aNbE2){ + return bFlag; + } + // + if(aNbE1!=aNbE2) { + return bFlag; + } + // + for (i=1; i<=aNbE1; ++i) { + const TopoDS_Edge& aE1=TopoDS::Edge(aME1(i)); + if (BRep_Tool::Degenerated(aE1)) { + // not try to compare deg edges because it + // can not have same TShape on different faces at all + continue; + } + if (!aME2.Contains(aE1)) { + return bFlag; + } + } + // + Standard_Real aTolF1, aTolF2, aTol; + gp_Pnt2d aP2D; + gp_Pnt aP; + TopExp_Explorer anExp; + // + aTolF1=BRep_Tool::Tolerance(aF1); + aTolF2=BRep_Tool::Tolerance(aF2); + aTol=aTolF1+aTolF2; + // + anExp.Init(aF1, TopAbs_EDGE); + for (; anExp.More(); anExp.Next()) { + const TopoDS_Edge& aE1=TopoDS::Edge(anExp.Current()); + if (!BRep_Tool::Degenerated(aE1)) { + BOPTools_Tools3D::PointNearEdge(aE1, aF1, aP2D, aP); + bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol); + break; + } + } + return bFlag; + /* + // + Standard_Real aU1, aU2, aV1, aV2; + Standard_Real dU, dV, aU, aV; + Standard_Integer aNbP=5, aNbP1, j; + gp_Pnt2d aP2D; + gp_Pnt aP; + // + aTolF1=BRep_Tool::Tolerance(aF1); + aTolF2=BRep_Tool::Tolerance(aF2); + aTol=aTolF1+aTolF2; + // + BRepTools::UVBounds(aF1, aU1, aU2, aV1, aV2); + Handle(Geom_Surface) aS1=BRep_Tool::Surface(aF1); + // + aNbP1=aNbP+1; + dU=(aU2-aU1)/aNbP1; + dV=(aV2-aV1)/aNbP1; + // + for (i=1; i<=aNbP; ++i) { + aU=aU1+i*dU; + for (j=1; j<=aNbP; ++j) { + aV=aV1+j*dV; + aP2D.SetCoord(aU, aV); + // + if(aCtx.IsPointInFace(aF1, aP2D)) { + aP=aS1->Value(aU, aV); + bFlag=aCtx.IsValidPointForFace(aP, aF2, aTol); + if (!bFlag) { + return bFlag; + } + } + } + } + */ + // + return bFlag; +} +//======================================================================= +// function: FindChains +// purpose : +//======================================================================= + void NMTTools_Tools::FindChains(const NMTTools_ListOfCoupleOfShape& aLCS, + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) +{ + NMTTools_ListIteratorOfListOfCoupleOfShape aItCS; + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMCV; + // + aItCS.Initialize(aLCS); + for (; aItCS.More(); aItCS.Next()) { + const NMTTools_CoupleOfShape& aCS=aItCS.Value(); + // + const TopoDS_Shape& aF1=aCS.Shape1(); + const TopoDS_Shape& aF2=aCS.Shape2(); + // + // + if (aMCV.Contains(aF1)) { + TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF1); + aMV.Add(aF1); + aMV.Add(aF2); + } + else { + TopTools_IndexedMapOfShape aMV; + aMV.Add(aF1); + aMV.Add(aF2); + aMCV.Add(aF1, aMV); + } + // + if (aMCV.Contains(aF2)) { + TopTools_IndexedMapOfShape& aMV=aMCV.ChangeFromKey(aF2); + aMV.Add(aF1); + aMV.Add(aF2); + } + else { + TopTools_IndexedMapOfShape aMV; + aMV.Add(aF1); + aMV.Add(aF2); + aMCV.Add(aF2, aMV); + } + } + NMTTools_Tools::FindChains(aMCV, aMapChains); +} +//======================================================================= +// function: FindChains +// purpose : +//======================================================================= + void NMTTools_Tools::FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, + NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMapChains) +{ + Standard_Integer i, j, aNbCV, aNbV; + TopTools_IndexedMapOfShape aProcessed, aChain; + // + aNbCV=aMCV.Extent(); + for (i=1; i<=aNbCV; ++i) { + const TopoDS_Shape& aF=aMCV.FindKey(i); + if (aProcessed.Contains(aF)) { + continue; + } + // + aProcessed.Add(aF); + aChain.Add(aF); + // + const TopTools_IndexedMapOfShape& aMV=aMCV(i); + aNbV=aMV.Extent(); + for (j=1; j<=aNbV; ++j) { + const TopoDS_Shape& aFx=aMV(j); + ProcessBlock(aFx, aMCV, aProcessed, aChain); + } + aMapChains.Add(aF, aChain); + aChain.Clear(); + } +} +//======================================================================= +// function: ProcessBlock +// purpose: +//======================================================================= +void ProcessBlock(const TopoDS_Shape& aF, + const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aMCV, + TopTools_IndexedMapOfShape& aProcessed, + TopTools_IndexedMapOfShape& aChain) +{ + Standard_Integer j, aNbV; + // + if (aProcessed.Contains(aF)) { + return; + } + aProcessed.Add(aF); + aChain.Add(aF); + // + const TopTools_IndexedMapOfShape& aMV=aMCV.FindFromKey(aF); + aNbV=aMV.Extent(); + for (j=1; j<=aNbV; ++j) { + const TopoDS_Shape& aFx=aMV(j); + ProcessBlock(aFx, aMCV, aProcessed, aChain); + } +} diff --git a/src/NMTTools/NMTTools_Tools.hxx b/src/NMTTools/NMTTools_Tools.hxx new file mode 100644 index 000000000..73236fe90 --- /dev/null +++ b/src/NMTTools/NMTTools_Tools.hxx @@ -0,0 +1,109 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. + +#ifndef _NMTTools_Tools_HeaderFile +#define _NMTTools_Tools_HeaderFile + +#ifndef _Standard_Boolean_HeaderFile +#include +#endif +#ifndef _Handle_Geom2d_Curve_HeaderFile +#include +#endif +#ifndef _Standard_Real_HeaderFile +#include +#endif +class TopTools_ListOfShape; +class TopoDS_Vertex; +class BOPTools_CArray1OfVVInterference; +class BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger; +class BOPTools_CArray1OfSSInterference; +class TopoDS_Edge; +class TopoDS_Face; +class IntTools_Context; +class NMTTools_ListOfCoupleOfShape; +class NMTTools_IndexedDataMapOfShapeIndexedMapOfShape; +class Geom2d_Curve; + + +#ifndef _Standard_HeaderFile +#include +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +class NMTTools_Tools { + +public: + + void* operator new(size_t,void* anAddress) + { + return anAddress; + } + void* operator new(size_t size) + { + return Standard::Allocate(size); + } + void operator delete(void *anAddress) + { + if (anAddress) Standard::Free((Standard_Address&)anAddress); + } + // Methods PUBLIC + // +Standard_EXPORT static void MakeNewVertex(const TopTools_ListOfShape& aLV,TopoDS_Vertex& aNewVertex) ; +Standard_EXPORT static void FindChains(const BOPTools_CArray1OfVVInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ; +Standard_EXPORT static void FindChains(const BOPTools_CArray1OfSSInterference& aVVs,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ; +Standard_EXPORT static void FindChains(const BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCV,BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMCX) ; +Standard_EXPORT static Standard_Boolean IsSplitInOnFace(const TopoDS_Edge& aE,const TopoDS_Face& aF,IntTools_Context& aCtx) ; +Standard_EXPORT static Standard_Boolean AreFacesSameDomain(const TopoDS_Face& aF1,const TopoDS_Face& aF2,IntTools_Context& aCtx) ; +Standard_EXPORT static void FindChains(const NMTTools_ListOfCoupleOfShape& aLCS,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM) ; +Standard_EXPORT static void FindChains(const NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM1,NMTTools_IndexedDataMapOfShapeIndexedMapOfShape& aM2) ; +Standard_EXPORT static void MakePCurve(const TopoDS_Edge& aE,const TopoDS_Face& aF,const Handle(Geom2d_Curve)& aC2D,const Standard_Real aTolR2D) ; + + + + + +protected: + + // Methods PROTECTED + // + + + // Fields PROTECTED + // + + +private: + + // Methods PRIVATE + // + + + // Fields PRIVATE + // + + +}; + + + + + +// other Inline functions and methods (like "C++: function call" methods) +// + + +#endif diff --git a/src/NMTTools/NMTTools_Tools.ixx b/src/NMTTools/NMTTools_Tools.ixx new file mode 100644 index 000000000..80f2f41e7 --- /dev/null +++ b/src/NMTTools/NMTTools_Tools.ixx @@ -0,0 +1,19 @@ +// File generated by CPPExt (Value) +// Copyright (C) 1991,1995 by +// +// MATRA DATAVISION, FRANCE +// +// This software is furnished in accordance with the terms and conditions +// of the contract and with the inclusion of the above copyright notice. +// This software or any other copy thereof may not be provided or otherwise +// be made available to any other person. No title to an ownership of the +// software is hereby transferred. +// +// At the termination of the contract, the software and all copies of this +// software must be deleted. +// +#include + + + + diff --git a/src/NMTTools/NMTTools_Tools.jxx b/src/NMTTools/NMTTools_Tools.jxx new file mode 100644 index 000000000..13f814d4e --- /dev/null +++ b/src/NMTTools/NMTTools_Tools.jxx @@ -0,0 +1,36 @@ +#ifndef _TopTools_ListOfShape_HeaderFile +#include +#endif +#ifndef _TopoDS_Vertex_HeaderFile +#include +#endif +#ifndef _BOPTools_CArray1OfVVInterference_HeaderFile +#include +#endif +#ifndef _BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger_HeaderFile +#include +#endif +#ifndef _BOPTools_CArray1OfSSInterference_HeaderFile +#include +#endif +#ifndef _TopoDS_Edge_HeaderFile +#include +#endif +#ifndef _TopoDS_Face_HeaderFile +#include +#endif +#ifndef _IntTools_Context_HeaderFile +#include +#endif +#ifndef _NMTTools_ListOfCoupleOfShape_HeaderFile +#include +#endif +#ifndef _NMTTools_IndexedDataMapOfShapeIndexedMapOfShape_HeaderFile +#include +#endif +#ifndef _Geom2d_Curve_HeaderFile +#include +#endif +#ifndef _NMTTools_Tools_HeaderFile +#include +#endif diff --git a/src/OBJECT/GEOM_AISShape.cxx b/src/OBJECT/GEOM_AISShape.cxx index 81c83d1d3..e847b2175 100644 --- a/src/OBJECT/GEOM_AISShape.cxx +++ b/src/OBJECT/GEOM_AISShape.cxx @@ -39,15 +39,79 @@ using namespace std; // Open CASCADE Includes #include +#include +#include #include #include #include #include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#include +#include +#include + +static void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, + const Handle(AIS_InteractiveContext)& theIC, + SelectMgr_IndexedMapOfOwner& theMap ) +{ + if ( theObj.IsNull() || theIC.IsNull() ) + return; -#include + TColStd_ListOfInteger modes; + theIC->ActivatedModes( theObj, modes ); + + TColStd_ListIteratorOfListOfInteger itr( modes ); + for (; itr.More(); itr.Next() ) { + int m = itr.Value(); + if ( !theObj->HasSelection( m ) ) + continue; + + Handle(SelectMgr_Selection) sel = theObj->Selection( m ); + + for ( sel->Init(); sel->More(); sel->Next() ) { + Handle(SelectBasics_SensitiveEntity) entity = sel->Sensitive(); + if ( entity.IsNull() ) + continue; + + Handle(SelectMgr_EntityOwner) owner = + Handle(SelectMgr_EntityOwner)::DownCast(entity->OwnerId()); + if ( !owner.IsNull() ) + theMap.Add( owner ); + } + } +} + +static void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap, + const TopoDS_Shape& aMainShape, + const SelectMgr_IndexedMapOfOwner& anAllMap, + SelectMgr_IndexedMapOfOwner& aToHiliteMap ) +{ + TopTools_IndexedMapOfShape aMapOfShapes; + TopExp::MapShapes(aMainShape, aMapOfShapes); + + for ( Standard_Integer i = 1, n = anAllMap.Extent(); i <= n; i++ ) { + Handle(SelectMgr_EntityOwner) anOwner = anAllMap( i ); + if ( anOwner.IsNull() || !anOwner->HasShape() ) + continue; + + const TopoDS_Shape& aSubShape = anOwner->Shape(); + Standard_Integer aSubShapeId = aMapOfShapes.FindIndex( aSubShape ); + if ( !aSubShapeId || !aIndexMap.Contains( aSubShapeId ) ) + continue; + + if ( !aToHiliteMap.Contains( anOwner ) ) + aToHiliteMap.Add( anOwner ); + } +} GEOM_AISShape::GEOM_AISShape(const TopoDS_Shape& shape, const Standard_CString aName): SALOME_AISShape(shape) @@ -68,7 +132,7 @@ Handle(SALOME_InteractiveObject) GEOM_AISShape::getIO(){ } Standard_Boolean GEOM_AISShape::hasIO(){ - return !( myIO == NULL ) ; + return !myIO.IsNull(); } void GEOM_AISShape::setName(const Standard_CString aName) @@ -153,3 +217,34 @@ void GEOM_AISShape::SetShadingColor(const Quantity_Color &aCol) { myShadingColor = aCol; } + +void GEOM_AISShape::highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, + const Standard_Boolean aHighlight ) +{ + Handle(AIS_InteractiveObject) anObj = this; + Handle(AIS_InteractiveContext) anIC = GetContext(); + if ( anIC.IsNull() || !anIC->HasOpenedContext() ) + return; + + Standard_Boolean isAutoHilight = anIC->AutomaticHilight(); + anIC->SetAutomaticHilight( false ); + + anIC->ClearSelected( false ); + + if ( aHighlight ) { + SelectMgr_IndexedMapOfOwner anAllMap, aToHiliteMap; + + // Get entity owners for all activated selection modes + getEntityOwners( anObj, anIC, anAllMap ); + + // Convert into the map of owners to highlight/unhighlight + indicesToOwners( aIndexMap, Shape(), anAllMap, aToHiliteMap ); + + + for ( Standard_Integer i = 1, n = aToHiliteMap.Extent(); i <= n; i++ ) + anIC->AddOrRemoveSelected( aToHiliteMap( i ), false ); + } + + anIC->SetAutomaticHilight( isAutoHilight ); + anIC->HilightSelected( false ); +} diff --git a/src/OBJECT/GEOM_AISShape.hxx b/src/OBJECT/GEOM_AISShape.hxx index d809c0dbb..617c6f9be 100644 --- a/src/OBJECT/GEOM_AISShape.hxx +++ b/src/OBJECT/GEOM_AISShape.hxx @@ -87,6 +87,7 @@ Standard_EXPORT void setIO(const Handle(SALOME_InteractiveObject)& name) ; Standard_EXPORT void setName(const Standard_CString aName) ; Standard_EXPORT Standard_CString getName() ; Standard_EXPORT Handle_SALOME_InteractiveObject getIO() ; +Standard_EXPORT void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ); Standard_EXPORT ~GEOM_AISShape(); Standard_EXPORT void SetTransparency(const Standard_Real aValue); diff --git a/src/OBJECT/GEOM_AISShape.jxx b/src/OBJECT/GEOM_AISShape.jxx index c3d2a67e9..8f66299fd 100644 --- a/src/OBJECT/GEOM_AISShape.jxx +++ b/src/OBJECT/GEOM_AISShape.jxx @@ -38,4 +38,4 @@ #endif #ifndef _Prs3d_Presentation_HeaderFile #include -#endif +#endif \ No newline at end of file diff --git a/src/OBJECT/GEOM_AISTrihedron.cxx b/src/OBJECT/GEOM_AISTrihedron.cxx new file mode 100755 index 000000000..5ca66f7fa --- /dev/null +++ b/src/OBJECT/GEOM_AISTrihedron.cxx @@ -0,0 +1,72 @@ +// GEOM_AISTrihedron : Filter for VTK viewer +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_AISTrihedron.cxx +// Author : Sergey LITONIN +// Module : SALOME + +#include "GEOM_AISTrihedron.hxx" +#include + +IMPLEMENT_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron) +IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISTrihedron, AIS_Trihedron) + +/* + Class : GEOM_AISTrihedron + Description : Interactive object for displaying local CS +*/ + +GEOM_AISTrihedron::GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& thePlc ) +: AIS_Trihedron( thePlc ) +{ + +} +Handle(SALOME_InteractiveObject) GEOM_AISTrihedron::getIO() +{ + return myObject; +} +Standard_Boolean GEOM_AISTrihedron::hasIO() +{ + return !myObject.IsNull(); +} + +Standard_CString GEOM_AISTrihedron::getName() +{ + return myName.ToCString(); +} +void GEOM_AISTrihedron::setName( Standard_CString aName ) +{ + myName = TCollection_AsciiString( aName ); +} + +void GEOM_AISTrihedron::setIO( const Handle(SALOME_InteractiveObject)& theIO ) +{ + myObject = theIO; +} + + + + + + + \ No newline at end of file diff --git a/src/OBJECT/GEOM_AISTrihedron.hxx b/src/OBJECT/GEOM_AISTrihedron.hxx new file mode 100755 index 000000000..bd38a7067 --- /dev/null +++ b/src/OBJECT/GEOM_AISTrihedron.hxx @@ -0,0 +1,81 @@ +// GEOM_AISTrihedron : Filter for VTK viewer +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_AISTrihedron.hxx +// Author : Sergey LITONIN +// Module : SALOME + +#ifndef GEOM_AISTrihedron_HeaderFile +#define GEOM_AISTrihedron_HeaderFile + +#include + +#include +#include +#include + +class Handle(Geom_Axis2Placement); + +DEFINE_STANDARD_HANDLE(GEOM_AISTrihedron, AIS_Trihedron) + +/* + Class : GEOM_AISTrihedron + Description : Interactive object for displaying local CS +*/ + +class GEOM_AISTrihedron : public AIS_Trihedron +{ +public: + + Standard_EXPORT GEOM_AISTrihedron( const Handle(Geom_Axis2Placement)& ); + + Standard_EXPORT Handle(SALOME_InteractiveObject) getIO(); + Standard_EXPORT void setIO( const Handle(SALOME_InteractiveObject)& ); + Standard_EXPORT Standard_Boolean hasIO(); + Standard_EXPORT Standard_CString getName(); + Standard_EXPORT void setName( Standard_CString aName ); + +private: + + TCollection_AsciiString myName; + Handle(SALOME_InteractiveObject) myObject; + +public: + DEFINE_STANDARD_RTTI(GEOM_AISTrihedron) +}; + +#endif + + + + + + + + + + + + + + diff --git a/src/OBJECT/GEOM_Actor.cxx b/src/OBJECT/GEOM_Actor.cxx index dde683ac8..0ebbf32f4 100644 --- a/src/OBJECT/GEOM_Actor.cxx +++ b/src/OBJECT/GEOM_Actor.cxx @@ -26,7 +26,6 @@ // Module : GEOM // $Header$ -using namespace std; /*! \class GEOM_Actor GEOM_Actor.h \brief This class allows to display an OpenCASCADE CAD model in a VTK viewer. @@ -34,10 +33,24 @@ using namespace std; #include "GEOM_Actor.h" +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + // OpenCASCADE Includes #include "GEOM_OCCReader.h" #include +using namespace std; + //------------------------------------------------------------- // Main methods //------------------------------------------------------------- @@ -73,7 +86,7 @@ GEOM_Actor::GEOM_Actor() this->myName = ""; this->HighlightProperty = NULL; - this->ishighlighted = false; + this->myIsHighlighted = false; this->subshape = false; this->myIsInfinite = false; @@ -221,8 +234,8 @@ void GEOM_Actor::Render(vtkRenderer *ren, vtkMapper *Mapper) this->Property->SetSpecularColor(0.99,0.98,0.83); } - if(!ishighlighted) { - if ( ispreselected ) + if(!myIsHighlighted) { + if ( myIsPreselected ) this->Property = PreviewProperty; else if(myDisplayMode >= 1) { // SHADING @@ -314,20 +327,20 @@ void GEOM_Actor::SetColor(float r,float g,float b) { void GEOM_Actor::GetColor(float& r,float& g,float& b) { float color[3]; - ShadingProperty->GetColor(color); - r = color[0]; - g = color[1]; - b = color[2]; + ShadingProperty->GetColor(color); + r = color[0]; + g = color[1]; + b = color[2]; } //------------------------------------------------------------- // Highlight methods //------------------------------------------------------------- -void GEOM_Actor::highlight(Standard_Boolean highlight) { +void GEOM_Actor::highlight(bool highlight) { - if(highlight && !ishighlighted) { - ishighlighted=true; + if(highlight && !myIsHighlighted) { + myIsHighlighted=true; // build highlight property is necessary if(HighlightProperty==NULL) { HighlightProperty = vtkProperty::New(); @@ -344,8 +357,8 @@ void GEOM_Actor::highlight(Standard_Boolean highlight) { } else if (!highlight) { - if(ishighlighted) { - ishighlighted=false; + if(myIsHighlighted) { + myIsHighlighted=false; if(myDisplayMode==1) { //unhilight in shading this->Property = ShadingProperty; @@ -358,11 +371,6 @@ void GEOM_Actor::highlight(Standard_Boolean highlight) { } } -bool GEOM_Actor::hasHighlight() -{ - return true; -} - void GEOM_Actor::SetHighlightProperty(vtkProperty* Prop) { this->HighlightProperty = Prop; } diff --git a/src/OBJECT/GEOM_Actor.h b/src/OBJECT/GEOM_Actor.h index cc6295159..ebd49b780 100644 --- a/src/OBJECT/GEOM_Actor.h +++ b/src/OBJECT/GEOM_Actor.h @@ -35,7 +35,7 @@ #include #include - +class vtkCamera; class TopoDS_Shape; #ifdef _WIN_32 @@ -43,9 +43,8 @@ class TopoDS_Shape; #else #define VTKOCC_EXPORT #endif -class VTKOCC_EXPORT GEOM_Actor : public SALOME_Actor { - +class VTKOCC_EXPORT GEOM_Actor : public SALOME_Actor { public: vtkTypeMacro(GEOM_Actor,SALOME_Actor); @@ -73,11 +72,11 @@ class VTKOCC_EXPORT GEOM_Actor : public SALOME_Actor { void SubShapeOff(); // Display Mode - void setDisplayMode(int); + virtual void setDisplayMode(int); // Highlight - void highlight(Standard_Boolean highlight); - bool hasHighlight(); + virtual void highlight(bool theHighlight); + virtual bool hasHighlight() { return true; } void ShallowCopy(vtkProp *prop); @@ -122,6 +121,8 @@ class VTKOCC_EXPORT GEOM_Actor : public SALOME_Actor { vtkProperty* ShadingProperty; vtkProperty* WireframeProperty; vtkProperty* HighlightProperty; - }; + + #endif //GEOM_ACTOR_H + diff --git a/src/OBJECT/GEOM_InteractiveObject.cxx b/src/OBJECT/GEOM_InteractiveObject.cxx index 892cd143c..00c179a21 100644 --- a/src/OBJECT/GEOM_InteractiveObject.cxx +++ b/src/OBJECT/GEOM_InteractiveObject.cxx @@ -41,34 +41,33 @@ GEOM_InteractiveObject::GEOM_InteractiveObject() myFatherIOR = ""; } -GEOM_InteractiveObject::GEOM_InteractiveObject(const Standard_CString anIOR, - const Standard_CString aFatherIOR, - const Standard_CString aComponentDataType, - const Standard_CString anEntry) +GEOM_InteractiveObject::GEOM_InteractiveObject(const char* anIOR, + const char* aFatherIOR, + const char* aComponentDataType, + const char* anEntry) : SALOME_InteractiveObject(anEntry,aComponentDataType) { - myIOR = new char [strlen(anIOR)+1]; - strcpy( myIOR, anIOR); - myFatherIOR = new char [strlen(aFatherIOR)+1]; - strcpy( myFatherIOR, aFatherIOR); + myIOR = anIOR; + myFatherIOR = aFatherIOR; } -Standard_CString GEOM_InteractiveObject::getIOR(){ - return myIOR; +const char* GEOM_InteractiveObject::getIOR(){ + return myIOR.c_str(); } -Standard_CString GEOM_InteractiveObject::getFatherIOR(){ - return myFatherIOR; + +const char* GEOM_InteractiveObject::getFatherIOR(){ + return myFatherIOR.c_str(); } Standard_Boolean GEOM_InteractiveObject::isSame(const Handle(SALOME_InteractiveObject)& anIO ){ if ( anIO->hasEntry() && this->hasEntry() ) { - if ( strcmp(myEntry, anIO->getEntry() ) == 0 ) + if ( myEntry == anIO->getEntry() ) return Standard_True; } if ( anIO->IsKind(STANDARD_TYPE(GEOM_InteractiveObject))) { Handle(GEOM_InteractiveObject) theIO = Handle(GEOM_InteractiveObject)::DownCast( anIO ); - if ( strcmp(myIOR, theIO->getIOR() ) == 0 ) + if ( myIOR == theIO->getIOR() ) return Standard_True; } diff --git a/src/OBJECT/GEOM_InteractiveObject.hxx b/src/OBJECT/GEOM_InteractiveObject.hxx index a14c40783..93911dfe0 100644 --- a/src/OBJECT/GEOM_InteractiveObject.hxx +++ b/src/OBJECT/GEOM_InteractiveObject.hxx @@ -72,14 +72,14 @@ public: // Methods PUBLIC // Standard_EXPORT GEOM_InteractiveObject(); -Standard_EXPORT GEOM_InteractiveObject(const Standard_CString anIOR, - const Standard_CString aFatherIOR, - const Standard_CString aComponentDataType, - const Standard_CString anEntry = ""); -Standard_EXPORT void setIOR(const Standard_CString anEntry) ; -Standard_EXPORT Standard_CString getIOR() ; -Standard_EXPORT void setFatherIOR(const Standard_CString anEntry) ; -Standard_EXPORT Standard_CString getFatherIOR() ; +Standard_EXPORT GEOM_InteractiveObject(const char* anIOR, + const char* aFatherIOR, + const char* aComponentDataType, + const char* anEntry = ""); +Standard_EXPORT void setIOR(const char* anEntry) ; +Standard_EXPORT const char* getIOR() ; +Standard_EXPORT void setFatherIOR(const char* anEntry) ; +Standard_EXPORT const char* getFatherIOR() ; Standard_EXPORT virtual Standard_Boolean isSame(const Handle(SALOME_InteractiveObject)& anIO) ; Standard_EXPORT ~GEOM_InteractiveObject(); @@ -110,8 +110,8 @@ private: // Fields PRIVATE // -Standard_CString myIOR; -Standard_CString myFatherIOR; +std::string myIOR; +std::string myFatherIOR; }; diff --git a/src/OBJECT/GEOM_OCCReader.cxx b/src/OBJECT/GEOM_OCCReader.cxx index 500fdd356..933c670e9 100644 --- a/src/OBJECT/GEOM_OCCReader.cxx +++ b/src/OBJECT/GEOM_OCCReader.cxx @@ -26,16 +26,20 @@ // Module : GEOM // $Header$ -using namespace std; #include "GEOM_OCCReader.h" -// SALOME Includes -#include "utilities.h" - // VTK Includes -#include "VTKViewer_Common.h" +#include +#include + +#include +#include +#include #include +#include +#include + // OpenCASCADE Includes #include #include @@ -71,6 +75,9 @@ using namespace std; #include #include +#include "utilities.h" + +using namespace std; #define MAX2(X, Y) ( Abs(X) > Abs(Y)? Abs(X) : Abs(Y) ) #define MAX3(X, Y, Z) ( MAX2 ( MAX2(X,Y) , Z) ) diff --git a/src/OBJECT/GEOM_OCCReader.h b/src/OBJECT/GEOM_OCCReader.h index 87247f3ec..e10ce3cda 100644 --- a/src/OBJECT/GEOM_OCCReader.h +++ b/src/OBJECT/GEOM_OCCReader.h @@ -34,8 +34,10 @@ #ifndef GEOM_OCCREADER_H #define GEOM_OCCREADER_H -// VTK -#include "VTKViewer_Common.h" +#include + +class vtkPoints; +class vtkCellArray; // OpenCASCADE #include @@ -50,6 +52,7 @@ #else #define VTKOCC_EXPORT #endif + class VTKOCC_EXPORT GEOM_OCCReader : public vtkPolyDataSource { // methods diff --git a/src/OBJECT/GEOM_VTKTrihedron.cxx b/src/OBJECT/GEOM_VTKTrihedron.cxx new file mode 100644 index 000000000..67e32cedd --- /dev/null +++ b/src/OBJECT/GEOM_VTKTrihedron.cxx @@ -0,0 +1,396 @@ +// SALOME GEOM : +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_VTKTrihedron.cxx +// Author : Sergey LITONIN +// Module : SALOME +// $Header: + +#include "GEOM_VTKTrihedron.hxx" +#include "utilities.h" +#include "GEOM_OCCReader.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "VTKViewer_VectorText.h" + + + +/* + Class : GEOM_VTKTrihedron + Description : Class for displaying axis of trihedron in VTK viewer. + Placement of trihedron is chahged with SetPlacement() method +*/ +class GEOM_VTKTrihedronAxis : public VTKViewer_Axis +{ +protected: + + GEOM_VTKTrihedronAxis(); + GEOM_VTKTrihedronAxis( const GEOM_VTKTrihedronAxis& ); + ~GEOM_VTKTrihedronAxis(); + +public: + + vtkTypeMacro( GEOM_VTKTrihedronAxis, VTKViewer_Axis ); + static GEOM_VTKTrihedronAxis* New(); + + void SetAxis( const gp_Ax1& theAxis, const int theRot, float theColor[ 3 ] ); + virtual void Render( vtkRenderer* theRenderer ); + virtual void SetSize( float theSize ); + gp_Pnt GetOri() const; + void SetColor( const float theColor[ 3 ] ); + +private: + + float myOri[ 3 ]; + vtkMatrix4x4* myMatrix; + vtkTransform* myTrsf; +}; + +vtkStandardNewMacro( GEOM_VTKTrihedronAxis ); + +GEOM_VTKTrihedronAxis::GEOM_VTKTrihedronAxis() +{ + vtkProperty* aProperty = vtkProperty::New(); + aProperty->SetColor( 0.0, 0.0, 1.0 ); + SetProperty( aProperty ); + aProperty->Delete(); + myMatrix = vtkMatrix4x4::New(); + myTrsf = vtkTransform::New(); +} + +GEOM_VTKTrihedronAxis::~GEOM_VTKTrihedronAxis() +{ + myMatrix->Delete(); + myTrsf->Delete(); +} + +void GEOM_VTKTrihedronAxis::SetSize( float theSize ) +{ + float aPosition[ 3 ] = { myOri[ 0 ] + myDir[ 0 ] * theSize, + myOri[ 1 ] + myDir[ 1 ] * theSize, + myOri[ 2 ] + myDir[ 2 ] * theSize }; + + myLineSource->SetPoint1( myOri[ 0 ], myOri[ 1 ], myOri[ 2 ] ); + myLineSource->SetPoint2( aPosition ); + + myArrowActor->SetPosition( 0, 0, 0 ); + myArrowActor->SetOrientation( 0, 0, 0 ); + myArrowActor->SetUserMatrix( 0 ); + + + gp_Trsf aTrsf; + aTrsf.SetDisplacement( gp_Ax3( gp_Pnt( 0, 0, 0 ), gp_Dir( 1, 0, 0 ) ), + gp_Ax3( GetOri(), gp_Dir( myDir[ 0 ], myDir[ 1 ], myDir[ 2 ] ) ) ); + + const gp_XYZ& aTrans = aTrsf.TranslationPart(); + gp_Mat aRot = aTrsf.VectorialPart(); + + for ( int i = 1; i <= 3; i++ ) + for ( int j = 1; j <= 3; j++ ) + myMatrix->SetElement( i - 1, j - 1, aRot( i, j ) ); + + myArrowActor->SetUserMatrix( myMatrix ); + myArrowActor->SetPosition( aPosition ); + + myLabelActor->SetPosition( 0, 0, 0 ); + myLabelActor->AddPosition( aPosition ); +} + +void GEOM_VTKTrihedronAxis::Render(vtkRenderer* theRenderer) +{ + myLineActor->Render( theRenderer ); + myArrowActor->Render( theRenderer ); + myLabelActor->Render( theRenderer ); + + vtkCamera* aCamera = theRenderer->GetActiveCamera(); + SetCamera( aCamera ); +} + +gp_Pnt GEOM_VTKTrihedronAxis::GetOri() const +{ + return gp_Pnt( myOri[ 0 ], myOri[ 1 ], myOri[ 2 ] ); +} + +void GEOM_VTKTrihedronAxis::SetAxis( const gp_Ax1& theAxis, + const int theRot, + float theColor[ 3 ] ) +{ + gp_Pnt aLoc = theAxis.Location(); + gp_Dir aDir = theAxis.Direction(); + + myOri[ 0 ] = aLoc.X(); + myOri[ 1 ] = aLoc.Y(); + myOri[ 2 ] = aLoc.Z(); + + myDir[ 0 ] = aDir.X(); + myDir[ 1 ] = aDir.Y(); + myDir[ 2 ] = aDir.Z(); + + float aColor[ 3 ] = { 0, 0, 0 }; + aColor[ theRot ] = 1; + vtkProperty* aProperty = vtkProperty::New(); + if ( theColor[ 0 ] == -1 ) + aProperty->SetColor( aColor[ 0 ], aColor[ 1 ], aColor[ 2 ] ); + else + aProperty->SetColor( theColor[ 0 ], theColor[ 1 ], theColor[ 2 ] ); + SetProperty( aProperty ); + aProperty->Delete(); + + if ( theRot == 0 ) myVectorText->SetText( "X" ); + else if ( theRot == 1 ) myVectorText->SetText( "Y" ); + else if ( theRot == 2 ) myVectorText->SetText( "Z" ); +} + +void GEOM_VTKTrihedronAxis::SetColor( const float theColor[ 3 ] ) +{ + vtkProperty* aProperty = vtkProperty::New(); + aProperty->SetColor( theColor[ 0 ], theColor[ 1 ], theColor[ 2 ] ); + SetProperty( aProperty ); + aProperty->Delete(); +} + + +/* + Class : GEOM_VTKTrihedron + Description : Class for displaying trihedron of local CS in VTK viewer. + Placement of trihedron is chahged with SetPlacement() method +*/ + +vtkStandardNewMacro( GEOM_VTKTrihedron ); + +GEOM_VTKTrihedron::GEOM_VTKTrihedron() +{ + myMapper = vtkPolyDataMapper::New(); + myAxis[ 0 ] = myAxis[ 1 ] = myAxis[ 2 ] = 0; + myPresent = vtkActorCollection::New(); + mySize = 100; + SetInfinitive( true ); + myColor[ 0 ] = myColor[ 1 ] = myColor[ 1 ] = -1; + SetInfinitive( true ); +} + +GEOM_VTKTrihedron::~GEOM_VTKTrihedron() +{ + myPresent->RemoveAllItems(); + myPresent->Delete(); + for ( int i = 0; i < 3; i++ ) + myAxis[i]->Delete(); + + if ( myMapper ) + myMapper->Delete(); +} + +void GEOM_VTKTrihedron::SetSize( float theSize ) +{ + mySize = theSize; + for ( int i = 0; i < 3; i++ ) + myAxis[i]->SetSize( theSize ); + + + // Calculate new sensitive area + gp_Pnt anOri = ( (GEOM_VTKTrihedronAxis*)myAxis[ 0 ] )->GetOri(); + gp_Pnt aEndX( myLocation.XYZ() + myDirX.XYZ() * mySize ); + gp_Pnt aEndY( myLocation.XYZ() + myDirY.XYZ() * mySize ); + gp_Pnt aEndZ( myLocation.XYZ() + myDirZ.XYZ() * mySize ); + + vtkLineSource* aSrcX = vtkLineSource::New(); + vtkLineSource* aSrcY = vtkLineSource::New(); + vtkLineSource* aSrcZ = vtkLineSource::New(); + + aSrcX->SetPoint1( anOri.X(), anOri.Y(), anOri.Z() ); + aSrcX->SetPoint2( aEndX.X(), aEndX.Y(), aEndX.Z() ); + + aSrcY->SetPoint1( anOri.X(), anOri.Y(), anOri.Z() ); + aSrcY->SetPoint2( aEndY.X(), aEndY.Y(), aEndY.Z() ); + + aSrcZ->SetPoint1( anOri.X(), anOri.Y(), anOri.Z() ); + aSrcZ->SetPoint2( aEndZ.X(), aEndZ.Y(), aEndZ.Z() ); + + vtkAppendPolyData* aRes = vtkAppendPolyData::New(); + aRes->AddInput( aSrcX->GetOutput() ); + aRes->AddInput( aSrcY->GetOutput() ); + aRes->AddInput( aSrcZ->GetOutput() ); + + myMapper->SetInput( aRes->GetOutput() ); + SALOME_Actor::SetMapper( myMapper ); + + aSrcX->Delete(); + aSrcY->Delete(); + aSrcZ->Delete(); + aRes->Delete(); +} + +void GEOM_VTKTrihedron::SetVisibility( VTKViewer_Trihedron::TVisibility theVis ) +{ + for ( int i = 0; i < 3; i++ ) + myAxis[i]->SetVisibility( theVis ); +} + +void GEOM_VTKTrihedron::AddToRender( vtkRenderer* theRenderer ) +{ + vtkCamera* aCamera = theRenderer->GetActiveCamera(); + for(int i = 0; i < 3; i++) + { + myAxis[i]->AddToRender(theRenderer); + myAxis[i]->SetCamera(aCamera); + } + + theRenderer->AddActor( this ); +} + +void GEOM_VTKTrihedron::RemoveFromRender( vtkRenderer* theRenderer ) +{ + myPresent->InitTraversal(); + while(vtkActor* anActor = myPresent->GetNextActor()) + theRenderer->RemoveActor(anActor); +} + +int GEOM_VTKTrihedron::GetVisibleActorCount(vtkRenderer* theRenderer) +{ + vtkActorCollection* aCollection = theRenderer->GetActors(); + aCollection->InitTraversal(); + int aCount = 0; + while( vtkActor* prop = aCollection->GetNextActor() ) + if ( prop->GetVisibility() ) + if ( SALOME_Actor* anActor = SALOME_Actor::SafeDownCast( prop ) ) + if ( !anActor->IsInfinitive() ) + aCount++; + + vtkCamera* aCamera = theRenderer->GetActiveCamera(); + for(int i = 0; i < 3; i++) + myAxis[i]->SetCamera( aCamera ); + + return aCount; +} + +void GEOM_VTKTrihedron::SetCamera( vtkCamera* theCamera ) +{ + for(int i = 0; i < 3; i++) + myAxis[i]->SetCamera( theCamera ); +} + +void GEOM_VTKTrihedron::SetPlacement( const Handle(Geom_Axis2Placement)& thePlc ) +{ + gp_Ax2 anAx2 = thePlc->Ax2(); + + myDirX = anAx2.XDirection(); + myDirY = anAx2.YDirection(); + myDirZ = anAx2.Direction(); + + myLocation = anAx2.Axis().Location(); + + if ( myAxis[ 0 ] != 0 ) myAxis[ 0 ]->Delete(); + if ( myAxis[ 1 ] != 0 ) myAxis[ 1 ]->Delete(); + if ( myAxis[ 2 ] != 0 ) myAxis[ 2 ]->Delete(); + + myAxis[ 0 ] = GEOM_VTKTrihedronAxis::New(); + myAxis[ 1 ] = GEOM_VTKTrihedronAxis::New(); + myAxis[ 2 ] = GEOM_VTKTrihedronAxis::New(); + + ( (GEOM_VTKTrihedronAxis*)myAxis[ 0 ] )->SetAxis( gp_Ax1( myLocation, myDirX ), 0, myColor ); + ( (GEOM_VTKTrihedronAxis*)myAxis[ 1 ] )->SetAxis( gp_Ax1( myLocation, myDirY ), 1, myColor ); + ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->SetAxis( gp_Ax1( myLocation, myDirZ ), 2, myColor ); + + SetSize( mySize ); +} + +vtkMapper* GEOM_VTKTrihedron::GetMapper() +{ + return myMapper; +} + +void GEOM_VTKTrihedron::Render(vtkRenderer* r, vtkMapper *) +{ + ( (GEOM_VTKTrihedronAxis*)myAxis[ 0 ] )->Render( r ); + ( (GEOM_VTKTrihedronAxis*)myAxis[ 1 ] )->Render( r ); + ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->Render( r ); +} + +void GEOM_VTKTrihedron::SetColor( float r, float g, float b ) +{ + myColor[ 0 ] = r; + myColor[ 1 ] = g; + myColor[ 2 ] = b; + + if ( myAxis[ 0 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 0 ] )->SetColor( myColor ); + if ( myAxis[ 1 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 1 ] )->SetColor( myColor ); + if ( myAxis[ 2 ] ) ( (GEOM_VTKTrihedronAxis*)myAxis[ 2 ] )->SetColor( myColor ); +} + +void GEOM_VTKTrihedron::GetColor( float& r, float& g, float& b ) +{ + r = myColor[ 0 ]; + g = myColor[ 1 ]; + b = myColor[ 2 ]; +} + +bool GEOM_VTKTrihedron::IsSetCamera() const +{ + return true; +} + +bool GEOM_VTKTrihedron::IsResizable() const +{ + return true; +} + + + + + + + + + + + + + + + + diff --git a/src/OBJECT/GEOM_VTKTrihedron.hxx b/src/OBJECT/GEOM_VTKTrihedron.hxx new file mode 100644 index 000000000..165fbe8e6 --- /dev/null +++ b/src/OBJECT/GEOM_VTKTrihedron.hxx @@ -0,0 +1,94 @@ +// SALOME GEOM : +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : GEOM_VTKTrihedron.h +// Author : Sergey LITONIN +// Module : SALOME +// $Header: + +#ifndef GEOM_VTKTrihedron_H +#define GEOM_VTKTrihedron_H + +#include +#include "SALOME_Actor.h" +#include "VTKViewer_Trihedron.h" + +class vtkActorCollection; +class vtkRenderer; +class vtkPolyDataMapper; + +/* + Class : GEOM_VTKTrihedron + Description : Class for displaying trihedron of local CS in VTK viewer. + Placement of trihedron is chahged with SetPlacement() method +*/ + +class GEOM_VTKTrihedron : public SALOME_Actor +{ + +protected: + GEOM_VTKTrihedron(); + GEOM_VTKTrihedron( const GEOM_VTKTrihedron& ); + virtual ~GEOM_VTKTrihedron(); + +public: + vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor ); + static GEOM_VTKTrihedron* New(); + + virtual float GetSize() { return mySize;} + + virtual void SetVisibility( VTKViewer_Trihedron::TVisibility theVis ); + virtual void VisibilityOff() { SetVisibility( VTKViewer_Trihedron::eOff ); } + virtual void VisibilityOn() { SetVisibility( VTKViewer_Trihedron::eOn ); } + + virtual void AddToRender( vtkRenderer* theRenderer ); + virtual void RemoveFromRender( vtkRenderer* theRenderer ); + + virtual int GetVisibleActorCount( vtkRenderer* theRenderer ); + + void SetPlacement( const Handle(Geom_Axis2Placement)& ); + + virtual vtkMapper* GetMapper(); + + virtual void Render(vtkRenderer *, vtkMapper *); + virtual bool IsSetCamera() const; + virtual bool IsResizable() const; + virtual void SetSize( float ); + virtual void SetCamera( vtkCamera* ); + + void SetColor( float r, float g, float b ); + void GetColor( float& r, float& g, float& b ); + + virtual bool hasHighlight() { return false; } + +protected: + vtkActorCollection* myPresent; + VTKViewer_Axis* myAxis[3]; + vtkPolyDataMapper* myMapper; + float mySize; + gp_Pnt myLocation; + gp_Dir myDirX, myDirY, myDirZ; + float myColor[ 3 ]; +}; + +#endif diff --git a/src/OBJECT/Makefile.in b/src/OBJECT/Makefile.in index 29da193a2..459e098a8 100644 --- a/src/OBJECT/Makefile.in +++ b/src/OBJECT/Makefile.in @@ -37,8 +37,9 @@ EXPORT_HEADERS = GEOM_Actor.h \ GEOM_AISShape.hxx \ Handle_GEOM_AISShape.hxx \ GEOM_InteractiveObject.hxx \ - Handle_GEOM_InteractiveObject.hxx - + Handle_GEOM_InteractiveObject.hxx \ + GEOM_AISTrihedron.hxx \ + GEOM_VTKTrihedron.hxx # Libraries targets @@ -47,8 +48,10 @@ LIB_SRC = GEOM_Actor.cxx \ GEOM_OCCReader.cxx \ GEOM_AssemblyBuilder.cxx \ GEOM_AISShape.cxx \ - GEOM_InteractiveObject.cxx - + GEOM_InteractiveObject.cxx \ + GEOM_AISTrihedron.cxx \ + GEOM_VTKTrihedron.cxx + LIB_CLIENT_IDL = # Executables targets @@ -57,7 +60,7 @@ BIN_SRC = CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS+=$(PYTHON_LIBS) $(QT_MT_LIBS) $(VTK_LIBS) $(OGL_LIBS) -lSalomeObject -L${KERNEL_ROOT_DIR}/lib/salome +LDFLAGS+=$(QT_MT_LIBS) $(VTK_LIBS) $(OGL_LIBS) $(PYTHON_LIBS) -lSalomeObject -L${KERNEL_ROOT_DIR}/lib/salome %_moc.cxx: %.h $(MOC) $< -o $@ diff --git a/src/OperationGUI/Makefile.in b/src/OperationGUI/Makefile.in index fe9386d87..04a05bbf9 100644 --- a/src/OperationGUI/Makefile.in +++ b/src/OperationGUI/Makefile.in @@ -43,25 +43,28 @@ LIB = libOperationGUI.la LIB_SRC = OperationGUI.cxx \ OperationGUI_ArchimedeDlg.cxx \ OperationGUI_PartitionDlg.cxx \ + OperationGUI_MaterialDlg.cxx \ OperationGUI_FilletDlg.cxx \ - OperationGUI_ChamferDlg.cxx + OperationGUI_ChamferDlg.cxx \ + OperationGUI_ClippingDlg.cxx LIB_MOC = \ - OperationGUI.h \ OperationGUI_ArchimedeDlg.h \ OperationGUI_PartitionDlg.h \ + OperationGUI_MaterialDlg.h \ OperationGUI_FilletDlg.h \ - OperationGUI_ChamferDlg.h + OperationGUI_ChamferDlg.h \ + OperationGUI_ClippingDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lDisplayGUI $(CAS_LDPATH) -lTKFillet +LDFLAGS += $(CAS_LDPATH) -lTKFillet -lGEOMBase @CONCLUDE@ diff --git a/src/OperationGUI/OperationGUI.cxx b/src/OperationGUI/OperationGUI.cxx index 842a5a12f..e784ac282 100644 --- a/src/OperationGUI/OperationGUI.cxx +++ b/src/OperationGUI/OperationGUI.cxx @@ -24,14 +24,13 @@ // File : OperationGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "OperationGUI.h" -#include "DisplayGUI.h" - #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" #include "OCCViewer_Viewer3d.h" #include "OCCViewer_ViewFrame.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" @@ -45,16 +44,29 @@ using namespace std; #include "OperationGUI_FilletDlg.h" // Method FILLET #include "OperationGUI_ChamferDlg.h" // Method CHAMFER +#include "OperationGUI_ClippingDlg.h" + +OperationGUI* OperationGUI::myGUIObject = 0; + +//======================================================================= +// function : GetOperationGUI() +// purpose : Get the only OperationGUI object [ static ] +//======================================================================= +OperationGUI* OperationGUI::GetOperationGUI() +{ + if ( myGUIObject == 0 ) { + // init OperationGUI only once + myGUIObject = new OperationGUI(); + } + return myGUIObject; +} + //======================================================================= // function : OperationGUI() // purpose : Constructor //======================================================================= -OperationGUI::OperationGUI() : - QObject() +OperationGUI::OperationGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -71,385 +83,45 @@ OperationGUI::~OperationGUI() // function : OnGUIEvent() // purpose : //======================================================================= -bool OperationGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) +bool OperationGUI::OnGUIEvent( int theCommandID, QAD_Desktop* parent ) { - OperationGUI* myOperationGUI = new OperationGUI(); - myOperationGUI->myGeomGUI->EmitSignalDeactivateDialog(); - SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - - switch (theCommandID) - { + OperationGUI* myOperationGUI = GetOperationGUI(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + SALOME_Selection* Sel = SALOME_Selection::Selection( + QAD_Application::getDesktop()->getActiveStudy()->getSelection() ); + + switch ( theCommandID ) + { case 503: // PARTITION - { - OperationGUI_PartitionDlg *aDlg = new OperationGUI_PartitionDlg(parent, "", myOperationGUI, Sel); - break; - } + ( new OperationGUI_PartitionDlg( parent, "", Sel ) )->show(); + break; case 504: // ARCHIMEDE - { - OperationGUI_ArchimedeDlg *aDlg = new OperationGUI_ArchimedeDlg(parent, "", myOperationGUI, Sel); - break; - } + new OperationGUI_ArchimedeDlg( parent, Sel ); + break; case 505: // FILLET - { - Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - OperationGUI_FilletDlg *aDlg = new OperationGUI_FilletDlg(parent, "", myOperationGUI, Sel, ic); - break; - } + new OperationGUI_FilletDlg( parent, Sel ); + break; case 506: // CHAMFER - { - Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - OperationGUI_ChamferDlg *aDlg = new OperationGUI_ChamferDlg(parent, "", myOperationGUI, Sel, ic); - break; - } + new OperationGUI_ChamferDlg( parent, Sel ); + break; + case 507: // CLIPPING RANGE + ( new OperationGUI_ClippingDlg( parent, "" ) )->show(); + break; default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } - return true; -} - - -//===================================================================================== -// function : MakePartitionAndDisplay() -// purpose : -//===================================================================================== -void OperationGUI::MakePartitionAndDisplay(const GEOM::GEOM_Gen::ListOfIOR& listShapesIOR, - const GEOM::GEOM_Gen::ListOfIOR& listToolsIOR, - const GEOM::GEOM_Gen::ListOfIOR& listKeepInsIOR, - const GEOM::GEOM_Gen::ListOfIOR& listRemoveInsIOR, - const GEOM::shape_type limit) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->Partition(listShapesIOR, listToolsIOR, - listKeepInsIOR, listRemoveInsIOR, - (CORBA::Short) limit); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(tr("GEOM_PARTITION")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - return; - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } -} - - -//======================================================================= -// function : Archimede() -// purpose : -//======================================================================= -void OperationGUI::Archimede(const Handle(SALOME_InteractiveObject)& IO, const double aWeight, - const double aWaterDensity, const double aMeshingDeflection) -{ - try { - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIO = Handle(GEOM_InteractiveObject)::DownCast(IO); - GEOM::GEOM_Shape_var Shape = myGeom->GetIORFromString(GIO->getIOR()); - - GEOM::GEOM_Shape_var Result = myGeom->Archimede(Shape, aWeight, aWaterDensity, aMeshingDeflection); - Result->NameType(tr("GEOM_PLANE")); - if(myGeomBase->Display(Result)) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - return; - } - if(IO->hasEntry()) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID( IO->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - GEOM::GEOM_Shape_var Shape = myGeom->GetIORFromString(anIOR->Value()); - GEOM::GEOM_Shape_var Result = myGeom->Archimede(Shape, aWeight, aWaterDensity, aMeshingDeflection); - Result->NameType(tr("GEOM_PLANE")); - if (myGeomBase->Display(Result)) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - } - } - } - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } -} - - -//===================================================================================== -// function : OnFilletGetAll() -// purpose : -//===================================================================================== -bool OperationGUI::OnFilletGetAll(const TopoDS_Shape& ShapeTopo, const double Radius, - const int SubShapeType, const char* ShapeTopoIOR) -{ - GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; - ListOfID->length(0); - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR); - if(theObj->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return false; + parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; } - try { - if(Radius <= Precision::Confusion()) - return false; - - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Shape_var result = myGeom->MakeFillet(aShape, Radius, SubShapeType, ListOfID); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return false; - } - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } return true; } - -//===================================================================================== -// function : OnFilletGetSelected() -// purpose : -//===================================================================================== -bool OperationGUI::OnFilletGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, - const double Radius, const int SubShapeType, - Standard_Integer& aLocalContextId, bool& myUseLocalContext) -{ - if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - - if(myUseLocalContext == false) { - /* No local context opened for fillet method */ - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return false; - } - - GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; - ic->InitSelected(); - int nbSelected = ic->NbSelected(); - int i = 0; - ic->InitSelected(); - - while(ic->MoreSelected()) { - TopoDS_Shape s = ic->SelectedShape(); - if(s.ShapeType() == TopAbs_FACE) { - TopExp_Explorer Exp(s, TopAbs_EDGE); - TopTools_MapOfShape M; - while(Exp.More()) { - if(M.Add(Exp.Current())) { /* if a new edge : do not add doublons indices */ - ListOfID->length(i + 1); - ListOfID[i] = myGeomBase->GetIndex(Exp.Current(), ShapeTopo, (int)TopAbs_EDGE); - i++; - } - Exp.Next(); - } - } - else { - ListOfID->length(i + 1); - ListOfID[i] = myGeomBase->GetIndex(ic->SelectedShape(), ShapeTopo, SubShapeType); - i++; - } - ic->NextSelected(); - } - - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Shape_var aResult; - try { - aResult = myGeom->MakeFillet(aShape, Radius, 6, ListOfID); - - /* local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - aResult->NameType(type); - - if(myGeomBase->Display(aResult)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - - if(myUseLocalContext) { - /* local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - } - - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true) ; - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_READY")); - - return true; -} - - -//===================================================================================== -// function : OnChamferGetAll() -// purpose : -//===================================================================================== -bool OperationGUI::OnChamferGetAll(const TopoDS_Shape& ShapeTopo, const double D1, const double D2, const int SubShapeType, const char* ShapeTopoIOR) -{ - GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; - ListOfID->length(0); - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR); - if(theObj->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return false; - } - - try { - if(D1 <= Precision::Confusion()) - return false; - if(D2 <= Precision::Confusion()) - return false; - - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Shape_var result = myGeom->MakeChamfer(aShape, D1, D2, SubShapeType, ListOfID); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return false; - } - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return true; -} - - -//===================================================================================== -// function : OnChamferGetSelected() -// purpose : -//===================================================================================== -bool OperationGUI::OnChamferGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, - const double D1, const double D2, const int SubShapeType, - Standard_Integer& aLocalContextId, bool& myUseLocalContext) -{ - if (QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle (AIS_InteractiveContext) ic = v3d->getAISContext(); - - if(myUseLocalContext == false) { - /* No local context opened for chamfer method */ - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return false; - } - - GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; - ic->InitSelected(); - int nbSelected = ic->NbSelected(); - int i = 0; - ic->InitSelected(); - - while(ic->MoreSelected()) { - TopoDS_Shape s = ic->SelectedShape(); - if (s.ShapeType() == TopAbs_FACE) { - TopExp_Explorer Exp(s, TopAbs_EDGE); - TopTools_MapOfShape M; - while(Exp.More()) { - if(M.Add(Exp.Current())) { /* if a new edge : do not add doublons indices */ - ListOfID->length(i + 1); - ListOfID[i] = myGeomBase->GetIndex(Exp.Current(), ShapeTopo, (int)TopAbs_EDGE); - i++; - } - Exp.Next(); - } - } - else { - ListOfID->length(i + 1); - ListOfID[i] = myGeomBase->GetIndex(ic->SelectedShape(), ShapeTopo, SubShapeType); - i++; - } - ic->NextSelected(); - } - - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Shape_var aResult; - try { - aResult = myGeom->MakeChamfer(aShape, D1, D2, 6, ListOfID); - - /* local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - aResult->NameType(type); - - if(myGeomBase->Display(aResult)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - - if (myUseLocalContext) { - /* local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - } - - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true) ; - QAD_Application::getDesktop()->getActiveStudy()->updateObjBrowser(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_READY")); - - return true; -} - - //===================================================================================== // EXPORTED METHODS //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return OperationGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return OperationGUI::GetOperationGUI(); + } } diff --git a/src/OperationGUI/OperationGUI.h b/src/OperationGUI/OperationGUI.h index c30dc16f7..17786bb80 100644 --- a/src/OperationGUI/OperationGUI.h +++ b/src/OperationGUI/OperationGUI.h @@ -24,55 +24,33 @@ // File : OperationGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef OPERATIONGUI_H #define OPERATIONGUI_H +#include "GEOMGUI.h" #include "GEOMBase.h" //================================================================================= // class : OperationGUI // purpose : //================================================================================= -class OperationGUI : public QObject +class OperationGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + OperationGUI(); // hide constructor to avoid direct creation public : - OperationGUI(); ~OperationGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only OperationGUI object + static OperationGUI* GetOperationGUI(); - void MakePartitionAndDisplay(const GEOM::GEOM_Gen::ListOfIOR& listShapesIOR, - const GEOM::GEOM_Gen::ListOfIOR& listToolsIOR, - const GEOM::GEOM_Gen::ListOfIOR& listKeepInsIOR, - const GEOM::GEOM_Gen::ListOfIOR& listRemoveInsIOR, - const GEOM::shape_type limit ) ; - void Archimede(const Handle(SALOME_InteractiveObject)& IO, const double aWeight, - const double aWaterDensity, const double aMeshingDeflection); - - /* Method for Fillet */ - bool OnFilletGetAll(const TopoDS_Shape& ShapeTopo, const double Radius, - const int SubShapeType, const char* ShapeTopoIOR); - bool OnFilletGetSelected(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, - const double Radius, const int SubShapeType, - Standard_Integer& aLocalContextId, bool& myUseLocalContext); - - /* Methods for Chamfer */ - bool OnChamferGetAll(const TopoDS_Shape& ShapeTopo, const double D1, const double D2, - const int SubShapeType, const char* ShapeTopoIOR); - bool OnChamferGetSelected(const TopoDS_Shape& ShapeTopo, - const char* ShapeTopoIOR, - const double D1, const double D2, const int SubShapeType, - Standard_Integer& aLocalContextId, - bool& myUseLocalContext); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); +private: + static OperationGUI* myGUIObject; // the only OperationGUI object }; #endif diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx index 7e272e91d..26a867ae2 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.cxx @@ -26,10 +26,11 @@ // Module : GEOM // $Header$ -using namespace std; #include "OperationGUI_ArchimedeDlg.h" +#include "DlgRef_1Sel3Spin.h" #include "QAD_Config.h" +#include "QAD_Desktop.h" //================================================================================= // class : OperationGUI_ArchimedeDlg() @@ -38,9 +39,12 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -OperationGUI_ArchimedeDlg::OperationGUI_ArchimedeDlg(QWidget* parent, const char* name, OperationGUI* theOperationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +OperationGUI_ArchimedeDlg::OperationGUI_ArchimedeDlg( QWidget* parent, SALOME_Selection* Sel ) +: GEOMBase_Skeleton( parent, "ArchimedeDlg", Sel, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { + mySelection = Sel; + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_ARCHIMEDE"))); QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); @@ -59,13 +63,13 @@ OperationGUI_ArchimedeDlg::OperationGUI_ArchimedeDlg(QWidget* parent, const cha GroupPoints->TextLabel3->setText(tr("GEOM_WATER_DENSITY")); GroupPoints->TextLabel4->setText(tr("GEOM_MESHING_DEFLECTION")); GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ /* Initialisations */ - myOperationGUI = theOperationGUI; - Init(); + Init( mySelection ); } @@ -83,54 +87,49 @@ OperationGUI_ArchimedeDlg::~OperationGUI_ArchimedeDlg() // function : Init() // purpose : //================================================================================= -void OperationGUI_ArchimedeDlg::Init() +void OperationGUI_ArchimedeDlg::Init( SALOME_Selection* Sel ) { + mySelection = Sel; + /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - myWeight = 100.0; - myWaterDensity = 1.0; - myMeshingDeflection = 0.01; - myOkIO = false; - - /* Get setting of step value from file configuration */ - QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); - + /* Get setting of myStep value from file configuration */ + QString St = QAD_CONFIG->getSetting( "Geometry:SettingsGeomStep" ); + myStep = !St.isEmpty() ? St.toDouble() : 100; double SpecificStep1 = 0.1; double SpecificStep2 = 0.01; - /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); + /* min, max, myStep and decimals for spin boxes & initial values */ + GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, myStep, 3); GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, SpecificStep1, 3); GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, 999.999, SpecificStep2, 3); - GroupPoints->SpinBox_DX->SetValue(myWeight); - GroupPoints->SpinBox_DY->SetValue(myWaterDensity); - GroupPoints->SpinBox_DZ->SetValue(myMeshingDeflection); + GroupPoints->SpinBox_DX->SetValue( 100.0 ); + GroupPoints->SpinBox_DY->SetValue( 1.0 ); + GroupPoints->SpinBox_DZ->SetValue( 0.01 ); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DZ, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + initName( tr( "GEOM_ARCHIMEDE" ) ); + + globalSelection( GEOM_ALLSHAPES ); + + SelectionIntoArgument(); + /* displays Dialog */ GroupPoints->show(); this->show(); - - return; } @@ -140,9 +139,8 @@ void OperationGUI_ArchimedeDlg::Init() //================================================================================= void OperationGUI_ArchimedeDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -150,13 +148,13 @@ void OperationGUI_ArchimedeDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void OperationGUI_ArchimedeDlg::ClickOnApply() +bool OperationGUI_ArchimedeDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if(myOkIO) - myOperationGUI->Archimede(myIO, myWeight, myWaterDensity, myMeshingDeflection); - return; + if ( !onAccept() ) + return false; + + initName(); + return true; } @@ -166,20 +164,22 @@ void OperationGUI_ArchimedeDlg::ClickOnApply() //================================================================================= void OperationGUI_ArchimedeDlg::SelectionIntoArgument() { - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ + myEditCurrentArgument->setText( "" ); + myShape = GEOM::GEOM_Object::_nil(); + + if ( mySelection->IObjectCount() != 1 ) + return; - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - myOkIO = false; + Standard_Boolean testResult = Standard_False; + myShape = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if ( !testResult || myShape->_is_nil() || !GEOMBase::IsShape( myShape ) ) + { + myShape = GEOM::GEOM_Object::_nil(); return; } - else { - myEditCurrentArgument->setText(aString); - myIO = mySelection->firstIObject(); - myOkIO = true; - } - return; + + myEditCurrentArgument->setText( GEOMBase::GetName( myShape ) ); } @@ -199,25 +199,6 @@ void OperationGUI_ArchimedeDlg::LineEditReturnPressed() return; } - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void OperationGUI_ArchimedeDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - this->SelectionIntoArgument(); - } - - return; -} - - //================================================================================= // function : ActivateThisDialog() // purpose : @@ -225,6 +206,7 @@ void OperationGUI_ArchimedeDlg::SetEditCurrentArgument() void OperationGUI_ArchimedeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); return; } @@ -244,19 +226,40 @@ void OperationGUI_ArchimedeDlg::enterEvent(QEvent* e) //================================================================================= -// function : ValueChangedInSpinBox() +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr OperationGUI_ArchimedeDlg::createOperation() +{ + return getGeomEngine()->GetILocalOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool OperationGUI_ArchimedeDlg::isValid( QString& ) +{ + return !myShape->_is_nil(); +} + +//================================================================================= +// function : execute // purpose : //================================================================================= -void OperationGUI_ArchimedeDlg::ValueChangedInSpinBox(double newValue) +bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects ) { - QObject* send = (QObject*)sender(); + GEOM::GEOM_Object_var anObj; - if(send == GroupPoints->SpinBox_DX) - myWeight = newValue; - else if(send == GroupPoints->SpinBox_DY) - myWaterDensity = newValue; - else if(send == GroupPoints->SpinBox_DZ) - myMeshingDeflection = newValue; + double aWeight = GroupPoints->SpinBox_DX->GetValue(); + double aWaterDensity = GroupPoints->SpinBox_DY->GetValue(); + double aMeshDeflection = GroupPoints->SpinBox_DZ->GetValue(); + + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection ); - return; + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } diff --git a/src/OperationGUI/OperationGUI_ArchimedeDlg.h b/src/OperationGUI/OperationGUI_ArchimedeDlg.h index a9a14a1fe..b11b6fd8d 100644 --- a/src/OperationGUI/OperationGUI_ArchimedeDlg.h +++ b/src/OperationGUI/OperationGUI_ArchimedeDlg.h @@ -30,11 +30,8 @@ #define DIALOGBOX_ARCHIMEDE_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel3Spin.h" -#include "OperationGUI.h" - -//#include "SALOME_InteractiveObject.hxx" +class DlgRef_1Sel3Spin; //================================================================================= // class : OperationGUI_ArchimedeDlg @@ -45,34 +42,33 @@ class OperationGUI_ArchimedeDlg : public GEOMBase_Skeleton Q_OBJECT public: - OperationGUI_ArchimedeDlg(QWidget* parent = 0, const char* name = 0, OperationGUI* theOperationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~OperationGUI_ArchimedeDlg(); - -private: - void Init(); - void enterEvent(QEvent* e); + OperationGUI_ArchimedeDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~OperationGUI_ArchimedeDlg(); - double step; +protected: - OperationGUI* myOperationGUI; + // redefined from GEOMBase_Helper + + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); - Handle(SALOME_InteractiveObject) myIO; - Standard_Real myWeight; - Standard_Real myWaterDensity; - Standard_Real myMeshingDeflection; - bool myOkIO; +private: + void Init( SALOME_Selection* ); + void enterEvent(QEvent* e); - DlgRef_1Sel3Spin* GroupPoints; +private: + GEOM::GEOM_Object_var myShape; + DlgRef_1Sel3Spin* GroupPoints; + double myStep; private slots: - void ClickOnOk(); - void ClickOnApply(); - void ActivateThisDialog(); - void LineEditReturnPressed(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); - + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); }; #endif // DIALOGBOX_ARCHIMEDE_H diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.cxx b/src/OperationGUI/OperationGUI_ChamferDlg.cxx index b4a171f40..856d941d1 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.cxx +++ b/src/OperationGUI/OperationGUI_ChamferDlg.cxx @@ -24,62 +24,126 @@ // File : OperationGUI_ChamferDlg.cxx // Author : Damien COQUERET // Module : GEOM + // $Header$ -using namespace std; #include "OperationGUI_ChamferDlg.h" +#include "DlgRef_SpinBox.h" +#include "QAD_Desktop.h" +#include "qpixmap.h" +#include -#include "DisplayGUI.h" -#include "QAD_MessageBox.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include +#include "GEOMImpl_Types.hxx" //================================================================================= // class : OperationGUI_ChamferDlg() -// purpose : Constructs a OperationGUI_ChamferDlg which is a child of 'parent', with the +// purpose : Constructs a OperationGUI_ChamferDlg 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. //================================================================================= -OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(QWidget* parent, const char* name, OperationGUI* theOperationGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +OperationGUI_ChamferDlg::OperationGUI_ChamferDlg( QWidget* parent, SALOME_Selection* Sel ) +: GEOMBase_Skeleton(parent, "ChamferDlg", Sel, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_ALL"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_EDGE"))); - QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_FACE"))); - QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - setCaption(tr("GEOM_CHAMFER_TITLE")); + mySelection = Sel; + myConstructorId = -1; + + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_ALL"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_EDGE"))); + QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_FACE"))); + QPixmap iconSelect(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption( tr( "GEOM_CHAMFER_TITLE" ) ); + + GroupConstructors->setTitle( tr( "GEOM_CHAMFER" ) ); + + RadioButton1->setPixmap( image1 ); + RadioButton2->setPixmap( image2 ); + RadioButton3->setPixmap( image3 ); + + // Create first group + + myGrp1 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_ALL" ), this ); + + QGroupBox* aSelGrp1 = new QGroupBox( 3, Qt::Horizontal, myGrp1 ); + aSelGrp1->setFrameStyle( QFrame::NoFrame ); + aSelGrp1->setInsideMargin( 0 ); + + createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp1, MainObj1 ); + + QGroupBox* aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp1 ); + aSpinGrp->setFrameStyle( QFrame::NoFrame ); + aSpinGrp->setInsideMargin( 0 ); + + new QLabel( tr( "D" ), aSpinGrp ); + mySpinBox[ SpinBox1 ] = new DlgRef_SpinBox( aSpinGrp ); + + ( new QFrame( myGrp1 ) )->setSizePolicy( + QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + + // Create second group + + myGrp2 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_EDGES" ), this ); + + QGroupBox* aSelGrp2 = new QGroupBox( 3, Qt::Horizontal, myGrp2 ); + aSelGrp2->setFrameStyle( QFrame::NoFrame ); + aSelGrp2->setInsideMargin( 0 ); + + createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp2, MainObj2 ); + createSelWg( tr( "FACE_1" ), iconSelect, aSelGrp2, Face1 ); + createSelWg( tr( "FACE_2" ), iconSelect, aSelGrp2, Face2 ); + + aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp2 ); + aSpinGrp->setFrameStyle( QFrame::NoFrame ); + aSpinGrp->setInsideMargin( 0 ); + + new QLabel( tr( "GEOM_D1" ), aSpinGrp ); + mySpinBox[ SpinBox21 ] = new DlgRef_SpinBox( aSpinGrp ); - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_CHAMFER")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->setPixmap(image2); + new QLabel( tr( "GEOM_D2" ), aSpinGrp ); + mySpinBox[ SpinBox22 ] = new DlgRef_SpinBox( aSpinGrp ); - Group1 = new DlgRef_1Sel2Spin(this, "Group1"); - Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_ALL")); - Group1->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); - Group1->TextLabel2->setText(tr("GEOM_D1")); - Group1->TextLabel3->setText(tr("GEOM_D2")); - Group1->PushButton1->setPixmap(image3); + // Create third group - Layout1->addWidget(Group1, 1, 0); - /***************************************************************/ + myGrp3 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_FACES" ), this ); + + QGroupBox* aSelGrp3 = new QGroupBox( 3, Qt::Horizontal, myGrp3 ); + aSelGrp3->setFrameStyle( QFrame::NoFrame ); + aSelGrp3->setInsideMargin( 0 ); + + createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp3, MainObj3 ); + createSelWg( tr( "SELECTED_FACES" ), iconSelect, aSelGrp3, Faces ); + + aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp3 ); + aSpinGrp->setFrameStyle( QFrame::NoFrame ); + aSpinGrp->setInsideMargin( 0 ); + + new QLabel( tr( "GEOM_D1" ), aSpinGrp ); + mySpinBox[ SpinBox31 ] = new DlgRef_SpinBox( aSpinGrp ); + + new QLabel( tr( "GEOM_D2" ), aSpinGrp ); + mySpinBox[ SpinBox32 ] = new DlgRef_SpinBox( aSpinGrp ); + + ( new QLabel( myGrp3 ) )->setSizePolicy( + QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + + // Add groups to layout + + Layout1->addWidget( myGrp1, 2, 0 ); + Layout1->addWidget( myGrp2, 2, 0 ); + Layout1->addWidget( myGrp3, 2, 0 ); + + // Set range of spinboxes + + double SpecificStep = 10.0; + QMap< int, DlgRef_SpinBox* >::iterator anIter; + for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter ) + anIter.data()->RangeStepAndValidator( 0.001, 999.999, SpecificStep, 3 ); /* Initialisations */ - myOperationGUI = theOperationGUI; - Init(ic); + Init( mySelection ); } @@ -88,8 +152,7 @@ OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(QWidget* parent, const char* na // purpose : Destroys the object and frees any allocated resources //================================================================================= OperationGUI_ChamferDlg::~OperationGUI_ChamferDlg() -{ - /* no need to delete child widgets, Qt does it all for us */ +{ } @@ -97,51 +160,53 @@ OperationGUI_ChamferDlg::~OperationGUI_ChamferDlg() // function : Init() // purpose : //================================================================================= -void OperationGUI_ChamferDlg::Init(Handle (AIS_InteractiveContext) ic) +void OperationGUI_ChamferDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myConstructorId = 0; - myEditCurrentArgument = Group1->LineEdit1; + mySelection = Sel; + myConstructorId = -1; + reset(); + RadioButton1->setChecked( true ); + myEditCurrentArgument = mySelName[ MainObj1 ]; - myD1 = 5.0; - myD2 = 5.0; - myOkShape = false; - myIC = ic; - myLocalContextId = -1; - myUseLocalContext = false; + /* signals and slots connections */ - double SpecificStep = 10.0; - /* min, max, step and decimals for spin boxes */ - Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); - Group1->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); + // main buttons + connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); - Group1->SpinBox_DX->SetValue(myD1); - Group1->SpinBox_DY->SetValue(myD2); + // group box + connect( GroupConstructors, SIGNAL( clicked( int ) ), + this, SLOT( ConstructorsClicked( int ) ) ); - /* signals and slots connections */ - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); - connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); - connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + // push buttons + QMap< int, QPushButton* >::iterator anIterBtn; + for ( anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn ) + connect( anIterBtn.data(), SIGNAL( clicked() ), + this, SLOT( SetEditCurrentArgument() ) ); - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + // line edits + QMap< int, QLineEdit* >::iterator anIterLE2; + for ( anIterLE2 = mySelName.begin(); anIterLE2 != mySelName.end(); ++anIterLE2 ) + connect( anIterLE2.data(), SIGNAL( returnPressed() ), + this, SLOT( LineEditReturnPressed() ) ); - connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + // spin boxes + QMap< int, DlgRef_SpinBox* >::iterator anIterSpin; + for ( anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin ) + connect( anIterSpin.data(), SIGNAL( valueChanged( double ) ), + this, SLOT( ValueChangedInSpinBox( double ) ) ); - connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(Group1->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DY, SLOT(SetStep(double))); + // selection + connect( mySelection, SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + initName( tr( "GEOM_CHAMFER" ) ); - /* displays Dialog */ - Group1->show(); - this->show(); + myGrp2->hide(); + myGrp3->hide(); + myGrp1->show(); - return; + this->show(); } @@ -149,54 +214,77 @@ void OperationGUI_ChamferDlg::Init(Handle (AIS_InteractiveContext) ic) // function : ConstructorsClicked() // purpose : Radio button management //================================================================================= -void OperationGUI_ChamferDlg::ConstructorsClicked(int constructorId) +void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId ) { + // Activate next widget + if ( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC ) + { + RadioButton1->setChecked( true ); + return; + } + + if ( myConstructorId == constructorId ) + return; + + // Get values from previous widget + double D1 = 5, D2 = 5; + if ( myConstructorId == 0 ) + D1 = D2 = mySpinBox[ SpinBox1 ]->GetValue(); + else if ( myConstructorId == 1 ) + { + D1 = mySpinBox[ SpinBox21 ]->GetValue(); + D2 = mySpinBox[ SpinBox22 ]->GetValue(); + } + else if ( myConstructorId == 2 ) + { + D1 = mySpinBox[ SpinBox31 ]->GetValue(); + D2 = mySpinBox[ SpinBox32 ]->GetValue(); + } + myConstructorId = constructorId; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - disconnect(mySelection, 0, this, 0); - myOkShape = false; - myD1 = 5.0; - myD2 = 5.0; - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - myUseLocalContext = false; + + switch ( constructorId ) + { + case 0: + myGrp1->show(); + myGrp2->hide(); + myGrp3->hide(); + mySpinBox[ SpinBox1 ]->SetValue( D1 ); + break; + case 1: + myGrp1->hide(); + myGrp2->show(); + myGrp3->hide(); + mySpinBox[ SpinBox21 ]->SetValue( D1 ); + mySpinBox[ SpinBox22 ]->SetValue( D2 ); + break; + case 2: + myGrp1->hide(); + myGrp2->hide(); + myGrp3->show(); + mySpinBox[ SpinBox31 ]->SetValue( D1 ); + mySpinBox[ SpinBox32 ]->SetValue( D2 ); + break; + default: + break; } - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) { - myConstructorId = constructorId = 0; //No subshape selection if viewer is not OCC - RadioButton1->setChecked(TRUE); + if ( constructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ]; + else if ( constructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ]; + else myEditCurrentArgument = mySelName[ MainObj3 ]; + + activateSelection(); + enableWidgets(); + + if ( !myShape->_is_nil() ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( myShape ) ); + GEOMBase_Skeleton::LineEditReturnPressed(); } + else + myEditCurrentArgument->setText( "" ); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - Group1->LineEdit1->setText(""); - Group1->SpinBox_DX->SetValue(myD1); - Group1->SpinBox_DY->SetValue(myD2); - switch (constructorId) - { - case 0: /* Chamfer All */ - { - Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_ALL")); - myShapeType = -1; - break; - } - case 1: /* Chamfer edges */ - { - Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_EDGES")); - myShapeType = 6; - break; - } - case 2: /* Chamfer Faces */ - { - Group1->GroupBox1->setTitle(tr("GEOM_CHAMFER_FACES")); - myShapeType = 4; - break; - } - } - return; + displayPreview(); } @@ -206,69 +294,21 @@ void OperationGUI_ChamferDlg::ConstructorsClicked(int constructorId) //================================================================================= void OperationGUI_ChamferDlg::ClickOnOk() { - this->ClickOnApply(); - this->ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } - //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void OperationGUI_ChamferDlg::ClickOnApply() +bool OperationGUI_ChamferDlg::ClickOnApply() { - buttonApply->setFocus(); - QApplication::setOverrideCursor(Qt::waitCursor); - QAD_Application::getDesktop()->putInfo(tr("")); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - bool testResult = false; - switch(myConstructorId) - { - case 0 : /* Chamfer All */ - { - if(myOkShape) - testResult = myOperationGUI->OnChamferGetAll(myShape, myD1, myD2, myShapeType, myShapeIOR); - break; - } - case 1 : /* Chamfer Edge */ - { - if(myOkShape) - testResult = myOperationGUI->OnChamferGetSelected(myShape, myShapeIOR, myD1, myD2, myShapeType, - myLocalContextId, myUseLocalContext); - break; - } - case 2 : /* Chamfer Face */ - { - if(myOkShape) - testResult = myOperationGUI->OnChamferGetSelected(myShape, myShapeIOR, myD1, myD2, myShapeType, - myLocalContextId, myUseLocalContext); - break; - } - } - - if(!testResult) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - /* Reset all arguments and local context to allow user a new selection ...*/ - this->ResetStateOfDialog(); - QApplication::restoreOverrideCursor(); - return; -} + if ( !onAccept() ) + return false; - -//================================================================================= -// function : ClickOnCancel() -// purpose : -//================================================================================= -void OperationGUI_ChamferDlg::ClickOnCancel() -{ - this->ResetStateOfDialog(); - GEOMBase_Skeleton::ClickOnCancel(); - return; + initName(); + return true; } @@ -278,77 +318,141 @@ void OperationGUI_ChamferDlg::ClickOnCancel() //================================================================================= void OperationGUI_ChamferDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myEditCurrentArgument->setText(""); - this->ResetStateOfDialog(); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel == 1) { - TopoDS_Shape S; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - if(!IO->hasEntry()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return; + erasePreview(); + myEditCurrentArgument->setText( "" ); + + // Get index of current selection focus + int aCurrFocus = -1; + QMap< int, QLineEdit* >::iterator anIter; + for ( anIter = mySelName.begin(); anIter != mySelName.end(); ++anIter ) + if ( myEditCurrentArgument == anIter.data() ) + { + aCurrFocus = anIter.key(); + break; } - if(!S.IsNull() && S.ShapeType() <= 2) { - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IO); - myShapeIOR = GIObject->getIOR(); /* the Geom IOR string of selection */ - myEditCurrentArgument->setText(aString); - myShape = S; - myOkShape = true; + // If selection of main object is activated + if ( aCurrFocus == MainObj1 || aCurrFocus == MainObj2 || aCurrFocus == MainObj3 ) + { + if ( mySelection->IObjectCount() == 1 ) + { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) + { + myShape = anObj; + mySelName[ aCurrFocus ]->setText( GEOMBase::GetName( anObj ) ); + displayPreview(); + enableWidgets(); + return; } - - if(IO->hasEntry()) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - myShapeIOR = anIOR->Value(); - myOkShape = true; - myShape = S; - myEditCurrentArgument->setText(aString); - } - } + } + + myShape = GEOM::GEOM_Object::_nil(); + enableWidgets(); + } + // If face selection of second tab is activated + else if ( aCurrFocus == Face1 || aCurrFocus == Face2 ) + { + if ( mySelection->IObjectCount() == 1 ) + { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) + { + TColStd_IndexedMapOfInteger anIndexes; + mySelection->GetIndex( mySelection->firstIObject(), anIndexes ); + + if ( anIndexes.Extent() == 1 ) + { + int anIndex = anIndexes( 1 ); + QString aFaceName = QString( GEOMBase::GetName( anObj ) ) + ":%1"; + myEditCurrentArgument->setText( aFaceName.arg( anIndex ) ); + myFace[ aCurrFocus ] = anIndex; + displayPreview(); + return; + } } } - if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0) - this->MakePreview(); + myFace[ aCurrFocus ] = -1; } - else - return; - - if(myOkShape && myShapeType!=-1 && myConstructorId != 0) { - /* local context is defined into the method */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelection(myShapeType, myLocalContextId); - myUseLocalContext = true; + // If face selection of third tab is activated + else if ( aCurrFocus == Faces ) + { + if ( mySelection->IObjectCount() == 1 ) + { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) + { + TColStd_IndexedMapOfInteger anIndexes; + mySelection->GetIndex( mySelection->firstIObject(), anIndexes ); + + if ( anIndexes.Extent() > 0 ) + { + QString aFaceName; + if ( anIndexes.Extent() == 1 ) + { + int anIndex = anIndexes( 1 ); + + aFaceName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex ); + } + else + aFaceName = tr( "GEOM_MEN_POPUP_NAME" ).arg( anIndexes.Extent() ); + + myEditCurrentArgument->setText( aFaceName ); + myFaces = anIndexes; + displayPreview(); + return; + } + } + } + myFaces.Clear(); } } +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void OperationGUI_ChamferDlg::LineEditReturnPressed() +{ + QLineEdit* aSender = ( QLineEdit* )sender(); + + QMap< int, QLineEdit* >::iterator anIterLE; + for ( anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE ) + if ( anIterLE.data() == aSender ) + myEditCurrentArgument = anIterLE.data(); + + GEOMBase_Skeleton::LineEditReturnPressed(); +} + + //================================================================================= // function : SetEditCurrentArgument() // purpose : //================================================================================= void OperationGUI_ChamferDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); + QPushButton* aSender = ( QPushButton* )sender(); - if(send == Group1->PushButton1) - Group1->LineEdit1->setFocus(); + QMap< int, QPushButton* >::iterator anIter; + for ( anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter ) + if ( anIter.data() == aSender ) + { + mySelName[ anIter.key() ]->setFocus(); + myEditCurrentArgument = mySelName[ anIter.key() ]; + } - this->SelectionIntoArgument(); - return; + activateSelection(); } @@ -358,9 +462,8 @@ void OperationGUI_ChamferDlg::SetEditCurrentArgument() //================================================================================= void OperationGUI_ChamferDlg::DeactivateActiveDialog() { - this->ResetStateOfDialog(); + // disconnect selection GEOMBase_Skeleton::DeactivateActiveDialog(); - return; } @@ -371,10 +474,12 @@ void OperationGUI_ChamferDlg::DeactivateActiveDialog() void OperationGUI_ChamferDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + connect( mySelection, SIGNAL(currentSelectionChanged()), + this, SLOT( SelectionIntoArgument() ) ); + + activateSelection(); + displayPreview(); } @@ -384,113 +489,213 @@ void OperationGUI_ChamferDlg::ActivateThisDialog() //================================================================================= void OperationGUI_ChamferDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + this->ActivateThisDialog(); } //================================================================================= -// function : closeEvent() +// function : ValueChangedInSpinBox() // purpose : //================================================================================= -void OperationGUI_ChamferDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - this->ClickOnCancel(); - return; +void OperationGUI_ChamferDlg::ValueChangedInSpinBox( double newValue ) +{ + displayPreview(); } //================================================================================= -// function : ValueChangedInSpinBox() +// function : createSelWg() // purpose : //================================================================================= -void OperationGUI_ChamferDlg::ValueChangedInSpinBox(double newValue) +void OperationGUI_ChamferDlg::createSelWg( const QString& theLbl, + QPixmap& thePix, + QWidget* theParent, + const int theId ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + new QLabel( theLbl, theParent ); + mySelBtn[ theId ] = new QPushButton( theParent ); + mySelBtn[ theId ]->setPixmap( thePix ); + mySelName[ theId ] = new QLineEdit( theParent ); + mySelName[ theId ]->setReadOnly( true ); +} - QObject* send = (QObject*)sender(); - if(send == Group1->SpinBox_DX) /* D1 */ - myD1 = newValue; - else if(send == Group1->SpinBox_DY) /* D2 */ - myD2 = newValue; +//================================================================================= +// function : reset() +// purpose : +//================================================================================= +void OperationGUI_ChamferDlg::reset() +{ + // Set Initial values of spinboxes + QMap< int, DlgRef_SpinBox* >::iterator anIter; + for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter ) + anIter.data()->SetValue( 5 ); - if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0) - this->MakePreview(); + // clear line edits + QMap< int, QLineEdit* >::iterator anIterLE; + for ( anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE ) + anIterLE.data()->setText( "" ); - return; -} + // constructor id + int aConstructorId = getConstructorId(); + if ( aConstructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ]; + else if ( aConstructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ]; + else myEditCurrentArgument = mySelName[ MainObj3 ]; + + myShape = GEOM::GEOM_Object::_nil(); + + myFaces.Clear(); + myFace[ Face1 ] = -1; + myFace[ Face2 ] = -1; + + erasePreview( true ); + + activateSelection(); + + enableWidgets(); +} //================================================================================= -// function : ResetStateOfDialog() +// function : getConstructorId() // purpose : //================================================================================= -void OperationGUI_ChamferDlg::ResetStateOfDialog() +int OperationGUI_ChamferDlg::getConstructorId() const +{ + return GroupConstructors->id( GroupConstructors->selected() ); +} + +//================================================================================= +// function : activateSelection +// purpose : Activate selection in accordance with myEditCurrentArgument +//================================================================================= +void OperationGUI_ChamferDlg::activateSelection() { - myOkShape = false; - myEditCurrentArgument->setText(""); - QApplication::restoreOverrideCursor(); - - /* Close its local contact if opened */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); + if ( !myShape->_is_nil() && + ( myEditCurrentArgument == mySelName[ Face1 ] || + myEditCurrentArgument == mySelName[ Face2 ] || + myEditCurrentArgument == mySelName[ Faces ] ) ) + localSelection( myShape, TopAbs_FACE ); + else + { + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_SHELL ); + aMap.Add( GEOM_SOLID ); + aMap.Add( GEOM_COMPOUND ); + globalSelection( aMap ); } - return; + + SelectionIntoArgument(); } +//================================================================================= +// function : enableWidgets +// purpose : Enable widgets of faces in accordance with value of main object +//================================================================================= +void OperationGUI_ChamferDlg::enableWidgets() +{ + int anId = getConstructorId(); + + bool toEnable = !myShape->_is_nil(); + + if ( anId == 1 ) + { + mySelName[ Face1 ]->setEnabled( toEnable ); + mySelName[ Face2 ]->setEnabled( toEnable ); + mySelBtn[ Face1 ]->setEnabled( toEnable ); + mySelBtn[ Face2 ]->setEnabled( toEnable ); + + if ( !toEnable ) + { + mySelName[ Face1 ]->setText( "" ); + mySelName[ Face2 ]->setText( "" ); + myFace[ Face1 ] = -1; + myFace[ Face2 ] = -1; + } + } + else if ( anId == 2 ) + { + mySelName[ Faces ]->setEnabled( toEnable ); + + if ( !toEnable ) + myFaces.Clear(); + } +} //================================================================================= -// function : MakePreview() +// function : createOperation // purpose : //================================================================================= -void OperationGUI_ChamferDlg::MakePreview() +GEOM::GEOM_IOperations_ptr OperationGUI_ChamferDlg::createOperation() { - QApplication::setOverrideCursor(Qt::waitCursor); - TopoDS_Shape tds; - - try { - BRepFilletAPI_MakeChamfer MC(myShape); - switch(myConstructorId) - { - case 0: /* Chamfer All */ - { - TopTools_IndexedDataMapOfShapeListOfShape M; - TopExp::MapShapesAndAncestors(myShape, TopAbs_EDGE, TopAbs_FACE, M); - for(int i = 1; i <= M.Extent(); i++) { - TopoDS_Edge E = TopoDS::Edge(M.FindKey(i)); - TopoDS_Face F = TopoDS::Face(M.FindFromIndex(i).First()); - if(!BRepTools::IsReallyClosed(E, F) && !BRep_Tool::Degenerated(E)) - MC.Add(myD1, myD2, E, F); - } - tds = MC.Shape(); - break; - } - // case 1: /* Chamfer edges */ - // case 2: /* Chamfer Faces */ - } + return getGeomEngine()->GetILocalOperations( getStudyId() ); +} - if(!tds.IsNull()) { - mySimulationTopoDs = tds; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } +//================================================================================= +// function : ClickOnApply() +// purpose : Verify validity of input data +//================================================================================= +bool OperationGUI_ChamferDlg::isValid( QString& ) +{ + switch ( getConstructorId() ) + { + case 0: return !myShape->_is_nil(); + case 1: return !myShape->_is_nil() && myFace[ Face1 ] > 0 && myFace[ Face2 ] > 0; + case 2: return !myShape->_is_nil() && myFaces.Extent() > 0; + default: return false; } - catch(Standard_Failure) { - QApplication::restoreOverrideCursor(); - QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_CHAMFER_ABORT").arg(myD1).arg(myD2), tr("GEOM_BUT_OK")); - QApplication::setOverrideCursor(Qt::waitCursor); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - Group1->SpinBox_DX->SetValue(5.0); - Group1->SpinBox_DY->SetValue(5.0); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool OperationGUI_ChamferDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + int anId = getConstructorId(); + if ( anId == 0 ) + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeChamferAll( myShape, + mySpinBox[ SpinBox1 ]->GetValue() ); + else if ( anId == 1 ) + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeChamferEdge( myShape, + mySpinBox[ SpinBox21 ]->GetValue(), + mySpinBox[ SpinBox22 ]->GetValue(), + myFace[ Face1 ], + myFace[ Face2 ] ); + else if ( anId == 2 ) + { + + int i = 0; + GEOM::ListOfLong_var anArray = new GEOM::ListOfLong; + anArray->length( myFaces.Extent() ); + + + for ( int i = 1, n = myFaces.Extent(); i <= n; i++ ) + anArray[ i - 1 ] = myFaces( i ); + + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeChamferFaces( myShape, + mySpinBox[ SpinBox31 ]->GetValue(), + mySpinBox[ SpinBox32 ]->GetValue(), + anArray ); } - QApplication::restoreOverrideCursor(); - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } + + + + + + + + + diff --git a/src/OperationGUI/OperationGUI_ChamferDlg.h b/src/OperationGUI/OperationGUI_ChamferDlg.h index 320bc37c9..1291337bc 100644 --- a/src/OperationGUI/OperationGUI_ChamferDlg.h +++ b/src/OperationGUI/OperationGUI_ChamferDlg.h @@ -30,9 +30,9 @@ #define DIALOGBOX_CHAMFER_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel2Spin.h" +#include -#include "OperationGUI.h" +class DlgRef_SpinBox; //================================================================================= // class : OperationGUI_ChamferDlg @@ -42,48 +42,57 @@ class OperationGUI_ChamferDlg : public GEOMBase_Skeleton { Q_OBJECT + enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces }; + enum { SpinBox1, SpinBox21, SpinBox22, SpinBox31, SpinBox32 }; + public: - OperationGUI_ChamferDlg(QWidget* parent = 0, const char* name = 0, OperationGUI* theOperationGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0); - ~OperationGUI_ChamferDlg(); + OperationGUI_ChamferDlg( QWidget* parent, + SALOME_Selection* Sel ); + virtual ~OperationGUI_ChamferDlg(); -private : - void Init(Handle(AIS_InteractiveContext) ic); - void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); - void MakeFilletSimulationAndDisplay(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); + +private slots: - void ResetStateOfDialog(); - void MakePreview(); + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void ValueChangedInSpinBox( double newValue ); + void ConstructorsClicked( int constructorId ); - OperationGUI* myOperationGUI; +private : - int myConstructorId; /* Current constructor id = radio button id */ + void Init( SALOME_Selection* ); + void enterEvent( QEvent* e ); + void reset(); + void createSelWg( const QString&, QPixmap&, QWidget*, const int ); + int getConstructorId() const; + void activateSelection(); + void enableWidgets(); - /* Interactive and local context management see also : bool myUseLocalContext() */ - Handle(AIS_InteractiveContext) myIC; /* Interactive context */ - Standard_Integer myLocalContextId; /* identify a local context used by this method */ - bool myUseLocalContext; /* true when this method as opened a local context */ +private: - TopoDS_Shape myShape; - bool myOkShape; - char* myShapeIOR; - int myShapeType; - double myD1; - double myD2; - - DlgRef_1Sel2Spin* Group1; + int myConstructorId; -private slots: - void ClickOnOk(); - void ClickOnApply(); - void ClickOnCancel(); - void ActivateThisDialog(); - void DeactivateActiveDialog(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); - void ConstructorsClicked(int constructorId); + GEOM::GEOM_Object_var myShape; + QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 ) + TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces ) + + QFrame* myGrp1; + QFrame* myGrp2; + QFrame* myGrp3; + QMap< int, QPushButton* > mySelBtn; + QMap< int, QLineEdit* > mySelName; + QMap< int, DlgRef_SpinBox* > mySpinBox; }; #endif // DIALOGBOX_CHAMFER_H diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.cxx b/src/OperationGUI/OperationGUI_ClippingDlg.cxx new file mode 100644 index 000000000..932627e35 --- /dev/null +++ b/src/OperationGUI/OperationGUI_ClippingDlg.cxx @@ -0,0 +1,392 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : OperationGUI_ClippingDlg.cxx +// Author : Michael Zorin +// Module : GEOM +// $Header: + +#include "OperationGUI_ClippingDlg.h" +#include "DlgRef_SpinBox.h" + +#include "QAD_Application.h" +#include "QAD_Desktop.h" +#include "QAD_RightFrame.h" +#include "VTKViewer_ViewFrame.h" +#include "OCCViewer_ViewFrame.h" +#include "QAD_MessageBox.h" +#include "utilities.h" +#include "OCCViewer_ViewPort3d.h" +#include "OCCViewer_Viewer3d.h" +#include +#include + +//#include + +// QT Includes +#include +#include +#include +#include +#include + +// VTK Includes +#include +#include + +//================================================================================= +// class : OperationGUI_ClippingDlg() +// purpose : +//================================================================================= +OperationGUI_ClippingDlg::OperationGUI_ClippingDlg( QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl ) + : GEOMBase_Skeleton( parent, "OperationGUI_ClippingDlg", 0, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + setCaption( tr( "Change clipping range" ) ); + + GroupConstructors->close(); + GroupBoxName->close(); + + /***************************************************************/ + GroupArguments = new QGroupBox( this, "GroupArguments" ); + GroupArguments->setColumnLayout(0, Qt::Vertical ); + GroupArguments->layout()->setSpacing( 0 ); + GroupArguments->layout()->setMargin( 0 ); + QGridLayout* GroupArgumentsLayout = new QGridLayout( GroupArguments->layout() ); + GroupArgumentsLayout->setAlignment( Qt::AlignTop ); + GroupArgumentsLayout->setSpacing( 6 ); + GroupArgumentsLayout->setMargin( 11 ); + + // Controls + TextLabelNear = new QLabel( GroupArguments, "TextLabelNear" ); + TextLabelNear->setText( tr( "Near" ) ); + //mzn TextLabelNear->setFixedWidth(74); + GroupArgumentsLayout->addWidget( TextLabelNear, 0, 0 ); + + SpinBox_Near = new DlgRef_SpinBox( GroupArguments, "SpinBox_Near"); + GroupArgumentsLayout->addWidget( SpinBox_Near, 0, 1 ); + + TextLabelFar = new QLabel( GroupArguments, "TextLabelFar" ); + TextLabelFar->setText( tr( "Far" ) ); + //mzn TextLabelFar->setFixedWidth(74); + GroupArgumentsLayout->addWidget( TextLabelFar, 0, 2 ); + + SpinBox_Far = new DlgRef_SpinBox( GroupArguments, "SpinBox_Far"); + GroupArgumentsLayout->addWidget( SpinBox_Far, 0, 3 ); + + resetButton = new QPushButton( GroupArguments, "resetButton" ); + resetButton->setText( tr( "Reset" ) ); + GroupArgumentsLayout->addWidget( resetButton, 0, 4 ); + + TypeCB = new QComboBox( GroupArguments, "TypeCB" ); + TypeCB->insertItem(tr("OFF")); + TypeCB->insertItem(tr("BACK")); + TypeCB->insertItem(tr("FRONT")); + TypeCB->insertItem(tr("SLICE")); + GroupArgumentsLayout->addMultiCellWidget( TypeCB, 1, 1, 0, 4 ); + + Layout1->addWidget( GroupArguments, 2, 0 ); + + /* Initialisations */ + SpinBox_Near->RangeStepAndValidator( -999999.999, +999999.999, 10.0, 3 ); + SpinBox_Far->RangeStepAndValidator( -999999.999, +999999.999, 10.0, 3 ); + + //GeometryGUI* aGeomGUI = GeometryGUI::GetGeomGUI(); + + /* signals and slots connections */ + connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( ClickOnCancel() ) ) ; + connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); + + connect( resetButton, SIGNAL (clicked() ), this, SLOT( onReset() ) ) ; + + // connect( aGeomGUI, SIGNAL ( SignalDeactivateActiveDialog() ), this, SLOT( onDeactivate() ) ) ; + //connect( aGeomGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ; + + Init(); +} + +//================================================================================= +// function : ~ OperationGUI_ClippingDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +OperationGUI_ClippingDlg::~ OperationGUI_ClippingDlg() +{ + // no need to delete child widgets, Qt does it all for us +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::Init() +{ + QAD_ViewFrame* aFrame = QAD_Application::getDesktop()->getActiveApp()-> + getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + + VTKViewer_ViewFrame* aVTKFrame = dynamic_cast( aFrame ); + if ( aVTKFrame ) + { + TextLabelNear->setText( tr( "Near" ) ); + TextLabelFar->setText( tr( "Far" ) ); + + TypeCB->hide(); + + vtkRenderer* aRenderer = aVTKFrame->getRenderer(); + if(!aRenderer) return; + + vtkCamera* anActiveCamera = aRenderer->GetActiveCamera(); + if( anActiveCamera == NULL ){ + MESSAGE("Trying to reset clipping range of non-existant camera"); + return; + } + + // Find the plane equation for the camera view plane + double vn[3]; + anActiveCamera->GetViewPlaneNormal(vn); + double position[3]; + anActiveCamera->GetPosition(position); + + float bounds[6]; + aRenderer->ComputeVisiblePropBounds(bounds); + + double center[3]; + center[0] = (bounds[0] + bounds[1])/2.0; + center[1] = (bounds[2] + bounds[3])/2.0; + center[2] = (bounds[4] + bounds[5])/2.0; + + double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) + + (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) + + (bounds[5]-bounds[4])*(bounds[5]-bounds[4])); + + double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) + + (position[1]-center[1])*(position[1]-center[1]) + + (position[2]-center[2])*(position[2]-center[2])); + + float range[2] = {distance - width/2.0, distance + width/2.0}; + + SpinBox_Near->SetValue(range[0]); + SpinBox_Far->SetValue(range[1]); + + return; + } + + OCCViewer_ViewFrame* aOCCFrame = dynamic_cast( aFrame ); + if ( aOCCFrame ) + { + TextLabelNear->setText( tr( "Depth" ) ); + TextLabelFar->setText( tr( "Thickness" ) ); + + Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)aOCCFrame->getViewPort())->getView(); + + double depth, thickness; + int ztype= view3d->ZClipping(depth, thickness); + SpinBox_Near->SetValue(depth); + SpinBox_Far->SetValue(thickness); + TypeCB->setCurrentItem(ztype); + + //Handle(V3d_Plane) aPlane = new V3d_Plane( aOCCFrame->getViewer()->getViewer3d() ,0, 0, 1, -100); + //aPlane->Display(view3d); + } +} + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool OperationGUI_ClippingDlg::ClickOnApply() +{ + QAD_ViewFrame* aFrame = QAD_Application::getDesktop()->getActiveApp()-> + getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + + VTKViewer_ViewFrame* aVTKFrame = dynamic_cast( aFrame ); + if ( aVTKFrame ) + { + vtkRenderer* aRenderer = aVTKFrame->getRenderer(); + if(!aRenderer) return false; + + vtkCamera* anActiveCamera = aRenderer->GetActiveCamera(); + if( anActiveCamera == NULL ){ + MESSAGE("Trying to reset clipping range of non-existant camera"); + return false; + } + + float range[2] = { SpinBox_Near->GetValue(), SpinBox_Far->GetValue() }; + if (range[0] < 0.0) range[0] = 0.0; + anActiveCamera->SetClippingRange( range ); + + return true; + } + + OCCViewer_ViewFrame* aOCCFrame = dynamic_cast( aFrame ); + if ( aOCCFrame ) + { + Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)aOCCFrame->getViewPort())->getView(); + + double depth = SpinBox_Near->GetValue(); + double thickness = SpinBox_Far->GetValue(); + int aType = TypeCB->currentItem(); + + view3d->SetZClippingType(V3d_TypeOfZclipping(aType)); + view3d->SetZClippingDepth(depth); + view3d->SetZClippingWidth(thickness); + } + + return true; +} + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::ClickOnOk() +{ + ClickOnApply(); + ClickOnCancel(); +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : onActivate() +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::onActivate() +{ + GEOMBase_Skeleton::ActivateThisDialog(); +} + + +//================================================================================= +// function : onDeactivate() +// purpose : public slot to deactivate if active +//================================================================================= +void OperationGUI_ClippingDlg::DeactivateActiveDialog() +{ + return; +} + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::enterEvent(QEvent* e) +{ + this->setEnabled(true); + return; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::closeEvent( QCloseEvent* e ) +{ + QDialog::closeEvent( e ); +} + + +//================================================================================= +// function : onReset() +// purpose : +//================================================================================= +void OperationGUI_ClippingDlg::onReset() +{ + QAD_ViewFrame* aFrame = QAD_Application::getDesktop()->getActiveApp()-> + getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame(); + + VTKViewer_ViewFrame* aVTKFrame = dynamic_cast( aFrame ); + if ( aVTKFrame ) + { + vtkRenderer* aRenderer = aVTKFrame->getRenderer(); + if(!aRenderer) return; + + vtkCamera* anActiveCamera = aRenderer->GetActiveCamera(); + if( anActiveCamera == NULL ){ + MESSAGE("Trying to reset clipping range of non-existant camera"); + return; + } + + // Find the plane equation for the camera view plane + double vn[3]; + anActiveCamera->GetViewPlaneNormal(vn); + double position[3]; + anActiveCamera->GetPosition(position); + + float bounds[6]; + aRenderer->ComputeVisiblePropBounds(bounds); + + double center[3]; + center[0] = (bounds[0] + bounds[1])/2.0; + center[1] = (bounds[2] + bounds[3])/2.0; + center[2] = (bounds[4] + bounds[5])/2.0; + + double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) + + (bounds[3]-bounds[2])*(bounds[3]-bounds[2]) + + (bounds[5]-bounds[4])*(bounds[5]-bounds[4])); + + double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) + + (position[1]-center[1])*(position[1]-center[1]) + + (position[2]-center[2])*(position[2]-center[2])); + + float range[2] = {distance - width/2.0, distance + width/2.0}; + + SpinBox_Near->SetValue(range[0]); + SpinBox_Far->SetValue(range[1]); + + return; + } + + OCCViewer_ViewFrame* aOCCFrame = dynamic_cast( aFrame ); + if ( aOCCFrame ) + { + TextLabelNear->setText( tr( "Depth" ) ); + TextLabelFar->setText( tr( "Thickness" ) ); + + Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)aOCCFrame->getViewPort())->getView(); + + view3d->SetZClippingType(V3d_TypeOfZclipping(0)); + view3d->ZFitAll(); + double depth, thickness; + int ztype= view3d->ZClipping(depth, thickness); + SpinBox_Near->SetValue(0); + SpinBox_Far->SetValue(1000); + TypeCB->setCurrentItem(ztype); + } + + + + return; +} diff --git a/src/OperationGUI/OperationGUI_ClippingDlg.h b/src/OperationGUI/OperationGUI_ClippingDlg.h new file mode 100644 index 000000000..b59306ef7 --- /dev/null +++ b/src/OperationGUI/OperationGUI_ClippingDlg.h @@ -0,0 +1,81 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : OperationGUI_ClippingDlg.h +// Author : Michael Zorin +// Module : GEOM +// $Header: + +#ifndef DIALOGBOX_CLIPPINGRANGE_H +#define DIALOGBOX_CLIPPING_H + +#include "GEOMBase_Skeleton.h" + +class QGroupBox; +class QLabel; +class QPushButton; +class QComboBox; +class DlgRef_SpinBox; + +enum ViewerTypes { VTK, OCC, OTHER }; + +//================================================================================= +// class : OperationGUI_ClippingDlg +// purpose : +//================================================================================= +class OperationGUI_ClippingDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + + public: + OperationGUI_ClippingDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~OperationGUI_ClippingDlg(); + +private : + + void Init(); + + ViewerTypes myViewerType; + + virtual void closeEvent( QCloseEvent* e ); + void enterEvent(QEvent* e); + + QGroupBox* GroupArguments; + QLabel* TextLabelNear; + DlgRef_SpinBox* SpinBox_Near; + QLabel* TextLabelFar; + DlgRef_SpinBox* SpinBox_Far; + QPushButton* resetButton; + QComboBox* TypeCB; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ClickOnCancel(); + void onActivate(); + void DeactivateActiveDialog(); + + void onReset(); +}; + +#endif // DIALOGBOX_CLIPPINGRANGE_H diff --git a/src/OperationGUI/OperationGUI_FilletDlg.cxx b/src/OperationGUI/OperationGUI_FilletDlg.cxx index 470d0e226..ae49d6c2e 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.cxx +++ b/src/OperationGUI/OperationGUI_FilletDlg.cxx @@ -26,20 +26,15 @@ // Module : GEOM // $Header$ -using namespace std; #include "OperationGUI_FilletDlg.h" +#include "DlgRef_1Sel1Spin.h" +#include "DlgRef_2Sel1Spin.h" +#include "QAD_Desktop.h" +#include "qpixmap.h" +#include +#include -#include "DisplayGUI.h" -#include "QAD_MessageBox.h" - -#include -#include -#include -#include -#include - -#include -#include +#include "GEOMImpl_Types.hxx" //================================================================================= // class : OperationGUI_FilletDlg() @@ -48,34 +43,66 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -OperationGUI_FilletDlg::OperationGUI_FilletDlg(QWidget* parent, const char* name, OperationGUI* theOperationGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +OperationGUI_FilletDlg::OperationGUI_FilletDlg( QWidget* parent, SALOME_Selection* Sel ) + :GEOMBase_Skeleton( parent, "OperationGUI_FilletDlg", Sel, false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_FILLET_ALL"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_FILLET_EDGE"))); - QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_FILLET_FACE"))); - QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + myConstructorId = -1; + mySelection = Sel; + + QPixmap image0( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_DLG_FILLET_ALL" ) ) ); + QPixmap image1( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_DLG_FILLET_EDGE" ) ) ); + QPixmap image2( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_DLG_FILLET_FACE" ) ) ); + + QPixmap iconSelect( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption(tr("GEOM_FILLET_TITLE")); + setCaption( tr( "GEOM_FILLET_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_FILLET")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->setPixmap(image2); - - Group1 = new DlgRef_1Sel1Spin(this, "Group1"); - Group1->GroupBox1->setTitle(tr("GEOM_FILLET_ALL")); - Group1->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); - Group1->TextLabel2->setText(tr("GEOM_RADIUS")); - Group1->PushButton1->setPixmap(image3); - - Layout1->addWidget(Group1, 1, 0); + GroupConstructors->setTitle( tr( "GEOM_FILLET" ) ); + RadioButton1->setPixmap( image0 ); + RadioButton2->setPixmap( image1 ); + RadioButton3->setPixmap( image2 ); + + Group1 = new DlgRef_1Sel1Spin( this, "Group1" ); + Group1->GroupBox1->setTitle( tr( "GEOM_FILLET_ALL" ) ); + Group1->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) ); + Group1->TextLabel2->setText( tr( "GEOM_RADIUS" ) ); + Group1->PushButton1->setPixmap( iconSelect ); + Group1->LineEdit1->setReadOnly( true ); + + Group2 = new DlgRef_2Sel1Spin( this, "Group2" ); + Group2->GroupBox1->setTitle( tr( "GEOM_FILLET_EDGES" ) ); + Group2->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) ); + Group2->TextLabel2->setText( tr( "SELECTED_EDGES" ) ); + Group2->TextLabel3->setText( tr( "GEOM_RADIUS" ) ); + Group2->PushButton1->setPixmap( iconSelect ); + Group2->PushButton2->setPixmap( iconSelect ); + Group2->LineEdit1->setReadOnly( true ); + Group2->LineEdit2->setReadOnly( true ); + + Group3 = new DlgRef_2Sel1Spin( this, "Group3" ); + Group3->GroupBox1->setTitle(tr( "GEOM_FILLET_FACES" ) ); + Group3->TextLabel1->setText(tr( "GEOM_MAIN_OBJECT" ) ); + Group3->TextLabel2->setText(tr( "SELECTED_FACES" ) ); + Group3->TextLabel3->setText(tr( "GEOM_RADIUS" ) ); + Group3->PushButton1->setPixmap( iconSelect ); + Group3->PushButton2->setPixmap( iconSelect ); + Group3->LineEdit1->setReadOnly( true ); + Group3->LineEdit2->setReadOnly( true ); + + Layout1->addWidget( Group1, 2, 0 ); + Layout1->addWidget( Group2, 2, 0 ); + Layout1->addWidget( Group3, 2, 0 ); /***************************************************************/ + double SpecificStep = 10.0; + Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); + Group2->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); + Group3->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); + /* Initialisations */ - myOperationGUI = theOperationGUI; - Init(ic); + Init( mySelection ); } @@ -85,7 +112,6 @@ OperationGUI_FilletDlg::OperationGUI_FilletDlg(QWidget* parent, const char* name //================================================================================= OperationGUI_FilletDlg::~OperationGUI_FilletDlg() { - /* no need to delete child widgets, Qt does it all for us */ } @@ -93,45 +119,49 @@ OperationGUI_FilletDlg::~OperationGUI_FilletDlg() // function : Init() // purpose : //================================================================================= -void OperationGUI_FilletDlg::Init(Handle(AIS_InteractiveContext) ic) +void OperationGUI_FilletDlg::Init( SALOME_Selection* Sel ) { - /* init variables */ - myConstructorId = 0; + mySelection = Sel; + myConstructorId = -1; + reset(); + RadioButton1->setChecked( true ); myEditCurrentArgument = Group1->LineEdit1; - myRadius = 5.0; - myOkShape = false; - myIC = ic; - myLocalContextId = -1; - myUseLocalContext = false; - - double SpecificStep = 10.0; - /* min, max, step and decimals for spin boxes */ - Group1->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); - Group1->SpinBox_DX->SetValue(myRadius); - - /* signals and slots connections */ - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); - connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); - connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel())); + // main buttons + connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); + connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + // group box + connect( GroupConstructors, SIGNAL( clicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) ); + // push buttons connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group2->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group3->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + // line edits connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group3->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + // spin boxes connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), Group1->SpinBox_DX, SLOT(SetStep(double))); + connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + // selection + connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); + - /* displays Dialog */ + initName( tr( "GEOM_FILLET" ) ); + + Group2->hide(); + Group3->hide(); Group1->show(); - this->show(); - return; + this->show(); } @@ -139,52 +169,65 @@ void OperationGUI_FilletDlg::Init(Handle(AIS_InteractiveContext) ic) // function : ConstructorsClicked() // purpose : Radio button management //================================================================================= -void OperationGUI_FilletDlg::ConstructorsClicked(int constructorId) +void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId ) { + if ( QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC ) + { + RadioButton1->setChecked( true ); + return; + } + + if ( myConstructorId == constructorId ) + return; + + // Get radius from previous widget + double R = 5; + if ( myConstructorId == 0 ) R = Group1->SpinBox_DX->GetValue(); + else if ( myConstructorId == 1 ) R = Group2->SpinBox_DX->GetValue(); + else R = Group3->SpinBox_DX->GetValue(); + myConstructorId = constructorId; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - disconnect(mySelection, 0, this, 0); - myOkShape = false; - myRadius = 5.0; - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - myUseLocalContext = false; + + switch ( constructorId ) + { + case 0: + Group1->show(); + Group2->hide(); + Group3->hide(); + Group1->SpinBox_DX->SetValue( R ); + break; + case 1: + Group1->hide(); + Group2->show(); + Group3->hide(); + Group2->SpinBox_DX->SetValue( R ); + break; + case 2: + Group1->hide(); + Group2->hide(); + Group3->show(); + Group3->SpinBox_DX->SetValue( R ); + break; + default: + break; } - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() != VIEW_OCC) { - myConstructorId = constructorId = 0; //No subshape selection if viewer is not OCC - RadioButton1->setChecked(TRUE); + if ( constructorId == 0 ) myEditCurrentArgument = Group1->LineEdit1; + else if ( constructorId == 1 ) myEditCurrentArgument = Group2->LineEdit1; + else myEditCurrentArgument = Group3->LineEdit1; + + activateSelection(); + enableWidgets(); + + if ( !myShape->_is_nil() ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( myShape ) ); + GEOMBase_Skeleton::LineEditReturnPressed(); } - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - Group1->LineEdit1->setText(""); - Group1->SpinBox_DX->SetValue(myRadius); - switch (constructorId) - { - case 0: /* Fillet All */ - { - Group1->GroupBox1->setTitle(tr("GEOM_FILLET_ALL")); - myShapeType = -1; - break; - } - case 1: /* Fillet edges */ - { - Group1->GroupBox1->setTitle(tr("GEOM_FILLET_EDGES")); - myShapeType = 6; - break; - } - case 2: /* Fillet Faces */ - { - Group1->GroupBox1->setTitle(tr("GEOM_FILLET_FACES")); - myShapeType = 4; - break; - } - } - return; + else + myEditCurrentArgument->setText( "" ); + + displayPreview(); } @@ -194,9 +237,8 @@ void OperationGUI_FilletDlg::ConstructorsClicked(int constructorId) //================================================================================= void OperationGUI_FilletDlg::ClickOnOk() { - this->ClickOnApply(); - this->ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -204,120 +246,111 @@ void OperationGUI_FilletDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void OperationGUI_FilletDlg::ClickOnApply() +bool OperationGUI_FilletDlg::ClickOnApply() { - buttonApply->setFocus(); - QApplication::setOverrideCursor(Qt::waitCursor); - QAD_Application::getDesktop()->putInfo(tr("")); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - bool testResult = false; - switch(myConstructorId) - { - case 0 : /* Fillet All */ - { - if(myOkShape) - testResult = myOperationGUI->OnFilletGetAll(myShape, myRadius, myShapeType, myShapeIOR); - break; - } - case 1 : /* Fillet Edge */ - { - if(myOkShape) - testResult = myOperationGUI->OnFilletGetSelected(myShape, myShapeIOR, myRadius, myShapeType, myLocalContextId, myUseLocalContext); - break; - } - case 2 : /* Fillet Face */ - { - if(myOkShape) - testResult = myOperationGUI->OnFilletGetSelected(myShape, myShapeIOR, myRadius, myShapeType, myLocalContextId, myUseLocalContext); - break; - } - } - - if(!testResult) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - /* Reset all arguments and local context to allow user a new selection ...*/ - this->ResetStateOfDialog(); - QApplication::restoreOverrideCursor(); - return; -} - + if ( !onAccept() ) + return false; -//================================================================================= -// function : ClickOnCancel() -// purpose : -//================================================================================= -void OperationGUI_FilletDlg::ClickOnCancel() -{ - this->ResetStateOfDialog(); - GEOMBase_Skeleton::ClickOnCancel(); - return; + initName(); + return true; } - //================================================================================= // function : SelectionIntoArgument() // purpose : Called when selection has changed //================================================================================= void OperationGUI_FilletDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myEditCurrentArgument->setText(""); - this->ResetStateOfDialog(); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel == 1) { - TopoDS_Shape S; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - if(!IO->hasEntry()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return; - } - - if(!S.IsNull() && S.ShapeType() <= 2) { - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IO); - myShapeIOR = GIObject->getIOR(); /* the Geom IOR string of selection */ - myEditCurrentArgument->setText(aString); - myShape = S; - myOkShape = true; + erasePreview(); + myEditCurrentArgument->setText( "" ); + + // If selection of main object is activated + if ( myEditCurrentArgument == Group1->LineEdit1 || + myEditCurrentArgument == Group2->LineEdit1 || + myEditCurrentArgument == Group3->LineEdit1 ) + { + if ( mySelection->IObjectCount() == 1 ) + { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) + { + myShape = anObj; + myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) ); + displayPreview(); + enableWidgets(); + return; } - - if(IO->hasEntry()) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - myShapeIOR = anIOR->Value(); - myOkShape = true; - myShape = S; - myEditCurrentArgument->setText(aString); - } - } + } + + myShape = GEOM::GEOM_Object::_nil(); + enableWidgets(); + } + // If face or edge selection is activated + else if ( myEditCurrentArgument == Group2->LineEdit2 || + myEditCurrentArgument == Group3->LineEdit2 ) + { + if ( mySelection->IObjectCount() == 1 ) + { + Standard_Boolean aResult = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), aResult ); + + if ( aResult && !anObj->_is_nil() ) + { + TColStd_IndexedMapOfInteger anIndexes; + mySelection->GetIndex( mySelection->firstIObject(), anIndexes ); + + if ( anIndexes.Extent() > 0 ) + { + QString aName; + if ( anIndexes.Extent() == 1 ) + { + int anIndex = anIndexes( 1 ); + + aName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex ); + } + else + aName = tr( "GEOM_MEN_POPUP_NAME" ).arg( anIndexes.Extent() ); + + myEditCurrentArgument->setText( aName ); + + if ( myConstructorId == 1 ) + myEdges = anIndexes; + else + myFaces = anIndexes; + + displayPreview(); + return; + } } } - if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0) - this->MakePreview(); + myFaces.Clear(); } - else - return; +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void OperationGUI_FilletDlg::LineEditReturnPressed() +{ + QLineEdit* send = ( QLineEdit* )sender(); - if(myOkShape && myShapeType!=-1 && myConstructorId != 0) { - /* local context is defined into the method */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelection(myShapeType, myLocalContextId); - myUseLocalContext = true; - } + if ( send == Group1->LineEdit1 ) + myEditCurrentArgument = Group1->LineEdit1; + else if ( send == Group2->LineEdit1 ) + myEditCurrentArgument = Group2->LineEdit1; + else if ( send == Group3->LineEdit1 ) + myEditCurrentArgument = Group3->LineEdit1; + else + return; + + GEOMBase_Skeleton::LineEditReturnPressed(); + return; } @@ -327,13 +360,35 @@ void OperationGUI_FilletDlg::SelectionIntoArgument() //================================================================================= void OperationGUI_FilletDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); + QPushButton* send = (QPushButton*)sender(); - if(send == Group1->PushButton1) + if ( send == Group1->PushButton1 ) + { Group1->LineEdit1->setFocus(); + myEditCurrentArgument = Group1->LineEdit1; + } + else if( send == Group2->PushButton1 ) + { + Group2->LineEdit1->setFocus(); + myEditCurrentArgument = Group2->LineEdit1; + } + else if( send == Group2->PushButton2 ) + { + Group2->LineEdit2->setFocus(); + myEditCurrentArgument = Group2->LineEdit2; + } + else if ( send == Group3->PushButton1 ) + { + Group3->LineEdit1->setFocus(); + myEditCurrentArgument = Group3->LineEdit1; + } + else if( send == Group3->PushButton2 ) + { + Group3->LineEdit1->setFocus(); + myEditCurrentArgument = Group3->LineEdit2; + } - this->SelectionIntoArgument(); - return; + activateSelection(); } @@ -343,7 +398,6 @@ void OperationGUI_FilletDlg::SetEditCurrentArgument() //================================================================================= void OperationGUI_FilletDlg::DeactivateActiveDialog() { - this->ResetStateOfDialog(); GEOMBase_Skeleton::DeactivateActiveDialog(); return; } @@ -356,10 +410,12 @@ void OperationGUI_FilletDlg::DeactivateActiveDialog() void OperationGUI_FilletDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + connect( mySelection, SIGNAL(currentSelectionChanged()), + this, SLOT( SelectionIntoArgument() ) ); + + activateSelection(); + displayPreview(); } @@ -367,126 +423,205 @@ void OperationGUI_FilletDlg::ActivateThisDialog() // function : enterEvent() // purpose : //================================================================================= -void OperationGUI_FilletDlg::enterEvent(QEvent* e) +void OperationGUI_FilletDlg::enterEvent( QEvent* e ) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + this->ActivateThisDialog(); } - //================================================================================= -// function : closeEvent() +// function : ValueChangedInSpinBox() // purpose : //================================================================================= -void OperationGUI_FilletDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - this->ClickOnCancel(); - return; +void OperationGUI_FilletDlg::ValueChangedInSpinBox( double newValue ) +{ + displayPreview(); } +//================================================================================= +// function : reset() +// purpose : +//================================================================================= +void OperationGUI_FilletDlg::reset() +{ + // Set Initial values of spinboxes + Group1->SpinBox_DX->SetValue( 5 ); + Group2->SpinBox_DX->SetValue( 5 ); + Group3->SpinBox_DX->SetValue( 5 ); + + Group1->LineEdit1->setText( "" ); + Group2->LineEdit1->setText( "" ); + Group2->LineEdit2->setText( "" ); + Group3->LineEdit1->setText( "" ); + Group3->LineEdit2->setText( "" ); + + // constructor id + int aConstructorId = getConstructorId(); + + if ( aConstructorId == 0 ) myEditCurrentArgument = Group1->LineEdit1; + else if ( aConstructorId == 1 ) myEditCurrentArgument = Group2->LineEdit1; + else myEditCurrentArgument = Group3->LineEdit1; + + myShape = GEOM::GEOM_Object::_nil(); + + myFaces.Clear(); + myEdges.Clear(); + + erasePreview( true ); + + activateSelection(); + + enableWidgets(); +} //================================================================================= -// function : ResetStateOfDialog() +// function : getConstructorId() // purpose : //================================================================================= -void OperationGUI_FilletDlg::ResetStateOfDialog() +int OperationGUI_FilletDlg::getConstructorId() const { - myOkShape = false; - myEditCurrentArgument->setText(""); - QApplication::restoreOverrideCursor(); - - /* Close its local contact if opened */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } - return; + return GroupConstructors->id( GroupConstructors->selected() ); } +//================================================================================= +// function : activateSelection +// purpose : Activate selection in accordance with myEditCurrentArgument +//================================================================================= +void OperationGUI_FilletDlg::activateSelection() +{ + + if ( !myShape->_is_nil() && myEditCurrentArgument == Group2->LineEdit2 ) + localSelection( myShape, TopAbs_EDGE ); + else if ( !myShape->_is_nil() && myEditCurrentArgument == Group3->LineEdit2 ) + localSelection( myShape, TopAbs_FACE ); + else + { + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_SHELL ); + aMap.Add( GEOM_SOLID ); + aMap.Add( GEOM_COMPOUND ); + globalSelection( aMap ); + } + + SelectionIntoArgument(); +} //================================================================================= -// function : ValueChangedInSpinBox() -// purpose : +// function : enableWidgets +// purpose : Enable widgets of faces in accordance with value of main object //================================================================================= -void OperationGUI_FilletDlg::ValueChangedInSpinBox(double newValue) +void OperationGUI_FilletDlg::enableWidgets() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + int anId = getConstructorId(); - myRadius = newValue; + bool toEnable = !myShape->_is_nil(); - if(myOkShape && QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myConstructorId == 0) - this->MakePreview(); - return; + if ( anId == 1 ) + { + Group2->LineEdit2->setEnabled( toEnable ); + Group2->PushButton2->setEnabled( toEnable ); + + if ( !toEnable ) + { + Group2->LineEdit2->setText( "" ); + myEdges.Clear(); + } + } + else if ( anId == 2 ) + { + Group3->LineEdit2->setEnabled( toEnable ); + Group3->PushButton2->setEnabled( toEnable ); + + if ( !toEnable ) + { + Group3->LineEdit2->setText( "" ); + myFaces.Clear(); + } + } } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr OperationGUI_FilletDlg::createOperation() +{ + return getGeomEngine()->GetILocalOperations( getStudyId() ); +} //================================================================================= -// function : MakePreview() +// function : ClickOnApply() +// purpose : Verify validity of input data +//================================================================================= +bool OperationGUI_FilletDlg::isValid( QString& ) +{ + switch ( getConstructorId() ) + { + case 0: return !myShape->_is_nil(); + case 1: return !myShape->_is_nil() && myEdges.Extent() > 0; + case 2: return !myShape->_is_nil() && myFaces.Extent() > 0; + default: return false; + } +} + +//================================================================================= +// function : execute // purpose : //================================================================================= -void OperationGUI_FilletDlg::MakePreview() +bool OperationGUI_FilletDlg::execute( ObjectList& objects ) { - QApplication::setOverrideCursor(Qt::waitCursor); - TopoDS_Shape tds; + GEOM::GEOM_Object_var anObj; + + int anId = getConstructorId(); + if ( anId == 0 ) + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeFilletAll( myShape, + getRadius() ); + else if ( anId == 1 ) + { + GEOM::ListOfLong_var aList = new GEOM::ListOfLong; + aList->length( myEdges.Extent() ); + + for ( int i = 1, n = myEdges.Extent(); i <= n; i++ ) + aList[ i - 1 ] = myEdges( i ); + + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeFilletEdges( myShape, getRadius(), aList ); + } + else if ( anId == 2 ) + { + int i = 0; + GEOM::ListOfLong_var aList = new GEOM::ListOfLong; + aList->length( myFaces.Extent() ); - try { - BRepFilletAPI_MakeFillet fill(myShape); - switch(myConstructorId) - { - case 0: /* Fillet All */ - { - TopExp_Explorer Exp(myShape, TopAbs_EDGE); - for(Exp; Exp.More(); Exp.Next()) { - TopoDS_Edge E = TopoDS::Edge(Exp.Current()); - fill.Add(E); - } - - for(int i = 1; i <= fill.NbContours(); i++) { - try { -#if OCC_VERSION_MAJOR >= 5 - fill.SetRadius(myRadius,i,i); -#else - fill.SetRadius(myRadius,i); -#endif - } - catch(Standard_Failure) { - QApplication::restoreOverrideCursor(); - QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK")); - QApplication::setOverrideCursor(Qt::waitCursor); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - Group1->SpinBox_DX->SetValue(5.0); - QApplication::restoreOverrideCursor(); - return; - } - } - tds = fill.Shape(); - break; - } - // case 1: /* Fillet edges */ - // case 2: /* Fillet Faces */ - } + for ( int i = 1, n = myFaces.Extent(); i <= n; i++ ) + aList[ i - 1 ] = myFaces( i ); - if(!tds.IsNull()) { - mySimulationTopoDs = tds; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - } - catch(Standard_Failure) { - QApplication::restoreOverrideCursor(); - QAD_MessageBox::warn1 (QAD_Application::getDesktop(), tr("GEOM_WRN_WARNING"), tr("GEOM_FILLET_ABORT").arg(myRadius), tr("GEOM_BUT_OK")); - QApplication::setOverrideCursor(Qt::waitCursor); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - Group1->SpinBox_DX->SetValue(5.0); + anObj = GEOM::GEOM_ILocalOperations::_narrow( + getOperation() )->MakeFilletFaces( myShape, getRadius(), aList ); } - QApplication::restoreOverrideCursor(); - return; + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; } + +//================================================================================= +// function : getRadius +// purpose : Get radius +//================================================================================= +double OperationGUI_FilletDlg::getRadius() const +{ + int anId = getConstructorId(); + if ( anId == 0 ) return Group1->SpinBox_DX->GetValue(); + else if ( anId == 1 ) return Group2->SpinBox_DX->GetValue(); + else return Group3->SpinBox_DX->GetValue(); +} + + + + + + + diff --git a/src/OperationGUI/OperationGUI_FilletDlg.h b/src/OperationGUI/OperationGUI_FilletDlg.h index 3756f82b2..b18f85863 100644 --- a/src/OperationGUI/OperationGUI_FilletDlg.h +++ b/src/OperationGUI/OperationGUI_FilletDlg.h @@ -30,9 +30,11 @@ #define DIALOGBOX_FILLET_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel1Spin.h" -#include "OperationGUI.h" +#include + +class DlgRef_1Sel1Spin; +class DlgRef_2Sel1Spin; //================================================================================= // class : OperationGUI_FilletDlg @@ -43,46 +45,49 @@ class OperationGUI_FilletDlg : public GEOMBase_Skeleton Q_OBJECT public: - OperationGUI_FilletDlg(QWidget* parent = 0, const char* name = 0, OperationGUI* theOperationGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0); - ~OperationGUI_FilletDlg(); + OperationGUI_FilletDlg( QWidget* parent, + SALOME_Selection* Sel ); + ~OperationGUI_FilletDlg(); -private : - void Init(Handle(AIS_InteractiveContext) ic); - void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); - void MakeFilletSimulationAndDisplay(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& msg ); + virtual bool execute( ObjectList& objects ); - void ResetStateOfDialog(); - void MakePreview(); +private slots: - OperationGUI* myOperationGUI; + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void ValueChangedInSpinBox( double newValue ); + void ConstructorsClicked( int constructorId ); - int myConstructorId; /* Current constructor id = radio button id */ +private : - /* Interactive and local context management see also : bool myUseLocalContext() */ - Handle(AIS_InteractiveContext) myIC; /* Interactive context */ - Standard_Integer myLocalContextId; /* identify a local context used by this method */ - bool myUseLocalContext; /* true when this method as opened a local context */ + void Init( SALOME_Selection* ); + void enterEvent( QEvent* e ); + void reset(); + int getConstructorId() const; + void activateSelection(); + void enableWidgets(); + double getRadius() const; - TopoDS_Shape myShape; - bool myOkShape; - char* myShapeIOR; - int myShapeType; - double myRadius; - - DlgRef_1Sel1Spin* Group1; +private : -private slots: - void ClickOnOk(); - void ClickOnApply(); - void ClickOnCancel(); - void ActivateThisDialog(); - void DeactivateActiveDialog(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); - void ConstructorsClicked(int constructorId); + int myConstructorId; + GEOM::GEOM_Object_var myShape; + TColStd_IndexedMapOfInteger myEdges; + TColStd_IndexedMapOfInteger myFaces; + + DlgRef_1Sel1Spin* Group1; + DlgRef_2Sel1Spin* Group2; + DlgRef_2Sel1Spin* Group3; }; #endif // DIALOGBOX_FILLET_H diff --git a/src/OperationGUI/OperationGUI_MaterialDlg.cxx b/src/OperationGUI/OperationGUI_MaterialDlg.cxx new file mode 100644 index 000000000..bb2231281 --- /dev/null +++ b/src/OperationGUI/OperationGUI_MaterialDlg.cxx @@ -0,0 +1,232 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : OperationGUI_MaterialDlg.cxx +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +using namespace std; +#include "OperationGUI_MaterialDlg.h" +#include "OperationGUI_PartitionDlg.h" + +#include "utilities.h" +#include "QAD_Desktop.h" + +#include +#include + +//================================================================================= +// class : OperationGUI_MaterialDlg() +// purpose : Constructs a OperationGUI_MaterialDlg 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. +//================================================================================= +OperationGUI_MaterialDlg::OperationGUI_MaterialDlg (QWidget* parent, const char* name, + SALOME_Selection* Sel, + GEOM::ListOfGO ListShapes, + bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + myListShapes = ListShapes; + myParentDlg = parent; + + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PARTITION"))); + + setCaption(tr("GEOM_MATERIAL_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_PARTITION")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1List1Spin1Btn_QTD(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION")); + + myShapeCol = GroupPoints->ListView1->addColumn(tr("GEOM_MATERIAL_SHAPE")); + myMaterCol = GroupPoints->ListView1->addColumn(tr("GEOM_MATERIAL_MATERIAL")); + GroupPoints->ListView1->setSelectionMode(QListView::Extended); + + GroupPoints->TextLabel1->setText(tr("GEOM_MATERIAL_ID")); + GroupPoints->PushButton1->setText(tr("GEOM_MATERIAL_SET")); + + Layout1->addWidget(GroupPoints, 1, 0); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~OperationGUI_MaterialDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +OperationGUI_MaterialDlg::~OperationGUI_MaterialDlg() +{ + // no need to delete child widgets, Qt does it all for us +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void OperationGUI_MaterialDlg::Init() +{ + // get materials list from the parent dialog + OperationGUI_PartitionDlg* aParentDlg = + dynamic_cast(myParentDlg); + if (aParentDlg) + myListMaterials = aParentDlg->GetListMaterials(); + + /* list filling */ + MESSAGE("Filling list with " << myListShapes.length() << " objects"); + QString aMaterialId; + for (int ind = 0; ind < myListShapes.length(); ind++) { + GEOM::GEOM_Object_var anObject = myListShapes[ind]; + if (!anObject->_is_nil()) { + MESSAGE("Insert " << GEOMBase::GetName( anObject )); + if (ind < myListMaterials.length()) + aMaterialId = QString::number(myListMaterials[ind]); + else + aMaterialId = "0"; + QListViewItem* aItem = + new QListViewItem(GroupPoints->ListView1, GEOMBase::GetName( anObject ), aMaterialId); + } + } + MESSAGE("Filled"); + + /* signals and slots connections */ + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + buttonApply->close(TRUE); + buttonCancel->setText(tr("GEOM_BUT_CANCEL")); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetMaterial())); + +// connect(GroupPoints->ListView1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); +// connect(GroupPoints->SpinBox1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + /* displays Dialog */ + MESSAGE("GroupPoints->show() ..."); + GroupPoints->show(); + MESSAGE("this->show() ..."); + this->show(); + MESSAGE("return"); + + return; +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void OperationGUI_MaterialDlg::ClickOnOk() +{ + QAD_Application::getDesktop()->putInfo(tr("")); + + int nbSh = myListShapes.length(); + myListMaterials.length(nbSh); + + QListViewItemIterator it (GroupPoints->ListView1); + for (int i = 0; it.current() != 0; it++, i++) { + QString aMatIdStr = it.current()->text(myMaterCol); + myListMaterials[i] = aMatIdStr.toInt(); + MESSAGE("For shape # " << i << " material ID = " << myListMaterials[i]); + } + + // set materials list to the parent dialog + OperationGUI_PartitionDlg* aParentDlg = + dynamic_cast(myParentDlg); + if (aParentDlg) + { + aParentDlg->SetListMaterials(myListMaterials); + } + + ClickOnCancel(); + return; +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +//================================================================================= +void OperationGUI_MaterialDlg::SelectionIntoArgument() +{ + QString aString = ""; /* name of selection */ + + int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); + if(nbSel < 1) { + return; + } + +// myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); + + /* no simulation */ + return; +} + + +//================================================================================= +// function : SetMaterial() +// purpose : +//================================================================================= +void OperationGUI_MaterialDlg::SetMaterial() +{ + int aMatId = GroupPoints->SpinBox1->value(); + QString aMatIdStr; + aMatIdStr.setNum(aMatId); + QListViewItemIterator it (GroupPoints->ListView1); + for (; it.current() != 0; it++) { + if (it.current()->isSelected()) + it.current()->setText(myMaterCol, aMatIdStr); + } + return; +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void OperationGUI_MaterialDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + return; +} + + +//================================================================================= +// function : enterEvent() +// purpose : +//================================================================================= +void OperationGUI_MaterialDlg::enterEvent(QEvent* e) +{ + if(!GroupConstructors->isEnabled()) + this->ActivateThisDialog(); +} diff --git a/src/OperationGUI/OperationGUI_MaterialDlg.h b/src/OperationGUI/OperationGUI_MaterialDlg.h new file mode 100644 index 000000000..9c1bd46ed --- /dev/null +++ b/src/OperationGUI/OperationGUI_MaterialDlg.h @@ -0,0 +1,72 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 CEA +// +// 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.org +// +// +// +// File : OperationGUI_MaterialDlg.h +// Author : Julia DOROVSKIKH +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_MATERIAL_H +#define DIALOGBOX_MATERIAL_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1List1Spin1Btn_QTD.h" + + +//================================================================================= +// class : OperationGUI_MaterialDlg +// purpose : +//================================================================================= +class OperationGUI_MaterialDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + OperationGUI_MaterialDlg (QWidget* parent, const char* name, + SALOME_Selection* Sel, + GEOM::ListOfGO ListShapes, + bool modal = FALSE, WFlags fl = 0); + ~OperationGUI_MaterialDlg(); + +private: + void Init(); + void enterEvent(QEvent* e); + + QWidget* myParentDlg; + + GEOM::ListOfGO myListShapes; + GEOM::ListOfLong myListMaterials; + + DlgRef_1List1Spin1Btn_QTD* GroupPoints; + + int myShapeCol; + int myMaterCol; + +private slots: + void ClickOnOk(); + void ActivateThisDialog(); + void SelectionIntoArgument(); + void SetMaterial(); + +}; + +#endif // DIALOGBOX_MATERIAL_H diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.cxx b/src/OperationGUI/OperationGUI_PartitionDlg.cxx index 3fbcb8705..be89f1131 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.cxx +++ b/src/OperationGUI/OperationGUI_PartitionDlg.cxx @@ -26,8 +26,16 @@ // Module : GEOM // $Header$ -using namespace std; #include "OperationGUI_PartitionDlg.h" +#include "OperationGUI_MaterialDlg.h" + +#include "GEOMImpl_Types.hxx" + +#include "QAD_Desktop.h" + +#include + +#include "utilities.h" //================================================================================= // class : OperationGUI_PartitionDlg() @@ -36,21 +44,23 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(QWidget* parent, const char* name, OperationGUI* theOperationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PARTITION"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_PARTITION_PLANE"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); setCaption(tr("GEOM_PARTITION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_PARTITION")); RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); + RadioButton2->setPixmap(image1); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_4Sel1List_QTD(this, "GroupPoints"); + // Full partition (contains half-space partition) + GroupPoints = new DlgRef_4Sel1List1Check_QTD(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION")); GroupPoints->GroupBox2->setTitle(tr("SUPPRESS_RESULT")); GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); @@ -58,16 +68,20 @@ OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(QWidget* parent, const char GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT")); GroupPoints->TextLabel4->setText(tr("GEOM_SUPPRESS_RESULT_INSIDE")); GroupPoints->TextLabel5->setText(tr("GEOM_SUPPRESS_RESULT_OUTSIDE")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); - GroupPoints->PushButton3->setPixmap(image1); - GroupPoints->PushButton4->setPixmap(image1); - - Layout1->addWidget(GroupPoints, 1, 0); + GroupPoints->CheckBox1->setText(tr("GEOM_REMOVE_WEBS")); + GroupPoints->PushButton1->setPixmap(image2); + GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->PushButton3->setPixmap(image2); + GroupPoints->PushButton4->setPixmap(image2); + GroupPoints->PushButton5->setText(tr("GEOM_SET_MATERIALS")); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + GroupPoints->LineEdit3->setReadOnly( true ); + GroupPoints->LineEdit4->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ - - /* Initialisations */ - myOperationGUI = theOperationGUI; + Init(); } @@ -88,11 +102,6 @@ OperationGUI_PartitionDlg::~OperationGUI_PartitionDlg() //================================================================================= void OperationGUI_PartitionDlg::Init() { - /* init variables */ - myEditCurrentArgument = GroupPoints->LineEdit1; - - myOkListShapes = myOkListTools = myOkKeepShape = myOkRemoveShape = false; - /* type for sub shape selection */ GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_SOLID")); GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_SHELL")); @@ -100,34 +109,86 @@ void OperationGUI_PartitionDlg::Init() GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_WIRE")); GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_EDGE")); GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_VERTEX")); - - /* Current item is 'Shape' */ - GroupPoints->ComboBox1->setCurrentItem(0); - myLimit = GroupPoints->ComboBox1->currentItem(); - + /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - + connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton4, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - + connect(GroupPoints->PushButton5, SIGNAL(clicked()), this, SLOT(SetMaterials())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit4, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - + + connect(GroupPoints->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(onRemoveWebs(bool))); + connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + initName( tr( "GEOM_PARTITION" ) ); + ConstructorsClicked( 0 ); +} - /* displays Dialog */ - GroupPoints->show(); - this->show(); - return; +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void OperationGUI_PartitionDlg::ConstructorsClicked(int constructorId) +{ + disconnect(mySelection, 0, this, 0); + globalSelection(); + + myListShapes.length(0); + myListTools.length(0); + myListKeepInside.length(0); + myListRemoveInside.length(0); + myListMaterials.length(0); + + switch (constructorId) + { + case 0: /*Full partition */ + { + GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION")); + GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT")); + resize(0, 0); + GroupPoints->TextLabel3->show(); + GroupPoints->ComboBox1->show(); + GroupPoints->GroupBox2->show(); + + GroupPoints->ComboBox1->setCurrentItem(0); + GroupPoints->LineEdit3->clear(); + GroupPoints->LineEdit4->clear(); + break; + } + case 1: /*Half-space partition */ + { + + GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION_HALFSPACE")); + GroupPoints->GroupBox2->hide(); + GroupPoints->TextLabel3->hide(); + GroupPoints->ComboBox1->hide(); + GroupPoints->TextLabel2->setText(tr("GEOM_PLANE")); + resize(0, 0); + break; + } + } + + myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->clear(); + GroupPoints->LineEdit2->clear(); + onRemoveWebs(false); + + myEditCurrentArgument->setFocus(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + MESSAGE(width()<<" "<ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -147,51 +207,24 @@ void OperationGUI_PartitionDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void OperationGUI_PartitionDlg::ClickOnApply() +bool OperationGUI_PartitionDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} - if(myOkListShapes || myOkListTools || myOkKeepShape || myOkRemoveShape) { - GEOM::shape_type limit; - switch(myLimit) - { - case 0 : - { - limit = GEOM::SHAPE; - break; - } - case 1 : - { - limit = GEOM::SHELL; - break; - } - case 2 : - { - limit = GEOM::FACE; - break; - } - case 3 : - { - limit = GEOM::WIRE; - break; - } - case 4 : - { - limit = GEOM::EDGE; - break; - } - case 5 : - { - limit = GEOM::VERTEX; - break; - } - default : - limit = GEOM::SHAPE; - } - myOperationGUI->MakePartitionAndDisplay(myListShapes, myListTools, myListKeepInside, myListRemoveInside, limit); - } - return; +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void OperationGUI_PartitionDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -201,50 +234,61 @@ void OperationGUI_PartitionDlg::ClickOnApply() //================================================================================= void OperationGUI_PartitionDlg::SelectionIntoArgument() { - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel < 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myListShapes.length(0); - myOkListShapes = false; - } else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - myListTools.length(0); - myOkListTools = false; - } else if(myEditCurrentArgument == GroupPoints->LineEdit3) { - myListRemoveInside.length(0); - myOkKeepShape = false; - } else if(myEditCurrentArgument == GroupPoints->LineEdit4) { - myListKeepInside.length(0); - myOkRemoveShape = false; + myEditCurrentArgument->setText( "" ); + QString aString = ""; + + int nbSel = GEOMBase::GetNameOfSelectedIObjects( mySelection, aString, true ); + + if ( nbSel < 1 ) + { + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + { + myListShapes.length( 0 ); + myListMaterials.length( 0 ); } + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) + myListTools.length( 0 ); + else if ( myEditCurrentArgument == GroupPoints->LineEdit3 ) + myListRemoveInside.length( 0 ); + else if ( myEditCurrentArgument == GroupPoints->LineEdit4 ) + myListKeepInside.length( 0 ); + } + + // One and only one plane can be selected + + if ( getConstructorId() == 1 && myEditCurrentArgument == GroupPoints->LineEdit2 && nbSel != 1 ) + { + myListTools.length( 0 ); return; } - - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); - myEditCurrentArgument->setText(aString); - myOkListShapes = true; + + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + { + GEOMBase::ConvertListOfIOInListOfGO( mySelection->StoredIObjects(), myListShapes, true ); + myListMaterials.length( 0 ); + if ( !myListShapes.length() ) + return; } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListTools); - myEditCurrentArgument->setText(aString); - myOkListTools = true; + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) + { + GEOMBase::ConvertListOfIOInListOfGO( mySelection->StoredIObjects(), myListTools, true ); + if ( !myListTools.length() ) + return; } - else if(myEditCurrentArgument == GroupPoints->LineEdit3) { - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListRemoveInside); - myEditCurrentArgument->setText(aString); - myOkKeepShape = true; + else if(myEditCurrentArgument == GroupPoints->LineEdit3) + { + GEOMBase::ConvertListOfIOInListOfGO( mySelection->StoredIObjects(), myListRemoveInside, true ); + if (!myListRemoveInside.length()) + return; } - else if(myEditCurrentArgument == GroupPoints->LineEdit4) { - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListKeepInside); - myEditCurrentArgument->setText(aString); - myOkRemoveShape = true; + else if(myEditCurrentArgument == GroupPoints->LineEdit4) + { + GEOMBase::ConvertListOfIOInListOfGO( mySelection->StoredIObjects(), myListKeepInside, true ); + if ( !myListKeepInside.length() ) + return; } - - /* no simulation */ - return; + + myEditCurrentArgument->setText( aString ); } @@ -255,26 +299,24 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument() void OperationGUI_PartitionDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); + + if(send == GroupPoints->PushButton1) myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); + else if(send == GroupPoints->PushButton2) + { myEditCurrentArgument = GroupPoints->LineEdit2; + if( getConstructorId()==1 ) + globalSelection( GEOM_PLANE ); } - else if(send == GroupPoints->PushButton3) { - GroupPoints->LineEdit3->setFocus(); + else if(send == GroupPoints->PushButton3) myEditCurrentArgument = GroupPoints->LineEdit3; - } - else if(send == GroupPoints->PushButton4) { - GroupPoints->LineEdit4->setFocus(); + else if(send == GroupPoints->PushButton4) myEditCurrentArgument = GroupPoints->LineEdit4; - } - this->SelectionIntoArgument(); - - return; + + globalSelection( GEOM_ALLSHAPES ); + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -285,19 +327,15 @@ void OperationGUI_PartitionDlg::SetEditCurrentArgument() void OperationGUI_PartitionDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else if (send == GroupPoints->LineEdit3) - myEditCurrentArgument = GroupPoints->LineEdit3; - else if (send == GroupPoints->LineEdit4) - myEditCurrentArgument = GroupPoints->LineEdit4; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2 || + send == GroupPoints->LineEdit3 || + send == GroupPoints->LineEdit4 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -309,7 +347,18 @@ void OperationGUI_PartitionDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; + + ConstructorsClicked( getConstructorId() ); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void OperationGUI_PartitionDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -319,10 +368,79 @@ void OperationGUI_PartitionDlg::ActivateThisDialog() //================================================================================= void OperationGUI_PartitionDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if(!GroupConstructors->isEnabled()) + this->ActivateThisDialog(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation() +{ + return getGeomEngine()->GetIBooleanOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool OperationGUI_PartitionDlg::isValid( QString& msg ) +{ + return (myListShapes.length() || myListTools.length() || + myListKeepInside.length() || myListRemoveInside.length()); +} + + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool OperationGUI_PartitionDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + QString msg; + + int aLimit = GetLimit(); + int aConstructorId = getConstructorId(); + + if (aConstructorId==1) + aLimit = GEOM::SHAPE; + + if (isValid( msg )) + { + + if ( aConstructorId==0 && !toRemoveWebs() ) + myListMaterials.length(0); + + anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->MakePartition(myListShapes, + myListTools, + myListKeepInside, + myListRemoveInside, + aLimit, + toRemoveWebs(), + myListMaterials); + res = true; + } + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void OperationGUI_PartitionDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); } @@ -333,14 +451,98 @@ void OperationGUI_PartitionDlg::enterEvent(QEvent* e) void OperationGUI_PartitionDlg::ComboTextChanged() { - myLimit = GroupPoints->ComboBox1->currentItem(); - - bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3; - GroupPoints->LineEdit3->setEnabled(IsEnabled); - GroupPoints->LineEdit4->setEnabled(IsEnabled); - GroupPoints->TextLabel4->setEnabled(IsEnabled); - GroupPoints->TextLabel5->setEnabled(IsEnabled); - GroupPoints->PushButton3->setEnabled(IsEnabled); - GroupPoints->PushButton4->setEnabled(IsEnabled); - return; + bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3; + GroupPoints->LineEdit3->setEnabled(IsEnabled); + GroupPoints->LineEdit4->setEnabled(IsEnabled); + GroupPoints->TextLabel4->setEnabled(IsEnabled); + GroupPoints->TextLabel5->setEnabled(IsEnabled); + GroupPoints->PushButton3->setEnabled(IsEnabled); + GroupPoints->PushButton4->setEnabled(IsEnabled); +} + + +//================================================================================= +// function : SetMaterials() +// purpose : +//================================================================================= +void OperationGUI_PartitionDlg::SetMaterials() +{ + SALOME_Selection* Sel = + SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + MESSAGE("OperationGUI_MaterialDlg ..."); + OperationGUI_MaterialDlg *aDlg = + new OperationGUI_MaterialDlg(this, "", Sel, myListShapes, true); + MESSAGE("OperationGUI_MaterialDlg"); + return; +} + + +//================================================================================= +// function : onRemoveWebs() +// purpose : +//================================================================================= +void OperationGUI_PartitionDlg::onRemoveWebs(bool isChecked) +{ + if (GroupPoints->CheckBox1->isChecked() != isChecked) + GroupPoints->CheckBox1->setChecked(isChecked); + + GroupPoints->PushButton5->setEnabled(isChecked); +} + + +//================================================================================= +// function : toRemoveWebs() +// purpose : +//================================================================================= +bool OperationGUI_PartitionDlg::toRemoveWebs() const +{ + return GroupPoints->CheckBox1->isChecked(); +} + + +//================================================================================= +// function : GetLimit() +// purpose : +//================================================================================= +int OperationGUI_PartitionDlg::GetLimit() const +{ + int aLimit = GroupPoints->ComboBox1->currentItem(); + + switch(aLimit) + { + case 0 : + { + aLimit = GEOM::SOLID; + break; + } + case 1 : + { + aLimit = GEOM::SHELL; + break; + } + case 2 : + { + aLimit = GEOM::FACE; + break; + } + case 3 : + { + aLimit = GEOM::WIRE; + break; + } + case 4 : + { + aLimit = GEOM::EDGE; + break; + } + case 5 : + { + aLimit = GEOM::VERTEX; + break; + } + default : + aLimit = GEOM::SHAPE; + } + + return aLimit; } diff --git a/src/OperationGUI/OperationGUI_PartitionDlg.h b/src/OperationGUI/OperationGUI_PartitionDlg.h index 20673e83e..d6d35ded3 100644 --- a/src/OperationGUI/OperationGUI_PartitionDlg.h +++ b/src/OperationGUI/OperationGUI_PartitionDlg.h @@ -30,9 +30,8 @@ #define DIALOGBOX_PARTITION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_4Sel1List_QTD.h" +#include "DlgRef_4Sel1List1Check_QTD.h" -#include "OperationGUI.h" //================================================================================= // class : OperationGUI_PartitionDlg @@ -43,37 +42,50 @@ class OperationGUI_PartitionDlg : public GEOMBase_Skeleton Q_OBJECT public: - OperationGUI_PartitionDlg(QWidget* parent = 0, const char* name = 0, OperationGUI* theOperationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + OperationGUI_PartitionDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~OperationGUI_PartitionDlg(); -private: - void Init(); - void enterEvent(QEvent* e); + void SetListMaterials(GEOM::ListOfLong ListMaterials) + { myListMaterials = ListMaterials; } - OperationGUI* myOperationGUI; + GEOM::ListOfLong GetListMaterials() + { return myListMaterials; } - GEOM::GEOM_Gen::ListOfIOR myListShapes; - GEOM::GEOM_Gen::ListOfIOR myListTools; - GEOM::GEOM_Gen::ListOfIOR myListRemoveInside; - GEOM::GEOM_Gen::ListOfIOR myListKeepInside; +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); - bool myOkListShapes; /* to check when argument is defined */ - bool myOkListTools; /* to check when argument is defined */ - bool myOkKeepShape; /* to check when argument is defined */ - bool myOkRemoveShape; /* to check when argument is defined */ - int myLimit; + virtual void closeEvent( QCloseEvent* e ); - DlgRef_4Sel1List_QTD* GroupPoints; +private: + void Init(); + void enterEvent(QEvent* e); + bool toRemoveWebs() const; + int GetLimit() const; + + GEOM::ListOfGO myListShapes; + GEOM::ListOfLong myListMaterials; + GEOM::ListOfGO myListTools; + GEOM::ListOfGO myListRemoveInside; + GEOM::ListOfGO myListKeepInside; + + DlgRef_4Sel1List1Check_QTD* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); void ComboTextChanged(); - + void onRemoveWebs(bool); + void SetMaterials(); + void ConstructorsClicked(int constructorId); }; #endif // DIALOGBOX_PARTITION_H diff --git a/src/PARTITION/Partition_Inter2d.cxx b/src/PARTITION/Partition_Inter2d.cxx index f8fa4931e..54a270e44 100644 --- a/src/PARTITION/Partition_Inter2d.cxx +++ b/src/PARTITION/Partition_Inter2d.cxx @@ -142,7 +142,7 @@ static Standard_Boolean findVOnE(const TopoDS_Vertex & theV, return Standard_False; #ifdef DEB - cout << "findVOnE: found MinDist = " << sqrt (MinDist2) << endl; + MESSAGE("findVOnE: found MinDist = " << sqrt (MinDist2)); #endif return Standard_True; diff --git a/src/PARTITION/Partition_Loop2d.cxx b/src/PARTITION/Partition_Loop2d.cxx index 9b229f979..05e01771a 100644 --- a/src/PARTITION/Partition_Loop2d.cxx +++ b/src/PARTITION/Partition_Loop2d.cxx @@ -1111,7 +1111,7 @@ void Partition_Loop2d::WiresToFaces(const BRepAlgo_Image& ) { // error: pb with wires classification #ifdef DEB - cout << "Partition_Loop2d::WiresToFaces(), pb with wires classification" << endl; + MESSAGE("Partition_Loop2d::WiresToFaces(), pb with wires classification"); #endif break; } diff --git a/src/PARTITION/Partition_Spliter.cxx b/src/PARTITION/Partition_Spliter.cxx index dc4900963..8f4793909 100644 --- a/src/PARTITION/Partition_Spliter.cxx +++ b/src/PARTITION/Partition_Spliter.cxx @@ -270,7 +270,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) myInter3d.CompletPart3d(aListFaces, myFaceShapeMap); #ifdef PART_PERF - cout << "+++ CompletPart3d()" << endl; + MESSAGE("+++ CompletPart3d()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); @@ -283,7 +283,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) FindToolsToReconstruct(); #ifdef PART_PERF - cout << "+++ FindToolsToReconstruct()" << endl; + MESSAGE("+++ FindToolsToReconstruct()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); @@ -319,7 +319,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) myDoneStep = TopAbs_VERTEX; #ifdef PART_PERF - cout << "+++ CompletPart2d()" << endl; + MESSAGE("+++ CompletPart2d()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); @@ -428,7 +428,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) } } #ifdef PART_PERF - cout << "+++ Cut Edges" << endl; + MESSAGE("+++ Cut Edges"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); @@ -440,7 +440,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) myDoneStep = TopAbs_EDGE; #ifdef PART_PERF - cout << "+++ MergeEqualEdges()" << endl; + MESSAGE("+++ MergeEqualEdges()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); @@ -485,7 +485,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) myDoneStep = TopAbs_FACE; #ifdef PART_PERF - cout << "+++ MakeFaces()" << endl; + MESSAGE("+++ MakeFaces()"); aCron.Show( cout ); aCron.Reset(); aCron.Start(); @@ -528,7 +528,7 @@ void Partition_Spliter::Compute(const TopAbs_ShapeEnum Limit) myBuilder.Add (myShape, itNSL.Value()); } #ifdef PART_PERF - cout << "+++ MakeShells()" << endl; + MESSAGE("+++ MakeShells()"); aCron.Show( cout ); #endif diff --git a/src/PrimitiveGUI/Makefile.in b/src/PrimitiveGUI/Makefile.in index d7407c810..78c535dc7 100644 --- a/src/PrimitiveGUI/Makefile.in +++ b/src/PrimitiveGUI/Makefile.in @@ -48,16 +48,15 @@ LIB_SRC = PrimitiveGUI.cxx \ PrimitiveGUI_ConeDlg.cxx LIB_MOC = \ - PrimitiveGUI.h \ PrimitiveGUI_BoxDlg.h \ PrimitiveGUI_CylinderDlg.h \ PrimitiveGUI_SphereDlg.h \ PrimitiveGUI_TorusDlg.h \ PrimitiveGUI_ConeDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file diff --git a/src/PrimitiveGUI/PrimitiveGUI.cxx b/src/PrimitiveGUI/PrimitiveGUI.cxx index e28c3f6f6..0304e194f 100644 --- a/src/PrimitiveGUI/PrimitiveGUI.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI.cxx @@ -24,13 +24,16 @@ // File : PrimitiveGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "PrimitiveGUI.h" +#include "GeometryGUI.h" + +#include "QAD_Application.h" +#include "QAD_Desktop.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" -#include #include "PrimitiveGUI_BoxDlg.h" // Method BOX #include "PrimitiveGUI_CylinderDlg.h" // Method CYLINDER @@ -38,21 +41,32 @@ using namespace std; #include "PrimitiveGUI_TorusDlg.h" // Method TORUS #include "PrimitiveGUI_ConeDlg.h" // Method CONE +PrimitiveGUI* PrimitiveGUI::myGUIObject = 0; + +//======================================================================= +// function : GetPrimitiveGUI() +// purpose : Get the only PrimitiveGUI object [ static ] +//======================================================================= +PrimitiveGUI* PrimitiveGUI::GetPrimitiveGUI() +{ + if ( myGUIObject == 0 ) { + // init PrimitiveGUI only once + myGUIObject = new PrimitiveGUI(); + } + return myGUIObject; +} + //======================================================================= // function : PrimitiveGUI() // purpose : Constructor //======================================================================= -PrimitiveGUI::PrimitiveGUI() : - QObject() +PrimitiveGUI::PrimitiveGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } //======================================================================= -// function : ~PrimitiveGUI() +// function : ~PrimitiveGUI // purpose : Destructor //======================================================================= PrimitiveGUI::~PrimitiveGUI() @@ -66,34 +80,37 @@ PrimitiveGUI::~PrimitiveGUI() //======================================================================= bool PrimitiveGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - PrimitiveGUI* aPrimitiveGUI = new PrimitiveGUI(); - aPrimitiveGUI->myGeomGUI->EmitSignalDeactivateDialog(); + PrimitiveGUI* aPrimitiveGUI = GetPrimitiveGUI(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + + QDialog* aDlg = NULL; + switch (theCommandID) { case 4021: // BOX { - PrimitiveGUI_BoxDlg* aDlg = new PrimitiveGUI_BoxDlg(parent, "", aPrimitiveGUI, Sel); + aDlg = new PrimitiveGUI_BoxDlg(parent, "", Sel); break; } case 4022: // CYLINDER { - PrimitiveGUI_CylinderDlg* aDlg = new PrimitiveGUI_CylinderDlg(parent, "", aPrimitiveGUI, Sel); + aDlg = new PrimitiveGUI_CylinderDlg(parent, "", Sel); break; } case 4023: // SPHERE { - PrimitiveGUI_SphereDlg* aDlg = new PrimitiveGUI_SphereDlg(parent, "", aPrimitiveGUI, Sel); + aDlg = new PrimitiveGUI_SphereDlg(parent, "", Sel); break; } case 4024: // TORUS { - PrimitiveGUI_TorusDlg* aDlg = new PrimitiveGUI_TorusDlg(parent, "", aPrimitiveGUI, Sel); + aDlg = new PrimitiveGUI_TorusDlg(parent, "", Sel); break; } case 4025: // CONE { - PrimitiveGUI_ConeDlg* aDlg = new PrimitiveGUI_ConeDlg(parent, "", aPrimitiveGUI, Sel); + aDlg = new PrimitiveGUI_ConeDlg(parent, "", Sel); break; } default: @@ -102,143 +119,11 @@ bool PrimitiveGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) break; } } - return true; -} - - -//======================================================================= -// function : MakeBoxAndDisplay() -// purpose : -//======================================================================= -void PrimitiveGUI::MakeBoxAndDisplay(const gp_Pnt P1, const gp_Pnt P2) -{ - try { - GEOM::GEOM_Shape_var box = myGeom->MakeBox(P1.X(), P1.Y(), P1.Z(), P2.X(), P2.Y(), P2.Z()); - box->NameType(tr("GEOM_BOX")); - if(myGeomBase->Display(box)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } -} - - -//===================================================================================== -// function : MakeCylinderAndDisplay() -// purpose : -//===================================================================================== -void PrimitiveGUI::MakeCylinderAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, - const double Radius, const double aHeight) -{ - try { - if(Radius <= Precision::Confusion() || aHeight <= Precision::Confusion()) - return; - - GEOM::PointStruct pstruct = myGeom->MakePointStruct(BasePoint.X(), BasePoint.Y(), BasePoint.Z()); - GEOM::PointStruct d = myGeom->MakePointStruct(aDir.X(), aDir.Y(), aDir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - - GEOM::GEOM_Shape_var result = myGeom->MakeCylinder(pstruct, dstruct, Radius, aHeight); - if (result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_CYLINDER")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeSphere() -// purpose : -//===================================================================================== -void PrimitiveGUI::MakeSphereAndDisplay(const gp_Pnt aCenterPoint, const double aRadius) -{ - try { - if(aRadius <= Precision::Confusion()) - return; - - GEOM::GEOM_Shape_ptr result = myGeom->MakeSphere(aCenterPoint.X(),aCenterPoint.Y(),aCenterPoint.Z(), aRadius); - result->NameType(tr("GEOM_SPHERE")); - if (myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch (const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeTorusAndDisplay() -// purpose : -//===================================================================================== -void PrimitiveGUI::MakeTorusAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, - const double Radius1, const double Radius2) -{ - try { - if(Radius1 <= Precision::Confusion() || Radius2 <= Precision::Confusion()) - return; - - GEOM::PointStruct pstruct = myGeom->MakePointStruct(BasePoint.X(), BasePoint.Y(), BasePoint.Z()); - GEOM::PointStruct d = myGeom ->MakePointStruct(aDir.X(), aDir.Y(), aDir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - - GEOM::GEOM_Shape_var result = myGeom->MakeTorus(pstruct, dstruct, Radius1, Radius2); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_TORUS")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeConeAndDisplay() -// purpose : -//===================================================================================== -void PrimitiveGUI::MakeConeAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, - const double Radius1, const double Radius2, const double aHeight) -{ - try { - double myRadius2 = Radius2; - if(myRadius2 < Precision::Confusion()) - myRadius2 = Precision::Confusion(); - if(Radius1 <= Precision::Confusion() || aHeight <= Precision::Confusion()) - return; - GEOM::PointStruct pstruct = myGeom->MakePointStruct(BasePoint.X(), BasePoint.Y(), BasePoint.Z()); - GEOM::PointStruct d = myGeom->MakePointStruct(aDir.X(), aDir.Y(), aDir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - - GEOM::GEOM_Shape_var result = myGeom->MakeCone(pstruct, dstruct, Radius1, myRadius2, aHeight); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_CONE")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; + if ( aDlg != NULL ) + aDlg->show(); + + return true; } @@ -247,6 +132,8 @@ void PrimitiveGUI::MakeConeAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return PrimitiveGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return PrimitiveGUI::GetPrimitiveGUI(); + } } diff --git a/src/PrimitiveGUI/PrimitiveGUI.h b/src/PrimitiveGUI/PrimitiveGUI.h index f85e68815..3276c5ed6 100644 --- a/src/PrimitiveGUI/PrimitiveGUI.h +++ b/src/PrimitiveGUI/PrimitiveGUI.h @@ -24,40 +24,33 @@ // File : PrimitiveGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef PRIMITIVEGUI_H #define PRIMITIVEGUI_H -#include "GEOMBase.h" +#include "GEOMGUI.h" + //================================================================================= // class : PrimitiveGUI // purpose : //================================================================================= -class PrimitiveGUI : public QObject +class PrimitiveGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + PrimitiveGUI(); // hide constructor to avoid direct creation public : - PrimitiveGUI(); ~PrimitiveGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only PrimitiveGUI object + static PrimitiveGUI* GetPrimitiveGUI(); - void MakeBoxAndDisplay(const gp_Pnt P1, const gp_Pnt P2); - void MakeCylinderAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, - const double Radius, const double aHeight); - void MakeSphereAndDisplay(const gp_Pnt aCenterPoint, const double aRadius); - void MakeTorusAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, - const double Radius1, const double Radius2); - void MakeConeAndDisplay(const gp_Pnt BasePoint, const gp_Dir aDir, - const double Radius1, const double Radius2, const double aHeight); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); +private: + static PrimitiveGUI* myGUIObject; // the only PrimitiveGUI object }; #endif diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 24b638432..de16e300b 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -26,12 +26,17 @@ // Module : GEOM // $Header$ -using namespace std; #include "PrimitiveGUI_BoxDlg.h" -#include -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" + +using namespace std; + //================================================================================= // class : PrimitiveGUI_BoxDlg() @@ -40,7 +45,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(QWidget* parent, const char* name, PrimitiveGUI* thePrimitiveGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM", tr("ICON_DLG_BOX_2P"))); @@ -68,12 +73,10 @@ PrimitiveGUI_BoxDlg::PrimitiveGUI_BoxDlg(QWidget* parent, const char* name, Prim GroupDimensions->TextLabel2->setText(tr("GEOM_DY")); GroupDimensions->TextLabel3->setText(tr("GEOM_DZ")); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - - /* Initialisations */ - myPrimitiveGUI = thePrimitiveGUI; + Init(); } @@ -95,20 +98,15 @@ PrimitiveGUI_BoxDlg::~PrimitiveGUI_BoxDlg() void PrimitiveGUI_BoxDlg::Init() { /* init variables */ - myConstructorId = 0; myEditCurrentArgument = GroupPoints->LineEdit1; - - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(0.0, 0.0, 0.0); - myOkPoint1 = myOkPoint2 = false; - - /* Vertices Filter for all arguments */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); - + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); + /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes */ GroupDimensions->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); @@ -131,9 +129,9 @@ void PrimitiveGUI_BoxDlg::Init() connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); @@ -141,12 +139,8 @@ void PrimitiveGUI_BoxDlg::Init() connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return; + initName( tr( "GEOM_BOX" ) ); + ConstructorsClicked(0); } @@ -156,27 +150,23 @@ void PrimitiveGUI_BoxDlg::Init() //================================================================================= void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); disconnect(mySelection, 0, this, 0); - myOkPoint1 = myOkPoint2 = false; - + switch (constructorId) { case 0: { + globalSelection( GEOM_POINT ); + GroupDimensions->hide(); resize(0, 0); GroupPoints->show(); - + myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit1->setText(""); GroupPoints->LineEdit2->setText(""); - - /* filter for next selection */ - mySelection->AddFilter(myVertexFilter); + myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } @@ -185,21 +175,11 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId) GroupPoints->hide(); resize(0, 0); GroupDimensions->show(); - - double initValue = 200.0; - GroupDimensions->SpinBox_DX->SetValue(initValue); - GroupDimensions->SpinBox_DY->SetValue(initValue); - GroupDimensions->SpinBox_DZ->SetValue(initValue); - - myPoint1.SetCoord(0.0, 0.0, 0.0) ; - myPoint2.SetCoord(initValue, initValue, initValue); - - mySimulationTopoDs = BRepPrimAPI_MakeBox(myPoint1, myPoint2).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + break; } } - return; + displayPreview(); } @@ -209,9 +189,8 @@ void PrimitiveGUI_BoxDlg::ConstructorsClicked(int constructorId) //================================================================================= void PrimitiveGUI_BoxDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -219,36 +198,24 @@ void PrimitiveGUI_BoxDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void PrimitiveGUI_BoxDlg::ClickOnApply() +bool PrimitiveGUI_BoxDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} - switch(myConstructorId) - { - case 0 : - { - if(myOkPoint1 && myOkPoint2) - myPrimitiveGUI->MakeBoxAndDisplay(myPoint1, myPoint2); - break; - } - case 1 : - { - /* Recup args and call method */ - double vx = GroupDimensions->SpinBox_DX->GetValue(); - double vy = GroupDimensions->SpinBox_DY->GetValue(); - double vz = GroupDimensions->SpinBox_DZ->GetValue(); - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(vx, vy, vz); - myPrimitiveGUI->MakeBoxAndDisplay(myPoint1, myPoint2); - break; - } - } - return; + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void PrimitiveGUI_BoxDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -258,38 +225,35 @@ void PrimitiveGUI_BoxDlg::ClickOnApply() //================================================================================= void PrimitiveGUI_BoxDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if (myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if ( myEditCurrentArgument == GroupPoints->LineEdit2) - myOkPoint2 = false; + if ( getConstructorId() != 0 ) return; - } + + myEditCurrentArgument->setText(""); + + if (mySelection->IObjectCount() != 1) + { + if (myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint1 = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == GroupPoints->LineEdit2) + myPoint2 = GEOM::GEOM_Object::_nil(); + return; + } // nbSel == 1 - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + + if(!testResult || CORBA::is_nil( aSelectedObject )) return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - myEditCurrentArgument->setText(aString); - myOkPoint1 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->VertexToPoint(S, myPoint2)) { - myEditCurrentArgument->setText(aString); - myOkPoint2 = true; - } - - if(myOkPoint1 && myOkPoint2 && TestBoxDimensions(myPoint1, myPoint2)) { - mySimulationTopoDs = BRepPrimAPI_MakeBox(myPoint1, myPoint2).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - return; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint1 = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + myPoint2 = aSelectedObject; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -299,23 +263,17 @@ void PrimitiveGUI_BoxDlg::SelectionIntoArgument() //================================================================================= void PrimitiveGUI_BoxDlg::SetEditCurrentArgument() { - if(myConstructorId != 0) - return; - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); + + if(send == GroupPoints->PushButton1) myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); + else if(send == GroupPoints->PushButton2) myEditCurrentArgument = GroupPoints->LineEdit2; - } - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); - - return; + + globalSelection( GEOM_POINT ); + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -326,15 +284,11 @@ void PrimitiveGUI_BoxDlg::SetEditCurrentArgument() void PrimitiveGUI_BoxDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -346,11 +300,8 @@ void PrimitiveGUI_BoxDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 0) - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); } @@ -360,10 +311,18 @@ void PrimitiveGUI_BoxDlg::ActivateThisDialog() //================================================================================= void PrimitiveGUI_BoxDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void PrimitiveGUI_BoxDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -371,49 +330,77 @@ void PrimitiveGUI_BoxDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox(double newValue) +void PrimitiveGUI_BoxDlg::ValueChangedInSpinBox() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - QObject* send = (QObject*)sender(); - double vx, vy, vz; - - if(send == GroupDimensions->SpinBox_DX) { - vx = newValue; - vy = GroupDimensions->SpinBox_DY->GetValue(); - vz = GroupDimensions->SpinBox_DZ->GetValue(); - } - else if(send == GroupDimensions->SpinBox_DY) { - vx = GroupDimensions->SpinBox_DX->GetValue(); - vy = newValue; - vz = GroupDimensions->SpinBox_DZ->GetValue(); - } - else if(send == GroupDimensions->SpinBox_DZ) { - vx = GroupDimensions->SpinBox_DX->GetValue(); - vy = GroupDimensions->SpinBox_DY->GetValue(); - vz = newValue; - } + displayPreview(); +} - myPoint1.SetCoord(0.0, 0.0, 0.0); - myPoint2.SetCoord(vx, vy, vz); - if(TestBoxDimensions(myPoint1, myPoint2)) { - mySimulationTopoDs = BRepPrimAPI_MakeBox(myPoint1, myPoint2).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - return; +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr PrimitiveGUI_BoxDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); } //================================================================================= -// function : TestBoxDimensions() +// function : isValid +// purpose : +//================================================================================= +bool PrimitiveGUI_BoxDlg::isValid( QString& msg ) +{ + return getConstructorId() == 0 ? !(myPoint1->_is_nil() || myPoint2->_is_nil()) : true; +} + + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool PrimitiveGUI_BoxDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + if ( !CORBA::is_nil( myPoint1 ) && !CORBA::is_nil( myPoint2 ) ) { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeBoxTwoPnt( myPoint1, myPoint2 ); + res = true; + } + + break; + } + case 1 : + { + double x = GroupDimensions->SpinBox_DX->GetValue(); + double y = GroupDimensions->SpinBox_DY->GetValue(); + double z = GroupDimensions->SpinBox_DZ->GetValue(); + + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeBoxDXDYDZ( x, y, z ); + res = true; + + break; + } + } + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent // purpose : //================================================================================= -bool PrimitiveGUI_BoxDlg::TestBoxDimensions(gp_Pnt P1, gp_Pnt P2) +void PrimitiveGUI_BoxDlg::closeEvent( QCloseEvent* e ) { - if ((fabs(P1.X() - P2.X()) > Precision::Confusion()) && - (fabs(P1.Y() - P2.Y()) > Precision::Confusion()) && - (fabs(P1.Z() - P2.Z()) > Precision::Confusion())) - return true; - return false; + GEOMBase_Skeleton::closeEvent( e ); } diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h index 0638af8fe..1756b3984 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.h @@ -33,10 +33,7 @@ #include "DlgRef_2Sel_QTD.h" #include "DlgRef_3Spin.h" -#include "PrimitiveGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" -#include +using namespace std; //================================================================================= // class : PrimitiveGUI_BoxDlg @@ -45,40 +42,40 @@ class PrimitiveGUI_BoxDlg : public GEOMBase_Skeleton { Q_OBJECT - -public: - PrimitiveGUI_BoxDlg(QWidget* parent = 0, const char* name = 0, PrimitiveGUI* thePrimitiveGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + + public: + PrimitiveGUI_BoxDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~PrimitiveGUI_BoxDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); private : void Init(); void enterEvent(QEvent* e); - bool TestBoxDimensions(gp_Pnt P1, gp_Pnt P2); - - PrimitiveGUI* myPrimitiveGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* filter for selection */ - - gp_Pnt myPoint1; /* Points containing the vector */ - gp_Pnt myPoint2; - bool myOkPoint1; /* true when myPoint is defined */ - bool myOkPoint2; - + + GEOM::GEOM_Object_var myPoint1, myPoint2; /* Points containing the vector */ + DlgRef_2Sel_QTD* GroupPoints; DlgRef_3Spin* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ConstructorsClicked(int constructorId); - void ValueChangedInSpinBox(double newValue); - + void ConstructorsClicked(int); + void ValueChangedInSpinBox(); + }; #endif // DIALOGBOX_BOX_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index f9af4748d..2a4055a6b 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -28,12 +28,10 @@ #include "PrimitiveGUI_ConeDlg.h" -#include -#include -#include -#include -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" #include "utilities.h" @@ -46,7 +44,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(QWidget* parent, const char* name, PrimitiveGUI* thePrimitiveGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CONE_PV"))); @@ -77,12 +75,10 @@ PrimitiveGUI_ConeDlg::PrimitiveGUI_ConeDlg(QWidget* parent, const char* name, Pr GroupDimensions->TextLabel2->setText(tr("GEOM_RADIUS_I").arg("2")); GroupDimensions->TextLabel3->setText(tr("GEOM_HEIGHT")); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - /* Initialisations */ - myPrimitiveGUI = thePrimitiveGUI; Init(); } @@ -104,23 +100,15 @@ PrimitiveGUI_ConeDlg::~PrimitiveGUI_ConeDlg() void PrimitiveGUI_ConeDlg::Init() { /* init variables */ - myConstructorId = 0; myEditCurrentArgument = GroupPoints->LineEdit1; - - myRadius1 = 100.0; - myRadius2 = 0.0; - myHeight = 300.0; - - myOkRadius1 = myOkRadius2 = myOkHeight = true; - myOkPoint1 = myOkDir = false; - - myEdgeFilter = new GEOM_EdgeFilter(StdSelect_Line, myGeom); - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); - + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + myPoint = myDir = GEOM::GEOM_Object::_nil(); + /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes & initial values */ GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, 999.999, step, 3); @@ -130,12 +118,13 @@ void PrimitiveGUI_ConeDlg::Init() GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, 999.999, step, 3); GroupDimensions->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myRadius1); - GroupPoints->SpinBox_DY->SetValue(myRadius2); - GroupPoints->SpinBox_DZ->SetValue(myHeight); - GroupDimensions->SpinBox_DX->SetValue(myRadius1); - GroupDimensions->SpinBox_DY->SetValue(myRadius2); - GroupDimensions->SpinBox_DZ->SetValue(myHeight); + double aRadius1(100.0), aRadius2(0.0), aHeight(300.0); + GroupPoints->SpinBox_DX->SetValue(aRadius1); + GroupPoints->SpinBox_DY->SetValue(aRadius2); + GroupPoints->SpinBox_DZ->SetValue(aHeight); + GroupDimensions->SpinBox_DX->SetValue(aRadius1); + GroupDimensions->SpinBox_DY->SetValue(aRadius2); + GroupDimensions->SpinBox_DZ->SetValue(aHeight); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -148,12 +137,12 @@ void PrimitiveGUI_ConeDlg::Init() connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double))); @@ -163,13 +152,9 @@ void PrimitiveGUI_ConeDlg::Init() connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DZ, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return ; + + initName( tr( "GEOM_CONE" ) ); + ConstructorsClicked(0); } @@ -179,34 +164,22 @@ void PrimitiveGUI_ConeDlg::Init() //================================================================================= void PrimitiveGUI_ConeDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); disconnect(mySelection, 0, this, 0); - myOkHeight = myOkRadius1 = myOkRadius2 = true; - myRadius1 = 100.0; - myRadius2 = 0.0; - myHeight = 300.0; - - switch(myConstructorId) + + switch(constructorId) { case 0 : { + globalSelection( GEOM_POINT ); GroupDimensions->hide(); resize(0, 0); GroupPoints->show(); - myOkPoint1 = myOkDir = false; - + myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit1->setText(tr("")); GroupPoints->LineEdit2->setText(tr("")); + myPoint = myDir = GEOM::GEOM_Object::_nil(); - GroupPoints->SpinBox_DX->SetValue(myRadius1); - GroupPoints->SpinBox_DY->SetValue(myRadius2); - GroupPoints->SpinBox_DZ->SetValue(myHeight); - - /* filter for next selection */ - mySelection->AddFilter(myVertexFilter); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } @@ -215,20 +188,11 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked(int constructorId) GroupPoints->hide(); resize( 0, 0 ); GroupDimensions->show(); - myOkPoint1 = myOkDir = true; - - GroupDimensions->SpinBox_DX->SetValue(myRadius1); - GroupDimensions->SpinBox_DY->SetValue(myRadius2); - GroupDimensions->SpinBox_DZ->SetValue(myHeight); - myPoint1.SetCoord(0.0, 0.0, 0.0); - myDir.SetCoord(0.0, 0.0, 1.0); - - MakeConeSimulationAndDisplay(); break; } } - return ; + displayPreview(); } @@ -238,9 +202,8 @@ void PrimitiveGUI_ConeDlg::ConstructorsClicked(int constructorId) //================================================================================= void PrimitiveGUI_ConeDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -248,23 +211,24 @@ void PrimitiveGUI_ConeDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void PrimitiveGUI_ConeDlg::ClickOnApply() +bool PrimitiveGUI_ConeDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2 && myOkHeight) { - gp_Dir aDir = myDir; - /* allows user to reverse direction of construction with a negative height */ - if(this->myHeight < -Precision::Confusion()) - aDir.Reverse(); - myPrimitiveGUI->MakeConeAndDisplay(myPoint1, aDir, myRadius1, myRadius2, fabs(myHeight)); - } - return ; + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void PrimitiveGUI_ConeDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -274,39 +238,33 @@ void PrimitiveGUI_ConeDlg::ClickOnApply() //================================================================================= void PrimitiveGUI_ConeDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if (myEditCurrentArgument == GroupPoints->LineEdit2) - myOkDir = false; + if ( getConstructorId() != 0 ) return; - } + + if(mySelection->IObjectCount() != 1) + { + if(myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == GroupPoints->LineEdit2) + myDir = GEOM::GEOM_Object::_nil(); + return; + } /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if(!testResult || CORBA::is_nil( aSelectedObject )) return; - /* gp_Pnt : not used */ - if (myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPoints->LineEdit1->setText(aString); - myOkPoint1 = true; - } - else if (myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - GroupPoints->LineEdit2->setText(aString); - myOkDir = true; - } - - if(myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2 && myOkHeight) - MakeConeSimulationAndDisplay(); - return; + if (myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint = aSelectedObject; + else if (myEditCurrentArgument == GroupPoints->LineEdit2) + myDir = aSelectedObject; + + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + displayPreview(); } @@ -316,25 +274,19 @@ void PrimitiveGUI_ConeDlg::SelectionIntoArgument() //================================================================================= void PrimitiveGUI_ConeDlg::SetEditCurrentArgument() { - if(myConstructorId != 0) - return; - QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); + globalSelection( GEOM_POINT ); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -345,15 +297,12 @@ void PrimitiveGUI_ConeDlg::SetEditCurrentArgument() void PrimitiveGUI_ConeDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -365,14 +314,18 @@ void PrimitiveGUI_ConeDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 0) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - } - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void PrimitiveGUI_ConeDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -382,10 +335,8 @@ void PrimitiveGUI_ConeDlg::ActivateThisDialog() //================================================================================= void PrimitiveGUI_ConeDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -393,58 +344,121 @@ void PrimitiveGUI_ConeDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox(double newValue) +void PrimitiveGUI_ConeDlg::ValueChangedInSpinBox() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - QObject* send = (QObject*)sender(); - - if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DX) { - myRadius1 = newValue; - myOkRadius1 = true; - } - else if(send == GroupPoints->SpinBox_DY || send == GroupDimensions->SpinBox_DY) { - myRadius2 = newValue; - myOkRadius2 = true; - } - else if(send == GroupPoints->SpinBox_DZ || send == GroupDimensions->SpinBox_DZ) { - myHeight = newValue; - myOkHeight = true; - } + displayPreview(); +} + - if (myOkPoint1 && myOkDir && myOkRadius1 && myOkRadius2 && myOkHeight) - MakeConeSimulationAndDisplay(); - return; +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr PrimitiveGUI_ConeDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); } +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool PrimitiveGUI_ConeDlg::isValid( QString& msg ) +{ + return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) : true; +} //================================================================================= -// function : MakeConeSimulationAndDisplay() +// function : execute // purpose : //================================================================================= -void PrimitiveGUI_ConeDlg::MakeConeSimulationAndDisplay() +bool PrimitiveGUI_ConeDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - gp_Dir aDir = myDir; + bool res = false; - try { - /* allows user to reverse direction of construction with a negative height */ - if(this->myHeight < -Precision::Confusion()) - aDir.Reverse(); - - gp_Ax2 anAxis(this->myPoint1, aDir); - - if(fabs(myRadius1 - myRadius2) <= Precision::Confusion()) - mySimulationTopoDs = BRepPrimAPI_MakeCylinder(anAxis, (myRadius1+myRadius2)/2.0, fabs(myHeight)).Shape(); - else { - if(fabs(myHeight) > Precision::Confusion()) - mySimulationTopoDs = BRepPrimAPI_MakeCone(anAxis, myRadius1, myRadius2, fabs(myHeight)).Shape(); + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + if ( !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir ) ){ + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeConePntVecR1R2H( myPoint, + myDir, + getRadius1(), + getRadius2(), + getHeight()); + res = true; } - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + break; } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeConeSimulationAndDisplay"); + case 1 : + { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeConeR1R2H( getRadius1(), + getRadius2(), + getHeight()); + res = true; + break; + } } - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void PrimitiveGUI_ConeDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : getRadius1() +// purpose : +//================================================================================= +double PrimitiveGUI_ConeDlg::getRadius1() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DX->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DX->GetValue(); + return 0; +} + + +//================================================================================= +// function : getRadius2() +// purpose : +//================================================================================= +double PrimitiveGUI_ConeDlg::getRadius2() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DY->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DY->GetValue(); + return 0; +} + + +//================================================================================= +// function : getRadius2() +// purpose : +//================================================================================= +double PrimitiveGUI_ConeDlg::getHeight() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DZ->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DZ->GetValue(); + return 0; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h index 20ea84f88..4cd7f5b88 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.h @@ -33,14 +33,6 @@ #include "DlgRef_2Sel3Spin.h" #include "DlgRef_3Spin.h" -#include "PrimitiveGUI.h" - -#include "GEOM_EdgeFilter.hxx" -#include "GEOM_ShapeTypeFilter.hxx" - -#include -#include - //================================================================================= // class : PrimitiveGUI_ConeDlg // purpose : @@ -50,45 +42,40 @@ class PrimitiveGUI_ConeDlg : public GEOMBase_Skeleton Q_OBJECT public: - PrimitiveGUI_ConeDlg(QWidget* parent = 0, const char* name = 0, PrimitiveGUI* thePrimitiveGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + PrimitiveGUI_ConeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~PrimitiveGUI_ConeDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private: void Init(); void enterEvent(QEvent* e); - void MakeConeSimulationAndDisplay(); - - PrimitiveGUI* myPrimitiveGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - Handle(GEOM_EdgeFilter) myEdgeFilter; /* Filter selection */ - - gp_Pnt myPoint1; /* topology used */ - gp_Dir myDir; - bool myOkPoint1; /* to check when arguments is defined */ - bool myOkDir; - - Standard_Real myRadius1; - Standard_Real myRadius2; - Standard_Real myHeight; - bool myOkRadius1; - bool myOkRadius2; - bool myOkHeight; - + double getRadius1() const; + double getRadius2() const; + double getHeight() const; + + GEOM::GEOM_Object_var myPoint, myDir; + DlgRef_2Sel3Spin* GroupPoints; DlgRef_3Spin* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ConstructorsClicked(int constructorId); - void ValueChangedInSpinBox(double newValue); + void ConstructorsClicked(int); + void ValueChangedInSpinBox(); }; diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index d12e8dc42..4da544407 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -28,11 +28,10 @@ #include "PrimitiveGUI_CylinderDlg.h" -#include -#include -#include -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" #include "utilities.h" @@ -45,7 +44,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(QWidget* parent, const char* name, PrimitiveGUI* thePrimitiveGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CYLINDER_PV"))); @@ -74,12 +73,10 @@ PrimitiveGUI_CylinderDlg::PrimitiveGUI_CylinderDlg(QWidget* parent, const char* GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS")); GroupDimensions->TextLabel2->setText(tr("GEOM_HEIGHT")); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - /* Initialisations */ - myPrimitiveGUI = thePrimitiveGUI; Init(); } @@ -101,21 +98,15 @@ PrimitiveGUI_CylinderDlg::~PrimitiveGUI_CylinderDlg() void PrimitiveGUI_CylinderDlg::Init() { /* init variables */ - myConstructorId = 0; myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); - myRadius = 100.0; - myHeight = 300.0; - myOkRadius = myOkHeight = true; - myOkPoint1 = myOkDir = false; - - myEdgeFilter = new GEOM_EdgeFilter(StdSelect_Line, myGeom); - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); - + myPoint = myDir = GEOM::GEOM_Object::_nil(); + /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes & initial values */ /* First constructor : radius */ @@ -127,10 +118,10 @@ void PrimitiveGUI_CylinderDlg::Init() /* Second constructor : algebric height */ GroupDimensions->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myRadius); - GroupPoints->SpinBox_DY->SetValue(myHeight); - GroupDimensions->SpinBox_DX->SetValue(myRadius); - GroupDimensions->SpinBox_DY->SetValue(myHeight); + GroupPoints->SpinBox_DX->SetValue(100.0); + GroupPoints->SpinBox_DY->SetValue(300.0); + GroupDimensions->SpinBox_DX->SetValue(100.0); + GroupDimensions->SpinBox_DY->SetValue(300.0); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -143,10 +134,10 @@ void PrimitiveGUI_CylinderDlg::Init() connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double))); @@ -154,13 +145,9 @@ void PrimitiveGUI_CylinderDlg::Init() connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return ; + + initName( tr( "GEOM_CYLINDER" ) ); + ConstructorsClicked(0); } @@ -170,32 +157,23 @@ void PrimitiveGUI_CylinderDlg::Init() //================================================================================= void PrimitiveGUI_CylinderDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); disconnect(mySelection, 0, this, 0); - myOkHeight = myOkRadius = true; - myRadius = 100.0; - myHeight = 300.0; - - switch(myConstructorId) + + switch(constructorId) { case 0 : { + globalSelection( GEOM_POINT ); + GroupDimensions->hide(); resize(0, 0); GroupPoints->show(); - myOkPoint1 = myOkDir = false; - + myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit1->setText(tr("")); GroupPoints->LineEdit2->setText(tr("")); - - GroupPoints->SpinBox_DX->SetValue(myRadius); - GroupPoints->SpinBox_DY->SetValue(myHeight); + myPoint = myDir = GEOM::GEOM_Object::_nil(); - /* filter for next selection */ - mySelection->AddFilter(myVertexFilter); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } @@ -204,18 +182,11 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked(int constructorId) GroupPoints->hide(); resize( 0, 0 ); GroupDimensions->show(); - myOkPoint1 = myOkDir = true; - - GroupDimensions->SpinBox_DX->SetValue(myRadius); - GroupDimensions->SpinBox_DY->SetValue(myHeight); - myPoint1.SetCoord(0.0, 0.0, 0.0); - myDir.SetCoord(0.0, 0.0, 1.0); - - MakeCylinderSimulationAndDisplay(); + break; } } - return ; + displayPreview(); } @@ -225,9 +196,8 @@ void PrimitiveGUI_CylinderDlg::ConstructorsClicked(int constructorId) //================================================================================= void PrimitiveGUI_CylinderDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -235,23 +205,24 @@ void PrimitiveGUI_CylinderDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void PrimitiveGUI_CylinderDlg::ClickOnApply() +bool PrimitiveGUI_CylinderDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkPoint1 && myOkDir && myOkRadius && myOkHeight) { - gp_Dir aDir = myDir; - /* allows user to reverse direction of construction with a negative height */ - if(this->myHeight < -Precision::Confusion()) - aDir.Reverse(); - myPrimitiveGUI->MakeCylinderAndDisplay(myPoint1, aDir, myRadius, fabs(myHeight)); - } - return; + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void PrimitiveGUI_CylinderDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -261,39 +232,35 @@ void PrimitiveGUI_CylinderDlg::ClickOnApply() //================================================================================= void PrimitiveGUI_CylinderDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if (myEditCurrentArgument == GroupPoints->LineEdit2) - myOkDir = false; + if ( getConstructorId() != 0 ) return; - } + myEditCurrentArgument->setText(""); + + if(mySelection->IObjectCount() != 1) + { + if(myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint = GEOM::GEOM_Object::_nil(); + else if (myEditCurrentArgument == GroupPoints->LineEdit2) + myDir = GEOM::GEOM_Object::_nil(); + return; + } + /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if(!testResult || CORBA::is_nil( aSelectedObject )) return; - - /* gp_Pnt : not used */ - if (myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPoints->LineEdit1->setText(aString); - myOkPoint1 = true; - } - else if (myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - GroupPoints->LineEdit2->setText(aString); - myOkDir = true; - } - if(myOkPoint1 && myOkDir && myOkRadius && myOkHeight) - MakeCylinderSimulationAndDisplay(); - return; + if (myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint = aSelectedObject; + else if (myEditCurrentArgument == GroupPoints->LineEdit2) + myDir = aSelectedObject; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -303,25 +270,19 @@ void PrimitiveGUI_CylinderDlg::SelectionIntoArgument() //================================================================================= void PrimitiveGUI_CylinderDlg::SetEditCurrentArgument() { - if(myConstructorId != 0) - return; - QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); + globalSelection( GEOM_POINT ); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -332,15 +293,12 @@ void PrimitiveGUI_CylinderDlg::SetEditCurrentArgument() void PrimitiveGUI_CylinderDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -352,14 +310,8 @@ void PrimitiveGUI_CylinderDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 0) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - } - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); } @@ -369,10 +321,18 @@ void PrimitiveGUI_CylinderDlg::ActivateThisDialog() //================================================================================= void PrimitiveGUI_CylinderDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void PrimitiveGUI_CylinderDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -380,50 +340,101 @@ void PrimitiveGUI_CylinderDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox // purpose : //================================================================================= -void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox( double newValue ) +void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox( ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - QObject* send = (QObject*)sender(); - - /* radius */ - if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DX) { - myRadius = newValue; - myOkRadius = true; - } /* algebric height */ - else if(send == GroupPoints->SpinBox_DY || send == GroupDimensions->SpinBox_DY) { - myHeight = newValue; - myOkHeight = true; - } + displayPreview(); +} + - if (myOkPoint1 && myOkDir && myOkRadius && myOkHeight) - MakeCylinderSimulationAndDisplay(); - return; +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr PrimitiveGUI_CylinderDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); } //================================================================================= -// function : MakeCylinderSimulationAndDisplay() +// function : isValid // purpose : //================================================================================= -void PrimitiveGUI_CylinderDlg::MakeCylinderSimulationAndDisplay() +bool PrimitiveGUI_CylinderDlg::isValid( QString& msg ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - gp_Dir aDir = this->myDir; + return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil() ) : true; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool PrimitiveGUI_CylinderDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + if ( !CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir )) { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeCylinderPntVecRH(myPoint, myDir, getRadius(), getHeight()); + res = true; + } + break; + } + case 1 : + { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeCylinderRH(getRadius(), getHeight()); + res = true; + + break; + } + } - try { - /* allows user to reverse direction of construction with a negative height */ - if(this->myHeight < -Precision::Confusion()) - aDir.Reverse(); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} - gp_Ax2 anAxis(this->myPoint1, aDir); +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void PrimitiveGUI_CylinderDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} - mySimulationTopoDs = BRepPrimAPI_MakeCylinder(anAxis, this->myRadius, fabs(myHeight)).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeCylinderSimulationAndDisplay"); - } - return; + +//================================================================================= +// function : getRadius() +// purpose : +//================================================================================= +double PrimitiveGUI_CylinderDlg::getRadius() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DX->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DX->GetValue(); + return 0; +} + + +//================================================================================= +// function : getHeight() +// purpose : +//================================================================================= +double PrimitiveGUI_CylinderDlg::getHeight() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DY->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DY->GetValue(); + return 0; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h index 47cc31526..6a182ef13 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.h @@ -33,13 +33,6 @@ #include "DlgRef_2Sel2Spin.h" #include "DlgRef_2Spin.h" -#include "PrimitiveGUI.h" - -#include "GEOM_EdgeFilter.hxx" -#include "GEOM_ShapeTypeFilter.hxx" - -#include -#include //================================================================================= // class : PrimitiveGUI_CylinderDlg @@ -50,44 +43,39 @@ class PrimitiveGUI_CylinderDlg : public GEOMBase_Skeleton Q_OBJECT public: - PrimitiveGUI_CylinderDlg(QWidget* parent = 0, const char* name = 0, PrimitiveGUI* thePrimitiveGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + PrimitiveGUI_CylinderDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~PrimitiveGUI_CylinderDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private: void Init(); void enterEvent(QEvent* e); - void MakeCylinderSimulationAndDisplay(); - - PrimitiveGUI* myPrimitiveGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - Handle(GEOM_EdgeFilter) myEdgeFilter; /* Filter selection */ - - gp_Pnt myPoint1; /* topology used */ - gp_Dir myDir; - bool myOkPoint1; /* to check when arguments is defined */ - bool myOkDir; - - Standard_Real myRadius; - Standard_Real myHeight; - bool myOkRadius; - bool myOkHeight; - + double getRadius() const; + double getHeight() const; + + GEOM::GEOM_Object_var myPoint, myDir; + DlgRef_2Sel2Spin* GroupPoints; DlgRef_2Spin* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ConstructorsClicked(int constructorId); - void ValueChangedInSpinBox(double newValue); - + void ConstructorsClicked(int); + void ValueChangedInSpinBox(); }; #endif // DIALOGBOX_CYLINDER_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx index d13352dc2..f1dbaf002 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.cxx @@ -29,8 +29,14 @@ using namespace std; #include "PrimitiveGUI_SphereDlg.h" -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" + +using namespace std; //================================================================================= // class : PrimitiveGUI_SphereDlg() @@ -39,7 +45,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(QWidget* parent, const char* name, PrimitiveGUI* thePrimitiveGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SPHERE_P"))); @@ -64,12 +70,10 @@ PrimitiveGUI_SphereDlg::PrimitiveGUI_SphereDlg(QWidget* parent, const char* nam GroupDimensions->GroupBox1->setTitle(tr("GEOM_SPHERE_RO")); GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS")); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - /* Initialisations */ - myPrimitiveGUI = thePrimitiveGUI; Init(); } @@ -91,26 +95,20 @@ PrimitiveGUI_SphereDlg::~PrimitiveGUI_SphereDlg() void PrimitiveGUI_SphereDlg::Init() { /* init variables */ - myConstructorId = 0; myEditCurrentArgument = GroupPoints->LineEdit1; - - myPoint1.SetCoord(0.0, 0.0, 0.0); - myRadius = 100.0; - myOkPoint1 = false; - - /* Vertices Filter for all arguments */ - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); - + GroupPoints->LineEdit1->setReadOnly( true ); + + myPoint = GEOM::GEOM_Object::_nil(); + /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes */ GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myRadius); - GroupDimensions->SpinBox_DX->SetValue(myRadius); + GroupPoints->SpinBox_DX->SetValue(100.0); + GroupDimensions->SpinBox_DX->SetValue(100.0); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -120,20 +118,16 @@ void PrimitiveGUI_SphereDlg::Init() connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return; + initName(tr("GEOM_SPHERE")); + ConstructorsClicked(0); } @@ -143,28 +137,21 @@ void PrimitiveGUI_SphereDlg::Init() //================================================================================= void PrimitiveGUI_SphereDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); disconnect(mySelection, 0, this, 0); - myRadius = 100.0; - + switch (constructorId) { case 0: { + globalSelection( GEOM_POINT ); GroupDimensions->hide(); resize(0, 0); GroupPoints->show(); myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit1->setText(""); + myPoint = GEOM::GEOM_Object::_nil(); - GroupPoints->SpinBox_DX->SetValue(myRadius); - myOkPoint1 = false; - - /* filter for next selections */ - mySelection->AddFilter(myVertexFilter); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } @@ -173,17 +160,11 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked(int constructorId) GroupPoints->hide(); resize(0, 0); GroupDimensions->show(); - - GroupDimensions->SpinBox_DX->SetValue(myRadius); - myPoint1.SetCoord(0.0, 0.0, 0.0); /* at origin */ - myOkPoint1 = true; - - mySimulationTopoDs = BRepPrimAPI_MakeSphere(myPoint1, myRadius).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + break; } } - return ; + displayPreview(); } @@ -193,9 +174,8 @@ void PrimitiveGUI_SphereDlg::ConstructorsClicked(int constructorId) //================================================================================= void PrimitiveGUI_SphereDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -203,18 +183,25 @@ void PrimitiveGUI_SphereDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void PrimitiveGUI_SphereDlg::ClickOnApply() +bool PrimitiveGUI_SphereDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if(mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} - if(myOkPoint1) - myPrimitiveGUI->MakeSphereAndDisplay(myPoint1, myRadius); - return; + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void PrimitiveGUI_SphereDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -224,35 +211,28 @@ void PrimitiveGUI_SphereDlg::ClickOnApply() //================================================================================= void PrimitiveGUI_SphereDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); + if ( getConstructorId() != 0 ) + return; + myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - GroupPoints->LineEdit1->setText(""); - myOkPoint1 = false; + + if(mySelection->IObjectCount() != 1) + { + myPoint = GEOM::GEOM_Object::_nil(); + return; } - return; - } /* nbSel == 1 ! */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_ptr aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if (!testResult || CORBA::is_nil( aSelectedObject )) return; - /* Constructor 1 treatment */ - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPoints->LineEdit1->setText(aString); - myOkPoint1 = true; - } + myPoint = aSelectedObject; + myEditCurrentArgument->setText( GEOMBase::GetName( myPoint ) ); - if(myOkPoint1) { - mySimulationTopoDs = BRepPrimAPI_MakeSphere(myPoint1, myRadius).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - return ; + displayPreview(); } @@ -264,12 +244,10 @@ void PrimitiveGUI_SphereDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -279,18 +257,14 @@ void PrimitiveGUI_SphereDlg::LineEditReturnPressed() //================================================================================= void PrimitiveGUI_SphereDlg::SetEditCurrentArgument() { - if(myConstructorId != 0) - return; - QPushButton* send = (QPushButton*)sender(); - + if(send == GroupPoints->PushButton1) { GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - this->SelectionIntoArgument(); + globalSelection( GEOM_POINT ); + SelectionIntoArgument(); } - return; } @@ -302,11 +276,18 @@ void PrimitiveGUI_SphereDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 0) - mySelection->AddFilter(myVertexFilter); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void PrimitiveGUI_SphereDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -316,10 +297,8 @@ void PrimitiveGUI_SphereDlg::ActivateThisDialog() //================================================================================= void PrimitiveGUI_SphereDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -327,15 +306,87 @@ void PrimitiveGUI_SphereDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox(double newValue) +void PrimitiveGUI_SphereDlg::ValueChangedInSpinBox() +{ + displayPreview(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr PrimitiveGUI_SphereDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool PrimitiveGUI_SphereDlg::isValid( QString& msg ) +{ + return getConstructorId() == 0 ? !myPoint->_is_nil() : true; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool PrimitiveGUI_SphereDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myRadius = newValue; + bool res = false; - if(myOkPoint1) { - mySimulationTopoDs = BRepPrimAPI_MakeSphere(myPoint1, myRadius).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + if ( !CORBA::is_nil( myPoint ) ) { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeSpherePntR( myPoint, getRadius() ); + res = true; + } + break; + } + case 1 : + { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeSphereR( getRadius() ); + res = true; + break; + } } - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void PrimitiveGUI_SphereDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + + + +//================================================================================= +// function : getRadius() +// purpose : +//================================================================================= +double PrimitiveGUI_SphereDlg::getRadius() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DX->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DX->GetValue(); + return 0; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h index c09fe193c..af41f7dcf 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_SphereDlg.h @@ -33,10 +33,6 @@ #include "DlgRef_1Sel1Spin.h" #include "DlgRef_1Spin.h" -#include "PrimitiveGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" -#include //================================================================================= // class : PrimitiveGUI_SphereDlg @@ -47,36 +43,38 @@ class PrimitiveGUI_SphereDlg : public GEOMBase_Skeleton Q_OBJECT public: - PrimitiveGUI_SphereDlg(QWidget* parent = 0, const char* name = 0, PrimitiveGUI* thePrimitiveGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + PrimitiveGUI_SphereDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~PrimitiveGUI_SphereDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - - PrimitiveGUI* myPrimitiveGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; /* filter for selection */ - - gp_Pnt myPoint1; /* Points containing the vector */ - Standard_Real myRadius; - bool myOkPoint1; - + double getRadius() const; + + GEOM::GEOM_Object_var myPoint; /* Center point */ + DlgRef_1Sel1Spin* GroupPoints; DlgRef_1Spin* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ConstructorsClicked(int constructorId); - void ValueChangedInSpinBox(double newValue); - + void ConstructorsClicked(int); + void ValueChangedInSpinBox(); }; #endif // DIALOGBOX_SPHERE_H diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx index 90aa6db8b..3c622ef4d 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.cxx @@ -28,10 +28,10 @@ #include "PrimitiveGUI_TorusDlg.h" -#include -#include -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" #include "utilities.h" @@ -44,7 +44,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(QWidget* parent, const char* name, PrimitiveGUI* thePrimitiveGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TORUS_PV"))); @@ -73,12 +73,10 @@ PrimitiveGUI_TorusDlg::PrimitiveGUI_TorusDlg(QWidget* parent, const char* name, GroupDimensions->TextLabel1->setText(tr("GEOM_RADIUS_I").arg("1")); GroupDimensions->TextLabel2->setText(tr("GEOM_RADIUS_I").arg("2")); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - - /* Initialisations */ - myPrimitiveGUI = thePrimitiveGUI; + Init(); } @@ -100,20 +98,15 @@ PrimitiveGUI_TorusDlg::~PrimitiveGUI_TorusDlg() void PrimitiveGUI_TorusDlg::Init() { /* init variables */ - myConstructorId = 0; myEditCurrentArgument = GroupPoints->LineEdit1; - - myRadius1 = 300.0; - myRadius2 = 100.0; - myOkPoint1 = myOkDir = false; - - myEdgeFilter = new GEOM_EdgeFilter(StdSelect_Line, myGeom); - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - mySelection->AddFilter(myVertexFilter); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + myPoint = myDir = GEOM::GEOM_Object::_nil(); /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); /* min, max, step and decimals for spin boxes & initial values */ GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); @@ -121,10 +114,10 @@ void PrimitiveGUI_TorusDlg::Init() GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, step, 3); GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, 999.999, step, 3); - GroupPoints->SpinBox_DX->SetValue(myRadius1); - GroupPoints->SpinBox_DY->SetValue(myRadius2); - GroupDimensions->SpinBox_DX->SetValue(myRadius1); - GroupDimensions->SpinBox_DY->SetValue(myRadius2); + GroupPoints->SpinBox_DX->SetValue(300.0); + GroupPoints->SpinBox_DY->SetValue(100.0); + GroupDimensions->SpinBox_DX->SetValue(300.0); + GroupDimensions->SpinBox_DY->SetValue(100.0); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -137,10 +130,10 @@ void PrimitiveGUI_TorusDlg::Init() connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupDimensions->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double))); @@ -148,13 +141,9 @@ void PrimitiveGUI_TorusDlg::Init() connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY, SLOT(SetStep(double))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return; + + initName( tr( "GEOM_TORUS" ) ); + ConstructorsClicked(0); } @@ -165,31 +154,23 @@ void PrimitiveGUI_TorusDlg::Init() //================================================================================= void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); disconnect(mySelection, 0, this, 0); - myRadius1 = 300.0; - myRadius2 = 100.0; - - switch(myConstructorId) + + switch(constructorId) { case 0 : { + globalSelection( GEOM_LINE ); + GroupDimensions->hide(); resize(0, 0); GroupPoints->show(); - myOkPoint1 = myOkDir = false; - + myEditCurrentArgument = GroupPoints->LineEdit1; GroupPoints->LineEdit1->setText(tr("")); GroupPoints->LineEdit2->setText(tr("")); + myPoint = myDir = GEOM::GEOM_Object::_nil(); - GroupPoints->SpinBox_DX->SetValue(myRadius1); - GroupPoints->SpinBox_DY->SetValue(myRadius2); - - /* filter for next selection */ - mySelection->AddFilter(myVertexFilter); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break ; } @@ -198,18 +179,11 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId) GroupPoints->hide(); resize( 0, 0 ); GroupDimensions->show(); - myOkPoint1 = myOkDir = true; - - GroupDimensions->SpinBox_DX->SetValue(myRadius1); - GroupDimensions->SpinBox_DY->SetValue(myRadius2); - myPoint1.SetCoord(0.0, 0.0, 0.0); - myDir.SetCoord(0.0, 0.0, 1.0); - - MakeTorusSimulationAndDisplay(); + break ; } } - return ; + displayPreview(); } @@ -219,9 +193,8 @@ void PrimitiveGUI_TorusDlg::ConstructorsClicked(int constructorId) //================================================================================= void PrimitiveGUI_TorusDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -229,18 +202,24 @@ void PrimitiveGUI_TorusDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void PrimitiveGUI_TorusDlg::ClickOnApply() +bool PrimitiveGUI_TorusDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; - if(myOkPoint1 && myOkDir) - myPrimitiveGUI->MakeTorusAndDisplay(myPoint1, myDir, myRadius1, myRadius2); - return ; + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void PrimitiveGUI_TorusDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -250,39 +229,35 @@ void PrimitiveGUI_TorusDlg::ClickOnApply() //================================================================================= void PrimitiveGUI_TorusDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); + if ( getConstructorId() != 0 ) + return; + myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkPoint1 = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkDir = false; - return; - } - + if(mySelection->IObjectCount() != 1) + { + if(myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint = GEOM::GEOM_Object::_nil(); + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + myDir = GEOM::GEOM_Object::_nil(); + return; + } + + /* nbSel == 1 */ - TopoDS_Shape S; - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - /* gp_Pnt : not used */ - if(myEditCurrentArgument == GroupPoints->LineEdit1 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPoints->LineEdit1->setText(aString); - myOkPoint1 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - GroupPoints->LineEdit2->setText(aString); - myOkDir = true; - } - - if(myOkPoint1 && myOkDir) - MakeTorusSimulationAndDisplay(); - return; + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), testResult ); + + if(!testResult || CORBA::is_nil( aSelectedObject )) + return; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) + myPoint = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + myDir = aSelectedObject; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + displayPreview(); } @@ -292,25 +267,19 @@ void PrimitiveGUI_TorusDlg::SelectionIntoArgument() //================================================================================= void PrimitiveGUI_TorusDlg::SetEditCurrentArgument() { - if(myConstructorId != 0) - return; - QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); + globalSelection( GEOM_POINT ); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -321,15 +290,12 @@ void PrimitiveGUI_TorusDlg::SetEditCurrentArgument() void PrimitiveGUI_TorusDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -341,14 +307,8 @@ void PrimitiveGUI_TorusDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - mySelection->AddFilter(myVertexFilter); - } - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); } @@ -358,10 +318,18 @@ void PrimitiveGUI_TorusDlg::ActivateThisDialog() //================================================================================= void PrimitiveGUI_TorusDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void PrimitiveGUI_TorusDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -369,51 +337,102 @@ void PrimitiveGUI_TorusDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox // purpose : //================================================================================= -void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox(double newValue) +void PrimitiveGUI_TorusDlg::ValueChangedInSpinBox() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - QObject* send = (QObject*)sender(); + displayPreview(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr PrimitiveGUI_TorusDlg::createOperation() +{ + return getGeomEngine()->GetI3DPrimOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool PrimitiveGUI_TorusDlg::isValid( QString& msg ) +{ + return getConstructorId() == 0 ? !(myPoint->_is_nil() || myDir->_is_nil()) : true; +} + + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool PrimitiveGUI_TorusDlg::execute( ObjectList& objects ) +{ + bool res = false; - if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DX) { - if(newValue > myRadius2) - myRadius1 = newValue; - else { - GroupPoints->SpinBox_DX->SetValue(myRadius1); - GroupDimensions->SpinBox_DX->SetValue(myRadius1); + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + if (!CORBA::is_nil( myPoint ) && !CORBA::is_nil( myDir )){ + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeTorusPntVecRR(myPoint, myDir, getRadius1(), getRadius2()); + res = true; } + break; } - else if(send == GroupPoints->SpinBox_DY || send == GroupDimensions->SpinBox_DY) { - if(newValue < myRadius1) - myRadius2 = newValue; - else { - GroupPoints->SpinBox_DY->SetValue(myRadius2); - GroupDimensions->SpinBox_DY->SetValue(myRadius2); + case 1 : + { + anObj = GEOM::GEOM_I3DPrimOperations::_narrow( getOperation() )->MakeTorusRR(getRadius1(), getRadius2()); + res = true; + break; } } - - if(myOkPoint1 && myOkDir) - MakeTorusSimulationAndDisplay(); - return; + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; } //================================================================================= -// function : MakeTorusSimulationAndDisplay() +// function : closeEvent // purpose : //================================================================================= -void PrimitiveGUI_TorusDlg::MakeTorusSimulationAndDisplay() +void PrimitiveGUI_TorusDlg::closeEvent( QCloseEvent* e ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + GEOMBase_Skeleton::closeEvent( e ); +} - try { - gp_Ax2 anAxis(myPoint1, myDir); - mySimulationTopoDs = BRepPrimAPI_MakeTorus(anAxis, myRadius1, myRadius2).Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeTorusSimulationAndDisplay"); - } - return; + +//================================================================================= +// function : getRadius1() +// purpose : +//================================================================================= +double PrimitiveGUI_TorusDlg::getRadius1() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DX->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DX->GetValue(); + return 0; +} + + +//================================================================================= +// function : getRadius2() +// purpose : +//================================================================================= +double PrimitiveGUI_TorusDlg::getRadius2() const +{ + int aConstructorId = getConstructorId(); + if (aConstructorId == 0) + return GroupPoints->SpinBox_DY->GetValue(); + else if (aConstructorId == 1) + return GroupDimensions->SpinBox_DY->GetValue(); + return 0; } diff --git a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h index 84068f432..b61b0e289 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h +++ b/src/PrimitiveGUI/PrimitiveGUI_TorusDlg.h @@ -33,13 +33,6 @@ #include "DlgRef_2Sel2Spin.h" #include "DlgRef_2Spin.h" -#include "PrimitiveGUI.h" - -#include "GEOM_EdgeFilter.hxx" -#include "GEOM_ShapeTypeFilter.hxx" - -#include -#include //================================================================================= // class : PrimitiveGUI_TorusDlg @@ -50,41 +43,39 @@ class PrimitiveGUI_TorusDlg : public GEOMBase_Skeleton Q_OBJECT public: - PrimitiveGUI_TorusDlg(QWidget* parent = 0, const char* name = 0, PrimitiveGUI* thePrimitiveGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + PrimitiveGUI_TorusDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~PrimitiveGUI_TorusDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private: void Init(); void enterEvent(QEvent* e); - void MakeTorusSimulationAndDisplay(); - - PrimitiveGUI* myPrimitiveGUI; - - double step; - int myConstructorId; - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - Handle(GEOM_EdgeFilter) myEdgeFilter; /* Filter selection */ - - gp_Pnt myPoint1; /* topology used */ - gp_Dir myDir; - bool myOkPoint1; /* to check when arguments is defined */ - bool myOkDir; - - Standard_Real myRadius1; - Standard_Real myRadius2; - + double getRadius1() const; + double getRadius2() const; + + GEOM::GEOM_Object_var myPoint, myDir; + DlgRef_2Sel2Spin* GroupPoints; DlgRef_2Spin* GroupDimensions; - -private slots: + + private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ConstructorsClicked(int constructorId); - void ValueChangedInSpinBox(double newValue); + void ConstructorsClicked(int); + void ValueChangedInSpinBox(); }; diff --git a/src/RepairGUI/Makefile.in b/src/RepairGUI/Makefile.in index 3b4d328f1..8bd14a9a5 100644 --- a/src/RepairGUI/Makefile.in +++ b/src/RepairGUI/Makefile.in @@ -42,26 +42,35 @@ LIB = libRepairGUI.la LIB_SRC = RepairGUI.cxx \ RepairGUI_SewingDlg.cxx \ - RepairGUI_OrientationDlg.cxx \ RepairGUI_SuppressFacesDlg.cxx \ - RepairGUI_SuppressHoleDlg.cxx - + RepairGUI_ShapeProcessDlg.cxx \ + RepairGUI_CloseContourDlg.cxx \ + RepairGUI_RemoveIntWiresDlg.cxx \ + RepairGUI_RemoveHolesDlg.cxx \ + RepairGUI_DivideEdgeDlg.cxx \ + RepairGUI_FreeBoundDlg.cxx \ + RepairGUI_GlueDlg.cxx + LIB_MOC = \ - RepairGUI.h \ RepairGUI_SewingDlg.h \ - RepairGUI_OrientationDlg.h \ RepairGUI_SuppressFacesDlg.h \ - RepairGUI_SuppressHoleDlg.h + RepairGUI_ShapeProcessDlg.h \ + RepairGUI_CloseContourDlg.h \ + RepairGUI_RemoveIntWiresDlg.h \ + RepairGUI_RemoveHolesDlg.h \ + RepairGUI_DivideEdgeDlg.h \ + RepairGUI_FreeBoundDlg.h \ + RepairGUI_GlueDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl -LIB_SERVER_IDL = +LIB_SERVER_IDL = # additionnal information to compil and link file CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome -LDFLAGS += -lDisplayGUI +LDFLAGS += -lGEOMBase @CONCLUDE@ diff --git a/src/RepairGUI/RepairGUI.cxx b/src/RepairGUI/RepairGUI.cxx index ab9be2e20..5b97e0d78 100644 --- a/src/RepairGUI/RepairGUI.cxx +++ b/src/RepairGUI/RepairGUI.cxx @@ -24,35 +24,50 @@ // File : RepairGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #include "RepairGUI.h" #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" #include "OCCViewer_Viewer3d.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" #include "RepairGUI_SewingDlg.h" // Method SEWING -#include "RepairGUI_OrientationDlg.h" // Method ORIENTATION #include "RepairGUI_SuppressFacesDlg.h" // Method SUPPRESS FACES -#include "RepairGUI_SuppressHoleDlg.h" // Method SUPPRESS HOLE +#include "RepairGUI_RemoveHolesDlg.h" // Method SUPPRESS HOLE +#include "RepairGUI_ShapeProcessDlg.h" // Method PROCESS SHAPE +#include "RepairGUI_CloseContourDlg.h" // Method CLOSE CONTOUR +#include "RepairGUI_RemoveIntWiresDlg.h"// Method REMOVE INTERNAL WIRES +#include "RepairGUI_DivideEdgeDlg.h" // Method DEVIDE EDGE +#include "RepairGUI_FreeBoundDlg.h" // Method FREE BOUNDARIES +#include "RepairGUI_GlueDlg.h" // Method GLUE FACES #include "utilities.h" using namespace std; +RepairGUI* RepairGUI::myGUIObject = 0; + +//======================================================================= +// function : GetRepairGUI() +// purpose : Get the only RepairGUI object [ static ] +//======================================================================= +RepairGUI* RepairGUI::GetRepairGUI() +{ + if ( myGUIObject == 0 ) { + // init RepairGUI only once + myGUIObject = new RepairGUI(); + } + return myGUIObject; +} + //======================================================================= // function : RepairGUI() // purpose : Constructor //======================================================================= -RepairGUI::RepairGUI() : - QObject() +RepairGUI::RepairGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); -// Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); -// myGeom = GEOM::GEOM_Gen::_narrow(comp); - myGeom = myGeomGUI->myComponentGeom; } @@ -71,264 +86,46 @@ RepairGUI::~RepairGUI() //======================================================================= bool RepairGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - RepairGUI* myRepairGUI = new RepairGUI(); - myRepairGUI->myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); - switch (theCommandID) - { + QDialog* aDlg = NULL; + switch (theCommandID) { case 601: // SEWING - { - RepairGUI_SewingDlg *aDlg = new RepairGUI_SewingDlg(parent, "", myRepairGUI, Sel); - break; - } - case 602: // ORIENTATION - { - RepairGUI_OrientationDlg *aDlg = new RepairGUI_OrientationDlg(parent, "", myRepairGUI, Sel); - break; - } - case 603: // SUPPRESS FACES : use ic - { - Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - RepairGUI_SuppressFacesDlg *aDlg = new RepairGUI_SuppressFacesDlg(parent, "", myRepairGUI, Sel, ic); - break; - } - case 604: // SUPPRESS HOLES : use ic - { - Handle(AIS_InteractiveContext) ic; - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - ic = v3d->getAISContext(); - } - RepairGUI_SuppressHoleDlg *aDlg = new RepairGUI_SuppressHoleDlg(parent, "", myRepairGUI, Sel, ic); - break; - } + aDlg = new RepairGUI_SewingDlg( parent, "", Sel ); + break; + case 602: // GLUE FACES + aDlg = new RepairGUI_GlueDlg( parent, "", Sel ); + break; + case 603: // SUPPRESS FACES + aDlg = new RepairGUI_SuppressFacesDlg( parent, "", Sel); + break; + case 604: // SUPPRESS HOLES + aDlg = new RepairGUI_RemoveHolesDlg( parent, "", Sel ); + break; + case 605: // SHAPE PROCESSING + aDlg = new RepairGUI_ShapeProcessDlg( parent, "", Sel ); + break; + case 606: // CLOSE CONTOUR + aDlg = new RepairGUI_CloseContourDlg( parent, "", Sel ); + break; + case 607: // REMOVE INTERNAL WIRES + aDlg = new RepairGUI_RemoveIntWiresDlg( parent, "", Sel ); + break; + case 608: // ADD POINT ON EDGE + aDlg = new RepairGUI_DivideEdgeDlg( parent, "", Sel ); + break; + case 609: // FREE BOUNDARIES + aDlg = new RepairGUI_FreeBoundDlg( parent, Sel ); + break; default: - { - parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); - break; - } - } - return true; -} - - -//===================================================================================== -// function : MakeSewingAndDisplay() -// purpose : -//===================================================================================== -void RepairGUI::MakeSewingAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR, - const Standard_Real precision) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeSewing(listShapesIOR, precision); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, result); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - result->NameType(type); - - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - return; + parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID)); + break; } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeOrientationChangeAndDisplay() -// purpose : -//===================================================================================== -void RepairGUI::MakeOrientationChangeAndDisplay(GEOM::GEOM_Shape_ptr Shape) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->OrientationChange(Shape); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(Shape->NameType()); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - return; - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : OnSuppressHole() -// purpose : To suppress an hole on a shape 'ShapeTopo'. -// : 'ListOfIdEndFace' may be an empty list. -// : This means that hole do not traverse ShapeTopo. -// : Warning : the hole to be suppressed must be defined by one or two single closed wires ! -//===================================================================================== -bool RepairGUI::OnSuppressHole(const char* ShapeTopoIOR, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdFace, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdWire, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdEndFace) -{ - /* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC ) - return false; - - try { - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Shape_var aResult = myGeom->SuppressHole(aShape, ListOfIdFace, ListOfIdWire, ListOfIdEndFace); - - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - aResult->NameType(type); - if(myGeomBase->Display(aResult)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return true; -} - - -//===================================================================================== -// function : OnSuppressHolesInFaceOrShell() -// purpose : To suppress one or more holes on a face -// : 'ListOfIdWires' contains indices or wires/holes. -//===================================================================================== -bool RepairGUI::OnSuppressHolesInFaceOrShell(const char* ShapeTopoIOR, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdWires) -{ - /* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - try { - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Shape_var aResult = myGeom->SuppressHolesInFaceOrShell(aShape, ListOfIdWires); + if ( aDlg ) + aDlg->show(); - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aResult); - Standard_CString type; - myGeomBase->GetShapeTypeString(S,type); - aResult->NameType(type); - - if(myGeomBase->Display(aResult)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return true; -} - - -//===================================================================================== -// function : OnSuppressFaces() -// purpose : To suppress faces from a shape -// : The result is one or more shells/faces as main shapes ! -//===================================================================================== -bool RepairGUI::OnSuppressFaces(const TopoDS_Shape& ShapeTopo, const char* ShapeTopoIOR, - const Standard_Integer& aLocalContextId, bool& myUseLocalContext) -{ - /* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var theObj = aStudy->FindObjectIOR(ShapeTopoIOR); - if(theObj->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return false; - } - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - - if(myUseLocalContext == false) { - /* local context is from DialogBox */ - MESSAGE("Error : No local context opened for suppress faces method" << endl); - return false; - } - - GEOM::GEOM_Shape::ListOfSubShapeID_var ListOfID = new GEOM::GEOM_Shape::ListOfSubShapeID; - ic->InitSelected(); - int nbSelected = ic->NbSelected(); - ListOfID->length(nbSelected); - - /* Create a list of indices of faces to be suppressed */ - int i = 0; - const int SubShapeType = 4; /* GEOM::FACE type */ - ic->InitSelected(); /* to repositioning at beginning */ - while(ic->MoreSelected()) { - int index = myGeomBase->GetIndex(ic->SelectedShape(), ShapeTopo, SubShapeType); - ListOfID[i] = index; - i++; - ic->NextSelected(); - } - - /* Close local context opened in DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - - /* Here is the main shape */ - GEOM::GEOM_Shape_var aShape = myGeom->GetIORFromString(ShapeTopoIOR); - GEOM::GEOM_Gen::ListOfGeomShapes_var listGeomShapes = new GEOM::GEOM_Gen::ListOfGeomShapes; - - /* Call geom method that return a list of shells/faces as result of suppress */ - try { - listGeomShapes = myGeom->SuppressFaces(aShape, ListOfID); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - - /* Test list of shells/faces */ - if(listGeomShapes->length() < 1) { - return false; - } - - /* Loop on each object created */ - for(int i=0; ilength(); i++) { - GEOM::GEOM_Shape_var aShellOrFace = listGeomShapes[i]; - TopoDS_Shape S = myGeomGUI->GetShapeReader().GetShape(myGeom, aShellOrFace); - - if(S.IsNull()) - return false; - - char* nameG = (char *)malloc(20); - Standard_CString Type; - if(myGeomBase->GetShapeTypeString(S, Type)) { - aShellOrFace->NameType(Type); - sprintf (nameG, "%s_%d", Type, myGeomGUI->myNbGeom++); - } - else { - aShellOrFace->NameType(tr("GEOM_SHAPE")); - sprintf (nameG, "%s_%d", tr("GEOM_SHAPE").latin1(), myGeomGUI->myNbGeom++); - } - - /* Display with name */ - if(!myGeomBase->Display(aShellOrFace, nameG)) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return false; - } - } - - QAD_Application::getDesktop()->putInfo (tr("GEOM_PRP_READY")); return true; } @@ -338,6 +135,8 @@ bool RepairGUI::OnSuppressFaces(const TopoDS_Shape& ShapeTopo, const char* Shape //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return RepairGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return RepairGUI::GetRepairGUI(); + } } diff --git a/src/RepairGUI/RepairGUI.h b/src/RepairGUI/RepairGUI.h index 1afe5a85f..2454b406c 100644 --- a/src/RepairGUI/RepairGUI.h +++ b/src/RepairGUI/RepairGUI.h @@ -24,45 +24,34 @@ // File : RepairGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef REPAIRGUI_H #define REPAIRGUI_H +#include "GEOMGUI.h" #include "GEOMBase.h" //================================================================================= // class : RepairGUI // purpose : //================================================================================= -class RepairGUI : public QObject +class RepairGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + RepairGUI(); // hide constructor to avoid direct creation public : - RepairGUI(); ~RepairGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); + // Get the only RepairGUI object + static RepairGUI* GetRepairGUI(); - void MakeSewingAndDisplay(GEOM::GEOM_Gen::ListOfIOR& listShapesIOR, - const Standard_Real precision); - void MakeOrientationChangeAndDisplay(GEOM::GEOM_Shape_ptr Shape); - bool OnSuppressHole(const char* ShapeTopoIOR, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdFace, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdWire, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdEndFace); - bool OnSuppressHolesInFaceOrShell(const char* ShapeTopoIOR, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfIdWires); - bool OnSuppressFaces(const TopoDS_Shape& ShapeTopo, - const char* ShapeTopoIOR, - const Standard_Integer& aLocalContextId, - bool& myUseLocalContext); - - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); +private: + static RepairGUI* myGUIObject; // the only RepairGUI object + }; #endif diff --git a/src/RepairGUI/RepairGUI_CloseContourDlg.cxx b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx new file mode 100644 index 000000000..46721ef62 --- /dev/null +++ b/src/RepairGUI/RepairGUI_CloseContourDlg.cxx @@ -0,0 +1,392 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_CloseContourDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; +#include "RepairGUI_CloseContourDlg.h" + +#include "QAD_RightFrame.h" +#include "QAD_Desktop.h" +#include "OCCViewer_Viewer3d.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include + + +//================================================================================= +// class : RepairGUI_CloseContourDlg() +// purpose : Constructs a RepairGUI_CloseContourDlg 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. +//================================================================================= +RepairGUI_CloseContourDlg::RepairGUI_CloseContourDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CLOSECONTOUR"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_CLOSECONTOUR_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_CLOSECONTOUR_TITLE")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel_Ext(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("Contour to close")); + GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE")); + GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + + QGridLayout* aSelectWiresLay = new QGridLayout( 0, 1, 1, 0, 6, "aSelectWiresLay"); + + mySelectWiresBtn = new QPushButton( GroupPoints->GroupBox1, "mySelectWiresBtn" ); + mySelectWiresBtn->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mySelectWiresBtn->sizePolicy().hasHeightForWidth() ) ); + mySelectWiresBtn->setText( trUtf8( "" ) ); + mySelectWiresBtn->setPixmap(image1); + + mySelectWiresEdt = new QLineEdit( GroupPoints->GroupBox1, "mySelectWiresEdt" ); + mySelectWiresEdt->setReadOnly( true ); + + mySelectWiresLbl = new QLabel( tr( "Contour to close" ), GroupPoints->GroupBox1, "ContourLbl" ); + mySelectWiresLbl->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mySelectWiresLbl->sizePolicy().hasHeightForWidth() ) ); + + aSelectWiresLay->addWidget( mySelectWiresLbl, 0, 0 ); + aSelectWiresLay->addWidget( mySelectWiresBtn, 0, 1 ); + aSelectWiresLay->addWidget( mySelectWiresEdt, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + aSelectWiresLay->addItem( spacer, 1, 2 ); + + myIsVertexGr = new QButtonGroup( 2, Qt::Vertical, GroupPoints ); + myIsVertexGr->setFrameStyle( QFrame::NoFrame ); + myIsVertexGr->setRadioButtonExclusive( true ); + myIsVertexGr->insert( new QRadioButton( tr( "Close by common vertex" ), myIsVertexGr ), 0 ); + myIsVertexGr->insert( new QRadioButton( tr( "Close by new edge" ), myIsVertexGr ), 1 ); + myIsVertexGr->find( 0 )->toggle(); + + Layout1->addWidget(GroupPoints, 2, 0); + GroupPoints->getGroupBoxLayout()->addLayout( aSelectWiresLay, 1, 0 ); + GroupPoints->getGroupBoxLayout()->addMultiCellWidget(myIsVertexGr, 2, 2, 0, 2); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~RepairGUI_CloseContourDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_CloseContourDlg::~RepairGUI_CloseContourDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd = new GEOM::short_array(); + myWiresInd->length( 0 ); + + myGeomGUI->SetState( 0 ); + initSelection(); + + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(mySelectWiresBtn, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(mySelectWiresEdt, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + initName( tr( "CLOSE_CONTOUR_NEW_OBJ_NAME" ) ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_CloseContourDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool RepairGUI_CloseContourDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd->length( 0 ); + + initSelection(); + + return true; +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +// : used only by SelectButtonC1A1 (LineEditC1A1) +//================================================================================= +void RepairGUI_CloseContourDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText( "" ); + mySelectWiresEdt->setText( "" ); + + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + myObject = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == mySelectWiresEdt ) + myWiresInd->length( 0 ); + + if ( mySelection->IObjectCount() == 1 ) + { + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) // face selection + { + Standard_Boolean aRes; + myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( aRes && GEOMBase::IsShape( myObject ) ) + { + myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) ); + TopoDS_Shape aShape; + if ( myGeomBase->GetShape( myObject, aShape, TopAbs_WIRE ) ) + mySelectWiresEdt->setText( myEditCurrentArgument->text() ); + } + else + myObject = GEOM::GEOM_Object::_nil(); + } + else if ( myEditCurrentArgument == mySelectWiresEdt ) + { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + const int n = aMap.Extent(); + myWiresInd->length( n ); + for ( int i = 1; i <= n; i++ ) + myWiresInd[ i-1 ] = aMap( i ); + if ( n ) + myEditCurrentArgument->setText( QString::number( n ) + "_" + tr( "GEOM_WIRE" ) + tr( "_S_" ) ); + } + } +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::SetEditCurrentArgument() +{ + const QObject* send = sender(); + if ( send == GroupPoints->PushButton1 ) + myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == mySelectWiresBtn && !myObject->_is_nil() ) + myEditCurrentArgument = mySelectWiresEdt; + if ( myEditCurrentArgument ) + { + initSelection(); + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::LineEditReturnPressed() +{ + const QObject* send = sender(); + if( send == GroupPoints->LineEdit1 || send == mySelectWiresEdt ) + { + myEditCurrentArgument = (QLineEdit*)send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setText(""); + mySelectWiresEdt->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd->length( 0 ); + + myGeomGUI->SetState( 0 ); + initSelection(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_CloseContourDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_CloseContourDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_CloseContourDlg::isValid( QString& msg ) +{ + TopoDS_Shape aTmpShape; + return !myObject->_is_nil() && ( myWiresInd->length() || myGeomBase->GetShape( myObject, aTmpShape, TopAbs_WIRE ) ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_CloseContourDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->CloseContour( myObject, myWiresInd, getIsByVertex() ); + bool aResult = !anObj->_is_nil(); + if ( aResult ) + objects.push_back( anObj._retn() ); + + return aResult; +} + +//================================================================================= +// function : getIsByVertex +// purpose : +//================================================================================= +bool RepairGUI_CloseContourDlg::getIsByVertex() const +{ + return myIsVertexGr->find( 0 )->isOn(); +} + +//================================================================================= +// function : initSelection +// purpose : +//================================================================================= +void RepairGUI_CloseContourDlg::initSelection() +{ + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + { + TColStd_MapOfInteger aTypes; + aTypes.Add( GEOM_COMPOUND ); + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_SHELL ); + aTypes.Add( GEOM_FACE ); + aTypes.Add( GEOM_WIRE ); + + globalSelection( aTypes ); + } + else if ( myEditCurrentArgument == mySelectWiresEdt ) + { + localSelection( myObject, TopAbs_EDGE ); + localSelection( myObject, TopAbs_WIRE ); + } +} + + diff --git a/src/RepairGUI/RepairGUI_CloseContourDlg.h b/src/RepairGUI/RepairGUI_CloseContourDlg.h new file mode 100644 index 000000000..6b66cb4e2 --- /dev/null +++ b/src/RepairGUI/RepairGUI_CloseContourDlg.h @@ -0,0 +1,88 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_CloseContourDlg.h +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_CloseContour_H +#define DIALOGBOX_CloseContour_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1Sel_Ext.h" + +#include + +#include +#include + +//================================================================================= +// class : RepairGUI_CloseContourDlg +// purpose : +//================================================================================= +class RepairGUI_CloseContourDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + RepairGUI_CloseContourDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_CloseContourDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + +private : + void Init(); + void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + void initSelection(); + + bool getIsByVertex() const; + + GEOM::GEOM_Object_var myObject; + GEOM::short_array_var myWiresInd; + + DlgRef_1Sel_Ext* GroupPoints; + QButtonGroup* myIsVertexGr; + QLabel* mySelectWiresLbl; + QPushButton* mySelectWiresBtn; + QLineEdit* mySelectWiresEdt; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ClickOnCancel(); + + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); +}; + +#endif // DIALOGBOX_CloseContour_H diff --git a/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx new file mode 100644 index 000000000..acd54e86d --- /dev/null +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.cxx @@ -0,0 +1,358 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_DivideEdgeDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; +#include "RepairGUI_DivideEdgeDlg.h" + +#include "QAD_RightFrame.h" +#include "QAD_Desktop.h" +#include "OCCViewer_Viewer3d.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include + + +//================================================================================= +// class : RepairGUI_DivideEdgeDlg() +// purpose : Constructs a RepairGUI_DivideEdgeDlg 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. +//================================================================================= +RepairGUI_DivideEdgeDlg::RepairGUI_DivideEdgeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_DIVIDE_EDGE"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_DIVIDE_EDGE_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_DIVIDE_EDGE_TITLE")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel_Ext(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_ADD_POINT")); + GroupPoints->TextLabel1->setText(tr("GEOM_EDGE")); + GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + + myIsParameterGr = new QButtonGroup( 2, Qt::Vertical, GroupPoints ); + myIsParameterGr->setFrameStyle( QFrame::NoFrame ); + myIsParameterGr->setRadioButtonExclusive( true ); + myIsParameterGr->insert( new QRadioButton( tr( "GEOM_BY_PARAMETER" ), myIsParameterGr ), 0 ); + myIsParameterGr->insert( new QRadioButton( tr( "GEOM_BY_LENGTH" ), myIsParameterGr ), 1 ); + myIsParameterGr->find( 0 )->toggle(); + + QGridLayout* aLay = new QGridLayout( 0, 1, 2, 0, 6, "aLay" ); + myValEdt = new QAD_SpinBoxDbl( GroupPoints->GroupBox1, 0., 1., 0.1, 3 ); + myValEdt->setValue( 0.5 ); + QLabel* aLbl1 = new QLabel( tr( "GEOM_VALUE" ), GroupPoints->GroupBox1 ); + aLay->addWidget( aLbl1, 0, 0 ); + aLay->addWidget( myValEdt, 0, 1 ); + + Layout1->addWidget(GroupPoints, 2, 0); + GroupPoints->getGroupBoxLayout()->addMultiCellWidget(myIsParameterGr, 1, 1, 0, 2); + GroupPoints->getGroupBoxLayout()->addLayout( aLay, 2, 0 ); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~RepairGUI_DivideEdgeDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_DivideEdgeDlg::~RepairGUI_DivideEdgeDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myObject = GEOM::GEOM_Object::_nil(); + myIndex = -1; + + myGeomGUI->SetState( 0 ); + initSelection(); + + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + initName( tr( "DEVIDE_EDGE_NEW_OBJECT_NAME" ) ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_DivideEdgeDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool RepairGUI_DivideEdgeDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + myEditCurrentArgument->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myIndex = -1; + + initSelection(); + + return true; +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +// : used only by SelectButtonC1A1 (LineEditC1A1) +//================================================================================= +void RepairGUI_DivideEdgeDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText(""); + + myObject = GEOM::GEOM_Object::_nil(); + myIndex = -1; + + if ( mySelection->IObjectCount() == 1 ) + { + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + Standard_Boolean aRes; + GEOM::GEOM_Object_var aSelectedObj = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( !CORBA::is_nil( aSelectedObj ) && aRes ) + { + TopoDS_Shape aShape; + if ( myGeomBase->GetShape( aSelectedObj, aShape, TopAbs_SHAPE ) ) + { + const int aType = aShape.ShapeType(); + if ( aType <= TopAbs_EDGE ) // edge, wire, face, shell, solid, compound + { + GEOM::short_array anIndexes; + if ( mySelection->HasIndex( anIO ) ) // subshape selection + { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + myIndex = aMap( 1 ); + myObject = aSelectedObj; + myEditCurrentArgument->setText( tr( "GEOM_EDGE" ) + "_1" ); + } + else if ( aType == TopAbs_EDGE ) // single shape selection + { + myIndex = -1; + myObject = aSelectedObj; + myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) ); + } + else // face, shell, solid or compound was selected, and NOT its subshape. + { + myIndex = -1; + myObject = GEOM::GEOM_Object::_nil(); + } + } + } + } + } +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::SetEditCurrentArgument() +{ + if( sender() == GroupPoints->PushButton1 ) + { + GroupPoints->LineEdit1->setFocus(); + myEditCurrentArgument = GroupPoints->LineEdit1; + } + SelectionIntoArgument(); +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::LineEditReturnPressed() +{ + if( sender() == GroupPoints->LineEdit1 ) + { + myEditCurrentArgument = GroupPoints->LineEdit1; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + myObject = GEOM::GEOM_Object::_nil(); + myIndex = -1; + + myGeomGUI->SetState( 0 ); + initSelection(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_DivideEdgeDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_DivideEdgeDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_DivideEdgeDlg::isValid( QString& msg ) +{ + return !myObject->_is_nil(); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_DivideEdgeDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->DivideEdge( + myObject, myIndex, myValEdt->value(), getIsByParameter() ); + bool aResult = !anObj->_is_nil(); + if ( aResult ) + objects.push_back( anObj._retn() ); + + return aResult; +} + +//================================================================================= +// function : getIsByParameter +// purpose : +//================================================================================= +bool RepairGUI_DivideEdgeDlg::getIsByParameter() const +{ + return myIsParameterGr->find( 0 )->isOn(); +} + +//================================================================================= +// function : initSelection +// purpose : +//================================================================================= +void RepairGUI_DivideEdgeDlg::initSelection() +{ + GEOM::GEOM_Object_var aNullGeomObject; + localSelection( aNullGeomObject, TopAbs_EDGE ); // load local selection on ALL objects +} + + + diff --git a/src/BooleanGUI/BooleanGUI_CutDlg.h b/src/RepairGUI/RepairGUI_DivideEdgeDlg.h similarity index 58% rename from src/BooleanGUI/BooleanGUI_CutDlg.h rename to src/RepairGUI/RepairGUI_DivideEdgeDlg.h index 212bdb176..33b63916e 100644 --- a/src/BooleanGUI/BooleanGUI_CutDlg.h +++ b/src/RepairGUI/RepairGUI_DivideEdgeDlg.h @@ -21,54 +21,67 @@ // // // -// File : BooleanGUI_CutDlg.h +// File : RepairGUI_DivideEdgeDlg.h // Author : Lucien PIGNOLONI // Module : GEOM // $Header$ -#ifndef DIALOGBOX_CUT_H -#define DIALOGBOX_CUT_H +#ifndef DIALOGBOX_DivideEdge_H +#define DIALOGBOX_DivideEdge_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel_QTD.h" +#include "DlgRef_1Sel_Ext.h" +#include "QAD_SpinBoxDbl.h" -#include "BooleanGUI.h" +#include -#include +#include +#include //================================================================================= -// class : BooleanGUI_CutDlg +// class : RepairGUI_DivideEdgeDlg // purpose : //================================================================================= -class BooleanGUI_CutDlg : public GEOMBase_Skeleton -{ +class RepairGUI_DivideEdgeDlg : public GEOMBase_Skeleton +{ Q_OBJECT public: - BooleanGUI_CutDlg( QWidget* parent = 0, const char* name = 0, BooleanGUI* theBooleanGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0 ); - ~BooleanGUI_CutDlg(); + RepairGUI_DivideEdgeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_DivideEdgeDlg(); -private: +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + +private : void Init(); void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + void initSelection(); - BooleanGUI* myBooleanGUI; + bool getIsByParameter() const; - GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */ - GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */ - bool myOkShape1; /* to check when arguments are defined */ - bool myOkShape2; + GEOM::GEOM_Object_var myObject; + int myIndex; - DlgRef_2Sel_QTD* GroupCut; + DlgRef_1Sel_Ext* GroupPoints; + QButtonGroup* myIsParameterGr; + QAD_SpinBoxDbl* myValEdt; private slots: void ClickOnOk(); - void ClickOnApply(); - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); + bool ClickOnApply(); + void ClickOnCancel(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); }; -#endif // DIALOGBOX_CUT_H +#endif // DIALOGBOX_DivideEdge_H diff --git a/src/RepairGUI/RepairGUI_FillingHoleDlg.cxx b/src/RepairGUI/RepairGUI_FillingHoleDlg.cxx deleted file mode 100644 index a591937a3..000000000 --- a/src/RepairGUI/RepairGUI_FillingHoleDlg.cxx +++ /dev/null @@ -1,544 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GeometryGUI_FillingHoleDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -using namespace std; -#include "GeometryGUI_FillingHoleDlg.h" - -#include "GeometryGUI.h" -#include "QAD_Application.h" -#include "QAD_Desktop.h" -#include "utilities.h" - - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================================= -// class : GeometryGUI_FillingHoleDlg() -// purpose : Constructs a GeometryGUI_FillingHoleDlg 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. -//================================================================================= -GeometryGUI_FillingHoleDlg::GeometryGUI_FillingHoleDlg( QWidget* parent, - const char* name, - SALOME_Selection* Sel, - Handle (AIS_InteractiveContext) ic, - bool modal, - WFlags fl ) - : QDialog( parent, name, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ) -{ - - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr("ICON_DLG_SEWING"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr("ICON_SELECT"))); - - if ( !name ) - setName( "GeometryGUI_FillingHoleDlg" ); - resize( 303, 203 ); - setCaption( tr( "Filling hole" ) ); - setSizeGripEnabled( TRUE ); - GeometryGUI_FillingHoleDlgLayout = new QGridLayout( this ); - GeometryGUI_FillingHoleDlgLayout->setSpacing( 6 ); - GeometryGUI_FillingHoleDlgLayout->setMargin( 11 ); - - /***************************************************************/ - GroupConstructors = new QButtonGroup( this, "GroupConstructors" ); - GroupConstructors->setTitle( tr( "" ) ); - GroupConstructors->setExclusive( TRUE ); - GroupConstructors->setColumnLayout(0, Qt::Vertical ); - GroupConstructors->layout()->setSpacing( 0 ); - GroupConstructors->layout()->setMargin( 0 ); - GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() ); - GroupConstructorsLayout->setAlignment( Qt::AlignTop ); - GroupConstructorsLayout->setSpacing( 6 ); - GroupConstructorsLayout->setMargin( 11 ); - Constructor1 = new QRadioButton( GroupConstructors, "Constructor1" ); - Constructor1->setText( tr( "" ) ); - Constructor1->setPixmap( image0 ); - Constructor1->setChecked( TRUE ); - Constructor1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, Constructor1->sizePolicy().hasHeightForWidth() ) ); - Constructor1->setMinimumSize( QSize( 50, 0 ) ); - GroupConstructorsLayout->addWidget( Constructor1, 0, 0 ); - QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - GroupConstructorsLayout->addItem( spacer, 0, 1 ); - GeometryGUI_FillingHoleDlgLayout->addWidget( GroupConstructors, 0, 0 ); - - /***************************************************************/ - GroupC1 = new QGroupBox( this, "GroupC1" ); - GroupC1->setTitle( tr( "" ) ); - GroupC1->setMinimumSize( QSize( 0, 0 ) ); - GroupC1->setFrameShape( QGroupBox::Box ); - GroupC1->setFrameShadow( QGroupBox::Sunken ); - GroupC1->setColumnLayout(0, Qt::Vertical ); - GroupC1->layout()->setSpacing( 0 ); - GroupC1->layout()->setMargin( 0 ); - GroupC1Layout = new QGridLayout( GroupC1->layout() ); - GroupC1Layout->setAlignment( Qt::AlignTop ); - GroupC1Layout->setSpacing( 6 ); - GroupC1Layout->setMargin( 11 ); - Layout2 = new QHBoxLayout; - Layout2->setSpacing( 6 ); - Layout2->setMargin( 0 ); - TextLabelC1A1 = new QLabel( GroupC1, "TextLabelC1A1" ); - TextLabelC1A1->setText( tr( "Main object" ) ); - TextLabelC1A1->setMinimumSize( QSize( 50, 0 ) ); - TextLabelC1A1->setFrameShape( QLabel::NoFrame ); - TextLabelC1A1->setFrameShadow( QLabel::Plain ); - Layout2->addWidget( TextLabelC1A1 ); - SelectButtonC1A1 = new QPushButton( GroupC1, "SelectButtonC1A1" ); - SelectButtonC1A1->setText( tr( "" ) ); - SelectButtonC1A1->setPixmap( image1 ); - SelectButtonC1A1->setToggleButton( FALSE ); - SelectButtonC1A1->setMaximumSize( QSize( 28, 32767 ) ); - Layout2->addWidget( SelectButtonC1A1 ); - LineEditC1A1 = new QLineEdit( GroupC1, "LineEditC1A1" ); - LineEditC1A1->setAlignment( int( QLineEdit::AlignLeft ) ); - Layout2->addWidget( LineEditC1A1 ); - GroupC1Layout->addLayout( Layout2, 0, 0 ); - CheckBox1 = new QCheckBox( GroupC1, "CheckBox1" ); - CheckBox1->setText( tr( "Select edges of hole on main object" ) ); - CheckBox1->setChecked( FALSE ); - GroupC1Layout->addWidget( CheckBox1, 1, 0 ); - GeometryGUI_FillingHoleDlgLayout->addWidget( GroupC1, 1, 0 ); - - /***************************************************************/ - GroupButtons = new QGroupBox( this, "GroupButtons" ); - GroupButtons->setTitle( tr( "" ) ); - GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, GroupButtons->sizePolicy().hasHeightForWidth() ) ); - GroupButtons->setColumnLayout(0, Qt::Vertical ); - GroupButtons->layout()->setSpacing( 0 ); - GroupButtons->layout()->setMargin( 0 ); - GroupButtonsLayout = new QGridLayout( GroupButtons->layout() ); - GroupButtonsLayout->setAlignment( Qt::AlignTop ); - GroupButtonsLayout->setSpacing( 6 ); - GroupButtonsLayout->setMargin( 11 ); - buttonClose = new QPushButton( GroupButtons, "buttonClose" ); - buttonClose->setText( tr( "&Close" ) ); - buttonClose->setAutoDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonClose, 0, 3 ); - buttonOk = new QPushButton( GroupButtons, "buttonOk" ); - buttonOk->setText( tr( "&Ok" ) ); - buttonOk->setAutoDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonOk, 0, 0 ); - buttonApply = new QPushButton( GroupButtons, "buttonApply" ); - buttonApply->setText( tr( "&Apply" ) ); - buttonApply->setAutoDefault( TRUE ); - buttonApply->setDefault( TRUE ); - GroupButtonsLayout->addWidget( buttonApply, 0, 1 ); - QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - GroupButtonsLayout->addItem( spacer_2, 0, 2 ); - GeometryGUI_FillingHoleDlgLayout->addWidget( GroupButtons, 2, 0 ); - - /* Initialisations */ - Init(Sel, ic) ; - -} - - -//================================================================================= -// function : ~GeometryGUI_FillingHoleDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -GeometryGUI_FillingHoleDlg::~GeometryGUI_FillingHoleDlg() -{ - // no need to delete child widgets, Qt does it all for us -} - - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) -{ - - GroupC1->show(); - myConstructorId = 0 ; - Constructor1->setChecked( TRUE ); - myEditCurrentArgument = LineEditC1A1 ; - mySelection = Sel; - myShape.Nullify() ; - - myIC = ic ; - myUseLocalContext = false ; - myOkShape = false ; - myGeomGUI = GeometryGUI::GetGeometryGUI() ; - - /* Select sub shapes mode not checked */ - CheckBox1->setChecked( FALSE ); - myOkSelectSubMode = false ; - - // TODO : previous selection into argument ? - - /* Filter definitions */ - Engines::Component_var comp = QAD_Application::getDesktop()->getEngine("FactoryServer", "GEOM"); - myGeom = GEOM::GEOM_Gen::_narrow(comp); - - /* signals and slots connections */ - connect( buttonOk, SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) ); - connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) ); - connect( buttonClose, SIGNAL( clicked() ), this, SLOT( ClickOnClose() ) ); - connect( GroupConstructors, SIGNAL( clicked(int) ), this, SLOT( ConstructorsClicked(int) )); - - connect( LineEditC1A1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ) ; - connect( SelectButtonC1A1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() )); - connect( CheckBox1, SIGNAL( stateChanged(int) ), this, SLOT( ActivateUserSelection() )); - - connect( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() )); - connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), this, SLOT( DeactivateActiveDialog() ) ) ; - connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( ClickOnClose() )); - - /* Move widget on the botton right corner of main widget */ - int x, y ; - myGeomGUI->DefineDlgPosition( this, x, y ) ; - this->move( x, y ) ; - this->show() ; /* display Dialog */ - - return ; -} - - -//================================================================================= -// function : ConstructorsClicked() -// purpose : Radio button management -//================================================================================= -void GeometryGUI_FillingHoleDlg::ConstructorsClicked(int constructorId) -{ - return ; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : Same than click on apply but close this dialog. -//================================================================================= -void GeometryGUI_FillingHoleDlg::ClickOnOk() -{ - this->ClickOnApply() ; - accept(); - - return ; -} - - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::ClickOnApply() -{ - bool testResult = false ; - QAD_Application::getDesktop()->putInfo( tr("") ) ; - - switch(myConstructorId) - { - case 0 : - { - if( myOkShape && myOkSelectSubMode ) { - testResult = myGeomGUI->OnFillingHole( myShape, myShapeIOR, myLocalContextId, myUseLocalContext ) ; - } - if( !testResult ) { - QAD_Application::getDesktop()->putInfo(tr("Operation aborted")) ; - } - else { - QAD_Application::getDesktop()->putInfo(tr("Operation done")); - } - /* Reset arguments to allow a new selection */ - this->ResetStateOfDialog() ; - break ; - } - } - return ; -} - - - -//================================================================================= -// function : ClickOnClose() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::ClickOnClose() -{ - disconnect( mySelection, 0, this, 0 ); - myGeomGUI->ResetState() ; - - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId) ; - this->myUseLocalContext = false ; - myGeomGUI->OnDisplayAll(true) ; - } - reject() ; - return ; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case -// : used only by SelectButtonC1A1 (LineEditC1A1) -//================================================================================= -void GeometryGUI_FillingHoleDlg::SelectionIntoArgument() -{ - - /* Reset argument and local context when selection as changed */ - this->ResetStateOfDialog() ; - - QString aString = ""; /* name of selection */ - - int nbSel = myGeomGUI->GetNameOfSelectedIObjects(mySelection, aString) ; - if ( nbSel != 1 ) - return ; - - /* nbSel == 1 */ - TopoDS_Shape S ; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject() ; - - if( !myGeomGUI->GetTopoFromSelection(mySelection, S) ) - return ; - -// if( !IO->hasEntry() ) { -// QAD_Application::getDesktop()->putInfo(tr("Main shape must be in the study before")) ; -// return ; -// } - - /* Test the exact type of topology to fill an hole */ - if ( !S.IsNull() && ( S.ShapeType() == TopAbs_SOLID || S.ShapeType() == TopAbs_SHELL || S.ShapeType() == TopAbs_COMPOUND ) ) { - - if ( IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject)) ) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast( IO ); - myShapeIOR = GIObject->getIOR(); /* the Geom IOR string of selection */ - LineEditC1A1->setText(aString) ; - myShape = S ; - myOkShape = true ; - return; - } - - if ( IO->hasEntry() ) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID( IO->getEntry() ); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if ( !obj->_is_nil() ) { - if (obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - myShapeIOR = anIOR->Value(); - myOkShape = true ; - myShape = S ; - LineEditC1A1->setText(aString) ; - return; - } - } - } - - } - return ; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - switch (myConstructorId) - { - case 0: /* default constructor */ - { - if(send == SelectButtonC1A1) { - LineEditC1A1->setFocus() ; - myEditCurrentArgument = LineEditC1A1; - SelectionIntoArgument() ; - } - break; - } - } - return ; -} - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if( send == LineEditC1A1 ) - myEditCurrentArgument = LineEditC1A1 ; - else - return ; - - /* User name of object input management */ - /* If successfull the selection is changed and signal emitted... */ - /* so SelectionIntoArgument() is automatically called. */ - const QString objectUserName = myEditCurrentArgument->text() ; - QWidget* thisWidget = (QWidget*)this ; - if( myGeomGUI->SelectionByNameInDialogs( thisWidget, objectUserName, mySelection ) ) { - myEditCurrentArgument->setText( objectUserName ) ; - } - return ; -} - - -//================================================================================= -// function : DeactivateActiveDialog() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::DeactivateActiveDialog() -{ - if ( GroupConstructors->isEnabled() ) { - - this->ResetStateOfDialog() ; - - disconnect( mySelection, 0, this, 0 ); - GroupConstructors->setEnabled(false) ; - GroupC1->setEnabled(false) ; - GroupButtons->setEnabled(false) ; - myGeomGUI->ResetState() ; - myGeomGUI->SetActiveDialogBox(0) ; - myGeomGUI->OnDisplayAll(true) ; - } - return ; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::ActivateThisDialog() -{ - /* Emit a signal to deactivate other active dialog */ - myGeomGUI->EmitSignalDeactivateDialog() ; - GroupConstructors->setEnabled(true) ; - GroupC1->setEnabled(true) ; - GroupButtons->setEnabled(true) ; - connect ( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - myGeomGUI->SetActiveDialogBox( (QDialog*)this ) ; - return ; -} - - -//================================================================================= -// function : enterEvent() -// purpose : Mouse enter onto the dialog to activate it -//================================================================================= -void GeometryGUI_FillingHoleDlg::enterEvent(QEvent* e) -{ - if ( GroupConstructors->isEnabled() ) - return ; - ActivateThisDialog() ; - return ; -} - - -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void GeometryGUI_FillingHoleDlg::closeEvent( QCloseEvent* e ) -{ - /* same than click on cancel button */ - this->ClickOnClose() ; - return ; -} - - -//================================================================================= -// function : ActivateUserSelection() -// purpose : Activate selection of faces when CheckBox1->isChecked()... -//================================================================================= -void GeometryGUI_FillingHoleDlg::ActivateUserSelection() -{ - - if( !this->myOkShape ) { - this->ResetStateOfDialog() ; - QAD_Application::getDesktop()->putInfo(tr("Select main shape first")) ; - return ; - } - - this->myOkSelectSubMode = CheckBox1->isChecked() ; - - if( this->myUseLocalContext ) { - myIC->CloseLocalContext(myLocalContextId) ; - this->myUseLocalContext = false ; - myGeomGUI->OnDisplayAll(true) ; - } - - if( myOkShape && myOkSelectSubMode ) { - /* local context is defined into the method : GEOM::EDGE sub selection */ - TopAbs_ShapeEnum aType = TopAbs_EDGE ; - myGeomGUI->PrepareSubShapeSelection( int(aType), this->myLocalContextId ) ; - myUseLocalContext = true ; - QAD_Application::getDesktop()->putInfo(tr("Select edges to fill an hole and click on Ok/Apply")) ; - } - return ; -} - - - -//================================================================================= -// function : ResetStateOfDialog() -// purpose : Completely reset the state of method including local context -//================================================================================= -void GeometryGUI_FillingHoleDlg::ResetStateOfDialog() -{ - this->myOkShape = false ; - this->myEditCurrentArgument->setText("") ; - - /* Select sub shapes mode not checked */ - this->myOkSelectSubMode = false ; - this->CheckBox1->setChecked( FALSE ); - - /* Close its local contact if opened */ - if( this->myUseLocalContext ) { - myIC->CloseLocalContext(this->myLocalContextId) ; - this->myUseLocalContext = false ; - myGeomGUI->OnDisplayAll(true) ; - } - return ; -} - - - diff --git a/src/RepairGUI/RepairGUI_FillingHoleDlg.h b/src/RepairGUI/RepairGUI_FillingHoleDlg.h deleted file mode 100644 index 8e0b758df..000000000 --- a/src/RepairGUI/RepairGUI_FillingHoleDlg.h +++ /dev/null @@ -1,133 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GeometryGUI_FillingHoleDlg.h -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#ifndef GEOMETRYGUI_FILLINGHOLE_H -#define GEOMETRYGUI_FILLINGHOLE_H - -#include "SALOME_Selection.h" -#include "GEOM_ShapeTypeFilter.hxx" - -#include -#include - -#include CORBA_SERVER_HEADER(SALOMEDS_Attributes) - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QButtonGroup; -class QCheckBox; -class QGroupBox; -class QLabel; -class QLineEdit; -class QPushButton; -class QRadioButton; -class GeometryGUI; - - -//================================================================================= -// class : GeometryGUI_FillingHoleDlg -// purpose : -//================================================================================= -class GeometryGUI_FillingHoleDlg : public QDialog -{ - Q_OBJECT - -public : - GeometryGUI_FillingHoleDlg( QWidget* parent = 0, - const char* name = 0, - SALOME_Selection* Sel = 0, - Handle (AIS_InteractiveContext) ic = 0, - bool modal = FALSE, - WFlags fl = 0 ); - - ~GeometryGUI_FillingHoleDlg(); - -private : - - void Init( SALOME_Selection* Sel, Handle (AIS_InteractiveContext) ic ) ; - void closeEvent( QCloseEvent* e ) ; - void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */ - void ResetStateOfDialog() ; - - /* Interactive and local context management see also : bool myUseLocalContext() */ - Handle (AIS_InteractiveContext) myIC ; /* Interactive context */ - Standard_Integer myLocalContextId ; /* identify a local context used by this method */ - bool myUseLocalContext ; /* true when this method as opened a local context */ - - GEOM::GEOM_Gen_var myGeom ; /* Current Geom object */ - GeometryGUI* myGeomGUI ; /* Current GeomGUI object */ - SALOME_Selection* mySelection ; /* User shape selection */ - - TopoDS_Shape myShape ; - char* myShapeIOR ; - bool myOkShape ; - - bool myOkSelectSubMode ; /* true = sub mode selection activated */ - QLineEdit* myEditCurrentArgument; /* Current LineEdit */ - int myConstructorId ; /* Current constructor id = radio button id */ - - QButtonGroup* GroupConstructors; - QRadioButton* Constructor1; - - QGroupBox* GroupC1; - QLabel* TextLabelC1A1; - QPushButton* SelectButtonC1A1; - QLineEdit* LineEditC1A1; - QCheckBox* CheckBox1; - - QGroupBox* GroupButtons; - QPushButton* buttonOk; - QPushButton* buttonApply; - QPushButton* buttonClose; - - -private slots: - - void ConstructorsClicked(int constructorId); - void ClickOnOk(); - void ClickOnApply() ; - void ClickOnClose(); - - void LineEditReturnPressed() ; - void SetEditCurrentArgument() ; - void SelectionIntoArgument() ; - void DeactivateActiveDialog() ; - void ActivateThisDialog() ; - void ActivateUserSelection() ; - -protected: - - QGridLayout* GeometryGUI_FillingHoleDlgLayout; - QGridLayout* GroupConstructorsLayout; - QGridLayout* GroupC1Layout; - QHBoxLayout* Layout2; - QGridLayout* GroupButtonsLayout; -}; - -#endif // GEOMETRYGUI_FILLINGHOLE_H diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx new file mode 100644 index 000000000..ca9930705 --- /dev/null +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.cxx @@ -0,0 +1,289 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_FreeBoundDlg.cxx +// Author : Sergey LITONIN +// Module : GEOM +// $Header$ + +#include "RepairGUI_FreeBoundDlg.h" +#include "QAD_Desktop.h" +#include "GEOMBase.h" +#include "GeometryGUI.h" +#include "GEOM_Displayer.h" +#include "SALOMEGUI_QtCatchCorbaException.hxx" +#include "GEOMImpl_Types.hxx" +#include "SALOME_Prs.h" +#include "SALOME_Selection.h" + +#include +#include +#include +#include +#include + +#define SPACING 5 +#define MARGIN 10 + +/* + Calss : RepairGUI_FreeBoundDlg + Description : Dialog for displaying free boundaries of selected face, shell or solid +*/ + + +//================================================================================= +// function : RepairGUI_FreeBoundDlg +// purpose : Constructor +//================================================================================= +RepairGUI_FreeBoundDlg::RepairGUI_FreeBoundDlg( QWidget* theParen, SALOME_Selection* theSelection ) +: QDialog( theParen, "RepairGUI_FreeBoundDlg", false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ) +{ + setCaption( tr( "CAPTION" ) ); + + QPixmap iconSelect( QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr( "ICON_SELECT" ) ) ); + + QGroupBox* aMainGrp = new QGroupBox( 1, Qt::Horizontal, tr( "FREE_BOUND" ), this ); + + QGroupBox* aSelGrp = new QGroupBox( 1, Qt::Vertical, aMainGrp ); + aSelGrp->setInsideMargin( 0 ); + aSelGrp->setFrameStyle( QFrame::NoFrame ); + new QLabel( tr( "GEOM_OBJECT" ), aSelGrp ); + ( new QPushButton( aSelGrp ) )->setPixmap( iconSelect ); + myEdit = new QLineEdit( aSelGrp ); + myEdit->setReadOnly( true ); + myEdit->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + + myClosedLbl = new QLabel( tr( "NUMBER_CLOSED" ), aMainGrp ); + myOpenLbl = new QLabel( tr( "NUMBER_OPEN" ), aMainGrp ); + + QFrame* aFrame = new QFrame( this ); + aFrame->setFrameStyle( QFrame::Box | QFrame::Sunken ); + QPushButton* aCloseBtn = new QPushButton( tr( "GEOM_BUT_CLOSE" ), aFrame ); + QHBoxLayout* aBtnLay = new QHBoxLayout( aFrame, MARGIN, SPACING ); + aBtnLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + aBtnLay->addWidget( aCloseBtn ); + aBtnLay->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ) ); + + QVBoxLayout* aLay = new QVBoxLayout( this ); + aLay->setSpacing( SPACING ); + aLay->setMargin( MARGIN ); + aLay->addWidget( aMainGrp ); + aLay->addWidget( aFrame ); + + connect( aCloseBtn, SIGNAL( clicked() ), SLOT( onClose() ) ); + + Init( theSelection ); +} + +//================================================================================= +// function : ~RepairGUI_FreeBoundDlg +// purpose : Destructor +//================================================================================= +RepairGUI_FreeBoundDlg::~RepairGUI_FreeBoundDlg() +{ +} + +//================================================================================= +// function : onClose +// purpose : SLOT. Called when "close" button pressed. Close dialog +//================================================================================= +void RepairGUI_FreeBoundDlg::onClose() +{ + globalSelection(); + disconnect( mySelection, 0, this, 0 ); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox( 0 ); + reject(); + erasePreview(); +} + +//================================================================================= +// function : onDeactivate +// purpose : Deactivate this dialog +//================================================================================= +void RepairGUI_FreeBoundDlg::onDeactivate() +{ + setEnabled(false); + globalSelection(); + disconnect( mySelection, 0, this, 0 ); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox( 0 ); +} + +//================================================================================= +// function : onActivate +// purpose : Activate this dialog +//================================================================================= +void RepairGUI_FreeBoundDlg::onActivate() +{ + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); + setEnabled( true ); + GeometryGUI::GetGeomGUI()->SetActiveDialogBox( this ); + connect( mySelection, SIGNAL( currentSelectionChanged() ), SLOT ( onSelectionDone() ) ); + activateSelection(); + onSelectionDone(); +} + +//================================================================================= +// function : onSelectionDone +// purpose : SLOT. Called when selection changed. +//================================================================================= +void RepairGUI_FreeBoundDlg::onSelectionDone() +{ + if( mySelection->IObjectCount() != 1 ) + return; + + Standard_Boolean isOk = Standard_False; + GEOM::GEOM_Object_var anObj = + GEOMBase::ConvertIOinGEOMObject( mySelection->firstIObject(), isOk ); + + if ( !isOk || anObj->_is_nil() || !GEOMBase::IsShape( anObj ) ) + return; + else + { + myObj = anObj; + displayPreview( false, true, true, 3 ); + } + +} + +//================================================================================= +// function : Init +// purpose : Initialize dialog fields +//================================================================================= +void RepairGUI_FreeBoundDlg::Init( SALOME_Selection* theSel ) +{ + myNbClosed = myNbOpen = 0; + myObj = GEOM::GEOM_Object::_nil(); + mySelection = theSel; + + GeometryGUI* aGeomGUI = GeometryGUI::GetGeomGUI(); + connect( aGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), SLOT ( onDeactivate() ) ); + connect( mySelection, SIGNAL( currentSelectionChanged() ), SLOT ( onSelectionDone() ) ); + + activateSelection(); + onSelectionDone(); +} + +//================================================================================= +// function : enterEvent +// purpose : Activate dialog +//================================================================================= +void RepairGUI_FreeBoundDlg::enterEvent( QEvent* e ) +{ + onActivate(); +} + +//================================================================================= +// function : closeEvent +// purpose : Close dialog +//================================================================================= +void RepairGUI_FreeBoundDlg::closeEvent( QCloseEvent* e ) +{ + onClose(); +} + +//================================================================================= +// function : activateSelection +// purpose : activate selection of faces, shells, and solids +//================================================================================= +void RepairGUI_FreeBoundDlg::activateSelection() +{ + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_FACE ); + aMap.Add( GEOM_SHELL ); + aMap.Add( GEOM_SOLID ); + aMap.Add( GEOM_COMPOUND ); + globalSelection( aMap ); +} + +//================================================================================= +// function : createOperation +// purpose : Create operation +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_FreeBoundDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_FreeBoundDlg::isValid( QString& msg ) +{ + return !myObj->_is_nil(); +} + +//================================================================================= +// function : execute +// purpose : Get free boundaries +//================================================================================= +bool RepairGUI_FreeBoundDlg::execute( ObjectList& objects ) +{ + if ( !IsPreview() || myObj->_is_nil() ) + return false; + + GEOM::ListOfGO_var aClosed, anOpen; + + bool result = GEOM::GEOM_IHealingOperations::_narrow( + getOperation() )->GetFreeBoundary( myObj, aClosed, anOpen ); + + if ( result ) + { + myNbClosed = aClosed->length(); + myNbOpen = anOpen->length(); + int i; + for ( i = 0; i < myNbClosed; i++ ) + objects.push_back( aClosed[i]._retn() ); + for ( i = 0; i < myNbOpen; i++ ) + objects.push_back( anOpen[i]._retn() ); + + myEdit->setText( GEOMBase::GetName( myObj ) ); + QString aLabelText = tr( "NUMBER_CLOSED" ) + QString( "%1" ).arg( myNbClosed ); + myClosedLbl->setText( aLabelText ); + aLabelText = tr( "NUMBER_OPEN" ) + QString( "%1" ).arg( myNbOpen ); + myOpenLbl->setText( aLabelText ); + } + else + { + myEdit->setText( GEOMBase::GetName( myObj ) ); + myClosedLbl->setText( tr( "NUMBER_CLOSED" ) ); + myOpenLbl->setText( tr( "NUMBER_OPEN" ) ); + } + + return result; +} + + + + + + + + + + + + + + diff --git a/src/RepairGUI/RepairGUI_FreeBoundDlg.h b/src/RepairGUI/RepairGUI_FreeBoundDlg.h new file mode 100644 index 000000000..ae7a6c4b7 --- /dev/null +++ b/src/RepairGUI/RepairGUI_FreeBoundDlg.h @@ -0,0 +1,93 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_FreeBoundDlg.h +// Author : Sergey LITONIN +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_WHATIS_H +#define DIALOGBOX_WHATIS_H + +#include +#include "GEOMBase_Helper.h" + +class SALOME_Prs; +class SALOME_Selection; +class QLineEdit; +class QLabel; +class GEOM_Displayer; + +//================================================================================= +// class : RepairGUI_FreeBoundDlg +// purpose : Dialog for displaying free boundaries of selected face, shell or solid +//================================================================================= +class RepairGUI_FreeBoundDlg : public QDialog, + public GEOMBase_Helper +{ + Q_OBJECT + +public: + RepairGUI_FreeBoundDlg( QWidget*, SALOME_Selection* ); + ~RepairGUI_FreeBoundDlg(); + +private slots: + + void onClose(); + void onDeactivate(); + void onActivate(); + void onSelectionDone(); + +private: + + void Init( SALOME_Selection* ); + void enterEvent( QEvent* e ); + void closeEvent( QCloseEvent* e ); + void activateSelection(); + + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool execute( ObjectList& objects ); + virtual bool isValid( QString& ); + +private: + + QLineEdit* myEdit; + QLabel* myClosedLbl; + QLabel* myOpenLbl; + GEOM::GEOM_Object_var myObj; + SALOME_Selection* mySelection; + int myNbClosed; + int myNbOpen; +}; + +#endif // DIALOGBOX_WHATIS_H + + + + + + + + + + diff --git a/src/RepairGUI/RepairGUI_GlueDlg.cxx b/src/RepairGUI/RepairGUI_GlueDlg.cxx new file mode 100644 index 000000000..11e585864 --- /dev/null +++ b/src/RepairGUI/RepairGUI_GlueDlg.cxx @@ -0,0 +1,297 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_GlueDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; +#include "RepairGUI_GlueDlg.h" + +#include "QAD_Desktop.h" +#include "QAD_SpinBoxDbl.h" + +#include "OCCViewer_Viewer3d.h" +#include "DlgRef_1Sel_Ext.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#define DEFAULT_TOLERANCE_VALUE 1e-07 + + +//================================================================================= +// class : RepairGUI_GlueDlg() +// purpose : Constructs a RepairGUI_GlueDlg 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. +//================================================================================= +RepairGUI_GlueDlg::RepairGUI_GlueDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_GLUE_FACES"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_GLUE_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_GLUE_TITLE")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel_Ext(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_GLUE")); + GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE")); + GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + + QGridLayout* aLay = new QGridLayout( 0, 2, 2, 0, 6, "aLay" ); + QLabel* aLbl1 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->GroupBox1 ); + myTolEdt = new QAD_SpinBoxDbl( GroupPoints->GroupBox1, 0, 100, 1e-7, 10, 1e-10 ); + myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE ); + + aLay->addWidget( aLbl1, 0, 0 ); + aLay->addWidget( myTolEdt, 0, 1 ); + + GroupPoints->getGroupBoxLayout()->addLayout( aLay, 3, 0 ); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~RepairGUI_GlueDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_GlueDlg::~RepairGUI_GlueDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myObject = GEOM::GEOM_Object::_nil(); + + myGeomGUI->SetState( 0 ); + globalSelection( GEOM_COMPOUND ); + + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + initName( tr( "GLUE_NEW_OBJ_NAME" ) ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_GlueDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool RepairGUI_GlueDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + GroupPoints->LineEdit1->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + + globalSelection( GEOM_COMPOUND ); + + return true; +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection +//================================================================================= +void RepairGUI_GlueDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + + if ( mySelection->IObjectCount() == 1 ) { + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + Standard_Boolean aRes; + myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( aRes ) + myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) ); + } +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::SetEditCurrentArgument() +{ + const QObject* send = sender(); + if ( send == GroupPoints->PushButton1 ) { + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::LineEditReturnPressed() +{ + const QObject* send = sender(); + if( send == GroupPoints->LineEdit1 ) { + myEditCurrentArgument = GroupPoints->LineEdit1; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + GroupPoints->LineEdit1->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + + myGeomGUI->SetState( 0 ); + globalSelection( GEOM_COMPOUND ); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_GlueDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_GlueDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_GlueDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_GlueDlg::isValid( QString& msg ) +{ + return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_GlueDlg::execute( ObjectList& objects ) +{ + bool aResult = false; + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations::_narrow( getOperation() )->MakeGlueFaces( myObject, myTolEdt->value() ); + aResult = !anObj->_is_nil(); + if ( aResult ) + objects.push_back( anObj._retn() ); + + return aResult; +} diff --git a/src/RepairGUI/RepairGUI_GlueDlg.h b/src/RepairGUI/RepairGUI_GlueDlg.h new file mode 100644 index 000000000..41aba949a --- /dev/null +++ b/src/RepairGUI/RepairGUI_GlueDlg.h @@ -0,0 +1,79 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_GlueDlg.h +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_Glue_H +#define DIALOGBOX_Glue_H + +#include "GEOMBase_Skeleton.h" + +class QAD_SpinBoxDbl; +class DlgRef_1Sel_Ext; + +//================================================================================= +// class : RepairGUI_GlueDlg +// purpose : +//================================================================================= +class RepairGUI_GlueDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + RepairGUI_GlueDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_GlueDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + +private : + void Init(); + void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + void initSelection(); + + GEOM::GEOM_Object_var myObject; + + DlgRef_1Sel_Ext* GroupPoints; + QAD_SpinBoxDbl* myTolEdt; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ClickOnCancel(); + + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); +}; + +#endif // DIALOGBOX_Glue_H diff --git a/src/RepairGUI/RepairGUI_OrientationDlg.cxx b/src/RepairGUI/RepairGUI_OrientationDlg.cxx deleted file mode 100644 index fd88ba8ab..000000000 --- a/src/RepairGUI/RepairGUI_OrientationDlg.cxx +++ /dev/null @@ -1,404 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : RepairGUI_OrientationDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#include "RepairGUI_OrientationDlg.h" - -#include -#include -#include -#include -#include -#include - -#include "utilities.h" - -using namespace std; - -//================================================================================= -// class : RepairGUI_OrientationDlg() -// purpose : Constructs a RepairGUI_OrientationDlg 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. -//================================================================================= -RepairGUI_OrientationDlg::RepairGUI_OrientationDlg(QWidget* parent, const char* name, RepairGUI* theRepairGUI, SALOME_Selection* Sel, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_ORIENTATION"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_ORIENTATION_TITLE")); - - /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_ORIENTATION")); - RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupPoints = new DlgRef_1Sel1Spin1Check(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR_LENGTH")); - GroupPoints->CheckButton1->setText(tr("GEOM_ORIENTATION_OPT")); - GroupPoints->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupPoints, 1, 0); - /***************************************************************/ - - /* Initialisations */ - myRepairGUI = theRepairGUI; - Init(); -} - - -//================================================================================= -// function : ~RepairGUI_OrientationDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -RepairGUI_OrientationDlg::~RepairGUI_OrientationDlg() -{ - // no need to delete child widgets, Qt does it all for us -} - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::Init() -{ - /* init variables */ - myEditCurrentArgument = GroupPoints->LineEdit1; - - myLength = 25.0; - myOkShape = false; - - double SpecificStep = 10; - /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, 999.999, SpecificStep, 3); - GroupPoints->SpinBox_DX->SetValue(myLength); - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); - - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle(int))); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::ClickOnOk() -{ - this->ClickOnApply(); - ClickOnCancel(); - return; -} - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::ClickOnApply() -{ - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkShape && GroupPoints->CheckButton1->isChecked()) { - myRepairGUI->MakeOrientationChangeAndDisplay(myGeomShape); - GroupPoints->CheckButton1->setChecked(FALSE); - } - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case -//================================================================================= -void RepairGUI_OrientationDlg::SelectionIntoArgument() -{ - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkShape = false; - return; - } - - // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myShape = S; - myOkShape = true; - } - - if(myOkShape) - this->MakeOrientationSimulationAndDisplay(); - return; -} - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - this->SelectionIntoArgument(); - - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::ActivateThisDialog() -{ - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::enterEvent(QEvent* e) -{ - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} - - -//================================================================================= -// function : ValueChangedInSpinBox() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::ValueChangedInSpinBox(double newValue) -{ - myLength = newValue; - if(myOkShape) - this->MakeOrientationSimulationAndDisplay(); - return; -} - - -//================================================================================= -// function : ReverseOrientation() -// purpose : -//================================================================================= -void RepairGUI_OrientationDlg::ReverseAngle(int state) -{ - if(myOkShape) - this->MakeOrientationSimulationAndDisplay(); - return; -} - - -//================================================================================== -// function : MakeOrientationSimulationAndDisplay() -// purpose : Create 'aCompound1' and 'aCompound2' each contains edges oriented -// : respectively FORWARD and REVERSE for all faces of 'aTopoDS' -// : These edges represent normal vectors on faces of 'aTopoDS' -// : For a unique edge an arrow is displayed to show its orientation. -//================================================================================== -void RepairGUI_OrientationDlg::MakeOrientationSimulationAndDisplay() -{ - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - TopoDS_Compound aCompound1, aCompound2; - TopoDS_Compound NullComp; - BRep_Builder aBuilder1, aBuilder2; - aCompound1 = aCompound2 = NullComp; - aBuilder1.MakeCompound(aCompound1); - aBuilder2.MakeCompound(aCompound2); - - if(myShape.IsNull()) - return; - - try { - /* Case of an edge */ - if(myShape.ShapeType() == TopAbs_EDGE) { - /* Try to display a cone simulation shape to show direction of edge */ - TopoDS_Shape tmpShape = myShape ; - if(GroupPoints->CheckButton1->isChecked()) { - if(myShape.Orientation() == TopAbs_FORWARD) - tmpShape.Orientation(TopAbs_REVERSED); - else - tmpShape.Orientation(TopAbs_FORWARD); - } - if(myGeomBase->CreateArrowForLinearEdge(tmpShape, mySimulationTopoDs)) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; - } - - gp_Pnt P1, P2 ; - gp_Vec V, V1, V2; - TopExp_Explorer ex(myShape, TopAbs_FACE); - int test = 0; - while(ex.More()) { - const TopoDS_Face& F = TopoDS::Face(ex.Current()); - /* find the center of the minmax */ - BRepAdaptor_Surface SF(F); - Standard_Real u, v, x; - - u = SF.FirstUParameter(); - x = SF.LastUParameter(); - if(Precision::IsInfinite(u)) { - if(Precision::IsInfinite(x)) - u = 0.0; - else - u = x; - } - else if(!Precision::IsInfinite(x)) - u = (u+x) / 2.0; - - v = SF.FirstVParameter(); - x = SF.LastVParameter(); - if(Precision::IsInfinite(v)) { - if(Precision::IsInfinite(x)) - v = 0.0; - else - v = x; - } - else if(!Precision::IsInfinite(x)) - v = (v+x) / 2.0; - - SF.D1(u, v, P1, V1, V2); - V = V1.Crossed(V2); - x = V.Magnitude(); - if(x > 1.e-10) - V.Multiply(myLength/x); - else { - V.SetCoord(myLength/2.0, 0.0, 0.0); - MESSAGE ("Null normal in Orientation " << endl); - } - - P2 = P1; - /* test orientation of each face and displays forward (aCompound1) */ - if(F.Orientation() == TopAbs_FORWARD) - P2.Translate(V); - else - P2.Translate(-V); - BRepBuilderAPI_MakeEdge anEdge(P1, P2); - aBuilder1.Add(aCompound1, anEdge); - - P2 = P1; - /* test orientation of each face and displays forward (aCompound2) */ - if(F.Orientation() == TopAbs_FORWARD) - P2.Translate(-V); - else - P2.Translate(V); - anEdge = BRepBuilderAPI_MakeEdge(P1, P2); - aBuilder2.Add(aCompound2, anEdge); - - ex.Next(); - test++; - } - - /* display simulation compounds */ - if(test > 0 && GroupPoints->CheckButton1->isChecked()) - mySimulationTopoDs = aCompound1; - else if(test > 0 && !GroupPoints->CheckButton1->isChecked()) - mySimulationTopoDs = aCompound2; - - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) - MESSAGE("Exception catched in MakeOrientationSimulationAndDisplay"); - return; -} diff --git a/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx new file mode 100644 index 000000000..8572c9fbc --- /dev/null +++ b/src/RepairGUI/RepairGUI_RemoveHolesDlg.cxx @@ -0,0 +1,446 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_RemoveHolesDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; +#include "RepairGUI_RemoveHolesDlg.h" + +#include "QAD_RightFrame.h" +#include "QAD_Desktop.h" +#include "QAD_MessageBox.h" + +#include "GEOM_Displayer.h" +#include "OCCViewer_Viewer3d.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include + + +//================================================================================= +// class : RepairGUI_RemoveHolesDlg() +// purpose : Constructs a RepairGUI_RemoveHolesDlg 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. +//================================================================================= +RepairGUI_RemoveHolesDlg::RepairGUI_RemoveHolesDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUPPRESS_HOLES"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_REMOVE_HOLES_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_REMOVE_HOLES_TITLE")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel_Ext(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_HOLES")); + GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE")); + GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + + myAllChk = new QCheckBox( tr( "GEOM_REMOVE_ALL_HOLES" ), GroupPoints->GroupBox1 ); + + QGridLayout* aSelectWiresLay = new QGridLayout( 0, 1, 1, 0, 6, "aSelectWiresLay"); + + mySelectWiresBtn = new QPushButton( GroupPoints->GroupBox1, "mySelectWiresBtn" ); + mySelectWiresBtn->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mySelectWiresBtn->sizePolicy().hasHeightForWidth() ) ); + mySelectWiresBtn->setText( trUtf8( "" ) ); + mySelectWiresBtn->setPixmap(image1); + + mySelectWiresEdt = new QLineEdit( GroupPoints->GroupBox1, "mySelectWiresEdt" ); + mySelectWiresEdt->setReadOnly( true ); + + mySelectWiresLbl = new QLabel( tr( "GEOM_WIRES_TO_REMOVE" ), GroupPoints->GroupBox1, "TextLabel1" ); + mySelectWiresLbl->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mySelectWiresLbl->sizePolicy().hasHeightForWidth() ) ); + + aSelectWiresLay->addWidget( mySelectWiresLbl, 0, 0 ); + aSelectWiresLay->addWidget( mySelectWiresBtn, 0, 1 ); + aSelectWiresLay->addWidget( mySelectWiresEdt, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + aSelectWiresLay->addItem( spacer, 1, 2 ); + + QGridLayout* aDetectLay = new QGridLayout( 0, 1, 1, 0, 6, "aDetectLay" ); + myFreeBoundBtn = new QPushButton( tr( "GEOM_DETECT" ), GroupPoints->GroupBox1 ); + QLabel* aLbl = new QLabel( tr( "GEOM_FREE_BOUNDARIES" ), GroupPoints->GroupBox1 ); + aDetectLay->addWidget( aLbl, 0, 0 ); + aDetectLay->addWidget( myFreeBoundBtn, 0, 1 ); + + GroupPoints->getGroupBoxLayout()->addMultiCellWidget( myAllChk, 1, 1, 0, 2 ); + GroupPoints->getGroupBoxLayout()->addLayout( aSelectWiresLay, 2, 0 ); + GroupPoints->getGroupBoxLayout()->addLayout( aDetectLay, 3, 0 ); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~RepairGUI_RemoveHolesDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_RemoveHolesDlg::~RepairGUI_RemoveHolesDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd = new GEOM::short_array(); + myWiresInd->length( 0 ); + + myGeomGUI->SetState( 0 ); + initSelection(); + + myClosed = -1; + myOpen = -1; + + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(mySelectWiresBtn, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(mySelectWiresEdt, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + connect( myAllChk, SIGNAL( clicked() ), this, SLOT( onRemoveAllClicked() ) ); + connect( myFreeBoundBtn, SIGNAL(clicked()), this, SLOT(onDetect()) ); + + initName( tr( "REMOVE_HOLES_NEW_OBJ_NAME" ) ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_RemoveHolesDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool RepairGUI_RemoveHolesDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setText(""); + mySelectWiresEdt->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd->length( 0 ); + + initSelection(); + + return true; +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection +//================================================================================= +void RepairGUI_RemoveHolesDlg::SelectionIntoArgument() +{ + erasePreview(); + myEditCurrentArgument->setText(""); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myObject = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == mySelectWiresEdt ) myWiresInd->length( 0 ); + + if ( mySelection->IObjectCount() == 1 ) + { + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) // face selection + { + Standard_Boolean aRes; + myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( aRes && GEOMBase::IsShape( myObject ) ) + myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) ); + else + myObject = GEOM::GEOM_Object::_nil(); + } + else if ( myEditCurrentArgument == mySelectWiresEdt && !myAllChk->isChecked() ) + { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + const int n = aMap.Extent(); + myWiresInd->length( n ); + for ( int i = 1; i <= n; i++ ) + myWiresInd[i-1] = aMap( i ); + if ( n ) + myEditCurrentArgument->setText( QString::number( n ) + "_" + tr( "GEOM_WIRE" ) + tr( "_S_" ) ); + } + } +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::SetEditCurrentArgument() +{ + const QObject* send = sender(); + if ( send == GroupPoints->PushButton1 ) + myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == mySelectWiresBtn && !myObject->_is_nil() ) + myEditCurrentArgument = mySelectWiresEdt; + if ( myEditCurrentArgument ) + { + initSelection(); + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::LineEditReturnPressed() +{ + const QObject* send = sender(); + if( send == GroupPoints->LineEdit1 || send == mySelectWiresEdt ) + { + myEditCurrentArgument = (QLineEdit*)send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setText(""); + mySelectWiresEdt->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd->length( 0 ); + + myClosed = -1; + myOpen = -1; + + myGeomGUI->SetState( 0 ); + initSelection(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_RemoveHolesDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_RemoveHolesDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_RemoveHolesDlg::isValid( QString& msg ) +{ + myClosed = -1; + return !myObject->_is_nil() && ( IsPreview() || myAllChk->isChecked() || myWiresInd->length() ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_RemoveHolesDlg::execute( ObjectList& objects ) +{ + bool aResult = false; + if ( IsPreview() ) // called from onDetect(): detect free boundary edges, highlight them (add to objects), display message dialog + { + GEOM::ListOfGO_var aClosed, anOpen; + + aResult = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->GetFreeBoundary( myObject, aClosed, anOpen ); + + if ( aResult ) + { + myClosed = aClosed->length(); + myOpen = anOpen->length(); + int i; + for ( i = 0; i < myClosed; i++ ) + objects.push_back( aClosed[i]._retn() ); + for ( i = 0; i < myOpen; i++ ) + objects.push_back( anOpen[i]._retn() ); + } + else + myClosed = -1; + } + else + { + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->FillHoles( myObject, myWiresInd ); + aResult = !anObj->_is_nil(); + if ( aResult ) + objects.push_back( anObj._retn() ); + } + + return aResult; +} + +//================================================================================= +// function : onRemoveAllClicked +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::onRemoveAllClicked() +{ + bool b = myAllChk->isOn(); + mySelectWiresLbl->setEnabled( !b ); + mySelectWiresBtn->setEnabled( !b ); + mySelectWiresEdt->setEnabled( !b ); + if ( b ) + { + mySelectWiresEdt->setText( "" ); + myWiresInd->length( 0 ); + } +} + +//================================================================================= +// function : initSelection +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::initSelection() +{ + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + { + TColStd_MapOfInteger aTypes; + aTypes.Add( GEOM_COMPOUND ); + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_SHELL ); + aTypes.Add( GEOM_FACE ); + + globalSelection( aTypes ); + } + else if ( myEditCurrentArgument == mySelectWiresEdt ) + { + localSelection( myObject, TopAbs_EDGE ); + localSelection( myObject, TopAbs_WIRE ); + } +} + + +//================================================================================= +// function : onDetect +// purpose : +//================================================================================= +void RepairGUI_RemoveHolesDlg::onDetect() +{ + displayPreview( false, true, true, 3 ); + + // field myClosed,myOpen is initialized in execute() method, called by displayPreview(). + QString msg; + if ( myClosed != -1 ) + msg = tr( "GEOM_FREE_BOUNDS_MSG" ).arg( myClosed + myOpen ).arg( myClosed ).arg( myOpen ); + else + msg = tr( "GEOM_FREE_BOUNDS_ERROR" ); + QAD_MessageBox::info1( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, "Close" ); +} + diff --git a/src/RepairGUI/RepairGUI_RemoveHolesDlg.h b/src/RepairGUI/RepairGUI_RemoveHolesDlg.h new file mode 100644 index 000000000..12c85fdfd --- /dev/null +++ b/src/RepairGUI/RepairGUI_RemoveHolesDlg.h @@ -0,0 +1,95 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_RemoveHolesDlg.h +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_RemoveHoles_H +#define DIALOGBOX_RemoveHoles_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1Sel_Ext.h" + +#include + +#include +#include +#include +#include + +//================================================================================= +// class : RepairGUI_RemoveHolesDlg +// purpose : +//================================================================================= +class RepairGUI_RemoveHolesDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + RepairGUI_RemoveHolesDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_RemoveHolesDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + +private : + void Init(); + void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + void initSelection(); + + GEOM::GEOM_Object_var myObject; + GEOM::short_array_var myWiresInd; + + DlgRef_1Sel_Ext* GroupPoints; + QCheckBox* myAllChk; + QLabel* mySelectWiresLbl; + QPushButton* mySelectWiresBtn; + QLineEdit* mySelectWiresEdt; + QPushButton* myFreeBoundBtn; + + int myClosed; // number of free closed boundaries detected. calculated in execute(), used in onDetect(). + int myOpen; // number of free open boundaries detected. calculated in execute(), used in onDetect(). + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ClickOnCancel(); + + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + + void onRemoveAllClicked(); + void onDetect(); +}; + +#endif // DIALOGBOX_RemoveHoles_H diff --git a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx new file mode 100644 index 000000000..e865a125d --- /dev/null +++ b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.cxx @@ -0,0 +1,388 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_RemoveIntWiresDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; +#include "RepairGUI_RemoveIntWiresDlg.h" + +#include "QAD_RightFrame.h" +#include "QAD_Desktop.h" +#include "OCCViewer_Viewer3d.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include + + +//================================================================================= +// class : RepairGUI_RemoveIntWiresDlg() +// purpose : Constructs a RepairGUI_RemoveIntWiresDlg 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. +//================================================================================= +RepairGUI_RemoveIntWiresDlg::RepairGUI_RemoveIntWiresDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUPPRESS_INT_WIRES"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_REMOVE_INTERNAL_WIRES_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_REMOVE_INTERNAL_WIRES_TITLE")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel_Ext(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_INTERNAL_WIRES")); + GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_FACE")); + GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + + myAllChk = new QCheckBox( tr( "GEOM_REMOVE_ALL_INT_WIRES" ), GroupPoints->GroupBox1 ); + + QGridLayout* aSelectWiresLay = new QGridLayout( 0, 1, 1, 0, 6, "aSelectWiresLay"); + + mySelectWiresBtn = new QPushButton( GroupPoints->GroupBox1, "mySelectWiresBtn" ); + mySelectWiresBtn->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mySelectWiresBtn->sizePolicy().hasHeightForWidth() ) ); + mySelectWiresBtn->setText( trUtf8( "" ) ); + mySelectWiresBtn->setPixmap(image1); + + mySelectWiresEdt = new QLineEdit( GroupPoints->GroupBox1, "mySelectWiresEdt" ); + mySelectWiresEdt->setReadOnly( true ); + + mySelectWiresLbl = new QLabel( tr( "GEOM_WIRES_TO_REMOVE" ), GroupPoints->GroupBox1, "TextLabel1" ); + mySelectWiresLbl->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, mySelectWiresLbl->sizePolicy().hasHeightForWidth() ) ); + + aSelectWiresLay->addWidget( mySelectWiresLbl, 0, 0 ); + aSelectWiresLay->addWidget( mySelectWiresBtn, 0, 1 ); + aSelectWiresLay->addWidget( mySelectWiresEdt, 0, 2 ); + QSpacerItem* spacer = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + aSelectWiresLay->addItem( spacer, 1, 2 ); + + GroupPoints->getGroupBoxLayout()->addMultiCellWidget( myAllChk, 1, 1, 0, 2 ); + GroupPoints->getGroupBoxLayout()->addLayout( aSelectWiresLay, 2, 0 ); + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~RepairGUI_RemoveIntWiresDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_RemoveIntWiresDlg::~RepairGUI_RemoveIntWiresDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd = new GEOM::short_array(); + myWiresInd->length( 0 ); + + myGeomGUI->SetState( 0 ); + initSelection(); + + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(mySelectWiresBtn, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(mySelectWiresEdt, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + connect( myAllChk, SIGNAL( clicked() ), this, SLOT( onRemoveAllClicked() ) ); + + initName( tr( "REMOVE_INT_WIRES_NEW_OBJ_NAME" ) ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool RepairGUI_RemoveIntWiresDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setText(""); + mySelectWiresEdt->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd->length( 0 ); + + initSelection(); + + return true; +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText(""); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myObject = GEOM::GEOM_Object::_nil(); + else if ( myEditCurrentArgument == mySelectWiresEdt ) myWiresInd->length( 0 ); + + if ( mySelection->IObjectCount() == 1 ) + { + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) // face selection + { + Standard_Boolean aRes; + myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( aRes && GEOMBase::IsShape( myObject ) ) + myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) ); + else + myObject = GEOM::GEOM_Object::_nil(); + } + else if ( myEditCurrentArgument == mySelectWiresEdt && !myAllChk->isChecked() ) + { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + const int n = aMap.Extent(); + myWiresInd->length( n ); + for ( int i = 1; i <= n; i++ ) + myWiresInd[i-1] = aMap( i ); + if ( n ) + myEditCurrentArgument->setText( QString::number( n ) + "_" + tr( "GEOM_WIRE" ) + tr( "_S_" ) ); + } + } +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::SetEditCurrentArgument() +{ + const QObject* send = sender(); + if ( send == GroupPoints->PushButton1 ) + myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == mySelectWiresBtn && !myObject->_is_nil() ) + myEditCurrentArgument = mySelectWiresEdt; + + if ( myEditCurrentArgument ) + { + initSelection(); + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::LineEditReturnPressed() +{ + const QObject* send = sender(); + if( send == GroupPoints->LineEdit1 || send == mySelectWiresEdt ) + { + myEditCurrentArgument = (QLineEdit*)send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setText(""); + mySelectWiresEdt->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + myWiresInd->length( 0 ); + + myGeomGUI->SetState( 0 ); + initSelection(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_RemoveIntWiresDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_RemoveIntWiresDlg::isValid( QString& msg ) +{ + return !myObject->_is_nil() && ( myAllChk->isChecked() || myWiresInd->length() ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_RemoveIntWiresDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->RemoveIntWires( myObject, myWiresInd ); + bool aResult = !anObj->_is_nil(); + if ( aResult ) + objects.push_back( anObj._retn() ); + + return aResult; +} + +//================================================================================= +// function : onRemoveAllClicked +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::onRemoveAllClicked() +{ + bool b = myAllChk->isOn(); + mySelectWiresLbl->setEnabled( !b ); + mySelectWiresBtn->setEnabled( !b ); + mySelectWiresEdt->setEnabled( !b ); + if ( b ) + { + mySelectWiresEdt->setText( "" ); + myWiresInd->length( 0 ); + } +} + +//================================================================================= +// function : initSelection +// purpose : +//================================================================================= +void RepairGUI_RemoveIntWiresDlg::initSelection() +{ + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) + { + TColStd_MapOfInteger aTypes; + aTypes.Add( GEOM_COMPOUND ); + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_SHELL ); + aTypes.Add( GEOM_FACE ); + + globalSelection( aTypes ); + } + else if ( myEditCurrentArgument == mySelectWiresEdt ) + { + //localSelection( myObject, TopAbs_EDGE ); + localSelection( myObject, TopAbs_WIRE ); + } +} + + diff --git a/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.h b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.h new file mode 100644 index 000000000..4880e97a8 --- /dev/null +++ b/src/RepairGUI/RepairGUI_RemoveIntWiresDlg.h @@ -0,0 +1,90 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_RemoveIntWiresDlg.h +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_RemoveIntWires_H +#define DIALOGBOX_RemoveIntWires_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1Sel_Ext.h" + +#include + +#include +#include +#include +#include + +//================================================================================= +// class : RepairGUI_RemoveIntWiresDlg +// purpose : +//================================================================================= +class RepairGUI_RemoveIntWiresDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + RepairGUI_RemoveIntWiresDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_RemoveIntWiresDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + +private : + void Init(); + void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + void initSelection(); + + GEOM::GEOM_Object_var myObject; + GEOM::short_array_var myWiresInd; + + DlgRef_1Sel_Ext* GroupPoints; + QCheckBox* myAllChk; + QLabel* mySelectWiresLbl; + QPushButton* mySelectWiresBtn; + QLineEdit* mySelectWiresEdt; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void ClickOnCancel(); + + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + + void onRemoveAllClicked(); +}; + +#endif // DIALOGBOX_RemoveIntWires_H diff --git a/src/RepairGUI/RepairGUI_SewingDlg.cxx b/src/RepairGUI/RepairGUI_SewingDlg.cxx index d36dedea0..79e78405b 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.cxx +++ b/src/RepairGUI/RepairGUI_SewingDlg.cxx @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -29,16 +29,27 @@ using namespace std; #include "RepairGUI_SewingDlg.h" -#include "QAD_Config.h" +#include "QAD_RightFrame.h" +#include "QAD_Desktop.h" +#include "QAD_MessageBox.h" +#include "OCCViewer_Viewer3d.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include + +#define DEFAULT_TOLERANCE_VALUE 1e-07 + //================================================================================= // class : RepairGUI_SewingDlg() -// purpose : Constructs a RepairGUI_SewingDlg which is a child of 'parent', with the +// purpose : Constructs a RepairGUI_SewingDlg 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. //================================================================================= -RepairGUI_SewingDlg::RepairGUI_SewingDlg(QWidget* parent, const char* name, RepairGUI* theRepairGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +RepairGUI_SewingDlg::RepairGUI_SewingDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SEWING"))); @@ -47,22 +58,33 @@ RepairGUI_SewingDlg::RepairGUI_SewingDlg(QWidget* parent, const char* name, Rep setCaption(tr("GEOM_SEWING_TITLE")); /***************************************************************/ - GroupConstructors->setTitle(tr("GEOM_SEWING")); + GroupConstructors->setTitle(tr("GEOM_SEWING_TITLE")); RadioButton1->setPixmap(image0); RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_1Sel1Spin(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); - GroupPoints->TextLabel2->setText(tr("GEOM_PRECISION")); + GroupPoints = new DlgRef_1Sel_Ext(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_SEWING")); + GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE")); GroupPoints->PushButton1->setPixmap(image1); - - Layout1->addWidget(GroupPoints, 1, 0); + GroupPoints->LineEdit1->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + + QGridLayout* aLay = new QGridLayout( 0, 2, 2, 0, 6, "aLay" ); + myTolEdt = new QAD_SpinBoxDbl( GroupPoints->GroupBox1, 0, 100, 1e-7, 10, 1e-10 ); + myTolEdt->setValue( DEFAULT_TOLERANCE_VALUE ); + QLabel* aLbl1 = new QLabel( tr( "GEOM_TOLERANCE" ), GroupPoints->GroupBox1 ); + myFreeBoundBtn = new QPushButton( tr( "GEOM_DETECT" ), GroupPoints->GroupBox1 ); + QLabel* aLbl2 = new QLabel( tr( "GEOM_FREE_BOUNDARIES" ), GroupPoints->GroupBox1 ); + aLay->addWidget( aLbl1, 0, 0 ); + aLay->addWidget( myTolEdt, 0, 1 ); + aLay->addWidget( aLbl2, 1, 0 ); + aLay->addWidget( myFreeBoundBtn, 1, 1 ); + + GroupPoints->getGroupBoxLayout()->addLayout( aLay, 3, 0 ); /***************************************************************/ - /* Initialisations */ - myRepairGUI = theRepairGUI; Init(); } @@ -73,7 +95,6 @@ RepairGUI_SewingDlg::RepairGUI_SewingDlg(QWidget* parent, const char* name, Rep //================================================================================= RepairGUI_SewingDlg::~RepairGUI_SewingDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -86,98 +107,133 @@ void RepairGUI_SewingDlg::Init() /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - myOkListShapes = false; - myPrecision = 0.00001; + myObject = GEOM::GEOM_Object::_nil(); - /* Get setting of step value from file configuration */ - QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + myGeomGUI->SetState( 0 ); + initSelection(); - /* min, max, step and decimals for spin boxes */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(0.00001, 999.99999, step, 5); - GroupPoints->SpinBox_DX->SetValue(myPrecision); - + myClosed = -1; + myOpen = -1; + /* signals and slots connections */ + connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); + 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())); connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); + connect(myFreeBoundBtn, SIGNAL(clicked()), this, SLOT(onDetect())); - return; + initName( tr( "SEWING_NEW_OBJ_NAME" ) ); } //================================================================================= // function : ClickOnOk() -// purpose : +// purpose : Same than click on apply but close this dialog. //================================================================================= void RepairGUI_SewingDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } + //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void RepairGUI_SewingDlg::ClickOnApply() +bool RepairGUI_SewingDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if(myOkListShapes) - myRepairGUI->MakeSewingAndDisplay(myListShapes, myPrecision); - return; + if ( !onAccept() ) + return false; + + initName(); + + GroupPoints->LineEdit1->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + + initSelection(); + + return true; +} + + +//================================================================================= +// function : ClickOnCancel() +// purpose : +//================================================================================= +void RepairGUI_SewingDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } //================================================================================= // function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case +// purpose : Called when selection //================================================================================= void RepairGUI_SewingDlg::SelectionIntoArgument() { + erasePreview(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - myOkListShapes = false; - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel < 2) - return; - - myGeomBase->ConvertListOfIOInListOfIOR(mySelection->StoredIObjects(), myListShapes); - myEditCurrentArgument->setText(aString); - myOkListShapes = true; - /* no simulation */ - return; + myObject = GEOM::GEOM_Object::_nil(); + + if ( mySelection->IObjectCount() == 1 ) + { + Handle(SALOME_InteractiveObject) anIO = mySelection->firstIObject(); + Standard_Boolean aRes; + myObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( aRes ) + myEditCurrentArgument->setText( GEOMBase::GetName( myObject ) ); + } } - //================================================================================= // function : SetEditCurrentArgument() // purpose : //================================================================================= void RepairGUI_SewingDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); + const QObject* send = sender(); + if ( send == GroupPoints->PushButton1 ) + { + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_SewingDlg::LineEditReturnPressed() +{ + const QObject* send = sender(); + if( send == GroupPoints->LineEdit1 ) + { myEditCurrentArgument = GroupPoints->LineEdit1; - this->SelectionIntoArgument(); + GEOMBase_Skeleton::LineEditReturnPressed(); } - return; +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : +//================================================================================= +void RepairGUI_SewingDlg::DeactivateActiveDialog() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -189,29 +245,121 @@ void RepairGUI_SewingDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; + + GroupPoints->LineEdit1->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + + myClosed = -1; + myOpen = -1; + + myGeomGUI->SetState( 0 ); + initSelection(); } //================================================================================= // function : enterEvent() -// purpose : +// purpose : Mouse enter onto the dialog to activate it //================================================================================= void RepairGUI_SewingDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_SewingDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_SewingDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); } +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_SewingDlg::isValid( QString& msg ) +{ + myClosed = -1; + return !myObject->_is_nil() && ( IsPreview() || myTolEdt->value() > 0. ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_SewingDlg::execute( ObjectList& objects ) +{ + bool aResult = false; + if ( IsPreview() ) // called from onDetect(): detect free boundary edges, highlight them (add to objects), display message dialog + { + GEOM::ListOfGO_var aClosed, anOpen; + + aResult = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->GetFreeBoundary( myObject, aClosed, anOpen ); + + if ( aResult ) + { + myClosed = aClosed->length(); + myOpen = anOpen->length(); + int i; + for ( i = 0; i < myClosed; i++ ) + objects.push_back( aClosed[i]._retn() ); + for ( i = 0; i < myOpen; i++ ) + objects.push_back( anOpen[i]._retn() ); + } + else + myClosed = -1; + } + else + { + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->Sew( myObject, myTolEdt->value() ); + aResult = !anObj->_is_nil(); + if ( aResult ) + objects.push_back( anObj._retn() ); + } + + return aResult; +} + +//================================================================================= +// function : initSelection +// purpose : +//================================================================================= +void RepairGUI_SewingDlg::initSelection() +{ + TColStd_MapOfInteger aTypes; + aTypes.Add( GEOM_SHELL ); + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_COMPOUND ); + globalSelection( aTypes ); +} //================================================================================= -// function : ValueChangedInSpinBox() +// function : onDetect // purpose : //================================================================================= -void RepairGUI_SewingDlg::ValueChangedInSpinBox(double newValue) +void RepairGUI_SewingDlg::onDetect() { - myPrecision = newValue; - return; + displayPreview( false, true, true, 3 ); + + // field myClosed,myOpen is initialized in execute() method, called by displayPreview(). + QString msg; + if ( myClosed != -1 ) + msg = tr( "GEOM_FREE_BOUNDS_MSG" ).arg( myClosed + myOpen ).arg( myClosed ).arg( myOpen ); + else + msg = tr( "GEOM_FREE_BOUNDS_ERROR" ); + QAD_MessageBox::info1( this, tr( "GEOM_FREE_BOUNDS_TLT" ), msg, "Close" ); } diff --git a/src/RepairGUI/RepairGUI_SewingDlg.h b/src/RepairGUI/RepairGUI_SewingDlg.h index 7e55b400b..eaaa5de7f 100644 --- a/src/RepairGUI/RepairGUI_SewingDlg.h +++ b/src/RepairGUI/RepairGUI_SewingDlg.h @@ -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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org // // // @@ -26,48 +26,66 @@ // Module : GEOM // $Header$ -#ifndef DIALOGBOX_SEWING_H -#define DIALOGBOX_SEWING_H +#ifndef DIALOGBOX_Sewing_H +#define DIALOGBOX_Sewing_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel1Spin.h" +#include "DlgRef_1Sel_Ext.h" +#include "QAD_SpinBoxDbl.h" + +#include -#include "RepairGUI.h" +#include +#include +#include +#include //================================================================================= // class : RepairGUI_SewingDlg // purpose : //================================================================================= class RepairGUI_SewingDlg : public GEOMBase_Skeleton -{ +{ Q_OBJECT public: - RepairGUI_SewingDlg(QWidget* parent = 0, const char* name = 0, RepairGUI* theRepairGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + RepairGUI_SewingDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~RepairGUI_SewingDlg(); -private: +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + +private : void Init(); void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + void initSelection(); - RepairGUI* myRepairGUI; - - double step; + GEOM::GEOM_Object_var myObject; - GEOM::GEOM_Gen::ListOfIOR myListShapes; - Standard_Real myPrecision; - bool myOkListShapes; /* to check when arguments is defined */ + DlgRef_1Sel_Ext* GroupPoints; + QAD_SpinBoxDbl* myTolEdt; + QPushButton* myFreeBoundBtn; - DlgRef_1Sel1Spin* GroupPoints; + int myClosed; // number of free closed boundaries detected. calculated in execute(), used in onDetect(). + int myOpen; // number of free open boundaries detected. calculated in execute(), used in onDetect(). private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); + void ActivateThisDialog(); + void DeactivateActiveDialog(); + + void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); + void onDetect(); }; -#endif // DIALOGBOX_SEWING_H +#endif // DIALOGBOX_Sewing_H diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx new file mode 100755 index 000000000..cc1fb4f54 --- /dev/null +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.cxx @@ -0,0 +1,807 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_ShapeProcessDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +using namespace std; + +#include "RepairGUI_ShapeProcessDlg.h" + +#include "SALOME_ListIteratorOfListIO.hxx" +#include "SALOME_ListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include +#include "QAD_Desktop.h" +#include + + +//================================================================================= +// class : RepairGUI_ShapeProcessDlg() +// purpose : Constructs a RepairGUI_ShapeProcessDlg 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. +//================================================================================= +RepairGUI_ShapeProcessDlg::RepairGUI_ShapeProcessDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + init(); +} + + +//================================================================================= +// function : ~RepairGUI_ShapeProcessDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_ShapeProcessDlg::~RepairGUI_ShapeProcessDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::init() +{ + myGeomGUI->SetState( 0 ); + + initParamsValues(); + initSelection(); + + setCaption(tr("GEOM_SHAPEPROCESS_TITLE")); + + GroupConstructors->hide(); + + // select widget on the top + mySelectWdgt = new DlgRef_1Sel_QTD( this, "SelectedObjects" ); + mySelectWdgt->GroupBox1->setTitle( tr("GEOM_SHAPE") ); + mySelectWdgt->TextLabel1->setText( tr("GEOM_SELECTED_OBJECTS") ); + mySelectWdgt->PushButton1->setPixmap( QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")) ); + mySelectWdgt->LineEdit1->setReadOnly( true ); + + Layout1->addWidget( mySelectWdgt, 0, 0 ); + + // layout the two group boxes in the middle, add a list of operations + QFrame* aMidFrame = new QFrame( this ); + QGridLayout* aMidLay = new QGridLayout( aMidFrame, 1, 3, 0, 5 ); + QGroupBox* anOperGr = new QGroupBox( tr("GEOM_OPERATIONS"), aMidFrame ); + QVBoxLayout* aOperLay = new QVBoxLayout( anOperGr, 0, 0 ); + + myOpList = new QListView( anOperGr ); + myOpList->setSorting( -1 ); + myOpList->addColumn( "Operations" ); + myOpList->header()->hide(); + aOperLay->addWidget( myOpList ); + QStringList::ConstIterator it = myOpLst.end(); + do // iterating from end to begin so to keep the order of items in the listview. + new QCheckListItem ( myOpList, *(--it), QCheckListItem::CheckBox ); + while ( it != myOpLst.begin() ); + + QGroupBox* aParamsGr = new QGroupBox( tr("GEOM_PARAMETERS"), aMidFrame ); + aMidLay->addWidget( anOperGr, 0, 0 ); + aMidLay->addMultiCellWidget( aParamsGr, 0, 0, 1, 3 ); + aMidLay->setColStretch( 0, 1 ); + aMidLay->setColStretch( 1, 2 ); + + Layout1->addWidget( aMidFrame, 2, 0 ); + Layout1->setRowStretch( 0, 0 ); + Layout1->setRowStretch( 1, 1 ); + + // add a widget stack to the parameters group box + myStack = new QWidgetStack( aParamsGr ); + QVBoxLayout* aVParamsLay = new QVBoxLayout( aParamsGr ); + aVParamsLay->addWidget( myStack ); + + // continueties values.. + QStringList aContinueties = QStringList::split( ",", "C0,G1,C1,G2,C2,C3,CN" ); + + // FixShape + QFrame* aFrame = new QFrame( myStack ); + QGridLayout* aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + myFixShapeTol3D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + myFixShapeMaxTol3D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + + aLay->addWidget( new QLabel( tr("GEOM_3D_TOLERANCE"), aFrame ), 0, 0 ); + aLay->addWidget( myFixShapeTol3D, 0, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_MAX_3D_TOLERANCE"), aFrame ), 1, 0 ); + aLay->addWidget( myFixShapeMaxTol3D, 1, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "FixShape" ) ); + + // FixFaceSize + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + myFixFaceSizeTol = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + + aLay->addWidget( new QLabel( tr("GEOM_TOLERANCE"), aFrame ), 0, 0 ); + aLay->addWidget( myFixFaceSizeTol, 0, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "FixFaceSize" ) ); + + // DropSmallEdges + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + myDropSmallEdgesTol3D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + + aLay->addWidget( new QLabel( tr("GEOM_3D_TOLERANCE"), aFrame ), 0, 0 ); + aLay->addWidget( myDropSmallEdgesTol3D, 0, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "DropSmallEdges" ) ); + + // SplitAngle + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + mySplitAngleAngle = new QAD_SpinBoxDbl( aFrame, 0, 360, 1 ); + mySplitAngleMaxTol = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + + aLay->addWidget( new QLabel( tr("GEOM_ANGLE_1"), aFrame ), 0, 0 ); + aLay->addWidget( mySplitAngleAngle, 0, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_MAX_TOLERANCE"), aFrame ), 1, 0 ); + aLay->addWidget( mySplitAngleMaxTol, 1, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "SplitAngle" ) ); + + // SplitClosedFaces + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + mySplitClosedFacesNum = new QSpinBox( aFrame ); + + aLay->addWidget( new QLabel( tr("GEOM_NUM_SPLIT_POINTS"), aFrame ), 0, 0 ); + aLay->addWidget( mySplitClosedFacesNum, 0, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "SplitClosedFaces" ) ); + + // SplitContinuity + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + mySplitContTol3D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + mySplitContSurfCont = new QComboBox( aFrame ); + mySplitContSurfCont->insertStringList( aContinueties ); + mySplitContCurvCont = new QComboBox( aFrame ); + mySplitContCurvCont->insertStringList( aContinueties ); + + aLay->addWidget( new QLabel( tr("GEOM_3D_TOLERANCE"), aFrame ), 0, 0 ); + aLay->addWidget( mySplitContTol3D, 0, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_SURFACE_CONTINUTY"), aFrame ), 1, 0 ); + aLay->addWidget( mySplitContSurfCont, 1, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_CURVE_CONTINUTY"), aFrame ), 2, 0 ); + aLay->addWidget( mySplitContCurvCont, 2, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "SplitContinuity" ) ); + + // BSplineRestriction + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + myBSplineSurfModeChk = new QCheckBox( tr("GEOM_SURFACE_MODE"), aFrame ); + myBSpline3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), aFrame ); + myBSpline2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), aFrame ); + myBSplineTol3D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + myBSplineTol2D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + myBSplineDegree = new QSpinBox( aFrame ); + myBSplineSegments = new QSpinBox( aFrame ); + myBSpline2DCont = new QComboBox( aFrame ); + myBSpline2DCont->insertStringList( aContinueties ); + myBSpline3DCont = new QComboBox( aFrame ); + myBSpline3DCont->insertStringList( aContinueties ); + + myBSplineSurfModeChk->setChecked( true ); + myBSpline3DCurveChk->setChecked( true ); + myBSpline2DCurveChk->setChecked( true ); + + aLay->addWidget( myBSplineSurfModeChk, 0, 0 ); + aLay->addWidget( myBSpline3DCurveChk, 1, 0 ); + aLay->addWidget( myBSpline2DCurveChk, 2, 0 ); + aLay->addWidget( new QLabel( tr("GEOM_3D_TOLERANCE"), aFrame), 3, 0 ); + aLay->addWidget( myBSplineTol3D, 3, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_2D_TOLERANCE"), aFrame), 4, 0 ); + aLay->addWidget( myBSplineTol2D, 4, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_REQUIRED_DEGREE"), aFrame), 5, 0 ); + aLay->addWidget( myBSplineDegree, 5, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_REQUIRED_NUM_SEGMENTS"), aFrame), 6, 0 ); + aLay->addWidget( myBSplineSegments, 6, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_3D_CONTINUTY"), aFrame), 7, 0 ); + aLay->addWidget( myBSpline3DCont, 7, 1 ); + aLay->addWidget( new QLabel( tr("GEOM_2D_CONTINUTY"), aFrame), 8, 0 ); + aLay->addWidget( myBSpline2DCont, 8, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "BSplineRestriction" ) ); + + // ToBezier + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + myToBezierSurfModeChk = new QCheckBox( tr("GEOM_SURFACE_MODE"), aFrame ); + myToBezier3DCurveChk = new QCheckBox( tr("GEOM_3D_CURVE_MODE"), aFrame ); + myToBezier2DCurveChk = new QCheckBox( tr("GEOM_2D_CURVE_MODE"), aFrame ); + myToBezierMaxTol = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + + aLay->addWidget( myToBezierSurfModeChk, 0, 0 ); + aLay->addWidget( myToBezier3DCurveChk, 1, 0 ); + aLay->addWidget( myToBezier2DCurveChk, 2, 0 ); + aLay->addWidget( new QLabel( tr("GEOM_MAX_TOLERANCE"), aFrame), 3, 0 ); + aLay->addWidget( myToBezierMaxTol, 3, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "ToBezier" ) ); + + // SameParameter + aFrame = new QFrame( myStack ); + aLay = new QGridLayout( aFrame, 10, 2, 0, 5 ); + + mySameParameterTol3D = new QAD_SpinBoxDbl( aFrame, 0, 100, 1e-7, 10, 1e-10 ); + + aLay->addWidget( new QLabel( tr("GEOM_3D_TOLERANCE"), aFrame ), 0, 0 ); + aLay->addWidget( mySameParameterTol3D, 0, 1 ); + aLay->setRowStretch( 9, 2 ); + + myStack->addWidget( aFrame, myOpLst.findIndex( "SameParameter" ) ); + + // signals and slots connections + connect( myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(deactivate()) ); + connect( myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(onCancel()) ); + + connect( buttonCancel, SIGNAL(clicked()), this, SLOT(onCancel()) ); + connect( buttonOk, SIGNAL(clicked()), this, SLOT(onOk()) ); + connect( buttonApply, SIGNAL(clicked()), this, SLOT(onApply()) ); + + connect( mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(selectionChanged()) ); + connect( myOpList, SIGNAL(selectionChanged()), this, SLOT(operationChanged()) ); + + connect( mySelectWdgt->PushButton1, SIGNAL(clicked()), this, SLOT(selectClicked()) ); + connect( mySelectWdgt->LineEdit1, SIGNAL(returnPressed()), this, SLOT(lineEditReturnPressed()) ); + + adjustSize(); + loadDefaults(); // init dialog fields with values from resource file + myOpList->setSelected( myOpList->findItem( "FixShape", 0 ), true ); + reset(); + + initName( tr( "PROCESS_SHAPE_NEW_OBJ_NAME" ) ); +} + +//================================================================================= +// function : operationChanged() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::operationChanged() +{ + QListViewItem* anItem = myOpList->selectedItem(); + if ( anItem ) + { + int id = myOpLst.findIndex( anItem->text(0) ); + if ( id > -1 ) + myStack->raiseWidget( id ); + } +} + +//================================================================================= +// function : onOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_ShapeProcessDlg::onOk() +{ + if ( onApply() ) + onCancel(); +} + + + +//================================================================================= +// function : onApply() +// purpose : +//================================================================================= +bool RepairGUI_ShapeProcessDlg::onApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + reset(); + initSelection(); + + return true; +} + + +//================================================================================= +// function : onCancel() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::onCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : selectionChanged() +// purpose : Called when selection as changed or other case +// : used only by SelectButtonC1A1 (LineEditC1A1) +//================================================================================= +void RepairGUI_ShapeProcessDlg::selectionChanged() +{ + reset(); + + Standard_Boolean aRes = Standard_False; + int i = 0; + myObjects->length( mySelection->IObjectCount() ); + for ( SALOME_ListIteratorOfListIO anIt( mySelection->StoredIObjects() ); anIt.More(); anIt.Next() ) + { + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + myObjects[i++] = aSelectedObject; + } + myObjects->length( i ); + if ( i == 1 ) + mySelectWdgt->LineEdit1->setText( GEOMBase::GetName( myObjects[0] ) ); + else if ( i > 0 ) + mySelectWdgt->LineEdit1->setText( QString::number( i ) + "_" + tr( "GEOM_OBJECTS" ) ); +} + + +//================================================================================= +// function : selectClicked() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::selectClicked() +{ + mySelectWdgt->LineEdit1->setFocus(); + selectionChanged(); +} + + +//================================================================================= +// function : lineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::lineEditReturnPressed() +{ + GEOMBase_Skeleton::LineEditReturnPressed(); +} + + +//================================================================================= +// function : deactivate() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::deactivate() +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : activate() +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::activate() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(selectionChanged())); + + reset(); + myGeomGUI->SetState( 0 ); + initSelection(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_ShapeProcessDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + activate(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : same than click on cancel button +//================================================================================= +void RepairGUI_ShapeProcessDlg::closeEvent(QCloseEvent* e) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : reset() +// purpose : Completely reset the state of method including local context +//================================================================================= +void RepairGUI_ShapeProcessDlg::reset() +{ + myObjects = new GEOM::ListOfGO(); + myObjects->length( 0 ); + mySelectWdgt->LineEdit1->setText(""); +} + + +//================================================================================= +// function : get_convert +// purpose : conversion of angle values to radians (non-angle values are not converted) +//================================================================================= +const char* get_convert( const char* theParam, const char* theValue ) +{ + if ( !strcmp( theParam, "SplitAngle.Angle" ) ) + { + double doubleValue = atof( theValue ) * PI / 180; + TCollection_AsciiString str( doubleValue ); + return CORBA::string_dup( str.ToCString() ); + } + return CORBA::string_dup( theValue ); +} + +//================================================================================= +// function : set_convert +// purpose : conversion of angle values to degrees (non-angle values are not converted) +//================================================================================= +const char* set_convert( const char* theParam, const char* theValue ) +{ + if ( !strcmp( theParam, "SplitAngle.Angle" ) ) + { + double doubleValue = atof( theValue ) * 180 / PI; + TCollection_AsciiString str( doubleValue ); + return CORBA::string_dup( str.ToCString() ); + } + return CORBA::string_dup( theValue ); +} + +//================================================================================= +// function : loadDefaults() +// purpose : initialize "values"-fields with default values retrieved from IHealingOperations +//================================================================================= +void RepairGUI_ShapeProcessDlg::loadDefaults() +{ + const int aStudyId = QAD_Application::getDesktop()->getActiveStudy()->getStudyId(); + GEOM::GEOM_IHealingOperations_var anOp = myGeomGUI->GetGeomGen()->GetIHealingOperations( aStudyId ); + GEOM::string_array_var anOperators, aParams, aValues; + anOp->GetShapeProcessParameters( anOperators, aParams, aValues ); + + + // check the default items-operators + int i; + for ( i = 0; i < anOperators->length(); i++ ) + { + //MESSAGE("-->"<<(const char*)anOperators[i]); + QListViewItem* anItem = myOpList->findItem( (const char*)anOperators[i], 0 ); + if ( anItem /*&& anItem->inherits( "QCheckListItem" )*/ ) + ((QCheckListItem*) anItem)->setOn( true ); + } + + // set default values of parameters + if ( aParams->length() != aValues->length() ) + return; + for ( i = 0; i < aParams->length(); i++ ) + { + QWidget* aCtrl = getControl( (const char*)aParams[i] ); + const char* aValue = set_convert( (const char*)aParams[i], aValues[i] ); + setValue( aCtrl, aValue ); + } +} + +//================================================================================= +// function : setValue() +// purpose : set value in the proper way +//================================================================================= +void RepairGUI_ShapeProcessDlg::setValue( QWidget* theControl, const char* theValue ) +{ + if ( theControl == NULL || theValue == NULL ) + return; + + if ( theControl->isA( "QAD_SpinBoxDbl" ) ) + ((QAD_SpinBoxDbl*)theControl)->setValue( QString( theValue ).toDouble() ); + else if ( theControl->isA( "QSpinBox" ) ) + ((QSpinBox*)theControl)->setValue( QString( theValue ).toInt() ); + else if ( theControl->isA( "QComboBox" ) ) + ((QComboBox*)theControl)->setCurrentText( QString( theValue ) ); + else if ( theControl->isA( "QCheckBox" ) ) + ((QCheckBox*)theControl)->setChecked( QString( theValue ).toInt() != 0 ); +} + +//================================================================================= +// function : getValue() +// purpose : get value in the proper way +//================================================================================= +const char* RepairGUI_ShapeProcessDlg::getValue( QWidget* theControl ) const +{ + if ( theControl == NULL ) + return ""; + + if ( theControl->isA( "QAD_SpinBoxDbl" ) ) + return ((QAD_SpinBoxDbl*)theControl)->text().latin1(); + else if ( theControl->isA( "QSpinBox" ) ) + return ((QSpinBox*)theControl)->text().latin1(); + else if ( theControl->isA( "QComboBox" ) ) + return ((QComboBox*)theControl)->currentText().latin1(); + else if ( theControl->isA( "QCheckBox" ) ) + return ((QCheckBox*)theControl)->isChecked() ? "1" : "0"; + + return ""; +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_ShapeProcessDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_ShapeProcessDlg::isValid( QString& msg ) +{ + bool error = false; + GEOM::string_array_var anOperators = getActiveOperators(); + if ( !myObjects->length() ) + { + msg += tr( "ERROR_NO_OBJECTS" ); + error = true; + } + if ( !anOperators->length() ) + { + if ( error ) + msg += "\n"; + msg += tr( "ERROR_NO_OPERATORS" ); + error = true; + } + return !error; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_ShapeProcessDlg::execute( ObjectList& objects ) +{ + GEOM::string_array_var anOperators = getActiveOperators(); + GEOM::string_array_var aParams = getParameters( anOperators ); + GEOM::string_array_var aValues = getValues( aParams ); + + /*//-- check -- + int z; + MESSAGE("Objects : "); + for ( z = 0; z < myObjects->length(); z++ ) + MESSAGE(myObjects[z]->GetName() << " "); + MESSAGE("\nOperators : "); + for ( z = 0; z < anOperators->length(); z++ ) + MESSAGE(anOperators[z] << " "); + MESSAGE("\nParameters : "); + for ( z = 0; z < aParams->length(); z++ ) + MESSAGE(aParams[z] << " "); + MESSAGE("\nValues : "); + for ( z = 0; z < aValues->length(); z ++ ) + MESSAGE(aValues[z] << " "); + MESSAGE("\n"); + */// ----------- + + QStringList anErrorObjNames; + for ( int i = 0; i < myObjects->length(); i++ ) + { + GEOM::GEOM_Object_var obj = myObjects[i]; + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->ProcessShape( + obj, anOperators, aParams, aValues ); + if ( anObj->_is_nil() ) + anErrorObjNames << GEOMBase::GetName( obj ); + else + objects.push_back( anObj._retn() ); + } + + if ( !anErrorObjNames.empty() ) + MESSAGE("ERRORS occured while processing the following objects: " << anErrorObjNames.join( " " )); + + return anErrorObjNames.size() < myObjects->length(); // true if at least one object was OK, false if ALL objects were nil after Healing. +} + +//================================================================================= +// function : getActiveOperators +// purpose : +//================================================================================= +GEOM::string_array* RepairGUI_ShapeProcessDlg::getActiveOperators() +{ + GEOM::string_array_var anOperators = new GEOM::string_array(); + QStringList aCheckedList; + QStringList::Iterator it; + for ( it = myOpLst.begin(); it != myOpLst.end(); ++it ) + if ( ((QCheckListItem*)myOpList->findItem( *it, 0 ))->isOn() ) + aCheckedList << *it; + anOperators->length( aCheckedList.size() ); + int i = 0; + for ( it = aCheckedList.begin(); it != aCheckedList.end(); ++it ) + anOperators[i++] = CORBA::string_dup( (*it).latin1() ); + + return anOperators._retn(); +} + +//================================================================================= +// function : getcontrol +// purpose : +//================================================================================= +QWidget* RepairGUI_ShapeProcessDlg::getControl( const char* theParam ) +{ + string aParam = theParam; + if ( aParam == "SplitAngle.Angle" ) return mySplitAngleAngle; + else if ( aParam == "SplitAngle.MaxTolerance" ) return mySplitAngleMaxTol; + else if ( aParam == "SplitClosedFaces.NbSplitPoints" ) return mySplitClosedFacesNum; + else if ( aParam == "FixFaceSize.Tolerance" ) return myFixFaceSizeTol; + else if ( aParam == "DropSmallEdges.Tolerance3d" ) return myDropSmallEdgesTol3D; + else if ( aParam == "BSplineRestriction.SurfaceMode" ) return myBSplineSurfModeChk; + else if ( aParam == "BSplineRestriction.Curve3dMode" ) return myBSpline3DCurveChk; + else if ( aParam == "BSplineRestriction.Curve2dMode" ) return myBSpline2DCurveChk; + else if ( aParam == "BSplineRestriction.Tolerance3d" ) return myBSplineTol3D; + else if ( aParam == "BSplineRestriction.Tolerance2d" ) return myBSplineTol2D; + else if ( aParam == "BSplineRestriction.RequiredDegree" ) return myBSplineDegree; + else if ( aParam == "BSplineRestriction.RequiredNbSegments" ) return myBSplineSegments; + else if ( aParam == "BSplineRestriction.Continuity3d" ) return myBSpline3DCont; + else if ( aParam == "BSplineRestriction.Continuity2d" ) return myBSpline2DCont; + else if ( aParam == "SplitContinuity.Tolerance3d" ) return mySplitContTol3D; + else if ( aParam == "SplitContinuity.SurfaceContinuity" ) return mySplitContSurfCont; + else if ( aParam == "SplitContinuity.CurveContinuity" ) return mySplitContCurvCont; + else if ( aParam == "ToBezier.SurfaceMode" ) return myToBezierSurfModeChk; + else if ( aParam == "ToBezier.Curve3dMode" ) return myToBezier3DCurveChk; + else if ( aParam == "ToBezier.Curve2dMode" ) return myToBezier2DCurveChk; + else if ( aParam == "ToBezier.MaxTolerance" ) return myToBezierMaxTol; + else if ( aParam == "SameParameter.Tolerance3d" ) return mySameParameterTol3D; + else if ( aParam == "FixShape.Tolerance3d" ) return myFixShapeTol3D; + else if ( aParam == "FixShape.MaxTolerance3d" ) return myFixShapeMaxTol3D; + return NULL; +} + +//================================================================================= +// function : getParameters +// purpose : +//================================================================================= +void RepairGUI_ShapeProcessDlg::initParamsValues() +{ + myOpLst << "FixShape"; + myValMap["FixShape"] << "FixShape.Tolerance3d"; + myValMap["FixShape"] << "FixShape.MaxTolerance3d"; + + myOpLst << "FixFaceSize"; + myValMap["FixFaceSize"] << "FixFaceSize.Tolerance"; + + myOpLst << "DropSmallEdges"; + myValMap["DropSmallEdges"] << "DropSmallEdges.Tolerance3d"; + + myOpLst << "SplitAngle"; + myValMap["SplitAngle"] << "SplitAngle.Angle"; + myValMap["SplitAngle"] << "SplitAngle.MaxTolerance"; + + myOpLst << "SplitClosedFaces"; + myValMap["SplitClosedFaces"] << "SplitClosedFaces.NbSplitPoints"; + + myOpLst << "SplitContinuity"; + myValMap["SplitContinuity"] << "SplitContinuity.Tolerance3d"; + myValMap["SplitContinuity"] << "SplitContinuity.SurfaceContinuity"; + myValMap["SplitContinuity"] << "SplitContinuity.CurveContinuity"; + + myOpLst << "BSplineRestriction"; + myValMap["BSplineRestriction"] << "BSplineRestriction.SurfaceMode"; + myValMap["BSplineRestriction"] << "BSplineRestriction.Curve3dMode"; + myValMap["BSplineRestriction"] << "BSplineRestriction.Curve2dMode"; + myValMap["BSplineRestriction"] << "BSplineRestriction.Tolerance3d"; + myValMap["BSplineRestriction"] << "BSplineRestriction.Tolerance2d"; + myValMap["BSplineRestriction"] << "BSplineRestriction.RequiredDegree"; + myValMap["BSplineRestriction"] << "BSplineRestriction.RequiredNbSegments"; + myValMap["BSplineRestriction"] << "BSplineRestriction.Continuity3d"; + myValMap["BSplineRestriction"] << "BSplineRestriction.Continuity2d"; + + myOpLst << "ToBezier"; + myValMap["ToBezier"] << "ToBezier.SurfaceMode"; + myValMap["ToBezier"] << "ToBezier.Curve3dMode"; + myValMap["ToBezier"] << "ToBezier.Curve2dMode"; + myValMap["ToBezier"] << "ToBezier.MaxTolerance"; + + myOpLst << "SameParameter"; + myValMap["SameParameter"] << "SameParameter.Tolerance3d"; +} + +//================================================================================= +// function : getParameters +// purpose : +//================================================================================= +GEOM::string_array* RepairGUI_ShapeProcessDlg::getParameters( const GEOM::string_array& theOperators ) +{ + GEOM::string_array_var aParams = new GEOM::string_array(); + int i( 0 ), j( 0 ); + + // calculate the length of parameters + for ( i = 0, j = 0; i < theOperators.length(); i++ ) + j+= myValMap[QString((const char*)theOperators[i])].size(); + + // set the new length of paremeters + aParams->length( j ); + + // fill the parameters + for ( i = 0, j = 0; i < theOperators.length(); i++ ) + { + QStringList aValLst = myValMap[QString( (const char*)theOperators[i] )]; + for ( QStringList::Iterator it = aValLst.begin(); it != aValLst.end(); ++it ) + aParams[j++] = CORBA::string_dup( (*it).latin1() ); + } + + return aParams._retn(); +} + + +//================================================================================= +// function : getValues +// purpose : +//================================================================================= +GEOM::string_array* RepairGUI_ShapeProcessDlg::getValues( const GEOM::string_array& theParams ) +{ + GEOM::string_array_var aValues = new GEOM::string_array(); + aValues->length( theParams.length() ); + + for ( int i = 0; i < theParams.length(); i++ ) + { + QWidget* aCtrl = getControl( (const char*)theParams[i] ); + if ( aCtrl ) + aValues[i] = get_convert( (const char*)theParams[i], getValue( aCtrl ) ); + } + + return aValues._retn(); +} + +//================================================================================= +// function : initSelection +// purpose : set selection of ALL shape types except vertexes +//================================================================================= +void RepairGUI_ShapeProcessDlg::initSelection() +{ + TColStd_MapOfInteger aTypes; + aTypes.Add( GEOM_COMPOUND ); + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_SHELL ); + aTypes.Add( GEOM_FACE ); + aTypes.Add( GEOM_WIRE ); + aTypes.Add( GEOM_EDGE ); + globalSelection( aTypes ); +} diff --git a/src/RepairGUI/RepairGUI_ShapeProcessDlg.h b/src/RepairGUI/RepairGUI_ShapeProcessDlg.h new file mode 100755 index 000000000..98112c4bd --- /dev/null +++ b/src/RepairGUI/RepairGUI_ShapeProcessDlg.h @@ -0,0 +1,141 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : RepairGUI_ShapeProcessDlg.h +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#ifndef DIALOGBOX_ShapeProcess_H +#define DIALOGBOX_ShapeProcess_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1Sel_QTD.h" +#include "RepairGUI.h" +#include "QAD_SpinBoxDbl.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +//================================================================================= +// class : RepairGUI_ShapeProcessDlg +// purpose : +//================================================================================= +class RepairGUI_ShapeProcessDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + RepairGUI_ShapeProcessDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_ShapeProcessDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + +private : + void init(); + void reset(); + void loadDefaults(); // initialize all controls with default values (from resource file) + GEOM::string_array* getActiveOperators(); + GEOM::string_array* getParameters( const GEOM::string_array& theOperators ); + GEOM::string_array* getValues( const GEOM::string_array& theParameters ); + + void enterEvent(QEvent* e); + + QWidget* getControl( const char* ); + void setValue( QWidget*, const char* ); // initialize the given control in the proper way + // (analize its class and convert the value string) + const char* getValue( QWidget* theControl ) const; // retrieve value of the control in the proper way + + QStringList myOpLst; // list of available Shape Healing Operators + QMap myValMap; // map of parameters of operators + //QDict myCtrlMap; // map of controls (values) of parameters + void initParamsValues(); // initialize the data structures + void initSelection(); + + GEOM::ListOfGO_var myObjects; // selected objects + + DlgRef_1Sel_QTD* mySelectWdgt; + QListView* myOpList; + QWidgetStack* myStack; + + QAD_SpinBoxDbl* myFixShapeTol3D; + QAD_SpinBoxDbl* myFixShapeMaxTol3D; + + QAD_SpinBoxDbl* myFixFaceSizeTol; + + QAD_SpinBoxDbl* myDropSmallEdgesTol3D; + + QAD_SpinBoxDbl* mySplitAngleAngle; + QAD_SpinBoxDbl* mySplitAngleMaxTol; + + QSpinBox* mySplitClosedFacesNum; + + QAD_SpinBoxDbl* mySplitContTol3D; + QComboBox* mySplitContSurfCont; + QComboBox* mySplitContCurvCont; + + QCheckBox* myBSplineSurfModeChk; + QCheckBox* myBSpline3DCurveChk; + QCheckBox* myBSpline2DCurveChk; + QAD_SpinBoxDbl* myBSplineTol3D; + QAD_SpinBoxDbl* myBSplineTol2D; + QSpinBox* myBSplineDegree; + QSpinBox* myBSplineSegments; + QComboBox* myBSpline2DCont; + QComboBox* myBSpline3DCont; + + QCheckBox* myToBezierSurfModeChk; + QCheckBox* myToBezier3DCurveChk; + QCheckBox* myToBezier2DCurveChk; + QAD_SpinBoxDbl* myToBezierMaxTol; + + QAD_SpinBoxDbl* mySameParameterTol3D; + +private slots: + void onOk(); + bool onApply(); + void onCancel(); + + void activate(); + void deactivate(); + + void lineEditReturnPressed(); + void selectionChanged(); + void selectClicked(); + void activateSelection(); + void operationChanged(); +}; + +#endif // DIALOGBOX_ShapeProcess_H diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx index e7923e8e2..55b5d0cd6 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx @@ -29,9 +29,15 @@ using namespace std; #include "RepairGUI_SuppressFacesDlg.h" -#include "DisplayGUI.h" #include "QAD_RightFrame.h" +#include "QAD_Desktop.h" #include "OCCViewer_Viewer3d.h" +#include "SALOME_ListIteratorOfListIO.hxx" + +#include "GEOMImpl_Types.hxx" + +#include + //================================================================================= // class : RepairGUI_SuppressFacesDlg() @@ -40,7 +46,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -RepairGUI_SuppressFacesDlg::RepairGUI_SuppressFacesDlg(QWidget* parent, const char* name, RepairGUI* theRepairGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl) +RepairGUI_SuppressFacesDlg::RepairGUI_SuppressFacesDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUPRESS_FACE"))); @@ -54,18 +60,16 @@ RepairGUI_SuppressFacesDlg::RepairGUI_SuppressFacesDlg(QWidget* parent, const ch RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_1Sel1Check_QTD(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); - GroupPoints->CheckButton1->setText(tr("GEOM_SUPRESSFACE_SELECT")); + GroupPoints = new DlgRef_1Sel_QTD(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("Faces to remove")); + GroupPoints->TextLabel1->setText(tr("Faces")); GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ - /* Initialisations */ - myRepairGUI = theRepairGUI; - Init(ic); + Init(); } @@ -75,7 +79,6 @@ RepairGUI_SuppressFacesDlg::RepairGUI_SuppressFacesDlg(QWidget* parent, const ch //================================================================================= RepairGUI_SuppressFacesDlg::~RepairGUI_SuppressFacesDlg() { - // no need to delete child widgets, Qt does it all for us } @@ -83,16 +86,17 @@ RepairGUI_SuppressFacesDlg::~RepairGUI_SuppressFacesDlg() // function : Init() // purpose : //================================================================================= -void RepairGUI_SuppressFacesDlg::Init(Handle(AIS_InteractiveContext) ic) +void RepairGUI_SuppressFacesDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - myOkSelectSubMode = false; - myOkShape = myUseLocalContext = false; - myIC = ic; - myLocalContextId = -1; + myObjects = new GEOM::ListOfGO(); + myObjects->length( 0 ); + myGeomGUI->SetState( 0 ); + initSelection(); + /* signals and slots connections */ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog())); @@ -104,15 +108,9 @@ void RepairGUI_SuppressFacesDlg::Init(Handle(AIS_InteractiveContext) ic) connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ActivateUserSelection())); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + initName( tr( "SUPRESS_FACE_NEW_OBJ_NAME" ) ); } @@ -122,9 +120,8 @@ void RepairGUI_SuppressFacesDlg::Init(Handle(AIS_InteractiveContext) ic) //================================================================================= void RepairGUI_SuppressFacesDlg::ClickOnOk() { - this->ClickOnApply(); - this->ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -133,22 +130,20 @@ void RepairGUI_SuppressFacesDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void RepairGUI_SuppressFacesDlg::ClickOnApply() +bool RepairGUI_SuppressFacesDlg::ClickOnApply() { - QAD_Application::getDesktop()->putInfo(tr("")); - bool testResult = false; + if ( !onAccept() ) + return false; - if(myOkShape && myOkSelectSubMode) - testResult = myRepairGUI->OnSuppressFaces(myShape, myShapeIOR, myLocalContextId, myUseLocalContext); + initName(); - if(!testResult) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); + myEditCurrentArgument->setText(""); + myObjects->length( 0 ); + myFaces.clear(); - /* Reset arguments to allow a new selection */ - this->ResetStateOfDialog(); - return ; + initSelection(); + + return true; } @@ -158,18 +153,7 @@ void RepairGUI_SuppressFacesDlg::ClickOnApply() //================================================================================= void RepairGUI_SuppressFacesDlg::ClickOnCancel() { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } GEOMBase_Skeleton::ClickOnCancel(); - return; } @@ -181,58 +165,53 @@ void RepairGUI_SuppressFacesDlg::ClickOnCancel() void RepairGUI_SuppressFacesDlg::SelectionIntoArgument() { myEditCurrentArgument->setText(""); - this->ResetStateOfDialog(); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - myOkShape = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(!IO->hasEntry()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SHAPE_IN_STUDY")); - return; - } - /* Test the exact type of topology to suppress faces into */ - if(!S.IsNull() && (S.ShapeType() == TopAbs_SOLID || S.ShapeType() == TopAbs_SHELL || S.ShapeType() == TopAbs_COMPOUND)) { - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IO); - myShapeIOR = GIObject->getIOR(); /* the Geom IOR string of selection */ - myEditCurrentArgument->setText(aString); - myShape = S; - myOkShape = true; - return; - } - - if(IO->hasEntry()) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - myShapeIOR = anIOR->Value(); - myOkShape = true; - myShape = S; - myEditCurrentArgument->setText(aString); - return; + Standard_Boolean aRes = Standard_False; + int i = 0; + int numFaces = 0; + myObjects->length( mySelection->IObjectCount() ); + myFaces.clear(); + for ( SALOME_ListIteratorOfListIO anIt( mySelection->StoredIObjects() ); anIt.More(); anIt.Next() ) + { + Handle(SALOME_InteractiveObject) anIO = anIt.Value(); + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIO, aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes ) + { + TopoDS_Shape aShape; + if ( myGeomBase->GetShape( aSelectedObject, aShape, TopAbs_SHAPE ) ) + { + if ( aShape.ShapeType() <= TopAbs_FACE ) // FACE, SHELL, SOLID, COMPOUND + { + GEOM::short_array anIndexes; + if ( mySelection->HasIndex( anIO ) ) + { + TColStd_IndexedMapOfInteger aMap; + mySelection->GetIndex( anIO, aMap ); + Convert( aMap, anIndexes ); + myObjects[i++] = aSelectedObject; // append the object + myFaces.append( anIndexes ); // append faces' indexes + numFaces += anIndexes.length();// just for text field output + } } } } - } - return; + myObjects->length( i ); // this is the right length, smaller of equal to the previously set + if ( numFaces ) + myEditCurrentArgument->setText( QString::number( numFaces ) + "_" + tr( "GEOM_FACE" ) + tr( "_S_" ) ); } +//================================================================================= +// function : Convert() +// purpose : +//================================================================================= +void RepairGUI_SuppressFacesDlg::Convert( const TColStd_IndexedMapOfInteger& theMap, GEOM::short_array& theOutSeq ) +{ + const int n = theMap.Extent(); + theOutSeq.length( n ); + for ( int i = 0; i < n; i++ ) + theOutSeq[i] = theMap( i+1 ); +} //================================================================================= // function : SetEditCurrentArgument() @@ -240,15 +219,12 @@ void RepairGUI_SuppressFacesDlg::SelectionIntoArgument() //================================================================================= void RepairGUI_SuppressFacesDlg::SetEditCurrentArgument() { - QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { + if( sender() == GroupPoints->PushButton1 ) + { GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; } - this->SelectionIntoArgument(); - - return; + SelectionIntoArgument(); } @@ -258,14 +234,11 @@ void RepairGUI_SuppressFacesDlg::SetEditCurrentArgument() //================================================================================= void RepairGUI_SuppressFacesDlg::LineEditReturnPressed() { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) + if( sender() == GroupPoints->LineEdit1 ) + { myEditCurrentArgument = GroupPoints->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -275,11 +248,8 @@ void RepairGUI_SuppressFacesDlg::LineEditReturnPressed() //================================================================================= void RepairGUI_SuppressFacesDlg::DeactivateActiveDialog() { - if(GroupConstructors->isEnabled()) { - this->ResetStateOfDialog(); - GEOMBase_Skeleton::DeactivateActiveDialog(); - } - return; + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -291,7 +261,9 @@ void RepairGUI_SuppressFacesDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; + + myGeomGUI->SetState( 0 ); + initSelection(); } @@ -301,10 +273,8 @@ void RepairGUI_SuppressFacesDlg::ActivateThisDialog() //================================================================================= void RepairGUI_SuppressFacesDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -314,76 +284,60 @@ void RepairGUI_SuppressFacesDlg::enterEvent(QEvent* e) //================================================================================= void RepairGUI_SuppressFacesDlg::closeEvent(QCloseEvent* e) { - /* same than click on cancel button */ - this->ClickOnCancel(); - return; + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_SuppressFacesDlg::createOperation() +{ + return getGeomEngine()->GetIHealingOperations( getStudyId() ); +} //================================================================================= -// function : ActivateUserSelection() -// purpose : Activate selection of faces when CheckBox1->isChecked()... +// function : isValid +// purpose : //================================================================================= -void RepairGUI_SuppressFacesDlg::ActivateUserSelection() +bool RepairGUI_SuppressFacesDlg::isValid( QString& msg ) { - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - if(!myOkShape) { - this->ResetStateOfDialog(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_FIRST")); - return; - } - - myOkSelectSubMode = GroupPoints->CheckButton1->isChecked(); - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } - - if(myOkShape && myOkSelectSubMode) { - /* local context is defined into the method : 4 = FACES sub selection */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelection(int(TopAbs_FACE), myLocalContextId); - myUseLocalContext = true; - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_SELECT_FACE")); - } - } - else - GroupPoints->CheckButton1->setChecked(false); - return; + const int objL = myObjects->length(), facesL = myFaces.size(); + return ( objL && objL == facesL ); } +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_SuppressFacesDlg::execute( ObjectList& objects ) +{ + QStringList anErrorObjNames; + for ( int i = 0; i < myObjects->length(); i++ ) + { + GEOM::GEOM_Object_var obj = myObjects[i]; + GEOM::short_array faces = myFaces[i]; + //MESSAGE(">>>> Dlg, passing faces.. len = " << faces.length()); + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IHealingOperations::_narrow( getOperation() )->SuppressFaces( obj, faces ); + if ( anObj->_is_nil() ) + anErrorObjNames << GEOMBase::GetName( obj ); + else + objects.push_back( anObj._retn() ); + } + if ( !anErrorObjNames.empty() ) + MESSAGE("ERRORS occured while processing the following objects: " << anErrorObjNames.join( " " )); + + return anErrorObjNames.size() < myObjects->length(); // true if at least one object was OK, false if ALL objects were nil after Healing. +} //================================================================================= -// function : ResetStateOfDialog() -// purpose : Completely reset the state of method including local context +// function : initSelection +// purpose : //================================================================================= -void RepairGUI_SuppressFacesDlg::ResetStateOfDialog() +void RepairGUI_SuppressFacesDlg::initSelection() { - myOkShape = false ; - myEditCurrentArgument->setText(""); - - /* Select sub shapes mode not checked */ - myOkSelectSubMode = false; - GroupPoints->CheckButton1->setChecked(FALSE); - - /* Close its local contact if opened */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) { - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - myIC = v3d->getAISContext(); - if(myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - } - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } - return; + GEOM::GEOM_Object_var aNullGeomObject; + localSelection( aNullGeomObject, TopAbs_FACE ); // load local selection on ALL objects } diff --git a/src/RepairGUI/RepairGUI_SuppressFacesDlg.h b/src/RepairGUI/RepairGUI_SuppressFacesDlg.h index 4c92a694c..a164e3577 100644 --- a/src/RepairGUI/RepairGUI_SuppressFacesDlg.h +++ b/src/RepairGUI/RepairGUI_SuppressFacesDlg.h @@ -30,9 +30,9 @@ #define DIALOGBOX_SUPPRESSFACES_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel1Check_QTD.h" +#include "DlgRef_1Sel_QTD.h" -#include "RepairGUI.h" +#include //================================================================================= // class : RepairGUI_SuppressFacesDlg @@ -43,42 +43,43 @@ class RepairGUI_SuppressFacesDlg : public GEOMBase_Skeleton Q_OBJECT public: - RepairGUI_SuppressFacesDlg(QWidget* parent = 0, const char* name = 0, RepairGUI* theRepairGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0); - + RepairGUI_SuppressFacesDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~RepairGUI_SuppressFacesDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + private : - void Init(Handle(AIS_InteractiveContext) ic); + void Init(); void enterEvent(QEvent* e); void closeEvent(QCloseEvent* e); - void ResetStateOfDialog(); - - RepairGUI* myRepairGUI; - - /* Interactive and local context management see also : bool myUseLocalContext() */ - Handle(AIS_InteractiveContext) myIC; /* Interactive context */ - Standard_Integer myLocalContextId; /* identify a local context used by this method */ - bool myUseLocalContext; /* true when this method as opened a local context */ + GEOM::ListOfGO_var myObjects; + QValueList myFaces; + // GEOM::short_array-s contain indexes of selected faces, + // index of a GEOM::short_array in myFaces list equals to index of + // GEOM::GEOM_Object in myObjects list to which the faces belong to. + + void Convert( const TColStd_IndexedMapOfInteger&, GEOM::short_array& ); - TopoDS_Shape myShape; - char* myShapeIOR; - bool myOkShape; - bool myOkSelectSubMode; /* true = sub mode selection activated */ - - DlgRef_1Sel1Check_QTD* GroupPoints; + void initSelection(); + + DlgRef_1Sel_QTD* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); void ClickOnCancel(); + void ActivateThisDialog(); void DeactivateActiveDialog(); + void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ActivateUserSelection(); - }; #endif // DIALOGBOX_SUPPRESSFACES_H diff --git a/src/RepairGUI/RepairGUI_SuppressHoleDlg.cxx b/src/RepairGUI/RepairGUI_SuppressHoleDlg.cxx deleted file mode 100644 index 8a7a36b1e..000000000 --- a/src/RepairGUI/RepairGUI_SuppressHoleDlg.cxx +++ /dev/null @@ -1,748 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : RepairGUI_SuppressHoleDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -using namespace std; -#include "RepairGUI_SuppressHoleDlg.h" - -#include "DisplayGUI.h" - -#include "QAD_RightFrame.h" -#include "OCCViewer_Viewer3d.h" - -#include - -//================================================================================= -// class : RepairGUI_SuppressHoleDlg() -// purpose : Constructs a RepairGUI_SuppressHoleDlg 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. -//================================================================================= -RepairGUI_SuppressHoleDlg::RepairGUI_SuppressHoleDlg(QWidget* parent, const char* name, RepairGUI* theRepairGUI, SALOME_Selection* Sel, Handle(AIS_InteractiveContext) ic, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) -{ - - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUPRESS_HOLE"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SUPRESS_HOLE_FACE_SHELL"))); - QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption(tr("GEOM_SUPPRESSHOLE_TITLE")); - - /***************************************************************/ - GroupConstructors->setTitle(tr("")); - RadioButton1->setPixmap(image0); - RadioButton2->setPixmap(image1); - RadioButton3->close(TRUE); - - Group1 = new DlgRef_1Sel3Check_QTD(this, "Group1"); - Group1->GroupBox1->setTitle(tr("")); - Group1->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); - Group1->CheckButton1->setText(tr("GEOM_SUPPRESSHOLE_SELECTFACE")); - Group1->CheckButton2->setText(tr("GEOM_SUPPRESSHOLE_SELECTWIRE")); - Group1->CheckButton3->setText(tr("GEOM_SUPPRESSHOLE_SELECTFACE_END")); - Group1->PushButton1->setPixmap(image2); - - Group2 = new DlgRef_1Sel1Check_QTD(this, "Group2"); - Group2->GroupBox1->setTitle(tr("")); - Group2->TextLabel1->setText(tr("GEOM_SUPPRESSHOLE_FACE_SHELL")); - Group2->CheckButton1->setText(tr("GEOM_SUPPRESSHOLE_SELECT_HOLES_ON_FACE")); - Group2->PushButton1->setPixmap(image2); - - Layout1->addWidget(Group1, 1, 0); - Layout1->addWidget(Group2, 1, 0); - /***************************************************************/ - - /* Initialisations */ - myRepairGUI = theRepairGUI; - Init(ic); -} - - -//================================================================================= -// function : ~RepairGUI_SuppressHoleDlg() -// purpose : Destroys the object and frees any allocated resources -//================================================================================= -RepairGUI_SuppressHoleDlg::~RepairGUI_SuppressHoleDlg() -{ - // no need to delete child widgets, Qt does it all for us -} - - -//================================================================================= -// function : Init() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::Init(Handle (AIS_InteractiveContext) ic) -{ - /* init variables */ - myConstructorId = 0; - myEditCurrentArgument = Group1->LineEdit1; - - myIC = ic; - myUseLocalContext = myOkShape = myOkSelectFace = false; - myLocalContextId = -1; - - myListOfIdFace = new GEOM::GEOM_Shape::ListOfSubShapeID; - myListOfIdWire = new GEOM::GEOM_Shape::ListOfSubShapeID; - myListOfIdEndFace = new GEOM::GEOM_Shape::ListOfSubShapeID; - - myListOfIdFace->length(0); - myListOfIdWire->length(0); - myListOfIdEndFace->length(0); - - /* signals and slots connections */ - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel())); - 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())); - connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int))); - - connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(Group1->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ActivateUserFaceSelection())); - connect(Group1->CheckButton2, SIGNAL(stateChanged(int)), this, SLOT(ActivateUserWireSelection())); - connect(Group1->CheckButton3, SIGNAL(stateChanged(int)), this, SLOT(ActivateUserEndFaceSelection())); - connect(Group2->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ActivateUserWiresOnFaceShellSelection())); - - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - /* displays Dialog */ - Group2->hide(); - Group1->show(); - this->show(); - - return; -} - - -//================================================================================= -// function : ConstructorsClicked() -// purpose : Radio button management -//================================================================================= -void RepairGUI_SuppressHoleDlg::ConstructorsClicked(int constructorId) -{ - myConstructorId = constructorId; - disconnect(mySelection, 0, this, 0); - myOkShape = false; - - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - myUseLocalContext = false; - } - - switch (constructorId) - { - case 0: - { - Group2->hide(); - resize(0, 0); - Group1->show(); - - myEditCurrentArgument = Group1->LineEdit1; - Group1->LineEdit1->setText(""); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - - myOkSelectFace = false; - this->ResetPartial(); - break; - } - case 1: - { - Group1->hide(); - resize(0, 0); - Group2->show(); - - myEditCurrentArgument = Group2->LineEdit1; - Group2->LineEdit1->setText(""); - - this->ResetPartial(); - connect ( mySelection, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); - this->ResetPartial(); - break; - } - } - return; -} - - -//================================================================================= -// function : ClickOnOk() -// purpose : Same than click on apply but close this dialog. -//================================================================================= -void RepairGUI_SuppressHoleDlg::ClickOnOk() -{ - this->ClickOnApply(); - this->ClickOnCancel(); - return; -} - - -//================================================================================= -// function : ClickOnApply() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::ClickOnApply() -{ - QAD_Application::getDesktop()->putInfo(tr("")); - bool testResult = false; - - if(!myOkShape) - return; - - switch (myConstructorId) - { - case 0: /* default constructor */ - { - if(!myOkSelectFace) - return; - - if(Group1->CheckButton2->isChecked()) { - if(!Group1->CheckButton3->isChecked()) { - /* Call method to get sub shape selection of GEOM::WIRE */ - bool aTest = this->GetIndexSubShapeSelected(myFace, int(TopAbs_WIRE), myListOfIdWire, myLocalContextId, myUseLocalContext); - - /* Display all objects so that next method using ic can memorize them */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - - if(!aTest || myListOfIdWire->length() != 1) { - Group1->CheckButton2->setChecked(FALSE); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - } - else { - myListOfIdEndFace->length(0); /* no end face */ - QApplication::setOverrideCursor(Qt::waitCursor); - testResult = myRepairGUI->OnSuppressHole(myShapeIOR, myListOfIdFace, myListOfIdWire, myListOfIdEndFace); - QApplication::restoreOverrideCursor(); - } - } - else { /* Group1->CheckButton3->isChecked() */ - - /* Call method to get sub shape selection of END GEOM::FACE */ - bool aTest = this->GetIndexSubShapeSelected(myShape, int(TopAbs_FACE), myListOfIdEndFace, myLocalContextId, myUseLocalContext); - - /* Display all objects so that next method using ic can memorize them */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - - if(!aTest || myListOfIdEndFace->length() != 1) { - Group1->CheckButton3->setChecked(FALSE); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - } - else { - QApplication::setOverrideCursor(Qt::waitCursor); - testResult = myRepairGUI->OnSuppressHole(myShapeIOR, myListOfIdFace, myListOfIdWire, myListOfIdEndFace); - QApplication::restoreOverrideCursor(); - } - } - } - break; - } - case 1: /* second constructor */ - { - if(Group2->CheckButton1->isChecked()) { - /* Call method to get sub shape selection of one or more GEOM::WIRE(s) on a face or a shell */ - bool aTest = this->GetIndexSubShapeSelected(myShape, int(TopAbs_WIRE), myListOfIdWire, myLocalContextId, myUseLocalContext); - - /* Display all objects so that next method using ic can memorize them */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - - if(!aTest || myListOfIdWire->length() < 1) { - Group2->CheckButton1->setChecked(FALSE); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - } - else { - QApplication::setOverrideCursor(Qt::waitCursor); - testResult = myRepairGUI->OnSuppressHolesInFaceOrShell(myShapeIOR, myListOfIdWire); - QApplication::restoreOverrideCursor(); - } - } - break; - } - } - - - if(!testResult) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - - /* Reset arguments to allow a new selection */ - this->ResetStateOfDialog(); - return; -} - - -//================================================================================= -// function : ClickOnCancel() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::ClickOnCancel() -{ - this->ResetStateOfDialog(); - GEOMBase_Skeleton::ClickOnCancel(); - return; -} - - -//================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection as changed or other case -// : used only by SelectButtonC1A1 and SelectButtonC2A1 -//================================================================================= -void RepairGUI_SuppressHoleDlg::SelectionIntoArgument() -{ - myEditCurrentArgument->setText(""); - this->ResetStateOfDialog(); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) - return; - - /* nbSel == 1 */ - TopoDS_Shape S; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(S.IsNull() || S.ShapeType() == TopAbs_VERTEX || S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE) - return; - - /* Test the exact type of topology to suppress faces into. */ - /* For the second constructor a face or shell selection is needed */ - if(myConstructorId == 0 || (myConstructorId == 1 && (S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL))) { - if(IO->IsInstance(STANDARD_TYPE(GEOM_InteractiveObject))) { - Handle(GEOM_InteractiveObject) GIObject = Handle(GEOM_InteractiveObject)::DownCast(IO); - - /* The Geom IOR string of selection */ - myShapeIOR = GIObject->getIOR(); - myEditCurrentArgument->setText(aString); - myShape = S; - myOkShape = true; - return; - } - - if(IO->hasEntry()) { - SALOMEDS::Study_var aStudy = QAD_Application::getDesktop()->getActiveStudy()->getStudyDocument(); - SALOMEDS::SObject_var obj = aStudy->FindObjectID(IO->getEntry()); - SALOMEDS::GenericAttribute_var anAttr; - SALOMEDS::AttributeIOR_var anIOR; - if(!obj->_is_nil()) { - if(obj->FindAttribute(anAttr, "AttributeIOR")) { - anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr); - myShapeIOR = anIOR->Value(); - myOkShape = true; - myShape = S; - myEditCurrentArgument->setText(aString); - return; - } - } - } - - } - return; -} - - -//================================================================================= -// function : SetEditCurrentArgument() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::SetEditCurrentArgument() -{ - QPushButton* send = (QPushButton*)sender(); - - if(send == Group1->PushButton1) { - Group1->LineEdit1->setFocus(); - myEditCurrentArgument = Group1->LineEdit1; - } - else if(send == Group2->PushButton1) { - Group2->LineEdit1->setFocus(); - myEditCurrentArgument = Group2->LineEdit1; - } - this->SelectionIntoArgument(); - return; -} - - -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if(send == Group1->LineEdit1) - myEditCurrentArgument = Group1->LineEdit1; - else if (send == Group2->LineEdit1) - myEditCurrentArgument = Group2->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; -} - - -//================================================================================= -// function : DeactivateActiveDialog() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::DeactivateActiveDialog() -{ - this->ResetStateOfDialog(); - GEOMBase_Skeleton::DeactivateActiveDialog(); - return; -} - - -//================================================================================= -// function : ActivateThisDialog() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::ActivateThisDialog() -{ - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - return; -} - - -//================================================================================= -// function : enterEvent() -// purpose : Mouse enter onto the dialog to activate it -//================================================================================= -void RepairGUI_SuppressHoleDlg::enterEvent(QEvent* e) -{ - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; -} - - -//================================================================================= -// function : closeEvent() -// purpose : -//================================================================================= -void RepairGUI_SuppressHoleDlg::closeEvent(QCloseEvent* e) -{ - /* same than click on cancel button */ - this->ClickOnCancel(); - return; -} - - -//================================================================================= -// function : ActivateUserFaceSelection() -// purpose : Called when CheckBox1 state has changed. (Face selection is ckecked) -// : Be careful user must first select a face then a wire ! -//================================================================================= -void RepairGUI_SuppressHoleDlg::ActivateUserFaceSelection() -{ - if(!this->myOkShape) { - this->ResetStateOfDialog(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_MAIN_OBJECT")); - return; - } - - if(Group1->CheckButton1->isChecked()) { - /* local context is opened into the method : Prepare GEOM::FACE sub selection */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelection(int(TopAbs_FACE), myLocalContextId); - myUseLocalContext = true; - QAD_Application::getDesktop()->putInfo(tr("GEOM_SUPPRESSHOLE_SELECTFACE")); - } - else - this->ResetPartial(); - - return; -} - - -//================================================================================= -// function : ActivateUserWireSelection() -// purpose : Called when CheckBox2 state has changed. (Wire selection is ckecked) -// : Be careful user must first select a face then a wire ! -//================================================================================= -void RepairGUI_SuppressHoleDlg::ActivateUserWireSelection() -{ - - if(!myOkShape) { - this->ResetStateOfDialog(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_MAIN_OBJECT")); - return; - } - - if(Group1->CheckButton1->isChecked()) { - /* Get sub shape selection GEOM::FACE : local context is closed */ - bool aTest = this->GetIndexSubShapeSelected(myShape, int(TopAbs_FACE), myListOfIdFace, myLocalContextId, myUseLocalContext); - - /* Display all objects so that next method using ic can memorize them */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - if(!aTest || myListOfIdFace->length() != 1) { - Group1->CheckButton1->setChecked(FALSE); - myOkSelectFace = false; - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - } - else - myOkSelectFace = true; - } - else { - this->ResetPartial(); - return; - } - - - if(Group1->CheckButton2->isChecked()) { - /* Get the face selection */ - myFace = FaceFromList(myShape, myListOfIdFace); - /* Local context is opened into the method : Prepare GEOM::WIRE sub selection into a face */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelectionArgumentShape(myFace, int(TopAbs_WIRE), myLocalContextId); - myUseLocalContext = true; - QAD_Application::getDesktop()->putInfo(tr("GEOM_SUPPRESSHOLE_SELECTWIRE")); - } - else { - this->ResetPartial(); - } - return; -} - - -//================================================================================= -// function : ActivateUserlEndFaceSelection() -// purpose : Called when CheckBox3 state has changed. ( Optional End Face selection ) -// : Be careful user must first select a face then a wire then this optional end face ! -//================================================================================= -void RepairGUI_SuppressHoleDlg::ActivateUserEndFaceSelection() -{ - - if(!myOkShape) { - this->ResetStateOfDialog(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_MAIN_OBJECT")); - return; - } - - if(Group1->CheckButton2->isChecked()) { - /* Call method to get sub shape selection for the GEOM::WIRE into myFace : local context is closed */ - bool aTest = this->GetIndexSubShapeSelected(myFace, int(TopAbs_WIRE), myListOfIdWire, myLocalContextId, myUseLocalContext); - - /* Display all objects so that next method using ic can memorize them */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - - if(!aTest || myListOfIdWire->length() != 1) { - Group1->CheckButton2->setChecked(FALSE); - Group1->CheckButton3->setChecked(FALSE); - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - } - else { - this->ResetPartial(); - return; - } - - - if(Group1->CheckButton3->isChecked()) { - /* Local context is opened into the method : prepare GEOM::FACE(end) into myShape sub selection */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelectionArgumentShape(myShape, int(TopAbs_FACE), myLocalContextId); - myUseLocalContext = true; - QAD_Application::getDesktop()->putInfo(tr("GEOM_SUPPRESSHOLE_SELECTFACE_END")); - } - else - this->ResetPartial(); - return; -} - - -//================================================================================= -// function : ActivateUserWiresOnFaceShellSelection() -// purpose : Called when CheckBoxC2_1 state has changed. -// : Only for second constructor ! -// : Prepare selection for wire(s) on main object that is a face or a shell -//================================================================================= -void RepairGUI_SuppressHoleDlg::ActivateUserWiresOnFaceShellSelection() -{ - - if(!myOkShape) { - this->ResetStateOfDialog(); - QAD_Application::getDesktop()->putInfo(tr("GEOM_MAIN_OBJECT")); - return; - } - - if(Group2->CheckButton1->isChecked()) { - /* Local context is opened to prepare GEOM::WIRE(S) selection into 'myShape' that is a (main) face */ - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->PrepareSubShapeSelectionArgumentShape(myShape, int(TopAbs_WIRE), myLocalContextId); - myUseLocalContext = true; - QAD_Application::getDesktop()->putInfo(tr("GEOM_SUPPRESSHOLE_SELECT_HOLES_ON_FACE")); - } - else - this->ResetPartial(); - return; -} - - -//================================================================================= -// function : FaceFromList() -// purpose : Return the face (selected by user) that is a sub shape of 'aShape' -// : and which unique index is in 'ListOfSub'. -// : This allows opening a local context with this face loaded. -// : See : myGeomBase->PrepareSubShapeSelectionArgumentShape(...) -//================================================================================= -TopoDS_Shape RepairGUI_SuppressHoleDlg::FaceFromList(const TopoDS_Shape& aShape, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfSub) -{ - TopoDS_Shape tds; - tds.Nullify(); - if(ListOfSub.length() != 1 || aShape.IsNull()) - return tds; - - int i = ListOfSub[0]; - TopExp_Explorer exp; - int j = 1; - for(exp.Init(aShape, TopAbs_FACE); exp.More(); exp.Next()) { - if(j == i) - return exp.Current(); - j++; - } - return tds; -} - - -//================================================================================= -// function : ResetStateOfDialog() -// purpose : Completely reset the state of method including local context -//================================================================================= -void RepairGUI_SuppressHoleDlg::ResetStateOfDialog() -{ - myOkShape = false; - myEditCurrentArgument->setText(""); - QApplication::restoreOverrideCursor(); - - /* Partial reset and more ...*/ - this->ResetPartial(); - - return; -} - - -//================================================================================= -// function : ResetPartial() -// purpose : Partially reset to keep only main selection -//================================================================================= -void RepairGUI_SuppressHoleDlg::ResetPartial() -{ - /* Select sub shape modes not checked */ - myOkSelectFace = false ; - Group1->CheckButton1->setChecked(FALSE); - Group1->CheckButton2->setChecked(FALSE); - Group1->CheckButton3->setChecked(FALSE); - Group2->CheckButton1->setChecked(FALSE); - - myListOfIdFace->length(0); - myListOfIdWire->length(0); - myListOfIdEndFace->length(0); - - /* Close its local contact if opened */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC && myUseLocalContext) { - myIC->CloseLocalContext(myLocalContextId); - myUseLocalContext = false; - DisplayGUI* myDisplayGUI = new DisplayGUI(); - myDisplayGUI->OnDisplayAll(true); - } - return; -} - - -//===================================================================================== -// function : GetIndexSubShapeSelected() -// purpose : Define a ListOfID of sub shapes selected in ShapeTopo with SubShapeType -// : Method used by Dialogs -//===================================================================================== -bool RepairGUI_SuppressHoleDlg::GetIndexSubShapeSelected(const TopoDS_Shape& ShapeTopo, const int SubShapeType, GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID, Standard_Integer& aLocalContextId, bool& myUseLocalContext) -{ - //* Test the type of viewer */ - if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() > VIEW_OCC) - return false; - - OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer(); - Handle(AIS_InteractiveContext) ic = v3d->getAISContext(); - - ic->InitSelected(); - int nbSelected = ic->NbSelected(); - ListOfID.length(nbSelected); - - //***************** DEFINE INDEX OF EACH SELECTION *********************// - int i = 0; - ic->InitSelected(); /* to restart */ - while(ic->MoreSelected()) { - /* Find index of sub shape into main shape */ - TopExp_Explorer Exp (ShapeTopo, TopAbs_ShapeEnum(SubShapeType)); - int index = 1; - bool found = false; - while( Exp.More()) { - if((Exp.Current()).IsSame(ic->SelectedShape())) { - found = true; - break; - } - index++; - Exp.Next(); - } - if(!found) { - /* Manage local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - return false; - } - ListOfID[i] = index; - i++; - ic->NextSelected(); - } - //***************** END *********************// - - /* Manage local context from DialogBox */ - ic->CloseLocalContext(aLocalContextId); - myUseLocalContext = false; - - return true; -} diff --git a/src/RepairGUI/RepairGUI_SuppressHoleDlg.h b/src/RepairGUI/RepairGUI_SuppressHoleDlg.h deleted file mode 100644 index ddc476099..000000000 --- a/src/RepairGUI/RepairGUI_SuppressHoleDlg.h +++ /dev/null @@ -1,112 +0,0 @@ -// GEOM GEOMGUI : GUI for Geometry component -// -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : RepairGUI_SuppressHoleDlg.h -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#ifndef GEOMETRYGUI_SUPPRESSHOLE_H -#define GEOMETRYGUI_SUPPRESSHOLE_H - -#include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel1Check_QTD.h" -#include "DlgRef_1Sel3Check_QTD.h" - -#include "RepairGUI.h" - -//================================================================================= -// class : RepairGUI_SuppressHoleDlg -// purpose : -//================================================================================= -class RepairGUI_SuppressHoleDlg : public GEOMBase_Skeleton -{ - Q_OBJECT - -public: - RepairGUI_SuppressHoleDlg(QWidget* parent = 0, const char* name = 0, RepairGUI* theRepairGUI = 0, SALOME_Selection* Sel = 0, Handle(AIS_InteractiveContext) ic = 0, bool modal = FALSE, WFlags fl = 0); - ~RepairGUI_SuppressHoleDlg(); - -private : - void Init(Handle(AIS_InteractiveContext) ic); - void enterEvent(QEvent* e); - void closeEvent(QCloseEvent* e); - - void ResetStateOfDialog(); - void ResetPartial(); - - RepairGUI* myRepairGUI; - - int myConstructorId; /* Current constructor id = radio button id */ - - /* Define a list of indices of sub shapes selected in a local context */ - bool GetIndexSubShapeSelected(const TopoDS_Shape& ShapeTopo, const int SubShapeType, - GEOM::GEOM_Shape::ListOfSubShapeID& ListOfID, - Standard_Integer& aLocalContextId, bool& myUseLocalContext); - - /* Return the face selected by user from the main shape and index in a ListOfSub */ - TopoDS_Shape FaceFromList(const TopoDS_Shape& aShape, - const GEOM::GEOM_Shape::ListOfSubShapeID& ListOfSub); - - /* Interactive and local context management see also : bool myUseLocalContext() */ - Handle(AIS_InteractiveContext) myIC; /* Interactive context */ - Standard_Integer myLocalContextId; /* identify a local context used by this method */ - bool myUseLocalContext; /* true when this method as opened a local context */ - - TopoDS_Shape myShape; /* Main shape selected */ - TopoDS_Shape myFace; /* Face selected */ - - char* myShapeIOR; - bool myOkShape; - - bool myOkSelectFace; /* true = sub mode GEOM::FACE selection done */ - bool myOkSelectWire; /* true = sub mode GEOM::WIRE selection done (first wire) */ - - /* After selection contains index of face into myShape, wire into myFace, end face into myShape*/ - GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdFace; - GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdWire; - GEOM::GEOM_Shape::ListOfSubShapeID_var myListOfIdEndFace; - - DlgRef_1Sel3Check_QTD* Group1; - DlgRef_1Sel1Check_QTD* Group2; - -private slots: - void ClickOnOk(); - void ClickOnApply(); - void ClickOnCancel(); - void ActivateThisDialog(); - void DeactivateActiveDialog(); - void LineEditReturnPressed(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - void ConstructorsClicked(int constructorId); - void ActivateUserFaceSelection(); - void ActivateUserWireSelection(); - void ActivateUserEndFaceSelection(); - - /* For the second constructor */ - void ActivateUserWiresOnFaceShellSelection() ; - -}; - -#endif // GEOMETRYGUI_SUPPRESSHOLE_H diff --git a/src/SKETCHER/Sketcher_Profile.cxx b/src/SKETCHER/Sketcher_Profile.cxx index 4df75a7bf..acd72451f 100644 --- a/src/SKETCHER/Sketcher_Profile.cxx +++ b/src/SKETCHER/Sketcher_Profile.cxx @@ -49,6 +49,8 @@ using namespace std; #include #include CORBA_SERVER_HEADER(SALOMEDS) +#include "utilities.h" + //======================================================================= // profile // command to build a profile @@ -116,7 +118,7 @@ Sketcher_Profile::Sketcher_Profile(const char* aCmd) { if (n1 != 3) goto badargs; if (!first) { - cout<<"profile : The F instruction must precede all moves"<D1(angle,p,v); @@ -360,14 +368,25 @@ Sketcher_Profile::Sketcher_Profile(const char* aCmd) } // get the result, face or wire - if (move == none) + if (move == none) { return; - else if (move == point) + } else if (move == point) { S = MP; - else if (face) - S = BRepBuilderAPI_MakeFace(P, MW.Wire()); - else + } else if (face) { + if (!MW.IsDone()) { + return; + } + BRepBuilderAPI_MakeFace MF (P, MW.Wire()); + if (!MF.IsDone()) { + return; + } + S = MF; + } else { + if (!MW.IsDone()) { + return; + } S = MW; + } if(!TheLocation.IsIdentity()) S.Move(TheLocation); @@ -377,6 +396,6 @@ Sketcher_Profile::Sketcher_Profile(const char* aCmd) return; badargs : - cout<<"profile : bad number of arguments"< + +#include "utilities.h" + +#include + +#include + +#include +#include + +//============================================================================= +/*! + * + */ +//============================================================================= + +extern "C" +{ +#ifdef WNT + __declspec(__dllexport) +#endif + int Export(const TopoDS_Shape& theShape, const TCollection_AsciiString& theFileName) + { + MESSAGE("Export STEP into file " << theFileName.ToCString()); + + try + { + IFSelect_ReturnStatus status ; + //VRV: OCC 4.0 migration + STEPControl_Writer aWriter; +//JFA: PAL6162 status = aWriter.Transfer( theShape, STEPControl_ManifoldSolidBrep ); + status = aWriter.Transfer( theShape, STEPControl_AsIs ); + //VRV: OCC 4.0 migration + if ( status == IFSelect_RetDone ) + status = aWriter.Write( theFileName.ToCString() ) ; + if ( status == IFSelect_RetDone ) + return 1; + } + catch(Standard_Failure) + { + //THROW_SALOME_CORBA_EXCEPTION("Exception catched in STEPExport", SALOME::BAD_PARAM); + } + return 0; + } +} diff --git a/src/STEPImport/Makefile.in b/src/STEPImport/Makefile.in new file mode 100644 index 000000000..4881cc07b --- /dev/null +++ b/src/STEPImport/Makefile.in @@ -0,0 +1,45 @@ +# Copyright (C) 2003 CEA +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Pavel TELKOV +# Module : GEOM +# $Header$ + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@:@top_srcdir@/idl + +@COMMENCE@ + +# Libraries targets + +LIB= libSTEPImport.la + +LIB_SRC = STEPImport.cxx + +# additionnal information to compil and link file +CPPFLAGS+= $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS+= $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS+= $(CAS_LDPATH) -lTKSTEP -L${KERNEL_ROOT_DIR}/lib/salome + +@CONCLUDE@ diff --git a/src/STEPImport/STEPImport.cxx b/src/STEPImport/STEPImport.cxx new file mode 100644 index 000000000..02a0dd823 --- /dev/null +++ b/src/STEPImport/STEPImport.cxx @@ -0,0 +1,110 @@ +// File: STEPImport.cxx +// Created: Wed May 19 14:41:10 2004 +// Author: Pavel TELKOV +// + +#include "utilities.h" + +#include + +#include + +#include + +#include +#include +#include + +#include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC + +//============================================================================= +/*! + * Import() + */ +//============================================================================= + +extern "C" +{ +#ifdef WNT + __declspec(__dllexport) +#endif + TopoDS_Shape Import (const TCollection_AsciiString& theFileName, + TCollection_AsciiString& theError) + { + MESSAGE("Import STEP model from file " << theFileName.ToCString()); + TopoDS_Shape aResShape; + //VRV: OCC 4.0 migration + STEPControl_Reader aReader; + //VRV: OCC 4.0 migration + TopoDS_Compound compound; + BRep_Builder B; + B.MakeCompound( compound ); + try { + IFSelect_ReturnStatus status = aReader.ReadFile(theFileName.ToCString()); + + if (status == IFSelect_RetDone) { + Standard_Boolean failsonly = Standard_False ; + aReader.PrintCheckLoad (failsonly, IFSelect_ItemsByEntity); + /* Root transfers */ + Standard_Integer nbr = aReader.NbRootsForTransfer(); + aReader.PrintCheckTransfer (failsonly, IFSelect_ItemsByEntity); + + for ( Standard_Integer n=1; n <= nbr; n++) { + Standard_Boolean ok = aReader.TransferRoot(n); + /* Collecting resulting entities */ + Standard_Integer nbs = aReader.NbShapes(); + if (!ok || nbs == 0) + { + // THROW_SALOME_CORBA_EXCEPTION("Exception catched in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM); + continue; // skip empty root + } + /* For a single entity */ + else if (nbr == 1 && nbs == 1) { + aResShape = aReader.Shape(1); + break; + } + + for ( Standard_Integer i=1; i<=nbs; i++ ) { + TopoDS_Shape aShape = aReader.Shape(i); + if ( aShape.IsNull() ) { + // THROW_SALOME_CORBA_EXCEPTION("Null shape in GEOM_Gen_i::ImportStep", SALOME::BAD_PARAM) ; + //return aResShape; + continue; + } + else { + B.Add( compound, aShape ) ; + } + } + } + if ( aResShape.IsNull() ) + aResShape = compound; + + } else { +// switch (status) { +// case IFSelect_RetVoid: +// theError = "Nothing created or No data to process"; +// break; +// case IFSelect_RetError: +// theError = "Error in command or input data"; +// break; +// case IFSelect_RetFail: +// theError = "Execution was run, but has failed"; +// break; +// case IFSelect_RetStop: +// theError = "Execution has been stopped. Quite possible, an exception was raised"; +// break; +// default: +// break; +// } + theError = "Wrong format of the imported file. Can't import file."; + aResShape.Nullify(); + } + } + catch (Standard_Failure) { + Handle(Standard_Failure) aFail = Standard_Failure::Caught(); + theError = aFail->GetMessageString(); + aResShape.Nullify(); + } + return aResShape; + } +} diff --git a/src/ShHealOper/Makefile.in b/src/ShHealOper/Makefile.in new file mode 100644 index 000000000..efaf07c3c --- /dev/null +++ b/src/ShHealOper/Makefile.in @@ -0,0 +1,80 @@ +# GEOM ShHealOper : Shape Healing +# +# 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.org +# +# +# +# File : Makefile.in +# Author : Alexander SLADKOV +# Module : GEOM +# $Header: + +top_srcdir=@top_srcdir@ +top_builddir=../.. +srcdir=@srcdir@ +VPATH=.:@srcdir@ + + +@COMMENCE@ + +# Libraries targets +LIB = libShHealOper.la + +LIB_SRC = \ + ShHealOper_CloseContour.cxx \ + ShHealOper_EdgeDivide.cxx \ + ShHealOper_FillHoles.cxx \ + ShHealOper_RemoveFace.cxx \ + ShHealOper_RemoveInternalWires.cxx \ + ShHealOper_Sewing.cxx \ + ShHealOper_ShapeProcess.cxx \ + ShHealOper_SplitCurve2d.cxx \ + ShHealOper_SplitCurve3d.cxx \ + ShHealOper_Tool.cxx \ + +LIB_CLIENT_IDL = +LIB_SERVER_IDL = + +# header files +EXPORT_HEADERS = \ + ShHealOper_CloseContour.hxx \ + ShHealOper_EdgeDivide.hxx \ + ShHealOper_FillHoles.hxx \ + ShHealOper_RemoveFace.hxx \ + ShHealOper_RemoveInternalWires.hxx \ + ShHealOper_Sewing.hxx \ + ShHealOper_ShapeProcess.hxx \ + ShHealOper_SpiltCurve2d.hxx \ + ShHealOper_SplitCurve2d.hxx \ + ShHealOper_SplitCurve3d.hxx \ + ShHealOper_Tool.hxx + +# idl files +EXPORT_IDLS= + +CPPFLAGS += $(OCC_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome +CXXFLAGS += $(OCC_CXXFLAGS) -I${KERNEL_ROOT_DIR}/include/salome + +LDFLAGS += $(CAS_LDPATH) -lTKernel -lTKGeomAlgo -lTKG3d -lTKG2d -lTKGeomBase -lTKShHealing -lTKMath -lTKBRep -lTKTopAlgo -lTKBool + +%_moc.cxx: %.h + $(MOC) $< -o $@ + +@CONCLUDE@ diff --git a/src/ShHealOper/ShHealOper_CloseContour.cxx b/src/ShHealOper/ShHealOper_CloseContour.cxx new file mode 100644 index 000000000..e5f008393 --- /dev/null +++ b/src/ShHealOper/ShHealOper_CloseContour.cxx @@ -0,0 +1,407 @@ +// File: ShHealOper_CloseContour.cxx +// Created: 20.04.04 11:36:01 +// Author: Galina KULIKOVA +// Copyright: Airbus Industries 2004 + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//======================================================================= +//function : ShHealOper_CloseContour() +//purpose : Constructor +//======================================================================= + +ShHealOper_CloseContour::ShHealOper_CloseContour (const TopoDS_Shape& theShape ) +{ + Init(theShape); +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_CloseContour::Init(const TopoDS_Shape& theShape) +{ + ShHealOper_Tool::Init(theShape); + myTolerance = Precision::Confusion(); + myMaxTolerance = 1.0; + TopExp::MapShapesAndAncestors(theShape,TopAbs_EDGE,TopAbs_FACE,myMapEdgesFace); +} +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_CloseContour::Perform(const TopTools_SequenceOfShape& theSeqEdges, + const Standard_Boolean theModeVertex, + const Standard_Boolean theModeFixGapsCurves) +{ + myFreeEdges.Clear(); + myDone = Standard_False; + myErrorStatus =ShHealOper_NotError; + if(myInitShape.IsNull()) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + Handle(ShapeExtend_WireData) asewd = new ShapeExtend_WireData; + Standard_Integer i =1; + for ( ; i <= theSeqEdges.Length(); i++) + asewd->Add(theSeqEdges.Value(i)); + + myModeVertex = theModeVertex; + myModeFixGapsCurves = theModeFixGapsCurves; + + build(asewd); + + return myDone; +} +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_CloseContour::Perform(const TopoDS_Wire& theWire, + const Standard_Boolean theModeVertex, + const Standard_Boolean theModeFixGapsCurves) +{ + myFreeEdges.Clear(); + myDone = Standard_False; + if(myInitShape.IsNull()) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + Handle(ShapeExtend_WireData) asewd = new ShapeExtend_WireData(theWire); + myModeVertex = theModeVertex; + myModeFixGapsCurves = theModeFixGapsCurves; + build(asewd); + return myDone; +} +//======================================================================= +//function : Build +//purpose : +//======================================================================= + +void ShHealOper_CloseContour::build(Handle(ShapeExtend_WireData)& theSewd) +{ + TopTools_SequenceOfShape aCommonFaces; + //checks that all specified edges belong the one face or not. + Standard_Boolean isOneFace = checkOneFace(theSewd,aCommonFaces); + + //add edge or increase max tolerance in dependance on specified VertexMode. + //if all edges belong the one face that gap will be closed in the 2D by line + //else gap will be closed in the 3D by line. + myDone = fixGaps(theSewd,aCommonFaces); + updateWire(theSewd); + Handle(ShapeFix_Wire) sfw = new ShapeFix_Wire; + sfw->SetContext(myContext); + sfw->Load(theSewd); + + sfw->ClosedWireMode() = Standard_True; + sfw->SetPrecision(myTolerance); + sfw->SetMaxTolerance(myMaxTolerance); + + if(isOneFace) { + Standard_Integer ii =1; + for( ; ii <= aCommonFaces.Length(); ii++) { + TopoDS_Face aFace = TopoDS::Face(aCommonFaces.Value(ii)); + sfw->SetFace(aFace); + myDone = (sfw->Perform() || myDone); + //if Mode for fix gaps is equal to true that + //curve 3D and curve 2D will be pull to each other. + if(myModeFixGapsCurves) { + Standard_Boolean isFixgaps = Standard_False; + if(ii ==1) { + sfw->FixGaps3d(); + isFixgaps = sfw->StatusGaps3d(ShapeExtend_DONE); + if(!isFixgaps && sfw->StatusGaps3d(ShapeExtend_FAIL)) + myErrorStatus = ShHealOper_ErrorExecution; + } + if(sfw->FixGaps2d()) + sfw->FixSelfIntersection(); + else if(sfw->StatusGaps2d(ShapeExtend_FAIL)) + myErrorStatus = ShHealOper_ErrorExecution; + + isFixgaps = (isFixgaps || sfw->StatusGaps2d(ShapeExtend_DONE)); + myDone = (myDone || isFixgaps); + if(isFixgaps) { + Handle(ShapeExtend_WireData) sbwd = sfw->WireData(); + Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge; + for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) { + TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge)); + sfe->FixVertexTolerance(aEdge,aFace); + sfe->FixSameParameter(aEdge); + } + } + } + } + } + else { + myDone = (sfw->Perform() || myDone); + if(myModeFixGapsCurves) { + //if Mode for fix gaps is equal to true that + //curve 3D will be pull to each other. + if(sfw->FixGaps3d()) { + Handle(ShapeExtend_WireData) sbwd = sfw->WireData(); + Handle(ShapeFix_Edge) sfe = new ShapeFix_Edge; + for (Standard_Integer iedge = 1; iedge <= sbwd->NbEdges(); iedge++) { + TopoDS_Edge aEdge = TopoDS::Edge(sbwd->Edge(iedge)); + sfe->FixVertexTolerance(aEdge); + sfe->FixSameParameter(aEdge); + } + } + else if(sfw->StatusGaps3d(ShapeExtend_FAIL)) + myErrorStatus = ShHealOper_ErrorExecution; + myDone = (sfw->StatusGaps3d(ShapeExtend_DONE) || myDone); + } + } + + if(myDone) { + TopoDS_Shape aoldShape = myInitShape; + //if free edges were added they will be added to the result shape + //and type of result shape should be change if initial shape is not COMPOUND. + if( myFreeEdges.Length()) { + BRep_Builder aB; + TopoDS_Compound aComp; + aB.MakeCompound(aComp); + if(aoldShape.ShapeType() == TopAbs_COMPOUND) { + TopoDS_Iterator aIt(aoldShape); + for( ;aIt.More();aIt.Next() ) + aB.Add(aComp,aIt.Value()); + } + else + aB.Add(aComp,aoldShape); + + Standard_Integer i=1; + for ( ; i <= myFreeEdges.Length(); i++ ) + aB.Add(aComp,myFreeEdges.Value(i)); + aoldShape = aComp; + + } + myResultShape = myContext->Apply(aoldShape); + } + return; +} +//======================================================================= +//function : checkGaps +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_CloseContour::fixGaps(const Handle(ShapeExtend_WireData)& theWire, + const TopTools_SequenceOfShape& theCommonFaces) +{ + Handle(ShapeAnalysis_Wire) asaw = new ShapeAnalysis_Wire; + asaw->Load(theWire); + + Standard_Integer i =1; + Standard_Boolean hasGaps = Standard_False; + for ( ; i <= asaw->NbEdges(); i++) { + if(asaw->CheckGap3d(i)) { + Standard_Real dist = asaw->MinDistance3d(); + if(dist > myMaxTolerance) { + hasGaps = Standard_True; + Standard_Integer ind2 = (i ==0 ? theWire->NbEdges() :i); + Standard_Integer ind1 = (ind2 >1 ? ind2 -1 : theWire->NbEdges()); + TopoDS_Edge aE1= theWire->Edge(ind1); + TopoDS_Edge aE2= theWire->Edge(ind2); + if(!myModeVertex) + buildEdge(aE1,aE2,theCommonFaces); + else + myMaxTolerance = RealLast(); + if(ind2 == ind1) break; + } + } + + } + return hasGaps; +} + +//======================================================================= +//function : checkOneFace +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_CloseContour::checkOneFace(const Handle(ShapeExtend_WireData)& theSewd, + TopTools_SequenceOfShape& theCommonFaces) const +{ + + TopTools_IndexedMapOfShape amapfaces; + TopoDS_Edge aEdge1 = theSewd->Edge(1); + Standard_Boolean isOneFace = myMapEdgesFace.Contains(aEdge1 ); + if(!isOneFace) + return isOneFace; + + //check that all specified edges belong to one face. + const TopTools_ListOfShape& alfaces = myMapEdgesFace.FindFromKey(aEdge1); + isOneFace = isOneFace && (!alfaces.IsEmpty()); + if(!isOneFace) + return Standard_False; + + TopTools_ListIteratorOfListOfShape litr(alfaces); + for( ; litr.More();litr.Next() ) + amapfaces.Add(litr.Value()); + + TColStd_MapOfInteger amapIndex; + Standard_Integer ind =0; + Standard_Integer i =2; + for( ; i <= theSewd->NbEdges() && isOneFace; i++) { + isOneFace = myMapEdgesFace.Contains(theSewd->Edge(i)); + if(isOneFace) { + const TopTools_ListOfShape& alfaces1 = myMapEdgesFace.FindFromKey(theSewd->Edge(i)); + + TColStd_MapOfInteger aTmpInd; + for(litr.Initialize(alfaces1) ; litr.More() ;litr.Next() ) { + if(amapfaces.Contains(litr.Value())) { + ind = amapfaces.FindIndex(litr.Value()); + if( i == 2) + amapIndex.Add(ind); + else + aTmpInd.Add(ind); + } + } + if(i ==2) { + isOneFace = (amapIndex.Extent()); + continue; + } + else { + TColStd_MapIteratorOfMapOfInteger aMi(amapIndex); + for( ; aMi.More();aMi.Next()) { + if(!aTmpInd.Contains(aMi.Key())) + amapIndex.Remove(aMi.Key()); + } + isOneFace = (amapIndex.Extent()); + + } + } + } + if(theSewd->NbEdges() >1) { + Standard_Integer j =1; + for( ; j <= amapfaces.Extent(); j++) { + if(!amapIndex.Contains(j)) continue; + TopoDS_Shape aF = amapfaces.FindKey(j); + theCommonFaces.Append(aF); + } + } + return isOneFace; +} +//======================================================================= +//function : buildEdge +//purpose : +//======================================================================= + +void ShHealOper_CloseContour::buildEdge(const TopoDS_Edge& aE1, + const TopoDS_Edge& aE2, + const TopTools_SequenceOfShape& theCommonFaces) +{ + ShapeAnalysis_Edge asae; + TopoDS_Vertex aV1 = asae.LastVertex(aE1); + TopoDS_Vertex aV2 = asae.FirstVertex(aE2); + gp_Pnt p1 = BRep_Tool::Pnt(aV1); + gp_Pnt p2 = BRep_Tool::Pnt(aV2); + BRepBuilderAPI_MakeVertex mkver1( p1 ); + TopoDS_Vertex newV1 = mkver1.Vertex(); + + BRepBuilderAPI_MakeVertex mkver2( p2 ); + TopoDS_Vertex newV2 = mkver2.Vertex(); + BRep_Builder B; + B.UpdateVertex ( newV1,Precision::Confusion()); + B.UpdateVertex ( newV2, Precision::Confusion()); + Standard_Boolean isBuild = Standard_False; + TopoDS_Edge edge; + B.MakeEdge ( edge ); + ShapeBuild_Edge sbe; + //if all edges belong to one face that gap will be closed in the 2D by line + //than 3D curve will be built by 2D curve + if(theCommonFaces.Length()) { + + TopoDS_Face aF1 = TopoDS::Face(theCommonFaces.Value(1)); + Handle(Geom2d_Curve) c2d1,c2d2; + gp_Pnt2d p2d1,p2d2; + Standard_Real a1, b1,a2, b2; + if ( asae.PCurve ( aE1, aF1, c2d1, a1, b1, Standard_True ) && + asae.PCurve ( aE2, aF1, c2d2, a2, b2, Standard_True )) { + + c2d1->D0 ( b1, p2d1); + c2d2->D0 ( a2, p2d2); + gp_Vec2d v12 ( p2d1, p2d2 ); + + Handle(Geom2d_Line) aLine2d = new Geom2d_Line ( p2d1, gp_Dir2d ( v12 ) ); + B.UpdateEdge ( edge, aLine2d, aF1, ::Precision::Confusion() ); + B.Range ( edge, aF1, 0.0, v12.Magnitude() ); + + isBuild = sbe.BuildCurve3d ( edge ); + } + } + //else gap will be closed in the 3D by line. + if(!isBuild) { + gp_Vec v1 ( p1, p2 ); + Handle(Geom_Line) aLine = new Geom_Line ( p1, gp_Dir ( v1 ) ); + B.UpdateEdge ( edge, aLine, ::Precision::Confusion() ); + B.Range ( edge,0.0, v1.Magnitude()); + } + B.Add ( edge, newV1.Oriented ( TopAbs_FORWARD ) ); + B.Add ( edge, newV2.Oriented ( TopAbs_REVERSED ) ); + myContext->Replace(aV1, newV1.Oriented (aV1.Orientation())); + myContext->Replace(aV2, newV2.Oriented (aV2.Orientation())); + if(isBuild) { + newV1.Orientation(aV1.Orientation()); + TopoDS_Edge newEdge = sbe.CopyReplaceVertices ( aE1,TopoDS_Vertex(), newV1); + TopoDS_Wire aw; + B.MakeWire(aw); + B.Add(aw,newEdge); + B.Add(aw,edge); + TopoDS_Shape anE1 = myContext->Apply(aE1); + myContext->Replace(anE1,aw); + } + else { + myFreeEdges.Append(edge); + } +} +//======================================================================= +//function : UpdateWire +//purpose : +//======================================================================= + +void ShHealOper_CloseContour::updateWire (Handle(ShapeExtend_WireData)& sbwd) +{ + Standard_Integer i=1; + for ( ; i <= sbwd->NbEdges(); i++ ) { + TopoDS_Edge E = sbwd->Edge(i); + TopoDS_Shape S = myContext->Apply ( E ); + if ( S == E ) continue; + for ( TopExp_Explorer exp(S,TopAbs_EDGE); exp.More(); exp.Next() ) + sbwd->Add ( exp.Current(), i++ ); + sbwd->Remove ( i-- ); + } + for ( i =1; i <= myFreeEdges.Length(); i++ ) { + sbwd->Add(TopoDS::Edge(myFreeEdges.Value(i))); + } +} diff --git a/src/ShHealOper/ShHealOper_CloseContour.hxx b/src/ShHealOper/ShHealOper_CloseContour.hxx new file mode 100644 index 000000000..aab0fa3dd --- /dev/null +++ b/src/ShHealOper/ShHealOper_CloseContour.hxx @@ -0,0 +1,140 @@ +// File: ShHealOper_CloseContour.hxx +// Created: 20.04.04 10:25:46 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_CloseContour_HeaderFile +#define ShHealOper_CloseContour_HeaderFile + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +/// Class ShHealOper_CloseContour +// + +class ShHealOper_CloseContour : public ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + Standard_EXPORT ShHealOper_CloseContour() : ShHealOper_Tool() {} + + Standard_EXPORT ShHealOper_CloseContour (const TopoDS_Shape& theShape); + //Initalizes by whole shape. + + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theSeqEdges, + const Standard_Boolean theModeVertex = Standard_False, + const Standard_Boolean theModeFixGapsCurves = Standard_True); + + //Build wire from specified edges and close gap between edges by segment of line + // or by vertex in according to specified mode. + + Standard_EXPORT Standard_Boolean Perform(const TopoDS_Wire& theWire, + const Standard_Boolean theModeVertex= Standard_False, + const Standard_Boolean theModeFixGapsCurves = Standard_True); + + //Close gap into specified wire by segment of line or by vertex in according + //to specified mode. + + inline void SetTolerance(const Standard_Real theTolerance) + { + myTolerance = theTolerance; + } + //Sets tolerance for checking closure of the contour. + + inline Standard_Real GetTolerance() + { + return myTolerance; + } + //Returns value of the tolerance. + + inline void SetMaxTolerance(const Standard_Real theMaxTolerance) + { + myMaxTolerance = theMaxTolerance; + } + //Sets tolerance for checking closure of the contour. + + inline Standard_Real GetMaxTolerance() + { + return myMaxTolerance; + } + //Returns value of the tolerance. + + inline void SetModeVertex(const Standard_Boolean theModeVertex) + { + myModeVertex = theModeVertex; + } + //Sets mode for closure of the contour. + + inline Standard_Boolean GetModeVertex() + { + return myModeVertex; + } + //Get mode for closure of the contour. + + + private: + // ---------- PRIVATE METHODS ---------- + + void build(Handle(ShapeExtend_WireData)& theSewd); + + Standard_Boolean fixGaps(const Handle(ShapeExtend_WireData)& theWire, + const TopTools_SequenceOfShape& theCommonFaces); + + Standard_Boolean checkOneFace(const Handle(ShapeExtend_WireData)& theSewd, + TopTools_SequenceOfShape& theCommonFaces) const; + + void buildEdge(const TopoDS_Edge& aE1, + const TopoDS_Edge& aE2, + const TopTools_SequenceOfShape& theCommonFaces); + + void updateWire (Handle(ShapeExtend_WireData)& sbwd); + private: + // ---------- PRIVATE FIELDS ---------- + + + Standard_Boolean myModeVertex; + Standard_Boolean myModeFixGapsCurves; + + Standard_Real myMaxTolerance; + Standard_Real myTolerance; + TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace; + TopTools_SequenceOfShape myFreeEdges; + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_CloseContour) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_CloseContour, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_EdgeDivide.cxx b/src/ShHealOper/ShHealOper_EdgeDivide.cxx new file mode 100644 index 000000000..183b68d32 --- /dev/null +++ b/src/ShHealOper/ShHealOper_EdgeDivide.cxx @@ -0,0 +1,256 @@ +// File: ShHealOper_EdgeDivide.cxx +// Created: 30.04.04 16:44:47 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include <.hxx> +//#include <.hxx> +//======================================================================= +//function : ShHealOper_EdgeDivide() +//purpose : Constructor +//======================================================================= + +ShHealOper_EdgeDivide::ShHealOper_EdgeDivide (const TopoDS_Shape& theShape) +{ + Init(theShape); +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_EdgeDivide::Init(const TopoDS_Shape& theShape) +{ + ShHealOper_Tool::Init(theShape); + myDivideParamMode = Standard_True; + myMapEdgesFace.Clear(); + TopExp::MapShapesAndAncestors(theShape,TopAbs_EDGE,TopAbs_FACE,myMapEdgesFace); + +} + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +Standard_Boolean ShHealOper_EdgeDivide::Perform(const TopoDS_Shape& theEdge, + const TColStd_SequenceOfReal& theValues, + const Standard_Boolean theDivideParamMode) +{ + myDone = Standard_False; + myDivideParamMode = theDivideParamMode; + if(theEdge.ShapeType() != TopAbs_EDGE) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + myEdge = TopoDS::Edge(theEdge); + Standard_Integer i =1; + Handle(TColStd_HSequenceOfReal) aSeqValues = new TColStd_HSequenceOfReal; + for( ; i <= theValues.Length(); i++) + aSeqValues->Append(theValues.Value(i)); + myDone = build(aSeqValues); + return myDone; + +} +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_EdgeDivide::Perform(const TopoDS_Shape& theEdge, + const Standard_Real theValue, + const Standard_Boolean theDivideParamMode) +{ + myDone = Standard_False; + myErrorStatus = ShHealOper_NotError; + if(theEdge.ShapeType() != TopAbs_EDGE) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + myDivideParamMode = theDivideParamMode; + myEdge = TopoDS::Edge(theEdge); + Handle(TColStd_HSequenceOfReal) aSeqValues = new TColStd_HSequenceOfReal; + aSeqValues->Append(theValue); + myDone = build(aSeqValues); + return myDone; +} +//======================================================================= +//function : build +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_EdgeDivide::build(const Handle(TColStd_HSequenceOfReal)& theValues) +{ + if(myEdge.IsNull() || !theValues->Length()) { + myErrorStatus = ShHealOper_InvalidParameters; + return Standard_False; + } + + Standard_Boolean has3d = Standard_False, + has2d = Standard_False, + hasPCurves = Standard_False; + + //computation of the split values in dependance from specified mode and values. + if(!computeValues(theValues, has3d,has2d,hasPCurves)) { + myErrorStatus = ShHealOper_InvalidParameters; + return Standard_False; + } + + //setting split values in the splitting curve tools. + Handle(ShapeUpgrade_WireDivide) aSplitTool = new ShapeUpgrade_WireDivide; + aSplitTool->Load(myEdge); + aSplitTool->SetContext(myContext); + if(has3d) { + Handle(ShHealOper_SplitCurve3d) aSplitCurve3d = new ShHealOper_SplitCurve3d; + aSplitCurve3d->SetValues(theValues); + aSplitTool->SetSplitCurve3dTool(aSplitCurve3d); + } + else if(has2d) { + Handle(ShHealOper_SplitCurve2d) aSplitCurve2d = new ShHealOper_SplitCurve2d; + aSplitCurve2d->SetValues(theValues); + aSplitTool->SetSplitCurve2dTool(aSplitCurve2d); + } + else { + myErrorStatus = ShHealOper_InvalidParameters; + return Standard_False; + } + + //split 3d curve and pcurve for each face reffering to edge. + Standard_Boolean isDone = Standard_True; + if(hasPCurves) { + const TopTools_ListOfShape& lfaces = myMapEdgesFace.FindFromKey(myEdge); + TopTools_ListIteratorOfListOfShape aItf(lfaces); + for( ; aItf.More() && isDone; aItf.Next()) { + TopoDS_Face aFace = TopoDS::Face(aItf.Value()); + aSplitTool->SetFace(aFace); + aSplitTool->Perform(); + isDone = aSplitTool->Status( ShapeExtend_DONE ); + if( aSplitTool->Status( ShapeExtend_FAIL )) + myErrorStatus = ShHealOper_ErrorExecution; + } + } + else { + aSplitTool->Perform(); + isDone = aSplitTool->Status( ShapeExtend_DONE ); + if( aSplitTool->Status( ShapeExtend_FAIL )) + myErrorStatus = ShHealOper_ErrorExecution; + } + if(isDone) + myResultShape = myContext->Apply(myInitShape); + return isDone; + +} +//======================================================================= +//function : computeValues +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_EdgeDivide::computeValues(const Handle(TColStd_HSequenceOfReal)& theValues, + Standard_Boolean& theHas3d, + Standard_Boolean& theHas2d, + Standard_Boolean& hasPCurves) +{ + hasPCurves = (myMapEdgesFace.Contains(myEdge) && + myMapEdgesFace.FindFromKey(myEdge).Extent()); + if(hasPCurves && (!BRep_Tool::SameRange(myEdge) || !BRep_Tool::SameParameter(myEdge))) { + ShapeFix_Edge sfe; + sfe.FixSameParameter(myEdge); + } + + Standard_Real aFirst =0.,aLast=0.; + + //computation of the split values if edge should be splitted by parameter. + if(myDivideParamMode) { + BRep_Tool::Range(myEdge,aFirst,aLast); + Handle(Geom_Curve) aCurve = BRep_Tool::Curve(myEdge,aFirst,aLast); + + theHas3d = (!aCurve.IsNull()); + theHas2d = (aCurve.IsNull() && (fabs(aLast-aFirst) > Precision::PConfusion() )); + Standard_Integer i = 1; + for( ; i <= theValues->Length();i++) { + Standard_Real aVal = theValues->Value(i); + theValues->ChangeValue(i) = aFirst+ aVal*fabs(aLast - aFirst); + } + } + else { + //computation of the split values if edge should be splitted by length. + ShapeAnalysis_Edge sae; + Handle(Geom_Curve) aCurve; + Standard_Real aCurLen =0.; + GeomAdaptor_Curve aAdC; + Geom2dAdaptor_Curve aAdC2d; + if(sae.Curve3d(myEdge,aCurve,aFirst,aLast,Standard_False)) { + aAdC.Load(aCurve,aFirst,aLast); + aCurLen = GCPnts_AbscissaPoint::Length(aAdC,aFirst,aLast); + theHas3d = Standard_True; + } + else { + if(hasPCurves) { + TopoDS_Face aFace = TopoDS::Face(myMapEdgesFace.FindFromKey(myEdge).First()); + Handle(Geom2d_Curve) aCurve2d; + if(sae.PCurve(myEdge,aFace,aCurve2d,aFirst,aLast)) { + aAdC2d.Load(aCurve2d,aFirst,aLast); + aCurLen = GCPnts_AbscissaPoint::Length(aAdC,aFirst,aLast); + theHas2d = Standard_True; + } + + } + } + if(!theHas3d && !theHas2d) + return Standard_False; + + Standard_Integer i = 1; + for( ; i <= theValues->Length();i++) { + Standard_Real aLen = theValues->Value(i)*aCurLen; + if(theHas3d) { + GCPnts_AbscissaPoint anAbsc(aAdC,aLen,aFirst); + if(anAbsc.IsDone()) + theValues->ChangeValue(i) = anAbsc.Parameter(); + else + theValues->Remove(i--); + } + else if(theHas2d) { + GCPnts_AbscissaPoint anAbsc(aAdC2d,aLen,aFirst); + if(anAbsc.IsDone()) + theValues->ChangeValue(i) = anAbsc.Parameter(); + else + theValues->Remove(i--); + } + } + } + return (theValues->Length()); +} diff --git a/src/ShHealOper/ShHealOper_EdgeDivide.hxx b/src/ShHealOper/ShHealOper_EdgeDivide.hxx new file mode 100644 index 000000000..37b40e751 --- /dev/null +++ b/src/ShHealOper/ShHealOper_EdgeDivide.hxx @@ -0,0 +1,94 @@ +// File: ShHealOper_EdgeDivide.hxx +// Created: 30.04.04 16:06:25 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_EdgeDivide_HeaderFile +#define ShHealOper_EdgeDivide_HeaderFile + +#include +#include +#include +#include +#include +#include + +/// Class ShHealOper_EdgeDivide +//Intended for spitting edge in accordance to the specified mode and value. + +class ShHealOper_EdgeDivide : public ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + + + Standard_EXPORT ShHealOper_EdgeDivide () : ShHealOper_Tool() {} + /// Empty constructor + + Standard_EXPORT ShHealOper_EdgeDivide (const TopoDS_Shape& theShape); + /// Constructor initializes by shape. + + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge, + const Standard_Real theValue, + const Standard_Boolean theDivideParamMode = Standard_True); + //Performs spitting of the specified edge in the accoradnce to + //specified mode and value. + //If theDivideParamMode is equal to true edge will be splitted by parameter. + //Else edge will be spliited by length (default true). + //theValue is koefficient for splitting from 0 to 1. + + Standard_EXPORT Standard_Boolean Perform(const TopoDS_Shape& theEdge, + const TColStd_SequenceOfReal& theValues, + const Standard_Boolean theDivideParamMode = Standard_True); + //Performs spitting of the specified edge in the accoradnce to + //specified mode and sequence of values the same way as previous. + + protected: + // ---------- PROTECTED METHODS ---------- + + + Standard_Boolean build(const Handle(TColStd_HSequenceOfReal)& theValues); + + Standard_Boolean computeValues(const Handle(TColStd_HSequenceOfReal)& theValues, + Standard_Boolean& theHas3d, + Standard_Boolean& theHas2d, + Standard_Boolean& hasPCurves); + + private: + // ---------- PRIVATE FIELDS ---------- + + TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace; + Standard_Boolean myDivideParamMode; + TopoDS_Edge myEdge; + + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_EdgeDivide) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_EdgeDivide, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_FillHoles.cxx b/src/ShHealOper/ShHealOper_FillHoles.cxx new file mode 100644 index 000000000..d80857e74 --- /dev/null +++ b/src/ShHealOper/ShHealOper_FillHoles.cxx @@ -0,0 +1,468 @@ +// File: ShHealOper_FillHoles.cxx +// Created: 26.04.04 17:35:30 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//======================================================================= +//function : ShHealOper_FillHoles() +//purpose : Constructor +//======================================================================= +ShHealOper_FillHoles::ShHealOper_FillHoles () +{ + InitParameters(); +} + +//======================================================================= +//function : ShHealOper_FillHoles +//purpose : +//======================================================================= + +ShHealOper_FillHoles::ShHealOper_FillHoles (const TopoDS_Shape& theShape) +{ + + Init(theShape); + InitParameters(); +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_FillHoles::Init(const TopoDS_Shape& theShape) +{ + ShHealOper_Tool::Init(theShape); + TopExp::MapShapesAndAncestors( myInitShape, TopAbs_EDGE,TopAbs_SHELL , myEdgeShells); + TopExp::MapShapesAndAncestors ( myInitShape, TopAbs_EDGE,TopAbs_COMPOUND, myEdgeComps ); + + TopExp::MapShapesAndAncestors ( myInitShape, TopAbs_EDGE,TopAbs_FACE, myEdgeFaces ); +} +//======================================================================= +//function : InitParameters +//purpose : +//======================================================================= + +void ShHealOper_FillHoles::InitParameters(Standard_Integer theDegree, + Standard_Integer theNbPtsOnCur, + Standard_Integer theNbIter, + Standard_Real theTol3d, + Standard_Real theTol2d, + Standard_Real theTolAng, + Standard_Real theTolCrv, + Standard_Integer theMaxDeg, + Standard_Integer theMaxSeg) +{ + myNbPtsOnCur = theNbPtsOnCur; + myNbIter = theNbIter; + myDegree =theDegree; + myTol2d = theTol2d; + myTol3d = theTol3d; + myTolAng = theTolAng; + myTolCrv = theTolCrv; + myMaxDeg = theMaxDeg; + myMaxSeg =theMaxSeg; +} +//======================================================================= +//function : Fill +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_FillHoles::Fill() +{ + ShapeAnalysis_FreeBounds sab(myInitShape); + TopoDS_Compound aCompClosed = sab.GetClosedWires(); + TopoDS_Compound aCompOpen = sab.GetOpenWires(); + TopTools_SequenceOfShape aFillWires; + if(!aCompClosed.IsNull()) { + TopoDS_Iterator aIt(aCompClosed); + + for( ; aIt.More(); aIt.Next()) + aFillWires.Append(aIt.Value()); + } + if(!aCompOpen.IsNull()) { + TopoDS_Iterator aIt(aCompOpen); + for( ; aIt.More(); aIt.Next()) + aFillWires.Append(aIt.Value()); + } + + TopExp_Explorer aExp(myInitShape,TopAbs_EDGE,TopAbs_FACE); + + for( ; aExp.More(); aExp.Next()) + aFillWires.Append(aExp.Current()); + + return Fill(aFillWires); +} + +//======================================================================= +//function : Fill +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_FillHoles::Fill(const TopTools_SequenceOfShape& theFillShapes) +{ + myDone = Standard_False; + myErrorStatus = ShHealOper_NotError; + if(myInitShape.IsNull()) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + if(!theFillShapes.Length()) { + return myDone; + } + + Handle(TopTools_HSequenceOfShape) aSeqWires = new TopTools_HSequenceOfShape; + if(!prepareWires(theFillShapes,aSeqWires)) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + + myResultShape = myInitShape; + Standard_Integer i =1; + for( ; i <= aSeqWires->Length(); i++) { + TopoDS_Wire aWire = TopoDS::Wire(aSeqWires->Value(i)); + Handle(TColGeom2d_HArray1OfCurve) aCurves2d; + Handle(TColStd_HArray1OfInteger) aOrders; + Handle(TColStd_HArray1OfInteger) aSenses; + Handle(Geom_Surface) aSurf = buildSurface(aWire,aCurves2d,aOrders,aSenses); + if(aSurf.IsNull()) + myErrorStatus = ShHealOper_ErrorExecution; + else + myDone = (addFace(aSurf,aWire,aCurves2d,aOrders,aSenses) || myDone); + } + if(myDone) + myResultShape = myContext->Apply(myResultShape); + return myDone; +} +//======================================================================= +//function : isCircle +//purpose : +//======================================================================= +static Standard_Boolean isCircle(const TopoDS_Edge theEdge) +{ + Standard_Real aFirst, aLast; + Handle(Geom_Curve) aC3D = BRep_Tool::Curve(theEdge,aFirst, aLast ); + if(aC3D.IsNull()) return Standard_False; + Standard_Boolean isCirc = (aC3D->Value(aFirst).Distance(aC3D->Value(aLast)) < + aC3D->Value(aFirst).Distance(aC3D->Value((aFirst +aLast)/2))); + return isCirc; +} +//======================================================================= +//function : prepareWires +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_FillHoles::prepareWires(const TopTools_SequenceOfShape& theFillShapes, + Handle(TopTools_HSequenceOfShape)& theSeqWires) +{ + Handle(TopTools_HSequenceOfShape) aSeqEdges = new TopTools_HSequenceOfShape; + BRep_Builder aB; + Standard_Integer i =1; + for( ; i <= theFillShapes.Length(); i++) { + TopExp_Explorer aExp; + for (aExp.Init (theFillShapes.Value(i),TopAbs_WIRE); aExp.More(); aExp.Next()) { + TopoDS_Iterator aIt(aExp.Current()); + Standard_Boolean isAdd = Standard_True; + for( ; aIt.More() && isAdd; aIt.Next()) { + if(myEdgeFaces.Contains(aIt.Value())) + isAdd = (myEdgeFaces.FindFromKey(aIt.Value()).Extent() <2); + } + if(isAdd) + theSeqWires->Append(aExp.Current()); + } + for (aExp.Init (theFillShapes.Value(i),TopAbs_EDGE, TopAbs_WIRE); aExp.More(); aExp.Next()) { + if (!BRep_Tool::Degenerated (TopoDS::Edge (aExp.Current()))) + if(myEdgeFaces.Contains(aExp.Current()) && myEdgeFaces.FindFromKey(aExp.Current()).Extent() >1) + continue; + aSeqEdges->Append(aExp.Current()); + } + } + + if(aSeqEdges->Length()) + { + Standard_Real aTol = 0.; + Standard_Boolean aShared = Standard_True; + Handle(TopTools_HSequenceOfShape) aTmpWires = new TopTools_HSequenceOfShape; + ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdges, aTol, aShared, aTmpWires); + Handle(TopTools_HSequenceOfShape) anWiresClosed = new TopTools_HSequenceOfShape, + anWiresOpen = new TopTools_HSequenceOfShape; + ShapeAnalysis_FreeBounds::SplitWires(aTmpWires, aTol, aShared, anWiresClosed, anWiresOpen); + + for (i = 1; i <= anWiresClosed->Length(); i++) + theSeqWires->Append (anWiresClosed->Value (i)); + for (i = 1; i <= anWiresOpen->Length(); i++) + theSeqWires->Append (anWiresOpen->Value (i)); + } + + + + for( i =1; i <= theSeqWires->Length(); i++) { + TopoDS_Wire aWire = TopoDS::Wire(theSeqWires->Value(i)); + + TopoDS_Iterator aIt(aWire); + Standard_Integer ne =0; + TopoDS_Edge ae; + for( ; aIt.More(); aIt.Next(), ne++) + ae = TopoDS::Edge(aIt.Value()); + if((ne == 1) && ( !isCircle(ae))) { + theSeqWires->Remove(i--); + continue; + } + } + return (theSeqWires->Length()); +} +//======================================================================= +//function : buildSurface +//purpose : +//======================================================================= + +Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWire, + Handle(TColGeom2d_HArray1OfCurve)& theCurves2d, + Handle(TColStd_HArray1OfInteger)& theOrders, + Handle(TColStd_HArray1OfInteger)& theSenses) +{ + Handle(Geom_BSplineSurface) aSurf; + try { + + GeomPlate_BuildPlateSurface aBuilder(myDegree, myNbPtsOnCur, myNbIter, + myTol2d, myTol3d, myTolAng, myTolCrv); + TopoDS_Iterator aIter; + for(aIter.Initialize (theWire); aIter.More(); aIter.Next()) { + + TopoDS_Edge ae = TopoDS::Edge(aIter.Value()); + BRepAdaptor_Curve adC(ae); + Handle(BRepAdaptor_HCurve) aHAD= new BRepAdaptor_HCurve(adC); + Handle(BRepFill_CurveConstraint) aConst = + new BRepFill_CurveConstraint (aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d); + //Handle(GeomPlate_CurveConstraint) aConst = + // new GeomPlate_CurveConstraint(aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d); + aBuilder.Add (aConst); + } + aBuilder.Perform(); + if(!aBuilder.IsDone()) + return aSurf; + Handle(GeomPlate_Surface) aPlSurf = aBuilder.Surface(); + + //for filling holes without initial specified surface + //the initial surface should be build by GeomPlate itself + //following code was taken from BRepFill_Filling::Build + + Standard_Real aDist = aBuilder.G0Error(); + TColgp_SequenceOfXY S2d; + TColgp_SequenceOfXYZ S3d; + S2d.Clear(); + S3d.Clear(); + aBuilder.Disc2dContour(4,S2d); + aBuilder.Disc3dContour(4,0,S3d); + Standard_Real amaxTol = Max( myTol3d, 10* aDist); + GeomPlate_PlateG0Criterion Criterion( S2d, S3d, amaxTol ); + GeomPlate_MakeApprox Approx( aPlSurf, Criterion, myTol3d, myMaxSeg, myMaxDeg ); + aSurf = Approx.Surface(); + if(aSurf.IsNull()) + return aSurf; + + theCurves2d = aBuilder.Curves2d(); + theOrders = aBuilder.Order(); + theSenses = aBuilder.Sense(); + + } + + catch (Standard_Failure) { + aSurf.Nullify(); + return aSurf; + } + return aSurf; +} + +//======================================================================= +//function : addFace +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_FillHoles::addFace(const Handle(Geom_Surface)& theSurf, + const TopoDS_Wire& theWire, + const Handle(TColGeom2d_HArray1OfCurve)& theCurves2d, + const Handle(TColStd_HArray1OfInteger)& theOrders, + const Handle(TColStd_HArray1OfInteger)& theSenses) +{ + BRepBuilderAPI_MakeFace aMakeFace (theSurf); + TopoDS_Face aFace = aMakeFace.Face(); + aFace.EmptyCopy(); + + + TopoDS_Wire aWire; + BRep_Builder aB; + aB.MakeWire(aWire); + + TopTools_IndexedMapOfShape aMapParent; + Standard_Integer aInd = 1; + Standard_Boolean hasShell = Standard_False; + TopoDS_Iterator aIter(theWire); + for ( ; aIter.More(); aIter.Next(), aInd++) { + TopoDS_Edge anEdge = TopoDS::Edge (aIter.Value()); + Standard_Real aF, aL; + BRep_Tool::Range (anEdge, aF, aL); + TopLoc_Location aLoc; + aB.UpdateEdge (anEdge, theCurves2d->Value (aInd),aFace, 0.); + + aB.Range (anEdge, aFace, aF, aL); + + // Set orientation of the edge: orientation should be changed + // if its orientation does not make sence with curve orientation + // recommended by GeomPlate + if ((anEdge.Orientation() == TopAbs_FORWARD) == + (theSenses->Value (theOrders->Value (aInd)) == 1)) { + anEdge.Reverse(); + } + aB.SameParameter(anEdge,Standard_False); + aB.Add (aWire, anEdge); + Standard_Boolean isAdd = Standard_False; + TopoDS_Shape aParent; + if(!myEdgeFaces.Contains(anEdge)) + continue; + + if(myEdgeFaces.FindFromKey(anEdge).Extent() >1) + continue; + + if(myEdgeShells.Contains(anEdge)) { + if(myEdgeShells.FindFromKey(anEdge).Extent()) { + aParent = myEdgeShells.FindFromKey(anEdge).First(); + hasShell = Standard_True; + aMapParent.Add(aParent); + } + } + else if(myEdgeComps.Contains(anEdge)) { + if(myEdgeComps.FindFromKey(anEdge).Extent()) { + aParent = myEdgeComps.FindFromKey(anEdge).First(); + aMapParent.Add(aParent); + } + } + + } + aB.Add(aFace,aWire); + Handle(ShapeFix_Face) aSff = new ShapeFix_Face(aFace); + aSff->SetContext(myContext); + aSff->SetPrecision(myTol3d); + aSff->Perform(); + if(aSff->Status(ShapeExtend_FAIL)) { + myErrorStatus = ShHealOper_ErrorExecution; + return Standard_False; + } + //theFace = aSff->Face(); + TopoDS_Shape aResShape = aSff->Result(); + getResShape(aResShape,aMapParent,hasShell); + return Standard_True; +} + +//======================================================================= +//function : getResShape +//purpose : +//======================================================================= + +void ShHealOper_FillHoles::getResShape(const TopoDS_Shape& theAddShape, + const TopTools_IndexedMapOfShape& aMapParent, + const Standard_Boolean theHasShell) +{ + BRep_Builder aB; + + if(!aMapParent.Extent()) { + TopoDS_Compound aComp; + aB.MakeCompound(aComp); + TopoDS_Shape aresShape = myContext->Apply(myResultShape); + aB.Add(aComp,aresShape); + aB.Add(aComp,theAddShape); + myResultShape = aComp; + return ; + } + Standard_Boolean anhasShell = theHasShell; + TopoDS_Shell aTmpShell; + aB.MakeShell(aTmpShell); + TopTools_SequenceOfShape aseqShells; + if(anhasShell) { + + aB.Add(aTmpShell,theAddShape); + Standard_Integer i =1; + for( ; i <= aMapParent.Extent(); i++) { + TopoDS_Shape aParShape = myContext->Apply(aMapParent.FindKey(i)); + if(aParShape.ShapeType() == TopAbs_SHELL) { + TopExp_Explorer aexp(aParShape,TopAbs_FACE); + for( ; aexp.More(); aexp.Next()) + aB.Add(aTmpShell,aexp.Current()); + aseqShells.Append(aParShape); + } + } + anhasShell = aseqShells.Length(); + } + if(anhasShell) { + Handle(ShapeFix_Shell) asfs = new ShapeFix_Shell; + asfs->FixFaceOrientation(aTmpShell); + TopoDS_Shape anshape = asfs->Shape(); + myContext->Replace(aseqShells.Value(1),anshape); + Standard_Integer i =2; + for( ; i<= aseqShells.Length(); i++) + myContext->Remove(aseqShells.Value(i)); + + } + else { + TopoDS_Compound aComp; + aB.MakeCompound(aComp); + TopoDS_Shape oldshape = myContext->Apply(aMapParent.FindKey(1)); + TopoDS_Iterator aIt(oldshape); + for( ; aIt.More(); aIt.Next()) + aB.Add(aComp,aIt.Value()); + aB.Add(aComp,theAddShape); + myContext->Replace( oldshape,aComp); + + } +} diff --git a/src/ShHealOper/ShHealOper_FillHoles.hxx b/src/ShHealOper/ShHealOper_FillHoles.hxx new file mode 100644 index 000000000..9d43402ab --- /dev/null +++ b/src/ShHealOper/ShHealOper_FillHoles.hxx @@ -0,0 +1,119 @@ +// File: ShHealOper_FillHoles.hxx +// Created: 26.04.04 17:15:10 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + + +#ifndef ShHealOper_FillHoles_HeaderFile +#define ShHealOper_FillHoles_HeaderFile + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/// Class ShHealOper_FillHoles +//Intended for filling holes. + +class ShHealOper_FillHoles : public ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + + Standard_EXPORT ShHealOper_FillHoles (); + // Empty constructor initializes class by default parameters. + + Standard_EXPORT ShHealOper_FillHoles (const TopoDS_Shape& theShape); + + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + Standard_EXPORT void InitParameters(Standard_Integer theDegree = 3,//3(2) + Standard_Integer theNbPtsOnCur =5,//3, + Standard_Integer theNbIter = 12,//3 + Standard_Real theTol3d = 0.0001,//0.001, + Standard_Real theTol2d = 1.e-5, + Standard_Real theTolAng = 0.01, + Standard_Real theTolCrv = 0.01, + Standard_Integer theMaxDeg = 8, + Standard_Integer theMaxSeg =9); + //Initialization of the parameters for creation of the surface by GeomPlate. + + Standard_EXPORT Standard_Boolean Fill(); + //Fill all holes detectected as free boundaries. + + Standard_EXPORT Standard_Boolean Fill(const TopTools_SequenceOfShape& theFillShapes); + //Fill hole specified by wires or edges. + + + private: + // ---------- PRIVATE METHODS ---------- + + Standard_Boolean prepareWires(const TopTools_SequenceOfShape& theFillShapes, + Handle(TopTools_HSequenceOfShape)& theSeqWires); + + Handle(Geom_Surface) buildSurface(const TopoDS_Wire& theWire, + Handle(TColGeom2d_HArray1OfCurve)& theCurves2d, + Handle(TColStd_HArray1OfInteger)& theOrders, + Handle(TColStd_HArray1OfInteger)& theSenses); + + Standard_Boolean addFace(const Handle(Geom_Surface)& theSurf, + const TopoDS_Wire& theWire, + const Handle(TColGeom2d_HArray1OfCurve)& theCurves2d, + const Handle(TColStd_HArray1OfInteger)& theOrders, + const Handle(TColStd_HArray1OfInteger)& theSenses); + + void getResShape(const TopoDS_Shape& theAddShape, + const TopTools_IndexedMapOfShape& aMapParent, + const Standard_Boolean theHasShell); + private: + // ---------- PRIVATE FIELDS ---------- + + TopTools_IndexedDataMapOfShapeListOfShape myEdgeShells; + + TopTools_IndexedDataMapOfShapeListOfShape myEdgeComps; + TopTools_IndexedDataMapOfShapeListOfShape myEdgeFaces; + Standard_Integer myNbPtsOnCur; + Standard_Integer myNbIter; + Standard_Integer myDegree; + Standard_Real myTol2d; + Standard_Real myTol3d; + Standard_Real myTolAng; + Standard_Real myTolCrv; + Standard_Integer myMaxDeg; + Standard_Integer myMaxSeg; + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_FillHoles) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_FillHoles, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_RemoveFace.cxx b/src/ShHealOper/ShHealOper_RemoveFace.cxx new file mode 100644 index 000000000..3501fe024 --- /dev/null +++ b/src/ShHealOper/ShHealOper_RemoveFace.cxx @@ -0,0 +1,444 @@ +// File: ShHealOper_RemoveFace.cxx +// Created: 16.04.04 12:12:38 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +//======================================================================= +//function : ShHealOper_RemoveFace() +//purpose : Constructor +//======================================================================= +ShHealOper_RemoveFace::ShHealOper_RemoveFace () : + ShHealOper_Tool() +{ +} +//======================================================================= +//function : ShHealOper_RemoveFace +//purpose : +//======================================================================= + +ShHealOper_RemoveFace::ShHealOper_RemoveFace ( const TopoDS_Shape& theShape ) + //ShHealOper_Tool(theShape) +{ + Init(theShape); +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_RemoveFace::Init(const TopoDS_Shape& theShape) +{ + //myDone = Standard_False; + //myInitShape = theShape; + //myContext->Apply(myInitShape); + ShHealOper_Tool::Init(theShape); + myMapEdgesFace.Clear(); + TopExp::MapShapesAndAncestors(theShape,TopAbs_EDGE,TopAbs_FACE,myMapEdgesFace); +} +//======================================================================= +//function : Perform +//purpose : remove all faces from initial shape +//======================================================================= + +Standard_Boolean ShHealOper_RemoveFace::Perform() +{ + myDone = Standard_False; + myErrorStatus = ShHealOper_NotError; + if(myInitShape.IsNull()) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + TopExp_Explorer aExp(myInitShape,TopAbs_FACE); + for( ; aExp.More(); aExp.Next()) { + removePCurve(TopoDS::Face(aExp.Current())); + myContext->Remove(aExp.Current()); + myDone = Standard_True; + } + if(myDone) { + TopoDS_Shape aNewShape = myContext->Apply(myInitShape); + isReplace(aNewShape,myResultShape); + myContext->Replace(aNewShape,myResultShape); + } + return myDone; +} +//======================================================================= +//function : Perform +//purpose : remove faces specified by sequence of faces from initial shape. +//======================================================================= + +Standard_Boolean ShHealOper_RemoveFace::Perform(const TopTools_SequenceOfShape& theRemoveFaces) +{ + myDone = Standard_False; + myErrorStatus = ShHealOper_NotError; + if(myInitShape.IsNull()) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + if(theRemoveFaces.IsEmpty()) + return Standard_False; + myMapFaces.Clear(); + + Standard_Integer i=1; + for( ; i <= theRemoveFaces.Length(); i++) + myMapFaces.Add(theRemoveFaces.Value(i)); + + myDone = removeFaces(myInitShape,myResultShape); + return myDone; +} + +//======================================================================= +//function : removeFaces +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_RemoveFace::removeFaces(const TopoDS_Shape& theShape, + TopoDS_Shape& theNewShape) +{ + Standard_Boolean isDone = Standard_False; + + TopAbs_ShapeEnum aType = theShape.ShapeType(); + theNewShape = theShape; + if(!myMapFaces.Extent()) + return isDone; + if( aType == TopAbs_WIRE || aType == TopAbs_EDGE || aType == TopAbs_VERTEX) + return isDone; + if(aType == TopAbs_FACE && myMapFaces.Contains(theShape)) { + removePCurve(TopoDS::Face(theShape)); + + myContext->Remove(theShape); + myMapFaces.Remove(theShape); + //theNewShape = TopoDS_Shape(); + theNewShape.Nullify(); + isDone = Standard_True; + } + else if(aType == TopAbs_SHELL) { + isDone = removeFaces(TopoDS::Shell(theShape),theNewShape); + return isDone; + } + else if(aType == TopAbs_SOLID) { + isDone = removeFaces(TopoDS::Solid(theShape),theNewShape); + myContext->Replace(theShape,theNewShape); + } + else if(aType == TopAbs_COMPSOLID) { + + //in the case of compsolid method for removing faces for solid + //will be used. + + TopExp_Explorer aExpShell(theShape,TopAbs_SHELL); + TopoDS_Solid aSol; + BRep_Builder aB; + aB.MakeSolid(aSol); + for( ; aExpShell.More(); aExpShell.Next()) { + aB.Add(aSol,aExpShell.Current()); + } + TopoDS_Shape aNewShape; + isDone = removeFaces(aSol,aNewShape); + if(isDone) + myContext->Replace(theShape,theNewShape); + + } + else if(aType == TopAbs_COMPOUND) { + //in the case of compounf faces will be removed from each part of compound separately + + TopoDS_Compound aComp; + TopoDS_Iterator aItShape(theShape,Standard_False); + BRep_Builder aB; + aB.MakeCompound(aComp); + Standard_Integer nbs =0; + for( ; aItShape.More() ; aItShape.Next()) { + + TopoDS_Shape aNShape; + if( removeFaces(aItShape.Value(),aNShape)) { + isDone = Standard_True; + myContext->Replace(aItShape.Value(),aNShape); + } + if(!aNShape.IsNull()) { + aB.Add(aComp,aNShape); + nbs++; + } + } + if(isDone) { + if(nbs) + theNewShape = aComp; + else + theNewShape =TopoDS_Shape(); + myContext->Replace(theShape,theNewShape); + } + + } + return isDone; +} +//======================================================================= +//function : removeFaces +//purpose : function for removing faces from solid +//======================================================================= + +Standard_Boolean ShHealOper_RemoveFace::removeFaces(const TopoDS_Solid& theShape, + TopoDS_Shape& theNewShape) +{ + Standard_Boolean isDone = Standard_False; + TopoDS_Solid aSol; + BRep_Builder aB; + aB.MakeSolid(aSol); + TopoDS_Compound aComp; + aB.MakeCompound(aComp); + Standard_Boolean isAddSol = Standard_False, isAddComp = Standard_False; + + //firslty faces will be deleted from each shell. + TopoDS_Iterator aItSol(theShape,Standard_False); + for( ; aItSol.More(); aItSol.Next()) { + TopoDS_Shape aSh = aItSol.Value(); + TopoDS_Shape aNewShape; + if(removeFaces(aSh,aNewShape)) + isDone = Standard_True; + + if(aNewShape.IsNull()) + continue; + else if(aNewShape.ShapeType() == TopAbs_SHELL ) { + aB.Add(aSol,aNewShape); + isAddSol = Standard_True; + } + else { + aB.Add(aComp,aNewShape); + isAddComp = Standard_True; + } + + } + if(isDone) { + //for getting correct solids class ShapeFix_Solid will be used. + if(isAddSol) { + Handle(ShapeFix_Solid) aSfSol = new ShapeFix_Solid(aSol); + aSfSol->FixShellMode()= Standard_False; + aSfSol->Perform(); + TopoDS_Shape aresSol = aSfSol->Shape(); + if(!isAddComp) + theNewShape = aresSol; + else + aB.Add(aComp,aresSol); + } + else if(isAddComp) + theNewShape = aComp; + else + theNewShape.Nullify(); + } + else + theNewShape = theShape; + return isDone; +} +//======================================================================= +//function : IsManifold +//purpose : function for definition manifold shell +//======================================================================= +Standard_Boolean ShHealOper_RemoveFace::isManifold(const TopoDS_Shell& aShell) +{ + Standard_Boolean IsManifold = Standard_True; + TopExp_Explorer aExp(aShell,TopAbs_EDGE); + for( ; aExp.More() && IsManifold; aExp.Next()) { + const TopTools_ListOfShape& als = myMapEdgesFace.FindFromKey(aExp.Current()); + IsManifold = (als.Extent() <=2 ); + } + return IsManifold; +} + +//======================================================================= +//function : getResultShell +//purpose : function for avoiding empty shall or shell containing one face. +//======================================================================= +static TopoDS_Shape getResultShell(const TopoDS_Shape& theNewShell) +{ + TopoDS_Shape rs; + Standard_Integer NbFacesShell =0; + TopoDS_Shape aF; + TopoDS_Iterator aI(theNewShell,Standard_False); + for(; aI.More(); aI.Next(),NbFacesShell++) + aF = aI.Value(); + if(NbFacesShell >1) + rs = theNewShell; + else if(!aF.IsNull()) + rs = aF; + return rs; +} + +//======================================================================= +//function : removeFaces +//purpose : function for removing faces from shell +//======================================================================= + +Standard_Boolean ShHealOper_RemoveFace::removeFaces(const TopoDS_Shell& theShell, + TopoDS_Shape& theNewShape) +{ + + Standard_Boolean aIsRemove = Standard_False; + //TopoDS_Shape aShape = myReShape->Apply(theShape); + //removing faces from shell. + TopoDS_Iterator aIterFaces(theShell,Standard_False); + for(; aIterFaces.More() && myMapFaces.Extent(); aIterFaces.Next()) { + + if(!myMapFaces.Contains(aIterFaces.Value())) + continue; + TopoDS_Face aFace = TopoDS::Face( aIterFaces.Value()); + removePCurve(aFace); + aIsRemove = Standard_True; + myContext->Remove(aFace); + myMapFaces.Remove(aFace); + } + if(aIsRemove) { + TopoDS_Shape aNewShape = myContext->Apply(theShell); + //avoiding empty shell and shell containing one face. + TopoDS_Shape aresShape = getResultShell(aNewShape); + if(aresShape.IsNull()) { + myContext->Remove(aNewShape); + theNewShape.Nullify(); + } + else if(aresShape.ShapeType() == TopAbs_FACE) { + myContext->Replace(aNewShape,aresShape); + theNewShape = aresShape; + } + else if(aresShape.ShapeType() == TopAbs_SHELL) { + //obtaining correct shell or compound with help class ShapeFix_Shell. + Standard_Boolean isManifShell = isManifold(theShell); + Handle(ShapeFix_Shell) aFixShell = new ShapeFix_Shell; + aFixShell->FixFaceOrientation(TopoDS::Shell(aresShape),Standard_True,!isManifShell); + TopoDS_Shape aFixShape = aFixShell->Shape(); + TopoDS_Shape areplShape; + isReplace(aFixShape,areplShape); + myContext->Replace(aNewShape,areplShape); + theNewShape = areplShape; + } + } + else theNewShape = theShell; + return aIsRemove; +} +//======================================================================= +//function : isReplace +//purpose : method to avoiding empty compounds and shells. +//======================================================================= + +Standard_Boolean ShHealOper_RemoveFace::isReplace(const TopoDS_Shape& theShape, + TopoDS_Shape& theNewShape) +{ + + Standard_Boolean isChange = Standard_False; + TopTools_SequenceOfShape aSeqShapes; + if(theShape.ShapeType() == TopAbs_COMPOUND || theShape.ShapeType() == TopAbs_COMPSOLID || + theShape.ShapeType() == TopAbs_SOLID) { + TopoDS_Iterator aEs(theShape); + for( ; aEs.More(); aEs.Next()) { + TopoDS_Shape aNewShell = aEs.Value(); + if(aNewShell.ShapeType()!= TopAbs_SHELL) { + aSeqShapes.Append(aNewShell); + continue; + } + TopoDS_Shape as = getResultShell(TopoDS::Shell(aNewShell)); + isChange = (as.IsNull() || (as.ShapeType() == TopAbs_FACE)); + if(!as.IsNull()) { + aSeqShapes.Append(as); + } + } + } + else if(theShape.ShapeType() == TopAbs_SHELL) { + TopoDS_Shape aSh = getResultShell(TopoDS::Shell(theShape)); + isChange = (aSh.IsNull() || (aSh.ShapeType() == TopAbs_FACE)); + if(!aSh.IsNull()) + aSeqShapes.Append(aSh); + } + else aSeqShapes.Append(theShape); + + if(aSeqShapes.IsEmpty()) + return Standard_True; + + if(isChange) { + if(aSeqShapes.Length() == 1) + theNewShape = aSeqShapes.Value(1); + else if (aSeqShapes.Length() > 1) { + TopoDS_Compound aComp1; + BRep_Builder aBB; + aBB.MakeCompound(aComp1); + Standard_Integer kk =1; + for( ; kk <= aSeqShapes.Length(); kk++) + aBB.Add(aComp1,aSeqShapes.Value(kk)); + if(aSeqShapes.Length()) + theNewShape = aComp1; + } + } + else + theNewShape = theShape; + return isChange; +} +//======================================================================= +//function : removePCurve +//purpose : +//======================================================================= + +void ShHealOper_RemoveFace::removePCurve(const TopoDS_Face& theFace) +{ + //removing pcurves belonging removed face. + Handle(Geom_Surface) aSurfDel = BRep_Tool::Surface(theFace); + for(TopExp_Explorer aExpEdges(theFace,TopAbs_EDGE); aExpEdges.More(); aExpEdges.Next()) { + const TopTools_ListOfShape& alFaces = myMapEdgesFace.FindFromKey(aExpEdges.Current()); + Standard_Boolean aIsDeleted = Standard_True; + + //pcurve will be removed if containing this edge faces have different surfaces. + TopTools_ListIteratorOfListOfShape aIterOtherFace(alFaces); + for(; aIterOtherFace.More() && aIsDeleted ; aIterOtherFace.Next()) { + if(aIterOtherFace.Value().IsSame(theFace)) + continue; + TopoDS_Face aFaceOther = TopoDS::Face(aIterOtherFace.Value()); + Handle(Geom_Surface) aSurf = BRep_Tool::Surface( aFaceOther); + aIsDeleted = (aSurf != aSurfDel); + } + + TopoDS_Edge aEdge = TopoDS::Edge(myContext->Apply(aExpEdges.Current())); + ShapeBuild_Edge aSbe; + TopoDS_Edge aNewEdge = aSbe.Copy(aEdge,Standard_False); + if(aIsDeleted) { + aSbe.RemovePCurve(aNewEdge,aSurfDel); + myContext->Replace(aEdge,aNewEdge); + + } + + } +} + diff --git a/src/ShHealOper/ShHealOper_RemoveFace.hxx b/src/ShHealOper/ShHealOper_RemoveFace.hxx new file mode 100644 index 000000000..22b2923e8 --- /dev/null +++ b/src/ShHealOper/ShHealOper_RemoveFace.hxx @@ -0,0 +1,86 @@ +// File: ShHealOper_RemoveFace.hxx +// Created: 15.04.04 18:10:16 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + + +#ifndef ShHealOper_RemoveFace_HeaderFile +#define ShHealOper_RemoveFace_HeaderFile + +#include +#include +#include +#include +#include +#include +#include +#include +#include +/// Class ShHealOper_RemoveFace +//Class intended to removing faces from shape. + +class ShHealOper_RemoveFace : public ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + + Standard_EXPORT ShHealOper_RemoveFace (); + //Empty constructor. + + Standard_EXPORT ShHealOper_RemoveFace (const TopoDS_Shape& theShape); + // Constructor initialized by shape from which faces will be removed. + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + Standard_EXPORT Standard_Boolean Perform(); + //Removes all faces from specified shape. + + Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theRemovedFaces); + //Removes faces specified in the sequence of faces from specified shape. + + + private: + + Standard_Boolean removeFaces(const TopoDS_Shape& theShape,TopoDS_Shape& theNewShape); + Standard_Boolean removeFaces(const TopoDS_Solid& theShape,TopoDS_Shape& theNewShape); + Standard_Boolean removeFaces(const TopoDS_Shell& theShell,TopoDS_Shape& theNewShape); + Standard_Boolean isReplace(const TopoDS_Shape& theOldShape,TopoDS_Shape& theNewShape); + //Methods for removing faces from sub-shapes. + + void removePCurve(const TopoDS_Face& theFace); + //method for removing pcurves belonging to face + + Standard_Boolean isManifold(const TopoDS_Shell& aShell); + //denenes manifold shell. + private: + // ---------- PRIVATE FIELDS ---------- + + TopTools_MapOfShape myMapFaces; + TopTools_IndexedDataMapOfShapeListOfShape myMapEdgesFace; + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_RemoveFace) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_RemoveFace, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_RemoveInternalWires.cxx b/src/ShHealOper/ShHealOper_RemoveInternalWires.cxx new file mode 100644 index 000000000..9fbb71c5f --- /dev/null +++ b/src/ShHealOper/ShHealOper_RemoveInternalWires.cxx @@ -0,0 +1,154 @@ +// File: ShHealOper_RemoveInternalWires.cxx +// Created: 26.04.04 14:46:45 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//======================================================================= +//function : ShHealOper_RemoveInternalWires() +//purpose : Constructor +//======================================================================= + +ShHealOper_RemoveInternalWires::ShHealOper_RemoveInternalWires ( const TopoDS_Shape& theShape ) +{ + Init(theShape); +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_RemoveInternalWires::Init(const TopoDS_Shape& theShape) +{ + ShHealOper_Tool::Init(theShape); + myMapWiresFace.Clear(); + TopExp::MapShapesAndAncestors(theShape,TopAbs_WIRE,TopAbs_FACE,myMapWiresFace); +} +//======================================================================= +//function : Remove +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_RemoveInternalWires::Remove() +{ + TopExp_Explorer aexpFaces(myInitShape,TopAbs_FACE); + //removes internal wires from all faces in the shape + Standard_Boolean isDone = Standard_False; + for( ; aexpFaces.More(); aexpFaces.Next()) + isDone = removeWire(TopoDS::Face(aexpFaces.Current()),TopoDS_Wire()) || isDone; + if(isDone ) { + TopoDS_Shape aNewShape = myContext->Apply(myInitShape); + //fix not-connected shell and solids obtained after removing wires + fixShape(aNewShape); + } + myDone = isDone; + return myDone; +} +//======================================================================= +//function : Remove +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_RemoveInternalWires::Remove(const TopTools_SequenceOfShape& theRemovedShapes) +{ + myDone = Standard_False; + + Standard_Integer i =1; + for( ; i <= theRemovedShapes.Length(); i++) { + //removes internal wires from specified faces. + if(theRemovedShapes.Value(i).ShapeType() == TopAbs_FACE) + myDone = (removeWire(TopoDS::Face(theRemovedShapes.Value(i)),TopoDS_Wire()) || myDone) ; + else if(theRemovedShapes.Value(i).ShapeType() == TopAbs_WIRE) + { + //removes specified internal wires. + TopoDS_Wire awire = TopoDS::Wire(theRemovedShapes.Value(i)); + if(myMapWiresFace.Contains(awire)) { + const TopTools_ListOfShape& aLfaces = myMapWiresFace.FindFromKey(awire); + TopTools_ListIteratorOfListOfShape liter(aLfaces); + for( ; liter.More(); liter.Next()) + myDone = (removeWire(TopoDS::Face(liter.Value()),awire) || myDone); + } + } + } + if(myDone ) { + TopoDS_Shape aNewShape = myContext->Apply(myInitShape); + + //fix not-connected shell and solids obtained after removing wires + fixShape(aNewShape); + + } + return myDone; +} +//======================================================================= +//function : removeWire +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_RemoveInternalWires::removeWire(const TopoDS_Face& theFace, + const TopoDS_Wire& theWire) +{ + TopoDS_Wire aBoundWire = ShapeAnalysis::OuterWire(theFace); + if(!theWire.IsNull() && aBoundWire.IsSame(theWire)) { + myErrorStatus = ShHealOper_InvalidParameters; + return Standard_False; + } + + Standard_Boolean isremove = Standard_False; + if(!theWire.IsNull()) { + myContext->Remove(theWire); + isremove= Standard_True; + } + else { + TopExp_Explorer aExpW(theFace,TopAbs_WIRE); + for( ; aExpW.More(); aExpW.Next()) { + if(!aBoundWire.IsSame(aExpW.Current())) { + myContext->Remove(aExpW.Current()); + isremove= Standard_True; + } + } + } + return isremove; +} +//======================================================================= +//function : fixShape +//purpose : +//======================================================================= + +void ShHealOper_RemoveInternalWires::fixShape(const TopoDS_Shape& theShape ) +{ + Handle(ShapeFix_Shape) aFixTool = new ShapeFix_Shape(theShape); + aFixTool->SetContext(myContext); + aFixTool->FixShellTool()->FixFaceMode() = Standard_False; + aFixTool->FixFreeFaceMode() = Standard_False; + aFixTool->FixFreeWireMode() = Standard_False; + aFixTool->FixSameParameterMode() = Standard_False; + aFixTool->Perform(); + myResultShape = aFixTool->Shape(); +} diff --git a/src/ShHealOper/ShHealOper_RemoveInternalWires.hxx b/src/ShHealOper/ShHealOper_RemoveInternalWires.hxx new file mode 100644 index 000000000..fec59375c --- /dev/null +++ b/src/ShHealOper/ShHealOper_RemoveInternalWires.hxx @@ -0,0 +1,83 @@ +// File: ShHealOper_RemoveInternalWires.hxx +// Created: 26.04.04 11:22:26 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_RemoveInternalWires_HeaderFile +#define ShHealOper_RemoveInternalWires_HeaderFile + +#include +#include +#include +#include +#include +#include +#include + +/// Class ShHealOper_RemoveInternalWires +// Intended for removing internal wires from faces. + +class ShHealOper_RemoveInternalWires : public ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + + /// Empty constructor + Standard_EXPORT ShHealOper_RemoveInternalWires () {} + + /// Copy constructor + Standard_EXPORT ShHealOper_RemoveInternalWires (const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + Standard_EXPORT Standard_Boolean Remove(); + //Removes all internal wires from all faces of the shape + + Standard_EXPORT Standard_Boolean Remove(const TopTools_SequenceOfShape& theRemovedShapes); + //Removes wires specified in the sequence of shapes or internal wires + //belonging faces specified in the sequence of shape. + + + private: + // ---------- PRIVATE METHODS ---------- + + Standard_Boolean removeWire(const TopoDS_Face& theFace, + const TopoDS_Wire& theWire); + void fixShape(const TopoDS_Shape& theShape ); + + private: + // ---------- PRIVATE FIELDS ---------- + TopTools_IndexedDataMapOfShapeListOfShape myMapWiresFace; + + + + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_RemoveInternalWires) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_RemoveInternalWires, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_Sewing.cxx b/src/ShHealOper/ShHealOper_Sewing.cxx new file mode 100644 index 000000000..b0f8e4206 --- /dev/null +++ b/src/ShHealOper/ShHealOper_Sewing.cxx @@ -0,0 +1,282 @@ +// File: ShHealOper_Sewing.cxx +// Created: 29.04.04 15:07:10 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//======================================================================= +//function : ShHealOper_Sewing() +//purpose : Constructor +//======================================================================= + + +ShHealOper_Sewing::ShHealOper_Sewing (const TopoDS_Shape& theShape, + const Standard_Real theTolerance) +{ + Init(theShape); + myTolerance = theTolerance; +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_Sewing::Init(const TopoDS_Shape& theShape) +{ + ShHealOper_Tool::Init(theShape); + myTolerance = Precision::Confusion(); + myEdgesMode = Standard_False; + myFacesMode = Standard_True; + myNonManifoldMode = Standard_False; + myHistoryLevel = TopAbs_FACE; +} +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::Perform() +{ + TopTools_SequenceOfShape theSeqShapes; + return sewing(theSeqShapes); +} +//======================================================================= +//function : Perform +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::Perform(const TopTools_SequenceOfShape& theSeqShapes) +{ + return sewing(theSeqShapes); +} + +//======================================================================= +//function : sewing +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::sewing(const TopTools_SequenceOfShape& theSeqShapes) +{ + myDone = Standard_False; + myErrorStatus = ShHealOper_NotError; + if(myInitShape.IsNull()) { + myErrorStatus = ShHealOper_InvalidParameters; + return myDone; + } + //sewing shape + Handle(BRepAlgo_Sewing) aSewing = new BRepAlgo_Sewing; + aSewing->Load(myInitShape); + aSewing->SetTolerance(myTolerance); + aSewing->SetFaceMode(myFacesMode); + aSewing->SetFloatingEdgesMode(myEdgesMode); + aSewing->SetNonManifoldMode(myNonManifoldMode); + Standard_Integer j =1; + for( ; j <= theSeqShapes.Length();j++) + aSewing->Add(theSeqShapes.Value(j)); + + aSewing->Perform(); + const TopoDS_Shape aSewShape = aSewing->SewedShape(); + if(aSewShape.IsNull()) { + myErrorStatus = ShHealOper_ErrorExecution; + return myDone; + } + if(aSewShape.IsSame(myInitShape)) + return myDone; + + //analysis either sewing was made by changing number of shells + myDone = isSewed(aSewShape); + + //keep modification of the subshapes in the Context. + TopExp_Explorer aExp(myInitShape,TopAbs_FACE); + for( ; aExp.More(); aExp.Next()) + myDone = (getModifications( aExp.Current(),aSewing) || myDone); + + TopoDS_Shape aTempShape = myContext->Apply(aSewShape); + //obtained shells with fixed orientation for manifold and nonmanifold shells + if(myFacesMode) + myDone = getShells(aTempShape) || myDone; + + //obtained manifold wires if sewing edges was performed. + if(myEdgesMode) + myDone = getWires(aTempShape) || myDone; + + if(myDone) + myResultShape = myContext->Apply(aTempShape); + + return myDone; +} +//======================================================================= +//function : getShells +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::getShells(const TopoDS_Shape& theSewShape) const +{ + Standard_Boolean isDone = Standard_False; + TopoDS_Shape aTmpShape = theSewShape; + if(myNonManifoldMode) { + TopoDS_Shell tempShell; + BRep_Builder aB; + aB.MakeShell(tempShell); + + for(TopExp_Explorer aExpf(theSewShape,TopAbs_FACE);aExpf.More(); aExpf.Next()) + aB.Add(tempShell,aExpf.Current()); + aTmpShape = tempShell; + myContext->Replace(theSewShape,aTmpShape); + } + + Handle(ShapeFix_Shell) asfs = new ShapeFix_Shell; + asfs->SetContext(myContext); + TopExp_Explorer aexpShell(aTmpShape,TopAbs_SHELL); + for ( ; aexpShell.More(); aexpShell.Next()) + isDone = (asfs->FixFaceOrientation(TopoDS::Shell(aexpShell.Current()), + Standard_True,myNonManifoldMode) || isDone); + + return isDone; +} +//======================================================================= +//function : getWires +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::getWires(const TopoDS_Shape& theSewShape) const +{ + if(theSewShape.ShapeType() != TopAbs_COMPOUND) + return Standard_False; + + Handle(TopTools_HSequenceOfShape) aSeqEdges = new TopTools_HSequenceOfShape; + TopExp_Explorer aexpEdges(theSewShape,TopAbs_EDGE,TopAbs_WIRE); + for ( ; aexpEdges.More(); aexpEdges.Next()) { + aSeqEdges->Append(aexpEdges.Current()); + } + if(aSeqEdges->Length() <2) + return Standard_False; + //get manifold wires from sewed edges. + Standard_Real aTol = 0.; + Standard_Boolean aShared = Standard_True; + Handle(TopTools_HSequenceOfShape) aTmpWires = new TopTools_HSequenceOfShape; + ShapeAnalysis_FreeBounds::ConnectEdgesToWires(aSeqEdges, aTol, aShared, aTmpWires); + + TopTools_MapOfShape aMapEdges; + Standard_Integer i =1; + for( ; i <= aSeqEdges->Length(); i++) + aMapEdges.Add(aSeqEdges->Value(i)); + + //remove free edges from result shape. + TopoDS_Compound aNewComp; + deleteFreeEdges(theSewShape,aMapEdges,aNewComp); + + //add new wires in the result shape. + BRep_Builder aB; + for( i =1; i <= aTmpWires->Length(); i++) { + TopoDS_Iterator aite(aTmpWires->Value(i)); + Standard_Integer nbe =0; + TopoDS_Shape aE; + for( ; aite.More() && nbe < 3; aite.Next(),nbe++) + aE = aite.Value(); + if(!nbe) + continue; + else if(nbe ==1) + aB.Add(aNewComp,aE); + else + aB.Add(aNewComp,aTmpWires->Value(i)); + } + + myContext->Replace(theSewShape,aNewComp); + return Standard_True; +} +//======================================================================= +//function : getHistory +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::getModifications(const TopoDS_Shape& theShape, + const Handle(BRepAlgo_Sewing)& theSewing) const +{ + if((Standard_Integer)theShape.ShapeType() > (Standard_Integer)myHistoryLevel) + return Standard_False; + + Standard_Boolean isDone = theSewing->IsModifiedSubShape(theShape); + if(isDone) { + TopoDS_Shape aNewShape = theSewing->ModifiedSubShape(theShape); + myContext->Replace(theShape,aNewShape); + } + TopoDS_Iterator aIt(theShape); + for( ; aIt.More(); aIt.Next()) { + isDone = (getModifications( aIt.Value(),theSewing) || isDone); + } + return isDone; + +} +//======================================================================= +//function : isSewed +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_Sewing::isSewed(const TopoDS_Shape& theShape) const +{ + Standard_Integer nbNewShells =0; + Standard_Integer nbOldShells =0; + TopExp_Explorer aExpShells(theShape,TopAbs_SHELL); + for( ; aExpShells.More(); aExpShells.Next()) + nbNewShells++; + for( aExpShells.Init(myInitShape,TopAbs_SHELL); aExpShells.More(); aExpShells.Next()) + nbOldShells++; + return (nbNewShells != nbOldShells); +} +//======================================================================= +//function : deleteFreeEdges +//purpose : +//======================================================================= + +void ShHealOper_Sewing::deleteFreeEdges(const TopoDS_Shape& theSewShape, + TopTools_MapOfShape& theMapEdges, + TopoDS_Compound& theNewComp) const +{ + + BRep_Builder aB; + aB.MakeCompound(theNewComp); + TopoDS_Iterator aIt(theSewShape); + + for( ; aIt.More(); aIt.Next()) { + if((aIt.Value().ShapeType() == TopAbs_EDGE ) && theMapEdges.Contains(aIt.Value())) + continue; + else if(aIt.Value().ShapeType() == TopAbs_COMPOUND) { + TopoDS_Compound aC; + deleteFreeEdges(aIt.Value(),theMapEdges,aC); + aB.Add(theNewComp,aC); + } + else + aB.Add(theNewComp,aIt.Value()); + } +} diff --git a/src/ShHealOper/ShHealOper_Sewing.hxx b/src/ShHealOper/ShHealOper_Sewing.hxx new file mode 100644 index 000000000..e7244b227 --- /dev/null +++ b/src/ShHealOper/ShHealOper_Sewing.hxx @@ -0,0 +1,152 @@ +// File: ShHealOper_Sewing.hxx +// Created: 29.04.04 13:29:10 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_Sewing_HeaderFile +#define ShHealOper_Sewing_HeaderFile + +#include +#include +#include +#include +#include +#include +#include +#include + +/// Class ShHealOper_Sewing +//Intended for sewing of shapes. + +class ShHealOper_Sewing : public ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + + + Standard_EXPORT ShHealOper_Sewing () : ShHealOper_Tool() {} + // Empty constructor + + Standard_EXPORT ShHealOper_Sewing (const TopoDS_Shape& theShape, + const Standard_Real theTolerance); + //Constructor for initalization by shape and tolerance. + + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + Standard_EXPORT Standard_Boolean Perform(); + //Performs sewing specified whole shape. + + Standard_EXPORT Standard_Boolean Perform(const TopTools_SequenceOfShape& theSeqShapes); + //Performs local sewing specified sub-shapes from whole shape. + + inline void SetFacesMode(const Standard_Boolean theFacesMode ) + { + myFacesMode = theFacesMode; + } + //Set mode for sewing faces.(by default true) + + inline Standard_Boolean GetFacesMode( ) + { + return myFacesMode; + } + //Get mode for sewing of faces. + + inline void SetFloatingEdgesMode(const Standard_Boolean theEdgesMode ) + { + myEdgesMode = theEdgesMode; + } + //Set mode for sewing floating edges.(by default false) + + inline Standard_Boolean GetFloatingEdgesMode( ) + { + return myEdgesMode; + } + //Get mode for sewing of floating edges. + + inline void SetNonManifoldMode(const Standard_Boolean theNonManifoldMode ) + { + myNonManifoldMode = theNonManifoldMode; + } + //Set NonManifoldMode mode for sewing (by default false) + + inline Standard_Boolean GetNonManifoldMode( ) + { + return myNonManifoldMode; + } + //Get NonManifoldMode mode for sewing. + + inline void SetTolerance(const Standard_Real theToler) + { + myTolerance = theToler; + } + //set tolerance for sewing. + + inline Standard_Real GetTolerance() + { + return myTolerance; + } + //get tolerance set for sewing. + + inline void SetHistoryLevel(TopAbs_ShapeEnum theHistLevel) + { + myHistoryLevel =theHistLevel; + } + //set shape level (default TopAbs_FACE) for keeping modifications of the shapes. + + inline TopAbs_ShapeEnum GetHistoryLevel() + { + return myHistoryLevel; + } + //get specified shape level for keeping history. + + private: + // ---------- PRIVATE METHODS ---------- + + Standard_Boolean sewing(const TopTools_SequenceOfShape& theSeqShapes); + Standard_Boolean getShells(const TopoDS_Shape& theSewShape) const; + Standard_Boolean getWires(const TopoDS_Shape& theSewShape) const; + Standard_Boolean getModifications(const TopoDS_Shape& theShape, + const Handle(BRepAlgo_Sewing)& theSewing) const; + + Standard_Boolean isSewed(const TopoDS_Shape& theShape) const; + + void deleteFreeEdges(const TopoDS_Shape& theSewShape, + TopTools_MapOfShape& theMapEdges, + TopoDS_Compound& theNewComp) const; + private: + // ---------- PRIVATE FIELDS ---------- + + Standard_Boolean myNonManifoldMode; + Standard_Boolean myEdgesMode; + Standard_Boolean myFacesMode; + Standard_Real myTolerance; + TopAbs_ShapeEnum myHistoryLevel; + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_Sewing) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_Sewing, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_ShapeProcess.cxx b/src/ShHealOper/ShHealOper_ShapeProcess.cxx new file mode 100644 index 000000000..56503fbb4 --- /dev/null +++ b/src/ShHealOper/ShHealOper_ShapeProcess.cxx @@ -0,0 +1,161 @@ +// File: ShHealOper_ShapeProcess.cxx +// Created: 14.04.04 10:58:04 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +//======================================================================= +//function : ShHealOper_ShapeProcess() +//purpose : Constructor +//======================================================================= + +ShHealOper_ShapeProcess::ShHealOper_ShapeProcess ( ) : + myOperations(TCollection_AsciiString("ShHealing").ToCString(), + TCollection_AsciiString("ShapeProcess").ToCString()) +{ + //myResource = new Resource_Manager("ShHealing"); + myPrefix = "ShapeProcess"; + mySaveHistoryMode = Standard_False; + myLevel = TopAbs_FACE; + myDone = Standard_False; +} + +//======================================================================= +//function : ShHealOper_ShapeProcess +//purpose : +//======================================================================= + +ShHealOper_ShapeProcess::ShHealOper_ShapeProcess (const TCollection_AsciiString& theNameResource, + const TCollection_AsciiString& thePrefix ) : + myOperations(theNameResource.ToCString(),thePrefix.ToCString()) +{ + //myResource = new Resource_Manager(theNameResource); + myPrefix = thePrefix; + mySaveHistoryMode = Standard_False; + myLevel = TopAbs_FACE; + myDone = Standard_False; +} + +//======================================================================= +//function : Perform +//purpose : +//======================================================================= +void ShHealOper_ShapeProcess::Perform(const TopoDS_Shape& theOldShape, + TopoDS_Shape& theNewShape) +{ + + myMapModifications.Clear(); + //ShapeProcessAPI_ApplySequence aOperations(myResource,myPrefix.ToCString()); + //myDone = Standard_False; + myOperations.ClearMap(); + + theNewShape = myOperations.PrepareShape(theOldShape,mySaveHistoryMode,myLevel); + if(mySaveHistoryMode) + myMapModifications = myOperations.Map(); + myDone = !theOldShape.IsSame(theNewShape); +} +//======================================================================= +//function : SetOperators +//purpose : +//======================================================================= + +void ShHealOper_ShapeProcess::SetOperators(const TColStd_SequenceOfAsciiString& theSeqOperators) +{ + + TCollection_AsciiString anameParam(myPrefix); + anameParam += "."; + anameParam += "exec.op"; + TCollection_AsciiString aseq; + Standard_Integer i =1; + for( ; i <= theSeqOperators.Length(); i++) { + aseq += theSeqOperators.Value(i); + aseq += " "; + } + + myOperations.Context()->ResourceManager()->SetResource(anameParam.ToCString(),aseq.ToCString()); +} +//======================================================================= +//function : SetParameter +//purpose : +//======================================================================= + +void ShHealOper_ShapeProcess::SetParameter(const TCollection_AsciiString& theNameParam, + const TCollection_AsciiString& theVal) +{ + TCollection_AsciiString anameParam(myPrefix); + anameParam += "."; + anameParam+= theNameParam; + if(theVal.IsIntegerValue()) + myOperations.Context()->ResourceManager()-> + SetResource(anameParam.ToCString(),theVal.IntegerValue()); + else if(theVal.IsRealValue()) + myOperations.Context()->ResourceManager()-> + SetResource(anameParam.ToCString(),theVal.RealValue()); + else + myOperations.Context()->ResourceManager()-> + SetResource(anameParam.ToCString(),theVal.ToCString()); + +} +//======================================================================= +//function : GetOperators +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_ShapeProcess::GetOperators(TColStd_SequenceOfAsciiString& theSeqOperators) +{ + TCollection_AsciiString nameSeq(myPrefix); + nameSeq +=".exec.op"; + if(!myOperations.Context()->ResourceManager()->Find(nameSeq.ToCString())) + return Standard_False; + + TCollection_AsciiString seqoper = myOperations.Context()->ResourceManager()->Value(nameSeq.ToCString()); + Standard_Integer i; + for ( i=1; ; i++ ) { + TCollection_AsciiString anOper = seqoper.Token ( " \t,;", i ); + if ( anOper.Length() <=0 ) break; + theSeqOperators.Append(anOper); + } + return (theSeqOperators.Length()); +} +//======================================================================= +//function : GetParameter +//purpose : +//======================================================================= + +Standard_Boolean ShHealOper_ShapeProcess::GetParameter(const TCollection_AsciiString& theNameParam, + TCollection_AsciiString& theVal) +{ + TCollection_AsciiString namePar(myPrefix); + namePar += "."; + namePar += theNameParam; + if(!myOperations.Context()->ResourceManager()->Find(namePar.ToCString())) + return Standard_False; + + theVal = myOperations.Context()->ResourceManager()->Value(namePar.ToCString()); + return Standard_True; +} diff --git a/src/ShHealOper/ShHealOper_ShapeProcess.hxx b/src/ShHealOper/ShHealOper_ShapeProcess.hxx new file mode 100644 index 000000000..62f2c3abb --- /dev/null +++ b/src/ShHealOper/ShHealOper_ShapeProcess.hxx @@ -0,0 +1,131 @@ +// File: ShHealOper_ShapeProcess.hxx +// Created: 13.04.04 11:45:20 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_ShapeProcess_HeaderFile +#define ShHealOper_ShapeProcess_HeaderFile + +#include +#include +#include +#include +#include +#include +#include + +/// Class ShHealOper_ShapeProcess +//Class for performing Shape healing operations on the shape. + +class ShHealOper_ShapeProcess +{ + public: + // ---------- PUBLIC METHODS ---------- + + /// Empty constructor + Standard_EXPORT ShHealOper_ShapeProcess(); + //Constuctor initializes by defaults parameters + // (name of resource file - ShHealing, prefix - ShapeProcess, + // SaveHistory = Standard_False, level = TopAbs_FACE) + + /// Copy constructor + Standard_EXPORT ShHealOper_ShapeProcess + (const TCollection_AsciiString& theNameResource, + const TCollection_AsciiString& thePrefix = "ShapeProcess"); + //Constuctor initializes by specified name of resource file and prefix + + Standard_EXPORT void Perform(const TopoDS_Shape& theOldShape, + TopoDS_Shape& theNewShape); + //Perform modifications of specified shape. + + Standard_EXPORT void SetOperators(const TColStd_SequenceOfAsciiString& theSeqOperators); + //Set sequence of operatotrs different than sequence written in the resourse file. + + Standard_EXPORT Standard_Boolean GetOperators(TColStd_SequenceOfAsciiString& theSeqOperators); + //Get sequence of operators. + + Standard_EXPORT void SetParameter(const TCollection_AsciiString& theNameParam, + const TCollection_AsciiString& theVal); + //Set value of specified parameter different than value written in the resourse file. + + Standard_EXPORT Standard_Boolean GetParameter(const TCollection_AsciiString& theNameParam, + TCollection_AsciiString& theVal); + //Get value of parameter by it's name. + + inline void SetSaveHistoryMode(const Standard_Boolean theSaveHistory, + TopAbs_ShapeEnum theuntil = TopAbs_FACE) + { + mySaveHistoryMode = theSaveHistory; + myLevel = theuntil; + } + //Set SaveHistoryMode nnd level of the shapes until history will be saved to the + //specified values. + + + inline Standard_Boolean GetSaveHistoryMode() + { + return mySaveHistoryMode; + } + //Returns SaveHistoryMode. + + inline Standard_Boolean GetModifiedShape(const TopoDS_Shape& theOldShape, + TopoDS_Shape& theNewShape) + { + Standard_Boolean isModif = (!myMapModifications.IsEmpty() && + myMapModifications.IsBound(theOldShape)); + if(isModif) + theNewShape = myMapModifications.Find(theOldShape); + else + theNewShape = theOldShape; + return isModif; + } + //Get modified shape for any specified shape + + inline Standard_Boolean isDone() + { + return myDone; + } + //returns status of operation. + protected: + // ---------- PROTECTED METHODS ---------- + + + + private: + // ---------- PRIVATE FIELDS ---------- + + //Handle(Resource_Manager) myResource; + ShapeProcessAPI_ApplySequence myOperations; + TCollection_AsciiString myPrefix; + TopTools_DataMapOfShapeShape myMapModifications; + Standard_Boolean mySaveHistoryMode; + TopAbs_ShapeEnum myLevel; + Standard_Boolean myDone; + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_ShapeProcess) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_ShapeProcess, ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_SpiltCurve2d.hxx b/src/ShHealOper/ShHealOper_SpiltCurve2d.hxx new file mode 100644 index 000000000..e7cd704a1 --- /dev/null +++ b/src/ShHealOper/ShHealOper_SpiltCurve2d.hxx @@ -0,0 +1,66 @@ +// File: ShHealOper_SplitCurve2d.hxx +// Created: 05.05.04 12:56:01 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_SplitCurve2d_HeaderFile +#define ShHealOper_SplitCurve2d_HeaderFile + +#include +#include + +/// Class ShHealOper_SplitCurve2d +//Auxiliary class for class ShHealOper_EdgeDivide + +class ShHealOper_SplitCurve2d : public ShapeUpgrade_SplitCurve2d +{ + public: + // ---------- PUBLIC METHODS ---------- + + + Standard_EXPORT ShHealOper_SplitCurve2d () : ShapeUpgrade_SplitCurve2d {} + // Empty constructor + + Standard_EXPORT virtual void Compute(); + + inline void SetValues(const Handle(TColStd_HSequenceOfReal)& theValues) + { + myValues = theValues; + } + + + + private: + // ---------- PRIVATE FIELDS ---------- + + Handle(TColStd_HSequenceOfReal) myValues; + + + public: +// Declaration of CASCADE RTTI +DEFINE_STANDARD_RTTI (ShHealOper_SplitCurve2d) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +DEFINE_STANDARD_HANDLE (ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_SplitCurve2d.cxx b/src/ShHealOper/ShHealOper_SplitCurve2d.cxx new file mode 100644 index 000000000..2cc261fa2 --- /dev/null +++ b/src/ShHealOper/ShHealOper_SplitCurve2d.cxx @@ -0,0 +1,47 @@ +// File: ShHealOper_SplitCurve2d.cxx +// Created: 05.05.04 13:03:10 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#include +#include +#include + +IMPLEMENT_STANDARD_HANDLE (ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d) +IMPLEMENT_STANDARD_RTTIEXT(ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d) + +//======================================================================= +//function : Compute +//purpose : +//======================================================================= + +void ShHealOper_SplitCurve2d::Compute() +{ + if(myValues.IsNull()) + myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL); + else { + SetSplitValues(myValues); + myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1); + } +} + + + diff --git a/src/ShHealOper/ShHealOper_SplitCurve2d.hxx b/src/ShHealOper/ShHealOper_SplitCurve2d.hxx new file mode 100644 index 000000000..ca1f7aa35 --- /dev/null +++ b/src/ShHealOper/ShHealOper_SplitCurve2d.hxx @@ -0,0 +1,66 @@ +// File: ShHealOper_SplitCurve2d.hxx +// Created: 05.05.04 12:56:01 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_SplitCurve2d_HeaderFile +#define ShHealOper_SplitCurve2d_HeaderFile + +#include +#include +#include +/// Class ShHealOper_SplitCurve2d +//Auxiliary class for class ShHealOper_EdgeDivide + +class ShHealOper_SplitCurve2d : public ShapeUpgrade_SplitCurve2d +{ + public: + // ---------- PUBLIC METHODS ---------- + + + Standard_EXPORT ShHealOper_SplitCurve2d () : ShapeUpgrade_SplitCurve2d() {} + // Empty constructor + + Standard_EXPORT virtual void Compute(); + + inline void SetValues(const Handle(TColStd_HSequenceOfReal)& theValues) + { + myValues = theValues; + } + + + + private: + // ---------- PRIVATE FIELDS ---------- + + Handle(TColStd_HSequenceOfReal) myValues; + + + public: +// Declaration of CASCADE RTTI +DEFINE_STANDARD_RTTI (ShHealOper_SplitCurve2d) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +DEFINE_STANDARD_HANDLE (ShHealOper_SplitCurve2d,ShapeUpgrade_SplitCurve2d ) + + +#endif diff --git a/src/ShHealOper/ShHealOper_SplitCurve3d.cxx b/src/ShHealOper/ShHealOper_SplitCurve3d.cxx new file mode 100644 index 000000000..67405daea --- /dev/null +++ b/src/ShHealOper/ShHealOper_SplitCurve3d.cxx @@ -0,0 +1,46 @@ +// File: ShHealOper_SplitCurve3d.cxx +// Created: 05.05.04 12:48:36 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#include +#include +#include + +IMPLEMENT_STANDARD_HANDLE (ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d) +IMPLEMENT_STANDARD_RTTIEXT(ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d) + +//======================================================================= +//function : Compute +//purpose : +//======================================================================= + +void ShHealOper_SplitCurve3d::Compute() +{ + if(myValues.IsNull()) + myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL); + else { + SetSplitValues(myValues); + myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE1); + } +} + + diff --git a/src/ShHealOper/ShHealOper_SplitCurve3d.hxx b/src/ShHealOper/ShHealOper_SplitCurve3d.hxx new file mode 100644 index 000000000..97feb74f8 --- /dev/null +++ b/src/ShHealOper/ShHealOper_SplitCurve3d.hxx @@ -0,0 +1,66 @@ +// File: ShHealOper_SplitCurve3d.hxx +// Created: 05.05.04 12:28:13 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_SplitCurve3d_HeaderFile +#define ShHealOper_SplitCurve3d_HeaderFile + +#include +#include +#include + +/// Class ShHealOper_SplitCurve3d +//Auxiliary class for class ShHealOper_EdgeDivide + +class ShHealOper_SplitCurve3d : public ShapeUpgrade_SplitCurve3d +{ + public: + // ---------- PUBLIC METHODS ---------- + + + Standard_EXPORT ShHealOper_SplitCurve3d () : ShapeUpgrade_SplitCurve3d() {} + // Empty constructor + + Standard_EXPORT virtual void Compute(); + + inline void SetValues(const Handle(TColStd_HSequenceOfReal)& theValues) + { + myValues = theValues; + } + + + private: + // ---------- PRIVATE FIELDS ---------- + Handle(TColStd_HSequenceOfReal) myValues; + + + + public: +// Declaration of CASCADE RTTI +DEFINE_STANDARD_RTTI (ShHealOper_SplitCurve3d) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +DEFINE_STANDARD_HANDLE (ShHealOper_SplitCurve3d,ShapeUpgrade_SplitCurve3d) + + +#endif diff --git a/src/ShHealOper/ShHealOper_Tool.cxx b/src/ShHealOper/ShHealOper_Tool.cxx new file mode 100644 index 000000000..dd3164d73 --- /dev/null +++ b/src/ShHealOper/ShHealOper_Tool.cxx @@ -0,0 +1,60 @@ +// File: ShHealOper_Tool.cxx +// Created: 26.04.04 12:11:33 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + + +#include + +//======================================================================= +//function : ShHealOper_Tool() +//purpose : Constructor +//======================================================================= + +ShHealOper_Tool::ShHealOper_Tool ( ) +{ + myContext = new ShapeBuild_ReShape; + myDone = Standard_False; + myErrorStatus =ShHealOper_NotError; +} +//======================================================================= +//function : ShHealOper_Tool +//purpose : +//======================================================================= + +ShHealOper_Tool::ShHealOper_Tool ( const TopoDS_Shape& theShape ) +{ + + myContext = new ShapeBuild_ReShape; + Init(theShape); +} +//======================================================================= +//function : Init +//purpose : +//======================================================================= + +void ShHealOper_Tool::Init(const TopoDS_Shape& theShape) +{ + myDone = Standard_False; + myErrorStatus =ShHealOper_NotError; + myInitShape = theShape; + myContext->Apply(myInitShape); +} diff --git a/src/ShHealOper/ShHealOper_Tool.hxx b/src/ShHealOper/ShHealOper_Tool.hxx new file mode 100644 index 000000000..7ec0febed --- /dev/null +++ b/src/ShHealOper/ShHealOper_Tool.hxx @@ -0,0 +1,108 @@ +// File: ShHealOper_Tool.hxx +// Created: 26.04.04 11:36:04 +// Author: Galina KULIKOVA +// < MODULE = KERNEL> : +// Copyright (C) 2003 CEA +// +// 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 +// + + +#ifndef ShHealOper_Tool_HeaderFile +#define ShHealOper_Tool_HeaderFile + +#include +#include +#include + +/// Class ShHealOper_Tool +// +//enumeration for definition of the status of the error if operation failed +enum ShHealOper_Error { + ShHealOper_NotError, + ShHealOper_InvalidParameters, + ShHealOper_ErrorExecution +}; + +class ShHealOper_Tool +{ + public: + // ---------- PUBLIC METHODS ---------- + + /// Empty constructor + Standard_EXPORT ShHealOper_Tool () ; + + Standard_EXPORT ShHealOper_Tool (const TopoDS_Shape& theShape); + // Constructor initialized by shape from which faces will be removed. + + Standard_EXPORT virtual void Init(const TopoDS_Shape& theShape); + //Method for initalization by whole shape. + + inline const TopoDS_Shape& GetResultShape() const + { + return myResultShape; + + } + //Returns result shape. + + inline Standard_Boolean GetModifiedShape(const TopoDS_Shape& theOldShape, + TopoDS_Shape& theNewShape) const + { + theNewShape = myContext->Apply(theOldShape); + return (!theNewShape.IsSame(theOldShape)); + } + //Returns modified shape obtained after operation from initial shape. + + inline Standard_Boolean IsDone() const + { + return myDone; + } + //Returns status of the operation. + + inline void SetContext(Handle(ShapeBuild_ReShape)& theContext) + { + myContext = theContext; + } + //Initialization by context keeping modification of sub-shapes. + + inline Handle(ShapeBuild_ReShape) Context() + { + return myContext; + } + //Returns context keeping modification of sub-shapes + + inline Standard_Integer GetErrorStatus() + { + return myErrorStatus; + } + protected: + // ---------- PROTECTED FIELDS ---------- + + Handle(ShapeBuild_ReShape) myContext; + TopoDS_Shape myInitShape; + TopoDS_Shape myResultShape; + Standard_Boolean myDone; + ShHealOper_Error myErrorStatus; + public: +// Declaration of CASCADE RTTI +//DEFINE_STANDARD_RTTI (ShHealOper_Tool) +}; + +// Definition of HANDLE object using Standard_DefineHandle.hxx +//DEFINE_STANDARD_HANDLE (ShHealOper_Tool, ) + + +#endif diff --git a/src/TransformationGUI/Makefile.in b/src/TransformationGUI/Makefile.in index bf544b577..c68291361 100644 --- a/src/TransformationGUI/Makefile.in +++ b/src/TransformationGUI/Makefile.in @@ -46,18 +46,21 @@ LIB_SRC = TransformationGUI.cxx \ TransformationGUI_TranslationDlg.cxx \ TransformationGUI_RotationDlg.cxx \ TransformationGUI_MirrorDlg.cxx \ - TransformationGUI_ScaleDlg.cxx + TransformationGUI_ScaleDlg.cxx \ + TransformationGUI_OffsetDlg.cxx \ + TransformationGUI_PositionDlg.cxx LIB_MOC = \ - TransformationGUI.h \ TransformationGUI_MultiTranslationDlg.h \ TransformationGUI_MultiRotationDlg.h \ TransformationGUI_TranslationDlg.h \ TransformationGUI_RotationDlg.h \ TransformationGUI_MirrorDlg.h \ - TransformationGUI_ScaleDlg.h + TransformationGUI_ScaleDlg.h \ + TransformationGUI_OffsetDlg.h \ + TransformationGUI_PositionDlg.h -LIB_CLIENT_IDL = +LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl LIB_SERVER_IDL = diff --git a/src/TransformationGUI/TransformationGUI.cxx b/src/TransformationGUI/TransformationGUI.cxx index 54ea7d019..38e863d13 100644 --- a/src/TransformationGUI/TransformationGUI.cxx +++ b/src/TransformationGUI/TransformationGUI.cxx @@ -24,10 +24,11 @@ // File : TransformationGUI.cxx // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ using namespace std; #include "TransformationGUI.h" +#include "QAD_Desktop.h" #include "SALOMEGUI_QtCatchCorbaException.hxx" @@ -37,17 +38,30 @@ using namespace std; #include "TransformationGUI_RotationDlg.h" // Method ROTATION #include "TransformationGUI_MirrorDlg.h" // Method MIRROR #include "TransformationGUI_ScaleDlg.h" // Method SCALE +#include "TransformationGUI_OffsetDlg.h" // Method OFFSET +#include "TransformationGUI_PositionDlg.h" // Method POSITION + +TransformationGUI* TransformationGUI::myGUIObject = 0; + +//======================================================================= +// function : GetTransformationGUI() +// purpose : Get the only TransformationGUI object [ static ] +//======================================================================= +TransformationGUI* TransformationGUI::GetTransformationGUI() +{ + if ( myGUIObject == 0 ) { + // init TransformationGUI only once + myGUIObject = new TransformationGUI(); + } + return myGUIObject; +} //======================================================================= // function : TransformationGUI() // purpose : Constructor //======================================================================= -TransformationGUI::TransformationGUI() : - QObject() +TransformationGUI::TransformationGUI() : GEOMGUI() { - myGeomBase = new GEOMBase(); - myGeomGUI = GEOMContext::GetGeomGUI(); - myGeom = myGeomGUI->myComponentGeom; } @@ -66,40 +80,50 @@ TransformationGUI::~TransformationGUI() //======================================================================= bool TransformationGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) { - TransformationGUI* myTransformationGUI = new TransformationGUI(); - myTransformationGUI->myGeomGUI->EmitSignalDeactivateDialog(); + GeometryGUI::GetGeomGUI()->EmitSignalDeactivateDialog(); SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection()); + QDialog* aDlg = NULL; switch (theCommandID) { case 5021: // TRANSLATION { - TransformationGUI_TranslationDlg *aDlg = new TransformationGUI_TranslationDlg(parent, "", myTransformationGUI, Sel); + aDlg = new TransformationGUI_TranslationDlg(parent, "", Sel); break; } case 5022: // ROTATION { - TransformationGUI_RotationDlg *aDlg = new TransformationGUI_RotationDlg(parent, "", myTransformationGUI, Sel); + aDlg = new TransformationGUI_RotationDlg(parent, "", Sel); + break; + } + case 5023: // POSITION + { + aDlg = new TransformationGUI_PositionDlg(parent, "", Sel); break; } - case 5023: // MIRROR + case 5024: // MIRROR { - TransformationGUI_MirrorDlg *aDlg = new TransformationGUI_MirrorDlg(parent, "", myTransformationGUI, Sel); + aDlg = new TransformationGUI_MirrorDlg(parent, "", Sel); break; } - case 5024: // SCALE + case 5025: // SCALE { - TransformationGUI_ScaleDlg *aDlg = new TransformationGUI_ScaleDlg(parent, "", myTransformationGUI, Sel ); + aDlg = new TransformationGUI_ScaleDlg(parent, "", Sel ); break; } - case 5025: // MULTI TRANSLATION + case 5026: // OFFSET + { + aDlg = new TransformationGUI_OffsetDlg(parent, "", Sel ); + break; + } + case 5027: // MULTI TRANSLATION { - TransformationGUI_MultiTranslationDlg *aDlg = new TransformationGUI_MultiTranslationDlg(parent, "", myTransformationGUI, Sel); + aDlg = new TransformationGUI_MultiTranslationDlg(parent, "", Sel); break; } - case 5026: // MULTI ROTATION + case 5028: // MULTI ROTATION { - TransformationGUI_MultiRotationDlg *aDlg = new TransformationGUI_MultiRotationDlg(parent, "", myTransformationGUI, Sel); + aDlg = new TransformationGUI_MultiRotationDlg(parent, "", Sel); break; } default: @@ -108,218 +132,11 @@ bool TransformationGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent) break; } } - return true; -} + if ( aDlg != NULL ) + aDlg->show(); -//================================================================================= -// function : MakeTranslationAndDisplay() -// purpose : Translate a shape -//================================================================================= -void TransformationGUI::MakeTranslationAndDisplay(GEOM::GEOM_Shape_ptr Shape, gp_Vec V) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeTranslation(Shape, V.X(), V.Y(), V.Z()); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(Shape->NameType()); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//======================================================================================= -// function : MakeRotationAndDisplay() -// purpose : -//======================================================================================= -void TransformationGUI::MakeRotationAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Pnt loc, - const gp_Dir dir, const Standard_Real angle) -{ - try { - const GEOM::AxisStruct axis = myGeom->MakeAxisStruct(loc.X(), loc.Y(), loc.Z(), - dir.X(), dir.Y(), dir.Z()); - GEOM::GEOM_Shape_var result = myGeom->MakeRotation(Shape, axis, angle); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return ; - } - result->NameType(Shape->NameType()); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeMirrorAndDisplay() -// purpose : -//===================================================================================== -void TransformationGUI::MakeMirrorAndDisplay(GEOM::GEOM_Shape_ptr Shape1, GEOM::GEOM_Shape_ptr Shape2) -{ - try { - GEOM::GEOM_Shape_var result = myGeom->MakeMirrorByPlane(Shape1, Shape2); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - return; - } - result->NameType(Shape1->NameType()); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//===================================================================================== -// function : MakeScaleAndDisplay() -// purpose : -//===================================================================================== -void TransformationGUI::MakeScaleAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Pnt centralPoint, - const Standard_Real factor) -{ - try { - GEOM::PointStruct P = myGeom->MakePointStruct(centralPoint.X(), centralPoint.Y(), centralPoint.Z()); - GEOM::GEOM_Shape_var result = myGeom->MakeScaleTransform(Shape, P, factor); - result->NameType(Shape->NameType()); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - else - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_NULLSHAPE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//================================================================================= -// function : MakeMultiTranslation1DAndDisplay() -// purpose : Multi-Translate a shape -//================================================================================= -void TransformationGUI::MakeMultiTranslation1DAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Dir Dir, - const double Step, const short NbTimes) -{ - try { - GEOM::PointStruct d = myGeom->MakePointStruct(Dir.X(), Dir.Y(), Dir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - - GEOM::GEOM_Shape_var result = myGeom->MakeMultiTranslation1D(Shape, dstruct, Step, NbTimes); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_COMPOUND")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//================================================================================= -// function : MakeMultiTranslation2DAndDisplay() -// purpose : Multi-Translate a shape -//================================================================================= -void TransformationGUI::MakeMultiTranslation2DAndDisplay(GEOM::GEOM_Shape_ptr Shape, - const gp_Dir Dir1,const double Step1, const short NbTimes1, - const gp_Dir Dir2, const double Step2, const short NbTimes2) -{ - try { - GEOM::PointStruct d1 = myGeom->MakePointStruct(Dir1.X(), Dir1.Y(), Dir1.Z()); - GEOM::DirStruct dstruct1 = myGeom->MakeDirection(d1); - GEOM::PointStruct d2 = myGeom->MakePointStruct(Dir2.X(), Dir2.Y(), Dir2.Z()); - GEOM::DirStruct dstruct2 = myGeom->MakeDirection(d2); - - GEOM::GEOM_Shape_var result = myGeom->MakeMultiTranslation2D(Shape, dstruct1, Step1, NbTimes1, - dstruct2, Step2, NbTimes2); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_COMPOUND")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//================================================================================= -// function : MakeMultiRotation1DAndDisplay() -// purpose : Multi-Rotate a shape -//================================================================================= -void TransformationGUI::MakeMultiRotation1DAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Dir Dir, - const gp_Pnt Loc, const short NbTimes) -{ - try { - GEOM::PointStruct d = myGeom->MakePointStruct(Dir.X(), Dir.Y(), Dir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d) ; - GEOM::PointStruct pstruct = myGeom->MakePointStruct(Loc.X(), Loc.Y(), Loc.Z()); - - GEOM::GEOM_Shape_var result = myGeom->MakeMultiRotation1D(Shape, dstruct, pstruct, NbTimes); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_COMPOUND")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; -} - - -//================================================================================= -// function : MakeMultiRotation2DAndDisplay() -// purpose : Multi-Rotate a shape -//================================================================================= -void TransformationGUI::MakeMultiRotation2DAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Dir Dir, - const gp_Pnt Loc, const double Ang, const short NbTimes1, - const double Step, const short NbTimes2) -{ - try { - GEOM::PointStruct d = myGeom->MakePointStruct(Dir.X(), Dir.Y(), Dir.Z()); - GEOM::DirStruct dstruct = myGeom->MakeDirection(d); - GEOM::PointStruct pstruct = myGeom->MakePointStruct(Loc.X(), Loc.Y(), Loc.Z()); - - GEOM::GEOM_Shape_var result = myGeom->MakeMultiRotation2D(Shape, dstruct, pstruct, - Ang, NbTimes1, Step, NbTimes2); - if(result->_is_nil()) { - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT")); - return; - } - result->NameType(tr("GEOM_COMPOUND")); - if(myGeomBase->Display(result)) - QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE")); - } - catch(const SALOME::SALOME_Exception& S_ex) { - QtCatchCorbaException(S_ex); - } - return; + return true; } @@ -328,6 +145,8 @@ void TransformationGUI::MakeMultiRotation2DAndDisplay(GEOM::GEOM_Shape_ptr Shape //===================================================================================== extern "C" { - bool OnGUIEvent(int theCommandID, QAD_Desktop* parent) - {return TransformationGUI::OnGUIEvent(theCommandID, parent);} + GEOMGUI* GetLibGUI() + { + return TransformationGUI::GetTransformationGUI(); + } } diff --git a/src/TransformationGUI/TransformationGUI.h b/src/TransformationGUI/TransformationGUI.h index f8451c60e..65a4bd999 100644 --- a/src/TransformationGUI/TransformationGUI.h +++ b/src/TransformationGUI/TransformationGUI.h @@ -24,49 +24,33 @@ // File : TransformationGUI.h // Author : Damien COQUERET // Module : GEOM -// $Header: +// $Header$ #ifndef TRANSFORMATIONGUI_H #define TRANSFORMATIONGUI_H -#include "GEOMBase.h" -#include +#include "GEOMGUI.h" + //================================================================================= // class : TransformationGUI // purpose : //================================================================================= -class TransformationGUI : public QObject +class TransformationGUI : public GEOMGUI { - Q_OBJECT /* for QT compatibility */ +protected: + TransformationGUI(); // hide constructor to avoid direct creation public : - TransformationGUI(); ~TransformationGUI(); - static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); - - void MakeTranslationAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Vec V); - void MakeRotationAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Pnt loc, - const gp_Dir dir, const Standard_Real angle); - void MakeMirrorAndDisplay(GEOM::GEOM_Shape_ptr Shape1, GEOM::GEOM_Shape_ptr Shape2); - void MakeScaleAndDisplay(GEOM::GEOM_Shape_ptr Shape, const gp_Pnt centralPoint, - const Standard_Real factor); - void MakeMultiTranslation1DAndDisplay(GEOM::GEOM_Shape_ptr Shape, - const gp_Dir Dir, const double Step, const short NbTimes); - void MakeMultiTranslation2DAndDisplay(GEOM::GEOM_Shape_ptr Shape, - const gp_Dir Dir1, const double Step1, const short NbTimes1, - const gp_Dir Dir2, const double Step2, const short NbTimes2); - void MakeMultiRotation1DAndDisplay(GEOM::GEOM_Shape_ptr Shape, - const gp_Dir Dir, const gp_Pnt Loc, const short NbTimes); - void MakeMultiRotation2DAndDisplay(GEOM::GEOM_Shape_ptr Shape, - const gp_Dir Dir, const gp_Pnt Loc, const double Ang, - const short NbTimes1, const double Step, const short NbTimes2); + // Get the only TransformationGUI object + static TransformationGUI* GetTransformationGUI(); - GEOMBase* myGeomBase; - GEOMContext* myGeomGUI; - GEOM::GEOM_Gen_var myGeom; /* Current Geom Component */ + bool OnGUIEvent(int theCommandID, QAD_Desktop* parent); +private: + static TransformationGUI* myGUIObject; // the only TransformationGUI object }; #endif diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx index 5b9d8126f..b56df85cb 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.cxx @@ -28,9 +28,11 @@ #include "TransformationGUI_MirrorDlg.h" -#include -#include -#include +#include "QAD_Desktop.h" + +#include + +#include "GEOMImpl_Types.hxx" #include "utilities.h" @@ -43,32 +45,37 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(QWidget* parent, const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +TransformationGUI_MirrorDlg::TransformationGUI_MirrorDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_POINT"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_AXE"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MIRROR_PLANE"))); + QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); setCaption(tr("GEOM_MIRROR_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_MIRROR")); RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); - - GroupPoints = new DlgRef_2Sel_QTD(this, "GroupPoints"); + RadioButton2->setPixmap(image1); + RadioButton3->setPixmap(image2); + + GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); + GroupPoints->SpinBox_DX->hide(); + GroupPoints->TextLabel3->hide(); + GroupPoints->CheckButton2->hide(); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupPoints->TextLabel2->setText(tr("GEOM_PLANE_MIRROR")); - GroupPoints->PushButton1->setPixmap(image1); - GroupPoints->PushButton2->setPixmap(image1); - - Layout1->addWidget(GroupPoints, 1, 0); + GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); + GroupPoints->TextLabel2->setText(tr("GEOM_POINT_MIRROR")); + GroupPoints->TextLabel2->setFixedWidth(74); + GroupPoints->PushButton1->setPixmap(image3); + GroupPoints->PushButton2->setPixmap(image3); + GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); + Layout1->addWidget(GroupPoints, 2, 0); + /***************************************************************/ - - /* Initialisations */ - myTransformationGUI = theTransformationGUI; + Init(); } @@ -91,59 +98,105 @@ void TransformationGUI_MirrorDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - - myOkShape1 = myOkShape2 = false; - - /* Vertices Filter for all arguments */ - myFaceFilter = new GEOM_FaceFilter(StdSelect_Plane, myGeom); + GroupPoints->LineEdit1->setReadOnly(true); + GroupPoints->LineEdit2->setReadOnly(true); + + myArgument = GEOM::GEOM_Object::_nil(); + + // Activate Create a Copy mode + GroupPoints->CheckButton1->setChecked(true); + CreateCopyModeChanged(true); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int))); connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - + + connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupPoints->show(); - this->show(); + initName( tr( "GEOM_MIRROR" ) ); + ConstructorsClicked( 0 ); +} + + - return; +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void TransformationGUI_MirrorDlg::ConstructorsClicked(int constructorId) +{ + disconnect( mySelection, 0, this, 0 ); + + globalSelection(); + myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit2->clear(); + myArgument = GEOM::GEOM_Object::_nil(); + + switch (constructorId) + { + case 0: /* mirror an object by point */ + { + GroupPoints->TextLabel2->setText(tr("GEOM_POINT_MIRROR")); + break; + } + case 1: /* mirror an object by axe */ + { + GroupPoints->TextLabel2->setText(tr("GEOM_AXE_MIRROR")); + break; + } + case 2: /* mirror an object by plane */ + { + GroupPoints->TextLabel2->setText(tr("GEOM_PLANE_MIRROR")); + break; + } + } + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } + //================================================================================= // function : ClickOnOk() // purpose : //================================================================================= void TransformationGUI_MirrorDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } + //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= -void TransformationGUI_MirrorDlg::ClickOnApply() +bool TransformationGUI_MirrorDlg::ClickOnApply() +{ + if ( !onAccept(GroupPoints->CheckButton1->isChecked()) ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_MirrorDlg::ClickOnCancel() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkShape1 && myOkShape2) - myTransformationGUI->MakeMirrorAndDisplay(myGeomShape1, myGeomShape2); - return; + GEOMBase_Skeleton::ClickOnCancel(); } @@ -153,47 +206,55 @@ void TransformationGUI_MirrorDlg::ClickOnApply() //================================================================================= void TransformationGUI_MirrorDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkShape1 = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkShape2 = false; - return; - } + QString aName; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) + { + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + if(aNbSel < 1) + { + myObjects.length(0); + return; + } + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects); + if (!myObjects.length()) + return; + if(aNbSel != 1) + aName = tr("%1_objects").arg(aNbSel); + } + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + { + if(mySelection->IObjectCount() != 1) + { + myArgument = GEOM::GEOM_Object::_nil(); + return; + } + Standard_Boolean testResult = Standard_False; + myArgument = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + if(!testResult || CORBA::is_nil( myArgument )) + return; + aName = GEOMBase::GetName( myArgument ); + } + myEditCurrentArgument->setText( aName ); + + displayPreview(); +} - // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myShape1 = S; - myEditCurrentArgument->setText(aString); - myOkShape1 = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return ; - myShape2 = S; - myEditCurrentArgument->setText(aString); - myOkShape2 = true; - } - if(myOkShape1 && myOkShape2) - MakeMirrorSimulationAndDisplay(); - return; +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void TransformationGUI_MirrorDlg::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -204,39 +265,57 @@ void TransformationGUI_MirrorDlg::SelectionIntoArgument() void TransformationGUI_MirrorDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); + + if(send == GroupPoints->PushButton1){ myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection(); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myFaceFilter); + switch(getConstructorId()) + { + case 0: + { + globalSelection( GEOM_POINT ); + break; + } + case 1: + { + globalSelection( GEOM_LINE ); + break; + } + case 2: + { + globalSelection( GEOM_PLANE ); + break; + } + } } - this->SelectionIntoArgument(); - return; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } //================================================================================= -// function : LineEditReturnPressed() +// function : ActivateThisDialog() // purpose : //================================================================================= -void TransformationGUI_MirrorDlg::LineEditReturnPressed() +void TransformationGUI_MirrorDlg::ActivateThisDialog() { - QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if(send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + ConstructorsClicked( getConstructorId() ); +} + - GEOMBase_Skeleton::LineEditReturnPressed(); - return; +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_MirrorDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -246,60 +325,121 @@ void TransformationGUI_MirrorDlg::LineEditReturnPressed() //================================================================================= void TransformationGUI_MirrorDlg::enterEvent(QEvent * e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if(!GroupConstructors->isEnabled()) + ActivateThisDialog(); } //================================================================================= -// function : ActivateThisDialog() +// function : createOperation // purpose : //================================================================================= -void TransformationGUI_MirrorDlg::ActivateThisDialog() +GEOM::GEOM_IOperations_ptr TransformationGUI_MirrorDlg::createOperation() { - GEOMBase_Skeleton::ActivateThisDialog(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + return getGeomEngine()->GetITransformOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_MirrorDlg::isValid( QString& msg ) +{ + return !(myObjects.length() == 0 || myArgument->_is_nil()); } //================================================================================= -// function : MakeMirrorSimulationAndDisplay() -// purpose : S1 is a shape and S2 a mirror. +// function : execute +// purpose : //================================================================================= -void TransformationGUI_MirrorDlg::MakeMirrorSimulationAndDisplay() +bool TransformationGUI_MirrorDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + bool res = false; + bool toCreateCopy = IsPreview() || GroupPoints->CheckButton1->isChecked(); - try { - Handle(Geom_Surface) surf = BRep_Tool::Surface(TopoDS::Face(myShape2)); - Handle(Geom_Plane) myPlane = Handle(Geom_Plane)::DownCast(surf); - const gp_Ax3 pos = myPlane->Position(); - const gp_Pnt loc = pos.Location(); /* location of the plane */ - const gp_Dir dir = pos.Direction(); /* Main direction of the plane (Z axis) */ - - /* plane used for mirroring */ - gp_Ax2 pln(loc, dir); - gp_Trsf theTransformation; - theTransformation.SetMirror(pln); - BRepBuilderAPI_Transform myBRepTransformation(myShape1, theTransformation, Standard_False); - - this->mySimulationTopoDs = myBRepTransformation.Shape(); - if(mySimulationTopoDs.IsNull()) - return; - else - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeMirrorSimulationAndDisplay"); - return; - } - return; + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorPointCopy( myObjects[i], myArgument ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorPoint( myObjects[i], myArgument ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + case 1 : + { + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorAxisCopy( myObjects[i], myArgument ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorAxis( myObjects[i], myArgument ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + case 2: + { + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorPlaneCopy( myObjects[i], myArgument ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MirrorPlane( myObjects[i], myArgument ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + } + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_MirrorDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : CreateCopyModeChanged() +// purpose : +//================================================================================= +void TransformationGUI_MirrorDlg::CreateCopyModeChanged(bool isCreateCopy) +{ + this->GroupBoxName->setEnabled(isCreateCopy); } diff --git a/src/TransformationGUI/TransformationGUI_MirrorDlg.h b/src/TransformationGUI/TransformationGUI_MirrorDlg.h index 71c118981..4b2bea586 100644 --- a/src/TransformationGUI/TransformationGUI_MirrorDlg.h +++ b/src/TransformationGUI/TransformationGUI_MirrorDlg.h @@ -30,11 +30,10 @@ #define DIALOGBOX_MIRROR_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel_QTD.h" +#include "DlgRef_2Sel1Spin2Check.h" #include "TransformationGUI.h" - -#include "GEOM_FaceFilter.hxx" + //================================================================================= // class : TransformationGUI_MirrorDlg @@ -45,35 +44,37 @@ class TransformationGUI_MirrorDlg : public GEOMBase_Skeleton Q_OBJECT public: - TransformationGUI_MirrorDlg(QWidget* parent = 0, const char* name = 0, TransformationGUI* theTransformationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + TransformationGUI_MirrorDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~TransformationGUI_MirrorDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeMirrorSimulationAndDisplay(); - - TransformationGUI* myTransformationGUI; - - Handle(GEOM_FaceFilter) myFaceFilter; /* To filter selections */ - - TopoDS_Shape myShape1; /* topology used */ - TopoDS_Shape myShape2; /* topology used */ - GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */ - GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */ - bool myOkShape1; - bool myOkShape2; /* to check when arguments are defined */ - - DlgRef_2Sel_QTD* GroupPoints; - + + GEOM::GEOM_Object_var myArgument; + GEOM::ListOfGO myObjects; + + DlgRef_2Sel1Spin2Check* GroupPoints; + private slots : void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - + void ConstructorsClicked(int constructorId); + void CreateCopyModeChanged(bool isCreateCopy); }; #endif // DIALOGBOX_MIRROR_H diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 2d7b5aae1..441abea0a 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -21,25 +21,19 @@ // // // -// File : TransformationGUI_MultiTranslationDlg.cxx +// File : TransformationGUI_MultiRotationDlg.cxx // Author : Damien COQUERET // Module : GEOM // $Header$ #include "TransformationGUI_MultiRotationDlg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "GEOMImpl_Types.hxx" + #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include #include "utilities.h" @@ -52,7 +46,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg(QWidget* parent, const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MULTIROTATION_SIMPLE"))); @@ -74,6 +68,8 @@ TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg(QWidget* GroupPoints->TextLabel3->setText(tr("GEOM_NB_TIMES")); GroupPoints->PushButton1->setPixmap(image2); GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->LineEdit1->setReadOnly(true); + GroupPoints->LineEdit2->setReadOnly(true); GroupDimensions = new DlgRef_2Sel4Spin1Check(this, "GroupDimensions"); GroupDimensions->GroupBox1->setTitle(tr("GEOM_MULTIROTATION_DOUBLE")); @@ -86,13 +82,13 @@ TransformationGUI_MultiRotationDlg::TransformationGUI_MultiRotationDlg(QWidget* GroupDimensions->CheckButton1->setText(tr("GEOM_REVERSE")); GroupDimensions->PushButton1->setPixmap(image2); GroupDimensions->PushButton2->setPixmap(image2); + GroupDimensions->LineEdit1->setReadOnly(true); + GroupDimensions->LineEdit2->setReadOnly(true); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - /* Initialisations */ - myTransformationGUI = theTransformationGUI; Init(); } @@ -113,21 +109,9 @@ TransformationGUI_MultiRotationDlg::~TransformationGUI_MultiRotationDlg() //================================================================================= void TransformationGUI_MultiRotationDlg::Init() { - /* init variables */ - myConstructorId = 0; - myEditCurrentArgument = GroupPoints->LineEdit1; - - myAng = 45.0; - myStep = 50.0; - myNbTimes1 = 2; - myNbTimes2 = 2; - myOkBase = myOkDir = false; - - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); double SpecificStep1 = 5; double SpecificStep2 = 1; @@ -171,16 +155,12 @@ void TransformationGUI_MultiRotationDlg::Init() connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX2, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY2, SLOT(SetStep(double))); - connect(GroupDimensions->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle(int))); + connect(GroupDimensions->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseAngle())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return; + initName( tr( "GEOM_MULTIROTATION" ) ); + ConstructorsClicked( 0 ); } @@ -190,16 +170,13 @@ void TransformationGUI_MultiRotationDlg::Init() //================================================================================= void TransformationGUI_MultiRotationDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); disconnect(mySelection, 0, this, 0); + myAng = 45.0; myStep = 50.0; - myNbTimes1 = 2; - myNbTimes2 = 2; - myOkBase = myOkDir = false; + myNbTimes1 = myNbTimes2 = 2; + + globalSelection( GEOM_ALLSHAPES ); switch (constructorId) { @@ -215,8 +192,6 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked(int constructorId) GroupPoints->SpinBox_DX->SetValue(myNbTimes1); - /* filter for next selection */ - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } case 1: /* Rotate double */ @@ -234,12 +209,13 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked(int constructorId) GroupDimensions->SpinBox_DX2->SetValue(myStep); GroupDimensions->SpinBox_DY2->SetValue(myNbTimes2); - /* filter for next selection */ - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); break; } } - return; + + myEditCurrentArgument->setFocus(); + myBase = myVector = GEOM::GEOM_Object::_nil(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } @@ -249,9 +225,8 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked(int constructorId) //================================================================================= void TransformationGUI_MultiRotationDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -259,24 +234,24 @@ void TransformationGUI_MultiRotationDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void TransformationGUI_MultiRotationDlg::ClickOnApply() +bool TransformationGUI_MultiRotationDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} - if(myConstructorId == 0) { - if(myOkBase && myOkDir) - myTransformationGUI->MakeMultiRotation1DAndDisplay(myGeomShape, myDir, myLoc, myNbTimes1); - } - else if(myConstructorId == 1) { - if(myOkBase && myOkDir) - myTransformationGUI->MakeMultiRotation2DAndDisplay(myGeomShape, myDir, myLoc, myAng, myNbTimes1, myStep, myNbTimes2); - } - return; + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_MultiRotationDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -286,46 +261,32 @@ void TransformationGUI_MultiRotationDlg::ClickOnApply() //================================================================================= void TransformationGUI_MultiRotationDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { + + if(mySelection->IObjectCount() != 1) { if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) - myOkBase = false; + myBase = GEOM::GEOM_Object::_nil(); else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) - myOkDir = false; + myVector = GEOM::GEOM_Object::_nil(); return; } - + // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) + Standard_Boolean testResult = Standard_False;; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + + if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) ) return; - if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myBase = S; - myOkBase = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - myLoc = curv.Line().Location(); - myEditCurrentArgument->setText(aString); - myOkDir = true; - } - if(myOkBase && myOkDir) - this->MakeMultiRotationSimulationAndDisplay(); - return; + if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) + myBase = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) + myVector = aSelectedObject; + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -336,29 +297,26 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument() void TransformationGUI_MultiRotationDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection( GEOM_ALLSHAPES ); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } else if(send == GroupDimensions->PushButton1) { - GroupDimensions->LineEdit1->setFocus(); myEditCurrentArgument = GroupDimensions->LineEdit1; + globalSelection( GEOM_ALLSHAPES ); } else if(send == GroupDimensions->PushButton2) { - GroupDimensions->LineEdit2->setFocus(); myEditCurrentArgument = GroupDimensions->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - return; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -369,19 +327,12 @@ void TransformationGUI_MultiRotationDlg::SetEditCurrentArgument() void TransformationGUI_MultiRotationDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else if (send == GroupDimensions->LineEdit1) - myEditCurrentArgument = GroupDimensions->LineEdit1; - else if (send == GroupDimensions->LineEdit2) - myEditCurrentArgument = GroupDimensions->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || send == GroupDimensions->LineEdit1 || + send == GroupPoints->LineEdit2 || send == GroupDimensions->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -393,19 +344,18 @@ void TransformationGUI_MultiRotationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + ConstructorsClicked( getConstructorId() ); +} - if(myConstructorId == 0) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(myConstructorId == 1) { - GroupDimensions->LineEdit1->setFocus(); - myEditCurrentArgument = GroupDimensions->LineEdit1; - } - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_MultiRotationDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -415,10 +365,8 @@ void TransformationGUI_MultiRotationDlg::ActivateThisDialog() //================================================================================= void TransformationGUI_MultiRotationDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if(!GroupConstructors->isEnabled()) + ActivateThisDialog(); } @@ -428,8 +376,6 @@ void TransformationGUI_MultiRotationDlg::enterEvent(QEvent* e) //================================================================================= void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); QObject* send = (QObject*)sender(); if(send == GroupPoints->SpinBox_DX || send == GroupDimensions->SpinBox_DY1) @@ -440,10 +386,8 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue) myStep = newValue; else if(send == GroupDimensions->SpinBox_DY2) myNbTimes2 = (int)newValue; - - if(myOkBase && myOkDir) - this->MakeMultiRotationSimulationAndDisplay(); - return; + + displayPreview(); } @@ -451,108 +395,84 @@ void TransformationGUI_MultiRotationDlg::ValueChangedInSpinBox(double newValue) // function : ReverseAngle() // purpose : 'state' not used here //================================================================================= -void TransformationGUI_MultiRotationDlg::ReverseAngle(int state) +void TransformationGUI_MultiRotationDlg::ReverseAngle() { myAng = -myAng; - if(myConstructorId == 0) + + int aConstructorId = getConstructorId(); + + if(aConstructorId == 0) GroupPoints->SpinBox_DX->SetValue(myAng); - else if(myConstructorId == 1) + else if(aConstructorId == 1) GroupDimensions->SpinBox_DX1->SetValue(myAng); - if(myOkBase && myOkDir) - this->MakeMultiRotationSimulationAndDisplay(); - return; + displayPreview(); } //================================================================================= -// function : MakeMultiRotationSimulationAndDisplay() +// function : createOperation // purpose : //================================================================================= -void TransformationGUI_MultiRotationDlg::MakeMultiRotationSimulationAndDisplay() +GEOM::GEOM_IOperations_ptr TransformationGUI_MultiRotationDlg::createOperation() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - int i, j; - Standard_Real DX, DY, DZ; - gp_Trsf theTransformation; - gp_Trsf theTransformation1; - gp_Trsf theTransformation2; - gp_Pnt myPoint; - GProp_GProps System; - TopoDS_Compound compound; - - BRep_Builder B; - B.MakeCompound(compound); - - if(myBase.ShapeType() == TopAbs_VERTEX) - myGeomBase->VertexToPoint(myBase, myPoint); - else if(myBase.ShapeType() == TopAbs_EDGE || myBase.ShapeType() == TopAbs_WIRE) { - BRepGProp::LinearProperties(myBase, System); - myPoint = System.CentreOfMass(); - } - else if(myBase.ShapeType() == TopAbs_FACE || myBase.ShapeType() == TopAbs_SHELL) { - BRepGProp::SurfaceProperties(myBase, System); - myPoint = System.CentreOfMass(); - } - else { - BRepGProp::VolumeProperties(myBase, System); - myPoint = System.CentreOfMass(); - } + return getGeomEngine()->GetITransformOperations( getStudyId() ); +} - TopoDS_Shape S = BRepBuilderAPI_MakeVertex(myPoint).Shape(); - try { - switch (myConstructorId) +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_MultiRotationDlg::isValid( QString& msg ) +{ + return !(myBase->_is_nil() || myVector->_is_nil()); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool TransformationGUI_MultiRotationDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : { - case 0 : - { - gp_Ax1 AX1(myLoc, myDir); - Standard_Real angle = 360/myNbTimes1; - for(i = 0; i < myNbTimes1; i++) { - theTransformation.SetRotation(AX1, i*angle*PI180); - BRepBuilderAPI_Transform myBRepTransformation(S, theTransformation, Standard_False); - B.Add(compound, myBRepTransformation.Shape()); - } - mySimulationTopoDs = compound; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - break; + if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVector ) ) { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiRotate1D( myBase, myVector, myNbTimes1 ); + res = true; } - case 1 : - { - gp_Ax1 AX2(myLoc, myDir); - Handle(Geom_Line) Line = new Geom_Line(AX2); - gp_Pnt P2 = GeomAPI_ProjectPointOnCurve(myPoint, Line); - if(myPoint.IsEqual(P2, Precision::Confusion())) - return; - - gp_Vec Vec(P2, myPoint); - Vec.Normalize(); - - for(i = 0; i < myNbTimes2; i++) { - for(j = 0; j < myNbTimes1; j++) { - DX = i * myStep * Vec.X(); - DY = i * myStep * Vec.Y(); - DZ = i * myStep * Vec.Z(); - myVec.SetCoord(DX, DY, DZ); - - theTransformation1.SetTranslation(myVec); - theTransformation2.SetRotation(AX2, j*myAng*PI180); - BRepBuilderAPI_Transform myBRepTransformation1(S, theTransformation1, Standard_False); - BRepBuilderAPI_Transform myBRepTransformation2(myBRepTransformation1.Shape(), theTransformation2, Standard_False); - B.Add(compound, myBRepTransformation2.Shape()); - } + break; + } + case 1 : + { + if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVector ) ) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiRotate2D( myBase, myVector, myAng, myNbTimes1, myStep, myNbTimes2 ); + res = true; } - mySimulationTopoDs = compound; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - break; - } + break; } - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeMultitranslationSimulationAndDisplay"); - return; - } - return; + } + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_MultiRotationDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h index 10a4a401e..06d10be13 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.h @@ -33,11 +33,6 @@ #include "DlgRef_2Sel4Spin1Check.h" #include "DlgRef_2Sel1Spin.h" -#include "TransformationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" -#include -#include //================================================================================= // class : TransformationGUI_MultiRotationDlg @@ -48,43 +43,40 @@ class TransformationGUI_MultiRotationDlg : public GEOMBase_Skeleton Q_OBJECT public: - TransformationGUI_MultiRotationDlg(QWidget* parent = 0, const char* name = 0, TransformationGUI* theTransformationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + TransformationGUI_MultiRotationDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~TransformationGUI_MultiRotationDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeMultiRotationSimulationAndDisplay(); - - TransformationGUI* myTransformationGUI; - - double step; - int myConstructorId; /* Current constructor id = radio button id */ - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */ - - TopoDS_Shape myBase; - GEOM::GEOM_Shape_var myGeomShape; /* is myBase */ - gp_Vec myVec; + + GEOM::GEOM_Object_var myBase, myVector; int myNbTimes1; int myNbTimes2; Standard_Real myAng; Standard_Real myStep; - gp_Dir myDir; - gp_Pnt myLoc; - bool myOkBase; - bool myOkDir; - + DlgRef_2Sel1Spin* GroupPoints; DlgRef_2Sel4Spin1Check* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ReverseAngle(int state); + void ReverseAngle(); void ValueChangedInSpinBox(double newValue); void ConstructorsClicked(int constructorId); diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 9a78c2ecb..108dbb1dd 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -28,15 +28,12 @@ #include "TransformationGUI_MultiTranslationDlg.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include "GEOMImpl_Types.hxx" + #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include #include "utilities.h" @@ -49,7 +46,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg(QWidget* parent, const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap( "GEOM",tr("ICON_DLG_MULTITRANSLATION_SIMPLE"))); @@ -73,6 +70,8 @@ TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg(QWi GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE_U")); GroupPoints->PushButton1->setPixmap(image2); GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->LineEdit1->setReadOnly(true); + GroupPoints->LineEdit2->setReadOnly(true); GroupDimensions = new DlgRef_3Sel4Spin2Check(this, "GroupDimensions"); GroupDimensions->GroupBox1->setTitle(tr("GEOM_MULTITRANSLATION_DOUBLE")); @@ -88,13 +87,14 @@ TransformationGUI_MultiTranslationDlg::TransformationGUI_MultiTranslationDlg(QWi GroupDimensions->PushButton1->setPixmap(image2); GroupDimensions->PushButton2->setPixmap(image2); GroupDimensions->PushButton3->setPixmap(image2); + GroupDimensions->LineEdit1->setReadOnly(true); + GroupDimensions->LineEdit2->setReadOnly(true); + GroupDimensions->LineEdit3->setReadOnly(true); - Layout1->addWidget(GroupPoints, 1, 0); - Layout1->addWidget(GroupDimensions, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); + Layout1->addWidget(GroupDimensions, 2, 0); /***************************************************************/ - /* Initialisations */ - myTransformationGUI = theTransformationGUI; Init(); } @@ -115,37 +115,25 @@ TransformationGUI_MultiTranslationDlg::~TransformationGUI_MultiTranslationDlg() //================================================================================= void TransformationGUI_MultiTranslationDlg::Init() { - /* init variables */ - myConstructorId = 0; - myEditCurrentArgument = GroupPoints->LineEdit1; - - myStep1 = 50.0; - myStep2 = 50.0; - myNbTimes1 = 2; - myNbTimes2 = 2; - myOkBase = myOkDir1 = myOkDir2 = false; - - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); + double step = St.toDouble(); double SpecificStep = 1; /* min, max, step and decimals for spin boxes & initial values */ GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupPoints->SpinBox_DY->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); - GroupPoints->SpinBox_DX->SetValue(myStep1); - GroupPoints->SpinBox_DY->SetValue(myNbTimes1); + GroupPoints->SpinBox_DX->SetValue(myStepU); + GroupPoints->SpinBox_DY->SetValue(myNbTimesU); GroupDimensions->SpinBox_DX1->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupDimensions->SpinBox_DY1->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); GroupDimensions->SpinBox_DX2->RangeStepAndValidator(-999.999, 999.999, step, 3); GroupDimensions->SpinBox_DY2->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); - GroupDimensions->SpinBox_DX1->SetValue(myStep1); - GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1); - GroupDimensions->SpinBox_DX2->SetValue(myStep2); - GroupDimensions->SpinBox_DY2->SetValue(myNbTimes2); + GroupDimensions->SpinBox_DX1->SetValue(myStepU); + GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU); + GroupDimensions->SpinBox_DX2->SetValue(myStepV); + GroupDimensions->SpinBox_DY2->SetValue(myNbTimesV); /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); @@ -178,18 +166,15 @@ void TransformationGUI_MultiTranslationDlg::Init() connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DX2, SLOT(SetStep(double))); connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupDimensions->SpinBox_DY2, SLOT(SetStep(double))); - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle1(int))); - connect(GroupDimensions->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle1(int))); - connect(GroupDimensions->CheckButton2, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle2(int))); + connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseStepU())); + connect(GroupDimensions->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(ReverseStepU())); + connect(GroupDimensions->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(ReverseStepV())); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - /* displays Dialog */ - GroupDimensions->hide(); - GroupPoints->show(); - this->show(); - - return; + + initName( tr( "GEOM_MULTITRANSLATION" ) ); + ConstructorsClicked( 0 ); } @@ -199,16 +184,12 @@ void TransformationGUI_MultiTranslationDlg::Init() //================================================================================= void TransformationGUI_MultiTranslationDlg::ConstructorsClicked(int constructorId) { - myConstructorId = constructorId; - mySelection->ClearFilters(); - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); disconnect(mySelection, 0, this, 0); - myStep1 = 50.0; - myStep2 = 50.0; - myNbTimes1 = 2; - myNbTimes2 = 2; - myOkBase = myOkDir1 = myOkDir2 = false; + + myStepU = myStepV = 50.0; + myNbTimesU = myNbTimesV = 2; + + globalSelection( GEOM_ALLSHAPES ); switch (constructorId) { @@ -222,11 +203,9 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked(int constructorI GroupPoints->LineEdit1->setText(""); GroupPoints->LineEdit2->setText(""); - GroupPoints->SpinBox_DX->SetValue(myStep1); - GroupPoints->SpinBox_DY->SetValue(myNbTimes1); - - /* filter for next selection */ - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + GroupPoints->SpinBox_DX->SetValue(myStepU); + GroupPoints->SpinBox_DY->SetValue(myNbTimesU); + break; } case 1: /* Translate double */ @@ -240,17 +219,19 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked(int constructorI GroupDimensions->LineEdit2->setText(""); GroupDimensions->LineEdit3->setText(""); - GroupDimensions->SpinBox_DX1->SetValue(myStep1); - GroupDimensions->SpinBox_DY1->SetValue(myNbTimes1); - GroupDimensions->SpinBox_DX2->SetValue(myStep2); - GroupDimensions->SpinBox_DY2->SetValue(myNbTimes2); - - /* filter for next selection */ - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + GroupDimensions->SpinBox_DX1->SetValue(myStepU); + GroupDimensions->SpinBox_DY1->SetValue(myNbTimesU); + GroupDimensions->SpinBox_DX2->SetValue(myStepV); + GroupDimensions->SpinBox_DY2->SetValue(myNbTimesV); + + myVectorV = GEOM::GEOM_Object::_nil(); break; } } - return; + + myEditCurrentArgument->setFocus(); + myBase = myVectorU = GEOM::GEOM_Object::_nil(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } @@ -260,9 +241,8 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked(int constructorI //================================================================================= void TransformationGUI_MultiTranslationDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -270,24 +250,24 @@ void TransformationGUI_MultiTranslationDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void TransformationGUI_MultiTranslationDlg::ClickOnApply() +bool TransformationGUI_MultiTranslationDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + if ( !onAccept() ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} - if(myConstructorId == 0) { - if(myOkBase && myOkDir1) - myTransformationGUI->MakeMultiTranslation1DAndDisplay(myGeomShape, myDir1, myStep1, myNbTimes1); - } - else if(myConstructorId == 1) { - if(myOkBase && myOkDir1 && myOkDir2) - myTransformationGUI->MakeMultiTranslation2DAndDisplay(myGeomShape, myDir1, myStep1, myNbTimes1, myDir2, myStep2, myNbTimes2); - } - return; + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_MultiTranslationDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -297,81 +277,35 @@ void TransformationGUI_MultiTranslationDlg::ClickOnApply() //================================================================================= void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ - - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { + + if(mySelection->IObjectCount() != 1) { if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) - myOkBase = false; + myBase = GEOM::GEOM_Object::_nil(); else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) - myOkDir1 = false; + myVectorU = GEOM::GEOM_Object::_nil(); else if(myEditCurrentArgument == GroupDimensions->LineEdit3) - myOkDir2 = false; + myVectorV = GEOM::GEOM_Object::_nil(); return; } // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; + Standard_Boolean testResult = Standard_False;; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); - switch(myConstructorId) - { - case 0 : - { - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myBase = S; - myOkBase = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir1 = curv.Line().Direction(); - myEditCurrentArgument->setText(aString); - myOkDir1 = true; - } + if ( !testResult || CORBA::is_nil( aSelectedObject ) || !GEOMBase::IsShape( aSelectedObject ) ) + return; - if(myOkBase && myOkDir1) - this->MakeMultiTranslationSimulationAndDisplay(); - break; - } - case 1 : - { - if(myEditCurrentArgument == GroupDimensions->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myBase = S; - myOkBase = true; - } - else if(myEditCurrentArgument == GroupDimensions->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir1 = curv.Line().Direction(); - myEditCurrentArgument->setText(aString); - myOkDir1 = true; - } - else if(myEditCurrentArgument == GroupDimensions->LineEdit3) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir2 = curv.Line().Direction(); - myEditCurrentArgument->setText(aString); - myOkDir2 = true; - } + if(myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1) + myBase = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit2 || myEditCurrentArgument == GroupDimensions->LineEdit2) + myVectorU = aSelectedObject; + else if(myEditCurrentArgument == GroupDimensions->LineEdit3) + myVectorV = aSelectedObject; - if(myOkBase && myOkDir1 && myOkDir2) - this->MakeMultiTranslationSimulationAndDisplay(); - break; - } - } - return; + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + + displayPreview(); } @@ -382,34 +316,31 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection( GEOM_ALLSHAPES ); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } else if(send == GroupDimensions->PushButton1) { - GroupDimensions->LineEdit1->setFocus(); myEditCurrentArgument = GroupDimensions->LineEdit1; + globalSelection( GEOM_ALLSHAPES ); } else if(send == GroupDimensions->PushButton2) { - GroupDimensions->LineEdit2->setFocus(); myEditCurrentArgument = GroupDimensions->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } else if(send == GroupDimensions->PushButton3) { - GroupDimensions->LineEdit3->setFocus(); myEditCurrentArgument = GroupDimensions->LineEdit3; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -420,21 +351,13 @@ void TransformationGUI_MultiTranslationDlg::SetEditCurrentArgument() void TransformationGUI_MultiTranslationDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else if (send == GroupDimensions->LineEdit1) - myEditCurrentArgument = GroupDimensions->LineEdit1; - else if (send == GroupDimensions->LineEdit2) - myEditCurrentArgument = GroupDimensions->LineEdit2; - else if (send == GroupDimensions->LineEdit3) - myEditCurrentArgument = GroupDimensions->LineEdit3; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || send == GroupDimensions->LineEdit1 || + send == GroupPoints->LineEdit2 || send == GroupDimensions->LineEdit2 || + send == GroupDimensions->LineEdit3) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -447,18 +370,17 @@ void TransformationGUI_MultiTranslationDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(myConstructorId == 0) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - } - else if(myConstructorId == 1) { - GroupDimensions->LineEdit1->setFocus(); - myEditCurrentArgument = GroupDimensions->LineEdit1; - } + ConstructorsClicked( getConstructorId() ); +} - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_MultiTranslationDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -468,10 +390,8 @@ void TransformationGUI_MultiTranslationDlg::ActivateThisDialog() //================================================================================= void TransformationGUI_MultiTranslationDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if(!GroupConstructors->isEnabled()) + ActivateThisDialog(); } @@ -481,148 +401,139 @@ void TransformationGUI_MultiTranslationDlg::enterEvent(QEvent* e) //================================================================================= void TransformationGUI_MultiTranslationDlg::ValueChangedInSpinBox(double newValue) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); QObject* send = (QObject*)sender(); - switch(myConstructorId) + switch(getConstructorId()) { case 0 : { if(send == GroupPoints->SpinBox_DX) - myStep1 = newValue; + myStepU = newValue; else if(send == GroupPoints->SpinBox_DY) - myNbTimes1 = (int)newValue; - if(myOkBase && myOkDir1) - this->MakeMultiTranslationSimulationAndDisplay(); + myNbTimesU = (int)newValue; break; } case 1 : { if(send == GroupDimensions->SpinBox_DX1) - myStep1 = newValue; + myStepU = newValue; else if(send == GroupDimensions->SpinBox_DY1) - myNbTimes1 = (int)newValue; + myNbTimesU = (int)newValue; else if(send == GroupDimensions->SpinBox_DX2) - myStep2 = newValue; + myStepV = newValue; else if(send == GroupDimensions->SpinBox_DY2) - myNbTimes2 = (int)newValue; - if(myOkBase && myOkDir1 && myOkDir2) - this->MakeMultiTranslationSimulationAndDisplay(); + myNbTimesV = (int)newValue; break; } } - return; + + displayPreview(); } //================================================================================= -// function : ReverseAngle1() +// function : ReverseStepU() // purpose : 'state' not used here //================================================================================= -void TransformationGUI_MultiTranslationDlg::ReverseAngle1(int state) +void TransformationGUI_MultiTranslationDlg::ReverseStepU() { - myStep1 = -myStep1; - if(myConstructorId == 0) { - GroupPoints->SpinBox_DX->SetValue(myStep1); - if(myOkBase && myOkDir1) - this->MakeMultiTranslationSimulationAndDisplay(); - } - else if(myConstructorId == 1) { - GroupDimensions->SpinBox_DX1->SetValue(myStep1); - if(myOkBase && myOkDir1 && myOkDir2) - this->MakeMultiTranslationSimulationAndDisplay(); - } - return; + myStepU = -myStepU; + + int aConstructorId = getConstructorId(); + + if(aConstructorId == 0) + GroupPoints->SpinBox_DX->SetValue(myStepU); + else if(aConstructorId == 1) + GroupDimensions->SpinBox_DX1->SetValue(myStepU); + + displayPreview(); } //================================================================================= -// function : ReverseAngle2() +// function : ReverseStepV // purpose : 'state' not used here //================================================================================= -void TransformationGUI_MultiTranslationDlg::ReverseAngle2(int state) +void TransformationGUI_MultiTranslationDlg::ReverseStepV() { - myStep2 = -myStep2; - GroupDimensions->SpinBox_DX2->SetValue(myStep2); - if(myOkBase && myOkDir1 && myOkDir2) - MakeMultiTranslationSimulationAndDisplay(); - return; + myStepV = -myStepV; + + GroupDimensions->SpinBox_DX2->SetValue(myStepV); + + displayPreview(); } //================================================================================= -// function : MakeMultiTranslationSimulationAndDisplay() +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr TransformationGUI_MultiTranslationDlg::createOperation() +{ + return getGeomEngine()->GetITransformOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_MultiTranslationDlg::isValid( QString& msg ) +{ + int aConstructorId = getConstructorId(); + + if(aConstructorId == 0) + return !(myBase->_is_nil() || myVectorU->_is_nil()); + else if(aConstructorId == 1) + return !(myBase->_is_nil() || myVectorU->_is_nil() || myVectorV->_is_nil()); + return 0; +} + +//================================================================================= +// function : execute // purpose : //================================================================================= -void TransformationGUI_MultiTranslationDlg::MakeMultiTranslationSimulationAndDisplay() +bool TransformationGUI_MultiTranslationDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - int i, j; - Standard_Real DX, DY, DZ; - gp_Trsf theTransformation; - GProp_GProps System; - TopoDS_Compound compound; - - BRep_Builder B; - B.MakeCompound(compound); - - try { - BRepGProp::LinearProperties(myBase, System); - gp_Pnt myPoint = System.CentreOfMass(); - TopoDS_Shape S = BRepBuilderAPI_MakeVertex(myPoint).Shape(); - - switch (myConstructorId) + bool res = false; + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : { - case 0 : - { - gp_Vec Vec(myDir1); - Vec.Normalize(); - - for(i = 0; i < myNbTimes1; i++) { - DX = i * myStep1 * Vec.X(); - DY = i * myStep1 * Vec.Y(); - DZ = i * myStep1 * Vec.Z(); - myVec.SetCoord(DX, DY, DZ); - - theTransformation.SetTranslation(myVec); - BRepBuilderAPI_Transform myBRepTransformation(S, theTransformation, Standard_False); - B.Add(compound, myBRepTransformation.Shape()); - } - mySimulationTopoDs = compound; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - break; + if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVectorU ) ) { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiTranslate1D( myBase, myVectorU, myStepU, myNbTimesU ); + res = true; } - case 1 : - { - gp_Vec Vec1(myDir1); - Vec1.Normalize(); - gp_Vec Vec2(myDir2); - Vec2.Normalize(); - - for(i = 0; i < myNbTimes1; i++) { - for(j = 0; j < myNbTimes2; j++) { - DX = i * myStep1 * Vec1.X() + j * myStep2 * Vec2.X(); - DY = i * myStep1 * Vec1.Y() + j * myStep2 * Vec2.Y(); - DZ = i * myStep1 * Vec1.Z() + j * myStep2 * Vec2.Z(); - myVec.SetCoord(DX, DY, DZ); - - theTransformation.SetTranslation(myVec); - BRepBuilderAPI_Transform myBRepTransformation(S, theTransformation, Standard_False); - B.Add(compound, myBRepTransformation.Shape()); - } + break; + } + case 1 : + { + if ( !CORBA::is_nil( myBase ) && !CORBA::is_nil( myVectorU ) && !CORBA::is_nil( myVectorV ) ) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->MultiTranslate2D( myBase, myVectorU, myStepU, myNbTimesU, + myVectorV, myStepV, myNbTimesV ); + res = true; } - mySimulationTopoDs = compound; - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - break; - } + break; } - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeMultitranslationSimulationAndDisplay"); - return; - } - return; + } + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return res; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_MultiTranslationDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); } diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h index 26b39d78a..1440ab66f 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h @@ -33,11 +33,6 @@ #include "DlgRef_2Sel2Spin1Check.h" #include "DlgRef_3Sel4Spin2Check.h" -#include "TransformationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" -#include -#include //================================================================================= // class : TransformationGUI_MultiTranslationDlg @@ -48,45 +43,41 @@ class TransformationGUI_MultiTranslationDlg : public GEOMBase_Skeleton Q_OBJECT public: - TransformationGUI_MultiTranslationDlg(QWidget* parent = 0, const char* name = 0, TransformationGUI* theTransformationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + TransformationGUI_MultiTranslationDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~TransformationGUI_MultiTranslationDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeMultiTranslationSimulationAndDisplay(); - - TransformationGUI* myTransformationGUI; - - double step; - int myConstructorId; /* Current constructor id = radio button id */ - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */ - - TopoDS_Shape myBase; - GEOM::GEOM_Shape_var myGeomShape; /* is myBase */ - gp_Vec myVec; - int myNbTimes1; - int myNbTimes2; - Standard_Real myStep1; - Standard_Real myStep2; - gp_Dir myDir1; - gp_Dir myDir2; - bool myOkBase; - bool myOkDir1; - bool myOkDir2; - + + GEOM::GEOM_Object_var myBase, myVectorU, myVectorV ; + int myNbTimesU; + int myNbTimesV; + Standard_Real myStepU; + Standard_Real myStepV; + DlgRef_2Sel2Spin1Check* GroupPoints; DlgRef_3Sel4Spin2Check* GroupDimensions; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ReverseAngle1(int state); - void ReverseAngle2(int state); + void ReverseStepU(); + void ReverseStepV(); void ValueChangedInSpinBox(double newValue); void ConstructorsClicked(int constructorId); diff --git a/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx new file mode 100644 index 000000000..ba0cd6381 --- /dev/null +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.cxx @@ -0,0 +1,346 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : TransformationGUI_OffsetDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM +// $Header$ + +#include "TransformationGUI_OffsetDlg.h" +#include +#include "utilities.h" + +#include + +using namespace std; + +//================================================================================= +// class : TransformationGUI_OffsetDlg() +// purpose : Constructs a TransformationGUI_OffsetDlg 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. +//================================================================================= +TransformationGUI_OffsetDlg::TransformationGUI_OffsetDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_OFFSET"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_OFFSET_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_OFFSET")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel1Spin1Check(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); + GroupPoints->TextLabel2->setText(tr("GEOM_OFFSET")); + GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); + + // san -- modification of an exisitng object by offset is not allowed + GroupPoints->CheckButton1->hide(); + + GroupPoints->PushButton1->setPixmap(image1); + + Layout1->addWidget(GroupPoints, 2, 0); + + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~TransformationGUI_OffsetDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +TransformationGUI_OffsetDlg::~TransformationGUI_OffsetDlg() +{ + /* no need to delete child widgets, Qt does it all for us */ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + GroupPoints->LineEdit1->setReadOnly( true ); + + /* Get setting of step value from file configuration */ + double step = 1; + + /* min, max, step and decimals for spin boxes & initial values */ + GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox_DX->setPrecision(5); + GroupPoints->SpinBox_DX->setDblPrecision(1e-05); + GroupPoints->SpinBox_DX->SetValue(1e-05); + + // Activate Create a Copy mode + GroupPoints->CheckButton1->setChecked(true); + CreateCopyModeChanged(true); + + /* signals and slots connections */ + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); + + initName( tr( "GEOM_OFFSET" ) ); + + globalSelection( GEOM_ALLSHAPES ); + +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool TransformationGUI_OffsetDlg::ClickOnApply() +{ + if ( !onAccept( GroupPoints->CheckButton1->isChecked() ) ) + return false; + + initName(); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_OffsetDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void TransformationGUI_OffsetDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText(""); + QString aName; + + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + if(aNbSel < 1) + { + myObjects.length(0); + return; + } + + // nbSel > 0 + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects); + if (!myObjects.length()) + return; + if(aNbSel != 1) + aName = tr("%1_objects").arg(aNbSel); + + myEditCurrentArgument->setText( aName ); + + displayPreview(); +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + if ( send == GroupPoints->LineEdit1 ) + { + myEditCurrentArgument = GroupPoints->LineEdit1; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if(send == GroupPoints->PushButton1) + { + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); + } +} + + +//================================================================================= +// function : enterEvent() +// purpose : when mouse enter onto the QWidget +//================================================================================= +void TransformationGUI_OffsetDlg::enterEvent(QEvent * e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + globalSelection( GEOM_ALLSHAPES ); + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_OffsetDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : ValueChangedInSpinBox() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::ValueChangedInSpinBox() +{ + displayPreview(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr TransformationGUI_OffsetDlg::createOperation() +{ + return getGeomEngine()->GetITransformOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_OffsetDlg::isValid( QString& msg ) +{ + return !(myObjects.length() == 0); +} + + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool TransformationGUI_OffsetDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + + 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() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->OffsetShape( myObjects[i], GetOffset() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + + res = true; + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : GetOffset() +// purpose : +//================================================================================= +double TransformationGUI_OffsetDlg::GetOffset() const +{ + return GroupPoints->SpinBox_DX->GetValue(); +} + + +//================================================================================= +// function : CreateCopyModeChanged() +// purpose : +//================================================================================= +void TransformationGUI_OffsetDlg::CreateCopyModeChanged(bool isCreateCopy) +{ + this->GroupBoxName->setEnabled(isCreateCopy); +} diff --git a/src/RepairGUI/RepairGUI_OrientationDlg.h b/src/TransformationGUI/TransformationGUI_OffsetDlg.h similarity index 60% rename from src/RepairGUI/RepairGUI_OrientationDlg.h rename to src/TransformationGUI/TransformationGUI_OffsetDlg.h index 49f54a5da..e14ccc4cf 100644 --- a/src/RepairGUI/RepairGUI_OrientationDlg.h +++ b/src/TransformationGUI/TransformationGUI_OffsetDlg.h @@ -21,55 +21,59 @@ // // // -// File : RepairGUI_OrientationDlg.h -// Author : Lucien PIGNOLONI +// File : TransformationGUI_OffsetDlg.h +// Author : Michael Zorin // Module : GEOM -// $Header$ +// $Header: /dn05/salome/PAL/GEOM/GEOM_SRC/src/TransformationGUI/TransformationGUI_Offset.h -#ifndef DIALOGBOX_ORIENTATION_H -#define DIALOGBOX_ORIENTATION_H +#ifndef DIALOGBOX_OFFSET_H +#define DIALOGBOX_OFFSET_H #include "GEOMBase_Skeleton.h" #include "DlgRef_1Sel1Spin1Check.h" - -#include "RepairGUI.h" - + + //================================================================================= -// class : DialogBox_ORIENTATION +// class : TransformationGUI_OffsetDlg // purpose : //================================================================================= -class RepairGUI_OrientationDlg : public GEOMBase_Skeleton +class TransformationGUI_OffsetDlg : public GEOMBase_Skeleton { Q_OBJECT public: - RepairGUI_OrientationDlg(QWidget* parent = 0, const char* name = 0, RepairGUI* theRepairGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~RepairGUI_OrientationDlg(); + TransformationGUI_OffsetDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~TransformationGUI_OffsetDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); private : void Init(); void enterEvent(QEvent* e); - void MakeOrientationSimulationAndDisplay(); - - RepairGUI* myRepairGUI; - - GEOM::GEOM_Shape_var myGeomShape; /* is myShape */ - TopoDS_Shape myShape; /* topology used */ - Standard_Real myLength; /* to simulate normal vector */ - bool myOkShape; - + double GetOffset() const; + + GEOM::ListOfGO myObjects; + DlgRef_1Sel1Spin1Check* GroupPoints; - -private slots: + +private slots : void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); - void LineEditReturnPressed(); + void DeactivateActiveDialog(); void SelectionIntoArgument(); + void LineEditReturnPressed(); void SetEditCurrentArgument(); - void ReverseAngle(int state); - void ValueChangedInSpinBox(double newValue); - + void ValueChangedInSpinBox(); + void CreateCopyModeChanged(bool isCreateCopy); }; -#endif // DIALOGBOX_ORIENTATION_H +#endif // DIALOGBOX_OFFSET_H + diff --git a/src/TransformationGUI/TransformationGUI_PositionDlg.cxx b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx new file mode 100644 index 000000000..d6fca9051 --- /dev/null +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.cxx @@ -0,0 +1,438 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : TransformationGUI_PositionDlg.cxx +// Author : Damien COQUERET +// Module : GEOM +// $Header$ + +#include "TransformationGUI_PositionDlg.h" + +#include "QAD_Desktop.h" + +#include + +#include "GEOMImpl_Types.hxx" + +#include "utilities.h" + +using namespace std; + +//================================================================================= +// class : TransformationGUI_PositionDlg() +// purpose : Constructs a TransformationGUI_PositionDlg 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. +//================================================================================= +TransformationGUI_PositionDlg::TransformationGUI_PositionDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) + :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POSITION"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_POSITION2"))); + QPixmap imageselect(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_POSITION_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_POSITION")); + RadioButton1->setPixmap(image0); + RadioButton2->setPixmap(image1); + RadioButton3->close(TRUE); + + Group1 = new DlgRef_3Sel3Spin1Check(this, "Group1"); + Group1->SpinBox1->hide(); + Group1->SpinBox2->hide(); + Group1->SpinBox3->hide(); + Group1->TextLabel4->hide(); + Group1->TextLabel5->hide(); + Group1->TextLabel6->hide(); + Group1->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + Group1->TextLabel1->setText(tr("GEOM_OBJECTS")); + Group1->TextLabel2->setText(tr("GEOM_START_LCS")); + Group1->TextLabel3->setText(tr("GEOM_END_LCS")); + Group1->PushButton1->setPixmap(imageselect); + Group1->PushButton2->setPixmap(imageselect); + Group1->PushButton3->setPixmap(imageselect); + Group1->CheckBox1->setText(tr("GEOM_CREATE_COPY")); + + Layout1->addWidget(Group1, 2, 0); + + /***************************************************************/ + + Init(); +} + + +//================================================================================= +// function : ~TransformationGUI_PositionDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +TransformationGUI_PositionDlg::~TransformationGUI_PositionDlg() +{ + /* no need to delete child widgets, Qt does it all for us */ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::Init() +{ + /* init variables */ + Group1->LineEdit1->setReadOnly(true); + Group1->LineEdit2->setReadOnly(true); + Group1->LineEdit3->setReadOnly(true); + + myStartLCS = GEOM::GEOM_Object::_nil(); + myEndLCS = GEOM::GEOM_Object::_nil(); + + // Activate Create a Copy mode + Group1->CheckBox1->setChecked(true); + CreateCopyModeChanged(true); + + /* signals and slots connections */ + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int))); + + connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(Group1->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(Group1->LineEdit3, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(Group1->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + initName( tr( "GEOM_POSITION" ) ); + ConstructorsClicked( 0 ); +} + + + +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void TransformationGUI_PositionDlg::ConstructorsClicked(int constructorId) +{ + disconnect( mySelection, 0, this, 0 ); + + globalSelection(); + myEditCurrentArgument = Group1->LineEdit1; + Group1->LineEdit2->clear(); + Group1->LineEdit3->clear(); + myStartLCS = GEOM::GEOM_Object::_nil(); + myEndLCS = GEOM::GEOM_Object::_nil(); + + switch (constructorId) + { + case 0: + { + Group1->LineEdit2->hide(); + Group1->TextLabel2->hide(); + Group1->PushButton2->hide(); + break; + } + case 1: + { + Group1->LineEdit2->show(); + Group1->TextLabel2->show(); + Group1->PushButton2->show(); + break; + } + } + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + SelectionIntoArgument(); +} + + + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool TransformationGUI_PositionDlg::ClickOnApply() +{ + if ( !onAccept(Group1->CheckBox1->isChecked()) ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_PositionDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void TransformationGUI_PositionDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText(""); + QString aName; + + if(myEditCurrentArgument == Group1->LineEdit1) { + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + if(aNbSel < 1) { + myObjects.length(0); + displayPreview(); + return; + } + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects); + if (!myObjects.length()) { + displayPreview(); + return; + } + if(aNbSel != 1) + aName = tr("%1_objects").arg(aNbSel); + } + else if(myEditCurrentArgument == Group1->LineEdit2) { + myStartLCS = GEOM::GEOM_Object::_nil(); + if(mySelection->IObjectCount() != 1) { + displayPreview(); + return; + } + + Standard_Boolean testResult = Standard_False; + myStartLCS = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + if(!testResult || CORBA::is_nil( myStartLCS )) { + displayPreview(); + return; + } + aName = GEOMBase::GetName( myStartLCS ); + } + else if(myEditCurrentArgument == Group1->LineEdit3) { + myEndLCS = GEOM::GEOM_Object::_nil(); + if(mySelection->IObjectCount() != 1) { + displayPreview(); + return; + } + + Standard_Boolean testResult = Standard_False; + myEndLCS = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + if(!testResult || CORBA::is_nil( myEndLCS )) { + displayPreview(); + return; + } + aName = GEOMBase::GetName( myEndLCS ); + } + + myEditCurrentArgument->setText( aName ); + displayPreview(); +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + if(send == Group1->LineEdit1 || send == Group1->LineEdit2 || send == Group1->LineEdit3) { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if(send == Group1->PushButton1){ + myEditCurrentArgument = Group1->LineEdit1; + globalSelection(); + } + else if(send == Group1->PushButton2) { + myEditCurrentArgument = Group1->LineEdit2; + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_PLANE ); + aMap.Add( GEOM_MARKER ); + globalSelection( aMap ); + } + else if(send == Group1->PushButton3) { + myEditCurrentArgument = Group1->LineEdit3; + TColStd_MapOfInteger aMap; + aMap.Add( GEOM_PLANE ); + aMap.Add( GEOM_MARKER ); + globalSelection( aMap ); + } + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + ConstructorsClicked( getConstructorId() ); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_PositionDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : when mouse enter onto the QWidget +//================================================================================= +void TransformationGUI_PositionDlg::enterEvent(QEvent * e) +{ + if(!GroupConstructors->isEnabled()) + ActivateThisDialog(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr TransformationGUI_PositionDlg::createOperation() +{ + return getGeomEngine()->GetITransformOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_PositionDlg::isValid( QString& msg ) +{ + bool res; + if (getConstructorId() == 0) + res = !(myObjects.length() == 0 || myEndLCS->_is_nil()); + else + res = !(myObjects.length() == 0 || myStartLCS->_is_nil() || myEndLCS->_is_nil()); + + return res; +} + + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool TransformationGUI_PositionDlg::execute( ObjectList& objects ) +{ + bool res = false; + bool toCreateCopy = IsPreview() || Group1->CheckBox1->isChecked(); + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + for (int i = 0; i < myObjects.length(); i++) { + if (toCreateCopy) + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShapeCopy( myObjects[i], myObjects[i], myEndLCS ); + else + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShape( myObjects[i], myObjects[i], myEndLCS ); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + case 1 : + { + for (int i = 0; i < myObjects.length(); i++) { + if (toCreateCopy) + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShapeCopy( myObjects[i], myStartLCS, myEndLCS ); + else + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->PositionShape( myObjects[i], myStartLCS, myEndLCS ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + } + + return res; +} + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : CreateCopyModeChanged() +// purpose : +//================================================================================= +void TransformationGUI_PositionDlg::CreateCopyModeChanged(bool isCreateCopy) +{ + this->GroupBoxName->setEnabled(isCreateCopy); +} diff --git a/src/BooleanGUI/BooleanGUI_SectionDlg.h b/src/TransformationGUI/TransformationGUI_PositionDlg.h similarity index 57% rename from src/BooleanGUI/BooleanGUI_SectionDlg.h rename to src/TransformationGUI/TransformationGUI_PositionDlg.h index ef1f35282..cda05c5d9 100644 --- a/src/BooleanGUI/BooleanGUI_SectionDlg.h +++ b/src/TransformationGUI/TransformationGUI_PositionDlg.h @@ -21,54 +21,61 @@ // // // -// File : BooleanGUI_SectionDlg.h +// File : TransformationGUI_PositionDlg.h // Author : Lucien PIGNOLONI // Module : GEOM -// $Header: +// $Header$ -#ifndef DIALOGBOX_SECTION_H -#define DIALOGBOX_SECTION_H +#ifndef DIALOGBOX_POSITION_H +#define DIALOGBOX_POSITION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel_QTD.h" +#include "DlgRef_3Sel3Spin1Check.h" -#include "BooleanGUI.h" - -#include +#include "TransformationGUI.h" + //================================================================================= -// class : BooleanGUI_SectionDlg +// class : TransformationGUI_PositionDlg // purpose : //================================================================================= -class BooleanGUI_SectionDlg : public GEOMBase_Skeleton +class TransformationGUI_PositionDlg : public GEOMBase_Skeleton { Q_OBJECT public: - BooleanGUI_SectionDlg(QWidget* parent = 0, const char* name = 0, BooleanGUI* theBooleanGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); - ~BooleanGUI_SectionDlg(); - -private: - void Init(); - void enterEvent(QEvent* e); + TransformationGUI_PositionDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + ~TransformationGUI_PositionDlg(); - BooleanGUI* myBooleanGUI; +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); - GEOM::GEOM_Shape_var myGeomShape1; /* is myShape1 */ - GEOM::GEOM_Shape_var myGeomShape2; /* is myShape2 */ - bool myOkShape1; /* to check when arguments are defined */ - bool myOkShape2; + virtual void closeEvent( QCloseEvent* e ); - DlgRef_2Sel_QTD* GroupSection; - -private slots: +private : + void Init(); + void enterEvent(QEvent* e); + + GEOM::GEOM_Object_var myStartLCS; + GEOM::GEOM_Object_var myEndLCS; + GEOM::ListOfGO myObjects; + + DlgRef_3Sel3Spin1Check* Group1; + +private slots : void ClickOnOk(); - void ClickOnApply(); - void SetEditCurrentArgument(); - void SelectionIntoArgument(); - void LineEditReturnPressed(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); - + void DeactivateActiveDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + void ConstructorsClicked(int constructorId); + void CreateCopyModeChanged(bool isCreateCopy); }; -#endif // DIALOGBOX_SECTION_H +#endif // DIALOGBOX_MIRROR_H diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx index 6d61325c3..66fde50d0 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.cxx @@ -27,10 +27,13 @@ // $Header$ #include "TransformationGUI_RotationDlg.h" +#include -#include -#include -#include +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" + +#include #include "utilities.h" @@ -43,7 +46,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_RotationDlg::TransformationGUI_RotationDlg(QWidget* parent, const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +TransformationGUI_RotationDlg::TransformationGUI_RotationDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_ROTATION"))); @@ -57,20 +60,46 @@ TransformationGUI_RotationDlg::TransformationGUI_RotationDlg(QWidget* parent, c RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_2Sel1Spin1Check(this, "GroupPoints"); + GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); + GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupPoints->TextLabel2->setText(tr("GEOM_AXIS")); GroupPoints->TextLabel3->setText(tr("GEOM_ANGLE")); - GroupPoints->CheckButton1->setText(tr("GEOM_REVERSE")); + GroupPoints->LineEdit1->setReadOnly(true); + GroupPoints->LineEdit2->setReadOnly(true); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); + GroupPoints->CheckButton2->setText(tr("GEOM_REVERSE")); - Layout1->addWidget(GroupPoints, 1, 0); + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + double anAngle = 0; + double SpecificStep = 5; + /* min, max, step and decimals for spin boxes & initial values */ + GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); + GroupPoints->SpinBox_DX->SetValue(anAngle); + + // Activate Create a Copy mode + GroupPoints->CheckButton1->setChecked(true); + CreateCopyModeChanged(true); + + /* signals and slots connections */ + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); + connect(GroupPoints->CheckButton2, SIGNAL(toggled(bool)), this, SLOT(onReverse())); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* Initialisations */ - myTransformationGUI = theTransformationGUI; Init(); } @@ -93,37 +122,11 @@ void TransformationGUI_RotationDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - - myAngle = 0.0; - myOkBase = myOkAxis = false; - - myEdgeFilter = new GEOM_ShapeTypeFilter(TopAbs_EDGE, myGeom); - - double SpecificStep = 5; - /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); - GroupPoints->SpinBox_DX->SetValue(myAngle); - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->CheckButton1, SIGNAL(stateChanged(int)), this, SLOT(ReverseAngle(int))); + GroupPoints->LineEdit2->clear(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + myAxis = GEOM::GEOM_Object::_nil(); + + initName( tr( "GEOM_ROTATION" ) ); } @@ -133,9 +136,8 @@ void TransformationGUI_RotationDlg::Init() //================================================================================= void TransformationGUI_RotationDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -143,18 +145,23 @@ void TransformationGUI_RotationDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void TransformationGUI_RotationDlg::ClickOnApply() +bool TransformationGUI_RotationDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkBase && myOkAxis) - myTransformationGUI->MakeRotationAndDisplay(myGeomShape, myLoc, myDir, myAngle*PI180); - return; + if ( !onAccept( GroupPoints->CheckButton1->isChecked()) ) + return false; + + Init(); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_RotationDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -164,46 +171,39 @@ void TransformationGUI_RotationDlg::ClickOnApply() //================================================================================= void TransformationGUI_RotationDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ + QString aName; - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if(nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkBase = false; - else if(myEditCurrentArgument == GroupPoints->LineEdit2) - myOkAxis = false; - return; - } + if(myEditCurrentArgument == GroupPoints->LineEdit1) + { + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + if(aNbSel < 1) + { + myObjects.length(0); + return; + } + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects); + if (!myObjects.length()) + return; + if(aNbSel != 1) + aName = tr("%1_objects").arg(aNbSel); + } + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + { + if(mySelection->IObjectCount() != 1) + { + myAxis = GEOM::GEOM_Object::_nil(); + return; + } + Standard_Boolean testResult = Standard_False; + myAxis = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + if(!testResult || CORBA::is_nil( myAxis )) + return; + aName = GEOMBase::GetName( myAxis ); + } + myEditCurrentArgument->setText( aName ); - // nbSel == 1 - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return; - myEditCurrentArgument->setText(aString); - myOkBase = true; - myBase = S; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2) { - BRepAdaptor_Curve curv(TopoDS::Edge(S)); - myDir = curv.Line().Direction(); - myLoc = curv.Line().Location(); - myEditCurrentArgument->setText(aString); - myOkAxis = true; - } - - if(myOkBase && myOkAxis) - this->MakeRotationSimulationAndDisplay(); - return; + displayPreview(); } @@ -214,20 +214,18 @@ void TransformationGUI_RotationDlg::SelectionIntoArgument() void TransformationGUI_RotationDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection(); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myEdgeFilter); + globalSelection( GEOM_LINE ); } - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -238,15 +236,12 @@ void TransformationGUI_RotationDlg::SetEditCurrentArgument() void TransformationGUI_RotationDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -258,11 +253,21 @@ void TransformationGUI_RotationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + globalSelection(); GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + GroupPoints->LineEdit2->clear(); + myAxis = GEOM::GEOM_Object::_nil(); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_RotationDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -272,10 +277,8 @@ void TransformationGUI_RotationDlg::ActivateThisDialog() //================================================================================= void TransformationGUI_RotationDlg::enterEvent(QEvent* e) { - if (GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if (!GroupConstructors->isEnabled()) + ActivateThisDialog(); } @@ -283,49 +286,98 @@ void TransformationGUI_RotationDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void TransformationGUI_RotationDlg::ValueChangedInSpinBox(double newValue) +void TransformationGUI_RotationDlg::ValueChangedInSpinBox() { - myAngle = newValue; - if(myOkBase && myOkAxis) - MakeRotationSimulationAndDisplay(); - return; + displayPreview(); } //================================================================================= -// function : MakeRotationSimulationAndDisplay() +// function : createOperation // purpose : //================================================================================= -void TransformationGUI_RotationDlg::MakeRotationSimulationAndDisplay() +GEOM::GEOM_IOperations_ptr TransformationGUI_RotationDlg::createOperation() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - try { - gp_Ax1 AX(myLoc, myDir); - gp_Trsf theTransformation; - theTransformation.SetRotation(AX, myAngle*PI180); - BRepBuilderAPI_Transform myBRepTransformation(myBase, theTransformation, Standard_False); - this->mySimulationTopoDs = myBRepTransformation.Shape(); - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeRotationSimulationAndDisplay"); - return; - } - return; + return getGeomEngine()->GetITransformOperations( getStudyId() ); } //================================================================================= -// function : ReverseAngle() -// purpose : 'state' not used here +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_RotationDlg::isValid( QString& msg ) +{ + return !(myObjects.length() == 0 || myAxis->_is_nil()); +} + + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool TransformationGUI_RotationDlg::execute( ObjectList& objects ) +{ + bool res = false; + + GEOM::GEOM_Object_var anObj; + + if (GroupPoints->CheckButton1->isChecked() || IsPreview()) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->RotateCopy( myObjects[i], myAxis, GetAngle() * PI180 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->Rotate( myObjects[i], myAxis, GetAngle() * PI180 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + + return res; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_RotationDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : GetAngle() +// purpose : +//================================================================================= +double TransformationGUI_RotationDlg::GetAngle() const +{ + return GroupPoints->SpinBox_DX->GetValue(); +} + + +//================================================================================= +// function : CreateCopyModeChanged() +// purpose : +//================================================================================= +void TransformationGUI_RotationDlg::CreateCopyModeChanged(bool isCreateCopy) +{ + this->GroupBoxName->setEnabled(isCreateCopy); +} + + +//================================================================================= +// function : onReverse() +// purpose : //================================================================================= -void TransformationGUI_RotationDlg::ReverseAngle(int state) +void TransformationGUI_RotationDlg::onReverse() { - myAngle = -myAngle; - GroupPoints->SpinBox_DX->SetValue(myAngle); - if(myOkBase && myOkAxis) - MakeRotationSimulationAndDisplay(); - return; + double anOldValue = GroupPoints->SpinBox_DX->GetValue(); + GroupPoints->SpinBox_DX->SetValue( -anOldValue ); } diff --git a/src/TransformationGUI/TransformationGUI_RotationDlg.h b/src/TransformationGUI/TransformationGUI_RotationDlg.h index c0cda42cc..ab3dc222e 100644 --- a/src/TransformationGUI/TransformationGUI_RotationDlg.h +++ b/src/TransformationGUI/TransformationGUI_RotationDlg.h @@ -30,13 +30,8 @@ #define DIALOGBOX_ROTATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin1Check.h" - -#include "TransformationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" -#include - +#include "DlgRef_2Sel1Spin2Check.h" + //================================================================================= // class : TransformationGUI_RotationDlg // purpose : @@ -46,38 +41,39 @@ class TransformationGUI_RotationDlg : public GEOMBase_Skeleton Q_OBJECT public: - TransformationGUI_RotationDlg(QWidget* parent = 0, const char* name = 0, TransformationGUI* theTransformationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + TransformationGUI_RotationDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~TransformationGUI_RotationDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeRotationSimulationAndDisplay(); + double GetAngle() const; - TransformationGUI* myTransformationGUI; - - Handle(GEOM_ShapeTypeFilter) myEdgeFilter; /* Filters selection */ - - TopoDS_Shape myBase; - GEOM::GEOM_Shape_var myGeomShape; /* is myBase */ - gp_Pnt myLoc; - gp_Dir myDir; - Standard_Real myAngle; - bool myOkBase; - bool myOkAxis; - - DlgRef_2Sel1Spin1Check* GroupPoints; + GEOM::ListOfGO myObjects; + GEOM::GEOM_Object_var myAxis; + + DlgRef_2Sel1Spin2Check* GroupPoints; private slots: void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ReverseAngle(int state); - void ValueChangedInSpinBox(double newValue); - + void ValueChangedInSpinBox(); + void CreateCopyModeChanged(bool isCreateCopy); + void onReverse(); }; #endif // DIALOGBOX_ROTATION_H diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx index 96b875d8b..bcfec2b55 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.cxx @@ -28,7 +28,11 @@ #include "TransformationGUI_ScaleDlg.h" -#include +#include "QAD_Desktop.h" + +#include "GEOMImpl_Types.hxx" + +#include #include "utilities.h" @@ -41,7 +45,7 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(QWidget* parent, const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_SCALE"))); @@ -55,19 +59,49 @@ TransformationGUI_ScaleDlg::TransformationGUI_ScaleDlg(QWidget* parent, const ch RadioButton2->close(TRUE); RadioButton3->close(TRUE); - GroupPoints = new DlgRef_2Sel1Spin(this, "GroupPoints"); + GroupPoints = new DlgRef_2Sel1Spin2Check(this, "GroupPoints"); + GroupPoints->CheckButton2->hide(); GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); + GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); GroupPoints->TextLabel2->setText(tr("GEOM_CENTRAL_POINT")); GroupPoints->TextLabel3->setText(tr("GEOM_SCALE_FACTOR")); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); GroupPoints->PushButton1->setPixmap(image1); GroupPoints->PushButton2->setPixmap(image1); + GroupPoints->CheckButton1->setText(tr("GEOM_CREATE_COPY")); - Layout1->addWidget(GroupPoints, 1, 0); + // san -- modification of an exisitng object by offset is not allowed + GroupPoints->CheckButton1->hide(); + + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ + double aFactor = 2.0; + double SpecificStep = 0.5; + /* min, max, step and decimals for spin boxes & initial values */ + GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); + GroupPoints->SpinBox_DX->SetValue(aFactor); + + // Activate Create a Copy mode + GroupPoints->CheckButton1->setChecked(true); + CreateCopyModeChanged(true); + + /* signals and slots connections */ + connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + + connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + + connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); + connect(GroupPoints->CheckButton1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); + + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* Initialisations */ - myTransformationGUI = theTransformationGUI; Init(); } @@ -88,40 +122,12 @@ TransformationGUI_ScaleDlg::~TransformationGUI_ScaleDlg() //================================================================================= void TransformationGUI_ScaleDlg::Init() { - /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - - myPoint1.SetCoord(0.0, 0.0, 0.0); - myOkPoint1 = myOkBaseTopo = false; - myFactor = 2.0; - - myVertexFilter = new GEOM_ShapeTypeFilter(TopAbs_VERTEX, myGeom); - - double SpecificStep = 0.5; - /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, SpecificStep, 3); - GroupPoints->SpinBox_DX->SetValue(myFactor); - - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); - - connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); + GroupPoints->LineEdit2->clear(); - connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - - /* displays Dialog */ - GroupPoints->show(); - this->show(); - - return; + myPoint = GEOM::GEOM_Object::_nil(); + + initName( tr( "GEOM_SCALE" ) ); } @@ -131,9 +137,8 @@ void TransformationGUI_ScaleDlg::Init() //================================================================================= void TransformationGUI_ScaleDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -141,18 +146,23 @@ void TransformationGUI_ScaleDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void TransformationGUI_ScaleDlg::ClickOnApply() +bool TransformationGUI_ScaleDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkBaseTopo && myOkPoint1) - myTransformationGUI->MakeScaleAndDisplay(myGeomShape, myPoint1, myFactor); - return; + if ( !onAccept(GroupPoints->CheckButton1->isChecked()) ) + return false; + + Init(); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_ScaleDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -162,44 +172,39 @@ void TransformationGUI_ScaleDlg::ClickOnApply() //================================================================================= void TransformationGUI_ScaleDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ + QString aName; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) + { + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + if(aNbSel < 1) + { + myObjects.length(0); + return; + } + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects); + if (!myObjects.length()) + return; + if(aNbSel != 1) + aName = tr("%1_objects").arg(aNbSel); + } + else if(myEditCurrentArgument == GroupPoints->LineEdit2) + { + if(mySelection->IObjectCount() != 1) + { + myPoint = GEOM::GEOM_Object::_nil(); + return; + } + Standard_Boolean testResult = Standard_False; + myPoint = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + if(!testResult || CORBA::is_nil( myPoint )) + return; + aName = GEOMBase::GetName( myPoint ); + } + myEditCurrentArgument->setText( aName ); - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkBaseTopo = false; - else if (myEditCurrentArgument == GroupPoints->LineEdit2) - myOkPoint1 = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - /* gp_Pnt : not used */ - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return ; - GroupPoints->LineEdit1->setText(aString); - myBaseTopo = S; - myOkBaseTopo = true; - } - else if(myEditCurrentArgument == GroupPoints->LineEdit2 && myGeomBase->VertexToPoint(S, myPoint1)) { - GroupPoints->LineEdit2->setText(aString); - myOkPoint1 = true; - } - - if(myOkPoint1 && myOkBaseTopo) - this->MakeScaleSimulationAndDisplay(); - return; + displayPreview(); } @@ -210,15 +215,12 @@ void TransformationGUI_ScaleDlg::SelectionIntoArgument() void TransformationGUI_ScaleDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else if (send == GroupPoints->LineEdit2) - myEditCurrentArgument = GroupPoints->LineEdit2; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + if(send == GroupPoints->LineEdit1 || + send == GroupPoints->LineEdit2) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } @@ -229,20 +231,18 @@ void TransformationGUI_ScaleDlg::LineEditReturnPressed() void TransformationGUI_ScaleDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - mySelection->ClearFilters(); - + if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection(); } else if(send == GroupPoints->PushButton2) { - GroupPoints->LineEdit2->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit2; - mySelection->AddFilter(myVertexFilter); + globalSelection( GEOM_POINT ); } - this->SelectionIntoArgument(); - - return; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -254,11 +254,19 @@ void TransformationGUI_ScaleDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + globalSelection(); GroupPoints->LineEdit1->setFocus(); myEditCurrentArgument = GroupPoints->LineEdit1; - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_ScaleDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -268,10 +276,8 @@ void TransformationGUI_ScaleDlg::ActivateThisDialog() //================================================================================= void TransformationGUI_ScaleDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); } @@ -279,37 +285,86 @@ void TransformationGUI_ScaleDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void TransformationGUI_ScaleDlg::ValueChangedInSpinBox(double newValue) +void TransformationGUI_ScaleDlg::ValueChangedInSpinBox() +{ + displayPreview(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr TransformationGUI_ScaleDlg::createOperation() +{ + return getGeomEngine()->GetITransformOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool TransformationGUI_ScaleDlg::isValid( QString& msg ) { - myFactor = newValue; - if(fabs(myFactor) > 0.00001 && myOkPoint1 && myOkBaseTopo) - MakeScaleSimulationAndDisplay(); - return; + return !(myObjects.length() == 0 || myPoint->_is_nil() || fabs(GetFactor()) <= 0.00001); } //================================================================================= -// function : MakeScaleSimulationAndDisplay() +// function : execute // purpose : //================================================================================= -void TransformationGUI_ScaleDlg::MakeScaleSimulationAndDisplay() +bool TransformationGUI_ScaleDlg::execute( ObjectList& objects ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + bool res = false; - try { - gp_Trsf theTransformation; - theTransformation.SetScale(myPoint1, myFactor); - BRepBuilderAPI_Transform myBRepTransformation(myBaseTopo, theTransformation, Standard_False); - mySimulationTopoDs = myBRepTransformation.Shape(); - if(mySimulationTopoDs.IsNull()) - return; - else - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeScaleSimulationAndDisplay"); - return; - } - return; + GEOM::GEOM_Object_var anObj; + + if (GroupPoints->CheckButton1->isChecked() || IsPreview()) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShapeCopy( myObjects[i], myPoint, GetFactor() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->ScaleShape( myObjects[i], myPoint, GetFactor() ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + + return res; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_ScaleDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : GetFactor() +// purpose : +//================================================================================= +double TransformationGUI_ScaleDlg::GetFactor() const +{ + return GroupPoints->SpinBox_DX->GetValue(); +} + + +//================================================================================= +// function : CreateCopyModeChanged() +// purpose : +//================================================================================= +void TransformationGUI_ScaleDlg::CreateCopyModeChanged(bool isCreateCopy) +{ + this->GroupBoxName->setEnabled(isCreateCopy); } diff --git a/src/TransformationGUI/TransformationGUI_ScaleDlg.h b/src/TransformationGUI/TransformationGUI_ScaleDlg.h index bb7c59c51..b2894a805 100644 --- a/src/TransformationGUI/TransformationGUI_ScaleDlg.h +++ b/src/TransformationGUI/TransformationGUI_ScaleDlg.h @@ -30,12 +30,9 @@ #define DIALOGBOX_SCALE_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_2Sel1Spin.h" - -#include "TransformationGUI.h" - -#include "GEOM_ShapeTypeFilter.hxx" - +#include "DlgRef_2Sel1Spin2Check.h" + + //================================================================================= // class : TransformationGUI_ScaleDlg // purpose : @@ -45,36 +42,38 @@ class TransformationGUI_ScaleDlg : public GEOMBase_Skeleton Q_OBJECT public: - TransformationGUI_ScaleDlg(QWidget* parent = 0, const char* name = 0, TransformationGUI* theTransformationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + TransformationGUI_ScaleDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~TransformationGUI_ScaleDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeScaleSimulationAndDisplay(); - - TransformationGUI* myTransformationGUI; - - Handle(GEOM_ShapeTypeFilter) myVertexFilter; - - gp_Pnt myPoint1; /* Points containing the vector */ - bool myOkPoint1; /* true when myPoint1 is defined */ - TopoDS_Shape myBaseTopo; - bool myOkBaseTopo; /* true when myBaseTopo is defined */ - GEOM::GEOM_Shape_var myGeomShape; /* is myBaseTopo */ - Standard_Real myFactor; - - DlgRef_2Sel1Spin* GroupPoints; + double GetFactor() const; + + GEOM::ListOfGO myObjects; + GEOM::GEOM_Object_var myPoint; /* Central Point */ + + DlgRef_2Sel1Spin2Check* GroupPoints; private slots : void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); - + void ValueChangedInSpinBox(); + void CreateCopyModeChanged(bool isCreateCopy); }; #endif // DIALOGBOX_SCALE_H diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx index 59f6e60d1..0654d2ad4 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.cxx @@ -28,8 +28,12 @@ #include "TransformationGUI_TranslationDlg.h" -#include #include "QAD_Config.h" +#include "QAD_Desktop.h" + +#include + +#include "GEOMImpl_Types.hxx" #include "utilities.h" @@ -42,33 +46,39 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg(QWidget* parent, const char* name, TransformationGUI* theTransformationGUI, SALOME_Selection* Sel, bool modal, WFlags fl) +TransformationGUI_TranslationDlg::TransformationGUI_TranslationDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl) :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) { - QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TRANSLATION"))); - QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); + QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TRANSLATION_DXYZ"))); + QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TRANSLATION_POINTS"))); + QPixmap image2(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TRANSLATION_VECTOR"))); + QPixmap image3(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT"))); setCaption(tr("GEOM_TRANSLATION_TITLE")); /***************************************************************/ GroupConstructors->setTitle(tr("GEOM_TRANSLATION")); RadioButton1->setPixmap(image0); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + RadioButton2->setPixmap(image1); + RadioButton3->setPixmap(image2); - GroupPoints = new DlgRef_1Sel3Spin(this, "GroupPoints"); - GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - GroupPoints->TextLabel1->setText(tr("GEOM_OBJECT")); - GroupPoints->TextLabel2->setText(tr("GEOM_DX")); - GroupPoints->TextLabel3->setText(tr("GEOM_DY")); - GroupPoints->TextLabel4->setText(tr("GEOM_DZ")); - GroupPoints->PushButton1->setPixmap(image1); + RadioButton1->setChecked(true); - Layout1->addWidget(GroupPoints, 1, 0); + GroupPoints = new DlgRef_3Sel3Spin1Check(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); + GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS")); + GroupPoints->TextLabel3->setText(tr("GEOM_POINT_I").arg("2")); + GroupPoints->TextLabel4->setText(tr("GEOM_DX")); + GroupPoints->TextLabel5->setText(tr("GEOM_DY")); + GroupPoints->TextLabel6->setText(tr("GEOM_DZ")); + GroupPoints->PushButton1->setPixmap(image3); + GroupPoints->PushButton2->setPixmap(image3); + GroupPoints->PushButton3->setPixmap(image3); + GroupPoints->CheckBox1->setText(tr("GEOM_CREATE_COPY")); + + Layout1->addWidget(GroupPoints, 2, 0); /***************************************************************/ - - /* Initialisations */ - myTransformationGUI = theTransformationGUI; + Init(); } @@ -91,45 +101,102 @@ void TransformationGUI_TranslationDlg::Init() { /* init variables */ myEditCurrentArgument = GroupPoints->LineEdit1; - - myVec.SetCoord(0.0, 0.0, 0.0); - myOkBase = false; - + GroupPoints->LineEdit1->setReadOnly(true); + GroupPoints->LineEdit2->setReadOnly(true); + GroupPoints->LineEdit3->setReadOnly(true); + + myVector = myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); + + // Activate Create a Copy mode + GroupPoints->CheckBox1->setChecked(true); + CreateCopyModeChanged(true); + /* Get setting of step value from file configuration */ QString St = QAD_CONFIG->getSetting("Geometry:SettingsGeomStep"); - step = St.toDouble(); - + double step = St.toDouble(); + /* min, max, step and decimals for spin boxes & initial values */ - GroupPoints->SpinBox_DX->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DY->RangeStepAndValidator(-999.999, 999.999, step, 3); - GroupPoints->SpinBox_DZ->RangeStepAndValidator(-999.999, 999.999, step, 3); - - GroupPoints->SpinBox_DX->SetValue(0.0); - GroupPoints->SpinBox_DY->SetValue(0.0); - GroupPoints->SpinBox_DZ->SetValue(0.0); - + GroupPoints->SpinBox1->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox2->RangeStepAndValidator(-999.999, 999.999, step, 3); + GroupPoints->SpinBox3->RangeStepAndValidator(-999.999, 999.999, step, 3); + + GroupPoints->SpinBox1->SetValue(0.0); + GroupPoints->SpinBox2->SetValue(0.0); + GroupPoints->SpinBox3->SetValue(0.0); + /* signals and slots connections */ connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + connect(GroupConstructors, SIGNAL(clicked(int)), SLOT(ConstructorsClicked(int))); connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + connect(GroupPoints->PushButton3, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(GroupPoints->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); - connect(GroupPoints->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); // MZN: Delete ? - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double))); - connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DZ, SLOT(SetStep(double))); + connect(GroupPoints->SpinBox1, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox2, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + connect(GroupPoints->SpinBox3, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox())); + + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox1, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox2, SLOT(SetStep(double))); + connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox3, SLOT(SetStep(double))); + + connect(GroupPoints->CheckBox1, SIGNAL(toggled(bool)), this, SLOT(CreateCopyModeChanged(bool))); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; - /* displays Dialog */ - GroupPoints->show(); - this->show(); + initName( tr( "GEOM_TRANSLATION" ) ); + ConstructorsClicked( 0 ); +} + - return; +//================================================================================= +// function : ConstructorsClicked() +// purpose : Radio button management +//================================================================================= +void TransformationGUI_TranslationDlg::ConstructorsClicked(int constructorId) +{ + disconnect( mySelection, 0, this, 0 ); + + myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection(); + + switch (constructorId) + { + case 0: /* translation an object by dx, dy, dz */ + { + GroupPoints->ShowRows(1,2,false); + resize(0,0); + GroupPoints->ShowRows(3,5,true); + break; + } + case 1: /* translation an object by 2 points */ + { + GroupPoints->ShowRows(3,5,false); + resize(0,0); + GroupPoints->ShowRows(0,2,true); + GroupPoints->TextLabel2->setText(tr("GEOM_POINT_I").arg("1")); + GroupPoints->LineEdit2->clear(); + GroupPoints->LineEdit3->clear(); + myPoint1 = myPoint2 = GEOM::GEOM_Object::_nil(); + break; + } + case 2: /* translation an object by vector */ + { + GroupPoints->ShowRows(2,5,false); + resize(0,0); + GroupPoints->ShowRows(0,1,true); + GroupPoints->TextLabel2->setText(tr("GEOM_VECTOR")); + GroupPoints->LineEdit2->clear(); + myVector = GEOM::GEOM_Object::_nil(); + break; + } + } + + myEditCurrentArgument->setFocus(); + connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); } @@ -139,9 +206,8 @@ void TransformationGUI_TranslationDlg::Init() //================================================================================= void TransformationGUI_TranslationDlg::ClickOnOk() { - this->ClickOnApply(); - ClickOnCancel(); - return; + if ( ClickOnApply() ) + ClickOnCancel(); } @@ -149,18 +215,24 @@ void TransformationGUI_TranslationDlg::ClickOnOk() // function : ClickOnApply() // purpose : //================================================================================= -void TransformationGUI_TranslationDlg::ClickOnApply() +bool TransformationGUI_TranslationDlg::ClickOnApply() { - buttonApply->setFocus(); - QAD_Application::getDesktop()->putInfo(tr("")); - if (mySimulationTopoDs.IsNull()) - return; - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); - - if(myOkBase) - myTransformationGUI->MakeTranslationAndDisplay(myGeomShape, myVec); - return; + if ( !onAccept(GroupPoints->CheckBox1->isChecked()) ) + return false; + + initName(); + ConstructorsClicked( getConstructorId() ); + return true; +} + + +//======================================================================= +// function : ClickOnCancel() +// purpose : +//======================================================================= +void TransformationGUI_TranslationDlg::ClickOnCancel() +{ + GEOMBase_Skeleton::ClickOnCancel(); } @@ -170,73 +242,99 @@ void TransformationGUI_TranslationDlg::ClickOnApply() //================================================================================= void TransformationGUI_TranslationDlg::SelectionIntoArgument() { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); myEditCurrentArgument->setText(""); - QString aString = ""; /* name of selection */ + QString aName; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) + { + int aNbSel = GEOMBase::GetNameOfSelectedIObjects(mySelection, aName); + if(aNbSel < 1) + { + myObjects.length(0); + return; + } + GEOMBase::ConvertListOfIOInListOfGO(mySelection->StoredIObjects(), myObjects); + if (!myObjects.length()) + return; + if(aNbSel != 1) + aName = tr("%1_objects").arg(aNbSel); + } + else + { + if (mySelection->IObjectCount() != 1) { + if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1) + myPoint1 = GEOM::GEOM_Object::_nil(); + else if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 2) + myVector = GEOM::GEOM_Object::_nil(); + else if(myEditCurrentArgument == GroupPoints->LineEdit3) + myPoint2 = GEOM::GEOM_Object::_nil(); + return; + } + + Standard_Boolean testResult = Standard_False;; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject(mySelection->firstIObject(), testResult ); + + if (!testResult || CORBA::is_nil( aSelectedObject )) + return; + + if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 1) + myPoint1 = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit2 && getConstructorId() == 2) + myVector = aSelectedObject; + else if(myEditCurrentArgument == GroupPoints->LineEdit3) + myPoint2 = aSelectedObject; + + aName = GEOMBase::GetName( aSelectedObject ); + } + + myEditCurrentArgument->setText( aName ); - int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString); - if (nbSel != 1) { - if(myEditCurrentArgument == GroupPoints->LineEdit1) - myOkBase = false; - return; - } - - /* nbSel == 1 */ - TopoDS_Shape S; - Standard_Boolean testResult; - Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject(); - if(!myGeomBase->GetTopoFromSelection(mySelection, S)) - return; - - /* gp_Pnt : not used */ - if(myEditCurrentArgument == GroupPoints->LineEdit1) { - myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult); - if(!testResult) - return ; - GroupPoints->LineEdit1->setText(aString); - myBase = S; - myOkBase = true; - } - - if(myOkBase) - this->MakeTranslationSimulationAndDisplay(); - return; + displayPreview(); } //================================================================================= -// function : SetEditCurrentArgument() +// function : LineEditReturnPressed() // purpose : //================================================================================= void TransformationGUI_TranslationDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); if(send == GroupPoints->LineEdit1) - myEditCurrentArgument = GroupPoints->LineEdit1; - else - return; - - GEOMBase_Skeleton::LineEditReturnPressed(); - return; + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } } //================================================================================= -// function : LineEditReturnPressed() +// function : SetEditCurrentArgument() // purpose : //================================================================================= void TransformationGUI_TranslationDlg::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - - if(send == GroupPoints->PushButton1) { - GroupPoints->LineEdit1->setFocus(); - myEditCurrentArgument = GroupPoints->LineEdit1; - this->SelectionIntoArgument(); - } - - return; + + if(send == GroupPoints->PushButton1) + { + myEditCurrentArgument = GroupPoints->LineEdit1; + globalSelection(); + } + else if (send == GroupPoints->PushButton2) + { + myEditCurrentArgument = GroupPoints->LineEdit2; + getConstructorId() == 1 ? globalSelection( GEOM_POINT ) : + globalSelection( GEOM_LINE ); + } + else if (send == GroupPoints->PushButton3) + { + myEditCurrentArgument = GroupPoints->LineEdit3; + globalSelection( GEOM_POINT ); + } + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); } @@ -248,9 +346,18 @@ void TransformationGUI_TranslationDlg::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - if(!mySimulationTopoDs.IsNull()) - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - return; + + ConstructorsClicked( getConstructorId() ); +} + + +//================================================================================= +// function : DeactivateActiveDialog() +// purpose : public slot to deactivate if active +//================================================================================= +void TransformationGUI_TranslationDlg::DeactivateActiveDialog() +{ + GEOMBase_Skeleton::DeactivateActiveDialog(); } @@ -260,10 +367,8 @@ void TransformationGUI_TranslationDlg::ActivateThisDialog() //================================================================================= void TransformationGUI_TranslationDlg::enterEvent(QEvent* e) { - if(GroupConstructors->isEnabled()) - return; - this->ActivateThisDialog(); - return; + if(!GroupConstructors->isEnabled()) + ActivateThisDialog(); } @@ -271,56 +376,147 @@ void TransformationGUI_TranslationDlg::enterEvent(QEvent* e) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void TransformationGUI_TranslationDlg::ValueChangedInSpinBox(double newValue) +void TransformationGUI_TranslationDlg::ValueChangedInSpinBox() +{ + displayPreview(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr TransformationGUI_TranslationDlg::createOperation() { - QObject* send = (QObject*)sender(); - Standard_Real Dx, Dy, Dz; - - if(send == GroupPoints->SpinBox_DX) { - Dx = newValue; - Dy = GroupPoints->SpinBox_DY->GetValue(); - Dz = GroupPoints->SpinBox_DZ->GetValue(); - } - else if(send == GroupPoints->SpinBox_DY) { - Dx = GroupPoints->SpinBox_DX->GetValue(); - Dy = newValue; - Dz = GroupPoints->SpinBox_DZ->GetValue(); - } - else if(send == GroupPoints->SpinBox_DZ) { - Dx = GroupPoints->SpinBox_DX->GetValue(); - Dy = GroupPoints->SpinBox_DY->GetValue(); - Dz = newValue; - } - - myVec.SetCoord(Dx, Dy, Dz); - if(myOkBase) - MakeTranslationSimulationAndDisplay(); - return; + return getGeomEngine()->GetITransformOperations( getStudyId() ); } //================================================================================= -// function : MakeTranslationSimulationAndDisplay() +// function : isValid // purpose : //================================================================================= -void TransformationGUI_TranslationDlg::MakeTranslationSimulationAndDisplay() +bool TransformationGUI_TranslationDlg::isValid( QString& msg ) { - myGeomBase->EraseSimulationShape(); - mySimulationTopoDs.Nullify(); + int aConstructorId = getConstructorId(); - try { - gp_Trsf theTransformation; - theTransformation.SetTranslation(myVec); - BRepBuilderAPI_Transform myBRepTransformation(myBase, theTransformation, Standard_False); - mySimulationTopoDs = myBRepTransformation.Shape(); - if(mySimulationTopoDs.IsNull()) - return; - else - myGeomBase->DisplaySimulationShape(mySimulationTopoDs); - } - catch(Standard_Failure) { - MESSAGE("Exception catched in MakeTranslationSimulationAndDisplay"); - return; - } - return; + switch (aConstructorId) + { + case 0: + { + return !(myObjects.length() == 0 ); + break; + } + case 1: + { + return !(myObjects.length() == 0 || myPoint1->_is_nil() || myPoint2->_is_nil() ); + break; + } + case 2: + { + return !(myObjects.length() == 0 || myVector->_is_nil()); + break; + } + default: return false; + } +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool TransformationGUI_TranslationDlg::execute( ObjectList& objects ) +{ + bool res = false; + bool toCreateCopy = IsPreview() || GroupPoints->CheckBox1->isChecked(); + + GEOM::GEOM_Object_var anObj; + + switch ( getConstructorId() ) + { + case 0 : + { + double dx = GroupPoints->SpinBox1->GetValue(); + double dy = GroupPoints->SpinBox2->GetValue(); + double dz = GroupPoints->SpinBox3->GetValue(); + + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateDXDYDZCopy( myObjects[i], dx, dy, dz ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateDXDYDZ( myObjects[i], dx, dy, dz ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + case 1 : + { + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateTwoPointsCopy( myObjects[i], myPoint1, myPoint2 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateTwoPoints( myObjects[i], myPoint1, myPoint2 ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + case 2: + { + if (toCreateCopy) + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateVectorCopy( myObjects[i], myVector ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + else + for (int i = 0; i < myObjects.length(); i++) + { + anObj = GEOM::GEOM_ITransformOperations::_narrow( getOperation() )->TranslateVector( myObjects[i], myVector ); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + } + res = true; + break; + } + } + + return res; +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void TransformationGUI_TranslationDlg::closeEvent( QCloseEvent* e ) +{ + myGeomGUI->SetState( -1 ); + GEOMBase_Skeleton::closeEvent( e ); +} + + +//================================================================================= +// function : CreateCopyModeChanged() +// purpose : +//================================================================================= +void TransformationGUI_TranslationDlg::CreateCopyModeChanged(bool isCreateCopy) +{ + GroupBoxName->setEnabled(isCreateCopy); } diff --git a/src/TransformationGUI/TransformationGUI_TranslationDlg.h b/src/TransformationGUI/TransformationGUI_TranslationDlg.h index 52334bc22..48050c84c 100644 --- a/src/TransformationGUI/TransformationGUI_TranslationDlg.h +++ b/src/TransformationGUI/TransformationGUI_TranslationDlg.h @@ -30,11 +30,8 @@ #define DIALOGBOX_TRANSLATION_H #include "GEOMBase_Skeleton.h" -#include "DlgRef_1Sel3Spin.h" +#include "DlgRef_3Sel3Spin1Check.h" -#include "TransformationGUI.h" - -#include //================================================================================= // class : TransformationGUI_TranslationDlg @@ -45,33 +42,38 @@ class TransformationGUI_TranslationDlg : public GEOMBase_Skeleton Q_OBJECT public: - TransformationGUI_TranslationDlg(QWidget* parent = 0, const char* name = 0, TransformationGUI* theTransformationGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); + TransformationGUI_TranslationDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0); ~TransformationGUI_TranslationDlg(); +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + + virtual void closeEvent( QCloseEvent* e ); + private : void Init(); void enterEvent(QEvent* e); - void MakeTranslationSimulationAndDisplay(); + + GEOM::GEOM_Object_var myVector, myPoint1, myPoint2; + GEOM::ListOfGO myObjects; - TransformationGUI* myTransformationGUI; - double step; - - TopoDS_Shape myBase; /* is myBase */ - GEOM::GEOM_Shape_var myGeomShape; - bool myOkBase; - gp_Vec myVec; - - DlgRef_1Sel3Spin* GroupPoints; + DlgRef_3Sel3Spin1Check* GroupPoints; private slots : void ClickOnOk(); - void ClickOnApply(); + bool ClickOnApply(); + void ClickOnCancel(); void ActivateThisDialog(); + void DeactivateActiveDialog(); void LineEditReturnPressed(); void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ValueChangedInSpinBox(double newValue); - + void ValueChangedInSpinBox(); + void ConstructorsClicked(int constructorId); + void CreateCopyModeChanged(bool isCreateCopy); }; #endif // DIALOGBOX_TRANSLATION_H -- 2.30.2