ali1234 has quit [Remote host closed the connection]
ali12341 has joined #openscad
TheCoffeMaker has quit [Ping timeout: 255 seconds]
<pca006132>
JordonBrown maybe you can just open an issue/PR for BOSL2? iirc in openscad c++ code this is implemented as rounding + hashtable, which is O(n) as well
bambukah has joined #openscad
TheCoffeMaker has joined #openscad
<bambukah>
Hello :)
<J24k78>
bambukah?
peeps[zen] has quit [Ping timeout: 252 seconds]
peepsalot has joined #openscad
<JordanBrown>
pca006132 it's a hashing scheme, which as best I can tell is impractical to implement in OpenSCAD-language.
<JordanBrown>
But IIUC (without having looked at it) has bad behavior in a number of cases; I think I avoid them.
<JordanBrown>
oops "the existing OpenSCAD dedup has bad behavior..."
<JordanBrown>
Mine finds all points within a certain radius of each other point.
<JordanBrown>
... without having bad behavior when two points next to each other snap to different grid coordinates.
<JordanBrown>
But I thought there was some reason why Manifold didn't use the existing OpenSCAD dedup scheme.
<pca006132>
regardless, deduplication can break manifoldness
<pca006132>
and in general two distinct vertices in a manifold (epsilon valid) can have the same coordinate, so deduplication is not really needed
<JordanBrown>
I think you said that you were OK with duplicated points, and indeed that seemed to be the case.
<pca006132>
yes
<JordanBrown>
The problem is that if you calculate what should be the same point, but you calculate it twice in different ways, you can end up off by 1e-16 or so.
<pca006132>
the answer is: you should not do that
<pca006132>
in general this fp error can get pretty large
<JordanBrown>
Certainly when you can avoid it you should not. But Adrian and Revar are not dummies and I believe them when they say it's sometimes hard to avoid.
<pca006132>
yes, it can be hard
<pca006132>
but the problem is if you don't avoid that, you cannot guarantee manifoldness
<pca006132>
this is why manifoldness is hard
<JordanBrown>
Large FP error? It seems like you'd have to grind on a point quite a bit to get it to propagate past the bottom few bits.
<pca006132>
depends on operations
<JordanBrown>
In the case I was looking at, it looked like the error was in the bottom bit or two.
<JordanBrown>
Anyhow, if one was interested in deduping to a grid of, say, 10^-10, I think I have an efficient algorithm that avoids the "snap to different grid coords" problem.
<JordanBrown>
Actually, I can describe it really quickly: snap to grid when creating the hash table, and then when looking up snap to grid and examine all neighbors too.
<pca006132>
feel free to write it up as a draft and let us have a look at it
<JordanBrown>
Bad stuff will happen if you have actual features down around the size of the grid, but that should be really really small.
<pca006132>
yeah that can work I guess, but the order in which you process the points may produce different results
<JordanBrown>
Shouldn't.
<JordanBrown>
One thing that is a known theoretical problem that one would have to watch for is "clusters" that span too large a space.
<pca006132>
what if you have some kind of a grid structure?
<pca006132>
yeah
<JordanBrown>
That is, A is close to B, and B is close to C, but A is not close to C.
<pca006132>
anyway, too sleepy now, can discuss another day
<JordanBrown>
A grid structure with steps down in the 10^-10 range?
<pca006132>
was taking 13 hours of flight to LA
<JordanBrown>
Later.
<pca006132>
bye
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
<JordanBrown>
pca006132 if you're in LA and want to do lunch or something, let me know.
bambukah has quit [Ping timeout: 256 seconds]
teepee has quit [Remote host closed the connection]
<Transatlantic>
I have been using openSCAD with much success, afer a friend held my hand to start. Now I think I master 50 % of openSCAD capabilities (lots of fun still ahead!). But I always regret that to pierce a piece (something that turns up very often), or to remove some material, you have to go through a cumbersum "difference" function... Many other SCAD
<Transatlantic>
systems offer much simpler solutions. Such a substracting material rather than adding. So to bore a hole, you simply substrat a cylinder from whatever the cylinder is placed. For instance, FreeCAD offer "create a hole" (a "negative" cylinder) or "create a pocket" (a negative cube" tools. What do you think?
<JordanBrown>
I think you're talking about creating negative objects. People have talked about that, but it's not as simple as it might seem.
<JordanBrown>
You still need some concept of the "scope" of the negative object. You want to be able to remove the negative object from some positive object, yes, but then you want to be able to drop a positive object *into* that space created, without subtracting from it.
<JordanBrown>
That is, you want to be able to subtract a cylinder from a cube, but then you want to be able to put a sphere into the hole.
<JordanBrown>
You need some way that marks that you *are* subtracting the cylinder from the cube, but you *are not* subtracting the cylinder from the sphere.
<Transatlantic>
Hi, Jordan! I understand. that the "difference" function is very powerful and precise, and needed for those tricky situations that you mention. But for just boring a hole in a cube, I would welcome a "negative" cylinder function!
L29Ah has joined #openscad
<Transatlantic>
And thinking about it, I spend lots of time just boring holes (cubes and cylinders). Other more complex situations amount at most to 10% of cases...
<JordanBrown>
is difference() { a(); b(); } really that different from a(); negative() b();?
<JordanBrown>
But you might look at BOSL2's diff() operation. It lets you take a bunch of objects and tag which ones to add and which to subtract.
<JordanBrown>
And indeed sometimes that is more natural than structuring the program to separate the positive stuff from the negative stuff.
<Transatlantic>
BOSL2's diff() operation Nope, I don't know that one. Thanks for the tip! I have just had a look. It looks promissing... I will give it a try.
<JordanBrown>
BOSL2 has lots of very cool advanced capabilities.
<Transatlantic>
I will definitely look and try. Thanks again, Jordan! from Patrick from Audierne, France.
<JordanBrown>
Jordan from Los Angeles, California, USA
<pca006132>
JordanBrown check your pm :)
<Transatlantic>
Jordan, you must be very busy sorting out Donald's and Kamala's proposals! This side of the Atlantic, we are a bit afraid of Donald's "inconsistency" - no doubt he is a great golfer, but is that relevant in a dangerous world?
<TylerTork>
I'm probably making this more complex than I need to. Say I have a polygon of points in 3d space, and I want to turn it into an object with specified thickness -- i.e. extrude it by a specified amount tangent to its surface as opposed to in the z axis only. Is there something in a library to do that?
<TylerTork>
perpendicular to its surface I mean
MatrixBot12 has joined #openscad
<teepee>
and again... question: what is MatrixBot12 and where is it connected to?