discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Project Announcement Makertron

DM
doug moen
Wed, Jul 19, 2017 5:18 PM

Alex said: "There seem to be a lot of people starting projects to re-create
OpenSCAD, in their own way, and none is anything like as compatible as I
would need them to be for them to be useful.  Even OpenJSCAD and FreeCAD
rarely open one of my designs from OpenSCAD..."

After spending a few years on the "OpenSCAD 2" project, my experience is
that creating a new language implementation with 100% backwards
compatibility with OpenSCAD is an extreme technical challenge, and I
eventually abandoned it as a goal. The problem is that the language is so
full of quirks that are not found in any other language, many of which are
undocumented. For one thing, the scoping rules are so weird that you can't
"transpile" OpenSCAD into a conventional language or compile into VM code
for a conventional language, and preserve the semantics.

In my opinion, the practical way to achieve full backwards compatibility is
to use the existing OpenSCAD interpreter to compile an OpenSCAD script into
a CSG tree, then write a back end that processes that CSG tree.

Mixotricha's approach leads to an OpenSCAD-like language that isn't fully
backwards compatible. You won't be able to take arbitrary OpenSCAD scripts
off Thingiverse or whatever and expect them to just work without being
"ported" to MakerTron. However, if you are writing new code from scratch,
then you should be able to write code that is portable between OpenSCAD and
MakerTron.

The first example I tried was:
cylinder(r=1,h=5,$fs=6);
This is the OpenSCAD idiom for a hexagonal prism. What I got instead was a
cylinder with a circular cross section.

I also tried
x = 1;
function x(a) = a + 1;
module x(a) cube(x(x));
x(2);
but I didn't get a result back, and lost contact with the makertron server.

On 19 July 2017 at 05:13, Alex Gibson alex@alexgibson.net wrote:

Hi there Mixotricha,

I was quite excited but I tried to copy-paste 3 Openscad files of sharply
decreasing complexity, and none of them would produce an object, or even an
error.

When I refreshed the page, I couldn't get back to the original example
file that first greeted me - so maybe a browser caching issue?

There seem to be a lot of people starting projects to re-create OpenSCAD,
in their own way, and none is anything like as compatible as I would need
them to be for them to be useful.  Even OpenJSCAD and FreeCAD rarely open
one of my designs from OpenSCAD...

For example, supporting 'minkowski' is an absolute must, intersections,
linear extrudes, logic and ideally text functions - some way to handle
fonts could complicate this but it would be worth it!  How would we call a
function from a separate file?  That sort of thing...

Cheers
Alex

-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of
MichaelAtOz
Sent: 19 July 2017 03:27
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Project Announcement Makertron

mixotricha wrote

Hello All,

I'd like to announce Makertron.
http://makertron.io http://makertron.io

It is an alternative I am working on that addresses some of problems I
see with OpenSCAD and with OpenJSCAD.

It is a bit like ImplicitCad in that it has a server back end -but- it
also has a client front end.

I have seen a few people have a go at this but none of them were quite
doing what I needed or had some core implementation problems.

I've gone after some of those and tried to resolve them.

I'd love to get some feedback and would be happy to help answer any
questions about my project.

Greetings From Australia

Damien

"At least 90% of the OpenSCAD language specification is now supported"

Is that documented?


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/
Project-Announcement-Makertron-tp21849p21853.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

Alex said: "There seem to be a lot of people starting projects to re-create OpenSCAD, in their own way, and none is anything like as compatible as I would need them to be for them to be useful. Even OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..." After spending a few years on the "OpenSCAD 2" project, my experience is that creating a new language implementation with 100% backwards compatibility with OpenSCAD is an extreme technical challenge, and I eventually abandoned it as a goal. The problem is that the language is so full of quirks that are not found in any other language, many of which are undocumented. For one thing, the scoping rules are so weird that you can't "transpile" OpenSCAD into a conventional language or compile into VM code for a conventional language, and preserve the semantics. In my opinion, the practical way to achieve full backwards compatibility is to use the existing OpenSCAD interpreter to compile an OpenSCAD script into a CSG tree, then write a back end that processes that CSG tree. Mixotricha's approach leads to an OpenSCAD-like language that isn't fully backwards compatible. You won't be able to take arbitrary OpenSCAD scripts off Thingiverse or whatever and expect them to just work without being "ported" to MakerTron. However, if you are writing new code from scratch, then you should be able to write code that is portable between OpenSCAD and MakerTron. The first example I tried was: cylinder(r=1,h=5,$fs=6); This is the OpenSCAD idiom for a hexagonal prism. What I got instead was a cylinder with a circular cross section. I also tried x = 1; function x(a) = a + 1; module x(a) cube(x(x)); x(2); but I didn't get a result back, and lost contact with the makertron server. On 19 July 2017 at 05:13, Alex Gibson <alex@alexgibson.net> wrote: > Hi there Mixotricha, > > I was quite excited but I tried to copy-paste 3 Openscad files of sharply > decreasing complexity, and none of them would produce an object, or even an > error. > > When I refreshed the page, I couldn't get back to the original example > file that first greeted me - so maybe a browser caching issue? > > There seem to be a lot of people starting projects to re-create OpenSCAD, > in their own way, and none is anything like as compatible as I would need > them to be for them to be useful. Even OpenJSCAD and FreeCAD rarely open > one of my designs from OpenSCAD... > > For example, supporting 'minkowski' is an absolute must, intersections, > linear extrudes, logic and ideally text functions - some way to handle > fonts could complicate this but it would be worth it! How would we call a > function from a separate file? That sort of thing... > > Cheers > Alex > > -----Original Message----- > From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of > MichaelAtOz > Sent: 19 July 2017 03:27 > To: discuss@lists.openscad.org > Subject: Re: [OpenSCAD] Project Announcement Makertron > > mixotricha wrote > > Hello All, > > > > I'd like to announce Makertron. > > http://makertron.io <http://makertron.io> > > > > It is an alternative I am working on that addresses some of problems I > > see with OpenSCAD and with OpenJSCAD. > > > > It is a bit like ImplicitCad in that it has a server back end -but- it > > also has a client front end. > > > > I have seen a few people have a go at this but none of them were quite > > doing what I needed or had some core implementation problems. > > > > I've gone after some of those and tried to resolve them. > > > > I'd love to get some feedback and would be happy to help answer any > > questions about my project. > > > > Greetings From Australia > > > > Damien > > "At least 90% of the OpenSCAD language specification is now supported" > > Is that documented? > > > > > ----- > Admin - PM me if you need anything, or if I've done something stupid... > > Unless specifically shown otherwise above, my contribution is in the > Public Domain; to the extent possible under law, I have waived all > copyright and related or neighbouring rights to this work. Obviously > inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! > http://www.ourfairdeal.org/ time is running out! > -- > View this message in context: http://forum.openscad.org/ > Project-Announcement-Makertron-tp21849p21853.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
Wed, Jul 19, 2017 5:25 PM

Sorry, I accidently sent that message before I was finished writing it, and
it contained a typo, i wrote $fs where i meant $fn.

On 19 July 2017 at 13:18, doug moen doug@moens.org wrote:

Alex said: "There seem to be a lot of people starting projects to
re-create OpenSCAD, in their own way, and none is anything like as
compatible as I would need them to be for them to be useful.  Even
OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..."

