đź«› Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
  • Need help with structures in callbacks

    8
    0 Votes
    8 Posts
    5k Views
    A
    @thomthom said: @dan rathbun said: And it's Windows only. We really need a solution that works on both platforms (Mac and Windows,) and that means it needs to be built into the Sketchup API by Google. That depends if he is aiming to support both platforms... Well, yes, I do want to support those for both platforms, but its just a starting test for platform that I'm using. And its not I'm the only one who want's that, I know there is much more people that would also want that ability in their plugins. So, yes after a solution to this topic, the code will be extended into more abilities of using on other platforms. @dan rathbun said: Including a library file (Win32,) in the global ObjectSpace is a big no no. Your code needs to be wrapped within a module. BIG Thanks Dan This thing was bugging me all the time I've need to wtite a code. This was a thing I needed to be sure of. @dan rathbun said: If you look at some of the pure Ruby source in Dan Berger's windows-pr package, you'll come across examples of accessing C structures from Ruby using Array.pack and String.unpack Thanks , think this is a solution. I no doubt, WILL examine the pakage!!!
  • Sketchup.parse_length

    12
    0 Votes
    12 Posts
    351 Views
    fredo6F
    @adamb said: However, in your string_to_length(), I don't think SketchUp supports units of "km", "feet" and "mile" (though it will accept ' and " for foot and inch respectively) These functions are primarily geared at getting input from user (via VCB or dialog box). So, even if units are not supported by SU, the notation accepts it (like the dot and comma for the decimal separator). The functions also support the architectural notation with ' and " (though I am not fully familiar with it). For instance s = "2'3\" + 5' 8\"" --> 2'3" + 5' 8" Traductor.string_to_length_formula(s) --> 95.0 s = "3\" * 4" --> 3" * 4 Traductor.string_to_length_formula(s) --> 12.0 Traductor.string_to_length("1.0splishysplash") --> nil Fredo
  • Multiple line select

    4
    0 Votes
    4 Posts
    260 Views
    Dan RathbunD
    There IS a work-in-progress on a BIM type plugin that can make walls, and export to IFC. Maybe you could join in with that project ?? [Plugin] bim-tools 0.9.0 (8 Oct 2011)
  • Transparency in Sketchup 6

    13
    0 Votes
    13 Posts
    1k Views
    Dan RathbunD
    @john_q said: I'm new to sketchUp, using V8 and also new to the OOP-structure business... See: Ruby Newbie's Guide to Getting Started
  • Color components

    10
    0 Votes
    10 Posts
    343 Views
    TIGT
    IDs do not subsist across sessions as they are re set every time the SKP opens. You must give entities attributes which will be carried across sessions to find them successfully...
  • Determining if a point is "in front" or "behind" a surface

    10
    0 Votes
    10 Posts
    616 Views
    Dan RathbunD
    Yes Type validation would (as TIG showed,) is usually the norm for public libraries. If it's a private library and you are the only one calling it's methods, you will know the rules (arg types,) and such validation can be left out to speed things up. That said.. I put the nil test in as the API doc refers to "a plane if successful" but does not really say what the return value is, if the call is not successful. And as there is no "real" Plane class we cannot do a type check based on that, but if it's an array with 4 elements. Comment it out if you feel it's unnecessary. (I won't feel bad.)
  • Follow me code issue?

    12
    0 Votes
    12 Posts
    1k Views
    Dan RathbunD
    Good "Occamish" advice TIG.
  • DC - hidden parts

    6
    0 Votes
    6 Posts
    227 Views
    T
    @dan rathbun said: Components can contain nested Groups and other Components. The Components could be normal or dynamic. If nested, you'll need to do a recursive search (make a search method that calls itself.) Dan, I am an author of two exporters , I have learned it few years ago. SU2Thea exports whole SU model hierarchy. @adamb said: You would need to follow the hierarchy all the way to the top to determine if any antecedent (parent) was hidden - and thus all subsequent children are hidden - to get the correct answer. Basically it requires you to structure code as a recursive descent.. which runs counter to the definition.instances graph-like structure. I do walk all the hierarchy from the very top till the last visible? entity. It works perfectly on all objects. SU2Thea exports everything fine except this door for example: The door has several layouts of a door leaf defined. They are all being exported, because when I check e.definition.entities all return true although not all are being visible on a screen at the same moment in the same instance. I guess I have to recognize whether I have a DC, then check which option has been chosen for the instance I investigate (probably an attribute) and then discard all faces in a definition that doesn't belong to the 'option' (I guess defined in an attribute of the instance again). I hope that is easy to distinguish parts of DC definition that are optional. If it isn't obvious from attributes that a DC stores then.. it will be hit or miss. @adamb said: EDIT: as I'm writing this..are you saying hidden? and visible? are actually different? I was asking Dan whether there is a difference, but I doubt. API Docs don't mention it. I will dig into the issue. I just thought someone has already been there.
  • Unique texture

    3
    0 Votes
    3 Posts
    211 Views
    oganocaliO
    Tgi3D amorph create-texture method uses the existing texture image in creating a unique texture. You could try the trial version for 30 days for free. Ogan
  • Dynamic Component Scripting in Ruby

    3
    0 Votes
    3 Posts
    325 Views
    R
    thanks Thomthom for your quick answer! yeah I've got some information. Actually it's a scaffold which should be multiplied by scaling it on houses storefronts. These multiplied scaffolds should contain some attributes like "time to build","costs" or "weight". The next step in this project would be to export this model in a kind of "model-view"-program with a ruby interface. I hope this is enough information at that point.
  • ***CheckforUpdate**** (for script publishing)

    2
    0 Votes
    2 Posts
    3m Views
    thomthomT
    !!=!! Name = QuadFace Tools ; author=thomthom ; version=0.7.0 ; Date= 08 Feb 12 ; info = https://bitbucket.org/thomthom/quadface-tools/ ; description = Suite of tools for manipulating quad faces. ; comment = New features and fixes. ; required = TT_Lib2 2.6.0 !!=!! !!=!! Name = TT_Lib² ; author=thomthom ; version=2.7.1 ; Date= 19 Feb 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=30503 ; description = Library of commonly used functions. ; comment = Fixed OSX integrity check. !!=!! !!=!! Name = Simple Installer ; author=thomthom ; version=1.1.0 ; Date= 03 Dec 12 ; info = http://sketchucation.com/forums/viewtopic.php?f=323&t=42315 ; description = Simple utility for installing plugins. ; comment = Added guard against VirtualStore under Windows. !!=!! !!=!! Name = Selection Memory ; author=thomthom ; version=1.0.0 ; Date= 09 Jan 12 ; info = http://sketchucation.com/forums/viewtopic.php?t=42469 ; description = Simple utility for cycling through previous selection sets. ; comment = Initial release. !!=!! !!=!! Name = CleanUp³ ; author=thomthom ; version=3.1.10 ; Date= 18 Mar 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=22920 ; description = CleanUp tools. ; comment = Added support for Fredo's update checker. !!=!! !!=!! Name = Transformation Inspector ; author=thomthom ; version=1.0.1 ; Date= 24 Apr 12 ; info = http://sketchucation.com/forums/viewtopic.php?t=44859 ; description = Inspect and modify the transformation matrix directly. ; comment = First release. !!=!! !!=!! Name = Material Tools ; author=thomthom ; version=2.6.0 ; Date= 19 Feb 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=17587 ; description = Tools to manage materials in model. ; comment = Added "Transparent Material to Backside". !!=!! !!=!! Name = V-Ray Tools² ; author=thomthom ; version=2.1.0 ; Date= 11 Mar 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=15491 ; description = Tools for V-Ray for SketchUp. ; comment = Internal tweaks. !!=!! !!=!! Name = 3D Text Editor ; author=thomthom ; version=1.0.0 ; Date= 19 Feb 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=50735 ; description = Create editable 3D text. ; comment = First release. !!=!! !!=!! Name = Architect Tools ; author=thomthom ; version=2.0.0 ; Date= 19 Feb 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=30512 ; description = Collection of tools for processing site plans. ; comment = First release. !!=!! !!=!! Name = Auto Smooth ; author=thomthom ; version=1.0.0 ; Date= 19 Feb 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=50739 ; description = Automatically softens and smooths autofolded edges created by the native Move, Rotate and Scale tools in SketchUp. ; comment = First release. !!=!! !!=!! Name = Scale Group Definition ; author=thomthom ; version=1.0.0 ; Date= 22 Feb 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=50811 ; description = Adds Scale Definition context menu for Groups. ; comment = First release. !!=!! !!=!! Name = VirtualStore ; author=thomthom ; version=1.0.0 ; Date= 10 Oct 12 ; info = http://sketchucation.com/forums/viewtopic.php?t=48399 ; description = Utility to quickly inspect Window's VirtualStore for misplaced plugins. ; comment = First release. !!=!! !!=!! Name = Drop Zone ; author=thomthom ; version=1.0.0 ; Date= 18 Mar 13 ; info = http://sketchucation.com/forums/viewtopic.php?t=51330 ; description = Drag and Drop installation of plugins. ; comment = First release. !!=!!
  • Dynamic component, Ruby and MySQL

    2
    0 Votes
    2 Posts
    470 Views
    TIGT
    This is only going to be accessible to those user who have require 'mysql' accessible... Can you be a little more generic in your question ? OR perhaps more specific... and change the post's title to say ' MySQL, Ruby and Dynamic-Components - HELP!'
  • Scale non-uniform along vector?

    22
    0 Votes
    22 Posts
    2k Views
    jolranJ
    Yeah, thanks TIG. All what you say is true. All these transformations got my head spinning. So I ditched the scaling in the tilingmethod. Went with scaling(y in this case) at ORIGIN, just after loading the component. Before placing it on the face. Not as flexible as in a method, but it will hopefully work. I think Dan suggested something similar, earlier on in this thread. Maybe that's what you had in mind all along as well, TIG. I just coulden't see it then.. Edit: When I reread you thread, did you mean to scale entities and that would become a "local" scale? Cause i did some scaling in x or y and it was in fact a global scale. The group moved from the face and tilted, even when putting the origin at center of bbox. I can't recall 100% sure if it was the group OR the entities I scaled. Ah heck. I'll try tomorrow then.. Like I said, rather had this transformation separate in the tiling method..
  • Deleting Faces as they are drawn -splats

    6
    0 Votes
    6 Posts
    172 Views
    Dan RathbunD
    You may need to combine your responces with a ToolsObserver
  • RenderingOptionsObserver "type" numbers

    2
    0 Votes
    2 Posts
    137 Views
    thomthomT
    Yea, the docs really should mention these constants, as the number used to refer to various options differ from version to version.
  • WebDialog.set_html fails under Safari 5.0.6

    111
    0 Votes
    111 Posts
    19k Views
    P
    driven, thx!! I have reported the error an already received a debugged version (bug at their side)
  • [Proof of concept] UVunwrap

    11
    0 Votes
    11 Posts
    2k Views
    McGyverM
    I keep peeking in here hoping I'll see something that will help me understand this better... But now I suppose I will actually download it and try and to figure it out... this is something akin to a Gerbil sitting in the cockpit of an F-22 and saying " I can do this!!"... But either way I've got to try it. I wanted to say thanks for this script and for trying to find another easier way to help those of us that are UV mapping impaired! I'm really hoping to figure out how to use this to texture cylinders... Too bad there is no simple native method to paint a seamless texture on a cylinder in SU... I'd think that would seem to be a basic necessity to the SU programers? Thanks again!! Edited to add- THANK YOU!! It worked!! Not right at first, it seemed to not want to activate, but after a few tries it did and I got it to work! That is so COOL! I'm going to experiment some more... Thank you x 1000! Oh yeah, I don't know if anyone else has this problem too, but when I am viewing the video clip you made, the bottom part of the screen is cut off... so when you click on your plugin the drop down menu is below the field of view and I can not see what option you are choosing. I just thought you might want to know. [image: Iedq_Menu.jpg]
  • Reverse Face if side clicked on is the back.

    5
    0 Votes
    5 Posts
    243 Views
    TIGT
    @unknownuser said: @tig said: See this http://forums.sketchucation.com/viewtopic.php?p=357136#p357136 or FrontFace. Sorry Tomasz - I had overlooked your similar tool - there are indeed lots to choose from
  • Alternative to angle_between?

    26
    0 Votes
    26 Posts
    3k Views
    M
    Not ruby programmer so leave that up to you, but for 3d vectors and using the general approach the angle is the shortest great circle path between the two. The angle is atan2( Norm( cross(a,b)), dot( a,b)). This means the angle is 0 to pi() FYI http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm and http://www.mathworks.com/matlabcentral/newsreader/view_thread/151925
  • Hook Procedure (win32 api)

    6
    0 Votes
    6 Posts
    3k Views
    A
    , thanks Dan... Have you tried downloading the "HookProc.zip", which is on my first post of this topic? If you're willing to, can you please download it to plugins and test it if it works or not? Here is the reference: Items KeyboardProc - The stated script should write an active keyboard message to logLine or text and remove the message from being sent to current thread. Ex: Lets assume virtual keyboard message "p" is shortcut to pushpull. If you click key "p" while the KeyboardProc is not active, the shortcut should call the pushpull tool. If you click key "p" while the KeyboardProc is active then the pudspull tool won't be called. Keyboard messages will not be removed from other windows. It will just remove them from the stated window, which in this case would be the sketchup window. MouseProc - Should moniter/display mouse messages sent to the thread. Default script will not remove the messages. Ex: message 512 - mouse move, 522, mouse wheel rotate, 513 / 514 - mouse button clicks. LowLevelKeyboardProc - Should moniter/display and remove keyboard messages from the module handle. Ex: Lets say I have two windows: Sketchup and notepad++. In Sketchup window I activate LowLevelMouseProc, move to notepad++, and begin to type. Trying to type I don't get anything. It's because LowLevelKeyboard Hook Procedure prevents most the keyboard messages from to be sent to the module handle. Well, the once that it can't remove are some keyboard combination shortcuts, like "ctrl-alt-delete", "alt-lshift-PtrScn" and more. LowLevelMouseProc - Same as lowLevelKeyboardProc, but this time should display mouse messages sent to the module handle. Well you can state it to remove messages by changing "0" return value to "3", but by doing that your comp will act like the mouse is disconnected from the computer. If you'd want to remove only some mouse messages from module handle, then just write a block like "If wParam==512 then 0 else 3 end". All of the hooks above can be toggle by being set or unhooked. RemoveAll - Unhooks all hooks above. ClearTextQueue - Not really important in that role. Just clears the text queue that is displayed. LogLine remove's lines from text queue automatically, though just added for fun. Think this is all Thanks...

Advertisement