⚠️ Important | Please update Libfredo to v15.1a for bugfixes associated to SketchUp 2025 and below Download
  • Reverse egde orientation

    15
    0 Votes
    15 Posts
    363 Views
    thomthomT
    Performance will suffer greatly if you add/remove/recreate geometry to organize your data instead of just sorting it. The more entities in a context the slower it will be. @tafkab76 said: And actually I just wanted to know how to reverse edges, Why do you want to reverse edges?
  • Observer triggers and validation methods

    8
    0 Votes
    8 Posts
    292 Views
    R
    Oops, pushed submit too fast. I got the 3dconnexionmouse working with their dll in VFP9 (Visual foxpro, don't ask me why except that i love that language) who in turn is sending - yes... via SKSocket - the values to Ruby-world, turning objects around. So yes, it is working. Now I like to learn how to set up COM events binding within ruby scripts. As I explained, ruby is new to me, but I start to love that language.... Cheers. R.
  • Get parent name and type of entity

    8
    0 Votes
    8 Posts
    1k Views
    K
    Thanks
  • Getting the status bar text

    3
    0 Votes
    3 Posts
    134 Views
    A
    Hmm... Thanks Tom! @thomthom said: No API. You might be able to use Win32 under Windows - but I have no idea for OSX.
  • Getting and iterating scene list?

    16
    0 Votes
    16 Posts
    316 Views
    Dan RathbunD
    @hpw said: Edit: Kernel.sleep does not work for that. Yes.. I guess we decided it would not, because the C++ engine cannot call observers, as the scene changes, etc.
  • Where to start?

    44
    0 Votes
    44 Posts
    772 Views
    thomthomT
    @rumcajs said: And where is definited UI? That's from the API - defined in C++. Look to the documentation: https://developers.google.com/sketchup/docs/ourdoc/ui
  • DOS paths

    6
    0 Votes
    6 Posts
    200 Views
    TIGT
    Most of the time I get also get 'full-paths' returned. Just occasionally they revert to the short DOS form. This can occur in the same model with the same 'other plugins' loading and the same paths used... It's not a big issue - often the short-path form works well anyway... and the posted code does return the full-path from the short-form if it's needed...
  • Uploading image file from Webdialog to php-script?

    6
    0 Votes
    6 Posts
    579 Views
    T
    I didn´t know about that possibility and it really seems to be just what I´m looking for. I will definitely give it try. Thanks!
  • XL parameters and dynamic components

    5
    0 Votes
    5 Posts
    190 Views
    X
    Many Thanks Dan, We'll give it a try!
  • Circle orientation other than Z_axis?

    5
    0 Votes
    5 Posts
    204 Views
    T
    It took a while for your medication to be absorbed vector = $pt2a - $pt1a edges1 = entities.add_edges($pt1a, $pt2a) circle = entities.add_circle($pt1a, vector, 1.inch, 16) base = entities.add_face(circle) base.back_material = Sketchup;;Color.new (255,200,100) #use RGB Color numbers base.followme(edges1) using my coded example: subtracting the 2 points creates a 3d vector which is normal to any circle.
  • Rosettacode.org down?

    6
    0 Votes
    6 Posts
    347 Views
    thomthomT
    @chris fullmer said: Could have been part of the godaddy.com hacking. http://it.slashdot.org/story/12/09/11/1747225/go-daddy-network-issues-not-hacks-or-ddos-caused-downtime
  • [Code] Open File Browser and Select File

    5
    0 Votes
    5 Posts
    278 Views
    D
    @jim said: This code opens a Windows Exlorer window with the given file selected. Is there a Mac equivalent? [image: dBQr_2012-09-1112.45.06pm.png] Tig's code does open the file in 'Finder' and highlights the file title > file=("/Some/Folder/MyFile.rb") UI.openURL('file:///' + File.dirname(file)) true Like this it 'opens' in the associated program for that type of file. i.e. TextWrangler opens ruby files on my system. > file=("/Some/Folder/MyFile.rb") UI.openURL('file:///' + (file)) true This will also open in 'Finder' > file = './Some/Folder/MyFile.rb' system("open -R #{file}") true note: returns true/false > file = './Some/Folder/MyFile.rb' system %(open -R #{file}) true note: also returns true/false shorthand works as well >open -R './Some/Folder/MyFile.rb'`` note: NO return of true/false Without the -R recursive flag it will 'open' in the associated app Again, it can be with or without the return, dependant on the call syntax. john
  • New to Ruby need some advice

    4
    0 Votes
    4 Posts
    103 Views
    TIGT
    OK FollowMeAndKeep [FAK]... makes a good basis...
  • Is this a ruby bug?

    5
    0 Votes
    5 Posts
    468 Views
    TIGT
    TT you are of course correct. Within '' only \' within a string and any final \\ are needed - for example \n doesn't apply as a newline. I've adjusted the original post to avoid further confusion
  • Adding Flipped Component Instance

    5
    0 Votes
    5 Posts
    177 Views
    TIGT
    He wanted to copy a selected component-instance [that happens to be mirrored] and was trying to get its definition and place an instance etc. Obviously he could reuse the original's transformation...*** I was trying to show him how he might copy "anything" that is selected, by grouping it. The code groups the selection, adds another instance of it and explodes the original. At that point if he knows the selection was the one component-instance then he has the option to explode its group, giving the same result as placing a second instance using the original's transformation, but if the selection is of something different - e.g. groups, geometry, mixed objects etc - he can choose to do other things with them within the safety of his group - e.g. non-merging geometry is preserved... ***For the avoidance of doubt here is how to duplicate an instance with the same matching transformation [i.e. position,rotation,scaling,mirroring etc]... Assuming that 'instance' is what's been selected/found and it has been tested and found to be a ComponentInstance... copy_of_instance = instance.parent.entities.add_instance(instance.definition, instance.transformation)
  • Select faces with back color

    2
    0 Votes
    2 Posts
    99 Views
    TIGT
    How is such a tool going to establish whether a face is 'inside' or 'outside' a form ? It'd be possible with a 'solid', but with loose faces who is to say what is the right way round ? There are several 'face reversing' tools around - open the 'Plugins Index' page and use your browser's search for 'reverse' or 'flip' etc... Find one that suits you... I think Didier's tool reverses all 'backwards' active faces that are looking at the current camera, which might do what you want best...
  • Should we be autoloading?

    4
    0 Votes
    4 Posts
    212 Views
    thomthomT
    @dan rathbun said: I remember trying this a long time ago.. but did not get it working. Maybe I used it wrong? I do have it working for a large project I'm working on. I set up some of the mixing modules and base classes to autoload. <span class="syntaxdefault"><br />&nbsp;&nbsp;</span><span class="syntaxcomment">#&nbsp;Ensure&nbsp;abstract&nbsp;classes&nbsp;are&nbsp;loaded&nbsp;and&nbsp;found&nbsp;when&nbsp;needed.<br />&nbsp;&nbsp;</span><span class="syntaxdefault">autoload</span><span class="syntaxkeyword">(&nbsp;;</span><span class="syntaxdefault">Observable</span><span class="syntaxkeyword">,&nbsp;&nbsp;&nbsp;</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">join</span><span class="syntaxkeyword">(&nbsp;</span><span class="syntaxdefault">PATH</span><span class="syntaxkeyword">,&nbsp;</span><span class="syntaxstring">'observable.rb'&nbsp;</span><span class="syntaxkeyword">)&nbsp;)<br />&nbsp;&nbsp;</span><span class="syntaxdefault">autoload</span><span class="syntaxkeyword">(&nbsp;;</span><span class="syntaxdefault">BezierEntity</span><span class="syntaxkeyword">,&nbsp;</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">join</span><span class="syntaxkeyword">(&nbsp;</span><span class="syntaxdefault">PATH</span><span class="syntaxkeyword">,&nbsp;</span><span class="syntaxstring">'bezier_entity.rb'&nbsp;</span><span class="syntaxkeyword">)&nbsp;)<br />&nbsp;&nbsp;</span><span class="syntaxdefault">autoload</span><span class="syntaxkeyword">(&nbsp;;</span><span class="syntaxdefault">BezierPatch</span><span class="syntaxkeyword">,&nbsp;&nbsp;</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">join</span><span class="syntaxkeyword">(&nbsp;</span><span class="syntaxdefault">PATH</span><span class="syntaxkeyword">,&nbsp;</span><span class="syntaxstring">'bezier_patch.rb'&nbsp;</span><span class="syntaxkeyword">)&nbsp;)<br />&nbsp;</span><span class="syntaxdefault"></span>
  • Wish List - WebDialog communication model

    16
    0 Votes
    16 Posts
    2k Views
    chrisglasierC
    @caseychamberlain said: @richmorin said: As an example of quirky behavior, execute_script() imposes a fairly small (and undocumented) limit on the size of the executed code string. So, although the call can be used to transfer data (eg, as JSON), any significant amount of data will require multiple calls. What is the limit? I was relying on this to push (sizeable) model data into a silverlight plugin in the WebDialog. I had assumed I needed to chunk, but it would really help to know what that limit is, so I can chunk to that size. Thanks! This is the overriding problem: https://developers.google.com/sketchup/docs/ourdoc/webdialog#add_action_callback
  • Intersect two Component Instances

    7
    0 Votes
    7 Posts
    190 Views
    C
    Thank you. That solved the last Problem with the intersect. you guys have been very helpful@TIG,sdmitch Thanks a thousand
  • Auto naming and replacing materials?

    2
    0 Votes
    2 Posts
    169 Views
    TIGT
    The method texturepath = material.texture.filename returns the path/name of the material's texture's image-file. Use something like imagename = nil; imagename = File.basename(material.texture.filename) if material.texture... To change a material's texture you use a new path material.texture="C:/.../mytetxure.png". To get a material's name use matname = material.name. To rename a material use material.name="newname" OR material.name=imagename if imagename - note that the renaming method is unavailable in older versions of Sketchup...

Advertisement