From: jfa Date: Fri, 3 Nov 2006 13:41:01 +0000 (+0000) Subject: Update documentation for Partition and RotationThreePnt. X-Git-Tag: V3_2_3pre2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9f65843e87d393d4af11c9ce40f7cd5408076696;p=modules%2Fgeom.git Update documentation for Partition and RotationThreePnt. --- diff --git a/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html b/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html index 768eb3629..db755196e 100644 --- a/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html +++ b/doc/salome/gui/GEOM/geompy_doc/namespacegeompy.html @@ -36,6 +36,9 @@ def MakeVertexOnCurve  Create a point, corresponding to the given parameter on the given curve.
+def MakeTangentOnCurve + + Create a tangent, corresponding to the given parameter on the given curve.
def MakeVectorDXDYDZ  Create a vector with the given components.
@@ -138,6 +141,12 @@ def MakeRevolution  Create a shape by revolution of the base shape around the axis on the given angle, i.e.
+def MakeThruSections + + Create a shell or solid passing through set of sections.Sections should be wires,edges or vertices.
+def MakePipeWithDifferentSections + + Create a shape by extrusion of the profile shape along the path shape.
def MakeEdge  Create a linear edge with specified ends.
@@ -186,6 +195,12 @@ def GetShapesOnPlaneIDs  Works like the above method, but returns list of sub-shapes indices.
+def GetShapesOnPlaneWithLocation + + Find in theShape all sub-shapes of type theShapeType, situated relatively the specified plane by the certain way, defined through theState parameter.
+def GetShapesOnPlaneWithLocationIDs + + Works like the above method, but returns list of sub-shapes indices.
def GetShapesOnCylinder  Find in theShape all sub-shapes of type theShapeType, situated relatively the specified cylinder by the certain way, defined through theState parameter.
@@ -255,6 +270,12 @@ def DivideEdge  Addition of a point to a given edge object.
+def ChangeOrientationShell + + Change orientation of the given object.
+def ChangeOrientationShellCopy + + Change orientation of the given object.
def GetFreeBoundary  Get a list of wires (wrapped in GEOM_Object-s), that constitute a free boundary of the given shape.
@@ -303,6 +324,9 @@ def MakeRotation  Rotate the given object around the given axis on the given angle, creating its copy before the rotatation.
+def MakeRotationThreePoints + + Rotate given object around vector perpendicular to plane containing three points, creating its copy before the rotatation.
def MakeScaleTransform  Scale the given object by the factor, creating its copy before the scaling.
@@ -317,7 +341,7 @@  Create an object, symmetrical to the given one relatively the given point.
def MakePosition - Modify the Location of the given object by LCS creating its copy before the setting.
+ Modify the Location of the given object by LCS, creating its copy before the setting.
def MakeOffset  Create new object as offset of the given one.
@@ -387,6 +411,9 @@ def CheckShape  Check a topology of the given shape.
+def GetPosition + + Get position (LCS) of theShape.
def Import  Import a shape from the BREP or IGES or STEP file (depends on given format) with given name.
@@ -512,8 +539,10 @@  Returns a main shape associated with the group.
def GetEdgesByLength + Create group of edges of theShape, whose length is in range [min_length, max_length].
def SelectEdges + Create group of edges of selected shape, whose length is in range [min_length, max_length].
def addPath  Add Path to load python scripts from.
@@ -890,6 +919,50 @@ Example: see GEOM_TestAll.py Example: see GEOM_TestAll.py +

+ + + + +
+ + + + + + + + + + + + + + + + + + +
def geompy::MakeTangentOnCurve   theRefCurve,
  theParameter
+
+ + + + + +
+   + + +

+

Parameters:
+ + + +
theRefCurve The referenced curve.
theParameter Value of parameter on the referenced curve.
+
+
Returns:
New GEOM_Object, containing the created tangent.
+

@@ -1218,7 +1291,7 @@ Example: see GEOM_TestAll.py

