From: vsr Date: Wed, 18 Dec 2013 14:23:59 +0000 (+0000) Subject: Merge from V7_3_BR branch 18/12/2013 X-Git-Tag: V7_4_0a1~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bb545186fa0ae02fa021337e6ecbedaba96e620e;p=modules%2Fgeom.git Merge from V7_3_BR branch 18/12/2013 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bebba4c6..f858e7c26 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ CMAKE_POLICY(SET CMP0003 NEW) STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 3) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) diff --git a/doc/salome/gui/GEOM/images/isos.png b/doc/salome/gui/GEOM/images/isos.png new file mode 100644 index 000000000..86433e164 Binary files /dev/null and b/doc/salome/gui/GEOM/images/isos.png differ diff --git a/doc/salome/gui/GEOM/images/pipe.png b/doc/salome/gui/GEOM/images/pipe.png index e7caa8394..c1b77a980 100755 Binary files a/doc/salome/gui/GEOM/images/pipe.png and b/doc/salome/gui/GEOM/images/pipe.png differ diff --git a/doc/salome/gui/GEOM/images/pipe2.png b/doc/salome/gui/GEOM/images/pipe2.png index 5dbf37736..a94f2934f 100755 Binary files a/doc/salome/gui/GEOM/images/pipe2.png and b/doc/salome/gui/GEOM/images/pipe2.png differ diff --git a/doc/salome/gui/GEOM/input/common_operation.doc b/doc/salome/gui/GEOM/input/common_operation.doc index b317eed99..804fcfafb 100644 --- a/doc/salome/gui/GEOM/input/common_operation.doc +++ b/doc/salome/gui/GEOM/input/common_operation.doc @@ -2,29 +2,38 @@ \page common_operation_page Common -To produce a \b Common operation in the Main Menu select Operations - > Boolean - > Common +\b Common operation cuts the common part of a list of shapes and transforms it into an independent geometrical object. -This operation cuts the common part of a list of shapes and transforms it into an independent geometrical object. +To produce it, select in the main menu Operations - > Boolean - > Common. -The \b Result will be a \b GEOM_Object. +\image html bool2.png "Common dialog" -TUI Command: geompy.MakeCommonList(theShapesList, checkSelfInte)\n -Arguments: Name + a list of shapes + an optional flag for self-intersection check.\n -Advanced option: -\ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments". +In this dialog: +- Input or accept the default \b Name of the resulting shape. +- Click the arrow button and select in the Object Browser or in the Viewer the Objects the common part which of should be found. +- Activate the corresponding check-box if you wish to Detect Self-intersections +- Activate \ref restore_presentation_parameters_page "Advanced options" if required. +- Press "Apply" or "Apply & Close" button to get the result (GEOM_Object). -\image html bool2.png "Common dialog" -\note This algorithm doesn't find all types of self-intersections. It is tuned +\note This algorithm does not find all types of self-intersections. It is tuned to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face intersections. Face/face intersections detection is switched off as it is a time-consuming operation that gives an impact on performance. To find - all self-intersections please use \ref check_self_intersections_page + all self-intersections use \ref check_self_intersections_page "Detect Self-intersection tool". + + +This operation can be performed using a TUI Command: + +geompy.MakeCommonList(theShapesList, checkSelfInte) + +Arguments: Name + a list of shapes + an optional flag for self-intersection check. + +There is also a special TUI Command for the Common operation on two shapes : -For a particular case with two shapes for the Common operation there is the following TUI command: +geompy.MakeCommon(s1, s2, checkSelfInte) -TUI Command: geompy.MakeCommon(s1, s2, checkSelfInte)\n Arguments: Name + 2 shapes + an optional flag for self-intersection check. Example: @@ -38,8 +47,7 @@ Our TUI Scripts provide you with useful examples of the use of More details -For a detailed description of the Boolean operations please refer to -this document. +Please, refer to this document for a detailed description of Boolean operations. It provides a general review of the Partition and Boolean operations algorithms, describes the usage methodology and highlights major limitations of these operations. diff --git a/doc/salome/gui/GEOM/input/creating_isoline.doc b/doc/salome/gui/GEOM/input/creating_isoline.doc index 2aac337f1..c69418547 100644 --- a/doc/salome/gui/GEOM/input/creating_isoline.doc +++ b/doc/salome/gui/GEOM/input/creating_isoline.doc @@ -2,21 +2,30 @@ \page create_isoline_page Isoline -To create an \b Isoline in the Main Menu select New Entity - > -Basic - > Isoline +\b Isoline is a 3D curve built on a bounded face limited by [Umin, Umax] and [Vmin, Vmax] +values of U and V parameters. For all points of the isoline U or V parameter value is constant. -\n The \b Result of this operation will be a GEOM_Object. -It may be either an edge or a compound of several edges. - -\n You can define an Isoline by a \b Face, \b Type and \b Parameter. -\n TUI Command: geompy.MakeIsoline(theFace, IsUIsoline, theParameter) -\n Arguments: Name + Face + Type (True for U-Isoline; False for V-Isoline) + Parameter. +To create an \b Isoline of a face in the Main Menu select New Entity - > Basic - > Isoline. \image html isoline1.png +In this dialog: +- Input or accept the default \b Name of the resulting shape. +- Click the arrow button and select in the Object Browser or in the Viewer the \b Face, for which the Isoline is built. +- Select along which coordinate: \b U-Isoline or \b V-Isoline the Isoline is built; +- Set \b Parameter (ranging from 0 to 1), which defines the proportion, at which a face is divided by the isoline. +If Parameter=0.5, the isoline is a median. +- Press "Apply" or "Apply & Close" button to get the result (an edge or a compound of several edges). + +This operation can be performed using a TUI Command: + +geompy.MakeIsoline(theFace, IsUIsoline, theParameter) + +Arguments: Name + Face + Type (True for U-Isoline; False for V-Isoline) + Parameter. + Example: -\image html isoline2.png "Isoline on face" +\image html isoline2.png "Isoline on a rectangle face" Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_curve "Basic Geometric Objects". diff --git a/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc b/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc index 5f899eef4..a4b42cee3 100644 --- a/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc +++ b/doc/salome/gui/GEOM/input/creating_smoothingsurface.doc @@ -1,18 +1,15 @@ /*! -\page create_smoothingsurface_page SmoothingSurface +\page create_smoothingsurface_page Smoothing Surface -To create a \b SmoothingSurface in the Main Menu select New Entity - > +To create a Smoothing Surface in the Main Menu select New Entity - > Advanced - > SmoothingSurface -Specify the parameters of the SmoothingSurface object creation in the opened dialog -box and press "Apply" or "Apply & Close" button. -Result of each operation will be a GEOM_Object. +Specify the \b Name of the surface and the list of \b Points, from which it is approximated and press "Apply" or "Apply & Close" button. -TUI Command: geompy.MakeSmoothingSurface(lPoints) +The result of the operation will be a GEOM_Object(Surface). -Arguments: -- \b Points - list of points +TUI Command: geompy.MakeSmoothingSurface(Points) \image html smoothingsurface_dlg.png diff --git a/doc/salome/gui/GEOM/input/cut_operation.doc b/doc/salome/gui/GEOM/input/cut_operation.doc index f4050a318..30235d6de 100644 --- a/doc/salome/gui/GEOM/input/cut_operation.doc +++ b/doc/salome/gui/GEOM/input/cut_operation.doc @@ -2,29 +2,37 @@ \page cut_operation_page Cut -To produce a \b Cut operation in the Main Menu select Operations - > Boolean - > Cut +\b Cut operation cuts a shape with a list of other shapes. -This operation cuts a shape with a list of other shapes. - -The \b Result will be a \b GEOM_Object. - -TUI Command: geompy.MakeCutList(theMainShape, theShapesList, checkSelfInte)\n -Arguments: Name + a main shape + a list of other shapes + an optional flag for self-intersection check.\n -Advanced option: -\ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments". +To produce it, select in the main menu Operations - > Boolean - > Cut \image html bool3.png "Cut dialog" -\note This algorithm doesn't find all types of self-intersections. It is tuned +In this dialog: +- Input or accept the default \b Name of the resulting shape. +- Click the arrow button and select in the Object Browser or in the Viewer the Main Object, which will be cut by tool objects. +- Select the Tool objects, which will cut the main object. +- Activate the corresponding check-box if you wish to Detect Self-intersections . +- Activate \ref restore_presentation_parameters_page "Advanced options" if required. +- Press "Apply" or "Apply & Close" button to get the result (GEOM_Object). + +\note This algorithm does not find all types of self-intersections. It is tuned to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face intersections. Face/face intersections detection is switched off as it is a time-consuming operation that gives an impact on performance. To find - all self-intersections please use \ref check_self_intersections_page + all self-intersections use \ref check_self_intersections_page "Detect Self-intersection tool". -For a particular case with two shapes (object and tool) for the Cut operation there is the following TUI command: +This operation can be performed using a TUI Command: + +geompy.MakeCutList(theMainShape, theShapesList, checkSelfInte) + +Arguments: Name + a main shape + a list of other shapes + an optional flag for self-intersection check. + +There is also a special TUI Command: for the Cut operation on two shapes (object and tool) : + +geompy.MakeCut(s1, s2, checkSelfInte) -TUI Command: geompy.MakeCut(s1, s2, checkSelfInte)\n Arguments: Name + the object + the tool + an optional flag for self-intersection check. Example: @@ -38,8 +46,7 @@ Our TUI Scripts provide you with useful examples of the use of More details -For a detailed description of the Boolean operations please refer to -this document. +Please refer to this document for a detailed description of Boolean operations. It provides a general review of the Partition and Boolean operations algorithms, describes the usage methodology and highlights major limitations of these operations. diff --git a/doc/salome/gui/GEOM/input/fuse_operation.doc b/doc/salome/gui/GEOM/input/fuse_operation.doc index a2779fb00..95dc6ce06 100644 --- a/doc/salome/gui/GEOM/input/fuse_operation.doc +++ b/doc/salome/gui/GEOM/input/fuse_operation.doc @@ -2,30 +2,36 @@ \page fuse_operation_page Fuse -To produce a \b Fuse operation in the Main Menu select -Operations - > Boolean - > Fuse. +\b Fuse operation creates one shape from a list of shapes. -This operation creates one shape from a list of shapes. - -The \b Result will be a \b GEOM_Object. - -TUI Command: geompy.MakeFuseList(theShapesList, checkSelfInte)\n -Arguments: Name + a list of shapes + an optional flag for self-intersection check.\n -Advanced option: -\ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments". +To produce it, select in the Main Menu Operations - > Boolean - > Fuse. \image html bool1.png "Fuse dialog" -\note This algorithm doesn't find all types of self-intersections. It is tuned +In this dialog: +- Input or accept the default \b Name of the resulting shape. +- Click the arrow button and select in the Object Browser or in the Viewer the Objects to be fused. +- Activate the corresponding check-box if you wish to Detect Self-intersections . +- Activate \ref restore_presentation_parameters_page "Advanced options" if required. +- Press "Apply" or "Apply & Close" button to get the result (GEOM_Object). + +\note This algorithm does not find all types of self-intersections. It is tuned to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face intersections. Face/face intersections detection is switched off as it is a time-consuming operation that gives an impact on performance. To find - all self-intersections please use \ref check_self_intersections_page + all self-intersections use \ref check_self_intersections_page "Detect Self-intersection tool". + +This operation can be performed using a TUI Command: + +geompy.MakeFuseList(theShapesList, checkSelfInte) -For a particular case with two shapes to be fused there is the following TUI command: +Arguments: Name + a list of shapes + an optional flag for self-intersection check. + +There is also a special TUI Command for \b Fuse operation on two shapes : + +geompy.MakeFuse(s1, s2, checkSelfInte) -TUI Command: geompy.MakeFuse(s1, s2, checkSelfInte)\n Arguments: Name + 2 shapes + an optional flag for self-intersection check. Example: @@ -38,13 +44,13 @@ Our TUI Scripts provide you with useful examples of the use of \ref tui_fuse "Boolean Operations". More details - +major limitations of these operations. + +Perhaps you also ask yourself : \ref partition_explanation "What is the difference between partition, compounds and fuse operation ?" */ diff --git a/doc/salome/gui/GEOM/input/geometry_preferences.doc b/doc/salome/gui/GEOM/input/geometry_preferences.doc index 81090266a..bfce50129 100644 --- a/doc/salome/gui/GEOM/input/geometry_preferences.doc +++ b/doc/salome/gui/GEOM/input/geometry_preferences.doc @@ -44,32 +44,32 @@ predefined materials.
  • Isolines width - allows to define default width of the isolines.
  • Preview edges width - allows to define width of the edges for preview.
  • Measures line width - allows to define lines width of measurements tools.
  • -
  • Automatic bring to front - when option is ON: the objects selected by the user will be automatically -made "top-level".
  • +
  • Automatic bring to front - when the option is on, the objects selected by the user automatically become "top-level".
  • diff --git a/doc/salome/gui/GEOM/input/import_export.doc b/doc/salome/gui/GEOM/input/import_export.doc index 775be618f..ccc5c6a7e 100644 --- a/doc/salome/gui/GEOM/input/import_export.doc +++ b/doc/salome/gui/GEOM/input/import_export.doc @@ -8,6 +8,8 @@ are implemented via plug-ins, which gives the opportunity to expand the range of available formats by adding more plug-ins (for example, CATIA 5). +The \subpage xao_format_page "import and export of shapes in XAO format" is implemented differently. + To import geometrical objects from a BREP, IGES, STEP, ACIS or STL file: \par diff --git a/doc/salome/gui/GEOM/input/index.doc b/doc/salome/gui/GEOM/input/index.doc index 7a9035091..00c1bf700 100644 --- a/doc/salome/gui/GEOM/input/index.doc +++ b/doc/salome/gui/GEOM/input/index.doc @@ -14,17 +14,14 @@ - \subpage transform_geom_obj_page "transformation of geometrical objects" using various algorithms; - \subpage repairing_operations_page "optimization of geometrical objects"; -- viewing \subpage geometrical_obj_prop_page "geometrical object properties" - and other information about geometrical objects using +- viewing information about geometrical objects using \subpage using_measurement_tools_page "measurement tools"; - \subpage pictures_page "designing shapes from pictures"; -- easily setting parameters via the variables predefined in - \subpage using_notebook_geom_page "SALOME notebook". - -The possibility to classify the created geometrical objects by moving it into early created container (folder) is detailed on -\subpage arranging_study_objects_page section. -XAO format describing a shape with its topology, groups and fields is detailed on \subpage xao_format_page section. +It is possible to easily set parameters via the variables predefined in + \subpage using_notebook_geom_page "SALOME notebook". +Also, there is a possibility to customize an +\subpage arranging_study_objects_page "arrangement of the geometrical objects in the SALOME study". Geometry module preferences are described in the \subpage geometry_preferences_page section of SALOME Geometry Help. diff --git a/doc/salome/gui/GEOM/input/material.doc b/doc/salome/gui/GEOM/input/material.doc index 59a022351..d67becaaa 100644 --- a/doc/salome/gui/GEOM/input/material.doc +++ b/doc/salome/gui/GEOM/input/material.doc @@ -1,6 +1,6 @@ /*! -\page material_page Material properties +\page material_page Material */ diff --git a/doc/salome/gui/GEOM/input/section_operation.doc b/doc/salome/gui/GEOM/input/section_operation.doc index b5909be83..0b741eed4 100644 --- a/doc/salome/gui/GEOM/input/section_operation.doc +++ b/doc/salome/gui/GEOM/input/section_operation.doc @@ -2,26 +2,31 @@ \page section_opeartion_page Section -To produce a \b Section operation in the Main Menu select -Operations - > Boolean - > Section +\b Section operation creates an edge or a wire representing the intersection of surfaces of two shapes. -This operation creates the section between 2 shapes. - -The \b Result will be any \b GEOM_Object (EDGE or WIRE). - -TUI Command: geompy.MakeSection(s1, s2, checkSelfInte)\n -Arguments: Name + 2 shapes + an optional flag for self-intersection check.\n -Advanced option: -\ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments". +To produce it, select in the main menu Operations - > Boolean - > Section \image html neo-section.png "Section dialog" -\note This algorithm doesn't find all types of self-intersections. It is tuned +In this dialog: +- Input or accept the default \b Name of the resulting shape. +- Click the arrow button and select in the Object Browser or in the Viewer the intersecting Objects. +- Activate the corresponding check-box if you wish to Detect Self-intersections . +- Activate \ref restore_presentation_parameters_page "Advanced options" if required. +- Press "Apply" or "Apply & Close" button to get the result (EDGE or WIRE). + +\note This algorithm does not find all types of self-intersections. It is tuned to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face intersections. Face/face intersections detection is switched off as it is a time-consuming operation that gives an impact on performance. To find - all self-intersections please use \ref check_self_intersections_page + all self-intersections use \ref check_self_intersections_page "Detect Self-intersection tool". + +This operation can be performed using a TUI Command: + +geompy.MakeSection(s1, s2, checkSelfInte) + +Arguments: Name + 2 shapes + an optional flag for self-intersection check. Example: @@ -34,8 +39,7 @@ Our TUI Scripts provide you with useful examples of the use of More details -For a detailed description of the Boolean operations please refer to -this document. +Please refer to this document for a detailed description of Boolean operations. It provides a general review of the Partition and Boolean operations algorithms, describes the usage methodology and highlights major limitations of these operations. diff --git a/doc/salome/gui/GEOM/input/sewing_operation.doc b/doc/salome/gui/GEOM/input/sewing_operation.doc index 2af3989cd..18d95e881 100644 --- a/doc/salome/gui/GEOM/input/sewing_operation.doc +++ b/doc/salome/gui/GEOM/input/sewing_operation.doc @@ -2,26 +2,28 @@ \page sewing_operation_page Sewing -\n To produce a \b Sewing operation in the Main Menu select Repair - > Sewing. +To produce a \b Sewing operation in the Main Menu select Repair - > Sewing. -\n It is possible to sew only compounds of faces or shells. +The \b Result will be a \b GEOM_Object. -\n The \b Result will be a \b GEOM_Object. +\image html repair6.png -\n TUI Command: geompy.MakeSewing(ListOfShape, Precision, AllowNonManifold=False), - where \em ListOfShape is list of faces or shells to be sewed, \em Precision is a -precision for sewing, \em AllowNonManifold flag that allows non-manifold sewing. +In this dialog: +- Click on the "Arrow" button and select in the Object Browser or in the viewer one or more \b Shapes (faces or shells) to be sewn. +- Activate Allow Non Manifold check-box to produce non-manifold sewing, if required. +- Define precision for sewing in \b Tolerance field. +- Activate Detect Free boundaries button to display the number of free boundaries in the shape: +\image html neo-detect2.png +- Click \b Apply or Apply and Close button. -\image html repair6.png +This operation can be also launched using a TUI Command: -\n Arguments: Name + 1 or more shapes + 1 value (sew -precision). -\n \b Detect button allows to display the number of free boundaries in -your shape: +geompy.MakeSewing(ListOfShape, Precision, AllowNonManifold=False), -\image html neo-detect2.png +where \em ListOfShape is a list of faces or shells to be sewn, \em Precision is a +precision for sewing, \em AllowNonManifold is a flag that allows non-manifold sewing. -\n Example: +Example: \image html image112.png "The initial faces" diff --git a/doc/salome/gui/GEOM/input/union_faces_operation.doc b/doc/salome/gui/GEOM/input/union_faces_operation.doc index 65cbd4307..802f2213e 100755 --- a/doc/salome/gui/GEOM/input/union_faces_operation.doc +++ b/doc/salome/gui/GEOM/input/union_faces_operation.doc @@ -2,20 +2,21 @@ \page union_faces_operation_page Union Faces -\n To Union Faces in the Main Menu select -Repair - > Union Faces. -\n This operation unites all faces sharing one surface on a given -shape. +This operation unites on a given shape all faces sharing the same surface. -\n TUI Command: geompy.UnionFaces(theShape), -where theShape is a compound or a single solid. -\n Arguments: Name + one shape + a flag. -\n Advanced option: - \ref restore_presentation_parameters_page "Set presentation parameters and sub-shapes from arguments". +To Union Faces in the Main Menu select Repair - > Union Faces. \image html union_faces.png -\n Example: +In this dialog: +- Click on the "Arrow" button and select in the Object Browser or in the viewer one or more \b Shapes (compounds or single solids). +- If necessary, activate \ref restore_presentation_parameters_page "Advanced Transformation Options". +- Click \b Apply or Apply and Close button. + +This operation can be also launched using a TUI Command: geompy.UnionFaces(theShape), +where theShape is a compound or a single solid. + +Example: \image html union_faces1.png
    Shape with not united faces
    diff --git a/doc/salome/gui/GEOM/input/using_boolean_operations.doc b/doc/salome/gui/GEOM/input/using_boolean_operations.doc index 26b90020e..74acd1e8b 100644 --- a/doc/salome/gui/GEOM/input/using_boolean_operations.doc +++ b/doc/salome/gui/GEOM/input/using_boolean_operations.doc @@ -2,10 +2,10 @@ \page using_boolean_operations_page Boolean Operations -For detail description of the Boolean operations please refer to +For a detailed description of Boolean operations refer to this document. It provides a general review of the Partition and Boolean -operations algorithms, describes the usage methodology and highlighs +operations algorithms, describes the usage methodology and highlights major limitations of these operations. You can use the following boolean operations for construction of more @@ -44,7 +44,7 @@ operation. \par geompy.MakeBoolean(Shape1, Shape2, Operation, checkSelfInte), where \em Shape1 is the first argument and \em Shape2 is the second argument of -Boolean operation, \em Operation is a type of the Boolean operation (1 +a Boolean operation, \em Operation is the type of a Boolean operation (1 — Common, 2 — Cut, 3 — Fuse, 4 — Section). @@ -60,17 +60,17 @@ argument and \em Shape2 is the second argument of Common operation; geompy.MakeCut(Shape1, Shape2, checkSelfInte), where \em Shape1 is the first argument and \em Shape2 is the second argument of Cut operation; -The flag \em checkSelfInte tells whether arguments should be checked for -self-intersection prior to an operation. Its default value is \em False which +The flag \em checkSelfInte indicates whether the arguments should be checked for +self-intersection prior to an operation. Its default value is \em False, which means that there is no need to check it. This option is provided to ensure that -an operation is performed on not self-intersected shapes as these shapes are +an operation is performed on not self-intersected shapes as they are not valid for boolean operations. -\note This algorithm doesn't find all types of self-intersections. It is tuned +\note This algorithm does not find all types of self-intersections. It is tuned to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face intersections. Face/face intersections detection is switched off as it is a time-consuming operation that gives an impact on performance. To find - all self-intersections please use \ref check_self_intersections_page + all self-intersections use \ref check_self_intersections_page "Detect Self-intersection tool". Our TUI Scripts provide you with useful examples of the use of diff --git a/doc/salome/gui/GEOM/input/using_measurement_tools.doc b/doc/salome/gui/GEOM/input/using_measurement_tools.doc index 513f6077f..238b12a08 100644 --- a/doc/salome/gui/GEOM/input/using_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/using_measurement_tools.doc @@ -1,9 +1,10 @@ /*! -\page using_measurement_tools_page Measuring objects properties +\page using_measurement_tools_page Object properties -\n Measurement tools in GEOM are necessary for getting different data -concerning created or imported geometrical objects : +\n The key property of an object is its \subpage geometrical_obj_prop_page "Geometrical Type" + +\n There are also various Measurement tools for getting data about created or imported geometrical objects : @@ -115,8 +114,7 @@ window providing some information on a selected geometric object: - Creation operation shows a name of the operation used to create the selected object. -- In a table under Creation operation, \b Parameter and \b -Value are a name and a value of a parameter used to create the -selected object. +- The table below lists \b Parameters used to create the +selected object and their \b Values. */ diff --git a/doc/salome/gui/GEOM/input/xao_format.doc b/doc/salome/gui/GEOM/input/xao_format.doc index b5c60a92d..00d810973 100644 --- a/doc/salome/gui/GEOM/input/xao_format.doc +++ b/doc/salome/gui/GEOM/input/xao_format.doc @@ -1,10 +1,24 @@ /*! -\page xao_format_page The XAO format +\page xao_format_page Import and export of shapes in XAO format XAO is a file format which describes a shape with its topology, groups and fields. -- \subpage export_xao_page "Export" -- \subpage import_xao_page "Import" +To import a shape in the \b XAO format, in the Main Menu select New Entity -> +Import / Export -> Import XAO. + +To export a shape in the \b XAO format, in the Main Menu select New Entity -> +Import / Export -> Export XAO. + +\image html exportxao_dlg.png + +In this dialog: +- Click the arrow button and select in the Object Browser or in the Viewer the Shape to be exported. +- Input the File name to create a new file or click browse button to save in an existing file. +- Select the \b Groups of the chosen shape to be exported. +- Select the \b Fields of the chosen shape to be exported. +- Press "Apply" or "Apply & Close" button to get the result. + +It also possible to export a shape using the TUI Command: geompy.MakeExportXAO(Shape, FileName, Groups, Fields) */ diff --git a/resources/pipesections.png b/resources/pipesections.png index 410282221..5e384ce30 100644 Binary files a/resources/pipesections.png and b/resources/pipesections.png differ diff --git a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx index 4e686ea82..489ee5c8b 100644 --- a/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx +++ b/src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx @@ -871,18 +871,45 @@ bool AdvancedGUI_PipeTShapeDlg::isValid (QString& msg) ok = LReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok; ok = LReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok; ok = LReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok; + if(MainTubeGroupParams->SpinBox_DX->value() == LReductionGroupParams->SpinBox1->value()) { + msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L") + "\n"; + ok = false; + } + if(MainTubeGroupParams->SpinBox_DX->value() + MainTubeGroupParams->SpinBox_DY->value() == + LReductionGroupParams->SpinBox1->value() + LReductionGroupParams->SpinBox2->value()) { + msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L") + "\n"; + ok = false; + } } if (RReductionGroupParams->GroupBox1->isChecked()) { ok = RReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok; ok = RReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok; ok = RReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok; ok = RReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok; + if(MainTubeGroupParams->SpinBox_DX->value() == RReductionGroupParams->SpinBox1->value()) { + msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R") + "\n"; + ok = false; + } + if(MainTubeGroupParams->SpinBox_DX->value() + MainTubeGroupParams->SpinBox_DY->value() == + RReductionGroupParams->SpinBox1->value() + RReductionGroupParams->SpinBox2->value()) { + msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R") + "\n"; + ok = false; + } } if (IReductionGroupParams->GroupBox1->isChecked()) { ok = IReductionGroupParams->SpinBox1->isValid(msg, !IsPreview()) && ok; ok = IReductionGroupParams->SpinBox2->isValid(msg, !IsPreview()) && ok; ok = IReductionGroupParams->SpinBox3->isValid(msg, !IsPreview()) && ok; ok = IReductionGroupParams->SpinBox4->isValid(msg, !IsPreview()) && ok; + if(IncidentTubeGroupParams->SpinBox_DX->value() == IReductionGroupParams->SpinBox1->value()) { + msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I") + "\n"; + ok = false; + } + if(IncidentTubeGroupParams->SpinBox_DX->value() + IncidentTubeGroupParams->SpinBox_DY->value() == + IReductionGroupParams->SpinBox1->value() + IReductionGroupParams->SpinBox2->value()) { + msg += tr("GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I") + "\n"; + ok = false; + } } ok = fabs(MainTubeGroupParams->SpinBox_DX->value()) > Precision::Confusion() && ok; diff --git a/src/AdvancedGUI/AdvancedGUI_msg_en.ts b/src/AdvancedGUI/AdvancedGUI_msg_en.ts index e7524147c..2aab6e88a 100644 --- a/src/AdvancedGUI/AdvancedGUI_msg_en.ts +++ b/src/AdvancedGUI/AdvancedGUI_msg_en.ts @@ -246,6 +246,30 @@ GEOM_PIPETSHAPE_GROUPPOS Position + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L + Main pipe Radius can't be equal to Left thickness reduction Radius (rL)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L + Main pipe external Radius (Radius + Width) can't be equal to Left thickness reduction external Radius (rL + wL)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R + Main pipe Radius can't be equal to Right thickness reduction Radius (rR)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R + Main pipe external Radius (Radius + Width) can't be equal to Right thickness reduction external Radius (rR + wR)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I + Incident pipe Radius can't be equal to Incident pipe thickness reduction Radius (rI)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I + Incident pipe external Radius (Radius + Width) can't be equal to Incident pipe thickness reduction external Radius (rI + wI)! + AdvancedGUI_SmoothingSurfaceDlg diff --git a/src/AdvancedGUI/AdvancedGUI_msg_fr.ts b/src/AdvancedGUI/AdvancedGUI_msg_fr.ts index 69c38cbc9..74bce4882 100644 --- a/src/AdvancedGUI/AdvancedGUI_msg_fr.ts +++ b/src/AdvancedGUI/AdvancedGUI_msg_fr.ts @@ -246,6 +246,30 @@ GEOM_PIPETSHAPE_GROUPPOS Position + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L + Main pipe Radius can't be equal to Left thickness reduction Radius (rL)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L + Main pipe external Radius (Radius + Width) can't be equal to Left thickness reduction external Radius (rL + wL)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R + Main pipe Radius can't be equal to Right thickness reduction Radius (rR)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R + Main pipe external Radius (Radius + Width) can't be equal to Right thickness reduction external Radius (rR + wR)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I + Incident pipe Radius can't be equal to Incident pipe thickness reduction Radius (rI)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I + Incident pipe external Radius (Radius + Width) can't be equal to Incident pipe thickness reduction external Radius (rI + wI)! + AdvancedGUI_SmoothingSurfaceDlg diff --git a/src/AdvancedGUI/AdvancedGUI_msg_ja.ts b/src/AdvancedGUI/AdvancedGUI_msg_ja.ts index 6bb1122f6..e2535d2dc 100644 --- a/src/AdvancedGUI/AdvancedGUI_msg_ja.ts +++ b/src/AdvancedGUI/AdvancedGUI_msg_ja.ts @@ -5,269 +5,293 @@ @default GEOM_ADVANCED - GEOM_ADVANCED + 高度な形状: タイプ %1 GEOM_ADVANCED_201 - GEOM_ADVANCED_201 + T型パイプ GEOM_ADVANCED_202 - GEOM_ADVANCED_202 + カット済みディスク GEOM_ADVANCED_203 - GEOM_ADVANCED_203 + カット シリンダー GEOM_DIVIDEDDISK - GEOM_DIVIDEDDISK + Divided_Disk GEOM_DIVIDEDDISK_TITLE - GEOM_DIVIDEDDISK_TITLE + 分割ディスクの構築 GEOM_DIVIDEDCYLINDER - GEOM_DIVIDEDCYLINDER + Divided_Cylinder GEOM_DIVIDEDCYLINDER_TITLE - GEOM_DIVIDEDCYLINDER_TITLE + 分割シリンダの構築 MEN_DIVIDEDCYLINDER - MEN_DIVIDEDCYLINDER + 分割シリンダ TOP_DIVIDEDCYLINDER - TOP_DIVIDEDCYLINDER + 分割シリンダ STB_DIVIDEDCYLINDER - STB_DIVIDEDCYLINDER + 分割シリンダ MEN_DIVIDEDDISK - MEN_DIVIDEDDISK + 分割ディスク TOP_DIVIDEDDISK - TOP_DIVIDEDDISK + 分割ディスク STB_DIVIDEDDISK - STB_DIVIDEDDISK + 分割ディスク TOP_PIPETSHAPE - TOP_PIPETSHAPE + T型パイプを作成 MEN_PIPETSHAPE - MEN_PIPETSHAPE + T型パイプを作成 STB_PIPETSHAPE - STB_PIPETSHAPE + T型パイプを作成 TOP_SMOOTHINGSURFACE - TOP_SMOOTHINGSURFACE + 表面のスムージング MEN_SMOOTHINGSURFACE - MEN_SMOOTHINGSURFACE + 表面の平滑化 STB_SMOOTHINGSURFACE - STB_SMOOTHINGSURFACE + 表面のスムージング HALF_LENGTH_MAIN_PIPE - HALF_LENGTH_MAIN_PIPE + 半分の長さのパイプを作成 HALF_LENGTH_INCIDENT_PIPE - HALF_LENGTH_INCIDENT_PIPE + 入射管長さ半分 CIRCULAR_QUARTER_PIPE - CIRCULAR_QUARTER_PIPE + パイプの1/4形状 THICKNESS - THICKNESS + 厚み FLANGE - FLANGE + フランジ CHAMFER_OR_FILLET - CHAMFER_OR_FILLET + 面取り 又は フィレット CHAMFER - CHAMFER + 面取り FILLET - FILLET + フィレット JUNCTION_FACE_1 - JUNCTION_FACE_1 + Junction 1 JUNCTION_FACE_2 - JUNCTION_FACE_2 + Junction 2 JUNCTION_FACE_3 - JUNCTION_FACE_3 + Junction 3 INTERNAL_FACES - INTERNAL_FACES + 内部の顔 AdvancedGUI_PipeTShapeDlg + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_I + Incident pipe external Radius (Radius + Width) can't be equal to Incident pipe thickness reduction external Radius (rI + wI)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_I + Incident pipe Radius can't be equal to Incident pipe thickness reduction Radius (rI)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_R + Main pipe external Radius (Radius + Width) can't be equal to Right thickness reduction external Radius (rR + wR)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_R + Main pipe Radius can't be equal to Right thickness reduction Radius (rR)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_EXT_RADII_L + Main pipe external Radius (Radius + Width) can't be equal to Left thickness reduction external Radius (rL + wL)! + + + GEOM_PIPETSHAPE_ERR_EQUAL_RADII_L + Main pipe Radius can't be equal to Left thickness reduction Radius (rL)! + GEOM_PIPE_TSHAPE_TITLE - GEOM_PIPE_TSHAPE_TITLE + T型パイプの作成 GEOM_PIPE_TSHAPE - GEOM_PIPE_TSHAPE + PipeTShape GEOM_PIPE_TSHAPE_MPIPE - GEOM_PIPE_TSHAPE_MPIPE + メインパイプ GEOM_PIPE_TSHAPE_R - GEOM_PIPE_TSHAPE_R + 半径 GEOM_PIPE_TSHAPE_W - GEOM_PIPE_TSHAPE_W + 幅 GEOM_PIPE_TSHAPE_L - GEOM_PIPE_TSHAPE_L + 半分の長さ GEOM_PIPE_TSHAPE_IPIPE - GEOM_PIPE_TSHAPE_IPIPE + 付随パイプ GEOM_PIPE_TSHAPE_CHAMFER - GEOM_PIPE_TSHAPE_CHAMFER + 面取り GEOM_PIPE_TSHAPE_CHAMFER_H - GEOM_PIPE_TSHAPE_CHAMFER_H + 高さ GEOM_PIPE_TSHAPE_CHAMFER_W - GEOM_PIPE_TSHAPE_CHAMFER_W + 幅 GEOM_PIPE_TSHAPE_FILLET - GEOM_PIPE_TSHAPE_FILLET + フィレット GEOM_PIPE_TSHAPE_HEX - GEOM_PIPE_TSHAPE_HEX + 六面体メッシュの準備 GEOM_PIPE_TSHAPE_POSITION - GEOM_PIPE_TSHAPE_POSITION + 位置を設定 GEOM_PIPE_TSHAPE_POSITION_P1 - GEOM_PIPE_TSHAPE_POSITION_P1 + 接続部 P1 GEOM_PIPE_TSHAPE_POSITION_P2 - GEOM_PIPE_TSHAPE_POSITION_P2 + 接続部 P2 GEOM_PIPE_TSHAPE_POSITION_P3 - GEOM_PIPE_TSHAPE_POSITION_P3 + 接続部 P3 GEOM_PIPE_TSHAPE_POSITION_LBL_L1 - GEOM_PIPE_TSHAPE_POSITION_LBL_L1 + New L1 GEOM_PIPE_TSHAPE_POSITION_LBL_L2 - GEOM_PIPE_TSHAPE_POSITION_LBL_L2 + New L2 GEOM_PIPE_TSHAPE_LEFT_TR - GEOM_PIPE_TSHAPE_LEFT_TR + 左側肉厚変更 GEOM_PIPE_TSHAPE_RIGHT_TR - GEOM_PIPE_TSHAPE_RIGHT_TR + 右側肉厚変更 GEOM_PIPE_TSHAPE_INCI_TR - GEOM_PIPE_TSHAPE_INCI_TR + 付随パイプ肉厚変更 GEOM_PIPE_TSHAPE_TR_R - GEOM_PIPE_TSHAPE_TR_R + 半径 (r%1) GEOM_PIPE_TSHAPE_TR_W - GEOM_PIPE_TSHAPE_TR_W + 厚み (w%1) GEOM_PIPE_TSHAPE_TR_L_TRANS - GEOM_PIPE_TSHAPE_TR_L_TRANS + 拡張部長さ (ltrans %1) GEOM_PIPE_TSHAPE_TR_L_THIN - GEOM_PIPE_TSHAPE_TR_L_THIN + 接続部長さ (lthin %1) GEOM_PIPETSHAPE_GROUPMAIN - GEOM_PIPETSHAPE_GROUPMAIN + メインの設定 GEOM_PIPETSHAPE_GROUPREDUCT - GEOM_PIPETSHAPE_GROUPREDUCT + 接続部詳細設定 GEOM_PIPETSHAPE_GROUPPOS - GEOM_PIPETSHAPE_GROUPPOS + 位置による設定 AdvancedGUI_SmoothingSurfaceDlg GEOM_SMOOTHINGSURFACE_TITLE - GEOM_SMOOTHINGSURFACE_TITLE + 滑らかな表面の構造 GEOM_SMOOTHINGSURFACE - GEOM_SMOOTHINGSURFACE + 表面 lissee GEOM_SMOOTHINGSURFACE_RESULT - GEOM_SMOOTHINGSURFACE_RESULT + 結果の名前 GEOM_SMOOTHINGSURFACE_ARG - GEOM_SMOOTHINGSURFACE_ARG + 節点 GEOM_SMOOTHINGSURFACE_ARG_POINTS - GEOM_SMOOTHINGSURFACE_ARG_POINTS + ポイント diff --git a/src/BlockFix/BlockFix_UnionFaces.cxx b/src/BlockFix/BlockFix_UnionFaces.cxx index 292286276..34f0e2faf 100644 --- a/src/BlockFix/BlockFix_UnionFaces.cxx +++ b/src/BlockFix/BlockFix_UnionFaces.cxx @@ -233,6 +233,41 @@ static Standard_Boolean IsFacesOfSameSolids return isSame; } +//======================================================================= +//function : IsEdgeValidToMerge +//purpose : Edge is valid if it is not seam or if it is a seam and the face +// has another seam edge. +//======================================================================= +static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge, + const TopoDS_Face &theFace) +{ + Standard_Boolean isValid = Standard_True; + + if (BRep_Tool::IsClosed(theEdge, theFace)) { + // This is a seam edge. Check if there are another seam edges on the face. + TopExp_Explorer anExp(theFace, TopAbs_EDGE); + + for (; anExp.More(); anExp.Next()) { + const TopoDS_Shape &aShEdge = anExp.Current(); + + // Skip same edge. + if (theEdge.IsSame(aShEdge)) { + continue; + } + + // Check if this edge is a seam. + TopoDS_Edge anEdge = TopoDS::Edge(aShEdge); + + if (BRep_Tool::IsClosed(anEdge, theFace)) { + isValid = Standard_False; + break; + } + } + } + + return isValid; +} + //======================================================================= //function : Perform //purpose : @@ -302,7 +337,7 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape) Standard_Integer i; for (i = 1; i <= edges.Length(); i++) { TopoDS_Edge edge = TopoDS::Edge(edges(i)); - if (BRep_Tool::Degenerated(edge) || BRep_Tool::IsClosed(edge, aFace)) + if (BRep_Tool::Degenerated(edge) || !IsEdgeValidToMerge(edge, aFace)) continue; const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge); @@ -315,7 +350,7 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape) if (aProcessed.Contains(anCheckedFace)) continue; - if (BRep_Tool::IsClosed(edge, anCheckedFace)) { + if (!IsEdgeValidToMerge(edge, anCheckedFace)) { // Skip seam edge. continue; } diff --git a/src/BuildGUI/BuildGUI_ShellDlg.cxx b/src/BuildGUI/BuildGUI_ShellDlg.cxx index e4b12199c..37b892930 100644 --- a/src/BuildGUI/BuildGUI_ShellDlg.cxx +++ b/src/BuildGUI/BuildGUI_ShellDlg.cxx @@ -32,6 +32,7 @@ #include +#include #include #include #include @@ -260,8 +261,17 @@ bool BuildGUI_ShellDlg::execute( ObjectList& objects ) GEOM::GEOM_Object_var anObj = anOper->MakeShell( objlist.in() ); - if ( !anObj->_is_nil() ) + if ( !anObj->_is_nil() ) { + TopoDS_Shape aShell; + GEOMBase::GetShape(anObj, aShell, TopAbs_SHELL); + + if (aShell.IsNull()) { + SUIT_MessageBox::warning(this, + QObject::tr("GEOM_WRN_WARNING"), + QObject::tr("GEOM_WRN_FACES_NOT_SHELL")); + } objects.push_back( anObj._retn() ); + } return true; } diff --git a/src/DisplayGUI/DisplayGUI.cxx b/src/DisplayGUI/DisplayGUI.cxx index c4432718c..230c751a3 100644 --- a/src/DisplayGUI/DisplayGUI.cxx +++ b/src/DisplayGUI/DisplayGUI.cxx @@ -105,6 +105,9 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent) case GEOMOp::OpDMShadingWithEdges: // MENU VIEW - DISPLAY MODE - SHADING WITH EDGES SetDisplayMode( 2 ); break; + case GEOMOp::OpDMTexture: // MENU VIEW - DISPLAY MODE - TEXTURE + SetDisplayMode( 3 ); + break; case GEOMOp::OpShowAll: // MENU VIEW - SHOW ALL getGeometryGUI()->EmitSignalDeactivateDialog(); DisplayAll(); diff --git a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx index 64e1e5e12..88b730307 100755 --- a/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx +++ b/src/EntityGUI/EntityGUI_3DSketcherDlg.cxx @@ -1701,8 +1701,8 @@ Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(doub std::string Angle_str = doubleToString(theAngle); // Construction of the plane - gce_MakePln gce_MP2(P0, P1, P2); - Handle(Geom_Plane) aPlane = new Geom_Plane(gce_MP2.Value()); + //gce_MakePln gce_MP2(P0, P1, P2); + //Handle(Geom_Plane) aPlane = new Geom_Plane(gce_MP2.Value()); TopoDS_Vertex V0 = BRepBuilderAPI_MakeVertex(P0); TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(P1); @@ -1725,7 +1725,7 @@ Handle(AIS_AngleDimension) EntityGUI_3DSketcherDlg::createAISAngleDimension(doub // todo : port - Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension( anEdge1, anEdge2, aPlane->Pln() ); + Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension( anEdge1, anEdge2 ); anIO->SetCustomValue( theAngle ); diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index cbb5645fd..96bbb34fe 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -282,7 +282,16 @@ EntityGUI_FeatureDetectorDlg::EntityGUI_FeatureDetectorDlg( GeometryGUI* theGeom myWidgets.insert( HIST_TYPE, histType ); QDoubleSpinBox* thresholdValue = new QDoubleSpinBox(); thresholdValue->setRange( 0, 254 ); - thresholdValue->setValue( 128 ); + // 1 is a good default value for the threshold. It means that we are very permissive + // about what will be considered INSIDE the zone we want to find the frontier of + // This makes the algorithm more robust against a bit inhomogeneous parts in the zone + // that we want to delimitate. + // The drawback is if we want to delimitate a zone wich color is very similar to the zone + // we consider as the OUTSIDE, the result will be bad. + // The current use cases are more of the first form : + // - Strongly contrasted INSIDE and OUTSIDE zones + // - Small inhomogenities in each zone + thresholdValue->setValue( 1 ); myWidgets.insert( THRESHOLD_VALUE, thresholdValue ); QDoubleSpinBox* maxThreshold = new QDoubleSpinBox(); maxThreshold->setRange( 1, 255 ); @@ -327,7 +336,7 @@ EntityGUI_FeatureDetectorDlg::EntityGUI_FeatureDetectorDlg( GeometryGUI* theGeom // mainFrame()->GroupBoxName->hide(); // Build an instance of detection used to perform image processing operations - aDetector = new ShapeRec_FeatureDetector(); + myDetector = new ShapeRec_FeatureDetector(); setHelpFileName( "shape_recognition_page.html" ); @@ -341,7 +350,7 @@ EntityGUI_FeatureDetectorDlg::EntityGUI_FeatureDetectorDlg( GeometryGUI* theGeom //================================================================================= EntityGUI_FeatureDetectorDlg::~EntityGUI_FeatureDetectorDlg() { - + delete myDetector; } //================================================================================= @@ -447,9 +456,9 @@ void EntityGUI_FeatureDetectorDlg::SelectionIntoArgument() return ; // Setting the image caracteristics - aDetector->SetPath( theImgFileName ); - height = aDetector->GetImgHeight(); - width = aDetector->GetImgWidth(); + myDetector->SetPath( theImgFileName ); + height = myDetector->GetImgHeight(); + width = myDetector->GetImgWidth(); pictureLeft = -0.5 * width; // X coordinate of the top left corner of the background image in the view pictureTop = 0.5 * height; // Y coordinate of both top corners @@ -674,7 +683,7 @@ void EntityGUI_FeatureDetectorDlg::setEndPnt(const gp_Pnt& theEndPnt) { myEndPnt = theEndPnt; MESSAGE("myEndPnt = ("<GetImgHeight() > 0) + if (setSelectionRect() && myDetector->GetImgHeight() > 0) showImageSample(); } @@ -705,8 +714,8 @@ bool EntityGUI_FeatureDetectorDlg::setSelectionRect() void EntityGUI_FeatureDetectorDlg::showImageSample() { // Cropp the image to the selection rectangle given by the user - aDetector->SetROI( myRect ); - std::string samplePicturePath = aDetector->CroppImage(); + myDetector->SetROI( myRect ); + std::string samplePicturePath = myDetector->CroppImage(); // Display the result QPixmap pixmap(QString(samplePicturePath.c_str())); @@ -753,9 +762,9 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) subPictureLeft = pictureLeft; subPictureTop = pictureTop; } - aDetector->ComputeCorners( useROI, parameters ); - CvPoint2D32f* corners = aDetector->GetCorners(); - int cornerCount = aDetector->GetCornerCount(); + myDetector->ComputeCorners( useROI, parameters ); + CvPoint2D32f* corners = myDetector->GetCorners(); + int cornerCount = myDetector->GetCornerCount(); int i; // Build the geom objects associated to the detected corners and returned by execute @@ -794,9 +803,9 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) { GEOM::GEOM_ICurvesOperations_var aCurveOperations = myGeomGUI->GetGeomGen()->GetICurvesOperations( getStudyId() ); - aDetector->ComputeContours( useROI, parameters ); - std::vector< std::vector > contours = aDetector->GetContours(); - std::vector hierarchy = aDetector->GetContoursHierarchy(); + myDetector->ComputeContours( useROI, parameters ); + std::vector< std::vector > contours = myDetector->GetContours(); + std::vector hierarchy = myDetector->GetContoursHierarchy(); std::vector< cv::Point > contour; int idx = 0; @@ -914,8 +923,8 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) // else if(myConstructorId ==LINES) // { -// aDetector->ComputeLines(); -// std::vector lines = aDetector->GetLines(); +// myDetector->ComputeLines(); +// std::vector lines = myDetector->GetLines(); // GEOM::GEOM_Object_var Pnt1; // GEOM::GEOM_Object_var Pnt2; // GEOM::GEOM_Object_var aLine; diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h index fdc850d8d..ca0461d5d 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.h @@ -84,7 +84,7 @@ private slots: private: - ShapeRec_FeatureDetector* aDetector; + ShapeRec_FeatureDetector* myDetector; gp_Ax3 myWPlane; gp_Ax3 aGlobalCS; diff --git a/src/EntityGUI/EntityGUI_PictureImportDlg.cxx b/src/EntityGUI/EntityGUI_PictureImportDlg.cxx index 3feaf26ad..3e521dfdb 100644 --- a/src/EntityGUI/EntityGUI_PictureImportDlg.cxx +++ b/src/EntityGUI/EntityGUI_PictureImportDlg.cxx @@ -184,12 +184,15 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects ) int height = pixmap->height(); int width = pixmap->width(); + delete pixmap; + GEOM::GEOM_Object_var P1 = aBasicOperations->MakePointXYZ( -0.5*width, -0.5*height, 0 ); GEOM::GEOM_Object_var P2 = aBasicOperations->MakePointXYZ( -0.5*width, 0.5*height, 0 ); GEOM::GEOM_Object_var P3 = aBasicOperations->MakePointXYZ( 0.5*width, 0.5*height, 0 ); GEOM::GEOM_Object_var P4 = aBasicOperations->MakePointXYZ( 0.5*width, -0.5*height, 0 ); GEOM::GEOM_Object_var aFace = aBlocksOperations->MakeQuad4Vertices(P1,P2,P3,P4); + getDisplayer()->SetDisplayMode(3); getDisplayer()->SetTexture(theImgFileName.toStdString()); if ( !aFace->_is_nil() ) @@ -198,8 +201,7 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects ) } res=true; - - + return res; } diff --git a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx index 682dec272..268d90677 100644 --- a/src/EntityGUI/EntityGUI_SubShapeDlg.cxx +++ b/src/EntityGUI/EntityGUI_SubShapeDlg.cxx @@ -589,10 +589,58 @@ void EntityGUI_SubShapeDlg::showOnlySelected() Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); if (view->isVisible(io)) myIsHiddenMain = true; - } - aDisplayer->EraseAll(/*forced = false, updateViewer = true*/); - aDisplayer->Display(aSelList, true); + //keep the selected entry and IO in the map for checking + std::map aSelEntriesMap; + SALOME_ListIteratorOfListIO aSelIt(aSelList); + for ( ; aSelIt.More(); aSelIt.Next() ) { + //fill map + Handle(SALOME_InteractiveObject) anSelIO = aSelIt.Value(); + aSelEntriesMap[anSelIO->getEntry()] = anSelIO; + } + //get the displayed sub-shapes + SALOME_ListIO displayed; + view->GetVisible(displayed); + // Erase all, except the selected shapes + std::map::iterator + aSelDispIter = aSelEntriesMap.end(); + SALOME_ListIteratorOfListIO aDispIt( displayed ); + for ( ; aDispIt.More(); aDispIt.Next() ) { + Handle(SALOME_InteractiveObject) anIO = aDispIt.Value(); + aSelDispIter = aSelEntriesMap.find( anIO->getEntry() ); + if ( aSelDispIter != aSelEntriesMap.end() ) { + //sub-shape is selected, so erase it's record from map to keep in it not displayed, but selected sub-shapes only + aSelEntriesMap.erase(aSelDispIter); + } else { + //sub-shape is not in the map of selected, then erase it from view + aDisplayer->Erase( anIO, /*forced = */false, /*updateViewer = */false ); + } + } + + if ( !aSelEntriesMap.empty() ) { + // Build a presentation of the selected, but not displayed sub-shapes + TopTools_IndexedMapOfShape aSubShapesMap; + TopExp::MapShapes(myShape, aSubShapesMap); + QString anEntryBase = aMainEntry.in(); + + TopExp_Explorer anExp (myShape, (TopAbs_ShapeEnum)shapeType()); + for (; anExp.More(); anExp.Next()) + { + TopoDS_Shape aSubShape = anExp.Current(); + int index = aSubShapesMap.FindIndex(aSubShape); + QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index); + if ( aSelEntriesMap.find( anEntry ) == aSelEntriesMap.end() ) { + //skip not selected sub-shapes + continue; + } + SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, view); + if (aPrs) { + displayPreview(aPrs, true, false); // append, do not update + } + } + } + aDisplayer->UpdateViewer(); + } // Mantis issue 0021421: do not hide main shape, if explode on VERTEX if ((TopAbs_ShapeEnum)shapeType() == TopAbs_VERTEX && myIsHiddenMain) { diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx index 4b7520984..0cf6e5ba0 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn1.cxx @@ -635,12 +635,10 @@ void GEOMAlgo_FinderShapeOn1::InnerPoints(const TopoDS_Face& aF, aP2=aNodes(aN2).Transformed(aTrsf); // if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; gp_Cylinder aCyl; // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { + if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, myTolerance)) { continue; } } diff --git a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx index 06fdbeff9..3ede89403 100644 --- a/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx +++ b/src/GEOMAlgo/GEOMAlgo_FinderShapeOn2.cxx @@ -881,12 +881,10 @@ if (!aNb && myNbPntsMin) { aP2=aNodes(aN2).Transformed(aTrsf); // if (aType==GeomAbs_Cylinder) { - Standard_Real aTolSM; gp_Cylinder aCyl; // - aTolSM=1.523e-6;//~1.-cos(0.1 deg) aCyl=aGAS.Cylinder(); - if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, aTolSM)) { + if (!GEOMAlgo_SurfaceTools::IsCoaxial(aP1, aP2, aCyl, myTolerance)) { continue; } } diff --git a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx index e50fc4c7c..21e6877b8 100644 --- a/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SurfaceTools.cxx @@ -140,21 +140,34 @@ Standard_Boolean GEOMAlgo_SurfaceTools::IsCoaxial(const gp_Pnt& aP1, const gp_Cylinder& aCyl, const Standard_Real aTol) { - Standard_Boolean bRet=Standard_False; - Standard_Real aSM; - // - gp_Vec aV12(aP1, aP2); - gp_Dir aD12(aV12); - // - const gp_Ax1& aAxis=aCyl.Axis(); - const gp_Dir& aDAxis=aAxis.Direction(); - // - aSM=fabs(aD12*aDAxis); - if (fabs(1.-aSM) > aTol) { - return bRet; + const gp_XYZ &aLoc = aCyl.Location().XYZ(); + const gp_Ax1 &aAxis = aCyl.Axis(); + const gp_XYZ &aDAxis = aAxis.Direction().XYZ(); + gp_XYZ aDP1 = aP1.XYZ().Subtracted(aLoc); + gp_XYZ aDP2 = aP2.XYZ().Subtracted(aLoc); + Standard_Real aDot1 = aDP1.Dot(aDAxis); + Standard_Real aDot2 = aDP1.Dot(aDAxis); + Standard_Real aTol2 = aTol*aTol; + + // Project P1 and P2 onto a plane with location aLoc and Norm aDAxis. + aDP1.Subtract(aDAxis.Multiplied(aDot1)); + aDP2.Subtract(aDAxis.Multiplied(aDot2)); + + Standard_Real aRadius1 = aDP1.Modulus(); + Standard_Real aRadius2 = aDP2.Modulus(); + Standard_Boolean isOn = Standard_False; + + if (fabs(aRadius1 - aRadius2) <= aTol) { + // Check the deflection of the middle point. + gp_XYZ aMidP = 0.5*(aDP1 + aDP2); + Standard_Real aMidRadius1 = aMidP.Modulus(); + + if (fabs(aRadius1 - aRadius2) <= aTol) { + isOn = Standard_True; + } } - // - return !bRet; + + return isOn; } //======================================================================= //function : IsAnalytic diff --git a/src/GEOMGUI/GEOM_Displayer.cxx b/src/GEOMGUI/GEOM_Displayer.cxx index 25ad93b5a..566e42c19 100644 --- a/src/GEOMGUI/GEOM_Displayer.cxx +++ b/src/GEOMGUI/GEOM_Displayer.cxx @@ -673,8 +673,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap AISShape->SetDisplayVectors( propMap.value( GEOM::propertyName( GEOM::EdgesDirection ) ).toBool() ); // set transparency - // VSR: ??? next line is commented: transparency property is set in the AfterDisplay() function - //AISShape->SetTransparency( propMap.value( GEOM::propertyName( GEOM::Transparency ) ).toDouble() ); + AISShape->SetTransparency( propMap.value( GEOM::propertyName( GEOM::Transparency ) ).toDouble() ); // set iso properties int uIsos = propMap.value( GEOM::propertyName( GEOM::NbIsos ) ).toString().split( GEOM::subSectionSeparator() )[0].toInt(); @@ -697,12 +696,36 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap AISShape->SetOwnDeviationCoefficient( qMax( propMap.value( GEOM::propertyName( GEOM::Deflection ) ).toDouble(), GEOM::minDeflection() ) ); // set texture + bool textureAdded = false; if ( HasTexture() ) { // predefined display texture, manually set to displayer via GEOM_Displayer::SetTexture() function AISShape->SetTextureFileName( TCollection_AsciiString( GetTexture().c_str() ) ); + if ( ! entry.isEmpty() ) { + // check that study is active + SalomeApp_Study* study = getActiveStudy(); + if ( study ) { + // Store the texture in object properties for next displays + study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) ); + study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 ); + + // Update porpeties map + propMap = getObjectProperties( study, entry, myViewFrame ); + } + } + textureAdded = true; + } + else { + // Texture from properties + QString aTexture = propMap.value( GEOM::propertyName( GEOM::Texture ) ).toString(); + if ( !aTexture.isEmpty() ) { + AISShape->SetTextureFileName( TCollection_AsciiString( aTexture.toStdString().c_str() ) ); + textureAdded = true; + } + } + + if ( textureAdded ){ AISShape->SetTextureMapOn(); AISShape->DisableTextureModulate(); - AISShape->SetDisplayMode( 3 ); } // set line width @@ -1569,30 +1592,6 @@ void GEOM_Displayer::BeforeDisplay( SALOME_View* v, const SALOME_OCCPrs* ) void GEOM_Displayer::AfterDisplay( SALOME_View* v, const SALOME_OCCPrs* p ) { - SalomeApp_Study* aStudy = getStudy(); - if (!aStudy) return; - SOCC_Viewer* vf = dynamic_cast( v ); - if ( vf && !p->IsNull() ) { - int aMgrId = getViewManagerId( vf ); - Handle(AIS_InteractiveContext) ic = vf->getAISContext(); - const SOCC_Prs* prs = dynamic_cast( p ); - if ( !ic.IsNull() && prs ) { - AIS_ListOfInteractive objects; - prs->GetObjects( objects ); - AIS_ListIteratorOfListOfInteractive it( objects ); - for ( ; it.More(); it.Next() ) { - Handle(GEOM_AISShape) sh = Handle(GEOM_AISShape)::DownCast( it.Value() ); - if ( sh.IsNull() ) continue; - Handle(SALOME_InteractiveObject) IO = sh->getIO(); - if ( IO.IsNull() ) continue; - PropMap aPropMap = aStudy->getObjectPropMap( aMgrId, IO->getEntry() ); - if ( aPropMap.contains( GEOM::propertyName( GEOM::Transparency ) ) ) { - double transparency = aPropMap.value(GEOM::propertyName( GEOM::Transparency )).toDouble(); - ic->SetTransparency( sh, transparency, true ); - } - } - } - } UpdateColorScale(false,false); } diff --git a/src/GEOMGUI/GEOM_msg_en.ts b/src/GEOMGUI/GEOM_msg_en.ts index a56f0efd8..add4553bd 100644 --- a/src/GEOMGUI/GEOM_msg_en.ts +++ b/src/GEOMGUI/GEOM_msg_en.ts @@ -2316,6 +2316,10 @@ Please, select face, shell or solid and try again GEOM_WRN_WARNING Warning + + GEOM_WRN_FACES_NOT_SHELL + Unable to create a shell. Result is a compound of faces. + WRN_SHAPE_UNCLOSED Unable to create solid from unclosed shape %1 @@ -3004,6 +3008,10 @@ Please, select face, shell or solid and try again MEN_MATERIALS_LIBRARY Materials library + + MEN_TEXTURE + Texture + MEN_TORUS Torus @@ -3280,7 +3288,6 @@ Please, select face, shell or solid and try again PREF_SCALAR_BAR_NUMBER_OF_INTERVALS Number of intervals - PROCESS_SHAPE_NEW_OBJ_NAME ProcessShape @@ -4571,27 +4578,27 @@ Please, select face, shell or solid and try again GEOM_REMOVE_WEBS_TITLE - Remove internal faces + Remove internal faces GEOM_REMOVE_WEBS - Compound of solids + Compound of solids REMOVE_WEBS_NEW_OBJ_NAME - NoInternalFaces + NoInternalFaces TOP_REMOVE_WEBS - Remove internal faces + Remove internal faces MEN_REMOVE_WEBS - Remove Internal Faces + Remove Internal Faces STB_REMOVE_WEBS - Remove internal faces + Remove internal faces GEOM_REMOVE_EXTRA_EDGES_TITLE @@ -4976,7 +4983,7 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif TOP_SMOOTHINGSURFACE - Smoothing Surface + Smoothing Surface GEOM_SELECT_IMAGE @@ -5031,12 +5038,12 @@ Ignoring units will cause model scaling (as dimensions are supposed to be specif Import / Export - CC_PNT_ITEM_X_Y - X=%1, Y=%2 + CC_PNT_ITEM_X_Y + X=%1, Y=%2 - CC_PNT_ITEM_X_Y_Z - X=%1, Y=%2, Z=%3 + CC_PNT_ITEM_X_Y_Z + X=%1, Y=%2, Z=%3 @@ -5656,7 +5663,7 @@ Number of sketch points too small LOWTHRESHOLD - Low theshold + Low threshold RATIO @@ -5878,7 +5885,7 @@ Number of sketch points too small WRN_NOT_SUBSHAPE - The selected shape is not a sub-shape of the main shape. Hide all extra shapes in the viewer for more suitable selection. + The selected shape is not a sub-shape of the main shape. Hide all extra shapes in the viewer for more suitable selection. @@ -5914,10 +5921,6 @@ Number of sketch points too small DATA_TYPE Type - - - - BOOL Boolean @@ -6032,11 +6035,11 @@ Number of sketch points too small WRN_NOT_SUBSHAPE - The selected shape is not a sub-shape of the main shape. Hide all extra shapes in the viewer for more suitable selection. + The selected shape is not a sub-shape of the main shape. Hide all extra shapes in the viewer for more suitable selection. ERR_STEP_EXISTS - Step with such ID already exists. + Step with such ID already exists. @@ -6509,23 +6512,23 @@ Do you want to create new material? Step - + EntityGUI_IsolineDlg - GEOM_ISOLINE_TITLE - Isoline Construction + GEOM_ISOLINE_TITLE + Isoline Construction - GEOM_ISOLINE - Isoline + GEOM_ISOLINE + Isoline - GEOM_ISOLINE_U - U-Isoline + GEOM_ISOLINE_U + U-Isoline - GEOM_ISOLINE_V - V-Isoline + GEOM_ISOLINE_V + V-Isoline - + diff --git a/src/GEOMGUI/GEOM_msg_fr.ts b/src/GEOMGUI/GEOM_msg_fr.ts index 371635ac4..5d3f8d802 100644 --- a/src/GEOMGUI/GEOM_msg_fr.ts +++ b/src/GEOMGUI/GEOM_msg_fr.ts @@ -4,12 +4,12 @@ @default - MEN_POP_CONCEAL_CHILDREN - Retirer les sous-éléments + MEN_TEXTURE + Texture - MEN_POP_DISCLOSE_CHILDREN - Publier les sous-éléments + GEOM_WRN_FACES_NOT_SHELL + Unable to create a shell. Result is a compound of faces. BRep_API: command not done @@ -37,8 +37,10 @@ DEP_OBJECT - L'objet choisi a été utilisé pour créer un autre objet. -La suppression de cet objet peut entrainer un export python invalide. + L'objet choisi a été utilisé pour créer un autre objet ou est référencé par un autre module. +La suppression de cet objet peut entrainer un export python invalide. + +Voulez-vous tout de même supprimer ces objets ? DEVIDE_EDGE_NEW_OBJECT_NAME @@ -1676,7 +1678,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau GEOM_ALLOW_NON_MANIFOLD - Allow Non Manifold + Non conformes autorisés GEOM_SHAPE @@ -2356,7 +2358,7 @@ Choisissez une face, une coque ou un solide et essayez de nouveau MEN_CURVE_CREATOR - Curve creator + Créateur de courbe MEN_ALL_SEL_ONLY @@ -2799,12 +2801,12 @@ Choisissez une face, une coque ou un solide et essayez de nouveau Editer champ - MEN_POP_SHOW_CHILDREN - Montrer les enfants + MEN_POP_DISCLOSE_CHILDREN + Publier les sous-éléments - MEN_POP_HIDE_CHILDREN - Cacher les enfants + MEN_POP_CONCEAL_CHILDREN + Retirer les sous-éléments MEN_POP_UNPUBLISH_OBJ @@ -2966,6 +2968,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau MEN_3DSKETCH Esquisse 3D + + MEN_ISOLINE + Isoligne + MEN_SOLID Solide @@ -3654,6 +3660,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau STB_POP_CREATE_GROUP Créer un groupe + + STB_POP_EDIT_FIELD + Editer un champ + STB_POP_UNPUBLISH_OBJ Dépublier l'objet @@ -3786,6 +3796,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau STB_3DSKETCH Créer une esquisse 3D + + STB_ISOLINE + Créer une U ou V isoligne + STB_SOLID Construire un solide @@ -4178,6 +4192,14 @@ Choisissez une face, une coque ou un solide et essayez de nouveau TOP_GROUP_CUT Découpe de groupes + + TOP_FIELD_CREATE + Créer un champ + + + TOP_FIELD_EDIT + Editer un champ + TOP_HEX_SOLID Solide hexaédrique @@ -4290,6 +4312,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau TOP_POP_CREATE_GROUP Créer un groupe + + TOP_POP_EDIT_FIELD + Editer un champ + TOP_POP_UNPUBLISH_OBJ Dépublier l'objet @@ -4390,6 +4416,10 @@ Choisissez une face, une coque ou un solide et essayez de nouveau TOP_3DSKETCH Esquisse 3D + + TOP_ISOLINE + Isoligne + TOP_SOLID Créer un solide @@ -4955,14 +4985,6 @@ le paramètre '%1' aux préférences du module Géométrie.TOP_SMOOTHINGSURFACE Surface lissée - - MEN_SMOOTHINGSURFACE - Surface lissée - - - STB_SMOOTHINGSURFACE - Surface lissée - GEOM_SELECT_IMAGE Sélectionner une image... @@ -4971,6 +4993,10 @@ le paramètre '%1' aux préférences du module Géométrie.MEN_IMPORTEXPORT Import / Export XAO + + TOOL_IMPORTEXPORT + Import / Export XAO + TOP_EXPORTXAO Export XAO @@ -5012,12 +5038,12 @@ le paramètre '%1' aux préférences du module Géométrie.Import / Export XAO - CC_PNT_ITEM_X_Y - X=%1, Y=%2 + CC_PNT_ITEM_X_Y + X=%1, Y=%2 - CC_PNT_ITEM_X_Y_Z - X=%1, Y=%2, Z=%3 + CC_PNT_ITEM_X_Y_Z + X=%1, Y=%2, Z=%3 @@ -5453,19 +5479,19 @@ le paramètre '%1' aux préférences du module Géométrie. SET_SECTIONS_POLYLINE - Set polyline + Définir la polyligne SET_SECTIONS_POLYLINE_TLT - Set selected section type to polyline + Affecter le type de section sélectionné à la polyligne SET_SECTIONS_SPLINE - Set spline + Définir la spline SET_SECTIONS_SPLINE_TLT - Set selected section type to spline + Affecter le type de section sélectionné à la spline REMOVE @@ -5593,7 +5619,7 @@ Le nombre de points n'est pas suffisant USE_ROI - Use region of interest + Utiliser la région d'intérêt KERNEL_SIZE @@ -5609,75 +5635,75 @@ Le nombre de points n'est pas suffisant TYPE_CRITERIA - Type criteria + Critère de type CV_TERMCRIT_ITER - Max number of iteration + Nombre max d'itérations CV_TERMCRIT_EPS - Epsilon + Epsilon CV_TERMCRIT_ITER | CV_TERMCRIT_EPS - Max number of iteration or epsilon + Nombre max d'itérations ou epsilon MAX_ITER - Max iteration + Iteration max EPSILON - Epsilon + Epsilon L2GRADIENT - L2 gradient + Gradient L2 LOWTHRESHOLD - Low theshold + Niveau bas RATIO - Ratio + Ratio SMOOTH_SIZE - Smooth size + Adoucissement HBINS - Hbins + Hbins SBINS - Sbins + Sbins HIST_TYPE - Histogram type + Type d'histogramme CV_HIST_ARRAY - Multi-dimensional dense array + Tableau dense multi-dimensionnel CV_HIST_SPARSE - Multi-dimensional sparse array + Tableau clairsemé multi-dimensionnel THRESHOLD_VALUE - Threshold value + Seuil MAX_THRESHOLD - Max threshold + Seuil max FIND_CONTOURS_METHOD - Chain approximation method + Méthode d'approximation des chaînes CV_CHAIN_APPROX_NONE @@ -5689,11 +5715,11 @@ Le nombre de points n'est pas suffisant CV_CHAIN_APPROX_TC89_KCOS - TC89 KCOS + TC89 KCOS CV_CHAIN_APPROX_TC89_L1 - TC89 L1 + TC89 L1 @@ -5859,7 +5885,7 @@ Le nombre de points n'est pas suffisant WRN_NOT_SUBSHAPE - La forme sélectionnée n'est pas un sous-élémént de la forme principale. Pour choisir plus facilement, cacher les formes en trop dans la vue. + La forme sélectionnée n'est pas un sous-élémént de la forme principale. Pour choisir plus facilement, cacher les formes en trop dans la vue. @@ -5913,7 +5939,7 @@ Le nombre de points n'est pas suffisant SHAPE_TYPE - Type d'objet + Type d'objet VERTEX @@ -5973,7 +5999,7 @@ Le nombre de points n'est pas suffisant GEOM_NO_STUDY - Pas d'étude disponible + Pas d'étude disponible NO_SHAPE @@ -6009,7 +6035,7 @@ Le nombre de points n'est pas suffisant WRN_NOT_SUBSHAPE - La forme sélectionnée n'est pas un élément de la forme principale. + La forme sélectionnée n'est pas un élément de la forme principale. Pour choisir plus facilement, cacher les formes en trop dans la vue. ERR_STEP_EXISTS @@ -6400,24 +6426,24 @@ Voulez-vous en créer un nouveau ? GEOMGUI_CreationInfoWdg - NO_INFO - (aucune information disponible) + CREATION_INFO_TITLE + Information - VALUE - Valeur + OPERATION + Création PARAMETER Paramètre - OPERATION - Création + VALUE + Valeur - CREATION_INFO_TITLE - Information + NO_INFO + (aucune information disponible) @@ -6486,6 +6512,23 @@ Voulez-vous en créer un nouveau ? Pas + + EntityGUI_IsolineDlg + + GEOM_ISOLINE_TITLE + Construction d'isoligne + + + GEOM_ISOLINE + Isoligne + + + GEOM_ISOLINE_U + U-Isoligne + + + GEOM_ISOLINE_V + V-Isoligne + + - - diff --git a/src/GEOMGUI/GEOM_msg_ja.ts b/src/GEOMGUI/GEOM_msg_ja.ts index 77b266efc..8a673fc1b 100644 --- a/src/GEOMGUI/GEOM_msg_ja.ts +++ b/src/GEOMGUI/GEOM_msg_ja.ts @@ -3,6 +3,14 @@ @default + + MEN_TEXTURE + Texture + + + GEOM_WRN_FACES_NOT_SHELL + Unable to create a shell. Result is a compound of faces. + BRep_API: command not done エラー: オブジェクトをビルドできませんでした @@ -13,7 +21,7 @@ CHANGE_ORIENTATION_NEW_OBJ_NAME - 反転 + Invert EDGE_WIDTH_TLT @@ -25,15 +33,15 @@ CLOSE_CONTOUR_NEW_OBJ_NAME - 閉じた輪郭 + CloseContour DEP_OBJECT - 選択したオブジェクトは、別のオブジェクトの作成に使用されました。 削除することはできません。 + 選択したオブジェクトは、別のオブジェクトの作成に使用されました。このオブジェクトを削除する、python にエクスポートが無効になっている可能性があります。 DEVIDE_EDGE_NEW_OBJECT_NAME - 新しいオブジェクト + NewObject ERROR_SHAPE_TYPE @@ -105,7 +113,7 @@ GEOM_ADD_POINT - ポイントを追加 + ポイントを追加します。 GEOM_ANGLE @@ -125,19 +133,19 @@ GEOM_ANGLE_STEP - GEOM_ANGLE_STEP + 角度ピッチ: GEOM_ARC_ELLIPSE - 楕円弧 + 楕円の弧 GEOM_ARC - Arc + 円弧 GEOM_ARCHIMEDE - らせん + Archimede GEOM_ARCHIMEDE_TITLE @@ -177,11 +185,11 @@ GEOM_BINORMAL - BiNormal + 従法線ベクトル GEOM_BLOCK - Hexahedral_Solid + 六面体のソリッド GEOM_BLOCKS_COMPOUND @@ -197,7 +205,7 @@ GEOM_BLOCK_MULTITRSF - ブロック multi-transformation + Block Multi-Transformation GEOM_BLOCK_MULTITRSF_DOUBLE @@ -209,7 +217,7 @@ GEOM_BLOCK_MULTITRSF_TITLE - ブロック multi-transformation + ブロックの複数回移動 GEOM_BLOCK_TITLE @@ -217,7 +225,7 @@ GEOM_BNDBOX - 境界ボックス + Bounding Box GEOM_BNDBOX_OBJDIM @@ -313,7 +321,7 @@ GEOM_CHAMFER - 面取り + Chamfer GEOM_CHAMFER_ABORT @@ -413,7 +421,7 @@ GEOM_CIRCLE - 円 + Circle GEOM_CIRCLE_TITLE @@ -421,7 +429,7 @@ GEOM_CLOSECONTOUR_TITLE - 輪郭を閉じる + スケッチを終了 GEOM_CMASS @@ -433,11 +441,11 @@ GEOM_COMMON - 交差点 + Common GEOM_COMMON_TITLE - 交差部分を取り出す + オブジェクトの交差部分 GEOM_COMPOUND @@ -505,7 +513,7 @@ GEOM_CUT_TITLE - オブジェクトの切断 + オブジェクトの切り抜き GEOM_CYLINDER @@ -625,7 +633,7 @@ GEOM_EXTRUDED_BOSS_TITLE - 押し出しボス + 押出し GEOM_EXTRUDED_BOSS @@ -671,6 +679,10 @@ GEOM_LCS ローカル座標系 + + GEOM_LOCATIONS + 位置 + GEOM_FACES Faces @@ -681,11 +693,11 @@ GEOM_FACE_OPT - 平らなフェースを作成してください + 平らなフェースを作成 MAKE_FACE_TOLERANCE_TOO_BIG - 平面顔を構築できませんでした: \n 作成顔が高すぎるの公差 + 平坦な面を作成できません: 作成された顔があまりにも高い耐性 GEOM_FACE_OR_LCS @@ -701,7 +713,7 @@ GEOM_RECTANGLE_TITLE - 四角形の構築 + 四角形の作成 GEOM_RECTANGLE @@ -737,7 +749,7 @@ GEOM_FILLET_FACES - 顔に残す + 選択した面にフィレット GEOM_FILLET_TITLE @@ -821,7 +833,7 @@ GEOM_FixFaceSize - 顔のサイズを修正します。 + 面のサイズを修正します GEOM_FixShape @@ -869,7 +881,7 @@ GEOM_IMPORT - Objet_importe + 形状をインポート GEOM_INCORRECT_INPUT @@ -969,7 +981,7 @@ GEOM_MEN_ALL_FILES - すべてのファイル (※) + すべてのファイル (*) GEOM_MEN_ANGLE @@ -1013,7 +1025,7 @@ GEOM_MEN_SHADING_WITH_EDGES - 陰影とエッジ + エッジ+シェーディング GEOM_MEN_SKETCHER_X @@ -1057,11 +1069,11 @@ GEOM_MINDIST_NAME - GEOM_MINDIST_NAME + DistMin GEOM_MINDIST_NO_SOL - GEOM_MINDIST_NO_SOL + 解決策を見つけた GEOM_MINDIST_OBJ @@ -1069,11 +1081,11 @@ GEOM_MINDIST_PUBLISH_TITLE - GEOM_MINDIST_PUBLISH_TITLE + いくつかのソリューション GEOM_MINDIST_PUBLISH_TEXT - GEOM_MINDIST_PUBLISH_TEXT + 研究で発見したすべてのソリューションを発行しますか。ない場合は、現在選択されている唯一のソリューションが公開されます。 GEOM_MINDIST_TITLE @@ -1081,7 +1093,7 @@ GEOM_MIRROR - ミラー + Mirror GEOM_MIRROR_TITLE @@ -1105,7 +1117,7 @@ GEOM_MULTIROTATION_TITLE - Multi-rotation + オブジェクトの複数回回転 GEOM_MULTITRANSLATION @@ -1177,7 +1189,7 @@ GEOM_OFFSET - オフセット + Offset GEOM_OFFSET_TITLE @@ -1189,7 +1201,7 @@ GEOM_PROJECTION - 投影 + Projection GEOM_PROJECTION_TITLE @@ -1201,16 +1213,24 @@ GEOM_SOLUTION - GEOM_SOLUTION + 解決方法: GEOM_SOLUTION_I - GEOM_SOLUTION_I + %1 のソリューション GEOM_TARGET_OBJECT 目的面 + + GEOM_WITH_CONTACT + 接触している + + + GEOM_WITH_CORRECTION + 補正している + GEOM_OPERATIONS 操作 @@ -1385,7 +1405,7 @@ GEOM_POSITION - 位置 + Position GEOM_POSITION_TITLE @@ -1509,11 +1529,11 @@ GEOM_RECONSTRUCTION_LIMIT_EDGE - エッジ + Edge GEOM_RECONSTRUCTION_LIMIT_FACE - フェース + Face GEOM_RECONSTRUCTION_LIMIT_SHAPE @@ -1565,7 +1585,7 @@ GEOM_REVERSE - 反転 + 裏返し GEOM_REVERSE_DIRECTION @@ -1597,7 +1617,7 @@ GEOM_ROTATION - 回転 + Rotation GEOM_ROTATION_TITLE @@ -1605,7 +1625,7 @@ GEOM_SCALE - スケール + Scale GEOM_SCALE_FACTOR @@ -1617,7 +1637,7 @@ GEOM_SECTION - セクション + Section GEOM_SECTION_TITLE @@ -1645,7 +1665,7 @@ GEOM_SEWING - つなぎ合わせ + Sewing GEOM_SEWING_TITLE @@ -1653,7 +1673,7 @@ GEOM_ALLOW_NON_MANIFOLD - GEOM_ALLOW_NON_MANIFOLD + 非多様体を許可します。 GEOM_SHAPE @@ -1717,7 +1737,7 @@ GEOM_SKETCHER_ARC - 円弧 + Arc GEOM_SKETCHER_CENTER @@ -1905,7 +1925,7 @@ GEOM_SOLID - Solid + ソリッド GEOM_SOLID_TITLE @@ -1961,7 +1981,7 @@ GEOM_STEP_R - GEOM_STEP_R + 放射状のステップ: GEOM_STEP_TITLE @@ -2089,7 +2109,7 @@ GEOM_THICKNESS - GEOM_THICKNESS + 厚み GEOM_TOLERANCE @@ -2201,7 +2221,7 @@ GEOM_VERTEXES - Vertexes + 頂点 GEOM_WATER_DENSITY @@ -2217,7 +2237,7 @@ GEOM_WHATIS - Whatis + 選択対象の情報 GEOM_WHATIS_OBJECT @@ -2225,7 +2245,7 @@ GEOM_WHATIS_TITLE - Whatis + 選択対象の情報 GEOM_WIRE @@ -2325,12 +2345,16 @@ GLUE_NEW_OBJ_NAME - 固着 + Glue LIMIT_TOLERANCE_NEW_OBJ_NAME Limit_tolerance + + MEN_CURVE_CREATOR + カーブの作成 + MEN_ALL_SEL_ONLY すべてを選択 @@ -2341,7 +2365,7 @@ MEN_ARCHIMEDE - アルキメデス法 + アルキメデスの螺旋 MEN_BASIC @@ -2373,11 +2397,11 @@ MEN_FEATURE_DETECTION - パターン認識 + 形状認識 MEN_PICTURE_IMPORT - ビュー内へのイメージの取り込み + ビューアーにイメージをインポート MEN_CHAMFER @@ -2409,7 +2433,7 @@ MEN_CHECK_FREE_FACES - フリーフェースの確認 + フリー面の確認 MEN_CHECK_GEOMETRY @@ -2421,7 +2445,7 @@ MEN_CLIPPING - 面で切断 + クリップの範囲 MEN_CLOSE_CONTOUR @@ -2433,11 +2457,11 @@ MEN_COMPOUND - コンパウンド + 結合 MEN_COMPOUND_SEL_ONLY - アセンブリ + 結合 MEN_CONE @@ -2449,7 +2473,7 @@ MEN_CUT - カット(&t) + カット MEN_CYLINDER @@ -2505,7 +2529,7 @@ MEN_CLS_BRING_TO_FRONT - フォア グラウンドでオブジェクトを削除します。 + トップ レベルの状態をクリア TOP_CLS_BRING_TO_FRONT @@ -2533,7 +2557,7 @@ MEN_ERASE - 消去 + 非表示 MEN_ERASE_ALL @@ -2541,7 +2565,7 @@ MEN_EXPLODE - 分解 + 展開 MEN_EXPLODE_BLOCKS @@ -2553,11 +2577,11 @@ MEN_EXTRUSION - 面の押出し + 押出 MEN_EXTRUDED_CUT - 押込み + 押出しカット MEN_EXTRUDED_BOSS @@ -2565,11 +2589,11 @@ MEN_FACE - フェース + 面 MEN_FACE_SEL_ONLY - フェース + 面 MEN_FILE @@ -2597,15 +2621,15 @@ MEN_GENERATION - ジェネレーション + 生成 MEN_GLUE_FACES - フェース固着 + 面の固着 MEN_GLUE_EDGES - エッジ固着 + エッジの固着 MEN_GROUP @@ -2617,35 +2641,35 @@ MEN_GROUP_EDIT - 編集 + グループの編集 MEN_GROUP_UNION - グループの連合 + グループの結合 MEN_GROUP_INTERSECT - グループの交差点 + グループの交差 MEN_GROUP_CUT - 切断グループ + グループのカット MEN_FIELD - MEN_FIELD + フィールド: MEN_FIELD_CREATE - MEN_FIELD_CREATE + フィールドを作成します。 MEN_FIELD_EDIT - MEN_FIELD_EDIT + フィールドの編集 MEN_ADD_FIELD_STEP - MEN_ADD_FIELD_STEP + フィールドステップの追加 MEN_RELOAD_IMPORTED @@ -2689,23 +2713,23 @@ MEN_MIN_DIST - 最小距離 + 最短距離 MEN_MIRROR - オブジェクトの反転 + ミラー MEN_MODIFY_LOCATION - 位置を変更します。 + 位置変更 MEN_MUL_ROTATION - Multi-rotation + 複数回回転 MEN_MUL_TRANSFORM - Multi-transformation + 複数回移動 MEN_MUL_TRANSLATION @@ -2713,7 +2737,7 @@ MEN_NEW_ENTITY - 新しいオブジェクト + 新しいエンティティ MEN_OFFSET @@ -2729,7 +2753,7 @@ MEN_ORIGIN_AND_VECTORS - 原点とベースベクトル + 起源と基本ベクトル MEN_PARTITION @@ -2749,7 +2773,7 @@ MEN_POINT - 基準点 + 点 MEN_POINT_COORDS @@ -2769,11 +2793,11 @@ MEN_POP_EDIT_FIELD - MEN_POP_EDIT_FIELD + フィールドの編集 MEN_POP_DISCLOSE_CHILDREN - 子項目を開示します。 + 子項目を開示 MEN_POP_CONCEAL_CHILDREN @@ -2801,11 +2825,11 @@ MEN_POP_SHADING - 網かけ + シェーディング MEN_POP_SHADING_WITH_EDGES - 陰影とエッジ + エッジ+シェーディング MEN_POP_TEXTURE @@ -2853,7 +2877,7 @@ MEN_POP_VECTORS - エッジの方向を表示します。 + ベクトル方向表示 MEN_PREFERENCES @@ -2869,7 +2893,7 @@ MEN_ADVANCED - 高度な + 高度な処理 MEN_PROPAGATE @@ -2909,7 +2933,7 @@ MEN_SHADING - 表面 + 網かけ MEN_SHADING_WITH_EDGES @@ -2939,6 +2963,10 @@ MEN_3DSKETCH 3D スケッチ + + MEN_ISOLINE + 等高線 + MEN_SOLID ソリッド @@ -2977,7 +3005,7 @@ MEN_MATERIALS_LIBRARY - MEN_MATERIALS_LIBRARY + 材料の特性 MEN_TORUS @@ -2989,7 +3017,7 @@ MEN_TRANSLATION - 移動 + 変換 MEN_VECTOR @@ -3005,7 +3033,7 @@ MEN_WHAT_IS - Whatis + 選択対象の情報 MEN_WIRE @@ -3033,15 +3061,15 @@ MEN_POP_POINT_MARKER - ポイント マーカー + ポイント マーカ MEN_POP_MATERIAL_PROPERTIES - 材料の特性 + 材料特性 MEN_POP_PREDEF_MATER_CUSTOM - MEN_POP_PREDEF_MATER_CUSTOM + カスタム... NAME_LBL @@ -3189,11 +3217,11 @@ PREF_PREDEF_MATERIALS - PREF_PREDEF_MATERIALS + コンテキスト メニューからプリセット マテリアルを表示します。 PREF_EDITGROUP_COLOR - PREF_EDITGROUP_COLOR + グループの編集中にスロット形状の色 PREF_EDGE_WIDTH @@ -3213,27 +3241,55 @@ PREF_AUTO_BRING_TO_FRONT - PREF_AUTO_BRING_TO_FRONT + フォア グラウンドで自動的に表示されます。 PREF_ISOS - PREF_ISOS + 輪郭の数 PREF_ISOS_U - PREF_ISOS_U + U によると PREF_ISOS_V - PREF_ISOS_V + よると V + + + PREF_GROUP_SCALAR_BAR + 場の分布表示についてのスカラバー + + + PREF_SCALAR_BAR_X_POSITION + X座標 + + + PREF_SCALAR_BAR_Y_POSITION + Y座標 + + + PREF_SCALAR_BAR_WIDTH + 幅 + + + PREF_SCALAR_BAR_HEIGHT + 高さ + + + PREF_SCALAR_BAR_TEXT_HEIGHT + 文字高さ + + + PREF_SCALAR_BAR_NUMBER_OF_INTERVALS + 間隔の数 PROCESS_SHAPE_NEW_OBJ_NAME - FormeRetraitee + ProcessShape MATERIAL_LIBRARY_TLT - MATERIAL_LIBRARY_TLT + 図書館資料 REMOVE_HOLES_NEW_OBJ_NAME @@ -3245,7 +3301,7 @@ SEWING_NEW_OBJ_NAME - つなぎ合わせ + Sewing STB_ALL_SEL_ONLY @@ -3257,7 +3313,7 @@ STB_ARCHIMEDE - らせん操作 + アルキメデス法で水位面を作成します。 STB_BASIC_PROPS @@ -3277,7 +3333,7 @@ STB_PICTURE_IMPORT - ビュー内のイメージをインポートします。 + ビューアーにイメージをインポートします。 STB_CHAMFER @@ -3329,7 +3385,7 @@ STB_COMMON - 交差点 + 共有領域 STB_COMPOUND @@ -3349,7 +3405,7 @@ STB_CUT - 切断 + Cut STB_CYLINDER @@ -3425,7 +3481,7 @@ STB_EXTRUDED_BOSS - 押し出しの上司 + 押出し STB_FACE @@ -3477,7 +3533,7 @@ STB_GROUP_INTERSECT - グループの交差点 + グループの共有領域 STB_GROUP_CUT @@ -3485,11 +3541,11 @@ STB_FIELD_CREATE - STB_FIELD_CREATE + フィールドを作成します。 STB_FIELD_EDIT - STB_FIELD_EDIT + フィールドを編集します。 STB_RELOAD_IMPORTED @@ -3497,7 +3553,7 @@ STB_HEX_SOLID - 六面体ソリッド + Hexahedral_Solid STB_IMPORT @@ -3541,11 +3597,11 @@ STB_MUL_ROTATION - Multi-rotation を実行 + 複数回回転を実行します。 STB_MUL_TRANSFORM - Multi-transformation を実行 + 複数回移動を実行します。 STB_MUL_TRANSLATION @@ -3601,7 +3657,7 @@ STB_POP_EDIT_FIELD - STB_POP_EDIT_FIELD + フィールドを編集します。 STB_POP_UNPUBLISH_OBJ @@ -3657,15 +3713,15 @@ STB_POP_WIREFRAME - ワイヤー + Wires STB_MATERIALS_LIBRARY - STB_MATERIALS_LIBRARY + 材料のライブラリの内容を表示します。 STB_POP_PREDEF_MATER_CUSTOM - STB_POP_PREDEF_MATER_CUSTOM + カスタム. STB_PROPAGATE @@ -3697,7 +3753,7 @@ STB_WIREFRAME - ワイヤー + Wires STB_SHADING @@ -3735,6 +3791,10 @@ STB_3DSKETCH 3Dスケッチを作成 + + STB_ISOLINE + UまたはV方向等高線の作成 + STB_SOLID ソリッドを構築 @@ -3869,11 +3929,11 @@ TOOL_BASIC - 基本オブジェクト + 基礎オブジェクト TOOL_BLOCKS - ブロック + ブロック分割 TOOL_BOOLEAN @@ -3881,11 +3941,11 @@ TOOL_FEATURES - 変更 + フィーチャー TOOL_GENERATION - ジェネレーション + 押し出し/回転 TOOL_PRIMITIVES @@ -3893,11 +3953,11 @@ TOOL_TRANSFORMATION - 変形 + 変形/移動/回転 TOOL_BUILD - ビルド + 構築 TOOL_OPERATIONS @@ -3909,11 +3969,11 @@ TOOL_ADVANCED - 高度な + 高度なツール TOOL_MEASURES - 情報 + 情報/測定 TOP_ARC @@ -3921,7 +3981,7 @@ TOP_ARCHIMEDE - らせん + アルキメデス法で水位面を作成 TOP_BASIC_PROPS @@ -3985,7 +4045,7 @@ TOP_COMMON - 交差点 + 共有領域 TOP_COMPOUND @@ -4001,7 +4061,7 @@ TOP_CUT - 切断 + Cut TOP_CYLINDER @@ -4069,11 +4129,11 @@ TOP_EXTRUDED_BOSS - 押し出しの上司 + 押出し TOP_EXTRUDED_CUT - 押出成形材料の除去 + 押出しカット TOP_FACE @@ -4121,7 +4181,7 @@ TOP_GROUP_INTERSECT - グループの交差点 + グループの共有領域 TOP_GROUP_CUT @@ -4129,15 +4189,15 @@ TOP_FIELD_CREATE - TOP_FIELD_CREATE + フィールドを作成します。 TOP_FIELD_EDIT - TOP_FIELD_EDIT + フィールドを編集します。 TOP_HEX_SOLID - 六面体ソリッド + Hexahedral_Solid TOP_IMPORT @@ -4177,15 +4237,15 @@ TOP_MODIFY_LOCATION - 位置を変更します。 + 座標系変更 TOP_MUL_ROTATION - Multi-rotation + 複数回回転 TOP_MUL_TRANSFORM - Multi-transformation + 複数回移動 TOP_MUL_TRANSLATION @@ -4193,7 +4253,7 @@ TOP_PICTURE_IMPORT - ビュー内のイメージをインポートします。 + ビューアーにイメージをインポート TOP_FEATURE_DETECTION @@ -4249,7 +4309,7 @@ TOP_POP_EDIT_FIELD - TOP_POP_EDIT_FIELD + フィールドを編集します。 TOP_POP_UNPUBLISH_OBJ @@ -4297,7 +4357,7 @@ TOP_POP_WIREFRAME - ワイヤー + Wires TOP_PROPAGATE @@ -4317,7 +4377,7 @@ TOP_SCALE - サイズを変更 + サイズ変更 TOP_SECTION @@ -4349,7 +4409,11 @@ TOP_3DSKETCH - 3Dスケッチャー + 3D_Sketcher + + + TOP_ISOLINE + 等高線 TOP_SOLID @@ -4509,27 +4573,27 @@ GEOM_REMOVE_WEBS_TITLE - GEOM_REMOVE_WEBS_TITLE + 内部面の削除 GEOM_REMOVE_WEBS - 梁を削除 + 固体の混合物 REMOVE_WEBS_NEW_OBJ_NAME - REMOVE_WEBS_NEW_OBJ_NAME + NoInternalFaces TOP_REMOVE_WEBS - TOP_REMOVE_WEBS + 内部面を削除します。 MEN_REMOVE_WEBS - MEN_REMOVE_WEBS + 内部面の削除 STB_REMOVE_WEBS - STB_REMOVE_WEBS + 内部面を削除します。 GEOM_REMOVE_EXTRA_EDGES_TITLE @@ -4569,7 +4633,7 @@ FUSE_EDGES_NEW_OBJ_NAME - Fusionaretes + FuseEdges TOP_FUSE_EDGES @@ -4585,15 +4649,15 @@ TOP_UNION_FACES - TOP_UNION_FACES + 連合に直面しています。 MEN_UNION_FACES - MEN_UNION_FACES + 連合に直面しています。 STB_UNION_FACES - STB_UNION_FACES + 連合に直面しています。 TOP_NORMALE @@ -4637,7 +4701,7 @@ MEN_POP_DISABLE_AUTO_COLOR - 自動カラー補正を無効にします。 + 自動色無効 STB_POP_DISABLE_AUTO_COLOR @@ -4645,23 +4709,23 @@ MEN_POP_CREATE_FOLDER - MEN_POP_CREATE_FOLDER + フォルダ作成 STB_POP_CREATE_FOLDER - STB_POP_CREATE_FOLDER + 新しいフォルダーを作成します。 NEW_FOLDER_NAME - NEW_FOLDER_NAME + 新規フォルダー MEN_POP_SORT_CHILD_ITEMS - MEN_POP_SORT_CHILD_ITEMS + 子供の並べ替え STB_POP_SORT_CHILD_ITEMS - STB_POP_SORT_CHILD_ITEMS + 子アイテムを並べ替える GEOM_RESULT_NAME_GRP @@ -4697,7 +4761,7 @@ GEOM_SHAPES_ON_SHAPE - オブジェクトの要素を見つける + Shapes_On_Shape GEOM_SHAPES_ON_SHAPE_ESHAPE @@ -4729,7 +4793,7 @@ GEOM_DISK_CIRCLE - ディスク + Disk GEOM_DISK_ELLIPSE @@ -4877,7 +4941,7 @@ EXPORT_IGES_HETEROGENEOUS_COMPOUND - 異なるモードの sauvegardees\ndans をある必要がありますエンティティを含んでいるのでこのアセンブリ IGES\nsans 損失の形式でエクスポートできません。頂点、エッジと et\nles シェルの輪郭と別の固体。 + このアセンブリは異なるモードでバックアップする必要がありますエンティティを含んでいるので損失なし IGES フォーマットでエクスポートできません。頂点、エッジと 1 つの側面およびシェルとソリッドから別に輪郭です。 GEOM_PUBLISH_NAMED_SHAPES @@ -4885,11 +4949,11 @@ GEOM_SCALE_DIMENSIONS - 単位を考慮したいと思うか? \nIf ないモデルになる (メートル単位として解釈されます) ジオメトリをスケーリングします。 + インポートしたファイルの単位をミリメートルからメートルに変換しますか?いいえを選んだ場合、メートル単位として解釈します。 GEOM_PRECISION_HINT - ジオメトリモジュールの設定でパラメーター '%1' を入力することで精度を調整することが可能です。 + パラメーターの入力値の精度を調整することは '%1' の好みにジオメトリ モジュールの。 GEOM_PLUGINS_OTHER @@ -4909,7 +4973,7 @@ TOP_SMOOTHINGSURFACE - TOP_SMOOTHINGSURFACE + 表面 lissee GEOM_SELECT_IMAGE @@ -4917,51 +4981,59 @@ MEN_IMPORTEXPORT - MEN_IMPORTEXPORT + インポート/エクスポート TOOL_IMPORTEXPORT - TOOL_IMPORTEXPORT + インポート/エクスポート TOP_EXPORTXAO - TOP_EXPORTXAO + エクスポートしました。 MEN_EXPORTXAO - MEN_EXPORTXAO + エクスポートしました。 STB_EXPORTXAO - STB_EXPORTXAO + ソテーした形式でフォームをエクスポートします。 TOP_IMPORTXAO - TOP_IMPORTXAO + インポートしました。 MEN_IMPORTXAO - MEN_IMPORTXAO + インポートしました。 STB_IMPORTXAO - STB_IMPORTXAO + ソテーしたフォームをインポートします。 GEOM_IMPORTEXPORT_204 - GEOM_IMPORTEXPORT_204 + エクスポートしました。 GEOM_SELECT_EXPORT_XAO - GEOM_SELECT_EXPORT_XAO + エクスポートしました。 XAO_FILES - XAO_FILES + ファイルした (*.xao) TOOLS_IMPORTEXPORT - TOOLS_IMPORTEXPORT + インポート/エクスポート + + + CC_PNT_ITEM_X_Y + X=%1, Y=%2 + + + CC_PNT_ITEM_X_Y_Z + X=%1, Y=%2, Z=%3 @@ -4980,19 +5052,19 @@ GEOM_INTERPOL_TANGENTS - GEOM_INTERPOL_TANGENTS + 接線 GEOM_INTERPOL_FIRST_VEC - GEOM_INTERPOL_FIRST_VEC + 最初の接線ベクトル GEOM_INTERPOL_LAST_VEC - GEOM_INTERPOL_LAST_VEC + 最後の接線ベクトル GEOM_BOTH_TANGENTS_REQUIRED - GEOM_BOTH_TANGENTS_REQUIRED + 2 つの接線ベクトルを定義する必要があります。 GEOM_CURVE_CRMODE @@ -5204,11 +5276,267 @@ フェース 2 V + + CurveCreator_NewPointDlg + + ADD_NEW_POINT + 新しい点の追加 + + + X_COORD + X + + + Y_COORD + Y + + + Z_COORD + Z + + + ADD_BTN + 追加 + + + ADD_CONTINUE_BTN + 追加して継続 + + + ADD_NEW_POINT_TO_%1 + 新しい点を%1に追加 + + + SET_POINT_COORDINATES + 点座標の設定 + + + + CurveCreator_NewSectionDlg + + NAME + 名前 + + + LINE_TYPE + ライン + + + POLYLINE_TYPE + ポリライン + + + SPLINE_TYPE + スプライン + + + LINE_CLOSED + 閉じたライン + + + OK + Ok + + + ADD_BTN + 追加 + + + ADD_CONTINUE_BTN + 追加して継続 + + + ADD_NEW_SECTION + 新しい断面の追加 + + + SET_SECTION_PARAMETERS + 断面パラメータの設定 + + + + CurveCreator_TreeViewModel + + X=%1, Y=%2 + X=%1, Y=%2 + + + X=%1, Y=%2, Z=%3 + X=%1, Y=%2, Z=%3 + + + + CurveCreator_Widget + + CURVE_NAME_TLT + カーブの名前 + + + SECTION_GROUP_TLT + 断面グループ + + + UNDO + 元に戻す + + + UNDO_TLT + 元に戻す + + + REDO + 前に進む + + + REDO_TLT + 前に進む + + + NEW_SECTION + 新しい断面 + + + NEW_SECTION_TLT + 新しい断面の挿入 + + + INSERT_SECTION_BEFORE + 前に断面を挿入 + + + INSERT_SECTION_BEFORE_TLT + 前に断面を挿入 + + + INSERT_SECTION_AFTER + 後に断面の挿入 + + + INSERT_SECTION_AFTER_TLT + 後に断面の挿入 + + + ADDITION_MODE + 追加モード + + + ADDITION_MODE_TLT + 追加モード + + + MODIFICATION_MODE + 修正モード + + + MODIFICATION_MODE_TLT + 修正モード + + + DETECTION_MODE + 検出モード + + + DETECTION_MODE_TLT + 検出モード + + + INSERT_POINT_BEFORE + 前に点の挿入 + + + INSERT_POINT_BEFORE_TLT + 前に点の挿入 + + + INSERT_POINT_AFTER + 後に点の挿入 + + + CLOSE_SECTIONS + 断面を閉じる + + + CLOSE_SECTIONS_TLT + 断面を閉じる + + + UNCLOSE_SECTIONS + 断面を開く + + + UNCLOSE_SECTIONS_TLT + 選択した断面を開く + + + SET_SECTIONS_POLYLINE + 断面のポリラインを設定 + + + SET_SECTIONS_POLYLINE_TLT + 断面のポリラインを設定 + + + SET_SECTIONS_SPLINE + 断面のスプラインを設定 + + + SET_SECTIONS_SPLINE_TLT + 選択した断面をスプラインに設定 + + + REMOVE + 削除 + + + REMOVE_TLT + 削除 + + + JOIN + 結合 + + + JOIN_TLT + 選択した断面を結合 + + + STEP_UP + 上昇 + + + STEP_UP_TLT + 選択したオブジェクトを上昇 + + + STEP_DOWN + 下降 + + + STEP_DOWN_TLT + 選択したオブジェクトを下降 + + + CLEAR_ALL + すべて消去 + + + CLEAR_ALL_TLT + すべてのオブジェクトを削除 + + + JOIN_ALL + すべての断面を結合 + + + JOIN_ALL_TLT + すべての断面を結合 + + EntityGUI_SketcherDlg CANNOT_CLOSE - スケッチを閉じることができません\nスケッチのポイント数が少なすぎます + 閉じるには、アウトライン番号のポイントは十分ではないことはできません。 @@ -5239,7 +5567,7 @@ GEOM_CONTOURS - ワイヤー + Wires GEOM_FEATURES @@ -5247,7 +5575,7 @@ GEOM_DETECT_ZONE - Detection\n (すべて、既定のイメージ) の領域を選択します。 + 検出ゾーン (すべての既定のイメージ) を選択します GEOM_DETECT_OUTPUT @@ -5277,6 +5605,110 @@ GEOM_LEFT å·¦ (X - Z) + + USE_ROI + 希望の領域を使用 + + + KERNEL_SIZE + カーネルサイズ + + + QUALITY_LEVEL + クオリティレベル + + + MIN_DISTANCE + 最短距離 + + + TYPE_CRITERIA + タイプの基準 + + + CV_TERMCRIT_ITER + イタレーションの最大数 + + + CV_TERMCRIT_EPS + 許容範囲 + + + CV_TERMCRIT_ITER | CV_TERMCRIT_EPS + イタレーションまたは許容範囲の最大数 + + + MAX_ITER + 最大イタレーション + + + EPSILON + 許容範囲 + + + L2GRADIENT + L2 gradient + + + LOWTHRESHOLD + 低しきい値 + + + RATIO + 比 + + + SMOOTH_SIZE + 平滑サイズ + + + HBINS + Hbins + + + SBINS + Sbins + + + HIST_TYPE + ヒストグラムのタイプ + + + CV_HIST_ARRAY + 多次元高密度配列 + + + CV_HIST_SPARSE + 多次元スパース配列 + + + THRESHOLD_VALUE + しきい値 + + + MAX_THRESHOLD + 最大しきい値 + + + FIND_CONTOURS_METHOD + 輪郭取得法 + + + CV_CHAIN_APPROX_NONE + チェーン近似がない + + + CV_CHAIN_APPROX_SIMPLE + チェーン近似はSimple + + + CV_CHAIN_APPROX_TC89_KCOS + チェーン近似はTC90 KCOS + + + CV_CHAIN_APPROX_TC89_L1 + チェーン近似はTC90 L1 + EntityGUI_PictureImportDlg @@ -5290,7 +5722,7 @@ GEOM_IMPORT_PICT_TITLE - ビューアーのイメージをインポートします。 + ビューアーにイメージをインポート @@ -5304,15 +5736,15 @@ GenerationGUI_PrismDlg GEOM_THICKENING - GEOM_THICKENING + Epaississement GEOM_ADD_THICKNESS - GEOM_ADD_THICKNESS + 厚み追加(エッジまたはワイヤーのみ) GEOM_TOWARDS_INSIDE - GEOM_TOWARDS_INSIDE + 内側に向かって厚く @@ -5338,7 +5770,7 @@ GEOM_INTERSECT_TITLE - グループの交差点 + グループの共有領域 GEOM_CUT @@ -5346,7 +5778,7 @@ GEOM_CUT_TITLE - オブジェクトの切断 + 切断グループ GEOM_GROUPS @@ -5354,11 +5786,11 @@ GEOM_MAIN_GROUPS - 主なグループ + メイングループ GEOM_TOOL_GROUPS - グループ ツール + ツール グループ @@ -5413,7 +5845,7 @@ SELECT_ALL - すべてを選択 + 全選択 SHAPE_SEL_RESTR @@ -5441,41 +5873,41 @@ WRN_NOT_SUBSHAPE - WRN_NOT_SUBSHAPE + 選択した図形は、主要な図形のサブ図形ではありません。適切な選択については、ビューアー内のすべての余分な図形を非表示します。 EntityGUI NO_FIELD - NO_FIELD + 編集するフィールドを選択してください。 EntityGUI_FieldDlg CREATE_FIELD_TITLE - CREATE_FIELD_TITLE + フィールドを作成します。 EDIT_FIELD_TITLE - EDIT_FIELD_TITLE + フィールドを編集します。 FIELD_NAME - FIELD_NAME + フィールド名 PROPERTIES - PROPERTIES + オブジェクト インスペクター SHAPE - SHAPE + オブジェクト DATA_TYPE - DATA_TYPE + タイプ @@ -5483,107 +5915,123 @@ BOOL - BOOL + ブーリアン INT - INT + 整数 DOUBLE - DOUBLE + ダブル STRING - STRING + 文字列 SHAPE_TYPE - SHAPE_TYPE + SubShape VERTEX - VERTEX + 基準点 EDGE - EDGE + Edge FACE - FACE + Face SOLID - SOLID + ソリッド WHOLE - WHOLE + 図形全体 NB_COMPS - NB_COMPS + 注意コンポーネント VALUES - VALUES + 値 PREV_STEP - PREV_STEP + 前の手順 STEP - STEP + ステップ NEXT_STEP - NEXT_STEP + 次のステップ ADD_STEP - ADD_STEP + ステップを追加します。 STAMP - STAMP + スタンプ REMOVE_STEP - REMOVE_STEP + ステップを削除します。 FIELD_PREFIX - FIELD_PREFIX + フィールド: GEOM_NO_STUDY - GEOM_NO_STUDY + ない研究桁 NO_SHAPE - NO_SHAPE + 図形が選択されていません NO_FIELD - NO_FIELD + 選択されていないフィールド EMPTY_NAME - EMPTY_NAME + 空でないフィールド名を指定してください。 NO_VALUES - NO_VALUES + フィールドに追加手順なし SUB_SHAPE_HEADER - SUB_SHAPE_HEADER + SubShape WHOLE_SHAPE_VHEADER - WHOLE_SHAPE_VHEADER + オブジェクト + + + RENAME_COMPONENT + コンポーネントの名前変更 + + + COMPONENT_NAME + コンポーネント名 + + + WRN_NOT_SUBSHAPE + 選択した形状は主要な図形のサブ図形ではありません。適切な選択については、ビューアー内のすべての余分な図形を非表示します。 + + + ERR_STEP_EXISTS + そのIDのステップはすでに存在します。 @@ -5597,7 +6045,7 @@ MeasureGUI_PointDlg CAPTION - 点の座標 + 軸に目盛り付け COORDINATES @@ -5636,25 +6084,25 @@ SELECTED_FACES - フェース + 選択面 OperationGUI_FilletDlg SELECTED_EDGES - エッジ + 選択エッジ SELECTED_FACES - フェース + Faces RepairGUI_FreeBoundDlg CAPTION - フリー境界チェック + 自由境界をチェック FREE_BOUND @@ -5670,22 +6118,22 @@ NAME_CLOSED - NAME_CLOSED + Frontiere_Libre_Lermee_ %1 NAME_OPEN - NAME_OPEN + Frontiere_Libre_Ouverte_ %1 RepairGUI_GlueDlg FACES_FOR_GLUING_ARE_DETECTED - 固着できる%1 のフェースがあります。それらは赤で強調表示されます。\nこのメッセージボックスを閉じ、固着するフェースを選択してください。 + %1 の顔 (s) で強調表示された赤の色をピックアップするがあります。この警告ボックスを閉じるし、をピックアップする面を選択 EDGES_FOR_GLUING_ARE_DETECTED - %1 のエッジが固着できます。それらはスクリーン上で赤く表示されます。\nこのメッセージボックスを閉じ、固着エッジを選択して下さい。 + %1 のエッジ (s) で強調表示されている赤をピックアップするがあります。この警告ボックスを閉じるし、ピックアップするエッジを選択します。、 GLUE_FACES @@ -5728,7 +6176,7 @@ TIME_CONSUMING - このオプションを有効にすると、いくつかの形状入力に非常に時間のかかる操作になることがあります。\n続行しますか? + このオプションを有効にすると、特定のオブジェクトを時間の無駄が可能性があります。続行しますか。 @@ -5796,7 +6244,7 @@ OK_BTN - OK(&O) + わかりました(&O) CANCEL_BTN @@ -5819,11 +6267,11 @@ FRONT_FACE - FRONT_FACE + フロント パネル BACK_FACE - BACK_FACE + 背面の色 REFLECTION_0 @@ -5875,11 +6323,11 @@ QUE_CREATE_NEW_MATERIAL - 事前のプロパティを変更することはできません-defini.\nvoulez-あなたは材料を新しいを作成するか? + 定義済みのマテリアル プロパティを変更することはできません。新しいものを作成したいですか? QUE_REMOVE_MATERIAL - %1 の材料を削除しますか? + %1 のプロパティを削除しますか? OK_BTN @@ -5910,7 +6358,7 @@ MSG_SHARED_SHAPES_TOO_FEW_SHAPES - 十分なアイテムが選択されていない + 必要なアイテムが選択されていない GEOM_SHARED_SHAPE @@ -5933,11 +6381,11 @@ UNSELECT_ALL - すべての選択を解除(&n) + 全選択解除(&n) SELECT_ALL - すべて選択します。 + 全選択(&A) GEOM_PUBLISH_BTN @@ -5952,96 +6400,123 @@ RepairGUI_UnionFacesDlg GEOM_UNION_FACES_TITLE - GEOM_UNION_FACES_TITLE + 共有面 GEOM_UNION_FACES - GEOM_UNION_FACES + オブジェクト面の共有 UNION_FACES_NEW_OBJ_NAME - UNION_FACES_NEW_OBJ_NAME + UnionFaces GEOMGUI_CreationInfoWdg CREATION_INFO_TITLE - CREATION_INFO_TITLE + 情報 OPERATION - OPERATION + 操作 PARAMETER - PARAMETER + パラメーター VALUE - VALUE + 値 NO_INFO - NO_INFO + (有効情報なし) ImportExportGUI_ExportXAODlg GEOM_EXPORTXAO_TITLE - GEOM_EXPORTXAO_TITLE + エクスポートしました。 GEOM_EXPORTXAO - GEOM_EXPORTXAO + エクスポートしました。 GEOM_EXPORTXAO_EXPORTINGSHAPE - GEOM_EXPORTXAO_EXPORTINGSHAPE + オブジェクト GEOM_EXPORTXAO_FILENAME - GEOM_EXPORTXAO_FILENAME + ファイル GEOM_EXPORTXAO_AUTHOR - GEOM_EXPORTXAO_AUTHOR + 作成者 GEOM_EXPORTXAO_LGROUPS - GEOM_EXPORTXAO_LGROUPS + グループ GEOM_EXPORTXAO_LFIELDS - GEOM_EXPORTXAO_LFIELDS + フィールド + + + EXPORT_DLG_ACCEPT + OK ImportExportGUI_ImportXAODlg GEOM_IMPORTXAO_TITLE - GEOM_IMPORTXAO_TITLE + インポートしました。 GEOM_IMPORTXAO - GEOM_IMPORTXAO + インポートしました。 GEOM_IMPORTXAO_IMPORTINGSHAPE - GEOM_IMPORTXAO_IMPORTINGSHAPE + オブジェクト GEOM_IMPORTXAO_FILENAME - GEOM_IMPORTXAO_FILENAME + ファイル GEOM_IMPORTXAO_LGROUPS - GEOM_IMPORTXAO_LGROUPS + グループ GEOM_IMPORTXAO_LFIELDS - GEOM_IMPORTXAO_LFIELDS + フィールド + + + STEP + Step + + + + EntityGUI_IsolineDlg + + GEOM_ISOLINE_TITLE + 等高線の構築 + + + GEOM_ISOLINE + Isoline + + + GEOM_ISOLINE_U + U-Isoline + + + GEOM_ISOLINE_V + V-Isoline diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index bdf31b968..b334172ed 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -503,6 +503,7 @@ void GeometryGUI::OnGUIEvent( int id, const QVariant& theParam ) case GEOMOp::OpDMWireframe: // MENU VIEW - WIREFRAME case GEOMOp::OpDMShading: // MENU VIEW - SHADING case GEOMOp::OpDMShadingWithEdges: // MENU VIEW - SHADING + case GEOMOp::OpDMTexture: // MENU VIEW - TEXTURE case GEOMOp::OpShowAll: // MENU VIEW - SHOW ALL case GEOMOp::OpShowOnly: // MENU VIEW - DISPLAY ONLY case GEOMOp::OpShowOnlyChildren: // MENU VIEW - SHOW ONLY CHILDREN @@ -847,6 +848,11 @@ void GeometryGUI::createGeomAction( const int id, const QString& label, const QS void GeometryGUI::createOriginAndBaseVectors() { SalomeApp_Study* appStudy = dynamic_cast( application()->activeStudy() ); + bool aLocked = (_PTR(AttributeStudyProperties)(appStudy->studyDS()->GetProperties()))->IsLocked(); + if ( aLocked ) { + SUIT_MessageBox::warning ( application()->desktop(), QObject::tr("WRN_WARNING"), QObject::tr("WRN_STUDY_LOCKED") ); + return; + } if ( appStudy ) { _PTR(Study) studyDS = appStudy->studyDS(); if ( studyDS && !CORBA::is_nil( GetGeomGen() ) ) { @@ -1019,6 +1025,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createGeomAction( GEOMOp::OpDMWireframe, "WIREFRAME" ); createGeomAction( GEOMOp::OpDMShading, "SHADING" ); createGeomAction( GEOMOp::OpDMShadingWithEdges, "SHADING_WITH_EDGES" ); + createGeomAction( GEOMOp::OpDMTexture, "TEXTURE" ); createGeomAction( GEOMOp::OpShowAll, "DISPLAY_ALL" ); createGeomAction( GEOMOp::OpHideAll, "ERASE_ALL" ); createGeomAction( GEOMOp::OpShow, "DISPLAY" ); @@ -1291,6 +1298,7 @@ void GeometryGUI::initialize( CAM_Application* app ) createMenu( GEOMOp::OpDMWireframe, dispmodeId, -1 ); createMenu( GEOMOp::OpDMShading, dispmodeId, -1 ); createMenu( GEOMOp::OpDMShadingWithEdges, dispmodeId, -1 ); + createMenu( GEOMOp::OpDMTexture, dispmodeId, -1 ); createMenu( separator(), dispmodeId, -1 ); createMenu( GEOMOp::OpSwitchVectors, dispmodeId, -1 ); @@ -2663,6 +2671,11 @@ void GeometryGUI::storeVisualParameters (int savePoint) param = occParam + GEOM::propertyName( GEOM::Color ); ip->setParameter(entry, param.toStdString(), val.join( GEOM::subSectionSeparator()).toStdString()); } + + if (aProps.contains(GEOM::propertyName( GEOM::Texture ))) { + param = occParam + GEOM::propertyName( GEOM::Texture ); + ip->setParameter(entry, param.toStdString(), aProps.value(GEOM::propertyName( GEOM::Texture )).toString().toStdString()); + } if (vType == SVTK_Viewer::Type()) { if (aProps.contains(GEOM::propertyName( GEOM::Opacity ))) { @@ -2813,6 +2826,8 @@ void GeometryGUI::restoreVisualParameters (int savePoint) QColor c = QColor::fromRgbF(rgb[0].toDouble(), rgb[1].toDouble(), rgb[2].toDouble()); aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Color ), c); } + } else if (paramNameStr == GEOM::propertyName( GEOM::Texture )) { + aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::Texture ), val ); } else if (paramNameStr == GEOM::propertyName( GEOM::EdgesDirection )) { aListOfMap[viewIndex].insert( GEOM::propertyName( GEOM::EdgesDirection ), val == "true" || val == "1"); } else if (paramNameStr == GEOM::propertyName( GEOM::Deflection )) { diff --git a/src/GEOMGUI/GeometryGUI_Operations.h b/src/GEOMGUI/GeometryGUI_Operations.h index 965e9e445..304220b0b 100644 --- a/src/GEOMGUI/GeometryGUI_Operations.h +++ b/src/GEOMGUI/GeometryGUI_Operations.h @@ -68,6 +68,7 @@ namespace GEOMOp { OpDMWireframe = 2010, // MENU VIEW - DISPLAY MODE - WIREFRAME OpDMShading = 2011, // MENU VIEW - DISPLAY MODE - SHADING OpDMShadingWithEdges = 2012, // MENU VIEW - DISPLAY MODE - SHADING WITH EDGES + OpDMTexture = 2013, // MENU VIEW - DISPLAY MODE - TEXTURE OpShow = 2100, // POPUP MENU - SHOW OpShowOnly = 2101, // POPUP MENU - SHOW ONLY OpHide = 2102, // POPUP MENU - HIDE diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx index c0ace0308..2e45e7ba5 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx @@ -18,6 +18,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include @@ -38,7 +39,6 @@ #include "utilities.h" #include -#include #include #include @@ -47,8 +47,6 @@ #include #include -#include - #include #include @@ -423,8 +421,7 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape const Standard_Real theTolerance, const TopAbs_ShapeEnum theShapeType, const Standard_Boolean doKeepNonSolids, - TCollection_AsciiString& theWarning, - const TopTools_DataMapOfShapeShape& aCopyMap) const + TCollection_AsciiString& theWarning) const { TopoDS_Shape aRes; @@ -554,18 +551,10 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape TDF_Label anArgumentHistoryLabel = aFunction->GetArgumentHistoryEntry(anArgumentRefLabel, Standard_True); - TopTools_ListOfShape aModified; for (Standard_Integer ie = 1; ie <= nbArgumentEntities; ie++) { TopoDS_Shape anEntity = anArgumentIndices.FindKey(ie); - if (aCopyMap.IsBound(anEntity)) { - anEntity = aCopyMap.Find(anEntity); - } - aModified = aGA.Modified(anEntity); + const TopTools_ListOfShape& aModified = aGA.Modified(anEntity); Standard_Integer nbModified = aModified.Extent(); - if (!nbModified && aResIndices.Contains(anEntity)) { - aModified.Append(anEntity); - nbModified = 1; - } if (nbModified > 0) { TDF_Label aWhatHistoryLabel = anArgumentHistoryLabel.FindChild(ie, Standard_True); @@ -754,35 +743,18 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const Standard_Boolean aKeepNonSolids = aCI.GetKeepNonSolids(); - // Copy initial shape to prevent its modification by gluing algorithm - TopoDS_Shape aShapeCopy; - TColStd_IndexedDataMapOfTransientTransient aMapTShapes; - TNaming_CopyShape::CopyTool(aShapeBase, aMapTShapes, aShapeCopy); - // - // map sub-shapes - TopTools_IndexedMapOfShape aShapeBase_inds, aShapeCopy_inds; - TopTools_DataMapOfShapeShape aCopyMap; - Standard_Integer aNbInd, i; - // - TopExp::MapShapes(aShapeBase, aShapeBase_inds); - TopExp::MapShapes(aShapeCopy, aShapeCopy_inds); - // - aNbInd = aShapeBase_inds.Extent(); - for (i = 1; i <= aNbInd; ++i) { - aCopyMap.Bind(aShapeBase_inds(i), aShapeCopy_inds(i)); - } - // if (aType == GLUE_FACES) { - aShape = GlueWithWarnings(aShapeCopy, tol3d, TopAbs_FACE, aKeepNonSolids, aWrn, aCopyMap); + //aShape = GlueFacesWithWarnings(aShapeBase, tol3d, aKeepNonSolids, aWrn); + aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_FACE, aKeepNonSolids, aWrn); } else if (aType == GLUE_EDGES) { - aShape = GlueWithWarnings(aShapeCopy, tol3d, TopAbs_EDGE, aKeepNonSolids, aWrn, aCopyMap); + aShape = GlueWithWarnings(aShapeBase, tol3d, TopAbs_EDGE, aKeepNonSolids, aWrn); } else if (aType == GLUE_FACES_BY_LIST || aType == GLUE_EDGES_BY_LIST) { Handle(TColStd_HSequenceOfTransient) SF = aCI.GetFaces(); TopTools_MapOfShape aFaces; - - for (i = 1; i <= SF->Length(); i++) { + int i = 1; + for (; i <= SF->Length(); i++) { Handle(Standard_Transient) anItem = SF->Value(i); if (anItem.IsNull()) continue; @@ -792,14 +764,7 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const TopoDS_Shape aFace = aRefSh->GetValue(); if (aFace.IsNull()) continue; - - // get copy of face to correspond to aShapeCopy - if (aShapeBase_inds.Contains(aFace)) { - int ind = aShapeBase_inds.FindIndex(aFace); - aFace = aShapeCopy_inds.FindKey(ind); - - aFaces.Add(aFace); - } + aFaces.Add(aFace); } Standard_Boolean aGlueAllEdges = Standard_False; @@ -807,7 +772,7 @@ Standard_Integer GEOMImpl_GlueDriver::Execute(TFunction_Logbook& log) const aGlueAllEdges = aCI.GetGlueAllEdges(); //aShape = GlueFacesByList(aShapeBase, tol3d, aKeepNonSolids, aFaces); - aShape = GlueByList(aShapeCopy, tol3d, aKeepNonSolids, aFaces, aGlueAllEdges); + aShape = GlueByList(aShapeBase, tol3d, aKeepNonSolids, aFaces, aGlueAllEdges); } if (aShape.IsNull()) return 0; diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx index 6e0c60bbb..1e1a3100e 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.hxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.hxx @@ -48,7 +48,7 @@ #endif #include -#include + #ifndef _TFunction_Driver_HeaderFile #include @@ -104,8 +104,7 @@ Standard_EXPORT TopoDS_Shape GlueWithWarnings (const TopoDS_Shape& theShape, const Standard_Real theTolerance, const TopAbs_ShapeEnum theShapeType, const Standard_Boolean doKeepNonSolids, - TCollection_AsciiString& theWarning, - const TopTools_DataMapOfShapeShape& aCopyMap) const; + TCollection_AsciiString& theWarning) const; Standard_EXPORT static TopoDS_Shape GlueByList (const TopoDS_Shape& theShape, const Standard_Real theTolerance, diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 2879a1b9f..aaa0b4ed8 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include @@ -85,6 +86,7 @@ #include #include +#include #include @@ -1551,40 +1553,116 @@ TCollection_AsciiString GEOMImpl_IMeasureOperations::WhatIs (Handle(GEOM_Object) * AreCoordsInside */ //============================================================================= -std::vector GEOMImpl_IMeasureOperations::AreCoordsInside(Handle(GEOM_Object) theShape, - const std::vector& coords, - double tolerance) +std::vector +GEOMImpl_IMeasureOperations::AreCoordsInside(Handle(GEOM_Object) theShape, + const std::vector& coords, + double tolerance) { - std::vector res; + std::vector isInsideRes; if (!theShape.IsNull()) { Handle(GEOM_Function) aRefShape = theShape->GetLastFunction(); if (!aRefShape.IsNull()) { TopoDS_Shape aShape = aRefShape->GetValue(); - if (!aShape.IsNull()) { - unsigned int nb_points = coords.size()/3; - for (int i = 0; i < nb_points; i++) { - double x = coords[3*i]; - double y = coords[3*i+1]; - double z = coords[3*i+2]; - gp_Pnt aPnt(x, y, z); - if ( aShape.ShapeType() == TopAbs_COMPOUND || aShape.ShapeType() == TopAbs_COMPSOLID || - aShape.ShapeType() == TopAbs_SOLID ) { - TopExp_Explorer anExp; - bool isFound = false; - for ( anExp.Init( aShape, TopAbs_SOLID ); anExp.More() && !isFound; anExp.Next() ) { - BRepClass3d_SolidClassifier SC( anExp.Current() ); + if (!aShape.IsNull()) + { + TopTools_IndexedMapOfShape mapShape; + { + TopExp_Explorer anExp; + for ( anExp.Init( aShape, TopAbs_SOLID ); anExp.More(); anExp.Next() ) + mapShape.Add( anExp.Current() ); + for ( anExp.Init( aShape, TopAbs_FACE, TopAbs_SOLID ); anExp.More(); anExp.Next() ) + mapShape.Add( anExp.Current() ); + for ( anExp.Init( aShape, TopAbs_EDGE, TopAbs_FACE ); anExp.More(); anExp.Next() ) + mapShape.Add( anExp.Current() ); + for ( anExp.Init( aShape, TopAbs_VERTEX, TopAbs_EDGE ); anExp.More(); anExp.Next() ) + mapShape.Add( anExp.Current() ); //// ????????? + } + size_t nb_points = coords.size()/3, nb_points_inside = 0; + isInsideRes.resize( nb_points, false ); + + for ( int iS = 1; iS <= mapShape.Extent(); ++iS ) + { + if ( nb_points_inside == nb_points ) + break; + aShape = mapShape( iS ); + switch ( aShape.ShapeType() ) { + case TopAbs_SOLID: + { + BRepClass3d_SolidClassifier SC( TopoDS::Solid( aShape )); + for ( size_t i = 0; i < nb_points; i++) + { + if ( isInsideRes[ i ]) continue; + gp_Pnt aPnt( coords[3*i], coords[3*i+1], coords[3*i+2] ); SC.Perform( aPnt, tolerance ); - isFound = ( SC.State() == TopAbs_IN ) || ( SC.State() == TopAbs_ON ); + isInsideRes[ i ] = (( SC.State() == TopAbs_IN ) || ( SC.State() == TopAbs_ON )); + nb_points_inside += isInsideRes[ i ]; + } + break; + } + case TopAbs_FACE: + { + Standard_Real u1,u2,v1,v2; + const TopoDS_Face& face = TopoDS::Face( aShape ); + Handle(Geom_Surface) surf = BRep_Tool::Surface( face ); + surf->Bounds( u1,u2,v1,v2 ); + GeomAPI_ProjectPointOnSurf project; + project.Init(surf, u1,u2, v1,v2, tolerance ); + for ( size_t i = 0; i < nb_points; i++) + { + if ( isInsideRes[ i ]) continue; + gp_Pnt aPnt( coords[3*i], coords[3*i+1], coords[3*i+2] ); + project.Perform( aPnt ); + if ( project.IsDone() && + project.NbPoints() > 0 && + project.LowerDistance() <= tolerance ) + { + Quantity_Parameter u, v; + project.LowerDistanceParameters(u, v); + gp_Pnt2d uv( u, v ); + BRepClass_FaceClassifier FC ( face, uv, tolerance ); + isInsideRes[ i ] = (( FC.State() == TopAbs_IN ) || ( FC.State() == TopAbs_ON )); + nb_points_inside += isInsideRes[ i ]; + } + } + break; + } + case TopAbs_EDGE: + { + Standard_Real f,l; + const TopoDS_Edge& edge = TopoDS::Edge( aShape ); + Handle(Geom_Curve) curve = BRep_Tool::Curve( edge, f, l ); + GeomAPI_ProjectPointOnCurve project; + project.Init( curve, f, l ); + for ( size_t i = 0; i < nb_points; i++) + { + if ( isInsideRes[ i ]) continue; + gp_Pnt aPnt( coords[3*i], coords[3*i+1], coords[3*i+2] ); + project.Perform( aPnt ); + isInsideRes[ i ] = ( project.NbPoints() > 0 && + project.LowerDistance() <= tolerance ); + nb_points_inside += isInsideRes[ i ]; + } + break; + } + case TopAbs_VERTEX: + { + gp_Pnt aVPnt = BRep_Tool::Pnt( TopoDS::Vertex( aShape )); + for ( size_t i = 0; i < nb_points; i++) + { + if ( isInsideRes[ i ]) continue; + gp_Pnt aPnt( coords[3*i], coords[3*i+1], coords[3*i+2] ); + isInsideRes[ i ] = ( aPnt.SquareDistance( aVPnt ) <= tolerance * tolerance ); + nb_points_inside += isInsideRes[ i ]; } - res.push_back( isFound ); + break; } - else - res.push_back( false ); + default:; + } // switch ( aShape.ShapeType() ) } } } } - return res; + return isInsideRes; } //============================================================================= @@ -1592,10 +1670,15 @@ std::vector GEOMImpl_IMeasureOperations::AreCoordsInside(Handle(GEOM_Objec * GetMinDistance */ //============================================================================= -Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance - (Handle(GEOM_Object) theShape1, Handle(GEOM_Object) theShape2, - Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, - Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2) +Standard_Real +GEOMImpl_IMeasureOperations::GetMinDistance (Handle(GEOM_Object) theShape1, + Handle(GEOM_Object) theShape2, + Standard_Real& X1, + Standard_Real& Y1, + Standard_Real& Z1, + Standard_Real& X2, + Standard_Real& Y2, + Standard_Real& Z2) { SetErrorCode(KO); Standard_Real MinDist = 1.e9; diff --git a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx index 693111163..a25a16004 100644 --- a/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_TranslateDriver.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -175,10 +176,7 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const Handle(GEOM_Function) aVector = TI.GetVector(); gp_Vec Vec = gp::DX(); if (!aVector.IsNull()) { - TopoDS_Shape aV = aVector->GetValue(); - if (aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; - TopoDS_Edge anEdge = TopoDS::Edge(aV); - Vec = gp_Vec(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge))); + Vec = GEOMUtils::GetVector( aVector->GetValue(), Standard_False ); Vec.Normalize(); } @@ -211,18 +209,12 @@ Standard_Integer GEOMImpl_TranslateDriver::Execute(TFunction_Logbook& log) const gp_Vec Vec2 = gp::DY(); if (!aVector.IsNull()) { - TopoDS_Shape aV = aVector->GetValue(); - if (aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; - TopoDS_Edge anEdge = TopoDS::Edge(aV); - Vec1 = gp_Vec(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge))); + Vec1 = GEOMUtils::GetVector( aVector->GetValue(), Standard_False ); Vec1.Normalize(); } if (!aVector2.IsNull()) { - TopoDS_Shape aV = aVector2->GetValue(); - if (aV.IsNull() || aV.ShapeType() != TopAbs_EDGE) return 0; - TopoDS_Edge anEdge = TopoDS::Edge(aV); - Vec2 = gp_Vec(BRep_Tool::Pnt(TopExp::FirstVertex(anEdge)), BRep_Tool::Pnt(TopExp::LastVertex(anEdge))); + Vec2 = GEOMUtils::GetVector( aVector2->GetValue(), Standard_False ); Vec2.Normalize(); } diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index f774f3000..8ac38a4bb 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -725,8 +725,8 @@ bool GEOMToolsGUI::Import() app->putInfo( tr( "GEOM_PRP_LOADING" ).arg( SUIT_Tools::file( fileName, /*withExten=*/true ) ) ); anOp->start(); - CORBA::String_var fileN = fileName.toLatin1().constData(); - CORBA::String_var fileT = aCurrentType.toLatin1().constData(); + CORBA::String_var fileN = fileName.toUtf8().constData(); + CORBA::String_var fileT = aCurrentType.toUtf8().constData(); // jfa 21.08.2012 for mantis issue 21511 (STEP file units) CORBA::String_var aUnits = aInsOp->ReadValue(fileN, fileT, "LEN_UNITS"); @@ -945,7 +945,7 @@ bool GEOMToolsGUI::Export() anOp->start(); - aInsOp->Export( anObj, file.toStdString().c_str(), fileType.toLatin1().constData() ); + aInsOp->Export( anObj, file.toUtf8().constData(), fileType.toUtf8().constData() ); if (aInsOp->IsDone()) anOp->commit(); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index eb95c26bc..d557d098c 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -298,9 +298,9 @@ void GEOMToolsGUI::OnTexture() QString aTexture = QFileDialog::getOpenFileName( dynamic_cast< SUIT_ViewWindow* >( window ),tr("GEOM_SELECT_IMAGE"),QString(), tr("OCC_TEXTURE_FILES")); if( !aTexture.isEmpty() ) { - displayer.SetTexture( aTexture.toStdString() ); for ( SALOME_ListIteratorOfListIO It( selected ); It.More(); It.Next() ) { Handle( SALOME_InteractiveObject ) io = It.Value(); + appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::Texture ), aTexture ); appStudy->setObjectProperty( aMgrId, io->getEntry(), GEOM::propertyName( GEOM::DisplayMode ), 3 ); if ( window->isVisible( io ) ) displayer.Redisplay( io, false ); } diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index 29aa20836..ff48a03e9 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -42,6 +42,7 @@ #include "GEOM_PythonDump.hxx" #include "GEOMImpl_Types.hxx" #include "GEOMImpl_CopyDriver.hxx" +#include "GEOMImpl_IInsertOperations.hxx" #include "GEOM_wrap.hxx" // Cascade headers @@ -240,10 +241,9 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, CORBA::String_var aGeomObjIOR = _orb->object_to_string(theObject); aResultSO->SetAttrString("AttributeIOR",aGeomObjIOR); - TCollection_AsciiString anObjectName("Shape_"); + TCollection_AsciiString anObjectName, aNamePrefix("Shape_"); // BEGIN: try to find existed name for current shape - bool HasName = false; if ( !aShape->_is_nil() ) { // recieve current TopoDS shape @@ -263,7 +263,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, // check all named shapes using iterator TDF_ChildIDIterator anIt (aMainLbl, TNaming_NamedShape::GetID(), Standard_True); - for (; anIt.More() && !HasName; anIt.Next()) { + for (; anIt.More() && anObjectName.IsEmpty(); anIt.Next()) { Handle(TNaming_NamedShape) anAttr = Handle(TNaming_NamedShape)::DownCast(anIt.Value()); if (anAttr.IsNull()) continue; @@ -271,10 +271,8 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, if (S.IsEqual(TopoSh)) { TDF_Label L = anAttr->Label(); Handle(TDataStd_Name) aName; - if (L.FindAttribute(TDataStd_Name::GetID(), aName)) { + if (L.FindAttribute(TDataStd_Name::GetID(), aName)) anObjectName = aName->Get(); - HasName = true; - } } } } @@ -286,32 +284,32 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, switch ( (TopAbs_ShapeEnum)anOp->GetType( aShape )) { case TopAbs_VERTEX: aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_PNT" ); - anObjectName = "Group_Of_Vertices_"; + aNamePrefix = "Group_Of_Vertices_"; break; case TopAbs_EDGE: aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_EDGE"); - anObjectName = "Group_Of_Edges_"; + aNamePrefix = "Group_Of_Edges_"; break; case TopAbs_FACE: aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_FACE"); - anObjectName = "Group_Of_Faces_"; + aNamePrefix = "Group_Of_Faces_"; break; case TopAbs_SOLID: aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_GROUP_SOLID"); - anObjectName = "Group_Of_Solids_"; + aNamePrefix = "Group_Of_Solids_"; break; } } else if ( mytype == GEOM_MARKER ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_LCS"); - anObjectName = "LocalCS_"; + aNamePrefix = "LocalCS_"; } else if ( mytype > ADVANCED_BASE ) { char buf[20]; sprintf( buf, "%d", aBaseObj->GetType() ); std::string advId = "ICON_OBJBROWSER_ADVANCED_"; advId += buf; aResultSO->SetAttrString("AttributePixMap",advId.c_str()); - anObjectName = "Advanced_"; + aNamePrefix = "Advanced_"; } else if ( mytype == GEOM_FIELD ) { - anObjectName = "Field_"; + aNamePrefix = "Field_"; GEOM::GEOM_Field_var aField = GEOM::GEOM_Field::_narrow(theObject); if ( !aField->_is_nil() ) switch( aField->GetDimension() ) { @@ -327,38 +325,38 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_FIELD_SOLID"); } } else if ( mytype == GEOM_FIELD_STEP ) { - anObjectName = "Step_"; + aNamePrefix = "Step_"; } else if ( !aShape->_is_nil() ) { GEOM::shape_type myshapetype=aShape->GetShapeType(); if ( myshapetype == GEOM::COMPOUND ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPOUND" ); - anObjectName = "Compound_"; + aNamePrefix = "Compound_"; } else if ( myshapetype == GEOM::COMPSOLID ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_COMPSOLID"); - anObjectName = "Compsolid_"; + aNamePrefix = "Compsolid_"; } else if ( myshapetype == GEOM::SOLID ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SOLID"); - anObjectName = "Solid_"; + aNamePrefix = "Solid_"; } else if ( myshapetype == GEOM::SHELL ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_SHELL"); - anObjectName = "Shell_"; + aNamePrefix = "Shell_"; } else if ( myshapetype == GEOM::FACE ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_FACE"); - anObjectName = "Face_"; + aNamePrefix = "Face_"; } else if ( myshapetype == GEOM::WIRE ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_WIRE"); - anObjectName = "Wire_"; + aNamePrefix = "Wire_"; } else if ( myshapetype == GEOM::EDGE ) { aResultSO->SetAttrString("AttributePixMap", "ICON_OBJBROWSER_EDGE"); - anObjectName = "Edge_"; + aNamePrefix = "Edge_"; } else if ( myshapetype == GEOM::VERTEX ) { aResultSO->SetAttrString("AttributePixMap","ICON_OBJBROWSER_VERTEX" ); - anObjectName = "Vertex_"; + aNamePrefix = "Vertex_"; } } - if (!HasName) + if ( anObjectName.IsEmpty() ) { - //if (strlen(theName) == 0) anObjectName += TCollection_AsciiString(aResultSO->Tag()); + //if (strlen(theName) == 0) aNamePrefix += TCollection_AsciiString(aResultSO->Tag()); //else anObjectName = TCollection_AsciiString(CORBA::string_dup(theName)); // asv : 11.11.04 Introducing a more sofisticated method of name creation, just as @@ -368,16 +366,15 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, if ( strlen( theName ) == 0 ) { // MOST PROBABLY CALLED FROM BATCHMODE OR SUPERVISOR int i = 0; // (WITH EMPTY NEW NAME) SALOMEDS::SObject_var obj; - TCollection_AsciiString aNewObjectName; do { - aNewObjectName = anObjectName + TCollection_AsciiString(++i); - obj = theStudy->FindObject( aNewObjectName.ToCString() ); + anObjectName = aNamePrefix + TCollection_AsciiString(++i); + obj = theStudy->FindObject( anObjectName.ToCString() ); } while ( !obj->_is_nil() ); - anObjectName = aNewObjectName; } - else // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME) + else { // MOST PROBABLY CALLED FROM GEOM GUI (ALREADY WITH VALID NAME) anObjectName = theName; + } } //Set the study entry as a name of the published GEOM_Object @@ -750,6 +747,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, // Find the current Study and StudyBuilder SALOMEDS::Study_var aStudy = theObject->GetStudy(); SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::UseCaseBuilder_var anUseCaseBuilder = aStudy->GetUseCaseBuilder(); SALOMEDS::SObject_var aNewSO; // Retrieve a TopoDS_Shape from byte stream TopoDS_Shape aTopology; @@ -786,6 +784,10 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream, anIOR->SetValue(objStr.in()); anIOR->UnRegister(); + // add object to the use case tree + // (to support tree representation customization and drag-n-drop) + anUseCaseBuilder->AppendTo( aNewSO->GetFather(), aNewSO ); + // Return the created in the Study SObject return aNewSO._retn(); } @@ -2905,11 +2907,11 @@ Engines::ListOfIdentifiers* GEOM_Gen_i::importData( if (aFileName.rfind("/") != std::string::npos) { // remove folders from the name aFileName = aFileName.substr(aFileName.rfind("/") + 1); } + std::string anExtension(data->extension()); aFileName += "." + anExtension; // convert extension to upper case std::transform(anExtension.begin(), anExtension.end(), anExtension.begin(), ::toupper); - std::string aFullPath = aTmpDir + aFileName; Engines::TMPFile* aFileStream = data->get(); @@ -2922,16 +2924,30 @@ Engines::ListOfIdentifiers* GEOM_Gen_i::importData( aFile.write(aBuffer, aFileStream->length()); aFile.close(); - GEOM::GEOM_Object_var anObj = aInsOp->ImportFile(aFullPath.c_str(), anExtension.c_str()); - if ( !anObj->_is_nil() && aInsOp->IsDone() ) { - SALOMEDS::SObject_var aSO = PublishInStudy(aStudy, SALOMEDS::SObject::_nil(), anObj, data->name()); - aResult->length(1); + GEOM::GEOM_Object_var aShapeObj; + GEOM::ListOfGO_var aSubShape = new GEOM::ListOfGO; + GEOM::ListOfGO_var aGroups = new GEOM::ListOfGO; + GEOM::ListOfFields_var aFields = new GEOM::ListOfFields; + + CORBA::Boolean isResultOK = aInsOp->ImportXAO(aFullPath.c_str(), aShapeObj.out(), aSubShape.out(), aGroups.out(), aFields.out()); + + if ( isResultOK && !aShapeObj->_is_nil() && aInsOp->IsDone() ) { + SALOMEDS::SObject_var aSO = PublishInStudy(aStudy, SALOMEDS::SObject::_nil(), aShapeObj, aShapeObj->GetName()); + aResult->length(aGroups->length() + 1); aResult[0] = aSO->GetID(); // unioque identifer of the object in GEOM is entry of SObject - } else { - if (anObj->_is_nil()) + //Iteration for objects of the group. + for (int i = 0; i < aGroups->length(); i++) { + SALOMEDS::SObject_var aSOChild = AddInStudy(aStudy, aGroups[i], aGroups[i]->GetName(), aShapeObj); + aResult[i+1] = aSOChild->GetID(); + } + } + else { + if (aShapeObj->_is_nil()) MESSAGE("Result of the import operation is incorrect for file "<IsDone()) MESSAGE("Import operation is not done for file "<DocumentModified(studyId, false); return aResult._retn(); } @@ -2965,10 +2981,16 @@ Engines::ListOfData* GEOM_Gen_i::getModifiedData(CORBA::Long studyId) if (CORBA::is_nil(aComponent)) return aResult._retn(); SALOMEDS::ChildIterator_var anIter = aStudy->NewChildIterator(aComponent); // check only published shapes - TopoDS_Compound aResultComp; - BRep_Builder aBB; - aBB.MakeCompound(aResultComp); - int aNumInComp = 0; // number of shapes in resulting compound + + GEOM::GEOM_Object_var shapeObj; + GEOM::ListOfGO_var groups = new GEOM::ListOfGO; + GEOM::ListOfFields_var fields = new GEOM::ListOfFields; + std::string anAuthorName = "SIMAN Author"; + + GEOM::GEOM_IShapesOperations_var aShapesOp = GetIShapesOperations(aStudy->StudyId()); + GEOM::GEOM_IInsertOperations_var aInsOp = GetIInsertOperations(aStudy->StudyId()); + + int aSeqLength = 0; // the sequence length for(; anIter->More(); anIter->Next()) { SALOMEDS::SObject_var aSO = anIter->Value(); SALOMEDS::SObject_var aRefSO; @@ -2979,30 +3001,42 @@ Engines::ListOfData* GEOM_Gen_i::getModifiedData(CORBA::Long studyId) GEOM::GEOM_Object_var aCORBAMainShape = GEOM::GEOM_Object::_narrow(anObj); if(!aCORBAMainShape->_is_nil()) { CORBA::String_var entry = aCORBAMainShape->GetEntry(); - Handle(GEOM_Object) aMainShape = Handle(GEOM_Object)::DownCast( _impl->GetObject(studyId, entry) ); - if (!aMainShape.IsNull()) { - TopoDS_Shape aMainSh = aMainShape->GetValue(); - if (!aMainSh.IsNull()) { - aBB.Add(aResultComp, aMainSh); - aNumInComp++; + Handle(GEOM_Object) aMainShape = Handle(GEOM_Object)::DownCast(_impl->GetObject(studyId, entry)); + + GEOM::shape_type aCORBAShapeType = aCORBAMainShape->GetShapeType(); + if (!aMainShape.IsNull() && !(aCORBAShapeType == GEOM::VERTEX) && !(aCORBAShapeType == GEOM::EDGE)) { + aSeqLength++; + shapeObj = aCORBAMainShape; + if (aShapesOp->_is_nil()) { + MESSAGE("No shapes operations!"); + return aResult._retn(); } + groups = aShapesOp->GetExistingSubObjects(aCORBAMainShape, true); + break; } } } } } - if (aNumInComp > 0) { // compund is correct, write it to the temporary file - std::string aFullPath = Kernel_Utils::GetTmpFileName() + ".brep"; - BRepTools::Write(aResultComp, aFullPath.c_str()); - MESSAGE("Write compound of "<_is_nil()) { + MESSAGE("No insert operations!"); + return aResult._retn(); + } + + if (aSeqLength > 0) { // Shape is correct, write it to the temporary file + + std::string aFullXaoPath = Kernel_Utils::GetTmpFileName() + ".xao"; + CORBA::Boolean isResultOK = aInsOp->ExportXAO(shapeObj.in(), groups.in(), fields.in(), anAuthorName.c_str(), aFullXaoPath.c_str()); + aResult->length(1); Engines::DataContainer_var aData = (new Engines_DataContainer_i( - aFullPath.c_str(), "", "", true))->_this(); + aFullXaoPath.c_str(), "", "", true))->_this(); aResult[0] = aData; } else { MESSAGE("No shapes to export"); } - + return aResult._retn(); } diff --git a/src/GroupGUI/GroupGUI_GroupDlg.cxx b/src/GroupGUI/GroupGUI_GroupDlg.cxx index 2bb576966..31bef761a 100644 --- a/src/GroupGUI/GroupGUI_GroupDlg.cxx +++ b/src/GroupGUI/GroupGUI_GroupDlg.cxx @@ -674,10 +674,57 @@ void GroupGUI_GroupDlg::showOnlySelected() Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject (aMainEntry.in(), "GEOM", "TEMP_IO"); if (view->isVisible(io)) myIsHiddenMain = true; - } + + //keep the selected entry and IO in the map for checking + std::map aSelEntriesMap; + SALOME_ListIteratorOfListIO aSelIt(aSelList); + for ( ; aSelIt.More(); aSelIt.Next() ) { + Handle(SALOME_InteractiveObject) anSelIO = aSelIt.Value(); + aSelEntriesMap[anSelIO->getEntry()] = anSelIO; + } + //get the displayed sub-shapes + SALOME_ListIO displayed; + view->GetVisible(displayed); + // Erase all, except the selected sub-shapes + std::map::iterator + aSelDispIter = aSelEntriesMap.end(); + SALOME_ListIteratorOfListIO aDispIt( displayed ); + for ( ; aDispIt.More(); aDispIt.Next() ) { + Handle(SALOME_InteractiveObject) anIO = aDispIt.Value(); + aSelDispIter = aSelEntriesMap.find( anIO->getEntry() ); + if ( aSelDispIter != aSelEntriesMap.end() ) { + //sub-shape is selected, so erase it's record from map to keep in it not displayed, but selected sub-shapes only + aSelEntriesMap.erase(aSelDispIter); + } else { + //sub-shape is not in the map of selected, then erase it from view + aDisplayer->Erase( anIO, /*forced = */false, /*updateViewer = */false ); + } + } + + if ( !aSelEntriesMap.empty() ) { + // Build a presentation of the selected, but not displayed sub-shapes + TopoDS_Shape aMainShape = GEOM_Client::get_client().GetShape(GeometryGUI::GetGeomGen(), myMainObj); + TopTools_IndexedMapOfShape aSubShapesMap; + TopExp::MapShapes(aMainShape, aSubShapesMap); + QString anEntryBase = aMainEntry.in(); - aDisplayer->EraseAll(/*forced = false, updateViewer = true*/); - aDisplayer->Display(aSelList, true); + TopExp_Explorer anExp (aMainShape, getShapeType()); + for (; anExp.More(); anExp.Next()) { + TopoDS_Shape aSubShape = anExp.Current(); + int index = aSubShapesMap.FindIndex(aSubShape); + QString anEntry = QString( "TEMP_" ) + anEntryBase + QString("_%1").arg(index); + if ( aSelEntriesMap.find( anEntry ) == aSelEntriesMap.end() ) { + //skip not selected sub-shapes + continue; + } + SALOME_Prs* aPrs = aDisplayer->buildSubshapePresentation(aSubShape, anEntry, view); + if (aPrs) { + displayPreview(aPrs, true, false); // append, do not update + } + } + } + aDisplayer->UpdateViewer(); + } // Mantis issue 0021421: do not hide main shape, if explode on VERTEX if (getShapeType() == TopAbs_VERTEX && myIsHiddenMain) { diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx index afb373a9d..8dfeeea01 100644 --- a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx @@ -347,7 +347,7 @@ SALOME_Prs* MeasureGUI_AngleDlg::buildPrs() gce_MakePln gce_MP(aP11, aP12, aP3); Handle(Geom_Plane) aPlane = new Geom_Plane(gce_MP.Value()); - Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension( anEdge1, anEdge2, aPlane->Pln() ); + Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension( anEdge1, anEdge2 ); Handle(Prs3d_DimensionAspect) aDimensionStyle = new Prs3d_DimensionAspect; diff --git a/src/OBJECT/GEOM_Constants.cxx b/src/OBJECT/GEOM_Constants.cxx index 95a5840c2..8b89a773f 100644 --- a/src/OBJECT/GEOM_Constants.cxx +++ b/src/OBJECT/GEOM_Constants.cxx @@ -95,6 +95,8 @@ namespace GEOM "IsosColor", // - // outlines color "OutlineColor", // - + // texture + "Texture", // - }; return ( type >= GEOM::Visibility && type <= GEOM::LastProperty ) ? names[type] : QString(); } diff --git a/src/OBJECT/GEOM_Constants.h b/src/OBJECT/GEOM_Constants.h index 19b0c514f..aee0709b4 100644 --- a/src/OBJECT/GEOM_Constants.h +++ b/src/OBJECT/GEOM_Constants.h @@ -54,7 +54,8 @@ namespace GEOM PointColor, IsosColor, OutlineColor, - LastProperty = OutlineColor, + Texture, + LastProperty = Texture, }; GEOM_OBJECT_EXPORT double minDeflection(); diff --git a/src/ShapeRecognition/ShapeRec_FeatureDetector.cxx b/src/ShapeRecognition/ShapeRec_FeatureDetector.cxx index b452a9c67..2bf97cb55 100644 --- a/src/ShapeRecognition/ShapeRec_FeatureDetector.cxx +++ b/src/ShapeRecognition/ShapeRec_FeatureDetector.cxx @@ -59,14 +59,16 @@ void ShapeRec_FeatureDetector::SetPath( const std::string& thePath ) { IplImage* src = cvLoadImage(imagePath.c_str(),CV_LOAD_IMAGE_COLOR); imgHeight = src->height; - imgWidth = src->width; + imgWidth = src->width; + cvReleaseImage(&src); } } /*! Computes the corners of the image located at imagePath */ -void ShapeRec_FeatureDetector::ComputeCorners( bool useROI, ShapeRec_Parameters* parameters ){ +void ShapeRec_FeatureDetector::ComputeCorners( bool useROI, ShapeRec_Parameters* parameters ) +{ ShapeRec_CornersParameters* aCornersParameters = dynamic_cast( parameters ); if ( !aCornersParameters ) aCornersParameters = new ShapeRec_CornersParameters(); @@ -105,8 +107,8 @@ void ShapeRec_FeatureDetector::ComputeCorners( bool useROI, ShapeRec_Parameters* /*! Computes the contours of the image located at imagePath */ -bool ShapeRec_FeatureDetector::ComputeContours( bool useROI, ShapeRec_Parameters* parameters ){ - +bool ShapeRec_FeatureDetector::ComputeContours( bool useROI, ShapeRec_Parameters* parameters ) +{ // Initialising images cv::Mat src, src_gray; cv::Mat detected_edges; @@ -135,40 +137,44 @@ bool ShapeRec_FeatureDetector::ComputeContours( bool useROI, ShapeRec_Parameters } else //COLORFILTER { - IplImage* find_image = cvLoadImage(imagePath.c_str(),CV_LOAD_IMAGE_COLOR); + // Load the input image where we want to detect contours + IplImage* input_image = cvLoadImage(imagePath.c_str(),CV_LOAD_IMAGE_COLOR); ShapeRec_ColorFilterParameters* aColorFilterParameters = dynamic_cast( parameters ); if ( !aColorFilterParameters ) aColorFilterParameters = new ShapeRec_ColorFilterParameters(); // Reduce noise - cvSmooth( find_image, find_image, CV_GAUSSIAN, aColorFilterParameters->smoothSize, aColorFilterParameters->smoothSize ); + cvSmooth( input_image, input_image, CV_GAUSSIAN, aColorFilterParameters->smoothSize, aColorFilterParameters->smoothSize ); - // Crop the image to build an histogram from the selected part - cvSetImageROI(find_image, rect); - IplImage* test_image = cvCreateImage(cvGetSize(find_image), - find_image->depth, - find_image->nChannels); - cvCopy(find_image, test_image, NULL); - cvResetImageROI(find_image); + // Crop the image to the selected part only (sample_image) + cvSetImageROI(input_image, rect); + IplImage* sample_image = cvCreateImage(cvGetSize(input_image), + input_image->depth, + input_image->nChannels); + cvCopy(input_image, sample_image, NULL); + cvResetImageROI(input_image); - IplImage* test_hsv = cvCreateImage(cvGetSize(test_image),8,3); - IplImage* h_plane = cvCreateImage( cvGetSize(test_image), 8, 1 ); - IplImage* s_plane = cvCreateImage( cvGetSize(test_image), 8, 1 ); - CvHistogram* hist; + IplImage* sample_hsv = cvCreateImage( cvGetSize(sample_image),8,3 ); + IplImage* sample_h_plane = cvCreateImage( cvGetSize(sample_image), 8, 1 ); + IplImage* sample_s_plane = cvCreateImage( cvGetSize(sample_image), 8, 1 ); + CvHistogram* sample_hist; - cvCvtColor(test_image, test_hsv, CV_BGR2HSV); + cvCvtColor(sample_image, sample_hsv, CV_BGR2HSV); - cvCvtPixToPlane(test_hsv, h_plane, s_plane, 0, 0); - IplImage* planes[] = { h_plane, s_plane }; + cvCvtPixToPlane(sample_hsv, sample_h_plane, sample_s_plane, 0, 0); + IplImage* sample_planes[] = { sample_h_plane, sample_s_plane }; - //create hist + // Create the hue / saturation histogram of the SAMPLE image. + // This histogramm will be representative of what is the zone + // we want to find the frontier of. Indeed, the sample image is meant to + // be representative of this zone float hranges[] = { 0, 180 }; float sranges[] = { 0, 256 }; float* ranges[] = { hranges, sranges }; - hist = cvCreateHist( 2, aColorFilterParameters->histSize, aColorFilterParameters->histType, ranges ); + sample_hist = cvCreateHist( 2, aColorFilterParameters->histSize, aColorFilterParameters->histType, ranges ); //calculate hue /saturation histogram - cvCalcHist(planes, hist, 0 ,0); + cvCalcHist(sample_planes, sample_hist, 0 ,0); // // TEST print of the histogram for debugging // IplImage* hist_image = cvCreateImage(cvSize(320,300),8,3); @@ -194,18 +200,37 @@ bool ShapeRec_FeatureDetector::ComputeContours( bool useROI, ShapeRec_Parameters // cvNamedWindow("hist", 1); cvShowImage("hist",hist_image); - //calculate back projection of hue and saturation planes of input image - IplImage* backproject = cvCreateImage(cvGetSize(test_image), 8, 1); - IplImage* binary_backproject = cvCreateImage(cvGetSize(test_image), 8, 1); - cvCalcBackProject(planes, backproject, hist); + // Calculate the back projection of hue and saturation planes of the INPUT image + // by mean of the histogram of the SAMPLE image. + // + // The pixels which (h,s) coordinates correspond to high values in the histogram + // will have high values in the grey image result. It means that a pixel of the INPUT image + // which is more probably in the zone represented by the SAMPLE image, will be whiter + // in the back projection. + IplImage* backproject = cvCreateImage(cvGetSize(input_image), 8, 1); + IplImage* binary_backproject = cvCreateImage(cvGetSize(input_image), 8, 1); + IplImage* input_hsv = cvCreateImage(cvGetSize(input_image),8,3); + IplImage* input_hplane = cvCreateImage(cvGetSize(input_image),8,1); + IplImage* input_splane = cvCreateImage(cvGetSize(input_image),8,1); - // Threshold in order to obtain binary image + // Get hue and saturation planes of the INPUT image + cvCvtColor(input_image, input_hsv, CV_BGR2HSV); + cvCvtPixToPlane(input_hsv, input_hplane, input_splane, 0, 0); + IplImage* input_planes[] = { input_hplane, input_splane }; + + // Compute the back projection + cvCalcBackProject(input_planes, backproject, sample_hist); + + // Threshold in order to obtain a binary image cvThreshold(backproject, binary_backproject, aColorFilterParameters->threshold, aColorFilterParameters->maxThreshold, CV_THRESH_BINARY); - cvReleaseImage(&test_image); - cvReleaseImage(&test_hsv); - cvReleaseImage(&h_plane); - cvReleaseImage(&s_plane); - cvReleaseImage(&find_image); + cvReleaseImage(&sample_image); + cvReleaseImage(&sample_hsv); + cvReleaseImage(&sample_h_plane); + cvReleaseImage(&sample_s_plane); + cvReleaseImage(&input_image); + cvReleaseImage(&input_hsv); + cvReleaseImage(&input_hplane); + cvReleaseImage(&input_splane); cvReleaseImage(&backproject); detected_edges = cv::Mat(binary_backproject); @@ -218,7 +243,7 @@ bool ShapeRec_FeatureDetector::ComputeContours( bool useROI, ShapeRec_Parameters // _detectAndRetrieveContours( detected_edges, parameters->findContoursMethod ); detected_edges = detected_edges > 1; - findContours( detected_edges, contours, hierarchy, CV_RETR_CCOMP, parameters->findContoursMethod, useROI ? cvPoint(rect.x,rect.y) : cvPoint(0,0) ); + findContours( detected_edges, contours, hierarchy, CV_RETR_CCOMP, parameters->findContoursMethod); return true; @@ -269,6 +294,9 @@ std::string ShapeRec_FeatureDetector::CroppImage() cvSaveImage ("/tmp/cropped_image.bmp", cropped_image); + cvReleaseImage(&src); + cvReleaseImage(&cropped_image); + return "/tmp/cropped_image.bmp"; } diff --git a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx index 8c8e3cbe4..fa4fa14b6 100644 --- a/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx @@ -174,11 +174,11 @@ void TransformationGUI_MultiRotationDlg::ConstructorsClicked (int constructorId) { disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); - myBase.nullify(); - myVector.nullify(); + //myBase.nullify(); + //myVector.nullify(); - GroupArgs->LineEdit1->setText(""); - GroupArgs->LineEdit2->setText(""); + //GroupArgs->LineEdit1->setText(""); + //GroupArgs->LineEdit2->setText(""); GroupArgs->SpinBox_DX1->setValue(myAng); GroupArgs->SpinBox_DY1->setValue(myNbTimes1); @@ -275,7 +275,8 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument() // angular step double diag = sqrt((Xmax-Xmin)*(Xmax-Xmin) + (Ymax-Ymin)*(Ymax-Ymin)); double d = sqrt((0.5*(Xmax+Xmin))*(0.5*(Xmax+Xmin)) + (0.5*(Ymax+Ymin))*(0.5*(Ymax+Ymin))); - myAng = floor(2.0 * atan(diag/d) * 180.0 / M_PI); + if ( fabs(d) > 1.e-16 ) + myAng = floor(2.0 * atan(diag/d) * 180.0 / M_PI); GroupArgs->SpinBox_DX1->setValue(myAng); // radial step @@ -293,10 +294,10 @@ void TransformationGUI_MultiRotationDlg::SelectionIntoArgument() } // clear selection - disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), - this, SLOT(SelectionIntoArgument())); + // disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + // myGeomGUI->getApp()->selectionMgr()->clearSelected(); + // connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + // this, SLOT(SelectionIntoArgument())); } else { if ( myEditCurrentArgument == GroupArgs->LineEdit1 ) diff --git a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx index 286e2dc00..1cb934f8a 100644 --- a/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx +++ b/src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx @@ -239,15 +239,21 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked (int constructor GroupDimensions->hide(); GroupPoints->show(); - GroupPoints->LineEdit1->setText(""); - GroupPoints->LineEdit2->setText(""); - myBase.nullify(); - myVectorU.nullify(); + //GroupPoints->LineEdit1->setText(""); + //GroupPoints->LineEdit2->setText(""); + //myBase.nullify(); + //myVectorU.nullify(); + + if ( myBase ) GroupDimensions->LineEdit1->setText( GEOMBase::GetName( myBase.get() ) ); + if ( myVectorU ) GroupDimensions->LineEdit2->setText( GEOMBase::GetName( myVectorU.get() ) ); GroupPoints->SpinBox_DX->setValue(myStepU); GroupPoints->SpinBox_DY->setValue(myNbTimesU); - GroupPoints->PushButton1->click(); + if ( !myBase ) + GroupPoints->PushButton1->click(); + else if ( !myVectorU ) + GroupPoints->PushButton2->click(); break; } case 1: // Translate double @@ -255,19 +261,28 @@ void TransformationGUI_MultiTranslationDlg::ConstructorsClicked (int constructor GroupPoints->hide(); GroupDimensions->show(); - GroupDimensions->LineEdit1->setText(""); - GroupDimensions->LineEdit2->setText(""); - GroupDimensions->LineEdit3->setText(""); - myBase.nullify(); - myVectorU.nullify(); - myVectorV.nullify(); + //GroupDimensions->LineEdit1->setText(""); + //GroupDimensions->LineEdit2->setText(""); + //GroupDimensions->LineEdit3->setText(""); + //myBase.nullify(); + //myVectorU.nullify(); + //myVectorV.nullify(); + + if ( myBase ) GroupDimensions->LineEdit1->setText( GEOMBase::GetName( myBase.get() ) ); + if ( myVectorU ) GroupDimensions->LineEdit2->setText( GEOMBase::GetName( myVectorU.get() ) ); + if ( myVectorV ) GroupDimensions->LineEdit3->setText( GEOMBase::GetName( myVectorV.get() ) ); GroupDimensions->SpinBox_DX1->setValue(myStepU); GroupDimensions->SpinBox_DY1->setValue(myNbTimesU); GroupDimensions->SpinBox_DX2->setValue(myStepV); GroupDimensions->SpinBox_DY2->setValue(myNbTimesV); - GroupDimensions->PushButton1->click(); + if ( !myBase ) + GroupDimensions->PushButton1->click(); + else if ( !myVectorU ) + GroupDimensions->PushButton2->click(); + else if ( !myVectorV ) + GroupDimensions->PushButton3->click(); break; } } @@ -329,7 +344,7 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() QString aName = GEOMBase::GetName( aSelectedObject.get() ); myEditCurrentArgument->setText( aName ); - if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) { + if ( myEditCurrentArgument == GroupPoints->LineEdit1 || myEditCurrentArgument == GroupDimensions->LineEdit1 ) { myBase = aSelectedObject; // recompute myStepU (Mantis issue 0021718) @@ -338,36 +353,26 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax); if (anOper->IsDone()) { myStepU = floor(1.5 * (Xmax - Xmin)); + myStepV = floor(1.5 * (Ymax - Ymin)); GroupPoints->SpinBox_DX->setValue(myStepU); + GroupDimensions->SpinBox_DX1->setValue(myStepU); + GroupDimensions->SpinBox_DX2->setValue(myStepV); } - if (!myVectorU) + if ( myEditCurrentArgument == GroupPoints->LineEdit1 && !myVectorU ) GroupPoints->PushButton2->click(); + if ( myEditCurrentArgument == GroupDimensions->LineEdit1 ) { + if ( !myVectorU ) + GroupDimensions->PushButton2->click(); + else if ( !myVectorV ) + GroupDimensions->PushButton3->click(); + } } else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) { myVectorU = aSelectedObject; if ( !myBase ) GroupPoints->PushButton1->click(); } - else if ( myEditCurrentArgument == GroupDimensions->LineEdit1 ) { - myBase = aSelectedObject; - - // recompute myStepU and myStepV (Mantis issue 0021718) - GEOM::GEOM_IMeasureOperations_var anOper = getGeomEngine()->GetIMeasureOperations(getStudyId()); - double Xmin, Xmax, Ymin, Ymax, Zmin, Zmax; - anOper->GetBoundingBox(myBase.get(), true, Xmin, Xmax, Ymin, Ymax, Zmin, Zmax); - if (anOper->IsDone()) { - myStepU = floor(1.5 * (Xmax - Xmin)); - myStepV = floor(1.5 * (Ymax - Ymin)); - GroupDimensions->SpinBox_DX1->setValue(myStepU); - GroupDimensions->SpinBox_DX2->setValue(myStepV); - } - - if ( !myVectorU ) - GroupDimensions->PushButton2->click(); - else if ( !myVectorV ) - GroupDimensions->PushButton3->click(); - } else if ( myEditCurrentArgument == GroupDimensions->LineEdit2 ) { myVectorU = aSelectedObject; if ( !myVectorV ) @@ -384,10 +389,10 @@ void TransformationGUI_MultiTranslationDlg::SelectionIntoArgument() } // clear selection - disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); - myGeomGUI->getApp()->selectionMgr()->clearSelected(); - connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), - this, SLOT(SelectionIntoArgument())); + // disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + // myGeomGUI->getApp()->selectionMgr()->clearSelected(); + // connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + // this, SLOT(SelectionIntoArgument())); } else { if ( myEditCurrentArgument == GroupPoints->LineEdit1 || @@ -668,8 +673,8 @@ bool TransformationGUI_MultiTranslationDlg::execute (ObjectList& objects) createPathPreview(myVectorU.get()); createPathPreview(myVectorV.get()); anObj = anOper->MultiTranslate2D(myBase.get(), - myVectorU.get(), myStepU, myNbTimesU, - myVectorV.get(), myStepV, myNbTimesV); + myVectorU.get(), myStepU, myNbTimesU, + myVectorV.get(), myStepV, myNbTimesV); if (!IsPreview()) { aParameters << GroupDimensions->SpinBox_DX1->text(); aParameters << GroupDimensions->SpinBox_DY1->text(); @@ -743,10 +748,11 @@ void TransformationGUI_MultiTranslationDlg::createPathPreview ( GEOM::GEOM_Objec ShapeAnalysis_Edge aShapeAnal; TopoDS_Vertex aFirst = aShapeAnal.FirstVertex( anEdge ); TopoDS_Vertex aLast = aShapeAnal.LastVertex( anEdge ); + if ( BRep_Tool::Pnt(aFirst).IsEqual( BRep_Tool::Pnt(aLast), Precision::Confusion() ) ) return; TopoDS_Shape aVector = BRepBuilderAPI_MakeEdge(BRep_Tool::Pnt(aFirst), BRep_Tool::Pnt(aLast)).Shape(); const char* aName = "tmpVector"; Handle(GEOM_AISVector) anIO = new GEOM_AISVector( aVector, aName ); - + // add Prs to preview SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); SOCC_Prs* aPrs = dynamic_cast(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0)); diff --git a/src/XAO/tests/CMakeLists.txt b/src/XAO/tests/CMakeLists.txt index 9a1a748e8..79355ed77 100644 --- a/src/XAO/tests/CMakeLists.txt +++ b/src/XAO/tests/CMakeLists.txt @@ -55,7 +55,10 @@ SET(TestXAO_SOURCES ADD_EXECUTABLE(TestXAO ${TestXAO_SOURCES}) TARGET_LINK_LIBRARIES(TestXAO ${_link_LIBRARIES}) + +SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) + ADD_TEST(TestXAO TestXAO) -SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR}") +SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR};${tests_env}") INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS}) diff --git a/src/XAO/tests/TestUtils.hxx b/src/XAO/tests/TestUtils.hxx index 83e343680..1221c9582 100644 --- a/src/XAO/tests/TestUtils.hxx +++ b/src/XAO/tests/TestUtils.hxx @@ -25,8 +25,9 @@ namespace XAO rstr.seekg(0, rstr.end); // go to the end length = rstr.tellg(); // report location (this is the length) rstr.seekg(0, rstr.beg); // go back to the beginning - char* txt = new char[length]; // allocate memory for a buffer of appropriate dimension + char* txt = new char[length+1]; // allocate memory for a buffer of appropriate dimension rstr.read(txt, length); // read the whole file into the buffer + txt[length] = '\0'; rstr.close(); return txt;