Discussion:
[OpenSCAD] elegant export to G-code from w/in OpenSCAD?
William Adams
2013-04-15 19:07:04 UTC
Permalink
Would this be feasible?

I was quite thrilled w/ OpenSCAD until the following exchange:

http://www.shapeoko.com/forum/viewtopic.php?f=6&t=204

wherein I learned that it is limited to an internal polygonal representation.

Would it be possible to turn a part inside out, and create G-code for milling away, matching circles and arcs &c. elegantly?

William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
kolergy
2013-04-15 21:50:06 UTC
Permalink
The answer to the exchange you mention in the link is "$fn=xx" this function allows you to set the number of vertex in you circle, by default it is small for the small circles but you can increase it until you are happy with the result.
Post by William Adams
Would this be feasible?
http://www.shapeoko.com/forum/viewtopic.php?f=6&t=204
wherein I learned that it is limited to an internal polygonal representation.
Would it be possible to turn a part inside out, and create G-code for milling away, matching circles and arcs &c. elegantly?
William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-15 22:55:32 UTC
Permalink
I still wish it supported arcs. If it did, it could export to IGES and DXF
and the files would actually be useful for real engineering and machining,
not just tinkering and 3D printing. Apparent IGES is a CSG based format or
whatever, so some chatter back when I joined the list seemed to think it's
possible. True arcs could be defined by setting facets to zero or by
leaving out that parameter (though I think that's already used?).
Post by kolergy
The answer to the exchange you mention in the link is "$fn=xx" this
function allows you to set the number of vertex in you circle, by default
it is small for the small circles but you can increase it until you are
happy with the result.
Post by William Adams
Would this be feasible?
http://www.shapeoko.com/forum/viewtopic.php?f=6&t=204
wherein I learned that it is limited to an internal polygonal
representation.
Post by William Adams
Would it be possible to turn a part inside out, and create G-code for
milling away, matching circles and arcs &c. elegantly?
Post by William Adams
William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-15 23:18:44 UTC
Permalink
I still wish it supported arcs. If it did, it could export to IGES and DXF and the files would actually be useful for real engineering and machining, not just tinkering and 3D printing. Apparent IGES is a CSG based format or whatever, so some chatter back when I joined the list seemed to think it's possible. True arcs could be defined by setting facets to zero or by leaving out that parameter (though I think that's already used?).
The issue is not the format used, but the geometry engine which does the calculations.
We're using an engine called CGAL, which operates on a polygonal level.
There are other engines out there, but most such engines are commercial and not possible to license for use in an Open Source program like OpenSCAD (in addition to being prohibitively expensive). One free alternative is OpenCascade, but as far as I understand, they also do all CSG operations on triangle meshes, not smooth curves and surfaces.

We're constantly on the lookout for better engines (this is the holy grail of CAD software), so any suggestions are welcome!

-Marius
nop head
2013-04-15 23:22:20 UTC
Permalink
I use the DXF export to route things so it is possible to do "real
engineering and machining". You just have to set the $fa small enough so
the facets aren't noticeable.
Post by Taylor Alexander
I still wish it supported arcs. If it did, it could export to IGES and
DXF and the files would actually be useful for real engineering and
machining, not just tinkering and 3D printing. Apparent IGES is a CSG based
format or whatever, so some chatter back when I joined the list seemed to
think it's possible. True arcs could be defined by setting facets to zero
or by leaving out that parameter (though I think that's already used?).
The issue is not the format used, but the geometry engine which does the calculations.
We're using an engine called CGAL, which operates on a polygonal level.
There are other engines out there, but most such engines are commercial
and not possible to license for use in an Open Source program like OpenSCAD
(in addition to being prohibitively expensive). One free alternative is
OpenCascade, but as far as I understand, they also do all CSG operations on
triangle meshes, not smooth curves and surfaces.
We're constantly on the lookout for better engines (this is the holy grail
of CAD software), so any suggestions are welcome!
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-15 23:51:57 UTC
Permalink
Marius - thanks for explaining the issue! Now that I have some
understanding, it may be easier to solve. I have a friend who has a vested
interest in improving FLOSS CAD, so maybe I'll run that by him.

One question - would it be plausible to partially implement arcs? For
example, could the code be designed so that unsupported operations with
curved surfaces simply fail, leaving it up to the user to get it right?
That could be useful for introducing arcs as an alpha feature for testing.
Post by nop head
I use the DXF export to route things so it is possible to do "real
engineering and machining". You just have to set the $fa small enough so
the facets aren't noticeable.
It's possible to do "real engineering" with OpenSCAD, but not as convenient
as it could be if we had arcs. Technically it's possible to do "real
engineering' with popsicle sticks too. OpenSCAD is a 3D modeller and for
you it's useful for 2D stuff, so that's not the most reassuring. If you
actually want to use OpenSCAD as a real 3D modelling program and hope to
have any interoperability with other CAD or CAM systems, it's a PITA. And
interoperability is pretty important in "real" CAD systems. Not day to day,
but sometimes - and it can be a huge issue when it's not easy.

I made a modification to Wade's extruder using OpenSCAD and Solidworks
mixed together (did the whole Wades mod in OpenSCAD and built the rest of
the assembly in Solidworks, importing the Wades part), and only being able
to import STL is *awful*. When you import an STL into Solidworks versus an
IGES file of the same part, here's what you can't do without partially
re-drawing the part in solidworks:

- select the center or any quadrant of an arc
- select an entire face in one click
- select an entire edge with one click
- draw a line tangent to an arc
- mate two concentric arcs in an assembly (used ALL THE TIME for assemblies
that screw together)
- mate two arcs as tangent in an assembly

Doing any of the above requires that you first draw some construction
geometry, set reference planes/axes, or in many cases tediously select many
facets of something in order to convert it to features that solidworks can
use. What's worse, all that construction geometry that you had to take time
drawing just to work with the part usually all has to be recreated from
scratch if you need to make a change to the OpenSCAD part and re-import it.

Those same limitations above also mean it's often a PITA if you want to CNC
machine something designed in OpenSCAD.

If your CAD system can't interoperate with professional engineering CAD
systems on at least a basic level (the current state of affairs means
interoperability is still just dumb solids like IGES or STEP, but IGES is
worlds better to work with than STL), it's hard to take all the great open
source stuff people have done with OpenSCAD and actually use it in a
professional setting, even if the creator allows or even wanted this to be
the case.

Basically, OpenSCAD shares at least one of the major drawbacks of
mesh-based modelling programs that solid-based modelling programs like
OpenSCAD aren't supposed to have. Meshes are for art, solids are for
engineering (generally). A solid CAD modeller that can only export meshes
is not going to be *nearly* as useful in a professional setting as one that
can export solids.

Which is too bad - there's a lot of great stuff done in OpenSCAD that is
open source, and it would be great if anyone in the community could use it,
not just people who have learned OpenSCAD (I can dabble but *man* is
solidworks easier for me).
Post by nop head
Post by Taylor Alexander
I still wish it supported arcs. If it did, it could export to IGES and
DXF and the files would actually be useful for real engineering and
machining, not just tinkering and 3D printing. Apparent IGES is a CSG based
format or whatever, so some chatter back when I joined the list seemed to
think it's possible. True arcs could be defined by setting facets to zero
or by leaving out that parameter (though I think that's already used?).
The issue is not the format used, but the geometry engine which does the calculations.
We're using an engine called CGAL, which operates on a polygonal level.
There are other engines out there, but most such engines are commercial
and not possible to license for use in an Open Source program like OpenSCAD
(in addition to being prohibitively expensive). One free alternative is
OpenCascade, but as far as I understand, they also do all CSG operations on
triangle meshes, not smooth curves and surfaces.
We're constantly on the lookout for better engines (this is the holy
grail of CAD software), so any suggestions are welcome!
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-16 00:00:59 UTC
Permalink
One question - would it be plausible to partially implement arcs? For example, could the code be designed so that unsupported operations with curved surfaces simply fail, leaving it up to the user to get it right? That could be useful for introducing arcs as an alpha feature for testing.
I've been thinking in that direction - my idea was to keep as much geometry as possible in an as exact form as possible and perform a lazy evaluation to a polygonal level when needed. That way we could store primitives as implicit objects and render them in high resolution until it's needed for e.g. CSG, and only then respect the $fn parameter. Same could go for curves, and eventually things like NURBS.

I'm slowly refactoring my way to having a more flexible backend...

-Marius
whosawhatsis
2013-04-16 00:08:32 UTC
Permalink
I would really love to get support for smooth circles, even if it only works in 2d (for DXF export), but I understand the difficulties involved.
Post by Marius Kintel
One question - would it be plausible to partially implement arcs? For example, could the code be designed so that unsupported operations with curved surfaces simply fail, leaving it up to the user to get it right? That could be useful for introducing arcs as an alpha feature for testing.
I've been thinking in that direction - my idea was to keep as much geometry as possible in an as exact form as possible and perform a lazy evaluation to a polygonal level when needed. That way we could store primitives as implicit objects and render them in high resolution until it's needed for e.g. CSG, and only then respect the $fn parameter. Same could go for curves, and eventually things like NURBS.
I'm slowly refactoring my way to having a more flexible backend...
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
nop head
2013-04-16 00:13:55 UTC
Permalink
I personally think it is good that OpenScad doesn't interop
with conventional 3D CAD. If it did people who don't like code would
take opensource scad projects and convert them into formats for closed
source CAD programs. Once manipulated in a 3D CAD program it would not
convert back to openscad source code again.
Post by Taylor Alexander
Post by Taylor Alexander
One question - would it be plausible to partially implement arcs? For
example, could the code be designed so that unsupported operations with
curved surfaces simply fail, leaving it up to the user to get it right?
That could be useful for introducing arcs as an alpha feature for testing.
I've been thinking in that direction - my idea was to keep as much
geometry as possible in an as exact form as possible and perform a lazy
evaluation to a polygonal level when needed. That way we could store
primitives as implicit objects and render them in high resolution until
it's needed for e.g. CSG, and only then respect the $fn parameter. Same
could go for curves, and eventually things like NURBS.
I'm slowly refactoring my way to having a more flexible backend...
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Triffid Hunter
2013-04-16 00:44:56 UTC
Permalink
I put

$fa = 0.01;
$fs = 2; // change me to 0.5 for export render

at the top of all my scad files. I know it's not quite what you're after,
but for 3d printing 0.5mm segmented curves are indistinguishable from
smooth ones.

I only use $fn for nut traps and octagons, setting the segment length
directly makes far more sense to me.
Don Bright
2013-04-16 01:14:04 UTC
Permalink
For 2d, IMHO it might be theoretically possible to add a secondary engine
that is based on the 'circular traits' feature of CGAL 2d code:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Boolean_set_operations_2/Chapter_main.html

This would in theory allow the user to directly export DXF 'circle' or
'arc' entities.

However certain operations will require conversion to line-segment form.
All 3d stuff is in line-segments so projection() to 2d will never produce
arcs/circles. Any extrude() to 3d also forces the data into line-segment
form. Some 2d operations like 2d minkowski sum probably would force it into
line-segment form.

There is also a requirement that anything in the circle-traits engine would
have to 'render' the same as the line-segment engine, for example with
issues like non-simple polygons (self intersecting polygons, polygons with
holes, holes that meet at a single vertex, holes that intersect, etc etc).