Parameters:
- +
theFace Referenced plane.
theFace Referenced plane or LCS(Marker).
theTrimSize New half size of a side of quadrangle face, representing the plane.
@@ -1776,7 +1849,7 @@ Example: see GEOM_TestAll.py

Parameters:
- +
theCommand String, defining the sketcher in local coordinates of the working plane.
theWorkingPlane Planar Face of the working plane.
theWorkingPlane Planar Face or LCS(Marker) of the working plane.
Returns:
New GEOM_Object, containing the created wire.
@@ -2602,6 +2675,129 @@ all the space, transfixed by the base shape during its rotation around the axis Example: see GEOM_TestAll.py +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def geompy::MakeThruSections   theSeqSections,
  theModeSolid,
  thePreci,
  theRuled
+
+ + + + + +
+   + + +

+

Parameters:
+ + + + + +
theSeqSections - set of specified sections.
theModeSolid - mode defining building solid or shell
thePreci - precision 3D used for smoothing by default 1.e-6
theRuled - mode defining type of the result surfaces (ruled or smoothed).
+
+
Returns:
New GEOM_Object, containing the created shell or solid.
+Example: see GEOM_TestAll.py
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def geompy::MakePipeWithDifferentSections   theSeqBases,
  theLocations,
  thePath,
  theWithContact,
  theWithCorrection
+
+ + + + + +
+   + + +

+The path shape can be a wire or an edge. the several profiles can be specified in the several locations of path.

Parameters:
+ + + + + + +
theSeqBases - list of Bases shape to be extruded.
theLocations - list of locations on the path corresponding specified list of the Bases shapes. Number of locations should be equal to number of bases or list of locations can be empty.
thePath - Path shape to extrude the base shape along it.
theWithContact - the mode defining that the section is translated to be in contact with the spine.
- WithCorrection - defining that the section is rotated to be orthogonal to the spine tangent in the correspondent point
+
+
Returns:
New GEOM_Object, containing the created pipe.
+Example: see GEOM_TestAll.py

@@ -2716,7 +2912,7 @@ Example: see GEOM_TestAll.py

Parameters:
- +
theWire Wire to build the face on.
theWire closed Wire or Edge to build the face on.
isPlanarWanted If TRUE, only planar face will be built. If impossible, NULL object will be returned.
@@ -2760,7 +2956,7 @@ Example: see GEOM_TestAll.py

Parameters:
- +
theWires List of wires to build the face on.
theWires List of closed wires or edges to build the face on.
isPlanarWanted If TRUE, only planar face will be built. If impossible, NULL object will be returned.
@@ -3225,6 +3421,126 @@ Example: see GEOM_TestOthers.py +

+Example: see GEOM_TestOthers.py + + +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def geompy::GetShapesOnPlaneWithLocation   theShape,
  theShapeType,
  theAx1,
  thePnt,
  theState
+
+ + + + + +
+   + + +

+

Parameters:
+ + + + + + +
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theAx1 Vector (or line, or linear edge), specifying normal direction of the plane to find shapes on.
thePnt Point specifying location of the plane to find shapes on.
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
+
+
Returns:
List of all found sub-shapes.
+Example: see GEOM_TestOthers.py
+

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def geompy::GetShapesOnPlaneWithLocationIDs   theShape,
  theShapeType,
  theAx1,
  thePnt,
  theState
+
+ + + + @@ -3537,8 +3853,10 @@ Example: see GEOM_TestOthers.py
+   + +

Example: see GEOM_TestOthers.py

- - + + + +
theShape Shape to find sub-shapes of.
theShapeType Type of sub-shapes to be retrieved.
theCenter Point, specifying center of the sphere to find shapes on.
theRadius Radius of the sphere to find shapes on.
theTopLeftPoint Point, specifying top left corner of a quadrangle
theTopRigthPoint Point, specifying top right corner of a quadrangle
theBottomLeftPoint Point, specifying bottom left corner of a quadrangle
theBottomRigthPoint Point, specifying bottom right corner of a quadrangle
theState The state of the subshapes to find. It can be one of ST_ON, ST_OUT, ST_ONOUT, ST_IN, ST_ONIN.
@@ -4375,6 +4693,73 @@ Example: see GEOM_TestHealing.py Example: see GEOM_TestHealing.py +

