🚨 Skimp | 25% Off until March 30 Buy Now

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Need a SU Tap & Die plugin

    12
    0 Szavazatok
    12 Hozzászólások
    798 Megtekintések
    M
    http://sketchup.google.com/3dwarehouse/details?mid=db27537086288b21706627b112998eff This is a small model built with some code to make it usable for sketchy physics (and perhaps 3d printing). Does anyone know how this would print on a makerbot? http://youtu.be/dqyyQF9gZeM or by just modeling with some pretty bizarre music http://youtu.be/MKrWDNDd62c
  • Concatenate a string and an integer?

    4
    0 Szavazatok
    4 Hozzászólások
    737 Megtekintések
    thomthomT
    @aerilius said: There are many ways to create strings: string concatenation: 90.to_s + " degrees" # slow because it creates a new third string object string appending: 90.to_s << " degrees" # faster because it adds the second string into the first string interpolation: "#{90} degrees" Note that string interpolation is the fastest. (And reads easier IMO)
  • Visibility in Group/Component editing

    7
    0 Szavazatok
    7 Hozzászólások
    542 Megtekintések
    thomthomT
    Ah, ok now I understand. Yes, then Model.active_path is what you need. And checking if Hide Rest of Model or Hide Similar Components is enabled.
  • Why is 2013 breaking this plugin?

    4
    0 Szavazatok
    4 Hozzászólások
    414 Megtekintések
    thomthomT
    What is breaking? What is expected behaviour?
  • Want to learn &quot;view.draw2d&quot;...is there any basic examples?

    10
    0 Szavazatok
    10 Hozzászólások
    648 Megtekintések
    thomthomT
    @renderiza said: Want to learn using "view.draw2d" and was wondering if there is a very basic example code I can use for learning. It has to be used within a Tool. You invalidate the viewport when something needs to be drawn. And the method then simply accept a set of 2d points (defined by Geom::Point3d)
  • Ruby plugin to standalone application

    6
    0 Szavazatok
    6 Hozzászólások
    555 Megtekintések
    thomthomT
    @prototype said: I thought that I had to put it in the Sketchup shortcut target field "C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe" http://www.thomthom.net/thoughts/2013/04/sketchup-command-arguments/
  • Drawing a ray or line from a vector

    3
    0 Szavazatok
    3 Hozzászólások
    482 Megtekintések
    TIGT
    A vector defines a 'direction', which essentially is not determined in its location in space. To define an 'edge' you need a start point - let's call it 'point1'... Then set your vector's length using: vector.length=length and find 'point2' for the end point: point2=point1.offset(vector) Now you have two points representing the start/end-points of a potential new edge. Use Sketchup.active_model.active_entities.add_line(point1, point2) or Sketchup.active_model.active_entities.add_edges([point1, point2]) Don't confuse edge & line - confusing the API does when adding one edge it calls it a 'line'! Actually a 'line' is a special geometrical construct of [point, vector], which us infinitely long passing through the point, along the vector. Lines can intersect etc...
  • Displaying the Normal of a Polygon

    4
    0 Szavazatok
    4 Hozzászólások
    254 Megtekintések
    J
    Thanks guys thats what I needed.
  • [Ruby API] Bug Mac - Sketchup.get_resource_path

    4
    0 Szavazatok
    4 Hozzászólások
    261 Megtekintések
    D
    SU v8 and v7 on my mac edit, it returns a path to nowhere... but I knew I had it somewhere... matPath = (ENV[ "IG_ROOT"]).dup << "/English.lproj/Materials.strings" works on v8 and v2013 at least john
  • Ruby Style Guide

    3
    0 Szavazatok
    3 Hozzászólások
    336 Megtekintések
    renderizaR
    Wow nice find...thanks!
  • OSX MDI confusion

    7
    0 Szavazatok
    7 Hozzászólások
    884 Megtekintések
    D
    that does seem to work if you want a persistent reference you can add an xattr to the active model file... def only_iff model = Sketchup.active_model modName = Sketchup.active_model.title modPath = Sketchup.active_model.path modEntID = Sketchup.active_model.definitions.entityID case when modName.to_a.length == 1 then remove_old = %x(xattr -d test "#{modPath}" 2>&1) if (%x(xattr -p test "#{modPath}" 2>&1)).length > 0 perSistent = %x(xattr -w test "#{modEntID}" "#{modPath}" 2>&1) puts modEntID # but could be any persistent reference when modName.to_a.length == 0 then Sketchup.send_action('saveDocument;') UI.messagebox "Save model and retry" end #case end # def only_iff then in another session you can check if it's been thru your mill before. modPath = Sketchup.active_model.path %x(xattr -p test "#{modPath}" ) just thoughts john
  • Reusing menus - what is going on?

    14
    0 Szavazatok
    14 Hozzászólások
    1k Megtekintések
    T
    @thomthom said: So it appear that it only work if it's all done within one action. Which is why my menu plugin works when SketchUp starts up, because the all the plugins are loaded within the same "loop" (??). ... This is awkward and annoying. I can probably make it work, what I want to do, but it'll hard to debug as I need to actually restart SketchUp every time... http://sketchucation.com/forums/viewtopic.php?f=180&t=52489&start=30 Yes its a great way to waste more time! Its enough to make one take up quantum computing instead
  • Loading csv giving error

    6
    0 Szavazatok
    6 Hozzászólások
    467 Megtekintések
    TIGT
    The FILE works if you run the code from the .rb file loading. The way you have it set should work if the file 'Price_lookup.csv' is in the same folder as the .rb... You code has an error: csv_text = File.read('Price_lookup.csv') should be say csv_text = IO.read(csvfile) giving you an array of the lines. I'm not sure about how you are parsing the file data you read in... BUT once you successfully get the data in, then temporarily 'output' it to the opened Ruby Console to check it's as you expect, with: puts csv_text and showing hidden characters like \n etc p csv_text added in after the data is read-in...
  • Layer Material

    22
    0 Szavazatok
    22 Hozzászólások
    5k Megtekintések
    jiminy-billy-bobJ
    Up ?
  • Align component boundingbox to global axis

    5
    0 Szavazatok
    5 Hozzászólások
    399 Megtekintések
    M
    You are a good man Chris. ....as Rosanne Rosana Dana once so eloquently said.....never mind.
  • GMSH exporter

    14
    0 Szavazatok
    14 Hozzászólások
    3k Megtekintések
    bomastudioB
    @djskippy said: Hi Bomastudio, Some time ago I've written an export script from Sketchup to Gmsh. Sketchup Groups are exported as Volumes in Gmsh Sketchup Faces are exported as plane surfaces in Gmsh Sketchup Edges are exported as lines in Gmsh Sketchup Vertices are exported as points in Gmsh The script handles nested groups and applies all transformations to the points in Gmsh Inner faces are exported correctly. It even exports text entered in Sketchup (not 3D text). The only thing this script doesn't do is: Export circles and arc's as Gmsh circles, it now just exports them as lines and points (that's how Sketchup see's them). To correct this you'll need to take a look a IGES_EXPORT and how it exports circles, cylinders and cones. Thanks!!!!! I was looking for this plugin for a long long time!!!!
  • Aborting a .rbz install

    16
    0 Szavazatok
    16 Hozzászólások
    894 Megtekintések
    danielbowringD
    @driven said: I'm under the impression Windows will see it as a space and error out Error: #<NoMethodError: undefined methodwindows' for #Object:0x56b89ec>` Depends what encoding you save it in. Western (Windows 1252) gives this: Error; #<SyntaxError; (eval);5231;in `load'; path/to/nbsp.rb;1; Invalid char `\240' in expression> UTF-8, however, will load and work fine windows use = "o.~" puts "Success #{windows use.inspect}" # -> load 'path/to/nbsp.rb' Success "o.~" true Note: Browsers will replace the character in question (160, "non-breaking space") with a regular space (32, "space"), but I did correct for this for this test.
  • Transforming an object with SketchUp Ruby

    3
    0 Szavazatok
    3 Hozzászólások
    2k Megtekintések
    K
    Aerilius You are a star ! Thanks a million Kevin
  • Launch Sketchup from inside AOO/LO Draw or Writer?

    3
    0 Szavazatok
    3 Hozzászólások
    486 Megtekintések
    V
    RE OLE....I know about OLE but its hap hazard in AOO/LO....problematic RE embed picture....Yes...do that now all the time...very manual...doesnt lend well to update and managing versions. Since AOO/LO draw is not much more than impress (abstract shapes, simple diagrams, 2D) just curious if anybody was looking to take the productivity package to the next level. AOO/LO filters for Visio are real weak...so that is not an option. Could look at inkscape,etc...but those seem to be more about making logos and icons. Could look at vpython since there is a python bridge but vpython is really used for scientific visualization (relatevely crude colors and shapes, no real library of shapes to build off of, etc). so just curious.
  • Export images to saved file location with file name

    15
    0 Szavazatok
    15 Hozzászólások
    875 Megtekintések
    B
    I have run into an issue when I'm working on the same image on two different computers - when exporting the Sketchup image, the Width & Height are locked (when one is edited, the other automatically matches that computer's viewport ratio). I am trying to find a way to export an image with independently filled in Width and Height resolutions. This seems to be the closest Ruby I could find to fixing my issue. Is there any way to modify this to get what I'm looking for? I export so often that I would like to create a button on a new toolbar to keep at the top of the screen, instead of entering the Ruby Console every time. Is there any way to do this?

Advertisement