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

Functions

def CheckCompoundOfBlocks
 Check, if the compound of blocks is given. More...
 
def GetNonBlocks
 Retrieve all non blocks solids and faces from theShape. More...
 
def RemoveExtraEdges
 Remove all seam and degenerated edges from theShape. More...
 
def UnionFaces
 Performs union faces of theShape Unite faces sharing one surface. More...
 
def CheckAndImprove
 Check, if the given shape is a blocks compound. More...
 

Detailed Description

Function Documentation

def CheckCompoundOfBlocks (   self,
  theCompound,
  theIsUseC1 = False,
  theAngTolerance = 1.e-12 
)

Check, if the compound of blocks is given.

To be considered as a compound of blocks, the given shape must satisfy the following conditions:

  • Each element of the compound should be a Block (6 faces).
  • Each face should be a quadrangle, i.e. it should have only 1 wire with 4 edges. If theIsUseC1 is set to True and there are more than 4 edges in the only wire of a face, this face is considered to be quadrangle if it has 4 bounds (1 or more edge) of C1 continuity.
  • A connection between two Blocks should be an entire quadrangle face or an entire edge.
  • The compound should be connexe.
  • The glue between two quadrangle faces should be applied.
    Parameters
    theCompoundThe compound to check.
    theIsUseC1Flag to check if there are 4 bounds on a face taking into account C1 continuity.
    theAngTolerancethe angular tolerance to check if two neighbor edges are codirectional in the common vertex with this tolerance. This parameter is used only if theIsUseC1 is set to True.
    Returns
    TRUE, if the given shape is a compound of blocks. If theCompound is not valid, prints all discovered errors.
    Example 1
    Example 2

References geomBuilder.BlocksOp, geomBuilder.GetNonBlocks(), geomBuilder.ManageTransactions(), and geomBuilder.RaiseIfFailed().

def GetNonBlocks (   self,
  theShape,
  theIsUseC1 = False,
  theAngTolerance = 1.e-12,
  theName = None 
)

Retrieve all non blocks solids and faces from theShape.

Parameters
theShapeThe shape to explore.
theIsUseC1Flag to check if there are 4 bounds on a face taking into account C1 continuity.
theAngTolerancethe angular tolerance to check if two neighbor edges are codirectional in the common vertex with this tolerance. This parameter is used only if theIsUseC1 is set to True.
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
A tuple of two GEOM_Objects. The first object is a group of all non block solids (= not 6 faces, or with 6 faces, but with the presence of non-quadrangular faces). The second object is a group of all non quadrangular faces (= faces with more then 1 wire or, if theIsUseC1 is set to True, faces with 1 wire with not 4 edges that do not form 4 bounds of C1 continuity).

Example 1
Example 2

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

def RemoveExtraEdges (   self,
  theShape,
  doUnionFaces = False,
  theName = None 
)

Remove all seam and degenerated edges from theShape.

Unite faces and edges, sharing one surface. It means that this faces must have references to one C++ surface object (handle).

Parameters
theShapeThe compound or single solid to remove irregular edges from.
doUnionFacesIf True, then unite faces. If False (the default value), do not unite faces.
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
Improved shape.

Example

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

def UnionFaces (   self,
  theShape,
  theName = None 
)

Performs union faces of theShape Unite faces sharing one surface.

It means that these faces must have references to one C++ surface object (handle).

Parameters
theShapeThe compound or single solid that contains faces to perform union.
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
Improved shape.

Example

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

def CheckAndImprove (   self,
  theShape,
  theName = None 
)

Check, if the given shape is a blocks compound.

Fix all detected errors.

Note
Single block can be also fixed by this method.
Parameters
theShapeThe compound to check and improve.
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
Improved compound.

Example

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