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
<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>
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
<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?