OpenCascade.js
API ReferenceDataExchangeTKDEIGES

IGESConvGeom

OCCT package IGESConvGeom: IGESConvGeom, IGESConvGeom_GeomBuilder.

IGESConvGeom

This package is intended to gather geometric conversion which are not immediate but can be used for several purposes : mainly, standard conversion to and from CasCade geometric and topologic data, and adaptations of IGES files as required (as replacing Spline entities to BSpline equivalents).

Constructors(1)

Static methods(5)

  • SplineCurveFromIGES(igesent: IGESGeom_SplineCurve, epscoef: number, epsgeom: number): { returnValue: number; result: Geom_BSplineCurve; [Symbol.dispose](): void }

    basic tool to build curves from IGESGeom (arrays of points, Transformations, evaluation of points in a datum) Converts a SplineCurve from IGES to a BSplineCurve from CasCade <epscoef> gives tolerance to consider coefficient to be nul <epsgeom> gives tolerance to consider poles to be equal The returned value is a status with these possible values :

    • 0 OK, done
    • 1 the result is not guaranteed to be C0 (with <epsgeom>)
    • 2 SplineType not processed (allowed : max 3) (no result produced)
    • 3 error during creation of control points (no result produced)
    • 4 polynomial equation is not correct (no result produced)
    • 5 less than one segment (no result produced)
    Parameters (3)
    • igesent
    • epscoef
    • epsgeom
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • result: owned by the returned envelope.
      Dispose the returned envelope to release owned Handle fields.
  • IncreaseCurveContinuity(curve: Geom_BSplineCurve, epsgeom: number, continuity: number): number

    Tries to increase curve continuity with tolerance <epsgeom> <continuity> is the new desired continuity, can be 1 or 2 (more than 2 is considered as 2). Returns the new maximum continuity obtained on all knots. Remark that, for instance with <continuity> = 2, even if not all the knots can be passed to C2, all knots which can be are.

    Parameters (3)
    • curve
    • epsgeom
    • continuity
  • IncreaseCurveContinuity(curve: Geom2d_BSplineCurve, epsgeom: number, continuity: number): number
    Parameters (3)
    • curve
    • epsgeom
    • continuity
  • SplineSurfaceFromIGES(igesent: IGESGeom_SplineSurface, epscoef: number, epsgeom: number): { returnValue: number; result: Geom_BSplineSurface; [Symbol.dispose](): void }

    Converts a SplineSurface from IGES to a BSplineSurface from CasCade <epscoef> gives tolerance to consider coefficient to be nul <epsgeom> gives tolerance to consider poles to be equal The returned value is a status with these possible values :

    • 0 OK, done
    • 1 the result is not guaranteed to be C0 (with <epsgeom>)
    • 2 degree is not compatible with code boundary type (warning) but C0 is OK
    • 3 idem but C0 is not guaranteed (warning)
    • 4 degree has been determined to be nul, either in U or V (no result produced)
    • 5 less than one segment in U or V (no result produced)
    Parameters (3)
    • igesent
    • epscoef
    • epsgeom
    Returns

    A result object with fields:

    • returnValue: the C++ return value
    • result: owned by the returned envelope.
      Dispose the returned envelope to release owned Handle fields.
  • IncreaseSurfaceContinuity(surface: Geom_BSplineSurface, epsgeom: number, continuity?: number): number

    Tries to increase Surface continuity with tolerance <epsgeom> <continuity> is the new desired continuity, can be 1 or 2 (more than 2 is considered as 2). Returns the new maximum continuity obtained on all knots. Remark that, for instance with <continuity> = 2, even if not all the knots can be passed to C2, all knots which can be are.

    Parameters (3)
    • surface
    • epsgeom
    • continuity

IGESConvGeom_GeomBuilder

This class provides some useful basic tools to build IGESGeom curves, especially : define a curve in a plane in 3D space (ex. Circular or Conic arc, or Copious Data defined in 2D) make a CopiousData from a list of points/vectors.

Constructors(1)

Instance methods(17)

  • Clear(): void

    Clears list of Points/Vectors and data about Transformation.

  • AddXY(val: gp_XY): void

    Adds a XY (Z=0) to the list of points.

    Parameters (1)
    • val
  • AddXYZ(val: gp_XYZ): void

    Adds a XYZ to the list of points.

    Parameters (1)
    • val
  • AddVec(val: gp_XYZ): void

    Adds a Vector part to the list of points. It will be used for CopiousData, datatype=3, only. AddXY and AddXYZ consider a null vector part (0,0,0) AddVec adds to the last added XY or XYZ.

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

    Returns the count of already recorded points.

  • Point(num: number): gp_XYZ

    Returns a point given its rank (if added as XY, Z will be 0).

    Parameters (1)
    • num
  • MakeCopiousData(datatype: number, polyline?: boolean): IGESGeom_CopiousData

    Makes a CopiousData with the list of recorded Points/Vectors according to <datatype>, which must be 1,2 or 3 If <polyline> is given True, the CopiousData is coded as a Polyline, but <datatype> must not be 3 <datatype> = 1 : Common Z is computed as average of all Z <datatype> = 1 or 2 : Vectors are ignored.

    Parameters (2)
    • datatype
    • polyline
  • Returns the Position in which the method EvalXYZ will evaluate a XYZ. It can be regarded as defining a local system. It is initially set to Identity.

  • SetPosition(pos: gp_Trsf): void

    Sets final position from an already defined Trsf.

    Parameters (1)
    • pos
  • SetPosition(pos: gp_Ax3): void

    Sets final position from an Ax3.

    Parameters (1)
    • pos
  • SetPosition(pos: gp_Ax2): void

    Sets final position from an Ax2.

    Parameters (1)
    • pos
  • SetPosition(pos: gp_Ax1): void

    Sets final position from an Ax1 (this means that origin point and Z-axis are defined, the other axes are defined arbitrarily).

    Parameters (1)
    • pos
  • IsIdentity(): boolean

    Returns True if the Position is Identity.

  • IsTranslation(): boolean

    Returns True if the Position is a Translation only Remark : Identity and ZOnly will answer True.

  • IsZOnly(): boolean

    Returns True if the Position corresponds to a Z-Displacement, i.e. is a Translation only, and only on Z Remark : Identity will answer True.

  • EvalXYZ(val: gp_XYZ, X: number, Y: number, Z: number): { X: number; Y: number; Z: number }

    Evaluates a XYZ value in the Position already defined. Returns the transformed coordinates. For a 2D definition, X,Y will then be used to define a XY and Z will be regarded as a Z Displacement (can be ignored).

    Parameters (4)
    • val
    • X
    • Y
    • Z
    Returns

    A result object with fields:

    • X: updated value from the call.
    • Y: updated value from the call.
    • Z: updated value from the call.
  • Returns the IGES Transformation which corresponds to the Position. Even if it is an Identity : IsIdentity should be tested first. <unit> is the unit value in which the model is created : it is used to convert translation part.

    Parameters (1)
    • unit