<kintel>
pca006132 The formatter you use is based on clang-format and only deals with whitespace, AFAIU, and wouldn't be able to do anything fancy. clang-tidy, otoh, can do tons of deeper analysis
<kintel>
..but formatting is a good first step. I didn't like clang-format's style at first and ended up writing a more comprehensive uncrustify config, but not sure it was worth it..
JordanBrown has quit [Ping timeout: 256 seconds]
pca006132 has joined #openscad
<pca006132>
technically clang-format and clang-tidy are different
<kintel>
..but I'm thinking we could probably align with a common config instead, at least if we can get tools set up that auto-formats in a convenient way.
<pca006132>
yeah
<kintel>
I never format code at work any longer; I just have a keyboard shortcut for "format everything" :/
<pca006132>
I think you can also configure uncrustify as some sort of a linter or something
<pca006132>
that errors when the code is not formatted correctly
<pca006132>
(a reference of commonly used indentation styles)
<teepee>
pca006132: so I hope you know Jason Coon then?
<pca006132>
I have no strong feeling about formatting, as long as it is consistent
<pca006132>
hmm no
<teepee>
I don't care too much about formatting, but there's exactly one single argument I heard that has acutally some real content and that votes for indent by tabs, align by spaces
<gbruno>
[github] kintel pushed 9 modifications (Remove -direct and -prealloc features. These are now always enabled. The main reason for enabling them is that glBufferSubData() is quite slow on macOS, so we'll standardize on one common, fast, code path.) https://github.com/openscad/openscad/commit/e2952170577ccced50bf222c6c93d677619de2ef
<kintel>
meh, another flaky test: ctest -R cgalstlcgalpngtest_issue13c
<kintel>
Seems flaky in release mode, but stable in a regular experimental build
<kintel>
regular experimental build uses manifold though, so it's not really a good comparison
LordOfBikes has quit [Ping timeout: 256 seconds]
kow__ has quit [Read error: Connection reset by peer]
LordOfBikes has joined #openscad
LordOfBikes has quit [Ping timeout: 245 seconds]
snakedGT has joined #openscad
kanzure has quit [Remote host closed the connection]
LordOfBikes has joined #openscad
snaked has quit [Ping timeout: 268 seconds]
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
pca006132 has quit [Quit: Client closed]
J23k74 has joined #openscad
J23k93 has quit [Ping timeout: 250 seconds]
mmu_man has quit [Ping timeout: 276 seconds]
JordanBrown has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<JordanBrown>
InPhase yes, me too, "unity build" means building with/for the game engine.
<JordanBrown>
Which, perversely, I would like... I'd like a good workflow that led from OpenSCAD to Unity. I've tried doing a little Unity design with their tools, and eww yuck I want my programmatic CAD.
<pca006132>
with the precision calculation fix, you should be able to do something like 10000 spiral or something (if it does not crash the stack).
<pca006132>
let me try if it works
<J23k74>
that should be plenty
<J23k74>
most recursions will stay under 100 anyway.
cart_ has quit [Quit: Konversation terminated!]
<pca006132>
1000 works, 10000 crashed my stack
<pca006132>
took 2s
<J23k74>
always amazing how fast manifold works
<pca006132>
I feel this is the expected speed for rendering :)
<pca006132>
our CPUs are fast
<pca006132>
there are actually quite a few places that can get some optimization in manifold, but those are not low hanging fruits and we are not sure how much we can gain from that
<pca006132>
feel like you can always squeeze some extra performance from complicated software if you try hard enough
<J23k74>
sure if we see gameengines - let me correct " surprising how slow openSCAD is without manifold"
<J23k74>
i rendered the spiral (original version for the calendar) that took 2hours without manifold
<pca006132>
wow that is quite unexpected...
<pca006132>
there are no actual union happening
<pca006132>
the cubes are not touching
<J23k74>
I am not sure but i think due to the recursion each next object is part of the module before .. so this is a chain of unions
<pca006132>
yup, but I mean the underlying boolean engine should notice that there are no actual intersections happening and exit early without running the complicated part of the algorithm
<J23k74>
creating an recursive array with the position data and using a normal for loop is probably faster
<pca006132>
btw does fastcsg work for this?
<J23k74>
lot of skipping and remeshing .. probably 5minutes
<J23k74>
[fast-csg] corefinement mesh union #375: 100440 facets vs. 132 facets
<J23k74>
wow what a educated guess: .. Total rendering time: 0:04:59.442
<Scopeuk>
also happy to release all rights, use as you please etc etc. if you some how manage to hurt yourself with it I am not liable but will be VERY curious
<J23k74>
nice avocado- maybe lower $fs and $fa
<J23k74>
do you have access to the calendar folder to upload? .. can we get a nativity scene with avocados?
mmu_man has quit [Ping timeout: 252 seconds]
drfff has joined #openscad
<Scopeuk>
I have no access to that Repo, more than happy for it to be used
<Scopeuk>
first attempt at a scarf was a bit naff, the preview doesn't like the interspersed shapes
<teepee>
you should have an invite to the totally secret santas-helper team
<Scopeuk>
yup, just saw that
<Scopeuk>
do we think with or without scarf?
<teepee>
put in first version, think about scarf after that :P
<Scopeuk>
ok, happy with that
<teepee>
as long as it's not in an opened door, we can always update
<teepee>
I just would not like to see relevant updates after the entry is public
<Scopeuk>
Yeh that wouldn't be right
<teepee>
just drop stuff into a new folder, I'm updating the index.js and readme.md quite often anyway, so just ignore those
<Scopeuk>
ok, I was about to ask if you were happy for me to do it that way
<Scopeuk>
Naturally I only spot Uppercase leading letter has been done for folders and files after initial commit. will correct and then be more careful next time
<teepee>
no worries, I changed mine too :)
misterfish has quit [Ping timeout: 260 seconds]
pca006132_ has joined #openscad
<pca006132_>
for some weird reason when I am tired, I feel a strong urge to refactor everything and use SIMD and various other techniques to speed up the code (e.g. boolean operations in manifold)
<pca006132_>
(and the interpreter in openscad)
<pca006132_>
but because I am tired, these are left as todo in my brain and rarely executed
pca006132_ has quit [Quit: Client closed]
<pa>
that sounds a concerning condition
<pa>
could be serious
ndnihil is now known as nihil
nihil is now known as ndnihil
mmu_man has quit [Ping timeout: 276 seconds]
mmu_man has joined #openscad
kintel has joined #openscad
mmu_man has quit [Ping timeout: 276 seconds]
mmu_man has joined #openscad
guso78k has joined #openscad
misterfish has joined #openscad
clemens3 has quit [Quit: WeeChat 2.7]
Guest40 has joined #openscad
guso78k82 has joined #openscad
<Guest40>
Hello, hope you are doing well. Looking for advice. I need to put the text into the model in specific way. The text's letters must be flush to the bottom (printed) surface and must be surrounded by the model's body, BUT there must be very small gap between the letters and the main body. This is required for printer's software to recognize letters
<Guest40>
as additional parts so that I can assign another nozzle to them to print in another color. If I make a difference() in the body with text size+0.1 (or +1) and then put text inside this text cutout, the letters do not match (logically :( ). is there any way in openscad to create a primitive and have small distance between this (complex) primitive
<Guest40>
and another primitive? I hope I am clear in the issue explanation...
<guso78k82>
https://imgur.com/a/DLd26dm I am getting used to the feature. this part does not fit to my dremel's shaft. measuring the hole distance helps me to replace it by a fitting one.
<guso78k82>
this will hopefully be merged soon
<teepee>
Guest40: sounds like a job for offset()
<guso78k82>
:')
<teepee>
so you can difference() { body(); linear_extrude(1) offset(0.2) text("hallo"); }
<teepee>
for the cutout
<teepee>
and linear_extrude(0.9) text("hallo");
<teepee>
guso78k82: yes, I could have used that a couple of days ago
<teepee>
had to export and measure in prusaslicer
<guso78k>
teepee, i opened a new SCAD document and did import("my_stl_file_to_measure.stl") without saving it yet. openscad has looked for it in "C:\ProgramFiles\my_file_to_measure.stl")
<guso78k>
any other place would be more reasonable tosearch for '=D . Maybe Users desktop directory is better when scad file does not have a file path ...
<InPhase>
guso78k: It's current working directory, which is set accordingly on Windows.
<teepee>
I would have expected the document folder though
<InPhase>
I think it will typically default to the home directory on Linux.
<teepee>
but maybe here it's still defaulting to CWD
<guso78k>
InPhase, i am not happy about this settings. CWD of openscad seldom contains the STL files i am interested in ...
<teepee>
all that CWD based logic has to be removed at some point, it's just crazy using that
<InPhase>
guso78k: Correct. It is a silly place to look. But yeah, it has to be approached carefully as a fix because of the messy way CWD is utilized throughout the code.
<teepee>
well, we can't know anything else than ~/Documents which probably will never be correct either
<InPhase>
If it were set to documents by default on Linux, I would be distraught. I typically want CWD to actually just stay where I launched it from, because I launch openscad from where I am working. :)
<InPhase>
So we also need to be smart about the different workflows.
<teepee>
yes, CWD should never change in OpenSCAD
<InPhase>
Even if we drop CWD, I want OpenSCAD to default look and save in the directory I had as CWD when I launched it.
<guso78k>
but this is the difference between windows and linux. in linux it searches where openscad was started , in windows is seaches where openscad was found ...
<InPhase>
But obviously this desire changes based on how it was launched by the user.
<InPhase>
guso78k: Actually it has more to do with whether you clicked on an icon, or launched it from terminal.
<InPhase>
Can we do a good quick fix by just setting the current working directory in the Windows icon? That's a thing, right?
<guso78k>
hmm, now sure. Icons on the desktop are a Links placed in the users's desktop directory, are they ?
<teepee>
no
<teepee>
*.desktop files in .local/share/applications or so
<InPhase>
And how do we generate the Windows icon?
<guso78k>
teepee sorry, i was guessing about windows situation
guso78k82 has quit [Quit: Client closed]
<teepee>
well, on Windows they are *.lnk files which are somewhat similar I suppose
<guso78k>
still here '=D
<InPhase>
Although we have no .lnk files in the repository, so some installer must generate these. Hopefully according to settings...
<InPhase>
installer.nsi it seems.
<guso78k>
isn't everything now located in CMakeLists.txt , even install stuff ?
<guso78k>
i was desparately changing stuff in installer.nsi and nothing happened
<Guest40>
teepee you are my hero, thank you so so much!!!
<InPhase>
But, I guess I'll leave it in your hands, because that would need testing as well. :)
<peeps[zen]>
installer.nsi is used for the NSIS installer on windows, the .exe file with GUI "wizard" dialogs
<InPhase>
guso78k: Is that what you're using?
<Scopeuk>
it looks from some googling like counter intuitivly you have to call SetOutPath with the desired working directory before calling the make shortcut
<guso78k>
InPhase, I dont remember completely, i just have very bad experience with installer.nsi because no change in there was working for me. believe, that I finally became happy by altering the install section in CMakeLIsts.txt
<Scopeuk>
that sounds like a horrible cludge to make it do somethign they didn't design for
<Scopeuk>
there is a switch to create shortcut /NoWorkingDir
<Scopeuk>
I'm currently pondering quite what the behaviour of no start in is for windows
<Scopeuk>
just tested, with no "start in" set (/NoWorkingDir) it will set the current directory to the folder containing the shortcut
<guso78k>
its in current masters CMakeLists starting from 1171. it mentions dll files so it must apply for windows, too.
<teepee>
yes, the main installer creation is in CMakeLists now
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<teepee>
not sure how much of the *.nsi files is still used
<peeps[zen]>
guso78k: cmake install and distributing an executable installer are two entirely different things
<teepee>
we probably have to find out eventually and potentially drop those files
<teepee>
yeah cpack
<guso78k>
packaging openscad and installing it on the target system must be handled by the same tool ...
<peeps[zen]>
sorry, i misremembered, thinking that we were still calling out to .nsi file. I even did most of that work on moving that stuff into cpack. the .nsi file might actually be obsolete now, not 100% sure
<JordanBrown>
kintel it looks like Windows (at least W11) doesn't disable stdio on the console for .exes, but *does* run them asynchronously.
<JordanBrown>
when I modified my production OpenSCAD to rename the .com file, "openscad --help" still produced the right output, but produced it after I'd already gotten a new command prompt.
<kintel>
JordanBrown How does this work for non-msys binaries and environments
<JordanBrown>
But as I noted in github, that was only a "make it work" change, not necessarily for production.
<kintel>
pca006132 I guess it's all about getting your app in a prominent location in the start menu and on the desktop :)
<kintel>
..but my primary use of Windows is to ssh into an msys console, so what do I know : /
<JordanBrown>
backed out that .com change
<JordanBrown>
but I think the tests don't run on msys2
<JordanBrown>
* normal users don't know what to do with a .EXE
<JordanBrown>
* there are auxiliary files (message files, examples, fonts) that come along for the ride
<JordanBrown>
* as kintel says, getting populated into the start menu, getting file types associated
<JordanBrown>
* and of course once you've done those things you want a way to *undo* them, and so there's getting populated into the uninstall infrastructure.
<JordanBrown>
We do have a .ZIP distribution for those who want to do it by hand.
<JordanBrown>
kintel thanks for the comments. I knew that integration into the test infrastructure was iffy.
<JordanBrown>
Will try to clean it up some this evening (maybe ten hours from now). Time to pretend to do real work.
JordanBrown has quit [Ping timeout: 260 seconds]
fling has quit [Remote host closed the connection]
fling has joined #openscad
guso78k has joined #openscad
peeps[work] has joined #openscad
SamantazFox has quit [Killed (NickServ (GHOST command used by SamantazFox_))]
SamantazFox_ has joined #openscad
arogora has joined #openscad
jonasbits_ has joined #openscad
jonasbits has quit [Ping timeout: 252 seconds]
peepsalot has quit [Ping timeout: 252 seconds]
killjoy has quit [Ping timeout: 252 seconds]
Fleck has quit [Ping timeout: 252 seconds]
ndnihil has quit [Ping timeout: 252 seconds]
arogora is now known as killjoy
killjoy has joined #openscad
killjoy has quit [Changing host]
Flecks has joined #openscad
<guso78k>
.. I plead a cylinder with a negative height to extend downwards instead of upwards. this saves me an extra rotate or mirror step
<guso78k>
(but probably any of the many libs could that)
<InPhase>
If we do the same for cube.
<InPhase>
It's mathematically cringy, but would greatly simplify a lot of code.
<Scopeuk>
the only concern is if it would block a potential syntax for any future potential negative volumes
<InPhase>
Scopeuk: I'm usually the one complaining about potential future syntax, but I'm going to object to using negative dimensions for subtracted volumes. ;)
<Scopeuk>
I was thinking to define negative mikowski mainly but yes, I'm not sure it's a good idea, just a thought aloud
mmu_man has quit [Ping timeout: 256 seconds]
<guso78k>
yes, negative volume to substract is great, but i would rather opt to assemble the positive the and negative object separately and implicitwly substract at the very end. once we have python , even variable could even have a negative and a positive member. most of the time the negative will not be used
misterfish has joined #openscad
guso78k has quit [Quit: Client closed]
guso78k has joined #openscad
ndnihil has joined #openscad
ndnihil has quit [Changing host]
ndnihil has joined #openscad
<guso78k>
i like the cube negative dimesnions, you could easily define in which of the 8 octants it extends ...
<Scopeuk>
I mean this could be done in userland
<Scopeuk>
wrap cube in a cube function which does the translate if an input is negative
<guso78k>
yeah, even better and include this in a user lib from a defined place which is automatically loaded without explicit include
mmu_man has joined #openscad
<peeps[work]>
i think it is bad idea to cater to negative dimensions, and probably many designs already rely on <= 0 values producing empty geometry, whether in loops with value counting down, or for example with 2 independent adjustable parameters which end up in a subtraction
<guso78k>
yeahh, openscad is very established. for them negative heights yielding void is a feature ;) did not consider that ...
<peeps[work]>
what would be more general and useful is maybe an optional param to set a direction vector for linear_extrude
<guso78k>
peeps[work] isnt that equal to applying a rotation in front of the linear_extrude(or shall the x-sections always stay parallel to xy plane ?
<peeps[work]>
yeah, i was thinking about that too. not sure if "skewed" extrude would be useful, and would result in 2d geometry if the vector given was also in xy plane
<peeps[work]>
but yeah without skewing like that, I think you are correct that it would basically just be a rotate
<guso78k>
peeps[work] what would be even more useful is a tilt angle to the 2d child of rotation_extrude , so it would be easier to create helix'es
<JordanBrown_>
One of my favorite personal modules is my justified-cube module jcube(dims, j), where j is a vec3 of -1,0,+1 that specify whether to place the cube negative of the origin, centered on the origin, or positive of the origin, in each axis. It's sort of a generalization of "center". I think it would
<peeps[work]>
i have written my own rotate_from_to(vec1, vec2) before, but wouldn't mind seeing that as a builtin for making that sort of thing more convenient
clemens3 has joined #openscad
<JordanBrown_>
Though one place I stumbled is in figuring out *exactly* what the circle variants should do, since there are two definitions for where the edges and center of circles are.
<JordanBrown_>
be great to add that for all primitive objects.
clemens3 has quit [Client Quit]
<guso78k>
i think one year ago there was a PR where rotate_extrude could make spirals (height would be factor *angle)
clemens3 has joined #openscad
<peeps[work]>
i don't recall such a PR, but i agree that could be nice to have. I mentioned some of my own thoughts about that (re: possible self-intersections) the other day when it was brought up
<peeps[work]>
from 11/18 <peeps[zen]> I just had a thought about possible self intersections for rotate_extrude with pitch. if angle >=360, then it split it into multiple operations with <= N-1 sections, N being number to complete a full rotation, close off the ends, and just union each of those
<peeps[work]>
<peeps[zen]> possibly with one section overlap across parts, in case coincident faces are an issue
<peeps[work]>
i think that would result in a robust solution to any self-intersection, which I would hope to see before merging such a feature.
<JordanBrown_>
Without any knowledge of the algorithms involved, it has always seemed to me that self-intersections resulting from sweeps of various sorts would be resolved in a totally intuitive fashion, by unioning the various components. Imagine a 2D cutout flying through space along the path. Anything it
<JordanBrown_>
flies through is part of the result.
<JordanBrown_>
Notably including volumes that it flies through twice, or backwards.
<JordanBrown_>
(Though I'm not sure whether it can ever fly through a volume backwards.)
<peeps[work]>
rotate_extrude etc just calculate transformed points and connect the dots
<Non-ICE>
no autosave? Faulting application name: openscad.exe, version: 0.0.0.0, time stamp: 0x60172571
<teepee>
the file of the last unsaved preview/render should be in the backup folder
<Non-ICE>
k
<JordanBrown_>
peeps[work]: yes, I know the algorithms used there are not enough to do what I would want. I'm just saying that there's a reasonably intuitive answer, if you could come up with an algorithm that yielded it.
<peeps[work]>
JordanBrown_: so there are no "components" to union, unless you specifically add code to split into sections as I mentioned above.
<guso78k>
peeps[work], imagine the points of slice(alpha=360) project onto the plane with alpha=0) . it they hit INSIDE the slide with alpha=0) its very likely self intersection
<peeps[work]>
i don't know what slice or alpha are
<guso78k>
sorry, need to better explain or add a legend
<JordanBrown_>
You start with a 2D region at angle=0, and you extrude it around the circle.
<guso78k>
slice is the the transformed 2D points of a certain angle, alpha is the angle
<JordanBrown_>
If the intersection between the 2D region at angle=0 and the region at angle=360 is non-empty, you have self-intersection. Or at least you do if you continue past 360.
<guso78k>
maybe i should work on drawing a sketch,
<guso78k>
thanks JordanBrown_,
<guso78k>
if there is no angle 360, but maybe 358 or 370 you can work with projections instead
<peeps[work]>
yeah i get that you can detect self intersection, but just saying whether it intersects or not is not good enough IMO. we should allow for self intersections so that threads can be created in a non kludge way
<peeps[work]>
just handle them appropriately by splitting into a series of not quite full rotations
<peeps[work]>
and union them
<guso78k>
peeps[work] yeah, good idea, did not consider that yet :)
<JordanBrown_>
While I think that supporting the self intersections is the best answer, it seems like even if you disallowed them you could still create threads. You just couldn't include the central body of the screw in the extrusion. The threads themselves shouldn't self-intersect.
<guso78k>
in case the thread intersects the user would see an would search for the error in the code
J23k74 has quit [Quit: Client closed]
<JordanBrown_>
It seems like in creating a helix there are two related but somewhat independent pieces of geometry: obviously you need to offset the 2D region in Z, but also you should tilt the region a little so that the region is perpendicular to the desired extrusion. It's kind of like the problem with making
J23k74 has joined #openscad
<JordanBrown_>
helixes with linear extrusion with twist.
<peeps[work]>
JordanBrown_: i think typical threads (without the "central body") would end up intersect along the helical edge between rotations, that would be bad for manifoldness
<peeps[work]>
JordanBrown_: yeah the pitch angle is something else to consider. i am trying to think about it, but it seems like the angle would be dependent upon the x distance (radius from axis of rotation) for each point in the 2D profile...
<JordanBrown_>
Make my brain hurt.
<JordanBrown_>
Makes
ccox_ has quit [Ping timeout: 255 seconds]
guso78k has quit [Quit: Client closed]
mknst has joined #openscad
<peeps[work]>
yeah, same. I think there might actually be cases where you would want to "tilt" it, and cases where you don't. thread profiles are basically already defined as radial cross sections so I feel like those shouldn't actually be tilted?
<peeps[work]>
but then if you are modeling a round wire formed into a helical spring, then you should have the tilt
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
ccox has joined #openscad
<peeps[work]>
the reference frame for thread geometry is not along that helical angle afaik, if that makes sense
<teepee>
which maybe should get a better fitting name
<JordanBrown_>
As I think we've discussed, there really should be something under File that is "open recent backup", or maybe that just pops a file-open dialog in the backup directory.