OCC.Core.StlAPI module¶
StlAPI module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_stlapi.html
-
class
StlAPI_Reader(*args, **kwargs)¶ Bases:
object-
Read()¶ - Reads STL file to the TopoDS_Shape (each triangle is converted to the face). returns True if reading is successful
- param theShape
- type theShape
TopoDS_Shape &
- param theFileName
- type theFileName
char *
- rtype
bool
-
property
thisown¶ The membership flag
-
-
class
StlAPI_Writer(*args)¶ Bases:
object- Creates a writer object with default parameters: ASCIIMode.
- rtype
None
-
GetASCIIMode(StlAPI_Writer self) → Standard_Boolean¶
-
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.
- param theShape
- type theShape
TopoDS_Shape &
- param theFileName
- type theFileName
char *
- rtype
bool
-
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()¶
-
-
class
stlapi¶ Bases:
object-
static
Read()¶ - Legacy interface. Read STL file and create a shape composed of triangular faces, one per facet. This approach is very inefficient, especially for large files. Consider reading STL file to Poly_Triangulation object instead (see class RWStl).
- param theShape
- type theShape
TopoDS_Shape &
- param aFile
- type aFile
char *
- rtype
bool
-
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).
- param theShape
- type theShape
TopoDS_Shape &
- param theFile
- type theFile
char *
- param theAsciiMode
default value is Standard_True
- type theAsciiMode
bool
- rtype
bool
-
property
thisown¶ The membership flag
-
static