OCC.Core.Bnd module

Bnd module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_bnd.html

class Bnd_Array1OfBox(*args)

Bases: object

Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
First()
Init()
IsAllocated()
IsDeletable()
IsEmpty()
Last()
Length()
Lower()
Move()
Resize()
Set()
SetValue()
Size()
Upper()
Value()
begin()
cbegin()
cend()
end()
next()
property thisown

The membership flag

class Bnd_Array1OfBox2d(*args)

Bases: object

Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
First()
Init()
IsAllocated()
IsDeletable()
IsEmpty()
Last()
Length()
Lower()
Move()
Resize()
Set()
SetValue()
Size()
Upper()
Value()
begin()
cbegin()
cend()
end()
next()
property thisown

The membership flag

class Bnd_Array1OfSphere(*args)

Bases: object

Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
First()
Init()
IsAllocated()
IsDeletable()
IsEmpty()
Last()
Length()
Lower()
Move()
Resize()
Set()
SetValue()
Size()
Upper()
Value()
begin()
cbegin()
cend()
end()
next()
property thisown

The membership flag

class Bnd_B2d(*args)

Bases: object

  • Empty constructor.
    rtype

    None* Constructor.

    param theCenter

    type theCenter

    gp_XY

    param theHSize

    type theHSize

    gp_XY

    rtype

    None

Add()
  • Update the box by a point.
    param thePnt

    type thePnt

    gp_XY

    rtype

    None* Update the box by a point.

    param thePnt

    type thePnt

    gp_Pnt2d

    rtype

    None* Update the box by another box.

    param theBox

    type theBox

    Bnd_B2d

    rtype

    None

Clear()
  • Reset the box data.
    rtype

    None

CornerMax()
  • Query a box corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XY

CornerMin()
  • Query a box corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XY

Enlarge()
  • Extend the Box by the absolute value of theDiff.
    param theDiff

    type theDiff

    float

    rtype

    None

IsIn()
  • Check that the box ‘this’ is inside the given box ‘theBox’. Returns True if ‘this’ box is fully inside ‘theBox’.
    param theBox

    type theBox

    Bnd_B2d

    rtype

    bool* Check that the box ‘this’ is inside the given box ‘theBox’ transformed by ‘theTrsf’. Returns True if ‘this’ box is fully inside the transformed ‘theBox’.

    param theBox

    type theBox

    Bnd_B2d

    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    bool

IsOut()
  • Check the given point for the inclusion in the Box. Returns True if the point is outside.
    param thePnt

    type thePnt

    gp_XY

    rtype

    bool* Check a circle for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theCenter

    type theCenter

    gp_XY

    param theRadius

    type theRadius

    float

    param isCircleHollow

    default value is Standard_False

    type isCircleHollow

    bool

    rtype

    bool* Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B2d

    rtype

    bool* Check the given box oriented by the given transformation for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B2d

    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    bool* Check the given Line for the intersection with the current box. Returns True if there is no intersection.

    param theLine

    type theLine

    gp_Ax2d

    rtype

    bool* Check the Segment defined by the couple of input points for the intersection with the current box. Returns True if there is no intersection.

    param theP0

    type theP0

    gp_XY

    param theP1

    type theP1

    gp_XY

    rtype

    bool

IsVoid()
  • Returns True if the box is void (non-initialized).
    rtype

    bool

Limit()
  • Limit the Box by the internals of theOtherBox. Returns True if the limitation takes place, otherwise False indicating that the boxes do not intersect.
    param theOtherBox

    type theOtherBox

    Bnd_B2d

    rtype

    bool

SetCenter()
  • Set the Center coordinates
    param theCenter

    type theCenter

    gp_XY

    rtype

    None

SetHSize()
  • Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
    param theHSize

    type theHSize

    gp_XY

    rtype

    None

SquareExtent()
  • Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned.
    rtype

    float

Transformed()
  • Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation.
    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    Bnd_B2d

property thisown

The membership flag

class Bnd_B2f(*args)

Bases: object

  • Empty constructor.
    rtype

    None* Constructor.

    param theCenter

    type theCenter

    gp_XY

    param theHSize

    type theHSize

    gp_XY

    rtype

    None

Add()
  • Update the box by a point.
    param thePnt

    type thePnt

    gp_XY

    rtype

    None* Update the box by a point.

    param thePnt

    type thePnt

    gp_Pnt2d

    rtype

    None* Update the box by another box.

    param theBox

    type theBox

    Bnd_B2f

    rtype

    None

Clear()
  • Reset the box data.
    rtype

    None

CornerMax()
  • Query a box corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XY

CornerMin()
  • Query a box corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XY

Enlarge()
  • Extend the Box by the absolute value of theDiff.
    param theDiff

    type theDiff

    float

    rtype

    None

IsIn()
  • Check that the box ‘this’ is inside the given box ‘theBox’. Returns True if ‘this’ box is fully inside ‘theBox’.
    param theBox

    type theBox

    Bnd_B2f

    rtype

    bool* Check that the box ‘this’ is inside the given box ‘theBox’ transformed by ‘theTrsf’. Returns True if ‘this’ box is fully inside the transformed ‘theBox’.

    param theBox

    type theBox

    Bnd_B2f

    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    bool

IsOut()
  • Check the given point for the inclusion in the Box. Returns True if the point is outside.
    param thePnt

    type thePnt

    gp_XY

    rtype

    bool* Check a circle for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theCenter

    type theCenter

    gp_XY

    param theRadius

    type theRadius

    float

    param isCircleHollow

    default value is Standard_False

    type isCircleHollow

    bool

    rtype

    bool* Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B2f

    rtype

    bool* Check the given box oriented by the given transformation for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B2f

    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    bool* Check the given Line for the intersection with the current box. Returns True if there is no intersection.

    param theLine

    type theLine

    gp_Ax2d

    rtype

    bool* Check the Segment defined by the couple of input points for the intersection with the current box. Returns True if there is no intersection.

    param theP0

    type theP0

    gp_XY

    param theP1

    type theP1

    gp_XY

    rtype

    bool