After spending a few years on the "OpenSCAD 2" project, my experience is
that creating a new language implementation with 100% backwards
compatibility with OpenSCAD is an extreme technical challenge, and I
eventually abandoned it as a goal. The problem is that the language is so
full of quirks that are not found in any other language, many of which are
undocumented. For one thing, the scoping rules are so weird that you can't
"transpile" OpenSCAD into a conventional language or compile into VM code
for a conventional language, and preserve the semantics.

In my opinion, the practical way to achieve full backwards compatibility
is to use the existing OpenSCAD interpreter to compile an OpenSCAD script
into a CSG tree, then write a back end that processes that CSG tree.

Mixotricha's approach leads to an OpenSCAD-like language that isn't fully
backwards compatible. You won't be able to take arbitrary OpenSCAD scripts
off Thingiverse or whatever and expect them to just work without being
"ported" to MakerTron. However, if you are writing new code from scratch,
then you should be able to write code that is portable between OpenSCAD and
MakerTron.

The first example I tried was:
cylinder(r=1,h=5,$fs=6);
This is the OpenSCAD idiom for a hexagonal prism. What I got instead was a
cylinder with a circular cross section.

I also tried
x = 1;
function x(a) = a + 1;
module x(a) cube(x(x));
x(2);
but I didn't get a result back, and lost contact with the makertron server.

On 19 July 2017 at 05:13, Alex Gibson alex@alexgibson.net wrote:

Hi there Mixotricha,

I was quite excited but I tried to copy-paste 3 Openscad files of sharply
decreasing complexity, and none of them would produce an object, or even an
error.

When I refreshed the page, I couldn't get back to the original example
file that first greeted me - so maybe a browser caching issue?

There seem to be a lot of people starting projects to re-create OpenSCAD,
in their own way, and none is anything like as compatible as I would need
them to be for them to be useful.  Even OpenJSCAD and FreeCAD rarely open
one of my designs from OpenSCAD...

For example, supporting 'minkowski' is an absolute must, intersections,
linear extrudes, logic and ideally text functions - some way to handle
fonts could complicate this but it would be worth it!  How would we call a
function from a separate file?  That sort of thing...

Cheers
Alex

-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of
MichaelAtOz
Sent: 19 July 2017 03:27
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Project Announcement Makertron

mixotricha wrote

Hello All,

I'd like to announce Makertron.
http://makertron.io http://makertron.io

It is an alternative I am working on that addresses some of problems I
see with OpenSCAD and with OpenJSCAD.

It is a bit like ImplicitCad in that it has a server back end -but- it
also has a client front end.

I have seen a few people have a go at this but none of them were quite
doing what I needed or had some core implementation problems.

I've gone after some of those and tried to resolve them.

I'd love to get some feedback and would be happy to help answer any
questions about my project.

Greetings From Australia

Damien

"At least 90% of the OpenSCAD language specification is now supported"

Is that documented?


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Proj
ect-Announcement-Makertron-tp21849p21853.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

Sorry, I accidently sent that message before I was finished writing it, and it contained a typo, i wrote $fs where i meant $fn. On 19 July 2017 at 13:18, doug moen <doug@moens.org> wrote: > Alex said: "There seem to be a lot of people starting projects to > re-create OpenSCAD, in their own way, and none is anything like as > compatible as I would need them to be for them to be useful. Even > OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..." > > After spending a few years on the "OpenSCAD 2" project, my experience is > that creating a new language implementation with 100% backwards > compatibility with OpenSCAD is an extreme technical challenge, and I > eventually abandoned it as a goal. The problem is that the language is so > full of quirks that are not found in any other language, many of which are > undocumented. For one thing, the scoping rules are so weird that you can't > "transpile" OpenSCAD into a conventional language or compile into VM code > for a conventional language, and preserve the semantics. > > In my opinion, the practical way to achieve full backwards compatibility > is to use the existing OpenSCAD interpreter to compile an OpenSCAD script > into a CSG tree, then write a back end that processes that CSG tree. > > Mixotricha's approach leads to an OpenSCAD-like language that isn't fully > backwards compatible. You won't be able to take arbitrary OpenSCAD scripts > off Thingiverse or whatever and expect them to just work without being > "ported" to MakerTron. However, if you are writing new code from scratch, > then you should be able to write code that is portable between OpenSCAD and > MakerTron. > > The first example I tried was: > cylinder(r=1,h=5,$fs=6); > This is the OpenSCAD idiom for a hexagonal prism. What I got instead was a > cylinder with a circular cross section. > > I also tried > x = 1; > function x(a) = a + 1; > module x(a) cube(x(x)); > x(2); > but I didn't get a result back, and lost contact with the makertron server. > > > On 19 July 2017 at 05:13, Alex Gibson <alex@alexgibson.net> wrote: > >> Hi there Mixotricha, >> >> I was quite excited but I tried to copy-paste 3 Openscad files of sharply >> decreasing complexity, and none of them would produce an object, or even an >> error. >> >> When I refreshed the page, I couldn't get back to the original example >> file that first greeted me - so maybe a browser caching issue? >> >> There seem to be a lot of people starting projects to re-create OpenSCAD, >> in their own way, and none is anything like as compatible as I would need >> them to be for them to be useful. Even OpenJSCAD and FreeCAD rarely open >> one of my designs from OpenSCAD... >> >> For example, supporting 'minkowski' is an absolute must, intersections, >> linear extrudes, logic and ideally text functions - some way to handle >> fonts could complicate this but it would be worth it! How would we call a >> function from a separate file? That sort of thing... >> >> Cheers >> Alex >> >> -----Original Message----- >> From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of >> MichaelAtOz >> Sent: 19 July 2017 03:27 >> To: discuss@lists.openscad.org >> Subject: Re: [OpenSCAD] Project Announcement Makertron >> >> mixotricha wrote >> > Hello All, >> > >> > I'd like to announce Makertron. >> > http://makertron.io <http://makertron.io> >> > >> > It is an alternative I am working on that addresses some of problems I >> > see with OpenSCAD and with OpenJSCAD. >> > >> > It is a bit like ImplicitCad in that it has a server back end -but- it >> > also has a client front end. >> > >> > I have seen a few people have a go at this but none of them were quite >> > doing what I needed or had some core implementation problems. >> > >> > I've gone after some of those and tried to resolve them. >> > >> > I'd love to get some feedback and would be happy to help answer any >> > questions about my project. >> > >> > Greetings From Australia >> > >> > Damien >> >> "At least 90% of the OpenSCAD language specification is now supported" >> >> Is that documented? >> >> >> >> >> ----- >> Admin - PM me if you need anything, or if I've done something stupid... >> >> Unless specifically shown otherwise above, my contribution is in the >> Public Domain; to the extent possible under law, I have waived all >> copyright and related or neighbouring rights to this work. Obviously >> inclusion of works of previous authors is not included in the above. >> >> The TPP is no simple “trade agreement.” Fight it! >> http://www.ourfairdeal.org/ time is running out! >> -- >> View this message in context: http://forum.openscad.org/Proj >> ect-Announcement-Makertron-tp21849p21853.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 >> > >
DT
Damien Towning
Thu, Jul 20, 2017 12:58 AM

In my opinion, the practical way to achieve full backwards compatibility is
to use the existing OpenSCAD interpreter to compile an OpenSCAD script into
a CSG tree, then write a back end that processes that CSG tree.

