discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Difference between modelling with Openscad and Freecad

MM
Matt Maggio
Wed, Oct 2, 2019 4:46 PM

There are ways to keep track of dimensions in openscad using parameters. If
you just type cube([10,2,12]); that doesn't produce a record of what those
dimensions where. If they are important or used multiple places it can
often be a good idea to start the script by stating parameters.

cube_l = 10;
cube_w = 2;
cube_h =12;

cube([10,2,12]);

Now we know the dimension of the object if we need to reference it later
like perhaps to put a mitered piece on it.

Another neat trick is to put a hashtag in front of an object to make it
transparent, this way you know what object in the design that line is
referencing. So if you aren't sure if a cylinder is a cut out for a hole or
part of a different part of an assembly you can pick it out of the design.
Be aware this only applies to the f5 preview and has no effect on the final
render. You can also have your finished design and use a #cube(); function
to find the bounding box by iterating the size of the cube, your precision
is limited but it can be useful to ball park the size of the stock you
would need to make something in a subtractive manufacturing process.

Last thing i'll say is that it can be useful to take your design and
difference it from a cube which you manipulate to form different cutouts.
Obviously only relevant if you have internal features, but can be very
helpful.

Openscad is powerful when you can express the final shape in terms of a
mathmatical relationship between objects, or when some really smart person
made a package which does exactly what you want and you can scale it to
your application.

On Wed, Oct 2, 2019 at 5:35 AM Robin2 robin@nbleopard.com wrote:

I don't mean the user-interface, which is obviously very different between
Openscad and Freecad. Different people like different interfaces but anyone
could learn either or both of them if necessary.

It seems to me there is a more fundamental difference. With Freecad (and
other similar CAD programs) you can define an object and later "ask
questions" about that object. For example you can select a point that is
the
corner of a cube and it will tell you the coordinates in 3D space. And you
can locate the surface of a face of the cube even though it may have been
rotated or scaled.

However with Openscad the process of defining a model is mono-directional.
You define the object (such as a cube) and you can have no further
interaction with it. You cannot "ask questions".

Is this a fair assessment, or am I completely muddled?

As I see it very many projects can be created with an Openscad approach -
i.e. without ever needing to be able to "ask questions". But I suspect
there
are some projects where the ability to easily locate a point or a surface
of
an existing object would be essential. And for those cases Openscad would
not be an option.

...R

--
Sent from: http://forum.openscad.org/


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

--
Matt Maggio
Senior Research Technologist
Resuscitation Institute (Rm. 1.380)
Department of Medicine
Rosalind Franklin University of Medicine and Science
3333, Green Bay Rd, North Chicago, IL - 60064.
Office: 224-570-7954
Cell: 815-703-2879
"Take chances, make mistakes, and get messy!!" - Mrs. Frizzle, PhD

