🏢 PlaceMaker | 25% off for February including new Google Earth data imports! Learn more
  • Unique texture

    3
    0 Votes
    3 Posts
    176 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
    291 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
    2m 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
    445 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
    145 Views
    Dan RathbunD
    You may need to combine your responces with a ToolsObserver
  • RenderingOptionsObserver "type" numbers

    2
    0 Votes
    2 Posts
    123 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
    17k 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
    195 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...
  • Erase a single unused Definition

    4
    0 Votes
    4 Posts
    414 Views
    TIGT
    The definition.entities.clear! should work much as my suggestion, inside the operation block? You could always suffix its new name with "[Untrimmed]" so it's easy to spot? You could also add a closing dialog 'Remove the now Unused Untrimmed Definition from the Browser ?', Yes|No Then the user decides... I have just written something very similar myself, within a broader 'commercial' tool, BUT that auto-removes the old untrimmed definition. That one gets complicated as it is say a panel component that is trimmed on one edge using special shaped instances [it's remade as a component rather than a group], a 'hidden' proxy of the original untrimmed panel is retained after the trimming is done, it is also given attributes defining what was done on that trim; then you can trim the 2nd, 3rd, 4th edges etc, each time the attributes are expanded for each edge trimmed; now the rub - the edge trimming is editable per edge, so if I want to redo the trimming to the 2nd edge I have to start with an untrimmed version again [derived from the proxy] then read the attributes that it has and repeat the 1st then the new 2nd trim and then repeat the 3rd, 4th etc. This is because trimming one edge affects the abutting other two edges... I have taken a while to get my head around it! Now you can trim parts out of all sides of the panel using various shaped 'notches' and edit them too... Now to finish the next part - these trimmed edges marry into panels meeting at right-angles and their 'notched' edges have to be the reverse of the other panels... A tangle of attribute crosschecks and a trimming frenzy ensues...
  • Is this plugin possible?

    3
    0 Votes
    3 Posts
    195 Views
    T
    @byrnebm: Did the plugin TIG suggested work for you? If not I might be able to write something up for you to brush up on my ruby skills. Let me know.
  • Webdialog example

    6
    0 Votes
    6 Posts
    188 Views
    jolranJ
    Great info. I probably should get that windowiser4 plugin then. It does seam very handy as a plugin, as well Thanks
  • Sketchup API (Ruby) - offline copy

    14
    0 Votes
    14 Posts
    2k Views
    T
    You can use WinHTTrack to make a copy of the API on a hard-drive.
  • Temporarility Changing Materials

    7
    0 Votes
    7 Posts
    290 Views
    Dan RathbunD
    @joshb said: Thanks again Dan! Storing the material name works great. Your welky! However writing attributes into the model DOM.. is going to slow things down (and add extra items onto the undo stack.) Since this is temporary... why not just keep the references in memory? A Hash object will do fine: # a new Hash to hold the material refs for each entity prev_matls = {} # keep the entity refs held in an Array, like; ents = model.entities.to_a # use Ruby's built-in Array iterator to save material refs ents.each {|e| prev_matls[e]= e.material } # now the hash has unique keys because each entity ref is unique # # your view wizard.. whatever # # restore them; ents.each {|e| (e.material= prev_matls[e]) if prev_matls[e].valid? }
  • UI openpanel - path issue?

    3
    0 Votes
    3 Posts
    560 Views
    Dan RathbunD
    If you are asking, "Can UI.openpanel return a path?" yes... by hotwiring it... baseDir = Sketchup.find_support_file('Plugins') relDir = "examples" title = "Choose a Dir..." openpath = File.join(baseDir,relDir) my_path = UI.openpanel( title, openpath, "*." ) if my_path.nil? # the user cancelled the dialog else my_path = File.expand_path( File.dirname(my_path) ) end (Edited for clarity, added openpath local.) The filetype filter does not work on PC. (Windows itself is overriding the parameters, using MRU settings in the Registry for the File Open dialog.) Now if you are wondering if you can first set the working dir, and will the UI.openpanel go there? Not really,.. you must make the call with the wd: Dir.chdir('C;/') my_path = UI.openpanel( "Choose Dir...", Dir.getwd, "*." ) if my_path.nil? # the user cancelled the dialog else my_path = File.expand_path( File.dirname(my_path) ) end
  • Erasing entites problem?

    8
    0 Votes
    8 Posts
    365 Views
    TIGT
    face = entities.add_face($pt6, $pt8, $pt7, $pt5) is logical as you are adding a face from a set of points. I fail to see the full logic behind your suggested new API method face = entities.erase_face($pt6, $pt8, $pt7, $pt5) - but you could of course mimic it within your own method quite simply, using other existing API methods [which is what your suggested new API method would in effect have to do if it were implemented] - like this... def erase_face(entities, points_array, all_edges=false) face=entities.add_face(points_array) return false if not face or not face.valid? edges=face.edges face.erase! edges.each{|e| if e.faces.length==2 && e.faces[0].normal.dot(e.faces[1].normal) > 0.99999999 && e.faces[0].material==e.faces[1].material && e.faces[0].back_material==e.faces[1].back_material e.erase! elsif not e.faces e.erase! end } if all_edges return true end which you'd use like this... erase_face(entities, [$pt6, $pt8, $pt7, $pt5]) to erase the face if it can exist from the given points. OR like this... erase_face(entities, [$pt6, $pt8, $pt7, $pt5], true) to erase the face if it can exist from the given points, AND the 'true' argument to erase all of its edges too - but of course because other faces might also rely on some of these edges and unexpectedly vanish with them too there is a trap test not to remove those unless they are 'coplanar'... It returns 'false' if no face and 'true' if it is erased. PS: Please avoid using global variables like $pt6, when @pt6 would work within a module/class instance methods and @@pt6 across class use. You will rarely need to create $vars in your own code...
  • Trace what prevents an object from being GC'd?

    22
    0 Votes
    22 Posts
    883 Views
    Dan RathbunD
    @unknownuser said: (http://forums.sketchucation.com/viewtopic.php?f) of this topic":25oe0j3o] Did you dispose of all Locals, Constants, instance vars, and perhaps maybe even Procs that are within your subclass? That said... you should be able to have proc refs, if they are instance @refs because they are likely to have refs inside them that ref instance objects. If the class is a singleton (most WebDialogs are,) just limit the number of instances to 1, in the wrapping namespace, the same way you would for a tool instance.

Advertisement