Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

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
  • Can a Ruby tool return a value to a 'calling' program?

    5
    0 Szavazatok
    5 Hozzászólások
    483 Megtekintések
    Dan RathbunD
    @johnwmcc said: Is it possible or allowable to have module-wide variables that aren't global? YES. ALL of your plugins should be within a company or author namespace module. Each of your separate plugins would be within a sub-module of that toplevel module. Let us say for example your toplevel module is named McC and within that you define a @@last_point variable. You can also define getter and setter methods to set and access that variable within the toplevel module: module McC def McC;;last_point @@last_point end def McC;;;astPoint=(pt) @@last_point = pt.is_a?(Geom;;Point3d) ? pt ; Geom;;Point3d.new(0,0,0) end end # module McC OR you could define your shared functionality within a mixin module, and then include it within any of your sub-modules or classes, with which you want to share it with. See the the "Pick-Axe" book on Programming Ruby. It's in the Ruby Resources thread. AND also online in HTML format.
  • WebDialog encoding bug found!

    44
    0 Szavazatok
    44 Hozzászólások
    3k Megtekintések
    G
    Sketchup 2014 Mac 10.9.2 testing text in Simplified Chinese [image: 023i_encoding_issue_14.0.4899.png]
  • Context menu in Materials Window (Inspector)?

    2
    0 Szavazatok
    2 Hozzászólások
    383 Megtekintések
    tt_suT
    Afraid not. But I think it sounds like a useful thing. I'd recommend you file a feature request. (Please include use case - it helps so much more than just the technical request.)
  • Why does this code break?

    9
    0 Szavazatok
    9 Hozzászólások
    846 Megtekintések
    J
    The advantage of code tags is they can easily be copied and pasted in a code editor, or one of the SketchUp console dialogs. I have my editor and SketchUp set up[1] where I can run the pasted code in SketchUp with the push of a key. So testing posted code is fast and easy - copy, paste, run. That's why it's important to post "run-able" code - leaving variables and constants undefined makes it harder to help. [1] https://github.com/noelwarr/su-tunnel
  • Location API

    7
    0 Szavazatok
    7 Hozzászólások
    819 Megtekintések
    F
    @juantxo said: It's a pro feature. Just click mountains icon. Thanks! Unfortunately this didn't give me the level of detail I'm after (can't zoom in far enough).
  • Some menus don't open during a custom tool operation

    11
    0 Szavazatok
    11 Hozzászólások
    637 Megtekintések
    tt_suT
    Yes, view.invalidate will tell SketchUp to redraw. It doesn't redraw immediately, but let SketchUp manage update rate. Not sure how this is related to dialogs, focus and ALT key though...
  • Face to cam script for PDF3D

    4
    0 Szavazatok
    4 Hozzászólások
    1k Megtekintések
    juan974J
    finally the problem was tan(alpha)=tan(alpha+180°) here the result...
  • How to open attributes ?

    2
    0 Szavazatok
    2 Hozzászólások
    291 Megtekintések
    Dan RathbunD
    Entity#get_attribute() Entity#set_attribute() The dictionary name is "dynamic_attributes"
  • Why is a box deleted / Why is a box not a manifold?

    7
    0 Szavazatok
    7 Hozzászólások
    825 Megtekintések
    tt_suT
    There is no need to explode - just don't create two groups. Change this: bbx1 = Sketchup.active_model.entities.add_group g1 = bbx1.entities.add_group face1 = g1.entities.add_face boxpts face1.reverse! face1.pushpull(bbxmax.z-bbxmin.z ) to bbx1 = Sketchup.active_model.entities.add_group face1 = bbx1.entities.add_face boxpts face1.reverse! face1.pushpull(bbxmax.z-bbxmin.z ) If you read your code carefully you will see that you call add_group twice, once in the root entities element and once in the first group you created.
  • Support for Gems with Native Extensions?

    3
    0 Szavazatok
    3 Hozzászólások
    329 Megtekintések
    S
    On Mac OS X, even with XCode and command line developer tools installed, the SU installation of Ruby is not set up to enable compiling and installation of most C-library Gems. For example, one Gem I attempted assumed that there was an executable Ruby interpreter in the SU Ruby Framework where the Gem library lives (there is not - only the dynamic library loaded by SU). Fixing this requires loading a 32-bit Ruby compatible with SU, since the native installation is 64-bit. But even then the generated Makefile and other scripts fail due to problems with configuration. For example, Ruby was launched with an illegal command line option to one of the install scripts. In the end I hand-edited things and got the Gem to compile and install, only to discover as TT points out that SU's Ruby intentionally omits certain standard library components that were found to crash SU. Bottom line: with enough determination you can build a compiled-C Gem, but don't be surprised if libraries it wants are missing or if it BugSplats SU! Steve
  • Incompatible character encodings loading .so files

    9
    0 Szavazatok
    9 Hozzászólások
    989 Megtekintések
    Dan RathbunD
    @al hart said: Is GetShortPathName in ruby or in Win32API.so? Neither. It is in "Kernel32.dll", and you use either Win32API or DL class objects to wrap calls into that native library. See: [MSDN : GetShortPathName()](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364989(v) Ruby : DL library .. and since DL ( really is deprecated, and now a wrapper into Fiddle calls,): Ruby : Fiddle library
  • How to transform InputPoint to local coordinate system?

    19
    0 Szavazatok
    19 Hozzászólások
    2k Megtekintések
    R
    @unknownuser said: Postby tt_su » Tue Mar 18, 2014 8:08 am When you get identity transformation, did you check the depth? Maybe the position of IP is coming from an inferred point and therefore isn't coming from inside the group/component you click on? The bug reported by Freddo a few messages above seems to be related to inference points indeed. I always get the identity from ip.transformation when the position of the cursor is along an inference line. Besides that, along inference lines, the ip.depth equals 0 and the ip.degree_of_freedom equals 1 independent whether a face was picked by the InputPoint or not. Even along inference lines, the InputPoint position seems to be correct. Update: Along inference lines, the InputPoint position seems to be the position of the point on the inference line and not of the cursor position. Ronaldo
  • Add_group with argument

    5
    0 Szavazatok
    5 Hozzászólások
    529 Megtekintések
    fredo6F
    TIG, Thanks. Indeed, once it is clear that this is an equivalent to make_group, I can manage to design a 'copy-as-group'. Thanks to all Fredo
  • Ruby 2.0 __FILE__ contains incorrect encoding.

    18
    0 Szavazatok
    18 Hozzászólások
    4k Megtekintések
    D
    I started a new encoding bug topic incase it's unrelated... http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=57074#p518534 can you all have a look? john
  • Find computer uuid

    2
    0 Szavazatok
    2 Hozzászólások
    599 Megtekintések
    JuantxoJ
    Thanks to Driven and Dan. I will use new notation instead use force_encoding. I think now it should works... #UUID in RUBY 2.0 WINDOWS ` cmd="wmic csproduct get uuid" filename = File.join(ENV["TMP"],"backquote.out") exec_string = "`" + cmd + " > " + filename + "`" exec_string.gsub! '\\', '/' eval("#{exec_string}") uuid="" open(filename, "r:BOM|utf-16le:UTF-8") do |io| uuid = io.read end`
  • Document.getElementById ?

    8
    0 Szavazatok
    8 Hozzászólások
    593 Megtekintések
    G
    Thank you for the formatting. The splitted version works on PC, IE11, SU 2014.
  • Google translate in a webDialog?

    7
    0 Szavazatok
    7 Hozzászólások
    832 Megtekintések
    D
    my thinking is by having the full version open, you can choose to use the 'other' interpretation.. which may make it sightly more accurate? [image: mXNK_2014-03-2809.43.18pm.png]
  • Extrusion sometimes reverses all faces

    6
    0 Szavazatok
    6 Hozzászólások
    435 Megtekintések
    G
    When it comes to push pull I understand that it does depend upon the winding (clockwise or counter clockwise) of the polygon. This is consistent and repeatable. However, with an extrusion that has a closed polyline as a path it is not repeatable. I can guarantee that the points for the face are always created exactly the same way - since they come out of a txt file. I store x and y points at 1/10000 decimal inches. The z values are set as 1/2 of the height of the door panel. I also calculate the path as x and y points which is a closed polyline. The Y values are 0. face = group.entities().add_face(face_pts) path = group.entities().add_curve(path_pts) face.followme(path) If I build the door at [0,0,0] look at it and then do a ctrl_z and repeat this process, I get a results where the the extrusion is sometimes reversed and sometimes not. It appears random - although the polyline and face are always created exactly the same way. When I create my curved stair stringers using fill_from_mesh I store each polygon's points with a clockwise winding. So far this has proved 100% predictable and repeatable. In the early days I used to do a lot of work with GIS and Windows GDI and create polypolygon this way. If you wanted to create a continent with a large lake that has an island that has a body of water you would have a series of 4 diminishing polygons each completely residing within each other. The outer most polygon would be clockwise (the continent) the large lake would be counter clockwise, the island would be clockwise and the body of water in the island would be counter clockwise. I found that the sketchup works essentially the same way with meshes.
  • Use Sketchup default cursors

    23
    0 Szavazatok
    23 Hozzászólások
    7k Megtekintések
    tt_suT
    http://www.sketchup.com/intl/en/developer/docs/ourdoc/ui#set_cursor http://www.sketchup.com/intl/en/developer/docs/ourdoc/tool#onSetCursor
  • Trying to invoke a selection from a web dialog

    4
    0 Szavazatok
    4 Hozzászólások
    452 Megtekintések
    Dan RathbunD
    I am not impressed with that book, at all. Using global variables is a no-no. Choose a name for your top level module, and write all your code within your own module namespace. Then use @vars (instance variables,) or @@vars (module variables.) Often we make each of our plugins in a sub-module of our toplevel author module.

Advertisement