There are ways to keep track of dimensions in openscad using parameters. If you just type cube([10,2,12]); that doesn't produce a record of what those dimensions where. If they are important or used multiple places it can often be a good idea to start the script by stating parameters. cube_l = 10; cube_w = 2; cube_h =12; cube([10,2,12]); Now we know the dimension of the object if we need to reference it later like perhaps to put a mitered piece on it. Another neat trick is to put a hashtag in front of an object to make it transparent, this way you know what object in the design that line is referencing. So if you aren't sure if a cylinder is a cut out for a hole or part of a different part of an assembly you can pick it out of the design. Be aware this only applies to the f5 preview and has no effect on the final render. You can also have your finished design and use a #cube(); function to find the bounding box by iterating the size of the cube, your precision is limited but it can be useful to ball park the size of the stock you would need to make something in a subtractive manufacturing process. Last thing i'll say is that it can be useful to take your design and difference it from a cube which you manipulate to form different cutouts. Obviously only relevant if you have internal features, but can be very helpful. Openscad is powerful when you can express the final shape in terms of a mathmatical relationship between objects, or when some really smart person made a package which does exactly what you want and you can scale it to your application. On Wed, Oct 2, 2019 at 5:35 AM Robin2 <robin@nbleopard.com> wrote: > I don't mean the user-interface, which is obviously very different between > Openscad and Freecad. Different people like different interfaces but anyone > could learn either or both of them if necessary. > > It seems to me there is a more fundamental difference. With Freecad (and > other similar CAD programs) you can define an object and later "ask > questions" about that object. For example you can select a point that is > the > corner of a cube and it will tell you the coordinates in 3D space. And you > can locate the surface of a face of the cube even though it may have been > rotated or scaled. > > However with Openscad the process of defining a model is mono-directional. > You define the object (such as a cube) and you can have no further > interaction with it. You cannot "ask questions". > > Is this a fair assessment, or am I completely muddled? > > As I see it very many projects can be created with an Openscad approach - > i.e. without ever needing to be able to "ask questions". But I suspect > there > are some projects where the ability to easily locate a point or a surface > of > an existing object would be essential. And for those cases Openscad would > not be an option. > > ...R > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- Matt Maggio Senior Research Technologist Resuscitation Institute (Rm. 1.380) Department of Medicine Rosalind Franklin University of Medicine and Science 3333, Green Bay Rd, North Chicago, IL - 60064. Office: 224-570-7954 Cell: 815-703-2879 "Take chances, make mistakes, and get messy!!" - Mrs. Frizzle, PhD
NH
nop head
Wed, Oct 2, 2019 5:13 PM

That seems to me a very narrow marketing concept.

Nothing is for sale here.

I agree that professional engineers are not the target market but

shouldn't the Openscad community be looking for ways to get as many
hobbyists as possible to use Openscad - even if they are not programmers?

I don't know. I would never recommend it to anyone that isn't a programmer,
particularly now that there are good free CAD tools, both open and closed
source. Writing software is a very slow process and so is designing objects
with OpenSCAD. When I see what James Bruton knocks up with Fusion360 I
realise it is much more productive that coding in OpenSCAD.

On Wed, 2 Oct 2019 at 17:50, Matt Maggio mattmaggio19@gmail.com wrote:

There are ways to keep track of dimensions in openscad using parameters.
If you just type cube([10,2,12]); that doesn't produce a record of what
those dimensions where. If they are important or used multiple places it
can often be a good idea to start the script by stating parameters.

cube_l = 10;
cube_w = 2;
cube_h =12;

cube([10,2,12]);

Now we know the dimension of the object if we need to reference it later
like perhaps to put a mitered piece on it.

Another neat trick is to put a hashtag in front of an object to make it
transparent, this way you know what object in the design that line is
referencing. So if you aren't sure if a cylinder is a cut out for a hole or
part of a different part of an assembly you can pick it out of the design.
Be aware this only applies to the f5 preview and has no effect on the final
render. You can also have your finished design and use a #cube(); function
to find the bounding box by iterating the size of the cube, your precision
is limited but it can be useful to ball park the size of the stock you
would need to make something in a subtractive manufacturing process.

Last thing i'll say is that it can be useful to take your design and
difference it from a cube which you manipulate to form different cutouts.
Obviously only relevant if you have internal features, but can be very
helpful.

Openscad is powerful when you can express the final shape in terms of a
mathmatical relationship between objects, or when some really smart person
made a package which does exactly what you want and you can scale it to
your application.

On Wed, Oct 2, 2019 at 5:35 AM Robin2 robin@nbleopard.com wrote:

I don't mean the user-interface, which is obviously very different between
Openscad and Freecad. Different people like different interfaces but
anyone
could learn either or both of them if necessary.

It seems to me there is a more fundamental difference. With Freecad (and
other similar CAD programs) you can define an object and later "ask
questions" about that object. For example you can select a point that is
the
corner of a cube and it will tell you the coordinates in 3D space. And you
can locate the surface of a face of the cube even though it may have been
rotated or scaled.

