CSPrimPolyhedronReader
- class CSXCAD.CSPrimitives.CSPrimPolyhedronReader
Bases:
CSXCAD.CSPrimitives.CSPrimPolyhedron
Polyhedron Reader
This primitives creates a polyhedron by reading a STL or PLY file.
- Parameters
- filenamestr
File name to read
- GetFileType()
Get the file type. 1 –> STL-File, 2 –> PLY, 0 –> other/unknown
- Return t
int – File type (see above)
- GetFilename()
Get the file name.
- Returns fn
str – File name to read
- ReadFile()
Issue to read the file.
- Return succ
bool – True on successful read
- SetFileType(t)
Set the file type. 1 –> STL-File, 2 –> PLY, 0 –> other/unknown
- Parameters
t – int – File type (see above)
- SetFilename(fn)
Set the file name to read. This will try set the propper file type as well.
- Parameters
fn – str – File name to read