+ + + + +
+ + + + + + + + + +
def geompy::ChangeOrientationShell   theObject  ) 
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
theObject Shape to be processed. given shape
+
+
+

+ + + + +
+ + + + + + + + + +
def geompy::ChangeOrientationShellCopy   theObject  ) 
+
+ + + + + +
+   + + +

+

Parameters:
+ + +
theObject Shape to be processed.
+
+
Returns:
New GEOM_Object, containing processed shape.
+

@@ -4819,12 +5204,16 @@ Example: see GEOM_TestOthers.py
Parameters:
- + +
ListShapes Shapes to be intersected.
ListTools Shapes to intersect theShapes.
ListTools Shapes to intersect theShapes. !!!NOTE: shapes from this lists (for each separately) can not have intersections with each other.
+ +After implementation new version of PartitionAlgo (October 2006) other parameters are ignored by current functionality. They are kept in this function only for support old versions. Ignored parameters:

Parameters:
+ - +
ListKeepInside Shapes, outside which the results will be deleted. Each shape from theKeepInside must belong to theShapes also.
ListRemoveInside Shapes, inside which the results will be deleted. Each shape from theRemoveInside must belong to theShapes also.
Limit Type of resulting shapes (corresponding to TopAbs_ShapeEnum).
RemoveWebs If TRUE, perform Glue 3D algorithm.
ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
Returns:
New GEOM_Object, containing the result shapes.
@@ -5144,6 +5533,63 @@ Example: see GEOM_TestAll.py Example: see GEOM_TestAll.py +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def geompy::MakeRotationThreePoints   theObject,
  theCentPoint,
  thePoint1,
  thePoint2
+
+ + + + + +
+   + + +

+

Parameters:
+ + + + +
theObject The object to be rotated.
theCentPoint central point - the axis is the vector perpendicular to the plane containing the three points.
thePoint1 and thePoint2 - in a perpendicular plan of the axis.
+
+
Returns:
New GEOM_Object, containing the rotated object.
+Example: see GEOM_TestAll.py

@@ -5367,6 +5813,14 @@ Example: see GEOM_TestAll.py

+

Parameters:
+ + + + +
theObject The object to be displaced.
theStartLCS Coordinate system to perform displacement from it. If theStartLCS is NULL, displacement will be performed from global CS. If theObject itself is used as theStartLCS, its location will be changed to theEndLCS.
theEndLCS Coordinate system to perform displacement to it.
+
+
Returns:
New GEOM_Object, containing the displaced shape.
Example: see GEOM_TestAll.py
@@ -6459,6 +6913,50 @@ Example: see GEOM_TestMeasures.py def geompy::CheckShape (    + theShape, + + + + +   + theIsCheckGeom = 0 + + + + )  + + + + + + + + + + + +
+   + + +

+

Parameters:
+ + + +
theShape Shape to check validity of.
theIsCheckGeom If FALSE, only the shape's topology will be checked, if TRUE, the shape's geometry will be checked also.
+
+
Returns:
TRUE, if the shape "seems to be valid". If theShape is invalid, prints a description of problem.
+Example: see GEOM_TestMeasures.py
+

+ + + +If include_min/max == 0, edges with length == min/max_length will not be included in result.
+ + + + + @@ -6475,12 +6973,13 @@ Example: see GEOM_TestMeasures.py
def geompy::GetPosition   theShape  ) 

+Origin of the LCS is situated at the shape's center of mass. Axes of the LCS are obtained from shape's location or, if the shape is a planar face, from position of its plane.

Parameters:
- +
theShape Shape to check validity of.
theShape Shape to calculate position of.
-
Returns:
TRUE, if the shape "seems to be valid" from the topological point of view. If theShape is invalid, prints a description of problem.
+
Returns:
[Ox,Oy,Oz, Zx,Zy,Zz, Xx,Xy,Xz]. Ox,Oy,Oz: Coordinates of shape's LCS origin. Zx,Zy,Zz: Coordinates of shape's LCS normal(main) direction. Xx,Xy,Xz: Coordinates of shape's LCS X direction.
Example: see GEOM_TestMeasures.py
@@ -7498,7 +7997,7 @@ Example: see GEOM_Spanner.py

