home

Logic

If, then Statements

if then

If a value is true, then do a specified operation.

						
//!OpenSCAD
if (false) {
}						
					

Logic Compare

logic compare

Return true if both inputs are (depending on the selection) equal, not equal, greater than, greater than or equal to, less than, or less than or equal to each other.

						
//!OpenSCAD
//0 == 0;				
					

Logical Operation

logical operation

Depending on the selection, return if both inputs or at least one of the inputs are true.

						
//!OpenSCAD
//false && false;		
					

Not

not

Returns true if the input is false. Returns false if the input is true.

						
//!OpenSCAD
//!true;				
					

True/False

true_false

Returns either true or false.

Test: If true, if false

test

Check the condition in ‘test’. If the condition is true, returns the ‘if true’ value; otherwise returns the ‘if false’ value.

						
//!OpenSCAD
//false ? null : null;