star-cad

Geometric operators for computer-aided design
git clone git://git.meso-star.fr/star-cad.git
Log | Files | Refs | README | LICENSE

commit b77f4f48dab68851bc50e6979f8668e6963f627c
parent 80b187c1c7d74b771005aa48af127a37d79d4743
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Fri,  2 Sep 2022 10:44:02 +0200

Remove the partition step from the mesh function

Change function name accordingly

Diffstat:
Msrc/scad.c | 22++++------------------
Msrc/scad.h | 2+-
2 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/src/scad.c b/src/scad.c @@ -477,36 +477,22 @@ error: } res_T -scad_conformal_mesh +scad_scene_mesh (void) { - int* dimTags = NULL; - size_t dimTags_n; int ierr = 0; res_T res = RES_OK; ERR(check_device()); - get_device()->need_synchro = 1; - gmshModelOccSynchronize(&ierr); - ERR(gmsh_err_to_res_T(ierr)); - gmshModelOccGetEntities(&dimTags, &dimTags_n, 3, &ierr); - ERR(gmsh_err_to_res_T(ierr)); - if(dimTags_n > 2) { - /* Remove all duplicate entities in the OpenCASCADE CAD representation - * (different entities at the same geometrical location) after intersecting - * (using boolean fragments) all highest dimensional entities. */ - gmshModelOccRemoveAllDuplicates(&ierr); - ERR(gmsh_err_to_res_T(ierr)); + if(get_device()->need_synchro) { + ERR(scad_synchronize()); } - gmshModelOccSynchronize(&ierr); - ERR(gmsh_err_to_res_T(ierr)); + gmshModelMeshGenerate(2, &ierr); ERR(gmsh_err_to_res_T(ierr)); - get_device()->is_meshed = 1; exit: - if(dimTags) free(dimTags); return res; error: goto exit; diff --git a/src/scad.h b/src/scad.h @@ -172,7 +172,7 @@ scad_create_group struct scad_geometry** group); SCAD_API res_T -scad_conformal_mesh +scad_scene_mesh (void); /* Compute the boolean union (the fusion) of the geometries `geom1' and `geom2'.