discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Evaluating imported STL's

R
Ronaldo
Thu, Jun 16, 2016 1:44 AM

Lucas,

Here you have a broader set of tests with void sets and surprising results:

module void1() {};
module void2() difference() { sphere(1); sphere(2); }
module void3() intersection() { sphere(1); translate([0,0,3]) sphere(1); }
module void4() union() { void2(); void1(); }
module void5() union() { void1(); void3(); }
module void6() union() { void2(); void3(); }
module void7() hull(){ void1(); void2(); void3(); void4(); void5();
void6(); }

module Int1() intersection(){ children(); cube(1); }
module Int2() intersection(){ cube(1); children(); }

module Diff() difference()  { children(); cube(1); }

module Mink1() minkowski()  { children(); cube(1); }
module Mink2() minkowski()  { cube(1); children(); }

void1(); void2(); void3(); void4(); void5(); void6(); void7();

translate([ 2,0,0]) Int1() void1(); // non-void
translate([ 4,0,0]) Int2() void1(); // non-void
translate([ 6,0,0]) Int1() void2();
translate([ 8,0,0]) Int2() void2();
translate([10,0,0]) Int1() void3(); // non-void
translate([12,0,0]) Int2() void3(); // non-void
translate([14,0,0]) Int1() void4();
translate([16,0,0]) Int2() void4();
translate([18,0,0]) Int1() void5(); // non-void
translate([20,0,0]) Int2() void5(); // non-void
translate([22,0,0]) Int1() void6();
translate([24,0,0]) Int2() void6();
translate([26,0,0]) Int1() void7();  // non-void

translate([0, 2,0]) Mink1() void1(); // all non-void
translate([0, 4,0]) Mink1() void2();
translate([0, 6,0]) Mink1() void3();
translate([0, 8,0]) Mink1() void4();
translate([0,10,0]) Mink1() void5();
translate([0,12,0]) Mink1() void6();
translate([0,14,0]) Mink2() void1();
translate([0,16,0]) Mink2() void2();
translate([0,18,0]) Mink2() void3();
translate([0,20,0]) Mink2() void4();
translate([0,22,0]) Mink2() void5();
translate([0,24,0]) Mink1() void6();
translate([0,26,0]) Mink1() void7();

translate([0, -2,0]) Diff() void1(); // non-void
translate([0, -4,0]) Diff() void2();
translate([0, -6,0]) Diff() void3(); // non-void
translate([0, -8,0]) Diff() void4();
translate([0,-10,0]) Diff() void5(); // non-void
translate([0,-12,0]) Diff() void6();
translate([0,-14,0]) Diff() void7(); // non-void

--
View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17707.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Lucas, Here you have a broader set of tests with void sets and surprising results: > module void1() {}; > module void2() difference() { sphere(1); sphere(2); } > module void3() intersection() { sphere(1); translate([0,0,3]) sphere(1); } > module void4() union() { void2(); void1(); } > module void5() union() { void1(); void3(); } > module void6() union() { void2(); void3(); } > module void7() hull(){ void1(); void2(); void3(); void4(); void5(); > void6(); } > > module Int1() intersection(){ children(); cube(1); } > module Int2() intersection(){ cube(1); children(); } > > module Diff() difference() { children(); cube(1); } > > module Mink1() minkowski() { children(); cube(1); } > module Mink2() minkowski() { cube(1); children(); } > > void1(); void2(); void3(); void4(); void5(); void6(); void7(); > > translate([ 2,0,0]) Int1() void1(); // non-void > translate([ 4,0,0]) Int2() void1(); // non-void > translate([ 6,0,0]) Int1() void2(); > translate([ 8,0,0]) Int2() void2(); > translate([10,0,0]) Int1() void3(); // non-void > translate([12,0,0]) Int2() void3(); // non-void > translate([14,0,0]) Int1() void4(); > translate([16,0,0]) Int2() void4(); > translate([18,0,0]) Int1() void5(); // non-void > translate([20,0,0]) Int2() void5(); // non-void > translate([22,0,0]) Int1() void6(); > translate([24,0,0]) Int2() void6(); > translate([26,0,0]) Int1() void7(); // non-void > > translate([0, 2,0]) Mink1() void1(); // all non-void > translate([0, 4,0]) Mink1() void2(); > translate([0, 6,0]) Mink1() void3(); > translate([0, 8,0]) Mink1() void4(); > translate([0,10,0]) Mink1() void5(); > translate([0,12,0]) Mink1() void6(); > translate([0,14,0]) Mink2() void1(); > translate([0,16,0]) Mink2() void2(); > translate([0,18,0]) Mink2() void3(); > translate([0,20,0]) Mink2() void4(); > translate([0,22,0]) Mink2() void5(); > translate([0,24,0]) Mink1() void6(); > translate([0,26,0]) Mink1() void7(); > > translate([0, -2,0]) Diff() void1(); // non-void > translate([0, -4,0]) Diff() void2(); > translate([0, -6,0]) Diff() void3(); // non-void > translate([0, -8,0]) Diff() void4(); > translate([0,-10,0]) Diff() void5(); // non-void > translate([0,-12,0]) Diff() void6(); > translate([0,-14,0]) Diff() void7(); // non-void -- View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17707.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Thu, Jun 16, 2016 2:10 AM

Hi Ronaldo and Lucas,