If you are interested my previous work on this did exactly that. It is in
my humbaba tree. I went through this. Putting a socket layer on OpenSCAD is
trivial. Building it in to a shared library so I could access it through
nodeJS also trivial.  But then what you will find is issues with speed and
the complex pathway for multiple rendering targets. The roadblock that
emerged was interaction between a client side interface in something like
react and dealing with the OpenCSG/Goldfeather approach. Making OpenSCAD
headless is not hard. But the rest of it will rapidly lead you to a series
of painful roadblocks. I've got a better way. Think transpiler. Not parser.
The examples you have given above are excellent and also things that can be
fixed. I've had the client up live for one day and this sort of input is
exactly what I needed. Keep them coming.

On Thu, Jul 20, 2017 at 3:25 AM, doug moen doug@moens.org wrote:

Sorry, I accidently sent that message before I was finished writing it,
and it contained a typo, i wrote $fs where i meant $fn.

On 19 July 2017 at 13:18, doug moen doug@moens.org wrote:

Alex said: "There seem to be a lot of people starting projects to
re-create OpenSCAD, in their own way, and none is anything like as
compatible as I would need them to be for them to be useful.  Even
OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..."

After spending a few years on the "OpenSCAD 2" project, my experience is
that creating a new language implementation with 100% backwards
compatibility with OpenSCAD is an extreme technical challenge, and I
eventually abandoned it as a goal. The problem is that the language is so
full of quirks that are not found in any other language, many of which are
undocumented. For one thing, the scoping rules are so weird that you can't
"transpile" OpenSCAD into a conventional language or compile into VM code
for a conventional language, and preserve the semantics.

In my opinion, the practical way to achieve full backwards compatibility
is to use the existing OpenSCAD interpreter to compile an OpenSCAD script
into a CSG tree, then write a back end that processes that CSG tree.

Mixotricha's approach leads to an OpenSCAD-like language that isn't fully
backwards compatible. You won't be able to take arbitrary OpenSCAD scripts
off Thingiverse or whatever and expect them to just work without being
"ported" to MakerTron. However, if you are writing new code from scratch,
then you should be able to write code that is portable between OpenSCAD and
MakerTron.

The first example I tried was:
cylinder(r=1,h=5,$fs=6);
This is the OpenSCAD idiom for a hexagonal prism. What I got instead was
a cylinder with a circular cross section.

I also tried
x = 1;
function x(a) = a + 1;
module x(a) cube(x(x));
x(2);
but I didn't get a result back, and lost contact with the makertron
server.

On 19 July 2017 at 05:13, Alex Gibson alex@alexgibson.net wrote:

Hi there Mixotricha,

I was quite excited but I tried to copy-paste 3 Openscad files of
sharply decreasing complexity, and none of them would produce an object, or
even an error.

When I refreshed the page, I couldn't get back to the original example
file that first greeted me - so maybe a browser caching issue?

There seem to be a lot of people starting projects to re-create
OpenSCAD, in their own way, and none is anything like as compatible as I
would need them to be for them to be useful.  Even OpenJSCAD and FreeCAD
rarely open one of my designs from OpenSCAD...

For example, supporting 'minkowski' is an absolute must, intersections,
linear extrudes, logic and ideally text functions - some way to handle
fonts could complicate this but it would be worth it!  How would we call a
function from a separate file?  That sort of thing...

Cheers
Alex

-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of
MichaelAtOz
Sent: 19 July 2017 03:27
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Project Announcement Makertron

mixotricha wrote

Hello All,

I'd like to announce Makertron.
http://makertron.io http://makertron.io

It is an alternative I am working on that addresses some of problems I
see with OpenSCAD and with OpenJSCAD.

It is a bit like ImplicitCad in that it has a server back end -but- it
also has a client front end.

I have seen a few people have a go at this but none of them were quite
doing what I needed or had some core implementation problems.

I've gone after some of those and tried to resolve them.

I'd love to get some feedback and would be happy to help answer any
questions about my project.

Greetings From Australia

Damien

"At least 90% of the OpenSCAD language specification is now supported"

Is that documented?


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Proj
ect-Announcement-Makertron-tp21849p21853.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

--
Damien Towning
CEO / Developer
http://makertron.io

In my opinion, the practical way to achieve full backwards compatibility is to use the existing OpenSCAD interpreter to compile an OpenSCAD script into a CSG tree, then write a back end that processes that CSG tree. If you are interested my previous work on this did exactly that. It is in my humbaba tree. I went through this. Putting a socket layer on OpenSCAD is trivial. Building it in to a shared library so I could access it through nodeJS also trivial. But then what you will find is issues with speed and the complex pathway for multiple rendering targets. The roadblock that emerged was interaction between a client side interface in something like react and dealing with the OpenCSG/Goldfeather approach. Making OpenSCAD headless is not hard. But the rest of it will rapidly lead you to a series of painful roadblocks. I've got a better way. Think transpiler. Not parser. The examples you have given above are excellent and also things that can be fixed. I've had the client up live for one day and this sort of input is exactly what I needed. Keep them coming. On Thu, Jul 20, 2017 at 3:25 AM, doug moen <doug@moens.org> wrote: > Sorry, I accidently sent that message before I was finished writing it, > and it contained a typo, i wrote $fs where i meant $fn. > > On 19 July 2017 at 13:18, doug moen <doug@moens.org> wrote: > >> Alex said: "There seem to be a lot of people starting projects to >> re-create OpenSCAD, in their own way, and none is anything like as >> compatible as I would need them to be for them to be useful. Even >> OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..." >> >> After spending a few years on the "OpenSCAD 2" project, my experience is >> that creating a new language implementation with 100% backwards >> compatibility with OpenSCAD is an extreme technical challenge, and I >> eventually abandoned it as a goal. The problem is that the language is so >> full of quirks that are not found in any other language, many of which are >> undocumented. For one thing, the scoping rules are so weird that you can't >> "transpile" OpenSCAD into a conventional language or compile into VM code >> for a conventional language, and preserve the semantics. >> >> In my opinion, the practical way to achieve full backwards compatibility >> is to use the existing OpenSCAD interpreter to compile an OpenSCAD script >> into a CSG tree, then write a back end that processes that CSG tree. >> >> Mixotricha's approach leads to an OpenSCAD-like language that isn't fully >> backwards compatible. You won't be able to take arbitrary OpenSCAD scripts >> off Thingiverse or whatever and expect them to just work without being >> "ported" to MakerTron. However, if you are writing new code from scratch, >> then you should be able to write code that is portable between OpenSCAD and >> MakerTron. >> >> The first example I tried was: >> cylinder(r=1,h=5,$fs=6); >> This is the OpenSCAD idiom for a hexagonal prism. What I got instead was >> a cylinder with a circular cross section. >> >> I also tried >> x = 1; >> function x(a) = a + 1; >> module x(a) cube(x(x)); >> x(2); >> but I didn't get a result back, and lost contact with the makertron >> server. >> >> >> On 19 July 2017 at 05:13, Alex Gibson <alex@alexgibson.net> wrote: >> >>> Hi there Mixotricha, >>> >>> I was quite excited but I tried to copy-paste 3 Openscad files of >>> sharply decreasing complexity, and none of them would produce an object, or >>> even an error. >>> >>> When I refreshed the page, I couldn't get back to the original example >>> file that first greeted me - so maybe a browser caching issue? >>> >>> There seem to be a lot of people starting projects to re-create >>> OpenSCAD, in their own way, and none is anything like as compatible as I >>> would need them to be for them to be useful. Even OpenJSCAD and FreeCAD >>> rarely open one of my designs from OpenSCAD... >>> >>> For example, supporting 'minkowski' is an absolute must, intersections, >>> linear extrudes, logic and ideally text functions - some way to handle >>> fonts could complicate this but it would be worth it! How would we call a >>> function from a separate file? That sort of thing... >>> >>> Cheers >>> Alex >>> >>> -----Original Message----- >>> From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of >>> MichaelAtOz >>> Sent: 19 July 2017 03:27 >>> To: discuss@lists.openscad.org >>> Subject: Re: [OpenSCAD] Project Announcement Makertron >>> >>> mixotricha wrote >>> > Hello All, >>> > >>> > I'd like to announce Makertron. >>> > http://makertron.io <http://makertron.io> >>> > >>> > It is an alternative I am working on that addresses some of problems I >>> > see with OpenSCAD and with OpenJSCAD. >>> > >>> > It is a bit like ImplicitCad in that it has a server back end -but- it >>> > also has a client front end. >>> > >>> > I have seen a few people have a go at this but none of them were quite >>> > doing what I needed or had some core implementation problems. >>> > >>> > I've gone after some of those and tried to resolve them. >>> > >>> > I'd love to get some feedback and would be happy to help answer any >>> > questions about my project. >>> > >>> > Greetings From Australia >>> > >>> > Damien >>> >>> "At least 90% of the OpenSCAD language specification is now supported" >>> >>> Is that documented? >>> >>> >>> >>> >>> ----- >>> Admin - PM me if you need anything, or if I've done something stupid... >>> >>> Unless specifically shown otherwise above, my contribution is in the >>> Public Domain; to the extent possible under law, I have waived all >>> copyright and related or neighbouring rights to this work. Obviously >>> inclusion of works of previous authors is not included in the above. >>> >>> The TPP is no simple “trade agreement.” Fight it! >>> http://www.ourfairdeal.org/ time is running out! >>> -- >>> View this message in context: http://forum.openscad.org/Proj >>> ect-Announcement-Makertron-tp21849p21853.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 >>> >> >> > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > -- Damien Towning CEO / Developer http://makertron.io
DT
Damien Towning
Thu, Jul 20, 2017 1:26 AM

