sketchucation logo sketchucation
    • Login
    1. Home
    2. Mr.K.1
    3. Posts
    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!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 143
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: NURBS plugin version 0.1

      I was looking for a surface builder, don't know if I'm missing something but Fredo's BezierSpline just does 2D curves.

      But if there already is any sort of SU surface builder in existance I would love to know about it.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: NURBS plugin version 0.1

      But if I remove require() Win32API doesn't find the file at all... and I'm guessing using a full path would actually fix that.

      Yes the C++ code is fairly simple, I thought interfacing a working example with Ruby would be simple to make and compute faster, but as it turns out it needs alot of array transformations(which were nibbling away at my sanity) plus the added time cost of those it is very questionable if a direct Ruby compute would be any slower.
      And since drawing is the real time hog it doesn't really matter.

      How is thomthom doing the Bezier Surface? Ruby only?

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: NURBS plugin version 0.1

      Nope did not spot that, and I started work on this because I couldn't find any Sketchup surface builders anywhere.
      Thanks for the heads up, guess I'm off the hook then πŸ˜„

      I'm just gonna wrap this one up into a slightly more wholesome package and direct people to the other version.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: NURBS plugin version 0.1

      @unknownuser said:

      Error Loading File NurbsPlugin.rb
      > 127; The specified procedure could not be found.   - Init_Nurbs
      > C;/PROGRA~2/Google/GOOGLE~1/Plugins/Nurbs.dll
      

      Nurbs.dll is in my plugins folder. Is this v7 only?

      That is only Ruby trying to call an initialization command in DLL which doesn't exist, I tried adding some empty ones to get around the error message but nothing fixed it sofar.

      This is only the first crack at the plugin, and I see I got alot of corners to trim.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Sketchy physics rotation

      http://sites.google.com/site/sketchyphysicstutorial/ - would be the most obvious.

      Anyway a quick tutorial:

      • draw an object
      • make it a group (theose work best with SP)
      • make a joint next to it
      • select the Joint Connection Tool
      • click on the joint
      • then press and hold Ctrl and click on the group
      • run the simulation and be amazed
      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: NURBS plugin version 0.1

      Thank you for the links.
      So the first version is up and now I need to see if it works for anyone.

      Main issues:

      • lack of UI (currently the control and grid creation are very limited)

      • needs a grid builder, vertices of existing models cannot be sorted into a usable grid so they need to be sampled (hope raycast isn't the only solution)

      • needs prebuilt grids, for a quick start on new projects

      • control grid presentation, not yet sure how the vertices should be presented (actual geometry is easy to control but adds unnecessary data, and virtual data requires writing new tools (move, rotate, scale))

      • DLL can calculate the surface very quick, but Sketchup needs a long time to draw it, is there a direct optimized way of doing this?
        Not drawing faces until the final edit may be a good choice.

      posted in Developers' Forum
      M
      Mr.K.1
    • NURBS plugin version 0.1

      I can't seem to find one, not even a bad one so I guess I'll take a shot at it.

      Now uploaded version 0.1:
      Took way longer then expected but the data flow was all sorts of messed up, so now I have a very crude working version, missing all UI and is set up very specifically / badly.
      But I wanted to share the first draft so maybe someone can be inspired to pitch in with ideas for the interface.

      Files included:

      • Nurbs.dll (calculates NURBS)
      • Nurbs.cpp (course code if someone wants an overview or perhaps improve it)
      • NurbsPlugin.rb (manages the data flow)
      • car_nurbs.skp (a simple model set up with control points)

      Use:

      • extract Nurbs_plugin.zip into Sketchup/Plugins folder
      • open car_nurbs.skp
      • right-click either of the car layouts and select NURBS (you will need to do it twice on startup due to remaining DLL issues)
      • a control input box will pop-up so you can control how the surface is created
      • click OK and it will draw a surface

      EDIT: Removed the files as they are not prime time ready, and I don't want people to end up with shoddy plugins.
      If anyone wants the code I'll send you what I have.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Web Dialog not firing a JavaScript function...

      It's true, during the time webdialog loads all commands to it will be ignored, but timers are not the best system to avoid it because you never know how long it will take on someones machine.

      So a much cleaner way that I only recently found out about:

      wd=UI;;WebDialog.new
      
      wd.show{
       wd.execute_script("fillTextBox();")
      }
      
      

      All commands inside the "show" block it will be run right after the webdialog shows, so there will be no loss of time.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Object moves through another

      Well I always suggest having a walk through http://sites.google.com/site/sketchyphysicstutorial/

      Essentially SketchyPhysics has no moving concave shapes, indents and holes can't be so easily done.
      But what you can do is group basic shapes together to create an approximation of what you need.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Mouse Capture (Win32 API)

      So here is the jist of Anton's code:

      Capture mouse (Sketchup will stop reacting to it):

      getForegroundWindow=Win32API.new("user32", "GetForegroundWindow", [], "L")
       Win32API.new("user32", "SetCapture", "L", "L").call(getForegroundWindow.call())
      

      Read all key states (keyboard and mouse):

      @getKeyboardState=Win32API.new("user32", "GetKeyboardState", "P", "V")
      @lpKeyState=" "*256
      @getKeyboardState.call(@lpKeyState)
      
      

      @lpKeyState will hold an array of 256 numbers for all the keys.
      @lpKeyState[1,2,4] - [1]left-mouse, [2]right-mouse, [4]middle-mouse
      @lpKeyState[48..57] - keyboard keys 0 to 9

      Release mouse

      Win32API.new("user32", "ReleaseCapture", "V", "L").call()
      
      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Sliding Pivot Joint not working

      Changed it so it now works but explaining all the IF's and BUT's is best done by the tutorial and wiki.

      http://sites.google.com/site/sketchyphysicstutorial/
      http://sketchyphysics.wikia.com/wiki/SketchyPhysicsWiki


      Pivot Arm 1.skp

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Error starting simulation

      Ya I do most my models in SU7 because it tends to crash alot less combined with SketchyPhysics.
      I'm not sure what exactly happens in the transformation to SU8, but atleast fixing it is quick.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Mouse Capture (Win32 API)

      Any way to include mouse wheel into this, it seems there is no code for it among the button lineup.
      Not strictly necessary but it's nice to get the control.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Error starting simulation

      Damn I remember figuring this error out, but now I'm not sure what exactly it was.
      I think it hasto do with different Sketchup versions, or a model from SU8 converted back to a lower version, something of that kind.

      If you got an example model of this post it here I'm sure I can find what's causing it again.
      I believe the simplest solution was to copy/paste the model content to a new model.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Is this possible with SP?

      Here are all of the versions put into one model, pick your flavor.


      conveyors.skp

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Is this possible with SP?

      Well it's a pretty complex model if you want to do it mechanically.

      SketchyPhysics doesn't have flexible objects so those belts would need to be chain belts (like tank tracks) and those are infamous for their unreliability not to mention the lag of all those parts moving at once.

      Going one easier would be to just have several rollers/cylinders lined up that would carry the objects along.

      Or the simplest one would be to just make it scripted.

      I'll put some examples together, and I suggest checking out http://sites.google.com/site/sketchyphysicstutorial/ to get started on SP.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Mouse Capture (Win32 API)

      Very nice, that works perfectly in SP!
      Is there a way to just get the full array of buttons and not call the function for every button specifically because it seems like a waste.

      We could still use a callback feature for other plugins.
      Maybe someone else here knows how to set that up?

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Mouse Capture (Win32 API)

      I eagerly await your results, I will help out in any way I can to finally bring this old project to full life.

      I assume it would also come in very handy when making other plugins and tools.

      posted in Developers' Forum
      M
      Mr.K.1
    • RE: Cooperative online modeling

      I looked it up and TrueSpace is still available for free, but the company was bought and dissected by Microsoft so they are not working on it anymore.

      It has Blender level capabilities, just their shared model system doesn't look that good.
      From the youtube videos it seems like every change takes 5-20 seconds between performing an action an that action affecting the model, surely this is a secure system but that is in no way usable (could just be a bad video).

      But I'll still check how that all works, thank you for bringing it up.

      posted in SketchUp Discussions
      M
      Mr.K.1
    • RE: SketchyReplay with scenes (pages)

      Awesome clip mate, I'm glad my scripts were good for something πŸ˜„

      posted in SketchyPhysics
      M
      Mr.K.1
    • 1 / 1