Returns:
data packed to the byte stream
-
+
Example of usage:
val = PackData("10001110") # val = 0xAE
val = PackData("1") # val = 0x80
texture bitmap itself.
This function can be used to read the texture to the byte stream in order to pass it to
the AddTexture() function of geompy class.
-
+
Parameters:
fname texture file name
Returns:
sequence of tree values: texture's width, height in pixels and its byte stream
-
+
Example of usage:
import geompy
geompy.init_geom(salome.myStudy)
theAddPrefix add prefix "from_" to names of restored sub-shapes,
and prefix "from_subshapes_of_" to names of partially restored sub-shapes.
- Returns:
+ Returns:
list of published sub-shapes
"""
# Example: see GEOM_TestAll.py
theX The X coordinate of the point.
theY The Y coordinate of the point.
theZ The Z coordinate of the point.
-
- Returns:
+
+ Returns:
New GEOM.GEOM_Object, containing the created point.
"""
# Example: see GEOM_TestAll.py
def MakeVertexOnCurveByCoord(self,theRefCurve, theX, theY, theZ):
"""
Create a point by projection give coordinates on the given curve
-
+
Parameters:
theRefCurve The referenced curve.
theX X-coordinate in 3D space
theParameterU horisontal value of the center point (0.0 - 1.0).
theTrimSize the size of plane.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created tangent.
Example of usage:
theDY Y component of the vector.
theDZ Z component of the vector.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created vector.
"""
# Example: see GEOM_TestAll.py
thePnt1 Start point for the vector.
thePnt2 End point for the vector.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created vector.
"""
# Example: see GEOM_TestAll.py
theVec Vector, defining the plane normal direction.
theTrimSize Half size of a side of quadrangle face, representing the plane.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created plane.
"""
# Example: see GEOM_TestAll.py
theVec2 Vector, defining the plane normal direction.
theTrimSize Half size of a side of quadrangle face, representing the plane.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created plane.
"""
# Example: see GEOM_TestAll.py
"""
Create a plane, based on a Local coordinate system.
- Parameters:
+ Parameters:
theLCS coordinate system, defining plane.
theTrimSize Half size of a side of quadrangle face, representing the plane.
theOrientation OXY, OYZ or OZX orientation - (1, 2 or 3)
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created plane.
"""
# Example: see GEOM_TestAll.py
"""
Create a local coordinate system.
- Parameters:
+ Parameters:
OX,OY,OZ Three coordinates of coordinate system origin.
XDX,XDY,XDZ Three components of OX direction
YDX,YDY,YDZ Three components of OY direction
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created coordinate system.
"""
# Example: see GEOM_TestAll.py
Parameters:
theShape The initial shape to detect the coordinate system.
-
- Returns:
+
+ Returns:
New GEOM.GEOM_Object, containing the created coordinate system.
"""
anObj = self.BasicOp.MakeMarkerFromShape(theShape)
theXVec Vector of X direction
theYVec Vector of Y direction
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created coordinate system.
"""
thePnt2 Middle point of the arc.
thePnt3 End point of the arc.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created arc.
"""
# Example: see GEOM_TestAll.py
theRMinor Minor ellipse radius.
theVecMaj Vector, direction of the ellipse's main axis.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created ellipse.
"""
# Example: see GEOM_TestAll.py
theDoReordering If True, the algo does not follow the order of
thePoints but searches for the closest vertex.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created B-Spline curve.
"""
# Example: see GEOM_TestAll.py
if theNewMethod:
anObj = self.CurvesOp.MakeCurveParametricNew(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
else:
- anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
+ anObj = self.CurvesOp.MakeCurveParametric(thexExpr,theyExpr,thezExpr,theParamMin,theParamMax,theParamStep,theCurveType)
RaiseIfFailed("MakeSplineInterpolation", self.CurvesOp)
anObj.SetParameters(Parameters)
return anObj
-
+
# end of l4_curves
- CMD is one of
- "R angle" : Set the direction by angle
- "D dx dy" : Set the direction by DX & DY
-
+
- "TT x y" : Create segment by point at X & Y
- "T dx dy" : Create segment by point with DX & DY
- "L length" : Create segment by direction & Length
- "WW" : Close Wire (to finish)
- "WF" : Close Wire and build face (to finish)
-
+
- Flag1 (= reverse) is 0 or 2 ...
- if 0 the drawn arc is the one of lower angle (< Pi)
- if 2 the drawn arc ius the one of greater angle (> Pi)
-
+
- Flag2 (= control tolerance) is 0 or 1 ...
- if 0 the specified end point can be at a distance of the arc greater than the tolerance (10^-7)
- if 1 the wire is built only if the end point is on the arc
def MakeBox (self, x1,y1,z1, x2,y2,z2):
"""
Create a box by coordinates of two opposite vertices.
-
+
Parameters:
x1,y1,z1 double values, defining first point.
x2,y2,z2 double values, defining second point.
-
+
Returns:
New GEOM.GEOM_Object, containing the created box.
"""
theDY Length of Box edges, parallel to OY axis.
theDZ Length of Box edges, parallel to OZ axis.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created box.
"""
# Example: see GEOM_TestAll.py
theVec Vector, normal to the plane of the disk.
theR Disk radius.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created disk.
"""
# Example: see GEOM_TestAll.py
Parameters:
thePnt1,thePnt2,thePnt3 Points, defining the disk.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created disk.
"""
# Example: see GEOM_TestAll.py
theR Radius of Face.
theOrientation set the orientation belong axis OXY or OYZ or OZX
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created disk.
Example of usage:
theR Cylinder radius.
theH Cylinder height.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created cylinder.
"""
# Example: see GEOM_TestAll.py
theR Cylinder radius.
theH Cylinder height.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created cylinder.
"""
# Example: see GEOM_TestAll.py
thePnt Sphere center.
theR Sphere radius.
- Returns:
- New GEOM.GEOM_Object, containing the created sphere.
+ Returns:
+ New GEOM.GEOM_Object, containing the created sphere.
"""
# Example: see GEOM_TestAll.py
theR,Parameters = ParseParameters(theR)
"""
Create a sphere with given center and radius.
- Parameters:
+ Parameters:
x,y,z Coordinates of sphere center.
theR Sphere radius.
"""
Create a sphere with given radius at the origin of coordinate system.
- Parameters:
+ Parameters:
theR Sphere radius.
Returns:
- New GEOM.GEOM_Object, containing the created sphere.
+ New GEOM.GEOM_Object, containing the created sphere.
"""
# Example: see GEOM_TestAll.py
theR,Parameters = ParseParameters(theR)
"""
Create a cone with given base point, axis, height and radiuses.
- Parameters:
+ Parameters:
thePnt Central point of the first cone base.
theAxis Cone axis.
theR1 Radius of the first cone base.
the origin of coordinate system. Axis of the cone will
be collinear to the OZ axis of the coordinate system.
- Parameters:
+ Parameters:
theR1 Radius of the first cone base.
theR2 Radius of the second cone base.
theH Cone height.
"""
Create a torus with given center, normal vector and radiuses.
- Parameters:
+ Parameters:
thePnt Torus central point.
theVec Torus axis of symmetry.
theRMajor Torus major radius.
"""
Create a torus with given radiuses at the origin of coordinate system.
- Parameters:
+ Parameters:
theRMajor Torus major radius.
theRMinor Torus minor radius.
Returns:
- New GEOM.GEOM_Object, containing the created torus.
+ New GEOM.GEOM_Object, containing the created torus.
"""
# Example: see GEOM_TestAll.py
theRMajor,theRMinor,Parameters = ParseParameters(theRMajor,theRMinor)
"""
Create a shape by extrusion of the base shape along a vector, defined by two points.
- Parameters:
+ Parameters:
theBase Base shape to be extruded.
thePoint1 First end of extrusion vector.
thePoint2 Second end of extrusion vector.
Create a shape by extrusion of the base shape along a
vector, defined by two points, in 2 Ways (forward/backward).
- Parameters:
+ Parameters:
theBase Base shape to be extruded.
thePoint1 First end of extrusion vector.
thePoint2 Second end of extrusion vector.
i.e. all the space, transfixed by the base shape during its translation
along the vector on the given distance.
- Parameters:
+ Parameters:
theBase Base shape to be extruded.
theVec Direction of extrusion.
theH Prism dimension along theVec.
theScaleFactor Use it to make prism with scaled second base.
Nagative value means not scaled second base.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created prism.
"""
# Example: see GEOM_TestAll.py
theAxis Rotation axis.
theAngle Rotation angle in radians.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created revolution.
"""
# Example: see GEOM_TestAll.py
theAxis Rotation axis.
theAngle Rotation angle in radians.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created revolution.
"""
theAngle,Parameters = ParseParameters(theAngle)
Approximation makes the algorithm work slower, but allows
building the surface for rather complex cases
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created filling surface.
Example of usage:
theMaxDeg a maximal degree of BSpline surface to create
theTol3D a 3d tolerance to be reached
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created filling surface.
Example of usage:
theWithCorrection - defining that the section is rotated to be
orthogonal to the spine tangent in the correspondent point (0/1)
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created solids.
"""
anObj = self.PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
same angle beetween the direction and the sections
along the sweep surface.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created pipe.
"""
# Example: see GEOM_TestAll.py
thePnt1 Point for the first end of edge.
thePnt2 Point for the second end of edge.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created edge.
"""
# Example: see GEOM_TestAll.py
at the end of theRefCurve, close to the selected point.
If None, start from the first point of theRefCurve.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created edge.
"""
# Example: see GEOM_TestAll.py
theTolerance Maximum distance between vertices, that will be merged.
Values less than 1e-07 are equivalent to 1e-07 (Precision::Confusion()).
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created wire.
"""
# Example: see GEOM_TestAll.py
algorithm tries to build any suitable face on the given
wire and prints a warning message.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created face.
"""
# Example: see GEOM_TestAll.py
Parameters:
theShape Shape to count faces of.
- Returns:
+ Returns:
Quantity of faces.
"""
# Example: see GEOM_TestOthers.py
Parameters:
theShape Shape to count edges of.
- Returns:
+ Returns:
Quantity of edges.
"""
# Example: see GEOM_TestOthers.py
Parameters:
theShape Shape to be reversed.
- Returns:
+ Returns:
The reversed copy of theShape.
"""
# Example: see GEOM_TestAll.py
theShapes Shapes to find common sub-shapes of.
theShapeType Type of sub-shapes to be retrieved (see geompy.ShapeType)
- Returns:
+ Returns:
List of GEOM.GEOM_Object, that are sub-shapes of all given shapes.
"""
# Example: see GEOM_TestOthers.py
theState The state of the sub-shapes to find (see GEOM::shape_state)
Returns:
- List of all found sub-shapes indices.
+ List of all found sub-shapes indices.
"""
# Example: see GEOM_TestOthers.py
aList = self.ShapesOp.GetShapesOnCylinderWithLocationIDs(theShape, theShapeType, theAxis, thePnt, theRadius, theState)
# certain way, defined through \a theState parameter.
# @param theCheckShape Shape for relative comparing. It must be a solid.
# @param theShape Shape to find sub-shapes of.
- # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
+ # @param theShapeType Type of sub-shapes to be retrieved (see ShapeType())
# @param theState The state of the sub-shapes to find (see GEOM::shape_state)
# @return List of all found sub-shapes.
#
Returns:
Group of all found sub-shapes or a single found sub-shape.
-
+
Note:
This function has a restriction on argument shapes.
If theShapeWhere has curved parts with significantly
# equal to \a theShapeWhat.
# @param theShapeWhere Shape to find sub-shape of.
# @param theShapeWhat Shape, specifying what to find.
- # @return List of all found sub-shapes indices.
+ # @return List of all found sub-shapes indices.
#
# @ref swig_GetSame "Example"
def GetSameIDs(self,theShapeWhere, theShapeWhat):
## Explode a shape on sub-shapes of a given type.
# If the shape itself matches the type, it is also returned.
# @param aShape Shape to be exploded.
- # @param aType Type of sub-shapes to be retrieved (see ShapeType())
+ # @param aType Type of sub-shapes to be retrieved (see ShapeType())
# @return List of sub-shapes of type theShapeType, contained in theShape.
#
# @ref swig_all_decompose "Example"
Parameters:
aShape Shape to be exploded.
- aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
+ aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
Returns:
List of sub-shapes of type theShapeType, contained in theShape.
Explode a shape on sub-shapes of a given type.
Parameters:
- aShape Shape to be exploded (see geompy.ShapeType)
+ aShape Shape to be exploded (see geompy.ShapeType)
aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
Returns:
Obtain a compound of sub-shapes of aShape,
selected by they indices in list of all sub-shapes of type aType.
Each index is in range [1, Nb_Sub-Shapes_Of_Given_Type]
-
+
Parameters:
aShape Shape to get sub-shape of.
ListOfID List of sub-shapes indices.
Sub-shapes will be sorted by coordinates of their gravity centers.
If the shape itself matches the type, it is also returned.
- Parameters:
+ Parameters:
aShape Shape to be exploded.
aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
- Returns:
+ Returns:
List of sub-shapes of type theShapeType, contained in theShape.
"""
# Example: see GEOM_TestAll.py
Explode a shape on sub-shapes of a given type.
Sub-shapes will be sorted by coordinates of their gravity centers.
- Parameters:
+ Parameters:
aShape Shape to be exploded.
aType Type of sub-shapes to be retrieved (see geompy.ShapeType)
- Returns:
+ Returns:
List of IDs of sub-shapes.
"""
ListIDs = self.ShapesOp.GetAllSubShapesIDs(aShape, EnumToLong( aType ), True)
aType The shape type (see geompy.ShapeType)
isSorted Boolean flag to switch sorting on/off.
- Returns:
+ Returns:
List of sub-shapes of type aType, contained in aShape.
"""
# Example: see GEOM_TestAll.py
aShape Main shape.
anIDs List of unique IDs of sub-shapes inside theMainShape.
- Returns:
+ Returns:
List of GEOM.GEOM_Object, corresponding to found sub-shapes.
"""
# Example: see GEOM_TestAll.py
# are coincidental. The curves or surfaces may still meet at an angle, giving rise to a sharp corner or edge).\n
# \b C1 (Tangential Continuity): first derivatives are equal (the end vectors of curves or surfaces are parallel,
# ruling out sharp edges).\n
- # \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
+ # \b C2 (Curvature Continuity): first and second derivatives are equal (the end vectors of curves or surfaces
# are of the same magnitude).\n
# \b CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of curves
# or surfaces (d/du C(u)) are the same at junction. \n
* SplitContinuity.SurfaceContinuity - required continuity for surfaces.
* SplitContinuity.CurveContinuity - required continuity for curves.
This and the previous parameters can take the following values:
-
+
Parametric Continuity:
C0 (Positional Continuity): curves are joined (the end positions of curves or surfaces are
coincidental. The curves or surfaces may still meet at an angle,
or surfaces are of the same magnitude).
CN N-th derivatives are equal (both the direction and the magnitude of the Nth derivatives of
curves or surfaces (d/du C(u)) are the same at junction.
-
+
Geometric Continuity:
G1: first derivatives are proportional at junction.
The curve tangents thus have the same direction, but not necessarily the same magnitude.
theWires Indices of wires to be removed, if EMPTY then the method
removes ALL internal wires of the given object.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing processed shape.
"""
# Example: see GEOM_TestHealing.py
theWires Indices of wires to be removed, if EMPTY then the method
removes ALL internal holes of the given object
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing processed shape.
"""
# Example: see GEOM_TestHealing.py
"""
Close an open wire.
- Parameters:
+ Parameters:
theObject Shape to be processed.
theWires Indexes of edge(s) and wire(s) to be closed within theObject's shape,
if [ ], then theObject itself is a wire.
isCommonVertex If True : closure by creation of a common vertex,
If False : closure by creation of an edge between ends.
- Returns:
- New GEOM.GEOM_Object, containing processed shape.
+ Returns:
+ New GEOM.GEOM_Object, containing processed shape.
"""
# Example: see GEOM_TestHealing.py
anObj = self.HealOp.CloseContour(theObject, theWires, isCommonVertex)
"""
Addition of a point to a given edge object.
- Parameters:
+ Parameters:
theObject Shape to be processed.
theEdgeIndex Index of edge to be divided within theObject's shape,
if -1, then theObject itself is the edge.
isByParameter If TRUE : theValue is treated as a curve parameter [0..1],
if FALSE : theValue is treated as a length parameter [0..1]
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing processed shape.
"""
# Example: see GEOM_TestHealing.py
"""
Suppress the vertices in the wire in case if adjacent edges are C1 continuous.
- Parameters:
+ Parameters:
theWire Wire to minimize the number of C1 continuous edges in.
theVertices A list of vertices to suppress. If the list
is empty, all vertices in a wire will be assumed.
- Returns:
+ Returns:
New GEOM.GEOM_Object with modified wire.
"""
anObj = self.HealOp.FuseCollinearEdgesWithinWire(theWire, theVertices)
"""
Change orientation of the given object. Updates given shape.
- Parameters:
+ Parameters:
theObject Shape to be processed.
- Returns:
+ Returns:
Updated theObject
"""
theObject = self.HealOp.ChangeOrientation(theObject)
Parameters:
theObject Shape to be processed.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing processed shape.
"""
anObj = self.HealOp.ChangeOrientationCopy(theObject)
theObject Shape to be processed.
theTolerance Required tolerance value.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing processed shape.
"""
anObj = self.HealOp.LimitTolerance(theObject, theTolerance)
Parameters:
theObject Shape to get free boundary of.
- Returns:
+ Returns:
[status, theClosedWires, theOpenWires]
status: FALSE, if an error(s) occured during the method execution.
theClosedWires: Closed wires on the free boundary of the given shape.
theTolerance Maximum distance between faces,
which can be considered as coincident.
- Returns:
+ Returns:
GEOM.ListOfGO
"""
anObj = self.ShapesOp.GetGlueFaces(theShape, theTolerance)
theShape Initial shape.
theTolerance Maximum distance between edges, which can be considered as coincident.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing a copy of theShape without coincident edges.
"""
theTolerance,Parameters = ParseParameters(theTolerance)
theTolerance Maximum distance between edges,
which can be considered as coincident.
- Returns:
+ Returns:
GEOM.ListOfGO
"""
anObj = self.ShapesOp.GetGlueEdges(theShape, theTolerance)
which can be considered as coincident.
theEdges List of edges for gluing.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing a copy of theShape
without some edges.
"""
"""
Perform one of boolean operations on two given shapes.
- Parameters:
+ Parameters:
theShape1 First argument for boolean operation.
theShape2 Second argument for boolean operation.
theOperation Indicates the operation to be done:
1 - Common, 2 - Cut, 3 - Fuse, 4 - Section.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
"""
# Example: see GEOM_TestAll.py
"""
Perform Common boolean operation on two given shapes.
- Parameters:
+ Parameters:
theShape1 First argument for boolean operation.
theShape2 Second argument for boolean operation.
-
- Returns:
+
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
"""
# Example: see GEOM_TestOthers.py
"""
Perform Cut boolean operation on two given shapes.
- Parameters:
+ Parameters:
theShape1 First argument for boolean operation.
theShape2 Second argument for boolean operation.
-
- Returns:
+
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
-
+
"""
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(theShape1, theShape2, 2)
"""
Perform Fuse boolean operation on two given shapes.
- Parameters:
+ Parameters:
theShape1 First argument for boolean operation.
theShape2 Second argument for boolean operation.
-
- Returns:
+
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
-
+
"""
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(theShape1, theShape2, 3)
"""
Perform Section boolean operation on two given shapes.
- Parameters:
+ Parameters:
theShape1 First argument for boolean operation.
theShape2 Second argument for boolean operation.
-
- Returns:
+
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
-
+
"""
# Example: see GEOM_TestOthers.py
return self.MakeBoolean(theShape1, theShape2, 4)
"""
Perform partition operation.
- Parameters:
+ Parameters:
ListShapes Shapes to be intersected.
ListTools Shapes to intersect theShapes.
Limit Type of resulting shapes (see geompy.ShapeType)
Each compound from ListShapes and ListTools will be exploded
in order to avoid possible intersection between shapes from
this compound.
-
+
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:
ListKeepInside Shapes, outside which the results will be deleted.
Each shape from theKeepInside must belong to theShapes also.
RemoveWebs If TRUE, perform Glue 3D algorithm.
ListMaterials Material indices for each shape. Make sence, only if theRemoveWebs is TRUE.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shapes.
"""
# Example: see GEOM_TestAll.py
compound contains nonintersected shapes. Performance will be better
since intersection between shapes from compound is not performed.
- Parameters:
+ Parameters:
Description of all parameters as in method geompy.MakePartition
-
+
NOTE:
Passed compounds (via ListShapes or via ListTools)
have to consist of nonintersecting shapes.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shapes.
"""
if Limit == ShapeType["AUTO"]:
"""
Perform partition of the Shape with the Plane
- Parameters:
+ Parameters:
theShape Shape to be intersected.
thePlane Tool shape, to intersect theShape.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
"""
# Example: see GEOM_TestAll.py
Translate the given object along the vector, specified
by its end points, creating its copy before the translation.
- Parameters:
+ Parameters:
theObject The object to be translated.
thePoint1 Start point of translation vector.
thePoint2 End point of translation vector.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the translated object.
"""
# Example: see GEOM_TestAll.py
"""
Translate the given object along the vector, specified by its components.
- Parameters:
+ Parameters:
theObject The object to be translated.
theDX,theDY,theDZ Components of translation vector.
- Returns:
+ Returns:
Translated GEOM.GEOM_Object.
"""
# Example: see GEOM_TestAll.py
Translate the given object along the vector, specified
by its components, creating its copy before the translation.
- Parameters:
+ Parameters:
theObject The object to be translated.
theDX,theDY,theDZ Components of translation vector.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the translated object.
"""
# Example: see GEOM_TestAll.py
Translate the given object along the given vector,
creating its copy before the translation.
- Parameters:
+ Parameters:
theObject The object to be translated.
theVector The translation vector.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the translated object.
"""
# Example: see GEOM_TestAll.py
"""
Translate the given object along the given vector on given distance.
- Parameters:
+ Parameters:
theObject The object to be translated.
theVector The translation vector.
theDistance The translation distance.
theCopy Flag used to translate object itself or create a copy.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the translated object.
"""
# Example: see GEOM_TestAll.py
theVector The translation vector.
theDistance The translation distance.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the translated object.
"""
# Example: see GEOM_TestAll.py
theAxis Rotation axis.
theAngle Rotation angle in radians.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the rotated object.
"""
# Example: see GEOM_TestAll.py
Passing None for it means scaling relatively the origin of global CS.
theFactor Scaling factor value.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the scaled shape.
"""
# Example: see GEOM_TestAll.py
theObject The object to be mirrored.
theAxis Axis of symmetry.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the mirrored shape.
"""
# Example: see GEOM_TestAll.py
theObject The object to be mirrored.
thePoint Point of symmetry.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the mirrored shape.
"""
# Example: see GEOM_TestAll.py
its location will be changed to theEndLCS.
theEndLCS Coordinate system to perform displacement to it.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the displaced shape.
Example of usage:
theCopy is to create a copy objects if true.
theReverse 0 - for usual direction, 1 - to reverse path direction.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the displaced shape.
Example of usage:
theObject The base object for the offset.
theOffset Offset value.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the offset object.
Example of usage:
theSource The source object for the projection. It can be a point, edge or wire.
theTarget The target object. It can be planar or cylindrical face.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the projection.
"""
# Example: see GEOM_TestAll.py
theStep Distance to translate on.
theNbTimes Quantity of translations to be done.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing compound of all
the shapes, obtained after each translation.
theAxis The rotation axis.
theNbTimes Quantity of rotations to be done.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing compound of all the
shapes, obtained after each rotation.
theStep Translation distance.
theNbTimes2 Quantity of translations to be done.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing compound of all the
shapes, obtained after each transformation.
def MakeMultiRotation2D(self,aShape,aDir,aPoint,anAngle,nbtimes1,aStep,nbtimes2):
"""
The same, as MultiRotate2D(), but axis is given by direction and point
-
+
Example of usage:
pz = geompy.MakeVertex(0, 0, 100)
vy = geompy.MakeVectorDXDYDZ(0, 100, 0)
theShape Shape, to perform fillet on.
theR Fillet radius.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
- Example of usage:
- filletall = geompy.MakeFilletAll(prism, 10.)
+ Example of usage:
+ filletall = geompy.MakeFilletAll(prism, 10.)
"""
# Example: see GEOM_TestOthers.py
theR,Parameters = ParseParameters(theR)
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
Example of usage:
The list of vertices could be empty,in this case fillet will done done at all vertices in wire
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
- Example of usage:
+ Example of usage:
# create wire
Wire_1 = geompy.MakeWire([Edge_12, Edge_7, Edge_11, Edge_6, Edge_1,Edge_4])
# make fillet at given wire vertices with giver radius
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
Example of usage:
theShape Shape, to perform chamfer on.
theD Chamfer size along each face.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
Example of usage:
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
Example of usage:
Note:
Global index of sub-shape can be obtained, using method geompy.GetSubShapeID
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
Example of usage:
theD2 Chamfer size along another of two faces, connected to the edge.
theFaces Sequence of global indices of faces of theShape.
-
+
Note: Global index of sub-shape can be obtained, using method geompy.GetSubShapeID().
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the result shape.
"""
# Example: see GEOM_TestAll.py
"""
Perform a chamfer on edges,
with distance D1 on the first specified face (if several for one edge)
-
+
Parameters:
theShape Shape, to perform chamfer on.
theD1,theD2 Chamfer size
else:
anObj = self.MakeChamferFaces(aShape,d1,d2,ListShape)
return anObj
-
+
## Remove material from a solid by extrusion of the base shape on the given distance.
- # @param theInit Shape to remove material from. It must be a solid or
+ # @param theInit Shape to remove material from. It must be a solid or
# a compound made of a single solid.
# @param theBase Closed edge or wire defining the base shape to be extruded.
# @param theH Prism dimension along the normal to theBase
# @param theAngle Draft angle in degrees.
- # @return New GEOM.GEOM_Object, containing the initial shape with removed material
+ # @return New GEOM.GEOM_Object, containing the initial shape with removed material
#
# @ref tui_creation_prism "Example"
def MakeExtrudedCut(self, theInit, theBase, theH, theAngle):
anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, False)
RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
#anObj.SetParameters(Parameters)
- return anObj
-
+ return anObj
+
## Add material to a solid by extrusion of the base shape on the given distance.
- # @param theInit Shape to add material to. It must be a solid or
+ # @param theInit Shape to add material to. It must be a solid or
# a compound made of a single solid.
# @param theBase Closed edge or wire defining the base shape to be extruded.
# @param theH Prism dimension along the normal to theBase
# @param theAngle Draft angle in degrees.
- # @return New GEOM.GEOM_Object, containing the initial shape with added material
+ # @return New GEOM.GEOM_Object, containing the initial shape with added material
#
# @ref tui_creation_prism "Example"
def MakeExtrudedBoss(self, theInit, theBase, theH, theAngle):
anObj = self.PrimOp.MakeDraftPrism(theInit, theBase, theH, theAngle, True)
RaiseIfFailed("MakeExtrudedBoss", self.PrimOp)
#anObj.SetParameters(Parameters)
- return anObj
+ return anObj
# end of l3_local
## @}
Perform an Archimde operation on the given shape with given parameters.
The object presenting the resulting face is returned.
- Parameters:
+ Parameters:
theShape Shape to be put in water.
theWeight Weight og the shape.
theWaterDensity Density of the water.
theMeshDeflection Deflection of the mesh, using to compute the section.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing a section of theShape
by a plane, corresponding to water level.
"""
Get summarized length of all wires,
area of surface and volume of the given shape.
- Parameters:
+ Parameters:
theShape Shape to define properties of.
Returns:
"""
Get parameters of bounding box of the given shape
- Parameters:
+ Parameters:
theShape Shape to obtain bounding box of.
Returns:
"""
Get inertia matrix and moments of inertia of theShape.
- Parameters:
+ Parameters:
theShape Shape to calculate inertia of.
Returns:
def AreCoordsInside(self, theShape, coords, tolerance=1.e-7):
"""
Get if coords are included in the shape (ST_IN or ST_ON)
-
- Parameters:
+
+ Parameters:
theShape Shape
coords list of points coordinates [x1, y1, z1, x2, y2, z2, ...]
tolerance to be used (default is 1.0e-7)
def MinDistance(self, theShape1, theShape2):
"""
Get minimal distance between the given shapes.
-
- Parameters:
+
+ Parameters:
theShape1,theShape2 Shapes to find minimal distance between.
- Returns:
+ Returns:
Value of the minimal distance between the given shapes.
"""
# Example: see GEOM_TestMeasures.py
"""
Get minimal distance between the given shapes.
- Parameters:
+ Parameters:
theShape1,theShape2 Shapes to find minimal distance between.
- Returns:
+ Returns:
Value of the minimal distance between the given shapes.
"""
# Example: see GEOM_TestMeasures.py
"""
Get angle between the given shapes in degrees.
- Parameters:
+ Parameters:
theShape1,theShape2 Lines or linear edges to find angle between.
Note:
If both arguments are vectors, the angle is computed in accordance
with their orientations, otherwise the minimum angle is computed.
- Returns:
+ Returns:
Value of the angle between the given shapes in degrees.
"""
# Example: see GEOM_TestMeasures.py
"""
Get angle between the given shapes in radians.
- Parameters:
+ Parameters:
theShape1,theShape2 Lines or linear edges to find angle between.
-
+
Note:
If both arguments are vectors, the angle is computed in accordance
with their orientations, otherwise the minimum angle is computed.
- Returns:
+ Returns:
Value of the angle between the given shapes in radians.
"""
# Example: see GEOM_TestMeasures.py
"""
Get angle between the given vectors in degrees.
- Parameters:
+ Parameters:
theShape1,theShape2 Vectors to find angle between.
theFlag If True, the normal vector is defined by the two vectors cross,
if False, the opposite vector to the normal vector is used.
- Returns:
+ Returns:
Value of the angle between the given vectors in degrees.
"""
anAngle = self.MeasuOp.GetAngleBtwVectors(theShape1, theShape2)
"""
Get angle between the given vectors in radians.
- Parameters:
+ Parameters:
theShape1,theShape2 Vectors to find angle between.
theFlag If True, the normal vector is defined by the two vectors cross,
if False, the opposite vector to the normal vector is used.
- Returns:
+ Returns:
Value of the angle between the given vectors in radians.
"""
anAngle = self.GetAngleVectors(theShape1, theShape2, theFlag)*math.pi/180.
"""
Measure curvature of a curve at a point, set by parameter.
- Parameters:
+ Parameters:
theCurve a curve.
theParam parameter.
- Returns:
+ Returns:
radius of curvature of theCurve.
"""
# Example: see GEOM_TestMeasures.py
"""
Measure curvature of a curve at a point.
- Parameters:
+ Parameters:
theCurve a curve.
thePoint given point.
- Returns:
- radius of curvature of theCurve.
+ Returns:
+ radius of curvature of theCurve.
"""
aCurv = self.MeasuOp.CurveCurvatureByPoint(theCurve,thePoint)
RaiseIfFailed("CurveCurvatureByPoint", self.MeasuOp)
"""
Measure max radius of curvature of surface.
- Parameters:
+ Parameters:
theSurf the given surface.
theUParam Value of U-parameter on the referenced surface.
theVParam Value of V-parameter on the referenced surface.
-
- Returns:
+
+ Returns:
max radius of curvature of theSurf.
"""
# Example: see GEOM_TestMeasures.py
"""
Measure max radius of curvature of surface in the given point.
- Parameters:
+ Parameters:
theSurf the given surface.
thePoint given point.
-
- Returns:
- max radius of curvature of theSurf.
+
+ Returns:
+ max radius of curvature of theSurf.
"""
aSurf = self.MeasuOp.MaxSurfaceCurvatureByPoint(theSurf,thePoint)
RaiseIfFailed("MaxSurfaceCurvatureByPoint", self.MeasuOp)
# @param theUParam Value of U-parameter on the referenced surface.
# @param theVParam Value of V-parameter on the referenced surface.
# @return min radius of curvature of theSurf.
- #
+ #
## @ref swig_todo "Example"
def MinSurfaceCurvatureByParam(self, theSurf, theUParam, theVParam):
"""
Measure min radius of curvature of surface.
- Parameters:
+ Parameters:
theSurf the given surface.
theUParam Value of U-parameter on the referenced surface.
theVParam Value of V-parameter on the referenced surface.
-
- Returns:
+
+ Returns:
Min radius of curvature of theSurf.
"""
aSurf = self.MeasuOp.MinSurfaceCurvatureByParam(theSurf,theUParam,theVParam)
"""
Measure min radius of curvature of surface in the given point.
- Parameters:
+ Parameters:
theSurf the given surface.
thePoint given point.
-
- Returns:
- Min radius of curvature of theSurf.
+
+ Returns:
+ Min radius of curvature of theSurf.
"""
aSurf = self.MeasuOp.MinSurfaceCurvatureByPoint(theSurf,thePoint)
RaiseIfFailed("MinSurfaceCurvatureByPoint", self.MeasuOp)
"""
Get min and max tolerances of sub-shapes of theShape
- Parameters:
+ Parameters:
theShape Shape, to get tolerances of.
- Returns:
+ Returns:
[FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
FaceMin,FaceMax: Min and max tolerances of the faces.
EdgeMin,EdgeMax: Min and max tolerances of the edges.
Parameters:
theShape Shape to find first vertex.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created vertex.
"""
# Example: see GEOM_TestMeasures.py
"""
Get the last vertex of wire/edge depended orientation.
- Parameters:
+ Parameters:
theShape Shape to find last vertex.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created vertex.
"""
# Example: see GEOM_TestMeasures.py
"""
Get a normale to the given face. If the point is not given,
the normale is calculated at the center of mass.
-
- Parameters:
+
+ Parameters:
theFace Face to define normale of.
theOptionalPoint Point to compute the normale at.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created vector.
"""
# Example: see GEOM_TestMeasures.py
# if TRUE, the shape's geometry will be checked also.
# @param theReturnStatus If FALSE and if theShape is invalid, a description \n
# of problem is printed.
- # if TRUE and if theShape is invalid, the description
+ # if TRUE and if theShape is invalid, the description
# of problem is also returned.
# @return TRUE, if the shape "seems to be valid".
#
"""
Check a topology of the given shape.
- Parameters:
+ 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.
theReturnStatus If FALSE and if theShape is invalid, a description
of problem is printed.
- if TRUE and if theShape is invalid, the description
+ if TRUE and if theShape is invalid, the description
of problem is returned.
- Returns:
+ Returns:
TRUE, if the shape "seems to be valid".
If theShape is invalid, prints a description of problem.
This description can also be returned.
"""
Detect self-intersections in the given shape.
- Parameters:
+ Parameters:
theShape Shape to check.
- Returns:
+ Returns:
TRUE, if the shape contains no self-intersections.
"""
# Example: see GEOM_TestMeasures.py
Axes of the LCS are obtained from shape's location or,
if the shape is a planar face, from position of its plane.
- Parameters:
+ Parameters:
theShape Shape to calculate position of.
- Returns:
+ 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.
def KindOfShape(self,theShape):
"""
Get kind of theShape.
-
- Parameters:
+
+ Parameters:
theShape Shape to get a kind of.
Returns:
Import a shape from the BREP or IGES or STEP file
(depends on given format) with given name.
- Parameters:
+ Parameters:
theFileName The file, containing the shape.
theFormatName Specify format for the file reading.
Available formats can be obtained with geompy.InsertOp.ImportTranslators() method.
geompy.ImportFile(...) function for BREP format
Import a shape from the BREP file with given name.
- Parameters:
+ Parameters:
theFileName The file, containing the shape.
Returns:
Note:
shape.GetShapeStream() method can be used to obtain the shape's BRep stream.
- Parameters:
+ Parameters:
theStream The BRep binary stream.
Returns:
"""
Export the given shape into a file with given name.
- Parameters:
+ Parameters:
theObject Shape to be stored in the file.
theFileName Name of the file to store the given shape in.
theFormatName Specify format for the shape storage.
Create a quadrangle face from four edges. Order of Edges is not
important. It is not necessary that edges share the same vertex.
- Parameters:
+ Parameters:
E1,E2,E3,E4 Edges for the face bound.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created face.
- Example of usage:
+ Example of usage:
qface1 = geompy.MakeQuad(edge1, edge2, edge3, edge4)
"""
# Example: see GEOM_Spanner.py
Create a quadrangle face on two edges.
The missing edges will be built by creating the shortest ones.
- Parameters:
+ Parameters:
E1,E2 Two opposite edges for the face.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created face.
-
+
Example of usage:
# create vertices
p1 = geompy.MakeVertex( 0., 0., 0.)
Create a quadrangle face with specified corners.
The missing edges will be built by creating the shortest ones.
- Parameters:
+ Parameters:
V1,V2,V3,V4 Corner vertices for the face.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created face.
Example of usage:
Create a hexahedral solid, bounded by the six given faces. Order of
faces is not important. It is not necessary that Faces share the same edge.
- Parameters:
+ Parameters:
F1,F2,F3,F4,F5,F6 Faces for the hexahedral solid.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the created solid.
Example of usage:
Create a hexahedral solid between two given faces.
The missing faces will be built by creating the smallest ones.
- Parameters:
+ Parameters:
F1,F2 Two opposite faces for the hexahedral solid.
Returns:
"""
Get a vertex, found in the given shape by its coordinates.
- Parameters:
+ Parameters:
theShape Block or a compound of blocks.
theX,theY,theZ Coordinates of the sought vertex.
theEpsilon Maximum allowed distance between the resulting
vertex and point with the given coordinates.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the found vertex.
Example of usage:
"""
Find a vertex of the given shape, which has minimal distance to the given point.
- Parameters:
+ Parameters:
theShape Any shape.
thePoint Point, close to the desired vertex.
"""
Get an edge, found in the given shape by two given vertices.
- Parameters:
+ Parameters:
theShape Block or a compound of blocks.
thePoint1,thePoint2 Points, close to the ends of the desired edge.
"""
Find an edge of the given shape, which has minimal distance to the given point.
- Parameters:
+ Parameters:
theShape Block or a compound of blocks.
thePoint Point, close to the desired edge.
theBlock Must be a hexahedral solid.
theFace Face of theBlock, opposite to the desired face.
- Returns:
+ Returns:
New GEOM.GEOM_Object, containing the found face.
"""
# Example: see GEOM_Spanner.py
Returns:
TRUE, if the given shape is a compound of blocks.
- If theCompound is not valid, prints all discovered errors.
+ If theCompound is not valid, prints all discovered errors.
"""
# Example: see GEOM_Spanner.py
(IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
doUnionFaces If True, then unite faces. If False (the default value),
do not unite faces.
- Returns:
+ Returns:
Improved shape.
"""
# Example: see GEOM_TestOthers.py
Parameters:
theShape The compound to check and improve.
- Returns:
+ Returns:
Improved compound.
"""
# Example: see GEOM_TestOthers.py
Note:
If theMaxNbFaces = 0, the maximum number of faces is not restricted.
- Returns:
+ Returns:
List of GEOM.GEOM_Object, containing the retrieved blocks.
"""
# Example: see GEOM_TestOthers.py
theCompound Compound, to find block in.
theParts List of faces and/or edges and/or vertices to be parts of the found block.
- Returns:
+ Returns:
New GEOM_Object, containing the found block.
"""
# Example: see GEOM_TestOthers.py
Example of usage:
group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
+
"""
# Example: see GEOM_TestOthers.py
anObj = self.GroupOp.CreateGroup(theMainShape, theShapeType)
theSubShapeID is a sub-shape ID in the main object.
Note:
- Use method GetSubShapeID() to get an unique ID of the sub-shape
+ Use method GetSubShapeID() to get an unique ID of the sub-shape
"""
# Example: see GEOM_TestOthers.py
self.GroupOp.AddObject(theGroup, theSubShapeID)
Parameters:
theGroup is a GEOM group from which the sub-shapes are removed.
theSubShapes is a list of indices of sub-shapes to be removed.
- """
+ """
# Example: see GEOM_TestOthers.py
self.GroupOp.DifferenceIDs(theGroup, theSubShapes)
RaiseIfFailed("DifferenceIDs", self.GroupOp)
## Cut of lists of groups.
# New group is created. It will contain only entities
- # which are present in groups listed in theGList1 but
+ # which are present in groups listed in theGList1 but
# are not present in groups from theGList2.
# @param theGList1 is a list of GEOM groups to include elements of.
# @param theGList2 is a list of GEOM groups to exclude elements of.
"""
Cut of lists of groups.
New group is created. It will contain only entities
- which are present in groups listed in theGList1 but
+ which are present in groups listed in theGList1 but
are not present in groups from theGList2.
Parameters:
## Cut of lists of groups.
# New group is created. It will contain only entities
- # which are present in groups listed in theGList1 but
+ # which are present in groups listed in theGList1 but
# are not present in groups from theGList2.
# @param theGList1 is a list of GEOM groups to include elements of.
# @param theGList2 is a list of GEOM groups to exclude elements of.
"""
Cut of lists of groups.
New group is created. It will contain only entities
- which are present in groups listed in theGList1 but
+ which are present in groups listed in theGList1 but
are not present in groups from theGList2.
Parameters:
Parameters:
theId is a GEOM obect type id.
-
+
Returns:
type of geom object (POINT, VECTOR, PLANE, LINE, TORUS, ... )
"""
# create PipeTShape object with position
pipetshape_position = geompy.MakePipeTShape(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, True, P1, P2, P3)
"""
- theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
+ theR1, theW1, theL1, theR2, theW2, theL2, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2)
if (theP1 and theP2 and theP3):
anObj = self.AdvOp.MakePipeTShapeWithPosition(theR1, theW1, theL1, theR2, theW2, theL2, theHexMesh, theP1, theP2, theP3)
else:
theP1 1st junction point of main pipe
theP2 2nd junction point of main pipe
theP3 Junction point of incident pipe
-
+
Returns:
List of GEOM_Object, containing the created shape and propagation groups.
-
+
Example of usage:
# create PipeTShape with fillet object
pipetshapefillet = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0)
# create PipeTShape with fillet object with position
pipetshapefillet_position = geompy.MakePipeTShapeFillet(80.0, 20.0, 200.0, 50.0, 20.0, 200.0, 5.0, True, P1, P2, P3)
-
+
"""
theR1, theW1, theL1, theR2, theW2, theL2, theRF, Parameters = ParseParameters(theR1, theW1, theL1, theR2, theW2, theL2, theRF)
if (theP1 and theP2 and theP3):
RaiseIfFailed("MakeDividedDisk", self.AdvOp)
if Parameters: anObj.SetParameters(Parameters)
return anObj
-
+
## This function allows creating a disk already divided into blocks. It
# can be used to create divided pipes for later meshing in hexaedra.
# @param theCenter Center of the disk
if Parameters: anObj.SetParameters(Parameters)
return anObj
- ## Export a shape to XAO Format
- # @param shape Shape to export
- # @param fileName The name of the exported file
- # @param groups List of groups to export
- # @param fields List of fields to export
+ ## Export a shape to XAO format
+ # @param shape The shape to export
+ # @param groups The list of groups to export
+ # @param fields The list of fields to export
+ # @param author The author of the export
+ # @param fileName The name of the file to export
# @return boolean
#
- # @ref tui_creation_exportxao "Example"
- def ExportXAO(self, fileName, shape, groups, fields):
- fileName, shape, groups, fields, Parameters = ParseParameters(fileName, shape, groups, fields)
- isGood = self.ImpExpOp.ExportXAO(fileName, shape, groups, fields)
+ # @ref tui_exportxao "Example"
+ def ExportXAO(self, shape, groups, fields, author, fileName):
+ res = self.ImpExpOp.ExportXAO(shape, groups, fields, author, fileName)
RaiseIfFailed("ExportXAO", self.ImpExpOp)
#if Parameters: anObj.SetParameters(Parameters)
- return isGood
+ return res
+
+ ## Import a shape from XAO format
+ # @param shape Shape to export
+ # @param fileName The name of the file to import
+ # @return tuple (res, shape, groups, fields)
+ # res Flag indicating if the import was succeful
+ # shape The imported shape
+ # groups The list of imported groups
+ # fields The list of imported fields
+ #
+ # @ref tui_importxao "Example"
+ def ImportXAO(self, fileName):
+ res = self.ImpExpOp.ImportXAO(fileName)
+ RaiseIfFailed("ImportXAO", self.ImpExpOp)
+ #if Parameters: anObj.SetParameters(Parameters)
+ return res
#@@ insert new functions before this line @@ do not remove this line @@#
def LoadTexture(self, Path):
"""
Load marker texture from the file
-
+
Parameters:
Path a path to the texture file
-
+
Returns:
unique texture identifier
"""
## Get internal name of the object based on its study entry
# @note This method does not provide an unique identifier of the geometry object.
- # @note This is internal function of GEOM component, though it can be used outside it for
+ # @note This is internal function of GEOM component, though it can be used outside it for
# appropriate reason (e.g. for identification of geometry object).
# @param obj geometry object
# @return unique object identifier
"""
Get internal name of the object based on its study entry.
Note: this method does not provide an unique identifier of the geometry object.
- It is an internal function of GEOM component, though it can be used outside GEOM for
+ It is an internal function of GEOM component, though it can be used outside GEOM for
appropriate reason (e.g. for identification of geometry object).
Parameters:
if entry is not None:
lst = entry.split(":")
if len(lst) > 0:
- ID = lst[-1] # -1 means last item in the list
+ ID = lst[-1] # -1 means last item in the list
return "GEOM_" + ID
return ID
-
-
+
+
## Add marker texture. @a Width and @a Height parameters
# specify width and height of the texture in pixels.