IsVoid()
  • Returns True if the box is void (non-initialized).
    rtype

    bool

Limit()
  • Limit the Box by the internals of theOtherBox. Returns True if the limitation takes place, otherwise False indicating that the boxes do not intersect.
    param theOtherBox

    type theOtherBox

    Bnd_B2f

    rtype

    bool

SetCenter()
  • Set the Center coordinates
    param theCenter

    type theCenter

    gp_XY

    rtype

    None

SetHSize()
  • Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
    param theHSize

    type theHSize

    gp_XY

    rtype

    None

SquareExtent()
  • Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned.
    rtype

    float

Transformed()
  • Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation.
    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    Bnd_B2f

property thisown

The membership flag

class Bnd_B3d(*args)

Bases: object

  • Empty constructor.
    rtype

    None* Constructor.

    param theCenter

    type theCenter

    gp_XYZ

    param theHSize

    type theHSize

    gp_XYZ

    rtype

    None

Add()
  • Update the box by a point.
    param thePnt

    type thePnt

    gp_XYZ

    rtype

    None* Update the box by a point.

    param thePnt

    type thePnt

    gp_Pnt

    rtype

    None* Update the box by another box.

    param theBox

    type theBox

    Bnd_B3d

    rtype

    None

Clear()
  • Reset the box data.
    rtype

    None

CornerMax()
  • Query the upper corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XYZ

CornerMin()
  • Query the lower corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XYZ

Enlarge()
  • Extend the Box by the absolute value of theDiff.
    param theDiff

    type theDiff

    float

    rtype

    None

IsIn()
  • Check that the box ‘this’ is inside the given box ‘theBox’. Returns True if ‘this’ box is fully inside ‘theBox’.
    param theBox

    type theBox

    Bnd_B3d

    rtype

    bool* Check that the box ‘this’ is inside the given box ‘theBox’ transformed by ‘theTrsf’. Returns True if ‘this’ box is fully inside the transformed ‘theBox’.

    param theBox

    type theBox

    Bnd_B3d

    param theTrsf

    type theTrsf

    gp_Trsf

    rtype

    bool

IsOut()
  • Check the given point for the inclusion in the Box. Returns True if the point is outside.
    param thePnt

    type thePnt

    gp_XYZ

    rtype

    bool* Check a sphere for the intersection with the current box. Returns True if there is no intersection between boxes. If the parameter ‘IsSphereHollow’ is True, then the intersection is not reported for a box that is completely inside the sphere (otherwise this method would report an intersection).

    param theCenter

    type theCenter

    gp_XYZ

    param theRadius

    type theRadius

    float

    param isSphereHollow

    default value is Standard_False

    type isSphereHollow

    bool

    rtype

    bool* Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B3d

    rtype

    bool* Check the given box oriented by the given transformation for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B3d

    param theTrsf

    type theTrsf

    gp_Trsf

    rtype

    bool* Check the given Line for the intersection with the current box. Returns True if there is no intersection. isRay==True means intersection check with the positive half-line theOverthickness is the addition to the size of the current box (may be negative). If positive, it can be treated as the thickness of the line ‘theLine’ or the radius of the cylinder along ‘theLine’

    param theLine

    type theLine

    gp_Ax1

    param isRay

    default value is Standard_False

    type isRay

    bool

    param theOverthickness

    default value is 0.0

    type theOverthickness

    float

    rtype

    bool* Check the given Plane for the intersection with the current box. Returns True if there is no intersection.

    param thePlane

    type thePlane

    gp_Ax3

    rtype

    bool

IsVoid()
  • Returns True if the box is void (non-initialized).
    rtype

    bool

Limit()
  • Limit the Box by the internals of theOtherBox. Returns True if the limitation takes place, otherwise False indicating that the boxes do not intersect.
    param theOtherBox

    type theOtherBox

    Bnd_B3d

    rtype

    bool

SetCenter()
  • Set the Center coordinates
    param theCenter

    type theCenter

    gp_XYZ

    rtype

    None

SetHSize()
  • Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
    param theHSize

    type theHSize

    gp_XYZ

    rtype

    None

SquareExtent()
  • Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned.
    rtype

    float

Transformed()
  • Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation.
    param theTrsf

    type theTrsf

    gp_Trsf

    rtype

    Bnd_B3d

property thisown

The membership flag

class Bnd_B3f(*args)

Bases: object

  • Empty constructor.
    rtype

    None* Constructor.

    param theCenter

    type theCenter

    gp_XYZ

    param theHSize

    type theHSize

    gp_XYZ

    rtype

    None

Add()
  • Update the box by a point.
    param thePnt

    type thePnt

    gp_XYZ

    rtype

    None* Update the box by a point.

    param thePnt

    type thePnt

    gp_Pnt

    rtype

    None* Update the box by another box.

    param theBox

    type theBox

    Bnd_B3f

    rtype

    None

Clear()
  • Reset the box data.
    rtype

    None

