OpenCascade.js
API ReferenceModelingAlgorithmsTKGeomAlgo

Geom2dHatch

OCCT package Geom2dHatch: Geom2dHatch_Classifier, Geom2dHatch_Element, Geom2dHatch_FClass2dOfClassifier, Geom2dHatch_Hatcher, and 2 more bound classes.

Geom2dHatch_Classifier

Constructors(1)

Instance methods(5)

  • Rejected(): boolean

    Returns True when the state was computed by a rejection. The state is OUT.

  • NoWires(): boolean

    Returns True if the face contains no wire. The state is IN.

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

  • EdgeParameter(): number

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

  • Returns the position of the point on the edge returned by Edge.

Geom2dHatch_Element

Constructors(2)

Instance methods(4)

Geom2dHatch_FClass2dOfClassifier

Constructors(1)

Instance methods(7)

  • Reset(L: gp_Lin2d, P: number, Tol: number): void

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

    Parameters (3)
    • L
    • P
    • Tol
  • Updates the classification process with the edge <E> from the boundary.

    Parameters (2)
    • E
    • Or
  • Parameter(): number

    Returns the current value of the parameter.

  • Returns the intersecting algorithm.

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

  • Returns the current state of the point.

  • IsHeadOrEnd(): boolean

    Returns the true if the closest intersection point represents head or end of the edge. Returns false otherwise.

Geom2dHatch_Hatcher

Constructors(1)

Instance methods(34)

  • Sets the associated intersector.

    Parameters (1)
    • Intersector
  • Returns the associated intersector.

  • Returns the associated intersector.

  • Confusion2d(Confusion: number): void

    Sets the confusion tolerance.

    Parameters (1)
    • Confusion
  • Confusion2d(): number

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

  • Confusion3d(Confusion: number): void

    Sets the confusion tolerance.

    Parameters (1)
    • Confusion
  • Confusion3d(): number

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

  • KeepPoints(Keep: boolean): void

    Sets the above flag.

    Parameters (1)
    • Keep
  • KeepPoints(): boolean

    Returns the flag about the points consideration.

  • KeepSegments(Keep: boolean): void

    Sets the above flag.

    Parameters (1)
    • Keep
  • KeepSegments(): boolean

    Returns the flag about the segments consideration.

  • Clear(): void

    Removes all the hatchings and all the elements.

  • Returns the curve associated to the IndE-th element.

    Parameters (1)
    • IndE
  • AddElement(Curve: Geom2dAdaptor_Curve, Orientation: TopAbs_Orientation): number

    Adds an element to the hatcher and returns its index.

    Parameters (2)
    • Curve
    • Orientation
  • AddElement(Curve: Geom2d_Curve, Orientation: TopAbs_Orientation): number

    Adds an element to the hatcher and returns its index.

    Parameters (2)
    • Curve
    • Orientation
  • RemElement(IndE: number): void

    Removes the IndE-th element from the hatcher.

    Parameters (1)
    • IndE
  • ClrElements(): void

    Removes all the elements from the hatcher.

  • Returns the curve associated to the IndH-th hatching.

    Parameters (1)
    • IndH
  • Adds a hatching to the hatcher and returns its index.

    Parameters (1)
    • Curve
  • RemHatching(IndH: number): void

    Removes the IndH-th hatching from the hatcher.

    Parameters (1)
    • IndH
  • ClrHatchings(): void

    Removes all the hatchings from the hatcher.

  • NbPoints(IndH: number): number

    Returns the number of intersection points of the IndH-th hatching.

    Parameters (1)
    • IndH
  • Point(IndH: number, IndP: number): HatchGen_PointOnHatching

    Returns the IndP-th intersection point of the IndH-th hatching.

    Parameters (2)
    • IndH
    • IndP
  • Trim(): void

    Trims all the hatchings of the hatcher by all the elements of the hatcher.

  • Trim(Curve: Geom2dAdaptor_Curve): number

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

    Parameters (1)
    • Curve
  • Trim(IndH: number): void

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

    Parameters (1)
    • IndH
  • Computes the domains of all the hatchings.

  • ComputeDomains(IndH: number): void

    Computes the domains of the IndH-th hatching.

    Parameters (1)
    • IndH
  • TrimDone(IndH: number): boolean

    Returns the fact that the intersections were computed for the IndH-th hatching.

    Parameters (1)
    • IndH
  • TrimFailed(IndH: number): boolean

    Returns the fact that the intersections failed for the IndH-th hatching.

    Parameters (1)
    • IndH
  • Returns the status about the IndH-th hatching.

    Parameters (1)
    • IndH
  • NbDomains(IndH: number): number

    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.

    Parameters (1)
    • IndH
  • Domain(IndH: number, IDom: number): HatchGen_Domain

    Returns the IDom-th domain of the IndH-th hatching.

    Parameters (2)
    • IndH
    • IDom
  • Dump(): void

    Dump the hatcher.

