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
ToAruShiroiNeko has quit [Read error: Connection reset by peer]
ToAruShiroiNeko has joined #openscad
mmu_man has quit [Ping timeout: 245 seconds]
J25k98 has joined #openscad
J25k78 has quit [Ping timeout: 272 seconds]
bitbasher has quit [Ping timeout: 252 seconds]
Guest8 has quit [Quit: Client closed]
snakedGT has joined #openscad
snaked has quit [Ping timeout: 260 seconds]
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
guso78k has quit [Quit: Client closed]
teepee has quit [Ping timeout: 244 seconds]
val has quit [Ping timeout: 268 seconds]
val has joined #openscad
<gbruno> [github] RedKrieg opened issue #5999 (Python venv created with AppImage can't be activated and used from CLI) https://github.com/openscad/openscad/issues/5999
<gbruno> [github] kintel opened pull request #6000 (Add gemini code review options) https://github.com/openscad/openscad/pull/6000
<gbruno> [github] kintel closed pull request #6000 (Add gemini code review options) https://github.com/openscad/openscad/pull/6000
sculptor_ has joined #openscad
sculptor_ has quit [Changing host]
sculptor_ has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
teepee has joined #openscad
sculptor has quit [Ping timeout: 248 seconds]
kow__ has quit [Ping timeout: 252 seconds]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
sculptor_ has quit [Quit: Leaving]
sbts has joined #openscad
<sbts> Hi All, is anyone aware of a way to test if a file exists, or use a simple cube if an STL import fails?
guso78k has joined #openscad
pkriens has joined #openscad
krushia has quit [Quit: Konversation germinated!]
sbts has quit [Quit: Client closed]
fling has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
califax has quit [Quit: ZNC 1.8.2 - https://znc.in]
fling has joined #openscad
califax has joined #openscad
teepee has quit [Ping timeout: 244 seconds]
teepee has joined #openscad
guso78k has quit [Quit: Client closed]
mmu_man has joined #openscad
<J25k98> guess you need to detect that file from the OS and then call conditionally the scad via command prompt
<J25k98> there is no internal parameter so you need to set this from an external source
<J25k98> Often is is better to ask for a workflow solution instead of  try to make scad follow your workflow idea.
sbts has joined #openscad
<sbts> J25k98 Thanks for the response, I'm a hardware/software design guy who has been using OpenSCAD for a lot of years, but never had cause to import STL's before.
<sbts> I currently have a model that may, or may not, have an STL available as an element for "display" purposes.
<sbts> If the STL is not available, I want to replace it with a simple placeholder cube.
<sbts> Hopefully that explains why I asked the question in the way I did.
<sbts> FYI, I'm not on my normal machine, and am using the libera web client which seems to drop out.
<sbts> I've got to monitor the logs to see your reply, so I apologize for any delays.
<J25k98> sbts  but somewhere it is decided if an STL is created?
<J25k98> i mean you will get a warning if you try to open an non existing file
hyperair has quit [Ping timeout: 265 seconds]
<J25k98> there is some experimental stuff where maybe it is possible to check if an object is there but not in the nightly
bitbasher has joined #openscad
bitbasher has quit [Changing host]
bitbasher has joined #openscad
<sbts> The STL may or may not exist, for a variety of reasons, the OpenSCAD file is a model, but will be duplicated into new directories, and customized, potentially with a different STL, or no STL.
<sbts> If there is no STL, then it needs to be replaced with a simple block to maintain the integrity of the model for printing.
<sbts> The simplest example would be the STL is a particular type of mounting mechanism and the model is an enclosure.
<sbts> If there is no STL, then the model just needs the hole closed (ie: a solid wall)
<sbts> If there is an STL, it may be a DIN rail mount, or a QuadLock mount, or something else entirely
pkriens has quit [Ping timeout: 272 seconds]
<sbts> I am aware it can be handled by modifying the OpenSCAD script, possibly with parameters.
<sbts> The idea is to make it as "hands off" as possible
pkriens has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 244 seconds]
teepee_ is now known as teepee
pkriens_ has joined #openscad
sbts has quit [Ping timeout: 272 seconds]
bitbasher has quit [Ping timeout: 260 seconds]
<J25k98> @sbts easiest is to create always an stl - if not the model then with the placeholder.
snakedGT has quit [Quit: Leaving]
mmu_man has quit [Ping timeout: 268 seconds]
mmu_man has joined #openscad
<crazy_imp> sbts: isn't the `-D foo=bar` flag what you are looking for? just use an external script to loop over all the stls you may want to use including the placeholder, pass them as variable argument into the openscad model, dump the resulting stl and now you have all variants
mmu_man has quit [Ping timeout: 248 seconds]
pkriens_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pkriens has quit [Ping timeout: 272 seconds]
pkriens has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
mmu_man has joined #openscad
mmu_man has quit [Ping timeout: 248 seconds]
<gbruno> [github] Sparsh-N edited pull request #5984 ([Draft] Add search path and initial changes for MSVC based headless build support.) https://github.com/openscad/openscad/pull/5984
<gbruno> [github] Sparsh-N edited pull request #5984 ([Draft] Add search path and initial changes for MSVC based headless build support.) https://github.com/openscad/openscad/pull/5984
<gbruno> [github] Sparsh-N synchronize pull request #5984 ([Draft] Add search path and initial changes for MSVC based headless build support.) https://github.com/openscad/openscad/pull/5984
hyperair has joined #openscad
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
othx has quit [Read error: Connection reset by peer]
othx has joined #openscad
hisacro has quit [Ping timeout: 252 seconds]
mmu_man has joined #openscad
califax has quit [Remote host closed the connection]
hisacro has joined #openscad
califax has joined #openscad
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
cart_man has joined #openscad
<cart_man> What is the easiet way to visualize a sign wave on a 2d cube? I can imagen it is using Polygons. Just not sure bow.
califax has quit [Remote host closed the connection]
califax has joined #openscad
<buZz> a sine wave i guess? :D
<buZz> you could import a drawing of that and linear_extrude it to difference out of your cube, or something
<buZz> i'd say thats a easier route vs making it all in openscad
<buZz> but both are possible i guess
califax has quit [Remote host closed the connection]
califax has joined #openscad
<InPhase> cart_man: There are multiple things one can mean by a sine wave on a 2D cube. Which of those do you have in mind?
<InPhase> cart_man: Like a sine wave going in one direction on top of the cube? A radial sinusoidal wave on top? Sinusoidal-like 2D texturing on all surfaces?
<InPhase> cart_man: And what do you really mean by "2D cube" since that's a contradiction? Do you just mean a fairly flat cube?
<InPhase> cart_man: If you scroll to my example image here, one in the back right is a 2-slit interference pattern on top of a fairly flat cube: https://github.com/rcolyer/plot-function
<cart_man> InPhase: So a while ago there was some code I saw that had a 2d rectangle and a "differenced" sinewave polygon onto it. So the 2d rectangle now was sine wave cut out.
<cart_man> InPhase: Whow okI have never seen this library
<cart_man> InPhase: No this specific example was really just a 2d Rectangle with the polygon of a since wave "differenced" on it
<buZz> a 2d rectangle is almost a cube ;)
califax has quit [Remote host closed the connection]
<InPhase> cart_man: Like this? polygon([[30,0], [0,0], each [for (x=[0:0.5:30]) [x, 3+sin(x*5*360/30)]]]);
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
<cart_man> buZz: Lol yea
<gbruno> [github] gtoal opened issue #6001 (documentation suggestion: grammar for comments in .CSG files?) https://github.com/openscad/openscad/issues/6001
<cart_man> InPhase: Yes that was exactly it. I was wondering if it is possible to make that shape wrap itself around a cylinder SO that the cylinder end has this sinewave affect?
<cart_man> I realize this might be pretty hard to do. But that is because I am pretty bad at this
fling has quit [Remote host closed the connection]
fling has joined #openscad
califax_ has joined #openscad
califax has quit [Remote host closed the connection]
<InPhase> cart_man: Like this? $fa=1; $fs=0.4; rotate_extrude() polygon([[60,0], [0,0], each [for (x=[0:0.2:60]) [x, 100+3*cos(x*4.5*360/60)]]]);
califax_ is now known as califax
mmu_man has quit [Ping timeout: 248 seconds]
califax has quit [Remote host closed the connection]
mmu_man has joined #openscad
califax has joined #openscad
<cart_man> InPhase: Not quite
<cart_man> more something like this -> https://hastebin.com/share/lecixobeqo.javascript
<cart_man> Now I know that is fugly way of doing it which does not work
<cart_man> but It is just an example
<cart_man> So basically instead of a bunch of half cylinders taking out the chunks of the main cylinder. It will be the Sinewave form
<cart_man> InPhase: I hope that make sense
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
J25k98 has quit [Client Quit]
J25k98 has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
<InPhase> cart_man: Well that takes a little library help to do in a simple manner, but something like this perhaps? https://imgur.com/a/ZUjB6M1 https://bpa.st/PFYA
<InPhase> That's why I picked those three coordinate types for that library. A lot of things like this just fall out of those quite trivially.
bitbasher has joined #openscad
bitbasher has quit [Changing host]
bitbasher has joined #openscad
<InPhase> cart_man: This is an alternative approach to produce the same output, but right up front as a single polyhedron: https://bpa.st/33KQ It's more performant, but negligibly so for this particular model.
<InPhase> The majority I think would find the function plot easier to reason about in this instance. Although the CloseLoop call is more fundamentally flexible.
<cart_man> That is exactly what I want Thanks! This was done with the Lib you linked earlier?
Guest33 has joined #openscad
Guest33 has quit [Client Quit]
<InPhase> The first version. The second a different library.
mmu_man has quit [Ping timeout: 245 seconds]
teepee_ has joined #openscad
teepee has quit [Ping timeout: 244 seconds]
teepee_ is now known as teepee
sculptor has joined #openscad
sculptor has joined #openscad
sculptor has quit [Changing host]
<cart_man> InPhase: Btw if I wrap the first example in a module it crashes OpenSCad. WHy is that?
<InPhase> Crashes? Doubt it. But you can't hide that function. It will end up being undefined inside the module.
<InPhase> That particular library was written before the function literals developments. In lieu of having passable functions, it makes use of hard-coded function names, like PolarFunc1, and then one passes the index 1 for that one. And by "include" being used, the modules can access those functions at the top level of your scad file.
<InPhase> This was the best available at the time it was written, and it just hasn't been rewritten to pass in a function.
<cart_man> InPhase: https://bpa.st/7TOQ This basically
<cart_man> Hmmm alright
mmu_man has joined #openscad
guso78k has joined #openscad
<InPhase> cart_man: There. Now it supports function literals.
<InPhase> cart_man: Modify like this: https://bpa.st/I3DA but AFTER grabbing the latest version from github.
<InPhase> (as in from a few minutes ago)
mmu_man has quit [Ping timeout: 244 seconds]
<cart_man> InPhase: That did the trick yea! Thanks!
cart_man has quit [Quit: Konversation terminated!]
mmu_man has joined #openscad
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
J25k98 has quit [Quit: Client closed]
J25k98 has joined #openscad
bitbasher has quit [Ping timeout: 276 seconds]