OCC.StlAPI module

class OCC.StlAPI.StlAPI_Reader

Bases: object

Read()
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFileName (char *) –
Return type:

None

thisown

The membership flag

class OCC.StlAPI.StlAPI_Writer

Bases: object

GetASCIIMode()

StlAPI_Writer_GetASCIIMode(StlAPI_Writer self) -> Standard_Boolean

GetRelativeMode()

StlAPI_Writer_GetRelativeMode(StlAPI_Writer self) -> Standard_Boolean

SetASCIIMode()

StlAPI_Writer_SetASCIIMode(StlAPI_Writer self, Standard_Boolean value)

SetCoefficient()
  • Sets the coeffiecient for computation of deflection through relative size of shape. Default value = 0.001
Parameters:aCoefficient (float) –
Return type:None
SetDeflection()
  • Sets the deflection of the meshing algorithm. Deflection is used, only if relative mode is false
Parameters:aDeflection (float) –
Return type:None
SetRelativeMode()

StlAPI_Writer_SetRelativeMode(StlAPI_Writer self, Standard_Boolean value)

Write()
  • Converts a given shape to STL format and writes it to file with a given filename.
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFileName (char *) –
  • InParallel (bool) – default value is Standard_False
Return type:

None

  • Converts a given shape to STL format and writes it to file with a given filename.
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFileName (char *) –
  • InParallel (bool) – default value is Standard_False
Return type:

None

thisown

The membership flag

class OCC.StlAPI.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class OCC.StlAPI.stlapi(*args, **kwargs)

Bases: object

static Read(*args)
  • Create a shape from a STL format.
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFile (char *) –
Return type:

void

static Write(*args)
  • Convert and write shape to STL format. file is written in binary if aAsciiMode is False otherwise it is written in Ascii (by default)
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFile (char *) –
  • aAsciiMode (bool) – default value is Standard_True
Return type:

void

  • Convert and write shape to STL format. file is written in binary if aAsciiMode is False otherwise it is written in Ascii (by default)
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFile (char *) –
  • aAsciiMode (bool) – default value is Standard_True
Return type:

void

thisown

The membership flag

OCC.StlAPI.stlapi_Read(*args)
  • Create a shape from a STL format.
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFile (char *) –
Return type:

void

OCC.StlAPI.stlapi_Write(*args)
  • Convert and write shape to STL format. file is written in binary if aAsciiMode is False otherwise it is written in Ascii (by default)
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFile (char *) –
  • aAsciiMode (bool) – default value is Standard_True
Return type:

void

  • Convert and write shape to STL format. file is written in binary if aAsciiMode is False otherwise it is written in Ascii (by default)
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFile (char *) –
  • aAsciiMode (bool) – default value is Standard_True
Return type:

void