However with Openscad the process of defining a model is mono-directional.
You define the object (such as a cube) and you can have no further
interaction with it. You cannot "ask questions".

Is this a fair assessment, or am I completely muddled?

As I see it very many projects can be created with an Openscad approach -
i.e. without ever needing to be able to "ask questions". But I suspect
there
are some projects where the ability to easily locate a point or a surface
of
an existing object would be essential. And for those cases Openscad would
not be an option.

...R

--
Sent from: http://forum.openscad.org/


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

--
Matt Maggio
Senior Research Technologist
Resuscitation Institute (Rm. 1.380)
Department of Medicine
Rosalind Franklin University of Medicine and Science
3333, Green Bay Rd, North Chicago, IL - 60064.
Office: 224-570-7954
Cell: 815-703-2879
"Take chances, make mistakes, and get messy!!" - Mrs. Frizzle, PhD


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

> That seems to me a very narrow marketing concept. Nothing is for sale here. >I agree that professional engineers are not the target market but shouldn't the Openscad community be looking for ways to get as many hobbyists as possible to use Openscad - even if they are not programmers? I don't know. I would never recommend it to anyone that isn't a programmer, particularly now that there are good free CAD tools, both open and closed source. Writing software is a very slow process and so is designing objects with OpenSCAD. When I see what James Bruton knocks up with Fusion360 I realise it is much more productive that coding in OpenSCAD. On Wed, 2 Oct 2019 at 17:50, Matt Maggio <mattmaggio19@gmail.com> wrote: > There are ways to keep track of dimensions in openscad using parameters. > If you just type cube([10,2,12]); that doesn't produce a record of what > those dimensions where. If they are important or used multiple places it > can often be a good idea to start the script by stating parameters. > > cube_l = 10; > cube_w = 2; > cube_h =12; > > cube([10,2,12]); > > Now we know the dimension of the object if we need to reference it later > like perhaps to put a mitered piece on it. > > Another neat trick is to put a hashtag in front of an object to make it > transparent, this way you know what object in the design that line is > referencing. So if you aren't sure if a cylinder is a cut out for a hole or > part of a different part of an assembly you can pick it out of the design. > Be aware this only applies to the f5 preview and has no effect on the final > render. You can also have your finished design and use a #cube(); function > to find the bounding box by iterating the size of the cube, your precision > is limited but it can be useful to ball park the size of the stock you > would need to make something in a subtractive manufacturing process. > > Last thing i'll say is that it can be useful to take your design and > difference it from a cube which you manipulate to form different cutouts. > Obviously only relevant if you have internal features, but can be very > helpful. > > Openscad is powerful when you can express the final shape in terms of a > mathmatical relationship between objects, or when some really smart person > made a package which does exactly what you want and you can scale it to > your application. > > > On Wed, Oct 2, 2019 at 5:35 AM Robin2 <robin@nbleopard.com> wrote: > >> I don't mean the user-interface, which is obviously very different between >> Openscad and Freecad. Different people like different interfaces but >> anyone >> could learn either or both of them if necessary. >> >> It seems to me there is a more fundamental difference. With Freecad (and >> other similar CAD programs) you can define an object and later "ask >> questions" about that object. For example you can select a point that is >> the >> corner of a cube and it will tell you the coordinates in 3D space. And you >> can locate the surface of a face of the cube even though it may have been >> rotated or scaled. >> >> However with Openscad the process of defining a model is mono-directional. >> You define the object (such as a cube) and you can have no further >> interaction with it. You cannot "ask questions". >> >> Is this a fair assessment, or am I completely muddled? >> >> As I see it very many projects can be created with an Openscad approach - >> i.e. without ever needing to be able to "ask questions". But I suspect >> there >> are some projects where the ability to easily locate a point or a surface >> of >> an existing object would be essential. And for those cases Openscad would >> not be an option. >> >> ...R >> >> >> >> -- >> Sent from: http://forum.openscad.org/ >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > -- > Matt Maggio > Senior Research Technologist > Resuscitation Institute (Rm. 1.380) > Department of Medicine > Rosalind Franklin University of Medicine and Science > 3333, Green Bay Rd, North Chicago, IL - 60064. > Office: 224-570-7954 > Cell: 815-703-2879 > "Take chances, make mistakes, and get messy!!" - Mrs. Frizzle, PhD > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
R
Robin2
Wed, Oct 2, 2019 7:32 PM

