Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

Functions

def MakePartition
 Perform partition operation. More...
 
def MakePartitionNonSelfIntersectedShape
 Perform partition operation. More...
 
def Partition
 See method MakePartition() for more information. More...
 
def MakeHalfPartition
 Perform partition of the Shape with the Plane. More...
 
def Archimede
 Perform an Archimde operation on the given shape with given parameters. More...
 

Detailed Description

Function Documentation

def MakePartition (   self,
  ListShapes,
  ListTools = [],
  ListKeepInside = [],
  ListRemoveInside = [],
  Limit = ShapeType["AUTO"],
  RemoveWebs = 0,
  ListMaterials = [],
  KeepNonlimitShapes = 0,
  theName = None 
)

Perform partition operation.

Parameters
ListShapesShapes to be intersected.
ListToolsShapes to intersect theShapes.
LimitType of resulting shapes (see ShapeType()).
If this parameter is set to -1 ("Auto"), most appropriate shape limit type will be detected automatically.
KeepNonlimitShapesif this parameter == 0, then only shapes of target type (equal to Limit) are kept in the result, else standalone shapes of lower dimension are kept also (if they exist).
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Note
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.

Parameters
ListKeepInsideShapes, outside which the results will be deleted. Each shape from theKeepInside must belong to theShapes also.
ListRemoveInsideShapes, inside which the results will be deleted. Each shape from theRemoveInside must belong to theShapes also.
RemoveWebsIf TRUE, perform Glue 3D algorithm.
ListMaterialsMaterial indices for each shape. Make sence, only if theRemoveWebs is TRUE.
Returns
New GEOM.GEOM_Object, containing the result shapes.

Example

References geomBuilder._autoPublish(), geomBuilder.BoolOp, geomBuilder.EnumToLong(), geomBuilder.MakePartitionNonSelfIntersectedShape(), geomBuilder.ManageTransactions(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapeType.

def MakePartitionNonSelfIntersectedShape (   self,
  ListShapes,
  ListTools = [],
  ListKeepInside = [],
  ListRemoveInside = [],
  Limit = ShapeType["AUTO"],
  RemoveWebs = 0,
  ListMaterials = [],
  KeepNonlimitShapes = 0,
  checkSelfInte = False,
  theName = None 
)

Perform partition operation.

This method may be useful if it is needed to make a partition for compound contains nonintersected shapes. Performance will be better since intersection between shapes from compound is not performed.

Description of all parameters as in previous method MakePartition(). One additional parameter is provided:

Parameters
checkSelfInteThe flag that tells if the arguments should be checked for self-intersection prior to the operation.
Note
This algorithm doesn't find all types of self-intersections. It is tuned to detect vertex/vertex, vertex/edge, edge/edge, vertex/face and edge/face intersections. Face/face intersections detection is switched off as it is a time-consuming operation that gives an impact on performance. To find all self-intersections please use CheckSelfIntersections() method.
Passed compounds (via ListShapes or via ListTools) have to consist of nonintersecting shapes.
Returns
New GEOM.GEOM_Object, containing the result shapes.

Example

References geomBuilder._autoPublish(), geomBuilder.BoolOp, geomBuilder.EnumToLong(), geomBuilder.Partition(), geomBuilder.RaiseIfFailed(), and geomBuilder.ShapeType.

def Partition (   self,
  ListShapes,
  ListTools = [],
  ListKeepInside = [],
  ListRemoveInside = [],
  Limit = ShapeType["AUTO"],
  RemoveWebs = 0,
  ListMaterials = [],
  KeepNonlimitShapes = 0,
  theName = None 
)
def MakeHalfPartition (   self,
  theShape,
  thePlane,
  theName = None 
)

Perform partition of the Shape with the Plane.

Parameters
theShapeShape to be intersected.
thePlaneTool shape, to intersect theShape.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing the result shape.
Note
This operation is a shortcut to the more general MakePartition operation, where theShape specifies single "object" (shape being partitioned) and thePlane specifies single "tool" (intersector shape). Other parameters of MakePartition operation have default values:
  • Limit: GEOM::SHAPE (shape limit corresponds to the type of theShape)
  • KeepNonlimitShapes: 0
  • KeepInside, RemoveInside, RemoveWebs, Materials (obsolete parameters): empty
I.e. the following two operations are equivalent:
1 Result = geompy.MakeHalfPartition(Object, Plane)
2 Result = geompy.MakePartition([Object], [Plane])
See Also
MakePartition, MakePartitionNonSelfIntersectedShape

Example

References geomBuilder._autoPublish(), geomBuilder.BoolOp, geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

def Archimede (   self,
  theShape,
  theWeight,
  theWaterDensity,
  theMeshDeflection,
  theName = None 
)

Perform an Archimde operation on the given shape with given parameters.

The object presenting the resulting face is returned.

Parameters
theShapeShape to be put in water.
theWeightWeight of the shape.
theWaterDensityDensity of the water.
theMeshDeflectionDeflection of the mesh, using to compute the section.
theNameObject name; when specified, this parameter is used for result publication in the study. Otherwise, if automatic publication is switched on, default value is used for result name.
Returns
New GEOM.GEOM_Object, containing a section of theShape by a plane, corresponding to water level.

Example

References geomBuilder._autoPublish(), geomBuilder.LocalOp, geomBuilder.ManageTransactions(), geomBuilder.ParseParameters(), and geomBuilder.RaiseIfFailed().