L
lar3ry
Tue, Sep 17, 2019 2:27 PM
//! Override sphere so that has vertices on all three axes. Has the
advantage of giving correct dimensions when hulled
I like the idea of this. Can you tell us the definition of the function: $fn
= r2sides4n(R))
--
Sent from: http://forum.openscad.org/
> //! Override ```sphere``` so that has vertices on all three axes. Has the
> advantage of giving correct dimensions when hulled
I like the idea of this. Can you tell us the definition of the function: $fn
= r2sides4n(R))
--
Sent from: http://forum.openscad.org/
NH
nop head
Tue, Sep 17, 2019 2:36 PM
//! Override sphere so that has vertices on all three axes. Has the
advantage of giving correct dimensions when hulled
Yes it is here:
https://github.com/nophead/NopSCADlib/blob/master/utils/core/global.scad#L37
On Tue, 17 Sep 2019 at 15:22, lar3ry <lar3ry@sasktel.net> wrote:
>
> > //! Override ```sphere``` so that has vertices on all three axes. Has the
> > advantage of giving correct dimensions when hulled
>
> I like the idea of this. Can you tell us the definition of the function:
> $fn
> = r2sides4n(R))
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
A
adrianv
Tue, Sep 17, 2019 11:11 PM
Sorry, but I just can't see the point. What is so sacrosanct about the
name
"cube" that someone can't work with a derived module called (say) "myCube"
without any need for developers to waste time changing the underlying
code.
It seems to me that the main use of redefining modules is to extend
functionality somehow in a library, so the existing built-ins can behave
consistently in the context of the library with other functionality.
The argument that the name "cube" is sacrosanct appears every day on this
forum: many people seem to think that the burden of learning a new command
is quite overwhelming.
I get the impression that there is a large number of libraries with,
perhaps, a lot of close-but-not-perfect duplication amongst them. If that
is
the problem then it should be fixed by some process of getting library
developers to work to a common standard, not by changing the core code.
I would say that the situation is not so clear. There do not appears to be
very many good libraries, well documented, that you can easily find. I'm
not aware of a lot of good libraries that duplicate each other
substantially---maybe just BOSL with parts of dotSCAD. But in my efforts
to hunt for libraries I saw a lot of functionality duplicated many times by
different people, maybe not put out as a library, but code that does the
same class of basic things, written by each individual to support other
purposes, because sharing libraries seems to be, for some reason, a very
difficult thing. And if you write a library for your own use there's little
reason to bother documenting it.
The lack of a really clear mechanism for distributing libraries has been one
problem. It's pretty hard to find the various libraries that are scattered
on Thingiverse. The general hostility of people on the forum to the use of
libraries is another factor that I think has discouraged the development of
a functional approach to libraries.
--
Sent from: http://forum.openscad.org/
Robin2 wrote
> Sorry, but I just can't see the point. What is so sacrosanct about the
> name
> "cube" that someone can't work with a derived module called (say) "myCube"
> without any need for developers to waste time changing the underlying
> code.
It seems to me that the main use of redefining modules is to extend
functionality somehow in a library, so the existing built-ins can behave
consistently in the context of the library with other functionality.
The argument that the name "cube" is sacrosanct appears every day on this
forum: many people seem to think that the burden of learning a new command
is quite overwhelming.
> I get the impression that there is a large number of libraries with,
> perhaps, a lot of close-but-not-perfect duplication amongst them. If that
> is
> the problem then it should be fixed by some process of getting library
> developers to work to a common standard, not by changing the core code.
I would say that the situation is not so clear. There do not appears to be
very many good libraries, well documented, that you can easily find. I'm
not aware of a lot of good libraries that duplicate each other
substantially---maybe just BOSL with parts of dotSCAD. But in my efforts
to hunt for libraries I saw a lot of functionality duplicated many times by
different people, maybe not put out as a library, but code that does the
same class of basic things, written by each individual to support other
purposes, because sharing libraries seems to be, for some reason, a very
difficult thing. And if you write a library for your own use there's little
reason to bother documenting it.
The lack of a really clear mechanism for distributing libraries has been one
problem. It's pretty hard to find the various libraries that are scattered
on Thingiverse. The general hostility of people on the forum to the use of
libraries is another factor that I think has discouraged the development of
a functional approach to libraries.
--
Sent from: http://forum.openscad.org/
NH
nop head
Tue, Sep 17, 2019 11:28 PM
many people seem to think that the burden of learning a new command is
quite overwhelming.
OpenScad is a tiny language and can be learned in its entirety in about a
day, which I did many years ago. Libraries are much larger things to learn,
and if I can write everything I use myself, why would I spend time learning
somebody else's library?
I think the reason why they don't gain the same traction as conventional
programming languages is most things are very easy to do in OpenSCAD with a
few lines of code, whereas most libraries for other languages are a lot
bigger and more complicated.
On Wed, 18 Sep 2019 at 00:06, adrianv avm4@cornell.edu wrote:
Sorry, but I just can't see the point. What is so sacrosanct about the
name
"cube" that someone can't work with a derived module called (say)
without any need for developers to waste time changing the underlying
code.
It seems to me that the main use of redefining modules is to extend
functionality somehow in a library, so the existing built-ins can behave
consistently in the context of the library with other functionality.
The argument that the name "cube" is sacrosanct appears every day on this
forum: many people seem to think that the burden of learning a new command
is quite overwhelming.
I get the impression that there is a large number of libraries with,
perhaps, a lot of close-but-not-perfect duplication amongst them. If that
is
the problem then it should be fixed by some process of getting library
developers to work to a common standard, not by changing the core code.
I would say that the situation is not so clear. There do not appears to be
very many good libraries, well documented, that you can easily find. I'm
not aware of a lot of good libraries that duplicate each other
substantially---maybe just BOSL with parts of dotSCAD. But in my efforts
to hunt for libraries I saw a lot of functionality duplicated many times by
different people, maybe not put out as a library, but code that does the
same class of basic things, written by each individual to support other
purposes, because sharing libraries seems to be, for some reason, a very
difficult thing. And if you write a library for your own use there's
little
reason to bother documenting it.
The lack of a really clear mechanism for distributing libraries has been
one
problem. It's pretty hard to find the various libraries that are scattered
on Thingiverse. The general hostility of people on the forum to the use of
libraries is another factor that I think has discouraged the development of
a functional approach to libraries.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> many people seem to think that the burden of learning a new command is
quite overwhelming.
OpenScad is a tiny language and can be learned in its entirety in about a
day, which I did many years ago. Libraries are much larger things to learn,
and if I can write everything I use myself, why would I spend time learning
somebody else's library?
I think the reason why they don't gain the same traction as conventional
programming languages is most things are very easy to do in OpenSCAD with a
few lines of code, whereas most libraries for other languages are a lot
bigger and more complicated.
On Wed, 18 Sep 2019 at 00:06, adrianv <avm4@cornell.edu> wrote:
> Robin2 wrote
> > Sorry, but I just can't see the point. What is so sacrosanct about the
> > name
> > "cube" that someone can't work with a derived module called (say)
> "myCube"
> > without any need for developers to waste time changing the underlying
> > code.
>
> It seems to me that the main use of redefining modules is to extend
> functionality somehow in a library, so the existing built-ins can behave
> consistently in the context of the library with other functionality.
>
> The argument that the name "cube" is sacrosanct appears every day on this
> forum: many people seem to think that the burden of learning a new command
> is quite overwhelming.
>
>
> > I get the impression that there is a large number of libraries with,
> > perhaps, a lot of close-but-not-perfect duplication amongst them. If that
> > is
> > the problem then it should be fixed by some process of getting library
> > developers to work to a common standard, not by changing the core code.
>
> I would say that the situation is not so clear. There do not appears to be
> very many good libraries, well documented, that you can easily find. I'm
> not aware of a lot of good libraries that duplicate each other
> substantially---maybe just BOSL with parts of dotSCAD. But in my efforts
> to hunt for libraries I saw a lot of functionality duplicated many times by
> different people, maybe not put out as a library, but code that does the
> same class of basic things, written by each individual to support other
> purposes, because sharing libraries seems to be, for some reason, a very
> difficult thing. And if you write a library for your own use there's
> little
> reason to bother documenting it.
>
> The lack of a really clear mechanism for distributing libraries has been
> one
> problem. It's pretty hard to find the various libraries that are scattered
> on Thingiverse. The general hostility of people on the forum to the use of
> libraries is another factor that I think has discouraged the development of
> a functional approach to libraries.
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
DM
Doug Moen
Tue, Sep 17, 2019 11:45 PM
My original reason for wanting this feature is the Relativity library.
https://github.com/davidson16807/relativity.scad
Relativity extends the standard primitives cube, sphere, etc, with upward compatible new features: a system of property inheritance inspired by CSS.
But, because of the way OpenSCAD works, Relativity needs to invent new names for all of the primitives. So, cube becomes box, cylinder becomes rod, and so on.
So if you want to use Relativity in an existing project, you need to rewrite your code to replace cube with box and so on.
It would be better if Relativity could just add new features to cube, sphere and so on without requiring you to rewrite all of your code.
This would not be a problem in any modern programming language, because all modern languages support name spaces.
The underlying goal of many of the suggestions in my email was to provide tools for library writers, so that libraries can work better. And so that libraries can do things that currently require a change to the C++ core. We need a better library ecosystem. If you don't use libraries, then many of my suggested language changes won't help you.
Doug Moen.
On Tue, Sep 17, 2019, at 7:11 PM, adrianv wrote:
Sorry, but I just can't see the point. What is so sacrosanct about the
name
"cube" that someone can't work with a derived module called (say) "myCube"
without any need for developers to waste time changing the underlying
code.
It seems to me that the main use of redefining modules is to extend
functionality somehow in a library, so the existing built-ins can behave
consistently in the context of the library with other functionality.
The argument that the name "cube" is sacrosanct appears every day on this
forum: many people seem to think that the burden of learning a new command
is quite overwhelming.
I get the impression that there is a large number of libraries with,
perhaps, a lot of close-but-not-perfect duplication amongst them. If that
is
the problem then it should be fixed by some process of getting library
developers to work to a common standard, not by changing the core code.
I would say that the situation is not so clear. There do not appears to be
very many good libraries, well documented, that you can easily find. I'm
not aware of a lot of good libraries that duplicate each other
substantially---maybe just BOSL with parts of dotSCAD. But in my efforts
to hunt for libraries I saw a lot of functionality duplicated many times by
different people, maybe not put out as a library, but code that does the
same class of basic things, written by each individual to support other
purposes, because sharing libraries seems to be, for some reason, a very
difficult thing. And if you write a library for your own use there's little
reason to bother documenting it.
The lack of a really clear mechanism for distributing libraries has been one
problem. It's pretty hard to find the various libraries that are scattered
on Thingiverse. The general hostility of people on the forum to the use of
libraries is another factor that I think has discouraged the development of
a functional approach to libraries.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
My original reason for wanting this feature is the Relativity library.
https://github.com/davidson16807/relativity.scad
Relativity extends the standard primitives `cube`, `sphere`, etc, with upward compatible new features: a system of property inheritance inspired by CSS.
But, because of the way OpenSCAD works, Relativity needs to invent new names for all of the primitives. So, `cube` becomes `box`, `cylinder` becomes `rod`, and so on.
So if you want to use Relativity in an existing project, you need to rewrite your code to replace `cube` with `box` and so on.
It would be better if Relativity could just add new features to `cube`, `sphere` and so on without requiring you to rewrite all of your code.
This would not be a problem in any modern programming language, because all modern languages support name spaces.
The underlying goal of many of the suggestions in my email was to provide tools for library writers, so that libraries can work better. And so that libraries can do things that currently require a change to the C++ core. We need a better library ecosystem. If you don't use libraries, then many of my suggested language changes won't help you.
Doug Moen.
On Tue, Sep 17, 2019, at 7:11 PM, adrianv wrote:
> Robin2 wrote
> > Sorry, but I just can't see the point. What is so sacrosanct about the
> > name
> > "cube" that someone can't work with a derived module called (say) "myCube"
> > without any need for developers to waste time changing the underlying
> > code.
>
> It seems to me that the main use of redefining modules is to extend
> functionality somehow in a library, so the existing built-ins can behave
> consistently in the context of the library with other functionality.
>
> The argument that the name "cube" is sacrosanct appears every day on this
> forum: many people seem to think that the burden of learning a new command
> is quite overwhelming.
>
>
> > I get the impression that there is a large number of libraries with,
> > perhaps, a lot of close-but-not-perfect duplication amongst them. If that
> > is
> > the problem then it should be fixed by some process of getting library
> > developers to work to a common standard, not by changing the core code.
>
> I would say that the situation is not so clear. There do not appears to be
> very many good libraries, well documented, that you can easily find. I'm
> not aware of a lot of good libraries that duplicate each other
> substantially---maybe just BOSL with parts of dotSCAD. But in my efforts
> to hunt for libraries I saw a lot of functionality duplicated many times by
> different people, maybe not put out as a library, but code that does the
> same class of basic things, written by each individual to support other
> purposes, because sharing libraries seems to be, for some reason, a very
> difficult thing. And if you write a library for your own use there's little
> reason to bother documenting it.
>
> The lack of a really clear mechanism for distributing libraries has been one
> problem. It's pretty hard to find the various libraries that are scattered
> on Thingiverse. The general hostility of people on the forum to the use of
> libraries is another factor that I think has discouraged the development of
> a functional approach to libraries.
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
NH
nop head
Wed, Sep 18, 2019 12:12 AM
It would be better if Relativity could just add new features to cube,
sphere and so on without requiring you to rewrite all of your code.
But you can redefine cube and sphere. They hide the originals but there
really isn't any need to call the originals as they don't do anything
special. You would have a problem redefining polygon, and polyhedron though
I think.
On Wed, 18 Sep 2019 at 00:46, Doug Moen doug@moens.org wrote:
My original reason for wanting this feature is the Relativity library.
https://github.com/davidson16807/relativity.scad
Relativity extends the standard primitives cube, sphere, etc, with
upward compatible new features: a system of property inheritance inspired
by CSS.
But, because of the way OpenSCAD works, Relativity needs to invent new
names for all of the primitives. So, cube becomes box, cylinder
becomes rod, and so on.
So if you want to use Relativity in an existing project, you need to
rewrite your code to replace cube with box and so on.
It would be better if Relativity could just add new features to cube,
sphere and so on without requiring you to rewrite all of your code.
This would not be a problem in any modern programming language, because
all modern languages support name spaces.
The underlying goal of many of the suggestions in my email was to provide
tools for library writers, so that libraries can work better. And so that
libraries can do things that currently require a change to the C++ core. We
need a better library ecosystem. If you don't use libraries, then many of
my suggested language changes won't help you.
Doug Moen.
On Tue, Sep 17, 2019, at 7:11 PM, adrianv wrote:
Sorry, but I just can't see the point. What is so sacrosanct about the
name
"cube" that someone can't work with a derived module called (say)
without any need for developers to waste time changing the underlying
code.
It seems to me that the main use of redefining modules is to extend
functionality somehow in a library, so the existing built-ins can behave
consistently in the context of the library with other functionality.
The argument that the name "cube" is sacrosanct appears every day on this
forum: many people seem to think that the burden of learning a new
I get the impression that there is a large number of libraries with,
perhaps, a lot of close-but-not-perfect duplication amongst them. If
is
the problem then it should be fixed by some process of getting library
developers to work to a common standard, not by changing the core code.
I would say that the situation is not so clear. There do not appears to
very many good libraries, well documented, that you can easily find.
not aware of a lot of good libraries that duplicate each other
substantially---maybe just BOSL with parts of dotSCAD. But in my
to hunt for libraries I saw a lot of functionality duplicated many times
different people, maybe not put out as a library, but code that does the
same class of basic things, written by each individual to support other
purposes, because sharing libraries seems to be, for some reason, a very
difficult thing. And if you write a library for your own use there's
reason to bother documenting it.
The lack of a really clear mechanism for distributing libraries has been
problem. It's pretty hard to find the various libraries that are
on Thingiverse. The general hostility of people on the forum to the use
libraries is another factor that I think has discouraged the development
>
> It would be better if Relativity could just add new features to `cube`,
> `sphere` and so on without requiring you to rewrite all of your code.
But you can redefine cube and sphere. They hide the originals but there
really isn't any need to call the originals as they don't do anything
special. You would have a problem redefining polygon, and polyhedron though
I think.
On Wed, 18 Sep 2019 at 00:46, Doug Moen <doug@moens.org> wrote:
> My original reason for wanting this feature is the Relativity library.
> https://github.com/davidson16807/relativity.scad
>
> Relativity extends the standard primitives `cube`, `sphere`, etc, with
> upward compatible new features: a system of property inheritance inspired
> by CSS.
>
> But, because of the way OpenSCAD works, Relativity needs to invent new
> names for all of the primitives. So, `cube` becomes `box`, `cylinder`
> becomes `rod`, and so on.
>
> So if you want to use Relativity in an existing project, you need to
> rewrite your code to replace `cube` with `box` and so on.
>
> It would be better if Relativity could just add new features to `cube`,
> `sphere` and so on without requiring you to rewrite all of your code.
>
> This would not be a problem in any modern programming language, because
> all modern languages support name spaces.
>
> The underlying goal of many of the suggestions in my email was to provide
> tools for library writers, so that libraries can work better. And so that
> libraries can do things that currently require a change to the C++ core. We
> need a better library ecosystem. If you don't use libraries, then many of
> my suggested language changes won't help you.
>
> Doug Moen.
>
> On Tue, Sep 17, 2019, at 7:11 PM, adrianv wrote:
> > Robin2 wrote
> > > Sorry, but I just can't see the point. What is so sacrosanct about the
> > > name
> > > "cube" that someone can't work with a derived module called (say)
> "myCube"
> > > without any need for developers to waste time changing the underlying
> > > code.
> >
> > It seems to me that the main use of redefining modules is to extend
> > functionality somehow in a library, so the existing built-ins can behave
> > consistently in the context of the library with other functionality.
> >
> > The argument that the name "cube" is sacrosanct appears every day on this
> > forum: many people seem to think that the burden of learning a new
> command
> > is quite overwhelming.
> >
> >
> > > I get the impression that there is a large number of libraries with,
> > > perhaps, a lot of close-but-not-perfect duplication amongst them. If
> that
> > > is
> > > the problem then it should be fixed by some process of getting library
> > > developers to work to a common standard, not by changing the core code.
> >
> > I would say that the situation is not so clear. There do not appears to
> be
> > very many good libraries, well documented, that you can easily find.
> I'm
> > not aware of a lot of good libraries that duplicate each other
> > substantially---maybe just BOSL with parts of dotSCAD. But in my
> efforts
> > to hunt for libraries I saw a lot of functionality duplicated many times
> by
> > different people, maybe not put out as a library, but code that does the
> > same class of basic things, written by each individual to support other
> > purposes, because sharing libraries seems to be, for some reason, a very
> > difficult thing. And if you write a library for your own use there's
> little
> > reason to bother documenting it.
> >
> > The lack of a really clear mechanism for distributing libraries has been
> one
> > problem. It's pretty hard to find the various libraries that are
> scattered
> > on Thingiverse. The general hostility of people on the forum to the use
> of
> > libraries is another factor that I think has discouraged the development
> of
> > a functional approach to libraries.
> >
> >
> >
> >
> > --
> > Sent from: http://forum.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
>
JF
Joe Francis
Wed, Sep 18, 2019 12:12 AM
On 9/17/19 6:28 PM, nop head wrote:
many people seem to think that the burden of learning a new command
is quite overwhelming.
OpenScad is a tiny language and can be learned in its entirety in
about a day, which I did many years ago. Libraries are much larger
things to learn, and if I can write everything I use myself, why would
I spend time learning somebody else's library?
I think the reason why they don't gain the same traction as
conventional programming languages is most things are very easy to do
in OpenSCAD with a few lines of code, whereas most libraries for other
languages are a lot bigger and more complicated.
I wish we would quit repeating this like it's the whole truth. This
type of talk derails discussions that might lead to a decent library
ecosystem.
Yes, it's "easy" to do many things quickly. It's also very easy to end
up with a "library" that's not actually very reusable, or hopelessly
slow, or fails to handle edge cases, or fails to provide reasonable
validation/assertions (making it easy to have problems using it).
Making good, reusable, documented libraries is hard. Both because of
the nature of the work, but also because there are very few great
examples of libraries for OpenSCAD. There's little work to borrow from,
so users tend to fall into the same beginner traps and either call it
"good enough for today's project" or give up on OpenSCAD entirely.
I have talked to many people off-list who were discouraged by this
"OpenSCAD doesn't need libraries" talk and just gave up rather than
contributing. I really wish the negativity around libraries and package
managers would stop.
On 9/17/19 6:28 PM, nop head wrote:
> > many people seem to think that the burden of learning a new command
> is quite overwhelming.
>
> OpenScad is a tiny language and can be learned in its entirety in
> about a day, which I did many years ago. Libraries are much larger
> things to learn, and if I can write everything I use myself, why would
> I spend time learning somebody else's library?
>
> I think the reason why they don't gain the same traction as
> conventional programming languages is most things are very easy to do
> in OpenSCAD with a few lines of code, whereas most libraries for other
> languages are a lot bigger and more complicated.
I wish we would quit repeating this like it's the whole truth. This
type of talk derails discussions that might lead to a decent library
ecosystem.
Yes, it's "easy" to do many things quickly. It's also very easy to end
up with a "library" that's not actually very reusable, or hopelessly
slow, or fails to handle edge cases, or fails to provide reasonable
validation/assertions (making it easy to have problems using it).
Making good, reusable, documented libraries is *hard*. Both because of
the nature of the work, but also because there are *very few* great
examples of libraries for OpenSCAD. There's little work to borrow from,
so users tend to fall into the same beginner traps and either call it
"good enough for today's project" or give up on OpenSCAD entirely.
I have talked to many people off-list who were discouraged by this
"OpenSCAD doesn't need libraries" talk and just gave up rather than
contributing. I really wish the negativity around libraries and package
managers would stop.
A
adrianv
Wed, Sep 18, 2019 12:21 AM
many people seem to think that the burden of learning a new command is
quite overwhelming.
OpenScad is a tiny language and can be learned in its entirety in about a
day, which I did many years ago. Libraries are much larger things to
learn,
and if I can write everything I use myself, why would I spend time
learning
somebody else's library?
I did not find it so easy to learn OpenSCAD as apparently you did. Dealing
with the immutability of variables, and the need to use tail recursions
instead of loops---these things are not obvious. And without any code
examples (because there are no libraries to read) one is left rather adrift
in trying to figure this stuff out.
Did you not just recently post that you redesigned your code using a
different design philosophy of making everything from extruded 2d shapes and
got it to render much faster? (Assuming I remembered that correctly) that
suggests to me that you are still learning how to use OpenSCAD. Note that
knowing how to use the language is not just knowing its commands, but
understanding fully, deeply, how they interact, and the advantages and
disadvantages of different approaches for modeling the same thing. I'm kind
of skeptical that there are many people who really understand the ins and
outs of polyhedron() within the first day of using OpenSCAD. Indeed, there
may not be many such people at all.
The question "If I can write everything I use myself, why would Is spend
time learning somebody else's library?" is really bizarre to me. I can, in
principle, write everything I do on the computer myself in assembly
language. But would I want to do that? Heck no! It would take a lot
longer to do that than to learn the libraries. And at least for me, the
effort of learning a library, or the 10 seconds it takes to check the
library manual to remember a parameter name, is much less than the effort
required to write the thing again from scratch. And for me it tends to
produce code that is more maintainable.
Indeed, the question I would pose in general is: "If there is a library that
does it, why would I spend the time writing it myself??"
I think the reason why they don't gain the same traction as conventional
programming languages is most things are very easy to do in OpenSCAD with
a
few lines of code, whereas most libraries for other languages are a lot
bigger and more complicated.
I think the reason they don't gain the same traction as conventional
programming languages is that a vocal population here on the forum thinks
they are unnecessary because the things thosepeoplewanttodo are easy.
And for some reason some of these people vocallyoppose* libraries instead
of just ignoring them. That's what I find puzzling. If someone is happy
with base OpenSCAD that person can be happy and go model something----and
ignore any libraries that are written. Why are libraries so offensive to
people who aren't going to use them?
If you want to make just rectangular objects with sharp corners, then things
are in fact pretty easy. But if you want to do things that are curved, with
rounded edges, not so much. My first OpenSCAD design is 108 lines and my
second one is the same length. My third one design is 357 lines of
OpenSCAD, and it wasan't "very easy" or what I would consider "a few lines
of code". The modeling process was pretty painful and there were lots of
steps that were trial-and-error based, which I hate. It also takes about 20
minutes to render, which was pretty annoying during design. The desire to
make this sort of model easier is what lead me to search for libraries.
--
Sent from: http://forum.openscad.org/
nophead wrote
>> many people seem to think that the burden of learning a new command is
> quite overwhelming.
>
> OpenScad is a tiny language and can be learned in its entirety in about a
> day, which I did many years ago. Libraries are much larger things to
> learn,
> and if I can write everything I use myself, why would I spend time
> learning
> somebody else's library?
I did not find it so easy to learn OpenSCAD as apparently you did. Dealing
with the immutability of variables, and the need to use tail recursions
instead of loops---these things are not obvious. And without any code
examples (because there are no libraries to read) one is left rather adrift
in trying to figure this stuff out.
Did you not just recently post that you redesigned your code using a
different design philosophy of making everything from extruded 2d shapes and
got it to render much faster? (Assuming I remembered that correctly) that
suggests to me that you are *still* learning how to use OpenSCAD. Note that
knowing how to use the language is not just knowing its commands, but
understanding fully, deeply, how they interact, and the advantages and
disadvantages of different approaches for modeling the same thing. I'm kind
of skeptical that there are many people who really understand the ins and
outs of polyhedron() within the first day of using OpenSCAD. Indeed, there
may not be many such people at all.
The question "If I can write everything I use myself, why would Is spend
time learning somebody else's library?" is really bizarre to me. I can, in
principle, write everything I do on the computer myself in assembly
language. But would I want to do that? Heck no! It would take a *lot*
longer to do that than to learn the libraries. And at least for me, the
effort of learning a library, or the 10 seconds it takes to check the
library manual to remember a parameter name, is much less than the effort
required to write the thing again from scratch. And for me it tends to
produce code that is more maintainable.
Indeed, the question I would pose in general is: "If there is a library that
does it, why would I spend the time writing it myself??"
> I think the reason why they don't gain the same traction as conventional
> programming languages is most things are very easy to do in OpenSCAD with
> a
> few lines of code, whereas most libraries for other languages are a lot
> bigger and more complicated.
I think the reason they don't gain the same traction as conventional
programming languages is that a vocal population here on the forum thinks
they are unnecessary because the things *those*people*want*to*do* are easy.
And for some reason some of these people *vocally*oppose* libraries instead
of just ignoring them. That's what I find puzzling. If someone is happy
with base OpenSCAD that person can be happy and go model something----and
*ignore* any libraries that are written. Why are libraries so offensive to
people who aren't going to use them?
If you want to make just rectangular objects with sharp corners, then things
are in fact pretty easy. But if you want to do things that are curved, with
rounded edges, not so much. My first OpenSCAD design is 108 lines and my
second one is the same length. My third one design is 357 lines of
OpenSCAD, and it wasan't "very easy" or what I would consider "a few lines
of code". The modeling process was pretty painful and there were lots of
steps that were trial-and-error based, which I hate. It also takes about 20
minutes to render, which was pretty annoying during design. The desire to
make this sort of model easier is what lead me to search for libraries.
--
Sent from: http://forum.openscad.org/
JF
Joe Francis
Wed, Sep 18, 2019 12:27 AM
On 9/17/19 7:21 PM, adrianv wrote:
I think the reason why they don't gain the same traction as conventional
programming languages is most things are very easy to do in OpenSCAD with
a
few lines of code, whereas most libraries for other languages are a lot
bigger and more complicated.
I think the reason they don't gain the same traction as conventional
programming languages is that a vocal population here on the forum thinks
they are unnecessary because the things thosepeoplewanttodo are easy.
And for some reason some of these people vocallyoppose* libraries instead
of just ignoring them. That's what I find puzzling. If someone is happy
with base OpenSCAD that person can be happy and go model something----and
ignore any libraries that are written. Why are libraries so offensive to
people who aren't going to use them?
This times 1000! Nobody is going to make you use other people's
libraries, but there's no reason to discourage everyone else from
writing them. Please quit doing so!
On 9/17/19 7:21 PM, adrianv wrote:
> nophead wrote
>
>> I think the reason why they don't gain the same traction as conventional
>> programming languages is most things are very easy to do in OpenSCAD with
>> a
>> few lines of code, whereas most libraries for other languages are a lot
>> bigger and more complicated.
> I think the reason they don't gain the same traction as conventional
> programming languages is that a vocal population here on the forum thinks
> they are unnecessary because the things *those*people*want*to*do* are easy.
> And for some reason some of these people *vocally*oppose* libraries instead
> of just ignoring them. That's what I find puzzling. If someone is happy
> with base OpenSCAD that person can be happy and go model something----and
> *ignore* any libraries that are written. Why are libraries so offensive to
> people who aren't going to use them?
>
This times 1000! Nobody is going to make you use other people's
libraries, but there's no reason to discourage everyone else from
writing them. *Please* quit doing so!
M
MichaelAtOz
Wed, Sep 18, 2019 12:51 AM
The lack of a really clear mechanism for distributing libraries has been
one
problem. It's pretty hard to find the various libraries that are
scattered
on Thingiverse.
It is also that the language needs further mechanisms to facilitate
libraries.
There is a basic mechanism, the libraries directory of OpenSCAD releases,
however as MCAD has shown it's development is hindered by (as Doug has
written just now) lack of " tools for library writers, so that libraries can
work better".
Then there can be a concept of 'std' libraries and external libraries. Once
there is better library support a 'std' library will be maintainable and
'best' practice can be developed. [I think tp's 'Functions literals / higher
order functions' will prove to be very helpful, add namespaces and probably
few other smaller pieces to support versioning, and it becomes workable]
The general hostility of people on the forum to the use of
libraries is another factor that I think has discouraged the development
of
a functional approach to libraries.
There are, at least, two types of people here, those who subscribe to the
concept of standard libraries, and those who prefer to roll their own.
Personally I'm in both camps. Both types have explained their reasoning
here.
I have not detected hostility, and I don't think views of roll their own are
trying to discourage developments. Or that evangelicals should expect others
to see the light.
This type of discussion come up every year or two then fades away.
Instead of discussing libraries, I think the focus should be on "tools for
library writers" AND maintainers.
Then in conjunction developing 'best' practice guidelines on the criteria
code should have to be considered for formal inclusion in both a core
standard library [distributed in a release], or a 'recognised' external
library [that gets promoted on OpenSCAD web site, support with issues etc].
That's at least 3 phases and won't happen overnight.
I think namespaces would be a next logical step.
[I see there is now a bunch of replies I have yet to read, so obviously not
covered above]
Admin - email* me if you need anything, or if I've done something stupid...
- click on my MichaelAtOz label, there is a link to email me.
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!
Sent from: http://forum.openscad.org/
adrianv wrote
> The lack of a really clear mechanism for distributing libraries has been
> one
> problem. It's pretty hard to find the various libraries that are
> scattered
> on Thingiverse.
It is also that the language needs further mechanisms to facilitate
libraries.
There is a basic mechanism, the libraries directory of OpenSCAD releases,
however as MCAD has shown it's development is hindered by (as Doug has
written just now) lack of " tools for library writers, so that libraries can
work better".
Then there can be a concept of 'std' libraries and external libraries. Once
there is better library support a 'std' library will be maintainable and
'best' practice can be developed. [I think tp's 'Functions literals / higher
order functions' will prove to be very helpful, add namespaces and probably
few other smaller pieces to support versioning, and it becomes workable]
> The general hostility of people on the forum to the use of
> libraries is another factor that I think has discouraged the development
> of
> a functional approach to libraries.
There are, at least, two types of people here, those who subscribe to the
concept of standard libraries, and those who prefer to roll their own.
Personally I'm in both camps. Both types have explained their reasoning
here.
I have not detected hostility, and I don't think views of roll their own are
trying to discourage developments. Or that evangelicals should expect others
to see the light.
This type of discussion come up every year or two then fades away.
Instead of discussing libraries, I think the focus should be on "tools for
library writers" AND maintainers.
Then in conjunction developing 'best' practice guidelines on the criteria
code should have to be considered for formal inclusion in both a core
standard library [distributed in a release], or a 'recognised' external
library [that gets promoted on OpenSCAD web site, support with issues etc].
That's at least 3 phases and won't happen overnight.
I think namespaces would be a next logical step.
[I see there is now a bunch of replies I have yet to read, so obviously not
covered above]
-----
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.
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!
--
Sent from: http://forum.openscad.org/