star-cad

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

commit 086d9d4352be48a6d219b6966a3c678d4741c4e9
parent 74fd43b342afedffd5624096a55cd7c8df72aaf1
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Wed,  9 Apr 2025 18:35:21 +0200

Add line breaks to help inserting breakpoints

Diffstat:
Msrc/scad.c | 10++++++----
Msrc/scad_device.c | 3++-
Msrc/scad_geometry.c | 9++++++---
3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/scad.c b/src/scad.c @@ -77,7 +77,8 @@ write_ascii_stl d3_sub(edge1, vtx[1], vtx[0]); d3_sub(edge2, vtx[2], vtx[0]); d3_cross(tmp, edge1, edge2); - if(d3_eq(tmp, zero)) continue; + if(d3_eq(tmp, zero)) + continue; d3_normalize(n, tmp); OKP(fprintf(stl_file, " facet normal %g %g %g\n", SPLIT3(n))); @@ -153,7 +154,8 @@ write_binary_stl f3_sub(edge1, trg.vrtx[1], trg.vrtx[0]); f3_sub(edge2, trg.vrtx[2], trg.vrtx[0]); f3_cross(tmp, edge1, edge2); - if(f3_eq(tmp, zero)) continue; + if(f3_eq(tmp, zero)) + continue; f3_normalize(trg.n, tmp); trg.attrib = 0; if(1 != fwrite(&trg, 50, 1, stl_file)) { @@ -617,7 +619,6 @@ scad_stl_sort_orientation for(e = 0; e < ecount; e++) { ERR(senc3d_scene_get_enclosure(senc3d_scn, e, &enclosure)); ERR(senc3d_enclosure_get_header(enclosure, &header)); - if(header.primitives_count == header.unique_primitives_count) continue; for(i = header.unique_primitives_count; i < header.primitives_count; i++) { enum senc3d_side side; unsigned gid, j, k; @@ -674,7 +675,8 @@ scad_stl_sort_orientation if(tin[idx]) { /* Allready in output */ char s = (side == SENC3D_FRONT) ? 1 : 2;; - if(s == tin[idx]) continue; /* Same side => OK (should not happen?) */ + if(s == tin[idx]) + continue; /* Same side => OK (should not happen?) */ log_error(get_device(), "Triangle set '%s' defines a topology that doesn't allow forcing normals" " (found triangle(s) with 2 sides in).\n", diff --git a/src/scad_device.c b/src/scad_device.c @@ -513,7 +513,8 @@ device_register_ref_to_tags for(i = 0; i < count; i += 2) { int d = dimTags[i]; int t = dimTags[i+1]; - if(d == dim && t == tag) continue; + if(d == dim && t == tag) + continue; ERR(darray_int_push_back(&desc->tags_to_refput, &d)); ERR(darray_int_push_back(&desc->tags_to_refput, &t)); c += 2; diff --git a/src/scad_geometry.c b/src/scad_geometry.c @@ -312,7 +312,8 @@ gather_tags_recursive for(dim = 3; dim >= down_to_dim; dim--) { size_t c = 0; sz[dim] = 2 * htable_tags_size_get(t+dim); - if(sz[dim] == 0) continue; + if(sz[dim] == 0) + continue; dimTags[dim] = MEM_ALLOC(allocator, sz[dim] * sizeof(*dimTags)); if(!dimTags[dim]) { res = RES_MEM_ERR; @@ -2173,7 +2174,8 @@ scad_geometries_partition } for(k = 0; k < geometries_count; k++) { struct scad_geometry* g = geometries[k]; - if(!overlap[k]) continue; + if(!overlap[k]) + continue; tmp_err = RES_BAD_OP; if(dump_overlapping_err) { if(str_is_empty(&g->name)) { @@ -2350,7 +2352,8 @@ scad_geometries_swap struct scad_geometry *g1 = pool1[i], *g2 = pool2[i]; size_t c1 = g1->gmsh_dimTags_n, c2 = g2->gmsh_dimTags_n; int *dt1 = g1->gmsh_dimTags, *dt2 = g2->gmsh_dimTags; - if(pool1[i] == pool2[i]) continue; + if(pool1[i] == pool2[i]) + continue; /* Swap content according to flags. Don't swap refcount! */ if(flags & Scad_swap_name) { if(dev->log) {