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
To_Aru_Shiroi_Ne has joined #openscad
ToAruShiroiNeko has quit [Ping timeout: 272 seconds]
Reisga2 has quit [Quit: Ping timeout (120 seconds)]
Reisga2 has joined #openscad
<gbruno> [github] ChickenPigAndEgg opened issue #4997 (2024.02.04 (git cc7cbd6b5) Number School Works, but will only increment) https://github.com/openscad/openscad/issues/4997
<gbruno> [github] t-paul edited issue #4997 (2024.02.04 (git cc7cbd6b5) Number Scroll Works, but will only increment) https://github.com/openscad/openscad/issues/4997
To_Aru_Shiroi_Ne has quit [Ping timeout: 252 seconds]
ToAruShiroiNeko has joined #openscad
califax has quit [Ping timeout: 255 seconds]
califax has joined #openscad
califax has quit [Read error: Connection reset by peer]
califax has joined #openscad
kintel has joined #openscad
<kintel> Zr40 Only for this particular design, or also for simpler examples?
<mmu_man> starting to think it'd be simpler to add scad export to KiCad
J24k77 has joined #openscad
J24k92 has quit [Quit: Client closed]
J24k84 has joined #openscad
J24k77 has quit [Ping timeout: 250 seconds]
<gbruno> [github] kintel edited issue #4825 (Move manifold out of experimental) https://github.com/openscad/openscad/issues/4825
<gbruno> [github] kintel edited pull request #4996 (Minor caching cleanup) https://github.com/openscad/openscad/pull/4996
<gbruno> [github] kintel edited issue #4825 (Move manifold out of experimental) https://github.com/openscad/openscad/issues/4825
<kintel> mmu_man What is your end goal btw.?
ali1234 has quit [Remote host closed the connection]
ali1234 has joined #openscad
teepee has quit [Remote host closed the connection]
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee has joined #openscad
<mmu_man> kintel: import the PCB and components with proper colors, to use previews for things like assembly instructions
<kintel> right, and OFF is exported from KiCAD?
<kintel> I seem to remember that OFF has support for per-object materials
<kintel> ..using .mtl files to describe materials
<kintel> that sounds like something which could work with OpenSCAD; material -> color() nodes
<kintel> WRL does sound attractive, but you need a pretty large library to parse WRL. Exporting scad from KiCAD would be 1000x easier ;)
<kintel> ..or write a stand-alone converter
LordOfBikes has quit [Ping timeout: 255 seconds]
LordOfBikes has joined #openscad
Reisga2 has quit [Quit: Ping timeout (120 seconds)]
Reisga2 has joined #openscad
mmu_man has quit [Ping timeout: 246 seconds]
teepee has quit [Remote host closed the connection]
califax has quit [Remote host closed the connection]
teepee has joined #openscad
califax has joined #openscad
teepee has quit [Remote host closed the connection]
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
pca006132_ has joined #openscad
teepee has joined #openscad
<pca006132_> guso78 I think faceID in the output is always the index to the input?
<pca006132_> user can specify faceID in the input, but these will not be inherited in the output if I understand it correctly
<pca006132_> the input is used for telling manifold if faces can be collapsed
pbsds has joined #openscad
<gbruno> [github] kintel pushed 1 modifications (Use smartCacheGet() to resolve top-level geometry) https://github.com/openscad/openscad/commit/43f8829b14fdb0e1f2e6d85f0a771f659ffe3402
<gbruno> [github] kintel synchronize pull request #4996 (Minor caching cleanup) https://github.com/openscad/openscad/pull/4996
erectus has quit [Remote host closed the connection]
<kintel> pkg_check_modules(TBB tbb) bypasses CMake's find system, and pollutes the global namespace with TBB_* variables
erectus has joined #openscad
<kintel> I wonder if instead you should find_package(TBB), then fall back to pkg-config only when needed.
<pca006132_> ah yes
erectus has quit [Remote host closed the connection]
<pca006132_> was not thinking too much when writing that
<kintel> Right now, re-configures of OpenSCAD picks up cached pkg-config results instead of respecting find_package
erectus has joined #openscad
<pca006132_> will fix
<kintel> Not sure why the caches are preferred though. We do a straight-up find(TBB REQUIRED)
<kintel> It's annoying that there isn't an automatic bridge to pkg-config in cmake..
<pca006132_> yeah, it is quite painful to deal with legacy packages etc.
<pca006132_> the reason I was using pkg-config is because older version of tbb does not support find_package iirc
<kintel> yeah, it all depends on how it's packaged, so the fallback is likely needed for a while
<pca006132_> can you verify if this works? https://pastebin.com/hfyk96ZC
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
<kintel> Thx! Works perfectly
<pca006132_> nice
<gbruno> [github] kintel pushed 1 modifications (Properly disable tests to avoid leaving stray files in the source folder) https://github.com/openscad/openscad/commit/be5173824fe743f17014ba12e2f6d5b003acca50
<gbruno> [github] kintel opened pull request #4998 (Properly disable tests to avoid leaving stray files in the source folder) https://github.com/openscad/openscad/pull/4998
rawgreaze has quit [Quit: ZNC 1.8.2 - https://znc.in]
rawgreaze has joined #openscad
<gbruno> [github] kintel pushed 1 modifications (Minor simplification + assert()) https://github.com/openscad/openscad/commit/87fb8aad86aaa5dae3db0000918d9b454f3ae48d
<gbruno> [github] kintel synchronize pull request #4996 (Minor caching cleanup) https://github.com/openscad/openscad/pull/4996
pca006132_ has quit [Quit: Client closed]
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gbruno> [github] kintel closed pull request #4998 (Properly disable tests to avoid leaving stray files in the source folder) https://github.com/openscad/openscad/pull/4998
<gbruno> [github] kintel pushed 1 modifications (Properly disable tests to avoid leaving stray files in the source folder (#4998)) https://github.com/openscad/openscad/commit/5cfd4dbe07bf6c38cb18dbc38039d8d3bb255162
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
arebil has joined #openscad
erectus has quit [Remote host closed the connection]
erectus has joined #openscad
guso78k has joined #openscad
<guso78k> kintel, would prefer here to have the previous tbb find solution.
guso78k9 has joined #openscad
<Zr40> kintel: also for simpler examples. Differencing two cubes shows the same symptom
knielsen has quit [Ping timeout: 268 seconds]
knielsen has joined #openscad
guso78k9 has quit [Ping timeout: 250 seconds]
guso78k has quit [Ping timeout: 250 seconds]
califax has quit [Remote host closed the connection]
califax has joined #openscad
califax has quit [Remote host closed the connection]
califax has joined #openscad
fling has quit [Remote host closed the connection]
fling has joined #openscad
aiyion2 has quit [Remote host closed the connection]
aiyion2 has joined #openscad
aiyion2 has quit [Remote host closed the connection]
aiyion2 has joined #openscad
kow__ has joined #openscad
drkow has quit [Ping timeout: 260 seconds]
mmu_man has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
califax has quit [Remote host closed the connection]
califax has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
guso78k has joined #openscad
fling has quit [Remote host closed the connection]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
fling has joined #openscad
<mmu_man> anyone has an account on the OpenCASCADE Mantis? Want to ask them to ship a .pc file for pkg-config but too lazy to create an account just for that
<guso78k> OpenCASCADE is a company name ? thought it is the name of the CadQuery kernel ??
omegatron has joined #openscad
kintel has joined #openscad
<kintel> guso78 Why prefer the previous find solution?
<mmu_man> kintel: OFF supports colors on faces or vertices. VRML has colors and objects it seems though.
<guso78k> kintel:   got contect agaiin :)
<mmu_man> however meshlab just re-exports it as a vertex-colored mesh blob
<mmu_man> currently looking into Mayo
<mmu_man> and its funky build procedure
<guso78k> prefer previous  solution because it worked in my cmake, this is the only reason. this TBB::tbb stuff is not understood and i always replace it manually ;)
<guso78k> I have noticed that there is yet another version. maybe this works without any change :)
<kintel> mmu_man sorry, was confusing with OBJ.
<guso78k> mmu_man yes: i'll also try to compile it here
<mmu_man> Project MESSAGE: VRML reader disabled because OpenCascade < v7.7
<mmu_man> GRRRR
<pca006132> guso78k: maybe you want to use the fallback as in manifold? https://github.com/elalish/manifold/blob/master/src/utilities/CMakeLists.txt#L47-L52
<pca006132> you can check if it works
<pca006132> actually a more civilized approach may be to re-export the TBB_INCLUDE_DIRS and TBB_LINK_LIBLRARIES as a target...
<guso78k> will give it a try, thx!
<pca006132> but I am too lazy to try that
<guso78k> i always replace the tbb stuff with ${TBB_LIBRARIES} and it works
<mmu_man> hmm does STEP handle colors on objects or just faces…
<kintel> guso78k Could you remind me why it doesn't work on your setup?
<kintel> e.g. Perhaps you don't have TBBConfig.cmake installed?
<guso78k> You don't know probably because i missed to answer. let me find out again ...
ToAruShiroiNeko has quit [Read error: Connection reset by peer]
<kintel> pca006132 even better would be to wrap pkg-config results as imported libraries. This is such a huge gaping hole in cmake..
ToAruShiroiNeko has joined #openscad
<guso78k> https://bpa.st/FXAA this is the error, and this is the line causing it:   target_link_libraries(OpenSCAD PRIVATE TBB::tbb)
<pca006132> I still have no idea why they don't do that...
<pca006132> maybe there are some complicated edge cases, idk
<guso78k> i got it in  /usr/lib64/cmake/TBB/TBBConfig.cmake . its content is https://bpa.st/6FFA
<mmu_man> ok STEP->WRL looses colors anyway in mayo
<kintel> guso78k that tbb issue was fixed by pca006132's latest Manifold PR
<guso78k> great. look forward  that it resolves automatically here without traces :)
<kintel> guso78k The issue only happens on re-configuration of OpenSCAD. A temporary workaround is rm CMakeCache.txt before rebuilding
<kintel> mmu_man Have you seen https://github.com/agausmann/vrml2scad ?
<guso78k> kintel, thats interesting. I believed, its a permanent error and never even considered deleting cached files ...
<kintel> guso78k I just discovered that last night :)
<guso78k> https://bpa.st/6GXQ BUMMER. I was even curious, that 'apt'  is installable her in my Fedora :')
<mmu_man> kintel: ohhhhh 😍
<guso78k> s/her/here/
<mmu_man> love that APT recommends cargo when I tell it to install cargo :D
<mmu_man> and then cargo downloads the whole of Internet… :-(
voxpelli has quit [Ping timeout: 256 seconds]
drkow has joined #openscad
<guso78k> kintel, for my texture stuff I have " glUniform1f(renderer_shader.data.csg_rendering.texturefactor , 0.0);
<guso78k> - glUniform1i(renderer_shader.data.csg_rendering.tex1 , 0); " in my code. With that included, when I press "F6" and then "F5" , openSCAD sometimes crashes deep somwhere in draw_tri -> memcpy
<guso78k> any instant clue ?
kow__ has quit [Ping timeout: 268 seconds]
drkow has quit [Remote host closed the connection]
drfff has joined #openscad
drfff has quit [Remote host closed the connection]
drfff has joined #openscad
guso78k5 has joined #openscad
gimzmoe has quit [Ping timeout: 246 seconds]
guso78k5 has quit [Client Quit]
gwillen has quit [Ping timeout: 256 seconds]
<mmu_man> kintel: wow, generated code is ugly but it works fine :-)=
gwillen has joined #openscad
snakedGT has joined #openscad
Virindi has quit [Ping timeout: 246 seconds]
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Virindi has joined #openscad
snaked has quit [Ping timeout: 264 seconds]
voxpelli has joined #openscad
<mmu_man> ideally I could run kicad as CLI to export the wrl from the Makefile but eh
<mmu_man> KiKit has some export commands but only for 2D it seems
kintel has joined #openscad
gimzmoe has joined #openscad
<kintel> guso78 Sounds similar to https://github.com/openscad/openscad/pull/4983
<kintel> I need to figure out exactly what happens before blindly trying to fix that
<guso78k> kintel, its indeed very similar! : https://bpa.st/ZVRQ
<guso78k> my question is if by just adding glUniform1i and glUniform1f you have to adapt other metrics/allocation sizes/configurations in order not to risk a Segfault
<guso78k> of course it can be result of other nasty things I do for my texture feature
voxpelli has quit [Ping timeout: 256 seconds]
<guso78k> could this be an artefact of the "Voodoo warning ... " documented in QGLView.cc  ?
voxpelli has joined #openscad
<mmu_man> aw, kicad-cli v8 will support vrml export directly so I should be able to script that all with a makefile
<kintel> guso78k I feel it's a simpler explanation - this is really a CPU memory crash, so the GPU is likely not involved
<kintel> I haven't been able to reproduce, but if you're able to figure out why it crashes, e.g. what wrong data was passed to memcpy(), that would be very helpful
<kintel> Your log seem to indicate a memory alignment issue
lf94 has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
lf94 has joined #openscad
drfff has quit [Remote host closed the connection]
drfff has joined #openscad
<guso78k> kintel i'd had a hard time to find out, why its crashing. the crash is far away from the code which triggers crash and the crash is i an area where i don't have influence nor I am aware how it should work correctly.
<guso78k> My feeling is that somwhere , foreign data is overwritten with wrong content and well esablished code simply fails to work correctly then.
<kintel> wrong content shouldn't crash memcpu though
<kintel> Perhaps printf the arguments to memcpu may give a good hint
<kintel> *memcpy
<guso78k> how could i influence good/bad memory alignment by typing .cc code ?
<pca006132> I think you should try memory sanitizer first...
<pca006132> I don't think memmove will fail due to alignment issue
<pca006132> the name is "__memmove_avx_unaligned_erms"
<guso78k> yes, i can perform your tests, with printf and with the sanitizier.  anybody has a quick reminder for the compile option ?
<pca006132> -fsanitize=address
<guso78k> is it a cmake option ?
<pca006132> no, for cmake you probably need -DCMAKE_CXX_FLAGS="-fsanitize=address"
<guso78k> great. i can use that
<pca006132> remember to build with debug info as well...
<pca006132> -DCMAKE_BUILD_TYPE=RelWithDebInfo
<guso78k> :)
<guso78k> will take some time to prepare
TylerTork has joined #openscad
<TylerTork> I was surprised to find that the built-in editor, while it provides content assist for system functions, doesn't use the comments or module prototype to give any typeahead or popup help for user-written and library modules. There doesn't even seem to be a feature request for this in github. Am I missing something?
<guso78k> kintel, when I press F6, and then F5,  VertexArray.h:  addPositionData, addNormalData and addColorData is beeng called with  std::shared_ptr<IAttributeData> data, whereas data->toBytes() is nullptr
<guso78k> I dont have any idea why this could happen. maybe OOM ?
<guso78k> i use a very simple design and not actively any textures here
<pca006132> are you using the current master?
<pca006132> ah I guess it is a nullptr when the data is empty
<pca006132> although it is still null after setting color, it works though, no idea :/
<kintel> In openscad, use cmake -DSANITIZE_ADDRESS=1 to enable asan
<kintel> guso78k Yes, I think adding empty data arrays to those functions is normal as the data is just empty containers to be filled in later
<kintel> The VBO code is still pretty convoluted, even after I did significant cleanup. More work to be done.. It's complex because in OpenCSG mode, we use a single VBO to hold all data for an entire CSG product, which translates into many render calls using different subsets of the VBO.
<guso78k> there is done some pointer arithetitc later so nullptr -4 = 0xffffffffffffffc which is a bad thing
<guso78k> is it possible that std::make_shared<AttributeData<GLfloat, 3, GL_FLOAT>>());   does not initialize /allocate  the array ptr ?
<guso78k> here is the ptr arithmetic: const GLbyte *src = data->toBytes() + data->sizeInBytes() - data->sizeofAttribute();
<guso78k> pca006132 nope, i am on my own branch
<kintel> sizeInBytes should always be larger than sizeOfAttribute, so I think that's fine
<TylerTork> No answers about content assist?
<kintel> ..but an underlying bug could trigger something odd. If you can intercept a crash and print the data, that would work
<kintel> TylerTork It's probably a missing feature for which nobody opened a ticket yet
mmu_man has quit [Ping timeout: 256 seconds]
J24k84 has quit [Quit: Client closed]
J24k84 has joined #openscad
<guso78k> kintel nope, this is not valid in my case, i have here:
<guso78k>  printf("src = %p data=%p %d %d \n",src,data->toBytes(), data->sizeInBytes(), data->sizeofAttribute());
<guso78k> src = 0xfffffffffffffffc data=(nil) 0 4
<guso78k> sizeinbytes is 0 as its ptr is nullptr
<kintel> oh, that's bad
<guso78k> it seems, you already better understood the issue than me ...
<kintel> If this is reproducible, could you share your branch. If I can reproduce this locally it will be a bit more possible to fix
<guso78k> i believe its very reproducible in my side. use my latest openscad repo, python branch, its hash is b412f645f03949a5fa3656f13073c506c8697070
<guso78k> then in Render.cc  make if(textures.size() > 0) { // TODO prevent bug, segfault
<guso78k> + if(textures.size() > 0 || 1) { // TODO prevent bug, segfault
<guso78k> open simple cube, then press F6, then press F5
<guso78k> i believe no need to use any fance cmake options, not even python,
<guso78k> basically make the if conditions always true
<kintel> Couldn't find that hash in your repo..
<guso78k> hmm let me check maybe i did not push yet
<guso78k> :) i have pushed now
<guso78k> basically the latest
<kintel> ..but I got your branch with the segfault comment
<guso78k> the prevent segfault hash is also fine. this is where i found, which lines make the bug active
<guso78k> theoretically you should see hash commit b412f645f03949a5fa3656f13073c506c8697070 now, but other is also fine
<guso78k> need to  jump into the car now, hope you can reproduce in your side
<guso78k> but my shown pointer arithmetic suggests the solution is to compare against nullptr before doing arithmetic on it.
J24k84 has quit [Quit: Client closed]
mmu_man has joined #openscad
J24k84 has joined #openscad
J24k84 has quit [Client Quit]
J24k84 has joined #openscad
guso78k has quit [Ping timeout: 250 seconds]
<kintel> guso78 yes that would keep it from crashing, but doesn't explain why the function is called with bad arguments, likely masking a deeper bug
voxpelli has quit [Ping timeout: 256 seconds]
voxpelli has joined #openscad
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
<kintel> guso78 I can reproduce the crash in your branch. ..but you have soo many changes, so this will take time to wade through.
pbsds has joined #openscad
TylerTork has quit [Quit: Client closed]
pie_ has quit [Ping timeout: 255 seconds]
mmu_man has quit [Ping timeout: 260 seconds]
pie_ has joined #openscad
hyperair has quit [Ping timeout: 264 seconds]
arebil has quit [Quit: arebil]
<guso78> Kintel this IS all my Work. But i think you can Limit IT to glview Changes. I use meld to revert Changes one after the Other.
<guso78> I believe the Error IS somewhere in the 3d engine and my Changes have Triggered it.
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
<kintel> I agree - it seems like some innocent-looking change is triggering an existing bug
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
hyperair has joined #openscad
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
drkow has joined #openscad
drfff has quit [Ping timeout: 268 seconds]
kow__ has joined #openscad
teepee has quit [Remote host closed the connection]
drkow has quit [Ping timeout: 260 seconds]
teepee has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
omegatron has quit [Quit: Power is a curious thing. It can be contained, hidden, locked away, and yet it always breaks free.]
arebil has joined #openscad
mmu_man has joined #openscad
kow__ has quit [Read error: Connection reset by peer]