Ejemplo n.º 1
0
def get_bounding_box(occtopology):
    """
    This function calculates the bounding box of the OCCtopology.
 
    Parameters
    ----------
    occtopology : OCCtopology
        The OCCtopology to be analysed.
        OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface, OCCwire, OCCedge, OCCvertex 
        
    Returns
    -------
    xmin : float
        Minimum X-coordinate
        
    ymin : float
        Minimum Y-coordinate
        
    zmin : float
        Minimum Z-coordinate
        
    xmax : float
        Maximum X-coordinate
        
    ymax : float
        Maximum Y-coordinate
        
    zmax : float
        Maximum Z-coordinate
    """
    return Common.get_boundingbox(occtopology)
Ejemplo n.º 2
0
def get_bounding_box(occtopology):
    """
    This function calculates the bounding box of the OCCtopology.
 
    Parameters
    ----------
    occtopology : OCCtopology
        The OCCtopology to be analysed.
        OCCtopology includes: OCCshape, OCCcompound, OCCcompsolid, OCCsolid, OCCshell, OCCface, OCCwire, OCCedge, OCCvertex 
        
    Returns
    -------
    xmin : float
        Minimum X-coordinate
        
    ymin : float
        Minimum Y-coordinate
        
    zmin : float
        Minimum Z-coordinate
        
    xmax : float
        Maximum X-coordinate
        
    ymax : float
        Maximum Y-coordinate
        
    zmax : float
        Maximum Z-coordinate
    """
    return Common.get_boundingbox(occtopology)
Ejemplo n.º 3
0
def get_bbox(shape, length):

    vertices = []
    shape = Common.get_boundingbox(shape)
    vertices.append([
        correctLengt(shape[0], length, None),
        correctLengt(shape[1], length, None),
        correctLengt(shape[2], length, None)
    ])
    vertices.append([
        correctLengt(shape[3], length, None),
        correctLengt(shape[1], length, None),
        correctLengt(shape[2], length, None)
    ])
    vertices.append([
        correctLengt(shape[0], length, None),
        correctLengt(shape[4], length, None),
        correctLengt(shape[2], length, None)
    ])
    vertices.append([
        correctLengt(shape[0], length, None),
        correctLengt(shape[1], length, None),
        correctLengt(shape[5], length, None)
    ])
    vertices.append([
        correctLengt(shape[3], length, None),
        correctLengt(shape[1], length, None),
        correctLengt(shape[5], length, None)
    ])
    vertices.append([
        correctLengt(shape[0], length, None),
        correctLengt(shape[4], length, None),
        correctLengt(shape[5], length, None)
    ])

    return vertices
Ejemplo n.º 4
0
def get_bounding_box(occ_shape):
    """return xmin,ymin,zmin,xmax,ymax,zmax"""
    return Common.get_boundingbox(occ_shape)