nophead wrote

Nothing is for sale here.

That does not mean that the product should not be marketed - that is, if you
want to widen the user base.

When I see what James Bruton knocks up with Fusion360 I
realise it is much more productive that coding in OpenSCAD.

I don't know who James is but I suspect he is very familiar with Fusion360.

I'm thinking of the novice who knows none of the CAD programs and may only
want to build one or two models in a year. For that sort of user a system
that requires very little learning will be very attractive. I think Openscad
can be that system.

...R

--
Sent from: http://forum.openscad.org/

nophead wrote > Nothing is for sale here. That does not mean that the product should not be marketed - that is, if you want to widen the user base. > When I see what James Bruton knocks up with Fusion360 I > realise it is much more productive that coding in OpenSCAD. I don't know who James is but I suspect he is very familiar with Fusion360. I'm thinking of the novice who knows none of the CAD programs and may only want to build one or two models in a year. For that sort of user a system that requires very little learning will be very attractive. I think Openscad can be that system. ...R -- Sent from: http://forum.openscad.org/
F
fred
Wed, Oct 2, 2019 8:36 PM

I like math. I like geometry, algebra, trigonometry and even one semester of calculus, but don't ask me to remember any of the latter!
Trying to engage our makerspace members in OpenSCAD hasn't been fruitless, but as soon as numbers come into play, all bets are off. So far, most of them are full GUI users, ala Tinkercad or rarely Onshape, so having to type (no typing skills either) in words and do math and create geometry scares away most.
Recently a new member, with a passing interest in programming became aware of both OpenSCAD and Solvespace. The former you know, the latter is GUI, but parametric and constrained. Useful for a variety of things and a handy tool for the toolbox.
The new member, let's call him John (because it's his name) embraced OpenSCAD with an enthusiasm I've not seen before. He used the same method I enjoy. Look at someone else's work, try something, if it doesn't work, try something else and of course, trouble shoot why the first one didn't cut it.
Every person takes a different approach to a modeling program, and OpenSCAD certainly fits for many people.
The price is hard to beat.

On Wednesday, October 2, 2019, 3:25:11 PM EDT, Robin2 <robin@nbleopard.com> wrote:  

nophead wrote

Nothing is for sale here.

That does not mean that the product should not be marketed - that is, if you
want to widen the user base.

When I see what James Bruton knocks up with Fusion360 I
realise it is much more productive that coding in OpenSCAD.

I don't know who James is but I suspect he is very familiar with Fusion360.

I'm thinking of the novice who knows none of the CAD programs and may only
want to build one or two models in a year. For that sort of user a system
that requires very little learning will be very attractive. I think Openscad
can be that system.

...R

--
Sent from: http://forum.openscad.org/


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

