From: admin Date: Thu, 10 Jul 2008 13:33:58 +0000 (+0000) Subject: This commit was generated by cvs2git to create tag 'V4_1_0rc1'. X-Git-Tag: V4_1_0rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=39ae20a79d98ce518bfa6d92a16cd2bf5cec18eb;p=modules%2Fgeom.git This commit was generated by cvs2git to create tag 'V4_1_0rc1'. Sprout from BR_Dev_For_4_0 2007-11-08 12:49:27 UTC jfa 'Update docs for new functionality 'Normale to a Face'.' Cherrypick from V4_1_0_maintainance 2008-07-10 13:33:57 UTC jfa 'Improvement 0019703: deform (scale along axes) a shape.': doc/salome/gui/GEOM/doxyfile_tui.in doc/salome/gui/GEOM/images/line1.png doc/salome/gui/GEOM/images/line2.png doc/salome/gui/GEOM/images/measures8a.png doc/salome/gui/GEOM/images/point2.png doc/salome/gui/GEOM/images/point4.png doc/salome/gui/GEOM/images/point5.png doc/salome/gui/GEOM/images/remove_extra_edges.png doc/salome/gui/GEOM/images/restore-ss-OB-cut.png doc/salome/gui/GEOM/images/restore-ss-OB.png doc/salome/gui/GEOM/images/restore-ss-cut.png doc/salome/gui/GEOM/images/restore-ss-dialog.png doc/salome/gui/GEOM/images/restore-ss-viewer-after.png doc/salome/gui/GEOM/images/restore-ss-viewer-before.png doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png doc/salome/gui/GEOM/images/scale_transformsn3.png doc/salome/gui/GEOM/images/scale_transformsn4.png doc/salome/gui/GEOM/images/shapesonshape.png doc/salome/gui/GEOM/images/shonshex1.png doc/salome/gui/GEOM/images/shonshex2.png doc/salome/gui/GEOM/images/transformation10a.png doc/salome/gui/GEOM/images/translation3.png doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc doc/salome/gui/GEOM/input/restore_presentation_parameters.doc doc/salome/gui/GEOM/input/shapesonshape.doc doc/salome/gui/GEOM/input/tui_swig_examples.doc doc/salome/gui/GEOM/input/tui_test_all.doc doc/salome/gui/GEOM/input/tui_test_others.doc doc/salome/gui/GEOM/input/tui_test_spanner.doc resources/pointonface.png resources/scale_along_axes.png resources/shapesonshape.png src/DlgRef/DlgRef_2Sel2List_QTD.cxx src/DlgRef/DlgRef_2Sel2List_QTD.h src/DlgRef/DlgRef_3Sel3Spin2Check.cxx src/DlgRef/DlgRef_3Sel3Spin2Check.h src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.cxx src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h src/DlgRef/UIFiles/DlgRef_2Sel2List_QTD.ui src/DlgRef/UIFiles/DlgRef_3Sel3Spin2Check_QTD.ui src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx src/GEOMFiltersSelection/GEOM_CompoundFilter.h src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h Cherrypick from master 2008-03-07 07:45:34 UTC jfa 'Join modifications from BR_Dev_For_4_0 tag V4_1_1.': doc/salome/gui/GEOM/images/remove_extra_edges1.png doc/salome/gui/GEOM/images/remove_extra_edges2.png resources/line2faces.png resources/point_line_intersection.png resources/remove_extra_edges.png src/DlgRef/DlgRef_1Sel5Spin1Check.cxx src/DlgRef/DlgRef_1Sel5Spin1Check.h src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui --- diff --git a/doc/salome/gui/GEOM/doxyfile_tui.in b/doc/salome/gui/GEOM/doxyfile_tui.in new file mode 100755 index 000000000..90133c080 --- /dev/null +++ b/doc/salome/gui/GEOM/doxyfile_tui.in @@ -0,0 +1,50 @@ +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "Geometry Module Reference Manual v.@VERSION@" +OUTPUT_DIRECTORY = ./ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +TAB_SIZE = 5 + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES + +#--------------------------------------------------------------------------- +#Input related options +#--------------------------------------------------------------------------- +INPUT = @srcdir@/input +FILE_PATTERNS = tui_*.doc +IMAGE_PATH = @srcdir@/images +EXAMPLE_PATH = @top_srcdir@/src/GEOM_SWIG + +#--------------------------------------------------------------------------- +#HTML related options +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = ./ +HTML_HEADER = @srcdir@/static/header.html +HTML_FOOTER = @srcdir@/static/footer.html +#HTML_STYLESHEET = @srcdir@/static/doxygen.css +TOC_EXPAND = YES +DISABLE_INDEX = NO +GENERATE_TREEVIEW = YES +TREEVIEW_WIDTH = 300 + +#--------------------------------------------------------------------------- +#LaTeX related option +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO + +#--------------------------------------------------------------------------- +#RTF related options +#--------------------------------------------------------------------------- +GENERATE_RTF = NO + +#--------------------------------------------------------------------------- +#External reference options +#--------------------------------------------------------------------------- +GENERATE_TAGFILE = tui_examples.tag diff --git a/doc/salome/gui/GEOM/images/line1.png b/doc/salome/gui/GEOM/images/line1.png new file mode 100755 index 000000000..2e7f300b4 Binary files /dev/null and b/doc/salome/gui/GEOM/images/line1.png differ diff --git a/doc/salome/gui/GEOM/images/line2.png b/doc/salome/gui/GEOM/images/line2.png new file mode 100755 index 000000000..f7773729e Binary files /dev/null and b/doc/salome/gui/GEOM/images/line2.png differ diff --git a/doc/salome/gui/GEOM/images/measures8a.png b/doc/salome/gui/GEOM/images/measures8a.png new file mode 100644 index 000000000..8f27b1148 Binary files /dev/null and b/doc/salome/gui/GEOM/images/measures8a.png differ diff --git a/doc/salome/gui/GEOM/images/point2.png b/doc/salome/gui/GEOM/images/point2.png new file mode 100755 index 000000000..6dfa2ec3e Binary files /dev/null and b/doc/salome/gui/GEOM/images/point2.png differ diff --git a/doc/salome/gui/GEOM/images/point4.png b/doc/salome/gui/GEOM/images/point4.png new file mode 100755 index 000000000..fe6eb8a6a Binary files /dev/null and b/doc/salome/gui/GEOM/images/point4.png differ diff --git a/doc/salome/gui/GEOM/images/point5.png b/doc/salome/gui/GEOM/images/point5.png new file mode 100755 index 000000000..1ad2ed7d8 Binary files /dev/null and b/doc/salome/gui/GEOM/images/point5.png differ diff --git a/doc/salome/gui/GEOM/images/remove_extra_edges.png b/doc/salome/gui/GEOM/images/remove_extra_edges.png new file mode 100644 index 000000000..bbf6904f6 Binary files /dev/null and b/doc/salome/gui/GEOM/images/remove_extra_edges.png differ diff --git a/doc/salome/gui/GEOM/images/remove_extra_edges1.png b/doc/salome/gui/GEOM/images/remove_extra_edges1.png new file mode 100644 index 000000000..3737f97f4 Binary files /dev/null and b/doc/salome/gui/GEOM/images/remove_extra_edges1.png differ diff --git a/doc/salome/gui/GEOM/images/remove_extra_edges2.png b/doc/salome/gui/GEOM/images/remove_extra_edges2.png new file mode 100644 index 000000000..3302eb1be Binary files /dev/null and b/doc/salome/gui/GEOM/images/remove_extra_edges2.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-OB-cut.png b/doc/salome/gui/GEOM/images/restore-ss-OB-cut.png new file mode 100644 index 000000000..51b5a4fb4 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-OB-cut.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-OB.png b/doc/salome/gui/GEOM/images/restore-ss-OB.png new file mode 100644 index 000000000..4db07ebfa Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-OB.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-cut.png b/doc/salome/gui/GEOM/images/restore-ss-cut.png new file mode 100644 index 000000000..971ea9038 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-cut.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-dialog.png b/doc/salome/gui/GEOM/images/restore-ss-dialog.png new file mode 100644 index 000000000..a1f39feb6 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-dialog.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-viewer-after.png b/doc/salome/gui/GEOM/images/restore-ss-viewer-after.png new file mode 100644 index 000000000..d25b113d1 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-viewer-after.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-viewer-before.png b/doc/salome/gui/GEOM/images/restore-ss-viewer-before.png new file mode 100644 index 000000000..4fa5b1319 Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-viewer-before.png differ diff --git a/doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png b/doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png new file mode 100644 index 000000000..d745bce1f Binary files /dev/null and b/doc/salome/gui/GEOM/images/restore-ss-viewer-cut.png differ diff --git a/doc/salome/gui/GEOM/images/scale_transformsn3.png b/doc/salome/gui/GEOM/images/scale_transformsn3.png new file mode 100644 index 000000000..c7f8adbd6 Binary files /dev/null and b/doc/salome/gui/GEOM/images/scale_transformsn3.png differ diff --git a/doc/salome/gui/GEOM/images/scale_transformsn4.png b/doc/salome/gui/GEOM/images/scale_transformsn4.png new file mode 100644 index 000000000..fafa6f084 Binary files /dev/null and b/doc/salome/gui/GEOM/images/scale_transformsn4.png differ diff --git a/doc/salome/gui/GEOM/images/shapesonshape.png b/doc/salome/gui/GEOM/images/shapesonshape.png new file mode 100755 index 000000000..d79fcab66 Binary files /dev/null and b/doc/salome/gui/GEOM/images/shapesonshape.png differ diff --git a/doc/salome/gui/GEOM/images/shonshex1.png b/doc/salome/gui/GEOM/images/shonshex1.png new file mode 100755 index 000000000..7a1c97ea1 Binary files /dev/null and b/doc/salome/gui/GEOM/images/shonshex1.png differ diff --git a/doc/salome/gui/GEOM/images/shonshex2.png b/doc/salome/gui/GEOM/images/shonshex2.png new file mode 100755 index 000000000..7d16db9b5 Binary files /dev/null and b/doc/salome/gui/GEOM/images/shonshex2.png differ diff --git a/doc/salome/gui/GEOM/images/transformation10a.png b/doc/salome/gui/GEOM/images/transformation10a.png new file mode 100644 index 000000000..80ca6239b Binary files /dev/null and b/doc/salome/gui/GEOM/images/transformation10a.png differ diff --git a/doc/salome/gui/GEOM/images/translation3.png b/doc/salome/gui/GEOM/images/translation3.png new file mode 100644 index 000000000..ea45b8214 Binary files /dev/null and b/doc/salome/gui/GEOM/images/translation3.png differ diff --git a/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc b/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc new file mode 100644 index 000000000..ad32a93b7 --- /dev/null +++ b/doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc @@ -0,0 +1,26 @@ +/*! + +\page remove_extra_edges_operation_page Remove Extra Edges + +\n To Remove extra edges in the Main Menu select +Repair - > Remove extra edges. +\n This operation removes all seam and degenerated edges from a given +shape and unites faces and edges, sharing one surface. + +\n TUI Command: geompy.RemoveExtraEdges(theShape), +there theShape is a compound or a single solid to remove irregular edges from. +\n Arguments: Name + one shape. +\n Advanced option: + \ref restore_presentation_parameters_page "Set presentation parameters and subshapes from arguments". + +\image html remove_extra_edges.png + +\n Example: + +\image html remove_extra_edges1.png +
Shape with extra edges
+ +\image html remove_extra_edges2.png +
Improved shape
+ +*/ diff --git a/doc/salome/gui/GEOM/input/restore_presentation_parameters.doc b/doc/salome/gui/GEOM/input/restore_presentation_parameters.doc new file mode 100644 index 000000000..5460457d6 --- /dev/null +++ b/doc/salome/gui/GEOM/input/restore_presentation_parameters.doc @@ -0,0 +1,57 @@ +/*! + +\page restore_presentation_parameters_page Restore presentation parameters and a tree of subshapes + +\n This functionality allows the operation result to inherit colour +and subshapes from its arguments. + +\n To activate this functionality, check in "Set +presentation parameters and subshapes from arguments" checkbox in the +corresponding dialog. + +\n For example, there exist two objects: Box_1 with two published +faces and Cylinder_1 with free published edges. + +\image html restore-ss-viewer-before.png + +First, we examine the case when the resulting shape corresponds to one argument (after transformation, +after the boolean operation Cut, or after the partiton with one object shape). + +We create a Cut of Box_1 with Cylinder_1. + +\image html restore-ss-cut.png + +The resulting shape inherits the subshapes and the colour of Box_1. + +\image html restore-ss-viewer-cut.png + +Second, we examine the case when the resulting shape is composed from multiple arguments +(after all boolean operations, except for Cut, or after the partition with +several object shapes, or if the resulting shape is a compound). + +We create a Common of Box_1 and Cylinder_1. + +\image html restore-ss-dialog.png + +\n The resulting object is created with several subshapes that correspond to the +operation arguments and their published subshapes. The resulting shape +has a default colour, but its subshapes inherit colors corresponding +to arguments and their subshapes. + +\image html restore-ss-viewer-after.png + + +Please, note that when the resulting shape corresponds to one +argument, the inherited subshapes depend directly on the resulting shape. + +\image html restore-ss-OB-cut.png + +When the resulting shape is composed from multiple arguments, the +inherited subshapes depend on the arguments. + +\image html restore-ss-OB.png + +\n You can also call this functionality from your python scripts. +See our TUI Scripts for \ref tui_restore_prs_params "example". + +*/ diff --git a/doc/salome/gui/GEOM/input/shapesonshape.doc b/doc/salome/gui/GEOM/input/shapesonshape.doc new file mode 100755 index 000000000..3e9e20494 --- /dev/null +++ b/doc/salome/gui/GEOM/input/shapesonshape.doc @@ -0,0 +1,35 @@ +/*! + +\page shapesonshape_page Get Shapes on Shape + +This operation is a special case of Explode operation. It produces a group of sub-shapes of the explosed shape, which are located in a definite way relatively another reference shape. + +To use this operation, select in the Main Menu Operations -> Get Shapes on Shape. The following dialog box will appear. + +\image html shapesonshape.png + +
    +
  • Name is the name of the resulting group of shapes;
  • +
  • Shape for exploding is the shape that will be exploded;
  • +
  • Shape for checking is the reference shape;
  • +
  • Reconstruction Limit is the type of created sub-shapes: + solid, shell, face, wire, edge, vertex;
  • +
  • State is the position of the created sub-shapes relatively the reference shapes: +
      +
    • IN - the created sub-shapes are located inside the reference shape;
    • +
    • OUT - the created sub-shapes are located outside the reference shape;
    • +
    • ON - the created sub-shapes lie on the reference shape;
    • +
    • ONIN - the created sub-shapes lie on the reference shape or are located inside it;
    • +
    • ONOUT - the created sub-shapes lie on the reference shape or are located outside it;
    • +
  • +
+ +Example: + +In the images below the box is the exploded shape and the cylinder is the reference shape. In the first image the edge IN the reference cylinder is highlighted in red, in the second the edges OUT of the reference cylinder are highlighted. + +\image html shonshex1.png +\image html shonshex2.png + + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_swig_examples.doc b/doc/salome/gui/GEOM/input/tui_swig_examples.doc new file mode 100644 index 000000000..43b003d42 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_swig_examples.doc @@ -0,0 +1,11 @@ +/*! + +\page tui_swig_examples_page Examples, generated from GEOM_SWIG test scripts + +
    +
  • \subpage tui_test_others_page
  • +
  • \subpage tui_test_spanner_page
  • +
  • \subpage tui_test_all_page
  • +
+ +*/ diff --git a/doc/salome/gui/GEOM/input/tui_test_all.doc b/doc/salome/gui/GEOM/input/tui_test_all.doc new file mode 100644 index 000000000..caeae7be8 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_test_all.doc @@ -0,0 +1,75 @@ +/*! + +\page tui_test_all_page GEOM_TestAll.py + +\anchor swig_All +

GEOM_TestAll.py

+ +\dontinclude GEOM_TestAll.py +\skipline def TestAll + +\until vxyz + +\anchor swig_MakeMarker +\until cs3 + +\until MakePlaneThreePnt + +\anchor swig_MakeArc +\until MakeArcCenter + +\anchor swig_MakeCircle +\until Circle2 + +\until MakeVertexOnCurve + +\anchor swig_MakeVertexOnLinesIntersection +\until p_on_l1l2 + +\anchor swig_MakeTangentOnCurve +\until tan_on_arc + +\until MakeCompound + +\anchor swig_MakeVertexOnSurface +\until p_on_face + +\until S = geompy.MakeRotation + +\anchor swig_MakeLineTwoFaces +\until Line3 + +\anchor swig_all_advanced +\until MakeSewing + +\anchor swig_all_trsf +\until RotatPnt + +\anchor swig_scale +\until Scale4 + +\anchor swig_all_trsf_more +\until MakeOffset + +\anchor swig_ChangeOrientation +\until ChangeOrientation + +\anchor swig_FilletChamfer +\until End of Local operations + +\anchor swig_all_patterns +\until MultiRot2D + +\anchor swig_all_measure +\until "CheckShape(Prism) = " + +\anchor swig_all_partition +\until Partition1 + +\anchor swig_all_addtostudy +\until id_Partition1 + +\anchor swig_all_decompose +\until print "DONE" + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_test_others.doc b/doc/salome/gui/GEOM/input/tui_test_others.doc new file mode 100644 index 000000000..32d3c8b21 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_test_others.doc @@ -0,0 +1,159 @@ +/*! + +\page tui_test_others_page GEOM_TestOthers.py + +\anchor swig_TestOthers +

GEOM_TestOthers.py

+ +\dontinclude GEOM_TestOthers.py + +\skipline import os + +\anchor swig_Import_Export +\until print "OK" + +\until id_w3 + +\anchor swig_MakeFaces +\until id_f12 + +\until TestExportImport + +\anchor swig_OrientationChange +\until id_Orientation + +\anchor swig_MakeCommon +\until id_Section + +\anchor swig_Partition +\until id_Partition + +\anchor swig_MakeMultiRotation +\until id_MultiRot2D + +\anchor swig_MakeFilletAll +\until id_MakeFilletAll + +\anchor swig_MakeChamferAll +\until id_MakeChamferAll + +\anchor swig_MakeChamfer +\until id_MakeChamfer + +\anchor swig_NumberOfFaces +\until Bad number of faces + +\anchor swig_NumberOfEdges +\until Bad number of edges + +\anchor swig_MakeBlockExplode +\until id_MakeBlockExplode + +\anchor swig_CheckCompoundOfBlocks +\until The Box is VALID + +\anchor swig_GetSame +\until id_Cone_ss + +\anchor swig_CreateGroup +\until id_CreateGroup + +\anchor swig_AddObject +\until Now contains + +\anchor swig_UnionList +\until Now contains + +\anchor swig_RemoveObject +\until Now contains + +\anchor swig_DifferenceList +\until Now contains + +\anchor swig_GetObjectIDs +\until print " ", ObjectID + +\anchor swig_GetMainShape +\until BoxCopy + +\anchor swig_DifferenceIDs +\until Now contains + +\anchor swig_UnionIDs +\until print " ", ObjectID + +\anchor swig_GetType +\until Type of elements + +\until freeFaces, "freeFaces" + +\anchor swig_RemoveExtraEdges +\until "freeFacesWithoutExtra" + +\anchor swig_GetSharedShapes +\until "sharedFace" + +\anchor swig_CheckAndImprove +\until "blocksComp" + +\anchor swig_Propagate +\until "propagation chain" + +\anchor swig_GetPoint +\until blocksComp (-50, -50, -50) + +\anchor swig_GetEdgeNearPoint +\until edge near point + +\anchor swig_GetBlockByParts +\until "b0 image" + +\anchor swig_GetShapesOnPlane +\until Face on Plane + +\anchor swig_GetShapesOnPlaneIDs +\until Group of faces + +\anchor swig_GetShapesOnPlaneWithLocation +\until Edge on Plane + +\anchor swig_GetShapesOnPlaneWithLocationIDs +\until group_edges_on_pln, grname + +\anchor swig_GetShapesOnCylinder +\until Edge out of Cylinder + +\anchor swig_GetShapesOnCylinderIDs +\until Group of edges + +\anchor swig_GetShapesOnSphere +\until Vertex on Sphere + +\anchor swig_GetShapesOnSphereIDs +\until Group of vertices + +\anchor swig_GetShapesOnQuadrangle +\until Error in GetShapesOnQuadrangle + +\anchor swig_GetShapesOnQuadrangleIDs +\until Group of vertices + +\anchor swig_GetShapesOnBox +\until "Error in GetShapesOnBox()" + +\anchor swig_GetShapesOnBoxIDs +\until Group of faces + +\anchor swig_GetShapesOnShape +\until "Error in GetShapesOnShape()" + +\anchor swig_GetShapesOnShapeAsCompound +\until (as compound) + +\anchor swig_GetShapesOnShapeIDs +\until "Error in GetShapesOnShapeIDs()" + +\anchor swig_GetInPlace +\until #END + +*/ diff --git a/doc/salome/gui/GEOM/input/tui_test_spanner.doc b/doc/salome/gui/GEOM/input/tui_test_spanner.doc new file mode 100644 index 000000000..5c9df4651 --- /dev/null +++ b/doc/salome/gui/GEOM/input/tui_test_spanner.doc @@ -0,0 +1,41 @@ +/*! + +\page tui_test_spanner_page GEOM_Spanner.py + +\anchor swig_Spanner +

GEOM_Spanner.py

+ +\dontinclude GEOM_Spanner.py +\skipline def MakeSpanner + +\until vxy + +\anchor swig_MakeQuad4Vertices +\until id_face11 + +\anchor swig_MakeTranslationTwoPoints +\until id_face12 + +\anchor swig_MakeHexa2Faces +\until id_block1 + +\until p_15_10_1 + +\anchor swig_GetFaceNearPoint +\until id_face31 + +\until not a hexahedral + +\anchor swig_SubShapeAllSorted +\until ii + 1 + +\anchor swig_MakeHexa +\until id_block3 + +\anchor swig_GetOppositeFace +\until id_face41 + +\anchor spanner_continue +\until return Spanner + +*/ diff --git a/resources/line2faces.png b/resources/line2faces.png new file mode 100755 index 000000000..89c9d26ed Binary files /dev/null and b/resources/line2faces.png differ diff --git a/resources/point_line_intersection.png b/resources/point_line_intersection.png new file mode 100755 index 000000000..31f6c1944 Binary files /dev/null and b/resources/point_line_intersection.png differ diff --git a/resources/pointonface.png b/resources/pointonface.png new file mode 100755 index 000000000..fa0f8cb42 Binary files /dev/null and b/resources/pointonface.png differ diff --git a/resources/remove_extra_edges.png b/resources/remove_extra_edges.png new file mode 100644 index 000000000..fedd8ae13 Binary files /dev/null and b/resources/remove_extra_edges.png differ diff --git a/resources/scale_along_axes.png b/resources/scale_along_axes.png new file mode 100644 index 000000000..06a38911c Binary files /dev/null and b/resources/scale_along_axes.png differ diff --git a/resources/shapesonshape.png b/resources/shapesonshape.png new file mode 100755 index 000000000..05ac19352 Binary files /dev/null and b/resources/shapesonshape.png differ diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check.cxx b/src/DlgRef/DlgRef_1Sel5Spin1Check.cxx new file mode 100644 index 000000000..d683e9745 --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check.cxx @@ -0,0 +1,71 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : DlgRef_1Sel5Spin1Check.cxx +// Author : Vladimir TURIN +// Module : GEOM +// $Header: + +#include "DlgRef_1Sel5Spin1Check.h" + +#include +#include +#include + +/* + * Constructs a DlgRef_1Sel5Spin1Check which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +DlgRef_1Sel5Spin1Check::DlgRef_1Sel5Spin1Check(QWidget* parent, const char* name, WFlags fl) + :DlgRef_1Sel5Spin1Check_QTD(parent, name, fl) +{ + SpinBox1->close(TRUE); + SpinBox2->close(TRUE); + SpinBox3->close(TRUE); + SpinBox4->close(TRUE); + SpinBox5->close(TRUE); + + SpinBox_1 = new DlgRef_SpinBox(GroupBox1, "SpinBox_1"); + Layout2->addWidget(SpinBox_1, 0, 1); + + SpinBox_2 = new DlgRef_SpinBox(GroupBox1, "SpinBox_2"); + Layout2->addWidget(SpinBox_2, 0, 3); + + SpinBox_3 = new DlgRef_SpinBox(GroupBox1, "SpinBox_3"); + Layout2->addWidget(SpinBox_3, 2, 1); + + SpinBox_4 = new DlgRef_SpinBox(GroupBox1, "SpinBox_4"); + Layout2->addWidget(SpinBox_4, 1, 1); + + SpinBox_5 = new DlgRef_SpinBox(GroupBox1, "SpinBox_5"); + Layout2->addWidget(SpinBox_5, 1, 3); +} + + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_1Sel5Spin1Check::~DlgRef_1Sel5Spin1Check() +{ + // no need to delete child widgets, Qt does it all for us +} diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check.h b/src/DlgRef/DlgRef_1Sel5Spin1Check.h new file mode 100644 index 000000000..271839c42 --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check.h @@ -0,0 +1,53 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : DlgRef_1Sel5Spin1Check.h +// Author : Vladimir TURIN +// Module : GEOM +// $Header: + +#ifndef DLGREF_1SEL5SPIN_H +#define DLGREF_1SEL5SPIN_H + +#include "GEOM_DlgRef.hxx" + +#include "DlgRef_1Sel5Spin1Check_QTD.h" +#include "DlgRef_SpinBox.h" + +class GEOM_DLGREF_EXPORT DlgRef_1Sel5Spin1Check : public DlgRef_1Sel5Spin1Check_QTD +{ + Q_OBJECT + +public: + DlgRef_1Sel5Spin1Check( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_1Sel5Spin1Check(); + + DlgRef_SpinBox* SpinBox_1; + DlgRef_SpinBox* SpinBox_2; + DlgRef_SpinBox* SpinBox_3; + DlgRef_SpinBox* SpinBox_4; + DlgRef_SpinBox* SpinBox_5; + +}; + +#endif // DLGREF_1SEL5SPIN_H diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx new file mode 100644 index 000000000..27857593a --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.cxx @@ -0,0 +1,150 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_1Sel5Spin1Check_QTD.ui' +** +** Created: Fri Feb 1 14:04:55 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "DlgRef_1Sel5Spin1Check_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_1Sel5Spin1Check_QTD as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_1Sel5Spin1Check_QTD::DlgRef_1Sel5Spin1Check_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_1Sel5Spin1Check_QTD" ); + DlgRef_1Sel5Spin1Check_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "DlgRef_1Sel5Spin1Check_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + 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() ) ); + + Layout1->addWidget( TextLabel1, 0, 0 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + + Layout1->addWidget( PushButton1, 0, 1 ); + + Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); + + SpinBox2 = new QSpinBox( GroupBox1, "SpinBox2" ); + SpinBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox2->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox2, 0, 3 ); + + SpinBox3 = new QSpinBox( GroupBox1, "SpinBox3" ); + SpinBox3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox3->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox3, 2, 1 ); + + TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel5, 1, 0 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel3, 0, 2 ); + + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel4, 2, 0 ); + + SpinBox4 = new QSpinBox( GroupBox1, "SpinBox4" ); + SpinBox4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox4->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox4, 1, 1 ); + + SpinBox1 = new QSpinBox( GroupBox1, "SpinBox1" ); + SpinBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox1->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox1, 0, 1 ); + + TextLabel6 = new QLabel( GroupBox1, "TextLabel6" ); + TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel6, 1, 2 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( TextLabel2, 0, 0 ); + + SpinBox5 = new QSpinBox( GroupBox1, "SpinBox5" ); + SpinBox5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, SpinBox5->sizePolicy().hasHeightForWidth() ) ); + + Layout2->addWidget( SpinBox5, 1, 3 ); + + CheckBox1 = new QCheckBox( GroupBox1, "CheckBox1" ); + + Layout2->addMultiCellWidget( CheckBox1, 2, 2, 2, 3 ); + + Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); + Spacer6 = new QSpacerItem( 0, 120, QSizePolicy::Minimum, QSizePolicy::Expanding ); + Layout1->addItem( Spacer6, 2, 2 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + Layout1->addWidget( LineEdit1, 0, 2 ); + + GroupBox1Layout->addLayout( Layout1, 0, 0 ); + + DlgRef_1Sel5Spin1Check_QTDLayout->addWidget( GroupBox1, 0, 0 ); + languageChange(); + resize( QSize(162, 143).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_1Sel5Spin1Check_QTD::~DlgRef_1Sel5Spin1Check_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void DlgRef_1Sel5Spin1Check_QTD::languageChange() +{ + setCaption( tr( "DlgRef_1Sel5Spin1Check_QTD" ) ); + GroupBox1->setTitle( QString::null ); + TextLabel1->setText( tr( "TL1" ) ); + PushButton1->setText( QString::null ); + TextLabel5->setText( tr( "TL5" ) ); + TextLabel3->setText( tr( "TL3" ) ); + TextLabel4->setText( tr( "TL4" ) ); + TextLabel6->setText( tr( "TL6" ) ); + TextLabel2->setText( tr( "TL2" ) ); + CheckBox1->setText( QString::null ); +} + diff --git a/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h new file mode 100644 index 000000000..0f7fbc84b --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel5Spin1Check_QTD.h @@ -0,0 +1,63 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_1Sel5Spin1Check_QTD.ui' +** +** Created: Fri Feb 1 14:04:51 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#ifndef DLGREF_1SEL5SPIN1CHECK_QTD_H +#define DLGREF_1SEL5SPIN1CHECK_QTD_H + +#include +#include + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; +class QGroupBox; +class QLabel; +class QPushButton; +class QSpinBox; +class QCheckBox; +class QLineEdit; + +class DlgRef_1Sel5Spin1Check_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_1Sel5Spin1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_1Sel5Spin1Check_QTD(); + + QGroupBox* GroupBox1; + QLabel* TextLabel1; + QPushButton* PushButton1; + QSpinBox* SpinBox2; + QSpinBox* SpinBox3; + QLabel* TextLabel5; + QLabel* TextLabel3; + QLabel* TextLabel4; + QSpinBox* SpinBox4; + QSpinBox* SpinBox1; + QLabel* TextLabel6; + QLabel* TextLabel2; + QSpinBox* SpinBox5; + QCheckBox* CheckBox1; + QLineEdit* LineEdit1; + +protected: + QGridLayout* DlgRef_1Sel5Spin1Check_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* Layout1; + QSpacerItem* Spacer6; + QGridLayout* Layout2; + +protected slots: + virtual void languageChange(); + +}; + +#endif // DLGREF_1SEL5SPIN1CHECK_QTD_H diff --git a/src/DlgRef/DlgRef_2Sel2List_QTD.cxx b/src/DlgRef/DlgRef_2Sel2List_QTD.cxx new file mode 100644 index 000000000..0deb7cddd --- /dev/null +++ b/src/DlgRef/DlgRef_2Sel2List_QTD.cxx @@ -0,0 +1,114 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_2Sel2List_QTD.ui' +** +** Created: Thu Mar 27 16:38:25 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "DlgRef_2Sel2List_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_2Sel2List_QTD as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_2Sel2List_QTD::DlgRef_2Sel2List_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_2Sel2List_QTD" ); + DlgRef_2Sel2List_QTDLayout = new QVBoxLayout( this, 11, 6, "DlgRef_2Sel2List_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->layout()->setSpacing( 6 ); + GroupBox1->layout()->setMargin( 11 ); + GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); + GroupBox1Layout->setAlignment( Qt::AlignTop ); + + LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); + + GroupBox1Layout->addWidget( LineEdit2, 1, 2 ); + + ComboBox2 = new QComboBox( FALSE, GroupBox1, "ComboBox2" ); + + GroupBox1Layout->addMultiCellWidget( ComboBox2, 3, 3, 1, 2 ); + + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + + GroupBox1Layout->addWidget( TextLabel4, 3, 0 ); + + ComboBox1 = new QComboBox( FALSE, GroupBox1, "ComboBox1" ); + + GroupBox1Layout->addMultiCellWidget( ComboBox1, 2, 2, 1, 2 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + + GroupBox1Layout->addWidget( TextLabel3, 2, 0 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + GroupBox1Layout->addWidget( LineEdit1, 0, 2 ); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + + GroupBox1Layout->addWidget( TextLabel2, 1, 0 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + + GroupBox1Layout->addWidget( TextLabel1, 0, 0 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + + GroupBox1Layout->addWidget( PushButton1, 0, 1 ); + + PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); + PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); + + GroupBox1Layout->addWidget( PushButton2, 1, 1 ); + DlgRef_2Sel2List_QTDLayout->addWidget( GroupBox1 ); + languageChange(); + resize( QSize(187, 182).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_2Sel2List_QTD::~DlgRef_2Sel2List_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void DlgRef_2Sel2List_QTD::languageChange() +{ + setCaption( tr( "DlgRef_2Sel2List_QTD" ) ); + GroupBox1->setTitle( QString::null ); + TextLabel4->setText( tr( "TL4" ) ); + TextLabel3->setText( tr( "TL3" ) ); + TextLabel2->setText( tr( "TL2" ) ); + TextLabel1->setText( tr( "TL1" ) ); + PushButton1->setText( QString::null ); + PushButton2->setText( QString::null ); +} + diff --git a/src/DlgRef/DlgRef_2Sel2List_QTD.h b/src/DlgRef/DlgRef_2Sel2List_QTD.h new file mode 100644 index 000000000..b2ea00299 --- /dev/null +++ b/src/DlgRef/DlgRef_2Sel2List_QTD.h @@ -0,0 +1,55 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_2Sel2List_QTD.ui' +** +** Created: Thu Mar 27 16:38:25 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#ifndef DLGREF_2SEL2LIST_QTD_H +#define DLGREF_2SEL2LIST_QTD_H + +#include +#include + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; +class QGroupBox; +class QLineEdit; +class QComboBox; +class QLabel; +class QPushButton; + +class DlgRef_2Sel2List_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_2Sel2List_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_2Sel2List_QTD(); + + QGroupBox* GroupBox1; + QLineEdit* LineEdit2; + QComboBox* ComboBox2; + QLabel* TextLabel4; + QComboBox* ComboBox1; + QLabel* TextLabel3; + QLineEdit* LineEdit1; + QLabel* TextLabel2; + QLabel* TextLabel1; + QPushButton* PushButton1; + QPushButton* PushButton2; + +protected: + QVBoxLayout* DlgRef_2Sel2List_QTDLayout; + QGridLayout* GroupBox1Layout; + +protected slots: + virtual void languageChange(); + +}; + +#endif // DLGREF_2SEL2LIST_QTD_H diff --git a/src/DlgRef/DlgRef_3Sel3Spin2Check.cxx b/src/DlgRef/DlgRef_3Sel3Spin2Check.cxx new file mode 100644 index 000000000..fa43e01c2 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin2Check.cxx @@ -0,0 +1,116 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : DlgRef_3Sel3Spin2Check.cxx +// Author : Michael Zorin +// Module : GEOM +// $Header: + +#include +#include +#include +#include +#include +#include +#include +#include + + +/* + * Constructs a DlgRef_3Sel3Spin2Check which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +DlgRef_3Sel3Spin2Check::DlgRef_3Sel3Spin2Check(QWidget* parent, const char* name, WFlags fl) + :DlgRef_3Sel3Spin2Check_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_3Sel3Spin2Check::~DlgRef_3Sel3Spin2Check() +{ + // no need to delete child widgets, Qt does it all for us +} + +void DlgRef_3Sel3Spin2Check:: 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)(); + if ( fromRow <= 7 && 7 <= toRow) + (CheckBox2->*pShowFun)(); + } +} diff --git a/src/DlgRef/DlgRef_3Sel3Spin2Check.h b/src/DlgRef/DlgRef_3Sel3Spin2Check.h new file mode 100644 index 000000000..7c463f014 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin2Check.h @@ -0,0 +1,53 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : DlgRef_3Sel3Spin2Check.h +// Author : Michael ZORIN +// Module : GEOM +// $Header: + +#ifndef DLGREF_3SEL3SPIN2CHECK_H +#define DLGREF_3SEL3SPIN2CHECK_H + +#include "GEOM_DlgRef.hxx" + +#include "DlgRef_3Sel3Spin2Check_QTD.h" +#include "DlgRef_SpinBox.h" + +class GEOM_DLGREF_EXPORT DlgRef_3Sel3Spin2Check : public DlgRef_3Sel3Spin2Check_QTD +{ + Q_OBJECT + +public: + DlgRef_3Sel3Spin2Check( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_3Sel3Spin2Check(); + + DlgRef_SpinBox* SpinBox1; + DlgRef_SpinBox* SpinBox2; + DlgRef_SpinBox* SpinBox3; + + void ShowRows(int fromRow, int toRow, bool toShow = true); + +}; + +#endif // DLGREF_3SEL3SPIN2CHECK_H diff --git a/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.cxx b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.cxx new file mode 100644 index 000000000..a67adf48f --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.cxx @@ -0,0 +1,174 @@ +/**************************************************************************** +** Form implementation generated from reading ui file 'DlgRef_3Sel3Spin2Check_QTD.ui' +** +** Created: Wed Mar 12 11:57:09 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#include "DlgRef_3Sel3Spin2Check_QTD.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a DlgRef_3Sel3Spin2Check_QTD as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +DlgRef_3Sel3Spin2Check_QTD::DlgRef_3Sel3Spin2Check_QTD( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "DlgRef_3Sel3Spin2Check_QTD" ); + setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) ); + DlgRef_3Sel3Spin2Check_QTDLayout = new QVBoxLayout( this, 0, 6, "DlgRef_3Sel3Spin2Check_QTDLayout"); + + GroupBox1 = new QGroupBox( this, "GroupBox1" ); + GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); + 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"); + + TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); + TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( TextLabel2, 1, 0 ); + + 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 ); + + TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); + TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( TextLabel3, 2, 0 ); + + 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() ) ); + + layout1->addWidget( PushButton2, 1, 1 ); + + TextLabel6 = new QLabel( GroupBox1, "TextLabel6" ); + TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( TextLabel6, 5, 0 ); + + PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); + PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( PushButton1, 0, 1 ); + + CheckBox1 = new QCheckBox( GroupBox1, "CheckBox1" ); + + layout1->addMultiCellWidget( CheckBox1, 6, 6, 0, 2 ); + + 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 ); + + TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); + TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( TextLabel5, 4, 0 ); + + TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); + TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( TextLabel1, 0, 0 ); + + TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); + TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( TextLabel4, 3, 0 ); + + CheckBox2 = new QCheckBox( GroupBox1, "CheckBox2" ); + + layout1->addMultiCellWidget( CheckBox2, 7, 7, 0, 2 ); + + LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); + + layout1->addWidget( LineEdit1, 0, 2 ); + Spacer3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); + layout1->addItem( Spacer3, 8, 2 ); + + LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" ); + + layout1->addWidget( LineEdit3, 2, 2 ); + + PushButton3 = new QPushButton( GroupBox1, "PushButton3" ); + PushButton3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton3->sizePolicy().hasHeightForWidth() ) ); + + layout1->addWidget( PushButton3, 2, 1 ); + + 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 ); + + GroupBox1Layout->addLayout( layout1, 0, 0 ); + DlgRef_3Sel3Spin2Check_QTDLayout->addWidget( GroupBox1 ); + languageChange(); + resize( QSize(263, 254).expandedTo(minimumSizeHint()) ); + clearWState( WState_Polished ); + + // 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 ); + setTabOrder( CheckBox1, CheckBox2 ); +} + +/* + * Destroys the object and frees any allocated resources + */ +DlgRef_3Sel3Spin2Check_QTD::~DlgRef_3Sel3Spin2Check_QTD() +{ + // no need to delete child widgets, Qt does it all for us +} + +/* + * Sets the strings of the subwidgets using the current + * language. + */ +void DlgRef_3Sel3Spin2Check_QTD::languageChange() +{ + setCaption( tr( "DlgRef_3Sel3Spin2Check_QTD" ) ); + GroupBox1->setTitle( QString::null ); + TextLabel2->setText( tr( "TL2" ) ); + TextLabel3->setText( tr( "TL3" ) ); + PushButton2->setText( QString::null ); + TextLabel6->setText( tr( "TL6" ) ); + PushButton1->setText( QString::null ); + CheckBox1->setText( QString::null ); + TextLabel5->setText( tr( "TL5" ) ); + TextLabel1->setText( tr( "TL1" ) ); + TextLabel4->setText( tr( "TL4" ) ); + CheckBox2->setText( QString::null ); + PushButton3->setText( QString::null ); +} + diff --git a/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h new file mode 100644 index 000000000..a05f7fa09 --- /dev/null +++ b/src/DlgRef/DlgRef_3Sel3Spin2Check_QTD.h @@ -0,0 +1,65 @@ +/**************************************************************************** +** Form interface generated from reading ui file 'DlgRef_3Sel3Spin2Check_QTD.ui' +** +** Created: Wed Mar 12 11:57:09 2008 +** by: The User Interface Compiler ($Id$) +** +** WARNING! All changes made in this file will be lost! +****************************************************************************/ + +#ifndef DLGREF_3SEL3SPIN2CHECK_QTD_H +#define DLGREF_3SEL3SPIN2CHECK_QTD_H + +#include +#include + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QSpacerItem; +class QGroupBox; +class QLabel; +class QSpinBox; +class QLineEdit; +class QPushButton; +class QCheckBox; + +class DlgRef_3Sel3Spin2Check_QTD : public QWidget +{ + Q_OBJECT + +public: + DlgRef_3Sel3Spin2Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + ~DlgRef_3Sel3Spin2Check_QTD(); + + QGroupBox* GroupBox1; + QLabel* TextLabel2; + QSpinBox* SpinBox_3; + QLabel* TextLabel3; + QLineEdit* LineEdit2; + QPushButton* PushButton2; + QLabel* TextLabel6; + QPushButton* PushButton1; + QCheckBox* CheckBox1; + QSpinBox* SpinBox_2; + QLabel* TextLabel5; + QLabel* TextLabel1; + QLabel* TextLabel4; + QCheckBox* CheckBox2; + QLineEdit* LineEdit1; + QLineEdit* LineEdit3; + QPushButton* PushButton3; + QSpinBox* SpinBox_1; + +protected: + QVBoxLayout* DlgRef_3Sel3Spin2Check_QTDLayout; + QGridLayout* GroupBox1Layout; + QGridLayout* layout1; + QSpacerItem* Spacer3; + +protected slots: + virtual void languageChange(); + +}; + +#endif // DLGREF_3SEL3SPIN2CHECK_QTD_H diff --git a/src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui new file mode 100644 index 000000000..155cbeca0 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_1Sel5Spin1Check_QTD.ui @@ -0,0 +1,290 @@ + +DlgRef_1Sel5Spin1Check_QTD + + + DlgRef_1Sel5Spin1Check_QTD + + + + 0 + 0 + 162 + 143 + + + + DlgRef_1Sel5Spin1Check_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + + + + + unnamed + + + 11 + + + 6 + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + SpinBox2 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox3 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel5 + + + + 0 + 0 + 0 + 0 + + + + TL5 + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + SpinBox4 + + + + 7 + 0 + 0 + 0 + + + + + + SpinBox1 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel6 + + + + 0 + 0 + 0 + 0 + + + + TL6 + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + SpinBox5 + + + + 7 + 0 + 0 + 0 + + + + + + CheckBox1 + + + + + + + + + + Spacer6 + + + Vertical + + + Expanding + + + + 0 + 120 + + + + + + LineEdit1 + + + + + + + + + + diff --git a/src/DlgRef/UIFiles/DlgRef_2Sel2List_QTD.ui b/src/DlgRef/UIFiles/DlgRef_2Sel2List_QTD.ui new file mode 100644 index 000000000..db1557d9d --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_2Sel2List_QTD.ui @@ -0,0 +1,154 @@ + +DlgRef_2Sel2List_QTD + + + DlgRef_2Sel2List_QTD + + + + 0 + 0 + 187 + 182 + + + + DlgRef_2Sel2List_QTD + + + + unnamed + + + + GroupBox1 + + + + + + + unnamed + + + + LineEdit2 + + + + + ComboBox2 + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + ComboBox1 + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + LineEdit1 + + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + PushButton2 + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + diff --git a/src/DlgRef/UIFiles/DlgRef_3Sel3Spin2Check_QTD.ui b/src/DlgRef/UIFiles/DlgRef_3Sel3Spin2Check_QTD.ui new file mode 100644 index 000000000..5e26eb510 --- /dev/null +++ b/src/DlgRef/UIFiles/DlgRef_3Sel3Spin2Check_QTD.ui @@ -0,0 +1,320 @@ + +DlgRef_3Sel3Spin2Check_QTD + + + DlgRef_3Sel3Spin2Check_QTD + + + + 0 + 0 + 263 + 254 + + + + + 5 + 5 + 0 + 0 + + + + DlgRef_3Sel3Spin2Check_QTD + + + + unnamed + + + 0 + + + 6 + + + + GroupBox1 + + + + 5 + 5 + 0 + 0 + + + + + + + + unnamed + + + 11 + + + 6 + + + + layout1 + + + + unnamed + + + + TextLabel2 + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + + + SpinBox_3 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel3 + + + + 0 + 0 + 0 + 0 + + + + TL3 + + + + + LineEdit2 + + + + + PushButton2 + + + + 0 + 0 + 0 + 0 + + + + + + + + + TextLabel6 + + + + 0 + 0 + 0 + 0 + + + + TL6 + + + + + PushButton1 + + + + 0 + 0 + 0 + 0 + + + + + + + + + CheckBox1 + + + + + + + + SpinBox_2 + + + + 7 + 0 + 0 + 0 + + + + + + TextLabel5 + + + + 0 + 0 + 0 + 0 + + + + TL5 + + + + + TextLabel1 + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + + + TextLabel4 + + + + 0 + 0 + 0 + 0 + + + + TL4 + + + + + CheckBox2 + + + + + + + + LineEdit1 + + + + + Spacer3 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + LineEdit3 + + + + + PushButton3 + + + + 0 + 0 + 0 + 0 + + + + + + + + + SpinBox_1 + + + + 7 + 0 + 0 + 0 + + + + + + + + + + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + PushButton3 + LineEdit3 + SpinBox_1 + SpinBox_2 + SpinBox_3 + CheckBox1 + CheckBox2 + + + diff --git a/src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx b/src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx new file mode 100644 index 000000000..485988561 --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_CompoundFilter.cxx @@ -0,0 +1,136 @@ +// GEOM GEOM_CompoundFilter : 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : GEOM_CompoundFilter.cxx +// Author : Roman NIKOLAEV +// Module : GEOM + +#include "GEOM_CompoundFilter.h" + +// OCCT Includes +#include +#include +#include +#include + + + +//======================================================================= +// function : GEOM_CompoundFilter +// purpose : +//======================================================================= +GEOM_CompoundFilter::GEOM_CompoundFilter(SalomeApp_Study* study) +: GEOM_SelectionFilter( study ) +{ + add( TopAbs_COMPOUND ); +} + +//======================================================================= +// function : ~GEOM_CompoundFilter +// purpose : +//======================================================================= +GEOM_CompoundFilter::~GEOM_CompoundFilter() +{ +} + +//======================================================================= +// function : isOk +// purpose : +//======================================================================= +bool GEOM_CompoundFilter::isOk( const SUIT_DataOwner* sOwner) const +{ + if(GEOM_SelectionFilter::isOk(sOwner)){ + + GEOM::GEOM_Object_var obj = getObject( sOwner ); + TopoDS_Shape shape; + if ( getShape( obj, shape )){ + bool subTypes[TopAbs_SHAPE]; + getInfo(shape,subTypes); + QValueList::const_iterator it; + bool result = false; + for ( it = myKinds.constBegin(); it != myKinds.constEnd(); ++it ) + result = result || subTypes[(*it)]; + + return result; + } + } + return false; +} + + +//======================================================================= +// function : addSubType +// purpose : +//======================================================================= +void GEOM_CompoundFilter::addSubType( const int type) +{ + if(!myKinds.contains(type)) + myKinds.append(type); +} + +//======================================================================= +// function : addSubTypes +// purpose : +//======================================================================= +void GEOM_CompoundFilter::addSubTypes(const QValueList& kinds) +{ + myKinds = kinds; +} + +//======================================================================= +// function : getInfo() +// purpose : +//======================================================================= +void GEOM_CompoundFilter::getInfo(const TopoDS_Shape& aShape, bool subTypes[]) const +{ + int iType, nbTypes[TopAbs_SHAPE]; + for (iType = 0; iType < TopAbs_SHAPE; ++iType){ + nbTypes[iType] = 0; + subTypes[iType] = false; + } + + 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()]++; + } + } + } + + for(iType = TopAbs_COMPSOLID; iType < TopAbs_SHAPE; ++iType) { + if(nbTypes[iType] > 0) { + subTypes[iType] = true; + break; + } + } +} diff --git a/src/GEOMFiltersSelection/GEOM_CompoundFilter.h b/src/GEOMFiltersSelection/GEOM_CompoundFilter.h new file mode 100644 index 000000000..2e20c08e5 --- /dev/null +++ b/src/GEOMFiltersSelection/GEOM_CompoundFilter.h @@ -0,0 +1,44 @@ +// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +#ifndef GEOM_COMPOUNDFILTER_H +#define GEOM_COMPOUNDFILTER_H +#include "GEOM_SelectionFilter.h" + +class Standard_EXPORT GEOM_CompoundFilter : public GEOM_SelectionFilter +{ + public: + GEOM_CompoundFilter( SalomeApp_Study* study ); + ~GEOM_CompoundFilter(); + + virtual bool isOk( const SUIT_DataOwner* ) const; + void addSubType(const int ); + void addSubTypes(const QValueList& ); + + private: + void getInfo(const TopoDS_Shape&, bool subTypes []) const; + + + private: + QValueList myKinds; +}; + + +#endif + diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx new file mode 100644 index 000000000..e0f7f93f9 --- /dev/null +++ b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.cxx @@ -0,0 +1,131 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : GEOMToolsGUI_DeleteDlg.cxx +// Author : Dmitry Matveitchev, Open CASCADE S.A.S. +// + +#include "GEOMToolsGUI_DeleteDlg.h" + +#include +#include +#include +#include +#include +#include +#include + +static bool isEntryLess( const QString& e1, const QString& e2 ) +{ + QStringList el1 = QStringList::split(":", e1); + QStringList el2 = QStringList::split(":", e2); + int e1c = el1.count(), e2c = el2.count(); + for ( int i = 0; i < e1c && i < e2c; i++ ) { + int id1 = el1[i].toInt(); + int id2 = el2[i].toInt(); + if ( id1 < id2 ) return true; + else if ( id2 < id1 ) return false; + } + return el1.count() < el2.count(); +} + +static QStringList objectsToNames( const QMap& objects ) +{ + QStringList entries; + for ( QMap::ConstIterator it = objects.begin(); it != objects.end(); ++it ) { + QString entry = it.key(); + QStringList::Iterator it; + bool added = false; + for ( it = entries.begin(); it != entries.end() && !added; ++it ) { + if ( isEntryLess( entry, *it ) ) { + entries.insert( it, entry ); + added = true; + } + } + if ( !added ) + entries.append( entry ); + } + QStringList names; + for ( int i = 0; i < entries.count(); i++ ) { + int level = entries[i].contains(":")-3; + QString prefix; prefix.fill( ' ', level*2 ); + names.append( prefix + objects[ entries[i] ] ); + } + return names; +} + +/*! + \brief Constructor. + \param parent parent widget +*/ +GEOMToolsGUI_DeleteDlg::GEOMToolsGUI_DeleteDlg( QWidget* parent, + const QMap& objects, + bool deleteAll ) +: QDialog( parent, "GEOMToolsGUI_DeleteDlg", true ) +{ + setCaption( tr( "GEOM_DELETE_OBJECTS" ) ); + setSizeGripEnabled( true ); + + QGridLayout* topLayout = new QGridLayout( this ); + + topLayout->setSpacing( 6 ); + topLayout->setMargin( 11 ); + + QLabel* pix = new QLabel( this ); + pix->setPixmap( QMessageBox::standardIcon( QMessageBox::Question ) ); + pix->setScaledContents( false ); + pix->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ) ); + topLayout->addWidget( pix, 0, 0 ); + + QLabel* lab = new QLabel( this ); + lab->setAlignment( Qt::AlignCenter ); + topLayout->addWidget( lab, 0, 1 ); + + if ( !deleteAll ) { + lab->setText( tr( "GEOM_REALLY_DELETE" ).arg( objects.count() ) ); + QTextBrowser* viewer = new QTextBrowser( this ); + viewer->setText( QString( " - %1" ).arg( objectsToNames( objects ).join( "\n - " ) ) ); + topLayout->addMultiCellWidget( viewer, 1, 1, 0, 1 ); + } + else { + lab->setText( tr( "GEOM_REALLY_DELETE_ALL" ) ); + } + + QPushButton* buttonYes = new QPushButton( tr( "GEOM_BUT_YES" ), this ); + QPushButton* buttonNo = new QPushButton( tr( "GEOM_BUT_NO" ), this ); + QHBoxLayout* btnLayout = new QHBoxLayout; + btnLayout->setMargin( 0 ); + btnLayout->setSpacing( 6 ); + btnLayout->addWidget( buttonYes ); + btnLayout->addSpacing( 10 ); + btnLayout->addStretch(); + btnLayout->addWidget( buttonNo ); + int rc = topLayout->numRows(); + topLayout->addMultiCellLayout( btnLayout, rc, rc, 0, 1 ); + + /* signals and slots connections */ + connect( buttonYes, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( buttonNo, SIGNAL( clicked() ), this, SLOT( reject() ) ); +} + +GEOMToolsGUI_DeleteDlg::~GEOMToolsGUI_DeleteDlg() +{ +} diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h new file mode 100644 index 000000000..d178dac3b --- /dev/null +++ b/src/GEOMToolsGUI/GEOMToolsGUI_DeleteDlg.h @@ -0,0 +1,41 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : GEOMToolsGUI_DeleteDlg.h +// Author : Dmitry Matveitchev, Open CASCADE S.A.S. +// + +#ifndef GEOMTOOLSGUI_DELETEDLG_H +#define GEOMTOOLSGUI_DELETEDLG_H + +#include +#include + +class GEOMToolsGUI_DeleteDlg : public QDialog +{ + Q_OBJECT + +public: + GEOMToolsGUI_DeleteDlg( QWidget*, const QMap&, bool = false ); + ~GEOMToolsGUI_DeleteDlg(); +}; + +#endif // GEOMTOOLSGUI_DELETEDLG_H diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx new file mode 100644 index 000000000..1b408dd7c --- /dev/null +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.cxx @@ -0,0 +1,347 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : OperationGUI_GetShapesOnShapeDlg.cxx +// Author : Lucien PIGNOLONI +// Module : GEOM + +#include "OperationGUI_GetShapesOnShapeDlg.h" + +#include "SUIT_Session.h" +#include "SalomeApp_Application.h" +#include "LightApp_SelectionMgr.h" + +#include +#include + +//using namespace std; + +//============================================================================== +// class : OperationGUI_GetShapesOnShapeDlg() +// purpose : Constructs a OperationGUI_GetShapesOnShapeDlg 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_GetShapesOnShapeDlg::OperationGUI_GetShapesOnShapeDlg(GeometryGUI* theGeometryGUI, + QWidget* parent) + :GEOMBase_Skeleton(theGeometryGUI, parent, "OperationGUI_GetShapesOnShapeDlg", false, + WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + + SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr(); + QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_SHAPES_ON_SHAPE"))); + QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT"))); + + setCaption(tr("GEOM_SHAPES_ON_SHAPE_TITLE")); + + GroupConstructors->setTitle(tr("GEOM_SHAPES_ON_SHAPE")); + + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_2Sel2List_QTD(this, "GroupPoints"); + //GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION")); + GroupPoints->GroupBox1->setTitle("Input data"); + GroupPoints->TextLabel1->setText(tr("GEOM_SHAPES_ON_SHAPE_ESHAPE")); + GroupPoints->TextLabel2->setText(tr("GEOM_SHAPES_ON_SHAPE_CSHAPE")); + GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT")); + GroupPoints->TextLabel4->setText(tr("GEOM_SHAPES_ON_SHAPE_STATE")); + GroupPoints->PushButton1->setPixmap(image2); + GroupPoints->PushButton2->setPixmap(image2); + GroupPoints->LineEdit1->setReadOnly( true ); + GroupPoints->LineEdit2->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + + setHelpFileName("shapesonshape_page.html"); + + Init(); +} + + +//================================================================================= +// function : ~OperationGUI_GetShapesOnShapeDlg +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +OperationGUI_GetShapesOnShapeDlg::~OperationGUI_GetShapesOnShapeDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::Init() +{ + /* type for sub shape selection */ + GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_SOLID")); + // commented by skl for IPAL19949 - finder isn't allowed such type + //GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_SHELL")); + GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_FACE")); + // commented by skl for IPAL19949 - finder isn't allowed such type + //GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_WIRE")); + GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_EDGE")); + GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_VERTEX")); + + /* type for state selection */ + GroupPoints->ComboBox2->insertItem(tr("GEOM_STATE_IN")); + GroupPoints->ComboBox2->insertItem(tr("GEOM_STATE_OUT")); + GroupPoints->ComboBox2->insertItem(tr("GEOM_STATE_ON")); + GroupPoints->ComboBox2->insertItem(tr("GEOM_STATE_ONIN")); + GroupPoints->ComboBox2->insertItem(tr("GEOM_STATE_ONOUT")); + + GroupPoints->LineEdit1->clear(); + GroupPoints->LineEdit2->clear(); + + /* 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->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); + connect(GroupPoints->ComboBox2, SIGNAL(activated(int)), this, SLOT(ComboTextChanged())); + + connect(myGeomGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + + connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + + globalSelection( GEOM_ALLSHAPES ); + + initName( GroupConstructors->title() ); + + resize(0, 0); + GroupPoints->TextLabel3->show(); + GroupPoints->ComboBox1->show(); + GroupPoints->ComboBox1->setCurrentItem(0); + GroupPoints->ComboBox2->show(); + GroupPoints->ComboBox2->setCurrentItem(0); + + myEditCurrentArgument = GroupPoints->LineEdit1; + myEditCurrentArgument->setFocus(); + connect(myGeomGUI->getApp()->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool OperationGUI_GetShapesOnShapeDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + return true; +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection has changed +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText( "" ); + QString aString = ""; + + int nbSel = GEOMBase::GetNameOfSelectedIObjects( selectedIO(), aString, true ); + + if(nbSel>0) { + Standard_Boolean aRes = Standard_False; + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes ); + if ( !CORBA::is_nil( aSelectedObject ) && aRes && GEOMBase::IsShape( aSelectedObject ) ) { + { + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); + if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) myObject1 = aSelectedObject; + else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) myObject2 = aSelectedObject; + } + } + } + + myEditCurrentArgument->setText( aString ); +} + + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::SetEditCurrentArgument() +{ + QPushButton* send = (QPushButton*)sender(); + + if ( send == GroupPoints->PushButton1 ) myEditCurrentArgument = GroupPoints->LineEdit1; + else if ( send == GroupPoints->PushButton2 ) myEditCurrentArgument = GroupPoints->LineEdit2; + + myEditCurrentArgument->setFocus(); + SelectionIntoArgument(); +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::LineEditReturnPressed() +{ + QLineEdit* send = (QLineEdit*)sender(); + if ( send == GroupPoints->LineEdit1 || send == GroupPoints->LineEdit2 ) + { + myEditCurrentArgument = send; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + globalSelection( GEOM_ALLSHAPES ); + connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; +} + + +//================================================================================= +// function : enterEvent() +// purpose : when mouse enter onto the QWidget +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::enterEvent(QEvent * e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr OperationGUI_GetShapesOnShapeDlg::createOperation() +{ + return getGeomEngine()->GetIShapesOperations( getStudyId() ); +} + + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool OperationGUI_GetShapesOnShapeDlg::isValid( QString& msg ) +{ + Handle(SALOME_InteractiveObject) IO = firstIObject(); + Standard_Boolean testResult; + GEOM::GEOM_Object_var anObject = GEOMBase::ConvertIOinGEOMObject( IO, testResult ); + if ( !testResult || anObject->_is_nil() ) + return false; + + return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 ); +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool OperationGUI_GetShapesOnShapeDlg::execute( ObjectList& objects ) +{ + int aLimit = GroupPoints->ComboBox1->currentItem(); + switch (aLimit) + { + case 0: aLimit = GEOM::SOLID ; break; + case 1: aLimit = GEOM::FACE ; break; + case 2: aLimit = GEOM::EDGE ; break; + case 3: aLimit = GEOM::VERTEX; break; + default: aLimit = GEOM::SHAPE ; + } + + GEOM::shape_state aState; + switch (GroupPoints->ComboBox2->currentItem()) + { + case 0: aState = GEOM::ST_IN; break; + case 1: aState = GEOM::ST_OUT; break; + case 2: aState = GEOM::ST_ON; break; + case 3: aState = GEOM::ST_ONIN; break; + case 4: aState = GEOM::ST_ONOUT; break; + default: break; + } + + GEOM::GEOM_Object_var anObj = GEOM::GEOM_IShapesOperations:: + _narrow( getOperation() )->GetShapesOnShapeAsCompound(myObject2, myObject1, + (CORBA::Short) aLimit, + aState); + + if (!anObj->_is_nil()) + objects.push_back( anObj._retn() ); + + return objects.size(); +} + + +//================================================================================= +// function : closeEvent +// purpose : +//================================================================================= +void OperationGUI_GetShapesOnShapeDlg::closeEvent( QCloseEvent* e ) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + + +//======================================================================= +//function : ComboTextChanged +//purpose : +//======================================================================= +void OperationGUI_GetShapesOnShapeDlg::ComboTextChanged() +{ + bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3; +} + + diff --git a/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h new file mode 100644 index 000000000..f2e955e09 --- /dev/null +++ b/src/OperationGUI/OperationGUI_GetShapesOnShapeDlg.h @@ -0,0 +1,77 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : OperationGUI_GetShapesOnShapeDlg.h +// Author : Lucien PIGNOLONI +// Module : GEOM + +#ifndef DIALOGBOX_GETSHAPESONSHAPE_H +#define DIALOGBOX_GETSHAPESONSHAPE_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_2Sel2List_QTD.h" +#include "GEOMAlgo_State.hxx" + + +//================================================================================= +// class : OperationGUI_GetShapesOnShapeDlg +// purpose : +//================================================================================= +class OperationGUI_GetShapesOnShapeDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + OperationGUI_GetShapesOnShapeDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0); + ~OperationGUI_GetShapesOnShapeDlg(); + +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); + + GEOM::GEOM_Object_var myObject1; + GEOM::GEOM_Object_var myObject2; + int myShapeType; + GEOMAlgo_State myState; + + DlgRef_2Sel2List_QTD* GroupPoints; + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + void SetEditCurrentArgument(); + void SelectionIntoArgument(); + void LineEditReturnPressed(); + void ActivateThisDialog(); + void ComboTextChanged(); +}; + +#endif // DIALOGBOX_GETSHAPESONSHAPE_H diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx new file mode 100644 index 000000000..2afad6e42 --- /dev/null +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx @@ -0,0 +1,307 @@ +// GEOM RepairGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : RepairGUI_RemoveExtraEdgesDlg.cxx +// Author : Michael Zorin +// Module : GEOM +// $Header$ + +#include "RepairGUI_RemoveExtraEdgesDlg.h" + +#include "SalomeApp_Application.h" +#include "LightApp_SelectionMgr.h" +#include "SUIT_Session.h" + +#include "GEOMImpl_Types.hxx" + +#include + +#include +#include + +//================================================================================= +// class : RepairGUI_RemoveExtraEdgesDlg() +// purpose : Constructs a RepairGUI_RemoveExtraEdgesDlg 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_RemoveExtraEdgesDlg::RepairGUI_RemoveExtraEdgesDlg(GeometryGUI* theGeometryGUI, QWidget* parent, + const char* name, bool modal, WFlags fl) + :GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize | + WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu) +{ + SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); + QPixmap image0(aResMgr->loadPixmap("GEOM",tr("ICON_DLG_REMOVE_EXTRA_EDGES"))); + QPixmap image1(aResMgr->loadPixmap("GEOM",tr("ICON_SELECT"))); + + setCaption(tr("GEOM_REMOVE_EXTRA_EDGES_TITLE")); + + /***************************************************************/ + GroupConstructors->setTitle(tr("GEOM_REMOVE_EXTRA_EDGES_TITLE")); + RadioButton1->setPixmap(image0); + RadioButton2->close(TRUE); + RadioButton3->close(TRUE); + + GroupPoints = new DlgRef_1Sel_QTD(this, "GroupPoints"); + GroupPoints->GroupBox1->setTitle(tr("GEOM_REMOVE_EXTRA_EDGES")); + GroupPoints->TextLabel1->setText(tr("GEOM_SELECTED_SHAPE")); + GroupPoints->PushButton1->setPixmap(image1); + GroupPoints->LineEdit1->setReadOnly( true ); + + Layout1->addWidget(GroupPoints, 2, 0); + /***************************************************************/ + + setHelpFileName("remove_extra_edges_operation_page.html"); + + Init(); +} + + +//================================================================================= +// function : ~RepairGUI_RemoveExtraEdgesDlg() +// purpose : Destroys the object and frees any allocated resources +//================================================================================= +RepairGUI_RemoveExtraEdgesDlg::~RepairGUI_RemoveExtraEdgesDlg() +{ +} + + +//================================================================================= +// function : Init() +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::Init() +{ + /* init variables */ + myEditCurrentArgument = GroupPoints->LineEdit1; + + myOkObject = false; + + activateSelection(); + + GroupBoxPublish->show(); + + /* 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(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + + initName( tr( "REMOVE_EXTRA_EDGES_NEW_OBJ_NAME" ) ); +} + + +//================================================================================= +// function : ClickOnOk() +// purpose : Same than click on apply but close this dialog. +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::ClickOnOk() +{ + if ( ClickOnApply() ) + ClickOnCancel(); +} + +//================================================================================= +// function : ClickOnApply() +// purpose : +//================================================================================= +bool RepairGUI_RemoveExtraEdgesDlg::ClickOnApply() +{ + if ( !onAccept() ) + return false; + + initName(); + + myEditCurrentArgument->setText(""); + myObject = GEOM::GEOM_Object::_nil(); + + myOkObject = false; + + activateSelection(); + + return true; +} + + +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection as changed or other case +// : used only by SelectButtonC1A1 (LineEditC1A1) +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::SelectionIntoArgument() +{ + myEditCurrentArgument->setText(""); + QString aName; + + if(myEditCurrentArgument == GroupPoints->LineEdit1) { + if (IObjectCount() != 1) { + if (myEditCurrentArgument == GroupPoints->LineEdit1) + myOkObject = false; + return; + } + } + + // nbSel == 1 + Standard_Boolean testResult = Standard_False; + GEOM::GEOM_Object_ptr aSelectedObject = + GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); + + if (!testResult) + return; + + if (myEditCurrentArgument == GroupPoints->LineEdit1) { + myObject = aSelectedObject; + myOkObject = true; + } + + myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); +} + +//================================================================================= +// function : SetEditCurrentArgument() +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::SetEditCurrentArgument() +{ + if( sender() == GroupPoints->PushButton1 ) + { + GroupPoints->LineEdit1->setFocus(); + myEditCurrentArgument = GroupPoints->LineEdit1; + } + SelectionIntoArgument(); +} + + +//================================================================================= +// function : LineEditReturnPressed() +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::LineEditReturnPressed() +{ + if( sender() == GroupPoints->LineEdit1 ) + { + myEditCurrentArgument = GroupPoints->LineEdit1; + GEOMBase_Skeleton::LineEditReturnPressed(); + } +} + + +//================================================================================= +// function : ActivateThisDialog() +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::ActivateThisDialog() +{ + GEOMBase_Skeleton::ActivateThisDialog(); + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + + activateSelection(); +} + + +//================================================================================= +// function : enterEvent() +// purpose : Mouse enter onto the dialog to activate it +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::enterEvent(QEvent* e) +{ + if ( !GroupConstructors->isEnabled() ) + ActivateThisDialog(); +} + + +//================================================================================= +// function : closeEvent() +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::closeEvent(QCloseEvent* e) +{ + GEOMBase_Skeleton::closeEvent( e ); +} + +//================================================================================= +// function : activateSelection +// purpose : activate selection of solids and compounds +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::activateSelection() +{ + TColStd_MapOfInteger aTypes; + aTypes.Add( GEOM_SOLID ); + aTypes.Add( GEOM_COMPOUND ); + globalSelection( aTypes ); +} + +//================================================================================= +// function : createOperation +// purpose : +//================================================================================= +GEOM::GEOM_IOperations_ptr RepairGUI_RemoveExtraEdgesDlg::createOperation() +{ + return getGeomEngine()->GetIBlocksOperations( getStudyId() ); +} + +//================================================================================= +// function : isValid +// purpose : +//================================================================================= +bool RepairGUI_RemoveExtraEdgesDlg::isValid( QString& msg ) +{ + return myOkObject; +} + +//================================================================================= +// function : execute +// purpose : +//================================================================================= +bool RepairGUI_RemoveExtraEdgesDlg::execute( ObjectList& objects ) +{ + GEOM::GEOM_Object_var anObj; + + anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->RemoveExtraEdges(myObject); + + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); + + return true; +} + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject) +{ + if (CheckBoxRestoreSS->isChecked()) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory + /*theInheritFirstArg=*/true); + } +} diff --git a/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h new file mode 100644 index 000000000..4e8237119 --- /dev/null +++ b/src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h @@ -0,0 +1,78 @@ +// GEOM GEOMGUI : GUI for Geometry component +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// +// +// File : RepairGUI_RemoveExtraEdgesDlg.h +// Author : Michael ZORIN +// Module : GEOM + +#ifndef DIALOGBOX_REMOVEEXTRAEDGES_H +#define DIALOGBOX_REMOVEEXTRAEDGES_H + +#include "GEOMBase_Skeleton.h" +#include "DlgRef_1Sel_QTD.h" + +//================================================================================= +// class : RepairGUI_RemoveExtraEdgesDlg +// purpose : Remove all seam and degenerated edges from a given shape. +//================================================================================= +class RepairGUI_RemoveExtraEdgesDlg : public GEOMBase_Skeleton +{ + Q_OBJECT + +public: + RepairGUI_RemoveExtraEdgesDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, + const char* name = 0, bool modal = FALSE, WFlags fl = 0); + ~RepairGUI_RemoveExtraEdgesDlg(); + +protected: + // redefined from GEOMBase_Helper + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& objects ); + virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr); + +private : + void Init(); + void enterEvent(QEvent* e); + void closeEvent(QCloseEvent* e); + + void activateSelection(); + + GEOM::GEOM_Object_var myObject; + bool myOkObject; + + DlgRef_1Sel_QTD* GroupPoints; + + +private slots: + void ClickOnOk(); + bool ClickOnApply(); + + void ActivateThisDialog(); + + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); +}; + +#endif // DIALOGBOX_REMOVEEXTRAEDGES_H