Geom2dHatch_Hatching

Constructors(2)

Instance methods(22)

  • Returns the curve associated to the hatching.

  • Returns the curve associated to the hatching.

  • TrimDone(Flag: boolean): void

    Sets the flag about the trimming computations to the given value.

    Parameters (1)
    • Flag
  • TrimDone(): boolean

    Returns the flag about the trimming computations.

  • TrimFailed(Flag: boolean): void

    Sets the flag about the trimming failure to the given value.

    Parameters (1)
    • Flag
  • TrimFailed(): boolean

    Returns the flag about the trimming failure.

  • IsDone(Flag: boolean): void

    Sets the flag about the domains computation to the given value.

    Parameters (1)
    • Flag
  • IsDone(): boolean

    Returns the flag about the domains computation.

  • Status(theStatus: HatchGen_ErrorStatus): void

    Sets the error status.

    Parameters (1)
    • theStatus
  • Returns the error status.

  • AddPoint(Point: HatchGen_PointOnHatching, Confusion: number): void

    Adds an intersection point to the hatching.

    Parameters (2)
    • Point
    • Confusion
  • NbPoints(): number

    Returns the number of intersection points of the hatching.

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

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

    Parameters (1)
    • Index
  • RemPoint(Index: number): void

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

    Parameters (1)
    • Index
  • ClrPoints(): void

    Removes all the intersection points of the hatching.

  • AddDomain(Domain: HatchGen_Domain): void

    Adds a domain to the hatching.

    Parameters (1)
    • Domain
  • NbDomains(): number

    Returns the number of domains of the hatching.

  • Domain(Index: number): HatchGen_Domain

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

    Parameters (1)
    • Index
  • RemDomain(Index: number): void

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

    Parameters (1)
    • Index
  • ClrDomains(): void

    Removes all the domains of the hatching.

  • Returns a point on the curve. This point will be used for the classification.

Geom2dHatch_Intersector

Constructors(2)

Instance methods(13)

  • Returns the confusion tolerance of the intersector.

  • SetConfusionTolerance(Confusion: number): void

    Sets the confusion tolerance of the intersector.

    Parameters (1)
    • Confusion
  • Returns the tangency tolerance of the intersector.

  • SetTangencyTolerance(Tangency: number): void

    Sets the tangency tolerance of the intersector.

    Parameters (1)
    • Tangency
  • Intersects the curves C1 and C2. The results are retrieved by the usual methods described in IntRes2d_Intersection. Creates an intersector.

    Parameters (2)
    • C1
    • C2
  • Perform(L: gp_Lin2d, P: number, Tol: number, E: Geom2dAdaptor_Curve): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (4)
    • L
    • P
    • Tol
    • E
  • Perform(C1: Adaptor2d_Curve2d, D1: IntRes2d_Domain, C2: Adaptor2d_Curve2d, D2: IntRes2d_Domain, TolConf: number, Tol: number): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (6)
    • C1
    • D1
    • C2
    • D2
    • TolConf
    • Tol
  • Perform(C1: Adaptor2d_Curve2d, C2: Adaptor2d_Curve2d, TolConf: number, Tol: number): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (4)
    • C1
    • C2
    • TolConf
    • Tol
  • Perform(C1: Adaptor2d_Curve2d, D1: IntRes2d_Domain, TolConf: number, Tol: number): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (4)
    • C1
    • D1
    • TolConf
    • Tol
  • Perform(C1: Adaptor2d_Curve2d, TolConf: number, Tol: number): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (3)
    • C1
    • TolConf
    • Tol
  • Perform(C1: Adaptor2d_Curve2d, D1: IntRes2d_Domain, C2: Adaptor2d_Curve2d, TolConf: number, Tol: number): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (5)
    • C1
    • D1
    • C2
    • TolConf
    • Tol
  • Perform(C1: Adaptor2d_Curve2d, C2: Adaptor2d_Curve2d, D2: IntRes2d_Domain, TolConf: number, Tol: number): void

    Performs the intersection between the 2d line segment (<L>,.
    ) and the Curve <E>. The line segment is the part of the 2d line <L> of parameter range [0,
    ] (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.

    Parameters (5)
    • C1
    • C2
    • D2
    • TolConf
    • Tol
  • LocalGeometry(E: Geom2dAdaptor_Curve, U: number, T: gp_Dir2d, N: gp_Dir2d, C: number): { C: number }

    Returns in <T>, <N> and the tangent, normal and curvature of the edge <E> at parameter value .

    Parameters (5)
    • E
    • U
    • T
      Mutated in place; read the updated value from this argument after the call.
    • N
      Mutated in place; read the updated value from this argument after the call.
    • C
    Returns

    A result object with fields:

    • C: updated value from the call.