OpenCascade.js
API ReferenceModelingDataTKGeomBase

AppParCurves

OCCT package AppParCurves: AppParCurves, AppParCurves_Constraint, AppParCurves_ConstraintCouple, AppParCurves_MultiBSpCurve, and 2 more bound classes.

AppParCurves

Parallel Approximation in n curves. This package gives all the algorithms used to approximate a MultiLine described by the tool MLineTool. The result of the approximation will be a MultiCurve.

Constructors(1)

Static methods(4)

AppParCurves_ConstraintCouple

associates an index and a constraint for an object. This couple is used by AppDef_TheVariational when performing approximations.

Constructors(2)

Instance methods(4)

AppParCurves_MultiBSpCurve

This class describes a MultiBSpCurve approximating a Multiline. Just as a Multiline is a set of a given number of lines, a MultiBSpCurve is a set of a specified number of bsplines defined by:

  • A specified number of MultiPoints - the poles of a specified number of curves
  • The degree of approximation identical for each of the specified number of curves.
    Example of a MultiBSpCurve composed of a specified number of MultiPoints:
    P1______P2_____P3______P4________........PNbMPoints
    Q1______Q2_____Q3______Q4
    ___........QNbMPoints . . . . . . R1______R2_____R3______R4___........_____RNbMPoints
    Pi, Qi, ..., Ri are points of dimension 2 or 3.
    (Pi, Qi, ...Ri), i= 1,...NbPoles are MultiPoints. each MultiPoint has got NbPol Poles. MultiBSpCurves are created by the SplineValue method in the ComputeLine class, and by the Value method in TheVariational class. MultiBSpCurve provides the information required to create the BSpline defined by the approximation.

Constructors(4)

