@@ -465,17 +465,19 @@ module position(from)
465465module orient(dir, anchor, spin) {
466466 req_children($ children);
467467 if (! is_undef(dir)) {
468- assert(anchor== undef, "Only one of dir= or anchor= may be given to orient()" );
469- assert(is_vector(dir));
470468 spin = default(spin, 0 );
471- assert(is_finite(spin));
469+ check =
470+ assert(anchor== undef, "Only one of dir= or anchor= may be given to orient()" )
471+ assert(is_vector(dir))
472+ assert(is_finite(spin));
472473 two_d = _attach_geom_2d($ parent_geom);
473474 fromvec = two_d? BACK : UP;
474475 rot(spin, from= fromvec, to= dir) children();
475476 } else {
476- assert(dir== undef, "Only one of dir= or anchor= may be given to orient()" );
477- assert($ parent_geom != undef, "No parent to orient from!" );
478- assert(is_string(anchor) || is_vector(anchor));
477+ check=
478+ assert(dir== undef, "Only one of dir= or anchor= may be given to orient()" )
479+ assert($ parent_geom != undef, "No parent to orient from!" )
480+ assert(is_string(anchor) || is_vector(anchor));
479481 anch = _find_anchor(anchor, $ parent_geom);
480482 two_d = _attach_geom_2d($ parent_geom);
481483 fromvec = two_d? BACK : UP;
@@ -568,8 +570,9 @@ module attach(from, to, overlap, norot=false)
568570module tag(tag)
569571{
570572 req_children($ children);
571- assert(is_string(tag),"tag must be a string" );
572- assert(undef== str_find($ tag," " ),str ("Tag string \" " ,$ tag,"\" contains a space, which is not allowed" )) ;
573+ check=
574+ assert(is_string(tag),"tag must be a string" )
575+ assert(undef== str_find(tag," " ),str ("Tag string \" " ,tag,"\" contains a space, which is not allowed" ));
573576 $ tag = str ($ tag_prefix,tag);
574577 children();
575578}
@@ -627,7 +630,7 @@ module tag(tag)
627630module force_tag(tag)
628631{
629632 req_children($ children);
630- assert(is_undef(tag) || is_string(tag),"tag must be a string" );
633+ check1 = assert(is_undef(tag) || is_string(tag),"tag must be a string" );
631634 $ tag = str ($ tag_prefix,default(tag,$ tag));
632635 assert(undef== str_find($ tag," " ),str ("Tag string \" " ,$ tag,"\" contains a space, which is not allowed" ));
633636 if (_is_shown())
@@ -710,6 +713,7 @@ module tag_scope(scope){
710713 req_children($ children);
711714 scope = is_undef(scope) ? rand_str(20 ) : scope;
712715 assert(is_string(scope), "scope must be a string" );
716+ assert(undef== str_find(scope," " ),str ("Scope string \" " ,scope,"\" contains a space, which is not allowed" ));
713717 $ tag_prefix= scope;
714718 children();
715719}
@@ -1206,7 +1210,7 @@ module tag_conv_hull(tag,keep="keep")
12061210module hide(tags)
12071211{
12081212 req_children($ children);
1209- assert(is_string(tags), "tags must be a string" );
1213+ dummy = assert(is_string(tags), "tags must be a string" );
12101214 taglist = [for (s= str_split(tags," " ,keep_nulls= false )) str ($ tag_prefix,s)];
12111215 $ tags_hidden = concat($ tags_hidden,taglist);
12121216 children();
@@ -1233,7 +1237,7 @@ module hide(tags)
12331237module show_only(tags)
12341238{
12351239 req_children($ children);
1236- assert(is_string(tags), str ("tags must be a string" ,tags));
1240+ dummy = assert(is_string(tags), str ("tags must be a string" ,tags));
12371241 taglist = [for (s= str_split(tags," " ,keep_nulls= false )) str ($ tag_prefix,s)];
12381242 $ tags_shown = taglist;
12391243 children();
@@ -1270,7 +1274,7 @@ module show_all()
12701274module show_int(tags)
12711275{
12721276 req_children($ children);
1273- assert(is_string(tags), str ("tags must be a string" ,tags));
1277+ dummy = assert(is_string(tags), str ("tags must be a string" ,tags));
12741278 taglist = [for (s= str_split(tags," " ,keep_nulls= false )) str ($ tag_prefix,s)];
12751279 $ tags_shown = $ tags_shown == "ALL" ? taglist : set_intersection($ tags_shown,taglist);
12761280 children();
@@ -1321,7 +1325,7 @@ module edge_mask(edges=EDGES_ALL, except=[]) {
13211325 ];
13221326 for (vec = vecs) {
13231327 vcount = (vec.x?1 :0 ) + (vec.y?1 :0 ) + (vec.z?1 :0 );
1324- assert(vcount == 2 , "Not an edge vector!" );
1328+ dummy = assert(vcount == 2 , "Not an edge vector!" );
13251329 anch = _find_anchor(vec, $ parent_geom);
13261330 $ attach_to = undef;
13271331 $ attach_anchor = anch;
@@ -1369,7 +1373,7 @@ module corner_mask(corners=CORNERS_ALL, except=[]) {
13691373 vecs = [for (i = [0 :7 ]) if (corners[i]> 0 ) CORNER_OFFSETS[i]];
13701374 for (vec = vecs) {
13711375 vcount = (vec.x?1 :0 ) + (vec.y?1 :0 ) + (vec.z?1 :0 );
1372- assert(vcount == 3 , "Not an edge vector!" );
1376+ dummy = assert(vcount == 3 , "Not an edge vector!" );
13731377 anch = _find_anchor(vec, $ parent_geom);
13741378 $ attach_to = undef;
13751379 $ attach_anchor = anch;
@@ -1452,7 +1456,7 @@ module edge_profile(edges=EDGES_ALL, except=[], convexity=10) {
14521456 ];
14531457 for (vec = vecs) {
14541458 vcount = (vec.x?1 :0 ) + (vec.y?1 :0 ) + (vec.z?1 :0 );
1455- assert(vcount == 2 , "Not an edge vector!" );
1459+ dummy = assert(vcount == 2 , "Not an edge vector!" );
14561460 anch = _find_anchor(vec, $ parent_geom);
14571461 $ attach_to = undef;
14581462 $ attach_anchor = anch;
@@ -1509,7 +1513,7 @@ module corner_profile(corners=CORNERS_ALL, except=[], r, d, convexity=10) {
15091513 vecs = [for (i = [0 :7 ]) if (corners[i]> 0 ) CORNER_OFFSETS[i]];
15101514 for (vec = vecs) {
15111515 vcount = (vec.x?1 :0 ) + (vec.y?1 :0 ) + (vec.z?1 :0 );
1512- assert(vcount == 3 , "Not an edge vector!" );
1516+ dummy = assert(vcount == 3 , "Not an edge vector!" );
15131517 anch = _find_anchor(vec, $ parent_geom);
15141518 $ attach_to = undef;
15151519 $ attach_anchor = anch;
@@ -2705,7 +2709,7 @@ function _standard_anchors(two_d=false) = [
27052709// Example(FlatSpin,VPD=333):
27062710// cube(50, center=true) show_anchors();
27072711module show_anchors(s=10, std=true, custom=true) {
2708- check = assert($ parent_geom != undef) 1 ;
2712+ check = assert($ parent_geom != undef);
27092713 two_d = _attach_geom_2d($ parent_geom);
27102714 if (std) {
27112715 for (anchor= _standard_anchors(two_d= two_d)) {
0 commit comments