OCC.Extend.DataExchange module¶
-
read_iges_file
(filename, return_as_shapes=False, verbosity=False, visible_only=False)¶ read the IGES file and returns a compound filename: the file path return_as_shapes: optional, False by default. If True returns a list of shapes,
else returns a single compound
verbosity: optionl, False by default.
-
read_step_file
(filename, return_as_shapes=False, verbosity=True)¶ read the STEP file and returns a compound filename: the file path return_as_shapes: optional, False by default. If True returns a list of shapes,
else returns a single compound
verbosity: optional, False by default.
-
read_step_file_with_names_colors
(filename)¶ Returns list of tuples (topods_shape, label, color) Use OCAF.
-
read_stl_file
(filename)¶ opens a stl file, reads the content, and returns a BRep topods_shape object
-
write_iges_file
(a_shape, filename)¶ exports a shape to a STEP file a_shape: the topods_shape to export (a compound, a solid etc.) filename: the filename application protocol: “AP203” or “AP214”
-
write_step_file
(a_shape, filename, application_protocol='AP203')¶ exports a shape to a STEP file a_shape: the topods_shape to export (a compound, a solid etc.) filename: the filename application protocol: “AP203” or “AP214”
-
write_stl_file
(a_shape, filename, mode='ascii', linear_deflection=0.9, angular_deflection=0.5)¶ export the shape to a STL file Be careful, the shape first need to be explicitely meshed using BRepMesh_IncrementalMesh a_shape: the topods_shape to export filename: the filename mode: optional, “ascii” by default. Can either be “binary” linear_deflection: optional, default to 0.001. Lower, more occurate mesh angular_deflection: optional, default to 0.5. Lower, more accurate_mesh