I like math. I like geometry, algebra, trigonometry and even one semester of calculus, but don't ask me to remember any of the latter! Trying to engage our makerspace members in OpenSCAD hasn't been fruitless, but as soon as numbers come into play, all bets are off. So far, most of them are full GUI users, ala Tinkercad or rarely Onshape, so having to type (no typing skills either) in words and do math and create geometry scares away most. Recently a new member, with a passing interest in programming became aware of both OpenSCAD and Solvespace. The former you know, the latter is GUI, but parametric and constrained. Useful for a variety of things and a handy tool for the toolbox. The new member, let's call him John (because it's his name) embraced OpenSCAD with an enthusiasm I've not seen before. He used the same method I enjoy. Look at someone else's work, try something, if it doesn't work, try something else and of course, trouble shoot why the first one didn't cut it. Every person takes a different approach to a modeling program, and OpenSCAD certainly fits for many people. The price is hard to beat. On Wednesday, October 2, 2019, 3:25:11 PM EDT, Robin2 <robin@nbleopard.com> wrote: nophead wrote > Nothing is for sale here. That does not mean that the product should not be marketed - that is, if you want to widen the user base. > When I see what James Bruton knocks up with Fusion360 I > realise it is much more productive that coding in OpenSCAD. I don't know who James is but I suspect he is very familiar with Fusion360. I'm thinking of the novice who knows none of the CAD programs and may only want to build one or two models in a year. For that sort of user a system that requires very little learning will be very attractive. I think Openscad can be that system. ...R -- Sent from: http://forum.openscad.org/ _______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
R
Robin2
Wed, Oct 2, 2019 10:06 PM

OpenSCAD mailing list wrote

The price is hard to beat.

Same as its competitors - Solvespace and Freecad.

So the competition must be fought with something other than price - such as
an easier learning curve?

...R

--
Sent from: http://forum.openscad.org/

OpenSCAD mailing list wrote > The price is hard to beat. Same as its competitors - Solvespace and Freecad. So the competition must be fought with something other than price - such as an easier learning curve? ...R -- Sent from: http://forum.openscad.org/
T
Troberg
Thu, Oct 3, 2019 6:41 AM

OpenSCAD mailing list wrote

I am of the opinion that if one creates OpenSCAD code in a parametric
manner, it is not necessary to query an object. By creating the object in
this way, you've "told" OpenSCAD everything that you'd need to know later.

Well, it's not strictly necessary, true, but in some cases, it would be very
handy.

Examples:

When things move around a lot. Think of a robot arm, with several bend
points. Sure, build it part by part and be careful, and you can do it, but
occasionally (for example if you do an anim), you might want to know where
the claw is without having to to do all the math.

Say that you are doing a an axle, with bunches of nuts and washers, passing
through several  other bits. Sure, the math is easy, but if components are
designed as modules, I need to check out how thick a nut or a washer is,
instead of just "stack them".

Making rounded/chamfered corners on parts. If you could just query the item,
it would be pretty simple to just get the needed dimensions and procedurally
add the roundings/chamfers.

--
Sent from: http://forum.openscad.org/

OpenSCAD mailing list wrote > I am of the opinion that if one creates OpenSCAD code in a parametric > manner, it is not necessary to query an object. By creating the object in > this way, you've "told" OpenSCAD everything that you'd need to know later. Well, it's not strictly necessary, true, but in some cases, it would be very handy. Examples: When things move around a lot. Think of a robot arm, with several bend points. Sure, build it part by part and be careful, and you can do it, but occasionally (for example if you do an anim), you might want to know where the claw is without having to to do all the math. Say that you are doing a an axle, with bunches of nuts and washers, passing through several other bits. Sure, the math is easy, but if components are designed as modules, I need to check out how thick a nut or a washer is, instead of just "stack them". Making rounded/chamfered corners on parts. If you could just query the item, it would be pretty simple to just get the needed dimensions and procedurally add the roundings/chamfers. -- Sent from: http://forum.openscad.org/
NH
nop head
Thu, Oct 3, 2019 9:50 AM

For a complex assembly like a robot arm I would have modules to position
each segment onto the last one. So there would be say
shoulder_upper_arm_position(), upper_arm_forearm_position() and
forearm_wrist_position().

In the arm assembly the hand would be a child of the forearm, placed with
forearm_wrist_position() and the forearm would be a child of the upper arm,
positioned with  upper_arm_forearm_position (), etc.