Instance methods(12)

  • Knots of the multiBSpCurve are assigned to <theknots>.

    Parameters (1)
    • theKnots
  • Multiplicities of the multiBSpCurve are assigned to <theMults>.

    Parameters (1)
    • theMults
  • Returns an array of Reals containing the multiplicities of curves resulting from the approximation.

  • Returns an array of Reals containing the multiplicities of curves resulting from the approximation.

  • Degree(): number

    returns the degree of the curve(s).

  • Value(CuIndex: number, U: number, Pt: gp_Pnt): void

    returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (3)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
  • Value(CuIndex: number, U: number, Pt: gp_Pnt2d): void

    returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 3d.

    Parameters (3)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
  • returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (1)
    • Index
  • D1(CuIndex: number, U: number, Pt: gp_Pnt, V1: gp_Vec): void

    returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 3d.

    Parameters (4)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
  • D1(CuIndex: number, U: number, Pt: gp_Pnt2d, V1: gp_Vec2d): void

    returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (4)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
  • D2(CuIndex: number, U: number, Pt: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void

    returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 3d.

    Parameters (5)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
    • V2
      Mutated in place; read the updated value from this argument after the call.
  • D2(CuIndex: number, U: number, Pt: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void

    returns the value of the point with a parameter U on the BSpline curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (5)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
    • V2
      Mutated in place; read the updated value from this argument after the call.

AppParCurves_MultiCurve

This class describes a MultiCurve approximating a Multiline. As a Multiline is a set of n lines, a MultiCurve is a set of n curves. These curves are Bezier curves. A MultiCurve is composed of m MultiPoint. The approximating degree of these n curves is the same for each one.
Example of a MultiCurve composed of MultiPoints:
P1______P2_____P3______P4________........PNbMPoints
Q1______Q2_____Q3______Q4
___........QNbMPoints . . . . . . R1______R2_____R3______R4___........_____RNbMPoints
Pi, Qi, ..., Ri are points of dimension 2 or 3.
(Pi, Qi, ...Ri), i= 1,...NbPoles are MultiPoints. each MultiPoint has got NbPol Poles.

Constructors(3)

Instance methods(19)

  • SetNbPoles(nbPoles: number): void

    The number of poles of the MultiCurve will be set to <nbPoles>.

    Parameters (1)
    • nbPoles
  • SetValue(Index: number, MPoint: AppParCurves_MultiPoint): void

    sets the MultiPoint of range Index to the value <MPoint>. An exception is raised if Index <0 or Index >NbMPoint.

    Parameters (2)
    • Index
    • MPoint
  • NbCurves(): number

    Returns the number of curves resulting from the approximation of a MultiLine.

  • NbPoles(): number

    Returns the number of poles on curves resulting from the approximation of a MultiLine.

  • Degree(): number

    returns the degree of the curves.

  • Dimension(CuIndex: number): number

    returns the dimension of the CuIndex curve. An exception is raised if CuIndex<0 or CuIndex>NbCurves.

    Parameters (1)
    • CuIndex
  • Curve(CuIndex: number, TabPnt: NCollection_Array1_gp_Pnt): void

    returns the Pole array of the curve of range CuIndex. An exception is raised if the dimension of the curve is 2d.

    Parameters (2)
    • CuIndex
    • TabPnt
      Mutated in place; read the updated value from this argument after the call.
  • Curve(CuIndex: number, TabPnt: NCollection_Array1_gp_Pnt2d): void

    returns the Pole array of the curve of range CuIndex. An exception is raised if the dimension of the curve is 3d.

    Parameters (2)
    • CuIndex
    • TabPnt
      Mutated in place; read the updated value from this argument after the call.
  • returns the Index MultiPoint. An exception is raised if Index <0 or Index >Degree+1.

    Parameters (1)
    • Index
  • Value(CuIndex: number, U: number, Pt: gp_Pnt): void

    returns the value of the point with a parameter U on the Bezier curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (3)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
  • Value(CuIndex: number, U: number, Pt: gp_Pnt2d): void

    returns the value of the point with a parameter U on the Bezier curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 3d.

    Parameters (3)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
  • Pole(CuIndex: number, Nieme: number): gp_Pnt

    returns the Nieme pole of the CuIndex curve. the curve must be a 3D curve.

    Parameters (2)
    • CuIndex
    • Nieme
  • Pole2d(CuIndex: number, Nieme: number): gp_Pnt2d

    returns the Nieme pole of the CuIndex curve. the curve must be a 2D curve.

    Parameters (2)
    • CuIndex
    • Nieme
  • Transform(CuIndex: number, x: number, dx: number, y: number, dy: number, z: number, dz: number): void

    Applies a transformation to the curve of range <CuIndex>. newx = x + dxoldx newy = y + dyoldy for all points of the curve. newz = z + dz*oldz.

    Parameters (7)
    • CuIndex
    • x
    • dx
    • y
    • dy
    • z
    • dz
  • Transform2d(CuIndex: number, x: number, dx: number, y: number, dy: number): void

    Applies a transformation to the Curve of range <CuIndex>. newx = x + dxoldx newy = y + dyoldy for all points of the curve.

    Parameters (5)
    • CuIndex
    • x
    • dx
    • y
    • dy
  • D1(CuIndex: number, U: number, Pt: gp_Pnt, V1: gp_Vec): void

    returns the value of the point with a parameter U on the Bezier curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 3d.

    Parameters (4)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
  • D1(CuIndex: number, U: number, Pt: gp_Pnt2d, V1: gp_Vec2d): void

    returns the value of the point with a parameter U on the Bezier curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (4)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
  • D2(CuIndex: number, U: number, Pt: gp_Pnt, V1: gp_Vec, V2: gp_Vec): void

    returns the value of the point with a parameter U on the Bezier curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 3d.

    Parameters (5)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
    • V2
      Mutated in place; read the updated value from this argument after the call.
  • D2(CuIndex: number, U: number, Pt: gp_Pnt2d, V1: gp_Vec2d, V2: gp_Vec2d): void

    returns the value of the point with a parameter U on the Bezier curve number CuIndex. An exception is raised if CuIndex <0 or > NbCurves. An exception is raised if the curve dimension is 2d.

    Parameters (5)
    • CuIndex
    • U
    • Pt
      Mutated in place; read the updated value from this argument after the call.
    • V1
      Mutated in place; read the updated value from this argument after the call.
    • V2
      Mutated in place; read the updated value from this argument after the call.

AppParCurves_MultiPoint

This class describes Points composing a MultiPoint. These points can be 2D or 3D. The user must first give the 3D Points and then the 2D Points. They are Poles of a Bezier Curve. This class is used either to define data input or results when performing the approximation of several lines in parallel.

Constructors(5)

Instance methods(9)

  • SetPoint(Index: number, Point: gp_Pnt): void

    the 3d Point of range Index of this MultiPoint is set to <Point>. An exception is raised if Index < 0 or Index > number of 3d Points.

    Parameters (2)
    • Index
    • Point
  • Point(Index: number): gp_Pnt

    returns the 3d Point of range Index. An exception is raised if Index < 0 or Index < number of 3d Points.

    Parameters (1)
    • Index
  • SetPoint2d(Index: number, Point: gp_Pnt2d): void

    The 2d Point of range Index is set to <Point>. An exception is raised if Index > 3d Points or Index > total number of Points.

    Parameters (2)
    • Index
    • Point
  • Point2d(Index: number): gp_Pnt2d

    returns the 2d Point of range Index. An exception is raised if index <= number of 3d Points or Index > total number of Points.

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

    returns the dimension of the point of range Index. An exception is raised if Index <0 or Index > NbCurves.

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

    returns the number of points of dimension 3D.

  • NbPoints2d(): number

    returns the number of points of dimension 2D.

  • Transform(CuIndex: number, x: number, dx: number, y: number, dy: number, z: number, dz: number): void

    Applies a transformation to the curve of range <CuIndex>. newx = x + dxoldx newy = y + dyoldy for all points of the curve. newz = z + dz*oldz.

    Parameters (7)
    • CuIndex
    • x
    • dx
    • y
    • dy
    • z
    • dz
  • Transform2d(CuIndex: number, x: number, dx: number, y: number, dy: number): void

    Applies a transformation to the Curve of range <CuIndex>. newx = x + dxoldx newy = y + dyoldy for all points of the curve.

    Parameters (5)
    • CuIndex
    • x
    • dx
    • y
    • dy