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
fling has joined #openscad
J1A8411 has joined #openscad
J1A84 has quit [Ping timeout: 252 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
Azem has quit [Ping timeout: 255 seconds]
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #openscad
LordOfBikes has quit [Ping timeout: 276 seconds]
fling has quit [Ping timeout: 240 seconds]
fling has joined #openscad
feuerrot has joined #openscad
LordOfBikes has joined #openscad
nedko has quit [Ping timeout: 240 seconds]
Chillum2 has quit [Ping timeout: 255 seconds]
qeed has quit [Ping timeout: 255 seconds]
qeed has joined #openscad
Junxter has joined #openscad
qeed_ has joined #openscad
qeed has quit [Ping timeout: 256 seconds]
Junxter has quit [Read error: Connection reset by peer]
ur5us has quit [Ping timeout: 252 seconds]
marcus has quit [Ping timeout: 240 seconds]
marcus has joined #openscad
Guest8349 has joined #openscad
Guest8349 has quit [Client Quit]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
nedko has joined #openscad
Ckat has quit [Quit: this shouldn't be happening]
Ekho has quit [Remote host closed the connection]
fling has quit [Ping timeout: 240 seconds]
Ckat has joined #openscad
Ekho has joined #openscad
ur5us has joined #openscad
Azem has joined #openscad
KimK has joined #openscad
lastrodamo has joined #openscad
KimK has quit [Quit: Leaving]
nedko has quit [Ping timeout: 240 seconds]
fling has joined #openscad
ur5us has quit [Ping timeout: 250 seconds]
KimK has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
KimK has quit [Ping timeout: 255 seconds]
snaked has quit [Ping timeout: 240 seconds]
snakedGT has joined #openscad
teepee has quit [Remote host closed the connection]
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
teepee has joined #openscad
snakedGT has quit [Quit: Leaving]
teepee has quit [Ping timeout: 240 seconds]
teepee has joined #openscad
GNUmoon has quit [Remote host closed the connection]
GNUmoon has joined #openscad
drgerg has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
Guest77 has joined #openscad
Guest77 has quit [Client Quit]
hyperair has quit [Ping timeout: 256 seconds]
aiyion has quit [Ping timeout: 240 seconds]
hyperair has joined #openscad
aiyion has joined #openscad
J1A8411 has quit [Quit: Client closed]
J1A8411 has joined #openscad
teepee has quit [Remote host closed the connection]
J1A8411 has quit [Quit: Client closed]
J1A8411 has joined #openscad
teepee has joined #openscad
<teepee> oh, that's just a fixed STL
<teepee> also nice, pretty sure it's wrong license though
fling has quit [Ping timeout: 240 seconds]
fling has joined #openscad
<J1A8411> openSCAD compatible =  error free  Ü
<J1A8411> haha  https://www.3dbenchy.com/license/   ND   ..  and  Prusa  self uses SA BY
<J1A8411> and that "scad compatible"  has a terrible resolution and is remeshed and softened .. not just fixed
<J1A8411> But the best is that the original benchy is working in open SCAD (at least for me)
<InPhase> Step 2, a matching replica benchy.scad
<InPhase> An exact match of the hull shape would probably be the only tricky part, but it's not really that tough of a shape.
<J1A8411> the fillets inside of benchy would already cause me nightmares  to make in SCAD
fling has quit [Remote host closed the connection]
fling has joined #openscad
<InPhase> I suppose that presents some challenge.
<InPhase> Ideal would be a modifier parameter to union() to support those.
snaked has joined #openscad
pa has quit [Read error: Connection reset by peer]
pah has joined #openscad
<teepee> yeah, I wonder if the framework in the corefinement would allow that, so far I understand it reports cuts and such stuff, so it might be possible to find the connecting edges
<J1A8411> would be amazing union(r=5)
<ali1234> can be done with negative objects and minkowski, the same as how offset is used in 2d
<ali1234> unfortunately negative objects don't exist :)
<J1A8411> don't need negative objects for that .. but it is just slow
<teepee> https://github.com/TLC123/OpenSCAD_stuff has a pretty optimized version
<teepee> by accepting some limitations so it's not completely general
<ali1234> i don't understand how that works
<ali1234> why does it take the hull of the intersection of the children?
<ali1234> in any case the challenge is in making a negative offset that works in 3d, since minkowski is already the positive version
<ali1234> ah i see how it works now
<ali1234> repeated intersections rather than minkowski on a negative object
<ali1234> i have seen bugs where negative objects were accidentally created and it makes me wonder what would happen if i did that intentionally
<ali1234> eg negative() minkowski() { negative() cube(); negative() sphere(); } - this should result in a 3d negative offset
<ali1234> i guess it depends how smart (or not smart) CGAL is
snaked has quit [Ping timeout: 240 seconds]
<J1A8411> that benchy cant't be cut in half  ERROR: Rendering cancelled by exception Unauthorized intersections of constraints
<J1A8411> there are some areas when you cut them CGAL (and  fast-csg) get errors - that is anoying as i can't find issues with the 3mf/stl
<J1A8411> i guess that could be a bug
<J1A8411> try cut the XZ pane
<ali1234> if i want to hack how minkowski() works, where do i need to look in the source?
<ali1234> hmm i guess negative objects only exist in the preview and actual primitives cannot be negative
<J1A8411> CSG  the name excludes negative objects
<ali1234> i don't believe it has to
<J1A8411> SOLID
<ali1234> "solid" isn't really a rigorous term
<J1A8411> go ahead and try to rewrite https://en.wikipedia.org/wiki/Solid_modeling
<J1A8411> i mean you could argue with antimatter  Ü
<ali1234> nothing in CSG involves atoms
<J1A8411> why do you want atoms?
<J1A8411> btw.  atoms in CSG are much bigger in SCAD
<ali1234> negative objects are still bounded in every way that actually matters
<ali1234> the only difference is that the outside is finite instead of the inside
<J1A8411> which makes these objects "non existent" and that is  why you can't have them in CSG
<ali1234> not true at all
<J1A8411> btw:  if that is your definition of a negative object you could  write a module for that
<ali1234> it is not actually possible in openscad's current constraints
<ali1234> you can cheat it by saying difference(cube(100000000000000000000); children(););
<ali1234> but that isn't a truly negative object, it's just a very large object with a hole in it
KimK has joined #openscad
<J1A8411> an object that is inverted is not a solid and not a primitive  -  it is not watertight  or non-manifold
<ali1234> a negative object *is manifold* though
<J1A8411> you can construct polyhedrons with inside out ..   they just don't work
<ali1234> there is no reason why they can't work though
<ali1234> if they don't it is a limitation of the code, not the mathematics
<J1A8411> https://en.wikipedia.org/wiki/Manifold   you can't define things different just as it pleases you
<J1A8411> You sure can  have math that is dealing with them -  but it can't be CSG  by definition
<J1A8411> besides there is no benefit in having these objects
<J1A8411> all Boolean  operation would  need to work with voids   and  what should be the result of a union   of a normal with a negative body  because if your definition is an inverted object - the result would be infinit
<ali1234> the result would be a closed manifold with infinite "inside" and finite "outside"
<ali1234> which is the same as the definition of any negative object
<J1A8411> it just can't exist in the real world  -  you can't model a klein bottle in SCAD
<ali1234> that's an entirely different problem. also negative numbers don't exist in the real world and math doesn't have a problem with that
<J1A8411> numbers are an logical abstract they only exist in math  -  how should a number exist in the real world
<J1A8411> objects exist only as positv  in the real world
<ali1234> it can't. neither can a CSG cube, negative or otherwise
<J1A8411> sure a cube can exist  - that is why we can print CSG models
<ali1234> hilariously, roblox CSG of all things supports negative objects: https://developer.roblox.com/en-us/api-reference/class/NegateOperation
<J1A8411> we call this operation difference
<ali1234> yes
<ali1234> for union, intersection, difference, negative objects are not required, because there is always an equivalent operation involving negating some of the inputs
<J1A8411> so why do you want something that exist but with a stupid name -  that a gaming platform is using  and claim it is CSG
<ali1234> (and then possibly negating the result)
ur5us has joined #openscad
<ali1234> negative objects are interesting for minkowski because there the result can't be made without them
<J1A8411> not true
<ali1234> for example -minkowski(-a, b) would produce a positive object
<Scopeuk> I'm not entirely familiar with the underlying maths but you could use a varient which is a subtractive traversal using a postive object
<ali1234> where a and b are positive
<Scopeuk> so minkowski difference is a thing https://www.haroldserrano.com/blog/visualizing-the-gjk-collision-algorithm this is prehaps not overly surprising
<Scopeuk> no idea if its supported in any csg engine however
<ali1234> minkowski difference is something different
<ali1234> J1A8411: yes and look how much code it requires, plus it has to minkowski multiple times
<ali1234> and it makes a cheat negative object, like i described earlier
<ali1234> notice that you have to tell it how big your object is, or it fails
<ali1234> the alternative is to use minkowski to make an object larger than the input to hold the negative space, which then requires multiple minkoskis
<J1A8411> i just wait until you show that your id would work and be faster Ü .. good luck
<J1A8411> minkowski with a negative object would result in a smaller object  right?   .. so how do you get the size back - and not using another minkowski
<ali1234> minkowski with a positive object results in a larger object, you would get the size back the same way
snaked has joined #openscad
<J1A8411> your argument was  that it is "something different"   and  i showed you it is not .. and now you confirmed that .. so can we stop here ?
<ali1234> how can a larger object and a smaller object be the same object?
<J1A8411> you need the same number of minkowski operations -  same time  and  mathematical a sphere with flipped normals is the same sphere.  but this is about you twisting your arguments
<J1A8411> you said : "minkowski difference is something different"
<ali1234> minkowski difference is something different and wholly unrelated
<ali1234> minkowski difference means minkowski(a, mirror(b))
lastrodamo has quit [Quit: Leaving]
<ali1234> it's a completely different operation that has nothing to do with negative objects
<J1A8411> still negative objects have no benefit
ccox_ has quit [Ping timeout: 256 seconds]
ccox has joined #openscad
<ali1234> all existing implementations use fake negative objects. fake negative objects are strictly slower than real negative objects.
AnnaFlaxxis has joined #openscad
<AnnaFlaxxis> I spend a lot of time in bash. Is this possible in openscad?
<AnnaFlaxxis> ```
<AnnaFlaxxis> a = [1,2,3,$name];
<AnnaFlaxxis> b = [7,8,9,$name];
<AnnaFlaxxis> ```
<AnnaFlaxxis> Where a = [1,2,3,"a"] and b = [7,8,9,"b"]
<ali1234> you mean like, a variable that knows what name it was assigned to?
<AnnaFlaxxis> yes
<ali1234> i don't think that is possible
<AnnaFlaxxis> dang. I'm too optimized :D
<ali1234> i didn't even know what was possible in bash
<ali1234> *that
<AnnaFlaxxis> bash, python, powershell, one of those idk.
<ali1234> yeah it is possible in python
<J1A8411> you can use a function
<J1A8411> also it depends on the scope it is used  so $name can be different
<teepee> I don't see how a function would help, there's no introspection for variables or functions
<teepee> the only thing in that direction is the parent-module name thingy
<J1A8411> yes you can write a function that is evaluating the parent scope and change the variable
<teepee> but how would you get access to the name of the variable?
<J1A8411> you don't Ü ..  it would be the module
<AnnaFlaxxis> I want to do something like
<AnnaFlaxxis> ```
<AnnaFlaxxis> module thing(unit){
<AnnaFlaxxis>  cube([unit[0], unit[1], unit[2]);
<AnnaFlaxxis>  text(unit[3]);
<AnnaFlaxxis> }
<AnnaFlaxxis> for item in items: thing(item);
<AnnaFlaxxis> ```
<J1A8411> or you have to put it in an array
<teepee> hmm, why do you need a specific variable name then?
<teepee> data = [ [ [ 1, 2, 3], "a" ], [ [ 2, 3, 4], "b" ] ] ]; for (d = data) thing(d);
<J1A8411> if you call your module with the variables this works   thing(unit=[1,2,3,"cube"]);
<teepee> the extra nesting makes it cube(unit[0]); text(unit[1]);
<teepee> or without the nesting cube(unit.xyz) should also work with the snapshot version I think
<J1A8411> nice  that is new
<teepee> yeah, needs some polishing for the special cases of adding 0 or 1
<teepee> so you can say unit.xy0
<J1A8411> what  is the 0 replacing z?
<J1A8411> [x,y,0] ?
<teepee> yep, like a = [1, 2]; b = a.xy0; -> b = [1, 2, 0]
<J1A8411> so i can add   any number
<teepee> syntax problem is a.0xy as that conflicts with the existing parsing logic
<teepee> well, lexer actually which makes it more difficult to change
<J1A8411> but a.0 is not working (afaik)
<AnnaFlaxxis> dang it worked! What's the accepted pastebin for this channel?
<J1A8411> paste!
<J1A8411> but feel free to use what you like
<teepee> I've not seen one yet that's not acceptable, those are just the most commonly used
<AnnaFlaxxis> I'm trying to rearrange my room https://pastebin.com/v2bf94kV
<teepee> nice! and there's a cat tree, even better :)
<AnnaFlaxxis> I'll have to figure out how to add translate because they're all stacked, but not looping over things hurts my brain. Thanks!
<teepee> are you using the builtin editor?
<AnnaFlaxxis> vs code
<J1A8411> you can divide the vector  [x,y,z]/mod
<J1A8411> to scale
<AnnaFlaxxis> oooh nice
<J1A8411> or use scale
<teepee> ah, just wanted to point to ALT+Cursor keys while on a number for moving things around :)
<J1A8411> scale(.4)cube()
<teepee> I don't know if VSCode has that too
<teepee> looks like that's an emmet feature, no idea if that's always available
<AnnaFlaxxis> ```
<AnnaFlaxxis>  modifier = .4;
<AnnaFlaxxis>  scale(modifier) cube(item[0]);
<AnnaFlaxxis> ``` :D
<J1A8411> maybe you want the text on top of the cube
<J1A8411> or engraved into the cube?
<AnnaFlaxxis> end goal, yes
<teepee> and centered too :)
<J1A8411> text(valign="center")
<AnnaFlaxxis> appropriate font size as well
<J1A8411> text (size) ..
<J1A8411> cheatsheet!
<othx> cheatsheet is https://www.openscad.org/cheatsheet/ for the release version and https://www.openscad.org/cheatsheet/snapshot.html for the development snapshot versions
<J1A8411> you could also add the position
<J1A8411> or use search so you can    call   unit("Bed");
<teepee> for arranging stuff I would expect everything to be places somewhere :)
<J1A8411> rands ()
<AnnaFlaxxis> yeah I may have to sacrifice my morals for some things.
<AnnaFlaxxis> ooh rands
<teepee> haha, yes, press refresh until it looks good :D
<teepee> on the minus side, that might takes years with full random placement
<AnnaFlaxxis> g2g tyvm
AnnaFlaxxis has quit [Quit: Client closed]
<teepee> performance worst case: unbounded
<ali1234> probably still faster than this: https://imgur.com/38WSUZn.png
<teepee> so years was too optimistic :)
<J1A8411> quantum bogosort ..   the universe you are in is the one with the furniture arranged the way you want
<teepee> that's then architecture golfing, or so?
<teepee> well meta architecture golfing, not related to the thing previously called facebook
<teepee> oh, oops
Azem has quit [Ping timeout: 256 seconds]
<gbruno> [github] t-paul pushed 2 modifications (Remove past item from ticker.) https://github.com/openscad/openscad.github.com/commit/405c16b6277a094e2b081b6c728c17b91f0585cf
<ali1234> when exactly is some object in openscad a nef polyhedron?
<ali1234> or maybe it would be better to ask when is it not?
nedko has joined #openscad
<ali1234> seems like everything is either a nef or a mesh, and presumably meshes only come from importing or render()?
ur5us has quit [Quit: Leaving]