city_generator2

Generated conformal 3D meshes representing a city
git clone git://git.meso-star.fr/city_generator2.git
Log | Files | Refs | README | LICENSE

commit 58fd8eafbca42b2e3eeaa8971a391967ef9a722e
parent d83e6115ccddebbb0b8a4d6eae0ea2861a95e6f3
Author: Benjamin Piaud <benjamin.piaud@meso-star.com>
Date:   Thu, 15 Dec 2022 09:34:32 +0100

Cleaning model0

Diffstat:
Msrc/cg_building_model0.c | 17++++++++---------
Msrc/cg_building_model0.h | 3+--
2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/cg_building_model0.c b/src/cg_building_model0.c @@ -329,10 +329,8 @@ build_boundary ERR(scad_geometry_boundary(NULL, list, 4, &boundary)); - /*ERR(scad_geometries_common_boundaries(NULL, list, 4, &cad->ground, 1,*/ - /*&footprint));*/ - - ERR(scad_cut_geometries(cname, &boundary, 1, &cad->footprint, 1, &cad->boundary)); + ERR(scad_cut_geometries(cname, &boundary, 1, &cad->ground_connection, 1, + &cad->boundary)); exit: if(boundary) scad_geometry_delete(boundary); @@ -349,7 +347,7 @@ building_ground_connection (const char* prefix, struct scpr_polygon* pg, const double e, - struct scad_geometry** footprint) + struct scad_geometry** connection) { res_T res = RES_OK; struct scpr_polygon* pg_int = NULL; @@ -372,7 +370,7 @@ building_ground_connection ERR(build_wall_footprint(pg, pg_int, &geom[0])); ERR(build_floor_footprint(pg, &geom[1])); - ERR(scad_fragment_geometries(cname, &geom[0], 1, &geom[1], 1, footprint)); + ERR(scad_fragment_geometries(cname, &geom[0], 1, &geom[1], 1, connection)); exit: if(is_init) str_release(&name); @@ -477,8 +475,9 @@ build_cad_model0(struct building* building) ERR(scad_scene_partition()); - /* build ground/building connection aka the footprint*/ - ERR(building_ground_connection(str_cget(&prefix), pg, e_wall, &data_cad->footprint)); + /* build ground/building connection */ + ERR(building_ground_connection(str_cget(&prefix), pg, e_wall, + &data_cad->ground_connection)); /* build boundary */ ERR(build_boundary(str_cget(&prefix), building->data_cad)); @@ -544,7 +543,7 @@ export_stl_model0 ERR(scad_stl_export(data_cad->boundary, NULL, binary)); /* footprint export */ - ERR(scad_stl_export(data_cad->footprint, NULL, binary)); + ERR(scad_stl_export(data_cad->ground_connection, NULL, binary)); exit: return res; diff --git a/src/cg_building_model0.h b/src/cg_building_model0.h @@ -39,10 +39,9 @@ struct data_cad_model0 { struct scad_geometry* roof; struct scad_geometry* floor; struct scad_geometry* cavity; - struct scad_geometry* ground; struct scad_geometry* boundary; struct scad_geometry** connection; - struct scad_geometry* footprint; + struct scad_geometry* ground_connection; size_t n_connection; };