-DB
Post by nop head
I personally think it is good that OpenScad doesn't interop
with conventional 3D CAD. If it did people who don't like code would
take opensource scad projects and convert them into formats for closed
source CAD programs. Once manipulated in a 3D CAD program it would not
convert back to openscad source code again.
Post by Taylor Alexander
Post by Taylor Alexander
One question - would it be plausible to partially implement arcs? For
example, could the code be designed so that unsupported operations with
curved surfaces simply fail, leaving it up to the user to get it right?
That could be useful for introducing arcs as an alpha feature for testing.
I've been thinking in that direction - my idea was to keep as much
geometry as possible in an as exact form as possible and perform a lazy
evaluation to a polygonal level when needed. That way we could store
primitives as implicit objects and render them in high resolution until
it's needed for e.g. CSG, and only then respect the $fn parameter. Same
could go for curves, and eventually things like NURBS.
I'm slowly refactoring my way to having a more flexible backend...
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 02:22:43 UTC
Permalink
Anyone interested in using script-like languages to generate DXF files
might be interested in:
https://pypi.python.org/pypi/dxf/
(I've never used it, just googled for it. Also Python is super easy to
learn. I avoided it for a while but recently spent a day learning it and
it's really simple. http://www.learnpython.org/ )

Still, the rendering given by OpenSCAD would be nice. You could set your
python script to save the DXF file, then re-save an .scad file with the
SCAD editor set to auto compile and load, where the scad file just loads
the DXF and extrudes it. Then you'd get a preview upon running your script.
Though that's assuming DXF extrude in OpenSCAD works with complex DXF files.

You could also just have python open the resulting DXF in whatever viewer
you want, actually.
Post by Don Bright
For 2d, IMHO it might be theoretically possible to add a secondary engine
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Boolean_set_operations_2/Chapter_main.html
This would in theory allow the user to directly export DXF 'circle' or
'arc' entities.
However certain operations will require conversion to line-segment form.
All 3d stuff is in line-segments so projection() to 2d will never produce
arcs/circles. Any extrude() to 3d also forces the data into line-segment
form. Some 2d operations like 2d minkowski sum probably would force it into
line-segment form.
There is also a requirement that anything in the circle-traits engine
would have to 'render' the same as the line-segment engine, for example
with issues like non-simple polygons (self intersecting polygons, polygons
with holes, holes that meet at a single vertex, holes that intersect, etc
etc).
-DB
Post by nop head
I personally think it is good that OpenScad doesn't interop
with conventional 3D CAD. If it did people who don't like code would
take opensource scad projects and convert them into formats for closed
source CAD programs. Once manipulated in a 3D CAD program it would not
convert back to openscad source code again.
Post by Taylor Alexander
Post by Taylor Alexander
One question - would it be plausible to partially implement arcs? For
example, could the code be designed so that unsupported operations with
curved surfaces simply fail, leaving it up to the user to get it right?
That could be useful for introducing arcs as an alpha feature for testing.
I've been thinking in that direction - my idea was to keep as much
geometry as possible in an as exact form as possible and perform a lazy
evaluation to a polygonal level when needed. That way we could store
primitives as implicit objects and render them in high resolution until
it's needed for e.g. CSG, and only then respect the $fn parameter. Same
could go for curves, and eventually things like NURBS.
I'm slowly refactoring my way to having a more flexible backend...
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
ds
2013-04-16 17:10:13 UTC
Permalink
To my way of thinking, the fact that arcs are not supported is mostly
irrelevant to getting output to CNC. If you look at the whole chain of
events associated with getting the cutter to move the right way, the
controller is still outputting a series of x, y, z movements to the
servos on a very small scale to get smooth curves.

Once your $fn is an arbitrarily large number, the only difference is
that your G-Code would be much more compact with arcs. So, it would
seem that if you have to load a cache of G-Code to a machine to run your
program you might care, but otherwise it doesn't seem like it would
matter at all.
Post by Don Bright
For 2d, IMHO it might be theoretically possible to add a secondary
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Boolean_set_operations_2/Chapter_main.html
This would in theory allow the user to directly export DXF 'circle' or
'arc' entities.
However certain operations will require conversion to line-segment
form. All 3d stuff is in line-segments so projection() to 2d will
never produce arcs/circles. Any extrude() to 3d also forces the data
into line-segment form. Some 2d operations like 2d minkowski sum
probably would force it into line-segment form.
There is also a requirement that anything in the circle-traits engine
would have to 'render' the same as the line-segment engine, for
example with issues like non-simple polygons (self intersecting
polygons, polygons with holes, holes that meet at a single vertex,
holes that intersect, etc etc).
-DB
I personally think it is good that OpenScad doesn't interop
with conventional 3D CAD. If it did people who don't like code
would take opensource scad projects and convert them into formats
for closed source CAD programs. Once manipulated in a 3D CAD
program it would not convert back to openscad source code again.
Post by Taylor Alexander
One question - would it be plausible to partially implement
arcs? For example, could the code be designed so that
unsupported operations with curved surfaces simply fail,
leaving it up to the user to get it right? That could be
useful for introducing arcs as an alpha feature for testing.
I've been thinking in that direction - my idea was to keep as
much geometry as possible in an as exact form as possible and
perform a lazy evaluation to a polygonal level when needed.
That way we could store primitives as implicit objects and
render them in high resolution until it's needed for e.g. CSG,
and only then respect the $fn parameter. Same could go for
curves, and eventually things like NURBS.
I'm slowly refactoring my way to having a more flexible backend...
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
William Adams
2013-04-16 17:39:09 UTC
Permalink
To my way of thinking, the fact that arcs are not supported is mostly irrelevant to getting output to CNC. If you look at the whole chain of events associated with getting the cutter to move the right way, the controller is still outputting a series of x, y, z movements to the servos on a very small scale to get smooth curves.
- bloated filesize
- longer send-time
- longer run-time
- more complex file which is well-nigh impossible to edit by hand.
- faceted surface finish

For that last, look at:

http://mae.engr.ucdavis.edu/~farouki/ijmtm99a.pdf

in particular, Fig. 9.

William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
ds
2013-04-16 17:41:57 UTC
Permalink
I'll take a look. Thanks.

Don
Post by William Adams
To my way of thinking, the fact that arcs are not supported is mostly irrelevant to getting output to CNC. If you look at the whole chain of events associated with getting the cutter to move the right way, the controller is still outputting a series of x, y, z movements to the servos on a very small scale to get smooth curves.
- bloated filesize
- longer send-time
- longer run-time
- more complex file which is well-nigh impossible to edit by hand.
- faceted surface finish
http://mae.engr.ucdavis.edu/~farouki/ijmtm99a.pdf
in particular, Fig. 9.
William
nop head
2013-04-16 18:05:53 UTC
Permalink
Perhaps my eyes are dim but I can't see any facets on the things I mill.
Run time should be the same as long as the comms link keeps up with the
extra data and the motion controller has lookahead like Marlin and LinuxEMC.
Post by ds
I'll take a look. Thanks.
Don
Post by William Adams
Post by ds
To my way of thinking, the fact that arcs are not supported is mostly
irrelevant to getting output to CNC. If you look at the whole chain of
events associated with getting the cutter to move the right way, the
controller is still outputting a series of x, y, z movements to the servos
on a very small scale to get smooth curves.
Post by William Adams
- bloated filesize
- longer send-time
- longer run-time
- more complex file which is well-nigh impossible to edit by hand.
- faceted surface finish
http://mae.engr.ucdavis.edu/~farouki/ijmtm99a.pdf
in particular, Fig. 9.
William
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 18:35:20 UTC
Permalink
Many of the main issues I listed up above are issues when CNCing something
(where I reference CAM software).
You can't pick the center of a hole to drill it without first adding some
construction geometry - okay, not too big of a deal. Wait, you have 100
holes in your plate? Eek. My CAM program can auto select the center of all
arcs of a certain size in a window with a few clicks - can't do that if
they aren't arcs.
And let's say I want to cut a contour around the edge of the part - wait,
no continuous edge? Every time you try to specify an edge, it will run
along that line and any others after it as long as there are no
intersections. With every STL facet I have to click a million times to
specify the whole perimeter of a part, a problem I don't have to deal with
normally.

I'm talking about doing CNCing in a business environment, so I was more
time sensitive, but really once you've done it the right way, you realize
how bad STL is. I did all the machine programming for a small shop with 2
Haas mills and a Haas lathe so trust me when I say this: compared to any
alternative, STL is an awful, awful format to machine from. IGES would be a
huge improvement.

And the aforementioned lack of editability in a Solids based program after
it leaves the OpenSCAD is a real problem.

I love open scad. I use solid works because I actually have a license and
its "the Cadillac of CAD" in many ways, but I hate how exclusive it is and
I wish my friends would easily learn CAD so they could 3d print with me -
so I really love the idea of OpenSCAD and this isn't ignorance or a dislike
for the program, its just genuinely bad compared to an engineering CAD
environment, and polygonal geometry is largely to blame (and syntax, but we
know that one).
Post by nop head
Perhaps my eyes are dim but I can't see any facets on the things I mill.
Run time should be the same as long as the comms link keeps up with the
extra data and the motion controller has lookahead like Marlin and LinuxEMC.
Post by nop head
Post by ds
I'll take a look. Thanks.
Don
Post by William Adams
Post by ds
To my way of thinking, the fact that arcs are not supported is mostly
irrelevant to getting output to CNC. If you look at the whole chain of
events associated with getting the cutter to move the right way, the
controller is still outputting a series of x, y, z movements to the servos
on a very small scale to get smooth curves.
Post by nop head
Post by ds
Post by William Adams
- bloated filesize
- longer send-time
- longer run-time
- more complex file which is well-nigh impossible to edit by hand.
- faceted surface finish
http://mae.engr.ucdavis.edu/~farouki/ijmtm99a.pdf
in particular, Fig. 9.
William
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
nop head
2013-04-16 18:43:22 UTC
Permalink
I wrote a simple Python script to calculate drill centres from DXF files
made by OpenScad. I am surprised a commercial CAM program can't do it..
Post by Taylor Alexander
Many of the main issues I listed up above are issues when CNCing something
(where I reference CAM software).
You can't pick the center of a hole to drill it without first adding some
construction geometry - okay, not too big of a deal. Wait, you have 100
holes in your plate? Eek. My CAM program can auto select the center of all
arcs of a certain size in a window with a few clicks - can't do that if
they aren't arcs.
And let's say I want to cut a contour around the edge of the part - wait,
no continuous edge? Every time you try to specify an edge, it will run
along that line and any others after it as long as there are no
intersections. With every STL facet I have to click a million times to
specify the whole perimeter of a part, a problem I don't have to deal with
normally.
I'm talking about doing CNCing in a business environment, so I was more
time sensitive, but really once you've done it the right way, you realize
how bad STL is. I did all the machine programming for a small shop with 2
Haas mills and a Haas lathe so trust me when I say this: compared to any
alternative, STL is an awful, awful format to machine from. IGES would be a
huge improvement.
And the aforementioned lack of editability in a Solids based program after
it leaves the OpenSCAD is a real problem.
I love open scad. I use solid works because I actually have a license and
its "the Cadillac of CAD" in many ways, but I hate how exclusive it is and
I wish my friends would easily learn CAD so they could 3d print with me -
so I really love the idea of OpenSCAD and this isn't ignorance or a dislike
for the program, its just genuinely bad compared to an engineering CAD
environment, and polygonal geometry is largely to blame (and syntax, but we
know that one).
Post by nop head
Perhaps my eyes are dim but I can't see any facets on the things I mill.
Run time should be the same as long as the comms link keeps up with the
extra data and the motion controller has lookahead like Marlin and LinuxEMC.
Post by nop head
Post by ds
I'll take a look. Thanks.
Don
Post by William Adams
Post by ds
To my way of thinking, the fact that arcs are not supported is
mostly irrelevant to getting output to CNC. If you look at the whole chain
of events associated with getting the cutter to move the right way, the
controller is still outputting a series of x, y, z movements to the servos
on a very small scale to get smooth curves.
Post by nop head
Post by ds
Post by William Adams
- bloated filesize
- longer send-time
- longer run-time
- more complex file which is well-nigh impossible to edit by hand.
- faceted surface finish
http://mae.engr.ucdavis.edu/~farouki/ijmtm99a.pdf
in particular, Fig. 9.
William
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 18:52:10 UTC
Permalink
I understand that you want to explain it away because it has so far all
worked for you, but you're hurting the project if you want to keep brushing
the issue aside, because I'm telling you: it doesn't work for everyone and
I think if we improve it the project will benefit from it.

CAM programs don't need to mess with stuff like that because its such a
rare situation to machine something from STL. No one uses STL in machining.

Another example: pick the center of a box with rounded corners. The exact
center. Normally I can just draw a line from the center of the top to the
center of the bottom. You can't pick the center of an edge with STL, so its
a pain. I know how to do it but its more work. Everything is all still
"possible", but its much harder with the way things are.

The fact that you had to use a python script to post process your CAD file
for something that basic should be proof enough that there is something
lacking from the CAD program.
Post by nop head
I wrote a simple Python script to calculate drill centres from DXF files
made by OpenScad. I am surprised a commercial CAM program can't do it..
Post by Taylor Alexander
Many of the main issues I listed up above are issues when CNCing
something (where I reference CAM software).
You can't pick the center of a hole to drill it without first adding some
construction geometry - okay, not too big of a deal. Wait, you have 100
holes in your plate? Eek. My CAM program can auto select the center of all
arcs of a certain size in a window with a few clicks - can't do that if
they aren't arcs.
And let's say I want to cut a contour around the edge of the part - wait,
no continuous edge? Every time you try to specify an edge, it will run
along that line and any others after it as long as there are no
intersections. With every STL facet I have to click a million times to
specify the whole perimeter of a part, a problem I don't have to deal with
normally.
I'm talking about doing CNCing in a business environment, so I was more
time sensitive, but really once you've done it the right way, you realize
how bad STL is. I did all the machine programming for a small shop with 2
Haas mills and a Haas lathe so trust me when I say this: compared to any
alternative, STL is an awful, awful format to machine from. IGES would be a
huge improvement.
And the aforementioned lack of editability in a Solids based program
after it leaves the OpenSCAD is a real problem.
I love open scad. I use solid works because I actually have a license and
its "the Cadillac of CAD" in many ways, but I hate how exclusive it is and
I wish my friends would easily learn CAD so they could 3d print with me -
so I really love the idea of OpenSCAD and this isn't ignorance or a dislike
for the program, its just genuinely bad compared to an engineering CAD
environment, and polygonal geometry is largely to blame (and syntax, but we
know that one).
Post by nop head
Perhaps my eyes are dim but I can't see any facets on the things I
mill. Run time should be the same as long as the comms link keeps up with
the extra data and the motion controller has lookahead like Marlin and
LinuxEMC.
Post by nop head
Post by ds
I'll take a look. Thanks.
Don
Post by William Adams
Post by ds
To my way of thinking, the fact that arcs are not supported is
mostly irrelevant to getting output to CNC. If you look at the whole chain
of events associated with getting the cutter to move the right way, the
controller is still outputting a series of x, y, z movements to the servos
on a very small scale to get smooth curves.
Post by nop head
Post by ds
Post by William Adams
- bloated filesize
- longer send-time
- longer run-time
- more complex file which is well-nigh impossible to edit by hand.
- faceted surface finish
http://mae.engr.ucdavis.edu/~farouki/ijmtm99a.pdf
in particular, Fig. 9.
William
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Alan Cox
2013-04-16 19:02:07 UTC
Permalink
Post by Taylor Alexander
And the aforementioned lack of editability in a Solids based program after
it leaves the OpenSCAD is a real problem.
Would that be easier to tackle in implicitcad rather than OpenSCAD I
wonder ? ImplicitCAD has its own engine and can describe a wide range of
rounded objects. It also has a "perfect" internal model of objects and
then approximates it for your output medium. So an ImplicitCAD sphere
*is* a sphere.

Apart from the irritating different (and silently different) behaviour
with unions its pretty easy to do the same things as OpenSCAD or move
stuff back and forth.

To be honest for 3D printing I think there are more pressing problems for
OpenSCAD to solve - colour, textures (for the next generation printing
that can do textured print), fillets, hollowing (take a solid block and
hollow it out to a specified wall thickness) and bending an extrusion
along a 2D path.

Both are open source so I guess it comes down to "send patches" for all
of us.

Alan
nop head
2013-04-16 19:27:34 UTC
Permalink
I had a play with ImplicitCAD. Yes it has a mathematical internal model but
when it generates STL files they have much worse artefacts than than the
faceting in OpenScad, which is regular and controllable.
Post by Alan Cox
Post by Taylor Alexander
And the aforementioned lack of editability in a Solids based program
after
Post by Taylor Alexander
it leaves the OpenSCAD is a real problem.
Would that be easier to tackle in implicitcad rather than OpenSCAD I
wonder ? ImplicitCAD has its own engine and can describe a wide range of
rounded objects. It also has a "perfect" internal model of objects and
then approximates it for your output medium. So an ImplicitCAD sphere
*is* a sphere.
Apart from the irritating different (and silently different) behaviour
with unions its pretty easy to do the same things as OpenSCAD or move
stuff back and forth.
To be honest for 3D printing I think there are more pressing problems for
OpenSCAD to solve - colour, textures (for the next generation printing
that can do textured print), fillets, hollowing (take a solid block and
hollow it out to a specified wall thickness) and bending an extrusion
along a 2D path.
Both are open source so I guess it comes down to "send patches" for all
of us.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Alan Cox
2013-04-16 21:51:29 UTC
Permalink
On Tue, 16 Apr 2013 20:27:34 +0100
Post by nop head
I had a play with ImplicitCAD. Yes it has a mathematical internal model but
when it generates STL files they have much worse artefacts than than the
faceting in OpenScad, which is regular and controllable.
Of the two however its easier to fix ImplicitCAD to generate arcs than to
fix OpenSCAD to have a different internal representation.

Alan
Taylor Alexander
2013-04-16 21:59:58 UTC
Permalink
I've kind of been wondering if OpenSCAD needs to just drop a lot of the old
ways and do a serious rewrite. Like, I see that someone has made some
python binding for OpenSCAD and I feel like there's probably a lot of
validity to that. Having a CAD program that can also access the filesystem
etc and is a real programming language has some serious advantages.

Apparently PySCAD is pre-alpha state, but one possible thing they mentioned
it could do would be, say, allow for a script that parses an EagleCAD XML
file to automatically generate a 3D printable case for a board. A huge
benefit being that the feature wouldn't have to be added to the program and
compiled in, you could write the "import eagle board" function as your
script, rather than trying to modify OpenSCAD to support that kind of thing.

Maybe this has been considered - I'm just curious if it's a time issue or
if that would not be a desirable outcome even if there were time for it.

I'd really love to see some more solid foundations to CAD, and if you're
not going to do GUI-driven CAD, it makes a lot of sense for the programming
language used to have full operating system access, so programmers can get
way more power out of it, rather than this super limited scripting language.

Is anyone really against the idea?
Post by Alan Cox
On Tue, 16 Apr 2013 20:27:34 +0100
Post by nop head
I had a play with ImplicitCAD. Yes it has a mathematical internal model
but
Post by nop head
when it generates STL files they have much worse artefacts than than the
faceting in OpenScad, which is regular and controllable.
Of the two however its easier to fix ImplicitCAD to generate arcs than to
fix OpenSCAD to have a different internal representation.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 22:00:57 UTC
Permalink
And when I say serious rewrite, I mean possible merge with other open
source CAD packages if that's what is needed. I think there's plenty of
room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
Post by Taylor Alexander
I've kind of been wondering if OpenSCAD needs to just drop a lot of the
old ways and do a serious rewrite. Like, I see that someone has made some
python binding for OpenSCAD and I feel like there's probably a lot of
validity to that. Having a CAD program that can also access the filesystem
etc and is a real programming language has some serious advantages.
Apparently PySCAD is pre-alpha state, but one possible thing they
mentioned it could do would be, say, allow for a script that parses an
EagleCAD XML file to automatically generate a 3D printable case for a
board. A huge benefit being that the feature wouldn't have to be added to
the program and compiled in, you could write the "import eagle board"
function as your script, rather than trying to modify OpenSCAD to support
that kind of thing.
Maybe this has been considered - I'm just curious if it's a time issue or
if that would not be a desirable outcome even if there were time for it.
I'd really love to see some more solid foundations to CAD, and if you're
not going to do GUI-driven CAD, it makes a lot of sense for the programming
language used to have full operating system access, so programmers can get
way more power out of it, rather than this super limited scripting language.
Is anyone really against the idea?
Post by Alan Cox
On Tue, 16 Apr 2013 20:27:34 +0100
Post by nop head
I had a play with ImplicitCAD. Yes it has a mathematical internal model
but
Post by nop head
when it generates STL files they have much worse artefacts than than the
faceting in OpenScad, which is regular and controllable.
Of the two however its easier to fix ImplicitCAD to generate arcs than to
fix OpenSCAD to have a different internal representation.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-16 22:10:31 UTC
Permalink
And when I say serious rewrite, I mean possible merge with other open source CAD packages if that's what is needed. I think there's plenty of room for a script based CAD program but the core of OpenSCAD needs to be more flexible and more capable.
In terms of providing a scripting interface using a real programming language on top of a CAD package, I feel that FreeCAD is doing a significant effort in that direction (they even have an OpenSCAD importer). I haven't actually used FreeCAD, so I cannot say anything concrete about pros and cons, but it's worth looking into. To my understanding, they will also tessellate every surface undergoing CSG operations, but I might be wrong.

-Marius
Taylor Alexander
2013-04-16 22:18:16 UTC
Permalink
I played with Free cad a few months back. Its great that they're trying to
go for a solidworks-style FLOSS CAD system and I think in the future it
will be a serious player, but I'm concerned that it may take a long time
before its ready.

I should try it again though! Right now I recommend pirating solid works to
friends because nothing else is better (in my opinion), but a functional
open source replacement would be way better. And if it supports open scad
then that's great too. I just checked out implicit cad and it looks nice
too.

Basically I'm wondering if OpenSCAD could basically be abandoned in its
current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other open
source CAD packages if that's what is needed. I think there's plenty of
room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
nop head
2013-04-16 22:22:50 UTC
Permalink
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're trying to
go for a solidworks-style FLOSS CAD system and I think in the future it
will be a serious player, but I'm concerned that it may take a long time
before its ready.
I should try it again though! Right now I recommend pirating solid works
to friends because nothing else is better (in my opinion), but a functional
open source replacement would be way better. And if it supports open scad
then that's great too. I just checked out implicit cad and it looks nice
too.
Basically I'm wondering if OpenSCAD could basically be abandoned in its
current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other open
source CAD packages if that's what is needed. I think there's plenty of
room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 22:27:45 UTC
Permalink
Post by nop head
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than OpenSCAD
syntax. Both are programming languages so the operator still needs an
understanding of basic programming skills. And you don't *have* to do
complicated things with python, you could keep it as simple as OpenSCAD if
you wanted. Just because you *can* do loops and reassignment of variables
doesn't mean you have to.

I went to learnpython.org two weeks ago, followed the super easy tutorials,
and in one day I had a super nice and functional 300+ line python program I
wrote, having never really seen it before. It's really easy to learn if you
just sit down and do it (I did put it off for years though).

And I feel like people who don't want to have anything to do with
programming will probably use Sketchup. I mean seriously, the header on the
OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's
made for programmers, that's the point! :)
Post by nop head
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're trying
to go for a solidworks-style FLOSS CAD system and I think in the future it
will be a serious player, but I'm concerned that it may take a long time
before its ready.
I should try it again though! Right now I recommend pirating solid works
to friends because nothing else is better (in my opinion), but a functional
open source replacement would be way better. And if it supports open scad
then that's great too. I just checked out implicit cad and it looks nice
too.
Basically I'm wondering if OpenSCAD could basically be abandoned in its
current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other open
source CAD packages if that's what is needed. I think there's plenty of
room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 22:31:37 UTC
Permalink
But on the redesign, it would be a lot like how Cura has put a nice face on
Skienforge. Skienforge was the pioneer and Cura made it usable. Maybe we
say "Okay, OpenSCAD paved the way for this, now lets rebuild it knowing
what we know now".

I know there can be some (well deserved) pride associated with being the
creator of a project like this, so it can be hard to let go of, but I'm
just wondering out loud if it might finally be time to evolve the project,
even if that means merging with someone else's work and sharing the credit
in the future. (I don't know if the creator of OpenSCAD is still heavily
involved or what)

Anyway, I'm just talking out loud, feel free to ignore me. :)
Post by Taylor Alexander
Post by nop head
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than
OpenSCAD syntax. Both are programming languages so the operator still needs
an understanding of basic programming skills. And you don't *have* to do
complicated things with python, you could keep it as simple as OpenSCAD if
you wanted. Just because you *can* do loops and reassignment of variables
doesn't mean you have to.
I went to learnpython.org two weeks ago, followed the super easy
tutorials, and in one day I had a super nice and functional 300+ line
python program I wrote, having never really seen it before. It's really
easy to learn if you just sit down and do it (I did put it off for years
though).
And I feel like people who don't want to have anything to do with
programming will probably use Sketchup. I mean seriously, the header on the
OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's
made for programmers, that's the point! :)
Post by nop head
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're trying
to go for a solidworks-style FLOSS CAD system and I think in the future it
will be a serious player, but I'm concerned that it may take a long time
before its ready.
I should try it again though! Right now I recommend pirating solid works
to friends because nothing else is better (in my opinion), but a functional
open source replacement would be way better. And if it supports open scad
then that's great too. I just checked out implicit cad and it looks nice
too.
Basically I'm wondering if OpenSCAD could basically be abandoned in its
current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other open
source CAD packages if that's what is needed. I think there's plenty of
room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
nop head
2013-04-16 22:49:14 UTC
Permalink
And you don't *have* to do complicated things with python, you could keep
it as simple as OpenSCAD if you wanted.

Yes but people wouldn't. I for one would use classes so anybody trying to
understand my code would have to understand OO. As it is I am forced to
used lists to represent objects, which is very easy to understand because
it is explicit.

Why would anybody feel constrained to not use any Python feature they
fancied?
But on the redesign, it would be a lot like how Cura has put a nice face
on Skienforge. Skienforge was the pioneer and Cura made it usable. Maybe we
say "Okay, OpenSCAD paved the way for this, now lets rebuild it knowing
what we know now".
I know there can be some (well deserved) pride associated with being the
creator of a project like this, so it can be hard to let go of, but I'm
just wondering out loud if it might finally be time to evolve the project,
even if that means merging with someone else's work and sharing the credit
in the future. (I don't know if the creator of OpenSCAD is still heavily
involved or what)
Anyway, I'm just talking out loud, feel free to ignore me. :)
Post by Taylor Alexander
Post by nop head
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than
OpenSCAD syntax. Both are programming languages so the operator still needs
an understanding of basic programming skills. And you don't *have* to do
complicated things with python, you could keep it as simple as OpenSCAD if
you wanted. Just because you *can* do loops and reassignment of variables
doesn't mean you have to.
I went to learnpython.org two weeks ago, followed the super easy
tutorials, and in one day I had a super nice and functional 300+ line
python program I wrote, having never really seen it before. It's really
easy to learn if you just sit down and do it (I did put it off for years
though).
And I feel like people who don't want to have anything to do with
programming will probably use Sketchup. I mean seriously, the header on the
OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's
made for programmers, that's the point! :)
Post by nop head
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're trying
to go for a solidworks-style FLOSS CAD system and I think in the future it
will be a serious player, but I'm concerned that it may take a long time
before its ready.
I should try it again though! Right now I recommend pirating solid
works to friends because nothing else is better (in my opinion), but a
functional open source replacement would be way better. And if it supports
open scad then that's great too. I just checked out implicit cad and it
looks nice too.
Basically I'm wondering if OpenSCAD could basically be abandoned in its
current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other
open source CAD packages if that's what is needed. I think there's plenty
of room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 23:00:05 UTC
Permalink
Well yes, that would happen, but I feel like that already does happen. When
I modified Wade's Extruder it was a real mess. It took me forever to figure
out what the hell was going on, and it was really hard to make the file
support multiple configurations since you can't reassign variables. It's
actually *worse* for experienced people because the syntax is so foreign
(to me anyway, obviously plenty of people including yourself have gotten a
handle on it).

At least newbies could write their own stuff in a simple way, and move on
to working with other people's stuff once they understand it. And with
things like objects and classes, it may be even easier to understand.

And again, this is CAD for programmers, supposedly. I'd rather we expand on
that, making it easier for programmers to use while making sure not to
alienate beginners. Right now I feel like the syntax alienates programmers,
and they are probably of greater importance to the project than beginners.
And you don't *have* to do complicated things with python, you could
keep it as simple as OpenSCAD if you wanted.
Yes but people wouldn't. I for one would use classes so anybody trying to
understand my code would have to understand OO. As it is I am forced to
used lists to represent objects, which is very easy to understand because
it is explicit.
Why would anybody feel constrained to not use any Python feature they
fancied?
But on the redesign, it would be a lot like how Cura has put a nice face
on Skienforge. Skienforge was the pioneer and Cura made it usable. Maybe we
say "Okay, OpenSCAD paved the way for this, now lets rebuild it knowing
what we know now".
I know there can be some (well deserved) pride associated with being the
creator of a project like this, so it can be hard to let go of, but I'm
just wondering out loud if it might finally be time to evolve the project,
even if that means merging with someone else's work and sharing the credit
in the future. (I don't know if the creator of OpenSCAD is still heavily
involved or what)
Anyway, I'm just talking out loud, feel free to ignore me. :)
Post by Taylor Alexander
Post by nop head
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than
OpenSCAD syntax. Both are programming languages so the operator still needs
an understanding of basic programming skills. And you don't *have* to do
complicated things with python, you could keep it as simple as OpenSCAD if
you wanted. Just because you *can* do loops and reassignment of variables
doesn't mean you have to.
I went to learnpython.org two weeks ago, followed the super easy
tutorials, and in one day I had a super nice and functional 300+ line
python program I wrote, having never really seen it before. It's really
easy to learn if you just sit down and do it (I did put it off for years
though).
And I feel like people who don't want to have anything to do with
programming will probably use Sketchup. I mean seriously, the header on the
OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's
made for programmers, that's the point! :)
Post by nop head
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're
trying to go for a solidworks-style FLOSS CAD system and I think in the
future it will be a serious player, but I'm concerned that it may take a
long time before its ready.
I should try it again though! Right now I recommend pirating solid
works to friends because nothing else is better (in my opinion), but a
functional open source replacement would be way better. And if it supports
open scad then that's great too. I just checked out implicit cad and it
looks nice too.
Basically I'm wondering if OpenSCAD could basically be abandoned in
its current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other
open source CAD packages if that's what is needed. I think there's plenty
of room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-16 23:01:31 UTC
Permalink
(in case it matters, I should clarify that I actually modified Greg's Wades
extruder, not Wades.)
Post by Taylor Alexander
Well yes, that would happen, but I feel like that already does happen.
When I modified Wade's Extruder it was a real mess. It took me forever to
figure out what the hell was going on, and it was really hard to make the
file support multiple configurations since you can't reassign variables.
It's actually *worse* for experienced people because the syntax is so
foreign (to me anyway, obviously plenty of people including yourself have
gotten a handle on it).
At least newbies could write their own stuff in a simple way, and move on
to working with other people's stuff once they understand it. And with
things like objects and classes, it may be even easier to understand.
And again, this is CAD for programmers, supposedly. I'd rather we expand
on that, making it easier for programmers to use while making sure not to
alienate beginners. Right now I feel like the syntax alienates programmers,
and they are probably of greater importance to the project than beginners.
And you don't *have* to do complicated things with python, you could
keep it as simple as OpenSCAD if you wanted.
Yes but people wouldn't. I for one would use classes so anybody trying to
understand my code would have to understand OO. As it is I am forced to
used lists to represent objects, which is very easy to understand because
it is explicit.
Why would anybody feel constrained to not use any Python feature they
fancied?
But on the redesign, it would be a lot like how Cura has put a nice face
on Skienforge. Skienforge was the pioneer and Cura made it usable. Maybe we
say "Okay, OpenSCAD paved the way for this, now lets rebuild it knowing
what we know now".
I know there can be some (well deserved) pride associated with being the
creator of a project like this, so it can be hard to let go of, but I'm
just wondering out loud if it might finally be time to evolve the project,
even if that means merging with someone else's work and sharing the credit
in the future. (I don't know if the creator of OpenSCAD is still heavily
involved or what)
Anyway, I'm just talking out loud, feel free to ignore me. :)
Post by Taylor Alexander
Post by nop head
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than
OpenSCAD syntax. Both are programming languages so the operator still needs
an understanding of basic programming skills. And you don't *have* to do
complicated things with python, you could keep it as simple as OpenSCAD if
you wanted. Just because you *can* do loops and reassignment of variables
doesn't mean you have to.
I went to learnpython.org two weeks ago, followed the super easy
tutorials, and in one day I had a super nice and functional 300+ line
python program I wrote, having never really seen it before. It's really
easy to learn if you just sit down and do it (I did put it off for years
though).
And I feel like people who don't want to have anything to do with
programming will probably use Sketchup. I mean seriously, the header on the
OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's
made for programmers, that's the point! :)
Post by nop head
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're
trying to go for a solidworks-style FLOSS CAD system and I think in the
future it will be a serious player, but I'm concerned that it may take a
long time before its ready.
I should try it again though! Right now I recommend pirating solid
works to friends because nothing else is better (in my opinion), but a
functional open source replacement would be way better. And if it supports
open scad then that's great too. I just checked out implicit cad and it
looks nice too.
Basically I'm wondering if OpenSCAD could basically be abandoned in
its current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other
open source CAD packages if that's what is needed. I think there's plenty
of room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Stuart Young
2013-04-16 23:10:33 UTC
Permalink
If using Python is the way forward, then IMO someone needs to write an
interpreter that takes OpenSCAD code and converts it into Python code. This
at least allows legacy OpenSCAD code to be used (an important plus) and
also gives people a way forward if they feel constrained by what the
OpenSCAD language can currently do.

The interpreter would want to be very basic, and produce a nice consistent
result, preferably with nice commenting throughout (perhaps even a comment
per OpenSCAD line of code?) to show what has been mapped to what.

That said, I'd still want to retain the OpenSCAD language as the primary
interface, simply because while I know Python, I think it's actually
overblown for this situation. Also, I for one don't want to be counting
white-space all the time. :P

There would be times I'd use such a Python interface, but it wouldn't be
most of the time, and for common stuff I'd do it in OpenSCAD. Being able to
then take that OpenSCAD to Python (using a built-in interpreter) would
allow me to bridge that gap whenever I got to it.

PS: Another thing that might be worth-while is then allowing python code to
be retro-actively included inline in the OpenSCAD language, much as you can
do assembler inline in C, etc. This would allow those comfortable with
OpenSCAD to use it as their primary code choice, but where it lacks, Python
could be "inlined" as necessary.

Note: I'm mainly an interested observer. I'm not what I'd call a programmer
though I can program. I used to be a sys admin, where if you don't at least
understand code, you're going to have a much harder time doing stuff.
OpenSCAD IMO is much easier to learn than a full blown programming
language, and much easier to start a project in, hence my opinions above.

As always, YMMV, take with a pinch of salt, my 5c worth (I don't use 2c,
they're uneconomic to produce). :P
And you don't *have* to do complicated things with python, you could
keep it as simple as OpenSCAD if you wanted.
Yes but people wouldn't. I for one would use classes so anybody trying to
understand my code would have to understand OO. As it is I am forced to
used lists to represent objects, which is very easy to understand because
it is explicit.
Why would anybody feel constrained to not use any Python feature they
fancied?
But on the redesign, it would be a lot like how Cura has put a nice face
on Skienforge. Skienforge was the pioneer and Cura made it usable. Maybe we
say "Okay, OpenSCAD paved the way for this, now lets rebuild it knowing
what we know now".
I know there can be some (well deserved) pride associated with being the
creator of a project like this, so it can be hard to let go of, but I'm
just wondering out loud if it might finally be time to evolve the project,
even if that means merging with someone else's work and sharing the credit
in the future. (I don't know if the creator of OpenSCAD is still heavily
involved or what)
Anyway, I'm just talking out loud, feel free to ignore me. :)
Post by Taylor Alexander
Post by nop head
Using Python as the language would make it very powerful but only
understandable to a programmer. A big feature of OpenScad is that is it a
very simple language and it is quite easy to read other people scripts. I
think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than
OpenSCAD syntax. Both are programming languages so the operator still needs
an understanding of basic programming skills. And you don't *have* to do
complicated things with python, you could keep it as simple as OpenSCAD if
you wanted. Just because you *can* do loops and reassignment of variables
doesn't mean you have to.
I went to learnpython.org two weeks ago, followed the super easy
tutorials, and in one day I had a super nice and functional 300+ line
python program I wrote, having never really seen it before. It's really
easy to learn if you just sit down and do it (I did put it off for years
though).
And I feel like people who don't want to have anything to do with
programming will probably use Sketchup. I mean seriously, the header on the
OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's
made for programmers, that's the point! :)
Post by nop head
Post by Taylor Alexander
I played with Free cad a few months back. Its great that they're
trying to go for a solidworks-style FLOSS CAD system and I think in the
future it will be a serious player, but I'm concerned that it may take a
long time before its ready.
I should try it again though! Right now I recommend pirating solid
works to friends because nothing else is better (in my opinion), but a
functional open source replacement would be way better. And if it supports
open scad then that's great too. I just checked out implicit cad and it
looks nice too.
Basically I'm wondering if OpenSCAD could basically be abandoned in
its current state so more work could be put into newer projects that have
incorporated what OpenSCAD originally did and then some. Other people have
built on the good work of OpenSCAD and I'm wondering if any projects out
there might be better to contribute to. Like PySCAD, implicitcad,
openjscad, or freecad. I just wonder if joining forces would produce a
better community project, or if perhaps we can't find a common goal and
development needs to stay separate.
Post by Taylor Alexander
And when I say serious rewrite, I mean possible merge with other
open source CAD packages if that's what is needed. I think there's plenty
of room for a script based CAD program but the core of OpenSCAD needs to be
more flexible and more capable.
In terms of providing a scripting interface using a real programming
language on top of a CAD package, I feel that FreeCAD is doing a
significant effort in that direction (they even have an OpenSCAD importer).
I haven't actually used FreeCAD, so I cannot say anything concrete about
pros and cons, but it's worth looking into. To my understanding, they will
also tessellate every surface undergoing CSG operations, but I might be
wrong.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
--
Stuart Young (aka Cefiar)
Marius Kintel
2013-04-16 23:06:54 UTC
Permalink
But on the redesign, it would be a lot like how Cura has put a nice face on Skienforge. Skienforge was the pioneer and Cura made it usable. Maybe we say "Okay, OpenSCAD paved the way for this, now lets rebuild it knowing what we know now".
I'm constantly on the look for where to move next. Personally I feel that there is so much OpenSCAD content out there that we should strive to stay compatible, also to keep from fragmenting the user community. I also agree with people saying that a full programming language is not wanted for this (e.g. due to trust issue). However, moving in a direction where it's possible to use real programming constructs in a sandboxed environment would be interesting, and projects like e.g. OpenJsCad is doing something similar.

At the end of the day though, to my knowledge nobody has solved the backend problems we need to solve to take this to the next level.
There are some very early beginnings for this in Javascript, there exist some old systems which are now Open Source (BRL-CAD, OpenCascade), and there are CAD kernels for which Open Source versions probably won't see the day; ACIS, Parasolids + a bunch of private kernels (I guess).

My idea is to keep moving forward, while keeping front- and back-ends as separate as possible and as modular as possible, then simply rewrite the needed parts when time is right.

In terms of syntax - it that's really the problem (I feel it's not, syntax got us where we are today), we can re-invent a new, clean syntax from scratch and write a converter. That would be some work, and I feel it shouldn't be done in C++ this time ;)

Technical discussions on where to go next is welcome!

-Marius
Taylor Alexander
2013-04-16 23:22:14 UTC
Permalink
Post by Marius Kintel
Technical discussions on where to go next is welcome!
Awesome! Yeah sorry for so much meta discussion, I needed to see what other
people's goals/priorities/interests are since I've mostly been lurking.
Sounds to me like there are two obvious paths for the front end we could
try (and many others too):

Keep the language the same and build a higher level compiler on top of
that. (compile python to scad, for example)

Come up with a new language (perhaps python), and write a converter. (check
out PySCAD to see how much of this has been done there, and if its helpful)


The front end stuff may not be the most critical though, as has been
pointed out - we can make an interpreter for anything, but if the backend
functionality isn't there, it's no good.
For the backend, I feel like the necessary functionality for curves,
fillets and chamfers needs to be included.

The question on that would be: is it better to find a new backend and
improve it (like take the one from implicitcad) or is it better to add
curves and fillets to the existing backend?

To that I have no idea which is best.

Marius, do you keep tabs on other projects that are related so you can keep
a good idea for when/if it may make sense to use/merge some of their code?
Post by Marius Kintel
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-16 23:46:45 UTC
Permalink
The front end stuff may not be the most critical though, as has been pointed out - we can make an interpreter for anything, but if the backend functionality isn't there, it's no good.
Yes, that's why I've deferred that discussion so far. Whatever we do though, I feel it needs to be able to run on a javascript VM to be future proof.
The question on that would be: is it better to find a new backend and improve it (like take the one from implicitcad) or is it better to add curves and fillets to the existing backend?
That's the big question (ref. my list of alternatives in my previous email). To do things really right, we should move to a backend engine which does not keep a triangle representation at its core. This is an extremely hard task to do from scratch (thing man years - potentially many of them).

Keeping both the cam and 3D printer community satisfied with one open source tool might be asking for a bit much in the end though :/
Marius, do you keep tabs on other projects that are related so you can keep a good idea for when/if it may make sense to use/merge some of their code?
I keep an overview over what's going on relevant to OpenSCAD, in particular wrt. 3D printing, but I'm by no means an expert on all graphics tools out there.

-Marius
Taylor Alexander
2013-04-16 23:59:12 UTC
Permalink
Yeah, it may be that now isn't the time to move. I just imagine that at
some point, enough open source CAD projects will get far enough along that
eventually it will make sense to take a step back, look at the landscape,
and combine/finish the most promising projects into a new CAD system that's
got the best of everything rolled into a new OpenSCAD like program (still
not talking about full GUI editing, just keeping things simple but moving
forward).

As far as keeping both CAM and 3D printer communities happy, there aren't
any features needed for CAM that would be a problem for 3D printing.
Basically CAM just needs true solids, not STL. It's not just the CAM
community, it's about getting all the mechanical engineers that have
another system they like to be able to work with OpenSCAD files so they can
join the community and contribute, building off of all the work that has
been done in OpenSCAD so far.

We want a system that doesn't scare away experienced people, since
experienced people can return a LOT to the community. I feel like
currently, professionals aren't going to be too interested in OpenSCAD,
even when they're at home working on hobbies. And that's a shame!

Anyway, I could ramble on about ideals forever. I think we've hit on the
key points and I should probably spend some time examining what's out there
before I keep just talking.

And Javascript.... ouch. You may be right but I hope you're wrong!
Post by Taylor Alexander
Post by Taylor Alexander
The front end stuff may not be the most critical though, as has been
pointed out - we can make an interpreter for anything, but if the backend
functionality isn't there, it's no good.
Yes, that's why I've deferred that discussion so far. Whatever we do
though, I feel it needs to be able to run on a javascript VM to be future
proof.
Post by Taylor Alexander
The question on that would be: is it better to find a new backend and
improve it (like take the one from implicitcad) or is it better to add
curves and fillets to the existing backend?
That's the big question (ref. my list of alternatives in my previous
email). To do things really right, we should move to a backend engine which
does not keep a triangle representation at its core. This is an extremely
hard task to do from scratch (thing man years - potentially many of them).
Keeping both the cam and 3D printer community satisfied with one open
source tool might be asking for a bit much in the end though :/
Post by Taylor Alexander
Marius, do you keep tabs on other projects that are related so you can
keep a good idea for when/if it may make sense to use/merge some of their
code?
I keep an overview over what's going on relevant to OpenSCAD, in
particular wrt. 3D printing, but I'm by no means an expert on all graphics
tools out there.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Drew Rogge
2013-04-17 15:41:28 UTC
Permalink
I'd bet that python's indentation based blocks would drive most people coming from OpenSCAD crazy. Without
a good editor it can be pretty tough to get things right.
Using Python as the language would make it very powerful but only understandable to a programmer. A big feature of OpenScad is that is it a very simple language and it is quite easy to read other people scripts. I think that is why it has caught on.
I would posit that learning python syntax is simpler to learn than OpenSCAD syntax. Both are programming languages so the operator still needs an understanding of basic programming skills. And you don't *have* to do complicated things with python, you could keep it as simple as OpenSCAD if you wanted. Just because you *can* do loops and reassignment of variables doesn't mean you have to.
I went to learnpython.org <http://learnpython.org> two weeks ago, followed the super easy tutorials, and in one day I had a super nice and functional 300+ line python program I wrote, having never really seen it before. It's really easy to learn if you just sit down and do it (I did put it off for years though).
And I feel like people who don't want to have anything to do with programming will probably use Sketchup. I mean seriously, the header on the OpenSCAD page says "OpenSCAD - The Programmers Solid 3D CAD Modeller". It's made for programmers, that's the point! :)
Alan Cox
2013-04-16 22:30:27 UTC
Permalink
On Tue, 16 Apr 2013 14:59:58 -0700
Post by Taylor Alexander
I've kind of been wondering if OpenSCAD needs to just drop a lot of the old
ways and do a serious rewrite.
Send patches.
Post by Taylor Alexander
Like, I see that someone has made some python binding for OpenSCAD and I feel
like there's probably a lot of
validity to that. Having a CAD program that can also access the filesystem
etc and is a real programming language has some serious advantages.
Not if your input is untrusted! The simplicity of OpenSCAD in that sense
actually has some material advantages when working with libraries and
material off the internet you don't necessarily trust. It's predictable
(not that a rand() function wouldn't be useful for things like printing
curtain sided vans so that each one has different ripples ;-))