If I want to say put a ring on a finger it would simply be a matter of
calling the right sequence of positioning modules, no extra maths at all.
something like:

left_shoulder_position()  shoulder_upper_arm_position ()
upper_arm_forearm_position() forearm_wrist_position()
wrist_ring_finger_position()  ...  ring();

The joint positions might be parameters to each positioning module, or
perhaps $variables.

The position of the ring would be a long chain of transformations but that
is hidden. If I wanted it in X,Y,Z coordinates I would put the maths from
the positioning modules into into functions with the same name. Then the
module version would simply be

module  shoulder_upper_arm_position ()
multmatrix(shoulder_upper_arm_position() ) children();

Then I could call the function versions and multiply the matrices together
to get a transformation matrix the goes from the origin of the robot to the
ring. Mulitpling that by [0, 0, 0, 1] gives the coordinate of the ring.

For stacking washer, my washer and nut modules position their children on
top of themselves. So nut(..) washer(..) nut(..) washer(..)  screw(..)
would build a washer kebab.

On Thu, 3 Oct 2019 at 07:34, Troberg troberg.anders@gmail.com wrote:

OpenSCAD mailing list wrote

I am of the opinion that if one creates OpenSCAD code in a parametric
manner, it is not necessary to query an object. By creating the object in
this way, you've "told" OpenSCAD everything that you'd need to know

later.

Well, it's not strictly necessary, true, but in some cases, it would be
very
handy.

Examples:

When things move around a lot. Think of a robot arm, with several bend
points. Sure, build it part by part and be careful, and you can do it, but
occasionally (for example if you do an anim), you might want to know where
the claw is without having to to do all the math.

Say that you are doing a an axle, with bunches of nuts and washers, passing
through several  other bits. Sure, the math is easy, but if components are
designed as modules, I need to check out how thick a nut or a washer is,
instead of just "stack them".

Making rounded/chamfered corners on parts. If you could just query the
item,
it would be pretty simple to just get the needed dimensions and
procedurally
add the roundings/chamfers.

--
Sent from: http://forum.openscad.org/


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

For a complex assembly like a robot arm I would have modules to position each segment onto the last one. So there would be say shoulder_upper_arm_position(), upper_arm_forearm_position() and forearm_wrist_position(). In the arm assembly the hand would be a child of the forearm, placed with forearm_wrist_position() and the forearm would be a child of the upper arm, positioned with upper_arm_forearm_position (), etc. If I want to say put a ring on a finger it would simply be a matter of calling the right sequence of positioning modules, no extra maths at all. something like: left_shoulder_position() shoulder_upper_arm_position () upper_arm_forearm_position() forearm_wrist_position() wrist_ring_finger_position() ... ring(); The joint positions might be parameters to each positioning module, or perhaps $variables. The position of the ring would be a long chain of transformations but that is hidden. If I wanted it in X,Y,Z coordinates I would put the maths from the positioning modules into into functions with the same name. Then the module version would simply be module shoulder_upper_arm_position () multmatrix(shoulder_upper_arm_position() ) children(); Then I could call the function versions and multiply the matrices together to get a transformation matrix the goes from the origin of the robot to the ring. Mulitpling that by [0, 0, 0, 1] gives the coordinate of the ring. For stacking washer, my washer and nut modules position their children on top of themselves. So nut(..) washer(..) nut(..) washer(..) screw(..) would build a washer kebab. On Thu, 3 Oct 2019 at 07:34, Troberg <troberg.anders@gmail.com> wrote: > OpenSCAD mailing list wrote > > I am of the opinion that if one creates OpenSCAD code in a parametric > > manner, it is not necessary to query an object. By creating the object in > > this way, you've "told" OpenSCAD everything that you'd need to know > later. > > Well, it's not strictly necessary, true, but in some cases, it would be > very > handy. > > Examples: > > When things move around a lot. Think of a robot arm, with several bend > points. Sure, build it part by part and be careful, and you can do it, but > occasionally (for example if you do an anim), you might want to know where > the claw is without having to to do all the math. > > Say that you are doing a an axle, with bunches of nuts and washers, passing > through several other bits. Sure, the math is easy, but if components are > designed as modules, I need to check out how thick a nut or a washer is, > instead of just "stack them". > > Making rounded/chamfered corners on parts. If you could just query the > item, > it would be pretty simple to just get the needed dimensions and > procedurally > add the roundings/chamfers. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
T
Troberg
Thu, Oct 3, 2019 11:03 AM

