From c5b48863477a4b61112dd7cd19add8e065931a51 Mon Sep 17 00:00:00 2001 From: maintenance team Date: Mon, 29 Oct 2007 08:34:41 +0000 Subject: [PATCH] Common update for Salome series4x --- .../input/add_point_on_edge_operation.doc | 6 +- .../gui/GEOM/input/building_by_blocks.doc | 6 +- .../input/change_orientation_operation.doc | 8 +- .../input/check_free_boundaries_operation.doc | 6 +- .../GEOM/input/check_free_faces_operation.doc | 8 +- .../gui/GEOM/input/common_operation.doc | 4 +- doc/salome/gui/GEOM/input/creating_arc.doc | 5 +- doc/salome/gui/GEOM/input/creating_circle.doc | 14 +- doc/salome/gui/GEOM/input/creating_cone.doc | 5 +- .../gui/GEOM/input/creating_explode.doc | 4 +- .../gui/GEOM/input/creating_extrusion.doc | 8 +- .../input/creating_extrusion_alongpath.doc | 12 +- doc/salome/gui/GEOM/input/creating_face.doc | 24 +-- .../gui/GEOM/input/creating_filling.doc | 6 +- doc/salome/gui/GEOM/input/creating_plane.doc | 6 +- doc/salome/gui/GEOM/input/creating_point.doc | 4 +- .../gui/GEOM/input/creating_revolution.doc | 6 +- .../gui/GEOM/input/creating_sketcher.doc | 13 +- doc/salome/gui/GEOM/input/creating_solid.doc | 4 +- doc/salome/gui/GEOM/input/creating_wplane.doc | 4 +- doc/salome/gui/GEOM/input/cut_operation.doc | 4 +- .../gui/GEOM/input/fillet_operation.doc | 6 +- doc/salome/gui/GEOM/input/fuse_operation.doc | 4 +- .../gui/GEOM/input/glue_faces_operation.doc | 6 +- .../gui/GEOM/input/mirror_operation.doc | 8 +- .../GEOM/input/modify_location_operation.doc | 16 +- .../GEOM/input/multi_rotation_operation.doc | 8 +- .../input/multi_translation_operation.doc | 11 +- .../gui/GEOM/input/offset_operation.doc | 6 +- .../gui/GEOM/input/repairing_operations.doc | 4 +- .../gui/GEOM/input/rotation_operation.doc | 4 +- .../gui/GEOM/input/section_operation.doc | 4 +- .../gui/GEOM/input/sewing_operation.doc | 6 +- .../GEOM/input/shape_processing_operation.doc | 6 +- .../GEOM/input/suppress_holes_operation.doc | 10 +- .../suppress_internal_wires_operation.doc | 12 +- .../gui/GEOM/input/translation_operation.doc | 8 +- .../gui/GEOM/input/tui_measurement_tools.doc | 181 +++++++++++++++++- .../GEOM/input/tui_repairing_operations.doc | 134 +------------ .../GEOM/input/using_boolean_operations.doc | 18 +- .../GEOM/input/using_measurement_tools.doc | 60 +++++- .../gui/GEOM/input/viewing_geom_obj.doc | 12 +- .../gui/GEOM/input/working_with_groups.doc | 4 +- 43 files changed, 403 insertions(+), 282 deletions(-) diff --git a/doc/salome/gui/GEOM/input/add_point_on_edge_operation.doc b/doc/salome/gui/GEOM/input/add_point_on_edge_operation.doc index 1c4d4aee1..00951bcd0 100644 --- a/doc/salome/gui/GEOM/input/add_point_on_edge_operation.doc +++ b/doc/salome/gui/GEOM/input/add_point_on_edge_operation.doc @@ -17,8 +17,8 @@ IsByParameter), where \em Shape is a shape which contains an edge to be divided, \em EdgeID is the ID of the edge to be divided, if it = -1, then Shape is an edge, \em Value is a paramter on the edge or a length. \em IsByParameter if it is True then Value is the edge parameter -in the range [0:1] otherwise it is a length of the edge in the range -[0:1] +in the range [0:1] otherwise it is a part of the length of the edge in the range +[0: full length of the edge] \n Arguments: Name + 1 Edge + 1 value setting the position of the point according to one of the selected modes. @@ -33,4 +33,4 @@ the point according to one of the selected modes. Our TUI Scripts provide you with useful examples of the use of \ref tui_add_point_on_edge "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/building_by_blocks.doc b/doc/salome/gui/GEOM/input/building_by_blocks.doc index 2a64e031e..d3964eca2 100644 --- a/doc/salome/gui/GEOM/input/building_by_blocks.doc +++ b/doc/salome/gui/GEOM/input/building_by_blocks.doc @@ -98,15 +98,19 @@ automatically. \image html block4.png + + \image html block5.png \n Example: \image html image180.jpg +
Hexahedral Solid built on the base of six Faces
\image html image181.jpg +
Hexahedral Solid built on the base of two Faces
Our TUI Scripts provide you with useful examples of \ref tui_building_by_blocks_page "Building by Blocks". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/change_orientation_operation.doc b/doc/salome/gui/GEOM/input/change_orientation_operation.doc index 4fd3cecbe..ecb01031c 100644 --- a/doc/salome/gui/GEOM/input/change_orientation_operation.doc +++ b/doc/salome/gui/GEOM/input/change_orientation_operation.doc @@ -3,11 +3,11 @@ \page change_orientation_operation_page Change Orientation \n To Change Orientation in the Main Menu select Repair - > Change Orientation. -\n This operation reverses the normals of faces composing the selected -shell. +\n This operation reverses the normals of selected faces or the normal +of faces composing composing the selected opened shell. \n TUI Command: geompy.ChangeOrientation(shape) -\n Arguments: Name + 1 shape (shell) +\n Arguments: Name + one or several objects (face(s)), opened shell(s). \n Uncheck Create a copy checkbox if you don't wish to leave the initial object in the project (Result name field will be locked). @@ -22,4 +22,4 @@ locked). \image html image40.gif
Outward orientation
-*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc b/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc index 0389db144..f586dde4a 100644 --- a/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc +++ b/doc/salome/gui/GEOM/input/check_free_boundaries_operation.doc @@ -4,8 +4,8 @@ \n To Check Free Boundaries in the Main Menu select Repair - > Check Free Boundaries. -\n This operation detects wires and edges that correspond to the -shape's boundary, and highlights it. +\n This operation detects wires and edges that are not shared between +two faces and are considered a shape's boundary. This control highlights them. \n The \b Result will be a \b GEOM_Object. @@ -26,4 +26,4 @@ boundaries, \em ClosedWires is a list of closed free boundary wires, Our TUI Scripts provide you with useful examples of the use of \ref tui_check_free_boundaries "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/check_free_faces_operation.doc b/doc/salome/gui/GEOM/input/check_free_faces_operation.doc index b2a42704a..acf9d5428 100644 --- a/doc/salome/gui/GEOM/input/check_free_faces_operation.doc +++ b/doc/salome/gui/GEOM/input/check_free_faces_operation.doc @@ -3,8 +3,10 @@ \page check_free_faces_operation_page Check Free Faces \n To Check Free Faces in the Main Menu select Repair - > Check Free Faces. -\n This operation retrieves all free faces from a given shape. A free -face is a face not shared between two shells of the shape. +\n This operation highlights all free faces from a given shape. A free +face is a face which is not shared between two objects of the shape. + +\n \b NOTE: This functionality works only in VTK viewer. \n The \b Result will be a \b GEOM_Object (a list of IDs of all free faces, containing in the shape). @@ -22,4 +24,4 @@ a shape to be checked. Our TUI Scripts provide you with useful examples of the use of \ref tui_check_free_faces "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/common_operation.doc b/doc/salome/gui/GEOM/input/common_operation.doc index ec9c96b2d..21cd27749 100644 --- a/doc/salome/gui/GEOM/input/common_operation.doc +++ b/doc/salome/gui/GEOM/input/common_operation.doc @@ -6,7 +6,7 @@ \n This operation cuts the common part of two shapes and transforms it into an independent geometrical object. -\n The \b Result will be a \b GEOM_Object (COMPOUND). +\n The \b Result will be any \b GEOM_Object. \n TUI Command: geompy.MakeCommon(s1, s2) \n Arguments: Name + 2 shapes. @@ -21,4 +21,4 @@ Our TUI Scripts provide you with useful examples of the use of \ref tui_common "Boolean Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_arc.doc b/doc/salome/gui/GEOM/input/creating_arc.doc index 78b2bd99d..8ee49ca23 100644 --- a/doc/salome/gui/GEOM/input/creating_arc.doc +++ b/doc/salome/gui/GEOM/input/creating_arc.doc @@ -40,7 +40,4 @@ Point, End Point, boolean Sense) \image html arcsn2.png
Reversed arc.
-Our TUI Scripts provide you with useful examples of creation of -\ref tui_basic_geom_objs_page "Basic Geometric Objects". - -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_circle.doc b/doc/salome/gui/GEOM/input/creating_circle.doc index 017b1b6f6..153c61005 100644 --- a/doc/salome/gui/GEOM/input/creating_circle.doc +++ b/doc/salome/gui/GEOM/input/creating_circle.doc @@ -5,7 +5,7 @@ To create a \b Circle in the Main Menu select New Entity - > Basic - > Circle -\n There are 2 algorithms to create a \b Circle in the 3D space. +\n There are 3 algorithms to create a \b Circle in the 3D space. \n The \b Result of each operation will be a GEOM_Object (edge). \n Firstly, you can define a \b Circle by a Center Point, a \b @@ -26,7 +26,17 @@ the direction) + Radius. Example: \image html circles.png +\n Finally, you can define a circle by a Center Point and two +\b Points. +\n TUI Command: geompy.MakeCircleCenter2Pnt(Point1, Point2, +Point3), where Point1 is the center of the circle, the distance +between point1 and Point2 is the radius of the circle and Point3 helps +to define the plane where the circle lies. +\n Arguments: Name + 3 points. + +\image html circle3.png + Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_circle "Basic Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_cone.doc b/doc/salome/gui/GEOM/input/creating_cone.doc index 8af95ebf8..827db860f 100644 --- a/doc/salome/gui/GEOM/input/creating_cone.doc +++ b/doc/salome/gui/GEOM/input/creating_cone.doc @@ -12,7 +12,8 @@ \n Firstly, you can define a \b Cone by the Base Point (the central point of the cone base), the \b Axis, the \b Height and the first and the second \b Radiuses. -\n TUI Command: geompy.MakeCone(Point, Axis, Radius1, Radius2) +\n TUI Command: geompy.MakeCone(Point, Axis, Radius1, +Radius2, height) \n Arguments: Name + 1 vertex + 1 vector (for direction) + 3 values (Radius of the base part, radius of the upper part, height). @@ -37,4 +38,4 @@ the radiuses are equal, a \b Cylinder will be created instead. Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_cone "Primitives". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_explode.doc b/doc/salome/gui/GEOM/input/creating_explode.doc index e22142872..515978e33 100644 --- a/doc/salome/gui/GEOM/input/creating_explode.doc +++ b/doc/salome/gui/GEOM/input/creating_explode.doc @@ -10,7 +10,7 @@ given shape using the \b Explode operation, you need to define the Main Object, which will be exploded and the Type of Subshapes you wish to obtain from it. \n The \b Result of the operation will be a List of \b GEOM_Objects -(edges, faces, solids or compsolids). +(vertexes, edges, wires, faces, shells or solids). \n Using TUI Commands you can perform this operation in a variety of ways: @@ -40,4 +40,4 @@ the range [1, Nb_Sub-Shapes_Of_Given_Type] \image html neo-obj1.png -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_extrusion.doc b/doc/salome/gui/GEOM/input/creating_extrusion.doc index 355962d18..4b2c0ac0c 100644 --- a/doc/salome/gui/GEOM/input/creating_extrusion.doc +++ b/doc/salome/gui/GEOM/input/creating_extrusion.doc @@ -6,14 +6,14 @@ select New Entity - > Generation - > Extrusion \n There are 2 algorithms for creation of an \b Extrusion (Prism). -\n The \b Result of the operation will be a GEOM_Object (edge, face, +\n The \b Result of the operation will be a GEOM_Object (edge, face, shell solid or compsolid). \n Firstly, you can define the Base Shape (a basis of the extrusion), the \b Vector (a direction of the extrusion) and the \b Height of extrusion. \b TUI Command: geompy.MakePrismVecH(Base, Vector, Height) -\n Arguments: Name + 1 shape (vertex, edge, wire, face or +\n Arguments: Name + 1 shape (vertex, edge, planar wire, face or shell) serving as base object + 1 vector (for direction of the extrusion) + 1 value (dimension). @@ -23,7 +23,7 @@ extrusion) + 1 value (dimension). and the \b Start and End Point of the \b Vector (in this way you don't need to create it in advance). \n TUI Command: geompy.MakePrism(Base, Point1, Point2) -\n Arguments: Name + 1 shape (vertex, edge, wire, face or +\n Arguments: Name + 1 shape (vertex, edge, planar wire, face or shell) serving as base object + 2 vertices. \image html extrusion2.png @@ -39,4 +39,4 @@ shell) serving as base object + 2 vertices. Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_prism "Complex Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_extrusion_alongpath.doc b/doc/salome/gui/GEOM/input/creating_extrusion_alongpath.doc index 1180d7d99..77e453170 100644 --- a/doc/salome/gui/GEOM/input/creating_extrusion_alongpath.doc +++ b/doc/salome/gui/GEOM/input/creating_extrusion_alongpath.doc @@ -5,15 +5,15 @@ To generate a \b Pipe in the Main Menu select New Entity - > Generation - > Extrusion along a path \n To create an extruded \b Pipe shape, you need to define the Base -Object (vertex, edge, wire, face or shell), which will be extruded -and the Path Object (edge, face or shell) along which the Base +Object (vertex, edge, planar wire, face or shell), which will be extruded +and the Path Object (edge or wire) along which the Base Object will be extruded. -\n The \b Result of the operation will be a GEOM_Object (edge, face, +\n The \b Result of the operation will be a GEOM_Object (edge, face, shell, solid or compsolid). \n TUI Command: geompy.MakePipe(baseShape, pathShape) -\n Arguments: Name + 1 shape (vertex, edge, wire, face or -shell) serving as base object + 1 shape (edge, face or shell) for +\n Arguments: Name + 1 shape (vertex, edge, planar wire, face or +shell) serving as base object + 1 shape (edge or wire) for definition of the path. \image html pipe.png @@ -27,4 +27,4 @@ definition of the path. Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_pipe "Complex Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_face.doc b/doc/salome/gui/GEOM/input/creating_face.doc index 9b4ff9f8f..bdf6164f8 100644 --- a/doc/salome/gui/GEOM/input/creating_face.doc +++ b/doc/salome/gui/GEOM/input/creating_face.doc @@ -5,23 +5,25 @@ To create a \b Face in the Main Menu select New Entity - > Build - > Face -\n To create a \b Face you need to select a wire, whose elements will -be connected so that the surface of the resulting object was -minimal. Check Try to create a planar face to create a planar +\n To create a \b Face you need to select input shape(s). The list of +input shapes can include shapes of any type; if the shapes are nor +wires or edges, the algorithm extracts all edges from +the input shapes and works on the obtaineed edges. +\n The edges and wires do not necessarily have to be closed, the +algorithm automatically builds a wire of maximum length from all +given edges and wires. If it founds multiple closed wires, it can +build a face with holes or some separate faces, depending on the +placement of the wires. If some resulting wires remain open, they will +be added in the resulting compound "as is". +\n Check Try to create a planar face to create a planar face or nothing if it is impossible. \n The \b Result will be a \b GEOM_Object (FACE). -\n TUI Command: geompy.MakeFace(Wire, isPlanarWanted) +\n TUI Command: geompy.MakeFaceWires([list of Shapes], isPlanarWanted) \n Arguments: Name + 1 wire. \image html neo-obj4.png -There are some advanced possibilities accessible only via TUI -commands: - -geompy.MakeFaceWires(Wires, isPlanarWanted) - Creates a face on the given wires set. The argument is not a single wire, but a list of wires. -geompy.MakeFaces(Wires, isPlanarWanted) is a shortcut to MakeFaceWires(). - \n Example: \image html facesn1.png @@ -33,4 +35,4 @@ commands: Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_face "Advanced Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_filling.doc b/doc/salome/gui/GEOM/input/creating_filling.doc index a79311382..25c99395a 100644 --- a/doc/salome/gui/GEOM/input/creating_filling.doc +++ b/doc/salome/gui/GEOM/input/creating_filling.doc @@ -9,10 +9,10 @@ To generate a \b Filling in the Main Menu select New Entity - > Genera Tolerance for \b 2D and for \b 3D and the Number of Iterations. \n The \b Result of the operation will be a GEOM_Object (face). -\n TUI Command: geompy.MakeFilling(Shape, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter) +\n TUI Command: geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter) \n Arguments: Name + 1 List of edges + 5 Parameters (Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D -tolerance). +tolerance, Number of iterations). \image html filling.png @@ -25,4 +25,4 @@ tolerance). Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_filling "Complex Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_plane.doc b/doc/salome/gui/GEOM/input/creating_plane.doc index b880c26af..d7c9e8f9f 100644 --- a/doc/salome/gui/GEOM/input/creating_plane.doc +++ b/doc/salome/gui/GEOM/input/creating_plane.doc @@ -37,12 +37,12 @@ the plane). Examples: \image html planes1.png -
Planes
+
Planes created on the basis of the Global Coordinate System
\image html plane_on_face.png -
A Plane created on a Plane of another size
+
A Plane created on a Face of another Shape
Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_plane "Basic Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_point.doc b/doc/salome/gui/GEOM/input/creating_point.doc index 91573bf8f..0f91a0f05 100644 --- a/doc/salome/gui/GEOM/input/creating_point.doc +++ b/doc/salome/gui/GEOM/input/creating_point.doc @@ -26,7 +26,7 @@ the position of this point regarding the reference one. \image html neo-point2.png \n Finally, we can define a point by an \b Edge and a \b Parameter -indicating its position on the Edge. For example, 0.5 means that the +indicating its position on the Edge, ranging from 0.0 to 1.0. For example, 0.5 means that the point is located in the middle of the edge. \n TUI Command: geompy.MakeVertexOnCurve(Edge,Parameter). \n Arguments: Name + 1 edge + 1 Parameter defining the @@ -41,4 +41,4 @@ position of the point on the given edge. Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_point "Basic Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_revolution.doc b/doc/salome/gui/GEOM/input/creating_revolution.doc index c8d65e149..dfe8c7ca5 100644 --- a/doc/salome/gui/GEOM/input/creating_revolution.doc +++ b/doc/salome/gui/GEOM/input/creating_revolution.doc @@ -8,11 +8,11 @@ select New Entity - > Generation - > Revolution \n To create an extruded shape by \b Revolution you need to define the source \b Object to rotate, the \b Axis of revolution and the \b Angle by which the \b Shape has to be rotated around the \b Axis (in degrees). -\n The \b Result of the operation will be a GEOM_Object (edge, face, +\n The \b Result of the operation will be a GEOM_Object (edge, face, shell, solid or compsolid). \n TUI Command: geompy.MakeRevolution(Shape, Axis, Angle). -\n Arguments: Name + 1 shape (vertex, edge, wire, face or shell) serving as base object + 1 vector (for direction) + 1 value (angle). +\n Arguments: Name + 1 shape (vertex, edge, planar wire, face or shell) serving as base object + 1 vector (for direction) + 1 value (angle). \image html revolution.png @@ -23,4 +23,4 @@ solid or compsolid). Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_revolution "Complex Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_sketcher.doc b/doc/salome/gui/GEOM/input/creating_sketcher.doc index d606fe7d7..88629274f 100644 --- a/doc/salome/gui/GEOM/input/creating_sketcher.doc +++ b/doc/salome/gui/GEOM/input/creating_sketcher.doc @@ -3,8 +3,9 @@ \page create_sketcher_page Sketcher Sketcher allows to create curves of 2 types: line segment and arc. -The curve is created from the current point (center of coordinates -when the sketcher is started). The end of the curve is defined by +By default the start point of the curve is located at the point of +origin of the reference coordinate system and the curve lies in the +plane XOY. The end of the curve is defined by means of "destination", which can be a destination point (for segment only) or destination direction coupled with length of a segment or angle and radius of an arc. @@ -26,9 +27,9 @@ the resulting wire or face will be arcs of circles and/or linear segments. \n \em Command is a string, defining the sketcher by the coordinates of points in the local working plane. -\n WorkingPlane is a planar face of the working plane (a list of 9 -doubles which are coordinates of OZ and OX of the local working -plane). +\n WorkingPlane can be a plane or a planar face. The plane is +defined by the XYZ coordinates of three non-coincident points. The +planar face is an existing GEOM_Object. \n Arguments:
    @@ -66,4 +67,4 @@ is predefined and is equal to 90 degrees); Our TUI Scripts provide you with useful examples of the use of \ref tui_sketcher_page "Sketcher". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_solid.doc b/doc/salome/gui/GEOM/input/creating_solid.doc index 167f0368c..139dbfe3d 100644 --- a/doc/salome/gui/GEOM/input/creating_solid.doc +++ b/doc/salome/gui/GEOM/input/creating_solid.doc @@ -11,7 +11,7 @@ The \b Result will be a \b GEOM_Object (SOLID). \n TUI Command: geompy.MakeSolid(ListOfShape), where ListOfShape is a list of shells from which the solid is constructed. -\n Arguments: Name + A closed shell or a list of shells. +\n Arguments: Name + A closed shell or a list of closed shells. \image html neo-obj6.png @@ -22,4 +22,4 @@ ListOfShape is a list of shells from which the solid is constructed. Our TUI Scripts provide you with useful examples of creation of \ref tui_creation_solid "Advanced Geometric Objects". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/creating_wplane.doc b/doc/salome/gui/GEOM/input/creating_wplane.doc index 82dd1f4ec..bb453c8a6 100644 --- a/doc/salome/gui/GEOM/input/creating_wplane.doc +++ b/doc/salome/gui/GEOM/input/creating_wplane.doc @@ -12,7 +12,7 @@ Definition of a Working Plane is necessary for work with Camera Position. \n Firstly, you can select a \b Plane, a Planar Face or a Local Coordinate System to be your Working Plane. -\n Arguments: Name + 1 selection (face or planar face). +\n Arguments: Name + 1 selection (plane or planar face). \image html workplane4.png @@ -37,4 +37,4 @@ of the working plane. \image html image47.gif
    Reversed Direction
    -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/cut_operation.doc b/doc/salome/gui/GEOM/input/cut_operation.doc index 1f94031f7..1ccc84b0a 100644 --- a/doc/salome/gui/GEOM/input/cut_operation.doc +++ b/doc/salome/gui/GEOM/input/cut_operation.doc @@ -5,7 +5,7 @@ \n To produce a \b Cut operation in the Main Menu select Operations - > Boolean - > Cut \n This operation cuts a shape with another one. -\n The \b Result will be a \b GEOM_Object (COMPOUND). +\n The \b Result will be any \b GEOM_Object. \n Arguments: Name + 2 shapes. \n Dialog Box: @@ -21,4 +21,4 @@ Our TUI Scripts provide you with useful examples of the use of \ref tui_cut "Boolean Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/fillet_operation.doc b/doc/salome/gui/GEOM/input/fillet_operation.doc index c0f15aa0d..5d8b3983b 100644 --- a/doc/salome/gui/GEOM/input/fillet_operation.doc +++ b/doc/salome/gui/GEOM/input/fillet_operation.doc @@ -9,7 +9,7 @@ \n The \b Result will be a \b GEOM_Object. \n To create fillets on all edges of the given shape, you need to -define the Main Object to create a fillet on and the \b Radius of the +select the Main Object to create a fillet on and to define the \b Radius of the Fillet. \n TUI Command: geompy.MakeFilletAll(Shape, R) \n Arguments: Name + 1 shape + 1 value (fillet radius). @@ -21,7 +21,7 @@ shape, you need to define the Main Object to create a fillet on, select the necessary edges or faces in the OCC Viewer and define the \b Radius of the Fillet. \n TUI Command: geompy.MakeFillet(Shape, R, ShapeType, ListShapes) -\n Arguments: Name + 1 shape + 1 Selection of edges (or faces) +\n Arguments: Name + 1 shape + one or several edges (or faces) + 1 value (Fillet radius). \image html fillet2.png @@ -42,4 +42,4 @@ the \b Radius of the Fillet. Our TUI Scripts provide you with useful examples of the use of \ref tui_fillet "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/fuse_operation.doc b/doc/salome/gui/GEOM/input/fuse_operation.doc index 073a23025..5eb168bcd 100644 --- a/doc/salome/gui/GEOM/input/fuse_operation.doc +++ b/doc/salome/gui/GEOM/input/fuse_operation.doc @@ -7,7 +7,7 @@ \n This operation creates a shape from two shapes. -\n The \b Result will be a \b GEOM_Object (COMPOUND). +\n The \b Result will be any \b GEOM_Object. \n Arguments: Name + 2 shapes. \n TUI Command: geompy.MakeFuse(s1, s2) @@ -22,4 +22,4 @@ Our TUI Scripts provide you with useful examples of the use of \ref tui_fuse "Boolean Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/glue_faces_operation.doc b/doc/salome/gui/GEOM/input/glue_faces_operation.doc index 26aa71116..340f4afa7 100644 --- a/doc/salome/gui/GEOM/input/glue_faces_operation.doc +++ b/doc/salome/gui/GEOM/input/glue_faces_operation.doc @@ -10,10 +10,10 @@ given tolerance value. \n The \b Result will be a \b GEOM_Object. \n TUI Command: geompy.MakeGlueFaces(theShape, -theTolerance), where \em theShape is a compound of shapes to be +theTolerance), where \em theShape is a compound of solids to be glued, \em theTolerance is a maximum distance between two faces, which can be considered as coincident. -\n Arguments: Name + 1 Compound + Tolerance value. +\n Arguments: Name + Compound of solids + Tolerance value. \image html glue1.png @@ -45,4 +45,4 @@ be marked in white. Our TUI Scripts provide you with useful examples of the use of \ref tui_glue_faces "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/mirror_operation.doc b/doc/salome/gui/GEOM/input/mirror_operation.doc index e321c978a..f852902b0 100644 --- a/doc/salome/gui/GEOM/input/mirror_operation.doc +++ b/doc/salome/gui/GEOM/input/mirror_operation.doc @@ -13,7 +13,7 @@ otherwise it will be removed. \n Firstly an \b Object can be mirrored through a \b Point of symmetry \n TUI Command: geompy.MakeMirrorByPoint(Object, Point) -\n Arguments: Name + 1 shape + 1 vertex. +\n Arguments: Name + one or several objects + 1 vertex. \image html transformation7.png @@ -24,7 +24,7 @@ otherwise it will be removed. \n Secondly an \b Object can be mirrored through an \b Axis of symmetry \n TUI Command: geompy.MakeMirrorByAxis(Object, Axis) -\n Arguments: Name + 1 shape + 1 vector. +\n Arguments: Name + one or several objects + 1 vector. \image html transformation8.png @@ -34,7 +34,7 @@ symmetry \n Finally an \b Object can be mirrored through a \b Plane of symmetry \n TUI Command: geompy.MakeMirrorByPlane(Shape, Plane) -\n Arguments: Name + 1 shape + 1 plane +\n Arguments: Name + one or several objects + 1 plane \image html transformation9.png @@ -45,4 +45,4 @@ symmetry Our TUI Scripts provide you with useful examples of the use of \ref tui_mirror "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/modify_location_operation.doc b/doc/salome/gui/GEOM/input/modify_location_operation.doc index 58432a3fa..c25e0875c 100644 --- a/doc/salome/gui/GEOM/input/modify_location_operation.doc +++ b/doc/salome/gui/GEOM/input/modify_location_operation.doc @@ -5,13 +5,13 @@ \n To Modify the Location in the Main Menu select Operations - > Transformation - > Modify the Location. -\n This operation modifies the \b Location of an \b Object. +\n This operation modifies the \b Location of \b Objects. -\n The first algorithm places the object so that its center coincides -with the center of an End Local Coordinate System. -\n Create a copy checkbox allows to keep the initial object, otherwise it +\n The first algorithm places the object(s) so that its center coincides +with the origin of the Local Coordinate System. +\n Create a copy checkbox allows to keep the initial objects, otherwise they will be removed. -\n Arguments: Name + 1 Object + End Coordinate System. +\n Arguments: Name + one or several objects + End Coordinate System. \image html transformation5.png @@ -29,7 +29,7 @@ remainder after subtraction of the coordinates of the Start LSC from the coordinates of the End LSC. \n Create a copy checkbox allows to keep the initial object, otherwise it will be removed. -\n Arguments: Name + 1 Object + Start Coordinate System + End +\n Arguments: Name + one or several objects + Start Coordinate System + End Coordinate System. \image html transformation6.png @@ -56,6 +56,6 @@ modified, \em theStartLCS is a location to move the shape from, \em theEndLCS is a location to move the shape to. \n Our TUI Scripts provide you with useful examples of the use -of \ref tui_modify_location "Transformation Operations". +of \ref tui_translation "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/multi_rotation_operation.doc b/doc/salome/gui/GEOM/input/multi_rotation_operation.doc index 6e3f177fc..7ad469f89 100644 --- a/doc/salome/gui/GEOM/input/multi_rotation_operation.doc +++ b/doc/salome/gui/GEOM/input/multi_rotation_operation.doc @@ -17,7 +17,8 @@ be 2*PI/NbTimes \n Arguments: Name + 1 shape + 1 vector for direction + 1 value (repetition). -\b There is a TUI-only command +\b NB! There is another way to execute a Multi-rotation +operation, which is currently accessible only via TUI commands: geompy.MakeMultiRotation1D(Shape, Dir, Point, NbTimes) which works in the same way, but the Axis is defined by direction and point. @@ -37,7 +38,8 @@ the rotated shape and its projection on the rotation axis. \n Arguments: Name + 1 shape + 1 vector for direction + 1 angle + 1 value (repetition) + 1 step value + 1 value (repetition). -There is a TUI-only command +NB! There is another way to execute a Double Multi-rotation +operation, which is currently accessible only via TUI commands: geompy.MakeMultiRotation2D(Shape, Dir, Point, Angle, nbtimes1, Step,nbtimes2) which works in the same way, but the Axis is defined by direction and point. @@ -51,4 +53,4 @@ but the Axis is defined by direction and point. Our TUI Scripts provide you with useful examples of the use of \ref tui_multi_rotation "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/multi_translation_operation.doc b/doc/salome/gui/GEOM/input/multi_translation_operation.doc index 58d5ab1e2..5bd20ff65 100644 --- a/doc/salome/gui/GEOM/input/multi_translation_operation.doc +++ b/doc/salome/gui/GEOM/input/multi_translation_operation.doc @@ -10,9 +10,9 @@ two directions. \n The \b Result will be one or several \b GEOM_Objects (compound). \n To produce a Simple Multi Translation (in one direction) you -need to indicate a \b Shape to be translated, a \b Vector of +need to indicate an \b Object to be translated, a \b Vector of translation, a \b Step of translation and a Number of Times the -shape must be moved. +Object should be duplicated. \n TUI Command: geompy.MakeMultiTranslation1D(Shape, Dir, Step, NbTimes) \n Arguments: Name + 1 shape + 1 vector (for direction) + 1 @@ -25,9 +25,8 @@ step value + 1 value (repetition). \image html multi_translation1dsn.png \n To produce a Double Multi Translation (in two directions) you need to -indicate a \b Shape to be translated and a \b Vector of translation, a -\b Step of translation and a Number of Times the shape must be moved along -each axis. +indicate an \b Object to be translated, and, for both axes, a \b +Vector of translation, a \b Step of translation and a Number of Times the shape must be duplicated. \n TUI Command: geompy.MakeMultiTranslation2D(Shape, Dir1, Step1, NbTimes1, Dir2, Step2, NbTimes2), where \em Shape is a shape @@ -48,4 +47,4 @@ along \em Dir2. Our TUI Scripts provide you with useful examples of the use of \ref tui_multi_translation "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/offset_operation.doc b/doc/salome/gui/GEOM/input/offset_operation.doc index 39651ba45..d2b4b6766 100644 --- a/doc/salome/gui/GEOM/input/offset_operation.doc +++ b/doc/salome/gui/GEOM/input/offset_operation.doc @@ -11,9 +11,9 @@ number, negative value meaning inner offset). \n \b Offset operation is applicable to faces, shells and solids. \n The \b Result will be a \b GEOM_Object \n TUI Command: geompy.MakeOffset(Shape, Offset), -where Shape is a shape which has to be an offset, Offset is a value of +where Shape is a shape(s) which has to be an offset, Offset is a value of the offset. -\n Arguments: Name + Object (face, shell, solid, compound) + +\n Arguments: Name + Object (face(s), shell(s), solid(s)) + Offset value \image html transformation11.png @@ -25,4 +25,4 @@ Offset value Our TUI Scripts provide you with useful examples of the use of \ref tui_offset "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/repairing_operations.doc b/doc/salome/gui/GEOM/input/repairing_operations.doc index b5a7f0c03..d7ac30e4c 100644 --- a/doc/salome/gui/GEOM/input/repairing_operations.doc +++ b/doc/salome/gui/GEOM/input/repairing_operations.doc @@ -11,9 +11,7 @@
  1. \subpage sewing_operation_page
  2. \subpage glue_faces_operation_page
  3. \subpage add_point_on_edge_operation_page
  4. -
  5. \subpage check_free_boundaries_operation_page
  6. -
  7. \subpage check_free_faces_operation_page
  8. \subpage change_orientation_operation_page
  9. -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/rotation_operation.doc b/doc/salome/gui/GEOM/input/rotation_operation.doc index e6bbd277b..e546f002b 100644 --- a/doc/salome/gui/GEOM/input/rotation_operation.doc +++ b/doc/salome/gui/GEOM/input/rotation_operation.doc @@ -10,7 +10,7 @@ \n The first \b Rotation algorithm needs you to define an \b Object to be rotated, an \b Axis of rotation and an \b Angle of rotation. \n TUI Command: geompy.MakeRotation(Shape, Axis, Angle) -\n Arguments: 1 shape + 1 vector for direction of rotation + 1 +\n Arguments: Name + one or several objects + 1 vector for direction of rotation + 1 angle. \image html transformation4.png @@ -39,4 +39,4 @@ from the first point to the second and to the third. Our TUI Scripts provide you with useful examples of the use of \ref tui_rotation "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/section_operation.doc b/doc/salome/gui/GEOM/input/section_operation.doc index 69561c1ba..911b76545 100644 --- a/doc/salome/gui/GEOM/input/section_operation.doc +++ b/doc/salome/gui/GEOM/input/section_operation.doc @@ -7,7 +7,7 @@ \n This operation creates the section between 2 shapes. -\n The \b Result will be a \b GEOM_Object (COMPOUND). +\n The \b Result will be any \b GEOM_Object (EDGE or WIRE). \n TUI Command: geompy.MakeSection(s1, s2) \n Arguments: Name + 2 shapes. @@ -22,4 +22,4 @@ Our TUI Scripts provide you with useful examples of the use of \ref tui_section "Boolean Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/sewing_operation.doc b/doc/salome/gui/GEOM/input/sewing_operation.doc index 3dcba026a..69da0597c 100644 --- a/doc/salome/gui/GEOM/input/sewing_operation.doc +++ b/doc/salome/gui/GEOM/input/sewing_operation.doc @@ -4,12 +4,12 @@ \n To produce a \b Sewing operation in the Main Menu select Repair - > Sewing. -\n This operation allows to sew several shapes. +\n This operation allows to sew several faces or shells. \n The \b Result will be a \b GEOM_Object. \n TUI Command: geompy.MakeSewing(ListOfShape, Precision), - where \em ListOfShape is list of shapes to be sewed, \em Precision is a + where \em ListOfShape is list of faces or shells to be sewed, \em Precision is a precision for sewing. \image html repair6.png @@ -30,4 +30,4 @@ your shape: Our TUI Scripts provide you with useful examples of the use of \ref tui_sewing "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/shape_processing_operation.doc b/doc/salome/gui/GEOM/input/shape_processing_operation.doc index a1979e15a..ca438ada1 100644 --- a/doc/salome/gui/GEOM/input/shape_processing_operation.doc +++ b/doc/salome/gui/GEOM/input/shape_processing_operation.doc @@ -125,9 +125,9 @@ type to Bezier curves and surfaces.
  10. Surface Mode (ToBezier.SurfaceMode) - if checked in, allows conversion of surfaces.
  11. 3D Curve Mode (ToBezier.Curve3dMode) - if checked in, -allows conversion of 2D curves.
  12. -
  13. 2D Curve Mode (ToBezier.Curve2dMode) - if checked in, allows conversion of 3D curves.
  14. +
  15. 2D Curve Mode (ToBezier.Curve2dMode) - if checked in, +allows conversion of 2D curves.
  16. Max Tolerance (ToBezier.MaxTolerance) - defines tolerance for detection and correction of problems.
  17. @@ -155,4 +155,4 @@ Processing. Our TUI Scripts provide you with useful examples of the use of \ref tui_shape_processing "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/suppress_holes_operation.doc b/doc/salome/gui/GEOM/input/suppress_holes_operation.doc index 5d1e684e1..b9e25e065 100644 --- a/doc/salome/gui/GEOM/input/suppress_holes_operation.doc +++ b/doc/salome/gui/GEOM/input/suppress_holes_operation.doc @@ -4,14 +4,14 @@ \n To Suppress Holes in the Main Menu select Repair - > Suppress Holes. -\n This operation removes holes on a selected shape. This operation is -available in OCC Viewer only. +\n This operation removes holes with free boundaries on a selected +shell or face. This operation is available in OCC Viewer only. \n The \b Result will be a \b GEOM_Object. \n TUI Command: geompy.SuppressHoles(Shape, -ListOfWireID), where \em Shape is a shape where holes must be -removed, \em ListOfWireID is a list of wire sub shapes ID's. If it is +ListOfWireID), where \em Shape is a shell or face, where holes +with free boundaries must be removed, \em ListOfWireID is a list of wire sub shapes ID's. If it is empty, then all holes are removed. \image html repair5.png @@ -32,4 +32,4 @@ your shape: Our TUI Scripts provide you with useful examples of the use of \ref tui_suppress_holes "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/suppress_internal_wires_operation.doc b/doc/salome/gui/GEOM/input/suppress_internal_wires_operation.doc index 3a7964990..8aa245d4c 100644 --- a/doc/salome/gui/GEOM/input/suppress_internal_wires_operation.doc +++ b/doc/salome/gui/GEOM/input/suppress_internal_wires_operation.doc @@ -6,7 +6,7 @@ Repair - > Suppress Internal Wires. \n This operation removes all internal wires or specified internal -wires from user specified faces. This operation is available in OCC +wires from user specified shapes. This operation is available in OCC Viewer only. \n The \b Result will be a \b GEOM_Object. @@ -19,10 +19,10 @@ internal wires are removed. Arguments:
    • Name of the resulting object
    • -
    • User specified face
    • -
    • User specified internal wires (lying on this face except for its -boundary), or, in case the Remove all internal wires box is -checked, all internal wires
    • +
    • User specified shape
    • +
    • User specified internal wires (lying on this shape except for its +boundary), or all internal wires if Remove all internal wires box is +checked
    \image html repair4.png @@ -36,4 +36,4 @@ checked, all internal wires Our TUI Scripts provide you with useful examples of the use of \ref tui_suppress_internal_wires "Repairing Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/translation_operation.doc b/doc/salome/gui/GEOM/input/translation_operation.doc index 136b53614..caf1fd7a8 100644 --- a/doc/salome/gui/GEOM/input/translation_operation.doc +++ b/doc/salome/gui/GEOM/input/translation_operation.doc @@ -16,20 +16,20 @@ axes. \n TUI Command: geompy.MakeTranslation(Shape, DX, DY, DZ), where Shape is a shape to be translated, DX, DY, DZ are components of translation vector. -\n Arguments: Name + 1 shape + 3 values (coordinates). +\n Arguments: Name + one or several objects + 3 values (coordinates). \image html transformation1.png \n Secondly you can define an \b Object and the start and the end points of the vector. \n TUI Command: geompy.MakeTranslationTwoPoints(Object, Point1, Point2) -\n Arguments: Name + 1 shape + 2 vertices +\n Arguments: Name + one or several objects + 2 vertices \image html transformation2.png \n Finally you can define an \b Object and the vector \n TUI Command: geompy.MakeTranslationVector(Object, Vector) -\n Arguments: Name + 1 shape + 1 vector. +\n Arguments: Name + one or several objects + 1 vector. \image html transformation3.png @@ -42,4 +42,4 @@ of the vector. Our TUI Scripts provide you with useful examples of the use of \ref tui_translation "Transformation Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc index a1415fdff..27483708d 100644 --- a/doc/salome/gui/GEOM/input/tui_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/tui_measurement_tools.doc @@ -88,6 +88,140 @@ print "Main moments of inertia of box 100x30x100:" print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11] \endcode +

    Check Free Boundaries

    + +\code +import os +import geompy +import salome +gg = salome.ImportComponentGUI("GEOM") + +# create boxes +box1 = geompy.MakeBox(0,0,0,100,50,100) +box2 = geompy.MakeBox(100,0,0,250,50,100) + +# make a compound +compound = geompy.MakeCompound([box1, box2]) + +# import from *.brep +ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep") + +# get a face +faces = geompy.SubShapeAllSorted(ImportFromBREP, geompy.ShapeType["FACE"]) + +# get the free boundary for face 32 +Res = geompy.GetFreeBoundary(faces[32]) +isSuccess = Res[0] +ClosedWires = Res[1] +OpenWires = Res[2] + +if isSuccess == 1 : + print "Checking free boudaries is OK." +else : + print "Checking free boudaries is KO!" +print "len(ClosedWires) = ", len(ClosedWires) + +i = 0 +for wire in ClosedWires : + wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1) + geompy.addToStudy(ClosedWires[i], wire_name) + if i < len(ClosedWires) : + i = i+ 1 + +print "len(OpenWires) = ", len(OpenWires) + +i = 0 +for wire in OpenWires : + wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1) + geompy.addToStudy(OpenWires[i], wire_name) + if i < len(OpenWires) : + i = i+ 1 + +# get the free boundary for face 41 +Res = geompy.GetFreeBoundary(faces[41]) +isSuccess = Res[0] +ClosedWires = Res[1] +OpenWires = Res[2] + +if isSuccess == 1 : + print "Checking free boudaries is OK." +else : + print "Checking free boudaries is KO!" +print "len(ClosedWires) = ", len(ClosedWires) + +i = 0 +for wire in ClosedWires : + wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1) + geompy.addToStudy(ClosedWires[i], wire_name) + if i < len(ClosedWires) : + i = i+ 1 + +print "len(OpenWires) = ", len(OpenWires) + +i = 0 +for wire in OpenWires : + wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1) + geompy.addToStudy(OpenWires[i], wire_name) + if i < len(OpenWires) : + i = i+ 1 + +# add the imported object to the study +id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP") +salome.sg.updateObjBrowser(1) +\endcode + + +

    Check Free Faces

    + +\code +import geompy +import salome +gg = salome.ImportComponentGUI("GEOM") + +# create a vertex and a vector +p1 = geompy.MakeVertex(35, 35, 0) +p2 = geompy.MakeVertex(35, 35, 50) +v = geompy.MakeVector(p1, p2) + +# create a cylinder +cylinder = geompy.MakeCone(p1, v, 30, 20, 20) + +# create a cone +cone = geompy.MakeCone(p1, v, 70, 40, 60) + +# make cut +cut = geompy.MakeCut(cone, cylinder) + +# get faces as sub-shapes +faces = [] +faces = geompy.SubShapeAllSorted(cut, geompy.ShapeType["FACE"]) +f_2 = geompy.GetSubShapeID(cut, faces[0]) + +# remove one face from the shape +cut_without_f_2 = geompy.SuppressFaces(cut, [f_2]) + +# suppress the specified wire +result = geompy.GetFreeFacesIDs(cut_without_f_2) +print "A number of free faces is ", len(result) + +# add objects in the study +all_faces = geompy.SubShapeAllSorted(cut_without_f_2, geompy.ShapeType["FACE"]) +for face in all_faces : + sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face) + if result.count(sub_shape_id) > 0 : + face_name = "Free face %d"%(sub_shape_id) + geompy.addToStudy(face, face_name) + +# in this example all faces from cut_without_f_2 are free +id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2") + +# display the results +gg.createAndDisplayGO(id_cut_without_f_2) +gg.setDisplayMode(id_cut_without_f_2,1) +\endcode + + +

    Bounding Box

    \code @@ -130,6 +264,51 @@ print " Edge max. tolerance: ", Toler[3] print " Vertex min. tolerance: ", Toler[4] print " Vertex max. tolerance: ", Toler[5] \endcode + +

    Angle

    + +\code +import salome +salome.salome_init() + +import math +import geompy +geompy.init_geom(salome.myStudy) + +OX = geompy.MakeVectorDXDYDZ(10, 0,0) +OXY = geompy.MakeVectorDXDYDZ(10,10,0) + +# in one plane +Angle = geompy.GetAngle(OX, OXY) + +print "\nAngle between OX and OXY = ", Angle +if math.fabs(Angle - 45.0) > 1e-05: + print " Error: returned angle is", Angle, "while must be 45.0" + pass + +# not in one plane +OXY_shift = geompy.MakeTranslation(OXY,10,-10,20) +Angle = geompy.GetAngle(OX, OXY_shift) + +print "Angle between OX and OXY_shift = ", Angle +if math.fabs(Angle - 45.0) > 1e-05: + print " Error: returned angle is", Angle, "while must be 45.0" + pass + +# not linear +pnt1 = geompy.MakeVertex(0, 0, 0) +pnt2 = geompy.MakeVertex(10, 0, 0) +pnt3 = geompy.MakeVertex(20, 10, 0) +arc = geompy.MakeArc(pnt1, pnt2, pnt3) +Angle = geompy.GetAngle(OX, arc) + +if (math.fabs(Angle + 1.0) > 1e-6 or geompy.MeasuOp.IsDone()): + print "Error. Angle must not be computed on curvilinear edges" + pass + +\endcode + +

    What Is

    @@ -181,4 +360,4 @@ else: print "\nCompound is valid" \endcode -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/tui_repairing_operations.doc b/doc/salome/gui/GEOM/input/tui_repairing_operations.doc index 7225d7296..98dccc6f0 100644 --- a/doc/salome/gui/GEOM/input/tui_repairing_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_repairing_operations.doc @@ -320,137 +320,5 @@ for point in edge_points: salome.sg.updateObjBrowser(1) \endcode -\anchor tui_check_free_boundaries -

    Check Free Boundaries

    -\code -import os -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create boxes -box1 = geompy.MakeBox(0,0,0,100,50,100) -box2 = geompy.MakeBox(100,0,0,250,50,100) - -# make a compound -compound = geompy.MakeCompound([box1, box2]) - -# import from *.brep -ImportFromBREP = geompy.ImportBREP(os.getenv("DATA_DIR")+"/Shapes/Brep/flight_solid.brep") - -# get a face -faces = geompy.SubShapeAllSorted(ImportFromBREP, geompy.ShapeType["FACE"]) - -# get the free boundary for face 32 -Res = geompy.GetFreeBoundary(faces[32]) -isSuccess = Res[0] -ClosedWires = Res[1] -OpenWires = Res[2] - -if isSuccess == 1 : - print "Checking free boudaries is OK." -else : - print "Checking free boudaries is KO!" -print "len(ClosedWires) = ", len(ClosedWires) - -i = 0 -for wire in ClosedWires : - wire_name = "Face 32 -> Close wires : WIRE %d"%(i+1) - geompy.addToStudy(ClosedWires[i], wire_name) - if i < len(ClosedWires) : - i = i+ 1 - -print "len(OpenWires) = ", len(OpenWires) - -i = 0 -for wire in OpenWires : - wire_name = "Face 32 -> Open wires : WIRE %d"%(i+1) - geompy.addToStudy(OpenWires[i], wire_name) - if i < len(OpenWires) : - i = i+ 1 - -# get the free boundary for face 41 -Res = geompy.GetFreeBoundary(faces[41]) -isSuccess = Res[0] -ClosedWires = Res[1] -OpenWires = Res[2] - -if isSuccess == 1 : - print "Checking free boudaries is OK." -else : - print "Checking free boudaries is KO!" -print "len(ClosedWires) = ", len(ClosedWires) - -i = 0 -for wire in ClosedWires : - wire_name = "Face 41 -> Close wires : WIRE %d"%(i+1) - geompy.addToStudy(ClosedWires[i], wire_name) - if i < len(ClosedWires) : - i = i+ 1 - -print "len(OpenWires) = ", len(OpenWires) - -i = 0 -for wire in OpenWires : - wire_name = "Face 41 -> Open wires : WIRE %d"%(i+1) - geompy.addToStudy(OpenWires[i], wire_name) - if i < len(OpenWires) : - i = i+ 1 - -# add the imported object to the study -id_ImportFromBREP = geompy.addToStudy(ImportFromBREP, "ImportFromBREP") -salome.sg.updateObjBrowser(1) -\endcode - -\anchor tui_check_free_faces -

    Check Free Faces

    - -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a vertex and a vector -p1 = geompy.MakeVertex(35, 35, 0) -p2 = geompy.MakeVertex(35, 35, 50) -v = geompy.MakeVector(p1, p2) - -# create a cylinder -cylinder = geompy.MakeCone(p1, v, 30, 20, 20) - -# create a cone -cone = geompy.MakeCone(p1, v, 70, 40, 60) - -# make cut -cut = geompy.MakeCut(cone, cylinder) - -# get faces as sub-shapes -faces = [] -faces = geompy.SubShapeAllSorted(cut, geompy.ShapeType["FACE"]) -f_2 = geompy.GetSubShapeID(cut, faces[0]) - -# remove one face from the shape -cut_without_f_2 = geompy.SuppressFaces(cut, [f_2]) - -# suppress the specified wire -result = geompy.GetFreeFacesIDs(cut_without_f_2) -print "A number of free faces is ", len(result) - -# add objects in the study -all_faces = geompy.SubShapeAllSorted(cut_without_f_2, geompy.ShapeType["FACE"]) -for face in all_faces : - sub_shape_id = geompy.GetSubShapeID(cut_without_f_2, face) - if result.count(sub_shape_id) > 0 : - face_name = "Free face %d"%(sub_shape_id) - geompy.addToStudy(face, face_name) - -# in this example all faces from cut_without_f_2 are free -id_cut_without_f_2 = geompy.addToStudy(cut_without_f_2, "Cut without f_2") - -# display the results -gg.createAndDisplayGO(id_cut_without_f_2) -gg.setDisplayMode(id_cut_without_f_2,1) -\endcode - -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/using_boolean_operations.doc b/doc/salome/gui/GEOM/input/using_boolean_operations.doc index 1c949478e..88152d543 100644 --- a/doc/salome/gui/GEOM/input/using_boolean_operations.doc +++ b/doc/salome/gui/GEOM/input/using_boolean_operations.doc @@ -20,7 +20,23 @@ 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 — Common, 2 — Cut, 3 — Fuse, 4 — Section). + +Besides, you can use advanced TUI commands performing these operations +independently from each other: +\par +geompy.MakeFuse(Shape1, Shape2), where \em Shape1 and \em +Shape2 is the second argument of Fuse operation; +\par +geompy.MakeCommon(Shape1, Shape2), where \em Shape1 and \em +Shape2 is the second argument of Common operation; +\par +geompy.MakeCut(Shape1, Shape2), where \em Shape1 and \em +Shape2 is the second argument of Cut operation; +\par +geompy.MakeSection(Shape1, Shape2), where \em Shape1 and \em +Shape2 is the second argument of Section operation; + \n Our TUI Scripts provide you with useful examples of the use of \ref tui_boolean_operations_page "Boolean Operations". -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/using_measurement_tools.doc b/doc/salome/gui/GEOM/input/using_measurement_tools.doc index e3b560831..e833aaca5 100644 --- a/doc/salome/gui/GEOM/input/using_measurement_tools.doc +++ b/doc/salome/gui/GEOM/input/using_measurement_tools.doc @@ -10,8 +10,11 @@ concerning created or imported geometrical objects. They are:
  18. \ref basic_prop_anchor "Basic properties"
  19. \ref center_mass_anchor "Center of mass"
  20. \ref inertia_anchor "Inertia"
  21. +
  22. \ref boundaries_anchor "Check Free Boundaries"
  23. +
  24. \ref faces_anchor "Check Faces"
  25. \ref bounding_box_anchor "Bounding box"
  26. \ref min_distance_anchor "Min. distance"
  27. +
  28. \ref angle_anchor "Angle"
  29. \ref tolerance_anchor "Tolerance"
  30. \ref whatis_anchor "WhatIs"
  31. \ref check_anchor "Check"
  32. @@ -65,19 +68,48 @@ the shape for which a center of gravity is computed. \anchor inertia_anchor

    Inertia

    -Returns the axis of inertia for the selected geometrical object. +Returns the axial moments of inertia for the selected geometrical object. -\n Result: Displays the matrix and moments of inertia in the -form of Python Tuple
    (I11, I12, I13,
    +\n Result: Displays the matrix of the own moments of inertia and +the relative moments of inertia in the form of Python Tuple +
    (I11, I12, I13,
    I21, I22, I23,
    I31, I32, I33,
    Ix, Iy, Iz).
    \n TUI Command: geompy.Inertia(Shape), where \em Shape is -a shape for which a matrix of inertia and moment of inertia are +a shape for which the own matrix of inertia and the relative moments of inertia are returned. \image html measures4.png +\anchor boundaries_anchor +

    Check Free Boundaries

    + +\n Detects and highlights wires and edges that are not shared between +two faces and are considered a shape's boundary. + +\n TUI Command: (NoError, ClosedWires, OpenWires) = +geompy.GetFreeBoundary(Shape), where \em Shape is a shape to be +checked, \em NoError is false if an error occurred while checking free +boundaries, \em ClosedWires is a list of closed free boundary wires, +\em OpenWires is a list of open free boundary wires. + +\image html repair9.png + +\anchor faces_anchor +

    Check Free Faces

    + +\n Highlights all free faces of a given shape. A free +face is a face which is not shared between two objects of the shape. + +\n \b NOTE: This functionality works only in VTK viewer. + +\n \b Result: a list of IDs of all free faces, containing in the shape. +\n TUI Command: GetFreeFacesIDs(Shape), where \em Shape is +a shape to be checked. + +\image html repair10.png + \anchor bounding_box_anchor

    Bounding box

    @@ -95,14 +127,24 @@ is a shape for which a bounding box is computed. \anchor min_distance_anchor

    Min. distance

    -\n Returns the minimum distance between two geometrical objects. +\n Returns the minimum distance between two geometrical objects and +the coordinates of the vector of distance and shows the vector in the viewer. \n TUI Command: geompy.MinDistance(Shape1, Shape2), -where \em Shape1 and \em Shape2 are shapes between which the minimal distance -computed. +where \em Shape1 and \em Shape2 are shapes between which the minimal +distance is computed. \image html distance.png +\anchor angle_anchor +

    Angle

    + +\n Returns the angle between two lines or linear edges +\n TUI Command: geompy.GetAngle(shape1, shape2), where +Shape1 and Shape2 are shapes between which the angle is computed. + +\image html angle.png + \anchor tolerance_anchor

    Tolerance

    @@ -136,7 +178,7 @@ geometry as well. \n Result: Boolean. \n TUI Command: geompy.(theShape, theIsCheckGeom = 0), -where is shape which is checked for validity. +where is theShape is the shape checked for validity. \image html measures9.png @@ -169,4 +211,4 @@ is returned, and encountered errors are printed in the python console. \image html measures10.png -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/viewing_geom_obj.doc b/doc/salome/gui/GEOM/input/viewing_geom_obj.doc index 0b0d13c6d..ac6e11ea3 100644 --- a/doc/salome/gui/GEOM/input/viewing_geom_obj.doc +++ b/doc/salome/gui/GEOM/input/viewing_geom_obj.doc @@ -21,10 +21,10 @@ Wireframe and Shading presentation.
  33. \ref color_page "Color" - allows to change the filling color in the standard Select Color menu.
  34. \ref transparency_page "Transparency" - allows to change the -transparency of mesh elements.
  35. +transparency of geometrical objects.
  36. \ref isolines_page "Isos" - allows to change the number of isolines displayed within a shape.
  37. -
  38. Erase - allows to hide the selected mesh from the +
  39. Erase - allows to hide the selected geometrical object from the viewer. TUI Command : sg.EraseOnly(ID) \n \image html image18.gif
  40. @@ -32,11 +32,11 @@ viewer. TUI Command : sg.EraseOnly(ID) Command: sg.EraseAll() \n \image html image26.gif -
  41. Display Only - allows to display only the selected mesh, -hiding all other from the viewer. TUI Command: sg.DisplayOnly(ID) +
  42. Display Only - allows to display only the selected +geometrical object. TUI Command: sg.DisplayOnly(ID) \n \image html image33.gif
  43. -
  44. Update - refreshes the presentation of your mesh in the +
  45. Update - refreshes the presentation of your geometrical object in the Object Browser, applying all recent changes.
  46. Dump view - exports an object from the viewer in bmp, png, jpg or jpeg image format.
  47. @@ -50,4 +50,4 @@ on the viewer background:
  48. Select Only provides a filter for exclusive selection of objects of a certain type.
  49. -*/ \ No newline at end of file +*/ diff --git a/doc/salome/gui/GEOM/input/working_with_groups.doc b/doc/salome/gui/GEOM/input/working_with_groups.doc index 7216f0c77..ed0909498 100644 --- a/doc/salome/gui/GEOM/input/working_with_groups.doc +++ b/doc/salome/gui/GEOM/input/working_with_groups.doc @@ -20,7 +20,7 @@ In this Menu:
    • Shape Type radio button define the type of elements for the -group (points, lines, planes or shapes).
    • +group (points, wires, faces, shells or solids).
    • Group Name - here you can enter the name of the group, by default, it is Group_n.
    • Then, using the "Select" button, select the Main Shape (a @@ -86,4 +86,4 @@ the sub shape to be removed from the group.
    • Our TUI Scripts provide you with useful examples of \ref tui_working_with_groups_page "Working with Groups". -*/ \ No newline at end of file +*/