OpenCascade.js
API ReferenceModelingAlgorithmsTKTopAlgo

Bisector

OCCT package Bisector: Bisector, Bisector_Bisec, Bisector_BisecAna, Bisector_BisecCC, and 7 more bound classes.

Bisector_Bisec

Bisec provides the bisecting line between two elements This line is trimmed by a point.
and it's contained in the domain defined by the two vectors <V1>, <V2> and <Sense>.
Definition of the domain: if <Sense> is true the bisecting line is contained in the sector defined by <-V1> and <-V2> in the sense indirect. if <Sense> is false the bisecting line is contained in the sector defined by <-V1> and <-V2> in the sense direct.
<Tolerance> is used to define degenerate bisector. if the bisector is an hyperbola and one of this radius is smaller than <Tolerance>, the bisector is replaced by a line or semi_line corresponding to one of hyperbola's axes. if the bisector is a parabola on the focal length is smaller than <Tolerance>, the bisector is replaced by a semi_line corresponding to the axe of symmetry of the parabola. if the bisector is an ellipse and the minor radius is smaller than <Tolerance>, the bisector is replaced by a segment corresponding to the great axe of the ellipse.

Constructors(1)

Instance methods(6)

Bisector_BisecAna

This class provides the bisecting line between two geometric elements.The elements are Circles,Lines or Points.

Constructors(1)

Static methods(2)

Instance methods(33)

  • Perform(Cu: Geom2d_Curve, Pnt: Geom2d_Point, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, Sense: number, Tolerance: number, oncurve: boolean): void

    Performs the bisecting line between the curve <Cu1> and the point <Pnt>. <oncurve> is True if the point.
    is the point <Pnt>.

    Parameters (8)
    • Cu
    • Pnt
    • P
    • V1
    • V2
    • Sense
    • Tolerance
    • oncurve
  • Perform(Pnt: Geom2d_Point, Cu: Geom2d_Curve, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, Sense: number, Tolerance: number, oncurve: boolean): void

    Performs the bisecting line between the curve <Cu> and the point <Pnt>. <oncurve> is True if the point.
    is the point <Pnt>.

    Parameters (8)
    • Pnt
    • Cu
    • P
    • V1
    • V2
    • Sense
    • Tolerance
    • oncurve
  • Perform(Pnt1: Geom2d_Point, Pnt2: Geom2d_Point, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, Sense: number, Tolerance: number, oncurve: boolean): void

    Performs the bisecting line between the two points <Pnt1> and <Pnt2>.

    Parameters (8)
    • Pnt1
    • Pnt2
    • P
    • V1
    • V2
    • Sense
    • Tolerance
    • oncurve
  • Perform(Cu1: Geom2d_Curve, Cu2: Geom2d_Curve, P: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d, Sense: number, jointype: GeomAbs_JoinType, Tolerance: number, oncurve: boolean): void

    Performs the bisecting line between the curves <Cu1> and <Cu2>. <oncurve> is True if the point.
    is common to <Cu1> and <Cu2>.

    Parameters (9)
    • Cu1
    • Cu2
    • P
    • V1
    • V2
    • Sense
    • jointype
    • Tolerance
    • oncurve
  • Init(bisector: Geom2d_TrimmedCurve): void
    Parameters (1)
    • bisector
  • IsExtendAtStart(): boolean
  • IsExtendAtEnd(): boolean
  • Trim <me> by a domain defined by the curve <Cu>. This domain is the set of the points which are nearest from <Cu> than the extremitis of <Cu>.

    Parameters (1)
    • Cu
  • SetTrim(uf: number, ul: number): void

    Trim <me> by a domain defined by uf and ul.

    Parameters (2)
    • uf
    • ul
  • Reverse(): void

    Changes the direction of parametrization of <me>. The "FirstParameter" and the "LastParameter" are not changed but the orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.

  • ReversedParameter(U: number): number

    Computes the parameter on the reversed curve for the point of parameter U on this curve. Note: The point of parameter U on this curve is identical to the point of parameter ReversedParameter(U) on the reversed curve.

    Parameters (1)
    • U
  • IsCN(N: number): boolean

    Returns the order of continuity of the curve. Raised if N < 0.

    Parameters (1)
    • N
  • Transformation of a geometric object. This transformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations. (see class Transformation of the package Geom2d). The following transformations have the same properties as the previous ones but they don't modified the object itself. A copy of the object is returned.

    Parameters (1)
    • T
  • FirstParameter(): number

    Returns the value of the first parameter. Warnings : It can be RealFirst or RealLast from package Standard if the curve is infinite.

  • LastParameter(): number

    Value of the last parameter. Warnings : It can be RealFirst or RealLast from package Standard if the curve is infinite.

  • IsClosed(): boolean

    Returns true if the curve is closed. Examples : Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp which is a fixed criterion independent of the application.

  • IsPeriodic(): boolean

    Returns true if the parameter of the curve is periodic. It is possible only if the curve is closed and if the following relation is satisfied : for each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities : . the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve.
    The general rule for this case is : if a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic.

  • It is the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite.

  • EvalD0(U: number): gp_Pnt2d

    Computes the point of parameter U. Raises an exception on failure.

    Parameters (1)
    • U
  • EvalD1(U: number): Geom2d_Curve_ResD1

    Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1.

    Parameters (1)
    • U
  • EvalD2(U: number): Geom2d_Curve_ResD2

    Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2.

    Parameters (1)
    • U
  • EvalD3(U: number): Geom2d_Curve_ResD3

    Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3.

    Parameters (1)
    • U
  • EvalDN(U: number, N: number): gp_Vec2d

    Computes the Nth derivative at parameter U. Raises an exception if the curve continuity is not CN, or N < 1.

    Parameters (2)
    • U
    • N
  • Parameter(P: gp_Pnt2d): number
    Parameters (1)
    • P
  • NbIntervals(): number

    If necessary, breaks the curve in intervals of continuity <C1>. And returns the number of intervals.

  • IntervalFirst(Index: number): number

    Returns the first parameter of the current interval.

    Parameters (1)
    • Index
  • IntervalLast(Index: number): number

    Returns the last parameter of the current interval.

    Parameters (1)
    • Index
  • Dump(Deep?: number, Offset?: number): void
    Parameters (2)
    • Deep
    • Offset

