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
  • Storing last values used in the registry?

    13
    0 Szavazatok
    13 Hozzászólások
    2k Megtekintések
    TIGT
    The Sketchup.read_defaults and Sketchup.write_defaults use each PC's Sketchup 'Registry' entries OR a MAC's Sketchup 'plist' file entries... so they should work cross-platform. The main issue with using the Registry is storing data restructured into a format that can be recovered and then converted back into the required 'class' later - e.g. a string/float/integer/length/boolean/array/hash etc will need some 'manipulation' before writing - but if you have been using a 'file' to store such things then you've been writing them as strings already - when you reread the file you presumably convert the strings back with say string.to_f to make the value a number etc... [like an 'ini' file]. The Registry data exists across sessions globally for Sketchup on each PC, not just the current SKP. So if you want SKP specific data saving then it's best to use model-attributes to save things with the SKP [you can save attributes as most common data types directly - except a hash] - the data is thereby accessible to all uses on the network when you script reads the attributes as it runs, and later updates the attributes as it closes, this can all be done independent of each PC's Registry entries. Horses for courses...
  • Create new instance of a Ruby object in C?

    12
    0 Szavazatok
    12 Hozzászólások
    2k Megtekintések
    thomthomT
    After snooping around the Ruby source and looking how it's done there, it looks like this is the way to go: <span class="syntaxdefault">struct Color<br /></span><span class="syntaxkeyword">{<br /></span><span class="syntaxdefault">  unsigned char red</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> green</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> blue</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> alpha</span><span class="syntaxkeyword">;<br />};<br /><br /></span><span class="syntaxdefault">static VALUE<br />color_to_sketchup</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> Color color </span><span class="syntaxkeyword">)<br />{<br /></span><span class="syntaxdefault">  VALUE mSketchup</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cColor</span><span class="syntaxkeyword">;<br /></span><span class="syntaxdefault">  VALUE skp_color</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> args</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">4</span><span class="syntaxkeyword">];<br /></span><span class="syntaxdefault">  <br />  mSketchup </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_const_get</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> rb_cObject</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> rb_intern</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> </span><span class="syntaxstring">"Sketchup"</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  cColor </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_const_get_at</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> mSketchup</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> rb_intern</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"Color"</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  <br />  args</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">0</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_float_new</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> color</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">red </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  args</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">1</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_float_new</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> color</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">green </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  args</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">2</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_float_new</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> color</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">blue </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  args</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">3</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_float_new</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> color</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">alpha </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  <br />  skp_color </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> rb_class_new_instance</span><span class="syntaxkeyword">(</span><span class="syntaxdefault"> 4</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> args</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> cColor </span><span class="syntaxkeyword">);<br /></span><span class="syntaxdefault">  <br />  return skp_color</span><span class="syntaxkeyword">;<br />}</span><span class="syntaxdefault"> </span>
  • Can Sketchup Ruby find the path of a SKM file?

    5
    0 Szavazatok
    5 Hozzászólások
    678 Megtekintések
    TIGT
    As said... there are currently no access to SKMs in the API [only materials and textures], but my SKMtools do add extra methods to allow you to import a SKM file as anew material, export a material as a SKM file, and do several other things - like extract a SKM's image and thumbnail etc... Search the Plugins Index and get it...
  • Changing cursor insertion point on bounding box

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    F
    Thanks TIG, I haven't gotten around to trying what you suggested but I will soon enough.
  • Add item to SU main menu

    7
    0 Szavazatok
    7 Hozzászólások
    330 Megtekintések
    Z
    @unknownuser said: ...add a 'BIM' submenu to the 'Tools' menu and put everything inside that... this way is good ,I hope add "BIM" menu at the SU main menu yet,thanks TIG; and driven's way is very nice! how can do for it ?
  • Ruby access to global delay_time and transition_time

    3
    0 Szavazatok
    3 Hozzászólások
    120 Megtekintések
    TIGT
    <span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">options</span><span class="syntaxkeyword">[</span><span class="syntaxstring">"SlideshowOptions"</span><span class="syntaxkeyword">][</span><span class="syntaxstring">"SlideTime"</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">options</span><span class="syntaxkeyword">[</span><span class="syntaxstring">"PageOptions"</span><span class="syntaxkeyword">][</span><span class="syntaxstring">"TransitionTime"</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span> ???
  • How to call Sandbox tool from ruby script (onselected)

    3
    0 Szavazatok
    3 Hozzászólások
    733 Megtekintések
    K
    Thanks a lot!!!!!! Hans
  • [Patch] to &quot;sketchup.rb&quot; (beta) v 1.1.0

    10
    0 Szavazatok
    10 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    3 Hozzászólások
    577 Megtekintések
    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 Szavazatok
    18 Hozzászólások
    3k Megtekintések
    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 Szavazatok
    10 Hozzászólások
    422 Megtekintések
    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 Szavazatok
    4 Hozzászólások
    166 Megtekintések
    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 Szavazatok
    7 Hozzászólások
    549 Megtekintések
    P
    Excellent information. Thank you ThomThom, much appreciated!
  • Pause/ Hold script for extra user input

    5
    0 Szavazatok
    5 Hozzászólások
    907 Megtekintések
    M
    Ok, solved it in another way. Thanks anyway. Matt
  • WebDialog Buttons

    19
    0 Szavazatok
    19 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    13 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    8 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    4 Hozzászólások
    192 Megtekintések
    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 Szavazatok
    4 Hozzászólások
    229 Megtekintések
    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

Advertisement