discuss@lists.openscad.org

OpenSCAD general discussion

View all threads

Re: Constructive Syntax Library for Openscad: no difference(), no for(), no intersection() used

J
jon
Mon, Jun 7, 2021 2:28 PM

It is a little of a feedback loop.  More tutorials make it more
accessible which means more people use it.  But I do understand the
challenge of writing the tutorials.

If you look at the BOSL 2 library, a STUNNING amount of work has been
done, not just on the library itself, but on documentation that makes it
easy to use.  I find an example and then nudge it until it does what I want.

Good luck!

Jon

On 6/7/2021 9:00 AM, petka wrote:

hekko Jon, thanks for the nice words,
yes, you are right, i just did not want to spend much time on the
documentation/tutorials first,just to see how nobody would be really
interested. this kind of happened before to me.

the library itself i use myself a lot, so the effort spent on it helps
me in my other projects, but the tutorials i did not need pesonally,
so far.
But now the reception is hopefully positive  there is will be a reason
for it.
i just hope there will be enough interest in the community
Peter

On 07.06.21 01:49, jon wrote:

Peter:

I took a quick look at the mount demo.  It is interesting, but also
overwhelming.  A step-by-step tutorial, that adds new features and
concepts one-at-a-time might be easier for me to digest.  Perhaps
others will find it easier than I do. You've been sitting with it for
years, so it is all familiar to you.

I am impressed by your creativity and determination.

Jon

On 6/6/2021 7:45 AM, pproj@posteo.de wrote:

Hello,

the Constructive Library (about 1900 lines of Code) i just have
released https://github.com/solidboredom/constructive,

takes a different approach to OpenScad Syntax: you rarely need
difference(), for(), intersection() or their one-to-one equivalents,
a for() block  In the library's own dialect might look like:

pieces(4)  X(every(35)) turnXY(vals(10,25,-15,40)) cube(10);

It is all valid OpenScad, you do need any additional programs, just
the OpenScad and the constructive-compiled.scad file.

The Constuctive-Syntax tries to align more with mechanical
construction of parts and less with mathematical concepts like
arrays, vectors and functions. (but they are heavily used behind the
scenes). So it aims to be more concise and fluent for mechanical
parts than vanilla OpenScad. It allows you to make holes from
Modules and really good deal more.

For about 5 years now i have been working on it and using it a lot.
Now I really hope others will find it just as useful, as i do. I am
barely writing any vanilla OpenScad any more.

If somebody likes the Ideas, you are welcome to join work on it. It
is released under GPL2, and I appreciate
additions/discussions/collaboration. Perhaps, some Ideas can be used
by the OpenScad itself.

There is barely any documentation yet. I will add it topic-wise,
when any questions arise if there will be interest at all.

For a basic introduction to its syntax and some possibilities, look
at the explanations inside the example below, or ask me directly.
Here is an example with approx 100 lines of actual code  (see also
an animated .GIF in the Attachment):

https://github.com/solidboredom/constructive/blob/main/examples/mount-demo.scad

there is also another Example at:

https://github.com/solidboredom/constructive/blob/main/examples/pulley-demo.scad

There are many more features useful for complex models, like its own
minimalistic type-subsystem,

basic inheritance of construction parts (still needs improvement),
or inverse transformations like in :

