OCC.Core.VrmlConverter module

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

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class VrmlConverter_Curve

Bases: object

static Add()
  • adds to the OStream the drawing of the curve aCurve. The aspect is defined by LineAspect in aDrawer.
    param aCurve

    type aCurve

    Adaptor3d_Curve

    param aDrawer

    type aDrawer

    VrmlConverter_Drawer

    param anOStream

    type anOStream

    Standard_OStream

    rtype

    void* adds to the OStream the drawing of the curve aCurve. The aspect is defined by LineAspect in aDrawer. The drawing will be limited between the points of parameter U1 and U2.

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param U1

    type U1

    float

    param U2

    type U2

    float

    param aDrawer

    type aDrawer

    VrmlConverter_Drawer

    param anOStream

    type anOStream

    Standard_OStream

    rtype

    void* adds to the OStream the drawing of the curve aCurve. The aspect is the current aspect. The drawing will be limited between the points of parameter U1 and U2. aNbPoints defines number of points on one interval.

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param U1

    type U1

    float

    param U2

    type U2

    float

    param anOStream

    type anOStream

    Standard_OStream

    param aNbPoints

    type aNbPoints

    int

    rtype

    void

property thisown

The membership flag

class VrmlConverter_DeflectionCurve

Bases: object

static Add()
  • adds to the OStream the drawing of the curve aCurve with respect to the maximal chordial deviation defined by the drawer aDrawer. The aspect is defined by LineAspect in aDrawer.
    param anOStream

    type anOStream

    Standard_OStream

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param aDrawer

    type aDrawer

    VrmlConverter_Drawer

    rtype

    void* adds to the OStream the drawing of the curve aCurve with respect to the maximal chordial deviation defined by the drawer aDrawer. The aspect is defined by LineAspect in aDrawer. The drawing will be limited between the points of parameter U1 and U2.

    param anOStream

    type anOStream

    Standard_OStream

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param U1

    type U1

    float

    param U2

    type U2

    float

    param aDrawer

    type aDrawer

    VrmlConverter_Drawer

    rtype

    void* adds to the OStream the drawing of the curve aCurve with respect to the maximal chordial deviation aDeflection. The aspect is the current aspect

    param anOStream

    type anOStream

    Standard_OStream

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param aDeflection

    type aDeflection

    float

    param aLimit

    type aLimit

    float

    rtype

    void* adds to the OStream the drawing of the curve aCurve with respect to the maximal chordial deviation aDeflection. The aspect is the current aspect

    param anOStream

    type anOStream

    Standard_OStream

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param aDeflection

    type aDeflection

    float

    param aDrawer

    type aDrawer

    VrmlConverter_Drawer

    rtype

    void* adds to the OStream the drawing of the curve aCurve with respect to the maximal chordial deviation aDeflection. The aspect is the current aspect The drawing will be limited between the points of parameter U1 and U2.

    param anOStream

    type anOStream

    Standard_OStream

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param U1

    type U1

    float

    param U2

    type U2

    float

    param aDeflection

    type aDeflection

    float

    rtype

    void* adds to the OStream the drawing of the curve aCurve with the array of parameters to retrieve points on curve.

    param anOStream

    type anOStream

    Standard_OStream

    param aCurve

    type aCurve

    Adaptor3d_Curve

    param aParams

    type aParams

    TColStd_HArray1OfReal

    param aNbNodes

    type aNbNodes

    int

    param aDrawer

    type aDrawer

    VrmlConverter_Drawer

    rtype

    void

property thisown

The membership flag

class VrmlConverter_Drawer(*args)

Bases: OCC.Core.Standard.Standard_Transient

Return type

None

DeviationCoefficient()
Return type

float

DisableDrawHiddenLine()
  • sets DrawHiddenLine = Standard_False - the hidden lines are not drawn.
    rtype

    None

Discretisation()
Return type

int

static DownCast(t)
DrawHiddenLine()
  • returns Standard_True if the hidden lines are to be drawn. By default the hidden lines are not drawn.
    rtype

    bool

EnableDrawHiddenLine()
  • sets DrawHiddenLine = Standard_True - the hidden lines are drawn.
    rtype

    None

