STL file generation non-deterministic?

classic Classic list List threaded Threaded
42 messages Options
123
Reply | Threaded
Open this post in threaded view
|

STL file generation non-deterministic?

nophead
I have been generating STL fliles from the command line with scripts and checking them into github. When I regenerate from the same source code a lot of the STL files have little changes in them. These seem to be mainly a few facets in a different order but I have also seen some normal values changing from zero to something very close to zero.

The objects look identical in NetFabb.

Surely the same source code should produce the same STL, especially when built from the command line. Does the test suite generate any STLs and check them?
Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Giles Bathgate-2

I have noticed CGAL doesnt always generate facets in the same order. Which I think is the cause of the underlying problem. There was a discussion about this on the cgal mailing list and I believe a workaround. I will have a dig.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

nophead
Presumably it would have to use random numbers, time or uninitialised variables to do that.

On 16 March 2012 09:15, Giles Bathgate <[hidden email]> wrote:

I have noticed CGAL doesnt always generate facets in the same order. Which I think is the cause of the underlying problem. There was a discussion about this on the cgal mailing list and I believe a workaround. I will have a dig.

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Giles Bathgate-2

I believe it uses Memory adresses for identifiers or something and so when it sorts its rather random. That's my vague recollection of what was said in the post I can no longer find :(

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

nophead
Ah, that would make sense. If I just run it again I get the same files but if I check it out somewhere else and build it they are different. Perhaps the file paths being a different length cause the addresses to change. A bit of a pain when using source control as everybody building it will produce unique STLs.


On 16 March 2012 11:03, Giles Bathgate <[hidden email]> wrote:

I believe it uses Memory adresses for identifiers or something and so when it sorts its rather random. That's my vague recollection of what was said in the post I can no longer find :(

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Giles Bathgate-2

In this scenario I think of stl as binarys that you wouldn't usually check into source control. I am sure we can figure out how to get cgal to be more predictable in the future.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

nophead
Yes they are really but not everybody would want to install the source and build just to print a set of parts.

On 16 March 2012 14:48, Giles Bathgate <[hidden email]> wrote:

In this scenario I think of stl as binarys that you wouldn't usually check into source control. I am sure we can figure out how to get cgal to be more predictable in the future.

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Giles Bathgate-2

That's why you need rapcad ;) then you just print directly from source. Well that's the idea. When its finished of course.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Keyword 'color' not working in Windows OpenSCAD?

Nick Pelling
In reply to this post by nophead
Hi everyone,

I'm just getting started with OpenSCAD running under Windows, but I
can't seem to get any color to display (apart from the default
yellow), nor indeed alpha. I've tried color("red"), color("Red"),
color([1,0,0]), etc but nothing seems to make any difference. I'm
using a Nvidia GeForce 8600 GT, might that be the problem?

Everything else seems to work fine. :-)

Thanks, ....Nick....

PS: are there any cross product and magnitude functions? Thanks!


Reply | Threaded
Open this post in threaded view
|

Re: Keyword 'color' not working in Windows OpenSCAD?

Giles Bathgate-2

You need to apply color to child e.g.

color("red") cube();

Also it only works in preview mode.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: Keyword 'color' not working in Windows OpenSCAD?

Whosawhatsis
In reply to this post by Nick Pelling
Also, the colors only apply in OpenCSG "preview" renders. CGAL does not support them.

On Friday, March 16, 2012 at 8:05 AM, Nick Pelling wrote:

Hi everyone,

I'm just getting started with OpenSCAD running under Windows, but I
can't seem to get any color to display (apart from the default
yellow), nor indeed alpha. I've tried color("red"), color("Red"),
color([1,0,0]), etc but nothing seems to make any difference. I'm
using a Nvidia GeForce 8600 GT, might that be the problem?

Everything else seems to work fine. :-)

Thanks, ....Nick....

PS: are there any cross product and magnitude functions? Thanks!

_______________________________________________
OpenSCAD mailing list

Reply | Threaded
Open this post in threaded view
|

Re: Keyword 'color' not working in Windows OpenSCAD?

Whosawhatsis
Oops, Giles did mention that. Missed that line when I read it.

On Friday, March 16, 2012 at 8:16 AM, Whosawhatsis wrote:

Also, the colors only apply in OpenCSG "preview" renders. CGAL does not support them.

On Friday, March 16, 2012 at 8:05 AM, Nick Pelling wrote:

Hi everyone,

I'm just getting started with OpenSCAD running under Windows, but I
can't seem to get any color to display (apart from the default
yellow), nor indeed alpha. I've tried color("red"), color("Red"),
color([1,0,0]), etc but nothing seems to make any difference. I'm
using a Nvidia GeForce 8600 GT, might that be the problem?

Everything else seems to work fine. :-)

Thanks, ....Nick....

PS: are there any cross product and magnitude functions? Thanks!

_______________________________________________
OpenSCAD mailing list


Reply | Threaded
Open this post in threaded view
|

Re: Keyword 'color' not working in Windows OpenSCAD?

