sketchucation logo sketchucation
    • Login
    1. Home
    2. sdmitch
    3. Posts
    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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 4
    • Topics 54
    • Posts 1,483
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Create a grid lines X by Y plugin

      Hatch_It
      http://forums.sketchucation.com/viewtopic.php?t=38637

      Divide by Material
      http://forums.sketchucation.com/viewtopic.php?t=37719

      If the face is square then the divisions will be square also. You will need to add a color/material to the face.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Need Bird Mouth ruby for Rafters

      @unknownuser said:

      First I would like to enter anles rather then ratios (12:4);
      I am having problem with your span length enter 10' get something like 6'.

      I have modified plugin so you can enter a h:v ratio or degrees for the slope.

      The span entered is the full span from outside to outside of walls. It could be changed to half span if that makes more sense to you.


      Bird Mouth Rafter

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Terrain elevation calculator

      Not hard at all. I will make it into a normal plugin that you can access from the Plugins Menu.

      Check for PM.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Small question about rescaling components

      That seems to be goal Chris as I understand the problem. I have been looking at scale_reinit and there are two problems with it as I see. First, you have to have all the components selected before loading the script other wise it is not added to the context menu. Second, the scaled components aren't rescaled, they are replaced with an insertion point of corner(0) or lower left of the bounding box which is exactly where the demo model shows it.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Small question about rescaling components

      What are you trying to do. Scale up all component definitions in a model? if so

      mod = Sketchup.active_model
      ent = mod.entities
      sel = mod.selection
      defs = mod.definitions
      defs.each{|d|
        tr=Geom;;Transformation.scaling(2.0)#2X scale factor
        d.entities.transform_entities(tr,d.entities.to_a)
      }
      
      

      Of course scaling any one instance scales all instances of the the same component.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Terrain elevation calculator

      To find the location of the highest and lowest points, you would need to look at every edge making up the terrain mesh. The only way to do this efficiently would be a plugin such as

      
      def label_high_low
      mod = Sketchup.active_model
      ent = mod.active_entities
      sel = mod.selection
      hi_pt=nil;lo_pt=nil;hi=-1e9;lo=1e9
      hi_vec=[0,0,2400];lo_vec=[0,0,-2400]
      grp=sel.first;#select the GE 3D terrain 
      grp.entities.each{|e|
        if e.class==Sketchup;;Edge
          (hi=e.start.position.z;hi_pt=e.start) if e.start.position.z>hi
          (lo=e.start.position.z;lo_pt=e.end) if e.start.position.z<lo
          (hi=e.end.position.z;hi_pt=e.end) if e.end.position.z>hi
          (lo=e.end.position.z;lo_pt=e.end) if e.end.position.z<lo
        end
      }
      ent.add_text(hi.to_s,hi_pt.position,hi_vec)#label the high point
      ent.add_text(lo.to_s,lo_pt.position,lo_vec)#label the low point
      end
      
      
      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Small question about rescaling components

      liquid, You might give my Resize and Rename plugin a try.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Face between two arc curve

      hermann, The problem is that if you use edges or curves to add a face, they must form a closed figure which yours doesn't. What you need to do is extract and use the vertices of the two arcs to define the face. So after the first arc, add verts=arccurve.vertices. After the second arc, add verts+=arccurve.vertices. The add_face statement would then be face=entities.add_face verts.

      model = Sketchup.active_model
      entities = model.entities
      group = entities.add_group
      entities = group.entities
      
      # Halbkreis nach rechts / half curve to right
      center = Geom;;Point3d.new 150.mm,0,0
      normal = Geom;;Vector3d.new 0,0,1
      xaxis = Geom;;Vector3d.new 1,0,0
      start_a = Math;;PI/-2
      end_a = Math;;PI/2
      edgearray = entities.add_arc center, xaxis, normal, 50.mm, start_a, end_a
      edge = edgearray[0]
      arccurve = edge.curve
      verts = arccurve.vertices
      
      # Halbkreis nach links / half curve to left
      center = Geom;;Point3d.new 50.mm,0,0
      normal = Geom;;Vector3d.new 0,0,1
      xaxis = Geom;;Vector3d.new 0,1,0
      start_a = 0.0
      end_a = Math;;PI
      edgearray = entities.add_arc center, xaxis, normal, 50.mm, start_a, end_a
      edge = edgearray[0]
      arccurve = edge.curve
      verts += arccurve.vertices
      
      face = entities.add_face verts
      status = face.pushpull 20.mm
      
      
      
      posted in Developers' Forum
      sdmitchS
      sdmitch
    • RE: Explode all components

      d0n, Alan it right. I loaded 400 components into a file and ran a script to iterate through the file and explode them and it took 3+ hours. I tried Bomb.rb and I thought it was amazingly quick until I descovered that it didn't explode the embeded components also so you may have to run it several times. If you attempt to do anything while the plugin is running, you will get the "not responding" indications and win7 equivalent of the "hour glass" but that doesn't mean the plugin isn't working.

      posted in Newbie Forum
      sdmitchS
      sdmitch
    • RE: Show or highlight &quot;all of a material&quot; plugin?

      Interesting. Sorry it didn't work for you. Perhaps another Mac user will provide a clue as to why this is happening.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Show or highlight &quot;all of a material&quot; plugin?

      McGuyver, After re-reading your last post I think the problem is in how you attempted to use my plugin. You have to open up the material browser and either select the material from one of the options or use the eyedropper to sample a face with the material you want to check to establish the current material. Simply selecting the face does not do it.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Show or highlight &quot;all of a material&quot; plugin?

      McGuyver, Sorry the plugin did't work for you. Unfortunately I don't have access to a Mac to test on. Any chance you could post the model to the 3dwarehouse?

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Show or highlight &quot;all of a material&quot; plugin?

      McGuyver, I checked out Karen Walkerman's Material_Selection plugin and found that the selection seemed to work ok but the hide results were not so good. Anyway, I have hacked together my own version that you can try. The plugin, Select By Material, has two options. Option one is to select all entities with the current material appllied. Option two is to hide all entities that do not have the current material applied. Hopefully it will be of some use.


      select or hide entities by material applied

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: [Plugin] Bolt Maker (Final Update 7-Feb-2012)

      neffler, The error message you mentioned is one of the things I added to the latest version. I found that while testing and changing units from inches to millimeters and back again that it caused an error on one occasion when reading the defaults from the previous run. My guess is that this read error is what was causing the plugin to not run for you previously since I had not coded for this posibility. After dismissing the message, the plugin should run normally. I added this message just so you would know that and help explain why the defaults presented might not be what you expected or last entered.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Plugin to create all possible lines between points

      force of habit. the ; just seperates multiple statements on a single line. In this case the # is used to comment the remainder of the line.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Plugin to create all possible lines between points

      if the construction points are in the model

      mod = Sketchup.active_model
      ent = mod.entities
      sel = mod.selection
      pts=[];#initialize the points array
      #find all the construction points
      ent.each{|p| pts.push p.position if p.is_a?(Sketchup;;ConstructionPoint)}
      #draw all possible lines
      for i in 0...pts.length-1
        for j in 1...pts.length
          ent.add_line(pts[i],pts[j])
        end
      end
      
      
      posted in Plugins
      sdmitchS
      sdmitch
    • RE: [Plugin] Bolt Maker (Final Update 7-Feb-2012)

      Neffler and all, Why plugin Bolt Maker tends to be flaky is as much a mystery to me as you. I can assure you that Vista is not the problem since I developed Bolt Maker on a Vista system. As to size of bolts, I have made them from 1mm to 5" diameter without a problem. There is nothing "hidden" in the plugin that prohibits any version from running regardless of how many you have installed.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Need Bird Mouth ruby for Rafters

      @jpalm32 said:

      @sdmitch said:

      jpalm32, Are you looking for a plugin to add a bird mouth cut to an existing rafter or to create a rafter of given dimensions with all cuts applied?

      For a new structure! Want to enter formula and be able to list cuts.

      If you could provide an example of the input and output, I'll give it a try.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Need Bird Mouth ruby for Rafters

      jpalm32, Are you looking for a plugin to add a bird mouth cut to an existing rafter or to create a rafter of given dimensions with all cuts applied?

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: [REQ] Component Instances: Unlock, edit, &quot;relock&quot;

      Tig, How about this

          mod = Sketchup.active_model
          ent = mod.active_entities
          sel = mod.selection
          if sel.first.is_a?(Sketchup;;ComponentInstance)
            def_name = sel.first.definition.name
            comps = ent.find_all{|e| e.is_a?(Sketchup;;ComponentInstance) and e.definition.name == def_name}
            for c in comps
              if  c.locked?
                c.name = 'Lock Me' + c.name
                c.locked = false
              elsif c.name[0..6] == 'Lock Me'
                c.name = c.name[7..-1]
                c.locked = true
              end
             end
          else
           UI.messagebox("Select component to UNLOCK/RELOCK")
          end
      
      
      posted in Plugins
      sdmitchS
      sdmitch
    • 1
    • 2
    • 63
    • 64
    • 65
    • 66
    • 67
    • 74
    • 75
    • 65 / 75