⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • *.rbz installer

    4
    0 評價
    4 貼文
    1k 瀏覽
    Q
    Hmm thanks TIG, i'm going to look into that. Quintus
  • Drawing a parallel line

    3
    0 評價
    3 貼文
    664 瀏覽
    TIGT
    If you are drawing these double lines on a 'surface' then picked-point at point1 can be used to return the best face below it - get the axis=face.normal... If it's not on any face or you want it flat then axis=Z_AXIS Then next picked_point point2 needs to be on that face, so get it's initial value and then use point2=point2.project_to_plane(face.plane) or if it's to be 'flat' use point2.z=point1.z instead so it's level with point1... This gives you the first edge edge12=entities.add_line(point1,point2) To make it's offset 'clone'... Assuming ' width' is the offset required. point3=point1.offset(edge12.line[1],width) rotate it into place... tr=Geom::Transformation.rotation(point1,axis,90.degrees) point3.transform!(tr) get the other end point point4=point3.offset(edge12.line[1],edge12.length) and then draw the offset edge edge34=entities.add_line(point3,point4)
  • Extension manager hooks?

    8
    0 評價
    8 貼文
    360 瀏覽
    Dan RathbunD
    @jim said: My understanding is that at least some of the SketchupExtension instance methods are meant to be called by SketchUp rather than by plugins. Yep. If interested, just read comments in the new extensions.rb file in the Tools dir.
  • Set/Get Attribute

    7
    0 評價
    7 貼文
    305 瀏覽
    A
    @dan rathbun said: Not in the global Objectspace, no... ... all your code should be inside your unique toplevel module, and all your classes should be inside that as well. Okay, that's what I thought. It was just the wrong use of variables, and people who were learning ruby from sketchy physcics scripts did the same thing, so now I know, Thanks
  • Webdialog

    6
    0 評價
    6 貼文
    420 瀏覽
    M
    Hello, Thank you very much, I am going to look at that.
  • [Code] Parsing arithmetic formulas

    6
    0 評價
    6 貼文
    2k 瀏覽
    K
    I used this code in my joint tools and found it very useful as the user could enter equation if they do not know the actual value. However I could not make it work if the user entered the " for inches as sketch-up does. Keith
  • Problem with Joint Pushpull

    4
    0 評價
    4 貼文
    506 瀏覽
    fredo6F
    @hrland said: I have the same problem and when I made the change it won't let me save, tells me "access denied". Any way to get this fixed? Thanks. The problem derives from a wrong installation: i.e. For whatever reasons, the image files JPP_....png icon files cannot be found in the JPP_Dir_xx directory. I suggest you check if the files are present. Fredo
  • Moving object in steps

    6
    0 評價
    6 貼文
    226 瀏覽
    P
    i got it, will post solution later
  • Get form data from webdialogs?

    27
    0 評價
    27 貼文
    2k 瀏覽
    P
    I always do as chris does: collect in one string, send to SU, split there if needed
  • Section Plane

    14
    0 評價
    14 貼文
    921 瀏覽
    P
    ThomThom, thx for the answers! With auto-creation I mean this: The creation through ruby of a section plane in each of the 20 groups that are in the model.
  • (Windows) Plugins Locations

    5
    0 評價
    5 貼文
    369 瀏覽
    Dan RathbunD
    @thomthom said: @jim said: @dan rathbun said: User acces to the AppData folder heirarchy on Win 6+ is problematic. Reference? [Citation Needed] .. what for ? Just try it. I'm not saying there is not a solution. But you first need to recreate the situation. 1) Create a new (temporary,) user account on your Win7 machine called "JoeUser" or whatever. Do not give this new user account admin privileges. Just a standard user like in a work or school setting. 2) Now try and access the %APPDATA% path in Windows Explorer. (Heck.. even try it as an Admin,, it's still a PITB !)
  • Linux and Mac Virtual Key Codes

    2
    0 評價
    2 貼文
    1k 瀏覽
    Dan RathbunD
    See these threads: My Apple Keyboard VK_KEYS onKeyDown repeat parameter problem Keyboard translation PC / Mac
  • Ruby rbconfig.rb

    2
    0 評價
    2 貼文
    453 瀏覽
    Dan RathbunD
    Should be the same, BUT the values of the Config::CONFIG hash attributes WILL DIFFER. The problem with the above statement is that rbconfig.rb is written by mkconfig.rb, (when the Ruby was built,) which may have itself changed over the various versions. Also, on Windows, some users install a one-click installer edition, that was not built on their own computer, and they may install it in a custom path, which may invalidate some of the values in the rbconfig.rb file. AND, only machines with a full Ruby install will have the rbconfig.rb file (in the platform subdir, of the Ruby lib dir.)
  • Model's save method, about chinese filename and path

    6
    0 評價
    6 貼文
    543 瀏覽
    O
    I would like to support chinese path as Sketchup's open_file method, model's save method why not support it?
  • Make A Component Using only Ruby code

    2
    0 評價
    2 貼文
    317 瀏覽
    J
    Hi Steve, You seem to have a grip on it for the most part. Instead of creating the geometry before creating the ComponentDefinition, you should create the Definition and then add entities to its Entities collection. You can use ComponentDefinition#save_as to save it out to disk. new_def = Sketchup.active_model.definitions.add("My Component") new_def.entities.add_face(...) new_def.save_as("C;/My Component.skp") model.entities.add_instance(new_def, [0,0,0])
  • Where to Store User Settings?

    29
    0 評價
    29 貼文
    2k 瀏覽
    K
    @thomthom said: That would then not be User data - but Model data. Two very different things. Looks like I interpreted thread subject in a context of my own thoughts I mean, I was going to suggest to use template for storing user settings data. [image: EVA0_template.png] It is less elegant than just click "OK" button in "Settings" dialog of the plugin, of course But the user can save his own presets in template file, add description to it, then it will be possible to revert back to any previously saved configuration. UPD. The point is that I was thinking about abstract "application user" not the operating system user. Application means plugin here. So I thought that application (plugin) usually runs "system wide" (not in "per user mode") and the problem is what is the best way to persist application settings (i.e. user preferences *application user here again). Storing plugin settings right in document allows user preferences persistence across different machines and even across operating systems in theory (when I say "user" I mean plugin user). So user can take his *.skp file anywhere and continue working with it on any device that has SU and plugin and he does not have to care about configuring plugin again on each device.
  • How to do a crossing box select by ruby?

    6
    0 評價
    6 貼文
    321 瀏覽
    thomthomT
    You could perhaps do a simplified version and map the boundingbox of the groups to a cached array, then use Geom.point_in_polygon_2D to see if any of the points are within the selectionbox of your custom tool. It will miss the cases where a selectionbox crosses the group's boundingbox but the corner points are outside, but if you start to do intersection on all that you might very well end up with a sluggish tool. Might be good enough?
  • Undo stack question

    6
    0 評價
    6 貼文
    318 瀏覽
    Dan RathbunD
    You are correct ... ... a Layer is a subclass of Entity, so perhaps the EntityObserver might fire the onChangeEntity() callback. You'd have to try it. I do not know if it will work.
  • Unique identifier for model?

    9
    0 評價
    9 貼文
    473 瀏覽
    D
    Yes the problem comes when you have multiple SU processes running (I'm guessing users do this more on OSX because of the way windows are managed). So when the plugin starts and tries to delete tempfiles, there could be another SU using it. Hence the file lock.
  • SketchupExtension path question

    4
    0 評價
    4 貼文
    260 瀏覽
    D
    OK, thanks. Good to know.

Advertisement