sketchucation logo sketchucation
    • Login
    1. Home
    2. Anton_S
    3. Topics
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download
    A
    Offline
    • Profile
    • Following 0
    • Followers 7
    • Topics 52
    • Posts 1,261
    • Groups 2

    Topics

    • A

      Calculations on its own thread

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      623 Views
      T
      Everything I have tried in attempting to use Thread in SketchUp has failed miserably. This works for me: timer = UI.start_timer(1.0,true) { start = Time now loop do break if Time.now-start > 0.8 ... long computation involving many loops ... end } ... call stop_timer(timer) when appropriate, perhaps from within the loop My computation is copying a file to a WebDialog; the file is output from another process, and can grow over time to be quite large. This code updates the WebDialog once per second, and permits the "Kill" button (in another WebDialog) to work. Each loop reads 1024 bytes from the file and uses WebDialog#execute_script to append it to a textarea (escape \n and " to keep the JavaScript valid); it handles multiple reads at EOF as the file can grow.
    • A

      Ruby Style Guide

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      275 Views
      renderizaR
      Wow nice find...thanks!
    • A

      How to check syntax without executing

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      478 Views
      thomthomT
      catch was supposed to be rescue in my snippet. I was language confused. :s
    • A

      [Code] Raytest Util

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      23
      0 Votes
      23 Posts
      1k Views
      jiminy-billy-bobJ
      I've been playing with raytest a bit. From my understanding, it works like this: It checks ALL entities in the model root context If something is hit and it's a face/edge/etc, the raytest returns the entity If the hit entity is a group or component, it again checks ALL entities in that group/comp And so forth until it hits a face/edge/etc So if you have a lot of loose geometry in one of the hit contexts, it will be damn slow. But you can have a shitload of geometry in a group/comp not on the path of the ray, and you'll have decent performances. To check if a group/comp is hit, the raytest doesn't look at the geometry inside it, but rather at its bounding box. This is really important because you could have a lot of geometry away from the ray, but if the bounding box of the containing group is on the ray path, all of that geometry will be checked. Resulting in a slow raytest. I hope it's clear?
    • A

      Ruby loaded file vs eval

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      1k Views
      thomthomT
      Sure, but if the results are that close then it's insignificant. Large differences - the ones that matter you'll see quickly.
    • A

      [Help] Create "Check for Update" event

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      104 Views
      Dan RathbunD
      Everyone wants this functionality. Some work has been done. ExtendSketchUp has this goal. Fredo6 created a web-based update checking feature. (Do a search.) Others have done it with a UI::WebDialog You will likely need to use the functionality in the SketchupExtension class for installed versioning. Unfortunately.. the community has not yet agreed upon a file manifest format to track installed file locations. (So an uninstaller can remove them.)
    • A

      Geometry, Transformation, and Scaling

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      549 Views
      A
      Tnks! All logical and useful
    • A

      Calculate edge "profiles"?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      778 Views
      A
      TIG, your profetional! Everything works, the way you said [attachment=1:ylsl8vni]<!-- ia1 -->SelectEdgesInProfiles.png<!-- ia1 -->[/attachment:ylsl8vni] Here's a little plug I've got for a little testing. [attachment=0:ylsl8vni]<!-- ia0 -->SelectEdgesInProfiles.rb<!-- ia0 -->[/attachment:ylsl8vni] %(#00BF00)[Select Edges in Profiles Date - Monday, July 16, 2012 Version 1.0.1 Main thing on how to locate the edges in profiles is by TIG Written by Anton Synytsia Not a plugin, but written for simple use of testing Menu Location: UI_menu:plugins/selectEdgesInProfiles Usage: Select grp(s) or/and component instance(s) and then select the menu item Yet, Unsolved bugs: Selects edges that camera doesn't sees. TIG.getEdges function doesn't yet search the group for edges found inside the parent group.] Changes: Fixed the selection of edges behind the faces, the edges that camera doesn't even sees. Save to Plugins directory
    • A

      Wrap gem under own namespace

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      14
      0 Votes
      14 Posts
      404 Views
      thomthomT
      The string you feed create_makefile should relate to the init function in your C extension. As you see from the Hello World example, extconf contains this: create_makefile( 'SX_HelloWorld' ) And in the C source you have the init function: void Init_SX_HelloWorld( void ) Note how "Init_" is prepended of the name you feed makefile - and it's case sensitive. @anton_s said: change the vcvars32.bat path to your current vcvars32.bat path, and run it to compile. I have found after making the tutorial that it is easier to just launch the command prompt shortcut that ships with Visual Studio. It's there in it's folder in the start menu. The environment is set up automatically.
    • A

      Identify/locate the Subclass

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      85 Views
      A
      @dan rathbun said: obj.respond_to?(:activate) Thanks Dan, description - sure will help. Edited: Previously, I used obj.methods.include?(someMethod). - That will give an error if the object wouldn't be a class, nor module. But using respond_to? will work on any selected object without errors. Jst true or false I was wrong in blue words. Actually, .methods can be implemented in any object. 134.methods, nil.methods, "dsfg".methods, false.methods, Class.methods will always work.
    • A

      Linux Windows API?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      90 Views
      A
      @anton_s said: Does linux use and support windows API? It wouldn't be Linux itself, but there is an optional compatibility layer "Wine" that would theoretically run Windows programs on top of any Unix(Linux/BSD/Mac) exactlythe same way like on Windows (but the developers need to do reverse-engineering and it won't ever be complete) I have not yet seen the Win32:API in SketchUp/Wine working. I had to hack it out of some scripts that don't have fallbacks. I wish it will work soon because I liked to use window settings to substitute the classic menu.
    • A

      Ruby Module Variables

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      2k Views
      A
      @dan rathbun said: All of your modules and/or classes need to be within your "author" namespace. If you need one copy of some code, make it a module. If you need multiple copies of some code, make it a class, and use multiple instances of the code. Ok, good advice, thaks . Now I'm on my way to 'Keep on typing' the code.
    • A

      Create Texture via Ruby or/and win32-api

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      3
      0 Votes
      3 Posts
      309 Views
      A
      @dan rathbun said: FYI... SketchUp uses PaintLib internally. It's openSource... see: http://www.paintlib.de/paintlib/ and the source here: http://sourceforge.net/projects/paintlib/ Thanks, converting textures to the other formats, sounds good. Is there is a reference on how to create a bmp(a simple file mode) file, set the width/height of the image and set the color of the each pixel?
    • A

      Sketchup::Text Font

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      960 Views
      thomthomT
      @anton_s said: Is there a way to change sketchup::text font and size through some code? Not per entity - it is a model setting. From the UI you change it from Model Info > Text Not sure if it is exposed via the API...
    • A

      [Plugin] FullScreen v5.1.3 (25 April 2024)

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      285
      0 Votes
      285 Posts
      393k Views
      J
      Fix it as early as possible. Study hard. God bless you.
    • A

      Sketchup View origin

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      2k Views
      A
      @dan rathbun said: EVERYTHING you see on the screen, in Microsoft Windows, IS a window. A button, an edit box, a static text label, a checkbox, ... ALL of them are a window, but their style does not have a resizable frame or a caption bar, like a application window or a dialog (which are also a window.) You have to get the handle for the Sketchup Application window (the parent window,) then use that in view_window_handle = FindWindowEx.call(parent_window_handle,0,"AfxFrameOrView80u",0) Thank you really much!!!, That should help!!!!
    • A

      [plugin] Updated (Dec. 30, 2011) hook Procedure

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      3
      0 Votes
      3 Posts
      5k Views
      mtripleM
      im trying to fix sketchy physics for sketchup 32 2014 based on 64 os , i think i did good so far but the plugin still dont work, the tools appear , but Errors comes up ::: i think its something with misunderstanding of os type : Error Loading File sketchyphysics.rb Error; #<RuntimeError; can't find the symbol `init'> C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/dl/import.rb;126;in `symbol' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/dl/import.rb;145;in `import' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/dl/import.rb;61;in `extern' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/newton.rb;95;in `<module;NewtonServer>' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/SketchyPhysics3/newton.rb;84;in `<top (required)>' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;27;in `load' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;27;in `LoadSketchyPhysics3' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;62;in `doLoad' C;/Program Files (x86)/SketchUp/SketchUp 2014/Tools/sketchyphysics.rb;138;in `<top (required)>' hope u can help me
    • A

      Set/Get Attribute

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      280 Views
      A
      @dan rathbun said: Not in the global Objectspace, no... ... all your code should be inside your unique toplevel module, and all your classes should be inside that as well. Okay, that's what I thought. It was just the wrong use of variables, and people who were learning ruby from sketchy physcics scripts did the same thing, so now I know, Thanks
    • A

      HookProc

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      10
      0 Votes
      10 Posts
      1k Views
      A
      First of all, I'm also russian, you can write the post in russian and in english (if want to)and i'll reply in two languages. So, what you wanted was to get hotkeys input? The actual plugin hookproc can't get hotkeys (key-combinations) input, though there should be a way to get it. I'll do some research on it... and then write a plugin for that.
    • A

      Linux and Mac Virtual Key Codes

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      2
      0 Votes
      2 Posts
      1k Views
      Dan RathbunD
      See these threads: My Apple Keyboard VK_KEYS onKeyDown repeat parameter problem Keyboard translation PC / Mac
    • 1 / 1