OpenJSCAD.org icon indicating copy to clipboard operation
OpenJSCAD.org copied to clipboard

[Feature request] Null 3d object

Open ikeji opened this issue 3 years ago • 1 comments

I want to have a 3d object that have no actual object but able to pass to union() or other boolean function. This is useful for the function that have return value conditionally.

In V1, world I can use unison([]) for this use case. But in V2, it will make a error.

Can we have a null 3d object?

Expected Behavior

union([]) will return empty result.

Actual Behavior

It make error.

ERROR:
Uncaught Error: wrong number of arguments

Steps to Reproduce the Problem

function main () {
 return union([
     cube(),
     union([]),
 ]);
}

Specifications

  • Version: V2
  • Platform: linux 64
  • Environment: browser

ikeji avatar May 02 '21 13:05 ikeji

@ikeji Thanks! We will take a look at this.

z3dev avatar May 06 '21 02:05 z3dev