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

    Topics

    • Chris FullmerC

      [Plugin] Color by Slope

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      52
      0 Votes
      52 Posts
      58k Views
      T
      Hello Tig (and Chris), Thank you to you both for the original colr by slope ruby and the modifications to it to show colors for various slope angles. I have found the rz. file but it is unclear what needs to be edited and replaced. Is a new color by slope plug in for the various angles available? Thanks again, TP Light - Now CA (previously UK) @tig said: Hope I'm not standing on any toes... ### edited/replace the code from here................ > faces = [] > flat = [] > angle = 0.0 > sel.each do |e| > faces << e if e.is_a? Sketchup;;Face > end#do > ### first set up some [r,g,b] colors for various slope angles > ### we use them if they exist, but if not make them... > if not color_00_20 = model.materials["color_00_20"] > color_00_20 = model.materials.add("color_00_20") > color_00_20.color= [120,0,0] > end#if > if not color_20_40 = model.materials["color_20_40"] > color_20_40 = model.materials.add("color_20_40") > color_20_40.color= [150,0,0] > end#if > if not color_40_60 = model.materials["color_40_60"] > color_40_60 = model.materials.add("color_40_60") > color_40_60.color= [180,0,0] > end#if > if not color_60_80 = model.materials["color_60_80"] > color_60_80 = model.materials.add("color_60_80") > color_60_80.color= [210,0,0] > end#if > if not color_80_90 = model.materials["color_80_90"] > color_80_90 = model.materials.add("color_80_00") > color_80_90.color= [240,0,0] > end#if > ### you can adjust the colors' rgb values to suit... > ### > faces.each do |e| > enorm = e.normal > flat = Geom;;Vector3d.new(enorm[0],enorm[1],0) > angle = (flat.angle_between enorm).radians ### angle in in degrees > ### now set up the tests for different angles > ### change these test ranges etc to suit your requirements... > if angle>=0.0 and angle<=20.0 > color=color_00_20 > elsif angle>20.0 and angle<=40.0 > color=color_30_40 > elsif angle>40.0 and angle<=60.0 > color=color_40_60 > elsif angle>60.0 and angle<=80.0 > color=color_60_80 > else ### angle>80.0 > color=color_80_90 > end#if > e.material = color > e.back_material = color > end#do > ### end of edit/replace................. > Make a backup copy of the original ruby script outside of the Plugins folder so it won't try load twice. If you mess up then you have the original to use again... Now edit/replace the version that's still in the Plugins folder, as set out above [open with Notepad.exe or equivalent plain-text editor]. Save it and restart Sketchup - all slopes should now be colored in the angle-ranges and colors you've specified...
    • Chris FullmerC

      [Plugin] Select Outer Edges v1.0

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      12
      0 Votes
      12 Posts
      20k Views
      O
      This just saved me a lot of trouble. Thanks!
    • Chris FullmerC

      [Tutorial] Beginning Ruby 2 - Writing a Script

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      327 Views
      3
      Are the rubie scripts based in the old dBase manner. It's been years for me but it looks almost the same as I remember...
    • Chris FullmerC

      Script slows down exponentially - help?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      19
      0 Votes
      19 Posts
      613 Views
      Chris FullmerC
      Thats odd. I never get bugsplats. I'll see if I can make it splat. I've attached my file - pre any tweaks I've trined from this thread. I've also included the file I used in the video. (its large and might take a few moments to load - sorry! [flash=944,759:2xbb34vu]http://www.chrisfullmer.com/chrisfullmer/forums/group_slowdown.swf[/flash:2xbb34vu] And again, I'm not sure its a "bug". Seems more like a sketchup issue. It gets slower at making groups when there are already lots in the model. If anyone think s of anything else, great! But don't stay up late thinking about it Chris group slowdown.skp clf_loose2groups.rb
    • Chris FullmerC

      &quot;Rosy&quot; translates on the fly - Impressive!

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      18
      0 Votes
      18 Posts
      545 Views
      pilouP
      I don't see French Chris test Are you beta testing of this surfer's wave?
    • Chris FullmerC

      &quot;Rosy&quot; traduza em 40 linguas - ao vivo! um video que eu fiz

      Watching Ignoring Scheduled Pinned Locked Moved Português
      2
      0 Votes
      2 Posts
      15k Views
      D
      Just some small changes to make inn there chris but nothing special: "A Google tem uma nova coisa chamado "Wave". E wave tem um robot "Rosy" que traduz muito bem enquanto você está teclando. Eu fiz um video que mostra as suas capacidades. Espero que voces gostem." By the way, this is using a Brazilian Portuguese translation. Does he make any diference in the Portuguese versions you can choose (portuguese from Portugal or portuguese from Brazil) or there just one type of portuguese?
    • Chris FullmerC

      My first Wave - Google Wave video I just made

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      6
      0 Votes
      6 Posts
      465 Views
      J
      It appears Wave won't be happening until closer to the end of the year. @unknownuser said: on September 30th, Google will start sending out about 100,000 invites for the next version of Google Wave. via http://mashable.com/2009/07/21/google-wave-invites/
    • Chris FullmerC

      Smustard.com Interviews at IO Conference

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      5
      0 Votes
      5 Posts
      292 Views
      P
      Way to go Rick and Todd. As always your efforts to improve SU or bring functionality to the end users that is not present in the base application is much appreciated.
    • Chris FullmerC

      Google Wave - Google's newest biggest thing

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      16
      0 Votes
      16 Posts
      930 Views
      plot-parisP
      you know whats the best thing about Wave? the developer team loves the Firefly series!!! [image: q7UJ_serenity.jpg] well, thats reason enough for me to love Wave!
    • Chris FullmerC

      [Plugin] Extended Views v1.2 UPDATE May 23, 2013

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      79
      0 Votes
      79 Posts
      128k Views
      D
      @tomaszdrgas Thanks a lot! I was already desperate with the original plugin, but your version worked. Btw im on su2019
    • Chris FullmerC

      Test if a point is between 2 points?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      251 Views
      Chris FullmerC
      Very good to know. I've never tested anything like that, but I had a suspicion that it is true. Thanks for thiking of a method that uses SU native natives. Mine involved an algebraic formula being applied to each x,y,z coordinate, and if it got fed zero's would return NaN or Infinity, so I also had to teste everynumber before it passed through. In the end, it was quite long and I'm sure it was slow. I've got it set up where I could do a time test on it, Id be interested in seeing how much faster it is. Thanks Fredo! Chris
    • Chris FullmerC

      Edge.split Point3d not working as expected?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      262 Views
      thomthomT
      It does sound like it should fail if it's not on the edge. I would have expected a nil return like many of the other functions when they fail.
    • Chris FullmerC

      Method library?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      186 Views
      Chris FullmerC
      I was leanin towards something like that too at first, but then when I remembered the [code] tag, I started liking that idea. Maybe a sticky that has a link to all [code] threads so its easzy to sort through them. I'm thinking a single thread might tend to have a method, then some posts and discussions, then another method, and some discussion, and on an one. And it might make it tricky to dig through 20 pages, with only 1 method per page or something. That is my onoly concern with doing a single sticky thread. I have a bezier method I'd like to post. It requires as input: point1, handle1, point2, handle2, segment_count. Thats it, and it returns an arc object, or with a tweak it just returns an array of Point3d objects. So thats one method I'd like to post. Another is one that will take any series of connected edge segments and return them in an ordered array of points from the beginning to end. Chris
    • Chris FullmerC

      [Plugin] Simple Loft alpha 0.1b -- UPDATED May-15-09

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      251
      0 Votes
      251 Posts
      149k Views
      N
      Thanks for another excellent effort in this Loft Tool.
    • Chris FullmerC

      Loft questions

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      26
      0 Votes
      26 Posts
      4k Views
      pilouP
      @unknownuser said: in what program are you making those loft images? Moment of Inspiration (Moi) (just image colorisation is made in 2D prog for fun & variety I don't believe that SU can actually makes the same than Zbrush! There are 8 000 000 polys in normal way at level 7 of subdivision ! And it just one object! So when you will make many objects in the same time SU will freeze before
    • Chris FullmerC

      Guidelines for adding a method to existing classes?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      423 Views
      danielbowringD
      @tt_su said: Note that extending Entity instances would not be allowed by EW because the instances are global to everyone using the SketchUp environment. But for other types such as Point3d, Vector3d, String etc that would work. Here delegators can be useful. require 'delegate' module DanielB class SampleFace < DelegateClass(Sketchup;;Face) def inner_loops return loops.find_all { |l| l != outer_loop } end end def self.demo face = Sketchup.active_model.selection.find { |e| e.is_a?(Sketchup;;Face) } return if face.nil? face = SampleFace.new(face) puts face.inner_loops end end
    • Chris FullmerC

      [Plugin] Exploded Arc Centerpoint Finder UPDATE May 23, 2013

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      59
      0 Votes
      59 Posts
      65k Views
      TIGT
      What makes you think it's not v8 compatible ? The previous post explained how to install it in v8 - but you do need the latest v8 version with the Preferences > Extensions > Install... button. If you don't have that, then get the latest v8 installer from here: http://help.sketchup.com/en/article/60107 Note how version 8 will no longer be supported after 20 May 2015, so keep a copy of the downloaded installer !
    • Chris FullmerC

      Me and my Guitar

      Watching Ignoring Scheduled Pinned Locked Moved Corner Bar
      20
      0 Votes
      20 Posts
      2k Views
      pilouP
      Very cool Michael Franti jam concert! (&Jeff )
    • Chris FullmerC

      Making a SketchUp tool - incorporating the mouse &amp; keyboard

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      55
      0 Votes
      55 Posts
      2k Views
      Chris FullmerC
      Here is your code how I tweaked it. I think all I did was move the if @thing == 0 to the bottom and then changed all the sets back to arrays and then made the @vert array uniq!. SO look this over and compare it to yours. See if that helps. require "sketchup.rb" class Pinchmover def activate @model = Sketchup.active_model @ent = @model.entities @view = @model.active_view @slct = @model.selection @slct.clear @vect = [] @verts = [] @dvert = [] @thing = 0 end def onLButtonUp(flags, x, y, view) if @thing == 1 vec=[] ip2 = view.inputpoint x,y pt3 = ip2.position pt4 = Geom;;Point3d.new pt3 @cpoint2 = @ent.add_cpoint pt4 prompts = ["Radius="] defaults = [ 0.0.to_l] list = [""] results = UI.inputbox prompts, defaults, list, "Please input desired radius." @rad= results[0].to_l @ent.each do |e| if e.typename == "Edge" @verts << e.start @verts << e.end end end @verts.uniq! @verts.each do |v| dist = v.position.distance @cpoint.position if dist < @rad @dvert << v end end @dvert.each do |d| # Doesn't seem to work. vec = @cpoint.position.vector_to @cpoint2.position @vect << vec end Sketchup.active_model.entities.transform_by_vectors @dvert, @vect @thing = 2 end if @thing == 0 ip1 = view.inputpoint x,y pt1 = ip1.position pt2 = Geom;;Point3d.new pt1 @cpoint = @ent.add_cpoint pt2 @thing = 1 end end end Sketchup.active_model.select_tool Pinchmover.new Chris
    • Chris FullmerC

      Beginning Ruby Tutorial

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      16
      0 Votes
      16 Posts
      729 Views
      Al HartA
      Chris, Thanks for making a ruby tutorial. Its always inspiring to look at someone else's code. Here is a version which use a hash instead of arrays to count all entities types; def count_entities model = Sketchup.active_model entities = model.entities count = {} # start a new hash entities.each do |e| stype = e.typename # start new count, or add 1 to existing count count[stype] = count[stype] ? count[stype] + 1 ; 1 end#loop sorted_keys = count.keys.sort sorted_keys.each do |key| printf("Total %-12s; %5d\n", key, count[key]) end#loop return nil end#def The weird line: count[stype] = count[stype] ? count[stype] + 1 : 1 would be easier to read as if (count[stype]) count[stype] = count[stype] + 1 else count[stype] = 1 end#if Keep up the good work
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 6 / 9