|
Blender V4.3
|
Classes | |
| struct | Expectation |
| class | FileWriter |
| struct | PackedTriangle |
| class | stl_importer_test |
| class | STLExportTest |
| class | STLMeshHelper |
| class | StringBuffer |
| class | Triangle |
Functions | |
| void | export_frame (Depsgraph *depsgraph, float scene_unit_scale, const STLExportParams &export_params) |
| void | exporter_main (const bContext *C, const STLExportParams &export_params) |
| void | stl_import_report_error (FILE *file) |
| Mesh * | read_stl_file (const STLImportParams &import_params) |
| void | importer_main (const 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, float3 &out) |
| Mesh * | read_stl_ascii (const char *filepath, const bool use_custom_normals) |
| Mesh * | read_stl_binary (FILE *file, const bool use_custom_normals) |
| static std::string | read_temp_file_in_string (const std::string &file_path) |
| TEST_F (STLExportTest, all_tris) | |
| TEST_F (STLExportTest, all_quads) | |
| TEST_F (STLExportTest, non_uniform_scale) | |
| TEST_F (STLExportTest, cubes_positioned) | |
| TEST_F (stl_importer_test, all_quads) | |
| TEST_F (stl_importer_test, cubes_positioned) | |
| TEST_F (stl_importer_test, non_uniform_scale) | |
Variables | |
| constexpr size_t | BINARY_HEADER_SIZE = 80 |
| constexpr size_t | BINARY_STRIDE = sizeof(PackedTriangle) |
| constexpr bool | save_failing_test_output = false |
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::export_frame | ( | Depsgraph * | depsgraph, |
| float | scene_unit_scale, | ||
| const STLExportParams & | export_params ) |
Definition at line 40 of file stl_export.cc.
References STLExportParams::apply_modifiers, STLExportParams::ascii_format, BASE_SELECTED, BKE_mesh_wrapper_ensure_mdata(), BKE_object_get_evaluated_mesh(), BKE_object_get_pre_modified_mesh(), BKE_reportf(), BLI_path_basename(), BLI_path_extension_check(), BLI_path_extension_ensure(), BLI_path_make_safe_filename(), BLI_path_suffix(), BLI_strcasecmp(), BLI_string_replace_char(), DEG_get_evaluated_object(), DEG_ITER_OBJECT_FLAG_DUPLI, DEG_ITER_OBJECT_FLAG_LINKED_DIRECTLY, DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET, DEG_ITER_OBJECT_FLAG_VISIBLE, DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEGObjectIterSettings::depsgraph, depsgraph, STLExportParams::export_selected_objects, FILE_MAX, STLExportParams::filepath, STLExportParams::forward_axis, STLExportParams::global_scale, IO_AXIS_Y, IO_AXIS_Z, is_negative_m4(), mat3_from_axis_conversion(), mul_m4_m3m4(), mul_m4_v3(), mul_v3_m3v3(), blender::math::normal_tri(), OB_MESH, pos, STLExportParams::reports, RPT_ERROR, STRNCPY, unit_m3(), STLExportParams::up_axis, and STLExportParams::use_batch.
Referenced by blender::io::stl::STLExportTest::compare_to_golden(), and exporter_main().
| void blender::io::stl::exporter_main | ( | const bContext * | C, |
| const STLExportParams & | export_params ) |
Definition at line 155 of file stl_export.cc.
References BKE_libblock_find_name(), BKE_reportf(), BKE_scene_graph_evaluated_ensure(), STLExportParams::collection, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), DAG_EVAL_RENDER, DEG_graph_build_from_collection(), DEG_graph_free(), DEG_graph_new(), depsgraph, export_frame(), ID_GR, STLExportParams::reports, RPT_ERROR, STLExportParams::use_scene_unit, and USER_UNIT_NONE.
Referenced by STL_export().
| void blender::io::stl::importer_main | ( | const bContext * | C, |
| const STLImportParams & | import_params ) |
Definition at line 104 of file stl_import.cc.
References CTX_data_main(), CTX_data_scene(), CTX_data_view_layer(), and importer_main().
Referenced by blender::io::stl::stl_importer_test::import_and_check(), importer_main(), and STL_import().
| void blender::io::stl::importer_main | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| const STLImportParams & | import_params ) |
Definition at line 112 of file stl_import.cc.
References BKE_collection_object_add(), BKE_layer_collection_get_active(), BKE_mesh_add(), BKE_mesh_nomain_to_mesh(), 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(), BKE_view_layer_synced_ensure(), BLI_path_basename(), BLI_path_extension_strip(), LayerCollection::collection, copy_m4_m3(), Object::data, DEG_id_tag_update(), DEG_id_tag_update_ex(), DEG_relations_tag_update(), FILE_MAX, STLImportParams::filepath, STLImportParams::forward_axis, STLImportParams::global_scale, Collection::id, Object::id, ID_RECALC_ANIMATION, ID_RECALC_BASE_FLAGS, ID_RECALC_GEOMETRY, ID_RECALC_SYNC_TO_EVAL, ID_RECALC_TRANSFORM, IO_AXIS_Y, IO_AXIS_Z, mat3_from_axis_conversion(), OB_MESH, read_stl_file(), rescale_m4(), STRNCPY, unit_m3(), unit_m4(), STLImportParams::up_axis, STLImportParams::use_scene_unit, and USER_UNIT_NONE.
|
inlinestatic |
Definition at line 107 of file stl_import_ascii_reader.cc.
References blender::io::stl::StringBuffer::parse_float().
Referenced by read_stl_ascii().
| Mesh * blender::io::stl::read_stl_ascii | ( | const char * | filepath, |
| const bool | use_custom_normals ) |
Definition at line 114 of file stl_import_ascii_reader.cc.
References blender::io::stl::STLMeshHelper::add_triangle(), BLI_file_read_text_as_mem(), BLI_SCOPED_DEFER, 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 read_stl_file().
| Mesh * blender::io::stl::read_stl_binary | ( | FILE * | file, |
| const bool | use_custom_normals ) |
Definition at line 25 of file stl_import_binary_reader.cc.
References blender::io::stl::STLMeshHelper::add_triangle(), BINARY_HEADER_SIZE, BKE_mesh_new_nomain(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), stl_import_report_error(), and blender::io::stl::STLMeshHelper::to_mesh().
Referenced by read_stl_file().
| Mesh * blender::io::stl::read_stl_file | ( | const STLImportParams & | import_params | ) |
Definition at line 50 of file stl_import.cc.
References BINARY_HEADER_SIZE, BINARY_STRIDE, BKE_mesh_validate(), BKE_reportf(), BLI_file_size(), BLI_fopen(), BLI_SCOPED_DEFER, STLImportParams::filepath, mesh, read_stl_ascii(), read_stl_binary(), STLImportParams::reports, RPT_ERROR, stl_import_report_error(), STLImportParams::use_facet_normal, and STLImportParams::use_mesh_validate.
Referenced by importer_main(), and STL_import_mesh().
|
static |
Definition at line 27 of file stl_exporter_tests.cc.
References BLI_file_read_text_as_mem(), and MEM_freeN().
Referenced by blender::io::stl::STLExportTest::compare_to_golden().
| void blender::io::stl::stl_import_report_error | ( | FILE * | file | ) |
Definition at line 39 of file stl_import.cc.
Referenced by read_stl_binary(), and read_stl_file().
| blender::io::stl::TEST_F | ( | stl_importer_test | , |
| all_quads | ) |
Definition at line 110 of file stl_importer_tests.cc.
| blender::io::stl::TEST_F | ( | stl_importer_test | , |
| cubes_positioned | ) |
Definition at line 116 of file stl_importer_tests.cc.
| blender::io::stl::TEST_F | ( | stl_importer_test | , |
| non_uniform_scale | ) |
Definition at line 122 of file stl_importer_tests.cc.
| blender::io::stl::TEST_F | ( | STLExportTest | , |
| all_quads | ) |
Definition at line 116 of file stl_exporter_tests.cc.
References SEP_STR.
| blender::io::stl::TEST_F | ( | STLExportTest | , |
| all_tris | ) |
Definition at line 110 of file stl_exporter_tests.cc.
References SEP_STR.
| blender::io::stl::TEST_F | ( | STLExportTest | , |
| cubes_positioned | ) |
Definition at line 128 of file stl_exporter_tests.cc.
References SEP_STR.
| blender::io::stl::TEST_F | ( | STLExportTest | , |
| non_uniform_scale | ) |
Definition at line 122 of file stl_exporter_tests.cc.
References SEP_STR.
|
inlineconstexpr |
Definition at line 21 of file stl_data.hh.
Referenced by blender::io::stl::FileWriter::FileWriter(), read_stl_binary(), read_stl_file(), and blender::io::stl::FileWriter::~FileWriter().
|
inlineconstexpr |
Definition at line 22 of file stl_data.hh.
Referenced by read_stl_file().
|
constexpr |
Definition at line 25 of file stl_exporter_tests.cc.
Referenced by blender::io::stl::STLExportTest::compare_to_golden().