Bisector_BisecCC

Construct the bisector between two curves. The curves can intersect only in their extremities.

Constructors(2)

  • constructor(Cu1: Geom2d_Curve, Cu2: Geom2d_Curve, Side1: number, Side2: number, Origin: gp_Pnt2d, DistMax?: number): Bisector_BisecCC

    Constructs the bisector between the curves <Cu1> and <Cu2>.
    <Side1> (resp <Side2>) = 1 if the bisector curve is on the left of <Cu1> (resp <Cu2>) else <Side1> (resp <Side2>) = -1.
    the Bisector is trimmed by the Point <Origin>. <DistMax> is used to trim the bisector.The distance between the points of the bisector and <Cu> is smaller than <DistMax>.

    Parameters (6)
    • Cu1
    • Cu2
    • Side1
    • Side2
    • Origin
    • DistMax

Static methods(2)

Instance methods(33)

  • Perform(Cu1: Geom2d_Curve, Cu2: Geom2d_Curve, Side1: number, Side2: number, Origin: gp_Pnt2d, DistMax?: number): void

    Computes the bisector between the curves <Cu1> and <Cu2>.
    <Side1> (resp <Side2>) = 1 if the bisector curve is on the left of <Cu1> (resp <Cu2>) else <Side1> (resp <Side2>) = -1.
    the Bisector is trimmed by the Point <Origin>.
    <DistMax> is used to trim the bisector.The distance between the points of the bisector and <Cu> is smaller than <DistMax>.

    Parameters (6)
    • Cu1
    • Cu2
    • Side1
    • Side2
    • Origin
    • DistMax
  • IsExtendAtStart(): boolean
  • IsExtendAtEnd(): boolean
  • Reverse(): void

    Changes the direction of parametrization of <me>. The "FirstParameter" and the "LastParameter" are not changed but the orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.

  • ReversedParameter(U: number): number

    Computes the parameter on the reversed curve for the point of parameter U on this curve. Note: The point of parameter U on this curve is identical to the point of parameter ReversedParameter(U) on the reversed curve.

    Parameters (1)
    • U
  • IsCN(N: number): boolean

    Returns the order of continuity of the curve. Raised if N < 0.

    Parameters (1)
    • N
  • The parameter on <me> is linked to the parameter on the first curve. This method creates the same bisector where the curves are inversed.

  • Transformation of a geometric object. This transformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations.

    Parameters (1)
    • T
  • FirstParameter(): number

    Returns the value of the first parameter. Warnings : It can be RealFirst or RealLast from package Standard if the curve is infinite.

  • LastParameter(): number

    Value of the last parameter. Warnings : It can be RealFirst or RealLast from package Standard if the curve is infinite.

  • It is the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite.

  • NbIntervals(): number

    If necessary, breaks the curve in intervals of continuity <C1>. And returns the number of intervals.

  • IntervalFirst(Index: number): number

    Returns the first parameter of the current interval.

    Parameters (1)
    • Index
  • IntervalLast(Index: number): number

    Returns the last parameter of the current interval.

    Parameters (1)
    • Index
  • IsClosed(): boolean

    Returns true if the curve is closed. Examples : Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp which is a fixed criterion independent of the application.

  • IsPeriodic(): boolean

    Returns true if the parameter of the curve is periodic. It is possible only if the curve is closed and if the following relation is satisfied : for each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities : . the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve.
    The general rule for this case is : if a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic.

  • ValueAndDist(U: number, U1: number, U2: number, Distance: number): { returnValue: gp_Pnt2d; U1: number; U2: number; Distance: number; [Symbol.dispose](): void }

    Returns the point of parameter U. Computes the distance between the current point and the two curves I separate. Computes the parameters on each curve corresponding of the projection of the current point.

    Parameters (4)
    • U
    • U1
    • U2
    • Distance
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • U1: updated value from the call.
    • U2: updated value from the call.
    • Distance: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • ValueByInt(U: number, U1: number, U2: number, Distance: number): { returnValue: gp_Pnt2d; U1: number; U2: number; Distance: number; [Symbol.dispose](): void }

    Returns the point of parameter U. Computes the distance between the current point and the two curves I separate. Computes the parameters on each curve corresponding of the projection of the current point.

    Parameters (4)
    • U
    • U1
    • U2
    • Distance
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • U1: updated value from the call.
    • U2: updated value from the call.
    • Distance: updated value from the call.
      Dispose the returned envelope to release owned Handle fields.
  • EvalD0(U: number): gp_Pnt2d

    Computes the point of parameter U. Raises an exception on failure.

    Parameters (1)
    • U
  • EvalD1(U: number): Geom2d_Curve_ResD1

    Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1.

    Parameters (1)
    • U
  • EvalD2(U: number): Geom2d_Curve_ResD2

    Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2.

    Parameters (1)
    • U
  • EvalD3(U: number): Geom2d_Curve_ResD3

    Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3.

    Parameters (1)
    • U
  • EvalDN(U: number, N: number): gp_Vec2d

    Computes the Nth derivative at parameter U. Raises an exception if the curve continuity is not CN, or N < 1.

    Parameters (2)
    • U
    • N
  • IsEmpty(): boolean
  • LinkBisCurve(U: number): number

    Returns the parameter on the curve1 of the projection of the point of parameter U on <me>.

    Parameters (1)
    • U
  • LinkCurveBis(U: number): number

    Returns the reciproque of LinkBisCurve.

    Parameters (1)
    • U
  • Parameter(P: gp_Pnt2d): number
    Parameters (1)
    • P
  • Curve(IndCurve: number): Geom2d_Curve
    Parameters (1)
    • IndCurve
  • Dump(Deep?: number, Offset?: number): void
    Parameters (2)
    • Deep
    • Offset

