FredoBend | Powerful new bending tool for SketchUp Download

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Ordering 3dpoints ?

    36
    0 Szavazatok
    36 Hozzászólások
    4k Megtekintések
    Didier BurD
    Yep, on any plane Here is the rough test code: make a selection of n coplanar guide points on any face, type 'graham' in the console and it draws the convex hull correctly. As you will see, code is yours almost entirely. It's likely there is something wrong in my classes or methods. def graham() pts=[] # Selection of coplanar guide points to array pts Sketchup.active_model.selection.each { |cp| pts.push(cp.position) } # Transform points to horizontal plane t1=Geom;;Transformation.new(pts[0],pts[0].vector_to(pts[1]),pts[0].vector_to(pts[2])) horizPoints = pts.map { |pt| pt.transform(t1.inverse) } # Sort by X and Y points = sort_points_by_x_y(horizPoints) # Graham l_upper = [ points[0], points[1] ] 2.upto(points.length - 1) do |i| l_upper << points[i] while l_upper.length > 2 && !right_turn?(l_upper.last(3)) l_upper.delete_at(-2) end end l_lower = [ points[-1], points[-2] ] (points.length - 3).downto(0) do |i| l_lower << points[i] while l_lower.length > 2 && !right_turn?(l_lower.last(3)) l_lower.delete_at(-2) end end l_lower.delete_at(0) l_lower.delete_at(-1) # Reset convex hull to its original transform hull=(l_upper + l_lower).map! { |pt| pt.transform(t1) } # draw hull Sketchup.active_model.entities.add_line(hull) Sketchup.active_model.entities.add_line(hull.last,hull.first) end def right_turn?(points) p, q, r = points return (determinant_3x3([1,p.x,p.y,1,q.x,q.y,1,r.x,r.y]) < 0.0) end def determinant_3x3(array) a,b,c,d,e,f,g,h,i = array return ((a*e*i) - (a*f*h) + (b*f*g) - (b*d*i) + (c*d*h) - (c*e*g)) end def sort_points_by_x_y(points) return points.sort! { |a,b| a.x==b.x ? a.y <=> b.y ; a.x <=> b.x } end
  • Group from Selected Entities

    7
    0 Szavazatok
    7 Hozzászólások
    497 Megtekintések
    thomthomT
    cheers
  • Call for attention - context handlers and validation procs

    24
    0 Szavazatok
    24 Hozzászólások
    34k Megtekintések
    Dan RathbunD
    not really... the context menu is "built on the fly"... The menu needs to know what items and submenus it will need to display. It cannot know what they will be until Sketchup processes all the context_menu_handlers.
  • Complex numbers and other libraries

    5
    0 Szavazatok
    5 Hozzászólások
    516 Megtekintések
    Dan RathbunD
    It's in the Standard (ie Extended,) Libraries for 1.8.6 (not in the Core.) In Files lib/complex.rb lib/mathn.rb You need a full ruby installation. You need to add paths to the $LOAD_PATH array. I have a topic on this and a utility script called !loadpaths.rb Addenda: -See these posts: for the !loadpaths.rb script: [code] Ruby LOAD PATHs script for (Win32) and for info: same topic near the bottom.. for the complete Ruby libraries (with precompiled .so files,) direct from ftp.ruby-lang.org: to match SU 8.0M0 & M1: ruby 1.8.6-p287* for Ruby 1.8.6-p369 (latest as of this posting.) requires you replace DLL in Sketchup program folder if on Windows.* See instructions: Ruby Interpreter DLLs (Win32) Also see: Ruby Newbie's Guide to Getting Started
  • Online Editing on Google Project Hosting

    6
    0 Szavazatok
    6 Hozzászólások
    865 Megtekintések
    thomthomT
    That's neat!
  • No constructor for Vertex object ?

    6
    0 Szavazatok
    6 Hozzászólások
    524 Megtekintések
    TIGT
    @thomthom said: @tig said: If you think about it a Vertex can't exist without an Edge ! No in SketchUp world - but you can create stand-alone vertices in 3DsMax. I was talking "in Sketchup World"... where else are we? You can make a 'guide-point' in Sketchup - cpt=entities.add.cpoint(pt) but it isn't a vertex - cpt.position will return its Point3d though... cpoints don't 'stick' to anything so they are relatively useless as 'vertices' but can form useful 'markers for future vertices - like 3d-mesh made from a points cloud...
  • Accessing Menu Objects from Submenu's

    4
    0 Szavazatok
    4 Hozzászólások
    386 Megtekintések
    Dan RathbunD
    @david. said: Yes, I realized that. I thought there might be a way through the SU UI similar to accessing toolbars that have been created. Apparently, not. Not a big issue. Actually the API lacks a Toolbars collection, which we have wanted. Now with the name method (just added, we can create one, 'on the fly'.) module SuchandSuch Toolbars={} ObjectSpace.each_object(UI;;Toolbar) {|tb| Toolbars[tb.name]=tb } end You refer to the just added method each which accesses the buttons ( UI::Command objects,) on a given toolbar. But ... the Sketchup::Menu class has not yet been updated with Enumerable methods (which should include each_item and each_submenu iterator methods;) nor any name, parent, etc getter methods. We'll have to cross our fingers for the next MR.
  • How is better and faster?

    5
    0 Szavazatok
    5 Hozzászólások
    314 Megtekintések
    Dan RathbunD
    I usually keep the toolwindows "in my stack" rolled up, with the EntityInfo open, on the bottom of the stack. (Because it varys in height depending on what is selected, when it's at the top, the whole stack jiggles up and down in a most annoying way.) Anyway.. I only unroll a toolwindow when I'm actually using it.
  • SKX Project? Win32::API ?

    33
    0 Szavazatok
    33 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    if they were to.. yes are they likely to... if they poke about and learn a bit, and end up using the Installer, they will have minGW compiled Ruby, and should use a copy of the minGW interpreter DLL with Sketchup. ... but if they go with what ever Google gives them .. a large percent of the users, they'll have th mswin32 compiled DLL.
  • WebDialogs made with hashes don't store settings?

    10
    0 Szavazatok
    10 Hozzászólások
    579 Megtekintések
    thomthomT
    @driven said: although I think they did before the latest upgrade I tried the hash in V7.1 - didn't work there either. Created the section key, but not any of the position and size keys. @dan rathbun said: I will say that the UI::WebDialog.new() method is "cranky" when it comes to processing arguments... if you put nil as the pref_key arg, the method stops processing the remaining args. I tested that yesterday, Doesn't do that in SU8M1. @dan rathbun said: Note that processing of a hash is also cranky... it doesn't work correctly if string keys are used (at least on SU 7.x,) Seems hashes with keys are cranky as well. I always use symbols. @driven said: has anyone got a working example of any WD that can be re-positioned... You can always reposition and resize after you created the WD object. Note that, if you set a preference key, then the size and position you give in new will be ignored if there exist values in the registry. @dan rathbun said: One of the changes, for SU 8 was an updated user agent string ... I wonder if that's causing this problem? I see the same problems in SU7.1. So it doesn't appear to be new. And I'd be surprised if the web control's user-agent-string affected the a ruby method.
  • SketchUp 8 Bugs &amp; Troubles!

    25
    0 Szavazatok
    25 Hozzászólások
    4k Megtekintések
    J
    Thanks Brad! As far as I know, only the 4 stipple types have been documented. If other types are supported, it would be great to get those documented and to be able to use them.
  • Has anyone successfully added dynamic 3D model to website?

    8
    0 Szavazatok
    8 Hozzászólások
    801 Megtekintések
    C
    ICEVision supports Sketchup files as well as a variety of other formats. http://icevision.ice-edge.com/features.jsf
  • Static component/object in front of camera

    6
    0 Szavazatok
    6 Hozzászólások
    546 Megtekintések
    Chris FullmerC
    I've got a few snippets of code I could send you if you want to dig through them. Does it have to really be a sketchup component? Or can it just look like a navigation wheel? A few of us have played a LOT with the draw methods. You probably can do exactly what you want with those. If interested, I'll PM you an example or two. Chris
  • Note to self - Delete Thumbs.db before .zipping a plugin

    5
    0 Szavazatok
    5 Hozzászólások
    498 Megtekintések
    J
    @dan rathbun said: And by the way... in the same list, you can eliminate the thumbs.db file if you check "Do not cache thumbnails" Yeah, but it's slow enough when I hit a folder with a lot of files in it. Caching thumbnails is speedier for me.
  • Strange warning

    3
    0 Szavazatok
    3 Hozzászólások
    277 Megtekintések
    Dan RathbunD
    ** Please, could you change the topic title to "Warning: Float out of range" @didier bur said: def myMethod() > x=y=z=0.0 When loading the rb file, this message appears in the console: @unknownuser said: warning: Float 0.0 out of range Do you get the same warning if you do: def myMethod() x=y=z=(0.0e0) end I get no warnings at all at the Console.
  • Group#copy fails on Mac?

    6
    0 Szavazatok
    6 Hozzászólások
    362 Megtekintések
    J
    Well, it wasn't mover2, and it's still not resolved. Will check SketchyPhysics, thanks.
  • Opening the ruby console

    3
    0 Szavazatok
    3 Hozzászólások
    264 Megtekintések
    TIGT
    http://sketchuptips.blogspot.com/2007/08/plugin-ruby-toolbar.html Takes it a step further and also adds a toolbar button to do it for you - using the same Sketchup.send_action("showRubyPanel:") as Pixero suggested...
  • Help witn AppObserver.onQuit

    3
    0 Szavazatok
    3 Hozzászólások
    213 Megtekintések
    honoluludesktopH
    OK, makes sense. The only other way I can think to do the above is to have a timer on one instance that checks a memory flag from time to time, but that's too much overhead.
  • Array doesn't work...

    4
    0 Szavazatok
    4 Hozzászólások
    466 Megtekintések
    K
    Works! Thank you!
  • Help with arrays

    11
    0 Szavazatok
    11 Hozzászólások
    459 Megtekintések
    Dan RathbunD
    @pixero said: Its actually the continuation of this thread: [url]=ttp://forums.sketchucation.com/viewtopic.php?f=180&t=33862]How to compare points on a plane?[/url] OK. So the data_array contains Geom::Point3d objects? What kind of object does the test_array contain? What is the logical condition that you want the data_array elements to be added to the new_array? If a false results from the logical test, is putting nil into the new_array OK, or do you wish some other value (perhap [0,0,0] or whatever) ? We need to be careful when comparing Geom::Point3d objects, as Google overrode the .< and .== methods (to make them dependant upon the 0.001" internal tolerance.) You should decide if that's OK for your purposes.

Advertisement