Nick Pelling
Hi Giles & whosawhatsis,

Ah, I see. So OpenSCAD lets you use color when you don't need it
(preview), but not when you do (final). And even though CGAL itself
does seem to support color (please correct me if I'm wrong).

Sorry to have to say the obvious, but isn't this a bit rubbish? Don't
get me wrong, it's great that I can use scripts to build CSG-based
demos: but as for them being monochrome, I'm not hugely impressed. :-(

Cheers, ....Nick....


Reply | Threaded
Open this post in threaded view
|

Re: Keyword 'color' not working in Windows OpenSCAD?

Giles Bathgate-2

CGAL doesnt support it. It's been complained about before, and I think someone tried to fix it before. But it turns out it can't be done in a simple way.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Brad Pitcher
In reply to this post by nophead
In my opinion, the STL files for a project should be packaged in releases, just as with software binaries, and never checked in to source control.


On Fri, Mar 16, 2012 at 7:56 AM, nop head <[hidden email]> wrote:
Yes they are really but not everybody would want to install the source and build just to print a set of parts.

On 16 March 2012 14:48, Giles Bathgate <[hidden email]> wrote:

In this scenario I think of stl as binarys that you wouldn't usually check into source control. I am sure we can figure out how to get cgal to be more predictable in the future.

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

nophead
How does one do that with GitHub?

On 16 March 2012 15:47, Brad Pitcher <[hidden email]> wrote:
In my opinion, the STL files for a project should be packaged in releases, just as with software binaries, and never checked in to source control.



On Fri, Mar 16, 2012 at 7:56 AM, nop head <[hidden email]> wrote:
Yes they are really but not everybody would want to install the source and build just to print a set of parts.

On 16 March 2012 14:48, Giles Bathgate <[hidden email]> wrote:

In this scenario I think of stl as binarys that you wouldn't usually check into source control. I am sure we can figure out how to get cgal to be more predictable in the future.

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Giles Bathgate-2
As a logged in user you go to the download section of your project
page and upload a package.

Regards

Giles

Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

Brad Pitcher
In reply to this post by nophead
Github repos have a download section (for example, https://github.com/openscad/openscad/downloads) where you could upload archives of STLs.


On Fri, Mar 16, 2012 at 8:52 AM, nop head <[hidden email]> wrote:
How does one do that with GitHub?


On 16 March 2012 15:47, Brad Pitcher <[hidden email]> wrote:
In my opinion, the STL files for a project should be packaged in releases, just as with software binaries, and never checked in to source control.



On Fri, Mar 16, 2012 at 7:56 AM, nop head <[hidden email]> wrote:
Yes they are really but not everybody would want to install the source and build just to print a set of parts.

On 16 March 2012 14:48, Giles Bathgate <[hidden email]> wrote:

In this scenario I think of stl as binarys that you wouldn't usually check into source control. I am sure we can figure out how to get cgal to be more predictable in the future.

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


Reply | Threaded
Open this post in threaded view
|

Re: Keyword 'color' not working in Windows OpenSCAD?

nophead
In reply to this post by Nick Pelling


On 16 March 2012 15:40, Nick Pelling <[hidden email]> wrote:
Hi Giles & whosawhatsis,

Ah, I see. So OpenSCAD lets you use color when you don't need it
(preview), but not when you do (final). And even though CGAL itself
does seem to support color (please correct me if I'm wrong).

Preview is for looking at it and making PNG files where colour matters. F6 is for making DXF and STL files where colour doesn't matter at the moment. Maybe it does for other file formats like AMF.

Sorry to have to say the obvious, but isn't this a bit rubbish? Don't
get me wrong, it's great that I can use scripts to build CSG-based
demos: but as for them being monochrome, I'm not hugely impressed. :-(

Cheers, ....Nick....

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad

Reply | Threaded
Open this post in threaded view
|

Re: STL file generation non-deterministic?

nophead
In reply to this post by Brad Pitcher
Ah, thanks. Perhaps I will use that, although it is handy to know which STL files have changed from one version to another. They are a bit different from normal object files in that they are stand alone entities that you can print, rather than binaries that only do something when you link them together.

On 16 March 2012 15:56, Brad Pitcher <[hidden email]> wrote:
Github repos have a download section (for example, https://github.com/openscad/openscad/downloads) where you could upload archives of STLs.



On Fri, Mar 16, 2012 at 8:52 AM, nop head <[hidden email]> wrote:
How does one do that with GitHub?


On 16 March 2012 15:47, Brad Pitcher <[hidden email]> wrote:
In my opinion, the STL files for a project should be packaged in releases, just as with software binaries, and never checked in to source control.



On Fri, Mar 16, 2012 at 7:56 AM, nop head <[hidden email]> wrote:
Yes they are really but not everybody would want to install the source and build just to print a set of parts.

On 16 March 2012 14:48, Giles Bathgate <[hidden email]> wrote:

In this scenario I think of stl as binarys that you wouldn't usually check into source control. I am sure we can figure out how to get cgal to be more predictable in the future.

Regards

Giles


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad


123