Close



Page 1 of 2 12 LastLast
Results 1 to 10 of 72

Hybrid View

  1. #1
    Technologist dacb's Avatar
    Join Date
    Aug 2014
    Location
    Edmonds, WA
    Posts
    139
    Not to hijack, but I just want to put in a quick plug for openjscad instead of openscad. It performs way better (render time), doesn't have the wonky syntax and variable scoping oddities. I have switched over completely.

  2. #2
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    Quote Originally Posted by dacb View Post
    Not to hijack, but I just want to put in a quick plug for openjscad instead of openscad. It performs way better (render time), doesn't have the wonky syntax and variable scoping oddities. I have switched over completely.
    It is obvious from your work with the Marlin upgrades that you are either a professional programmer, or very competent in programming in various languages. For you, to switch between, say, C and Java might be as easy as changing shirts. However, some of us who are taking up 3D design haven't done any programming since they coded Pong on a Commodore 64 using GW-Basic.

    That's why OpenScad appears to be a good choice as the coding appears uncomplicated in its text form. I admit that I could probably create a 3D object in Rhino easier that I could in OpenScad at the moment, but I'm a late started of OpenSad. As I 've been working on my posts in this thread, I have started to pick up on how things happen. I like the interface. I did have a squiz at openjscad, and it did not jump out and grab me.

    For some of us, render time is not something we need to reduce down to jiffies as out minds still aren't much faster than split seconds.

    However, thanks for your comment, and perhaps the young Turks will follow your lead.

    Old Man Emu

  3. #3
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912

    Let's stop and review what we have done so far.

    I think that we should stop for a moment and review what we have done so far, and to consider if we should establish an agreed plan of attack.

    It is becoming clear that there are two groups contributing to this thread, and the groups can be identified by their familiarity with programming and software development in general. I place myself in the group that has very little experience. The other group contains people like Roxy, dacb, Printbus, Fri and the others who we see posting in the Marlin update thread. These people are obviously experienced programmers.

    I see my group as being like the typist in the word processing pool. We don't need to know the source code for Word, but would really like to be able to use as many of its features as possible. The other group is the developers back at Microsoft who are working to debug the current version of Word, and at the same time working on its updates.

    When I started this thread, I was sort of looking for the assembly of a document "OpenScad for Klutzes". I was, and am, prepared to pose the seemingly dumb questions, but in order to finish up with a useful document, I suggest that we need to go right back to Square One.

    I thought I had gone there when I started to ask about syntax, but replies to those questions have made me realize that syntax is at least Square Three. Having thought about it, I am now thinking that Square One is "The OpenScad alphabet". We have jumped too far ahead with what we are looking at at the moment. For me, it is like asking a First Grader to read War and Peace in the original Cyrillic script.

    I did some searching for 'symbols in programming' and found that, as well as the usual +, -, * /, sin, cos and tan, other symbols like braces, brackets, =, <,> and so on are just as important in getting a bit of code to work. Explanations of the use of symbols are not found in in the OpenScad documentation. I put that failure down to the documentation having been written by people who know their " programming alphabet" and forget that many users of the program they are developing can see the Cat on the Mat, but cannot express what they see in good code. The documentation is very heavily infested with programmers jargon, and even with mathematical knowledge that is beyond the ken of us Klutzes.

    I appreciate the input that the programmers amongst you have had to this thread, but I would ask you to dumb down your inputs until we simpleton users have caught on.

    Old Man Emu
    Last edited by old man emu; 12-04-2014 at 04:43 AM.

  4. #4
    Super Moderator curious aardvark's Avatar
    Join Date
    Jul 2014
    Posts
    8,818
    Quote Originally Posted by old man emu View Post
    I think that we should stop for a moment and review what we have done so far, and to consider if we should establish an agreed plan of attack.

    It is becoming clear that there are two groups contributing to this thread, and the groups can be identified by their familiarity with programming and software development in general. I place myself in the group that has very little experience. The other group contains people like Roxy, dacb, Printbus, Fri and the others who we see posting in the Marlin update thread. These people are obviously experienced programmers.

    I see my group as being like the typist in the word processing pool. We don't need to know the source code for Word, but would really like to be able to use as many of its features as possible. The other group is the developers back at Microsoft who are working to debug the current version of Word, and at the same time working on its updates.

    When I started this thread, I was sort of looking for the assembly of a document "OpenScad for Klutzes". I was, and am, prepared to pose the seemingly dumb questions, but in order to finish up with a useful document, I suggest that we need to go right back to Square One.

    I thought I had gone there when I started to ask about syntax, but replies to those questions have made me realize that syntax is at least Square Three. Having thought about it, I am now thinking that Square One is "The OpenScad alphabet". We have jumped too far ahead with what we are looking at at the moment. For me, it is like asking a First Grader to read War and Peace in the original Cyrillic script.

    I did some searching for 'symbols in programming' and found that, as well as the usual +, -, * /, sin, cos and tan, other symbols like braces, brackets, =, <,> and so on are just as important in getting a bit of code to work. Explanations of the use of symbols are not found in in the OpenScad documentation. I put that failure down to the documentation having been written by people who know their " programming alphabet" and forget that many users of the program they are developing can see the Cat on the Mat, but cannot express what they see in good code. The documentation is very heavily infested with programmers jargon, and even with mathematical knowledge that is beyond the ken of us Klutzes.

    I appreciate the input that the programmers amongst you have had to this thread, but I would ask you to dumb down your inputs until we simpleton users have caught on.

    Old Man Emu
    That actually makes it a whole lot more complicated.
    What you're suggesting is that we memorise every single command and symbol BEFORE actually doing anything practical.

    I'm actually in the third camp. Not a programmer, not a complete novice. I'm The User. I want to make things.

    So I start with something I want to make and work out what i need to learn for that model. And the more models I make the more openscad I absorb.
    But the important thing is: 'I'M USING THE PROGRAM ALL THE TIME'.
    When i come across something I want to do and can't, I go looking for the method to use.

    It's a more organic way of learning.
    I don't NEED to know every symbol openscad uses. I only need to know the ones relevant to the models I'm making at the time.

  5. #5
    Senior Engineer
    Join Date
    Jun 2014
    Location
    Burnley, UK
    Posts
    1,662
    Quote Originally Posted by curious aardvark View Post
    That actually makes it a whole lot more complicated.
    What you're suggesting is that we memorise every single command and symbol BEFORE actually doing anything practical.

    I'm actually in the third camp. Not a programmer, not a complete novice. I'm The User. I want to make things.

    So I start with something I want to make and work out what i need to learn for that model. And the more models I make the more openscad I absorb.
    But the important thing is: 'I'M USING THE PROGRAM ALL THE TIME'.
    When i come across something I want to do and can't, I go looking for the method to use.

    It's a more organic way of learning.
    I don't NEED to know every symbol openscad uses. I only need to know the ones relevant to the models I'm making at the time.
    I'm with you on that one. Cheat sheet open and once you work out what you need you figure which commands do it. Slowly you use the cheat sheet less and occasionally you need to learn something new and open it again.

  6. #6
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    Bugger it!

    I've just spent a good hour or so putting together something about modules and when I went to upload it I had been timed out. Stuff it. I'm going to bed

    Angry emu.jpg

    And by the look of the holes in that bird, a bloke would be a candidate for lead poisoning if he ate it.

    OME

  7. #7
    Super Moderator Roxy's Avatar
    Join Date
    Apr 2014
    Location
    Lone Star State
    Posts
    2,182
    Quote Originally Posted by curious aardvark View Post
    So I start with something I want to make and work out what i need to learn for that model. And the more models I make the more openscad I absorb.
    But the important thing is: 'I'M USING THE PROGRAM ALL THE TIME'.
    When i come across something I want to do and can't, I go looking for the method to use.
    I've been doing things along this line of thinking. But I would add one thing. Sometimes I can do what I want, but it is very clumsy and brute force. If I can see the source code from somebody else that solved the problem the 'right way' using the full power of the language, I can learn a lot from that.

  8. #8
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912

    Gleanings from this thread.

    In an attempt to consolidate the important things that have been said, I went through this thread and pulled out the tid-bits of information that advanced the topic. I've indicated who made the post, and the post number.

    I don't expect any replies to this current post. It is meant to be a hold-all so we can move on.

    Roxy Post # 4
    The Polyhedron is difficult to use. The points used to construct it have to be carefully ordered.

    Roxy Post # 6
    the round brackets on Difference() and Union() are just to denote that you are performing a 'function'. But that deviates from their usage in C where you are passing in parameters within the ().
    The square brackets are more consistent. If you see square brackets [], the contents is going to be used as a vector (or a point).

    Roxy Post # 8
    On difference() and union() and intersection() the ()'s have to be there... But nothing goes inside them.
    The curly braces {} enclose lines of code to form a 'statement' or 'block'. Everything within the first set of curly braces gets operated on by difference(), union() and intersection. Instead of parameters
    getting passed within the () as in C, the things that are going to get operated on are in specific places with the {}'s. (ie. things get subtracted from the first object specified in the {}'s of a difference() ).

    But in cube(), sphere(), etc... Parameters are passed inside the ()'s. So you can say something like sphere(r=10); Or cube( [3,4,5] ); Or cylinder(r=4, h=20);

    You can put a # in front of any line of code in OpenScad to see what it is producing.


    Old Man Emu Post # 10
    PUNCTUATION SYMBOL FUNCTION
    //
    /* and */


    // is used to insert Coder’s comments into the coding. Anything written on the same line is invisible to the program. If the comment goes into two or more lines, each line must begin with // to continue hiding its content. If the comment goes on for more than three lines, mark the first comment line with /* and end the comment with */


    { and } Braces hold things in a group. They must be used in pairs with each opening brace { matched with a closing brace }

    ( and ) Parentheses are used to hold the parameters of an object or operator. The parameter could be the radius of a circle or sphere, or it could be the co-ordinates of a point in space. When used with Boolean operations, the parentheses are left empty.

    [ and ] Square Brackets are used to hold the parameters that describe width and height of squares and also the depth of cubes. When used with Transformations, they hold the x,y and z coordinates associated with the particular operator (Translate, Scale, Mirror etc.) within parentheses.

    ; Semi-colons are the symbol that says “Do it!” A semi-colon is placed at the end of the coding that defines the object to be created. If the semi-colon is omitted, nothing is created. The automatic debugging facility in OpenScad will place a marker in the code to indicate where the bug is hiding.


    curious aardvark Post # 12
    1) use diameter NOT radius. ie: cylinder(d=10,h=5);
    2) the hull command.
    This is a brilliant command and answers a lot of questions. Like: how do i make a wedge ? Can i make non equalatrial triangles. And 'how on earth do I make an irregular shape without having to try and understand the polygon command' ?

    curious aardvark Post # 17
    Don't forget that openscad is text based - so you can use normal text tools. I used copy and paste in the above script. But say you haven't made fins a module (which i didn't), but want to change all three at once. Click edit and select Find and Replace. Then put -5 in the find box and -7 in the replace box. Hit all and f5. And the angle of all three fins changes.
    Admittedly this only works if you haven't used a -5 anywhere else.

    Old Man Emu Post #22
    Transformations have to be coded before the object the operate upon.

    Roxy Post #34
    A sphere and cylinder are always generated at (0,0). So when you translate them... what ever amount you translated them... Is where the center's are.
    In OpenScad you should have a 'Top Level' geometry. That is what that first singleduploblock(); is. It references other stuff, but it is at the top level.singleduploblock() does not have any parameters, and certainly does not need its name passed in as a parameter.

    curious aardvark Post #38
    But the really weird thing is that you used a cube command with no square brackets. And it worked. cube (32,32,20);

    Roxy Post # 39
    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.

    Roxy Post # 49
    What's a facet command? Searching the OpenScad manual doesn't find any reference to that. Update: I figured out what you meant. I suspect you are talking about the $fn parameter

    Roxy Post # 62 in http://3dprintboard.com/showthread.php?8855-Need-some-geometry-help
    the pow() function takes two parameters. The first number is the base and the second parameter is the exponent. pow(x,y) will raise x^y. Using a pow(3,4) would be equivalent to saying 3*3*3*3. You are raising 3 to the 4th power.


    Old Man Emu
    Last edited by old man emu; 12-09-2014 at 01:19 AM.

  9. #9
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    Ugly colours: I just put some random colours on each component so I could see boundaries and intersections. That's why I've put the coding for colour adjacent to the object being created. When I was fiddling about, I included opacity numbers (decimal from 0 to 1) to see if that improved clarity. When I had the coding done to what I thought was OK, I just deleted those values.

    Odd Looking Duplo block? Yes. I took it from the Duplo that is made for 18-24 month-olds. Here's some pics:

    P1013730 (Medium).jpgP1013731 (Medium).jpgP1013732 (Medium).jpg

    The next bit of coding to play with will be the bit that makes the object hollow.

    This single block can also be the basis of multiple units that are square, or rectangular.

    P1013734 (Medium).jpg

    Old Man Emu
    Last edited by old man emu; 12-04-2014 at 04:03 AM.

  10. #10
    Staff Engineer old man emu's Avatar
    Join Date
    Oct 2013
    Location
    Narellan, New South Wales, Australia
    Posts
    912
    Curious Aardvark - his father was a pheasant plucker, so he's a pheasant plucker's son. Oh it's so pleasant being a pheasant plucker's son, plucking pheasants in the sun. Plucking pheasants in the sun and being video'd by Mum.

    The whirring sound is Noel Coward spinning in his grave.

    OME
    Last edited by old man emu; 12-07-2014 at 07:17 PM.

Page 1 of 2 12 LastLast

Posting Permissions

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