I also forgot to say also that having made the OpenSCAD headless it brings
one to thinking about moving the parser as a whole. After all the grammar
is already provided. But as I am sure you know ( and as is often the case
with any grammar ) moving the OpenSCAD grammar as it currently stands to a
new target is not at all trivial. So I changed my thinking. Don't write a
parser. Write a transpiler. Everything OpenSCAD does results in a stack of
geometrical operations. You can get to those operations via a transpile.
You can also address quirks in a really powerful way in a transpile. The
example I would give of that is the lazy OpenSCAD closure.

On Thu, Jul 20, 2017 at 10:58 AM, Damien Towning connolly.damien@gmail.com
wrote:

In my opinion, the practical way to achieve full backwards compatibility
is to use the existing OpenSCAD interpreter to compile an OpenSCAD script
into a CSG tree, then write a back end that processes that CSG tree.

If you are interested my previous work on this did exactly that. It is in
my humbaba tree. I went through this. Putting a socket layer on OpenSCAD is
trivial. Building it in to a shared library so I could access it through
nodeJS also trivial.  But then what you will find is issues with speed and
the complex pathway for multiple rendering targets. The roadblock that
emerged was interaction between a client side interface in something like
react and dealing with the OpenCSG/Goldfeather approach. Making OpenSCAD
headless is not hard. But the rest of it will rapidly lead you to a series
of painful roadblocks. I've got a better way. Think transpiler. Not parser.
The examples you have given above are excellent and also things that can be
fixed. I've had the client up live for one day and this sort of input is
exactly what I needed. Keep them coming.

On Thu, Jul 20, 2017 at 3:25 AM, doug moen doug@moens.org wrote:

Sorry, I accidently sent that message before I was finished writing it,
and it contained a typo, i wrote $fs where i meant $fn.

On 19 July 2017 at 13:18, doug moen doug@moens.org wrote:

Alex said: "There seem to be a lot of people starting projects to
re-create OpenSCAD, in their own way, and none is anything like as
compatible as I would need them to be for them to be useful.  Even
OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..."

After spending a few years on the "OpenSCAD 2" project, my experience is
that creating a new language implementation with 100% backwards
compatibility with OpenSCAD is an extreme technical challenge, and I
eventually abandoned it as a goal. The problem is that the language is so
full of quirks that are not found in any other language, many of which are
undocumented. For one thing, the scoping rules are so weird that you can't
"transpile" OpenSCAD into a conventional language or compile into VM code
for a conventional language, and preserve the semantics.

In my opinion, the practical way to achieve full backwards compatibility
is to use the existing OpenSCAD interpreter to compile an OpenSCAD script
into a CSG tree, then write a back end that processes that CSG tree.

Mixotricha's approach leads to an OpenSCAD-like language that isn't
fully backwards compatible. You won't be able to take arbitrary OpenSCAD
scripts off Thingiverse or whatever and expect them to just work without
being "ported" to MakerTron. However, if you are writing new code from
scratch, then you should be able to write code that is portable between
OpenSCAD and MakerTron.

The first example I tried was:
cylinder(r=1,h=5,$fs=6);
This is the OpenSCAD idiom for a hexagonal prism. What I got instead was
a cylinder with a circular cross section.

I also tried
x = 1;
function x(a) = a + 1;
module x(a) cube(x(x));
x(2);
but I didn't get a result back, and lost contact with the makertron
server.

On 19 July 2017 at 05:13, Alex Gibson alex@alexgibson.net wrote:

Hi there Mixotricha,

I was quite excited but I tried to copy-paste 3 Openscad files of
sharply decreasing complexity, and none of them would produce an object, or
even an error.

When I refreshed the page, I couldn't get back to the original example
file that first greeted me - so maybe a browser caching issue?

There seem to be a lot of people starting projects to re-create
OpenSCAD, in their own way, and none is anything like as compatible as I
would need them to be for them to be useful.  Even OpenJSCAD and FreeCAD
rarely open one of my designs from OpenSCAD...

For example, supporting 'minkowski' is an absolute must, intersections,
linear extrudes, logic and ideally text functions - some way to handle
fonts could complicate this but it would be worth it!  How would we call a
function from a separate file?  That sort of thing...

Cheers
Alex

-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of
MichaelAtOz
Sent: 19 July 2017 03:27
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Project Announcement Makertron

mixotricha wrote

Hello All,

I'd like to announce Makertron.
http://makertron.io http://makertron.io

It is an alternative I am working on that addresses some of problems I
see with OpenSCAD and with OpenJSCAD.

It is a bit like ImplicitCad in that it has a server back end -but- it
also has a client front end.

I have seen a few people have a go at this but none of them were quite
doing what I needed or had some core implementation problems.

I've gone after some of those and tried to resolve them.

I'd love to get some feedback and would be happy to help answer any
questions about my project.

Greetings From Australia

Damien

"At least 90% of the OpenSCAD language specification is now supported"

Is that documented?


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Proj
ect-Announcement-Makertron-tp21849p21853.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

--
Damien Towning
CEO / Developer
http://makertron.io

--
Damien Towning
CEO / Developer
http://makertron.io

