⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • The best

    3
    0 Szavazatok
    3 Hozzászólások
    615 Megtekintések
    C
    Thanks David that was very helpful
  • Rotate a texture

    9
    0 Szavazatok
    9 Hozzászólások
    2k Megtekintések
    thomthomT
    I'm working on mirroring the texture and UV mapping of front faces to the backside. Anyone got any idea on how to do that?
  • Randomise textures

    6
    0 Szavazatok
    6 Hozzászólások
    673 Megtekintések
    thomthomT
    Well, ... I just dived into SU ruby because I wanted to create a ruby that mirrored the texture from the front side of faces to the back side of faces. I've been digging in the docs to try to work out how to position textures. I only managed to position a texture in 2d reliably. Even then I'm not sure I'm 100% sure what's happening. I haven't managed at all to get any info from the front face UV co-ordinates that makes any sense. I had hoped that I'd find some good info on this forum. But seeing that the general consensus on SU Ruby texture mapping is confusion I'm now worried to what task I've let myself into. I'd like to try to prompt some of the SU dev team to shed some light to this matter of UV coordinates.
  • [IDEA] Fish skin

    6
    0 Szavazatok
    6 Hozzászólások
    1k Megtekintések
    S
    Yes it is better to displace it in rendering process. But if you wish to present it in SU than modelling becomes an option. It would be very nice to have kind of populate script to work within given/chosen surface (including curved). One would be able to choose other surfaces/shapes to populate with. I supose one need to have some parameters; ie density (how much the shapes are allowed to overlap if any) and how do you treat intersection with given surface....Probably it would be useful to have "try again" if one is not happy with solution. It might be plugin already which can do this, or not.
  • Windows and Mac...are the Ruby the same for both?

    8
    0 Szavazatok
    8 Hozzászólások
    676 Megtekintések
    C
    Thanks for everyones input. I'll pass it on to my friend.
  • WebDialogs: To sub-class or not?

    3
    0 Szavazatok
    3 Hozzászólások
    323 Megtekintések
    A
    a) subclassing and instancing b) instancing If you only need a window to display information, b) would do it. But if your dialog is more complex, subclassing seems to be a good choice, because you can let your class do a lot of things, i.e. generating the HTML by overriding the original set_html method: class AzubyDialog < UI;;WebDialog private def generate_html arg s = '' # TODO; implement your HTML generator code s end public def set_html arg super(arg.kind_of?(String) ? arg ; generate_html(arg)) end end azuby
  • Ruby challenge 2 ?

    18
    0 Szavazatok
    18 Hozzászólások
    3k Megtekintések
    M
    WHOA, So I have to give a try to the free versionof SU7, but, I think my computer will begin to say ARRGHH... (quite old... )
  • Help with Copy Along Path....

    13
    0 Szavazatok
    13 Hozzászólások
    765 Megtekintések
    C
    Done in 4 pcs.... [image: ZOfu_hose.jpg]
  • REQ: ANother camera

    31
    0 Szavazatok
    31 Hozzászólások
    2k Megtekintések
    O
    hey guys.. you think that i'm crazy??
  • Joint Push Pull Question

    2
    0 Szavazatok
    2 Hozzászólások
    328 Megtekintések
    ToboboT
    I think Fredo6 is the best to answer this question. I would post it here http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=6708&st=0&sk=t&sd=a&hilit=joint+push+pull
  • Sketchup game

    3
    0 Szavazatok
    3 Hozzászólások
    488 Megtekintések
    chrisglasierC
    @dhruv said: How can I load different .skp files to my game from webdialogue?(I want to do this cause I dont want to go every time to drop down menu from plugins and load the map) Not truly professional I'm sure but this works #RUBY @dlg.add_action_callback("load") {|d, p| a= p.split(",") subDir ="Components/NamesetComponents/" fileName = a[0]+".skp" model = Sketchup.active_model entities = model.active_entities theX = Integer(a[1]).mm theY= Integer(a[2]).mm theZ = Integer(a[3]).mm point = Geom;;Point3d.new theX,theY,theZ txyz = Geom;;Transformation.new point path = Sketchup.find_support_file fileName, subDir definitions = model.definitions componentdefinition = definitions.load path instance = entities.add_instance componentdefinition, txyz theDegrees = Integer(a[4]).degrees theAxis = a[5] rv = Geom;;Vector3d.new(0,0,1) if theAxis == "z" rv = Geom;;Vector3d.new(0,1,0) if theAxis == "y" rv = Geom;;Vector3d.new(1,0,0) if theAxis == "x" tr = Geom;;Transformation.rotation(Geom;;Point3d.new(instance.bounds.center), rv, theDegrees) instance.transform! tr } //JAVASCRIPT function loadSkpFile(){ param = new Array(theFile,theX,theY,theZ,rz,theAxis) param = param.join(",") window.location.href = 'skp;load@'+param } @dhruv said: How can I open a web - browser by left clicking on the model? (Something like onclick function from maybe dynamic components) As I understand it, you can do it with a selection observer, but I haven't figured out the code for that. Hope this is useful. Chris
  • WebDialog crashes Sketchup

    5
    0 Szavazatok
    5 Hozzászólások
    585 Megtekintések
    A
    Hm OK, you see me surprised. Till now I have used an HTML code similar to the following for my "Update" button: <input type="button" onClick="javascript&#058;window.location = 'skp;foo@'; return false" value="Update"> After I changed it to: <input type="button" onClick="javascript&#058;window.location = 'skp;foo@bar'; return false" value="Update"> Sketchup doesn't crash any longer. puts "Well, and now I'll clean up my Ruby code." what the f... =begin azuby =end
  • Is it possible...

    7
    0 Szavazatok
    7 Hozzászólások
    849 Megtekintések
    TIGT
    @whaat said: Is it possible to enter 'component edit mode' with Ruby? Is it possible to prompt the user to browse for a file folder (not a file)? If not, consider these requests for the next service release of SU. Thanks. I used a trick to edit groups [PC only] - components could be done similarly... require 'sketchup' require 'win32ole.so' def edit_group ### an example of access SUp tools not otherwise available... ### make shortcut here if NOT set already = ctrl+alt+shift+G ### check that you have one group selected and if so do this... WIN32OLE.new("WScript.Shell").SendKeys("+^%{g}") end#def ### run it from within other tools ### the menu here for test only... if(not file_loaded?("edit_group.rb")) UI.menu("Plugins").add_item("Edit Group"){edit_group} end#if file_loaded("edit_group.rb") ### This is how I find a directory - you do need to pick a file in it though... require 'sketchup.rb' #----------------------------------------------------------------------------- def materialimporter model= Sketchup.active_model materials= model.materials model.start_operation ("Import Materials") ###undo - see commit at end pwd= Dir.getwd.split("/").join("\\")+"\\" ### fix for SU drctry= UI.openpanel "To Pick this Directory; Pick Any Image File + OK...", pwd , "*.???" return nil if not drctry drctry= File.dirname(drctry) return nil if not drctry cwd= Dir.chdir(drctry) images= Dir["*.{jpg,png,tif,bmp,gif,tga,epx}"]### for all supported image file types for image in images imgname= image.split(".")[0..-2].join(".") ### removes .jpg etc from end mat= materials.add(imgname) mat.texture= image end#for image### model.commit_operation ###undo all if needed end#def### .
  • Selection

    3
    0 Szavazatok
    3 Hozzászólások
    350 Megtekintések
    R
    Thanks for the reply, but I still can't get it to work. #This works when I select everything with a mouse #I have the transform "t" defined elsewhere model = Sketchup.active_model.selection Sketchup.active_model.active_entities.transform_entities t,model ...... #I tried this to select everything without the mouse, but it does nothing model = Sketchup.active_model.selection.add(Sketchup.active_model.entities) Sketchup.active_model.active_entities.transform_entities t,model
  • Req script to draw squares by specifying the area

    6
    0 Szavazatok
    6 Hozzászólások
    564 Megtekintések
    T
    I have a tile maker.rb file I created. It can be used to make cubes of uniform dimensions of a selected area. I don't know if this tool would be helpful for what your are describing. attached is a short wmv file. tile.wmv
  • Save as sketchup v6

    6
    0 Szavazatok
    6 Hozzászólások
    533 Megtekintések
    thomthomT
    @cheffey said: I'm not sure how long it will be until we switch to 7, due to the economics of our industry. Will the free version of 7 work ok installed alongside the Pro version of 6? Yes.
  • Help! Ruby and Sketchup information required!!!

    3
    0 Szavazatok
    3 Hozzászólások
    387 Megtekintések
    R
    I'm willing to help in any way I can, but I don't know of many articles or publications about customizing SketchUp via Ruby. I've done my share of scripting, but I just don't know of much written about what we rubyists are doing. There are some discussions on the old SU ruby forum (and some here) that get into some technical issues, but I don't know if that will meet the criteria for the types of sources you need. Feel free to contact me through Smustard if you have any specific questions. If I can, I'll be happy to help.
  • Scaling

    2
    0 Szavazatok
    2 Hozzászólások
    293 Megtekintések
    Dave RD
    Now that would be an interesting plugin. Just think of being able to download all those models folks have drawn and uploaded to the warehouse without bothering to draw them correctly. Good luck with this.
  • Web dialog import/export

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    chrisglasierC
    That sounds interesting. Do you know of any better reference material, the one you tagged is mainly just headings. Please let me know if you have a moment to spare. Chris
  • Full ruby documentation for SU7?

    2
    0 Szavazatok
    2 Hozzászólások
    375 Megtekintések
    R
    I think its currently being updated, you should be ale to find it here when its finished: http://code.google.com/apis/sketchup/

Advertisement