commit 47f6956b28dda14d8e2e660f37576ce5e565359e
parent 247a44fd97d300b83803ec48261518444dbf35a9
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Thu, 15 Feb 2024 18:06:43 +0100
BugFix: single thread option not passed to star-cad
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/cg_city.c b/src/cg_city.c
@@ -412,6 +412,7 @@ create_city
scpr_args.precision = CLIPPER_PRECISON;
ERR(scpr_device_create(&scpr_args, &city->scpr));
city->verbosisty_level = args->verbosity_level;
+ city->single_thread = args->single_thread;
city->binary_export = args->binary_export;
city->keep_running_on_errors = args->keep_running_on_errors;
city->dump_footprints_level = args->dump_footprints_level;
@@ -675,6 +676,7 @@ city_cad_build(struct city* city)
scad_initialized = 1;
options.Mesh.MeshSizeFromPoints = 0;
options.Mesh.MeshSizeMin = pow(10, -(CLIPPER_PRECISON+1));
+ options.Geometry.OCCParallel = !city->single_thread;
#ifdef NDEBUG
options.Misc.LogRefCounting = Scad_log_dimTags_only_undeleted;
#else
@@ -880,6 +882,7 @@ city_ground_build(struct city* city)
scad_initialized = 1;
options.Mesh.MeshSizeFromPoints = 0;
options.Mesh.MeshSizeMin = pow(10, -(CLIPPER_PRECISON+1));
+ options.Geometry.OCCParallel = !city->single_thread;
#ifdef NDEBUG
options.Misc.LogRefCounting = Scad_log_dimTags_only_undeleted;
#else
diff --git a/src/cg_city.h b/src/cg_city.h
@@ -136,6 +136,7 @@ struct city {
struct mem_allocator* allocator;
struct logger* logger;
struct scpr_device* scpr;
+ int single_thread;
int binary_export;
int verbosisty_level;
int keep_running_on_errors;