--
like
out =
union
[
| rectR 0 (-40,-40) (40,40), |
| translate (40,40) (circle 30) ] |
On Dec 10, 2012 11:34 PM, "Christopher Olah" <christoph...@gmail.com> wrote:
>
> Originally, ImplicitCAD was just a Haskell library. ExtOpenScad was
> added because people were terrified of Haskell and there is a ton of
> existing OpenSCAD code.
>
Sure, and I think this was the right thing to do both from the standpoint of adoption and practicality: even for someone with a working knowledge of Haskell it is infinitesimally easier to start a design with OpenSCAD syntax than it is with the Haskell interface.
> The Haskell API is kind of crude, but I certainly think it could be a
> very nice way to design objects. And if we make it easy to integrate
> Haskell/extopenscad code, perhaps some people will switch to Haskell.
> Frameworks are known to drive adoption.
>
> But I think extopenscad is essential for us to get initial adoption.
>
Definitely. I think as long as we can provide support for a proper superset of the openscad syntax we've done what is necessary. Any further features exposed through the OpenSCAD frontend are gravy.
Beyond my work on mirror support what other features remain outstanding towards full OpenSCAD support?
Cheers,
- Ben
Minkowski sum - all of the literature I looked at indicates this is non-trivial to express implicitly.
--
--
Originally, ImplicitCAD was just a Haskell library. ExtOpenScad was
added because people were terrified of Haskell and there is a ton of
existing OpenSCAD code.
But I think extopenscad is essential for us to get initial adoption.
Reinoud, you've done a great job capturing some of the ways designing
an object in Haskell could be very elegant. But why use a Haskell
inspired markup language and not just Haskell? The motivation between
extopenscad is the existing OpenSCAD users, what would the motivation
behind this be?
1. I am uncomfortable with the fact that all IC outputs, 2D and 3D, seem to be limited-resolution "renders". Other tools later in the chain could sometimes benefit from machine-precision geometry information. For this purpose I envision adding a "point" data type whose position is computed according to the geometric model and is output directly without a rendering approximation step.
2. I would like to see identifiers which can be attached to geometric features. They need not have semantic content; as a bare minimum UUIDs would suffice if other tools in the toolchain are doing the interpretation. For example, I might want to label a hole diameter with a tolerance, an object with a material type, or a feature with a label or note. The most obvious applications don't require us to think hard about composition rules: the hole remains distinct in the rendering, its annotation "ream to 0.375 +/- 0.0002 inch dia" remains attached to the surface or path rendered, and all is fine. However I do think it is useful to consider rules for composing identifiers, to support user-defined composition rules based on identifier classes, and to provide some default rules for common use, e.g. if a 2D output path contains elements generated from three underlying objects with distinct identifiers, the path could bear all, none, or a single priority-based identifier in each class.
My 2c
Chuck
--
I think you misunderstand my intent. There is nothing wrong with the existing ImplicitCAD mechanisms for representing 3-manifolds (solids), 2-manifolds (surfaces), or 1-manifolds (curves). What is missing is a representation for 0-manifolds.
Perhaps a concrete example is in order. Remember, I want to make concrete objects with real-world fabrication processes. Suppose I want to make something with a number of round holes -- perhaps a circuit board or even an engine block. The best way to make these holes is with a drill, and a drilling machine needs (x,y) positioning coordinates.
At present I can define the holes in a circuit board, for example with the extopenSCAD "circle" primitive, and I can render an svg file which makes a pretty picture of the board. The picture is a useful and necessary artifact, but it does not directly give me the (x,y) coordinates for the drilling machine. I would have to post-process the svg file, identify the circles (actually the approximating polygons), estimate their center coordinates, and produce my CNC drill file from that. I would prefer to have a more direct route from "part program" (in extopenSCAD) to CAM file (x,y drill coordinates in g-code).
Bottom line, we have a "sphere" primitive. We have a "circle" primitive. Let's have a "point" primitive, too.
While I have been focusing first on the simplest manufacturing processes (e.g. drilling holes), it is probably useful to consider that even the most sophisticated manufacturing processes rarely use *surface* representations directly. When "the rubber meets the road", it is almost always a 2-manifold ("tool path" in 3-space, or in higher dimensions for 4- or 5-axis machine tools) that cuts the metal or adds the plastic.
Cheers,
Chuck
On Sunday, December 16, 2012 9:30:09 AM UTC-8, cfh...@gmail.com wrote:
> On Sunday, December 16, 2012 4:08:05 AM UTC-8, Gordon Wrigley wrote:
> > How would your point data type represent curved surfaces?
> >
>
> I think you misunderstand my intent. There is nothing wrong with the existing ImplicitCAD mechanisms for representing 3-manifolds (solids), 2-manifolds (surfaces), or 1-manifolds (curves). What is missing is a representation for 0-manifolds.
>
[...]
> While I have been focusing first on the simplest manufacturing processes (e.g. drilling holes), it is probably useful to consider that even the most sophisticated manufacturing processes rarely use *surface* representations directly. When "the rubber meets the road", it is almost always a 2-manifold ("tool path" in 3-space, or in higher dimensions for 4- or 5-axis machine tools) that cuts the metal or adds the plastic.
Woopsie! That tool path curve would be a 1-manifold, of course, not a 2-manifold!
C
As an element of a toolchain, it is very helpful if the output is in a format that is already used in the field. It may be sad, but autocad dxf is probably the most widely readable format for 2D/3D point/line/arc geometry. I would recommend putting more emphasis on this than on gcode (see below).
> CH>> Other tools later in the chain could sometimes benefit from machine-precision geometry information.
>
> The problem is that ImplicitCAD allows describing objects that I'm not
> aware of any other formats being able to describe precisely.
>
> This is why we are interested in also handling gcode generation -- it
> really isn't possible to pass on all the information we have about the
> object.
This sounds good in the abstract, but I would caution against investing a large effort here at this time. G-code generation is about modeling a manufacturing process, above and beyond modeling an object. You need expertise in the intended manufacturing process to write a good CAM postprocessor. This subject gets very deep, and we will need a lot more Haskell programmers involved before we are touching commercial-strength applications like http://www.mastercam.com . In the mean time, let's prioritize the task of getting the *part geometry* information out of ImplicitCAD accurately, over the task of turning ImplicitCAD into ImplicitCAD/CAM.
> CH>> For this purpose I envision adding a "point" data type whose position is computed according to the geometric model and is output directly without a rendering approximation step.
>
> CH>> Perhaps a concrete example is in order. Remember, I want to make concrete objects with real-world fabrication processes. Suppose I want to make something with a number of round holes -- perhaps a circuit board or even an engine block. The best way to make these holes is with a drill, and a drilling machine needs (x,y) positioning coordinates.
>
> At least in this case, I don't think any sort of point input format is
> necessary. It would be trivial to extract circles being cut away and
> handle them specially.
I'm surprised you prefer the special-case "hack" over a general solution, but I'm a pragmatist; I'll take whatever method gives me the data I need to make accurate parts!
> >> 2. I would like to see identifiers which can be attached to geometric features.
>
> This is an extremely good point, and something I've been meaning to
> work on for a while. Meta data for materials, colors, feature labels
> for diagrams, and so forth are things we really need to add. (I'll
> start a thread about revamping SymbolicObj{2,3}.)
>
http://amf.wikispaces.com/ metadata may be a good starting point.
> An example of a particularly challenging type of object to support
> would be metal folding, where we may need to attach information about
> tapping to holes, and also lines to fold on.
+1 on sheet metal folding, I could use it right away!! (I'm in a laser-cutter/plasma table world these days, can you tell? ;) ) This seems like a natural ("bend 45 degrees around axis A" analogous to "extrude 50mm along axis A"). There may be some difficult corner cases but for most situations this may not be all that hard to implement.
>
>
>
> Chris
**Parametric Functions / Polygon / Triangle Mesh**: Better support for
polygons and support for triangle meshes. These have the added benefit
of making it easy to inject parametric function approximations, which
are the natural way to describe many things (eg. gears). If we added
resolution as an argument to get_implicit, we could emulate support
for parametric functions described objects by always sampling much
lower than the resolution of rendering.
**Import Format Support**: In particular, a DXF and SVG importer would
be really nice.
**Geometric Constraints**: In a programmatic CAD tool these would
So, what else? The website is also fair game.
>Material properties metadata
>Simulation/FEA
>PDEs simulation>Voxel output.
>Gcode>metal folding, engineering diagrams, gcode, etcWhile all of this would be awesome, sane software engineering/generally practicality predicts that if we try to support everything we'll get distracted, write a lot of half-assed implementations of sweet features, while not making much progress on improving ImplicitCAD's core. This seems especially true given that all of these tasks are non-trivial and ImplictCAD's core focus is also non-trivially difficult. Perhaps this suggests that building a nice API that exposes enough of the internals to implement such features is the way to go.
Here's another:• Blending Operations: It seems like ImplicitCAD has some blending functionality already, but this paper generalizes and expounds on the idea.
--
Reinoud
--
> Frankly, I envision myself simply using implicitcad as a Haskell library
> much of the time. No matter how much work you put into a dedicated DSL,
> you'll never beat a full programming language. Personally I'm not
> convinced that it's worth the effort to develop OpenSCAD into a
> fully-fledged language. That being said, I of course can't complain if
> someone else takes on this task.
Originally, ImplicitCAD was just a Haskell library. ExtOpenScad was
added because people were terrified of Haskell and there is a ton of
existing OpenSCAD code.
The Haskell API is kind of crude, but I certainly think it could be a
very nice way to design objects. And if we make it easy to integrate
Haskell/extopenscad code, perhaps some people will switch to Haskell.
Frameworks are known to drive adoption.
But I think extopenscad is essential for us to get initial adoption.
Reinound, you've done a great job capturing some of the ways designing
an object in Haskell could be very elegant. But why use a Haskell
inspired markup language and not just Haskell? The motivation between
extopenscad is the existing OpenSCAD users, what would the motivation
behind this be?
Chris