From 7c511f1b47d857f37aa36ee6ed8107cb88eb5c39 Mon Sep 17 00:00:00 2001 From: Iyad Ahmed Date: Mon, 6 Jun 2022 20:57:38 +0300 Subject: 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 --- source/blender/io/stl/IO_stl.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 source/blender/io/stl/IO_stl.h (limited to 'source/blender/io/stl/IO_stl.h') 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 -- cgit v1.2.3