Blender
V3.3
|
Classes | |
class | StringBuffer |
struct | STLBinaryTriangle |
class | Triangle |
class | STLMeshHelper |
Functions | |
void | stl_import_report_error (FILE *file) |
void | importer_main (bContext *C, const STLImportParams &import_params) |
void | importer_main (Main *bmain, Scene *scene, ViewLayer *view_layer, const STLImportParams &import_params) |
static void | parse_float3 (StringBuffer &buf, float out[3]) |
Mesh * | read_stl_ascii (const char *filepath, Main *bmain, char *mesh_name, bool use_custom_normals) |
Mesh * | read_stl_binary (FILE *file, Main *bmain, char *mesh_name, bool use_custom_normals) |
Variables | |
const size_t | BINARY_HEADER_SIZE = 80 |
const size_t | BINARY_STRIDE = 12 * 4 + 2 |
ASCII STL spec:
solid name facet normal ni nj nk outer loop vertex v1x v1y v1z vertex v2x v2y v2z vertex v3x v3y v3z endloop endfacet ... endsolid name
void blender::io::stl::importer_main | ( | bContext * | C, |
const STLImportParams & | import_params | ||
) |
Definition at line 43 of file stl_import.cc.
References C, CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), and scene.
Referenced by STL_import().
void blender::io::stl::importer_main | ( | Main * | bmain, |
Scene * | scene, | ||
ViewLayer * | view_layer, | ||
const STLImportParams & | import_params | ||
) |
Definition at line 51 of file stl_import.cc.
References BINARY_HEADER_SIZE, BINARY_STRIDE, BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_mesh_assign_object(), BKE_mesh_validate(), BKE_object_add_only_object(), BKE_object_apply_mat4(), BKE_view_layer_base_deselect_all(), BKE_view_layer_base_find(), BKE_view_layer_base_select_and_set_active(), BLI_file_size(), BLI_fopen(), BLI_path_basename(), BLI_path_extension_replace(), BLI_SCOPED_DEFER, BLI_strncpy(), LayerCollection::collection, copy_m4_m3(), DEG_id_tag_update(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), file, FILE_MAX, STLImportParams::filepath, STLImportParams::forward_axis, STLImportParams::global_scale, Collection::id, Object::id, Scene::id, ID_RECALC_ANIMATION, ID_RECALC_BASE_FLAGS, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, IO_AXIS_Y, IO_AXIS_Z, mat3_from_axis_conversion(), mesh, OB_MESH, read_stl_ascii(), read_stl_binary(), rescale_m4(), UnitSettings::scale_length, scene, stl_import_report_error(), UnitSettings::system, Scene::unit, unit_m3(), unit_m4(), STLImportParams::up_axis, STLImportParams::use_facet_normal, STLImportParams::use_mesh_validate, STLImportParams::use_scene_unit, and USER_UNIT_NONE.
|
inlinestatic |
Definition at line 107 of file stl_import_ascii_reader.cc.
References usdtokens::out(), and blender::io::stl::StringBuffer::parse_float().
Referenced by read_stl_ascii().
Mesh * blender::io::stl::read_stl_ascii | ( | const char * | filepath, |
Main * | bmain, | ||
char * | mesh_name, | ||
bool | use_custom_normals | ||
) |
Definition at line 114 of file stl_import_ascii_reader.cc.
References blender::io::stl::STLMeshHelper::add_triangle(), BKE_mesh_add(), BLI_file_read_text_as_mem(), BLI_SCOPED_DEFER, buffer, blender::io::stl::StringBuffer::drop_line(), blender::io::stl::StringBuffer::drop_token(), blender::io::stl::StringBuffer::is_empty(), MEM_freeN, parse_float3(), blender::io::stl::StringBuffer::parse_token(), and blender::io::stl::STLMeshHelper::to_mesh().
Referenced by importer_main().
Mesh * blender::io::stl::read_stl_binary | ( | FILE * | file, |
Main * | bmain, | ||
char * | mesh_name, | ||
bool | use_custom_normals | ||
) |
Definition at line 32 of file stl_import_binary_reader.cc.
References blender::io::stl::STLMeshHelper::add_triangle(), BINARY_HEADER_SIZE, BKE_mesh_add(), blender::io::obj::chunk_size, blender::Array< T, InlineBufferCapacity, Allocator >::data(), file, normal, stl_import_report_error(), blender::io::stl::STLMeshHelper::to_mesh(), v1, and v2.
Referenced by importer_main().
void blender::io::stl::stl_import_report_error | ( | FILE * | file | ) |
Definition at line 32 of file stl_import.cc.
References file.
Referenced by importer_main(), and read_stl_binary().
const size_t blender::io::stl::BINARY_HEADER_SIZE = 80 |
Definition at line 26 of file stl_import_binary_reader.hh.
Referenced by importer_main(), and read_stl_binary().
const size_t blender::io::stl::BINARY_STRIDE = 12 * 4 + 2 |
Definition at line 27 of file stl_import_binary_reader.hh.
Referenced by importer_main().