diff options
author | Iyad Ahmed <iyadahmed430@gmail.com> | 2022-06-06 20:57:38 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-06-06 20:57:38 +0300 |
commit | 7c511f1b47d857f37aa36ee6ed8107cb88eb5c39 (patch) | |
tree | d376a5e21bc21f40e0b062f9623887f4018ed61a /source/blender/io/stl/IO_stl.h | |
parent | 14fc89f38f0e3ce00e4fd6fffd72eea5d998af5a (diff) |
STL: Add new C++ based STL importer
A new experimentatl STL importer, written in C++. Roughly 7-9x faster than the
Python based one.
Reviewed By: Aras Pranckevicius, Hans Goudey.
Differential Revision: https://developer.blender.org/D14941
Diffstat (limited to 'source/blender/io/stl/IO_stl.h')
-rw-r--r-- | source/blender/io/stl/IO_stl.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/io/stl/IO_stl.h b/source/blender/io/stl/IO_stl.h new file mode 100644 index 00000000000..bbe537948e8 --- /dev/null +++ b/source/blender/io/stl/IO_stl.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/** \file + * \ingroup stl + */ + +#pragma once + +#include "BKE_context.h" +#include "BLI_path_util.h" +#include "IO_orientation.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct STLImportParams { + /** Full path to the source STL file to import. */ + char filepath[FILE_MAX]; + eIOAxis forward_axis; + eIOAxis up_axis; + bool use_facet_normal; + bool use_scene_unit; + float global_scale; + bool use_mesh_validate; +}; + +/** + * C-interface for the importer. + */ +void STL_import(bContext *C, const struct STLImportParams *import_params); + +#ifdef __cplusplus +} +#endif |