OCC.Core.Adaptor2d module

Adaptor2d module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_adaptor2d.html

class Adaptor2d_Curve2d

Bases: object

BSpline()
Return type

opencascade::handle<Geom2d_BSplineCurve>

Bezier()
Return type

opencascade::handle<Geom2d_BezierCurve>

Circle()
Return type

gp_Circ2d

Continuity()
Return type

GeomAbs_Shape

D0()
  • Computes the point of parameter U on the curve.
    param U

    type U

    float

    param P

    type P

    gp_Pnt2d

    rtype

    void

D1()
  • Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1.
    param U

    type U

    float

    param P

    type P

    gp_Pnt2d

    param V

    type V

    gp_Vec2d

    rtype

    void

D2()
  • Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2.
    param U

    type U

    float

    param P

    type P

    gp_Pnt2d

    param V1

    type V1

    gp_Vec2d

    param V2

    type V2

    gp_Vec2d

    rtype

    void

D3()
  • Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3.
    param U

    type U

    float

    param P

    type P

    gp_Pnt2d

    param V1

    type V1

    gp_Vec2d

    param V2

    type V2

    gp_Vec2d

    param V3

    type V3

    gp_Vec2d

    rtype

    void

DN()
  • The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1.
    param U

    type U

    float

    param N

    type N

    int

    rtype

    gp_Vec2d

Degree()
Return type

int

Ellipse()
Return type

gp_Elips2d

FirstParameter()
Return type

float

GetType()
  • Returns the type of the curve in the current intervalLine, Circle, Ellipse, Hyperbola, Parabola, BezierCurve, BSplineCurve, OtherCurve.
    rtype

    GeomAbs_CurveType

Hyperbola()
Return type

gp_Hypr2d

Intervals()
  • Stores in <T> the parameters bounding the intervals of continuity <S>. //! The array must provide enough room to accomodate for the parameters. i.e. T.Length() > NbIntervals()
    param T

    type T

    TColStd_Array1OfReal

    param S

    type S

    GeomAbs_Shape

    rtype

    void

IsClosed()
Return type

bool

IsPeriodic()
Return type

bool

IsRational()
Return type

bool

LastParameter()
Return type

float

Line()
Return type

gp_Lin2d

NbIntervals()
  • If necessary, breaks the curve in intervals of continuity <S>. And returns the number of intervals.
    param S

    type S

    GeomAbs_Shape

    rtype

    int

NbKnots()
Return type

int

NbPoles()
Return type

int

NbSamples()
Return type

int

Parabola()
Return type

gp_Parab2d

Period()
Return type

float

Resolution()
  • Returns the parametric resolution corresponding to the real space resolution <R3d>.
    param R3d

    type R3d

    float

    rtype

    float

Trim()
  • Returns a curve equivalent of <self> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>
    param First

    type First

    float

    param Last

    type Last

    float

    param Tol

    type Tol

    float

    rtype

    opencascade::handle<Adaptor2d_HCurve2d>

Value()
  • Computes the point of parameter U on the curve.
    param U

    type U

    float

    rtype

    gp_Pnt2d

property thisown

The membership flag

class Adaptor2d_HCurve2d(*args, **kwargs)

Bases: OCC.Core.Standard.Standard_Transient

  • Empty constructor

Return type

None* Copy constructor – does nothing

Parameters

& (Standard_Transient) –

Return type

None

BSpline()
Return type

opencascade::handle<Geom2d_BSplineCurve>

Bezier()
Return type

opencascade::handle<Geom2d_BezierCurve>

Circle()
Return type

gp_Circ2d

Continuity()
Return type

GeomAbs_Shape

Curve2d()
  • Returns a reference to the Curve2d inside the HCurve2d.
    rtype

    Adaptor2d_Curve2d

D0()
Parameters

U

type U

float

param P

type P

gp_Pnt2d

rtype

None

D1()
Parameters

U

type U

float

param P

type P

gp_Pnt2d

param V

type V

gp_Vec2d

rtype

None

D2()
Parameters

U

type U

float

param P

type P

gp_Pnt2d

param V1

type V1

gp_Vec2d

param V2

type V2

gp_Vec2d

rtype

None

D3()
Parameters

U

type U

float

param P

type P

gp_Pnt2d

param V1

type V1

gp_Vec2d

param V2

type V2

gp_Vec2d

param V3

type V3

gp_Vec2d

rtype

None

DN()
Parameters

U

type U

