star-stl

Load STereo Lithography (StL) file format
git clone git://git.meso-star.fr/star-stl.git
Log | Files | Refs | README | LICENSE

commit 8b9e653f32ebb2e14701186cc3ad2c0d358b6ed7
parent dc031bd4fccfd263f2e1b6f5bd6ebc5e20c76616
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Thu, 13 Jul 2023 17:08:37 +0200

Merge remote-tracking branch 'origin/develop' into feature_posix_make

Diffstat:
MREADME.md | 12++++++++----
Mcmake/CMakeLists.txt | 4++--
Msrc/sstl.c | 16++++++++--------
Msrc/sstl.h | 2+-
Msrc/test_sstl.c | 2+-
Msrc/test_sstl_load.c | 2+-
6 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/README.md b/README.md @@ -15,6 +15,10 @@ can be edited, built, tested and installed as any CMake project. ## Release notes +### Version 0.4.1 + +Correction of a compilation error highlighted in particular by GCC 4.9.2 + ### Version 0.4 - Add write functionality (either to files or streams), @@ -38,8 +42,8 @@ can be edited, built, tested and installed as any CMake project. ## License -Copyright (C) 2015, 2016, 2019, 2021 |Méso|Star> (<contact@meso-star.com>). -Star-STL is free software released under the CeCILLv2.1 license. You are -welcome to redistribute it under certain conditions; refer to the COPYING files -for details. +Copyright (C) 2015, 2016, 2019, 2021, 2023 |Méso|Star> +(<contact@meso-star.com>). Star-STL is free software released under the +CeCILLv2.1 license. You are welcome to redistribute it under certain +conditions; refer to the COPYING files for details. diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2015, 2016, 2019, 2021 |Meso|Star> (contact@meso-star.com) +# Copyright (C) 2015, 2016, 2019, 2021, 2023 |Méso|Star> (contact@meso-star.com) # # This software is governed by the CeCILL license under French law and # abiding by the rules of distribution of free software. You can use, @@ -66,7 +66,7 @@ endif() set(VERSION_MAJOR 0) set(VERSION_MINOR 4) -set(VERSION_PATCH 0) +set(VERSION_PATCH 1) set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) set_target_properties(sstl PROPERTIES DEFINE_SYMBOL SSTL_SHARED_BUILD diff --git a/src/sstl.c b/src/sstl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015, 2016, 2019, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015, 2016, 2019, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, @@ -560,7 +560,7 @@ load_binary_stream unsigned triangles_count; struct solid solid = SOLID_NULL; unsigned i; - + ASSERT(sstl && stream && stream_name && already_read_count <= 80); clear(sstl); @@ -630,7 +630,7 @@ error: #if defined(COMPILER_GCC) #define FTELL(P, S) \ if(-1L == ((P) = ftell(S))) { res = RES_IO_ERR; goto error; } -#elif deined(COMPILER_CL) +#elif defined(COMPILER_CL) #define FTELL(S) \ if(-1L == ((P) = _ftelli64(S))) { res = RES_IO_ERR; goto error; } #else @@ -726,13 +726,13 @@ get_sstl_triangle_normal res = RES_BAD_ARG; goto error; } - + OK(sstl_get_desc(sstl, &desc)); if(idx >= desc.triangles_count) { res = RES_BAD_ARG; goto error; } - + ASSERT(3*idx+2 < sa_size(desc.normals)); f3_set(normal, desc.normals + 3*idx); @@ -757,13 +757,13 @@ get_sstl_triangle_vertices res = RES_BAD_ARG; goto error; } - + OK(sstl_get_desc(sstl, &desc)); if(idx >= desc.triangles_count) { res = RES_BAD_ARG; goto error; } - + for(n = 0; n < 3; n++) { size_t vtx_idx = desc.indices[3*idx + n]; ASSERT(3*vtx_idx+2 < sa_size(desc.vertices)); @@ -876,7 +876,7 @@ write_stream res = data->get_triangle_normal(i, data->data, normal); OKP(fprintf(stream, " facet normal %g %g %g\n", SPLIT3(normal))); - + res = data->get_triangle_vertices(i, data->data, vtx); OKP(fprintf(stream, " outer loop\n")); for(n = 0; n < 3; n++) { diff --git a/src/sstl.h b/src/sstl.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2015, 2016, 2019, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015, 2016, 2019, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_sstl.c b/src/test_sstl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015, 2016, 2019, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015, 2016, 2019, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use, diff --git a/src/test_sstl_load.c b/src/test_sstl_load.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2015, 2016, 2019, 2021 |Meso|Star> (contact@meso-star.com) +/* Copyright (C) 2015, 2016, 2019, 2021, 2023 |Méso|Star> (contact@meso-star.com) * * This software is governed by the CeCILL license under French law and * abiding by the rules of distribution of free software. You can use,