User:MichaelFrey/OpenSCAD

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Echo Function[edit]

[Note: Requires version 2017.01 Experimental Build]


Various[edit]

add a "step by step" debuger

add a "do task after compile"

add "do a task after rendering the animation"

Commands like rotate and translate are like adjectives, modifying the object.

Brackets act like an implicit union.

difference betwhen render and compile

is the negativ scale realyl bugged? if yes: error message on compile


syntax highligthing assert


overwritting build in functions is possible

https://github.com/openscad/openscad/issues/1398


overloading functions is not possible


https://github.com/openscad/openscad/issues/1333

https://github.com/openscad/openscad/issues/915

https://github.com/openscad/openscad/issues/893

https://github.com/openscad/openscad/issues/851

echo is ever so slightly rounding the values

https://github.com/openscad/openscad/issues/741

-1.0000000000000002

-> Numeric values are rounded to 5 significant digits.

a=1.0;
b=1.0000000000000002;

echo(a);
echo(b);

if(a==b){
    echo ("a==b");
}else if(a>b){
    echo ("a>b");
}else if(a<b){
    echo ("a>b");
}else{
    echo ("???");
}
a=1.0;
b=1.000002;
c=1.0000002;
echo(a);
echo(b);
echo(c);

if(a==b){
    echo ("a==b");
}else if(a>b){
    echo ("a>b");
}else if(a<b){
    echo ("a>b");
}else{
    echo ("???");
}

echo (c-1);

https://github.com/openscad/openscad/issues?utf8=%E2%9C%93&q=assert

https://github.com/openscad/openscad/issues/1860

https://github.com/openscad/openscad/pull/1827


washer example for module using child to add thickness https://github.com/openscad/openscad/issues/1906

Feature request: step-by-step exection/debuger for openscad scripts[edit]

When debugging an openscad script or analyzing someone elses openscad script, it is sometimes hard to follow what is excaltly going on.

A step-by-step execution by various step width (e.g. step over moduls, step into moduls)

Now, some of the design phlyosopies get a bit in the way of that. Modifiers are written before the objects beeing modified. Especcially intersection and difference would be hard to illustrate.

Maybe it would work by applying the allready existing modifiers (%, &, ...) to the line. (now offcourse it is the resonsiblity to apply the line breaks responsibly)

-> writting a shell script as a take demo, that adds # on line 1 to n and renders each variation --> the script as to ignore certain things like lines starting with } ) Break points

animation with start and stop button