g(X(10),Y(15),turnXY(45),X(30))

    g(backwards([X(10),Y(15),turnXY(45),X(30)])

        box(10);

Try it! i hope you will find it as useful as i do.

Peter


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

It is a little of a feedback loop.  More tutorials make it more accessible which means more people use it.  But I do understand the challenge of writing the tutorials. If you look at the BOSL 2 library, a STUNNING amount of work has been done, not just on the library itself, but on documentation that makes it easy to use.  I find an example and then nudge it until it does what I want. Good luck! Jon On 6/7/2021 9:00 AM, petka wrote: > hekko Jon, thanks for the nice words, > yes, you are right, i just did not want to spend much time on the > documentation/tutorials first,just to see how nobody would be really > interested. this kind of happened before to me. > > the library itself i use myself a lot, so the effort spent on it helps > me in my other projects, but the tutorials i did not need pesonally, > so far. > But now the reception is hopefully positive  there is will be a reason > for it. > i just hope there will be enough interest in the community > Peter > > On 07.06.21 01:49, jon wrote: >> >> Peter: >> >> I took a quick look at the mount demo.  It is interesting, but also >> overwhelming.  A step-by-step tutorial, that adds new features and >> concepts one-at-a-time might be easier for me to digest.  Perhaps >> others will find it easier than I do. You've been sitting with it for >> years, so it is all familiar to you. >> >> I am impressed by your creativity and determination. >> >> Jon >> >> >> On 6/6/2021 7:45 AM, pproj@posteo.de wrote: >>> >>> Hello, >>> >>> the Constructive Library (about 1900 lines of Code) i just have >>> released https://github.com/solidboredom/constructive, >>> >>> takes a different approach to OpenScad Syntax: you rarely need >>> difference(), for(), intersection() or their one-to-one equivalents, >>> a for() block  In the library's own dialect might look like: >>> >>> pieces(4)  X(every(35)) turnXY(vals(10,25,-15,40)) cube(10); >>> >>> It is all valid OpenScad, you do need any additional programs, just >>> the OpenScad and the constructive-compiled.scad file. >>> >>> The Constuctive-Syntax tries to align more with mechanical >>> construction of parts and less with mathematical concepts like >>> arrays, vectors and functions. (but they are heavily used behind the >>> scenes). So it aims to be more concise and fluent for mechanical >>> parts than vanilla OpenScad. It allows you to make holes from >>> Modules and really good deal more. >>> >>> For about 5 years now i have been working on it and using it a lot. >>> Now I really hope others will find it just as useful, as i do. I am >>> barely writing any vanilla OpenScad any more. >>> >>> If somebody likes the Ideas, you are welcome to join work on it. It >>> is released under GPL2, and I appreciate >>> additions/discussions/collaboration. Perhaps, some Ideas can be used >>> by the OpenScad itself. >>> >>> There is barely any documentation yet. I will add it topic-wise, >>> when any questions arise if there will be interest at all. >>> >>> For a basic introduction to its syntax and some possibilities, look >>> at the explanations inside the example below, or ask me directly. >>> Here is an example with approx 100 lines of actual code  (see also >>> an animated .GIF in the Attachment): >>> >>> https://github.com/solidboredom/constructive/blob/main/examples/mount-demo.scad >>> >>> there is also another Example at: >>> >>> https://github.com/solidboredom/constructive/blob/main/examples/pulley-demo.scad >>> >>> There are many more features useful for complex models, like its own >>> minimalistic type-subsystem, >>> >>> basic inheritance of construction parts (still needs improvement), >>> or inverse transformations like in : >>> >>> g(X(10),Y(15),turnXY(45),X(30)) >>> >>>     g(backwards([X(10),Y(15),turnXY(45),X(30)]) >>> >>>         box(10); >>> >>> Try it! i hope you will find it as useful as i do. >>> >>> Peter >>> >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email todiscuss-leave@lists.openscad.org > >
TP
Torsten Paul
Mon, Jun 7, 2021 2:43 PM

On 07.06.21 16:28, jon wrote:

It is a little of a feedback loop.  More tutorials make it> more accessible which means more people use it.  But I do
understand the challenge of writing the tutorials.

Yes, I've seen that often, it needs quite some leap of faith
that people will appreciate the effort spent with documentation.

A full tutorial is a lot of work, so it maybe would be an
option to have a small "getting started" or cheat sheet style
introduction.

With that documentation link, and if I'm allowed to use that
nice animation, I would be happy to add the library also to
the https://openscad.org/libraries.html page.

ciao,
Torsten.

On 07.06.21 16:28, jon wrote: > It is a little of a feedback loop.  More tutorials make it> more accessible which means more people use it.  But I do > understand the challenge of writing the tutorials. Yes, I've seen that often, it needs quite some leap of faith that people will appreciate the effort spent with documentation. A full tutorial is a lot of work, so it maybe would be an option to have a small "getting started" or cheat sheet style introduction. With that documentation link, and if I'm allowed to use that nice animation, I would be happy to add the library also to the https://openscad.org/libraries.html page. ciao, Torsten.
P
pproj@posteo.de
Mon, Jun 7, 2021 4:03 PM

I will definitely make step by step simple examples  to make up a
tutorial soon

I must admit until now,i had only heard somewhere of BOSL 2. Having
looked around longer time ago and then finding nothing of much help to
me, i had concentrated on my own library which went through several
iterations of syntax change.

this was out of a need: i build complex parts.
with vanilla openscad i get lost in extremely nested and repetitive code
of any complex  model very quickly.
an own module for almost everything, to avoid code duplication, did not
really help. It made my code even more semantically scattered and
dissociated.

so i started to fight nesting and singularities in OpenScad, the
difference() was an obvious target having both ( it treats its first
child differently from all other children, which i call singularity,
which makes you structure your code after difference()'s personal
preferences, and not after your construction intent) so i have created
the SummUp library (still on my Github) . an on and on to reduce not
semantically relevant code nestng even more...

I had assumed other libraries out there are mostly "boxes with a bunch
of customized stuff you can find use for". a bit like going to a flea
market and looking for an old lamp you will reapair, versus creating
your own new lampshade, lamppost, etc.

There was a library for relative coordinates somewhere, which i found
interesting, but it was too complex to use for me, it asked for 3D
vectors and alike in daily use, so i never really dug it.

Looking at the BOSL2 now , this thing seems different, the examples in
the readme.md go a path of trying to align the language to the domain.
Actually, i even used to have  up() (now Z() or XYZ())  and  skewedBox()
in a previous iteration of my library, which is called "humane.scad" and
focused on easy human readability.
and there is also the xcopies(dist,n) which is similar to
pieces(n)X(every(dist)) in the Constructive dialect.
there are definitely a lot  of similarities. It is a pity i did not
notice it well enough, before.

Perhaps the two can be integrated.

I wiil have to look deeper, but perhaps the Constructive has taken the
syntactic departure from mathematical notation even further,

introducing assemble(), add() remove() and the notion of "Parts"
(semantically orthogonal to modules, which i consider more an aspect of
a Part or of several Parts)
I had also changed the preferred style from openscads native module
nesting to sets of functions in parameters, like in
g(X(10), turnXY(30), TOUP()) cube(10);
versus
X(10) turnXY(30) TOUP() cube(10);
which are both valid in Constructive, but the first is preferred for
performance reasons, among other features i brings.

On 07.06.21 16:28, jon wrote:

It is a little of a feedback loop.  More tutorials make it more
accessible which means more people use it.  But I do understand the
challenge of writing the tutorials.

If you look at the BOSL 2 library, a STUNNING amount of work has been
done, not just on the library itself, but on documentation that makes
it easy to use.  I find an example and then nudge it until it does
what I want.

Good luck!

Jon

On 6/7/2021 9:00 AM, petka wrote:

hekko Jon, thanks for the nice words,
yes, you are right, i just did not want to spend much time on the
documentation/tutorials first,just to see how nobody would be really
interested. this kind of happened before to me.

the library itself i use myself a lot, so the effort spent on it
helps me in my other projects, but the tutorials i did not need
pesonally, so far.
But now the reception is hopefully positive  there is will be a
reason for it.
i just hope there will be enough interest in the community
Peter

On 07.06.21 01:49, jon wrote:

Peter:

I took a quick look at the mount demo.  It is interesting, but also
overwhelming.  A step-by-step tutorial, that adds new features and
concepts one-at-a-time might be easier for me to digest.  Perhaps
others will find it easier than I do.   You've been sitting with it
for years, so it is all familiar to you.

I am impressed by your creativity and determination.

Jon

On 6/6/2021 7:45 AM, pproj@posteo.de wrote:

Hello,

the Constructive Library (about 1900 lines of Code) i just have
released https://github.com/solidboredom/constructive,

takes a different approach to OpenScad Syntax: you rarely need
difference(), for(), intersection() or their one-to-one
equivalents, a for() block  In the library's own dialect might look
like:

pieces(4)  X(every(35)) turnXY(vals(10,25,-15,40)) cube(10);

It is all valid OpenScad, you do need any additional programs, just
the OpenScad and the constructive-compiled.scad file.

The Constuctive-Syntax tries to align more with mechanical
construction of parts and less with mathematical concepts like
arrays, vectors and functions. (but they are heavily used behind
the scenes). So it aims to be more concise and fluent for
mechanical parts than vanilla OpenScad. It allows you to make holes
from Modules and really good deal more.

For about 5 years now i have been working on it and using it a lot.
Now I really hope others will find it just as useful, as i do. I am
barely writing any vanilla OpenScad any more.

If somebody likes the Ideas, you are welcome to join work on it. It
is released under GPL2, and I appreciate
additions/discussions/collaboration. Perhaps, some Ideas can be
used by the OpenScad itself.

There is barely any documentation yet. I will add it topic-wise,
when any questions arise if there will be interest at all.

For a basic introduction to its syntax and some possibilities, look
at the explanations inside the example below, or ask me directly.
Here is an example with approx 100 lines of actual code  (see also
an animated .GIF in the Attachment):

https://github.com/solidboredom/constructive/blob/main/examples/mount-demo.scad

there is also another Example at:

https://github.com/solidboredom/constructive/blob/main/examples/pulley-demo.scad

There are many more features useful for complex models, like its
own minimalistic type-subsystem,

basic inheritance of construction parts (still needs improvement),
or inverse transformations like in :

g(X(10),Y(15),turnXY(45),X(30))

    g(backwards([X(10),Y(15),turnXY(45),X(30)])

        box(10);

Try it! i hope you will find it as useful as i do.

Peter


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

I will definitely make step by step simple examples  to make up a tutorial soon I must admit until now,i had only heard somewhere of BOSL 2. Having looked around longer time ago and then finding nothing of much help to me, i had concentrated on my own library which went through several iterations of syntax change. this was out of a need: i build complex parts. with vanilla openscad i get lost in extremely nested and repetitive code of any complex  model very quickly. an own module for almost everything, to avoid code duplication, did not really help. It made my code even more semantically scattered and dissociated. so i started to fight nesting and singularities in OpenScad, the difference() was an obvious target having both ( it treats its first child differently from all other children, which i call singularity, which makes you structure your code after difference()'s personal preferences, and not after your construction intent) so i have created the SummUp library (still on my Github) . an on and on to reduce not semantically relevant code nestng even more... I had assumed other libraries out there are mostly "boxes with a bunch of customized stuff you can find use for". a bit like going to a flea market and looking for an old lamp you will reapair, versus creating your own new lampshade, lamppost, etc. There was a library for relative coordinates somewhere, which i found interesting, but it was too complex to use for me, it asked for 3D vectors and alike in daily use, so i never really dug it. Looking at the BOSL2 now , this thing seems different, the examples in the readme.md go a path of trying to align the language to the domain. Actually, i even used to have  up() (now Z() or XYZ())  and  skewedBox() in a previous iteration of my library, which is called "humane.scad" and focused on easy human readability. and there is also the xcopies(dist,n) which is similar to pieces(n)X(every(dist)) in the Constructive dialect. there are definitely a lot  of similarities. It is a pity i did not notice it well enough, before. Perhaps the two can be integrated. I wiil have to look deeper, but perhaps the Constructive has taken the syntactic departure from mathematical notation even further, introducing assemble(), add() remove() and the notion of "Parts" (semantically orthogonal to modules, which i consider more an aspect of a Part or of several Parts) I had also changed the preferred style from openscads native module nesting to sets of functions in parameters, like in g(X(10), turnXY(30), TOUP()) cube(10); versus X(10) turnXY(30) TOUP() cube(10); which are both valid in Constructive, but the first is preferred for performance reasons, among other features i brings. On 07.06.21 16:28, jon wrote: > > It is a little of a feedback loop.  More tutorials make it more > accessible which means more people use it.  But I do understand the > challenge of writing the tutorials. > > If you look at the BOSL 2 library, a STUNNING amount of work has been > done, not just on the library itself, but on documentation that makes > it easy to use.  I find an example and then nudge it until it does > what I want. > > Good luck! > > Jon > > On 6/7/2021 9:00 AM, petka wrote: >> hekko Jon, thanks for the nice words, >> yes, you are right, i just did not want to spend much time on the >> documentation/tutorials first,just to see how nobody would be really >> interested. this kind of happened before to me. >> >> the library itself i use myself a lot, so the effort spent on it >> helps me in my other projects, but the tutorials i did not need >> pesonally, so far. >> But now the reception is hopefully positive  there is will be a >> reason for it. >> i just hope there will be enough interest in the community >> Peter >> >> On 07.06.21 01:49, jon wrote: >>> >>> Peter: >>> >>> I took a quick look at the mount demo.  It is interesting, but also >>> overwhelming.  A step-by-step tutorial, that adds new features and >>> concepts one-at-a-time might be easier for me to digest.  Perhaps >>> others will find it easier than I do.   You've been sitting with it >>> for years, so it is all familiar to you. >>> >>> I am impressed by your creativity and determination. >>> >>> Jon >>> >>> >>> On 6/6/2021 7:45 AM, pproj@posteo.de wrote: >>>> >>>> Hello, >>>> >>>> the Constructive Library (about 1900 lines of Code) i just have >>>> released https://github.com/solidboredom/constructive, >>>> >>>> takes a different approach to OpenScad Syntax: you rarely need >>>> difference(), for(), intersection() or their one-to-one >>>> equivalents, a for() block  In the library's own dialect might look >>>> like: >>>> >>>> pieces(4)  X(every(35)) turnXY(vals(10,25,-15,40)) cube(10); >>>> >>>> It is all valid OpenScad, you do need any additional programs, just >>>> the OpenScad and the constructive-compiled.scad file. >>>> >>>> The Constuctive-Syntax tries to align more with mechanical >>>> construction of parts and less with mathematical concepts like >>>> arrays, vectors and functions. (but they are heavily used behind >>>> the scenes). So it aims to be more concise and fluent for >>>> mechanical parts than vanilla OpenScad. It allows you to make holes >>>> from Modules and really good deal more. >>>> >>>> For about 5 years now i have been working on it and using it a lot. >>>> Now I really hope others will find it just as useful, as i do. I am >>>> barely writing any vanilla OpenScad any more. >>>> >>>> If somebody likes the Ideas, you are welcome to join work on it. It >>>> is released under GPL2, and I appreciate >>>> additions/discussions/collaboration. Perhaps, some Ideas can be >>>> used by the OpenScad itself. >>>> >>>> There is barely any documentation yet. I will add it topic-wise, >>>> when any questions arise if there will be interest at all. >>>> >>>> For a basic introduction to its syntax and some possibilities, look >>>> at the explanations inside the example below, or ask me directly. >>>> Here is an example with approx 100 lines of actual code  (see also >>>> an animated .GIF in the Attachment): >>>> >>>> https://github.com/solidboredom/constructive/blob/main/examples/mount-demo.scad >>>> >>>> there is also another Example at: >>>> >>>> https://github.com/solidboredom/constructive/blob/main/examples/pulley-demo.scad >>>> >>>> There are many more features useful for complex models, like its >>>> own minimalistic type-subsystem, >>>> >>>> basic inheritance of construction parts (still needs improvement), >>>> or inverse transformations like in : >>>> >>>> g(X(10),Y(15),turnXY(45),X(30)) >>>> >>>>     g(backwards([X(10),Y(15),turnXY(45),X(30)]) >>>> >>>>         box(10); >>>> >>>> Try it! i hope you will find it as useful as i do. >>>> >>>> Peter >>>> >>>> >>>> >>>> _______________________________________________ >>>> OpenSCAD mailing list >>>> To unsubscribe send an email todiscuss-leave@lists.openscad.org >> >>
P
pproj@posteo.de
Mon, Jun 7, 2021 4:38 PM

Torsten i would really apreciate that, consider both animations GPLed as
well anyway.
do you think it would perhaps be better to wait with it, until i produce
a tutorial, to not put people off, or not?
Peter
On 07.06.21 16:43, Torsten Paul wrote:

On 07.06.21 16:28, jon wrote:

It is a little of a feedback loop.  More tutorials make it> more
accessible which means more people use it.  But I do
understand the challenge of writing the tutorials.

Yes, I've seen that often, it needs quite some leap of faith
that people will appreciate the effort spent with documentation.

A full tutorial is a lot of work, so it maybe would be an
option to have a small "getting started" or cheat sheet style
introduction.

With that documentation link, and if I'm allowed to use that
nice animation, I would be happy to add the library also to
the https://openscad.org/libraries.html page.

ciao,
Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

Torsten i would really apreciate that, consider both animations GPLed as well anyway. do you think it would perhaps be better to wait with it, until i produce a tutorial, to not put people off, or not? Peter On 07.06.21 16:43, Torsten Paul wrote: > On 07.06.21 16:28, jon wrote: >> It is a little of a feedback loop.  More tutorials make it> more >> accessible which means more people use it.  But I do >> understand the challenge of writing the tutorials. > Yes, I've seen that often, it needs quite some leap of faith > that people will appreciate the effort spent with documentation. > > A full tutorial is a lot of work, so it maybe would be an > option to have a small "getting started" or cheat sheet style > introduction. > > With that documentation link, and if I'm allowed to use that > nice animation, I would be happy to add the library also to > the https://openscad.org/libraries.html page. > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org