OCC.Core.Geom2dHatch module

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

class Geom2dHatch_Classifier(*args)

Bases: object

  • Empty constructor, undefined algorithm.
    rtype

    None* Creates an algorithm to classify the Point P with Tolerance <T> on the face described by <F>.

    param F

    type F

    Geom2dHatch_Elements

    param P

    type P

    gp_Pnt2d

    param Tol

    type Tol

    float

    rtype

    None

Edge()
  • Returns the Edge used to determine the classification. When the State is ON this is the Edge containing the point.
    rtype

    Geom2dAdaptor_Curve

EdgeParameter()
  • Returns the parameter on Edge() used to determine the classification.
    rtype

    float

NoWires()
  • Returns True if the face contains no wire. The state is IN.
    rtype

    bool

Perform()
  • Classify the Point P with Tolerance <T> on the face described by <F>.
    param F

    type F

    Geom2dHatch_Elements

    param P

    type P

    gp_Pnt2d

    param Tol

    type Tol

    float

    rtype

    None

Position()
  • Returns the position of the point on the edge returned by Edge.
    rtype

    IntRes2d_Position

Rejected()
  • Returns True when the state was computed by a rejection. The state is OUT.
    rtype

    bool

State()
  • Returns the result of the classification.
    rtype

    TopAbs_State

property thisown

The membership flag

class Geom2dHatch_Element(*args)

Bases: object

Return type

None* Magic constructor. :param Other: :type Other: Geom2dHatch_Element :rtype: None* Creates an element. :param Curve: :type Curve: Geom2dAdaptor_Curve :param Orientation: default value is TopAbs_FORWARD :type Orientation: TopAbs_Orientation :rtype: None

ChangeCurve()
  • Returns the curve associated to the element.
    rtype

    Geom2dAdaptor_Curve

Curve()
  • Returns the curve associated to the element.
    rtype

    Geom2dAdaptor_Curve

Orientation()
  • Sets the orientation of the element.
    param Orientation

    type Orientation

    TopAbs_Orientation

    rtype

    None* Returns the orientation of the element.

    rtype

    TopAbs_Orientation

property thisown

The membership flag

class Geom2dHatch_Elements(*args)

Bases: object

Return type

None:param Other: :type Other: Geom2dHatch_Elements :rtype: None

Bind()
Parameters

K

type K

int

param I

type I

Geom2dHatch_Element

rtype

bool

ChangeFind()
Parameters

K

type K

int

rtype

Geom2dHatch_Element

CheckPoint()
Parameters

P

type P

gp_Pnt2d

rtype

bool

Clear()
Return type

None

CurrentEdge()
Parameters

E

type E

Geom2dAdaptor_Curve

param Or

type Or

TopAbs_Orientation

rtype

None

Find()
Parameters

K

type K

int

rtype

Geom2dHatch_Element

InitEdges()
Return type

None

InitWires()
Return type

None

IsBound()
Parameters

K

type K

int

rtype

bool

MoreEdges()
Return type

bool

MoreWires()
Return type

bool

NextEdge()
Return type

None

NextWire()
Return type

None

OtherSegment()
Parameters

P

type P

gp_Pnt2d

param L

type L

gp_Lin2d

param Par

type Par

float

rtype

bool

Reject()
Parameters

P

type P

gp_Pnt2d

rtype

bool

RejectEdge()
Parameters

L

type L

gp_Lin2d

param Par

type Par

float

rtype

bool

RejectWire()
Parameters

L

type L

gp_Lin2d

param Par

type Par

float

rtype

bool

Segment()
Parameters

P

type P

gp_Pnt2d

param L

type L

gp_Lin2d

param Par

type Par

float

rtype

bool

UnBind()
Parameters

K

type K

int

rtype

bool

property thisown

The membership flag

class Geom2dHatch_FClass2dOfClassifier(*args)

