Close



Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Twisted box

  1. #11
    Engineer-in-Training
    Join Date
    Jul 2020
    Location
    Monterey Bay, California
    Posts
    368
    Add jamcultur on Thingiverse
    Quote Originally Posted by curious aardvark View Post
    programmer code lol

    why do you lot always write it back to front ?
    Ie: the modules last and the final instructions first ?

    So you actually drew a triangle, didn't even know you could do that and as I can't draw - I never would lol.

    Neat.

    Sunlu silk - I'll stick some on my christmas list :-)

    £25 a kg from amazon - not bad.
    Amazon econo do the same stuff for £23 :-)
    When I first started to code in 1974, the primitive compilers that I used then required you to put modules first so that the compiler would see them before seeing any reference to them. As compilers got more sophisticated and did multiple passes, you could put modules anywhere. That was a big improvement. Programmers were no longer limited by the limitations of the compiler. It never made sense to me to put modules first. I always wanted to see the code in execution order, i.e., the first code you see in the source code should be first code to be executed by the computer. I was happy that putting subroutines after the main routine was the standard at the software company where I worked for most of my career.

  2. #12
    Staff Engineer
    Join Date
    Jun 2014
    Posts
    892
    I thought one had to create the modules first, otherwise the calling code would not "see" it.

  3. #13
    Engineer-in-Training
    Join Date
    Jul 2020
    Location
    Monterey Bay, California
    Posts
    368
    Add jamcultur on Thingiverse
    Quote Originally Posted by fred_dot_u View Post
    I thought one had to create the modules first, otherwise the calling code would not "see" it.
    The issue was about where to put modules, not about when to create them. You do have to create modules before you reference them, but you don't have to put them at the beginning of your source code. You can put them at the end, if you like.
    Last edited by jamcultur; 10-22-2020 at 10:10 AM.

  4. #14
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,801
    yeah figured it was aprogrammer thing.

    So my ongoing openscad issue - how to make inported stl's actually work in a full render.

    I used to load stls into tinkercad and export them back to my computer - and any stl you did that to would work 100% in openscad.
    But tinkercad will no longer import stls.

    And even stls rendered by openscad - when re-imported do not work.

    Was just going to change the box so one half had a full cylinder and the other half was just arms, and fiddle the sizes slightly, so it doesn't require all the fine filing to get a smooth open and close.
    But will it do an f6 render ? will it buggery !

    no issue with f5 - but then there rarely is.

    So do you know of anything I can do to get openscad to actually work with imported stls.
    I've tried 'repairing' in simplify3d and exporting as both .bin and .ascii files.
    But they don't even show up in openscad at all.

    It's very bloody frustrating and I'm a man who doesn't get frustrated easily.

  5. #15
    Staff Engineer
    Join Date
    Jun 2014
    Posts
    892
    "I used to load stls into tinkercad and export them back to my computer - and any stl you did that to would work 100% in openscad.
    But tinkercad will no longer import stls."


    I just checked and was able to easily import an STL into Tinkercad. I did just that last week to modify a Thingiverse file, with zero problems. I'm aware Fusion 360 changed some features on the free license, but tinkercad did its thing for me.

  6. #16
    Engineer-in-Training
    Join Date
    Jul 2020
    Location
    Monterey Bay, California
    Posts
    368
    Add jamcultur on Thingiverse
    Yeah, I used to be able to import and modify STLs in OpenSCAD, but it doesn't seem to work anymore. It is very frustrating. In any case, the code I uploaded to this forum is a simplified excerpt of the code I used to generate my STL that was just meant to demonstrate some techniques. I don't know whether an STL generated from it would make a working box.

    It seemed like a fun challenge to make a box from two identical pieces. I was more concerned with how well it looked and worked than whether it would be useful, although I suppose it could be used as a cigarette box. It was easy to add an option to my code to specify how tall the inner cylinder should be. I'm printing one now with a full-height inner cylinder. If it works, and if Thingiverse cooperates, I'll post the STLs in a day or two.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •