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
kintel has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Av8r has joined #openscad
J23504128 has joined #openscad
J235041 has quit [Ping timeout: 260 seconds]
<Av8r> Looking for some guidance: I'm attempting to add an Export Dialog box to Openscad (see https://github.com/openscad/openscad/issues/4143 and https://github.com/openscad/openscad/issues/649).  I'm new to C++ and Qt, although in my younger years I did a fair amount of C and various other languages, so I'm not terribly naive.  My functional code is
<Av8r> implemented and tested, but I've not yet figured how to integrate the prototype dialog into the build system to finish the integration.   Searching the internet, Qt documentation, and through the makefiles, I've not been able to find where the the UIC compiler is called, but I see the results (of EXISTING uic files) in the autogen subdirectory of
<Av8r> the build directory.   I do not find the uic files listed in the CMakefilesList.txt or any other file.  I attempted compile with 'make OpenSCAD', and with a clean cmake, and neither attempt resulted in the creation of the expected ui_ExportPDFDialog.h file in the autogen/import directory.  I'm running out of ideas... Can anyone provide me with
<Av8r> some additional breadcrumbs so I can make more progress?  Thanks in advance.  PS - I also haven't visited irc in 20+ years, so please advise where my antiquity shows in inappropriate etiquette...
<teepee> Av8r: this should be all automatic via cmake - Maybe it's missing that magic Q_OBJECT macro?
kintel has joined #openscad
<teepee> hmm, that's probably for MOC, maybe it's not finding the associated .ui file
<teepee> those are just in the same folder as the .cc files https://github.com/openscad/openscad/tree/master/src/gui
* teepee needs to say good night now to catch at least a couple of hours of sleep :)
<peepsalot> Av8r: ui files are handled automatically by cmake https://cmake.org/cmake/help/latest/prop_tgt/AUTOUIC.html
<peepsalot> you should just need to add any source files to the list of files here https://github.com/openscad/openscad/blob/master/CMakeLists.txt#L767
<peepsalot> assuming there's something like: ExportDialog.ui ExportDialog.h ExportDialog.cc, you would just need to add the .cc
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<teepee> aha!
* teepee goes back to sleep :)
<Av8r> Thanks peepsalot.  That's the magic I was looking for!  I don't (presently) have the .cc, .h in the directory because I was trying to understand the autogen process.   That also implies a particular code and class structure.  I'd expected to conform to that, but I was contemplated a streamlined approach embedding the dialog in an existing
<Av8r> method.  Looks like that won't work.
<Av8r> I'll paste that link into my development notes.
<peepsalot> Av8r: no problem. i don't understand what you mean about class structure vs a streamlined approach though. You should have some class that inherits from QDialog, defined in its own header file and (likely) a corresponding source file
<peepsalot> Av8r: did you use qtdesigner or a tool like that to create the ui?
<Av8r> I was contemplating embedding the new definitions in the existing exportPdf files.  Clearly, that won't work - the dialog-specific .cc at least is clearly necessary. The class definition and show method could be called from within the already-called exportPdf function - effectively, a private class (if not explicitly).   Anyway, now I know how
<Av8r> to proceed.     One peripherally-related question:  while I don't think I want to or should make this dialog a singleton, I could make it a persistent instance or create/destroy within the exportPdf function.  Presumably the former is better (persistent, but not explicitly singleton.)  Any guidance.
<Av8r> qtdesigner was used.  I probably would have been more comfortable explicitly coding the dialog, but I didn't see any of that in the existing code, so I thought I'd better stick to the current standard-of-performance.  And I learned something...
<peepsalot> Av8r: if you want persistence for the purpose of remembering last used settings, i look at Settings.h, and maybe just store them there along with other gui preferences
<peepsalot> Av8r: also just keep in mind that it should remain possible to build openscad without Qt. (i.e. configuring with: cmake -DHEADLESS ...) That's why we try to keep a clear separation between gui-specific and non-gui code.
<Av8r> Yes, I intend to use settings for persistence.  I was thinking in terms of performance.   Is it better to sacrifice persistent memory allocation for construction, or reallocate/reconstruct with each call?  In reverse-engineering the settings dialog, I observed that it was a singleton (and it took me a while to find the constructor in
<Av8r> tabmanager.cc), so I wondered whether I should also create a singleton.  Settings needs to be persistent independent of the embedded dialog, so that's probably the reason it is a singleton.
LordOfBikes has quit [Ping timeout: 260 seconds]
<Av8r> I'm working towards the requirement to keep the gui independent of the function.  The exportPdf method is self contained when provided the parameters.  The headless method will require an option parser to populate the options structure.
<JordanBrown[m]> Remember that this is UI... does it take human-appreciable time to construct the dialog? It's not like we're going to do it a thousand times while the user waits. There's no practical difference between one tenth of a second and two tenths.
<JordanBrown[m]> But: doing whatever the Preferences dialog does is probably the right thing.
LordOfBikes has joined #openscad
kintel has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Av8r> Reread the cmake link - looks like I misread or misinterpreted the search criteria - so my previous assertion on restrictions is not valid. -  I see this is not dependent on source file name, only (a) the presence of the include statement combined with (b) the presence of a correspondingly-named .uic file.   (I'll blame it on new contacts today
<Av8r> which degrade my close-up vision...)   :]
epony has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 248 seconds]
epony has joined #openscad
guso78ggg has joined #openscad
guso78ggg has quit [Quit: qicr for android: faster and better]
guso78ggg has joined #openscad
guso78ggg has quit [Client Quit]
<guso78> when trying to adapt the CSG Renderer to do the  offset-3d correctly, can it be that each triangle needs its own transformation matrix ?
<guso78> its simple face-normal times offset, but its unique
ur5us has joined #openscad
little_blossom has quit [Ping timeout: 248 seconds]
ur5us has quit [Ping timeout: 260 seconds]
juri__ has joined #openscad
juri_ has quit [Ping timeout: 246 seconds]
juri__ has quit [Read error: Connection reset by peer]
ur5us has joined #openscad
juri_ has joined #openscad
TED[m] has quit [Quit: You have been kicked for being idle]
guso78 has quit [Quit: Client closed]
ur5us has quit [Ping timeout: 255 seconds]
little_blossom has joined #openscad
Guest27 has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
Guest27 has quit [Quit: Client closed]
J23504128 has quit [Quit: Client closed]
J23504128 has joined #openscad
J23504128 has quit [Quit: Client closed]
J23504128 has joined #openscad
<buZz> omg, offset-3D is coming? <3 <3 <3 <3 <3 <3
guso78 has joined #openscad
<guso78> buZz, I cannot estimate your emoticon, but yes, its my intent. I don't know its its coming, its up to the openscad developer team.
<guso78> my role is just to raise suggestions and to raise PR's haha
<buZz> less than three is a heart if you tilt your head
<guso78> haha, now i got the message :)
<buZz> :)
<guso78> buZz, are you developper or rather user ?
<buZz> the latter
guso78 has quit [Quit: Client closed]
guso78 has joined #openscad
L29Ah[x] has quit [Ping timeout: 256 seconds]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
Av8r has quit [Quit: Connection closed]
guso78 has quit [Quit: Client closed]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
guso78 has joined #openscad
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
L29Ah has joined #openscad
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
guso78 has quit [Quit: Client closed]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
guso78 has joined #openscad
snaked has quit [Ping timeout: 260 seconds]
teepee has quit [Ping timeout: 255 seconds]
J23504128 has quit [Quit: Client closed]
J23504128 has joined #openscad
teepee has joined #openscad
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
guso78 has quit [Quit: Client closed]
use-value has quit [Quit: use-value]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
Trieste has joined #openscad
Trieste has quit [Read error: Connection reset by peer]
<JordanBrown[m]> Each triangle has to be appropriately transformed. Whether they each need their own transformation matrix depends on whether they start out appropriately aligned relative to one another.
boriyakasumo[m] has joined #openscad
<boriyakasumo[m]> Hello, I am from matrix. Is this a bridge to irc? Anyway does openscad also scan for libraries in the current directory? (I am trying to open https://github.com/riskable/void_switch)
<teepee> boriyakasumo[m]: yes, origin is IRC, but the matrix bridge is pretty well connected on libera.chat
<teepee> relative path are looked up against the script I think
<JordanBrown[m]> I don't remember if we have the <name> versus "name" distinction that C makes. I don't think so.
<JordanBrown[m]> But when it looks in the "current directory", that's relative to the file that it's reading right now.
<JordanBrown[m]> Not relative to the system current directory when you started the program.
guso78 has joined #openscad
<gbruno> [github] gsohler synchronize pull request #4516 (offset for 3D objects) https://github.com/openscad/openscad/pull/4516
<teepee> and also not relative to the top level scad if calling from a sub-folder
<teepee> you can do that by adding "." to OPENSCADPATH I suppose
<boriyakasumo[m]> Ok, thanks. I just realized it was written in the wiki I don't know how I missed that.
<boriyakasumo[m]> > the directory of the calling .scad file
<guso78> JordanBrown[m], before doing 3D offset in openCSG, all faces are still properly aligned. their edges meet side-by-side. when doing 3D offsetin OpenCSG not only the faces shift by their normal, but also their area becomes bigger.
<guso78> if this cannot be achieved easily, maybe all offset-3D shapes need to render in background before beeing displayed
<guso78> in my PR there is the algorithm, how to create the "derived"  object of offset3D. i am just wondering, how well this can be applied during openCSG rendereing
guso78ggg has joined #openscad
use-value has joined #openscad
guso78 has quit [Ping timeout: 260 seconds]
guso78ggg has quit [Ping timeout: 252 seconds]
<peepsalot> offsetting a sphere (convex shape) centered on the origin is the most trivial of use cases, and can be also be done with a scale / resize operation. the hard part is handling non-convex polyhedra, and the interaction of faces with combinations of convex and concave dihedral angles
<peepsalot> for preview rendering, you would still need to calculate the offset geometry and pass that to openCSG. it only acts as a shortcut for boolean operations, which does not apply to offset
hyperair has quit [Ping timeout: 252 seconds]
L29Ah has quit [Read error: Connection reset by peer]
guso78 has joined #openscad
<guso78> Peeosalot, can you Tell me, where to Insert  this Code ?
teepee_ has joined #openscad
teepee has quit [Ping timeout: 255 seconds]
teepee_ is now known as teepee
guso78 has quit [Quit: Client closed]
J23504128 is now known as J23
<J23> anyone know what the reason for "EXPORT-ERROR: Can't add triangle to 3MF model." is .. happens with lazy union  and  it is unpredictable  just exported fine than a slight change of geometry (same number parts) and it can't be exported
guso78 has joined #openscad
ur5us has joined #openscad
L29Ah has joined #openscad
snaked has joined #openscad
guso7818 has joined #openscad
guso7818 has quit [Quit: Client closed]
ur5us has quit [Ping timeout: 260 seconds]
snaked has quit [Quit: Leaving]
teepee has quit [Remote host closed the connection]
teepee has joined #openscad
<JordanBrown[m]> guso78: I suggest that you look at how linear extrude or rotate extrude work.
guso78 has quit [Quit: Client closed]
snaked has joined #openscad
castaway has quit [Ping timeout: 252 seconds]
epony has quit [Ping timeout: 268 seconds]