Would you mind reporting this on the github issue tracker (https://github.com/openscad/openscad/issues)?
It’s a lot easier to track and discuss actual bugs there.

-Marius

Hi Ronaldo and Lucas, Would you mind reporting this on the github issue tracker (https://github.com/openscad/openscad/issues)? It’s a lot easier to track and discuss actual bugs there. -Marius
RW
Rogier Wolff
Thu, Jun 16, 2016 4:41 AM

On Wed, Jun 15, 2016 at 09:14:09PM -0400, doug moen wrote:

if C() is not defined, I want the evaluator to halt, highlight the
expression C() in the editor, and display an error message, so that
I can quickly fix my typo and try again. I can't get a correct
result if C() is undefined, so the best thing the system can do for
me is help me to correct the error as quickly as possible.

I don't want the system to keep going, making me wait for a bad result.

The thing is: What costs time? The evaluation until you get there, or
the "keep going"?

Yesterday I spent an hour gathering the dependencies of a software
package. I would run "./configure" it would spend three minutes
checking for header files, and then it would say: Can't find XXXX and
bomb out.

So, normally my strategy is to fix the first error (or occasionally a
random error) and try again. But if it works like yesterday where the
wait until the error occurs I'll quickly switch to fixing ALL errors
before I try again.

For openSCAD as I know it, the "ignore undefined modules" strategy has
its merits. But a bigger "warning: ignored 3 undefined modules" would
IMHO be better...

Roger. 

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

On Wed, Jun 15, 2016 at 09:14:09PM -0400, doug moen wrote: > if C() is not defined, I want the evaluator to halt, highlight the > expression C() in the editor, and display an error message, so that > I can quickly fix my typo and try again. I can't get a correct > result if C() is undefined, so the best thing the system can do for > me is help me to correct the error as quickly as possible. > I don't want the system to keep going, making me wait for a bad result. The thing is: What costs time? The evaluation until you get there, or the "keep going"? Yesterday I spent an hour gathering the dependencies of a software package. I would run "./configure" it would spend three minutes checking for header files, and then it would say: Can't find XXXX and bomb out. So, normally my strategy is to fix the first error (or occasionally a random error) and try again. But if it works like yesterday where the wait until the error occurs I'll quickly switch to fixing ALL errors before I try again. For openSCAD as I know it, the "ignore undefined modules" strategy has its merits. But a bigger "warning: ignored 3 undefined modules" would IMHO be better... Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.
DM
doug moen
Thu, Jun 16, 2016 1:48 PM

Roger said:

The thing is: What costs time? The evaluation until you get there, or
the "keep going"?

Yesterday I spent an hour gathering the dependencies of a software
package. I would run "./configure" it would spend three minutes
checking for header files, and then it would say: Can't find XXXX and
bomb out.

So, normally my strategy is to fix the first error (or occasionally a
random error) and try again. But if it works like yesterday where the
wait until the error occurs I'll quickly switch to fixing ALL errors
before I try again.

For openSCAD as I know it, the "ignore undefined modules" strategy has
its merits. But a bigger "warning: ignored 3 undefined modules" would
IMHO be better...

You raise a good point.

OpenSCAD has an evaluation phase (which generates the CSG tree), then a
rendering phase (which generates the mesh).

Normally, the evaluation phase is quick (milliseconds). This is the phase
where undefined modules are detected. Since there's normally no wait, I
want this phase to abort on first error and highlight in the text editor
the subexpression where the error occurred, because that would be the most
productive way for me to fix errors. That's what works for me. If other
people disagree, maybe this should be configurable?

The rendering phase is slow, and takes minutes or hours for any serious
model. During this phase, it would make sense to print informative error
messages and keep going, so that you can fix all the errors in a batch.
Unfortunately, CGAL assertion messages don't give you helpful information
that points back at the location in the source where the error occurred.
This is something that I think may improve in the future, based on active
pull requests.

Now, there is pressure from some parts of the community to support
geometric evaluation during the evaluation phase. (Recently, a request for
a boolean function to test if two shapes intersect, but there's a long
history of similar requests.) And, there are other parts of the community
who push back on this, and uphold the benefits of a fast evaluation phase
and fast preview. If we do go in the direction of making OpenSCAD more
powerful, at the expensive of long evaluation times, then the tradeoff
changes, and maybe abort on first error starts to make less sense.

The goal is to provide a productive workflow. Since we have a fully
integrated system with our own GUI and our own evaluator, we have the
ability to make this work very nicely. I would like the ability to jump
into the editor at the error location the instant an error occurs so that I
can fix the bug, regardless of whether evaluation continues past that
point. If evaluation does continue, then a button to advance to the next
error would be desirable.

On 16 June 2016 at 00:41, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Wed, Jun 15, 2016 at 09:14:09PM -0400, doug moen wrote:

if C() is not defined, I want the evaluator to halt, highlight the
expression C() in the editor, and display an error message, so that
I can quickly fix my typo and try again. I can't get a correct
result if C() is undefined, so the best thing the system can do for
me is help me to correct the error as quickly as possible.

I don't want the system to keep going, making me wait for a bad result.

The thing is: What costs time? The evaluation until you get there, or
the "keep going"?

Yesterday I spent an hour gathering the dependencies of a software
package. I would run "./configure" it would spend three minutes
checking for header files, and then it would say: Can't find XXXX and
bomb out.

So, normally my strategy is to fix the first error (or occasionally a
random error) and try again. But if it works like yesterday where the
wait until the error occurs I'll quickly switch to fixing ALL errors
before I try again.

For openSCAD as I know it, the "ignore undefined modules" strategy has
its merits. But a bigger "warning: ignored 3 undefined modules" would
IMHO be better...

     Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Roger said: > The thing is: What costs time? The evaluation until you get there, or > the "keep going"? > > Yesterday I spent an hour gathering the dependencies of a software > package. I would run "./configure" it would spend three minutes > checking for header files, and then it would say: Can't find XXXX and > bomb out. > > So, normally my strategy is to fix the first error (or occasionally a > random error) and try again. But if it works like yesterday where the > wait until the error occurs I'll quickly switch to fixing ALL errors > before I try again. > > For openSCAD as I know it, the "ignore undefined modules" strategy has > its merits. But a bigger "warning: ignored 3 undefined modules" would > IMHO be better... You raise a good point. OpenSCAD has an evaluation phase (which generates the CSG tree), then a rendering phase (which generates the mesh). Normally, the evaluation phase is quick (milliseconds). This is the phase where undefined modules are detected. Since there's normally no wait, I want this phase to abort on first error and highlight in the text editor the subexpression where the error occurred, because that would be the most productive way for me to fix errors. That's what works for me. If other people disagree, maybe this should be configurable? The rendering phase is slow, and takes minutes or hours for any serious model. During this phase, it would make sense to print informative error messages and keep going, so that you can fix all the errors in a batch. Unfortunately, CGAL assertion messages don't give you helpful information that points back at the location in the source where the error occurred. This is something that I think may improve in the future, based on active pull requests. Now, there is pressure from some parts of the community to support geometric evaluation during the evaluation phase. (Recently, a request for a boolean function to test if two shapes intersect, but there's a long history of similar requests.) And, there are other parts of the community who push back on this, and uphold the benefits of a fast evaluation phase and fast preview. If we do go in the direction of making OpenSCAD more powerful, at the expensive of long evaluation times, then the tradeoff changes, and maybe abort on first error starts to make less sense. The goal is to provide a productive workflow. Since we have a fully integrated system with our own GUI and our own evaluator, we have the ability to make this work very nicely. I would like the ability to jump into the editor at the error location the instant an error occurs so that I can fix the bug, regardless of whether evaluation continues past that point. If evaluation does continue, then a button to advance to the next error would be desirable. On 16 June 2016 at 00:41, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > On Wed, Jun 15, 2016 at 09:14:09PM -0400, doug moen wrote: > > > if C() is not defined, I want the evaluator to halt, highlight the > > expression C() in the editor, and display an error message, so that > > I can quickly fix my typo and try again. I can't get a correct > > result if C() is undefined, so the best thing the system can do for > > me is help me to correct the error as quickly as possible. > > > I don't want the system to keep going, making me wait for a bad result. > > The thing is: What costs time? The evaluation until you get there, or > the "keep going"? > > Yesterday I spent an hour gathering the dependencies of a software > package. I would run "./configure" it would spend three minutes > checking for header files, and then it would say: Can't find XXXX and > bomb out. > > So, normally my strategy is to fix the first error (or occasionally a > random error) and try again. But if it works like yesterday where the > wait until the error occurs I'll quickly switch to fixing ALL errors > before I try again. > > For openSCAD as I know it, the "ignore undefined modules" strategy has > its merits. But a bigger "warning: ignored 3 undefined modules" would > IMHO be better... > > Roger. > > -- > ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** > ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** > *-- BitWizard writes Linux device drivers for any device you may have! --* > The plan was simple, like my brother-in-law Phil. But unlike > Phil, this plan just might work. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >
NH
nop head
Thu, Jun 16, 2016 2:16 PM

I think querying the geometry during evaluation and the attendant slow down
is fine as long as it only happens when the user explicitly invokes it. It
is no worse than the current situation with render(). Those of us who don't
need it would still get a fast preview.

On 16 June 2016 at 14:48, doug moen doug@moens.org wrote:

Roger said:

The thing is: What costs time? The evaluation until you get there, or
the "keep going"?

Yesterday I spent an hour gathering the dependencies of a software
package. I would run "./configure" it would spend three minutes
checking for header files, and then it would say: Can't find XXXX and
bomb out.

So, normally my strategy is to fix the first error (or occasionally a
random error) and try again. But if it works like yesterday where the
wait until the error occurs I'll quickly switch to fixing ALL errors
before I try again.

For openSCAD as I know it, the "ignore undefined modules" strategy has
its merits. But a bigger "warning: ignored 3 undefined modules" would
IMHO be better...

You raise a good point.

OpenSCAD has an evaluation phase (which generates the CSG tree), then a
rendering phase (which generates the mesh).

Normally, the evaluation phase is quick (milliseconds). This is the phase
where undefined modules are detected. Since there's normally no wait, I
want this phase to abort on first error and highlight in the text editor
the subexpression where the error occurred, because that would be the most
productive way for me to fix errors. That's what works for me. If other
people disagree, maybe this should be configurable?

The rendering phase is slow, and takes minutes or hours for any serious
model. During this phase, it would make sense to print informative error
messages and keep going, so that you can fix all the errors in a batch.
Unfortunately, CGAL assertion messages don't give you helpful information
that points back at the location in the source where the error occurred.
This is something that I think may improve in the future, based on active
pull requests.

Now, there is pressure from some parts of the community to support
geometric evaluation during the evaluation phase. (Recently, a request for
a boolean function to test if two shapes intersect, but there's a long
history of similar requests.) And, there are other parts of the community
who push back on this, and uphold the benefits of a fast evaluation phase
and fast preview. If we do go in the direction of making OpenSCAD more
powerful, at the expensive of long evaluation times, then the tradeoff
changes, and maybe abort on first error starts to make less sense.

The goal is to provide a productive workflow. Since we have a fully
integrated system with our own GUI and our own evaluator, we have the
ability to make this work very nicely. I would like the ability to jump
into the editor at the error location the instant an error occurs so that I
can fix the bug, regardless of whether evaluation continues past that
point. If evaluation does continue, then a button to advance to the next
error would be desirable.

On 16 June 2016 at 00:41, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Wed, Jun 15, 2016 at 09:14:09PM -0400, doug moen wrote:

if C() is not defined, I want the evaluator to halt, highlight the
expression C() in the editor, and display an error message, so that
I can quickly fix my typo and try again. I can't get a correct
result if C() is undefined, so the best thing the system can do for
me is help me to correct the error as quickly as possible.

I don't want the system to keep going, making me wait for a bad result.

The thing is: What costs time? The evaluation until you get there, or
the "keep going"?

Yesterday I spent an hour gathering the dependencies of a software
package. I would run "./configure" it would spend three minutes
checking for header files, and then it would say: Can't find XXXX and
bomb out.

So, normally my strategy is to fix the first error (or occasionally a
random error) and try again. But if it works like yesterday where the
wait until the error occurs I'll quickly switch to fixing ALL errors
before I try again.

For openSCAD as I know it, the "ignore undefined modules" strategy has
its merits. But a bigger "warning: ignored 3 undefined modules" would
IMHO be better...

     Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998
**
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I think querying the geometry during evaluation and the attendant slow down is fine as long as it only happens when the user explicitly invokes it. It is no worse than the current situation with render(). Those of us who don't need it would still get a fast preview. On 16 June 2016 at 14:48, doug moen <doug@moens.org> wrote: > Roger said: > > The thing is: What costs time? The evaluation until you get there, or > > the "keep going"? > > > > Yesterday I spent an hour gathering the dependencies of a software > > package. I would run "./configure" it would spend three minutes > > checking for header files, and then it would say: Can't find XXXX and > > bomb out. > > > > So, normally my strategy is to fix the first error (or occasionally a > > random error) and try again. But if it works like yesterday where the > > wait until the error occurs I'll quickly switch to fixing ALL errors > > before I try again. > > > > For openSCAD as I know it, the "ignore undefined modules" strategy has > > its merits. But a bigger "warning: ignored 3 undefined modules" would > > IMHO be better... > > You raise a good point. > > OpenSCAD has an evaluation phase (which generates the CSG tree), then a > rendering phase (which generates the mesh). > > Normally, the evaluation phase is quick (milliseconds). This is the phase > where undefined modules are detected. Since there's normally no wait, I > want this phase to abort on first error and highlight in the text editor > the subexpression where the error occurred, because that would be the most > productive way for me to fix errors. That's what works for me. If other > people disagree, maybe this should be configurable? > > The rendering phase is slow, and takes minutes or hours for any serious > model. During this phase, it would make sense to print informative error > messages and keep going, so that you can fix all the errors in a batch. > Unfortunately, CGAL assertion messages don't give you helpful information > that points back at the location in the source where the error occurred. > This is something that I think may improve in the future, based on active > pull requests. > > Now, there is pressure from some parts of the community to support > geometric evaluation during the evaluation phase. (Recently, a request for > a boolean function to test if two shapes intersect, but there's a long > history of similar requests.) And, there are other parts of the community > who push back on this, and uphold the benefits of a fast evaluation phase > and fast preview. If we do go in the direction of making OpenSCAD more > powerful, at the expensive of long evaluation times, then the tradeoff > changes, and maybe abort on first error starts to make less sense. > > The goal is to provide a productive workflow. Since we have a fully > integrated system with our own GUI and our own evaluator, we have the > ability to make this work very nicely. I would like the ability to jump > into the editor at the error location the instant an error occurs so that I > can fix the bug, regardless of whether evaluation continues past that > point. If evaluation does continue, then a button to advance to the next > error would be desirable. > > On 16 June 2016 at 00:41, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > >> On Wed, Jun 15, 2016 at 09:14:09PM -0400, doug moen wrote: >> >> > if C() is not defined, I want the evaluator to halt, highlight the >> > expression C() in the editor, and display an error message, so that >> > I can quickly fix my typo and try again. I can't get a correct >> > result if C() is undefined, so the best thing the system can do for >> > me is help me to correct the error as quickly as possible. >> >> > I don't want the system to keep going, making me wait for a bad result. >> >> The thing is: What costs time? The evaluation until you get there, or >> the "keep going"? >> >> Yesterday I spent an hour gathering the dependencies of a software >> package. I would run "./configure" it would spend three minutes >> checking for header files, and then it would say: Can't find XXXX and >> bomb out. >> >> So, normally my strategy is to fix the first error (or occasionally a >> random error) and try again. But if it works like yesterday where the >> wait until the error occurs I'll quickly switch to fixing ALL errors >> before I try again. >> >> For openSCAD as I know it, the "ignore undefined modules" strategy has >> its merits. But a bigger "warning: ignored 3 undefined modules" would >> IMHO be better... >> >> Roger. >> >> -- >> ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 >> ** >> ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** >> *-- BitWizard writes Linux device drivers for any device you may have! --* >> The plan was simple, like my brother-in-law Phil. But unlike >> Phil, this plan just might work. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
P
Parkinbot
Thu, Jun 16, 2016 2:19 PM

I agree, that OpenSCAD has no explicit definition of a void shape, like
'undef'. This might lead to some unclearness in understanding, what the
language actually does in some situations, without probing it. And I agree
that this is the region, where a language might have to be changed with the
risk of breaking legacy code - latest when the deficiency starts to get a
problem.

But is it a problem right now?

Having programmed with about 30 different programming languages multiplied
by an uncounted number of new versions and updates in my life, I never got
very far by just reading the reference or using my understanding of math,
especially when abstract operations solely defined for real values are in
play, but some finite number representations are being used. Minkowski
definitely falls into that category.

"Offside is, when the referee whistles". The idiosyncrasies of a language
are mostly a matter of taste AND of compromises that have to be made.

E.g. Would you want your cube to vanish in the first frame in an animation
like that?

minkowski() {  cube();  scale([$t, $t, $t])  sphere(); }

I wouldn't. With your understanding, you would have to use some IF-construct
to sort out the empy result. But how would you do that? What about the value
0? Here it is again. Isn't it more a matter of something being smaler than
some epsilon? So, you wanna test against some epsilon, which is an internal
constant, that might chance with every release? You will never get a defined
result with this approach.
Anyway you put it, it has to be probed.

BTW: I would never use a minkowski() to generate a void result. Void results
are not desired in rendering, as they only cost time.

OpenSCAD's 'binary' operators operate over a set of shapes, which may have
n>=0 elements. Thus they are NOT binary operators as you are used to, but
some interpretation for their application on a batch of operands. Should
they be named differently for that? Why trying to be more Catholic than the
pope?

I would argue for a more instant mechanism to interactively stop F5 and F6
rendering, but never to convert warnings into an error. Is this also a
matter of taste? Other programming languages use customizable priority
levels to convert warnings into errors. Are we this far?

Before any of this will go into the language, many other by far more
important features have to be tackled.
To have functions for querying boundingboxes and polygons/polyhedra of
shapes are the most important ones. Also colors should not get lost on F6
...

Being able to play with a NULL more or less, nothing is gained for practical
use.

--
View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17714.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I agree, that OpenSCAD has no explicit definition of a void shape, like 'undef'. This might lead to some unclearness in understanding, what the language actually does in some situations, without probing it. And I agree that this is the region, where a language might have to be changed with the risk of breaking legacy code - latest when the deficiency starts to get a problem. But is it a problem right now? Having programmed with about 30 different programming languages multiplied by an uncounted number of new versions and updates in my life, I never got very far by just reading the reference or using my understanding of math, especially when abstract operations solely defined for real values are in play, but some finite number representations are being used. Minkowski definitely falls into that category. "Offside is, when the referee whistles". The idiosyncrasies of a language are mostly a matter of taste AND of compromises that have to be made. E.g. Would you want your cube to vanish in the first frame in an animation like that? > minkowski() { cube(); scale([$t, $t, $t]) sphere(); } I wouldn't. With your understanding, you would have to use some IF-construct to sort out the empy result. But how would you do that? What about the value 0? Here it is again. Isn't it more a matter of something being smaler than some epsilon? So, you wanna test against some epsilon, which is an internal constant, that might chance with every release? You will never get a defined result with this approach. Anyway you put it, it has to be probed. BTW: I would never use a minkowski() to generate a void result. Void results are not desired in rendering, as they only cost time. OpenSCAD's 'binary' operators operate over a set of shapes, which may have n>=0 elements. Thus they are NOT binary operators as you are used to, but some interpretation for their application on a batch of operands. Should they be named differently for that? Why trying to be more Catholic than the pope? I would argue for a more instant mechanism to interactively stop F5 and F6 rendering, but never to convert warnings into an error. Is this also a matter of taste? Other programming languages use customizable priority levels to convert warnings into errors. Are we this far? Before any of this will go into the language, many other by far more important features have to be tackled. To have functions for querying boundingboxes and polygons/polyhedra of shapes are the most important ones. Also colors should not get lost on F6 ... Being able to play with a NULL more or less, nothing is gained for practical use. -- View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17714.html Sent from the OpenSCAD mailing list archive at Nabble.com.
DM
doug moen
Thu, Jun 16, 2016 2:30 PM

I thought about degenerate shapes some more.

Mathematically, a degenerate shape is one with zero volume. There is an
infinite family of degenerate 3D shapes: 0D points, 1D lines, 2D surfaces,
plus the empty set which contains no points at all. Mathematically,
operations like minkowski sum and convex hull behave differently depending
on what kind of degenerate shape is passed.

Pragmatically, it's different. OpenSCAD can't represent arbitrary 3D
shapes, only polyhedra. Degenerate shapes are a problem. Internally, we use
two different representations. With the mesh representation, a well formed
mesh must not contain any triangles with zero area. With the Nef Polyhedron
representation, AFAIK there is only one degenerate Nef Polyhedron (the
empty set), and not an infinite family.

So in practice, I think OpenSCAD can only have 1 degenerate shape, which we
should treat as the empty set. So union() {}, cube(0), cube([10,0,0]) and
others should all be treated the same way, as the unique degenerate shape.

Minkowski sum treats the empty set as the zero element and the point
[0,0,0] as the identity element, but we can have only one degenerate shape,
so we can't implement these semantics exactly. I think our unique
degenerate shape should be consistently treated as the empty set, so we
don't support an identity element for minkowski sum, only a zero element.

So that means, if you pass the degenerate shape as an argument to
minkowski, then I think the result should be the degenerate shape. It's
like multiplying a number by zero, the result is zero.

Right now, it appears that degenerate shapes aren't treated consistently.
Minkowski treats the void as its identity element, ie as [0,0,0], while
other operations I tested treat it as the empty set.

But, I just read Parkinbot's analysis, and I think he makes a good argument
with this example:

minkowski() {  cube();  scale([$t, $t, $t])  sphere(); }

Since we only get to have one degenerate shape, we get to choose how it
works for each operation.

On 15 June 2016 at 20:13, Lucas Vinicius Hartmann lucas.hartmann@gmail.com
wrote:

The hull() case WOULD evaluate to a cube despite having void as the second
operand. The hull definition is the minimal convex shape that encloses all
solids in it, and despite the differece returninig void the first operand
is still a solid.

For the minkowski it is another story... If our math is not supposed to be
right what would be the point of a programming language? The only example
you found to justify the current behavior is based on a preexisting
error... Openscad should warn that C() is void, but do exactly as
instructed. Remember: Computers (especially programming languages) are not
supposed to do what they believe you want, they are supposed to do exactly
what you tell them to.

Anyway... I just finished compiling 2016.06.15 (wow, that's today!) and
the issue is still the same.

  • If a nothing() is originated from a difference or a previous
    intersection, then intersection() { nothing(); something();} works.
  • intersection with void module or void union fails.
  • minkowski fails with any voids.

And I got ifsolid() to work! I just made sure the condition is never
void by adding a far_far_away() particle, and limiting the result to
universe(). See attached files, animated, from above.

--
Lucas Vinicius Hartmann

Dizem que se você rodar o CD do Windows ao contrário ele mostra uma
mensagem demoníaca... Mas isso nem é o pior, se você rodar ele normal ele
instala o Windows!

2016-06-15 20:45 GMT-03:00 Parkinbot rudolf@parkinbot.com:

This is one of the typical pathological cases, not worth discussing much
in
programming context. You are both right, mathematically an empty set used
as
operand for Minkowski will "eat up" any other operand.

But in programming an operator is better defined and implemented to be as
robust as possible.

It is easy to "prove", that there is no [0,0,0] involved, otherwise the
following code would not evaluate to a cube.

hull()
{
translate([10, 0])
cube(5);
difference() // nothing
{
sphere(1);
sphere(2);
}
}

OpenSCAD implements Minkowski as I would expect it, and do it myself.

I would want

minkowski(){}

not to throw an error. And

minkowski(){
cube[a,b,c];
};

to have cube[a,b,c] as unchanged result, instead of getting a not-defined
error. Same applies for intersection(), union() and so on.

Second, I would not want any shape evaluating to empty to eat up
everthing.

minkowski(){
A();
B();
C();
...
}

Imagine C() is not defined (missing library) and a warning is issued.
Should
the result then be empty? For what? For mathematical correctness?

--
View this message in context:
http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17702.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

I thought about degenerate shapes some more. Mathematically, a degenerate shape is one with zero volume. There is an infinite family of degenerate 3D shapes: 0D points, 1D lines, 2D surfaces, plus the empty set which contains no points at all. Mathematically, operations like minkowski sum and convex hull behave differently depending on what kind of degenerate shape is passed. Pragmatically, it's different. OpenSCAD can't represent arbitrary 3D shapes, only polyhedra. Degenerate shapes are a problem. Internally, we use two different representations. With the mesh representation, a well formed mesh must not contain any triangles with zero area. With the Nef Polyhedron representation, AFAIK there is only one degenerate Nef Polyhedron (the empty set), and not an infinite family. So in practice, I think OpenSCAD can only have 1 degenerate shape, which we should treat as the empty set. So union() {}, cube(0), cube([10,0,0]) and others should all be treated the same way, as the unique degenerate shape. Minkowski sum treats the empty set as the zero element and the point [0,0,0] as the identity element, but we can have only one degenerate shape, so we can't implement these semantics exactly. I think our unique degenerate shape should be consistently treated as the empty set, so we don't support an identity element for minkowski sum, only a zero element. So that means, if you pass the degenerate shape as an argument to minkowski, then I think the result should be the degenerate shape. It's like multiplying a number by zero, the result is zero. Right now, it appears that degenerate shapes aren't treated consistently. Minkowski treats the void as its identity element, ie as [0,0,0], while other operations I tested treat it as the empty set. But, I just read Parkinbot's analysis, and I think he makes a good argument with this example: > minkowski() { cube(); scale([$t, $t, $t]) sphere(); } Since we only get to have one degenerate shape, we get to choose how it works for each operation. On 15 June 2016 at 20:13, Lucas Vinicius Hartmann <lucas.hartmann@gmail.com> wrote: > The hull() case WOULD evaluate to a cube despite having void as the second > operand. The hull definition is the minimal convex shape that encloses all > solids in it, and despite the differece returninig void the first operand > is still a solid. > > For the minkowski it is another story... If our math is not supposed to be > right what would be the point of a programming language? The only example > you found to justify the current behavior is based on a preexisting > error... Openscad should warn that C() is void, but do exactly as > instructed. Remember: Computers (especially programming languages) are not > supposed to do what they believe you want, they are supposed to do exactly > what you tell them to. > > Anyway... I just finished compiling 2016.06.15 (wow, that's today!) and > the issue is still the same. > > - If a nothing() is originated from a difference or a previous > intersection, then intersection() { nothing(); something();} works. > - intersection with void module or void union fails. > - minkowski fails with any voids. > > *And I got ifsolid() to work!* I just made sure the condition is never > void by adding a far_far_away() particle, and limiting the result to > universe(). See attached files, animated, from above. > > -- > Lucas Vinicius Hartmann > > Dizem que se você rodar o CD do Windows ao contrário ele mostra uma > mensagem demoníaca... Mas isso nem é o pior, se você rodar ele normal ele > instala o Windows! > > 2016-06-15 20:45 GMT-03:00 Parkinbot <rudolf@parkinbot.com>: > >> This is one of the typical pathological cases, not worth discussing much >> in >> programming context. You are both right, mathematically an empty set used >> as >> operand for Minkowski will "eat up" any other operand. >> >> But in programming an operator is better defined and implemented to be as >> robust as possible. >> >> It is easy to "prove", that there is no [0,0,0] involved, otherwise the >> following code would not evaluate to a cube. >> >> >> > hull() >> > { >> > translate([10, 0]) >> > cube(5); >> > difference() // nothing >> > { >> > sphere(1); >> > sphere(2); >> > } >> > } >> >> OpenSCAD implements Minkowski as I would expect it, and do it myself. >> >> I would want >> >> >> > minkowski(){} >> >> not to throw an error. And >> >> >> > minkowski(){ >> > cube[a,b,c]; >> > }; >> >> to have cube[a,b,c] as unchanged result, instead of getting a not-defined >> error. Same applies for intersection(), union() and so on. >> >> Second, I would not want any shape evaluating to empty to eat up >> everthing. >> >> >> > minkowski(){ >> > A(); >> > B(); >> > C(); >> > ... >> > } >> >> Imagine C() is not defined (missing library) and a warning is issued. >> Should >> the result then be empty? For what? For mathematical correctness? >> >> >> >> >> >> -- >> View this message in context: >> http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17702.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
DM
doug moen
Thu, Jun 16, 2016 3:45 PM

Parkinbot said:

E.g. Would you want your cube to vanish in the first frame in an animation
like that?

minkowski() {  cube();  scale([$t, $t, $t])  sphere(); }

No, I wouldn't want the cube to vanish. The mathematically correct result
at $t=0 is that you just get a cube, which is exactly what happens in our
implementation.

It's no coincidence that "the mathematically correct result" is the same as
what you naturally expect to happen. In this case, "scale(0) sphere()"
should mathematically produce a degenerate solid, the point [0,0,0], which
is the identity element for minkowski, so you get a cube. And that's what
you actually get in practice.

Unfortunately, OpenSCAD doesn't produce the correct result all the time,
and it's hard to predict what will work and what will fail.

For example, this produces the correct result:

minkowski() { translate([20,0,0]) scale($t) cube(10); sphere(3); }

But this produce an incorrect result at $t=0:

minkowski() { translate([20,0,0]) cube(10*$t); sphere(3); }

It looks like the two versions should produce the same result, but they
don't. The situation with degenerate solids is more complicated than what I
thought. In the first version, "translate([20,0,0]) scale(0) cube(10)"
should produce a degenerate solid with a point at [20,0,0], and that's
apparently what happens, because the output is correct: the sphere is
centered at [20,0,0].

If I render
translate([20,0,0]) scale($t) cube(10);
then it says:

Top level object is a 3D object:

Facets: 6

And if I export this as STL, then I get an empty STL file (no triangles).

So that's good. It's the "mathematically correct" result.

In my previous post, I said that OpenSCAD can't represent an infinite
family of degenerate solids, therefore we can't make minkowski work
correctly. But my experiment shows that we do have a proper representation
for different kinds of degenerate solids, and minkowski does work
correctly, if you know how to work around the bugs.

I tried another experiment. This one is to construct the convex hull of two
different degenerate solids, to make a square based pyramid:

hull() {

translate([0,0,10]) scale(0) cube(); // apex of pyramid

cube([10,10,0], center=true); // base of pyramid

}

Unfortunately, this creates a scary popup error dialog, and then the render
hangs:

A critical error was caught. The application may have become unstable:

CGAL ERROR: precondition violation!

Expr: point2_it != points.end()

File:
/Users/kintel/code/OpenSCAD/openscad/../libraries/install/include/CGAL/convex_hull_3.h

Line: 922

Explanation: All points are equal; cannot construct polyhedron.

On 16 June 2016 at 10:19, Parkinbot rudolf@parkinbot.com wrote:

I agree, that OpenSCAD has no explicit definition of a void shape, like
'undef'. This might lead to some unclearness in understanding, what the
language actually does in some situations, without probing it. And I agree
that this is the region, where a language might have to be changed with the
risk of breaking legacy code - latest when the deficiency starts to get a
problem.

But is it a problem right now?

Having programmed with about 30 different programming languages multiplied
by an uncounted number of new versions and updates in my life, I never got
very far by just reading the reference or using my understanding of math,
especially when abstract operations solely defined for real values are in
play, but some finite number representations are being used. Minkowski
definitely falls into that category.

"Offside is, when the referee whistles". The idiosyncrasies of a language
are mostly a matter of taste AND of compromises that have to be made.

E.g. Would you want your cube to vanish in the first frame in an animation
like that?

minkowski() {  cube();  scale([$t, $t, $t])  sphere(); }

I wouldn't. With your understanding, you would have to use some
IF-construct
to sort out the empy result. But how would you do that? What about the
value
0? Here it is again. Isn't it more a matter of something being smaler than
some epsilon? So, you wanna test against some epsilon, which is an internal
constant, that might chance with every release? You will never get a
defined
result with this approach.
Anyway you put it, it has to be probed.

BTW: I would never use a minkowski() to generate a void result. Void
results
are not desired in rendering, as they only cost time.

OpenSCAD's 'binary' operators operate over a set of shapes, which may have
n>=0 elements. Thus they are NOT binary operators as you are used to, but
some interpretation for their application on a batch of operands. Should
they be named differently for that? Why trying to be more Catholic than the
pope?

I would argue for a more instant mechanism to interactively stop F5 and F6
rendering, but never to convert warnings into an error. Is this also a
matter of taste? Other programming languages use customizable priority
levels to convert warnings into errors. Are we this far?

Before any of this will go into the language, many other by far more
important features have to be tackled.
To have functions for querying boundingboxes and polygons/polyhedra of
shapes are the most important ones. Also colors should not get lost on F6
...

Being able to play with a NULL more or less, nothing is gained for
practical
use.

--
View this message in context:
http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17714.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Parkinbot said: > E.g. Would you want your cube to vanish in the first frame in an animation > like that? > >> minkowski() { cube(); scale([$t, $t, $t]) sphere(); } No, I wouldn't want the cube to vanish. The mathematically correct result at $t=0 is that you just get a cube, which is exactly what happens in our implementation. It's no coincidence that "the mathematically correct result" is the same as what you naturally expect to happen. In this case, "scale(0) sphere()" should mathematically produce a degenerate solid, the point [0,0,0], which is the identity element for minkowski, so you get a cube. And that's what you actually get in practice. Unfortunately, OpenSCAD doesn't produce the correct result all the time, and it's hard to predict what will work and what will fail. For example, this produces the correct result: > minkowski() { translate([20,0,0]) scale($t) cube(10); sphere(3); } But this produce an incorrect result at $t=0: > minkowski() { translate([20,0,0]) cube(10*$t); sphere(3); } It looks like the two versions should produce the same result, but they don't. The situation with degenerate solids is more complicated than what I thought. In the first version, "translate([20,0,0]) scale(0) cube(10)" should produce a degenerate solid with a point at [20,0,0], and that's apparently what happens, because the output is correct: the sphere is centered at [20,0,0]. If I render translate([20,0,0]) scale($t) cube(10); then it says: Top level object is a 3D object: Facets: 6 And if I export this as STL, then I get an empty STL file (no triangles). So that's good. It's the "mathematically correct" result. In my previous post, I said that OpenSCAD can't represent an infinite family of degenerate solids, therefore we can't make minkowski work correctly. But my experiment shows that we do have a proper representation for different kinds of degenerate solids, and minkowski does work correctly, if you know how to work around the bugs. I tried another experiment. This one is to construct the convex hull of two different degenerate solids, to make a square based pyramid: hull() { translate([0,0,10]) scale(0) cube(); // apex of pyramid cube([10,10,0], center=true); // base of pyramid } Unfortunately, this creates a scary popup error dialog, and then the render hangs: A critical error was caught. The application may have become unstable: CGAL ERROR: precondition violation! Expr: point2_it != points.end() File: /Users/kintel/code/OpenSCAD/openscad/../libraries/install/include/CGAL/convex_hull_3.h Line: 922 Explanation: All points are equal; cannot construct polyhedron. On 16 June 2016 at 10:19, Parkinbot <rudolf@parkinbot.com> wrote: > I agree, that OpenSCAD has no explicit definition of a void shape, like > 'undef'. This might lead to some unclearness in understanding, what the > language actually does in some situations, without probing it. And I agree > that this is the region, where a language might have to be changed with the > risk of breaking legacy code - latest when the deficiency starts to get a > problem. > > But is it a problem right now? > > Having programmed with about 30 different programming languages multiplied > by an uncounted number of new versions and updates in my life, I never got > very far by just reading the reference or using my understanding of math, > especially when abstract operations solely defined for real values are in > play, but some finite number representations are being used. Minkowski > definitely falls into that category. > > "Offside is, when the referee whistles". The idiosyncrasies of a language > are mostly a matter of taste AND of compromises that have to be made. > > E.g. Would you want your cube to vanish in the first frame in an animation > like that? > > > > minkowski() { cube(); scale([$t, $t, $t]) sphere(); } > > I wouldn't. With your understanding, you would have to use some > IF-construct > to sort out the empy result. But how would you do that? What about the > value > 0? Here it is again. Isn't it more a matter of something being smaler than > some epsilon? So, you wanna test against some epsilon, which is an internal > constant, that might chance with every release? You will never get a > defined > result with this approach. > Anyway you put it, it has to be probed. > > BTW: I would never use a minkowski() to generate a void result. Void > results > are not desired in rendering, as they only cost time. > > OpenSCAD's 'binary' operators operate over a set of shapes, which may have > n>=0 elements. Thus they are NOT binary operators as you are used to, but > some interpretation for their application on a batch of operands. Should > they be named differently for that? Why trying to be more Catholic than the > pope? > > I would argue for a more instant mechanism to interactively stop F5 and F6 > rendering, but never to convert warnings into an error. Is this also a > matter of taste? Other programming languages use customizable priority > levels to convert warnings into errors. Are we this far? > > Before any of this will go into the language, many other by far more > important features have to be tackled. > To have functions for querying boundingboxes and polygons/polyhedra of > shapes are the most important ones. Also colors should not get lost on F6 > ... > > Being able to play with a NULL more or less, nothing is gained for > practical > use. > > > > > > > -- > View this message in context: > http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17714.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >
R
Ronaldo
Thu, Jun 16, 2016 4:16 PM

Rudolf,

You raised good points but I will keep mine about Minkowski. The example you
have shown of a vanishing cube is idiosyncratic but for other reasons. I
would expect that

       scale(0) sphere;

to be a point, the origin, and not a void set.

In Mathematics, you have a non-void set by doing a Minkowski sum of a point
and a non-void set. I thought we have no way in OpenSCAD to do a Minkowski
sum of a set with only a point or a line segment or a 2D shape due to the
simple fact that we can't express such sets or mix 2D shapes with 3D shapes
in OpenSCAD operations. However, we can at least in Minkowski operations.

minkowski() {
cube(1);
intersection() {
cube(1);
translate([$t-1,$t-1,$t-1]) cube(1);
}
}

And that is not idiosyncratic. It does exactly what I would expect. The
intersection is not void, it is a square that shrinks to the origin when
$t=0. The scaled sphere should do the same.

BTW, the above "technique" may be very usefull for rounding only some edges
of a solid.

There is much more complexities behind the scene... :)

--
View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17717.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Rudolf, You raised good points but I will keep mine about Minkowski. The example you have shown of a vanishing cube is idiosyncratic but for other reasons. I would expect that scale(0) sphere; to be a point, the origin, and not a void set. In Mathematics, you have a non-void set by doing a Minkowski sum of a point and a non-void set. I thought we have no way in OpenSCAD to do a Minkowski sum of a set with only a point or a line segment or a 2D shape due to the simple fact that we can't express such sets or mix 2D shapes with 3D shapes in OpenSCAD operations. However, we can at least in Minkowski operations. > minkowski() { > cube(1); > intersection() { > cube(1); > translate([$t-1,$t-1,$t-1]) cube(1); > } > } And that is not idiosyncratic. It does exactly what I would expect. The intersection is not void, it is a square that shrinks to the origin when $t=0. The scaled sphere should do the same. BTW, the above "technique" may be very usefull for rounding only some edges of a solid. There is much more complexities behind the scene... :) -- View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17717.html Sent from the OpenSCAD mailing list archive at Nabble.com.
P
Parkinbot
Thu, Jun 16, 2016 6:57 PM

For me this is all a lot of speculations about internal representations. We
know that F5 translates to CSG and rendering is done in graphics
hardware/driver only, which I guess will be using its own NULLs.

As long as I can't evalute a shape in the sense of:

v = vertices(MyShape());
f = facesertices(MyShape());

everything can be in the black box.

Look at this: You can F5 it

scale(0)cube();

and obviously get a "Normalized CSG tree has 1 elements". And CSG Tree Dump
shows:

multmatrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]) {
cube(size = [1, 1, 1], center = false);
}

You even can F6 it and export it to STL. But there you find:

solid OpenSCAD_Model
endsolid OpenSCAD_Model

So where is the math point of view?

--
View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17721.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

For me this is all a lot of speculations about internal representations. We know that F5 translates to CSG and rendering is done in graphics hardware/driver only, which I guess will be using its own NULLs. As long as I can't evalute a shape in the sense of: v = vertices(MyShape()); f = facesertices(MyShape()); everything can be in the black box. Look at this: You can F5 it > scale(0)cube(); and obviously get a "Normalized CSG tree has 1 elements". And CSG Tree Dump shows: > multmatrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]]) { > cube(size = [1, 1, 1], center = false); > } You even can F6 it and export it to STL. But there you find: > solid OpenSCAD_Model > endsolid OpenSCAD_Model So where is the math point of view? -- View this message in context: http://forum.openscad.org/Evaluating-imported-STL-s-tp17682p17721.html Sent from the OpenSCAD mailing list archive at Nabble.com.