<gbruno>
[github] kintel reopened issue #5502 (OpenSCAD app does not automatically pick up file changes, nor picks up file changes on explicit re-render) https://github.com/openscad/openscad/issues/5502
drfff has joined #openscad
<gbruno>
[github] kintel closed issue #5502 (OpenSCAD app does not automatically pick up file changes, nor picks up file changes on explicit re-render) https://github.com/openscad/openscad/issues/5502
<kintel>
FYI: I'm ready to merge Clipper2 support in OpenSCAD. Caveat: I used a submodule (for now), but once all packages for all relevant distros + Windows are updated to supply a Clipper2 package, we can kill (or at least disable) the submodule. The submodule is a nice safety valve in case we discover any more Clipper2 bugs
<TylerTork>
it's me again. Still messing with deforming polyhedra. Previously it was suggested that I use the list of normals returned by BOSL2 function regular_polyhedron_info, randomly adjust their angles, then use those to produce planes, then use the planes to slice pieces off a large cube, leaving the deformed polyhedron as the result. This works fine so
<TylerTork>
long as the polyhedra are convex, but if there are concavities I end up slicing off way more than I wanted. I'd like to be able to control the shape, e.g. flare the top, while still keeping the faces flat. I don't have to start with a regular polyhedron -- that just seemed easiest. Does anyone have suggestions how I can generate a polyhedron with a
<TylerTork>
shape I generally control, but with some randomness, and allowing it to have concavities? Nothing to extreme, but think vase shapes.
<InPhase>
TylerTork: Your description is fairly vague.
<InPhase>
TylerTork: Best solutions can depend a lot on the parts you left a bit vague.
<InPhase>
TylerTork: Weirdly random and lumpy shapes are doable though. For example, I put one on Day 13 under the logo here in the snowballs model: https://openscad.org/advent-calendar-2021/
<InPhase>
TylerTork: So we can do regular polyhedra, and we can do snowballs. So everything in between is doable. But how best to do it? That depends on the details. :)
<InPhase>
TylerTork: How about this. You might actually be in an xy-problem. Perhaps if you walk it back a step and explain what you're really trying to do, and how that would guide your design requirements, that would facilitate better advice.
<Guest0101>
J24k68: any idea how would I do the print in place hing on a pipe so the pipe opens in 2 halves ?
guso78k has quit [Ping timeout: 240 seconds]
TylerTork has quit [Quit: Client closed]
Guest0101 has quit [Remote host closed the connection]
GNUmoon has quit [Ping timeout: 264 seconds]
bozo16 has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
Guest88 has joined #openscad
Guest88 has quit [Client Quit]
Guest88 has joined #openscad
<Guest88>
hi can anyone help me
<InPhase>
Guest88: Perhaps if you ask your actual question. :)
<Guest88>
yeah sorry I am kind of new to open source contribution so I like to resolve some basic things to learn it can you help me
Guest88 has quit [Quit: Client closed]
Guest88 has joined #openscad
ali1234 has quit [Remote host closed the connection]
Guest53 has joined #openscad
Guest53 has quit [Client Quit]
Guest88 has quit [Ping timeout: 240 seconds]
J24k68 has quit [Quit: Client closed]
J24k68 has joined #openscad
Guest88 has joined #openscad
Guest88 has quit [Client Quit]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 264 seconds]
teepee_ is now known as teepee
TylerTork has joined #openscad
guso78k has joined #openscad
<TylerTork>
InPhase: if you go to https://tylertork.com/ikebana-vessels you'll see the sort of things I'm designing. Many of them are based on regular polygons with some randomness added. There are parameters in the scripts I use for these that let me stretch out or pinch the top, bottom, or middle to affect the shape -- for instance to give a broader base, a
<TylerTork>
wider top opening, or even an hourglass shape. I can do this now, but I don't have a way to do this and ALSO have the faces be flat, because if a face has more than three sides, distorting the shape or randomly perturbing their positions results in a set of points that are not coplanar. If the slope of a face becomes too extreme, and I turn the
<TylerTork>
face into a cut plane, it cuts off entire other faces and parts of the volume I wanted to keep, instead of producing a shape with a concave shape
<InPhase>
Okay.
<InPhase>
So the cut plane stuff from before was definitely an xy problem then. :)
<InPhase>
So you know how to do polyhedron on these, and your only issue is mathematically how to do the deformations to achieve these sorts of effects without losing the coplanarity of points that start out part of a face?
<TylerTork>
that seems a pretty good summary
<InPhase>
And then basically, if you have an N side face with N>3, you have 3*3 + (N-3)*2 degrees of freedom that you can actually make randomly vary, but you're currently varying 3*N degrees of freedom and hitting issues. So you need to constrain these N-3 dependent values.
<InPhase>
Or alternatively, you could express this all as 2*N planar degrees of freedom, and 3 degrees of freedom to define the plane transformations (rotation and depth).
<InPhase>
The 2*N part would mean that points could only vary within the defined plane, and otherwise you move the plane of the face and all the points on that face transform with it.
<InPhase>
This is probably the cleanest way to express your problem, because it makes no special points.
<InPhase>
Otherwise you end up with 3 special ones defining the plane, and N-3 points along for the ride.
bozo16 has quit [Quit: Leaving]
J24k68 has quit [Quit: Client closed]
J24k68 has joined #openscad
<TylerTork>
no idea how to translate that into code
<InPhase>
TylerTork: Well, I slapped together a start at the approach to use, with some existing code I had: https://bpa.st/K7XQ
<InPhase>
You basically need to use transformations like is done at the bottom to use things like the center of mass, normal vector, and cross-products. These are the key tools for defining planar operations on all the points, or to operating within the plane.
<InPhase>
If that blows your mind, you might be missing some of the math background one would use for this. If the terms are vaguely familiar but how to do it is not, then this should I think be enough of a model to see how one can do this sort of thing smoothly enough with vector and matrix operations using the provided functions.
<dTal>
aw this again
<dTal>
already provided an irregular-polygon generator scad file
<InPhase>
dTal: Did you preserve planarity of N>3 vertex faces? :)
<dTal>
oh yes indeedy
<InPhase>
Well, provide it again. Then TylerTork will have two possible paths. :)
<dTal>
So we start with an arbitrary mesh, some points of which lie on planes, and have to deform it?
<InPhase>
TylerTork wants to use custom code (which he has) to make deformations in an artsy way, but without breaking planarity.
<dTal>
Of an arbitrary mesh
<dTal>
?
<InPhase>
With lists of vertices making up faces.
<dTal>
...
<dTal>
...of an arbitrary mesh?
<InPhase>
Well, starting from a regular polyhedron, it seems.
<dTal>
All this "polyhedron" stuff was a red herring, and the shape can be anything?
<dTal>
The way I would do this, in the general case, is just brute force it
<InPhase>
I was giving a vector algebra way to do transformations of a face without breaking planarity.
<dTal>
so either 1) you have access to which vertices belong to which faces, or 2) you don't
mmu_man has joined #openscad
<InPhase>
Of course there's a next constraint when you need to not break planarity of multiple faces at once.
<InPhase>
I'm pretty sure it's all calculable, but you'd have to build up the math pieces. :)
<dTal>
it seems to me that my solution is extensible to this scenario
<dTal>
all polyhedral objects can be expressed as a boolean AND of N planar signed distance fields
<dTal>
so, you start with your object, determine the normal vector and offset vector of each face, and then rebuild it
<guso78k>
dTal only applies for convex solids
<guso78k>
git commit
<dTal>
ah wait but it breaks...
<dTal>
yes
<guso78k>
ups ..
<guso78k>
think this "polyhedral" stuff is what is refered to NEF in openscad internals
<dTal>
well you could assume that the topology is the same, and work out the intersections with the adjacent faces manually, using the same philosophy
<dTal>
which is probably the "correct" way to do this
<dTal>
but you're sort beyond being able to do this confortably in native openscad
guso78k has quit [Quit: Client closed]
<InPhase>
dTal: Actually, a maybe simple way to make yours work... https://bpa.st/DYNQ
<InPhase>
;)
<InPhase>
I don't know about art... But we have there randomness with concave polyhedrons. :)
<dTal>
lol well yes
<InPhase>
And if you want control, vector algebra tools are there. It just takes building up.
<dTal>
hey InPhase try this, rename your "render" block to a module called "chonk", then do difference(){ hull(){chonk();} chonk(); }
<InPhase>
The core problem is how arbitrary the definition of a particular desired vector algebra operation can be. Some things are just not going to be predefined.
<InPhase>
dTal: Well that makes the randomness closer to passing for art, if nobody looks too close.
<dTal>
definitely looks like the kind of wanky sculpture you might see on a plinth in central london
<InPhase>
Call it Metacave Polyhedra, and charge $5 a visit for people to climb inside and take a picture.
<dTal>
"metacave" is good but "polyhedra" is too mathy, needs to be some fluffy word like "luminance"
<InPhase>
Right. And then put up a plaque with some ChatGPT dribble about light and shadows.