<teepee>
that is so far off from actually running openscad that I'm asking what your goal is
<partcad-user>
No, I'm not testing openscad. I'm about to use in PartCAD. Works great on other OSes, but on Windows I'm struggling with automating the installation process.
<partcad-user>
No, I'm not testing openscad. I'm about to use it in PartCAD. Works great on other OSes, but on Windows I'm struggling with automating the installation process.
<teepee>
why run on windows then, if it works on linux, if it's just some backend, does it matter which platform it's on?
mtm has quit [Ping timeout: 255 seconds]
<teepee>
if the pytest call is from your app, it looks like it's picking up some python code from the MCAD library which is bundled with openscad but not strictly part of it
<partcad-user>
Ohhh. I'm so stupid. I need to sleep more.
<teepee>
just what I'm saying :-). 1 am here, so I'm off to bed
<partcad-user>
I guess "pytest" got executed in the folder where OpenSCAD installation got extracted, and pytest discovered something inside
mtm has joined #openscad
J24k has quit [Quit: Client closed]
J24k has joined #openscad
partcad-user has quit [Quit: Client closed]
nomike has joined #openscad
<nomike>
Hi
fling has quit [Remote host closed the connection]
fling has joined #openscad
<nomike>
There is an old issue about adding support for complex, nested (multidimensional) vectors to the custpmizer <https://github.com/openscad/openscad/issues/3817>. It's still unsolved, so in order to solve the underlying issue, I've implemented a function which can parse the string "[1,2.5,[[4]],[3.4,6,[3,4]]]" into the multidimensional vector [1,2.5,[[4]],[3.4,6,[3,4]]]. I plan to contribute it to <https://github.com/thehans/funcutil
<nomike>
s/tree/master> but before I do that, I wanted to write some unit tests, as it's obviously a rather complex function.
<nomike>
Once I've got some feedback, I will post a comment to https://github.com/openscad/openscad/issues/3817, to offer a workaround. But this might even be sufficient to close that feature request all along, as via this trick it is no longer necessary to be implemented directly into the customizer.
J24k has quit [Quit: Client closed]
J24k has joined #openscad
mmu_man has quit [Ping timeout: 272 seconds]
<gbruno>
[github] kintel assigned issue #5451 (The OpenSCAD editors Find and Replace sometimes distinguishes between upper and lower case, sometimes not.) https://github.com/openscad/openscad/issues/5451
<J24k>
f0lkert do you think we can get a lights relative to the camera instead of these mega light grid ?
<f0lkert>
yes
<f0lkert>
welll
<f0lkert>
that depends: do we want moving lights when we're animating eh an animation as well?
<f0lkert>
J24k: ^
<J24k>
i tried it but the camera rotation need to be calculated into the light location
<J24k>
If you move the camera in an animation - a static light would be better, but i can't see users doing animations - so i would focus on getting a premium image
califax has quit [Remote host closed the connection]
califax has joined #openscad
<J24k>
f0lkert How i see this is that scad user can use this to get a nicer image - professional povray users will also know how to change lights to get what they want for animation
<f0lkert>
yes. I could not open the craftprofessional.com links though
Reisga244 has quit [Quit: Ping timeout (120 seconds)]
Reisga244 has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #openscad
Reisga2449 has joined #openscad
Reisga244 has quit [Ping timeout: 252 seconds]
Reisga2449 is now known as Reisga244
mtm has quit [Ping timeout: 252 seconds]
mtm has joined #openscad
mmu_man has quit [Ping timeout: 272 seconds]
mmu_man has joined #openscad
Guest9 has joined #openscad
Guest9 has quit [Client Quit]
hyperair has joined #openscad
TheAssassin has quit [Remote host closed the connection]
TheAssassin has joined #openscad
bozo16 has joined #openscad
<f0lkert>
does anyone know "where the objects are" before I invoke PolySetUtils::tessellate_faces?
nomike has quit [Remote host closed the connection]
mmu_man has quit [Ping timeout: 252 seconds]
Reisga244 has quit [Quit: Ping timeout (120 seconds)]
Reisga244 has joined #openscad
mmu_man has joined #openscad
Guest28 has joined #openscad
<Guest28>
hi, is there a program that is a hybrid of openscad and something like freecad, where you an design and the code gets gernerated automatically?
<Guest28>
*can
<f0lkert>
generated*
<Guest28>
yes
Smeef has quit [Read error: Connection reset by peer]
Smeef has joined #openscad
<J24k>
Guest28 Freecad can use openSCAD code
<J24k>
Then there is blockcad
<Guest28>
with the plugin you mean?
L29Ah has quit [Ping timeout: 265 seconds]
<Guest28>
block cad looks very much geared towards children
<Guest28>
I was thinking something for hobbyists / professionals
<J24k>
yes because either you code or not - why would someone want a gui to create code?
<J24k>
why not just use FreeCad if you like working with mouse and gui
<Guest28>
why have one when you can have both
<J24k>
Every CAD program translates the design into code to calculate and render it
<J24k>
in Blender you can do both scripting or using blender
<Guest28>
somethings maybe alot more straightforward to achieve in code and others by drawing
<J24k>
yes that is why i said freecad can use code - so you can use freecad and for parts where you see an advantage in scad just use the code in freecad
<othx>
J24k linked to YouTube video "FreeCAD How To Use Parameters" => 1 IRC mentions
<Guest28>
but then when you want to export back to openscad ?
<Guest28>
when I tried not so much was supported
<J24k>
you can convert into polyhedra but if something is made with nurbs you don't have this in scad so it can't be converted
<Guest28>
yes
<J24k>
So you always end up with some kind of stl import which could be used in scad CSG
<J24k>
Or you export 2D and use that in scad
<J24k>
eg. design with inkscape and import the svg in scad
<Guest28>
ok
<J24k>
the problem is that if you make a cube with a cad program - there is no information that it is a cube .. just 8 point - so it is very difficult to translate this into the "cube()" module in openscad .. AI may be able one day to do that
<J24k>
currently AI scad code is more funny than usefull
<Guest28>
ok
<J24k>
there are some test that you can import geometry and extract the data (points, faces) so you can run calculation on them but i think there is no scenario this would help you
<Guest28>
ok thanks
<J24k>
but if you have some issues with design in scad you can ask here and surprisingly they often find a solution
<J24k>
(it also involves a lot of math)
Guest28 has quit [Ping timeout: 256 seconds]
TheCoffeMaker has quit [Excess Flood]
TheCoffeMaker has joined #openscad
TheCoffeMaker has quit [Excess Flood]
TheCoffeMaker has joined #openscad
L29Ah has joined #openscad
mmu_man has quit [Ping timeout: 252 seconds]
TheCoffeMaker has quit [Remote host closed the connection]
TheCoffeMaker has joined #openscad
TheCoffeMaker has quit [Excess Flood]
TheCoffeMaker has joined #openscad
mmu_man has joined #openscad
muesli has quit [Quit: NO CARRIER]
muesli has joined #openscad
snaked has quit [Remote host closed the connection]
snaked has joined #openscad
Drizzt321 has joined #openscad
<Drizzt321>
So I'm trying to update a variable in an outer scope, to be updated every execution of a for loop, and then be preserved and available and updated in a nested for loop. Reading https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Scope_of_variables, it seems my expectations are wrong, and anytime I update a variable an an inner scope, it doesn't carry through the next iteration of the for loop or after the for loop terminates. This matches what
<Drizzt321>
I'm seeing when I output using echo(). How do I update/increment a variable declared outside the for loop, but I need to preserve the updated value for the next iteration of the for loop?
<Drizzt321>
FYI, I'm a programmer (primarily Java), and the scope as described in the documentation isn't my expectations of scope for a C-style language (which OpenScad appears to be)
<J24k>
Drizzt321 it is not Scad is more like haskell - there are no variables, parameter are constant
<J24k>
you can use recursion to introduce a new variable (same name) with a new value for each iteration
<Drizzt321>
J24k: Ah, I see. Hm. So there's no way to update a variable, and preserve it's state through to the next execution of a for loop?
<J24k>
no it is not updating - you create a new instance with a new value
<Drizzt321>
Ah
<J24k>
but the result would be the same
<Drizzt321>
And that level of doing recursions feels, to me (in how I'm used to it), a bit insane
<Drizzt321>
I see why in this type of language expectations...
<Drizzt321>
but feels really weird
<Drizzt321>
Alright, time to create a new mindset!
<J24k>
yes it is different - and if you are not used to - sure strange
<Drizzt321>
Thanks for giving me the info I need
<J24k>
you can check the gallery
<Drizzt321>
gallery?
<Drizzt321>
mostly I hit the cheat sheet, and look at specifics of something that way
<Drizzt321>
well, I need to tweak it, since I need to say "I'm at socket 2, give me total offset from the left already) which would be just 1 socket
<Drizzt321>
but I can do that by passing it current-1, instead of just current, so to speak, if current is 2, 3, etc
<Drizzt321>
There, we go, this assumes 1-based socket number (aka 1-based indexing), and so correctly handles 1...N, with an error of N is > # of sockets in the list
bozo16 has quit [Quit: Leaving]
<Drizzt321>
Now to do another function to find the maximum width value... *sigh*
<InPhase>
Ooo, are we doing fun math?
<InPhase>
Drizzt321: One important mindset nudge is that practically, in OpenSCAD, it's very very difficult for the "computation" of your scad script to have any impact at all on the render time.
<Drizzt321>
h...max() can just take a vector already, nice
<InPhase>
Drizzt321: Almost all the time is spent on the geometry calculations after your script finishes processing.
<Drizzt321>
InPhase: Good to know, I'm sure. I'm just used to programming other types of applications, and while speed of CPU these days makes iterating a small list and summing every time usually pretty easy, perhaps even optimized away to a single execution by the compiler, it still feels weird
<Drizzt321>
But yeah, I bet geometry calculations far outweigh all the rest of calculations
<InPhase>
Drizzt321: So if you have a list of spacings, you can turn it into a list of positions by just running integral on it as a transformation.
<Drizzt321>
rather, much newer than the 2014.6 version
<Drizzt321>
InPhase: Hm, I have a list of socket hole sizes to store my sockets, and then I have the spacing between them as a separate, single variable.
<InPhase>
Drizzt321: Well yes, the integral of the socket hole sizes, plus i*spacing, is the position.
<Drizzt321>
So I'm just figuring out amount of space the sockets from the left take up, and then separately multiplying the # of sockets already placed times the spacing
<Drizzt321>
Ah
<InPhase>
Drizzt321: This problem has been hit before. :)
<Drizzt321>
`integral` doesn't seem to be a function
<InPhase>
Drizzt321: The alternative is to do it with recursive modules. I can show a representative example of that for relative placement. But the recursive approach is more appropriate with a slight complexity increase in what relative position means. For linear, integrating is probably cleaner.
<Drizzt321>
why not just add it in to the standard release then? ;)
<InPhase>
Drizzt321: We have a lot of libraries out there. :) That one is mostly stuff that peepsalot and I put together as examples.
<Drizzt321>
Yeah, I use BOSL2 for some stuff
<InPhase>
Drizzt321: Well, because we try to keep the standard ones as somewhat simple baseline ones, and then offer varities of approaches as libraries. That integral example might not be exactly what everyone wants. There are slight differences one could consider.
<Drizzt321>
Ah
<Drizzt321>
Hm, I notice a hole in your README, the `math.scad` isn't referenced and so isn't described
<InPhase>
That library has, for example, a "zip". Zip is great. Python has a built-in zip. But we haven't committed to locking down a single behavior of zip, and it's easy enough to grab as a function from the library.
<InPhase>
Drizzt321: I don't know what you're talking about? math.scad is clearly described there in the README.
<InPhase>
Drizzt321: And I totally didn't just push that change.
<kintel>
J24k My camera fix hasn't been merged yet. If you track this PR, you should be notified when it merges, and the next day's snapshot should have the fix: https://github.com/openscad/openscad/pull/5458
<J24k>
kintel ah ok, done, thank you!
<f0lkert>
kintel: regarding the triangles-fix: indeed I also believe we discussed it. But this patch was to get something working quickly so that we don't have something entirely broken for too long.
<f0lkert>
This weekend I'm working on something else (SMS for the local hackerspace) but I can continue monday.
<kintel>
Quick-fix is fine, but please open a new ticket describing the issue, then reference the ticket in a code comment, so that we can leave this for later without forgetting about it
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<f0lkert>
kin shit
<f0lkert>
not here
<f0lkert>
anyone with knowledge about the internals of openscad on-line?
<Drizzt321>
Hm, it'd be correct to say that OpenScad vector/list is just an array, you can't index with an arbitrary value (e.g. a string), like a hash/map like in other languages, right? So basically I need to lists with same int indexing to get the textual version, yeah?
kintel has joined #openscad
<kintel>
I'm generally offline, but I'll check the logs from time to time
<f0lkert>
ah ok
<f0lkert>
it looks like the export code gets a somewhat(!) triangulated polygonlist
<f0lkert>
for a sphere(50), there are two very polygons of 30 elements and a whole bunch of 3 elements polygons
<f0lkert>
maybe I should untriangulate things?
<f0lkert>
kintel: ^
<f0lkert>
ideally I should traverse the object-tree and directly say sphere -> sphere
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<f0lkert>
kintel: oh hang on, it's the large polygons defining a whole patch that go wrong
partcad-user has joined #openscad
partcad-user has quit [Client Quit]
<Drizzt321>
Hm, for text, I'm seeing it doesn't appear to support newline (\n) even though the value type of string does support it https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General#Strings. So I'd need to calculation axis offset to put the next set of characters onto another "line"?
<teepee>
yes, text() does not support layouting
<Drizzt321>
Gotcha, and since it seems BOSL2 uses text(), that means it doesn't. Ok, time to figure that out...
<Guest69>
hey all, this is long shot - is there a way to pick a plane and 'cut' all geometry above it? I have a rotated plane and I'd like to cut all geometry above it, like a slice