FreeBoundaryAspect()
  • The default values are the same default values from Vrml package. These attributes are used by the following algorithms: VrmlConverter_WFShape VrmlConverter_WFDeflectionShape
    rtype

    opencascade::handle<VrmlConverter_LineAspect>

FreeBoundaryDraw()
  • returns True if the drawing of the free boundaries is enabled.
    rtype

    bool

HiddenLineAspect()
  • returns LineAspect for the hidden lines. The default values are the same default values from Vrml package.
    rtype

    opencascade::handle<VrmlConverter_LineAspect>

IsoOnPlane()
  • returns True if the drawing of isos on planes is enabled.
    rtype

    bool

LineAspect()
  • The default values are the same default values from Vrml package.
    rtype

    opencascade::handle<VrmlConverter_LineAspect>

MaximalChordialDeviation()
  • returns the maximal chordial deviation. Default value: 0.1
    rtype

    float

MaximalParameterValue()
Return type

float

PointAspect()
Return type

opencascade::handle<VrmlConverter_PointAspect>

SeenLineAspect()
  • returns LineAspect for the seen lines. The default values are the same default values from Vrml package.
    rtype

    opencascade::handle<VrmlConverter_LineAspect>

SetDeviationCoefficient()
  • default 0.001
    param aCoefficient

    type aCoefficient

    float

    rtype

    None

SetDiscretisation()
  • default: 17 points. Defines the Discretisation (myNbPoints) when drawing any curve; If this value is one of the obvious parameters of methods, current value from Drawer won’t be used. This value is used by: //! VrmlConverter_Curve VrmlConverter_WFRestrictedFace VrmlConverter_WFShape
    param d

    type d

    int

    rtype

    None

SetFreeBoundaryAspect()
Parameters

anAspect

type anAspect

VrmlConverter_LineAspect

rtype

None

SetFreeBoundaryDraw()
  • enables the drawing the free boundaries By default the free boundaries are drawn.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetHiddenLineAspect()
  • sets LineAspect for the hidden lines.
    param anAspect

    type anAspect

    VrmlConverter_LineAspect

    rtype

    None

SetIsoOnPlane()
  • enables the drawing of isos on planes. By default there are no isos on planes.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetLineAspect()
Parameters

anAspect

type anAspect

VrmlConverter_LineAspect

rtype

None

SetMaximalChordialDeviation()
  • Defines the maximal chordial deviation when drawing any curve; If this value is one of the obvious parameters of methods, current value from Drawer won’t be used. This value is used by: //! VrmlConverter_DeflectionCurve VrmlConverter_WFDeflectionRestrictedFace VrmlConverter_WFDeflectionShape
    param aChordialDeviation

    type aChordialDeviation

    float

    rtype

    None

SetMaximalParameterValue()
  • defines the maximum value allowed for the first and last parameters of an infinite curve. Default value: 500. VrmlConverter_Curve VrmlConverter_WFRestrictedFace VrmlConverter_WFShape
    param Value

    type Value

    float

    rtype

    None

SetPointAspect()
Parameters

anAspect

type anAspect

VrmlConverter_PointAspect

rtype

None

SetSeenLineAspect()
  • sets LineAspect for the seen lines.
    param anAspect

    type anAspect

    VrmlConverter_LineAspect

    rtype

    None

SetShadingAspect()
Parameters

anAspect

type anAspect

VrmlConverter_ShadingAspect

rtype

None

SetTypeOfDeflection()
  • by default: TOD_Relative; however, except for the shapes, the drawing will be made using the absolute deviation.
    param aTypeOfDeflection

    type aTypeOfDeflection

    Aspect_TypeOfDeflection

    rtype

    None

SetUIsoAspect()
Parameters

anAspect

type anAspect

VrmlConverter_IsoAspect

rtype

None

SetUnFreeBoundaryAspect()
Parameters

anAspect

type anAspect

VrmlConverter_LineAspect

rtype

None

SetUnFreeBoundaryDraw()
  • enables the drawing the unfree boundaries By default the unfree boundaries are drawn.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetVIsoAspect()
Parameters

anAspect

type anAspect

VrmlConverter_IsoAspect

rtype

None

SetWireAspect()
Parameters

anAspect

type anAspect

VrmlConverter_LineAspect

rtype

None

SetWireDraw()
  • enables the drawing the wire By default the wire are drawn.
    param OnOff

    type OnOff

    bool

    rtype

    None

