Geom2dHatch
OCCT package Geom2dHatch: Geom2dHatch_Classifier, Geom2dHatch_Element, Geom2dHatch_FClass2dOfClassifier, Geom2dHatch_Hatcher, and 2 more bound classes.
Geom2dHatch_Classifier
Constructors(1)
Empty constructor, undefined algorithm.
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)
- constructor(Curve: Geom2dAdaptor_Curve, Orientation?: TopAbs_Orientation): Geom2dHatch_Element
Creates an element.
Parameters (2)CurveOrientation
Instance methods(4)
Returns the curve associated to the element.
Returns the curve associated to the element.
- Orientation(Orientation: TopAbs_Orientation): void
Sets the orientation of the element.
Parameters (1)Orientation
Returns the orientation of the element.
Geom2dHatch_FClass2dOfClassifier
Constructors(1)
Creates an undefined classifier.
Instance methods(7)
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)LPTol
- Compare(E: Geom2dAdaptor_Curve, Or: TopAbs_Orientation): void
Updates the classification process with the edge <E> from the boundary.
Parameters (2)EOr
- Parameter(): number
Returns the current value of the parameter.
Returns the intersecting algorithm.
- ClosestIntersection(): number
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)
- constructor(Intersector: Geom2dHatch_Intersector, Confusion2d: number, Confusion3d: number, KeepPnt?: boolean, KeepSeg?: boolean): Geom2dHatch_Hatcher
Returns an empty hatcher.
Parameters (5)IntersectorConfusion2dConfusion3dKeepPntKeepSeg
Instance methods(34)
- Intersector(Intersector: Geom2dHatch_Intersector): void
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.
- ElementCurve(IndE: number): Geom2dAdaptor_Curve
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)CurveOrientation
- AddElement(Curve: Geom2d_Curve, Orientation: TopAbs_Orientation): number
Adds an element to the hatcher and returns its index.
Parameters (2)CurveOrientation
- RemElement(IndE: number): void
Removes the IndE-th element from the hatcher.
Parameters (1)IndE
- ClrElements(): void
Removes all the elements from the hatcher.
- HatchingCurve(IndH: number): Geom2dAdaptor_Curve
Returns the curve associated to the IndH-th hatching.
Parameters (1)IndH
- AddHatching(Curve: Geom2dAdaptor_Curve): number
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)IndHIndP
- 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
- ComputeDomains(): void
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
- Status(IndH: number): HatchGen_ErrorStatus
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)IndHIDom
- Dump(): void
Dump the hatcher.
Geom2dHatch_Hatching
Constructors(2)
Creates a hatching.
Parameters (1)Curve
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)PointConfusion
- NbPoints(): number
Returns the number of intersection points of the hatching.
- Point(Index: number): HatchGen_PointOnHatching
Returns the Index-th intersection point of the hatching. The exception OutOfRange is raised if Index < 1 or Index > NbPoints.
Parameters (1)Index
- ChangePoint(Index: number): HatchGen_PointOnHatching
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)
- constructor(Confusion: number, Tangency: number): Geom2dHatch_Intersector
Creates an intersector.
Parameters (2)ConfusionTangency
Instance methods(13)
- ConfusionTolerance(): number
Returns the confusion tolerance of the intersector.
- SetConfusionTolerance(Confusion: number): void
Sets the confusion tolerance of the intersector.
Parameters (1)Confusion
- TangencyTolerance(): number
Returns the tangency tolerance of the intersector.
- SetTangencyTolerance(Tangency: number): void
Sets the tangency tolerance of the intersector.
Parameters (1)Tangency
- Intersect(C1: Geom2dAdaptor_Curve, C2: Geom2dAdaptor_Curve): void
Intersects the curves C1 and C2. The results are retrieved by the usual methods described in
IntRes2d_Intersection. Creates an intersector.Parameters (2)C1C2
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (4)LPTolE
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (6)C1D1C2D2TolConfTol
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (4)C1C2TolConfTol
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (4)C1D1TolConfTol
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (3)C1TolConfTol
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (5)C1D1C2TolConfTol
- 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 beRealLast()). Tol is the Tolerance on the segment. The order is relevant, the first argument is the segment, the second the Edge.Parameters (5)C1C2D2TolConfTol
- 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)EUT—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
ReturnsA result object with fields:
C: updated value from the call.