myosotis has quit [Remote host closed the connection]
L29Ah has quit [Ping timeout: 265 seconds]
drfff has quit [Ping timeout: 260 seconds]
ccox_ has joined #openscad
ccox has quit [Ping timeout: 248 seconds]
fling has quit [Remote host closed the connection]
ccox_ has quit [Remote host closed the connection]
guso78k has joined #openscad
<guso78k>
teepee, for dumped animation frame, would it make sense to 1) sort them in a directory with the design name 2) clear directory content, when "play" is pressed 3) write the frame only when it does not yet exist 4) give hint to user how to create a video from the video or even use QProcess again ?
<J24k97>
we could (should) combine LOFT and SWEEP and sure need subdivision/interpolation
<InPhase>
Only the self-intersection problem goes away. The "what is the right mapping" problem does not.
<teepee>
what we need is not so much a developer but someone with very very deep understanding of the math behind that stuff
<teepee>
for solving the corner cases, like "simple" path extrude has at least one degree of freedom too much by rotating around the path
<J24k97>
maybe the trick would be a hull(convex=false) that would loft 2 3D body (or 2D)
<J24k97>
but as skin not hull()
<InPhase>
J24k97: One is left with multiple competing definitions for that. It's not single-valued.
<J24k97>
it probably would only make sense for 2D shapes - else this would just have the 3D body at the ends and if those are overlapping it gets messy
<teepee>
thats not solving the rotation problem
<InPhase>
J24k97: Like, take a 5-sided star and try to find the right mapping to a square. Then look for another mapping. What happens then if you rotate the star slightly out of perfect alignment? Do you always look for the closest points to prioritize? What if two points are equidistant except for floating point error? Is there any way for a user to express a tessellation that is not closest-point
<InPhase>
preferencing, such as one could easily desire when doing the common problem of making smoothly turning threads?
<J24k97>
you sure need to subdivide/equalize the 2 inputshapes
<InPhase>
The entire design of the ClosePoints library was built around my struggling with this problem of mapping good tessellations that match intent between two layers.
<InPhase>
8 years later, thinking about it occasionally this whole time, and with lots of people talking about it often, I still don't have a better answer.
<J24k97>
can close points have slices with different numbers of fragments?
<InPhase>
It cannot, on purpose, because I to this day cannot find a way to permit different numbers of fragments AND clarify designer intent for the tessellation.
<InPhase>
The moment you introduce different point counts between layers, all those questions I asked and more come out in full force, and there seems to always be a pathological case where it maps wrong.
drfff has joined #openscad
<InPhase>
J24k97: That example avoids tessellation questions by not showing any lines, and just making everything smooth. :)
myosotiss has joined #openscad
<InPhase>
And yes, the problem goes away if you don't care how any of the tessellations happen. But this is not what people are thinking about when they ask for a tool to map a square to a triangle, or something like that.
<J24k97>
i think (at the moment) that if you create an intermediate shape between the in and out shape that is used to create the number of segments for in and out to match
<InPhase>
It IS possible to map a square to a triangle by making it all smooth in between, and adding a ton of layers, and then the ambiguity goes away.
<gbruno>
[github] kintel pushed 158 modifications (Add #include <memory> in files that use symbols out of it. (#5321) Add the header to all files that use one of * std::shared_ptr * std::unique_ptr * std::make_shared * std::make_unique As found by clang-tidy and reported as [misc-include-cleaner]. Reduces [misc-include-cleaner] warnings 3565 -> 3264) https://github.com/openscad/openscad/commit/709b93bed24a265f842c09794a88d7fe95c95197
<J24k97>
yes so just use $fs to subdivide every straight line
<J24k97>
like zen has done with twist for linear_extrude
<InPhase>
Although I think some ambiguities still arise with other shapes, even with smoothing.
myosotis has quit [Ping timeout: 252 seconds]
<InPhase>
Particularly when you have concave shapes that are outside and inside of the other shape alternatingly, and you additionally have the opportunity for floating point ambiguities about proximities and so on.
<InPhase>
These issues are obviously not there on the non-pathological autocad reference examples.
<J24k97>
that was why i said "create an intermediate shape for point distribution"
<InPhase>
J24k97: One well-defined solution I thought of before was perimeter mapping. But it's very easy to make cases that do very obviously wrong things with that.
<J24k97>
afair you can modify those mappings in autocad - but that sure can't be done in scad
<InPhase>
One just needs to add a long pointy 2D protrusion to one shape, and then you get very bad results.
<InPhase>
J24k97: The example in the first answer with 24 points per layer is basically the ClosePoints solution but with spline layers added between the equal point-length layers.
mmu_man has quit [Ping timeout: 264 seconds]
<J24k97>
if you lay a grid on both shapes you know how to map and distribute the points
SamantazFox has quit [Quit: Bye]
<J24k97>
so if IN has 2 point in that grid cell and OUT has 10 - you need to subdivide that IN segment until it matches the OUT grid cell
<J24k97>
first select the start by using the closest and then advance and if one path moves faster (threshold) than the other you subdivide
<J24k97>
probably need to calculate the length of both shapes to be able to compare them
mmu_man has joined #openscad
SamantazFox has joined #openscad
mmu_man has quit [Ping timeout: 248 seconds]
mmu_man has joined #openscad
teepee_ has joined #openscad
deathonater has quit [Read error: Connection reset by peer]
<pca006132>
I personally would prefer something that can be parameterized by t from 0 to 1 and interpolate in between... for points mapping
<pca006132>
I remember Emmett saying that people buying CAD tools are basically paying for the loft function, it is the most flexible thing that is implemented differently in different tools...
<pca006132>
also, even if you solve the point matching problem for a pair of simple polygons, you still have polygons with holes to solve... and their genus can differ quite a bit
<pca006132>
let alone things like nested polygons... you have a tree now
<pca006132>
(though I think only allowing users to loft between polygons with the same genus is already very nice)
<pca006132>
I think adding loft to openscad will be very experimental, it is almost certainly something will have to be changed after the initial round of experimentation
<teepee>
yeah
<pca006132>
and I think we can't aim for something perfect, it simply doesn't exist, this function is ambiguous and not well-defined, it is good enough if we have something nice for some normal inputs
<teepee>
on the other hand, I think a working offset extrude, while not as general, would be covering quite a large number of interesting use cases
<pca006132>
yeah, offset extrude sounds like a simpler thing to implement
<teepee>
it's still difficult, but at least the result seems to be easy to reason about
<pca006132>
for (positive) offset extrude, can we say that its result is the same as the union of per triangle offset extrude? if yes it should not be hard
<pca006132>
making it fast is hard, but that is optimization
<pca006132>
the whole algorithm will be different for an efficient version, but at least we have the ground truth this way?
<J24k97>
negative offset shouldn't be a problem if we keep the points .. (and positive with delta is easy but created points need to connect to their origin
<teepee>
no, it's not the same for general polygons, specifically concave or with holes
<teepee>
oh, well, for *only* positive? hmm, maybe?
<teepee>
only positive offset is a very big additional limit
<InPhase>
pca006132: I concur that positive offset extrude would look like you describe on the triangles. That is the definition which handles the self-intersection issue.
<InPhase>
pca006132: Of course the negative value version has a stuff-disappearing problem to sort out, and can't be assessed the same with triangles. However, you can mathematically define negative offset extrude as the inverse of the positive extrude (as you defined it) of an infinite-space triangulation of the inverse of a starting polygon.
<J24k97>
if you start with a ring - positve offset will close the hole
<InPhase>
pca006132: Expressing my above blabber as code, for clarity: https://bpa.st/5AN7M
<pca006132>
this is just minkowski with a cone :)
mmu_man has joined #openscad
<pca006132>
minkowski is great except its performance sucks
<InPhase>
pca006132: Has anyone attempted an efficient minkowfold implementation?
<pca006132>
at least when people ask me if there are genuine use cases for minkowski except with a sphere, this can be the answer
<pca006132>
no
<pca006132>
we thought about efficient implementation for 3D offset, but the papers we saw were too vague, missing a lot of details
<InPhase>
3D offset to replace the 90% use case of minkowski would be a big help.
<pca006132>
I have some idea about how to do it, but I don't really have time
<pca006132>
general minkowski always require convex decomposition and tons of unions, that is guaranteed to be slow...
<InPhase>
pca006132: On pointy offset corners, I think the proper definition could probably be derived fairly straightforwardly from writing it out as a planar intersection for 3. I'd have to think a little more deeply for the case of 4 or more planes.
<pca006132>
feel free to leave a comment in the issue if you got any solution to that :)
<InPhase>
pca006132: By several orders of magnitude I don't have the time or energy for it this week. But I might be able to be prodded into insights on it later. :)
<pca006132>
sure, no hurry
<pca006132>
that issue is there for a year or something now
<InPhase>
Yep.
<J24k97>
here a minimal of the preview error https://bpa.st/KYB5M ( offset causing it )
<InPhase>
Yeah, 4 planes to a corner gets weird on pointy. You can, I think, get the concavity of a corner to disappear even while trying to preserve the same shape but extended outward.
<J24k97>
i think offset need convexity setting when extruded in preview
<InPhase>
pca006132: Your code link in that comment has gotten mislinked by the code evolving. The efficiency I bet will hinge on how well you defined "may overlap" in code. For a very large offset, most face pairs could be within the offset radius, but nearly all face pairs would be trivially provable as not eligible for overlap due to a mutually convex face (or a set of these) in between them.
<J24k97>
i wonder if a general convexity =3 would cause a big performance problem
<InPhase>
J24k97: Your question makes it sound like that should be a config setting.
<J24k97>
and would reduce a lot of preview errors (users not setting convexity)
<InPhase>
This config setting will make all of these situations vary wildly between users, which is its own sort of chaos... But it balances differing needs of performance and correctness of display.
<J24k97>
InPhase i remember i had cases in the past where i needed convexity settings in 2D
<J24k97>
(used render(convexity=3) to solve)
<J24k97>
maybe some info get lost by the offset - as it looks ok without offset
<J24k97>
but as rotate_extrude already set convexity=2 .. 3 could be default without harm (i think)
<J24k97>
and still can have the option to increase or lower by parameter
<J24k97>
But i think UX would be improved
<J24k97>
probably ends in the same discussion like $fa=1 $fs=.5 as default .. and nobody has the valor to change it.
<J24k97>
but increased convexity shouldn't cause the test cases to fail
<J24k97>
difference(){square(40);text("SCAD");} is also not right so difference and intersection would need the convexity parameter
<akiak>
Hi! Is this a good place for asking about command line options, or can anyone direct me to the good place if not? Specifically: I'm trying to enable manifold and can't seem to.
<J24k97>
teepee configurable? you mean per preferences a default?
<teepee>
yes
<teepee>
akiak: try openscad --version first to see what version it is
<J24k97>
like using a template for it - Ü .. i was thinking more that new user get a nice view and not after configure it
<akiak>
I'm using 2024.09.23, the latest `openscad/openscad` docker image. Same issue in another context with an older AppImage that works just fine with manifold enabled in the GUI, when running with a GUI.
<J24k97>
teepee maybe if the installation would be like " use high resolution default" checkbox to set this
<teepee>
akiak: then "--enable manifold" should enable it
<J24k97>
--enable all should also do it (hopefully)
<teepee>
that should work, but in general I would not just enable *everything* as there may be even conflicting settings at some point
Smeef has quit [Quit: (╯°□°)╯︵ ┻━━┻]
<J24k97>
teepee but would be nice to have convexity also with a default setting - probably need changes to rotate_extrude as that is already using 2
<J24k97>
changeable default setting..
<teepee>
I'm not sure that's a good global setting
Smeef has joined #openscad
<teepee>
I think a more reasonable local default would work in most cases, but nobody tried that so far
<teepee>
and I did not have the time either
<teepee>
well, time+motivation ;-)
<akiak>
I get roughly the same 5s render on my benchmark file with or without that option, the same renders in less than 1s (0.8ish) when using the GUI app with manifold enabled.
<J24k97>
didn't seem to cause so much resources if set to 3 and you can't set it for 2D except using render()
<teepee>
yes, pure 2d has no convexity
<teepee>
akiak: does it say it's using Manifold in the output?
<teepee>
are you generating an image? that looks like it's doing preview mode
<akiak>
Yes. Won't it make a difference when generating images?
Guest58 has joined #openscad
<teepee>
depends on the image, in most cases preview is faster, but in docker there's no GPU so that could explain the difference
<teepee>
you can try "--render"
* teepee
wonders what "arg" is
<teepee>
ah, "--render force"
<Guest58>
new user here. Is this a place to ask a question about BOSL2 ?
<teepee>
Guest58: if it's very specific, the mailing list is a better place as there are some of the BOSL developers there, but you can still give it a try here :-)
<akiak>
Oh, that helped! with `--enable manifold --render force` we're going much faster!
<akiak>
Any general tips for speeding things up in docker? I only need images rendered, in short I'm building a web service where a node app invokes OpenSCAD to generate images (for parametrized furniture and things).
<teepee>
use "reasonable" and local $fa/$fs values, don't use $fn unless specifically needed and never as global setting
<teepee>
otherwise it's difficult to give general advice as it very much depends on how the code is written
<teepee>
only things like: stay in 2d if possible, it's often faster, only extrude to 3d at the end
* J24k97
nods
<J24k97>
would be a nice text block for the wiki .. tricks'n tips or so
<akiak>
Oh, I meant with the executable, some other tweaks and settings, or maybe even a custom build. But I did note these down for designs, thanks!
<teepee>
hmm, with the executable, not sure, I can't think of anything specific
<teepee>
with preview there's not a huge amount of options to tweak
<Guest58>
okay, I'm trying to round only specific edges on a vnf_polyhedron(). My test case is like a cube, but with the top face sloping from back to front. I would like to round only the RIGHT+TOP edge (which slopes from BACK to FRONT). If I try attaching the rounding_edge_mask() using edge_mask() it only aligns parallel to the Y axis (not following
<Guest58>
the slope of the edge). If I try to attach mask2d_roundover() using edge_profile() I get a compile error: ERROR: Assertion '(is_list(list) || is_string(list))' failed: "Invalid input."
<teepee>
uff :-)
<teepee>
that's like 3 levels above my personal usage of BOSL so far
<akiak>
Thanks for the help peeps! This is speedy enough to get me going, I'll see how well this works when deployed on a cloud server, and come back with results... sometime. Or should I try the mailing list?
guso78k has quit [Quit: Client closed]
<J24k97>
teepee there is a fused dovetail in the back .. maybe copy remixed stolen
<teepee>
yeah, I've seen the dovetail + text markings
<teepee>
so reverse image search it is again
<teepee>
a while ago I reported quite a number of those assholes just copying stuff and then even claiming "own model"
<teepee>
probably thanks gamification :/
<J24k97>
Installation notes:
<J24k97>
1. All 6 pieces has their part name engraved in the back
<J24k97>
OFF .. not even autocad can open off (freezes when trying)
misterfish has quit [Ping timeout: 260 seconds]
<InPhase>
OFF is so unused that this color feature was when I first realized "OFF" was not a feature in OpenSCAD to disable geometry output...
<teepee>
ouchies
<teepee>
well, I guess we should do 3mf then, preferably without the library with the annoying name
guso78k98 has joined #openscad
<J24k97>
So i found MeshLab to open this -- and export into OBJ -- to open in BS .. works - Ü
<J24k97>
not sure why meshlab doesn't have 3mf support
<guso78k98>
Just looked into the code and it really appears to me, that 3mf-export does not contain colors, whereas I was sure/certain, that ochafic had done it ...
<guso78k98>
has there been any reasons why not to do it yet(it literally appears straight forward to me)
<guso78k98>
but i just looked into the export code before and it appears to me, that openscad does not export the available information
<teepee>
well, OFF works, so that would be surprising
<guso78k98>
teepee, i had 3mf color export working in my local color branch before ochafic was able to get his manifold color stuff merged
<guso78k98>
i cant find the relevant "keywords" in latest 3mf export code
<teepee>
povray could also work as example
<guso78k98>
yes, i'd really love to get povray export merged soon. its better than stl2povray converter
<guso78k98>
I think i could simply look up the old code in my color branch and match it to latest master branch
<guso78k98>
tricky part was only to import existing colors from 3mf files as i failed to iterate over the materials list '=(
<guso78k98>
BTW teepee : which has been the most tricky scenarios when you wanted to morph x-section A to x-section B in the past ?
<guso78k98>
a) different number of holes :')
<teepee>
hmm, yeah, that sounds like a good candidate
<guso78k98>
I know that a Polygon2d contains a list of "polygons" whereas CCW ones are solids and CW are holes. But once both x-sections have same number of polygons and there a defined mapping between those, I dont see any other issues
<guso78k98>
For both x-sections i would convert the points to polar coordinates, sample e.g. 60 angles and gradually change the "amplitude" from x-section A to x-section B
<f0lkert>
in the standard viewport of OpenSCAD, what are the coordinates of the default camera view?
<teepee>
f0lkert: shown at the bottom after using "reset-view"
<teepee>
although there's some compat code in Camera.cc