OCC.StlAPI module

-Purpose : Offers the API for STL data manipulation.

class StlAPI_Reader(*args)

Bases: object

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

None

thisown

The membership flag

class StlAPI_Writer(*args)

Bases: object

  • Creates a writer object with default parameters: ASCIIMode.
Return type:None
GetASCIIMode()

StlAPI_Writer_GetASCIIMode(StlAPI_Writer self) -> Standard_Boolean

SetASCIIMode()

StlAPI_Writer_SetASCIIMode(StlAPI_Writer self, Standard_Boolean value)

Write()
  • Converts a given shape to STL format and writes it to file with a given filename. eturn the error state.
Parameters:
  • aShape (TopoDS_Shape &) –
  • aFileName (char *) –
Return type:

StlAPI_ErrorStatus

thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
new_instancemethod(func, inst, cls)
register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases

class stlapi

Bases: object

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

void

static Write()
  • 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:

StlAPI_ErrorStatus

thisown

The membership flag

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

void

stlapi_Write()
  • 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:

StlAPI_ErrorStatus