To be honest for a lot of work I treat OpenSCAD as a kind of assembly
language with cool debugger and write programs that write OpenSCAD
output (much the same way many tools treat postscript but in 3D). The fact
I can then use OpenSCAD to debug/tweak/fix them makes it a very productive
end environment.

Alan
Don Bright
2013-04-16 23:04:33 UTC
Permalink
Alan we tried to fix rand() a few months ago, have you tried the new
version? Are you saying you need 'true non-deterministic' rand? The one we
have in there now is pseudo-non-deterministics, IIRC we are using the
Process ID + the time as the seed.

We could put in the full-bore unixy 'non-deterministic rand' but it would
break some compatability with older boost versions. . . . .

DB
Post by Alan Cox
On Tue, 16 Apr 2013 14:59:58 -0700
Post by Taylor Alexander
I've kind of been wondering if OpenSCAD needs to just drop a lot of the
old
Post by Taylor Alexander
ways and do a serious rewrite.
Send patches.
Post by Taylor Alexander
Like, I see that someone has made some python binding for OpenSCAD and I
feel
Post by Taylor Alexander
like there's probably a lot of
validity to that. Having a CAD program that can also access the
filesystem
Post by Taylor Alexander
etc and is a real programming language has some serious advantages.
Not if your input is untrusted! The simplicity of OpenSCAD in that sense
actually has some material advantages when working with libraries and
material off the internet you don't necessarily trust. It's predictable
(not that a rand() function wouldn't be useful for things like printing
curtain sided vans so that each one has different ripples ;-))
To be honest for a lot of work I treat OpenSCAD as a kind of assembly
language with cool debugger and write programs that write OpenSCAD
output (much the same way many tools treat postscript but in 3D). The fact
I can then use OpenSCAD to debug/tweak/fix them makes it a very productive
end environment.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Alan Cox
2013-04-17 15:52:26 UTC
Permalink
On Tue, 16 Apr 2013 18:04:33 -0500
Post by Don Bright
Alan we tried to fix rand() a few months ago, have you tried the new
version? Are you saying you need 'true non-deterministic' rand? The one we
have in there now is pseudo-non-deterministics, IIRC we are using the
Process ID + the time as the seed.
I will give it a go when I get a chance - I've not tried it for a while
so won't have tried the fixed one.