Bases: object

  • Creates an undefined classifier.
    rtype

    None

ClosestIntersection()
  • Returns 0 if the last compared edge had no relevant intersection. Else returns the index of this intersection in the last intersection algorithm.
    rtype

    int

Compare()
  • Updates the classification process with the edge <E> from the boundary.
    param E

    type E

    Geom2dAdaptor_Curve

    param Or

    type Or

    TopAbs_Orientation

    rtype

    None

Intersector()
  • Returns the intersecting algorithm.
    rtype

    Geom2dHatch_Intersector

IsHeadOrEnd()
  • Returns the Standard_True if the closest intersection point represents head or end of the edge. Returns Standard_False otherwise.
    rtype

    bool

Parameter()
  • Returns the current value of the parameter.
    rtype

    float

Reset()
  • Starts a classification process. The point to classify is the origin of the line <L>. <P> is the original length of the segment on <L> used to compute intersections. <Tol> is the tolerance attached to the line segment in intersections.
    param L

    type L

    gp_Lin2d

    param P

    type P

    float

    param Tol

    type Tol

    float

    rtype

    None

State()
  • Returns the current state of the point.
    rtype

    TopAbs_State

property thisown

The membership flag

class Geom2dHatch_Hatcher(*args)

Bases: object

  • Returns an empty hatcher.
    param Intersector

    type Intersector

    Geom2dHatch_Intersector

    param Confusion2d

    type Confusion2d

    float

    param Confusion3d

    type Confusion3d

    float

    param KeepPnt

    default value is Standard_False

    type KeepPnt

    bool

    param KeepSeg

    default value is Standard_False

    type KeepSeg

    bool

    rtype

    None

AddElement()
  • Adds an element to the hatcher and returns its index.
    param Curve

    type Curve

    Geom2dAdaptor_Curve

    param Orientation

    default value is TopAbs_FORWARD

    type Orientation

    TopAbs_Orientation

    rtype

    int* Adds an element to the hatcher and returns its index.

    param Curve

    type Curve

    Geom2d_Curve

    param Orientation

    default value is TopAbs_FORWARD

    type Orientation

    TopAbs_Orientation

    rtype

    int

AddHatching()
  • Adds a hatching to the hatcher and returns its index.
    param Curve

    type Curve

    Geom2dAdaptor_Curve

    rtype

    int

ChangeIntersector()
  • Returns the associated intersector.
    rtype

    Geom2dHatch_Intersector

Clear()
  • Removes all the hatchings and all the elements.
    rtype

    None

ClrElements()
  • Removes all the elements from the hatcher.
    rtype

    None

ClrHatchings()
  • Removes all the hatchings from the hatcher.
    rtype

    None

ComputeDomains()
  • Computes the domains of all the hatchings.
    rtype

    None* Computes the domains of the IndH-th hatching.

    param IndH

    type IndH

    int

    rtype

    None

Confusion2d()
  • Sets the confusion tolerance.
    param Confusion

    type Confusion

    float

    rtype

    None* Returns the 2d confusion tolerance, i.e. the value under which two points are considered identical in the parametric space of the hatching.

    rtype

    float

Confusion3d()
  • Sets the confusion tolerance.
    param Confusion

    type Confusion

    float

    rtype

    None* Returns the 3d confusion tolerance, i.e. the value under which two points are considered identical in the 3d space of the hatching.

    rtype

    float

Domain()
  • Returns the IDom-th domain of the IndH-th hatching.
    param IndH

    type IndH

    int

    param IDom

    type IDom

    int

    rtype

    HatchGen_Domain

Dump()
  • Dump the hatcher.
    rtype

    None

ElementCurve()
  • Returns the curve associated to the IndE-th element.
    param IndE

    type IndE

    int

    rtype

    Geom2dAdaptor_Curve

HatchingCurve()
  • Returns the curve associated to the IndH-th hatching.
    param IndH

    type IndH

    int

    rtype

    Geom2dAdaptor_Curve

