⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Launching ruby script from Java

    6
    0 Votes
    6 Posts
    1k Views
    thomthomT
    @elagym said: H Here is the content of api_dev.rb : The SketchUp Ruby API is only available from within SketchUp. It cannot be used in standalone builds of Ruby. If you need to read and write SKP files from your own application then there is the C API that can be used: https://extensions.sketchup.com/developer_center
  • Trimming a Solid Group

    12
    0 Votes
    12 Posts
    2k Views
    medeekM
    When I use the truss plugin to create complex roofs I would like to be able to use the trim tool to trim some of the members (ie. a hip roof): https://3dwarehouse.sketchup.com/model.html?id=uade0f021-a386-402c-b784-087189478ecb
  • Laubwerk is hiring

    4
    0 Votes
    4 Posts
    1k Views
    duanekempD
    Just catching this post here for the first time. Any updates on this news?
  • Plugin idea - Paste in placeS

    4
    0 Votes
    4 Posts
    879 Views
    srxS
    And it deserves shortcut CTRL+SHIFT+V
  • Plugin to stop sticking geometry

    2
    0 Votes
    2 Posts
    415 Views
    Dan RathbunD
    @caecarvalho said: After you create your model in SU, using groups and components, I could toggle this button and it would disable sticking geometry. This is not possible.
  • A ruby for a text list of materials for OSX users wanted

    36
    0 Votes
    36 Posts
    3k Views
    romboutR
    Its been a while since this video, but how did you switched the color picker?
  • List of entities and organisation ?

    4
    0 Votes
    4 Posts
    913 Views
    Dan RathbunD
    And this diagram is a bit out of date. (There are some missing classes, and perhaps changes since it was drawn back in the v7 and v8 days.) http://www.sketchup.com/intl/en/developer/docs/diagram.php Also,... @iltis said: For example : ArcCurve (arcs and circles) is a subclass of the Curve class, and an edge is a part of a random curve ... Implies an incorrect assumption. The SKP document object hierarchy (ie, the model database tree) is a wholly separate construct than the Ruby class hierarchy and relationships. For example, the Sketchup::Edge class is not a sub-class of the Sketchup::Curve class. Both, are descendants of the Sketchup::Entity class. Sketchup::Curve and Sketchup::ArcCurve objects are special collection classes that connect edges together, but are not themselves an actual "model element". Sketchup::Edge objects are an actual model element, and so are a sub-class of Sketchup::Drawingelement.
  • How to apply material to a "surface"

    3
    0 Votes
    3 Posts
    737 Views
    PixeroP
    Thanks Thomthom. I already found it.
  • Pairing face problem

    9
    0 Votes
    9 Posts
    869 Views
    hsmyersH
    @sdmitch said: What defines a good or bad pairing? No overlap when moved center to center. Where 'center' is center of paired face.
  • Problems with PickHelper

    14
    0 Votes
    14 Posts
    1k Views
    thomthomT
    No worries - we all learn. Thanks for posting back your solution.
  • Starting a process in background using Ruby system()

    8
    0 Votes
    8 Posts
    2k Views
    sdmitchS
    @driven said: some zip program require the .zip extension john Not a problem with 7-Zip. The -tzip sets the output format.
  • Rescue issue

    8
    0 Votes
    8 Posts
    712 Views
    P
    It isn't that I wanted that "puts" to run immediately after the dialog is up. I put it after the show_modal to determine whether I reach that statement after the dialog is up or if I reach that statement after the dialog closes. I believe that I determined that I reached there only after the dialog closes. Therefore, an error raised in my callbacks should be caught by my rescue and it is not. I am currently working on a solution, suggested by you, to "Try putting another begin... rescue inside the callback block itself..." that is likely to solve my problem. I just wanted to understand why this didn't work and I haven't reached this understanding yet. Edit - that worked fine. My real problem is simply solved. I still don't understand why the original didn't work, but not worth any more of my time or your time. Thanks.
  • Closest face problem

    5
    0 Votes
    5 Posts
    680 Views
    hsmyersH
    @sdmitch said: @hsmyers said: how about closest pair of points? Since you are only dealing with two objects, it shouldn't matter which is sel[0] or sel[1] To find the closest corners of two objects mod = Sketchup.active_model > . > . > . > UI.messagebox "Obj0 Cor#{m} to Obj1 Cor#{n} is #{Sketchup.format_length(md)}" > Thank you for the snippet! You are correct excepting that the tool in question will move one of the two objects such that the opposing face centers are touching plus or minus an offset. Sorry for the grossly incomplete spec My plan (very fluid and quite murky ) is take the first selection as the moving object and the second as the fixed object. I've some notion about non-parallel faces requiring ( optionally ) an rotational adjustment. However it's my goal to keep things as simple as possible. My usage is to stack components together to assemble the model much like one would in actuality. Hex nuts, lock washer on threaded rod etc. Additionally, there is the self-educational aspect of solving the which selection is on first This tool already has four options and looks to acquire one or more in the future. So it seems prudent to solve this now to make ready for the unforeseen. 'Sides any excuse to cut code!!
  • Save and restore cursor?

    3
    0 Votes
    3 Posts
    562 Views
    hsmyersH
    @thomthom said: model.tools.push_tool(tool) model.tools.pop_tool http://www.sketchup.com/intl/en/developer/docs/ourdoc/tools#push_tool My thanks...and off to read the fine manual (err...what manual?) again
  • Load errors for several rubys

    9
    0 Votes
    9 Posts
    2k Views
    fredo6F
    @dermotmoconnor You were having a very old version of LibFredo6 (version 3.7, whereas current version is 6.9) and also RoundCorner. I don't know where, in 2016, you got them, if these are new installation. Anyway, that's why it did not work. Fredo
  • Attributes (auto updating)

    5
    0 Votes
    5 Posts
    1k Views
    Dan RathbunD
    @thomthom said: @medeek said: Howevever, I can't seem to figure out how this attribute is automatically updating. I came across some code not too long ago that could explain this - but there is no documentation for this. SketchUp seem to apply transformations to Geom::Point3d and Geom::Vector3d object stored in attributes. This might be what you want some times - other times if you don't want it, store them as arrays. Which is basically what I said in the duplicate thread in the SketchUp forum, ... http://forums.sketchup.com/t/attributes-that-auto-update/27840 ... which has gone beyond the original questions.
  • Staircase builder - strange scaling behaviour - Help!

    4
    0 Votes
    4 Posts
    1k Views
    D
    Staircase builder fixed! Fixed!
  • Architectural plugins

    17
    0 Votes
    17 Posts
    5k Views
    D
    Staircase builder has been revised and some bugs fixed. Try it out! db1stairbuilder.rb
  • Getting entity information in onEraseEntity observer

    2
    0 Votes
    2 Posts
    616 Views
    Dan RathbunD
    @smeyers said: I am trying to use the onEraseEntity observer, ... To be precise, this is a callback method name, of the Sketchup::EntityObserver class (and subclasses.) @smeyers said: ... which I have placed on the component, to look at the location of the entity being erased ... Okay then, it follows that at the time you've attached the observer, you should have a reference to the component instance, ... which means you can get a reference to the instance's transformation, and store it as an instance attribute of YOUR observer instance (assuming each component instance you attach a separate new observer instance to.) And then, also add an onChangeEntity callback method, that compares the current instance's transformation with the one that was stored in the observer, and if they are different, then the instance was moved, rotated, etc., so update the stored transformation in observer instance. THEN,... later when the onEraseEntity callback is fired, you'll have a copy of the deleted instance's transform stored right there in the observer instance (that is being called.) You do this by passing the component instance's transform into your observer subclass' new() constructor, which passes it into the new instance's initialize() method, (after the object has been created,) where you assign it to an instance variable. module Author;;SomePlugin class NiftyEntitySpy < Sketchup;;EntityObserver attr_accessor(;transform) def initialize(trans_arg) @transform = trans_arg end def onChangeEntity(obj) return unless obj.respond_to?(;transformation) if obj.transformation.to_a != @transform.to_a transform=(obj.transformation) end end def onEraseEntity(obj) # obj is invalid here ! # # Use transform() method or @transform reference directly, BUT # beware of making model changes inside observer callbacks !!! # end end # class # Somewhere in the code, attach a new observer instance, # to each component instance to be watched; inst.add_observer( NiftyEntitySpy;;new(inst.transformation) ) end
  • SketchUpAPI.dll - 32 and 64 bit

    4
    0 Votes
    4 Posts
    1k Views
    TIGT
    Why not separate the 'bitness' at the download-installer level, i.e. offer 32/64 bit installers ? Then what the client downlands is what they expect ? If you want to remain 'clever'... then check the bitness when the exe runs [installer-level check] and have two separate installer exe's running from those...

Advertisement