I also forgot to say also that having made the OpenSCAD headless it brings one to thinking about moving the parser as a whole. After all the grammar is already provided. But as I am sure you know ( and as is often the case with any grammar ) moving the OpenSCAD grammar as it currently stands to a new target is not at all trivial. So I changed my thinking. Don't write a parser. Write a transpiler. Everything OpenSCAD does results in a stack of geometrical operations. You can get to those operations via a transpile. You can also address quirks in a really powerful way in a transpile. The example I would give of that is the lazy OpenSCAD closure. On Thu, Jul 20, 2017 at 10:58 AM, Damien Towning <connolly.damien@gmail.com> wrote: > In my opinion, the practical way to achieve full backwards compatibility > is to use the existing OpenSCAD interpreter to compile an OpenSCAD script > into a CSG tree, then write a back end that processes that CSG tree. > > If you are interested my previous work on this did exactly that. It is in > my humbaba tree. I went through this. Putting a socket layer on OpenSCAD is > trivial. Building it in to a shared library so I could access it through > nodeJS also trivial. But then what you will find is issues with speed and > the complex pathway for multiple rendering targets. The roadblock that > emerged was interaction between a client side interface in something like > react and dealing with the OpenCSG/Goldfeather approach. Making OpenSCAD > headless is not hard. But the rest of it will rapidly lead you to a series > of painful roadblocks. I've got a better way. Think transpiler. Not parser. > The examples you have given above are excellent and also things that can be > fixed. I've had the client up live for one day and this sort of input is > exactly what I needed. Keep them coming. > > > > > On Thu, Jul 20, 2017 at 3:25 AM, doug moen <doug@moens.org> wrote: > >> Sorry, I accidently sent that message before I was finished writing it, >> and it contained a typo, i wrote $fs where i meant $fn. >> >> On 19 July 2017 at 13:18, doug moen <doug@moens.org> wrote: >> >>> Alex said: "There seem to be a lot of people starting projects to >>> re-create OpenSCAD, in their own way, and none is anything like as >>> compatible as I would need them to be for them to be useful. Even >>> OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..." >>> >>> After spending a few years on the "OpenSCAD 2" project, my experience is >>> that creating a new language implementation with 100% backwards >>> compatibility with OpenSCAD is an extreme technical challenge, and I >>> eventually abandoned it as a goal. The problem is that the language is so >>> full of quirks that are not found in any other language, many of which are >>> undocumented. For one thing, the scoping rules are so weird that you can't >>> "transpile" OpenSCAD into a conventional language or compile into VM code >>> for a conventional language, and preserve the semantics. >>> >>> In my opinion, the practical way to achieve full backwards compatibility >>> is to use the existing OpenSCAD interpreter to compile an OpenSCAD script >>> into a CSG tree, then write a back end that processes that CSG tree. >>> >>> Mixotricha's approach leads to an OpenSCAD-like language that isn't >>> fully backwards compatible. You won't be able to take arbitrary OpenSCAD >>> scripts off Thingiverse or whatever and expect them to just work without >>> being "ported" to MakerTron. However, if you are writing new code from >>> scratch, then you should be able to write code that is portable between >>> OpenSCAD and MakerTron. >>> >>> The first example I tried was: >>> cylinder(r=1,h=5,$fs=6); >>> This is the OpenSCAD idiom for a hexagonal prism. What I got instead was >>> a cylinder with a circular cross section. >>> >>> I also tried >>> x = 1; >>> function x(a) = a + 1; >>> module x(a) cube(x(x)); >>> x(2); >>> but I didn't get a result back, and lost contact with the makertron >>> server. >>> >>> >>> On 19 July 2017 at 05:13, Alex Gibson <alex@alexgibson.net> wrote: >>> >>>> Hi there Mixotricha, >>>> >>>> I was quite excited but I tried to copy-paste 3 Openscad files of >>>> sharply decreasing complexity, and none of them would produce an object, or >>>> even an error. >>>> >>>> When I refreshed the page, I couldn't get back to the original example >>>> file that first greeted me - so maybe a browser caching issue? >>>> >>>> There seem to be a lot of people starting projects to re-create >>>> OpenSCAD, in their own way, and none is anything like as compatible as I >>>> would need them to be for them to be useful. Even OpenJSCAD and FreeCAD >>>> rarely open one of my designs from OpenSCAD... >>>> >>>> For example, supporting 'minkowski' is an absolute must, intersections, >>>> linear extrudes, logic and ideally text functions - some way to handle >>>> fonts could complicate this but it would be worth it! How would we call a >>>> function from a separate file? That sort of thing... >>>> >>>> Cheers >>>> Alex >>>> >>>> -----Original Message----- >>>> From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of >>>> MichaelAtOz >>>> Sent: 19 July 2017 03:27 >>>> To: discuss@lists.openscad.org >>>> Subject: Re: [OpenSCAD] Project Announcement Makertron >>>> >>>> mixotricha wrote >>>> > Hello All, >>>> > >>>> > I'd like to announce Makertron. >>>> > http://makertron.io <http://makertron.io> >>>> > >>>> > It is an alternative I am working on that addresses some of problems I >>>> > see with OpenSCAD and with OpenJSCAD. >>>> > >>>> > It is a bit like ImplicitCad in that it has a server back end -but- it >>>> > also has a client front end. >>>> > >>>> > I have seen a few people have a go at this but none of them were quite >>>> > doing what I needed or had some core implementation problems. >>>> > >>>> > I've gone after some of those and tried to resolve them. >>>> > >>>> > I'd love to get some feedback and would be happy to help answer any >>>> > questions about my project. >>>> > >>>> > Greetings From Australia >>>> > >>>> > Damien >>>> >>>> "At least 90% of the OpenSCAD language specification is now supported" >>>> >>>> Is that documented? >>>> >>>> >>>> >>>> >>>> ----- >>>> Admin - PM me if you need anything, or if I've done something stupid... >>>> >>>> Unless specifically shown otherwise above, my contribution is in the >>>> Public Domain; to the extent possible under law, I have waived all >>>> copyright and related or neighbouring rights to this work. Obviously >>>> inclusion of works of previous authors is not included in the above. >>>> >>>> The TPP is no simple “trade agreement.” Fight it! >>>> http://www.ourfairdeal.org/ time is running out! >>>> -- >>>> View this message in context: http://forum.openscad.org/Proj >>>> ect-Announcement-Makertron-tp21849p21853.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 >>>> >>> >>> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > > -- > Damien Towning > CEO / Developer > http://makertron.io > > -- Damien Towning CEO / Developer http://makertron.io
DM
doug moen
Thu, Jul 20, 2017 5:25 AM

I'm having difficulty following you; we may be using terminology
differently.

OpenSCAD proceses a script using the following steps:

  • the parser converts the script to a parse tree
  • the evaluator converts the parse tree to a CSG tree
  • the renderer converts the CSG tree to the final product. OpenSCAD has a
    previewer that uses OpenCSG, and a mesh generator that uses CGAL. You can
    also dump the CSG tree as text (a simplified OpenSCAD script), without
    further processing.

A transpiler is basically a compiler that converts source code in one
language to source code in another language. A transpiler will always have
a parser as the first step of processing. So I don't know what you
mean by "Don't
write a parser. Write a transpiler."

