sketchucation logo sketchucation
    • Login
    1. Home
    2. kwalkerman
    3. Topics
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    K
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 28
    • Posts 148
    • Groups 1

    Topics

    • K

      Changes in 2015

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      45
      0 Votes
      45 Posts
      2k Views
      D
      I saved it as a componant and ... DefinitionList.load Timing Tests > SketchUp Version; 15.0.9349 > 0.033619; 0.033619 > 0.003637; 0.003637 > 0.003768; 0.003768 > 0.004126; 0.004126 > 0.003228; 0.003228 > 0.003331; 0.003331 > 0.003248; 0.003248 > 0.003292; 0.003292 > 0.003231; 0.003231 > 0.003322; 0.003322 > Average; 0.006480200000000001 prior to that I got DefinitionList.load Timing Tests > SketchUp Version; 15.0.9349 > 1.569674; 1.569674 > 1.604715; 1.604715 > 1.554494; 1.554494 > 1.546019; 1.546019 > 1.591651; 1.591651 > 1.560916; 1.560916 > 1.561827; 1.561827 > 1.580865; 1.580865 > 1.577112; 1.577112 > 1.575873; 1.575873 > Average; 1.5723146 john
    • K

      EntitiesObserver Weirdness

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      223 Views
      K
      Hi Dan, Holding a reference does't make any difference. The only time the reference held by @m is actually stored is when the observer is assigned to Sketchup.active_model.entities. Also, I noticed that in cases where I have a new file, and I first add the observer to a group's entities collection, the observer does not alert onElementModified for the material. It only alerts for the face. Thanks, -- Karen
    • K

      EntitiesObserver in SU 2014

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      316 Views
      Dan RathbunD
      @kwalkerman said: Is there any other way to detect new objects in a model ... groups and component instances? Try the DefinitionObserver # onComponentInstanceAdded callback.
    • K

      Protect Commercial Plugin

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      1
      0 Votes
      1 Posts
      241 Views
      No one has replied
    • K

      Guid

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      342 Views
      K
      Thanks.
    • K

      Issues with Scrambler

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      1k Views
      Dan RathbunD
      Karen.. this is a forehead smacker (so get your hand ready.) Standard Ruby has no idea what a scrambled rbs file is, or how to decrypt it. So the SU development team created a module method that could open, decrypt and then evaluate them. You need to use the Sketchup::require() module method. There are other issues with scrambling. The Ruby keywords __LINE__ and __FILE__ do not currently work inside scrambled rubies. (Fixed in SketchUp 2014+ using Ruby 2.0 or higher.) I'm am glad that you have decided to use your own filespace. It's only smart. I posted an example of doing this with scrambled rubies. See: [ code ] SketchupExtension and rbs rubies
    • K

      Entities.intersect_with crash

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      263 Views
      K
      @unknownuser said: ?? The API docs really need to expand with more info on this method! yeah - most confusing method in the API!
    • K

      One Face that Should Be Two...

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      151 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
    • K

      Detect User Access to Clipboard

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      978 Views
      D
      Hi, I have an Applescript that opens RC then /copy/pastes/runs, it could easily include additional instructions. eg. open/join an existing ruby first. I had one that also closed RC again, but I don't need that. I can launch from inside SU or from separate menu-bar item that will open SU if it's closed. Obviously mines a mac-hack, can you do that on a PC? My experiments showed RC as the only reliable way in unless you paste/write to file and have 'system' request Sketchup to load it. Permissions can be tricky. A WebDialog would avoid opening RC, but would need to be open itself first. john
    • K

      Mimic 'select' in custom tool

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      129 Views
      Dan RathbunD
      An easier way is to make menu macros for the context menus (the right-click popup and the Edit menu's selection submenu.) FYI: I posted a boilerplate sample
    • K

      [Code] Change Axes of a Group

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      1k Views
      K
      OK, here is the solution for anyone who needs it in the future: # accepts either one or two arguments. The first is always the group or component where the axes needs to be corrected # the second can be a parent group or component (something that has a transformation). If nothing is passed in, the global # model x,y, and z axes will be used. The parent attribute should be used any time there is a nested component. def change_axes_to_parent(*args) if args.length == 1 g = args[0] p_t = Geom;;Transformation.new else g = args[0] p_t = args[1].transformation end t = g.transformation #p_t = parent.transformation if t.xaxis != p_t.xaxis || t.yaxis != p_t.yaxis || t.zaxis != p_t.zaxis o = t.origin # different axes, require that all components inside be rotated tran = Geom;;Transformation.axes o, t.xaxis,t.yaxis,t.zaxis t_o = Geom;;Transformation.new o if g.is_a? Sketchup;;Group ents = g.entities elsif g.is_a? Sketchup;;ComponentInstance ents = g.definition.entities end ents.transform_entities tran, ents.to_a ents.transform_entities t_o.inverse, ents.to_a g.transform! tran.inverse g.transform! o end end
    • K

      Smooth Curve

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      377 Views
      K
      Absolutely!!! I would like to be able to start with either an ArcCurve, or just a curve. I have Fredo's bezier curve plugin installed, but I don't know how I would use it in this instance. Can you walk me through the steps a bit more? Thanks so much, -- Karen EDIT: Oh, wait, the polyline divider is what does it. I think I can take it from here. Thanks for the clue.
    • K

      Definition Observer

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      515 Views
      K
      Thanks TIG. TT - I revisited your observers chart page after posting the initial message. Definitely very helpful. Thanks for maintaining it. -- Karen
    • K

      Sketchup 8 Patch ETA

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      15
      0 Votes
      15 Posts
      1k Views
      Dan RathbunD
      And now I'm REALLY hoping for M2... the toolbar entries in my Registry are up to 566 and growing !! Sketchup is very slow to startup. (sigh.. manual delete of registry keys, again.. and again.)
    • K

      Get objects at specified poitn

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      11
      0 Votes
      11 Posts
      474 Views
      Chris FullmerC
      Good question, hopefully soon. Now we'll have to add a version check to make sure people are not running SU 8, original release. But that's ok, the fix will be well recieved.
    • K

      Entities.add_group(ents)

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      17
      0 Votes
      17 Posts
      898 Views
      K
      ... actually this works if you want to create a sub-group that includes all entities of the parent group, but not if you want to create a sub-group that includes only SOME of the entities of the parent group. For instance, I start with a box, and I create one group for all walls, another for all roofs, and another for the floors. I guess I could create multiple sub-groups using your method, and then erase everything that I don't want out of each group. Aarg! This is much more calculation intensive that I want! -- Karen
    • K

      [Plugin] Select by Material, and Hide All Unselected

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      31
      0 Votes
      31 Posts
      47k Views
      R
      Does this plugin work in 2021 versions of SU... Coudl just install and try it I guess
    • K

      [Info] Allowable Classes for "set_attribute"

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      57
      0 Votes
      57 Posts
      6k Views
      Dan RathbunD
      Storage: dict["keyname"]= ary.inspect Retrieval: ary = eval(dict["keyname"]) It has no problem with an empty array. There is something in the code of the set_attribute method, that will ignore even a string representation such as "[]" ?
    • K

      Ruby Singleton Class

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      2k Views
      Dan RathbunD
      @kwalkerman said: I thought this was one of the Ruby native classes? There are 2 catagories of Ruby Base Classes: Standard Included These are loaded along with the Ruby Interpreter. (They are bundled inside the DLL.) Extended Library These must be loaded when needed by using the require('libfilename') method. @kwalkerman said: Any idea why SU can't find it? Because Windows Sketchup does not come with a full Ruby Installation. (Some platforms: Linux, Apple OSX, etc. come "out-of-the-box" with a full Ruby Installation, but this is the OS OEM's doing, and not Google's.) In either case Sketchup is not preset to find the Standard Ruby Library folders. You would need to run a script like my example: See: [code] Ruby LOAD PATHs script for (Win32) @kwalkerman said: Is there any way to restore the file and/or the source code so that I can reference it? On Windows you need to go get the Windows One-Click Installer to install Ruby on your system. See the section: Ruby on Windows on the RubyLang.org Downloads page: http://www.ruby-lang.org/en/downloads/ I have not tried v.1.8.7 with Sketchup yet, I usually recommend the latest v.1.8.6 After install... you'd need to backup the 'msvcrt-ruby18.dll' file in the Sketchup program folder (or rename it to: 'msvcrt-ruby180_p10.dll' as that is the actual version and patch level that ships with Win32 Sketchup.) Then COPY (not move,) the interpreter dll from your new install's bin folder (usually C:/ruby{ver}/bin/) to the Sketchup program folder, renaming the copy to: 'msvcrt-ruby18.dll' (The Ruby guys have started putting all 3 version numbers into the filenames, so you might see it named: 'msvcrt-ruby187.dll'. Just be sure to leave it named as is, in the real Ruby bin folder; But Sketchup is hard-coded to load an exact interpreter dll filename.) The purpose / idea here is to be using the same version Library files as the interpreter your running.
    • K

      Strange warning from Face.vertices

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      15
      0 Votes
      15 Posts
      762 Views
      AdamBA
      You can guard against not getting what you expect all you like, but once you get this kind of result, the internal structure of SU is toast. It always seems to comes down to Ruby coding errors on your part. I believe the issue is that (possibly for performance reasons?) SU isn't at all defensive in its API. You give it a bunch of crap and it dutifully carries on using it resulting in increasingly wrong behaviour. So if you ever enumerate winged edge structres etc and get crazy objects, don't guard against it, go back and find your mistake - and it can be a real PITA to find.. Adam
    • 1 / 1