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

    odowhacker

    @odowhacker

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

    odowhacker Unfollow Follow
    registered-users

    Latest posts made by odowhacker

    • RE: Ruby code editor

      thank you very much. πŸ‘

      posted in Plugins
      O
      odowhacker
    • Ruby code editor

      hallo all,
      i am trying to get used to ruby again - working with the ruby code editor 4.3 and sketchup pro 2016.
      working with one of the script examples 'using formulas for patterned panels' i'm running into a problem when i try to modify this script slightly.
      the example is about drawing circles in a plane. i'm trying to add faces to these circles and extrude them to cylinders. i'm getting errors that seem impossible to me - so i need your help.

      after much browsing QA articles with helpful responses for instance by TIG i noticed that possibly the error might have to do with the editor.

      script:

      ###############################################

      Script sample from Alexander C. Schreyer's book

      "Architectural Design with SketchUp"

      ###############################################

      Creates a square panel with a sinusoidal hole pattern

      mod = Sketchup.active_model # Open model
      ent = mod.entities # All entities in model
      sel = mod.selection # Current selection

      width = 36 # Width of panel
      n = 10 # Number of circles in each direction
      s = width / (n+1).to_f # Spacing of circles
      w = 50

      Add the square base for the panel

      face = ent.add_face [0,0,0] , [width,0,0] , [width,width,0] , [0,width,0]

      Iterate in the panel plane

      (0..n-1).each { |i|
      (0..n-1).each { |j|
      # Create a group for each circle
      group = ent.add_group()
      ents = group.entities
      # Add the circle
      centerpoint = [s+is,s+js,0]
      vector = [0,0,1]
      radius = Math::sin( i / (n-1).to_f * Math::PI ) * s / 5.0 + Math::sin( j / (n-1).to_f * Math::PI ) * s / 5.0
      edges = ents.add_circle centerpoint , vector , radius , 24

      #various trial and error to get a face inside
      #edges[0].find_faces
      #cface = edges[0].faces[0]
      cface = group.entities.add_face edges

      cface.back_material = [ (255 / (n-1)*i).round , (255 / (n-1)*j).round ,(255 / (n-1)*j).round ]
      #face.pushpull -w
      group.explode
      

      }
      }


      the add_face command is followed by error: not enough edges
      if i omit the command i'll get error: undefined method 'back_materia=' for nil so a face isn't created no matter which approach i use.

      the ruby console tellsme:

      "undefined method back_material=' for nil:NilClass (Line 37)" Error: #<TypeError: no implicit conversion of NoMethodError into String> C:/Users/errfitt/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:346:in +'
      C:/Users/errfitt/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:346:in rescue in block in initialize' C:/Users/errfitt/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/as_rubyeditor/as_rubyeditor.rb:368:in block in initialize'
      SketchUp:1:in `call'

      can someone tell me what's wrong and what i can do to solve this?

      thanks a bunch

      posted in Plugins
      O
      odowhacker
    • RE: Drape equal length grid

      very nice. thank you TIG.

      posted in SketchUp Feature Requests
      O
      odowhacker
    • Drape equal length grid

      is there something for SU comparable to "drape equal-length grid over shape"?Drape_Faces.gif
      http://www.bath.ac.uk/ace/structural-optimisation

      posted in SketchUp Feature Requests sketchup
      O
      odowhacker
    • RE: Snap-rotate around edge

      after some more trying with groups vs. "exploded" geometry i noticed that it is almost impossible to align several grouped faces (triangles) in one corner vertex with common edges congruent.
      if i draw the geometry connected all (6) edges will share the same vertex.
      if i group faces their corner vertices will snap out of the common vertex.
      this is weird. is it because SU doesn't like doubled geometry?

      fyi the free 1.3 version of DD allows 25 settings and works with SU7.
      found one in a czech SU forum: http://sketchup.wu.cz/forum/viewtopic.php?f=17&t=108

      posted in Newbie Forum
      O
      odowhacker
    • RE: Snap-rotate around edge

      woa - phantastic. thank you so much for taking the time to look into this.
      DD seems to achieve what i want - i guess snap rotation isn't really an option here.
      i hadn't known of this plugin - will try out right away. thanks again. p.


      have tried now - this is absolutely brilliant. in fact i never used parametric editing before.
      this allows for what i had in mind - a fully automated origami-base. foldable along certain fixed things.
      excellent. thinking of what else can be done with it - suppose i'll have to buy it.

      posted in Newbie Forum
      O
      odowhacker
    • RE: Snap-rotate around edge

      nope, it don't work. 😒
      setting a construction point via a calculated angle is never precise enough.
      with units set to millimeter and precision to .000 there will be measurable offsets of less than .01 mm with a 100m length. that's admittedly close but not what i want. an idea anyone?


      full7.png


      rotateprob.skp

      posted in Newbie Forum
      O
      odowhacker
    • RE: Snap-rotate around edge

      thank you, TIG. i'm afraid though it is not quite this easy.
      i do know how to use rotate along some edge or guide.
      i.e. i can rotate red and green so that the red edge is coplanar to the blue edge - that doesn't mean that the edges meet there. by rotating this 2axial way i can approximate closer and closer but never snap to it. think of each triangle as a group that mustn't change in size or angle.

      assuming the blue edge is fixed in its position - it will take two rotations (green and red triangle)
      to arrive at the only angle configuration that has red and blue edges meet perfectly.
      this can't be done with rotating around the given edges - see circles.
      it takes a constructive approach that i haven't yet discovered. πŸ˜•
      i am using guides - lots of em. well, all i could think of - half angle, right angles on vertices, parallel shifts and whatnot. alas..
      full2.pngfull3.pngfull4.png
      full6.png

      in order for a line rotate 'tool' to do this job it would need to drag faces along with the moving edge - restrained by common edges and fixed vertices. not easy i imagine.
      the known sides of the resulting tetrahedron would have to be taken into account for construction - i haven't the faintest how to do that.

      posted in Newbie Forum
      O
      odowhacker
    • RE: Snap-rotate around edge

      this is about what i want to achieve - actually i would like to be able to drop such a folded structure onto some other structure and see it fold accordingly - but that's probably asking a little too much.
      i need advise on how to rotate the green and red bit so that the red edge/vertices meet with the blue edge/vertices. please. 😎
      full.png

      posted in Newbie Forum
      O
      odowhacker
    • RE: [Plugin] Zero Tilt Camera

      maybe i shouldn't have posted this to plugins - it's rather simple and was meant ironic too.
      a beginners try at coding ruby/SUapi...
      the script is handy for me with walktrough animations where i would look around during setup (leave eye height and planar view) and also use different 'camera lens' settings.
      the effect desired was that of a steady cam (with a weigth underneath and the camera set to 90Β° from that weight).
      the two point perspective is kind of static and for me 'position camera' will often fail without a proper reference line or the axes.
      i mainly use the shortcut for setting up scene views - sort of constructing a camera path. transitions look nicer this way (same eye heigth, 0tilt and you can do a rotational move along the way.)

      ..the diversion in the chair overlay would occur if you choose 0tilt coming from a 2point perspective view. this won't work - i hadn't thought of the possiblity - i never use 2point.
      try with a house. inside. use the walk or move tool (hand) to navigate around once you've chosen 0tilt. you'll see.

      attached a dennismethod output of some planar view of a few huts..
      SW_dennisM.jpg.

      posted in Plugins
      O
      odowhacker