In OpenSCAD, the parser is not very difficult to write. But it is extremely
difficult to transpile OpenSCAD into another language without first using
the OpenSCAD evaluator to construct a CSG tree. That's because of the very
unusual dynamic scoping rules used by the evaluator. Within a function or
module, the meaning of an identifier is only known at run time. A
transpiler would either interpret identifiers using static scoping rules,
which doesn't work, or it would have to transpile into another language
that uses the exact same dynamic scoping rules (which aren't documented,
and which I never fully succeeded in reverse engineering.) What you want to
do is transpile the CSG tree into your final format. The CSG tree also has
OpenSCAD syntax, but it's a subset that eliminates all of the hard
problems, so you can feed that into your existing transpiler.

On 19 July 2017 at 20:58, Damien Towning connolly.damien@gmail.com wrote:

In my opinion, the practical way to achieve full backwards compatibility
is to use the existing OpenSCAD interpreter to compile an OpenSCAD script
into a CSG tree, then write a back end that processes that CSG tree.

If you are interested my previous work on this did exactly that. It is in
my humbaba tree. I went through this. Putting a socket layer on OpenSCAD is
trivial. Building it in to a shared library so I could access it through
nodeJS also trivial.  But then what you will find is issues with speed and
the complex pathway for multiple rendering targets. The roadblock that
emerged was interaction between a client side interface in something like
react and dealing with the OpenCSG/Goldfeather approach. Making OpenSCAD
headless is not hard. But the rest of it will rapidly lead you to a series
of painful roadblocks. I've got a better way. Think transpiler. Not parser.
The examples you have given above are excellent and also things that can be
fixed. I've had the client up live for one day and this sort of input is
exactly what I needed. Keep them coming.

On Thu, Jul 20, 2017 at 3:25 AM, doug moen doug@moens.org wrote:

Sorry, I accidently sent that message before I was finished writing it,
and it contained a typo, i wrote $fs where i meant $fn.

On 19 July 2017 at 13:18, doug moen doug@moens.org wrote:

Alex said: "There seem to be a lot of people starting projects to
re-create OpenSCAD, in their own way, and none is anything like as
compatible as I would need them to be for them to be useful.  Even
OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..."

After spending a few years on the "OpenSCAD 2" project, my experience is
that creating a new language implementation with 100% backwards
compatibility with OpenSCAD is an extreme technical challenge, and I
eventually abandoned it as a goal. The problem is that the language is so
full of quirks that are not found in any other language, many of which are
undocumented. For one thing, the scoping rules are so weird that you can't
"transpile" OpenSCAD into a conventional language or compile into VM code
for a conventional language, and preserve the semantics.

In my opinion, the practical way to achieve full backwards compatibility
is to use the existing OpenSCAD interpreter to compile an OpenSCAD script
into a CSG tree, then write a back end that processes that CSG tree.

Mixotricha's approach leads to an OpenSCAD-like language that isn't
fully backwards compatible. You won't be able to take arbitrary OpenSCAD
scripts off Thingiverse or whatever and expect them to just work without
being "ported" to MakerTron. However, if you are writing new code from
scratch, then you should be able to write code that is portable between
OpenSCAD and MakerTron.

The first example I tried was:
cylinder(r=1,h=5,$fs=6);
This is the OpenSCAD idiom for a hexagonal prism. What I got instead was
a cylinder with a circular cross section.

I also tried
x = 1;
function x(a) = a + 1;
module x(a) cube(x(x));
x(2);
but I didn't get a result back, and lost contact with the makertron
server.

On 19 July 2017 at 05:13, Alex Gibson alex@alexgibson.net wrote:

Hi there Mixotricha,

I was quite excited but I tried to copy-paste 3 Openscad files of
sharply decreasing complexity, and none of them would produce an object, or
even an error.

When I refreshed the page, I couldn't get back to the original example
file that first greeted me - so maybe a browser caching issue?

There seem to be a lot of people starting projects to re-create
OpenSCAD, in their own way, and none is anything like as compatible as I
would need them to be for them to be useful.  Even OpenJSCAD and FreeCAD
rarely open one of my designs from OpenSCAD...

For example, supporting 'minkowski' is an absolute must, intersections,
linear extrudes, logic and ideally text functions - some way to handle
fonts could complicate this but it would be worth it!  How would we call a
function from a separate file?  That sort of thing...

Cheers
Alex

-----Original Message-----
From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of
MichaelAtOz
Sent: 19 July 2017 03:27
To: discuss@lists.openscad.org
Subject: Re: [OpenSCAD] Project Announcement Makertron

mixotricha wrote

Hello All,

I'd like to announce Makertron.
http://makertron.io http://makertron.io

It is an alternative I am working on that addresses some of problems I
see with OpenSCAD and with OpenJSCAD.

It is a bit like ImplicitCad in that it has a server back end -but- it
also has a client front end.

I have seen a few people have a go at this but none of them were quite
doing what I needed or had some core implementation problems.

I've gone after some of those and tried to resolve them.

I'd love to get some feedback and would be happy to help answer any
questions about my project.

Greetings From Australia

Damien

"At least 90% of the OpenSCAD language specification is now supported"

Is that documented?


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Proj
ect-Announcement-Makertron-tp21849p21853.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