-Unite faces and edges, sharing one surface.

Parameters:
+Unite faces and edges, sharing one surface. It means that this faces must have references to one C++ surface object (handle).
Parameters:
theShape The compound or single solid to remove irregular edges from.
@@ -8339,7 +8838,7 @@ Example: see GEOM_TestOthers.py

-

@@ -8388,7 +8887,7 @@ Example: see GEOM_TestOthers.py

- +If include_min/max == 0, edges with length == min/max_length will not be included in result.

diff --git a/doc/salome/gui/GEOM/partition.htm b/doc/salome/gui/GEOM/partition.htm index 7efc6046d..d0a3e0f25 100755 --- a/doc/salome/gui/GEOM/partition.htm +++ b/doc/salome/gui/GEOM/partition.htm @@ -112,12 +112,12 @@ if (window.writeIntopicBar) ListOfTools, ListOfKeepInside, ListOfRemoveInside, Limit, RemoveWebs, ListOfMaterials), where ListOfShapes is a list of shapes to be intersected, ListOfTools is a list of shapes to intersect the shapes from - ListOfShapes, ListOfKeepInside is a list of shapes outside which the results - will be deleted, ListOfRemoveInside is a list of shapes inside which the - results will be deleted, Limit is a type of the result shapes, if RemoveWebs - is True the Glue 3D algorithm will be performed on the results, ListOfMaterials - is a list of materials indices for each shape, it makes sense only if - RemoveWebs is True.

+ ListOfShapes. Shapes from these two lists (for each separately) + can not have intersections with each other. + After implementation of a new version of PartitionAlgo (October 2006) + other parameters are ignored by current functionality. They are kept + in this function only for support of old scripts. +

