Close



Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by curious aardvark View Post
    thought that was what I did by using modules - but please explain. I am using loops with modules. No clue as to how you render one bit and then use it in another bit.
    In the latest release of OpenScad... Goto File/Examples/Advanced/Children.scad

    I think there is a good chance you can do what ever size and complexity you want using that way to structure your code.

  2. #12
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,818
    glad about that ' cos I've found openscads breaking point :-)
    WARNING: Normalized tree is growing past 4000 elements. Aborting normalization. WARNING: Normalized tree has 7123 elements!
    WARNING: OpenCSG rendering has been disabled.
    that's a 40x30 grid.

    Oh yeah if I use 9 facets for everything - It doesn't actually crash :-)
    20x15 seems to be the limit.

    Well that's a very clever script - can't say any of it make much sense to me though.

    Although the text makes sense - was wondering how to use the new text command.

    But as far as the rest of it goes - that's just not how I write scad scripts. What's with putting modules last ? That's just illogical

    And while I did see a children(); command - not the foggiest what it's doing.

    This is the problem I have with the openscad manual - it's written by programmers for programmers. And I was never a programmer :-)
    What's with indenting everything - that really makes it difficult to see where a command line actually ends.

    So in words of one syllable - what does children do and how do I use it ?

    ps. I have stitched 2 15x20 boards together to make a 30x20 in s3d.
    first time I've seen the s32d slicer really struggle lol

    Now I've got to try and print the bastard lol
    Last edited by curious aardvark; 05-13-2015 at 10:39 AM.

  3. #13
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by curious aardvark View Post
    And while I did see a children(); command - not the foggiest what it's doing.

    ...

    So in words of one syllable - what does children do and how do I use it ?
    OpenScad compiles everything for every place it is used. But children() is sort of an exception to this. It compiles the code to do the child and then just keeps re-using it for the module referencing the child(). So that dramatically cuts down on the work (and memory) that needs to be done to generate the object you are building.

    The syntax for child() is the same as doing simple things like translate([0,0,0]) something(). If you define a module that references a child, then you just say

    my_module() the_child_it_references();

    And my_module() could go into a big loop placing the_child_it_references() a bunch of times even though it is only calculated once.

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
  •