I'm having difficulty following you; we may be using terminology differently. OpenSCAD proceses a script using the following steps: * the parser converts the script to a parse tree * the evaluator converts the parse tree to a CSG tree * the renderer converts the CSG tree to the final product. OpenSCAD has a previewer that uses OpenCSG, and a mesh generator that uses CGAL. You can also dump the CSG tree as text (a simplified OpenSCAD script), without further processing. A transpiler is basically a compiler that converts source code in one language to source code in another language. A transpiler will always have a parser as the first step of processing. So I don't know what you mean by "Don't write a parser. Write a transpiler." In OpenSCAD, the parser is not very difficult to write. But it is extremely difficult to transpile OpenSCAD into another language without first using the OpenSCAD evaluator to construct a CSG tree. That's because of the very unusual dynamic scoping rules used by the evaluator. Within a function or module, the meaning of an identifier is only known at run time. A transpiler would either interpret identifiers using static scoping rules, which doesn't work, or it would have to transpile into another language that uses the exact same dynamic scoping rules (which aren't documented, and which I never fully succeeded in reverse engineering.) What you want to do is transpile the CSG tree into your final format. The CSG tree also has OpenSCAD syntax, but it's a subset that eliminates all of the hard problems, so you can feed that into your existing transpiler. On 19 July 2017 at 20:58, Damien Towning <connolly.damien@gmail.com> wrote: > In my opinion, the practical way to achieve full backwards compatibility > is to use the existing OpenSCAD interpreter to compile an OpenSCAD script > into a CSG tree, then write a back end that processes that CSG tree. > > If you are interested my previous work on this did exactly that. It is in > my humbaba tree. I went through this. Putting a socket layer on OpenSCAD is > trivial. Building it in to a shared library so I could access it through > nodeJS also trivial. But then what you will find is issues with speed and > the complex pathway for multiple rendering targets. The roadblock that > emerged was interaction between a client side interface in something like > react and dealing with the OpenCSG/Goldfeather approach. Making OpenSCAD > headless is not hard. But the rest of it will rapidly lead you to a series > of painful roadblocks. I've got a better way. Think transpiler. Not parser. > The examples you have given above are excellent and also things that can be > fixed. I've had the client up live for one day and this sort of input is > exactly what I needed. Keep them coming. > > > > > On Thu, Jul 20, 2017 at 3:25 AM, doug moen <doug@moens.org> wrote: > >> Sorry, I accidently sent that message before I was finished writing it, >> and it contained a typo, i wrote $fs where i meant $fn. >> >> On 19 July 2017 at 13:18, doug moen <doug@moens.org> wrote: >> >>> Alex said: "There seem to be a lot of people starting projects to >>> re-create OpenSCAD, in their own way, and none is anything like as >>> compatible as I would need them to be for them to be useful. Even >>> OpenJSCAD and FreeCAD rarely open one of my designs from OpenSCAD..." >>> >>> After spending a few years on the "OpenSCAD 2" project, my experience is >>> that creating a new language implementation with 100% backwards >>> compatibility with OpenSCAD is an extreme technical challenge, and I >>> eventually abandoned it as a goal. The problem is that the language is so >>> full of quirks that are not found in any other language, many of which are >>> undocumented. For one thing, the scoping rules are so weird that you can't >>> "transpile" OpenSCAD into a conventional language or compile into VM code >>> for a conventional language, and preserve the semantics. >>> >>> In my opinion, the practical way to achieve full backwards compatibility >>> is to use the existing OpenSCAD interpreter to compile an OpenSCAD script >>> into a CSG tree, then write a back end that processes that CSG tree. >>> >>> Mixotricha's approach leads to an OpenSCAD-like language that isn't >>> fully backwards compatible. You won't be able to take arbitrary OpenSCAD >>> scripts off Thingiverse or whatever and expect them to just work without >>> being "ported" to MakerTron. However, if you are writing new code from >>> scratch, then you should be able to write code that is portable between >>> OpenSCAD and MakerTron. >>> >>> The first example I tried was: >>> cylinder(r=1,h=5,$fs=6); >>> This is the OpenSCAD idiom for a hexagonal prism. What I got instead was >>> a cylinder with a circular cross section. >>> >>> I also tried >>> x = 1; >>> function x(a) = a + 1; >>> module x(a) cube(x(x)); >>> x(2); >>> but I didn't get a result back, and lost contact with the makertron >>> server. >>> >>> >>> On 19 July 2017 at 05:13, Alex Gibson <alex@alexgibson.net> wrote: >>> >>>> Hi there Mixotricha, >>>> >>>> I was quite excited but I tried to copy-paste 3 Openscad files of >>>> sharply decreasing complexity, and none of them would produce an object, or >>>> even an error. >>>> >>>> When I refreshed the page, I couldn't get back to the original example >>>> file that first greeted me - so maybe a browser caching issue? >>>> >>>> There seem to be a lot of people starting projects to re-create >>>> OpenSCAD, in their own way, and none is anything like as compatible as I >>>> would need them to be for them to be useful. Even OpenJSCAD and FreeCAD >>>> rarely open one of my designs from OpenSCAD... >>>> >>>> For example, supporting 'minkowski' is an absolute must, intersections, >>>> linear extrudes, logic and ideally text functions - some way to handle >>>> fonts could complicate this but it would be worth it! How would we call a >>>> function from a separate file? That sort of thing... >>>> >>>> Cheers >>>> Alex >>>> >>>> -----Original Message----- >>>> From: Discuss [mailto:discuss-bounces@lists.openscad.org] On Behalf Of >>>> MichaelAtOz >>>> Sent: 19 July 2017 03:27 >>>> To: discuss@lists.openscad.org >>>> Subject: Re: [OpenSCAD] Project Announcement Makertron >>>> >>>> mixotricha wrote >>>> > Hello All, >>>> > >>>> > I'd like to announce Makertron. >>>> > http://makertron.io <http://makertron.io> >>>> > >>>> > It is an alternative I am working on that addresses some of problems I >>>> > see with OpenSCAD and with OpenJSCAD. >>>> > >>>> > It is a bit like ImplicitCad in that it has a server back end -but- it >>>> > also has a client front end. >>>> > >>>> > I have seen a few people have a go at this but none of them were quite >>>> > doing what I needed or had some core implementation problems. >>>> > >>>> > I've gone after some of those and tried to resolve them. >>>> > >>>> > I'd love to get some feedback and would be happy to help answer any >>>> > questions about my project. >>>> > >>>> > Greetings From Australia >>>> > >>>> > Damien >>>> >>>> "At least 90% of the OpenSCAD language specification is now supported" >>>> >>>> Is that documented? >>>> >>>> >>>> >>>> >>>> ----- >>>> Admin - PM me if you need anything, or if I've done something stupid... >>>> >>>> Unless specifically shown otherwise above, my contribution is in the >>>> Public Domain; to the extent possible under law, I have waived all >>>> copyright and related or neighbouring rights to this work. Obviously >>>> inclusion of works of previous authors is not included in the above. >>>> >>>> The TPP is no simple “trade agreement.” Fight it! >>>> http://www.ourfairdeal.org/ time is running out! >>>> -- >>>> View this message in context: http://forum.openscad.org/Proj >>>> ect-Announcement-Makertron-tp21849p21853.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 >>>> >>> >>> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> >> > > > -- > Damien Towning > CEO / Developer > http://makertron.io > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
TP
Torsten Paul
Thu, Jul 20, 2017 6:26 AM

On github it says:

Lastly the OpenSCAD parser while supporting an excellent CSG language
( though in some areas ambiguous ) is so glued to the interface and
supporting code that it is hard for the language to evolve or move
forwards from that interface. It is our opinion that this effort has
stalled and something new needed to be developed to address these
issues.

If that's one of the core premises, I'd suggest to have a look at
http://apidesign.org/

Also it would be interesting to have a look at that geometry engine
(quote "The Makertron server supports its own internal geometry
engine based on a BREP representation.") which seems to be based on
Open Cascade. I can only find shared libs in the server repo.

ciao,
Torsten.

On github it says: > Lastly the OpenSCAD parser while supporting an excellent CSG language > ( though in some areas ambiguous ) is so glued to the interface and > supporting code that it is hard for the language to evolve or move > forwards from that interface. It is our opinion that this effort has > stalled and something new needed to be developed to address these > issues. > If that's one of the core premises, I'd suggest to have a look at http://apidesign.org/ Also it would be interesting to have a look at that geometry engine (quote "The Makertron server supports its own internal geometry engine based on a BREP representation.") which seems to be based on Open Cascade. I can only find shared libs in the server repo. ciao, Torsten.
DT
Damien Towning
Fri, Jul 21, 2017 7:24 AM

Hi Alex,

I pushed a new update out today with some improved argument parsing. I see
that nice little example you gave now loads. I'll be sorting out some sort
of supported features matrix and a time line as well. Just a lot to get
done :)

On Thu, Jul 20, 2017 at 4:26 PM, Torsten Paul Torsten.Paul@gmx.de wrote:

On github it says:

Lastly the OpenSCAD parser while supporting an excellent CSG language
( though in some areas ambiguous ) is so glued to the interface and
supporting code that it is hard for the language to evolve or move
forwards from that interface. It is our opinion that this effort has
stalled and something new needed to be developed to address these
issues.

If that's one of the core premises, I'd suggest to have a look at
http://apidesign.org/

Also it would be interesting to have a look at that geometry engine
(quote "The Makertron server supports its own internal geometry
engine based on a BREP representation.") which seems to be based on
Open Cascade. I can only find shared libs in the server repo.

ciao,
Torsten.


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

--
Damien Towning
CEO / Developer
http://makertron.io

Hi Alex, I pushed a new update out today with some improved argument parsing. I see that nice little example you gave now loads. I'll be sorting out some sort of supported features matrix and a time line as well. Just a lot to get done :) On Thu, Jul 20, 2017 at 4:26 PM, Torsten Paul <Torsten.Paul@gmx.de> wrote: > On github it says: > > > Lastly the OpenSCAD parser while supporting an excellent CSG language > > ( though in some areas ambiguous ) is so glued to the interface and > > supporting code that it is hard for the language to evolve or move > > forwards from that interface. It is our opinion that this effort has > > stalled and something new needed to be developed to address these > > issues. > > > If that's one of the core premises, I'd suggest to have a look at > http://apidesign.org/ > > Also it would be interesting to have a look at that geometry engine > (quote "The Makertron server supports its own internal geometry > engine based on a BREP representation.") which seems to be based on > Open Cascade. I can only find shared libs in the server repo. > > ciao, > Torsten. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- Damien Towning CEO / Developer http://makertron.io
A
arnholm@arnholm.org
Fri, Jul 21, 2017 7:52 AM

On 2017-07-21 09:24, Damien Towning wrote:

Hi Alex,

I pushed a new update out today with some improved argument parsing.

Hi,

I tried the default example from behind a corporate network yesterday
and today. The page opens and I can see the axes and xy-grid. I can
rotate it with the left mouse button. With the right mouse button
everything just disappears to the bottom right, no way to get it back.
When pressing the Generate button, nothing happens. No model displayed.
Same thing with Firefox and Microsoft Edge under Win10.

What are the requirements to make it work?

Carsten Arnholm

On 2017-07-21 09:24, Damien Towning wrote: > Hi Alex, > > I pushed a new update out today with some improved argument parsing. Hi, I tried the default example from behind a corporate network yesterday and today. The page opens and I can see the axes and xy-grid. I can rotate it with the left mouse button. With the right mouse button everything just disappears to the bottom right, no way to get it back. When pressing the Generate button, nothing happens. No model displayed. Same thing with Firefox and Microsoft Edge under Win10. What are the requirements to make it work? Carsten Arnholm
DT
Damien Towning
Fri, Jul 21, 2017 8:07 AM

Hi Carsten,

I've tested it in Firefox and Chrome. It works fine in those but I have not
checked it in Edge.

I would suggest that if it is getting the grid and axis the trouble is
perhaps with talking to the server.

The client opens a port to the server ( using socket.io )  on port 3000.

You can test the server by going to : http://makertron.io:3000

If it is up and responding it should give you a version number back.

"Makertron server version 5.0"

If not take a look in your console/debug window and if you see any
interesting error messages let me know.

On Fri, Jul 21, 2017 at 5:52 PM, arnholm@arnholm.org wrote:

On 2017-07-21 09:24, Damien Towning wrote:

Hi Alex,

I pushed a new update out today with some improved argument parsing.

Hi,

I tried the default example from behind a corporate network yesterday and
today. The page opens and I can see the axes and xy-grid. I can rotate it
with the left mouse button. With the right mouse button everything just
disappears to the bottom right, no way to get it back. When pressing the
Generate button, nothing happens. No model displayed. Same thing with
Firefox and Microsoft Edge under Win10.

What are the requirements to make it work?

Carsten Arnholm


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

--
Damien Towning
CEO / Developer
http://makertron.io

Hi Carsten, I've tested it in Firefox and Chrome. It works fine in those but I have not checked it in Edge. I would suggest that if it is getting the grid and axis the trouble is perhaps with talking to the server. The client opens a port to the server ( using socket.io ) on port 3000. You can test the server by going to : http://makertron.io:3000 If it is up and responding it should give you a version number back. "Makertron server version 5.0" If not take a look in your console/debug window and if you see any interesting error messages let me know. On Fri, Jul 21, 2017 at 5:52 PM, <arnholm@arnholm.org> wrote: > On 2017-07-21 09:24, Damien Towning wrote: > >> Hi Alex, >> >> I pushed a new update out today with some improved argument parsing. >> > > Hi, > > I tried the default example from behind a corporate network yesterday and > today. The page opens and I can see the axes and xy-grid. I can rotate it > with the left mouse button. With the right mouse button everything just > disappears to the bottom right, no way to get it back. When pressing the > Generate button, nothing happens. No model displayed. Same thing with > Firefox and Microsoft Edge under Win10. > > What are the requirements to make it work? > > Carsten Arnholm > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- Damien Towning CEO / Developer http://makertron.io
DT
Damien Towning
Fri, Jul 21, 2017 8:09 AM

Oh also to get the default model to load you need to click on the generate
button :)

On Fri, Jul 21, 2017 at 6:07 PM, Damien Towning connolly.damien@gmail.com
wrote:

Hi Carsten,

I've tested it in Firefox and Chrome. It works fine in those but I have
not checked it in Edge.

I would suggest that if it is getting the grid and axis the trouble is
perhaps with talking to the server.

The client opens a port to the server ( using socket.io )  on port 3000.

You can test the server by going to : http://makertron.io:3000

If it is up and responding it should give you a version number back.

"Makertron server version 5.0"

If not take a look in your console/debug window and if you see any
interesting error messages let me know.

On Fri, Jul 21, 2017 at 5:52 PM, arnholm@arnholm.org wrote:

On 2017-07-21 09:24, Damien Towning wrote:

Hi Alex,

I pushed a new update out today with some improved argument parsing.

Hi,

I tried the default example from behind a corporate network yesterday and
today. The page opens and I can see the axes and xy-grid. I can rotate it
with the left mouse button. With the right mouse button everything just
disappears to the bottom right, no way to get it back. When pressing the
Generate button, nothing happens. No model displayed. Same thing with
Firefox and Microsoft Edge under Win10.

What are the requirements to make it work?

Carsten Arnholm


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

--
Damien Towning
CEO / Developer
http://makertron.io

--
Damien Towning
CEO / Developer
http://makertron.io

Oh also to get the default model to load you need to click on the generate button :) On Fri, Jul 21, 2017 at 6:07 PM, Damien Towning <connolly.damien@gmail.com> wrote: > Hi Carsten, > > I've tested it in Firefox and Chrome. It works fine in those but I have > not checked it in Edge. > > I would suggest that if it is getting the grid and axis the trouble is > perhaps with talking to the server. > > The client opens a port to the server ( using socket.io ) on port 3000. > > You can test the server by going to : http://makertron.io:3000 > > If it is up and responding it should give you a version number back. > > "Makertron server version 5.0" > > If not take a look in your console/debug window and if you see any > interesting error messages let me know. > > > On Fri, Jul 21, 2017 at 5:52 PM, <arnholm@arnholm.org> wrote: > >> On 2017-07-21 09:24, Damien Towning wrote: >> >>> Hi Alex, >>> >>> I pushed a new update out today with some improved argument parsing. >>> >> >> Hi, >> >> I tried the default example from behind a corporate network yesterday and >> today. The page opens and I can see the axes and xy-grid. I can rotate it >> with the left mouse button. With the right mouse button everything just >> disappears to the bottom right, no way to get it back. When pressing the >> Generate button, nothing happens. No model displayed. Same thing with >> Firefox and Microsoft Edge under Win10. >> >> What are the requirements to make it work? >> >> Carsten Arnholm >> >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > > -- > Damien Towning > CEO / Developer > http://makertron.io > > -- Damien Towning CEO / Developer http://makertron.io