ShadingAspect()
  • The default values are the same default values from Vrml package.
    rtype

    opencascade::handle<VrmlConverter_ShadingAspect>

TypeOfDeflection()
Return type

Aspect_TypeOfDeflection

UIsoAspect()
  • Defines the attributes which are used when drawing an U isoparametric curve of a face. Defines the number of U isoparametric curves to be drawn for a single face. The default values are the same default values from Vrml package. //! These attributes are used by the following algorithms: VrmlConverter_WFRestrictedFace VrmlConverter_WFDeflectionRestrictedFace
    rtype

    opencascade::handle<VrmlConverter_IsoAspect>

UnFreeBoundaryAspect()
  • The default values are the same default values from Vrml package. These attributes are used by the following algorithms: VrmlConverter_WFShape VrmlConverter_WFDeflectionShape
    rtype

    opencascade::handle<VrmlConverter_LineAspect>

UnFreeBoundaryDraw()
  • returns True if the drawing of the unfree boundaries is enabled.
    rtype

    bool

VIsoAspect()
  • Defines the attributes which are used when drawing an V isoparametric curve of a face. Defines the number of V isoparametric curves to be drawn for a single face. The default values are the same default values from Vrml package. //! These attributes are used by the following algorithms: VrmlConverter_WFRestrictedFace VrmlConverter_WFDeflectionRestrictedFace
    rtype

    opencascade::handle<VrmlConverter_IsoAspect>

WireAspect()
  • The default values are the same default values from Vrml package. These attributes are used by the following algorithms: VrmlConverter_WFShape VrmlConverter_WFDeflectionShape
    rtype

    opencascade::handle<VrmlConverter_LineAspect>

WireDraw()
  • returns True if the drawing of the wire is enabled.
    rtype

    bool

property thisown

The membership flag

class VrmlConverter_HLRShape

Bases: object

static Add()
Parameters

anOStream

type anOStream

Standard_OStream

param aShape

type aShape

TopoDS_Shape

param aDrawer

type aDrawer

VrmlConverter_Drawer

param aProjector

type aProjector

VrmlConverter_Projector

rtype

void

property thisown

The membership flag

class VrmlConverter_IsoAspect(*args)

Bases: OCC.Core.VrmlConverter.VrmlConverter_LineAspect

  • create a default IsoAspect. Default value: myNumber - 10.
    rtype

    None:param aMaterial:

    type aMaterial

    Vrml_Material

    param OnOff

    type OnOff

    bool

    param aNumber

    type aNumber

    int

    rtype

    None

static DownCast(t)
Number()
  • returns the number of U or V isoparametric curves drawn for a single face.
    rtype

    int

SetNumber()
Parameters

aNumber

type aNumber

int

rtype

None

property thisown

The membership flag

