<ali1234>
is there a way to write "*/" in a comment?
<ali1234>
lf94: if laptop uses more than ~22 watts then it's more expensive
<ali1234>
anyway, context is solidpython wants to put the python code into the generated scad file, but the python code uses a glob("**/*.stl") and this looks like a comment terminator to the parser in solidpython at least
<ali1234>
would need openscad to support something like heredoc in comments to do this properly
J24k76 has joined #openscad
<peepsalot>
ali1234: just put it in a single line comment instead of block comment: // */ etc.
<ali1234>
that would make it annoying to extract the code
J24k has quit [Ping timeout: 250 seconds]
<peepsalot>
openscad editor even has a menu item + shortcut to remove comments, or use an editor with column select mode, or regex replace the comments away... plenty of ways to make it work.
krushia has joined #openscad
<ali1234>
it can't remove comments if they are malformed
<peepsalot>
i'm saying to use all line comments if "*/" is a concern. then nothing is ever malformed
<lf94>
ali1234: wut
<lf94>
ali1234: where does that number come from? electricity is super cheap in quebec
<ali1234>
~30 cents per kwh
<lf94>
I should check the wattage, just so I know
<ali1234>
that's approximately what most of europe pays
<lf94>
7.5 cents in quebec
<lf94>
45 watts
<peepsalot>
ali1234: another option would be to replace any occurence of "*/" in python strings with "*"+"/"
<lf94>
for this thinkpad t440
<ali1234>
45 watts is probably peak, it should use less when idle
<lf94>
yeah that's what the ac adapter draws i guess at peak
krushia has quit [Quit: Konversation terminated!]
<ali1234>
20 watts when idle is not unheard of though, especially if you have some errant process polling constantly
<lf94>
I should buy a killawatt to measure
<lf94>
you got me curious now
<lf94>
europeans must pay so much for electricity
<ali1234>
yes
<ali1234>
although it is offset because we generally don't have aircon and use gas to heat our houses, which is somewhat cheaper (at least when geopolitics isn't messing everything up)
<lf94>
USA avergae seems to be 17
pca006132 has quit [Quit: pca006132]
<ali1234>
hmm apparently solidpython is dead and it's solidpython2 now - which doesnt have this code dumping feature
<InPhase>
kintel: We could always undo a deprecation of CGAL, but I the direction of movement makes it look like supporting CGAL will get progressively more difficult. Take this multicolor work that is blasting into Manifold. I think multicolor render support is pretty critical going forward for the future of 3D printing, and I don't have a sense for what dark magic would be required to make that work with CGAL.
<InPhase>
kintel: So even if we drag along support for CGAL for a while, we might want to make it clear that it's the disfavored solution going forward and not guaranteed to support all the new features.
<kintel>
yeah, good, point, feature sets are bound to diverge. ..and available dev resources kind of dictates leaving one backend with less love in the longer term
<InPhase>
And marking this early will help motivate bug reports. Because I really do expect a bit of a burst of those with the first Manifold release. :)
<kintel>
Anyway, I opened a ticket for it. making this configurable might also help moving Manifold out of experimental
<InPhase>
People won't just quietly retreat to the CGAL setting if they see it marked "deprecated".
<InPhase>
We want them to make a little bit of noise about issues.
<teepee>
ah, guso78k, did you see the message regarding znc?
<guso78k>
teepee i relialize znc not working anymore, but that's it ...
<teepee>
<lf94> If anyone sees guso please tell them I moved the ZNC server to my home
<teepee>
<lf94> I've decided to self-host after DigitalOcean was like "yo we want our $5" :p
<buZz>
guso78k: seen? ^^
<buZz>
lol
<guso78k>
yes, i have seen :)
<guso78k>
i have contacted him anyway. suppose i have to configure with another ip or dns address, then ...
<guso78k>
BTW thanx for notifying . i appreciate
<buZz>
yw, not everyone has all the 'right' /hilight rules in client ;)
snaked has quit [Quit: Leaving]
krushia has joined #openscad
mmu_man has quit [Ping timeout: 268 seconds]
guso78 has joined #openscad
<guso78>
Hello Back again with my znc Account
Guest18 has joined #openscad
Guest18 has quit [Client Quit]
mmu_man has joined #openscad
Guest18 has joined #openscad
guso78k has quit [Ping timeout: 250 seconds]
<Guest18>
hi there openscad, im having issues with the var aruments at the windows commandline where i want to replace 3 variables i have in the scad file code. i want to change them when i run the windows command in one go and the documentatino is unclear how to execute this so far my command is openscad -o luketk.stl -D lukesthrowbelow=1 secondvariable=3
<Guest18>
3rdvariablewhichisastring=\""hi\"" CSG-modules.scad which does not work . i want to change the first two variables to integers and the third to a string
<InPhase>
Guest18: You'll want either multiple -D instances, or one -D with an entry like -D "lukesthrowbelow=1; secondvariable=3; 3rdvariablewhichisastring=\"hi\";"
<InPhase>
You can put I think anything in -D as long as you enclose it in quotes.
<InPhase>
An example: openscad -D "cube([10,5,2]);cube([4,10,4]);" -o test.png blankfile.scad
<InPhase>
This is not officially supported behavior, as only variable definitions are listed in the documentation. But the actual way it works is string concatenation to the main file, and somebody out there would probably throw a fit if we broke that. :)
<InPhase>
Another example like this: openscad -D "cube([10,5,2])" -D "cube([4,10,4])" -o test.png blankfile.scad As you can see, subsequent -D's are processed with the needed semicolons inserted between them.
<Guest18>
doesnt seem tot work. openscad -o luktttttetk.stl -D lukesthrowbelow=1;lukesthrowabove=2 CSG-modules.scad i have the variables globally defined in the scad code . try to set them via the command line to a lower value but they dont change
<InPhase>
You don't have quotes.
<InPhase>
Your semicolon will probably end the command line without it.
<Guest18>
i added them and still doesnt work i caughti it before you said
<InPhase>
(I was running my simplified local test to make sure I didn't make typos, then left typos converting it back.)
<Guest18>
i get echo 1 with this
<Guest18>
i get echo 1 with this openscad -o luktttttetkttttt0.stl -D "lukesthrowbelow=1;lukesthrowabove=2;" -D " echo(lukesthrowbelow)" CSG-modules.scad
<Guest18>
so it is seeing the variable as 1. but its not setting the variable in the the scad file for some reason
<InPhase>
This is most likely something you are doing differently from what you think you are doing. Perhaps you can share your scad file to clarify the exact issue, like at https://bpa.st
<Guest18>
when running my windows command, its suppose to bring the obeject back down to centre
<InPhase>
You are not using the same variable.
<InPhase>
Your script has $lukesthrowbelow but from command line you are setting lukesthrowbelow. These are two different variables.
<Guest18>
does it need the $ ?
<Guest18>
i thought that was the variable char like php
<InPhase>
No. They specify two different types of variables. With $ follows a dynamic scope, and without $ follows a lexical scope.
<Guest18>
i added the $ and it works :]
<InPhase>
Most often without $ is the standard.
<Guest18>
Thanks; its my first day using open scad.
<Guest18>
its seems very useful as i have in mind to make some object in solidworks and have users customize it via a website with some parameters and i just need to provide openscad a base stl to work from , it opens up alot of user configurablity without them needing to know how to 3d model if i make the web page nice enough
<InPhase>
Guest18: Also, I don't know your webdev level, but some very impressive customization capabilities are possible with the webasm build of openscad. An example using this is here: https://makerworld.com/en/makerlab/parametricModelMaker
<InPhase>
Guest18: That one has source code left, parameter customization middle, webgl display of the result right.
<Guest18>
is it more efficient ? as i hear my gpu fan kick in on every render and i have a 3080ti sitting in the back doing nothing so to compile with my graphics card would be much better for my use
<InPhase>
It is more efficient, but not because it's using the graphic card. It's much more efficient because that version is built with the development branch, which has made rendering about 10 to 100 times more efficient.
<InPhase>
You can use the nightly snapshot builds from the website, and turn on Manifold in the settings, if you want to experience these speed gains.
<lf94>
thanks guys, guso is all setup again
<Guest18>
is there a way i can for the mean time have openscad use nvida cuda?
<teepee>
no cuda
<InPhase>
Guest18: No. There is no library support available to make use of for doing the specific sort of rendering we do with OpenSCAD. It's not like rendering for graphical display.
<Guest18>
not even if i use pytorch to throw the entire application into the graphics card memory?
<teepee>
manifold *had* cuda support but it's a) annoying b) not easily built for release and c) now removed anyway as it was not faster
<Guest18>
it wont be optimal
<Guest18>
damn
<InPhase>
teepee: Yeah. You really need a very specific set of conditions for GPU cards to do anything useful at all for performance.
<teepee>
that new engine InPhase mentioned is faster without the cuda support ;-)
<Guest18>
it does take quite a while to convert the scad to the stl with that commandline after a copuple of variable swaps and im on a 19 16 core 5ghz box
<Guest18>
i9*
<teepee>
as mentioned before, use dev snapshot and pass "--enable manifold" as parameter in addition
<InPhase>
Guest18: Manifold render times are usually seconds or sub-minute.
<teepee>
in some cases that turned hours of calculation to seconds
<Guest18>
what is the manifold ?
<InPhase>
Yeah.
<InPhase>
Guest18: What I've been describing since 7 minutes ago. :)
<teepee>
in this case manifold is the name of the new geometry engine
<Guest18>
no i mean technically
<Guest18>
ph the phase engine?
<Guest18>
oh*
<InPhase>
Oh. A rebuilt library, built specifically for this purpose.
J24k76 has quit [Quit: Client closed]
<InPhase>
Whereas the CGAL library we had been using was built by mathematicians for mathematicians.
<teepee>
not focusing on pure math as the old one (CGAL) but on speed and practical use
J24k76 has joined #openscad
<teepee>
plus automatic multithreading too
<InPhase>
It turns out the overhead from those different approaches was pretty wild.
<Guest18>
so the command i use will be exactly the same but with --manifold tagged on the end?
<Guest18>
okay ill get the dev snapshot and report back
<teepee>
yup, that should work, it can go pretty much anywhere but at the end is fine
<teepee>
if you want to try the same in GUI, then enable via Preference -> Features
<Guest18>
it doesnt like the --enable manifold argument
<Guest18>
is there a typo? maybe no space?
<teepee>
try openscad --version
<Guest18>
oh wait my path migh tbe pointing to the old scad
<Guest18>
i changed my path since the new program folder used the (nightly) suffix but no it doesnt like the --enable manifold, let me to a versoin
<Guest18>
OpenSCAD version 2021.01
<teepee>
still picking up the release then
<teepee>
maybe need to reopen the console window?
<Guest18>
rundll.exe had a handle on it
<Guest18>
(thanks unlocker.exe)
<Guest18>
ill restart my pc
Guest18 has quit [Quit: Client closed]
Guest18 has joined #openscad
<Guest18>
can someon repost my command i lost it when i restarted because i forgot to pin it, and i found microsofts new powertoyds "advanced paste" which pastes with AI caused me to BSOD........ so i had to disable that but lost my clipboard history
<teepee>
check the topic, the is a log link
<Guest18>
its okay i rewrote it
<Guest18>
microsoft need to fix their shit
cart_ has joined #openscad
cart_ has quit [Client Quit]
<Guest18>
holycrap that was faster
<Guest18>
i needed to restart, it was obviously cached in mem or prefetched.
<Guest18>
ran it now, and it was instant
<Guest18>
tbbh it perplexes me it took so long on the other engine. its still only simple math and my pc is overspec'ed to the 9's and it took around 4 seconds
<Guest18>
but the new engine, silent and instant
<InPhase>
Guest18: My workflow is now, "User asked if GPU support is here/pending" --> "User is clearly not using Manifold", precisely because nobody using Manifold is talking about how much they think GPU rendering might help. ;)
<teepee>
that's "exact math" vs. real world numbers that are good enough for most people
Guest18 has quit [Ping timeout: 250 seconds]
<InPhase>
teepee: I remember years back reading the CGAL dev team's descriptions of why this could not be done. I did not think their rationale sounded valid, so aside from just the useful result, I appreciate that the point was proven that it works fine to approach the problem this way.
<teepee>
all a matter of scope I suspect. e.g. there is currently some issue with manifold using floats, double might solve it for most cases
<teepee>
if the expectation is to model both planets and atoms in the same run, even double might not be enough :)
<InPhase>
Nor would rationales complete before the planets return to atoms. ;)
<InPhase>
s/rationales/rationals/
<teepee>
depends $fn I suppose :D
<Virindi>
I believe current rendering is not sufficiently precise for high quality machining technology? Precision errors seem to occur above the 1-micron level but below 0.01mm
<Virindi>
it could be accumulation of error
<Virindi>
for example, when performing a subtraction of two complex volumes, a wall difference between two parallel planes of 0.001mm is not always sufficient
<Virindi>
(not curved surfaces, flat ones)
<Virindi>
(yes I know that walls will move with fn)
<Virindi>
I tend to use 0.02mm and I never encounter a problem with that, which is sufficient for current 3d printing technology but certainly not all manufacturing
<InPhase>
I wonder if they already did a float/double performance comparison for Manifold.
<InPhase>
Modern processors typically have these as very comparable, and sometimes if vectorization is able to be utilized effectively, working with doubles can even win.
<teepee>
I think the status is mostly "double is probably needed, so we have to take the hit anyway"
<Virindi>
I have measured the head positioning error on corexy, 0.9 degree motor 3dp to be around 0.01 to 0.02mm using various positions and a long throw dial indicator
<InPhase>
That's too high to be direct positional precision, so that must be something cumulative.
<Virindi>
if there was a speed hit, I'd like render() to be fast and choosing render from the menu to be accurate, but I know nobody is going to want to build two separate copies of some rendering engine for different precisions
<InPhase>
:) Well having them different would inevitably infuriate someone.
<InPhase>
But if they were ever substantially different, I have been for a long time advocating a long term goal of wiping out the preview subsystem, so there would be an opportunity to redefine that button instead.
<Virindi>
on corexy with 0.9 degree stepper motors and 16-tooth 2mm pitch pulleys, a full step is 0.08mm. microstepping below 1/4th step rapidly loses torque in the sense of, when the motor is 1/8 step away from the desired angle, there is almost no torque applied, so any stiction in the system prevents movement
<InPhase>
But I really doubt the performance difference should be enough to worry about it.
<Virindi>
sure, the problem is that render() is really useful for previewing at reasonable speed, but it is called render()
<Virindi>
:)
<Virindi>
it is more like, cached preview
<InPhase>
I do tons of numerical computation work, and almost always just work with doubles, and have a hard time finding differences. The scenario where I use 32-bit floats is mostly just for large data where RAM storage becomes a challenge.
<Virindi>
yeah I haven't heard of anyone using float for anything serious this century
<Virindi>
until now.
<Virindi>
I guess on gpu only
<Virindi>
like quantized models
<InPhase>
LLMs are a good example where the smaller floats are still valued, because of the RAM issues.
<Virindi>
sure
<Virindi>
but that is totally different from the typical cpu application
<Virindi>
I was thinking of physics or graphics or that kind of thing
<Virindi>
who the heck uses float
<Virindi>
why quantize unless you need to do 100,000 hours of training on a datacenter of A100s :)
<Virindi>
I dream of someday using openscad for machining. My limited attempts have been not great so far
<Virindi>
for example, I have to provide a step file to get a company to machine a part, and the conversion process often causes curves to become segmented, and they will not accept that.
<Virindi>
I keep having to recreate parts in freecad so I can actually get them machined :(
<InPhase>
Virindi: You could imagine some advancement in OpenSCAD for this, but also, machine shops DO advance their ways over time, they just do so slowly.
<Virindi>
of course it is a question of cheap services :)
<Virindi>
if I want a $10 machined part from JLC
<InPhase>
I remember a machine shop from 16 years ago that wanted powerpoint-based schematics from me. I suspect they're not asking for that anymore. :)
<InPhase>
They had this whole protocol for how to layout appropriate schematics in powerpoint.
<Virindi>
ah, "legacy" companies
<Virindi>
"upload a file on a website" companies surely murdered them
<Virindi>
in electronics, the legacy guys are almost entirely defense and medical nowadays
<Virindi>
they aren't even interested in our products now. too low margin.
<Virindi>
"just go to china"
<Virindi>
the people who sell a pcb stencil for $4000 and their customers buy it because they are required by the DoD to do all US manufacturing
<InPhase>
Virindi: 100% of everything I used that machine shop for would have been easier, faster, and probably cheaper through a shop that did aluminum printing.
<Virindi>
have you had metal parts printed before? I am really concerned about the strength
<InPhase>
I haven't, but it was all for microscopy, so these were not heavy load bearing. The loads were... light.
<InPhase>
Precision needed to be decent, but no machining was accurate enough by itself for microscopy aligning anyway, so everything needed fine tuning ability anyway.
<InPhase>
What was important though was the thermal expansion coefficients. But I expect 3D printed aluminum would have identical expansion coefficients to machined aluminum.
<Virindi>
...perhaps
<Virindi>
aluminum kinda sucks for thermal expansion though
<InPhase>
It only has to be matched.
<Virindi>
makes sense
<InPhase>
Generally though we ran the systems at a fairly fixed temperature, giving them a warm-up period, and with them in a temperature controlled room. Although there were variabilities, they tended to be day-to-day or more often week to week, and things were temp stable after 30 minutes or so.
<InPhase>
Day to day adjustments were modest if anything.
<InPhase>
This was mostly for single molecule spectroscopy, and a little bit for super-resolution, so we had some of the most stringent requirements one could get in that field, and this tended to work fine.
<Virindi>
I'm surprised you wouldn't use something like copper instead, given how aluminum tends to have a tendency to develop a thermal gradient along a part, unlike copper
<InPhase>
Standardizing on a soft metal had valuable gains for machining and customization.
<Virindi>
wouldn't you expect the strange grain structure of sintered parts to give them much different thermal properties than, say, extruded parts?
ali1234 has quit [Remote host closed the connection]
ali12341 has joined #openscad
<InPhase>
I wouldn't, but it's possible they would have different stiffness / flexibility. I'm not able to find data on that by a quick search.
<Virindi>
I have never seen a printed metal part but I have this (perhaps incorrect) idea in my head that they would fail early by brittle fracture
<InPhase>
Virindi: Supposedly they can be made stronger than traditional methods, but I haven't looked up the details.
<InPhase>
Maybe this only means strength per weight, which obviously 3D printing can win on.
<InPhase>
It maybe the structures of lines work more favorably for metal than for plastics due to the way grain lines contribute to strength.
<InPhase>
s/It/But/
<InPhase>
One thing I know for sure, is that I'd be happier making 3D printed metal parts than machining them. :)
<Virindi>
yeah of course you would be tempted to make complex and thin spaceframe structures in everything
<Virindi>
because why not
<InPhase>
Machining is an okay passtime, but 3D part design is just deeply more rewarding for me.
<Virindi>
clearly you need to build a desktop 5-axis then.
<Virindi>
the fact that it is so much more difficult to make/get metal printing at home than metal machining turns me off :)
<lf94>
InPhase: anything new in the scad world?
<lf94>
InPhase: any new models that stress the limits of openscad?
<InPhase>
lf94: Well we hit upon a model that at one point consumed 155GB of RAM... But that was largely impacted by a lingering Manifold bug. :)
<InPhase>
It would have been impossible in CGAL anyway though.
guso78k has joined #openscad
<guso78k>
yes, today i am increased annoyed from openscad blocking the interface when computing an extensive and time consuming task. it appears to me, that the gui thread and calculating thread are not actually separated . I am wondering whats the actual challenge to get that sorted ...
drkow has joined #openscad
kow__ has joined #openscad
drfff has quit [Ping timeout: 268 seconds]
drkow has quit [Ping timeout: 268 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 260 seconds]
teepee_ is now known as teepee
nomike has joined #openscad
<nomike>
Hi
<nomike>
I have the following small script (simplified version): https://paste.ubuntu.com/p/XCbYT8tKKP/ The issue is, that there is a vector `heigths` with an arbitrary number of integers as a parameter. The customizer only allows vectors with up to 4 elements and displays spin boxes for them.
<nomike>
Is there some trickery to have this parameter appear in the customizer with an arbitrary number of elements? From a GUI perspective, I'm imagining a text-box. But I don't really care about the GUI. It's more about the `.json` file where I want to add entries like that..
<nomike>
I'm afraid there isn't but I wanted to ask just in case.
<nomike>
My version: 2024.05.24 installed directly from the github repo.
nomike has quit [Remote host closed the connection]
nomike has joined #openscad
<nomike>
Another idea I'm currently exploring is specifying the parameter as string, like `param = "1,2,3,4,5"` and writing a function which converts it into a vector. But this is also proving to be quite difficult...