Intersector()
  • Sets the associated intersector.
    param Intersector

    type Intersector

    Geom2dHatch_Intersector

    rtype

    None* Returns the associated intersector.

    rtype

    Geom2dHatch_Intersector

KeepPoints()
  • Sets the above flag.
    param Keep

    type Keep

    bool

    rtype

    None* Returns the flag about the points consideration.

    rtype

    bool

KeepSegments()
  • Sets the above flag.
    param Keep

    type Keep

    bool

    rtype

    None* Returns the flag about the segments consideration.

    rtype

    bool

NbDomains()
  • Returns the number of domains of the IndH-th hatching. Only ONE ‘INFINITE’ domain means that the hatching is fully included in the contour defined by the elements.
    param IndH

    type IndH

    int

    rtype

    int

NbPoints()
  • Returns the number of intersection points of the IndH-th hatching.
    param IndH

    type IndH

    int

    rtype

    int

Point()
  • Returns the IndP-th intersection point of the IndH-th hatching.
    param IndH

    type IndH

    int

    param IndP

    type IndP

    int

    rtype

    HatchGen_PointOnHatching

RemElement()
  • Removes the IndE-th element from the hatcher.
    param IndE

    type IndE

    int

    rtype

    None

RemHatching()
  • Removes the IndH-th hatching from the hatcher.
    param IndH

    type IndH

    int

    rtype

    None

Status()
  • Returns the status about the IndH-th hatching.
    param IndH

    type IndH

    int

    rtype

    HatchGen_ErrorStatus

Trim()
  • Trims all the hatchings of the hatcher by all the elements of the hatcher.
    rtype

    None* Adds a hatching to the hatcher and trims it by the elements already given and returns its index.

    param Curve

    type Curve

    Geom2dAdaptor_Curve

    rtype

    int* Trims the IndH-th hatching by the elements already given.

    param IndH

    type IndH

    int

    rtype

    None

TrimDone()
  • Returns the fact that the intersections were computed for the IndH-th hatching.
    param IndH

    type IndH

    int

    rtype

    bool

TrimFailed()
  • Returns the fact that the intersections failed for the IndH-th hatching.
    param IndH

    type IndH

    int

    rtype

    bool

property thisown

The membership flag

class Geom2dHatch_Hatching(*args)

Bases: object

Return type

None* Creates a hatching. :param Curve: :type Curve: Geom2dAdaptor_Curve :rtype: None

AddDomain()
  • Adds a domain to the hatching.
    param Domain

    type Domain

    HatchGen_Domain

    rtype

    None

AddPoint()
  • Adds an intersection point to the hatching.
    param Point

    type Point

    HatchGen_PointOnHatching

    param Confusion

    type Confusion

    float

    rtype

    None

ChangeCurve()
  • Returns the curve associated to the hatching.
    rtype

    Geom2dAdaptor_Curve

ChangePoint()
  • Returns the Index-th intersection point of the hatching. The exception OutOfRange is raised if Index < 1 or Index > NbPoints.
    param Index

    type Index

    int

    rtype

    HatchGen_PointOnHatching

ClassificationPoint()
  • Returns a point on the curve. This point will be used for the classification.
    rtype

    gp_Pnt2d

ClrDomains()
  • Removes all the domains of the hatching.
    rtype

    None

ClrPoints()
  • Removes all the intersection points of the hatching.
    rtype

    None

Curve()
  • Returns the curve associated to the hatching.
    rtype

    Geom2dAdaptor_Curve

Domain()
  • Returns the Index-th domain of the hatching. The exception OutOfRange is raised if Index < 1 or Index > NbDomains.
    param Index

    type Index

    int

    rtype

    HatchGen_Domain

IsDone()
  • Sets the flag about the domains computation to the given value.
    param Flag

    type Flag

    bool

    rtype

    None* Returns the flag about the domains computation.

    rtype

    bool