Neat solutions, nophead, but, as I said, it can be done in other ways, but
sometimes, it would be nice to do be able to ask objects for their
properties. Syntactical sugar has its place as well.

--
Sent from: http://forum.openscad.org/

Neat solutions, nophead, but, as I said, it can be done in other ways, but sometimes, it would be nice to do be able to ask objects for their properties. Syntactical sugar has its place as well. -- Sent from: http://forum.openscad.org/
NH
nop head
Thu, Oct 3, 2019 11:20 AM

I express all the properties I need for my objects with functions and
modules. Each parametric object is represented by a list with a set of
accessor functions, so nothing is specified twice and I don't need to query
the geometry. All the important features of an object are built with its
accessor functions. It is a bit clunky as there is a lot of boiler plate to
write but it is very simple code in a simple language, so should be easily
understood.

Syntactic sugar would be object.property instead of
object_property(object). Function literals will allow functions to be
embedded in the property list, so objects can be polymorphic.

On Thu, 3 Oct 2019 at 11:56, Troberg troberg.anders@gmail.com wrote:

Neat solutions, nophead, but, as I said, it can be done in other ways, but
sometimes, it would be nice to do be able to ask objects for their
properties. Syntactical sugar has its place as well.

--
Sent from: http://forum.openscad.org/


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

I express all the properties I need for my objects with functions and modules. Each parametric object is represented by a list with a set of accessor functions, so nothing is specified twice and I don't need to query the geometry. All the important features of an object are built with its accessor functions. It is a bit clunky as there is a lot of boiler plate to write but it is very simple code in a simple language, so should be easily understood. Syntactic sugar would be object.property instead of object_property(object). Function literals will allow functions to be embedded in the property list, so objects can be polymorphic. On Thu, 3 Oct 2019 at 11:56, Troberg <troberg.anders@gmail.com> wrote: > Neat solutions, nophead, but, as I said, it can be done in other ways, but > sometimes, it would be nice to do be able to ask objects for their > properties. Syntactical sugar has its place as well. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
SD
Steven Dick
Thu, Oct 3, 2019 11:21 AM

What OpenSCAD is missing that traditional cad programs have is the
ability to "snap". two pieces together.

Sure you can keep track of where you put the holes, etc., but
something like intersection() creates new surfaces that may be
difficult to find the edges and surface tangents of, may require
complex trigonometry and/or geometry to calculate...

On Thu, Oct 3, 2019 at 6:56 AM Troberg troberg.anders@gmail.com wrote:

Neat solutions, nophead, but, as I said, it can be done in other ways, but
sometimes, it would be nice to do be able to ask objects for their
properties. Syntactical sugar has its place as well.

--
Sent from: http://forum.openscad.org/


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

What OpenSCAD is missing that traditional cad programs have is the ability to "snap". two pieces together. Sure you can keep track of where you put the holes, etc., but something like intersection() creates new surfaces that may be difficult to find the edges and surface tangents of, may require complex trigonometry and/or geometry to calculate... On Thu, Oct 3, 2019 at 6:56 AM Troberg <troberg.anders@gmail.com> wrote: > > Neat solutions, nophead, but, as I said, it can be done in other ways, but > sometimes, it would be nice to do be able to ask objects for their > properties. Syntactical sugar has its place as well. > > > > -- > Sent from: http://forum.openscad.org/ > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org