Alan
nop head
2013-04-17 16:03:06 UTC
Permalink
It's easy to get Python indentation right in any editor as long as you
disable tabs. All languages should be indented to be readable. When they
are the brackets become superfluous. This is one of its best features. No
more arguments about how to layout code. No chasing down missing brackets.
No misleading indentation. If it looks right it is right.
Post by Alan Cox
On Tue, 16 Apr 2013 18:04:33 -0500
Post by Don Bright
Alan we tried to fix rand() a few months ago, have you tried the new
version? Are you saying you need 'true non-deterministic' rand? The one
we
Post by Don Bright
have in there now is pseudo-non-deterministics, IIRC we are using the
Process ID + the time as the seed.
I will give it a go when I get a chance - I've not tried it for a while
so won't have tried the fixed one.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Drew Rogge
2013-04-17 21:17:45 UTC
Permalink
The place where I find it bothersome is with line continuation. Being old skool, I try to
limit myself to 80 char long lines (adm3a rulez!). With openscad lines can get pretty long
fast when you do something like:

rotate([0, 90, 0]) translate([body_width/2, body_height/2, 10]) cylinder(r= body_width/2, h=body_height, center=true, $fn=60);

Also I treat openscad programs the same as any other programming endeavor; descriptive names,
few numeric comments, eliminate common code. I will have to admit though that I learned
today that it seems that assignments to "variable names" in modules work as I expected. For
example this works:

