Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Bulletproof sample code for a plugins menu ???

    12
    0 Votes
    12 Posts
    601 Views
    TIGT
    Now you understand how to debug! Missing _item ... ...@KSORsubmenu.add**_item**... My typo - which occurs twice when the item is added to the submenu [or it wasn't thanks to the typing error ] Edit those two 'add' lines in your script and it should then work. I have edited the original post so other browsers won't get confused...
  • Leaving out one field in inputbox ???+

    6
    0 Votes
    6 Posts
    373 Views
    K
    Thx to Aerilius - very usefull explanation !
  • Sketchup and open-uri

    4
    0 Votes
    4 Posts
    781 Views
    D
    Sorry for the late reply. So basicly what I want to do is upload files to and from a restful api using multipart/form data that are not in sketchup format. ie, export obj file > upload to server > delete obj file or download stl file > import to sketchup > delete stl file after giving up on net stuff through ruby which all seemed to crash sketchup I started looking into accomplishing this through the web dialog with ajax. While it works for communicating with the api in other ways and solves a lot of my problems. It is still not possible to upload or download a file with out the file dialog (and for good reason) but I want something more seamless. So far the closest thing I have found is https://github.com/danawoodman/google-sketchup-file-downloader but it isn't working. Thanks for your help, I will keep at it and appreciate any more help Thanks!
  • [Code] Executing a cmd without the black screen (Windows)

    17
    0 Votes
    17 Posts
    8k Views
    Dan RathbunD
    One issue is there is what I consider a bug in the Ruby Win32 source. If you try to set ENV["RUBYSHELL"] to "Wscript" it will not work because the source always wants to inject a " -c" switch into the command. Problem is, Microsoft wrote Wscript.exe and Cscript.exe to poop out if any unknown switches are in the command. (I think cmd.exe just ignores unknown switches.) So any way, the normal Ruby means of changing the shell that %x and ` Kernel.`` use, will actually not work on Windows.
  • System command without window

    2
    0 Votes
    2 Posts
    102 Views
    thomthomT
    Never mind - found this thread: http://forums.sketchucation.com/viewtopic.php?f=180&t=36973&start=0
  • How to get the saved file path

    13
    0 Votes
    13 Posts
    3k Views
    OricAtmosO
    Hey, I ran into the same problem as Nick60 today and was glad I found this thread with an nice solution. However there's still one use case with a problem: when the user saves the model with "Save copy as..." the side-car file will be saved under the wrong name. Any suggestions how this could be fixed?
  • Entities.intersect_with crash

    10
    0 Votes
    10 Posts
    612 Views
    K
    @unknownuser said: ?? The API docs really need to expand with more info on this method! yeah - most confusing method in the API!
  • Iconv.so dependency fails

    7
    0 Votes
    7 Posts
    1k Views
    N
    Hey I get the same problem, Just copy iconv.dll from C:\Ruby\bin in the directory C:\Program Files (x86)\Google\Google SketchUp 8 to fix the problem.
  • Pompidou WebGL Viewer

    10
    0 Votes
    10 Posts
    2k Views
    A
    (You could look it up in the above list). I found only a couple of times something with "layer", and no method to set/change visibility of a layer. I suppose all the layer methods (like many others) are up to now only empty place holders. In addition to that, it depends on what features can be read from the .dae model. As we know, SketchUp's .dae exporter doesn't preserve scenes and layers (but on the SketchUp Showcase they have scenes!). Similarly, the Pompidou Viewer also contains methods for handling geometric primitives and materials (edges etc.) but models are up to now only loaded as a big mesh object, without distinction into single entities.
  • One Face that Should Be Two...

    5
    0 Votes
    5 Posts
    323 Views
    K
    @unknownuser said: ... would Sketchup.send_action("fixNonPlanarFaces:") do anything in this case? ... I should've saved the file with the messed up face to try it on! I ended up with something similar to TIG's suggestion,except that I found any vertices referenced more than two edges on the same face. Then I was able to re-create the faces using the original face's vertices. -- Karen
  • Number of processors

    4
    0 Votes
    4 Posts
    388 Views
    TIGT
    num = ENV['NUMBER_OF_PROCESSORS'].to_i is much easier than the other way and should be fine unless you want to have a cross-platform solution... We don't know if MAC has the same ENV variable 0 - some references are similar to PC, while others can be the same ??
  • Move vertex using absolute coordinate

    5
    0 Votes
    5 Posts
    2k Views
    TIGT
    That is a much more efficient way of doing it [transforming [or erasing] entities en mass is often preferable]... But in my defense... the title of the post is move **vertex**... NOT move **vertices**... - so there is probably no significant benefit in the en mass way when he's moving just one or two or three vertices - obviously if a whole load of things are changing a time lag will be noticeable...
  • Get the coordinates of the corners of the "blue box"

    7
    0 Votes
    7 Posts
    500 Views
    thomthomT
    Get's the ComponentDefinition of the ComponentInstance or Group definition = self.get_definition(entity) Get's the bounds of the definition - note that if you get the bounds of the instance it will be a Boundingbox aligned to the model axis - not the instance axis. Which is why you need to get the definition bounds. bb = definition.bounds Now transform the points of the definition boundingbox with the transformation of the instance. pts = self.bound_points(bb).map { |pt| pt.transform( entity.transformation ) In other words, get the boundingbox of the definition and apply the instance transformation to the coordinates of that boundingbox.
  • Control over camera lens shift ?

    15
    0 Votes
    15 Posts
    4k Views
    thomthomT
    Unfortunately there is no control over the amount of lens shift in SketchUp. There is currently just 2pt perspective - as mentioned, not even that can be controlled reliably.
  • Help Needed - Using Ruby to Project a Vertical Face.

    9
    0 Votes
    9 Posts
    725 Views
    E
    Thanks sdmitch - The Updated Code Snippet does everything I wanted to achieve and it is now being used by members of the IMVU-SketchUp Community to "Antagonize/Annoy" some of those unfortunate people who mistakenly think only AutoDesk can produce 3D Model Making Software.
  • How to debug?

    46
    0 Votes
    46 Posts
    83k Views
    liquid98L
    [encourage] [/encourage]
  • Ruby Challenge

    7
    0 Votes
    7 Posts
    881 Views
    J
    @unknownuser said: @Jim I must say that I am bluffed with the speed of Ruby, thinking that all the lines are interpreted and that I use many Array operations which have a lot of code behind them.[/qoute] My thought is that it is fast because there are no objects being created. The arrays being manipulated contain only pointers to integers which there is only a single instance of in Ruby. @unknownuser said: PS: another challenge would be to create a Sudoku solution workbench in Ruby! Yes, that's a good one; and i had a similar one in mind called the "100 squares" puzzle.
  • [Code] custom file_loaded() and file_loaded?() v2.0.0

    11
    0 Votes
    11 Posts
    7k Views
    Dan RathbunD
    OK.. so, for those you who have read the thread.. looked at the template, and scratch your head and wonder why all the complexity to control a private array ?? Answer.. it's just an example, of a private library mixin module. In practice, you can rename the mixin module to whatever you like... and insert whatever proprietary functionality you wish to include in only YOUR plugins (ie, methods in the mixin sections, other class variables and constants, etc.) whilst not allowing some other "hack" to use those features in their plugins.
  • Import DWG files

    5
    0 Votes
    5 Posts
    417 Views
    thomthomT
    @arcad-uk said: So why not grab a copy of the earlier version while you can... http://support.google.com/sketchup/bin/answer.py?hl=en&answer=60107 import through the earlier version then bring it into v8? 1+ - I got SU7 and the importer plugin on disk archived.
  • Creating new variables in for-loop?

    5
    0 Votes
    5 Posts
    266 Views
    R
    Ok thank you Dan. I will try that.

Advertisement