IntTools
OCCT package IntTools: IntTools, IntTools_BaseRangeSample, IntTools_BeanFaceIntersector, IntTools_CommonPrt, and 18 more bound classes.
IntTools
Contains classes for intersection and classification purposes and accompanying classes.
Constructors(1)
Static methods(7)
- Length(E: TopoDS_Edge): number
returns the length of the edge;
Parameters (1)E
- RemoveIdenticalRoots(aSeq: NCollection_Sequence_IntTools_Root, anEpsT: number): void
Remove from the sequence aSeq the Roots that have values ti and tj such as |ti-tj] < anEpsT.
Parameters (2)aSeq—Mutated in place; read the updated value from this argument after the call.anEpsT
- SortRoots(aSeq: NCollection_Sequence_IntTools_Root, anEpsT: number): void
Sort the sequence aSeq of the Roots to arrange the Roots in increasing order.
Parameters (2)aSeq—Mutated in place; read the updated value from this argument after the call.anEpsT
- FindRootStates(aSeq: NCollection_Sequence_IntTools_Root, anEpsNull: number): void
Find the states (before and after) for each Root from the sequence aSeq.
Parameters (2)aSeq—Mutated in place; read the updated value from this argument after the call.anEpsNull
- Parameter(P: gp_Pnt, Curve: Geom_Curve, aParm: number): { returnValue: number; aParm: number }Parameters (3)
PCurveaParm
- GetRadius(C: BRepAdaptor_Curve, t1: number, t3: number, R: number): { returnValue: number; R: number }Parameters (4)
Ct1t3R
- PrepareArgs(C: BRepAdaptor_Curve, tMax: number, tMin: number, Discret: number, Deflect: number, anArgs: NCollection_Array1_double): numberParameters (6)
CtMaxtMinDiscretDeflectanArgs
IntTools_BaseRangeSample
base class for range index management
Constructors(2)
- constructor(theDepth: number): IntTools_BaseRangeSampleParameters (1)
theDepth
Instance methods(2)
IntTools_BeanFaceIntersector
The class BeanFaceIntersector computes ranges of parameters on the curve of a bean(part of edge) that bound the parts of bean which are on the surface of a face according to edge and face tolerances. Warning: The real boundaries of the face are not taken into account, Most of the result parts of the bean lays only inside the region of the surface, which includes the inside of the face. And the parts which are out of this region can be excluded from the result.
Constructors(4)
- constructor(theEdge: TopoDS_Edge, theFace: TopoDS_Face): IntTools_BeanFaceIntersector
Initializes the algorithm.
Warning: The parts of the edge which are on the surface of the face and belong to the whole in the face (if there is) is considered as resultParameters (2)theEdgetheFace
- constructor(theCurve: BRepAdaptor_Curve, theSurface: BRepAdaptor_Surface, theBeanTolerance: number, theFaceTolerance: number): IntTools_BeanFaceIntersector
Initializes the algorithm.
Parameters (4)theCurvetheSurfacetheBeanTolerancetheFaceTolerance
- constructor(theCurve: BRepAdaptor_Curve, theSurface: BRepAdaptor_Surface, theFirstParOnCurve: number, theLastParOnCurve: number, theUMinParameter: number, theUMaxParameter: number, theVMinParameter: number, theVMaxParameter: number, theBeanTolerance: number, theFaceTolerance: number): IntTools_BeanFaceIntersector
Initializes the algorithm theUMinParameter, ... are used for optimization purposes.
Parameters (10)theCurvetheSurfacetheFirstParOnCurvetheLastParOnCurvetheUMinParametertheUMaxParametertheVMinParametertheVMaxParametertheBeanTolerancetheFaceTolerance
Instance methods(12)
- Init(theEdge: TopoDS_Edge, theFace: TopoDS_Face): void
Initializes the algorithm.
Warning: The parts of the edge which are on the surface of the face and belong to the whole in the face (if there is) is considered as resultParameters (2)theEdgetheFace
- Init(theCurve: BRepAdaptor_Curve, theSurface: BRepAdaptor_Surface, theBeanTolerance: number, theFaceTolerance: number): void
Initializes the algorithm.
Parameters (4)theCurvetheSurfacetheBeanTolerancetheFaceTolerance
- Init(theCurve: BRepAdaptor_Curve, theSurface: BRepAdaptor_Surface, theFirstParOnCurve: number, theLastParOnCurve: number, theUMinParameter: number, theUMaxParameter: number, theVMinParameter: number, theVMaxParameter: number, theBeanTolerance: number, theFaceTolerance: number): void
Initializes the algorithm theUMinParameter, ... are used for optimization purposes.
Parameters (10)theCurvetheSurfacetheFirstParOnCurvetheLastParOnCurvetheUMinParametertheUMaxParametertheVMinParametertheVMaxParametertheBeanTolerancetheFaceTolerance
- SetContext(theContext: IntTools_Context): void
Sets the intersection context.
Parameters (1)theContext
Gets the intersection context.
- SetBeanParameters(theFirstParOnCurve: number, theLastParOnCurve: number): void
Set restrictions for curve.
Parameters (2)theFirstParOnCurvetheLastParOnCurve
- SetSurfaceParameters(theUMinParameter: number, theUMaxParameter: number, theVMinParameter: number, theVMaxParameter: number): void
Set restrictions for surface.
Parameters (4)theUMinParametertheUMaxParametertheVMinParametertheVMaxParameter
- Perform(): void
Launches the algorithm.
- IsDone(): boolean
Returns Done/NotDone state of the algorithm.
- Result(theResults: NCollection_Sequence_IntTools_Range): voidParameters (1)
theResults
- MinimalSquareDistance(): number
Returns the minimal distance found between edge and face.
IntTools_CommonPrt
The class is to describe a common part between two edges in 3D space.
Constructors(2)
Empty constructor.
Copy constructor.
Parameters (1)aCPrt
Instance methods(24)
- Assign(Other: IntTools_CommonPrt): IntTools_CommonPrtParameters (1)
Other
- SetEdge1(anE: TopoDS_Edge): void
Sets the first edge.
Parameters (1)anE
- SetEdge2(anE: TopoDS_Edge): void
Sets the second edge.
Parameters (1)anE
- SetType(aType: TopAbs_ShapeEnum): void
Sets the type of the common part Vertex or Edge.
Parameters (1)aType
- SetRange1(aR: IntTools_Range): void
Sets the range of first edge.
Parameters (1)aR
- SetRange1(tf: number, tl: number): void
Sets the range of first edge.
Parameters (2)tftl
- AppendRange2(aR: IntTools_Range): void
Appends the range of second edge.
Parameters (1)aR
- AppendRange2(tf: number, tl: number): void
Appends the range of second edge.
Parameters (2)tftl
- SetVertexParameter1(tV: number): void
Sets a parameter of first vertex.
Parameters (1)tV
- SetVertexParameter2(tV: number): void
Sets a parameter of second vertex.
Parameters (1)tV
- Edge1(): TopoDS_Edge
Returns the first edge.
- Edge2(): TopoDS_Edge
Returns the second edge.
Returns the type of the common part.
Returns the range of first edge.
- Range1(tf: number, tl: number): { tf: number; tl: number }
Returns the range of first edge.
Parameters (2)tftl
ReturnsA result object with fields:
tf: updated value from the call.tl: updated value from the call.
Returns the ranges of second edge.
Returns the ranges of second edge.
- VertexParameter1(): number
Returns parameter of first vertex.
- VertexParameter2(): number
Returns parameter of second vertex.
- Copy(anOther: IntTools_CommonPrt): void
Copies me to anOther.
Parameters (1)anOther—Mutated in place; read the updated value from this argument after the call.
- AllNullFlag(): boolean
Modifier.
- SetAllNullFlag(aFlag: boolean): void
Selector.
Parameters (1)aFlag
- SetBoundingPoints(aP1: gp_Pnt, aP2: gp_Pnt): void
Modifier.
Parameters (2)aP1aP2
- BoundingPoints(aP1: gp_Pnt, aP2: gp_Pnt): void
Selector.
Parameters (2)aP1—Mutated in place; read the updated value from this argument after the call.aP2—Mutated in place; read the updated value from this argument after the call.
IntTools_Context
The intersection Context contains geometrical and topological toolkit (classifiers, projectors, etc). The intersection Context is for caching the tools to increase the performance.
Constructors(2)
- constructor(theAllocator: NCollection_BaseAllocator): IntTools_ContextParameters (1)
theAllocator
Static methods(2)
- get_type_name(): string
Instance methods(25)
Returns a reference to point projector for given edge.
Parameters (1)aE
Returns a reference to point projector for given curve.
Parameters (1)aC
Returns a reference to surface localization data for given face.
Parameters (1)aF
Returns a reference to 2D hatcher for given face.
Parameters (1)aF
- SurfaceAdaptor(theFace: TopoDS_Face): BRepAdaptor_Surface
Returns a reference to surface adaptor for given face.
Parameters (1)theFace
- OBB(theShape: TopoDS_Shape, theFuzzyValue?: number): Bnd_OBB
Builds and stores an Oriented Bounding Box for the shape. Returns a reference to OBB.
Parameters (2)theShapetheFuzzyValue
- UVBounds(theFace: TopoDS_Face, UMin: number, UMax: number, VMin: number, VMax: number): { UMin: number; UMax: number; VMin: number; VMax: number }
Computes the boundaries of the face using surface adaptor.
Parameters (5)theFaceUMinUMaxVMinVMax
ReturnsA result object with fields:
UMin: updated value from the call.UMax: updated value from the call.VMin: updated value from the call.VMax: updated value from the call.
- ComputePE(theP: gp_Pnt, theTolP: number, theE: TopoDS_Edge, theT: number, theDist: number): { returnValue: number; theT: number; theDist: number }
Computes parameter of the Point theP on the edge aE. Returns zero if the distance between point and edge is less than sum of tolerance value of edge and theTopP, otherwise and for following conditions returns negative value.
- the edge is degenerated (-1)
- the edge does not contain 3d curve and pcurves (-2)
- projection algorithm failed (-3)
Parameters (5)thePtheTolPtheEtheTtheDist
ReturnsA result object with fields:
returnValue: the C++ return valuetheT: updated value from the call.theDist: updated value from the call.
- ComputeVE(theV: TopoDS_Vertex, theE: TopoDS_Edge, theT: number, theTol: number, theFuzz: number): { returnValue: number; theT: number; theTol: number }
Computes parameter of the vertex aV on the edge aE and correct tolerance value for the vertex on the edge. Returns zero if the distance between vertex and edge is less than sum of tolerances and the fuzzy value, otherwise and for following conditions returns negative value:
- the edge is degenerated (-1)
- the edge does not contain 3d curve and pcurves (-2)
- projection algorithm failed (-3)
Parameters (5)theVtheEtheTtheToltheFuzz
ReturnsA result object with fields:
returnValue: the C++ return valuetheT: updated value from the call.theTol: updated value from the call.
- ComputeVF(theVertex: TopoDS_Vertex, theFace: TopoDS_Face, theU: number, theV: number, theTol: number, theFuzz: number): { returnValue: number; theU: number; theV: number; theTol: number }
Computes UV parameters of the vertex aV on face aF and correct tolerance value for the vertex on the face. Returns zero if the distance between vertex and face is less than or equal the sum of tolerances and the fuzzy value and the projection point lays inside boundaries of the face. For following conditions returns negative value.
- projection algorithm failed (-1)
- distance is more than sum of tolerances (-2)
- projection point out or on the boundaries of face (-3)
Parameters (6)theVertextheFacetheUtheVtheToltheFuzz
ReturnsA result object with fields:
returnValue: the C++ return valuetheU: updated value from the call.theV: updated value from the call.theTol: updated value from the call.
- StatePointFace(aF: TopoDS_Face, aP2D: gp_Pnt2d): TopAbs_State
Returns the state of the point aP2D relative to face aF.
Parameters (2)aFaP2D
- IsPointInFace(aF: TopoDS_Face, aP2D: gp_Pnt2d): boolean
Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false.
Parameters (2)aFaP2D
- IsPointInFace(aP3D: gp_Pnt, aF: TopoDS_Face, aTol: number): boolean
Returns true if the point aP2D is inside the boundaries of the face aF, otherwise returns false.
Parameters (3)aP3DaFaTol
- IsPointInOnFace(aF: TopoDS_Face, aP2D: gp_Pnt2d): boolean
Returns true if the point aP2D is inside or on the boundaries of aF.
Parameters (2)aFaP2D
- IsValidPointForFace(aP3D: gp_Pnt, aF: TopoDS_Face, aTol: number): boolean
Returns true if the distance between point aP3D and face aF is less or equal to tolerance aTol and projection point is inside or on the boundaries of the face aF.
Parameters (3)aP3DaFaTol
- IsValidPointForFaces(aP3D: gp_Pnt, aF1: TopoDS_Face, aF2: TopoDS_Face, aTol: number): boolean
Returns true if IsValidPointForFace returns true for both face aF1 and aF2.
Parameters (4)aP3DaF1aF2aTol
- IsValidBlockForFace(aT1: number, aT2: number, aIC: IntTools_Curve, aF: TopoDS_Face, aTol: number): boolean
Returns true if IsValidPointForFace returns true for some 3d point that lay on the curve aIC bounded by parameters aT1 and aT2.
Parameters (5)aT1aT2aICaFaTol
- IsValidBlockForFaces(aT1: number, aT2: number, aIC: IntTools_Curve, aF1: TopoDS_Face, aF2: TopoDS_Face, aTol: number): boolean
Returns true if IsValidBlockForFace returns true for both faces aF1 and aF2.
Parameters (6)aT1aT2aICaF1aF2aTol
- IsVertexOnLine(aV: TopoDS_Vertex, aIC: IntTools_Curve, aTolC: number, aT: number): { returnValue: boolean; aT: number }
Computes parameter of the vertex aV on the curve aIC. Returns true if the distance between vertex and curve is less than sum of tolerance of aV and aTolC, otherwise or if projection algorithm failed returns false (in this case aT isn't significant).
Parameters (4)aVaICaTolCaT
ReturnsA result object with fields:
returnValue: the C++ return valueaT: updated value from the call.
- IsVertexOnLine(aV: TopoDS_Vertex, aTolV: number, aIC: IntTools_Curve, aTolC: number, aT: number): { returnValue: boolean; aT: number }
Computes parameter of the vertex aV on the curve aIC. Returns true if the distance between vertex and curve is less than sum of tolerance of aV and aTolC, otherwise or if projection algorithm failed returns false (in this case aT isn't significant).
Parameters (5)aVaTolVaICaTolCaT
ReturnsA result object with fields:
returnValue: the C++ return valueaT: updated value from the call.
- ProjectPointOnEdge(aP: gp_Pnt, aE: TopoDS_Edge, aT: number): { returnValue: boolean; aT: number }
Computes parameter of the point aP on the edge aE. Returns false if projection algorithm failed other wiese returns true.
Parameters (3)aPaEaT
ReturnsA result object with fields:
returnValue: the C++ return valueaT: updated value from the call.
- BndBox(theS: TopoDS_Shape): Bnd_BoxParameters (1)
theS
- IsInfiniteFace(theFace: TopoDS_Face): boolean
Returns true if the solid <theFace> has infinite bounds.
Parameters (1)theFace
- SetPOnSProjectionTolerance(theValue: number): void
Sets tolerance to be used for projection of point on surface. Clears map of already cached projectors in order to maintain correct value for all projectors.
Parameters (1)theValue
IntTools_Curve
The class is a container of one 3D curve, two 2D curves and two Tolerance values. It is used in the Face/Face intersection algorithm to store the results of intersection.
In this context: the 3D curve is the intersection curve; the 2D curves are the PCurves of the 3D curve on the intersecting faces; the tolerance is the valid tolerance for 3D curve computed as maximal deviation between 3D curve and 2D curves (or surfaces in case there are no 2D curves); the tangential tolerance is the maximal distance from 3D curve to the end of the tangential zone between faces in terms of their tolerance values.
Constructors(2)
Empty constructor.
- constructor(the3dCurve3d: Geom_Curve, the2dCurve1: Geom2d_Curve, the2dCurve2: Geom2d_Curve, theTolerance?: number, theTangentialTolerance?: number): IntTools_Curve
Constructor taking 3d curve, two 2d curves and two tolerance values.
Parameters (5)the3dCurve3dthe2dCurve1the2dCurve2theTolerancetheTangentialTolerance
Instance methods(15)
- SetCurves(the3dCurve: Geom_Curve, the2dCurve1: Geom2d_Curve, the2dCurve2: Geom2d_Curve): void
Sets the curves.
Parameters (3)the3dCurvethe2dCurve1the2dCurve2
- SetCurve(the3dCurve: Geom_Curve): void
Sets the 3d curve.
Parameters (1)the3dCurve
- SetFirstCurve2d(the2dCurve1: Geom2d_Curve): void
Sets the first 2d curve.
Parameters (1)the2dCurve1
- SetSecondCurve2d(the2dCurve2: Geom2d_Curve): void
Sets the second 2d curve.
Parameters (1)the2dCurve2
- SetTolerance(theTolerance: number): void
Sets the tolerance for the curve.
Parameters (1)theTolerance
- SetTangentialTolerance(theTangentialTolerance: number): void
Sets the tangential tolerance.
Parameters (1)theTangentialTolerance
- Curve(): Geom_Curve
Returns 3d curve.
Returns first 2d curve.
Returns second 2d curve.
- Tolerance(): number
Returns the tolerance.
- TangentialTolerance(): number
Returns the tangential tolerance.
- HasBounds(): boolean
Returns TRUE if 3d curve is BoundedCurve.
- Bounds(theFirst: number, theLast: number, theFirstPnt: gp_Pnt, theLastPnt: gp_Pnt): { returnValue: boolean; theFirst: number; theLast: number }
If the 3d curve is bounded curve the method will return TRUE and modify the output parameters with boundary parameters of the curve and corresponded 3d points. If the curve does not have bounds, the method will return false and the output parameters will stay untouched.
Parameters (4)theFirsttheLasttheFirstPnt—Mutated in place; read the updated value from this argument after the call.theLastPnt—Mutated in place; read the updated value from this argument after the call.
ReturnsA result object with fields:
returnValue: the C++ return valuetheFirst: updated value from the call.theLast: updated value from the call.
Computes 3d point corresponded to the given parameter if this parameter is inside the boundaries of the curve. Returns TRUE in this case. Otherwise, the point will not be computed and the method will return FALSE.
Parameters (2)theParthePnt—Mutated in place; read the updated value from this argument after the call.
Returns the type of the 3d curve.
IntTools_CurveRangeLocalizeData
Constructors(1)
- constructor(theNbSample: number, theMinRange: number): IntTools_CurveRangeLocalizeDataParameters (2)
theNbSampletheMinRange
Instance methods(7)
- GetNbSample(): number
- GetMinRange(): number
- AddOutRange(theRange: IntTools_CurveRangeSample): voidParameters (1)
theRange
- AddBox(theRange: IntTools_CurveRangeSample, theBox: Bnd_Box): voidParameters (2)
theRangetheBox
- FindBox(theRange: IntTools_CurveRangeSample, theBox: Bnd_Box): booleanParameters (2)
theRangetheBox
- IsRangeOut(theRange: IntTools_CurveRangeSample): booleanParameters (1)
theRange
- ListRangeOut(theList: NCollection_List_IntTools_CurveRangeSample): voidParameters (1)
theList
IntTools_CurveRangeSample
class for range index management of curve
Constructors(2)
- constructor(theIndex: number): IntTools_CurveRangeSampleParameters (1)
theIndex
Instance methods(5)
- SetRangeIndex(theIndex: number): voidParameters (1)
theIndex
- GetRangeIndex(): number
- IsEqual(Other: IntTools_CurveRangeSample): booleanParameters (1)
Other
- GetRange(theFirst: number, theLast: number, theNbSample: number): IntTools_RangeParameters (3)
theFirsttheLasttheNbSample
- GetRangeIndexDeeper(theNbSample: number): numberParameters (1)
theNbSample
IntTools_EdgeEdge
The class provides Edge/Edge intersection algorithm based on the intersection between edges bounding boxes.
Constructors(3)
Empty constructor.
- constructor(theEdge1: TopoDS_Edge, theEdge2: TopoDS_Edge): IntTools_EdgeEdge
Constructor.
Parameters (2)theEdge1theEdge2
- constructor(theEdge1: TopoDS_Edge, aT11: number, aT12: number, theEdge2: TopoDS_Edge, aT21: number, aT22: number): IntTools_EdgeEdge
Constructor.
Parameters (6)theEdge1aT11aT12theEdge2aT21aT22
Instance methods(15)
- SetEdge1(theEdge: TopoDS_Edge): void
Sets the first edge.
Parameters (1)theEdge
- SetEdge1(theEdge: TopoDS_Edge, aT1: number, aT2: number): void
Sets the first edge and its range.
Parameters (3)theEdgeaT1aT2
- SetRange1(theRange1: IntTools_Range): void
Sets the range for the first edge.
Parameters (1)theRange1
- SetRange1(aT1: number, aT2: number): void
Sets the range for the first edge.
Parameters (2)aT1aT2
- SetEdge2(theEdge: TopoDS_Edge): void
Sets the second edge.
Parameters (1)theEdge
- SetEdge2(theEdge: TopoDS_Edge, aT1: number, aT2: number): void
Sets the first edge and its range.
Parameters (3)theEdgeaT1aT2
- SetRange2(theRange: IntTools_Range): void
Sets the range for the second edge.
Parameters (1)theRange
- SetRange2(aT1: number, aT2: number): void
Sets the range for the second edge.
Parameters (2)aT1aT2
- SetFuzzyValue(theFuzz: number): void
Sets the Fuzzy value.
Parameters (1)theFuzz
- Perform(): void
Performs the intersection between edges.
- IsDone(): boolean
Returns TRUE if common part(s) is(are) found.
- FuzzyValue(): number
Returns Fuzzy value.
Returns common parts.
- UseQuickCoincidenceCheck(bFlag: boolean): void
Sets the flag myQuickCoincidenceCheck.
Parameters (1)bFlag
- IsCoincidenceCheckedQuickly(): boolean
Returns the flag myQuickCoincidenceCheck.
IntTools_EdgeFace
The class provides Edge/Face intersection algorithm to determine common parts between edge and face in 3-d space. Common parts between Edge and Face can be:
- Vertices - in case of intersection or touching;
- Edge - in case of full coincidence of the edge with the face.
Constructors(1)
Instance methods(18)
- SetEdge(theEdge: TopoDS_Edge): voidParameters (1)
theEdge
- Edge(): TopoDS_Edge
- SetFace(theFace: TopoDS_Face): voidParameters (1)
theFace
- Face(): TopoDS_Face
- SetRange(theRange: IntTools_Range): voidParameters (1)
theRange
- SetRange(theFirst: number, theLast: number): voidParameters (2)
theFirsttheLast
- SetContext(theContext: IntTools_Context): voidParameters (1)
theContext
- SetFuzzyValue(theFuzz: number): voidParameters (1)
theFuzz
- FuzzyValue(): number
- UseQuickCoincidenceCheck(theFlag: boolean): voidParameters (1)
theFlag
- IsCoincidenceCheckedQuickly(): boolean
- Perform(): void
- IsDone(): boolean
- ErrorStatus(): number
- MinimalDistance(): number
IntTools_FaceFace
This class provides the intersection of face's underlying surfaces.
Constructors(1)
Empty constructor.
Instance methods(14)
- SetParameters(ApproxCurves: boolean, ComputeCurveOnS1: boolean, ComputeCurveOnS2: boolean, ApproximationTolerance: number): void
Modifier.
Parameters (4)ApproxCurvesComputeCurveOnS1ComputeCurveOnS2ApproximationTolerance
- Perform(F1: TopoDS_Face, F2: TopoDS_Face, theToRunParallel?: boolean): void
Intersects underliing surfaces of F1 and F2 Use sum of tolerance of F1 and F2 as intersection criteria.
Parameters (3)F1F2theToRunParallel
- IsDone(): boolean
Returns True if the intersection was successful.
Returns sequence of 3d curves as result of intersection.
Returns sequence of 3d curves as result of intersection.
- Face1(): TopoDS_Face
Returns first of processed faces.
- Face2(): TopoDS_Face
Returns second of processed faces.
- TangentFaces(): boolean
Returns True if faces are tangent.
- PrepareLines3D(bToSplit?: boolean): void
Provides post-processing the result lines.
Parameters (1)bToSplit—split the closed 3D-curves on parts when TRUE, remain untouched otherwise
- SetList(ListOfPnts: NCollection_List_IntSurf_PntOn2S): voidParameters (1)
ListOfPnts
- SetContext(aContext: IntTools_Context): void
Sets the intersection context.
Parameters (1)aContext
- SetFuzzyValue(theFuzz: number): void
Sets the Fuzzy value.
Parameters (1)theFuzz
- FuzzyValue(): number
Returns Fuzzy value.
Gets the intersection context.
IntTools_FClass2d
Class provides an algorithm to classify a 2d Point in 2d space of face using boundaries of the face.
Constructors(2)
Empty constructor.
- constructor(F: TopoDS_Face, Tol: number): IntTools_FClass2d
Initializes algorithm by the face F and tolerance Tol.
Parameters (2)FTol
Instance methods(5)
- Init(F: TopoDS_Face, Tol: number): void
Initializes algorithm by the face F and tolerance Tol.
Parameters (2)FTol
Returns state of infinite 2d point relatively to (0, 0).
- Perform(Puv: gp_Pnt2d, RecadreOnPeriodic?: boolean): TopAbs_State
Returns state of the 2d point Puv. If RecadreOnPeriodic is true (default value), for the periodic surface 2d point, adjusted to period, is classified.
Parameters (2)PuvRecadreOnPeriodic
- TestOnRestriction(Puv: gp_Pnt2d, Tol: number, RecadreOnPeriodic?: boolean): TopAbs_State
Test a point with +- an offset (Tol) and returns On if some points are OUT an some are IN (Caution: Internal use. see the code for more details).
Parameters (3)PuvTolRecadreOnPeriodic
- IsHole(): boolean
IntTools_MarkedRangeSet
class MarkedRangeSet provides continuous set of ranges marked with flags
Constructors(3)
Empty constructor.
- constructor(theSortedArray: NCollection_Array1_double, theInitFlag: number): IntTools_MarkedRangeSet
Build set of ranges based on the array of progressive sorted values.
Warning: The constructor do not check if the values of array are not sorted It should be checked before function invocationParameters (2)theSortedArraytheInitFlag
- constructor(theFirstBoundary: number, theLastBoundary: number, theInitFlag: number): IntTools_MarkedRangeSet
build set of ranges which consists of one range with boundary values theFirstBoundary and theLastBoundary
Parameters (3)theFirstBoundarytheLastBoundarytheInitFlag
Instance methods(13)
- SetBoundaries(theFirstBoundary: number, theLastBoundary: number, theInitFlag: number): void
build set of ranges which consists of one range with boundary values theFirstBoundary and theLastBoundary
Parameters (3)theFirstBoundarytheLastBoundarytheInitFlag
- SetRanges(theSortedArray: NCollection_Array1_double, theInitFlag: number): void
Build set of ranges based on the array of progressive sorted values.
Warning: The function do not check if the values of array are not sorted It should be checked before function invocationParameters (2)theSortedArraytheInitFlag
- InsertRange(theRange: IntTools_Range, theFlag: number): boolean
Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.
Parameters (2)theRangetheFlag
- InsertRange(theFirstBoundary: number, theLastBoundary: number, theFlag: number): boolean
Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.
Parameters (3)theFirstBoundarytheLastBoundarytheFlag
- InsertRange(theRange: IntTools_Range, theFlag: number, theIndex: number): boolean
Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. The index theIndex is a position where the range will be inserted. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.
Parameters (3)theRangetheFlagtheIndex
- InsertRange(theFirstBoundary: number, theLastBoundary: number, theFlag: number, theIndex: number): boolean
Inserts a new range marked with flag theFlag It replace the existing ranges or parts of ranges and their flags. The index theIndex is a position where the range will be inserted. Returns True if the range is inside the initial boundaries, otherwise or in case of some error returns False.
Parameters (4)theFirstBoundarytheLastBoundarytheFlagtheIndex
- SetFlag(theIndex: number, theFlag: number): void
Set flag theFlag for range with index theIndex.
Parameters (2)theIndextheFlag
- Flag(theIndex: number): number
Returns flag of the range with index theIndex.
Parameters (1)theIndex
- GetIndex(theValue: number): number
Returns index of range which contains theValue. If theValue do not belong any range returns 0.
Parameters (1)theValue
- GetIndex(theValue: number, UseLower: boolean): number
Returns index of range which contains theValue If theValue do not belong any range returns 0. If UseLower is true then lower boundary of the range can be equal to theValue, otherwise upper boundary of the range can be equal to theValue.
Parameters (2)theValueUseLower
- GetIndices(theValue: number): NCollection_Sequence_intParameters (1)
theValue
- Length(): number
Returns number of ranges.
- Range(theIndex: number): IntTools_Range
Returns the range with index theIndex. the Index can be from 1 to
Length().Parameters (1)theIndex
IntTools_PntOn2Faces
Contains two points PntOnFace from IntTools and a flag.
Constructors(1)
Empty constructor.
Instance methods(1)
- IsValid(): boolean
Selector.
IntTools_Range
The class describes the 1-d range [myFirst, myLast].
Constructors(2)
Empty constructor.
- constructor(aFirst: number, aLast: number): IntTools_Range
Initialize me by range boundaries.
Parameters (2)aFirstaLast
Instance methods(5)
- SetFirst(aFirst: number): void
Modifier.
Parameters (1)aFirst
- SetLast(aLast: number): void
Modifier.
Parameters (1)aLast
- First(): number
Selector.
- Last(): number
Selector.
- Range(aFirst: number, aLast: number): { aFirst: number; aLast: number }
Selector.
Parameters (2)aFirstaLast
ReturnsA result object with fields:
aFirst: updated value from the call.aLast: updated value from the call.
IntTools_Root
The class is to describe the root of function of one variable for Edge/Edge and Edge/Surface algorithms.
Constructors(2)
Empty constructor.
- constructor(aRoot: number, aType: number): IntTools_Root
Initializes my by range of parameters and type of root.
Parameters (2)aRootaType
Instance methods(13)
- SetRoot(aRoot: number): void
Sets the Root's value.
Parameters (1)aRoot
- SetType(aType: number): void
Sets the Root's Type.
Parameters (1)aType
- SetStateBefore(aState: TopAbs_State): void
Set the value of the state before the root (at t=Root-dt).
Parameters (1)aState
- SetStateAfter(aState: TopAbs_State): void
Set the value of the state after the root (at t=Root-dt).
Parameters (1)aState
- SetLayerHeight(aHeight: number): void
Not used in Edge/Edge algorithm.
Parameters (1)aHeight
- SetInterval(t1: number, t2: number, f1: number, f2: number): void
Sets the interval from which the Root was found [t1,t2] and the corresponding values of the function on the bounds f(t1), f(t2).
Parameters (4)t1t2f1f2
- Root(): number
Returns the Root value.
- Type(): number
Returns the type of the root =0 - Simple (was found by bisection method); =2 - Smart when f1=0, f2!=0 or vice versa (was found by Fibbonacci method); =1 - Pure (pure zero for all t [t1,t2]);.
Returns the state before the root.
Returns the state after the root.
- LayerHeight(): number
Not used in Edge/Edge algorithm.
- IsValid(): boolean
Returns the validity flag for the root, True if myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_IN or myStateBefore==TopAbs_OUT && myStateAfter==TopAbs_ON or myStateBefore==TopAbs_ON && myStateAfter==TopAbs_OUT or myStateBefore==TopAbs_IN && myStateAfter==TopAbs_OUT For other cases it returns False.
- Interval(t1: number, t2: number, f1: number, f2: number): { t1: number; t2: number; f1: number; f2: number }
Returns the values of interval from which the Root was found [t1,t2] and the corresponding values of the function on the bounds f(t1), f(t2).
Parameters (4)t1t2f1f2
ReturnsA result object with fields:
t1: updated value from the call.t2: updated value from the call.f1: updated value from the call.f2: updated value from the call.
IntTools_ShrunkRange
The class provides the computation of a working (shrunk) range [t1, t2] for the 3D-curve of the edge.
Constructors(1)
Instance methods(11)
- SetData(aE: TopoDS_Edge, aT1: number, aT2: number, aV1: TopoDS_Vertex, aV2: TopoDS_Vertex): voidParameters (5)
aEaT1aT2aV1aV2
- SetContext(aCtx: IntTools_Context): voidParameters (1)
aCtx
- SetShrunkRange(aT1: number, aT2: number): voidParameters (2)
aT1aT2
- ShrunkRange(aT1: number, aT2: number): { aT1: number; aT2: number }Parameters (2)
aT1aT2
- Edge(): TopoDS_Edge
- Perform(): void
- IsDone(): boolean
Returns TRUE in case the shrunk range is computed.
- IsSplittable(): boolean
Returns FALSE in case the shrunk range is too short and the edge cannot be split, otherwise returns TRUE.
- Length(): number
Returns the length of the edge if computed.
IntTools_SurfaceRangeLocalizeData
Constructors(3)
- Parameters (1)
Other
- constructor(theNbSampleU: number, theNbSampleV: number, theMinRangeU: number, theMinRangeV: number): IntTools_SurfaceRangeLocalizeDataParameters (4)
theNbSampleUtheNbSampleVtheMinRangeUtheMinRangeV
Instance methods(30)
- Parameters (1)
Other
- GetNbSampleU(): number
- GetNbSampleV(): number
- GetMinRangeU(): number
- GetMinRangeV(): number
- AddOutRange(theRange: IntTools_SurfaceRangeSample): voidParameters (1)
theRange
- AddBox(theRange: IntTools_SurfaceRangeSample, theBox: Bnd_Box): voidParameters (2)
theRangetheBox
- FindBox(theRange: IntTools_SurfaceRangeSample, theBox: Bnd_Box): booleanParameters (2)
theRangetheBox
- IsRangeOut(theRange: IntTools_SurfaceRangeSample): booleanParameters (1)
theRange
- ListRangeOut(theList: NCollection_List_IntTools_SurfaceRangeSample): voidParameters (1)
theList
- RemoveRangeOutAll(): void
- SetGridDeflection(theDeflection: number): void
Set the grid deflection.
Parameters (1)theDeflection
- GetGridDeflection(): number
Query the grid deflection.
- SetRangeUGrid(theNbUGrid: number): void
Set the range U of the grid of points.
Parameters (1)theNbUGrid
- GetRangeUGrid(): number
Query the range U of the grid of points.
- SetUParam(theIndex: number, theUParam: number): void
Set the U parameter of the grid points at that index.
Parameters (2)theIndextheUParam
- GetUParam(theIndex: number): number
Query the U parameter of the grid points at that index.
Parameters (1)theIndex
- SetRangeVGrid(theNbVGrid: number): void
Set the range V of the grid of points.
Parameters (1)theNbVGrid
- GetRangeVGrid(): number
Query the range V of the grid of points.
- SetVParam(theIndex: number, theVParam: number): void
Set the V parameter of the grid points at that index.
Parameters (2)theIndextheVParam
- GetVParam(theIndex: number): number
Query the V parameter of the grid points at that index.
Parameters (1)theIndex
- SetGridPoint(theUIndex: number, theVIndex: number, thePoint: gp_Pnt): void
Set the grid point.
Parameters (3)theUIndextheVIndexthePoint
- GetGridPoint(theUIndex: number, theVIndex: number): gp_Pnt
Set the grid point.
Parameters (2)theUIndextheVIndex
- SetFrame(theUMin: number, theUMax: number, theVMin: number, theVMax: number): void
Sets the frame area. Used to work with grid points.
Parameters (4)theUMintheUMaxtheVMintheVMax
- GetNBUPointsInFrame(): number
Returns the number of grid points on U direction in frame.
- GetNBVPointsInFrame(): number
Returns the number of grid points on V direction in frame.
- GetPointInFrame(theUIndex: number, theVIndex: number): gp_Pnt
Returns the grid point in frame.
Parameters (2)theUIndextheVIndex
- GetUParamInFrame(theIndex: number): number
Query the U parameter of the grid points at that index in frame.
Parameters (1)theIndex
- GetVParamInFrame(theIndex: number): number
Query the V parameter of the grid points at that index in frame.
Parameters (1)theIndex
- ClearGrid(): void
Clears the grid of points.
IntTools_SurfaceRangeSample
class for range index management of surface
Constructors(4)
- Parameters (1)
Other
- constructor(theRangeU: IntTools_CurveRangeSample, theRangeV: IntTools_CurveRangeSample): IntTools_SurfaceRangeSampleParameters (2)
theRangeUtheRangeV
- constructor(theIndexU: number, theDepthU: number, theIndexV: number, theDepthV: number): IntTools_SurfaceRangeSampleParameters (4)
theIndexUtheDepthUtheIndexVtheDepthV
Instance methods(23)
- Parameters (1)
Other
- SetRanges(theRangeU: IntTools_CurveRangeSample, theRangeV: IntTools_CurveRangeSample): voidParameters (2)
theRangeUtheRangeV
- GetRanges(theRangeU: IntTools_CurveRangeSample, theRangeV: IntTools_CurveRangeSample): voidParameters (2)
theRangeUtheRangeV
- SetIndexes(theIndexU: number, theIndexV: number): voidParameters (2)
theIndexUtheIndexV
- GetIndexes(theIndexU: number, theIndexV: number): { theIndexU: number; theIndexV: number }Parameters (2)
theIndexUtheIndexV
- GetDepths(theDepthU: number, theDepthV: number): { theDepthU: number; theDepthV: number }Parameters (2)
theDepthUtheDepthV
- SetSampleRangeU(theRangeSampleU: IntTools_CurveRangeSample): voidParameters (1)
theRangeSampleU
- SetSampleRangeV(theRangeSampleV: IntTools_CurveRangeSample): voidParameters (1)
theRangeSampleV
- SetIndexU(theIndexU: number): voidParameters (1)
theIndexU
- GetIndexU(): number
- SetIndexV(theIndexV: number): voidParameters (1)
theIndexV
- GetIndexV(): number
- SetDepthU(theDepthU: number): voidParameters (1)
theDepthU
- GetDepthU(): number
- SetDepthV(theDepthV: number): voidParameters (1)
theDepthV
- GetDepthV(): number
- GetRangeU(theFirstU: number, theLastU: number, theNbSampleU: number): IntTools_RangeParameters (3)
theFirstUtheLastUtheNbSampleU
- GetRangeV(theFirstV: number, theLastV: number, theNbSampleV: number): IntTools_RangeParameters (3)
theFirstVtheLastVtheNbSampleV
- IsEqual(Other: IntTools_SurfaceRangeSample): booleanParameters (1)
Other
- GetRangeIndexUDeeper(theNbSampleU: number): numberParameters (1)
theNbSampleU
- GetRangeIndexVDeeper(theNbSampleV: number): numberParameters (1)
theNbSampleV
IntTools_Tools
The class contains handy static functions dealing with the geometry and topology.
Constructors(1)
Static methods(25)
- ComputeVV(V1: TopoDS_Vertex, V2: TopoDS_Vertex): number
Computes distance between vertex V1 and vertex V2, if the distance is less than sum of vertex tolerances returns zero, otherwise returns negative value.
Parameters (2)V1V2
- HasInternalEdge(aW: TopoDS_Wire): boolean
Returns True if wire aW contains edges with INTERNAL orientation.
Parameters (1)aW
- MakeFaceFromWireAndFace(aW: TopoDS_Wire, aF: TopoDS_Face, aFNew: TopoDS_Face): void
Build a face based on surface of given face aF and bounded by wire aW.
Parameters (3)aWaFaFNew—Mutated in place; read the updated value from this argument after the call.
- ClassifyPointByFace(aF: TopoDS_Face, P: gp_Pnt2d): TopAbs_StateParameters (2)
aFP
- IsVertex(aCmnPrt: IntTools_CommonPrt): boolean
Returns True if IsVertx for middle parameter of fist range and first edge returns True and if IsVertex for middle parameter of second range and second range returns True, otherwise returns False.
Parameters (1)aCmnPrt
- IsVertex(E: TopoDS_Edge, t: number): boolean
Computes square distance between a point on the edge E corresponded to parameter t and vertices of edge E. Returns True if this distance is less than square tolerance of vertex, otherwise returns false.
Parameters (2)Et
- IsVertex(E: TopoDS_Edge, V: TopoDS_Vertex, t: number): boolean
Returns True if square distance between vertex V and a point on the edge E corresponded to parameter t is less than square tolerance of V.
Parameters (3)EVt
- IsVertex(aP: gp_Pnt, aTolPV: number, aV: TopoDS_Vertex): boolean
Returns True if the distance between point aP and vertex aV is less or equal to sum of aTolPV and vertex tolerance, otherwise returns False.
Parameters (3)aPaTolPVaV
- IsMiddlePointsEqual(E1: TopoDS_Edge, E2: TopoDS_Edge): boolean
Gets boundary of parameters of E1 and E2. Computes 3d points on each corresponded to average parameters. Returns True if distance between computed points is less than sum of edge tolerance, otherwise returns False.
Parameters (2)E1E2
- IntermediatePoint(aFirst: number, aLast: number): number
Returns some value between aFirst and aLast.
Parameters (2)aFirstaLast
- SplitCurve(aC: IntTools_Curve, aS: NCollection_Sequence_IntTools_Curve): number
Split aC by average parameter if aC is closed in 3D. Returns positive value if splitting has been done, otherwise returns zero.
Parameters (2)aCaS—Mutated in place; read the updated value from this argument after the call.
- RejectLines(aSIn: NCollection_Sequence_IntTools_Curve, aSOut: NCollection_Sequence_IntTools_Curve): void
Puts curves from aSIn to aSOut except those curves that are coincide with first curve from aSIn.
Parameters (2)aSInaSOut—Mutated in place; read the updated value from this argument after the call.
- IsDirsCoinside(D1: gp_Dir, D2: gp_Dir): boolean
Returns True if D1 and D2 coincide.
Parameters (2)D1D2
- IsDirsCoinside(D1: gp_Dir, D2: gp_Dir, aTol: number): boolean
Returns True if D1 and D2 coincide with given tolerance.
Parameters (3)D1D2aTol
- IsClosed(aC: Geom_Curve): boolean
Returns True if aC is BoundedCurve from Geom and the distance between first point of the curve aC and last point is less than 1.e-12.
Parameters (1)aC
- CurveTolerance(aC: Geom_Curve, aTolBase: number): number
Returns adaptive tolerance for given aTolBase if aC is trimmed curve and basis curve is parabola, otherwise returns value of aTolBase.
Parameters (2)aCaTolBase
- CheckCurve(theCurve: IntTools_Curve, theBox: Bnd_Box): boolean
Checks if the curve is not covered by the default tolerance (confusion). Builds bounding box for the curve and stores it into <theBox>.
Parameters (2)theCurvetheBox—Mutated in place; read the updated value from this argument after the call.
- IsOnPave(theT: number, theRange: IntTools_Range, theTol: number): booleanParameters (3)
theTtheRangetheTol
- VertexParameters(theCP: IntTools_CommonPrt, theT1: number, theT2: number): { theT1: number; theT2: number }Parameters (3)
theCPtheT1theT2
- VertexParameter(theCP: IntTools_CommonPrt, theT: number): { theT: number }Parameters (2)
theCPtheT
- IsOnPave1(theT: number, theRange: IntTools_Range, theTol: number): booleanParameters (3)
theTtheRangetheTol
- IsInRange(theRRef: IntTools_Range, theR: IntTools_Range, theTol: number): boolean
Checks if the range <theR> interfere with the range <theRRef>.
Parameters (3)theRReftheRtheTol
- SegPln(theLin: gp_Lin, theTLin1: number, theTLin2: number, theTolLin: number, thePln: gp_Pln, theTolPln: number, theP: gp_Pnt, theT: number, theTolP: number, theTmin: number, theTmax: number): { returnValue: number; theT: number; theTolP: number; theTmin: number; theTmax: number }Parameters (11)
theLintheTLin1theTLin2theTolLinthePlntheTolPlnthePtheTtheTolPtheTmintheTmax
- ComputeTolerance(theCurve3D: Geom_Curve, theCurve2D: Geom2d_Curve, theSurf: Geom_Surface, theFirst: number, theLast: number, theMaxDist: number, theMaxPar: number, theTolRange: number, theToRunParallel: boolean): { returnValue: boolean; theMaxDist: number; theMaxPar: number }
Computes the max distance between points taken from 3D and 2D curves by the same parameter.
Parameters (9)theCurve3DtheCurve2DtheSurftheFirsttheLasttheMaxDisttheMaxPartheTolRangetheToRunParallel
ReturnsA result object with fields:
returnValue: the C++ return valuetheMaxDist: updated value from the call.theMaxPar: updated value from the call.
- ComputeIntRange(theTol1: number, theTol2: number, theAngle: number): number
Computes the correct Intersection range for Line/Line, Line/Plane and Plane/Plane intersections.
Parameters (3)theTol1theTol2theAngle
IntTools_TopolTool
Class redefine methods of TopolTool from Adaptor3d concerning sample points.
Constructors(2)
Empty constructor.
- constructor(theSurface: Adaptor3d_Surface): IntTools_TopolTool
Initializes me by surface.
Parameters (1)theSurface
Static methods(2)
- get_type_name(): string
Instance methods(10)
- Initialize(): void
Redefined empty initializer.
Warning: Raises the exception NotImplemented - Initialize(S: Adaptor3d_Surface): void
Initializes me by surface.
Parameters (1)S
- Initialize(Curve: Adaptor2d_Curve2d): void
Initializes me by surface.
Parameters (1)Curve
- ComputeSamplePoints(): void
- NbSamplesU(): number
Computes the sample-points for the intersections algorithms.
- NbSamplesV(): number
Computes the sample-points for the intersections algorithms.
- NbSamples(): number
Computes the sample-points for the intersections algorithms.
- SamplePoint(Index: number, P2d: gp_Pnt2d, P3d: gp_Pnt): void
Returns a 2d point from surface myS and a corresponded 3d point for given index. The index should be from 1 to
NbSamples().Parameters (3)IndexP2d—Mutated in place; read the updated value from this argument after the call.P3d—Mutated in place; read the updated value from this argument after the call.
- SamplePnts(theDefl: number, theNUmin: number, theNVmin: number): void
compute the sample-points for the intersections algorithms by adaptive algorithm for BSpline surfaces. For other surfaces algorithm is the same as in method
ComputeSamplePoints(), but only fill arrays of U and V sample parameters; theDefl is a required deflection theNUmin, theNVmin are minimal nb points for U and V.Parameters (3)theDefltheNUmintheNVmin
IntTools_WLineTool
IntTools_WLineTool provides set of static methods related to walking lines.
Constructors(1)
Static methods(2)
- NotUseSurfacesForApprox(aF1: TopoDS_Face, aF2: TopoDS_Face, WL: IntPatch_WLine, ifprm: number, ilprm: number): booleanParameters (5)
aF1aF2WLifprmilprm
- DecompositionOfWLine(theWLine: IntPatch_WLine, theSurface1: GeomAdaptor_Surface, theSurface2: GeomAdaptor_Surface, theFace1: TopoDS_Face, theFace2: TopoDS_Face, theLConstructor: GeomInt_LineConstructor, theAvoidLConstructor: boolean, theTol: number, theNewLines: NCollection_Sequence_handle_IntPatch_Line, argNo9: IntTools_Context): booleanParameters (10)
theWLinetheSurface1theSurface2theFace1theFace2theLConstructortheAvoidLConstructortheToltheNewLinesargNo9