sketchucation logo sketchucation
    • Login
    1. Home
    2. tpoz
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    T
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 9
    • Posts 19
    • Groups 1

    Topics

    • T

      Edge Orientation on a Rectangle

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      169 Views
      TIGT
      If the rectangle has a face then face.outer_loop.vertices are always listed counterclockwise [right-hand rule]. You can test if a face and its edge are 'reversed?' too...
    • T

      Behavior: shadows_face_sun

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      732 Views
      T
      Hey, It turns out that thomthom's first suggestion was the one! I thought I had tried that, thanks for the posts everyone! Laura
    • T

      Making components...

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      207 Views
      TIGT
      Alternatively just make a group and add entities to it... then turn it into a component when you are done... ### you'll need to define stuff like entities, pt1/2 etc earlier on - it's skipped here for brevity group=entities.add_group() group.entities.add_line(pt1,pt2) ### add as much as you want... instance=group.to_component definition=instance.definition definition.name="My Definition's Name" instance.name="My Instance's Name" tr=Geom;;Transformation.new(ptxyz) ### ptxyz = new insertion point, as it'll be located at the ORIGIN by default instance.transform!(tr) ###to move or even rotate/scale it as needed ### etc ### to now add further stuff to definition use### definition.entities.add_...
    • T

      Photo-match in the xy plane

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Discussions sketchup
      6
      0 Votes
      6 Posts
      576 Views
      X
      i think you would need to make your ground plane the same proportions as your image ie: 1024x768, which is 4:3 so it could be 100' x 75' for example. then when you create a new material in SU make sure to type these dimensions into the create material hieght width boxes before you select your image. paint the ground plane the you can scale it (make sure you scale uniform) and move it to fit your scene.
    • T

      Output Text ?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      326 Views
      J
      @tpoz said: is there anything fancy i can do with entity info if i label everything? On the serious side, you could do a shade analysis to see if the plants are goig to gt enough Sun. How about blending the color of the tomatoes from green to red as time passes? http://code.google.com/apis/sketchup/docs/ourdoc/color.html#blend Or (making the plants "grow" (scaling the plant size) as the growing season progresses? Sounds like a fun application of SketchUp!
    • T

      Changing the orientation and position of the axis?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      278 Views
      Didier BurD
      Hi Laura, Applying a transformation to geometry is available for groups and components. If your user rectangle is not a group or component, you'll have to retrieve what the user did exactly (translation, rotation) with its rectangle. That's not simple IMHO. If at first you make a group with the rectangle, then let the user translate/rotate it, it's really easy to draw openings in the rectangle because you can retrieve the group transformation and then draw your openings at origin and then apply the transformation to them, or each time you calculate a point of an opening boundary, apply the transformation to it: # Create the group; group=Sketchup.active_model.entities.add_group() # Draw the user rectangle here and let him translate/rotate it ... # get the group transformation; trans=group.transformation # Apply the transformation to a point of an opening; point.transform!(trans) # Explode the group if neede at the end of the draw; group.explode Hope this helps,
    • T

      Iterating over multiple hashes

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      185 Views
      T
      Thank you so much for the response! It works great!
    • T

      Access to hashes

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      389 Views
      T
      Hello, Sorry for the confusion! Thanks for pointing this out Fredo6. I'll try to better explain my predicament... I have list2 (beaphash and spihash - a list of all hashes) and list1 (user-generated list where each of the elements refers to a hash). So, I have a user-generated list (this code is just a snippet) and I want to access the the hashes that correspond to list1 and pull, say, the length of the "companion" array from these hashes. beaphash = Hash["companion" => %w{carrot corn pea}, "antagonist" => %w{beet broccoli onion}, "name" => "bean(pole)"] spihash = {"companion" => %w{lettuce pea radish}, "antagonist" => %w{}, "name" => "spinach"} tomhash = {"companion"=> %w{bean(pole) potato}, "antagonist" => %w{carrot}, "name"=> "tomato"} list1 = %w{bean(pole) tomato} list2 = %w{beaphash spihash tomhash} list3 = Array.new list1.each do|x| list2.each do|y| if y["name"] == x list3 << (y["companion"]).length puts "Hey, hash length; #{y.length} and name from hash; #{y["name"]} and name from list1; #{x}" puts "But beaphash name is #{beaphash["name"]}" else end end end ...then I can interleave list1 and list3 to make a new hash. I realize that I may have made this more complicated than it needs to be and there may be a simpler solution...I'm really new to Ruby! Any help would be very much appreciated! Thanks, laura
    • T

      Time Section Help...

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      206 Views
      T
      Thanks Jim!
    • 1 / 1