sketchucation logo sketchucation
    • Login
    1. Home
    2. FlobRob
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    FlobRob

    @FlobRob

    10
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    FlobRob Unfollow Follow
    registered-users

    Latest posts made by FlobRob

    • RE: Preventing Divide by Zero, problem with IF?

      daredevil

      yeh I saw your bridge, very impressive work. My models are a lot more humble but I aspire to create complex dynamic components. That is the reason why I would like to find out how to do these things nicely and elegantly.

      I presume the IF problem we both had is a problem with the way sketchup parses the IF function. I have a little experience with C++ from 20 years ago and would have expected it to work.

      Anyway I am wondering if I should learn Ruby and if these sort of things can be done in that. I am frustrated with the way you enter formulas in the dynamic component attributes dialogue, it works fine for simple components but it is difficult to read complex nested functions in such a small text box. Sometimes I have resorted to copy/paste into notepad, and use indentation to help match parenthesis and make it clearer and then copy/paste back. It would also be nice to be able to add comments.

      From seeing the bridge you've made you're obviously well ahead of me. I would like to produce fully configurable pieces of furniture and joinery for my business. Do you think I should persevere with Dynamic Components or will I discover that their limitations mean I should learn the Sketchup Ruby API?

      Again very impressive work you do, it would give me a real kick to produce something half as good as that ☀

      posted in Dynamic Components
      F
      FlobRob
    • RE: Group vs. Component

      I have exactly the same question, I like the idea of using groups inside my dynamic components as they don't clutter me up with lots of little sub-components that only have relevance within the main component.

      I have used both groups and components successfully and haven't noticed any discernable difference but I am a newbie.

      One day when I have time I have considered making a dynamic component using nested groups and an identical one using nested components and then compare the two for file size, speed etc.

      Unfortunately my TODO list is pretty long, I will watch this thread with interest

      posted in Dynamic Components
      F
      FlobRob
    • Preventing Divide by Zero, problem with IF?

      Hi All

      I'm a comparative newbie to sketchup and complete newbie to this forum. I have searched this forum as best I can and have found a couple of other people who have a similar problem but no solution. I'm hoping someone out there has worked this out.

      I have a simple component with a single custom attribute - angle.

      I then use LenX/TAN(angle) to work out LenY

      This works fine except when angle=90, because TAN(90) is undefined.

      In this case I would like to set LenY=0

      So I tried something like

      LenY = IF(angle=90,0,LenX/TAN(angle))

      and

      LenY = IF(angle<90,LenX/TAN(angle),0)

      In both cases sketchup evaluates the part of the IF statement not required and causes an error.

      I have solved this problem by evaluating the other angle in the triangle

      ie

      LenY = LenX*TAN(90-angle)

      but I wonder why the IF method didn't work and if anyone out there has any alternative methods to implement this sort of defensive programming to prevent divide by zero

      IF(attrib1=0,0,attrib2/attrib1)

      I know others have the same problem, surely this should be easy

      anyway thanxs in advance, I love Sketchup and this site looks great!

      posted in Dynamic Components sketchup
      F
      FlobRob