mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 01:58:36 +05:00
Common update for Salome series4x
This commit is contained in:
parent
890e2f8059
commit
c5b4886347
@ -17,8 +17,8 @@ IsByParameter), </em> 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 <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_add_point_on_edge "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -98,15 +98,19 @@ automatically.</li>
|
||||
|
||||
\image html block4.png
|
||||
|
||||
|
||||
|
||||
\image html block5.png
|
||||
|
||||
\n <b>Example:</b>
|
||||
|
||||
\image html image180.jpg
|
||||
<center>Hexahedral Solid built on the base of six Faces</center>
|
||||
|
||||
\image html image181.jpg
|
||||
<center>Hexahedral Solid built on the base of two Faces</center>
|
||||
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of
|
||||
\ref tui_building_by_blocks_page "Building by Blocks".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -3,11 +3,11 @@
|
||||
\page change_orientation_operation_page Change Orientation
|
||||
|
||||
\n To <b>Change Orientation</b> in the <b>Main Menu</b> select <b>Repair - > Change Orientation</b>.
|
||||
\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 <b>TUI Command:</b> <em>geompy.ChangeOrientation(shape)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape (shell)
|
||||
\n <b>Arguments:</b> Name + one or several objects (face(s)), opened shell(s).
|
||||
\n Uncheck <b>Create a copy</b> checkbox if you don't wish to leave
|
||||
the initial object in the project (<b>Result name</b> field will be
|
||||
locked).
|
||||
@ -22,4 +22,4 @@ locked).
|
||||
\image html image40.gif
|
||||
<center><em>Outward orientation</em></center>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
\n To <b>Check Free Boundaries</b> in the <b>Main Menu</b> select <b>Repair - > Check Free Boundaries</b>.
|
||||
|
||||
\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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_check_free_boundaries "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -3,8 +3,10 @@
|
||||
\page check_free_faces_operation_page Check Free Faces
|
||||
|
||||
\n To <b>Check Free Faces</b> in the <b>Main Menu</b> select <b>Repair - > Check Free Faces</b>.
|
||||
\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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_check_free_faces "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>TUI Command:</b> <em>geompy.MakeCommon(s1, s2)</em>
|
||||
\n <b>Arguments:</b> Name + 2 shapes.
|
||||
|
||||
@ -21,4 +21,4 @@
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_common "Boolean Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -40,7 +40,4 @@ Point, End Point, boolean Sense)</em>
|
||||
\image html arcsn2.png
|
||||
<center>Reversed arc.</center>
|
||||
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_basic_geom_objs_page "Basic Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
To create a \b Circle in the <b>Main Menu</b> select <b>New Entity - >
|
||||
Basic - > Circle</b>
|
||||
|
||||
\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 <b>Center Point</b>, a \b
|
||||
@ -26,7 +26,17 @@ the direction) + Radius.
|
||||
<b>Example:</b>
|
||||
\image html circles.png
|
||||
|
||||
\n Finally, you can define a circle by a <b>Center Point</b> and two
|
||||
\b Points.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeCircleCenter2Pnt(Point1, Point2,
|
||||
Point3)</em>, 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 <b>Arguments:</b> Name + 3 points.
|
||||
|
||||
\image html circle3.png
|
||||
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_circle "Basic Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -12,7 +12,8 @@
|
||||
\n Firstly, you can define a \b Cone by the <b>Base Point</b> (the
|
||||
central point of the cone base), the \b Axis, the \b Height and the
|
||||
first and the second \b Radiuses.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeCone(Point, Axis, Radius1, Radius2)</em>
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeCone(Point, Axis, Radius1,
|
||||
Radius2, height)</em>
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_cone "Primitives".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -10,7 +10,7 @@ given shape using the \b Explode operation, you need to define the <b>Main
|
||||
Object</b>, which will be exploded and the <b>Type of Subshapes</b> 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 <b>TUI Commands</b> you can perform this operation in a
|
||||
variety of ways:
|
||||
@ -40,4 +40,4 @@ the range [1, Nb_Sub-Shapes_Of_Given_Type]</li>
|
||||
|
||||
\image html neo-obj1.png
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -6,14 +6,14 @@
|
||||
select <b>New Entity - > Generation - > Extrusion</b>
|
||||
|
||||
\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 <b>Base Shape</b> (a basis of the
|
||||
extrusion), the \b Vector (a direction of the extrusion) and the \b
|
||||
Height of extrusion.
|
||||
\b <b>TUI Command:</b> <em>geompy.MakePrismVecH(Base, Vector, Height)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, wire, face or
|
||||
\n <b>Arguments:</b> 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 <b>End Point</b> of the \b Vector (in this way
|
||||
you don't need to create it in advance).
|
||||
\n <b>TUI Command:</b> <em>geompy.MakePrism(Base, Point1, Point2)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, wire, face or
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_prism "Complex Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -5,15 +5,15 @@
|
||||
To generate a \b Pipe in the <b>Main Menu</b> select <b>New Entity - > Generation - > Extrusion along a path</b>
|
||||
|
||||
\n To create an extruded \b Pipe shape, you need to define the <b>Base
|
||||
Object</b> (vertex, edge, wire, face or shell), which will be extruded
|
||||
and the <b>Path Object</b> (edge, face or shell) along which the <b>Base
|
||||
Object</b> (vertex, edge, planar wire, face or shell), which will be extruded
|
||||
and the <b>Path Object</b> (edge or wire) along which the <b>Base
|
||||
Object</b> 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 <b>TUI Command:</b> <em>geompy.MakePipe(baseShape, pathShape)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, wire, face or
|
||||
shell) serving as base object + 1 shape (edge, face or shell) for
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_pipe "Complex Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -5,23 +5,25 @@
|
||||
To create a \b Face in the <b>Main Menu</b> select <b>New Entity - >
|
||||
Build - > Face</b>
|
||||
|
||||
\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 <b>Try to create a planar face</b> 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 <b>Try to create a planar face</b> to create a planar
|
||||
face or nothing if it is impossible.
|
||||
\n The \b Result will be a \b GEOM_Object (FACE).
|
||||
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFace(Wire, isPlanarWanted)</em>
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFaceWires([list of Shapes], isPlanarWanted)</em>
|
||||
\n <b>Arguments:</b> Name + 1 wire.
|
||||
|
||||
\image html neo-obj4.png
|
||||
|
||||
There are some advanced possibilities accessible only via <b>TUI
|
||||
commands</b>:
|
||||
|
||||
<em>geompy.MakeFaceWires(Wires, isPlanarWanted)</em> - Creates a face on the given wires set. The argument is not a single wire, but a list of wires.
|
||||
<em>geompy.MakeFaces(Wires, isPlanarWanted)</em> is a shortcut to MakeFaceWires().
|
||||
|
||||
\n <b>Example:</b>
|
||||
|
||||
\image html facesn1.png
|
||||
@ -33,4 +35,4 @@ commands</b>:
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_face "Advanced Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -9,10 +9,10 @@ To generate a \b Filling in the <b>Main Menu</b> select <b>New Entity - > Genera
|
||||
Tolerance for \b 2D and for \b 3D and the <b>Number of Iterations</b>.
|
||||
\n The \b Result of the operation will be a GEOM_Object (face).
|
||||
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Shape, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_filling "Complex Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -37,12 +37,12 @@ the plane).
|
||||
<b>Examples:</b>
|
||||
|
||||
\image html planes1.png
|
||||
<center>Planes</center>
|
||||
<center>Planes created on the basis of the Global Coordinate System</center>
|
||||
|
||||
\image html plane_on_face.png
|
||||
<center>A Plane created on a Plane of another size</center>
|
||||
<center>A Plane created on a Face of another Shape</center>
|
||||
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_plane "Basic Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>TUI Command:</b> <em>geompy.MakeVertexOnCurve(Edge,Parameter).</em>
|
||||
\n <b>Arguments:</b> Name + 1 edge + 1 Parameter defining the
|
||||
@ -41,4 +41,4 @@ position of the point on the given edge.
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_point "Basic Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -8,11 +8,11 @@ select <b>New Entity - > Generation - > Revolution</b>
|
||||
\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 <b>TUI Command:</b> <em>geompy.MakeRevolution(Shape, Axis, Angle).</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape (vertex, edge, wire, face or shell) serving as base object + 1 vector (for direction) + 1 value (angle).
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_revolution "Complex Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <em>WorkingPlane</em> 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 <em>WorkingPlane</em> 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 <b>Arguments:</b>
|
||||
<ol>
|
||||
@ -66,4 +67,4 @@ is predefined and is equal to 90 degrees);</li>
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_sketcher_page "Sketcher".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -11,7 +11,7 @@ The \b Result will be a \b GEOM_Object (SOLID).
|
||||
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeSolid(ListOfShape),</em> where
|
||||
ListOfShape is a list of shells from which the solid is constructed.
|
||||
\n <b>Arguments:</b> Name + A closed shell or a list of shells.
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of creation of
|
||||
\ref tui_creation_solid "Advanced Geometric Objects".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@ Definition of a <b>Working Plane</b> is necessary for work with
|
||||
Camera Position.
|
||||
|
||||
\n Firstly, you can select a \b Plane, a <b>Planar Face</b> or a <b>Local Coordinate System</b> to be your <b>Working Plane</b>.
|
||||
\n <b>Arguments:</b> Name + 1 selection (face or planar face).
|
||||
\n <b>Arguments:</b> Name + 1 selection (plane or planar face).
|
||||
|
||||
\image html workplane4.png
|
||||
|
||||
@ -37,4 +37,4 @@ of the working plane.
|
||||
\image html image47.gif
|
||||
<center>Reversed Direction</center>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -5,7 +5,7 @@
|
||||
\n To produce a \b Cut operation in the <b>Main Menu</b> select <b>Operations - > Boolean - > Cut</b>
|
||||
|
||||
\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 <b>Arguments:</b> Name + 2 shapes.
|
||||
|
||||
\n <b>Dialog Box:</b>
|
||||
@ -21,4 +21,4 @@
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_cut "Boolean Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>Main Object</b> to create a fillet on and the \b Radius of the
|
||||
select the <b>Main Object</b> to create a fillet on and to define the \b Radius of the
|
||||
Fillet.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFilletAll(Shape, R)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 value (fillet radius).
|
||||
@ -21,7 +21,7 @@ shape, you need to define the <b>Main Object</b> to create a fillet
|
||||
on, select the necessary edges or faces in the OCC Viewer and define
|
||||
the \b Radius of the Fillet.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFillet(Shape, R, ShapeType, ListShapes)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 Selection of edges (or faces)
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_fillet "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>Arguments:</b> Name + 2 shapes.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeFuse(s1, s2)</em>
|
||||
|
||||
@ -22,4 +22,4 @@
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_fuse "Boolean Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -10,10 +10,10 @@ given tolerance value.
|
||||
\n The \b Result will be a \b GEOM_Object.
|
||||
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeGlueFaces(theShape,
|
||||
theTolerance),</em> where \em theShape is a compound of shapes to be
|
||||
theTolerance),</em> 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 <b>Arguments:</b> Name + 1 Compound + Tolerance value.
|
||||
\n <b>Arguments:</b> Name + Compound of solids + Tolerance value.
|
||||
|
||||
\image html glue1.png
|
||||
|
||||
@ -45,4 +45,4 @@ be marked in white.
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_glue_faces "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -13,7 +13,7 @@ otherwise it will be removed.
|
||||
|
||||
\n Firstly an \b Object can be mirrored through a \b Point of symmetry
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeMirrorByPoint(Object, Point)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 vertex.
|
||||
\n <b>Arguments:</b> 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 <b>TUI Command:</b> <em>geompy.MakeMirrorByAxis(Object, Axis)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 vector.
|
||||
\n <b>Arguments:</b> 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 <b>TUI Command:</b> <em>geompy.MakeMirrorByPlane(Shape, Plane)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 plane
|
||||
\n <b>Arguments:</b> Name + one or several objects + 1 plane
|
||||
|
||||
\image html transformation9.png
|
||||
|
||||
@ -45,4 +45,4 @@ symmetry
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_mirror "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -5,13 +5,13 @@
|
||||
\n To <b>Modify the Location</b> in the <b>Main Menu</b> select
|
||||
<b>Operations - > Transformation - > Modify the Location</b>.
|
||||
|
||||
\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 <b>Create a copy</b> 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 <b>Create a copy</b> checkbox allows to keep the initial objects, otherwise they
|
||||
will be removed.
|
||||
\n <b>Arguments:</b> Name + 1 Object + End Coordinate System.
|
||||
\n <b>Arguments:</b> 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 <b>Create a copy</b> checkbox allows to keep the initial object,
|
||||
otherwise it will be removed.
|
||||
\n <b>Arguments:</b> Name + 1 Object + Start Coordinate System + End
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of the use
|
||||
of \ref tui_modify_location "Transformation Operations".
|
||||
of \ref tui_translation "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -17,7 +17,8 @@ be 2*PI/NbTimes
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 vector for direction + 1 value
|
||||
(repetition).
|
||||
|
||||
\b There is a <b>TUI</b>-only command
|
||||
\b <b>NB!</b> There is another way to execute a Multi-rotation
|
||||
operation, which is currently accessible only via TUI commands:
|
||||
<em>geompy.MakeMultiRotation1D(Shape, Dir, Point, NbTimes)</em> 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 <b>Arguments:</b> Name + 1 shape + 1 vector for direction + 1 angle
|
||||
+ 1 value (repetition) + 1 step value + 1 value (repetition).
|
||||
|
||||
There is a <b>TUI</b>-only command
|
||||
<b>NB!</b> There is another way to execute a Double Multi-rotation
|
||||
operation, which is currently accessible only via TUI commands:
|
||||
<em>geompy.MakeMultiRotation2D(Shape, Dir, Point, Angle, nbtimes1, Step,nbtimes2)</em>
|
||||
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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_multi_rotation "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -10,9 +10,9 @@ two directions.
|
||||
\n The \b Result will be one or several \b GEOM_Objects (compound).
|
||||
|
||||
\n To produce a <b>Simple Multi Translation</b> (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 <b>Number of Times</b> the
|
||||
shape must be moved.
|
||||
Object should be duplicated.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeMultiTranslation1D(Shape, Dir,
|
||||
Step, NbTimes)</em>
|
||||
\n <b>Arguments:</b> 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 <b>Double Multi Translation</b> (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 <b>Number of Times</b> 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 <b>Number of Times</b> the shape must be duplicated.
|
||||
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeMultiTranslation2D(Shape, Dir1,
|
||||
Step1, NbTimes1, Dir2, Step2, NbTimes2),</em> where \em Shape is a shape
|
||||
@ -48,4 +47,4 @@ along \em Dir2.
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_multi_translation "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>TUI Command:</b> <em>geompy.MakeOffset(Shape, Offset),</em>
|
||||
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 <b>Arguments:</b> Name + Object (face, shell, solid, compound) +
|
||||
\n <b>Arguments:</b> Name + Object (face(s), shell(s), solid(s)) +
|
||||
Offset value
|
||||
|
||||
\image html transformation11.png
|
||||
@ -25,4 +25,4 @@ Offset value
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_offset "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -11,9 +11,7 @@
|
||||
<li>\subpage sewing_operation_page</li>
|
||||
<li>\subpage glue_faces_operation_page</li>
|
||||
<li>\subpage add_point_on_edge_operation_page</li>
|
||||
<li>\subpage check_free_boundaries_operation_page</li>
|
||||
<li>\subpage check_free_faces_operation_page</li>
|
||||
<li>\subpage change_orientation_operation_page</li>
|
||||
</ul>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>TUI Command:</b> <em>geompy.MakeRotation(Shape, Axis, Angle)</em>
|
||||
\n <b>Arguments:</b> 1 shape + 1 vector for direction of rotation + 1
|
||||
\n <b>Arguments:</b> 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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_rotation "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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 <b>TUI Command:</b> <em>geompy.MakeSection(s1, s2)</em>
|
||||
\n <b>Arguments:</b> Name + 2 shapes.
|
||||
|
||||
@ -22,4 +22,4 @@
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_section "Boolean Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
\n To produce a \b Sewing operation in the <b>Main Menu</b> select <b>Repair - > Sewing</b>.
|
||||
|
||||
\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 <b>TUI Command:</b> <em>geompy.MakeSewing(ListOfShape, Precision),</em>
|
||||
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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_sewing "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -125,9 +125,9 @@ type to Bezier curves and surfaces.</li>
|
||||
<li><b>Surface Mode</b> (ToBezier.SurfaceMode) - if checked in, allows
|
||||
conversion of surfaces.</li>
|
||||
<li><b>3D Curve Mode</b> (ToBezier.Curve3dMode) - if checked in,
|
||||
allows conversion of 2D curves.</li>
|
||||
<li><b>2D Curve Mode</b> (ToBezier.Curve2dMode) - if checked in,
|
||||
allows conversion of 3D curves.</li>
|
||||
<li><b>2D Curve Mode</b> (ToBezier.Curve2dMode) - if checked in,
|
||||
allows conversion of 2D curves.</li>
|
||||
<li><b>Max Tolerance</b> (ToBezier.MaxTolerance) - defines tolerance
|
||||
for detection and correction of problems.</li>
|
||||
</ul>
|
||||
@ -155,4 +155,4 @@ Processing.</em></center>
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_shape_processing "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
\n To <b>Suppress Holes</b> in the <b>Main Menu</b> select <b>Repair - > Suppress Holes</b>.
|
||||
|
||||
\n This operation removes holes on a selected shape. This operation is
|
||||
available in <b>OCC Viewer</b> only.
|
||||
\n This operation removes holes with free boundaries on a selected
|
||||
shell or face. This operation is available in <b>OCC Viewer</b> only.
|
||||
|
||||
\n The \b Result will be a \b GEOM_Object.
|
||||
|
||||
\n <b>TUI Command:</b> <em>geompy.SuppressHoles(Shape,
|
||||
ListOfWireID),</em> 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),</em> 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 <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_suppress_holes "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@
|
||||
<b>Repair - > Suppress Internal Wires</b>.
|
||||
|
||||
\n This operation removes all internal wires or specified internal
|
||||
wires from user specified faces. This operation is available in <b>OCC
|
||||
wires from user specified shapes. This operation is available in <b>OCC
|
||||
Viewer</b> only.
|
||||
|
||||
\n The \b Result will be a \b GEOM_Object.
|
||||
@ -19,10 +19,10 @@ internal wires are removed.
|
||||
<b>Arguments:</b>
|
||||
<ul>
|
||||
<li>Name of the resulting object</li>
|
||||
<li>User specified face</li>
|
||||
<li>User specified internal wires (lying on this face except for its
|
||||
boundary), or, in case the <b>Remove all internal wires</b> box is
|
||||
checked, all internal wires</li>
|
||||
<li>User specified shape</li>
|
||||
<li>User specified internal wires (lying on this shape except for its
|
||||
boundary), or all internal wires if <b>Remove all internal wires</b> box is
|
||||
checked </li>
|
||||
</ul>
|
||||
|
||||
\image html repair4.png
|
||||
@ -36,4 +36,4 @@ checked, all internal wires</li>
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_suppress_internal_wires "Repairing Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -16,20 +16,20 @@ axes.
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeTranslation(Shape, DX, DY,
|
||||
DZ),</em> where Shape is a shape to be translated, DX, DY, DZ are
|
||||
components of translation vector.
|
||||
\n <b>Arguments:</b> Name + 1 shape + 3 values (coordinates).
|
||||
\n <b>Arguments:</b> 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 <b>TUI Command:</b> <em>geompy.MakeTranslationTwoPoints(Object, Point1, Point2)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 2 vertices
|
||||
\n <b>Arguments:</b> Name + one or several objects + 2 vertices
|
||||
|
||||
\image html transformation2.png
|
||||
|
||||
\n Finally you can define an \b Object and the vector
|
||||
\n <b>TUI Command:</b> <em>geompy.MakeTranslationVector(Object, Vector)</em>
|
||||
\n <b>Arguments:</b> Name + 1 shape + 1 vector.
|
||||
\n <b>Arguments:</b> Name + one or several objects + 1 vector.
|
||||
|
||||
\image html transformation3.png
|
||||
|
||||
@ -42,4 +42,4 @@ of the vector.
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_translation "Transformation Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -88,6 +88,140 @@ print "Main moments of inertia of box 100x30x100:"
|
||||
print " Ix = ", In[9], ", Iy = ", In[10], ", Iz = ", In[11]
|
||||
\endcode
|
||||
|
||||
<br><h2>Check Free Boundaries</h2>
|
||||
|
||||
\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
|
||||
|
||||
|
||||
<br><h2>Check Free Faces</h2>
|
||||
|
||||
\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
|
||||
|
||||
|
||||
|
||||
<br><h2>Bounding Box</h2>
|
||||
|
||||
\code
|
||||
@ -130,6 +264,51 @@ print " Edge max. tolerance: ", Toler[3]
|
||||
print " Vertex min. tolerance: ", Toler[4]
|
||||
print " Vertex max. tolerance: ", Toler[5]
|
||||
\endcode
|
||||
|
||||
<br><h2>Angle</h2>
|
||||
|
||||
\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
|
||||
|
||||
|
||||
|
||||
<br><h2>What Is</h2>
|
||||
|
||||
@ -181,4 +360,4 @@ else:
|
||||
print "\nCompound is valid"
|
||||
\endcode
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -320,137 +320,5 @@ for point in edge_points:
|
||||
salome.sg.updateObjBrowser(1)
|
||||
\endcode
|
||||
|
||||
\anchor tui_check_free_boundaries
|
||||
<br><h2>Check Free Boundaries</h2>
|
||||
|
||||
\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
|
||||
<br><h2>Check Free Faces</h2>
|
||||
|
||||
\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
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -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
|
||||
<em>geompy.MakeFuse(Shape1, Shape2)</em>, where \em Shape1 and \em
|
||||
Shape2 is the second argument of Fuse operation;
|
||||
\par
|
||||
<em>geompy.MakeCommon(Shape1, Shape2)</em>, where \em Shape1 and \em
|
||||
Shape2 is the second argument of Common operation;
|
||||
\par
|
||||
<em>geompy.MakeCut(Shape1, Shape2)</em>, where \em Shape1 and \em
|
||||
Shape2 is the second argument of Cut operation;
|
||||
\par
|
||||
<em>geompy.MakeSection(Shape1, Shape2)</em>, where \em Shape1 and \em
|
||||
Shape2 is the second argument of Section operation;
|
||||
|
||||
\n Our <b>TUI Scripts</b> provide you with useful examples of the use of
|
||||
\ref tui_boolean_operations_page "Boolean Operations".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -10,8 +10,11 @@ concerning created or imported geometrical objects. They are:
|
||||
<li>\ref basic_prop_anchor "Basic properties"</li>
|
||||
<li>\ref center_mass_anchor "Center of mass"</li>
|
||||
<li>\ref inertia_anchor "Inertia"</li>
|
||||
<li>\ref boundaries_anchor "Check Free Boundaries"</li>
|
||||
<li>\ref faces_anchor "Check Faces"</li>
|
||||
<li>\ref bounding_box_anchor "Bounding box"</li>
|
||||
<li>\ref min_distance_anchor "Min. distance"</li>
|
||||
<li>\ref angle_anchor "Angle"</li>
|
||||
<li>\ref tolerance_anchor "Tolerance"</li>
|
||||
<li>\ref whatis_anchor "WhatIs"</li>
|
||||
<li>\ref check_anchor "Check"</li>
|
||||
@ -65,19 +68,48 @@ the shape for which a center of gravity is computed.
|
||||
\anchor inertia_anchor
|
||||
<br><h2>Inertia</h2>
|
||||
|
||||
Returns the axis of inertia for the selected geometrical object.
|
||||
Returns the axial moments of inertia for the selected geometrical object.
|
||||
|
||||
\n <b>Result:</b> Displays the matrix and moments of inertia in the
|
||||
form of Python Tuple <center>(I11, I12, I13,</center>
|
||||
\n <b>Result:</b> Displays the matrix of the own moments of inertia and
|
||||
the relative moments of inertia in the form of Python Tuple
|
||||
<center>(I11, I12, I13,</center>
|
||||
<center>I21, I22, I23,</center>
|
||||
<center>I31, I32, I33,</center>
|
||||
<center>Ix, Iy, Iz).</center>
|
||||
\n <b>TUI Command:</b> <em>geompy.Inertia(Shape),</em> 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
|
||||
<br><h2>Check Free Boundaries</h2>
|
||||
|
||||
\n Detects and highlights wires and edges that are not shared between
|
||||
two faces and are considered a shape's boundary.
|
||||
|
||||
\n <b>TUI Command:</b> <em>(NoError, ClosedWires, OpenWires) =
|
||||
geompy.GetFreeBoundary(Shape),</em> 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
|
||||
<br><h2>Check Free Faces</h2>
|
||||
|
||||
\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 <b>TUI Command:</b> <em>GetFreeFacesIDs(Shape),</em> where \em Shape is
|
||||
a shape to be checked.
|
||||
|
||||
\image html repair10.png
|
||||
|
||||
\anchor bounding_box_anchor
|
||||
<br><h2>Bounding box</h2>
|
||||
|
||||
@ -95,14 +127,24 @@ is a shape for which a bounding box is computed.
|
||||
\anchor min_distance_anchor
|
||||
<br><h2>Min. distance</h2>
|
||||
|
||||
\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 <b>TUI Command:</b> <em>geompy.MinDistance(Shape1, Shape2),</em>
|
||||
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
|
||||
<br><h2>Angle</h2>
|
||||
|
||||
\n Returns the angle between two lines or linear edges
|
||||
\n <b>TUI Command:</b> <em>geompy.GetAngle(shape1, shape2), where
|
||||
Shape1 and Shape2 are shapes between which the angle is computed.
|
||||
|
||||
\image html angle.png
|
||||
|
||||
\anchor tolerance_anchor
|
||||
<br><h2>Tolerance</h2>
|
||||
|
||||
@ -136,7 +178,7 @@ geometry as well.
|
||||
|
||||
\n <b>Result:</b> Boolean.
|
||||
\n <b>TUI Command:</b> <em>geompy.(theShape, theIsCheckGeom = 0),</em>
|
||||
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
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -21,10 +21,10 @@ Wireframe and Shading presentation.</li>
|
||||
<li>\ref color_page "Color" - allows to change the filling color in
|
||||
the standard <b>Select Color</b> menu.</li>
|
||||
<li>\ref transparency_page "Transparency" - allows to change the
|
||||
transparency of mesh elements.</li>
|
||||
transparency of geometrical objects.</li>
|
||||
<li>\ref isolines_page "Isos" - allows to change the number of
|
||||
isolines displayed within a shape.</li>
|
||||
<li><b>Erase</b> - allows to hide the selected mesh from the
|
||||
<li><b>Erase</b> - allows to hide the selected geometrical object from the
|
||||
viewer. TUI Command : <em>sg.EraseOnly(ID)</em>
|
||||
\n \image html image18.gif
|
||||
</li>
|
||||
@ -32,11 +32,11 @@ viewer. TUI Command : <em>sg.EraseOnly(ID)</em>
|
||||
Command: <em>sg.EraseAll()</em>
|
||||
\n \image html image26.gif
|
||||
</li>
|
||||
<li><b>Display Only</b> - allows to display only the selected mesh,
|
||||
hiding all other from the viewer. TUI Command: <em>sg.DisplayOnly(ID)</em>
|
||||
<li><b>Display Only</b> - allows to display only the selected
|
||||
geometrical object. TUI Command: <em>sg.DisplayOnly(ID)</em>
|
||||
\n \image html image33.gif
|
||||
</li>
|
||||
<li><b>Update</b> - refreshes the presentation of your mesh in the
|
||||
<li><b>Update</b> - refreshes the presentation of your geometrical object in the
|
||||
Object Browser, applying all recent changes.</li>
|
||||
<li><b>Dump view</b> - exports an object from the viewer in bmp, png,
|
||||
jpg or jpeg image format.</li>
|
||||
@ -50,4 +50,4 @@ on the viewer background:
|
||||
<li><b>Select Only</b> provides a filter for exclusive selection of objects of a certain type.</li>
|
||||
</ul>
|
||||
|
||||
*/
|
||||
*/
|
||||
|
@ -20,7 +20,7 @@ In this Menu:
|
||||
|
||||
<ul>
|
||||
<li><b>Shape Type</b> radio button define the type of elements for the
|
||||
group (points, lines, planes or shapes).</li>
|
||||
group (points, wires, faces, shells or solids).</li>
|
||||
<li><b>Group Name</b> - here you can enter the name of the group, by
|
||||
default, it is Group_n.</li>
|
||||
<li>Then, using the "Select" button, select the <b>Main Shape</b> (a
|
||||
@ -86,4 +86,4 @@ the sub shape to be removed from the group.</li>
|
||||
Our <b>TUI Scripts</b> provide you with useful examples of
|
||||
\ref tui_working_with_groups_page "Working with Groups".
|
||||
|
||||
*/
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user