Bisector_BisecPC

Provides the bisector between a point and a curve. the curvature on the curve has to be monoton. the point can't be on the curve except at the extremities.

Constructors(3)

  • constructor(Cu: Geom2d_Curve, P: gp_Pnt2d, Side: number, DistMax?: number): Bisector_BisecPC

    Constructs the bisector between the point.
    and the curve <Cu>. <Side> = 1. if the bisector curve is on the Left of <Cu> else <Side> = -1. <DistMax> is used to trim the bisector.The distance between the points of the bisector and <Cu> is smaller than <DistMax>.

    Parameters (4)
    • Cu
    • P
    • Side
    • DistMax
  • constructor(Cu: Geom2d_Curve, P: gp_Pnt2d, Side: number, UMin: number, UMax: number): Bisector_BisecPC

    Constructs the bisector between the point.
    and the curve <Cu> Trimmed by <UMin> and <UMax> <Side> = 1. if the bisector curve is on the Left of <Cu> else <Side> = -1. Warning: the bisector is supposed all over defined between <UMin> and <UMax>.

    Parameters (5)
    • Cu
    • P
    • Side
    • UMin
    • UMax

Static methods(2)

Instance methods(29)

  • Perform(Cu: Geom2d_Curve, P: gp_Pnt2d, Side: number, DistMax?: number): void

    Construct the bisector between the point.
    and the curve <Cu>. <Side> = 1. if the bisector curve is on the Left of <Cu> else <Side> = -1. <DistMax> is used to trim the bisector.The distance between the points of the bisector and <Cu> is smaller than <DistMax>.

    Parameters (4)
    • Cu
    • P
    • Side
    • DistMax
  • IsExtendAtStart(): boolean

    Returns True if the bisector is extended at start.

  • IsExtendAtEnd(): boolean

    Returns True if the bisector is extended at end.

  • Reverse(): void

    Changes the direction of parametrization of <me>. The orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.

  • ReversedParameter(U: number): number

    Returns the parameter on the reversed curve for the point of parameter U on <me>.

    Parameters (1)
    • U
  • Transformation of a geometric object. This transformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations.

    Parameters (1)
    • T
  • IsCN(N: number): boolean

    Returns the order of continuity of the curve. Raised if N < 0.

    Parameters (1)
    • N
  • FirstParameter(): number

    Value of the first parameter.

  • LastParameter(): number

    Value of the last parameter.

  • It is the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite.

  • NbIntervals(): number

    If necessary, breaks the curve in intervals of continuity <C1>. And returns the number of intervals.

  • IntervalFirst(Index: number): number

    Returns the first parameter of the current interval.

    Parameters (1)
    • Index
  • IntervalLast(Index: number): number

    Returns the last parameter of the current interval.

    Parameters (1)
    • Index
  • IsClosed(): boolean

    Returns true if the curve is closed. Examples : Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp which is a fixed criterion independent of the application.

  • IsPeriodic(): boolean

    Returns true if the parameter of the curve is periodic. It is possible only if the curve is closed and if the following relation is satisfied : for each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities : . the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve.
    The general rule for this case is : if a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic.

  • Distance(U: number): number

    Returns the distance between the point of parameter U on <me> and my point or my curve.

    Parameters (1)
    • U
  • EvalD0(U: number): gp_Pnt2d

    Computes the point of parameter U. Raises an exception on failure.

    Parameters (1)
    • U
  • EvalD1(U: number): Geom2d_Curve_ResD1

    Computes the point and first derivative at parameter U. Raises an exception if the curve continuity is not C1.

    Parameters (1)
    • U
  • EvalD2(U: number): Geom2d_Curve_ResD2

    Computes the point and first two derivatives at parameter U. Raises an exception if the curve continuity is not C2.

    Parameters (1)
    • U
  • EvalD3(U: number): Geom2d_Curve_ResD3

    Computes the point and first three derivatives at parameter U. Raises an exception if the curve continuity is not C3.

    Parameters (1)
    • U
  • EvalDN(U: number, N: number): gp_Vec2d

    Computes the Nth derivative at parameter U. Raises an exception if the curve continuity is not CN, or N < 1.

    Parameters (2)
    • U
    • N
  • Dump(Deep?: number, Offset?: number): void
    Parameters (2)
    • Deep
    • Offset
  • LinkBisCurve(U: number): number

    Returns the parameter on the curve1 of the projection of the point of parameter U on <me>.

    Parameters (1)
    • U
  • LinkCurveBis(U: number): number

    Returns the reciproque of LinkBisCurve.

    Parameters (1)
    • U
  • Parameter(P: gp_Pnt2d): number

    Returns the parameter on <me> corresponding to.
    .

    Parameters (1)
    • P
  • IsEmpty(): boolean

    Returns <True> if the bisector is empty.

