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: PLUGIN REQUEST - GFA Calculation

      That's just a little beyond my limited ability. Maybe someone else has done something like that. Good luck.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: PLUGIN REQUEST - GFA Calculation

      GFA_Report.rb is my attempt to solve your problem. In addition to displaying the information in a messagebox, it writes it to a .txt file.


      GFA Report

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: PLUGIN REQUEST - GFA Calculation

      For a simple block, load and run the following code from the Ruby Console

      def gfa_calc
      	mod=Sketchup.active_model
      	sel=mod.selection
      	if sel.first.is_a?(Sketchup;;Group)
      		ans=inputbox(["Floor to Floor spacing"],[3.m],"GFA calculation")
      		if !ans then return end
      		f2f=ans[0].to_l
      		unit=Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
      		case unit
      			when 0;uf = 1.0;u="inches"
      			when 1;uf = 12.0;u="feet"
      			when 2;uf=0.03937007874;u="mm"
      			when 3;uf=0.3937007874;u="cm"
      			when 4;uf=39.37007874;u="m"
      		end
      		width=sel.first.bounds.max.x - sel.first.bounds.min.x
      		depth=sel.first.bounds.max.y - sel.first.bounds.min.y
      		area = (width * depth)/ uf**2
      		height=sel.first.bounds.max.z - sel.first.bounds.min.z
      		floors = height/f2f; height /= uf; ta = area * floors
      		UI.messagebox "Area;     #{area}\nHeight; #{height}\nFloor to Floor; #{f2f}\nFloors;  #{floors}\nGFA;     #{ta}"
      	end
      end
      
      
      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Plugin problem in SU8

      Keith, I don't have a clue as to why your BoxJointTool splats but I know where it happens. I added a number of statements to print to a file then ran the program several times and in all cases it reached assentially the same place before crashing. The referenced zip file contains the output files, your modified .rb file, and my own version of a BoxJoint tool. The procedure for using mine is a little different in that instead of selecting the component then two edges, in mine, you select the component then the end face.


      BoxJoint files

      posted in Developers' Forum
      sdmitchS
      sdmitch
    • RE: Plugin problem in SU8

      ktkoh, I downloaded the plugin and model and tried it several times without a splat using SU8. Perhaps it is a conflict of some type with other plugins that are loaded.

      posted in Developers' Forum
      sdmitchS
      sdmitch
    • RE: Issues with the onMouseMove method within a Ruby Tool

      dagobo, to start, you could add a variable @first_click = false, then in the onLButtonDown or onRButtonDown methods toggle it by @first_click = !@first_click. In the draw method, use a if then else statement to draw different things given the state of @first_click.

      posted in Developers' Forum
      sdmitchS
      sdmitch
    • RE: {REQ} Perimeter Trace?

      EarthMover, Let me see if I have this straight. You want to create a face which is the outline of a selected surface structure. This face is located at or slightly below the lowest elevation of the selected structure. Then you want faces created that connect the outline to the structure that can be used to intersect with the surface. If so I offer FootPrint.rb version 2.

      There is one requirement and that is that the bottom faces of the structure have a normal.z < 0.


      Before and after model


      Create footprint of structure

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: {REQ} Perimeter Trace?

      I must admit I'm not at all sure what he wants but given the examples furnished and "maintaining the lowest Z height" what else could it be?

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Merge Items?

      @mattols said:

      I have two cubes 'touching' together.

      I want erase the lines between them and merge them into a unique object.

      I can I select them and do it?

      please help me.

      If faces that are touching are the same size and shape and are not offset then erasing the lines where the cubes touch will create a single object. If they are different in size and/or shape then they will have to be made into a group or component in order to have a single object.

      posted in Developers' Forum
      sdmitchS
      sdmitch
    • RE: {REQ} Perimeter Trace?

      earthmover, Here is my somewhat feable attempt at a plugin to generate the outlines you were looking for.


      Create outline of structures

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Is there a plugin for this?

      @unknownuser said:

      I am given the inside dimension, the arc height, the inner radius and the width (in this case, 44.25, 7.25, 37.77 and 😎 although in this instance it didn't quite work out that way.

      Thats because you have to use the inside dimension and height and calculate the inner radius or use the inner radius and calculate the inside dimension. So I guess the question is which one of these is the most important.

      The model referenced below shows the differences between the Arches using either the radius or the chord length.


      Arches by plugin


      Arches generated by plugin

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Any randomizing plugin which can do this?

      dereeei, Are the "boards" existing groups, components or what? Or is the plugin suppose to create them? If so then

      def random_boards
      	@Mod=Sketchup.active_model
      	@Ent=@Mod.entities
      	@Sel=@Mod.selection
      	ans=UI.inputbox(["Board Width;","Minimum Length;","Maximum Length;"],[6.inch,5.feet,10.feet],"Random boards")
      	if !ans
      		@Mod.select_tool nil
      		return
      	else
      		wid,min,max=ans; avg=(min+max)/2.0; last=0.feet
      		puts "min=#{min}, max=#{max}, avg=#{avg}" if $sdm_debug
      		xa=[1,0,0];ya=[0,1,0];za=[0,0,1]
      		@Mod.start_operation "random boards"
      		for i in 1..11
      			begin
      				len = (rand * 2.0 * avg).feet
      			end until (len >= min && len <= max && (len-last).abs > 1.0.feet) 
      			puts "len=#{len}" if $sdm_debug
      			x=i*wid;dx=wid/2.0;dy=len/2.0;last=len
      			ctr=Geom;;Point3d.new(x,0,0)
      			pt1=ctr.offset(ya,-dy).offset(xa,-dx)
      			pt2=ctr.offset(ya,dy).offset(xa,-dx)
      			pt3=ctr.offset(ya,dy).offset(xa,dx)
      			pt4=ctr.offset(ya,-dy).offset(xa,dx)
      			face=@Ent.add_face(pt1,pt2,pt3,pt4)
      			face.back_material=face.material="[Wood_ Floor]";
      			face.pushpull -0.5.inch
      		end
      		@Mod.commit_operation
      	end
      end
      
      
      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Move to a point

      blindleader, I know what you mean about trying to move an entity to a specific point because of fighting the inferencing. Give the plugin referenced below a try. Hopefully it will be the solution to your problem.


      Select point to move to then point to be moved from

      posted in Newbie Forum
      sdmitchS
      sdmitch
    • RE: [Request]Axis Rotate

      Andre, I had a simuliar problem recently and I solved it by exploding and re-creating the components which gives them the default axis orientation with the code below

      def reset_axis
        mod=Sketchup.active_model
        ent=mod.entities
        sel=mod.selection
        comps=[]
        if !sel.empty?
          sel.each{|e| comps.push e if e.class==Sketchup;;ComponentInstance}
          for i in 0...comps.length
            dump=comps[i].explode; sel.clear
            dump.each{|e| sel.add e if (e.is_a?(Sketchup;;Face) || e.is_a?(Sketchup;;Edge))}
            grp=ent.add_group sel
            grp.to_component
          end
        end
      end
      
      
      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Filling in lines and arcs

      SgtSlick, My guess is that somewhere in your roads outline, there is a point that has a Z value other than 0. All points defining a face/shape must be on the same plane. Try adding lines to "cut off" sections to see if they fill in. This should help you locate that point.

      posted in Newbie Forum
      sdmitchS
      sdmitch
    • RE: [Plugin] Axes Tools

      The attached model contains two not so "simple cubes". The one at the origin is the original cube. The one on the right is a copy which has been made unique and rotated 90 degrees. When the copy is selected, Change Axes show the insertion point of the copy at the back right corner as you would expect. Using your Axis Tool and choosing right,front,bottom does move the insertion point but the axes orientation is un-changed so, when it selected for placement, it appears un-rotated.


      Insertion point and axes orientation

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: [Plugin] Axes Tools

      @thomthom said:

      This plugin wonæt do it??? 😕

      I can't seem to come up with any combination that makes it work. I want to be able to copy and rotate a component around one or two axes then make it unique so, when I place it again, it maintains that orientation. Now when the the new component is selected for placement it returns to the orientation that it originally was. Using your Axis Tool doesn't change that no matter where I define the insertion point. Right clicking on the component and doing a Change Axes is the only thing that works but how do you code that?

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: [Plugin] Axes Tools

      ThomThom, I have been trying to redefine, from a plugin, the axes of a component instance that has been rotated and made unique to the default left,front,bottom location without any luck. This is an easy manual modification but seemingly impossible from code. Any suggestions would be greatly appreciated.

      posted in Plugins
      sdmitchS
      sdmitch
    • RE: Revision cloud line type plugin?

      @lithic38 said:

      Anything out there like that? I'm a former CAD user, and missing that "revision cloud" line type that was often used to represent a tree line in plan.

      Anyone know what I'm talking about?

      Yes, and unfortunately there are really no 'linetypes' in sketchup. The revCloud plugin, http://forums.sketchucation.com/viewtopic.php?p=337237#p337237, is close but the arcs are all the same not what you would normally draw for a tree or treeline. Maybe it could be modified to add some randomness.

      posted in Newbie Forum
      sdmitchS
      sdmitch
    • RE: [plugin]Random replacement of components

      Pilou, Thanks again for providing the tutorial. It looks perfect!!!

      posted in Plugins
      sdmitchS
      sdmitch
    • 1 / 1