discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Discuss Digest, Vol 38, Issue 22

J
jim.klessig
Tue, Jan 23, 2018 6:09 PM

"Actually it is possible, but probably not inside OpenSCAD.  Many years ago Iwas in the land surveying business and I wrote a routine to take randomly
spaced 3D points"
I would disagree.  Your routine would be making some (probably un stated) assumptions  about the shape. Such as that the points do not form a "cave", and probably what points represent a boundary.
For example how would your routine deal with the example I gave,  of 8 points representing the corners of a cube.There are multiple "correct" representations of that set of points.
I would suspect that your routine would assume those points are either a cube shaped bump in a flat plane, or a cubical hole in an otherwise flat plane.  Both of which are making perfectly reasonable assumptions for making it topographical map.But those assumptions would be/could be  incorrect for just that set of 8 points, "floating in space" with no other information.Essentially there are too many degrees of freedom for the problem to be solvable as he posed it.
Sent from my U.S. Cellular® Smartphone
null

"Actually it is possible, but probably not inside OpenSCAD.  Many years ago Iwas in the land surveying business and I wrote a routine to take randomly spaced 3D points" I would disagree.  Your routine would be making some (probably un stated) assumptions  about the shape. Such as that the points do not form a "cave", and probably what points represent a boundary. For example how would your routine deal with the example I gave,  of 8 points representing the corners of a cube.There are multiple "correct" representations of that set of points. I would suspect that your routine would assume those points are either a cube shaped bump in a flat plane, or a cubical hole in an otherwise flat plane.  Both of which are making perfectly reasonable assumptions for making it topographical map.But those assumptions would be/could be  incorrect for just that set of 8 points, "floating in space" with no other information.Essentially there are too many degrees of freedom for the problem to be solvable as he posed it. Sent from my U.S. Cellular® Smartphone null
DM
doug moen
Tue, Jan 23, 2018 6:17 PM

This idea has been discussed before. The CGAL "Alpha Shapes" module is one
way to implement this. Note that we already use CGAL for boolean operations
like union.

https://doc.cgal.org/latest/Alpha_shapes_3/index.html

On 23 January 2018 at 13:09, jim.klessig jim.klessig@gmail.com wrote:

"Actually it is possible, but probably not inside OpenSCAD.  Many years
ago I
was in the land surveying business and I wrote a routine to take randomly
spaced 3D points"

I would disagree.  Your routine would be making some (probably un stated)
assumptions  about the shape. Such as that the points do not form a "cave",
and probably what points represent a boundary.

For example how would your routine deal with the example I gave,  of 8
points representing the corners of a cube.
There are multiple "correct" representations of that set of points.

I would suspect that your routine would assume those points are either a
cube shaped bump in a flat plane, or a cubical hole in an otherwise flat
plane.  Both of which are making perfectly reasonable assumptions for
making it topographical map.
But those assumptions would be/could be  incorrect for just that set of 8
points, "floating in space" with no other information.
Essentially there are too many degrees of freedom for the problem to be
solvable as he posed it.

Sent from my U.S. Cellular® Smartphone


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

This idea has been discussed before. The CGAL "Alpha Shapes" module is one way to implement this. Note that we already use CGAL for boolean operations like union. https://doc.cgal.org/latest/Alpha_shapes_3/index.html On 23 January 2018 at 13:09, jim.klessig <jim.klessig@gmail.com> wrote: > "Actually it is possible, but probably not inside OpenSCAD. Many years > ago I > was in the land surveying business and I wrote a routine to take randomly > spaced 3D points" > > I would disagree. Your routine would be making some (probably un stated) > assumptions about the shape. Such as that the points do not form a "cave", > and probably what points represent a boundary. > > For example how would your routine deal with the example I gave, of 8 > points representing the corners of a cube. > There are multiple "correct" representations of that set of points. > > I would suspect that your routine would assume those points are either a > cube shaped bump in a flat plane, or a cubical hole in an otherwise flat > plane. Both of which are making perfectly reasonable assumptions for > making it topographical map. > But those assumptions would be/could be incorrect for just that set of 8 > points, "floating in space" with no other information. > Essentially there are too many degrees of freedom for the problem to be > solvable as he posed it. > > Sent from my U.S. Cellular® Smartphone > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
C
cbernhardt
Wed, Jan 24, 2018 2:33 PM

jim_klessig wrote

I would disagree.  Your routine would be making some (probably un stated)
assumptions  about the shape. Such as that the points do not form a
"cave", and probably what points represent a boundary.
For example how would your routine deal with the example I gave,  of 8
points representing the corners of a cube.There are multiple "correct"
representations of that set of points.
I would suspect that your routine would assume those points are either a
cube shaped bump in a flat plane, or a cubical hole in an otherwise flat
plane.  Both of which are making perfectly reasonable assumptions for
making it topographical map.But those assumptions would be/could be 
incorrect for just that set of 8 points, "floating in space" with no other
information.Essentially there are too many degrees of freedom for the
problem to be solvable as he posed it.

You are correct.  My routine eliminates any duplicate XY points, so it would
not tessellate an exact cube or an overhang correctly; however, for purposes
of my headlight bezel, or 99% of our topo maps, it works fine.
Charles

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

jim_klessig wrote > I would disagree.  Your routine would be making some (probably un stated) > assumptions  about the shape. Such as that the points do not form a > "cave", and probably what points represent a boundary. > For example how would your routine deal with the example I gave,  of 8 > points representing the corners of a cube.There are multiple "correct" > representations of that set of points. > I would suspect that your routine would assume those points are either a > cube shaped bump in a flat plane, or a cubical hole in an otherwise flat > plane.  Both of which are making perfectly reasonable assumptions for > making it topographical map.But those assumptions would be/could be  > incorrect for just that set of 8 points, "floating in space" with no other > information.Essentially there are too many degrees of freedom for the > problem to be solvable as he posed it. You are correct. My routine eliminates any duplicate XY points, so it would not tessellate an exact cube or an overhang correctly; however, for purposes of my headlight bezel, or 99% of our topo maps, it works fine. Charles -- Sent from: http://forum.openscad.org/
N
NateTG
Wed, Jan 24, 2018 5:12 PM

Sure, you can, for example, do a Delauney triangulation in the XY plane to
generate a mesh, and then do a quadratic or bezier fit.  That's technically
possible using OpenSCAD functions, but I would be looking at existing mesh
manipulation stuff like blender or meshlab.

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

Sure, you can, for example, do a Delauney triangulation in the XY plane to generate a mesh, and then do a quadratic or bezier fit. That's technically possible using OpenSCAD functions, but I would be looking at existing mesh manipulation stuff like blender or meshlab. -- Sent from: http://forum.openscad.org/