Bisector_Curve

Static methods(2)

Instance methods(7)

Bisector_FunctionH

H(v) = (T1.P2(v) - P1) * ||T(v)|| - 2 2 (T(v).P2(v) - P1) * ||T1||.

Constructors(1)

Instance methods(3)

  • Value(X: number, F: number): { returnValue: boolean; F: number }

    Computes the values of the Functions for the variable <X>.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Derivative(X: number, D: number): { returnValue: boolean; D: number }

    Computes the derivative <D> of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (2)
    • X
    • D
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • D: updated value from the call.
  • Values(X: number, F: number, D: number): { returnValue: boolean; F: number; D: number }

    Returns the values of the functions and the derivatives for the variable <X>.

    Parameters (3)
    • X
    • F
    • D
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
    • D: updated value from the call.

Bisector_FunctionInter

2 2 F(u) = (PC(u) - PBis1(u)) + (PC(u) - PBis2(u))

Constructors(2)

Instance methods(4)

  • Parameters (3)
    • C
    • Bis1
    • Bis2
  • Value(X: number, F: number): { returnValue: boolean; F: number }

    Computes the values of the Functions for the variable <X>.

    Parameters (2)
    • X
    • F
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
  • Derivative(X: number, D: number): { returnValue: boolean; D: number }

    Computes the derivative <D> of the function for the variable <X>. Returns True if the calculation were successfully done, False otherwise.

    Parameters (2)
    • X
    • D
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • D: updated value from the call.
  • Values(X: number, F: number, D: number): { returnValue: boolean; F: number; D: number }

    Returns the values of the functions and the derivatives for the variable <X>.

    Parameters (3)
    • X
    • F
    • D
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • F: updated value from the call.
    • D: updated value from the call.

Bisector_Inter

Intersection between two <Bisec> from Bisector.

Constructors(2)

Instance methods(1)

  • Perform(C1: Bisector_Bisec, D1: IntRes2d_Domain, C2: Bisector_Bisec, D2: IntRes2d_Domain, TolConf: number, Tol: number, ComunElement: boolean): void

    Intersection between 2 curves. C1 separates the element A and B. C2 separates the elements C et D. If B an C have the same geometry. <ComunElement> Has to be True. It Permits an optimization of the computation.

    Parameters (7)
    • C1
    • D1
    • C2
    • D2
    • TolConf
    • Tol
    • ComunElement

Bisector_PointOnBis

Constructors(2)

Instance methods(13)