teepee changed the topic of #openscad to: OpenSCAD - The Programmers Solid 3D CAD Modeller | This channel is logged! | Website: http://www.openscad.org/ | FAQ: https://goo.gl/pcT7y3 | Request features / report bugs: https://goo.gl/lj0JRI | Tutorial: https://bit.ly/37P6z0B | Books: https://bit.ly/3xlLcQq | FOSDEM 2020: https://bit.ly/35xZGy6 | Logs: https://bit.ly/32MfbH5
rawgreaze has quit [Ping timeout: 240 seconds]
rawgreaze_ is now known as rawgreaze
GNUmoon has quit [Ping timeout: 255 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
GNUmoon has joined #openscad
caveman has quit [Ping timeout: 255 seconds]
caveman has joined #openscad
<gbruno> [github] kintel pushed 1 modifications (Bugfix: default function argument snuck into the cc file) https://github.com/openscad/openscad/commit/1ffd6672d57c2f07290869446a6275ca0e841a67
<gbruno> [github] kintel opened pull request #4618 (Bugfix: default function argument snuck into the cc file) https://github.com/openscad/openscad/pull/4618
<InPhase> caveman: OpenSCAD is great for drawing accurately, because it's programmatic, so it draws exactly to the number. One of its huge strengths is in designing mechanical parts to align with a specification, and keeping that parametric in the design, so that you are in fact implementing an entire class of parts when you do it right.
<InPhase> caveman: Assembling and testing movements is another very good strength. The animation ability of OpenSCAD is quite strong. Some examples are on the annual calendars: https://openscad.org/advent-calendar-2022/ https://openscad.org/advent-calendar-2021/ https://openscad.org/advent-calendar-2020/ https://openscad.org/advent-calendar-2019/
<InPhase> caveman: OpenSCAD does NOT have any embedded FEA support however. It is purely a 3D or 2D modeling tool. What you do with the results of those models in other programs however is up to you. I don't have a background in this, but there are people who use calculix with OpenSCAD out there.
LordOfBikes has quit [Ping timeout: 252 seconds]
kintel has joined #openscad
<gbruno> [github] kintel opened issue #4619 (Set up sanitizers and reorganize expensive CI build) https://github.com/openscad/openscad/issues/4619
<gbruno> [github] kintel edited issue #4619 (Set up sanitizers and reorganize expensive CI builds) https://github.com/openscad/openscad/issues/4619
LordOfBikes has joined #openscad
J2376 has joined #openscad
J23 has quit [Ping timeout: 260 seconds]
<caveman> InPhase: thanks. however, some say that cgal (backend used by openscad) doesn't do nurbs but only polygons, and they say that this makes them less accurate than opencascade's nurbs ability. any thoughts?
<gbruno> [github] kintel closed pull request #4618 (Bugfix: default function argument snuck into the cc file) https://github.com/openscad/openscad/pull/4618
<gbruno> [github] kintel pushed 1 modifications (Bugfix: default function argument snuck into the cc file (#4618)) https://github.com/openscad/openscad/commit/8b012883eb8d1f5d6b331d413e55c04f4dc9ea11
<kintel> peeps[zen] Did you ever look into enabling sanitizers for mimalloc?
<peeps[zen]> um, i don't think so. wouldn't that be responsibilty of the mimalloc repo?
<kintel> I noticed you added some settings in our CMakeLists.txt:
* kintel set(MI_DEBUG_TSAN OFF CACHE BOOL "") # Build with thread sanitizer (needs clang)
* kintel set(MI_DEBUG_UBSAN OFF CACHE BOOL "") # Build with undefined-behavior sanitizer (needs clang++)
<kintel> -> I'm looking into adding optional sanitizers to OpenSCAD, I'm just wondering if such sanitizers should automatically be added also to submodules
<peeps[zen]> oh, i mostly just copied the full set of options from mimalloc/CMakeLists and tried to set each one appropriately
<kintel> Anyway, that answers my question. I was concerned about them being turned off for a reason
<peeps[zen]> on a related note, i was looking at a recent test report from CI, and saw that there is a ton of build info about every generated .make file for openscad and all submodules recursively
<peeps[zen]> was that always there or something relatively new?
<peeps[zen]> I think that manifold might be building more than is necessary, like tests and extras?
<kintel> I haven't noticed that
<kintel> ..but yeah, manifold may do a bunch of unnecessary stuff
<peeps[zen]> like why is this in our test report: submodules/manifold/test/third_party/google_test/googlemock/gtest/CMakeFiles/gtest_main.dir/flags.make
Av8r has joined #openscad
<kintel> I see the extra info now. For some reason only visible for the Ubuntu builds
<peeps[zen]> its like 99% of the report, hehe
<kintel> My guess is that we simply just include the default build settings for manifold, and don't attempt to build only the lib
<kintel> ..so it drags in the kitchen sink
<kintel> I still think that, ideally, we may want to build manifold as a library outside of the main OpenSCAD build
<peeps[zen]> yeah, that's why i feel like its good to copy the full list of build options into our repo's cmakelists and deliberately set each one
<kintel> yeah, don't think anyone looked into that yet
<kintel> Btw., do you know what this means?
<kintel> mimalloc: warning: unable to allocate aligned OS memory directly, fall back to over-allocation (268435456 bytes, address:
<kintel> 0x107000020000, alignment: 4194304, commit: 1)
<peeps[zen]> when you say outside of main OpenSCAD, would you remove it as a submodule? or you mean just dynamic linking or what? (haven't checked how its currently linked)
<kintel> I think prebuild it, outside of OpenSCAD's main CMakeLists, and just Find and link it
<peeps[zen]> kintel: not sure about mimalloc warning. is that on mac? mac had a couple weird configuration settings which I wasn't sure what to do with, and I think I ultimately left those as default.
<kintel> ..just to decouple it a bit. Not sure how many problems it solves in practice though
<kintel> It's on macOS for now, bit it's the same test which sometimes crashes on Ubuntu
<peeps[zen]> MI_INTERPOSE, and MI_OSX_ZONE
<peeps[zen]> funnily that code browser was the only goodle result for that error
<peeps[zen]> google
<kintel> that does looks relatively harmless (modulo reallocation cost)
<kintel> It's concerning that the next error is /Users/kintel/code/OpenSCAD/openscad/submodules/manifold/src/third_party/thrust/thrust/detail/reference.h:330:48: runtime error: reference binding to null pointer of type 'thrust::execution_policy<par_t>'
<kintel> Anyway, need to carve out some time to dig into that stuff in detail...
<peeps[zen]> you can try USE_MIMALLOC=OFF if you think it might be causing issues in combo with manifold/thrust multithreading
<kintel> I tried, still failing, so that's "good"
<peeps[zen]> the mimalloc repo also seems to be fiarly active with bugfixes etc, so we might want to check if next stable version bump is possible. there's also the option of running their dev branch
<kintel> Right, they also have the concept of "stable" vs. "release"
<peeps[zen]> kintel: do you think the whole copy paste of options for mimalloc adds confusion? we could certainly remove any of those settings which match with mimalloc's defaults if it makes things clearer
<kintel> Those are just defaults, which can be overridden on our CMake cmd-line, right?
<peeps[zen]> hmm, not sure if we can set submodule defaults from top level command line
<peeps[zen]> or, override the defaults i should say
<kintel> I'll have a look as I try to enable sanitizers
<peeps[zen]> kintel: are you dealing with clang-tidy at all?
<kintel> I haven't run it in a while..
<peeps[zen]> ok, i was messing with it a while ago and meant to try to get it running on CI, but didn't finish up that task
<peeps[zen]> i think I couldn't decide which github action to use
<kintel> How expensive is it to run it?
<peeps[zen]> it depends how many checks you wanna run
<kintel> Ballpark for the checks you think we should run
<peeps[zen]> it might be 5x or more normal build time, i can't recall very well
<kintel> right, I'd say tack it onto https://github.com/openscad/openscad/issues/4619
<kintel> I'll try to come up with something configurable, but as always, the rabbit hole tends to be deeper than I think..
use-value has quit [Remote host closed the connection]
use-value has joined #openscad
snaked has quit [Ping timeout: 246 seconds]
snaked has joined #openscad
<InPhase> caveman: Well, put simply, nurbs are not "more accurate". They are simply a different way of specifying a shape. It is an approach that happens to be convenient for certain types of smoothly varying curved shapes, but overall is mostly useful for a gui approach to specifying shapes, which is why OpenSCAD does not integrate this approach. It would however be possible to do a nurbs library for
<InPhase> OpenSCAD. It would also be theoretically possible to add nurbs support, but there has not been a whole lot of call for this because it doesn't seem to be very convenient without its coupling to that gui interface approach. Therefore it seems to be slightly more of a thing preferred for artistic type modeling.
<InPhase> caveman: If however you talk to someone who is primarily used to a nurb workflow with clicking and modifying, and then they get to OpenSCAD where one is expected to do programmatic CAD, they are going to feel like "something is missing". But it's because it's a completely different type of approach. OpenSCAD has fundamental capability however to produce any 3D mesh possible. It is simply a question
<InPhase> of some things being more convenient to implement than others. And of course, extremely large models could require a lot of computational resources.
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guso78 has joined #openscad
qeed has quit [Remote host closed the connection]
qeed has joined #openscad
use-value has quit [Remote host closed the connection]
use-value has joined #openscad
<guso78[m]> Release_common.sh will Not ein when DEPLOYDIR IS Not Set. ITS Not Set in my place. How do i Set IT correctly?
<guso78[m]> Will the Produced Installer Run openscad in any Install path in the target system ?
<guso78[m]> ... will Not Run ...
<peeps[zen]> guso78[m]: scripts/setenv-unibuild.sh
<peeps[zen]> is what typically sets that
<peeps[zen]> call with `source ./scripts/setenv-unibuild.sh` so that the environment variables stick (for that shell session) but you can also `export DEPLOYDIR=blah` in terminal to set that or any environment variable
epony has quit [Quit: QUIT]
KimK_ has joined #openscad
KimK has quit [Ping timeout: 250 seconds]
jonasbits has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jonasbits has joined #openscad
<caveman> <InPhase> ... [nurbs modeling] seems to be slightly more of a thing preferred for artistic type modeling.
<caveman> imo it's the opposite in general: mesh-based modeling is often used by artistic modellings (e.g. blender, 3ds max, etc), while nurbs are historically more used by engineer designing (e.g. autocad, solidworks, etc).
<caveman> but i agree with you that it isn't a big deal, specially for my application where i mainly do this for the purpose of FEA. even freecad's FEA (FEM) requires their nurbs to be converted into a mesh 1st (using gmsh external app), in order to allow for calculix to run (calculix runs on meshes)a.
<caveman> so, for my use of freecad, technically i'm doing my work in meshes.
<caveman> now, since openscad is already modeling in meshes, i think there is less reasons to not integrate it with calculix.
<caveman> i really like openscad's ui, and the smooth opengl rendering. the programming approach is really worth it too; partly because it exports a lot of UI's functionality into that of some editor, so that i can simply use vim, and then the app becomes vim friendly in no time!
<buZz> caveman: but SOOON!
<buZz> OpenGLES rendering!
<buZz> w000t
<buZz> :D
<buZz> (so i get to openscad on my ~10yo cellphone)
<buZz> :D
<caveman> openscad is planning to adopt opengles?
<caveman> nice. but i wish they add calculix integration 1st. imo calculix is way more pressing.
<caveman> i guess opengles would allow the display of more detailed polygons?
<buZz> no
<buZz> opengles just isnt opengl
<buZz> so not compatible as-is
<buZz> gl4es can sitbetween to translate, but its slow
<caveman> no biggie. i want calculix.
<buZz> native will be a lot faster
caveman has quit [Quit: rebooting..]
caveman has joined #openscad
caveman has quit [Client Quit]
caveman has joined #openscad
<caveman> yay. now openscad is using adwaita-dark, and editor is neovim.
<caveman> is there any way in the settings to make openscad open a file by default?
<caveman> since i use an external editor (neovim), i disabled the built-in editor in openscad. i'm running it by `openscad lel.scad`, then using neovim to edit lel.scad.
<caveman> but i also want to detach the other ui elements of openscad, so that openscad only has the 3D view port.
<Scopeuk> caveman the view menu lets you turn off most of their elements
<Scopeuk> S/their/the
<caveman> yeah. that's nice. but how i see 'console' or 'error-log' outside of the gui?
<Scopeuk> I'm not sure there currently is a way to have the UI with the console going to terminal. I believe you can undock and position the UI console however which might let you get close
<caveman> would be nice if it just prints to stderr/stdout when you run openscad.
<Scopeuk> It's potentially a nice option but it does break standard GUI application norms when launching from a terminal where the app launches and blocks but outputs to screen
<caveman> ok, then let it not block, but write to a pipe, or a temp file. then let the user tail it.
<Scopeuk> I believe the windows.exe mY behave like that if directly launched avoiding the com wrapper. To my knowledge the Linux version can't be made to do it as it stands. You might be able to make the modification to the source I think the logging is fairly well centralised
<caveman> are you on windows?
<Scopeuk> There are definitely solutions but nothing we currently have
<Scopeuk> I am but not currently at desktop. The wrapper is specifically to handle cli Vs gui behaviours on windows
<caveman> '.exe'. ew.
<caveman> what i say doesn't break any norms. you can double click on your '.exe', or shortcuts to it, and have it run 'normally'.
<caveman> it could be just a flag. e.g. --console-output-path=....
<caveman> same with error log.
<caveman> this way, i can re-use my other better apps for the purpose i want, and keep the gui only for the 3d view.
<caveman> this way, i can use more pixels in my monitor to see 3d stuff.
<Scopeuk> Your other option would be something like https://github.com/fstl-app/fstl and to integrate the openscad cli command into your preferred ide to generate the stl
<Scopeuk> Which would let you capture console in ide
<caveman> is there anything useful said in console?
<Scopeuk> Any syntax errors/warnings and some model info/manifold warnings
<Scopeuk> Your intent to see it above implied you were already aware of it's use
<Scopeuk> S/it's/its
<caveman> will it be useful if i use fstl?
<caveman> yes, but your suggestion on fstl confused me, as it potentially seemed to imply that there would be no use of openscad's console.
<caveman> if openscad's console output is still useful, then why did you suggest me to use fstl?
<InPhase> caveman: See this script: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#I_don't_like_the_editor,_can_I_use_my_favourite_editor_instead?
<InPhase> caveman: You can replace that "vim" with "nvim" in your own copy of the script.
<InPhase> (Note there are two lines to update.)
<InPhase> caveman: That is my own script that I use regularly, so I will vouch for its high level of convenience for Linux use, especially if you are a person who likes to navigate files from the terminal.
<Scopeuk> caveman fatl would replace only the 3d display portion with your ide invoking openscad "myfile" -o myfile.stl. it is likely InPhase has a better solution for you posted above
<InPhase> caveman: I have mine named "scadvim" for good tab completion after "scad". Then I have a few other variants of the script for opening other versions of OpenSCAD, like my master branch build, for when I want the latest features.
<InPhase> caveman: On my system "mas" tab completes to masterscadvim nicely.
<Scopeuk> Master scad vim sounds like an oss enthusiast themed privateer
<caveman> InPhase: nice. where does the openscad console show?
<InPhase> caveman: That ulimit line in the script is optional, but it provides benefits if you are ever playing with deep recursion, as it extends how deep you can go recursively when tail optimization hasn't kicked in for a particular function.
<InPhase> caveman: The normal place in the gui?
<caveman> i don't want it there. i want the gui to be only the 3d view, and the rest to be dumped in terminal.
<InPhase> caveman: Well you can adjust the gui, including doing things like hiding the console under the settings in the Window tab. But you really shouldn't... The console contains all of your error messages, and you WILL have error messages. It's a programming language. :)
<caveman> i already found that i can use vim/neovim to replace the editor, by simply writing to the .scad file opened in openscad. my problem is the console and the error log.
<InPhase> caveman: You can also adjust the sizes of ever element. The Qt interface is setup so that you can change the relative sizes of all widgets, and you can also move them around and separate them as external windows.
<caveman> having --console-output=FILE would solve it. if we set FILE to -, it'd be stdout.
<caveman> yeah, seen the undocking.
<InPhase> caveman: So you can customize the layout pretty well by just manipulating the elements and changing the sizes. I typically have the display window for the model occupying most of my screen. But I don't remove the console because you really need that feedback.
<InPhase> I only occasionally hide it temporarily.
<caveman> can i change the layout permanently? e.g. place where overview, error, console tabs are shown?
<InPhase> It should save your layout changes to the config file and restore them at the next open, yes.
<InPhase> If you mess up, deleting the config file will restore things.
<caveman> i don't see it remember their locations. it seems to only remember whether they're shown (or docked).
<InPhase> Well you might have multiple copies open?
<InPhase> Sometimes they fight with each other to overwrite the config file. :)
<InPhase> But it does keep the layout changes.
<caveman> any idea where the layout changes are supposed to be saved? ~/.config/OpenSCAD/OpenSCAD.conf?
<InPhase> Yeah.
<caveman> i don't see any changes there when i drag-drop ui elements around.
<InPhase> Yes, when you close the program though.
<caveman> oo. it did.
<caveman> buggy. i only noticed md5sum change, but nothing real.
* caveman gives up
<InPhase> It's in the binary section at the end. The layout part is not human readable.
<InPhase> But it's in there.
<caveman> my openscad.conf is fully text.
<InPhase> Look at [window] state=
<caveman> no such section
<caveman> i'm not in kde. i wonder if it's due to me lacking some run-time.
<InPhase> This does not require kde.
<InPhase> If you pastebin your entire conf file I can look at it and see if there's an issue.
<InPhase> You could remove the [General] section if you want to obscure your username.
<InPhase> You do seem to be missing a few sections.
<caveman> gentoo here. i wonder if it's due to the package maintainer putting some features in another USE flag that i forgot to activate. i also have the same problem with freecad.
<caveman> (positions of freecad's ui elements are not remembered)
<InPhase> Well, how about trying the AppImage to see if the package manager messed something up.
<InPhase> The AppImages are very good for OpenSCAD, and self-contained.
<InPhase> Plus you can get both the release and the nightly, to get access to both featuresets.
* caveman downloading appimage
<caveman> side note: i notice that images on the website lack console/error sub-windows open [1]. i wonder why? are they disabled because their output is not important? or do they follow a different cycle to develop their shapes? [1] https://www.openscad.org/images/appdata-screenshot-1.png
<Scopeuk> caveman I believe by default the console is hidden on first load untill there is a warning or error. It then displays
<caveman> oo. with the app-image version, there is a [window] section.
<caveman> i must be lacking some dependencies.
<caveman> thanks a lot. highly appreciated. apologies for wasting your time (i'm sure you had more important things)
<InPhase> caveman: It is true I have a life. ;) But promoting programmatic CAD approaches is also something I value.
<InPhase> As for that example in the image, that is a truly ancient screenshot.
<InPhase> caveman: Probably a decade or so ago.
<InPhase> But most likely the console was temporarily hidden to make a more compact screenshot of "interesting bits".
<InPhase> caveman: I adjust the sizes dynamically to fit each thing I'm working on, but this is generally what my layout looks like for my workflow, reopening the model I was editing yesterday: https://i.imgur.com/KJl6kth.png
<InPhase> caveman: I think it is a particularly optimal approach.
<InPhase> Really the only thing I'm missing is tooltip popups in the built-in editor, but I have zero need for them. If I forget any syntax, I pop open the cheatsheet on the web that I have bookmarked.
<InPhase> cheatsheet?
* InPhase pokes the bot.
<InPhase> tutorial?
<InPhase> This cheatsheet: https://openscad.org/cheatsheet/
<InPhase> There aren't really too many commands though, so it doesn't take a lot of openscad usage to remember the syntax.
<InPhase> Few languages can fit all of the key built-in call syntax on one page like that. :)
<caveman> oo. so your side-vim looks like an undocked editor (except being the best editor in existence)
<InPhase> Right.
<caveman> have you considered to adopt the dark adwaitia qt theme? it'd make the whole thing look 'tactical' :)
<InPhase> Sometimes I adjust the windows so they are truly side-by-side, but usually I keep a slight size overlap and tab between them to get a slightly bigger view, but still see "most" of the window. My editor width is about 40% of the screen width.
<InPhase> I do like dark themes, but there are certain programs that don't work too well with dark themes. So mostly I pick the darker themes selectively in things that are designed well for them, and for things I spend my time staring at. So my view window is dark, and my source code theme is dark.
<caveman> you can set the theme per app using a variable. e.g. in your shell script, that starts that scadvim app, you may set: QT_STYLE_OVERRIDE=adwaita-dark. then it'd be only for the 'scadvim' app.
<caveman> here is how it'd look like in adwatia-dark https://i.imgur.com/x8v4FNF.jpg
<InPhase> Hmm. Well, that did not work.
<caveman> tried just:
<caveman> QT_STYLE_OVERRIDE=adwaita-dark openscad
<caveman> in shell?
<caveman> maybe you should add 'export' keyword? i tested it in shell, by manually typing, and it worked. i use 'fish' shell.
<InPhase> Yep. "QApplication: invalid style override 'adwaita-dark' passed, ignoring it. Available styles: Windows, Fusion"
<InPhase> Although I otherwise do have adwaita-dark installed. I see it under the system level Appearances tab.
<caveman> maybe adwaita-dark is not installed?
<InPhase> But maybe not the qt portion of it.
<InPhase> I see there is a package for it.
<caveman> i also use i3 with transparent-ish terminals. when i stack, or tab, windows atop one another, the neat thing is that i can see through the transparency. this see-through is really nice as it allows me to know if some error popped out in other windows behind the terminal. essentially, see-through doubles the utility per pixel to see multiple windows at a time. really neat.
<InPhase> adwaita-qt
<caveman> the problem with 100% opacity is that most windows show blank/solid colours, which are useless, and simply waste pixels. when they're set to be transparent-ish, we can at least see through these otherwise-solid areas.
<InPhase> https://i.imgur.com/XkbZkYC.png That technically works, but to my eyes that's a bit of an eyesore with the external layout clashing.
<InPhase> It would require a more comprehensive treatment to have a layout that matches with that.
<InPhase> A project for another distant day. :)
<caveman> now, the next mission is to delete the useless window frames, by adopting a better window manager, such as i3.
<InPhase> When I settled on my current color schemes, most programs did NOT mesh well with dark themes. Now it is growing more popular though.
<InPhase> So one of these days I'll need to try to find another set of all the themes that goes together.
<caveman> imo white backgrounds is an ancient mistake that started as people wanted to copy the look of reading from a paper. but this didn't make sense, as the reason inks are black on white papers is for a different reason (inks don't emit light, so it's easier to make the paper white).
<InPhase> Certainly agreed.
<InPhase> It is most critical to me for text reading, so my IRC and messaging and source code editing programs are all dark themed.
<InPhase> The web is resistant to adopting dark themes though, so I just suffer through their errors.
<InPhase> And most email clients do not work well with it.
<caveman> yeah. they're slowly changing, but not fast enough. nowadays most key android apps come with night mode; so phone apps are almost solved.
<InPhase> And I made up that "Nocturnal Gem" theme for the 3D display of OpenSCAD that you see in my screenshots. I still need to get around to making a PR to share that theme.
<caveman> in my web browser, i have set it up to indicate to web servers that it connects to that i prefer dark themes. it works with some famous sites, like youtube, google, duckduckgo, etc.
<InPhase> My unbiased (okay, biased, but I think correct) view is that Nocturnal Gem should be our new default theme. :)
<InPhase> Yellow on white is a much uglier default in comparison.
epony has joined #openscad
<caveman> noctarial theme, includes icons?
<caveman> your icons seem a lot more usable than mine. e.g. the +X, -X, -Y, +Z, -Z (instead of ambiguous names, like left, right, top, bottom)
<InPhase> Oh, that part is the master branch, which you would see with the Nightly AppImage version.
<InPhase> We updated those icons.
<caveman> neat.
<InPhase> I advocated specifically for those label changes as more unambiguous.
<caveman> thanks.
<caveman> or, we change the coordinate labels into 'top, bottom, ...' :-p
<caveman> top+, top-
<InPhase> It's super easy to get turned around when navigating views. :)
teepee has quit [Remote host closed the connection]
califax has quit [Read error: Connection reset by peer]
fling has quit [Remote host closed the connection]
califax has joined #openscad
fling has joined #openscad
teepee has joined #openscad
* caveman just discovered https://prepomax.fs.um.si/
fling has quit [Ping timeout: 255 seconds]
fling has joined #openscad
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
<caveman> does anyone use openscad to create buildings? e.g. like autocad?
<caveman> does openscad have sheets?
<caveman> something like this: https://wiki.freecad.org/SheetMetal_Workbench
<Scopeuk> you can work in 2d but there is no sheet metal specific stuff (bending/forming etc)
<caveman> i want to make a 3D shape, then flatten it into a sheet with proper cuts. then send the flattened version to a laser cutter workshop to cut aluminium sheets for me.
<InPhase> There is no intrinsic support for unwrapping the surfaces into sheets. There is a projection operator for creating 2D projections, which can both cut and smoosh, but it is not designed to do automatic surface extraction. That's a bit out of spec, and isn't actually very well defined after meshes have undergone transformations. Surfaces might "look" planar, and yet not be, due to floating point
<InPhase> properties under treatment by the transcendental trig functions.
<InPhase> There are however people who do 2D designs in OpenSCAD for sheet metal cutting, and then have a separate model for extruding to a sheet metal thickness and then assemble in place to model the final design. Using modules and having the code represent the assembly process is the proper direction for when you want to do this.
<InPhase> Basically, match up to your end process, and then the information is there under your control as the implementer.
<Scopeuk> https://github.com/bmsleight/lasercut it he closest thing that comes to mind, that is really designed arround flat sheet cutting however
<caveman> say i make a large cylinder (hollow; just the wall part, without top/down circle plates). then i project a cylindrical hole into its wall (e.g. imagine i'd be putting a light bulb there). my goal is to unwrap this cylinder to see a sheet with the hole in it. when i unwrap it, the hole will not look a circle.
<caveman> i think such things are called 'sheet metal' in normal cad apps.
<InPhase> The language will not do that operation for you.
<caveman> no unwrapping operation?
<InPhase> No, the notion doesn't even exist of unwrapping volumes. There is no clear way to define it.
<caveman> 1. put 'ink' on cylinder (with holes). 2. roll cylinder on a white paper. 3. look at fingerprint; this is the unwrapped.
<InPhase> Yeah, now do that for a sphere. :)
<InPhase> It's not the easy cases that are hard. It's that you add a feature and you have to handle all cases.
<caveman> sphere? will be a line.
<InPhase> You think someone unwrapping a sphere expects a line?
<caveman> no. but it's easy: repeat it for more lines, each time a different circumference.
<InPhase> What do you get when you unwrap an upside down 5-sided 1 bottom pyramid?
<caveman> so, this 'unwrap' feature will basically roll the final around to find its fingerprint. the user will define axis for this rolling.
<caveman> 5-side 1-bottom pyramid.. it will be a bumpy rolling. similar to using a driving a car with a square tire. but, i think, that's all about it: a bumpy ride.
<InPhase> caveman: You're inserting intuition differently for each shape, which is a normal human response, but that means a different algorithmic definition for each shape.
<InPhase> And that does not lead to an implementation.
<InPhase> But, there's a solution to that!
<InPhase> The human works the other direction. :)
<caveman> no-no. it's the same unified intuition. basically, i'm thinking that the unwrapping function would expect the user to manually define the rolling axis. this way, we roll whatever we want and create whatever fingerprint as per the rolling axises.
<InPhase> Make the pyramid sheets, and assemble them, instead of make a pyramid and expect the program to intuit the user's expectations.
<caveman> for simple shapes, yes. but there are some shapes that are too hard this way, but easy the other way.
<InPhase> There's no single axis for the 5 sided pyramid shape.
<caveman> yes. i never said a single axis. it'd be similar to animations, by which we perform multiple rollings, each time with a different axis. ultimately, we get a long fingerprint of all the rolls.
<InPhase> You would need a different coordinate system to even define it. And sure, in this case maybe a spherical coordinate system could approximate this. But then we deform the pyramid by a VERY small amount, and now it doesn't line up to that coordinate system.
<InPhase> So now we need the user to be able to calculate some mathematically intense trajectories, which could get a little wild over complex shapes. It'd actually be easier for the user to assemble things in the other direction by adopting that mindset.
<InPhase> And remember, all of these trajectories are only going to be floating point approximations, so the program would still have to guess what counts as "close enough" to what the user intended. Which is kind of a mess.
<InPhase> But, I assure you that's not me trying to be difficult. This is the gauntlet we put feature proposals through to make sure they are generalizable and self-consistent. There is a method to this madness, and it keeps the language's self-consistency strong. :)
<InPhase> (Out for a bit making lunch for the kids.)
<caveman> not sure. e.g. we could ask the user to define the magic fingerprint sheet. then, behind the object put some magic x-ray emitter that forces the object to be printed on the magic fingerprint sheet. the user defines 2 things:
<caveman> (1) location and orientation of magic fingerprint sheet.
<caveman> (2) location and orientation of magic x-ray emitter.
<caveman> and probably:
<caveman> (3) define a boundary on the object after which it'd be exempt from the magic x-ray.
<caveman> oo. kindly ask the kids what do they think about this problem. :-p. sometimes kids say useful things.
<caveman> ``hey, there is this app that has no unrolling feature. any idea how to do it? it'd be handy for working with sheet metal and laser printing later on''
<caveman> ``we, oldies, are failing. thought you, young souls, may help us''
<juri_> #hplusroadmap #transhumanism #pleasegodsaveus
<juri_> ;)
<caveman> i think we can achieve a universal unwrapper by modelling the process using magic-x-ray source and magic-print-sheet.
<caveman> then we animate the parts to get the 'scan' going.
<caveman> or, when we create shapes, we define their material. if we define them as 'sheet', then only sheet-friendly operations will be applied on them. so that unwrapping them is easy.
<caveman> basically, a sheet can only bend in 1 axis.
fling has quit [Remote host closed the connection]
fling has joined #openscad
<lf94> InPhase: any luck on manifold's sdf stuff
snaked has quit [Quit: Leaving]
<InPhase> caveman: We really only have one mechanism for defining a volume by iterating its surface list, and that's the polyhedron call. It is generally regarded as very challenging for users.
<InPhase> caveman: I wrote an entire library just to wrap the polyhedron call to make it easier. But, fundamentally, I think specifying sheets as surfaces of a volume is a misguided notion. It is better to specify sheets as volumes themselves, so that you can actually model the connectors and tabs and such explicitly.
<InPhase> Or if you need sheet metal bent, explicitly model as volumes the bent sheet.
<InPhase> There will be approaches good for the object, and bad for the object, and the user should design that all out.
<caveman> my problem is that, i'm designing a bumper for a car. the bumper has curves. then, i have to make a few round circular holes in it, in order to fit lights. if i unwrap this sheet, the light holes would not be 'circular' but some odd elliptical one.
<caveman> if i design it forward, as you suggest, then i'd have to cut elliptical holes on the sheet (instead of circular).
<caveman> (assuming i understood your point)
<InPhase> Perfectly circular is moderately straightforward to calculate, but is it actually perfectly circular?
<InPhase> Or is it a non-uniform curve in the first place?
<caveman> the lights? yes. they're circular from 'front'. but, if you see it from the sides, then they are elliptical.
<InPhase> No, I mean the bent surface that you are "cutting" the circle into.
<caveman> the surface is not cut circularly. but it looks circular from the front, only after the surface is bent to its final form.
<InPhase> Is the surface it's being cut into planar or curved?
<caveman> e.g. this light hole looks like a perfect circle from the front, but looks elliptical from the sides: https://www.carid.com/images/replace/bumpers/fo1039107.jpg
<InPhase> At final installation.
<InPhase> Yeah, I get that part. :)
<caveman> the cutting is on a flat sheet. then i bend it for the final installation.
<InPhase> Bend it into what geometry?
<caveman> bend it into a curve to wrap around the bumper.
<InPhase> Do you have a mathematical definition for this bend?
<caveman> yes. some kind of polynomial
<InPhase> Do you know it?
<InPhase> Or are you planning on trying a few until it looks right?
<caveman> not yet. but i plan to measure it. it's easy: i'll take points, then interpolate it into a polynomial.
<caveman> it'd look like a smile ")", except a bit fat/wide.
<caveman> a hybrid between ] and ).
<InPhase> Because you can calculate this shape. It just requires you to determine the arc length along the surface.
<caveman> yeah. i find this hard. i hope the app the unwrap it for me. :-p.
<caveman> because, i may not only project circles onto the polynomially-curved sheet, but potentially other shapes.
<caveman> to understand your point: are you suggesting that i better calculate the unwrapping manually with openscad?
<InPhase> I see the reason for the desire. :) Although it's a particular niche application that has not been pre-done. Although the math is not too hard to do numerically. The simplest will just be to do a numeric sum along the arc length in small steps.
<InPhase> And each step of the arc length is just the pythagorean formula of the x step and the y step.
<InPhase> So as soon as you have y(x) you can sum this up and get your points for the hole.
<caveman> i think this is why cad apps have 'metal sheet' modules? because there are lots of people that want to do such tasks?
<InPhase> Perhaps, although OpenSCAD grew up in the 3D printing world.
<InPhase> You would not do this if you were getting your part metal printed.
<InPhase> Which, you can do. There are services that will do that.
<caveman> imo you'd. e.g. some 3d printing people may print a sheet, with the intention of using a bendable filament.
<InPhase> In theory, although I haven't heard a story yet of someone hitting that problem. So it'd a rare sort of issue to hit in the printing world.
<InPhase> it'd be
<InPhase> Or it's
<caveman> since openscad is modelling everything as a mesh, and since we can mathematically define a 'sheet' or 'surface' as a thing that can have curvature only in 1 axis, then, i think, we can have a function in openscad that unwraps any mesh? e.g. we just draw lines where we permit cutting, then let openscad slice and unwrap?
<InPhase> Well for the above reasons unwrapping is not clearly defined in general cases. In your case you have a single well defined scenario. But that would be easy enough to address with a library.
<caveman> are these enough holes for enough exhausts for more speeds? https://i36.photobucket.com/albums/e38/fievel1320/100_1127.jpg
<InPhase> I don't think those are for exhausts. I saw that sort of thing on some of the Bond cars.
<InPhase> This is where your rockets come out.
<caveman> lel.
<caveman> 1 car like that, would solve the ukranianian crisis.
<caveman> here is the universal unwrapping workflow that i imagine: (1) user defines regions on the object where openscad is permitted to slice. (2) openscad then tries to flatten the meshes such as it uncurves them in 1 axis. (3) if openscad finds a surface/part that is not flattened by unwrapping in 1 axis, then it throws an error.
<caveman> (4) user must slice most parts, until every part is unwrappable in 1 axis.
<caveman> i must say: i /really/ like the ui idea of openscad and how lightweight and responsive it is. it's so amazing that my brain constantly wishes if openscad becomes a complete replacement of every 'cad' task.
<InPhase> Well there's no such thing as an axis definition for this. Although one could define a series of edges in a polyhedral input.
<InPhase> But that would be a major modification to what is tracked about objects through transformations, and it would disappear under some transformations, so it is not guaranteed to stay working.
<InPhase> For example, if you define an edge sequence to unwrap, and then do a minkoswki or a hull, the definition is gone.
Av8r has quit [Ping timeout: 255 seconds]
<caveman> any idea how to other 'pro' apps do it? e.g. solidworks, onshape, etc?
<InPhase> Probably by having a special type of feature in the model which is then limited in what it can do.
<InPhase> This is a guess, but I doubt there would be another way to do it.
<caveman> after creating a mesh object in openscad (e.g. booleaning stuff, etc), then, is it possible for telling scad ``this surface''?
<InPhase> No, there is no mechanism for this.
<caveman> because it's all triangles in a 3D space?
<InPhase> There is a PR for extracting the lists of vertices and facets back into the compute part of the code, but it's just vertices and edges.
<InPhase> I mean, vertices and facets.
hyperair has quit [Ping timeout: 248 seconds]
<InPhase> And "facets" instead of triangles, because surface pieces can have an arbitrary number of vertices. (Up until you export to stl, which supports only triangles.)
<caveman> a vertex is a point, an edge is a line. these create a surface that looks like a triangle. is this individual triangular surface called 'facet'? or is 'facet' the collection of such triangular surfaces that form a larger surface made of little triangular surfaces?
<caveman> or, none (3rd option)?
<InPhase> A facet is a triangle, a quad, or a 5-sided polygon on the surface, etc.
<caveman> oo. so it's the individual triangular surface (in my description).
<InPhase> Yeah, except not always triangles.
<InPhase> A square face can be 2 facets as triangles, or 1 facet as a quad.
<caveman> yes.
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
hyperair has joined #openscad
<caveman> imo i have a trivial algorithm.
<caveman> 1. select a starting point on the object. this point would be falling somewhere on a facet.
<caveman> 2. select a polarity/axis for that point.
<caveman> 3. the algorithm will try to rotate the nearby facets until their curvature is zero in reference to the facet that user selected as the starting point. all rotations must be strictly in the chosen polarity/axis
<caveman> 4. when the algorithm hits a facet that cannot be rotated in the selected polarity/axis, it stops, and marks that problematic facet as 'end' or 'boundary'.
<caveman> 5. now we have a single surface defined, with its boundaries.
Av8r has joined #openscad
Av8r has quit [Quit: Connection closed]
guso7834 has joined #openscad
guso7834 has quit [Client Quit]
pa has quit [Ping timeout: 252 seconds]
pah has joined #openscad
guso78 has quit [Quit: Client closed]
caveman has quit [Ping timeout: 255 seconds]
caveman has joined #openscad
<gbruno> [github] thehans edited issue #2364 (Add Github-specific guidelines and templates) https://github.com/openscad/openscad/issues/2364
<lf94> sounds complicated
<linext> is it possible to linear extrude a circle?
<linext> if not, what's the command to give a circle height?
<Scopeuk> Cylinder(d=<dia>,h=<height>) or linear 3xtrude should work for any 2d shape
<linext> ah, yes i was doing h= instead of height=
<linext> is there a command to center the output of a module?
<Scopeuk> Module no, most built ins yes, ,center=true added to most params
<InPhase> linext: Center I had trouble with, but I came up with a robust "move extremely close to the origin" hack.
<InPhase> linext: Okay... The hack doesn't work on the master branch anymore...
snaked has joined #openscad
<linext> i just exported as SVG, then imported
<InPhase> I'm now busy tracking down why the hack doesn't work. It was a really cheap hack, but this looks like a regression...
castaway has quit [Ping timeout: 240 seconds]
KimK_ is now known as KimK
foul_owl has joined #openscad
la1yv_a has joined #openscad
<joseph_> I have a few questions about the edits to my 2022 GSoC PR that kintel proposed earlier. Should I make changes directly on the existing branch or create a new one so it's clear where last year's GSoC work ended? Secondly, it would help to know whether teepee (or others) are planning to use my completion of that feature as a "prerequisite" deciding factor on my 2023 application. I expect it would be challenging to get it all ready
<joseph_> before May 4th given that I'm currently busy with three major term projects
la1yv has quit [Ping timeout: 255 seconds]
la1yv_a is now known as la1yv
<InPhase> Definitely a regression in master of some sort... I have a test passing the testing, but failing in gui.
<InPhase> Once I whittled my hack down sufficiently, I realized it overlapped one of our tests!
<InPhase> Time to mess with settings.
<InPhase> fast-csg it is.