# missing features

15 messages
Open this post in threaded view
|

## missing features

 CONTENTS DELETED The author has deleted this message.
Open this post in threaded view
|

## Re: missing features

 Convex hull is called "hull". To construct a skewed pyramid or tetrahedron (3D simplex) from points, use "polyhedron". On Sat, Oct 3, 2020, at 7:56 PM, nate_lastname wrote: > Why doesn't OpenSCAD include these features: > > A) Points as a primitive geometric figure > B) A convex hull operation (not minkowski sum) > > These would come in handy for doing things like constructing a simplex or a > skewed pyramid > > > > -- > Sent from: http://forum.openscad.org/> > _______________________________________________ > OpenSCAD mailing list > [hidden email] > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org> _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 CONTENTS DELETED The author has deleted this message.
Open this post in threaded view
|

## Re: missing features

Open this post in threaded view
|

## Re: missing features

 In reply to this post by nate_lastname > I see. Still, I wonder why points are not a primitive shape in OpenScad. What's the shape of a point? In math, a point has a definite position, but it does not have any length, breadth or thickness. If you want a mark denotes the existence of a point, you can define your own one. For example, a circle denotes a 2D point. module point2D(x, y, r = 1) {     translate([x, y])         circle(r); } point2D(10, 20); ----- https://openhome.cc-- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 On 10/3/2020 9:33 PM, caterpillar wrote: What's the shape of a point? In math, a point has a definite position, but it does not have any length, breadth or thickness. Sure it does.  It has a length, breadth, and thickness of zero. It's a lot like sphere(0.00000001), but even smaller.  But you could probably use that or cube(0.0000001) as an approximation to a point. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 In reply to this post by caterpillar caterpillar wrote > What's the shape of a point? In math, a point has a definite position, but > it does not have any length, breadth or thickness. Well, a point (and, for that matter, a line) doesn't have any volume, but it does have a position. It may not be that useful in itself, but it (or a line) can be a very useful tool in creating other objects. OpenSCAD has 2D objects, they don't have a volume, but are very useful for creating 3D objects. Also, remember that not all OpenSCAD users use it for 3D printing. I use it for so diverse uses as furniture design, laser cutting, board game designs and so on. I use 2D objects a lot (for laser cutting, it's all 2D, though sometimes extruded to see fit of boxes and so on), and I would definitely find both line (and related objects, such as curves) and point very useful. Sure, I can do a line as a very thin box, but then the laser cutter will run the line twice, as there is actually two lines, and it'll overburn the ends slightly. -- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 In reply to this post by JordanBrown > It's a lot like sphere(0.00000001), but even smaller.  But you could probably use that or cube(0.0000001) as an approximation to a point. If you just want an approximation to a point with a customizable shape, this might solve it. \$fn = 96; module point(x = 0, y = 0, z = 0) {     translate([x, y, z])         children(); } point(10, 20)      circle(0.000001); point(10, 20, 30)      sphere(0.000001); ----- https://openhome.cc-- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 In reply to this post by Troberg > Sure, I can do a line as a very thin box, but then the laser cutter will run the line twice, as there is actually two lines, and it'll overburn the ends slightly. Sorry, I don't know laser cutting. Maybe I'm wrong, it sounds like a path (a list of points) supported by laser cutting, not a shape. ----- https://openhome.cc-- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 This post was updated on . In reply to this post by Ronaldo > module hull_points(pts) { >    hull() { polyhedron(pts, [[for(i=[0:len(pts)-1]) i]]); } > } > hull_points( [ [-1,-1,0], [-1,1,0], [1,1,0], [1,-1,0], [1/2,1,2] ] ); It looks like a nice workaround. My 2D version: use ; //https://github.com/JustinSDK/dotSCAD/blob/master/src/experimental/convex_hull2.scadmodule hull_points2D(pts) {     polygon(convex_hull2(pts)); } hull_points2D([[0, 0], [0, 1], [1, 0], [3, 0]]); ----- https://openhome.cc-- Sent from: http://forum.openscad.org/_______________________________________________ OpenSCAD mailing list Discuss@lists.openscad.org http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 In reply to this post by Ronaldo On 04.10.2020 05:01, Ronaldo Persiano wrote: > This should work: > >     module hull_points(pts) { >          hull() { polyhedron(pts, [[for(i=[0:len(pts)-1]) i]]); } >     } > >     hull_points( [ [-1,-1,0], [-1,1,0], [1,1,0], [1,-1,0], [1/2,1,2] ] ); It works, but it is a work-around. The extra nonsensical for-loop is required to fool polyhedron int accepting the data, but the polyhedron is still an invalid one, and can only be used with the hull() operation. Instead, one could do as nate_lastname suggested, support points and allow a polyhedron be created from a point cloud and then interpreted as a convex hull: https://gist.github.com/arnholm/b21e8177683687aa642b20b939648f07Carsten Arnholm _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Open this post in threaded view
|

## Re: missing features

 In reply to this post by nate_lastname On 04.10.20 04:45, nate_lastname wrote: > In general, I suspect that it would be more elegant > to do a lot of things if it were possible to specify > a point in OpenSCAD. I'm really just curious if this > is a deliberate design choice or not. I don't know the definitive answer to that, but I would assume it was just not needed for the initial goal of what OpenSCAD was supposed to do. As far as I know it was not conceived specifically as a programming language but as a tool to generate STL files for 3d printing (and I guess that still shows). > Theoretically, would it be possible to add points to> OpenSCAD? Yes, I think points (and also lines) as primitives could work just fine as input for a list of dedicated operations, e.g.   points -> hull -> 3d   points -> polygon -> 2d ciao,   Torsten. _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org -- Torsten
Open this post in threaded view
|