ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • [Patch] to "sketchup.rb" (beta) v 1.1.0

    10
    0 Votes
    10 Posts
    1k Views
    Dan RathbunD
    @thomthom said: @dan rathbun said: The registration script adds 4 patches to the Preferences (dialog) > Extensions (panel) list. Why have a patch in the extension list? Why would an end user ever need to enable/disable this? Don't you think it can cause confusion? @dan rathbun said: I have separated each patch into it's own file, so it can be switched on/off, tested and updated individually. Formost.. for testing. But as sometimes happens, patches can either introduce other unforseen issues, or perhaps a very popular plugin relies on some quirkiness that the patch fixed. Because it may be large and complex, the author of this "example" popular plugin, needs time to update his code. So the patch can be switched off.. until an update is issued. Patches, in general: I have thought many times upon a patching system, similar to the extension system. I imagine it having it's own checklist, separate from the plugin checklist.
  • Transform texture using ruby

    3
    0 Votes
    3 Posts
    493 Views
    A
    Thank you Taff. I am an admirerer of your work! I have so far modified Gavin's ruby script for this (mentioned above) and got it working, after figuring out how to fit the images onto the faces. I'll post my solution once I clean the code a little.
  • Webdialog position not preserved across session on MAC

    18
    0 Votes
    18 Posts
    3k Views
    OricAtmosO
    @thomthom said: Haven't checked it out, but on PC the position is stored between sessions, but not within sessions. If you make a webdialog, close it, then open it again it doesn't remember the last position - only the last position from last session. Hi, I know this is an old thread, but I think I found out what makes WebDialogs remember their position during one session on Windows. It seems the position is only ever saved when the WebDialog object is destroyed, not when the dialog is closed while the object still lives. That's it, I think.
  • Error checking routine issue?

    10
    0 Votes
    10 Posts
    127 Views
    T
    I understand fully! and that's why your 1 of 3 of my favorite "SU Ruby API goto guys" I also have to include TIG! & thomthom!
  • A faster way to obtain shadow_info?

    4
    0 Votes
    4 Posts
    52 Views
    thomthomT
    It's not actually getting the info that's slow. It's setting it. When I ran the test it took ~11sec to run. When I removed info["ShadowTime"]+=600 it took ~0.15sec to run. That's why I hoped using start_operation would help - but alas. But at least, when you do this, ensure that Shadows are not on in SketchUp.
  • Looping all entities

    7
    0 Votes
    7 Posts
    325 Views
    P
    Excellent information. Thank you ThomThom, much appreciated!
  • Pause/ Hold script for extra user input

    5
    0 Votes
    5 Posts
    745 Views
    M
    Ok, solved it in another way. Thanks anyway. Matt
  • WebDialog Buttons

    19
    0 Votes
    19 Posts
    790 Views
    thomthomT
    I model the virtual keyboard I type on to code my plugins! The model off course generated with ruby code. Oh what a fine conundrum.
  • Beginner Ruby Problmes

    13
    0 Votes
    13 Posts
    1k Views
    thomthomT
    There are some sticky thread in the Developer section where links to various best-practices is posted.
  • Please help with FILLET Plugin

    11
    0 Votes
    11 Posts
    920 Views
    TIGT
    Here's v5.2 of my 2dToolset, containing the updated 2dFillet - arc segments >=2 <=999 - It could go higher [9999] BUT that is crazy bad!] http://forums.sketchucation.com/viewtopic.php?p=185760#p185760
  • Custom units, can it be done?

    8
    0 Votes
    8 Posts
    952 Views
    L
    Wow, that is really exciting! Looking forward to trying it! And I am sure that it will have several uses beyond shaku, I heard they use a plethora of units in India, otherworldly yet widespread units like the angula purportedly equivalent to eight barleycorns side by side.
  • New translate request?

    4
    0 Votes
    4 Posts
    111 Views
    fredo6F
    Then use p3 = p2.offset p2.vector_to(p1), d This gives the point p3, which at distance d of P2 in the direction of p1 Fredo
  • Finding new rotated 3d coordinate points?

    4
    0 Votes
    4 Posts
    140 Views
    TIGT
    Using group.move!(t) will miss the 'undo stack' [typically used in animations], whereas using group.transform!(t) won't. You can apply a transformation to a 3d point [and vector] too, to make a new reference use pt1new=pt1.transform(t) or pt1.transform!(t) to 'reuse' pt1 which is '!' changed to its matching vertex's current value https://developers.google.com/sketchup/docs/ourdoc/point3d#transform
  • Is there a ceiling function like in excel?

    20
    0 Votes
    20 Posts
    4k Views
    Dan RathbunD
    Just a note to remind all.. ... that now with Ruby in the 1.8.6 branch, we have both a ceil() and a floor() method defined for the Float class.
  • Naming components

    11
    0 Votes
    11 Posts
    559 Views
    F
    Thanks for the link Dan... that's the kind of info that seems trivial till you run into a problem. Yeah Komodo does all that good stuff plus the pro version does a bunch of other stuff and even debugging for ruby, I think. But I tried it and it had too many bells and whistles for a newbie like me and was confusing!
  • Display image using Ruby API

    9
    0 Votes
    9 Posts
    354 Views
    B
    Ya, WebDialog is also fine.
  • The $sketchup_version global var

    5
    0 Votes
    5 Posts
    602 Views
    Dan RathbunD
    @driven said: is there a similar way for PC's? Well, John, we would use within Ruby the cross-platform method call: puts Sketchup.version() Add: From the shell, there IS a command line utility, that can ask EXE and DLL files what their version is (provided they followed certain rules before compiling.) Some Ruby specific DLL files do not do this, and most SO files don't. I just cannot remember offhand what the name of the utility is ... EDIT: I now rememeber the utility on PC, it's: %(#BF4000)["C:/Program Files/Support Tools/filever.exe"] If you have the "Support Files" installed it's likely it's folder is in your path... so if your in the Sketchup program directory... %(#BF4000)[filever sketchup.exe] %(#000000)[>>] %(#BF4000)[--a-- W32i APP ENU 8.0.11752.0 shp 12,152,832 11-26-2011 sketchup.exe]
  • Intersect_with question/problem

    5
    0 Votes
    5 Posts
    440 Views
    Dan RathbunD
    Success I let the explode do the intersect ... model = Sketchup.active_model ents = model.active_entities pt1 = Geom;;Point3d.new 0,0,0 pt2 = Geom;;Point3d.new 10,0,0 pt3 = Geom;;Point3d.new 10,10,0 pt4 = Geom;;Point3d.new 0,10,0 pt5 = Geom;;Point3d.new 1,1,0 pt6 = Geom;;Point3d.new 9,1,0 pt7 = Geom;;Point3d.new 9,9,0 pt8 = Geom;;Point3d.new 1,9,0 mesh1 = Geom;;PolygonMesh.new mesh1.add_polygon pt1,pt2,pt3,pt4 mesh2 = Geom;;PolygonMesh.new mesh2.add_polygon pt5,pt6,pt7,pt8 grp = ents.add_group gents = grp.entities gents.add_faces_from_mesh( mesh1 ) grp2 = gents.add_group # nested group grp2.entities.add_faces_from_mesh( mesh2 ) # holeface = grp2.entities.to_a.find_all{|e| e.is_a?(Sketchup;;Face)} grp2.entities.erase_entities( holeface ) holeface = nil # so it's not pointing at a deleted entity holeloop = grp2.entities.to_a grp2.explode # merge with parent group togo = [] grp.entities.to_a.each{|e| if e.is_a?(Sketchup;;Face) && e.edges == holeloop togo << e end } grp.entities.erase_entities( togo ) grp2 = togo = nil # GC
  • Update entity by webdialog/excel

    6
    0 Votes
    6 Posts
    305 Views
    P
    a little bit more information: Standard DC definition attributes (dynamic_attributes): Retrieve with (for the selected instance): xx=Sketchup.active_model.selection[0].definition.attribute_dictionaries['dynamic_attributes'] xx.each{|key,value| puts key.to_s+'-'+value.to_s} Returns (app. depending on user set attributes of the selected instance-in this case LenX and LenY are 'user cannot see' and material is 'user can see'): _formatversion-1.0 _has_movetool_behaviors-0.0 _hasbehaviors-1.0 _lastmodified-2012-02-21 10:13 _lengthunits-CENTIMETERS _lenx_access-NONE _lenx_formlabel-LenX _lenx_label-LenX _lenx_units-DEFAULT _leny_access-NONE _leny_formlabel-LenY _leny_label-LenY _leny_units-DEFAULT _material_access-VIEW _material_formlabel-Material _material_label-Material _material_units-STRING _name-Huis1 lenx-393.700787401575 leny-393.700787401575 material- When changing LenX and LenY to 'user can see': _formatversion-1.0 _has_movetool_behaviors-0.0 _hasbehaviors-1.0 _lastmodified-2012-02-21 10:15 _lengthunits-CENTIMETERS _lenx_access-VIEW _lenx_formlabel-LenX _lenx_label-LenX _lenx_units-DEFAULT _leny_access-VIEW _leny_formlabel-LenY _leny_label-LenY _leny_units-DEFAULT _material_access-VIEW _material_formlabel-Material _material_label-Material _material_units-STRING _name-Huis1 lenx-393.700787401575 leny-393.700787401575 material- Standard instance attributes (dynamic_attributes): xx=Sketchup.active_model.selection[0].attribute_dictionaries['dynamic_attributes'] xx.each{|key,value| puts key.to_s+'-'+value.to_s} _has_movetool_behaviors-0.0 _hasbehaviors-1.0 lenx-393.700787401575 leny-393.700787401575 Now if you add an attribute on definition level eg. LenX this is accessible as lenx for both the comp. definition as the instance. Important: to be able to access that value on instance level with _lenx_formula (eg. to change the value) the attribute must be set to at least 'users can see this attribute' . Otherwise it cannot be changed through ruby. If I get out more information, I'll post it here.
  • Showing images, on the view, in a tool ?

    2
    0 Votes
    2 Posts
    54 Views
    thomthomT
    I also wish to draw GL bitmap. Haven't found a way. @dan rathbun said: but when the tool deactivates they vanish. That I don't think you can do anything with...

Advertisement