#openscad

/

      • Zaibitsu has quit
      • peepsalot has quit
      • peepsalot joined the channel
      • pie___ joined the channel
      • Github-openscad
        [openscad] thehans opened pull request #2142: Remove mixed tab characters from python source (master...pythontabs) https://github.com/openscad/openscad/pull/2142
      • Essington has quit
      • Essington joined the channel
      • Anthor has quit
      • ntnn joined the channel
      • pie_ joined the channel
      • dcg_mx
        Hmm, something that would be really nice is some built in functions for supplying common units as suffixes.
      • eg:
      • A = 10th
      • which results in
      • echo (A)
      • outputting 0.254
      • It's surprisingly common that I need to work in thou still
      • And I'm sure others would like a few of the common units to be available also, m/cm/mm/um, ft/in/th
      • Right now I have defined a function to do the job, but it's not as "clean" to write/read as a suffix
      • Ok, here's a question for the experts....
      • is there an easy way to bevel the inside and outside ends of a hollow cylinder
      • I can probably do a difference with a cone for the inside, and a difference with a difference of a larger cylinder or cube and a cone for the other
      • Just wondering if there is a better way?
      • justanotheruser has quit
      • ubitux
        maybe a difference of two circle which you linear extrude with a scale?
      • i doubt that's a better solution though
      • dcg_mx
        Hmm. Ok, I'll stick to the diff with a cone then
      • pie_ joined the channel
      • InPhase
        dcg_mx: function inch(mm) = mm/25.4;
      • Or, that's not the way you want it I guess.
      • But same idea.
      • dcg_mx: For the bevel, that is an acceptable approach, but the other way is to build it upward with rotate_extrude.
      • dcg_mx
        InPhase: Yep, already have `function thou(th) = (th*0.0254);`
      • True, rotate_extrude would work, but I'm assuming a cone is less cycle intensive to generate and test against than a rotate_extrude result.
      • (A cone is just a single right triangle with many rotations, while a rotate extrude is potentially far more complex)
      • Hmm, sorry that didn't read quite the way I intended.
      • A cone is just a triangle rotated to many angles.
      • That would be a closer match to my thoughts
      • cuakkk_ joined the channel
      • peepsalot has quit
      • Github-openscad
        [openscad] kintel pushed 1 new commit to master: https://github.com/openscad/openscad/commit/376...
      • openscad/master 37649da Hans Loeblich: Remove mixed tab characters from python source
      • InPhase
        dcg_mx: Actually the rotate_extrude is probably less intensive, because execution time generally scales with the number of faces that need to be evaluated. The subtraction of a cylinder and a cone produces extra faces that need to be removed, whereas the rotate_extrude from the 2D shape that already matches the end structure generates only the faces that are desired in the final shape.
      • dcg_mx
        Hmm. Ok you're proposing the entire hollow cylinder be rotate_extruded. I hadn't considered that option
      • InPhase
        Yes. You can trace out the full shape in 2D, since what you described has rotational symmetry.
      • This can be done either with 2D differences or a polygon operation.
      • dcg_mx
        Yep, I'll have a play with both options and see which performs better IRL
      • InPhase
        With rotate_extrude and polygon you can probably even write it all on one line.
      • dcg_mx
        Yeah, that's possible, although It's not a simple cylinder IRL, it's got a stepped flange one end, (that it's self needs bevelling) and the internal bevel at the other end won't be a simple angle or radius, instead it is a spline (in the curve sense)
      • InPhase
        A list comprehension can be used over a function to generate the spline for the internal bevel in the polygon.
      • buZz joined the channel
      • kintel joined the channel
      • dcg_mx
        Hmm, do you have an example of doing it that way. I've not tried before
      • kintel has quit
      • kintel joined the channel
      • Anthor joined the channel
      • travis-ci
        openscad/openscad#2836 (master - 37649da : Hans Loeblich): The build has errored.
      • kintel_ joined the channel
      • kintel has quit
      • kintel_ is now known as kintel
      • kintel has quit
      • kintel joined the channel
      • kintel has quit
      • kintel joined the channel
      • peepsalot joined the channel
      • peepsalot
        dcg_mx, i typically define constants at the top of my scripts if i want to mix units. mm=1; in=25.4; ft=12*in; etc. then whenever you want to specify units, you just multiply by your unit type
      • doesn't need to be a function call
      • thou = 0.0254; width = 100*thou;
      • dcg_mx, also, rotate_extrude is very fast, particularly if you can use it with a custom polygon to avoid CSG operations.
      • if you can sketch out (half of) the cross section of your shape on graph paper, then you can use polygon effectively
      • rotate_extrude of a polygon avoids CGAL operations. CGAL is the biggest bottleneck in OpenSCAD rendering, its glacial
      • alternatively if you still need boolean CSG operations, do as many you can in 2D as opposed to 3D, and then linear_extrude or rotate_extrude. this can also speed up your renders significantly
      • because 2D boolean use the clipper library, which is instant compared to CGAL
      • kintel has quit
      • kintel joined the channel
      • kintel has quit
      • kintel joined the channel
      • KimK has quit
      • kintel_ joined the channel
      • kintel has quit
      • kintel_ is now known as kintel
      • Doginal joined the channel
      • KimK joined the channel
      • kintel has quit
      • kintel joined the channel
      • gregor3005 has quit
      • gregor3005 joined the channel
      • gregor30051 joined the channel
      • cuakkk_ joined the channel
      • gregor3005 has quit
      • kintel has quit
      • gregor30051 has quit