class VrmlConverter_LineAspect(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • create a default LineAspect. Default value: HasMaterial = False - a line hasn’t own material (color)
    rtype

    None:param aMaterial:

    type aMaterial

    Vrml_Material

    param OnOff

    type OnOff

    bool

    rtype

    None

static DownCast(t)
HasMaterial()
  • returns True if the materials is writing into OStream.
    rtype

    bool

Material()
Return type

opencascade::handle<Vrml_Material>

SetHasMaterial()
  • defines the necessary of writing own Material from Vrml into output OStream. By default False - the material is not writing into OStream, True - the material is writing.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetMaterial()
Parameters

aMaterial

type aMaterial

Vrml_Material

rtype

None

property thisown

The membership flag

class VrmlConverter_PointAspect(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • create a default PointAspect. Default value: HasMaterial = False - a line hasn’t own material (color)
    rtype

    None:param aMaterial:

    type aMaterial

    Vrml_Material

    param OnOff

    type OnOff

    bool

    rtype

    None

static DownCast(t)
HasMaterial()
  • returns True if the materials is writing into OStream.
    rtype

    bool

Material()
Return type

opencascade::handle<Vrml_Material>

SetHasMaterial()
  • defines the necessary of writing own Material from Vrml into output OStream. By default False - the material is not writing into OStream, True - the material is writing.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetMaterial()
Parameters

aMaterial

type aMaterial

Vrml_Material

rtype

None

property thisown

The membership flag

class VrmlConverter_Projector(*args)

Bases: OCC.Core.Standard.Standard_Transient

Parameters

Shapes

type Shapes

TopTools_Array1OfShape

param Focus

type Focus

float

param DX

type DX

float

param DY

type DY

float

param DZ

type DZ

float

param XUp

type XUp

float

param YUp

type YUp

float

param ZUp

type ZUp

float

param Camera

default value is VrmlConverter_NoCamera

type Camera

VrmlConverter_TypeOfCamera

param Light

default value is VrmlConverter_NoLight

type Light

VrmlConverter_TypeOfLight

rtype

None

AddToString(VrmlConverter_Projector self) → std::string
Camera()
Return type

VrmlConverter_TypeOfCamera

static DownCast(t)
Light()
Return type

VrmlConverter_TypeOfLight

Projector()
Return type

HLRAlgo_Projector

SetCamera()
Parameters

aCamera

type aCamera

VrmlConverter_TypeOfCamera

rtype

None

SetLight()
Parameters

aLight

type aLight

VrmlConverter_TypeOfLight

rtype

None

property thisown

The membership flag

class VrmlConverter_ShadedShape

Bases: object

static Add()
Parameters

anOStream

type anOStream

Standard_OStream

param aShape

type aShape

TopoDS_Shape

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

static ComputeNormal()
Parameters

aFace

type aFace

TopoDS_Face

param pc

type pc

Poly_Connect

param Nor

type Nor

TColgp_Array1OfDir

rtype

void

property thisown

The membership flag

class VrmlConverter_ShadingAspect(*args)

Bases: OCC.Core.Standard.Standard_Transient

  • create a default ShadingAspect.
    rtype

    None

static DownCast(t)
FrontMaterial()
Return type

opencascade::handle<Vrml_Material>

HasMaterial()
  • returns True if the materials is writing into OStream.
    rtype

    bool

HasNormals()
  • returns True if the normals are calculating
    rtype

    bool

SetFrontMaterial()
Parameters

aMaterial

type aMaterial

Vrml_Material

rtype

None

SetHasMaterial()
  • defines necessary of writing Material from Vrml into output OStream. By default False - the material is not writing into OStream, True - the material is writing.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetHasNormals()
  • defines necessary of a calculation of normals for ShadedShape to more accurately display curved surfaces, pacticularly when smoooth or phong shading is used in VRML viewer. By default False - the normals are not calculated, True - the normals are calculated. Warning: If normals are calculated the resulting VRML file will be substantially lager.
    param OnOff

    type OnOff

    bool

    rtype

    None

SetShapeHints()
Parameters

aShapeHints

type aShapeHints

Vrml_ShapeHints

rtype

None

ShapeHints()
Return type

Vrml_ShapeHints

property thisown

The membership flag

class VrmlConverter_WFDeflectionRestrictedFace

Bases: object

static Add()
Parameters

anOStream

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void:param anOStream:

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param DrawUIso

type DrawUIso

bool

param DrawVIso

type DrawVIso

bool

param Deflection

type Deflection

float

param NBUiso

type NBUiso

int

param NBViso

type NBViso

int

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

static AddUIso()
Parameters

anOStream

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

static AddVIso()
Parameters

anOStream

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

property thisown

The membership flag

class VrmlConverter_WFDeflectionShape

Bases: object

static Add()
Parameters

anOStream

type anOStream

Standard_OStream

param aShape

type aShape

TopoDS_Shape

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

property thisown

The membership flag

class VrmlConverter_WFRestrictedFace

Bases: object

static Add()
Parameters

anOStream

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void:param anOStream:

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param DrawUIso

type DrawUIso

bool

param DrawVIso

type DrawVIso

bool

param NBUiso

type NBUiso

int

param NBViso

type NBViso

int

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

static AddUIso()
Parameters

anOStream

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

static AddVIso()
Parameters

anOStream

type anOStream

Standard_OStream

param aFace

type aFace

BRepAdaptor_HSurface

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

property thisown

The membership flag

class VrmlConverter_WFShape

Bases: object

static Add()
Parameters

anOStream

type anOStream

Standard_OStream

param aShape

type aShape

TopoDS_Shape

param aDrawer

type aDrawer

VrmlConverter_Drawer

rtype

void

property thisown

The membership flag