Close



Results 1 to 10 of 72

Hybrid View

  1. #1
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,818
    Well I frowned at it :-)

    We're pretty much beginners here - so be gentle with us :-)

    Okay i copied and pasted the script - weird how the formatting just doesn't survive a copy and paste.

    Hate the colours - why ?????
    And are the plugs in duplo blocks really as long as that ?

    Looks really weird.

    Now that's better :-)
    duploblock-mono.JPG
    But the really weird thing is that you used a cube command with no square brackets. And it worked.

    cube (32,32,20);

    That should save some time.

    Also curious about this odd habit of putting modules before the module script.

    I tend to put modules at the start of the script to get the bulk out of the way and then use them in the script as a normal command.

    I've noticed a couple of times this habit of putting them at the end of the script. Just seems back to front to me.

  2. #2
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by curious aardvark View Post
    But the really weird thing is that you used a cube command with no square brackets. And it worked.

    cube (32,32,20);
    I suggest you put the [32,32,20] inside of brackets. If for no other reason than everybody else does and expects to see that. But now you are changing your tune. You said you wanted the h=36 instead of a simple 36 for the cylinder(). So... ????

    Quote Originally Posted by curious aardvark View Post
    Also curious about this odd habit of putting modules before the module script.

    I tend to put modules at the start of the script to get the bulk out of the way and then use them in the script as a normal command.

    I've noticed a couple of times this habit of putting them at the end of the script. Just seems back to front to me.
    OpenScad is very loosely typed and doesn't care about forward references. Mostly, you want the code to be manageable and easy for other people to understand. So, my preference is to put equates up at the top, and invoke the modules I want very early. Then, I tend to use the bottom part of the file as a library to define the stuff that I used up at the top of the file.

    But that is me.... As long as it is well organized, clean and easy to understand, nobody is going to complain.

Posting Permissions

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