CornerMax()
  • Query the upper corner: (Center + HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XYZ

CornerMin()
  • Query the lower corner: (Center - HSize). You must make sure that the box is NOT VOID (see IsVoid()), otherwise the method returns irrelevant result.
    rtype

    gp_XYZ

Enlarge()
  • Extend the Box by the absolute value of theDiff.
    param theDiff

    type theDiff

    float

    rtype

    None

IsIn()
  • Check that the box ‘this’ is inside the given box ‘theBox’. Returns True if ‘this’ box is fully inside ‘theBox’.
    param theBox

    type theBox

    Bnd_B3f

    rtype

    bool* Check that the box ‘this’ is inside the given box ‘theBox’ transformed by ‘theTrsf’. Returns True if ‘this’ box is fully inside the transformed ‘theBox’.

    param theBox

    type theBox

    Bnd_B3f

    param theTrsf

    type theTrsf

    gp_Trsf

    rtype

    bool

IsOut()
  • Check the given point for the inclusion in the Box. Returns True if the point is outside.
    param thePnt

    type thePnt

    gp_XYZ

    rtype

    bool* Check a sphere for the intersection with the current box. Returns True if there is no intersection between boxes. If the parameter ‘IsSphereHollow’ is True, then the intersection is not reported for a box that is completely inside the sphere (otherwise this method would report an intersection).

    param theCenter

    type theCenter

    gp_XYZ

    param theRadius

    type theRadius

    float

    param isSphereHollow

    default value is Standard_False

    type isSphereHollow

    bool

    rtype

    bool* Check the given box for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B3f

    rtype

    bool* Check the given box oriented by the given transformation for the intersection with the current box. Returns True if there is no intersection between boxes.

    param theOtherBox

    type theOtherBox

    Bnd_B3f

    param theTrsf

    type theTrsf

    gp_Trsf

    rtype

    bool* Check the given Line for the intersection with the current box. Returns True if there is no intersection. isRay==True means intersection check with the positive half-line theOverthickness is the addition to the size of the current box (may be negative). If positive, it can be treated as the thickness of the line ‘theLine’ or the radius of the cylinder along ‘theLine’

    param theLine

    type theLine

    gp_Ax1

    param isRay

    default value is Standard_False

    type isRay

    bool

    param theOverthickness

    default value is 0.0

    type theOverthickness

    float

    rtype

    bool* Check the given Plane for the intersection with the current box. Returns True if there is no intersection.

    param thePlane

    type thePlane

    gp_Ax3

    rtype

    bool

IsVoid()
  • Returns True if the box is void (non-initialized).
    rtype

    bool

Limit()
  • Limit the Box by the internals of theOtherBox. Returns True if the limitation takes place, otherwise False indicating that the boxes do not intersect.
    param theOtherBox

    type theOtherBox

    Bnd_B3f

    rtype

    bool

SetCenter()
  • Set the Center coordinates
    param theCenter

    type theCenter

    gp_XYZ

    rtype

    None

SetHSize()
  • Set the HSize (half-diagonal) coordinates. All components of theHSize must be non-negative.
    param theHSize

    type theHSize

    gp_XYZ

    rtype

    None

SquareExtent()
  • Query the square diagonal. If the box is VOID (see method IsVoid()) then a very big real value is returned.
    rtype

    float

Transformed()
  • Transform the bounding box with the given transformation. The resulting box will be larger if theTrsf contains rotation.
    param theTrsf

    type theTrsf

    gp_Trsf

    rtype

    Bnd_B3f

property thisown

The membership flag

class Bnd_BoundSortBox(*args)

Bases: object

  • Constructs an empty comparison algorithm for bounding boxes. The bounding boxes are then defined using the Initialize function.
    rtype

    None

Add()
  • Adds the bounding box theBox at position boxIndex in the array of boxes to be sorted by this comparison algorithm. This function is used only in conjunction with the third syntax described in the synopsis of Initialize. //! Exceptions: //! - Standard_OutOfRange if boxIndex is not in the range [ 1,nbComponents ] where nbComponents is the maximum number of bounding boxes declared for this comparison algorithm at initialization. //! - Standard_MultiplyDefined if a box already exists at position boxIndex in the array of boxes to be sorted by this comparison algorithm.
    param theBox

    type theBox

    Bnd_Box

    param boxIndex

    type boxIndex

    int

    rtype

    None

Compare()
  • Compares the bounding box theBox, with the set of bounding boxes to be sorted by this comparison algorithm, and returns the list of intersecting bounding boxes as a list of indexes on the array of bounding boxes used by this algorithm.
    param theBox

    type theBox

    Bnd_Box

    rtype

    TColStd_ListOfInteger* Compares the plane P with the set of bounding boxes to be sorted by this comparison algorithm, and returns the list of intersecting bounding boxes as a list of indexes on the array of bounding boxes used by this algorithm.

    param P

    type P

    gp_Pln

    rtype

    TColStd_ListOfInteger

Destroy()
Return type

None

Dump()
Return type

None

Initialize()
  • Initializes this comparison algorithm with - the set of bounding boxes SetOfBox.
    param CompleteBox

    type CompleteBox

    Bnd_Box

    param SetOfBox

    type SetOfBox

    Bnd_HArray1OfBox

    rtype

    None* Initializes this comparison algorithm with - the set of bounding boxes SetOfBox, where CompleteBox is given as the global bounding box of SetOfBox.

    param SetOfBox

    type SetOfBox

    Bnd_HArray1OfBox

    rtype

    None* Initializes this comparison algorithm, giving it only - the maximum number nbComponents of the bounding boxes to be managed. Use the Add function to define the array of bounding boxes to be sorted by this algorithm.

    param CompleteBox

    type CompleteBox

    Bnd_Box

    param nbComponents

    type nbComponents

    int

    rtype

    None

property thisown

The membership flag

class Bnd_BoundSortBox2d(*args)

Bases: object

  • Constructs an empty comparison algorithm for 2D bounding boxes. The bounding boxes are then defined using the Initialize function.
    rtype

    None

Add()
  • Adds the 2D bounding box theBox at position boxIndex in the array of boxes to be sorted by this comparison algorithm. This function is used only in conjunction with the third syntax described in the synopsis of Initialize. Exceptions - Standard_OutOfRange if boxIndex is not in the range [ 1,nbComponents ] where nbComponents is the maximum number of bounding boxes declared for this comparison algorithm at initialization. - Standard_MultiplyDefined if a box still exists at position boxIndex in the array of boxes to be sorted by this comparison algorithm.
    param theBox

    type theBox

    Bnd_Box2d

    param boxIndex

    type boxIndex

    int

    rtype

    None

Compare()
  • Compares the 2D bounding box theBox with the set of bounding boxes to be sorted by this comparison algorithm, and returns the list of intersecting bounding boxes as a list of indexes on the array of bounding boxes used by this algorithm.
    param theBox

    type theBox

    Bnd_Box2d

    rtype

    TColStd_ListOfInteger

Dump()
Return type

None

Initialize()
  • Initializes this comparison algorithm with - the set of 2D bounding boxes SetOfBox
    param CompleteBox

    type CompleteBox

    Bnd_Box2d

    param SetOfBox

    type SetOfBox

    Bnd_HArray1OfBox2d

    rtype

    None* Initializes this comparison algorithm with - the set of 2D bounding boxes SetOfBox, where CompleteBox is given as the global bounding box of SetOfBox.

    param SetOfBox

    type SetOfBox

    Bnd_HArray1OfBox2d

    rtype

    None* Initializes this comparison algorithm, giving it only - the maximum number nbComponents, and - the global bounding box CompleteBox, of the 2D bounding boxes to be managed. Use the Add function to define the array of bounding boxes to be sorted by this algorithm.

    param CompleteBox

    type CompleteBox

    Bnd_Box2d

    param nbComponents

    type nbComponents

    int

    rtype

    None

property thisown

The membership flag

class Bnd_Box(*args)

Bases: object

  • Creates an empty Box. The constructed box is qualified Void. Its gap is null.
    rtype

    None* Creates a bounding box, it contains: - minimum/maximum point of bouning box, The constructed box is qualified Void. Its gap is null.

    param theMin

    type theMin

    gp_Pnt

    param theMax

    type theMax

    gp_Pnt

    rtype

    None

Add()
  • Adds the box <Other> to <self>.
    param Other

    type Other

    Bnd_Box

    rtype

    None* Adds a Pnt to the box.

    param P

    type P

    gp_Pnt

    rtype

    None* Extends <self> from the Pnt <P> in the direction <D>.

    param P

    type P

    gp_Pnt

    param D

    type D

    gp_Dir

    rtype

    None* Extends the Box in the given Direction, i.e. adds an half-line. The box may become infinite in 1,2 or 3 directions.

    param D

    type D

    gp_Dir

    rtype

    None

CornerMax()
  • Returns the upper corner of this bounding box. The gap is included. If this bounding box is infinite (i.e. ‘open’), returned values may be equal to +/- Precision::Infinite(). Standard_ConstructionError exception will be thrown if the box is void. if IsVoid()
    rtype

    gp_Pnt

CornerMin()
  • Returns the lower corner of this bounding box. The gap is included. If this bounding box is infinite (i.e. ‘open’), returned values may be equal to +/- Precision::Infinite(). Standard_ConstructionError exception will be thrown if the box is void. if IsVoid()
    rtype

    gp_Pnt

Distance()
  • Computes the minimum distance between two boxes.
    param Other

    type Other

    Bnd_Box

    rtype

    float

Dump()
Return type

None

DumpJsonToString(Bnd_Box self, int depth=-1) → std::string
Enlarge()
  • Enlarges the box with a tolerance value. (minvalues-Abs(<tol>) and maxvalues+Abs(<tol>)) This means that the minimum values of its X, Y and Z intervals of definition, when they are finite, are reduced by the absolute value of Tol, while the maximum values are increased by the same amount.
    param Tol

    type Tol

    float

    rtype

    None

FinitePart()
  • Returns a finite part of an infinite bounding box (returns self if this is already finite box). This can be a Void box in case if its sides has been defined as infinite (Open) without adding any finite points. WARNING! This method relies on Open flags, the infinite points added using Add() method will be returned as is.
    rtype

    Bnd_Box

Get()
  • Returns the bounds of this bounding box. The gap is included. If this bounding box is infinite (i.e. ‘open’), returned values may be equal to +/- Precision::Infinite(). Standard_ConstructionError exception will be thrown if the box is void. if IsVoid()
    param theXmin

    type theXmin

    float

    param theYmin

    type theYmin

    float

    param theZmin

    type theZmin

    float

    param theXmax

    type theXmax

    float

    param theYmax

    type theYmax

    float

    param theZmax

    type theZmax

    float

    rtype

    None

GetGap()
  • Returns the gap of this bounding box.
    rtype

    float

HasFinitePart()
  • Returns True if this box has finite part.
    rtype

    bool

IsOpen()
  • Returns true if this bounding box has at least one open direction.
    rtype

    bool

IsOpenXmax()
  • Returns true if this bounding box is open in the Xmax direction.
    rtype

    bool

IsOpenXmin()
  • Returns true if this bounding box is open in the Xmin direction.
    rtype

    bool

IsOpenYmax()
  • Returns true if this bounding box is open in the Ymax direction.
    rtype

    bool

IsOpenYmin()
  • Returns true if this bounding box is open in the Ymix direction.
    rtype

    bool

IsOpenZmax()
  • Returns true if this bounding box is open in the Zmax direction.
    rtype

    bool

IsOpenZmin()
  • Returns true if this bounding box is open in the Zmin direction.
    rtype

    bool

IsOut()
  • Returns True if the Pnt is out the box.
    param P

    type P

    gp_Pnt

    rtype

    bool* Returns False if the line intersects the box.

    param L

    type L

    gp_Lin

    rtype

    bool* Returns False if the plane intersects the box.

    param P

    type P

    gp_Pln

    rtype

    bool* Returns False if the <Box> intersects or is inside <self>.

    param Other

    type Other

    Bnd_Box

    rtype

    bool* Returns False if the transformed <Box> intersects or is inside <self>.

    param Other

    type Other

    Bnd_Box

    param T

    type T

    gp_Trsf

    rtype

    bool* Returns False if the transformed <Box> intersects or is inside the transformed box <self>.

    param T1

    type T1

    gp_Trsf

    param Other

    type Other

    Bnd_Box

    param T2

    type T2

    gp_Trsf

    rtype

    bool* Returns False if the flat band lying between two parallel lines represented by their reference points <P1>, <P2> and direction <D> intersects the box.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    param D

    type D

    gp_Dir

    rtype

    bool

IsThin()
  • Returns true if IsXThin, IsYThin and IsZThin are all true, i.e. if the box is thin in all three dimensions.
    param tol

    type tol

    float

    rtype

    bool

IsVoid()
  • Returns true if this bounding box is empty (Void flag).
    rtype

    bool

IsWhole()
  • Returns true if this bounding box is infinite in all 6 directions (WholeSpace flag).
    rtype

    bool

IsXThin()
  • true if xmax-xmin < tol.
    param tol

    type tol

    float

    rtype

    bool

IsYThin()
  • true if ymax-ymin < tol.
    param tol

    type tol

    float

    rtype

    bool

IsZThin()
  • true if zmax-zmin < tol.
    param tol

    type tol

    float

    rtype

    bool

OpenXmax()
  • The Box will be infinitely long in the Xmax direction.
    rtype

    None

OpenXmin()
  • The Box will be infinitely long in the Xmin direction.
    rtype

    None

OpenYmax()
  • The Box will be infinitely long in the Ymax direction.
    rtype

    None

OpenYmin()
  • The Box will be infinitely long in the Ymin direction.
    rtype

    None

OpenZmax()
  • The Box will be infinitely long in the Zmax direction.
    rtype

    None

OpenZmin()
  • The Box will be infinitely long in the Zmin direction.
    rtype

    None

Set()
  • Sets this bounding box so that it bounds - the point P. This involves first setting this bounding box to be void and then adding the point P.
    param P

    type P

    gp_Pnt

    rtype

    None* Sets this bounding box so that it bounds the half-line defined by point P and direction D, i.e. all points M defined by M=P+u*D, where u is greater than or equal to 0, are inside the bounding volume. This involves first setting this box to be void and then adding the half-line.

    param P

    type P

    gp_Pnt

    param D

    type D

    gp_Dir

    rtype

    None

SetGap()
  • Set the gap of this bounding box to abs(Tol).
    param Tol

    type Tol

    float

    rtype

    None

SetVoid()
  • Sets this bounding box so that it is empty. All points are outside a void box.
    rtype

    None

SetWhole()
  • Sets this bounding box so that it covers the whole of 3D space. It is infinitely long in all directions.
    rtype

    None

SquareExtent()
  • Computes the squared diagonal of me.
    rtype

    float

Transformed()
  • Returns a bounding box which is the result of applying the transformation T to this bounding box. Warning Applying a geometric transformation (for example, a rotation) to a bounding box generally increases its dimensions. This is not optimal for algorithms which use it.
    param T

    type T

    gp_Trsf

    rtype

    Bnd_Box

Update()
  • Enlarges this bounding box, if required, so that it contains at least: - interval [ aXmin,aXmax ] in the ‘X Direction’, - interval [ aYmin,aYmax ] in the ‘Y Direction’, - interval [ aZmin,aZmax ] in the ‘Z Direction’;
    param aXmin

    type aXmin

    float

    param aYmin

    type aYmin

    float

    param aZmin

    type aZmin

    float

    param aXmax

    type aXmax

    float

    param aYmax

    type aYmax

    float

    param aZmax

    type aZmax

    float

    rtype

    None* Adds a point of coordinates (X,Y,Z) to this bounding box.

    param X

    type X

    float

    param Y

    type Y

    float

    param Z

    type Z

    float

    rtype

    None

property thisown

The membership flag

class Bnd_Box2d(*args)

Bases: object

  • Creates an empty 2D bounding box. The constructed box is qualified Void. Its gap is null.
    rtype

    None

Add()
  • Adds the 2d box <Other> to <self>.
    param Other

    type Other

    Bnd_Box2d

    rtype

    None* Adds the 2d point.

    param thePnt

    type thePnt

    gp_Pnt2d

    rtype

    None* Extends bounding box from thePnt in the direction theDir.

    param thePnt

    type thePnt

    gp_Pnt2d

    param theDir

    type theDir

    gp_Dir2d

    rtype

    None* Extends the Box in the given Direction, i.e. adds a half-line. The box may become infinite in 1 or 2 directions.

    param D

    type D

    gp_Dir2d

    rtype

    None

Dump()
Return type

None

Enlarge()
  • Enlarges the box with a tolerance value. This means that the minimum values of its X and Y intervals of definition, when they are finite, are reduced by the absolute value of Tol, while the maximum values are increased by the same amount.
    param theTol

    type theTol

    float

    rtype

    None

Get()
  • Returns the bounds of this 2D bounding box. The gap is included. If this bounding box is infinite (i.e. ‘open’), returned values may be equal to +/- Precision::Infinite(). if IsVoid()
    param aXmin

    type aXmin

    float

    param aYmin

    type aYmin

    float

    param aXmax

    type aXmax

    float

    param aYmax

    type aYmax

    float

    rtype

    None

GetGap()
  • Returns the gap of this 2D bounding box.
    rtype

    float

IsOpenXmax()
  • Returns true if this bounding box is open in the Xmax direction.
    rtype

    bool

IsOpenXmin()
  • Returns true if this bounding box is open in the Xmin direction.
    rtype

    bool

IsOpenYmax()
  • Returns true if this bounding box is open in the Ymax direction.
    rtype

    bool

IsOpenYmin()
  • Returns true if this bounding box is open in the Ymin direction.
    rtype

    bool

IsOut()
  • Returns True if the 2d pnt <P> is out <self>.
    param P

    type P

    gp_Pnt2d

    rtype

    bool* Returns True if <Box2d> is out <self>.

    param Other

    type Other

    Bnd_Box2d

    rtype

    bool* Returns True if transformed <Box2d> is out <self>.

    param theOther

    type theOther

    Bnd_Box2d

    param theTrsf

    type theTrsf

    gp_Trsf2d

    rtype

    bool* Compares a transformed bounding with a transformed bounding. The default implementation is to make a copy of <self> and <Other>, to transform them and to test.

    param T1

    type T1

    gp_Trsf2d

    param Other

    type Other

    Bnd_Box2d

    param T2

    type T2

    gp_Trsf2d

    rtype

    bool

IsVoid()
  • Returns true if this 2D bounding box is empty (Void flag).
    rtype

    bool

IsWhole()
  • Returns true if this bounding box is infinite in all 4 directions (Whole Space flag).
    rtype

    bool

OpenXmax()
  • The Box will be infinitely long in the Xmax direction.
    rtype

    None

OpenXmin()
  • The Box will be infinitely long in the Xmin direction.
    rtype

    None

OpenYmax()
  • The Box will be infinitely long in the Ymax direction.
    rtype

    None

OpenYmin()
  • The Box will be infinitely long in the Ymin direction.
    rtype

    None

Set()
  • Sets this 2D bounding box so that it bounds the point P. This involves first setting this bounding box to be void and then adding the point PThe rectangle bounds the point <P>.
    param thePnt

    type thePnt

    gp_Pnt2d

    rtype

    None* Sets this 2D bounding box so that it bounds the half-line defined by point P and direction D, i.e. all points M defined by M=P+u*D, where u is greater than or equal to 0, are inside the bounding area. This involves first setting this 2D box to be void and then adding the half-line.

    param thePnt

    type thePnt

    gp_Pnt2d

    param theDir

    type theDir

    gp_Dir2d

    rtype

    None

SetGap()
  • Set the gap of this 2D bounding box to abs(Tol).
    param Tol

    type Tol

    float

    rtype

    None

SetVoid()
  • Sets this 2D bounding box so that it is empty. All points are outside a void box.
    rtype

    None

SetWhole()
  • Sets this bounding box so that it covers the whole 2D space, i.e. it is infinite in all directions.
    rtype

    None

SquareExtent()
  • Computes the squared diagonal of me.
    rtype

    float

Transformed()
  • Returns a bounding box which is the result of applying the transformation T to this bounding box. Warning Applying a geometric transformation (for example, a rotation) to a bounding box generally increases its dimensions. This is not optimal for algorithms which use it.
    param T

    type T

    gp_Trsf2d

    rtype

    Bnd_Box2d

Update()
  • Enlarges this 2D bounding box, if required, so that it contains at least: - interval [ aXmin,aXmax ] in the ‘X Direction’, - interval [ aYmin,aYmax ] in the ‘Y Direction’
    param aXmin

    type aXmin

    float

    param aYmin

    type aYmin

    float

    param aXmax

    type aXmax

    float

    param aYmax

    type aYmax

    float

    rtype

    None* Adds a point of coordinates (X,Y) to this bounding box.

    param X

    type X

    float

    param Y

    type Y

    float

    rtype

    None

property thisown

The membership flag

class Bnd_HArray1OfBox(*args)

Bases: OCC.Core.Bnd.Bnd_Array1OfBox, OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Array1()
ChangeArray1()
static DownCast(t)
property thisown

The membership flag

class Bnd_HArray1OfBox2d(*args)

Bases: OCC.Core.Bnd.Bnd_Array1OfBox2d, OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Array1()
ChangeArray1()
static DownCast(t)
property thisown

The membership flag

class Bnd_HArray1OfSphere(*args)

Bases: OCC.Core.Bnd.Bnd_Array1OfSphere, OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

Array1()
ChangeArray1()
static DownCast(t)
property thisown

The membership flag

class Bnd_OBB(*args)

Bases: object

  • Empty constructor
    rtype

    None* Constructor taking all defining parameters

    param theCenter

    type theCenter

    gp_Pnt

    param theXDirection

    type theXDirection

    gp_Dir

    param theYDirection

    type theYDirection

    gp_Dir

    param theZDirection

    type theZDirection

    gp_Dir

    param theHXSize

    type theHXSize

    float

    param theHYSize

    type theHYSize

    float

    param theHZSize

    type theHZSize

    float

    rtype

    None* Constructor to create OBB from AABB.

    param theBox

    type theBox

    Bnd_Box

    rtype

    None

Add()
  • Rebuilds this in order to include all previous objects (which it was created from) and theOther.
    param theOther

    type theOther

    Bnd_OBB

    rtype

    None* Rebuilds this in order to include all previous objects (which it was created from) and theP.

    param theP

    type theP

    gp_Pnt

    rtype

    None

Center()
  • Returns the center of OBB
    rtype

    gp_XYZ

DumpJsonToString(Bnd_OBB self, int depth=-1) → std::string
Enlarge()
  • Enlarges the box with the given value
    param theGapAdd

    type theGapAdd

    float

    rtype

    None

GetVertex()
  • Returns the array of vertices in <this>. The local coordinate of the vertex depending on the index of the array are follow: Index == 0: (-XHSize(), -YHSize(), -ZHSize()) Index == 1: ( XHSize(), -YHSize(), -ZHSize()) Index == 2: (-XHSize(), YHSize(), -ZHSize()) Index == 3: ( XHSize(), YHSize(), -ZHSize()) Index == 4: (-XHSize(), -YHSize(), ZHSize()) Index == 5: ( XHSize(), -YHSize(), ZHSize()) Index == 6: (-XHSize(), YHSize(), ZHSize()) Index == 7: ( XHSize(), YHSize(), ZHSize()).
    param theP

    type theP

    gp_Pnt

    rtype

    bool

IsAABox()
  • Returns True if the box is axes aligned
    rtype

    bool

IsCompletelyInside()
  • Check if the theOther is completely inside *this.
    param theOther

    type theOther

    Bnd_OBB

    rtype

    bool

IsOut()
  • Check if the box do not interfere the other box.
    param theOther

    type theOther

    Bnd_OBB

    rtype

    bool* Check if the point is inside of <this>.

    param theP

    type theP

    gp_Pnt

    rtype

    bool

IsVoid()
  • Checks if the box is empty.
    rtype

    bool

Position()
  • Returns the local coordinates system of this oriented box. So that applying it to axis-aligned box ((-XHSize, -YHSize, -ZHSize), (XHSize, YHSize, ZHSize)) will produce this oriented box. @code gp_Trsf aLoc; aLoc.SetTransformation (theOBB.Position(), gp::XOY()); @endcode
    rtype

    gp_Ax3

ReBuild()
  • Creates new OBB covering every point in theListOfPoints. Tolerance of every such point is set by *theListOfTolerances array. If this array is not void (not null-pointer) then the resulted Bnd_OBB will be enlarged using tolerances of points lying on the box surface. <theIsOptimal> flag defines the mode in which the OBB will be built. Constructing Optimal box takes more time, but the resulting box is usually more tight. In case of construction of Optimal OBB more possible axes are checked.
    param theListOfPoints

    type theListOfPoints

    TColgp_Array1OfPnt

    param theListOfTolerances

    default value is 0

    type theListOfTolerances

    TColStd_Array1OfReal *

    param theIsOptimal

    default value is Standard_False

    type theIsOptimal

    bool

    rtype

    None

SetAABox()
  • Sets the flag for axes aligned box
    param theFlag

    type theFlag

    bool

    rtype

    None

SetCenter()
  • Sets the center of OBB
    param theCenter

    type theCenter

    gp_Pnt

    rtype

    None

SetVoid()
  • Clears this box
    rtype

    None

SetXComponent()
  • Sets the X component of OBB - direction and size
    param theXDirection

    type theXDirection

    gp_Dir

    param theHXSize

    type theHXSize

    float

    rtype

    None

SetYComponent()
  • Sets the Y component of OBB - direction and size
    param theYDirection

    type theYDirection

    gp_Dir

    param theHYSize

    type theHYSize

    float

    rtype

    None

SetZComponent()
  • Sets the Z component of OBB - direction and size
    param theZDirection

    type theZDirection

    gp_Dir

    param theHZSize

    type theHZSize

    float

    rtype

    None

SquareExtent()
  • Returns square diagonal of this box
    rtype

    float

XDirection()
  • Returns the X Direction of OBB
    rtype

    gp_XYZ

XHSize()
  • Returns the X Dimension of OBB
    rtype

    float

YDirection()
  • Returns the Y Direction of OBB
    rtype

    gp_XYZ

YHSize()
  • Returns the Y Dimension of OBB
    rtype

    float

ZDirection()
  • Returns the Z Direction of OBB
    rtype

    gp_XYZ

ZHSize()
  • Returns the Z Dimension of OBB
    rtype

    float

property thisown

The membership flag

class Bnd_Range(*args)

Bases: object

  • Default constructor. Creates VOID range.
    rtype

    None* Constructor. Never creates VOID range.

    param theMin

    type theMin

    float

    param theMax

    type theMax

    float

    rtype

    None

Add()
  • Extends <this> to include theParameter
    param theParameter

    type theParameter

    float

    rtype

    None* Extends this range to include both ranges. @sa use method ::Union() to check if two ranges overlap method merging

    param theRange

    type theRange

    Bnd_Range

    rtype

    None

Common()
  • Replaces <this> with common-part of <this> and theOther
    param theOther

    type theOther

    Bnd_Range

    rtype

    None

Delta()
  • Returns range value (MAX-MIN). Returns negative value for VOID range.
    rtype

    float

DumpJsonToString(Bnd_Range self, int depth=-1) → std::string
Enlarge()
  • Extends this to the given value (in both side)
    param theDelta

    type theDelta

    float

    rtype

    None

GetBounds()
  • Obtain first and last boundary of <this>. If <this> is VOID the method returns false.
    param theFirstPar

    type theFirstPar

    float

    param theLastPar

    type theLastPar

    float

    rtype

    bool

GetIntermediatePoint()
  • Obtain theParameter satisfied to the equation (theParameter-MIN)/(MAX-MIN) == theLambda. * theLambda == 0 –> MIN boundary will be returned; * theLambda == 0.5 –> Middle point will be returned; * theLambda == 1 –> MAX boundary will be returned; * theLambda < 0 –> the value less than MIN will be returned; * theLambda > 1 –> the value greater than MAX will be returned. If <this> is VOID the method returns false.
    param theLambda

    type theLambda

    float

    param theParameter

    type theParameter

    float

    rtype

    bool

GetMax()
  • Obtain MAX boundary of <this>. If <this> is VOID the method returns false.
    param thePar

    type thePar

    float

    rtype

    bool

GetMin()
  • Obtain MIN boundary of <this>. If <this> is VOID the method returns false.
    param thePar

    type thePar

    float

    rtype

    bool

IsIntersected()
  • Checks if <this> intersects values like theVal+k*thePeriod, where k is an integer number (k = 0, +/-1, +/-2, …). Returns: 0 - if <this> does not intersect the theVal+k*thePeriod. 1 - if <this> intersects theVal+k*thePeriod. 2 - if myFirst or/and myLast are equal to theVal+k*thePeriod. //! ATTENTION!!! If (myFirst == myLast) then this function will return only either 0 or 2.
    param theVal

    type theVal

    float

    param thePeriod

    default value is 0.0

    type thePeriod

    float

    rtype

    int

IsOut()
  • Returns True if the value is out of this range.
    param theValue

    type theValue

    float

    rtype

    bool* Returns True if the given range is out of this range.

    param theRange

    type theRange

    Bnd_Range

    rtype

    bool

IsVoid()
  • Is <this> initialized.
    rtype

    bool

SetVoid()
  • Initializes <this> by default parameters. Makes <this> VOID.
    rtype

    None

Shift()
  • Shifts <*this> by theVal
    param theVal

    type theVal

    float

    rtype

    None

Shifted()
  • Returns the copy of <*this> shifted by theVal
    param theVal

    type theVal

    float

    rtype

    Bnd_Range

Split()
  • Splits <this> to several sub-ranges by theVal value (e.g. range [3, 15] will be split by theVal==5 to the two ranges: [3, 5] and [5, 15]). New ranges will be pushed to theList (theList must be initialized correctly before calling this method). If thePeriod != 0.0 then at least one boundary of new ranges (if <*this> intersects theVal+k*thePeriod) will be equal to theVal+thePeriod*k, where k is an integer number (k = 0, +/-1, +/-2, …). (let thePeriod in above example be 4 ==> we will obtain four ranges: [3, 5], [5, 9], [9, 13] and [13, 15].
    param theVal

    type theVal

    float

    param theList

    type theList

    NCollection_List<Bnd_Range>

    param thePeriod

    default value is 0.0

    type thePeriod

    float

    rtype

    None

TrimFrom()
  • Trims the First value in range by the given lower limit. Marks range as Void if the given Lower value is greater than range Max.
    param theValLower

    type theValLower

    float

    rtype

    None

TrimTo()
  • Trim the Last value in range by the given Upper limit. Marks range as Void if the given Upper value is smaller than range Max.
    param theValUpper

    type theValUpper

    float

    rtype

    None

Union()
  • Joins *this and theOther to one interval. Replaces *this to the result. Returns false if the operation cannot be done (e.g. input arguments are empty or separated). @sa use method ::Add() to merge two ranges unconditionally
    param theOther

    type theOther

    Bnd_Range

    rtype

    bool

property thisown

The membership flag

class Bnd_SeqOfBox(*args)

Bases: object

Append()
Assign()
ChangeFirst()
ChangeLast()
ChangeValue()
Clear()
Exchange()
First()
InsertAfter()
InsertBefore()
IsEmpty()
Last()
Length()
Lower()
Prepend()
Remove()
Reverse()
Set()
SetValue()
Size()
Split()
Upper()
Value()
begin()
cbegin()
cend()
static delNode()
end()
property thisown

The membership flag

class Bnd_Sphere(*args)

Bases: object

  • Empty constructor
    rtype

    None* Constructor of a definite sphere

    param theCntr

    type theCntr

    gp_XYZ

    param theRad

    type theRad

    float

    param theU

    type theU

    int

    param theV

    type theV

    int

    rtype

    None

Add()
Parameters

theOther

type theOther

Bnd_Sphere

rtype

None

Center()
  • Returns center of sphere object
    rtype

    gp_XYZ

Distance()
Parameters

theNode

type theNode

gp_XYZ

rtype

float

Distances()
  • Calculate and return minimal and maximal distance to sphere. NOTE: This function is tightly optimized; any modifications may affect performance!
    param theXYZ

    type theXYZ

    gp_XYZ

    param theMin

    type theMin

    float

    param theMax

    type theMax

    float

    rtype

    None

IsOut()
Parameters

theOther

type theOther

Bnd_Sphere

rtype

bool:param thePnt:

type thePnt

gp_XYZ

param theMaxDist

type theMaxDist

float

rtype

bool

IsValid()
  • Returns validity status, indicating that this sphere corresponds to a real entity
    rtype

    bool

Project()
  • Projects a point on entity. Returns true if success
    param theNode

    type theNode

    gp_XYZ

    param theProjNode

    type theProjNode

    gp_XYZ

    param theDist

    type theDist

    float

    param theInside

    type theInside

    bool

    rtype

    bool

Radius()
  • Returns the radius value
    rtype

    float

SetValid()
Parameters

isValid

type isValid

bool

rtype

None

SquareDistance()
Parameters

theNode

type theNode

gp_XYZ

rtype

float

SquareDistances()
  • Calculate and return minimal and maximal distance to sphere. NOTE: This function is tightly optimized; any modifications may affect performance!
    param theXYZ

    type theXYZ

    gp_XYZ

    param theMin

    type theMin

    float

    param theMax

    type theMax

    float

    rtype

    None

SquareExtent()
Return type

float

U()
  • Returns the U parameter on shape
    rtype

    int

V()
  • Returns the V parameter on shape
    rtype

    int

property thisown

The membership flag

class Bnd_Tools

Bases: object

static Bnd2BVH()
  • @name Bnd_Box to BVH_Box conversion Converts the given Bnd_Box2d to BVH_Box
    param theBox

    type theBox

    Bnd_Box2d

    rtype

    BVH_Box<float, 2>* Converts the given Bnd_Box to BVH_Box

    param theBox

    type theBox

    Bnd_Box

    rtype

    BVH_Box<float, 3>

property thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
property thisown

The membership flag

value()