Arguments: Name + 2 shapes (the first shape @@ -125,11 +125,7 @@ if (window.writeIntopicBar)

 

-

- -

 

- -

+

 

@@ -151,7 +147,7 @@ if (window.writeIntopicBar)

 

-

+

 

diff --git a/doc/salome/gui/GEOM/pics/partition1.png b/doc/salome/gui/GEOM/pics/partition1.png index eb6bf4305..ba25844c4 100755 Binary files a/doc/salome/gui/GEOM/pics/partition1.png and b/doc/salome/gui/GEOM/pics/partition1.png differ diff --git a/doc/salome/gui/GEOM/pics/partition2.png b/doc/salome/gui/GEOM/pics/partition2.png index bd388a5fb..4fbd02e77 100755 Binary files a/doc/salome/gui/GEOM/pics/partition2.png and b/doc/salome/gui/GEOM/pics/partition2.png differ diff --git a/doc/salome/gui/GEOM/pics/transformation4.png b/doc/salome/gui/GEOM/pics/transformation4.png index 5b1775686..8313331d6 100755 Binary files a/doc/salome/gui/GEOM/pics/transformation4.png and b/doc/salome/gui/GEOM/pics/transformation4.png differ diff --git a/doc/salome/gui/GEOM/pics/transformation4a.png b/doc/salome/gui/GEOM/pics/transformation4a.png new file mode 100644 index 000000000..7cfeb84ba Binary files /dev/null and b/doc/salome/gui/GEOM/pics/transformation4a.png differ diff --git a/doc/salome/gui/GEOM/rotation.htm b/doc/salome/gui/GEOM/rotation.htm index 374ce1204..19f2c775f 100755 --- a/doc/salome/gui/GEOM/rotation.htm +++ b/doc/salome/gui/GEOM/rotation.htm @@ -115,11 +115,15 @@ if (window.writeIntopicBar) checkbox allows to keep the initial object, otherwise it will be removed.

-

 

-

The Result will be any  GEOM_Object.

+

 

+ +

Firstly you can define an Object  to + be rotated, an Axis of rotation + and an Angle of rotation.

+

TUI Command: geompy.MakeRotation(Shape, Axis, Angle)

@@ -131,7 +135,26 @@ if (window.writeIntopicBar)

 

-

+

+ +

 

+ +

Secondly you can define an Object + and three points. Rotation axis will pass through the first point and will be orthogonal + to a plane, defined by the three points. Rotation angle in this case is an angle between + two vectors, directed from the first point to the second and to the third points correspondingly.

+ +

TUI Command: + geompy.MakeRotationThreePoints(Shape, CentralPoint, + Point1, Point2)

+ +

Arguments: 1 shape + 3 points.

+ +

 

+ +

 

+ +

 

diff --git a/doc/salome/gui/GEOM/transformation_operations.htm b/doc/salome/gui/GEOM/transformation_operations.htm index 4547213f2..b3aba4ffb 100755 --- a/doc/salome/gui/GEOM/transformation_operations.htm +++ b/doc/salome/gui/GEOM/transformation_operations.htm @@ -183,69 +183,56 @@ if (window.writeIntopicBar)

# create a vertex and a vector

-

p1 = geompy.MakeVertex(10, - 40, 0)

- -

p2 = geompy.MakeVertex( - 0,  0, 50)

- -

p3 = geompy.MakeVertex(10, - 50,-20)

+

p1 = geompy.MakeVertex(10, 40,  0)

+

p2 = geompy.MakeVertex( 0,  0, 50)

+

p3 = geompy.MakeVertex(10, 50,-20)

+

p4 = geompy.MakeVertex(10, 50, 60)

-

p4 = geompy.MakeVertex(10, - 50, 60)

- -

v = geompy.MakeVector(p1, - p2)

- -

vr = geompy.MakeVector(p3, - p4)

+

v = geompy.MakeVector(p1, p2)

+

vr = geompy.MakeVector(p3, p4)

 

# create a cylinder

height = 35

-

radius1 = 20

-

cylinder = geompy.MakeCylinder(p1, - v, radius1, height)

+

cylinder = geompy.MakeCylinder(p1, v, radius1, height)

 

# rotate the given object around the given axis by the given angle

-

rotation = geompy.MakeRotation(cylinder, - vr, math.pi)

+

rotation1 = geompy.MakeRotation(cylinder, vr, math.pi)

+

rotation2 = geompy.MakeRotationThreePoints(cylinder, p4, p1, p2)

 

# add objects in the study

-

id_vr = geompy.addToStudy(vr, - "Rotation axis")

- -

id_cylinder = geompy.addToStudy(cylinder, - "Cylinder")

- -

id_rotation = geompy.addToStudy(rotation, - "Rotation")

+

id_vr = geompy.addToStudy(vr, "Rotation 1 axis")

+

id_p4 = geompy.addToStudy(p4, "Rotation 2 center")

+

id_p1 = geompy.addToStudy(p1, "Rotation 2 point 1")

+

id_p2 = geompy.addToStudy(p2, "Rotation 2 point 2")

+

id_cylinder = geompy.addToStudy(cylinder, "Cylinder")

+

id_rotation1 = geompy.addToStudy(rotation1, "Rotation 1")

+

id_rotation2 = geompy.addToStudy(rotation2, "Rotation 2")

 

# display the results

gg.createAndDisplayGO(id_vr)

- +

gg.createAndDisplayGO(id_p4)

+

gg.createAndDisplayGO(id_p1)

+

gg.createAndDisplayGO(id_p2)

gg.createAndDisplayGO(id_cylinder)

-

gg.setDisplayMode(id_cylinder,1)

- -

gg.createAndDisplayGO(id_rotation)

- -

gg.setDisplayMode(id_rotation,1) -

+

gg.createAndDisplayGO(id_rotation1)

+

gg.createAndDisplayGO(id_rotation2)

+

gg.setDisplayMode(id_rotation1,1)

+

gg.setDisplayMode(id_rotation2,1)