Back to index

salome-geom  6.5.0
Functions
Check and Improve
Building by blocks
Collaboration diagram for Check and Improve:

Functions

def geompyDC.geompyDC.CheckCompoundOfBlocks
 Check, if the compound of blocks is given.
def geompyDC.geompyDC.RemoveExtraEdges
 Remove all seam and degenerated edges from theShape.
def geompyDC.geompyDC.CheckAndImprove
 Check, if the given shape is a blocks compound.

Function Documentation

def geompyDC.geompyDC.CheckAndImprove (   self,
  theShape 
)

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.
Returns:
Improved compound.

Example

Check, if the given shape is a blocks compound.
Fix all detected errors.

Note:
    Single block can be also fixed by this method.

Parameters:
    theShape The compound to check and improve.

Returns: 
    Improved compound.

Definition at line 7697 of file geompyDC.py.

07697 
07698         def CheckAndImprove(self,theShape):
07699             """
07700             Check, if the given shape is a blocks compound.
07701             Fix all detected errors.
07702 
07703             Note:
07704                 Single block can be also fixed by this method.
07705 
07706             Parameters:
07707                 theShape The compound to check and improve.
07708 
07709             Returns: 
07710                 Improved compound.
07711             """
07712             # Example: see GEOM_TestOthers.py
07713             anObj = self.BlocksOp.CheckAndImprove(theShape)
07714             RaiseIfFailed("CheckAndImprove", self.BlocksOp)
07715             return anObj

Here is the call graph for this function:

def geompyDC.geompyDC.CheckCompoundOfBlocks (   self,
  theCompound 
)

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 and 12 edges).
  • 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.
    Returns:
    TRUE, if the given shape is a compound of blocks. If theCompound is not valid, prints all discovered errors.
    Example 1
    Example 2
    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 and 12 edges).
    - 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:
        theCompound The compound to check.
    
    Returns:
        TRUE, if the given shape is a compound of blocks.
        If theCompound is not valid, prints all discovered errors.            
    

Definition at line 7635 of file geompyDC.py.

07635 
07636         def CheckCompoundOfBlocks(self,theCompound):
07637             """
07638             Check, if the compound of blocks is given.
07639             To be considered as a compound of blocks, the
07640             given shape must satisfy the following conditions:
07641             - Each element of the compound should be a Block (6 faces and 12 edges).
07642             - A connection between two Blocks should be an entire quadrangle face or an entire edge.
07643             - The compound should be connexe.
07644             - The glue between two quadrangle faces should be applied.
07645 
07646             Parameters:
07647                 theCompound The compound to check.
07648 
07649             Returns:
07650                 TRUE, if the given shape is a compound of blocks.
07651                 If theCompound is not valid, prints all discovered errors.            
07652             """
07653             # Example: see GEOM_Spanner.py
07654             (IsValid, BCErrors) = self.BlocksOp.CheckCompoundOfBlocks(theCompound)
07655             RaiseIfFailed("CheckCompoundOfBlocks", self.BlocksOp)
07656             if IsValid == 0:
07657                 Descr = self.BlocksOp.PrintBCErrors(theCompound, BCErrors)
07658                 print Descr
07659             return IsValid

Here is the call graph for this function:

def geompyDC.geompyDC.RemoveExtraEdges (   self,
  theShape,
  doUnionFaces = False 
)

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.
Returns:
Improved shape.

Example

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:
    theShape The compound or single solid to remove irregular edges from.
    doUnionFaces If True, then unite faces. If False (the default value),
     do not unite faces.

Returns: 
    Improved shape.

Definition at line 7669 of file geompyDC.py.

07669 
07670         def RemoveExtraEdges(self, theShape, doUnionFaces=False):
07671             """
07672             Remove all seam and degenerated edges from theShape.
07673             Unite faces and edges, sharing one surface. It means that
07674             this faces must have references to one C++ surface object (handle).
07675 
07676             Parameters:
07677                 theShape The compound or single solid to remove irregular edges from.
07678                 doUnionFaces If True, then unite faces. If False (the default value),
07679                              do not unite faces.
07680 
07681             Returns: 
07682                 Improved shape.
07683             """
07684             # Example: see GEOM_TestOthers.py
07685             nbFacesOptimum = -1 # -1 means do not unite faces
07686             if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
07687             anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
07688             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
07689             return anObj

Here is the call graph for this function: