color(undef) semantics
color(undef)propagatesNoval(resets color), depth-first: outer always winscolor("undef")(string) falls through to gray defaultcolor_module_definitiondefaultvisNoval(inscl.py)- Detection:
v is Noval or (isinstance(v, list) and v[0] == Noval)
Per-face color mapping for boolean operations
_map_face_colors() in scl_context.py maps source face colors through BRepAlgoAPI_Fuse/Cut/Common.
for list comprehensions and let expressions
[ for (i = range) expr ]— list comprehension, parsed asexpr_array_forlet(a = val, b = val, ...) expr— local variable bindings, parsed asexpr_let- Both are expressions (not statements), usable inside
[...]and anywhere an expression is expected for_loop(statement) usesexpressionfor range (supports variables as range)letstatement:let (a = val, b = val, ...) { block }— parsed asstat_let
rotate(a, v) — axis rotation
rotate(a, [x,y,z])— rotate by angleaaround axis vector[x,y,z]- Implemented manually in
scl.pyrotate handler: if 2+ positional args, extractaandvdirectly (bypassingparse_kwargswhich only knows 1-param definitionv=[x,y,z]) scl_context.pyrotate()acceptsa=None, v=Nonekwargs; ifa is not None, usesgp_Ax1axis rotation instead of XYZ sequential- Single arg
rotate(s)treats scalar as rotation around Z axis