float

param N

type N

int

rtype

gp_Vec2d

Degree()
Return type

int

static DownCast(t)
Ellipse()
Return type

gp_Elips2d

FirstParameter()
Return type

float

GetType()
Return type

GeomAbs_CurveType

Hyperbola()
Return type

gp_Hypr2d

Intervals()
Parameters

T

type T

TColStd_Array1OfReal

param S

type S

GeomAbs_Shape

rtype

None

IsClosed()
Return type

bool

IsPeriodic()
Return type

bool

IsRational()
Return type

bool

LastParameter()
Return type

float

Line()
Return type

gp_Lin2d

NbIntervals()
Parameters

S

type S

GeomAbs_Shape

rtype

int

NbKnots()
Return type

int

NbPoles()
Return type

int

Parabola()
Return type

gp_Parab2d

Period()
Return type

float

Resolution()
Parameters

R3d

type R3d

float

rtype

float

Trim()
  • If <First> >= <Last>
    param First

    type First

    float

    param Last

    type Last

    float

    param Tol

    type Tol

    float

    rtype

    opencascade::handle<Adaptor2d_HCurve2d>

Value()
Parameters

U

type U

float

rtype

gp_Pnt2d

property thisown

The membership flag

class Adaptor2d_HLine2d(*args)

Bases: OCC.Core.Adaptor2d.Adaptor2d_HCurve2d

  • Creates an empty GenHCurve2d.
    rtype

    None* Creates a GenHCurve2d from a Curve

    param C

    type C

    Adaptor2d_Line2d

    rtype

    None

ChangeCurve2d()
  • Returns the curve used to create the GenHCurve.
    rtype

    Adaptor2d_Line2d

static DownCast(t)
Set()
  • Sets the field of the GenHCurve2d.
    param C

    type C

    Adaptor2d_Line2d

    rtype

    None

property thisown

The membership flag

class Adaptor2d_HOffsetCurve(*args)

Bases: OCC.Core.Adaptor2d.Adaptor2d_HCurve2d

  • Creates an empty GenHCurve2d.
    rtype

    None* Creates a GenHCurve2d from a Curve

    param C

    type C

    Adaptor2d_OffsetCurve

    rtype

    None

ChangeCurve2d()
  • Returns the curve used to create the GenHCurve.
    rtype

    Adaptor2d_OffsetCurve

static DownCast(t)
Set()
  • Sets the field of the GenHCurve2d.
    param C

    type C

    Adaptor2d_OffsetCurve

    rtype

    None

property thisown

The membership flag

class Adaptor2d_Line2d(*args)

Bases: OCC.Core.Adaptor2d.Adaptor2d_Curve2d

Return type

None:param P: :type P: gp_Pnt2d :param D: :type D: gp_Dir2d :param UFirst: :type UFirst: float :param ULast: :type ULast: float :rtype: None

Load()
Parameters

L

type L

gp_Lin2d

rtype

None:param L:

type L

gp_Lin2d

param UFirst

type UFirst

float

param ULast

type ULast

float

rtype

None

property thisown

The membership flag

class Adaptor2d_OffsetCurve(*args)

Bases: OCC.Core.Adaptor2d.Adaptor2d_Curve2d

  • The Offset is set to 0.
    rtype

    None* The curve is loaded. The Offset is set to 0.

    param C

    type C

    Adaptor2d_HCurve2d

    rtype

    None* Creates an OffsetCurve curve. The Offset is set to Offset.

    param C

    type C

    Adaptor2d_HCurve2d

    param Offset

    type Offset

    float

    rtype

    None* Create an Offset curve. WFirst,WLast define the bounds of the Offset curve.

    param C

    type C

    Adaptor2d_HCurve2d

    param Offset

    type Offset

    float

    param WFirst

    type WFirst

    float

    param WLast

    type WLast

    float

    rtype

    None

Curve()
Return type

opencascade::handle<Adaptor2d_HCurve2d>

Load()
  • Changes the curve. The Offset is reset to 0.
    param S

    type S

    Adaptor2d_HCurve2d

    rtype

    None* Changes the Offset on the current Curve.

    param Offset

    type Offset

    float

    rtype

    None* Changes the Offset Curve on the current Curve.

    param Offset

    type Offset

    float

    param WFirst

    type WFirst

    float

    param WLast

    type WLast

    float

    rtype

    None

Offset()
Return type

float

property thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
property thisown

The membership flag

value()