adrianv wrote
You do realize that popular
computer languages like C++ and Python would be useless without their
extensive libraries. Almost everything you do in one of those languages
is
calling a library. Do you find these standard open source libraries to be
mediocre? Inadequately documented?
You should not try to argue from the particular to the general.
...R
--
Sent from: http://forum.openscad.org/
On 8 Sep 2019 at 19:32, adrianv wrote:
---snip---
Out of curiosity, how might your original query be answered with a method
that does not require learning something new? How could a mechanism allow
you to position a cylinder on the sloped side of an object without
complicating OpenSCAD? I am not able to imagine a mechanism that could do
this that wouldn't require learning a bunch of new commands for managing
that position.
This has made me try to think of a way to allow OpenSCAD to do all the heavy work, while
trying to minimize the need for learning a bunch of new commands.
What if there was a way to identify and specify a face?
Then OpenSCAD could be told to orient that face to be lying on the XY plane, and perhaps to
be centred on the Z axis.
At that point, it would be trivial to paste a cylinder (or any other object) on.
After that operation, it could be restored to its original position and orientation.
As a user, I have no idea how hard it would be to do the first step, identifying and the
specifying the desired face.
This is, of course only in answer to the question of how a mechanism might do the trick.
--
Magic trumps science for most people,
and wishful thinking drives a lot of decision-making.
- Joe Haldeman
lar3ry wrote
On 8 Sep 2019 at 19:32, adrianv wrote:
---snip---
Out of curiosity, how might your original query be answered with a method
that does not require learning something new? How could a mechanism
allow
you to position a cylinder on the sloped side of an object without
complicating OpenSCAD? I am not able to imagine a mechanism that could
do
this that wouldn't require learning a bunch of new commands for managing
that position.
This has made me try to think of a way to allow OpenSCAD to do all the
heavy work, while
trying to minimize the need for learning a bunch of new commands.
What if there was a way to identify and specify a face?
Then OpenSCAD could be told to orient that face to be lying on the XY
plane, and perhaps to
be centred on the Z axis.
At that point, it would be trivial to paste a cylinder (or any other
object) on.
After that operation, it could be restored to its original position and
orientation.
As a user, I have no idea how hard it would be to do the first step,
identifying and the
specifying the desired face.
I'm a bit puzzled about how this reduces the burden of learning new
commands. It seems like you're basically describing the attachment
functionality I have referred to that is in the various libraries. You need
to identify the face you want to work on, and then place your object. The
main requirement for new commands is a mechanism for identifying the face,
which is pretty difficult to do in a generic way. All that's left after
that is whether you want to have a pair of new commands to move your face
into standard position and then move it back (as suggested above), or just a
single command to attach the child object onto the identified face.
I have to admit that I personally don't understand the big objection to
learning a few more commands. New functionality requires new commands.
What's the big deal? The original poster seems to me to have asked "How can
I have this new capability" and I suggested "Well you can use one of these
libraries" and the response is "Oh, but then I'd have to learn new commands
for using that capability". I don't understand this. If you don't want new
commands....don't ask for new capabilities.
--
Sent from: http://forum.openscad.org/
On 2019-09-12 07:27, lar3ry@sasktel.net wrote:
What if there was a way to identify and specify a face?
This is a good question, but the answer may not be so simple.
First, if you consider identifying a face in a polyhedron ("object A")
that you constructed explicitly yourself, you might be expected to know
the face number of each face in it. In theory, you could then refer to A
and a face number and get some function to place the cylinder
perpendicular to that face. But if your cylinder ("object B") was
instead a triangular prism you might have an opinion on the orientation
of the triangular base. That would not be automatically defined by just
the face number, so the specification would be ambiguous, or you would
be required to provide more information.
Second, if A was not an explicitly defined polyhedron, but instead the
result of boolean operation(s) (union() etc.), then you would have no
control over the face numbers. You could not even consider the existence
of a function that could return such information, because the language
does not allow for querying the result of a boolean.
At best you might invent some indirect way of pointing to a face in A,
but most likely it will be complicated to do.
Carsten Arnholm
adrianv wrote
and I suggested "Well you can use one of these
libraries" and the response is "Oh, but then I'd have to learn new
commands
for using that capability".
I'm sorry, but that completely misses the purpose of my original question.
My point was (and is) that it is trivially easy in Freecad and SolveSpace to
add a feature onto a face and I was wondering if there is an equally simple
equivalent feature in Openscad that I had missed. Clearly there is not.
However, as I mentioned in my Reply on /Sep 10, 2019; 9:13am/ I have
figured out a simple workaround.
...R
--
Sent from: http://forum.openscad.org/
You OpenScad fundamentally can't do it for the result of CSG operations
because those faces are not computed until long after all the
expressions are evaluated. It isn't just an issue of identifying them, they
don't exist during expression evaluation when the parameters to rotate and
translate are computed.
If it is a user generated polyhedron then it is straightforward to
compute the position from the face vertices.
On Sat, 14 Sep 2019 at 17:35, arnholm@arnholm.org wrote:
On 2019-09-12 07:27, lar3ry@sasktel.net wrote:
What if there was a way to identify and specify a face?
This is a good question, but the answer may not be so simple.
First, if you consider identifying a face in a polyhedron ("object A")
that you constructed explicitly yourself, you might be expected to know
the face number of each face in it. In theory, you could then refer to A
and a face number and get some function to place the cylinder
perpendicular to that face. But if your cylinder ("object B") was
instead a triangular prism you might have an opinion on the orientation
of the triangular base. That would not be automatically defined by just
the face number, so the specification would be ambiguous, or you would
be required to provide more information.
Second, if A was not an explicitly defined polyhedron, but instead the
result of boolean operation(s) (union() etc.), then you would have no
control over the face numbers. You could not even consider the existence
of a function that could return such information, because the language
does not allow for querying the result of a boolean.
At best you might invent some indirect way of pointing to a face in A,
but most likely it will be complicated to do.
Carsten Arnholm
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org