NbDomains()
  • Returns the number of domains of the hatching.
    rtype

    int

NbPoints()
  • Returns the number of intersection points of the hatching.
    rtype

    int

Point()
  • Returns the Index-th intersection point of the hatching. The exception OutOfRange is raised if Index < 1 or Index > NbPoints.
    param Index

    type Index

    int

    rtype

    HatchGen_PointOnHatching

RemDomain()
  • Removes the Index-th domain of the hatching. The exception OutOfRange is raised if Index < 1 or Index > NbDomains.
    param Index

    type Index

    int

    rtype

    None

RemPoint()
  • Removes the Index-th intersection point of the hatching. The exception OutOfRange is raised if Index < 1 or Index > NbPoints.
    param Index

    type Index

    int

    rtype

    None

Status()
  • Sets the error status.
    param theStatus

    type theStatus

    HatchGen_ErrorStatus

    rtype

    None* Returns the error status.

    rtype

    HatchGen_ErrorStatus

TrimDone()
  • Sets the flag about the trimming computations to the given value.
    param Flag

    type Flag

    bool

    rtype

    None* Returns the flag about the trimming computations.

    rtype

    bool

TrimFailed()
  • Sets the flag about the trimming failure to the given value.
    param Flag

    type Flag

    bool

    rtype

    None* Returns the flag about the trimming failure.

    rtype

    bool

property thisown

The membership flag

class Geom2dHatch_Hatchings(*args)

Bases: object

Assign()
Bind()
Bound()
ChangeFind()
ChangeSeek()
Clear()
Exchange()
Find()
IsBound()
Keys()
ReSize()
Seek()
Set()
Size()
UnBind()
begin()
cbegin()
cend()
end()
property thisown

The membership flag

class Geom2dHatch_Intersector(*args)

Bases: OCC.Core.Geom2dInt.Geom2dInt_GInter

  • Creates an intersector.
    param Confusion

    type Confusion

    float

    param Tangency

    type Tangency

    float

    rtype

    None:rtype: None

ConfusionTolerance()
  • Returns the confusion tolerance of the intersector.
    rtype

    float

Intersect()
  • Intersects the curves C1 and C2. The results are retreived by the usual methods described in IntRes2d_Intersection. Creates an intersector.
    param C1

    type C1

    Geom2dAdaptor_Curve

    param C2

    type C2

    Geom2dAdaptor_Curve

    rtype

    None

LocalGeometry()
  • Returns in <T>, <N> and <C> the tangent, normal and curvature of the edge <E> at parameter value <U>.
    param E

    type E

    Geom2dAdaptor_Curve

    param U

    type U

    float

    param T

    type T

    gp_Dir2d

    param N

    type N

    gp_Dir2d

    param C

    type C

    float

    rtype

    None

Perform()
  • Performs the intersection between the 2d line segment (<L>, <P>) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0, <P>] (P is positive and can be RealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.
    param L

    type L

    gp_Lin2d

    param P

    type P

    float

    param Tol

    type Tol

    float

    param E

    type E

    Geom2dAdaptor_Curve

    rtype

    None

SetConfusionTolerance()
  • Sets the confusion tolerance of the intersector.
    param Confusion

    type Confusion

    float

    rtype

    None

SetTangencyTolerance()
  • Sets the tangency tolerance of the intersector.
    param Tangency

    type Tangency

    float

    rtype

    None

TangencyTolerance()
  • Returns the tangency tolerance of the intersector.
    rtype

    float

property thisown

The membership flag

class Geom2dHatch_MapOfElements(*args)

Bases: object

Assign()
Bind()
Bound()
ChangeFind()
ChangeSeek()
Clear()
Exchange()
Find()
IsBound()
Keys()
ReSize()
Seek()
Set()
Size()
UnBind()
begin()
cbegin()
cend()
end()
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()