module socket(ball_dia, screw_dia, adisp) {

ball_rad=ball_dia/2;
screw_rad=screw_dia/2;
body_height = ball_dia+socket_extra;
cone_min=screw_rad/cos(adisp);
cone_max=body_height*tan(adisp)+cone_min;

...

I guess assign() is only required for redefining something that was previously define within
the current invocation of the function. For example I don't think this works:

module cow(goat) {
for (d = [0:goat]) {
r = d/2;
...

Drew
It's easy to get Python indentation right in any editor as long as you disable tabs. All languages should be indented to be readable. When they are the brackets become superfluous. This is one of its best features. No more arguments about how to layout code. No chasing down missing brackets. No misleading indentation. If it looks right it is right.
On Tue, 16 Apr 2013 18:04:33 -0500
Post by Don Bright
Alan we tried to fix rand() a few months ago, have you tried the new
version? Are you saying you need 'true non-deterministic' rand? The one we
have in there now is pseudo-non-deterministics, IIRC we are using the
Process ID + the time as the seed.
I will give it a go when I get a chance - I've not tried it for a while
so won't have tried the fixed one.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-17 21:36:36 UTC
Permalink
Post by Drew Rogge
I will have to admit though that I learned
today that it seems that assignments to "variable names" in modules work as I expected. For
Yes, when you _define_ a module, it creates a scope for declaring values (as well as inner functions and modules).
Otoh, when you _call_ a module, the _children_ you supply cannot be assignments, but you can provide your own assignments in the argument list.

assign is basically a hack which packs a value assignment into a node, making it a valid child.

I recently cleaned up some of the code handling this, so I could look into what limitations we really are bound by in terms of reassignments (not really reassignments, but new values in an inner scope).

-Marius
Drew Rogge
2013-04-17 21:53:27 UTC
Permalink
Post by Marius Kintel
Post by Drew Rogge
I will have to admit though that I learned
today that it seems that assignments to "variable names" in modules work as I expected. For
Yes, when you _define_ a module, it creates a scope for declaring values (as well as inner functions and modules).
So does this mean that a recursive call either directly or indirectly would NOT "do the right thing" WRT, let's
call them, module local values? In other words if I have a module:

module cow(dog) {
pig = dog/2;
if (pig > 12)
cow(pig);
else:
cylinder(r=pig, h=10);
}

that the value pig wouldn't be assigned a new value?
Post by Marius Kintel
Otoh, when you _call_ a module, the _children_ you supply cannot be assignments, but you can provide your own assignments in the argument list.
Don't understand the above. The following won't work?

doodle = 23;
cow(doddle);

What's the definition of a child?

Drew
Marius Kintel
2013-04-18 00:35:52 UTC
Permalink
Post by Drew Rogge
Post by Marius Kintel
Yes, when you _define_ a module, it creates a scope for declaring values (as well as inner functions and modules).
So does this mean that a recursive call either directly or indirectly would NOT "do the right thing" WRT, let's
module cow(dog) {
pig = dog/2;
[….]
that the value pig wouldn't be assigned a new value?
That would work - modules can _declare_ variables and they will be given a value when called based on the calling context.
Post by Drew Rogge
What's the definition of a child?
A child in this context is what comes directly after a module instantiation, e.g.
translation() sphere(); // sphere() is a child
render() { sphere(); cylinder(); } // two children
mymodule(23) { cube(); } // cube() is a child of mymodule

children can be accessed by the module itself using $children and child(<index>), so the children must be valid OpenSCAD objects.

-Marius

PS. If anyone finds any peculiar actual behavior, please send me some examples and I can try to explain it (or fix it)
nop head
2013-04-17 21:54:59 UTC
Permalink
I think it was discussed before: that it would be more natural to
allow assignments after each opening brace, just like C. Then assign() is
redundant.
Post by Drew Rogge
Post by Drew Rogge
I will have to admit though that I learned
today that it seems that assignments to "variable names" in modules work
as I expected. For
Yes, when you _define_ a module, it creates a scope for declaring values
(as well as inner functions and modules).
Otoh, when you _call_ a module, the _children_ you supply cannot be
assignments, but you can provide your own assignments in the argument list.
assign is basically a hack which packs a value assignment into a node,
making it a valid child.
I recently cleaned up some of the code handling this, so I could look into
what limitations we really are bound by in terms of reassignments (not
really reassignments, but new values in an inner scope).
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-17 21:59:54 UTC
Permalink
I think it was discussed before: that it would be more natural to allow assignments after each opening brace, just like C. Then assign() is redundant.
Yes, that feels right - I'll investigate if that's doable after my last refactor.

-Marius
Taylor Alexander
2013-04-16 23:10:10 UTC
Permalink
Post by Alan Cox
On Tue, 16 Apr 2013 14:59:58 -0700
Post by Taylor Alexander
I've kind of been wondering if OpenSCAD needs to just drop a lot of the
old
Post by Taylor Alexander
ways and do a serious rewrite.
Send patches.
I know, I know. That's kind of why I'm asking though - if other people are
interested in the direction I'm interested in moving the software, I'm more
likely to actually spend the effort. I don't want to waste my time
otherwise.
Post by Alan Cox
Post by Taylor Alexander
Like, I see that someone has made some python binding for OpenSCAD and I
feel
Post by Taylor Alexander
like there's probably a lot of
validity to that. Having a CAD program that can also access the
filesystem
Post by Taylor Alexander
etc and is a real programming language has some serious advantages.
Not if your input is untrusted! The simplicity of OpenSCAD in that sense
actually has some material advantages when working with libraries and
material off the internet you don't necessarily trust.
True. Maybe it could have a notification system where it lets you know if
any non-trusted imports are being used. Kind of like how Android blocks
access to things unless the app declares it, though it would be nice if it
were automatic in this case.
Post by Alan Cox
To be honest for a lot of work I treat OpenSCAD as a kind of assembly
language with cool debugger and write programs that write OpenSCAD
output (much the same way many tools treat postscript but in 3D). The fact
I can then use OpenSCAD to debug/tweak/fix them makes it a very productive
end environment.
And that might be a perfect way to expand the program! If you write in a
higher level language that compiles to SCAD then maybe that's what we
should do - write a program in a higher level language that compiles to
SCAD. Then the fancy people can do fancy stuff but you can always modify
the output directly and/or work solely with SCAD files.
Post by Alan Cox
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Drew Rogge
2013-04-17 15:51:43 UTC
Permalink
Alan,

What do you use for your "higher level" language to generate the OpenSCAD assembler?

Drew
Post by Alan Cox
On Tue, 16 Apr 2013 14:59:58 -0700
[snip]
Post by Alan Cox
To be honest for a lot of work I treat OpenSCAD as a kind of assembly
language with cool debugger and write programs that write OpenSCAD
output (much the same way many tools treat postscript but in 3D). The fact
I can then use OpenSCAD to debug/tweak/fix them makes it a very productive
end environment.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Alan Cox
2013-04-17 18:54:15 UTC
Permalink
On Wed, 17 Apr 2013 08:51:43 -0700
Post by Drew Rogge
Alan,
What do you use for your "higher level" language to generate the OpenSCAD assembler?
Set of programs (mostly in C) which understand the structure of the
models I make (railway ones) and generate a set of polys and rules for
their combination. The input is basically high level facts about the
vehicle (ventilator positions, bogie centres etc).

Alan
Taylor Alexander
2013-04-17 20:05:24 UTC
Permalink
To the comment about python and tabbing... of course its hard to do without
a decent text editor. But I in no way ever proposed keeping the existing
editor, which is truly f'ing awful. I know most people use external
editors, but in my view the internal editor should work for basic use,
period. Last I checked it doesn't even have a find function, which is
really horrible when you're trying to edit someone else's code.
There's plenty of nice editors out there we could borrow code from, so
nothing needs to be really written from scratch, but it should have a
decent editor.

And as noted, keeping track of tabs is surprisingly easy once you work with
python for literally a few hours. It should be noted that my editor
(Textmate 2) shows you both line number and the number of spaces/characters
the cursor is at, so verifying spaces is easy. Plus the compiler keeps you
honest and they're easy to adjust if they're wrong.
Post by Alan Cox
On Wed, 17 Apr 2013 08:51:43 -0700
Post by Drew Rogge
Alan,
What do you use for your "higher level" language to generate the
OpenSCAD assembler?
Set of programs (mostly in C) which understand the structure of the
models I make (railway ones) and generate a set of polys and rules for
their combination. The input is basically high level facts about the
vehicle (ventilator positions, bogie centres etc).
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-17 20:48:18 UTC
Permalink
There's plenty of nice editors out there we could borrow code from, so nothing needs to be really written from scratch, but it should have a decent editor.
The last time I tried, I used QCodeEdit (http://qcodeedit.org), but it died mid-development. It looks like it has restarted now, so it could be worth looking at it again.
The editor functionality is relatively well separated from the rest, so it's a decent stand-alone task for a new developer.

-Marius
Taylor Alexander
2013-04-17 21:05:48 UTC
Permalink
Yeah, compile and reload is fine indefinitely, so the editor doesn't need
to change unless everything else is so much better that the editor becomes
the priority.
Post by Taylor Alexander
Post by Taylor Alexander
There's plenty of nice editors out there we could borrow code from, so
nothing needs to be really written from scratch, but it should have a
decent editor.
The last time I tried, I used QCodeEdit (http://qcodeedit.org), but it
died mid-development. It looks like it has restarted now, so it could be
worth looking at it again.
The editor functionality is relatively well separated from the rest, so
it's a decent stand-alone task for a new developer.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Douglas Jones
2013-04-17 22:59:15 UTC
Permalink
Post by Taylor Alexander
Yeah, compile and reload is fine indefinitely, so the editor doesn't
need to change unless everything else is so much better that the editor
becomes the priority.
I am also using an external editor with OpenSCAD. (It's Leo, not ideal
for this as it doesn't understand OpenSCAD syntax -- yet -- but it's
great for organizing bunches of text.)

One feature that would really help when using external editors with
OpenSCAD is one that gedit has: When you open a file with gedit, and
then open the same file with another editor and change the file in the
other editor and save your changes, as soon as you return to gedit it
checks to see if the file has changed in the meantime. If it has, gedit
pops up a message telling you that the file has changed, and asks if you
want to reload it. It would be great if OpenSCAD had this feature.

('Cause I *need* reminding. When you're switching back and forth
between two programs that share a text, it can get confusing.
Especially if the programs use different hot keys for different things.
You can end up all twisted around, and have to figure out how to
unwind the mess you just made.)

In other words: When the gedit window receives the focus, it looks on
disk for the last-modified-time of the file it has open to see if it has
changed since the last time gedit loaded or saved the file. OpenSCAD
would benefit from such a feature. Or at least I would.


Another feature that would be nice: The ability to open a .scad file as
read-only. (Not using the flags in the file system; the file has to be
marked read/write so the external editor can change it.) When OpenSCAD
has a file opened in this mode, it would not allow changes in the
editing window; if you try to type, it pops up a message (and maybe a
ding) that reminds you that you can't change the text.

Both of these features would reduce my error rate, and generally make it
easier to use external editors with OpenSCAD. (And reduce the perceived
need to expend effort on beefing up OpenSCAD's editor, which could be a
much larger task than the two features I suggested.) (Not that those
other things wouldn't be nice too.)
Post by Taylor Alexander
Post by Taylor Alexander
There's plenty of nice editors out there we could borrow code
from, so nothing needs to be really written from scratch, but it
should have a decent editor.
The last time I tried, I used QCodeEdit (http://qcodeedit.org), but
it died mid-development. It looks like it has restarted now, so it
could be worth looking at it again.
The editor functionality is relatively well separated from the rest,
so it's a decent stand-alone task for a new developer.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
John
2013-04-18 00:13:46 UTC
Permalink
Post by Douglas Jones
One feature that would really help when using external editors with
OpenSCAD is one that gedit has: When you open a file with gedit, and
then open the same file with another editor and change the file in the
other editor and save your changes, as soon as you return to gedit it
checks to see if the file has changed in the meantime. If it has, gedit
pops up a message telling you that the file has changed, and asks if you
want to reload it. It would be great if OpenSCAD had this feature.
Design|Automatic Reload and Compile.

There is no message informing you of a change and prompting.
Personally, in this case I would find that annoying.

John
Taylor Alexander
2013-04-18 00:17:14 UTC
Permalink
Yeah, as John says, the feature is there already. Look under the Design
menu. Adding a popup wouldn't make it better though. Or were you saying it
would?
Post by John
Post by Douglas Jones
One feature that would really help when using external editors with
OpenSCAD is one that gedit has: When you open a file with gedit, and
then open the same file with another editor and change the file in the
other editor and save your changes, as soon as you return to gedit it
checks to see if the file has changed in the meantime. If it has, gedit
pops up a message telling you that the file has changed, and asks if you
want to reload it. It would be great if OpenSCAD had this feature.
Design|Automatic Reload and Compile.
There is no message informing you of a change and prompting.
Personally, in this case I would find that annoying.
John
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
ds
2013-04-18 00:19:35 UTC
Permalink
I'll just note that I like it the way it is. Right now, all my editing
is done externally. OpenSCAD is smart enough to recognize when I change
a file and make a change to the design immediately. That for me is a
great way to do it.

Being notified within OpenSCAD that a file changed and selecting to
update would slow me down considerably.

Just another opinion.

Don
Post by John
Post by Douglas Jones
One feature that would really help when using external editors with
OpenSCAD is one that gedit has: When you open a file with gedit, and
then open the same file with another editor and change the file in the
other editor and save your changes, as soon as you return to gedit it
checks to see if the file has changed in the meantime. If it has, gedit
pops up a message telling you that the file has changed, and asks if you
want to reload it. It would be great if OpenSCAD had this feature.
Design|Automatic Reload and Compile.
There is no message informing you of a change and prompting.
Personally, in this case I would find that annoying.
John
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Taylor Alexander
2013-04-18 00:25:15 UTC
Permalink
I like the way it is too. Any changes to the text editor I want would just
be to give it barebones functionality when you're not on your own machine
and you need to use OpenSCAD for something. You should be able to at least
*use* the internal editor if you have to, even if the official
recommendation were still to use external editors when possible. And in my
opinion, find and find & replace need to be there.
Post by ds
I'll just note that I like it the way it is. Right now, all my editing
is done externally. OpenSCAD is smart enough to recognize when I change
a file and make a change to the design immediately. That for me is a
great way to do it.
Being notified within OpenSCAD that a file changed and selecting to
update would slow me down considerably.
Just another opinion.
Don
Post by John
Post by Douglas Jones
One feature that would really help when using external editors with
OpenSCAD is one that gedit has: When you open a file with gedit, and
then open the same file with another editor and change the file in the
other editor and save your changes, as soon as you return to gedit it
checks to see if the file has changed in the meantime. If it has, gedit
pops up a message telling you that the file has changed, and asks if you
want to reload it. It would be great if OpenSCAD had this feature.
Design|Automatic Reload and Compile.
There is no message informing you of a change and prompting.
Personally, in this case I would find that annoying.
John
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Douglas Jones
2013-04-18 00:46:51 UTC
Permalink
Post by John
Post by Douglas Jones
One feature that would really help when using external editors with
OpenSCAD is one that gedit has: When you open a file with gedit, and
then open the same file with another editor and change the file in the
other editor and save your changes, as soon as you return to gedit it
checks to see if the file has changed in the meantime. If it has, gedit
pops up a message telling you that the file has changed, and asks if you
want to reload it. It would be great if OpenSCAD had this feature.
Design|Automatic Reload and Compile.
There is no message informing you of a change and prompting.
Personally, in this case I would find that annoying.
Excellent! I had missed that feature. Thanks.
Post by John
John
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
whosawhatsis
2013-04-17 21:17:22 UTC
Permalink
I think the existing editor would be fine if it supported find and replace (just allow the system one to work), and it would also be nice if it automatically indented new lines to the same level as the previous one. The syntax highlighting in the current build is nice. Other than those basic features, I don't want too many bells and whistles in my editors.

BTW, I noticed that it highlights $fn and $fa, but not $fs, probably an oversight.
Post by Marius Kintel
There's plenty of nice editors out there we could borrow code from, so nothing needs to be really written from scratch, but it should have a decent editor.
The last time I tried, I used QCodeEdit (http://qcodeedit.org), but it died mid-development. It looks like it has restarted now, so it could be worth looking at it again.
The editor functionality is relatively well separated from the rest, so it's a decent stand-alone task for a new developer.
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Marius Kintel
2013-04-17 21:28:15 UTC
Permalink
Post by whosawhatsis
BTW, I noticed that it highlights $fn and $fa, but not $fs, probably an oversight.
Thx - fixed now.

-Marius
Peter Falke
2013-04-16 20:00:07 UTC
Permalink
An other way to takle this problem is from the side of the CAM program.
If it finds an edge made from many short pieces then fit thier position to a
circle and voila: you have the radius of the arc recovered.

Look for example at minimagics, a stl view. It has a lot of options for
measuring dimensions in a stl model.
It is easy to measure radii with that.
Post by Alan Cox
Post by Taylor Alexander
And the aforementioned lack of editability in a Solids based program
after
Post by Taylor Alexander
it leaves the OpenSCAD is a real problem.
Would that be easier to tackle in implicitcad rather than OpenSCAD I
wonder ? ImplicitCAD has its own engine and can describe a wide range of
rounded objects. It also has a "perfect" internal model of objects and
then approximates it for your output medium. So an ImplicitCAD sphere
*is* a sphere.
Apart from the irritating different (and silently different) behaviour
with unions its pretty easy to do the same things as OpenSCAD or move
stuff back and forth.
To be honest for 3D printing I think there are more pressing problems for
OpenSCAD to solve - colour, textures (for the next generation printing
that can do textured print), fillets, hollowing (take a solid block and
hollow it out to a specified wall thickness) and bending an extrusion
along a 2D path.
Both are open source so I guess it comes down to "send patches" for all
of us.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
--
***@googlemail.com <***@rohrbach.de>

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.

Enjoy!
Taylor Alexander
2013-04-16 20:06:05 UTC
Permalink
Well it makes more sense to fix one open source CAD program than every
other CAD/CAM system out there. ;-)

I agree there are higher priorities, I just want people to know - if you
only use OpenSCAD you may not see it, but lack of arcs and real faces is a
problem for working with the files for anything other than directly going
to print.

It sounds like the pathway is to investigate the engine and see how it can
be improved.
Post by Peter Falke
An other way to takle this problem is from the side of the CAM program.
If it finds an edge made from many short pieces then fit thier position to a
circle and voila: you have the radius of the arc recovered.
Look for example at minimagics, a stl view. It has a lot of options for
measuring dimensions in a stl model.
It is easy to measure radii with that.
Post by Alan Cox
Post by Taylor Alexander
And the aforementioned lack of editability in a Solids based program
after
Post by Taylor Alexander
it leaves the OpenSCAD is a real problem.
Would that be easier to tackle in implicitcad rather than OpenSCAD I
wonder ? ImplicitCAD has its own engine and can describe a wide range of
rounded objects. It also has a "perfect" internal model of objects and
then approximates it for your output medium. So an ImplicitCAD sphere
*is* a sphere.
Apart from the irritating different (and silently different) behaviour
with unions its pretty easy to do the same things as OpenSCAD or move
stuff back and forth.
To be honest for 3D printing I think there are more pressing problems for
OpenSCAD to solve - colour, textures (for the next generation printing
that can do textured print), fillets, hollowing (take a solid block and
hollow it out to a specified wall thickness) and bending an extrusion
along a 2D path.
Both are open source so I guess it comes down to "send patches" for all
of us.
Alan
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
--
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu
schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.
I am currently trying short replies instead of no replies at all.
Please let me know, if you like to read more.
Enjoy!
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Tom Davies
2013-04-16 20:44:26 UTC
Permalink
Here's a non-free post processor which converts arcs made of line segments to true arcs in dxf files: http://www.cadkas.com/dxf-small-lines-to-arcs.php (disclaimer I have never used it)
Kevin Crowley
2013-04-16 00:09:38 UTC
Permalink
I just googled floss cad and seem to have multiple choices.
Post by Taylor Alexander
Marius - thanks for explaining the issue! Now that I have some
understanding, it may be easier to solve. I have a friend who has a vested
interest in improving FLOSS CAD, so maybe I'll run that by him.
One question - would it be plausible to partially implement arcs? For
example, could the code be designed so that unsupported operations with
curved surfaces simply fail, leaving it up to the user to get it right?
That could be useful for introducing arcs as an alpha feature for testing.
Post by nop head
I use the DXF export to route things so it is possible to do "real
engineering and machining". You just have to set the $fa small enough so
the facets aren't noticeable.
It's possible to do "real engineering" with OpenSCAD, but not as
convenient as it could be if we had arcs. Technically it's possible to do
"real engineering' with popsicle sticks too. OpenSCAD is a 3D modeller and
for you it's useful for 2D stuff, so that's not the most reassuring. If you
actually want to use OpenSCAD as a real 3D modelling program and hope to
have any interoperability with other CAD or CAM systems, it's a PITA. And
interoperability is pretty important in "real" CAD systems. Not day to day,
but sometimes - and it can be a huge issue when it's not easy.
I made a modification to Wade's extruder using OpenSCAD and Solidworks
mixed together (did the whole Wades mod in OpenSCAD and built the rest of
the assembly in Solidworks, importing the Wades part), and only being able
to import STL is *awful*. When you import an STL into Solidworks versus an
IGES file of the same part, here's what you can't do without partially
- select the center or any quadrant of an arc
- select an entire face in one click
- select an entire edge with one click
- draw a line tangent to an arc
- mate two concentric arcs in an assembly (used ALL THE TIME for
assemblies that screw together)
- mate two arcs as tangent in an assembly
Doing any of the above requires that you first draw some construction
geometry, set reference planes/axes, or in many cases tediously select many
facets of something in order to convert it to features that solidworks can
use. What's worse, all that construction geometry that you had to take time
drawing just to work with the part usually all has to be recreated from
scratch if you need to make a change to the OpenSCAD part and re-import it.
Those same limitations above also mean it's often a PITA if you want to
CNC machine something designed in OpenSCAD.
If your CAD system can't interoperate with professional engineering CAD
systems on at least a basic level (the current state of affairs means
interoperability is still just dumb solids like IGES or STEP, but IGES is
worlds better to work with than STL), it's hard to take all the great open
source stuff people have done with OpenSCAD and actually use it in a
professional setting, even if the creator allows or even wanted this to be
the case.
Basically, OpenSCAD shares at least one of the major drawbacks of
mesh-based modelling programs that solid-based modelling programs like
OpenSCAD aren't supposed to have. Meshes are for art, solids are for
engineering (generally). A solid CAD modeller that can only export meshes
is not going to be *nearly* as useful in a professional setting as one that
can export solids.
Which is too bad - there's a lot of great stuff done in OpenSCAD that is
open source, and it would be great if anyone in the community could use it,
not just people who have learned OpenSCAD (I can dabble but *man* is
solidworks easier for me).
Post by nop head
Post by Taylor Alexander
I still wish it supported arcs. If it did, it could export to IGES and
DXF and the files would actually be useful for real engineering and
machining, not just tinkering and 3D printing. Apparent IGES is a CSG based
format or whatever, so some chatter back when I joined the list seemed to
think it's possible. True arcs could be defined by setting facets to zero
or by leaving out that parameter (though I think that's already used?).
The issue is not the format used, but the geometry engine which does the calculations.
We're using an engine called CGAL, which operates on a polygonal level.
There are other engines out there, but most such engines are commercial
and not possible to license for use in an Open Source program like OpenSCAD
(in addition to being prohibitively expensive). One free alternative is
OpenCascade, but as far as I understand, they also do all CSG operations on
triangle meshes, not smooth curves and surfaces.
We're constantly on the lookout for better engines (this is the holy
grail of CAD software), so any suggestions are welcome!
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Elmo Mäntynen
2013-04-16 03:35:50 UTC
Permalink
You could try the OpenSCAD import in FreeCAD. It's still one way (making
it two way would be hard but maybe doable), and FreeCAD is young, but It
exports to IGES and/or STEP etc.

Elmo
Post by Taylor Alexander
Marius - thanks for explaining the issue! Now that I have some
understanding, it may be easier to solve. I have a friend who has a
vested interest in improving FLOSS CAD, so maybe I'll run that by him.
One question - would it be plausible to partially implement arcs? For
example, could the code be designed so that unsupported operations
with curved surfaces simply fail, leaving it up to the user to get it
right? That could be useful for introducing arcs as an alpha feature
for testing.
I use the DXF export to route things so it is possible to do "real
engineering and machining". You just have to set the $fa small
enough so the facets aren't noticeable.
It's possible to do "real engineering" with OpenSCAD, but not as
convenient as it could be if we had arcs. Technically it's possible to
do "real engineering' with popsicle sticks too. OpenSCAD is a 3D
modeller and for you it's useful for 2D stuff, so that's not the most
reassuring. If you actually want to use OpenSCAD as a real 3D
modelling program and hope to have any interoperability with other CAD
or CAM systems, it's a PITA. And interoperability is pretty important
in "real" CAD systems. Not day to day, but sometimes - and it can be a
huge issue when it's not easy.
I made a modification to Wade's extruder using OpenSCAD and Solidworks
mixed together (did the whole Wades mod in OpenSCAD and built the rest
of the assembly in Solidworks, importing the Wades part), and only
being able to import STL is *awful*. When you import an STL into
Solidworks versus an IGES file of the same part, here's what you can't
- select the center or any quadrant of an arc
- select an entire face in one click
- select an entire edge with one click
- draw a line tangent to an arc
- mate two concentric arcs in an assembly (used ALL THE TIME for
assemblies that screw together)
- mate two arcs as tangent in an assembly
Doing any of the above requires that you first draw some construction
geometry, set reference planes/axes, or in many cases tediously select
many facets of something in order to convert it to features that
solidworks can use. What's worse, all that construction geometry that
you had to take time drawing just to work with the part usually all
has to be recreated from scratch if you need to make a change to the
OpenSCAD part and re-import it.
Those same limitations above also mean it's often a PITA if you want
to CNC machine something designed in OpenSCAD.
If your CAD system can't interoperate with professional engineering
CAD systems on at least a basic level (the current state of affairs
means interoperability is still just dumb solids like IGES or STEP,
but IGES is worlds better to work with than STL), it's hard to take
all the great open source stuff people have done with OpenSCAD and
actually use it in a professional setting, even if the creator allows
or even wanted this to be the case.
Basically, OpenSCAD shares at least one of the major drawbacks of
mesh-based modelling programs that solid-based modelling programs like
OpenSCAD aren't supposed to have. Meshes are for art, solids are for
engineering (generally). A solid CAD modeller that can only export
meshes is not going to be *nearly* as useful in a professional setting
as one that can export solids.
Which is too bad - there's a lot of great stuff done in OpenSCAD that
is open source, and it would be great if anyone in the community could
use it, not just people who have learned OpenSCAD (I can dabble but
*man* is solidworks easier for me).
Post by Taylor Alexander
I still wish it supported arcs. If it did, it could export
to IGES and DXF and the files would actually be useful for
real engineering and machining, not just tinkering and 3D
printing. Apparent IGES is a CSG based format or whatever, so
some chatter back when I joined the list seemed to think it's
possible. True arcs could be defined by setting facets to zero
or by leaving out that parameter (though I think that's already used?).
The issue is not the format used, but the geometry engine
which does the calculations.
We're using an engine called CGAL, which operates on a
polygonal level.
There are other engines out there, but most such engines are
commercial and not possible to license for use in an Open
Source program like OpenSCAD (in addition to being
prohibitively expensive). One free alternative is OpenCascade,
but as far as I understand, they also do all CSG operations on
triangle meshes, not smooth curves and surfaces.
We're constantly on the lookout for better engines (this is
the holy grail of CAD software), so any suggestions are welcome!
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
kolergy
2013-04-17 18:24:22 UTC
Permalink
This is an extremely interesting but a bit scary discussion

First I would like to say that even though I moan each time I use openSCAD due to it's limitations it is extremely useful to me & to a lot of people and I really appreciate the approach and the work done. I'm not prepared to see it disappear and I guess I'm not the only one.

- Switching to a lightened Python syntax could be very beneficial in terms of ease of use & reduced learning curve however it needs to be well handled as it has been mentioned earlier, the large library of .scad objects should still be useable through conversion.
- But this will not be worth it if there there are not true improvements of functionalities linked to it otherwise people will continue to use the existing stuff eg: Python3
- Even though I'm most interested in Printing & Laser cutting I think not having a clean analytical (no triangle ) backend is a strong limitation which will make advanced features difficult.
- The degradation of the analytical modeling should only be done at the render time of the SVG.

- Concerning the discussion for the merging with other projects from the point of view of the user it make sense it then there is less dispersion of efforts and it allows better software. however I would be worried to lose what i like from openscad: Straightforward approach, adapted to programing minded people, low mouse useage, instant display of result.
- The merge with freecad would worry me as it is a mouse oriented tool.
- Based on what has been said from PyScad (I do not know this code) this sounds very interesting and even could open-up the development base as Python is an extremely simple language to learn and as well very efficient in terms of programer's effort.

- The feature That I would see as the most needed would be:
- Better capacity to exchange with other tools like SVG to be able to do laser cutting, ability to write format that can be handled by Blender and other tools
- The lack of true variable handling is a strong limitation
- The lack of advanced geometries such as splines, filets, etc is an other limitation. The implementation of which could be eased by having an analytical representation of the geometry.

It looks that we are leaving interesting times for OpenSCAD and it's future.
Marius - thanks for explaining the issue! Now that I have some understanding, it may be easier to solve. I have a friend who has a vested interest in improving FLOSS CAD, so maybe I'll run that by him.
One question - would it be plausible to partially implement arcs? For example, could the code be designed so that unsupported operations with curved surfaces simply fail, leaving it up to the user to get it right? That could be useful for introducing arcs as an alpha feature for testing.
I use the DXF export to route things so it is possible to do "real engineering and machining". You just have to set the $fa small enough so the facets aren't noticeable.
It's possible to do "real engineering" with OpenSCAD, but not as convenient as it could be if we had arcs. Technically it's possible to do "real engineering' with popsicle sticks too. OpenSCAD is a 3D modeller and for you it's useful for 2D stuff, so that's not the most reassuring. If you actually want to use OpenSCAD as a real 3D modelling program and hope to have any interoperability with other CAD or CAM systems, it's a PITA. And interoperability is pretty important in "real" CAD systems. Not day to day, but sometimes - and it can be a huge issue when it's not easy.
- select the center or any quadrant of an arc
- select an entire face in one click
- select an entire edge with one click
- draw a line tangent to an arc
- mate two concentric arcs in an assembly (used ALL THE TIME for assemblies that screw together)
- mate two arcs as tangent in an assembly
Doing any of the above requires that you first draw some construction geometry, set reference planes/axes, or in many cases tediously select many facets of something in order to convert it to features that solidworks can use. What's worse, all that construction geometry that you had to take time drawing just to work with the part usually all has to be recreated from scratch if you need to make a change to the OpenSCAD part and re-import it.
Those same limitations above also mean it's often a PITA if you want to CNC machine something designed in OpenSCAD.
If your CAD system can't interoperate with professional engineering CAD systems on at least a basic level (the current state of affairs means interoperability is still just dumb solids like IGES or STEP, but IGES is worlds better to work with than STL), it's hard to take all the great open source stuff people have done with OpenSCAD and actually use it in a professional setting, even if the creator allows or even wanted this to be the case.
Basically, OpenSCAD shares at least one of the major drawbacks of mesh-based modelling programs that solid-based modelling programs like OpenSCAD aren't supposed to have. Meshes are for art, solids are for engineering (generally). A solid CAD modeller that can only export meshes is not going to be *nearly* as useful in a professional setting as one that can export solids.
Which is too bad - there's a lot of great stuff done in OpenSCAD that is open source, and it would be great if anyone in the community could use it, not just people who have learned OpenSCAD (I can dabble but *man* is solidworks easier for me).
I still wish it supported arcs. If it did, it could export to IGES and DXF and the files would actually be useful for real engineering and machining, not just tinkering and 3D printing. Apparent IGES is a CSG based format or whatever, so some chatter back when I joined the list seemed to think it's possible. True arcs could be defined by setting facets to zero or by leaving out that parameter (though I think that's already used?).
The issue is not the format used, but the geometry engine which does the calculations.
We're using an engine called CGAL, which operates on a polygonal level.
There are other engines out there, but most such engines are commercial and not possible to license for use in an Open Source program like OpenSCAD (in addition to being prohibitively expensive). One free alternative is OpenCascade, but as far as I understand, they also do all CSG operations on triangle meshes, not smooth curves and surfaces.
We're constantly on the lookout for better engines (this is the holy grail of CAD software), so any suggestions are welcome!
-Marius
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
_______________________________________________
OpenSCAD mailing list
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
William Adams
2013-04-22 13:19:45 UTC
Permalink
Post by kolergy
OpenSCAD and it's future
Wow. Quite a thread.

First off, I _really_ like OpenSCAD --- I'm just disappointed at the limitations imposed on it by its architecture.

I tried the two alternatives suggested:

- import into FreeCAD 0.13 --- FreeCAD mystifies me and I couldn't see how to get a nice file to get nice G-Code out of it (and HeeksCNC quit running on my machine when I tried to clear space for Haskell --- even re-installing didn't fix it) --- if anyone has simple pointers on this, I'd be grateful, e-mail me off-list.

- use ImplicitCAD --- this looks very promising, but my main machine doesn't do WebGL, and I couldn't get it running in Haskell on my Fujitsu Stylistic

The ideal thing would be to have a mode in OpenSCAD which:

- limits syntax to what ImplicitCAD is compatible w/ in extopenscad
- accesses a binary for ImplicitCAD for use when exporting

This would give one the best-of-both-worlds --- unfortunately, AIUI, ImplicitCAD's G-Code export is only 2-D at this point in time, but it'd be nice if OpenSCAD was ready to work w/ it when it is.

William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
Marius Kintel
2013-04-22 15:02:07 UTC
Permalink
Post by William Adams
- limits syntax to what ImplicitCAD is compatible w/ in extopenscad
- accesses a binary for ImplicitCAD for use when exporting
It sounds like you basically want a pre-compiled binary of ImplicitCAD which doesn't require WebGL.
That shouldn't be too hard to do for the ImplicitCAD developers - have you asked there about their plans forward?

-Marius
William Adams
2013-04-22 16:02:26 UTC
Permalink
Post by Marius Kintel
It sounds like you basically want a pre-compiled binary of ImplicitCAD which doesn't require WebGL.
Built into OpenSCAD, w/ a menu entry to access it, yes.
Post by Marius Kintel
That shouldn't be too hard to do for the ImplicitCAD developers - have you asked there about their plans forward?
Still waiting to hear on why I get errors when trying to install it.

William
--
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.
Loading...