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
drfff has joined #openscad
J23k8 has joined #openscad
J23k has quit [Ping timeout: 245 seconds]
snaked has quit [Ping timeout: 268 seconds]
LordOfBikes has quit [Ping timeout: 240 seconds]
LordOfBikes has joined #openscad
snaked has joined #openscad
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
guerd87 has joined #openscad
califax has quit [Remote host closed the connection]
califax_ has joined #openscad
califax_ is now known as califax
_whitelogger has joined #openscad
<guso78[m]> Inphase, thank your your "Review". In contrast to OpenSCAD, Python Checks all the syntactical and lexical oddities on library Level already. Support you agreed with me , that this IS as stabile as Python itself.
<guso78[m]> But you are right: this does Not include Argument Testing for the openscad functions, and i think there are Tons of imaginable Echo Tests Missing.
<guso78[m]> ... Checks are Performer on ....
teepee has quit [Quit: bye...]
teepee has joined #openscad
caveman has quit [Remote host closed the connection]
caveman has joined #openscad
<Scopeuk> There is an entrie class of non floating types you could try and return
jonasbits has quit [Quit: No Ping reply in 180 seconds.]
mmu_man has joined #openscad
jonasbits has joined #openscad
<caveman> how difficult is it to create a programming UI for opencascade so that we have a NURB-based openscad alternative?
<caveman> imo NURBS is more scalable.
<caveman> but since openscad can re-run the entire code all over again, maybe mesh vs. nurbs is no longer important.
<caveman> am i getting it right? is this why openscad's use of mesh is no longer relevant? because one can edit any part of the code, and re-run the mesh generation all over just fine?
<caveman> can i pick a face in openscad, and extrude/pad?
<caveman> i guess this is the fundamental annoyance of using mesh: you cannot pick a face, since faces are unknown, as the whole thing is made of lots of triangular faces.
<J23k8> if you have access to the points that define the face - you can make it a polygon and extrude it.
ccox has quit [Ping timeout: 240 seconds]
ccox_ has joined #openscad
<caveman> J23k8: does openscad give such access?
<J23k8> if you build the polyhedron you have it .. there is something in development to render this information. However would be bit annoying to find the face if there are some million.
<caveman> so, i guess, ultimately, nurbs is cheaper?
<J23k8> so not sure how you will use this as you cannot click on a face to select it
<J23k8> can't see how nurbs would solve this
<caveman> faces in nurbs are defined even after manipulation.
<caveman> e.g. no little triangles.
<J23k8> you have control points that define a nurbs  you can not extrude a face of that nurbs
<caveman> at least, at any point, you click on a face, and it's well defined. i.e. not too many triangles.
<caveman> if we want to keep track of which triangle belongs to which original face, then the triangles should carry additional meta-data (if i get it right). then the selection has to be based on that meta data (e.g. select all faces that were originally part of object X's face Y).
<J23k8> "click"  there is no click in scad ..  You can have bezier or nurbs in scad but they are difficult to use because you need to define everything numerically
<caveman> would be nice if each face gets a unique identifier, so that you can pick the face and apply transformations on it. then, clicking on it in the 3d view would be nice to reveal the name of that face.
<J23k8> have you ever worked with polyhedrons in open scad?
<caveman> no. never did anything useful with openscad yet. just did single objects.
<J23k8> this explains your approach.
<J23k8> e.g. i have a module that highlight any given face .. but extruding that face wouldn't make sense in the way CSG works
<caveman> there is a python api for opencascade, which i think is what freecad is based on. i wonder how easy would it be to make a python UI with opengl, like openscad, but with opencascade backend, then let it do all the freecad things, except with openscad's programmable approach.
<caveman> latest pyocct is from 2021. i wonder if it's dead.
<J23k8> you are like  .. lets use a screwdriver .. weld a big block at the top so we can hammer nails with it
<caveman> more like: can we make a better hammel?
<J23k8> if you have an example we can show you how this can be solved in scad - or if scad is not suited for this
<caveman> polyhedron (points=[[0,0,0],[0,1,0],[0,1,1],[0,0,1]],faces=[[0,1,2,3]]);
<caveman> like this?
<J23k8> here https://imgur.com/a/ngEn8cK  this is made with openSCAD .. i am sure you can not do this with any CAD software
<caveman> extrude(face=Box001.Face003, distance='1cm') <-- better UI. i wish if it was like this.
<caveman> or, an oop approach: Box001.Face003.extrude('1cm')
<J23k8> just use linear extrude (10) polygon(points);
<caveman> then supply the points 1 by 1?
<J23k8> you already supplied points in the polyhedron
<caveman> when i typed ``polyhedron (points=[[0,0,0],[0,1,0],[0,1,1],[0,0,1]],faces=[[0,1,2,3]]);''?
<J23k8> yes .. so how would this be different
<caveman> yes, but that's -imo- a horrible ui. oop would help much better. also the language better be python. not sure why the syntax looks like c. is openscad is in C?
<caveman> or is it openscad's own language?
<J23k8> scad uses code .. your approach would be that mouse clicking  would change the code
<caveman> no. it could be fully in code too, as i gave an example in the oop syntax. e.g. box001.face003.extrude(...). here, the cli can have tab auto-completion to list the faces under each object, and as you select them, the right face gets highlighted in the 3d view without clicking.
<J23k8> openscad has its own script language which is funtional  like  Haskell https://en.wikipedia.org/wiki/OpenSCAD#Design
<caveman> why did they invent a new language instead of using an existing one?
<J23k8> because you need to handle geometry
<caveman> and existing scripted languages can't handle geometry?
<J23k8> no
<J23k8> i think it would be good to understand something before you want to change or improve it.
mmu_man has quit [Ping timeout: 268 seconds]
<J23k8> SCAD is  CSG  -  if you don't want CSG don't use scad
<caveman> csg = computer sexy graphics?
<caveman> oo. computer solid geometry.
<caveman> such a bad name. they might as well call it 'computer sexy graphics' and it'd be still about as bad.
<J23k8> constructive solid geometry
<caveman> btw, seen? https://declaracad.com/
<J23k8> you don't need python  it is just like a library.   openSCAD is very simple  you can write lots of modules but you need to learn these - a CAD program needs weeks of learning to understand how the tools are used
<J23k8> If you want this for SCAD just learn how to use any https://openscad.org/libraries.html
<Scopeuk> If you want something scad like but oopy openjsscad does that https://openjscad.azurewebsites.net/. Openscad like any other tool has it's own way of doing things and it can be both quite powerful whilst keeping things simple in a basic model. No tool is a perfect match for everyone but openscad has been a good match for me personally
peepsalot has quit [Ping timeout: 240 seconds]
* J23k8 was very happy when discovered oSCAD
<InPhase> caveman: That article is worth a serious read and consideration. At work we have a truly massive amount of code and process infrastructure, most of which was developed by people who do not work there anymore. So we end up bringing up Chesterton's Fence quite a bit. It is worth keeping as a part of one's reasoning.
<InPhase> caveman: In this case, the "fence" of not using the gui to edit the results has a pretty substantial benefit for a type of complexity scaling, and the benefit actually goes away if you tear down the fence.
<InPhase> caveman: Additionally, the fences within the domain-specific language of scad exist for a reason, providing a simplicity of the language itself and a safety of shared code. I claim that the success of OpenSCAD as the prominent language for programmatic CAD is built around the sharing community, which is itself built around the robust safety restrictions of the scad language itself.
<InPhase> caveman: One can remove that fence too! And in fact countless people have, as there are dozens of alternatives for programmatic CAD out there without these restrictions. And they are not widely used.
<InPhase> It is very common in complex system design that most of the benefits flow directly from what you cannot do. And it is worth a lot of attention to understanding why.
<InPhase> And any time you attempt to put a hole in that fence, you want to be very careful about it.
<gbruno> [github] AlexDep opened issue #4638 (VsCode and openscad) https://github.com/openscad/openscad/issues/4638
<guso78[m]> Did anybody try to build declaracad ?
<caveman> InPhase: so that's about restrictions in the language. but what about my idea: box001.face003.pad('1cm', angle='30deg', to_face=box001.face007)? isn't this nicer than the current openscad approach?
<caveman> e.g. box001 = Box(width='2cm', length='2cm', height='2cm'), would create those faces automatically. e.g. box001.face000, face002, ..., face005.
<caveman> if someone is not sure where is box001.face003, he can box001.face003.highlight() to see its location in the 3d view.
<caveman> or, maybe, box001.label_faces(), box001.label_edges(), box001.label_vertices()
<J23k8> caveman compare this to the actual scad code .. cube([x,y,z]);
<caveman> that's fine. box001 = cube([x,y,z]). the rest holds.
<caveman> my point is to abstract faces, so that we deal with them with higher level operations, without dealing with the points manually.
<J23k8> the question "why" stands ..  in what scenario this would be useful?
<caveman> to model like 'part design' workbench in freecad
<J23k8> it seems to be verbose if i need to define a polyhedron just to have a face extruded.
<J23k8> I see your problem, you know a different workflow and you don't want to learn something new but keep that workflow in a different software
<J23k8> As i tried to explain CSG works differently
<caveman> isn't my workflow easier?
<J23k8> how would you make a hole into that extruded face ? .. you also want a new method to difference a shape from that face?
<J23k8> no that is why SCAD exist because it works differently but you need to learn how to use it
<caveman> sketch001 = box001.face003.new_sketch()
<caveman> sketch001.add.circle(....)
<caveman> sketch001.pocket(...)
<J23k8> you creating a new software with new syntax - which is fine, but it is not openSCAD
<caveman> what do you think about what i'm creating. do you agree that it's a superior wheel?
<J23k8> no absolutely not
<caveman> oo. so, you mean, if i learn openscad's syntax, i'll actually see that it's simpler to model in it than in my approach?
<J23k8> yes - however there are cases that are not made for CSG
<caveman> got an example of such cases?
<mfg[m]> caveman: you seem to be used to a very imperative style of programming. scad isn't imperative afaik, it's functional. So if you know functional programming scad will become easier.
<mfg[m]> Also simple doesn't mean easy.
<J23k8> i mean it is not a bad idea to have faces as anchor reference, but this can be done with some lines of code if you need to
<J23k8> caveman if you like some examples .. have a look at the scadvent calendar  in the gallery
<J23k8> look how the code is done and compare how you would do this in freecad
<J23k8> (these are mostly short codes <100 lines )
<caveman> this almost has 100 lines per file, and there are 10s of files: https://github.com/josefprusa/Prusa3/tree/master/box_frame
<J23k8> never said josef prusa can write efficient scad code
<caveman> most of them are like that.
<J23k8> which is why i pointed you to the scadvent calender
<caveman> i got it from there
<J23k8> and when using a library your code shrinks to a few lines
<J23k8> (and sure a 3D printer is a complex thing - how would the freeCAD code look for that?)
Ckat has quit [Ping timeout: 256 seconds]
pah is now known as pa
mmu_man has joined #openscad
<gbruno> [github] kintel closed issue #4638 (VsCode and openscad) https://github.com/openscad/openscad/issues/4638
<J23k8> still wonder if a missing closed bracket couldn't be show the error where the bracket was opened and not at the end of the code
<teepee> maybe, it's difficult to do in the parser at least I did not find a good documentation on how to handle errors
<Scopeuk> You can probably do unexpected elf but that's not much more informative
<Scopeuk> Damn you auto correct s/elf/eof
<teepee> I do wonder why it's giving an invalid line number again, I thought that's fixed, and that's also an openscad issue
kintel has joined #openscad
<kintel> I may have closed that issue a bit early; after reading it twice it wasn't clear to me what part of this was a VS Code extension issue and what part was an OpenSCAD issue
<teepee> I've not seen a clearly reproducable example code, so if there's a complaint, we can reopen and ask for that :)
Guest62 has joined #openscad
<Guest62> oh wow, there are actually people on here
Guest62 has quit [Ping timeout: 245 seconds]
lagomorph has quit [Read error: Connection reset by peer]
<J23k8> if there would be an easy solution i would complain and open an issue with "{" as code to reproduce - Ü
<teepee> haha
<teepee> did we scare guest62 away?
<J23k8> you mean by not saying anything?
<teepee> yeah, by just being there
<teepee> I suspect it's probably related to include<>/use<> as those are mostly the reason for wrong line numbers in the past
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<teepee> well, mostly include<>
<J23k8> i often get those if i rearrange  code and some brackets are  double or missing .. and the error is not helpful so i need to check every bracket to find it
<teepee> yes, that's annoying, but the example from the issue seems to indicate a line number > total lines of file
kintel has joined #openscad
guso78 has joined #openscad
<J23k8> as you see in my image just a open bracket in line 1 give you an error in line3
<J23k8> which is two more lines than the code is long
<J23k8> funny  "union(){" give error line 2
teepee_ has joined #openscad
teepee has quit [Ping timeout: 240 seconds]
teepee_ is now known as teepee
lagomorph has joined #openscad
lagomorph has quit [Ping timeout: 240 seconds]
lagomorph has joined #openscad
<Scopeuk> that is curious, I guess it read past an implicit eol char to get to a new line and for a single { on it's own there is something inducing another one, maybe block scope?
snaked has quit [Quit: Leaving]
pa has quit [Ping timeout: 264 seconds]
pah has joined #openscad
peepsalot has joined #openscad
craftmaster1231 has joined #openscad
guso7891 has joined #openscad
guso78 has quit [Ping timeout: 245 seconds]
craftmaster1231 has quit [Ping timeout: 245 seconds]
pah is now known as pa
joseph_alt has joined #openscad
joseph_alt has quit [Client Quit]
guso7891 has quit [Ping timeout: 245 seconds]
<joseph_> kintel: I saw that earlier last month you rebased my branch from last year's GSoC to fix conflicts with the current master branch. My understanding is that Google prefers if #4330 is kept mostly preserved as an archive to show exactly what I worked on in 2022. So my proposal is that I'll force-push back the original commits to gsoc-2022, and further editing will happen on entirely new branch(es). 4330 could then be closed and
<joseph_> kept as a reference to construct the PRs that will actually get merged.
<kintel> joseph_ As long as you close the conflicting PR, that's fine with me
<teepee> ah, joseph_, there was a question about the timeline, the intention is a normal 175h project right?
<teepee> which is 12 weeks, the listed dates seem to indicate 14 weeks (which is possible too, like last year)
<joseph_> teepee: My intention is a 175 hour project for 12 weeks. I just now noticed a mistake that I made with the dates in my proposal. The end date is not supposed to say September 5. However, like last year it is possible that I might need to extend the deadline. But that is uncertain, so I did not mean to include an extension in the initial proposal.
<teepee> ok, that was my assumption too, so we just start out normal, and see how it goes. just wanted to double check as the org admins need to setup things
<joseph_> teepee: One question I still have is that the timeline from https://developers.google.com/open-source/gsoc/timeline says that coding begins May 29 and that the last week of the standard coding period ends on August 28. But I believe that timespan is 13 weeks. Is the final week not included in their count?
<joseph_> kintel: Sounds good, I will push back the original commits and close #4330. This approach has another benefit, which is that it could allow me to break up the changes into multiple smaller PRs if that's still what you'd prefer.
TheAssassin has quit [Ping timeout: 240 seconds]
<teepee> not sure, I think that last week is for closing up, evaluation and stuff
TheAssassin has joined #openscad
<kintel> joseph_ sounds good. Please reach out once you start working on the code, as there are some shader-related stuff we need to discuss
<teepee> I guess in the end it does not matter too much, we just need to make sure we are clear on the correct deadlines and try to have things ready ideally one day earlier :)
Ckat has joined #openscad
kintel has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest9 has joined #openscad
<Guest9> so I am super new to openSCAD (I use Fusion360). I am trying to make a specific product, if I may ask some how-to questions?
<teepee> sure
<Guest9> I imported an .stl and I need to add text to certain areas that will be subtracted. It has to be written in a way with variables that thingiverse.com can recognize? I have absolutely zero idea how to do this.
<Guest9> I managed to import the .STL, and add a block of text where I needed it, with the font I need. That's it
<teepee> using STL as input can be tricky as openscad requires well defined files (manifold / watertight)
<teepee> but otherwise it would be like "difference() { import("file.stl"); translate([...]) rotate([...]) linear_extrude(...) text("Hallo"); }
<Guest9> do I just assign variables as simple as
<Guest9> text1 = "Sample Text"
<Guest9> text2 = "More Text
<Guest9> difference() {
<Guest9>     text(text1, size = 10, font = "Arial", halign = "center", valign = "center");
<Guest9>     translate([-10, 0, 0])
<Guest9>     text(text2, size = 10, font = "Arial", halign = "center", valign = "center");
<Guest9> }
<teepee> text is 2D, the linear_extrude() will give it the 3rd dimension
<Guest9> what is the best way to figure out the translate position? Just keep changing it until I get it where I need to?
paddymahoney has joined #openscad
<Guest9> Is there a way to change the variable so that Text1 is called "Switch 1 Label" instead?
<teepee> if it's not super critical, I tend to use just some random translate() put the cursor into the number and use CTRL+UP/DOWN to change the number until it moves into place :)
<Guest9> can text be put on to 2 lines? "Line1\nLine2"?
snaked has joined #openscad