I'm starting to do some 3d carving with my CNC and I'm doing my designs in Sketchup. I need to create depth map greyscale images for import into the CNC software. Is there a simple way to get a depth map out of sketchup?
Posts
-
Cnc depth map
-
RE: SketchyPhysics 3.5.6 (26 January 2015)
@anton_s said:
I received the C++ source of SketchyPhysics and been looking over it for a while now. I tried compiling it under 64bit but did not succeed. SketchyPhysics source is shipped with the 32bit version of the Newton 1.53 static library however not with the 64bit version. In order to compile SketchyPhysics under 64bit, I would need to have a 64bit version of the Newton 1.53 static library, which would require recompiling the source of Newton 1.53 under 64 bit configuration. The problem is that SketchyPhysics source does't comes with the source of Newton 1.53, as well as, the source of Newton 1.53 is no longer available on the internet. This meanders my ability to compile SketchyPhysics under 64 bit. I could upgrade SktechyPhysics to use newer versions of newton, but they could change the way older SketchyPhysics models work. Not to mention the problems that could come upgrading SDL libraries and all the adjustments that would have to be made in order to compile SketchyPhysics under Mac OS X. However it's worth a try. I'll keep it posted.
I have the source to 1.53 as well as the 64bit library. It ships as a static lib, I've got an automator script that runs lipo on the library to strip out the extra stuff and then "ar" to dump the object files and then a g++ link command to put it all together as a dylib so that the ruby c bridge can open it.
Let me know how to get it to you and we can keep moving.
Kevin Willey
original porter of SP for the Mac -
RE: SketchyPhysics 3.5.6 (26 January 2015)
I shared emails with Chris the other day and he and I both agree its time to get the original source code for the libraries out into the community. (Chris really did all the work and created SP, I just did the port to OS X).
Despite our best intentions, we will never pick up the threads and get SP going as fast as Anton and you (the rest of the passionate SP community) are doing.
What is the preferred method you'd like for getting the source code into the hands of the community?
For those that are confused by this - I'm not talking about the Ruby code. I'm referring to the C code in the extension libraries that hook the SP ruby code into the Newton physics library and other assorted Ruby C Extensions that access OS specific functionality and other libraries (like SDL, Midi support, etc...).
-
RE: Need Help Compiling Gem for 32 bit Mac OS X
@anton_s said:
@slbaumgartner said:
@driven said:
Hi Anton
libffi.6.dylib is included in the Sketchup Ruby framework.
is it possible to utilise that for your needs???
just thinking out loud...
john
fiddle is the Ruby 1.0.0 wrapper for libffi. I haven't tried using it, but require 'fiddle' returns true on SU 2014, so maybe John's idea is your easiest route?
Yes, Fiddle is a good idea, but the way you interact with functions is a bit more similar to Win32API rather than Ruby DL or FFI. SketchyPhysics uses Ruby DL for 1.8.x categories and Ruby FFI for 2.0.x categories since DL was deprecated since 1.9.3. The way you call functions in DL and FFI is function_name(params), but in Fiddle, you should write function_name.call(params). Which forces me due much more work in compatibility, but it does avoids the pain of compiling. I will attempt to compile FFI in Mac OS X 10.5.8 If no luck, I migrate to Fiddle.
Thanks for suggestions
Anton,
You can use Fiddle and retain the "normal" calling syntax if you use Fiddle::Importer.
-
RE: SketchyPhysics 3.3 (Unofficial Release)
@anton_s said:
@deaneau said:
ok ERS is a young plugin and all ideas will be placed. this will need time. my dream is to work with SP and ERS together. 2009-2014 is a long time,too.
Deaneau, I respect your request, but I'm not willing to place much time on this plugin. You know, I have to work on MSPhysics the similar plugin to SketchyPhysics... The reason I fixed SP was because there are many SketchyPhysics models at 3Dwarehouse. It was hard for me to see them all be left behind.
However, nothing stops other users from improving SketchyPhysics. They may add their own features, as long as they keep author as Chris Phillips and the version tittle with Unofficial. Maybe someone wouldn't mind integrating trains into SP.
Maybe trains could be implemented into MSPhysics, but that won't happen until I release the basic version of MSPhysics, 1.0.
@mister k said:
I'm not disputing your work, simply pointing out that your version will not be compatible with older models, a problem which none but experts will be able to fix. So in the interest of avoiding confusion this release should get a more distinctive name.
Oh, I see where you coming from.
I'm planning to add compatibility files, so that all prior models could work on SP. The compatibility files will be loaded if the detected version is not 3.3. For instance, if detected version is 3.2, then a 3.2 compatibility file be loaded, adding and all removed methods from 3.2... As well, if the detected version is 3RC1 then the compatibility file for 3RC1 be loaded. You know how some models in SP3RC1 were not working with 3.2? Well, this could be eliminated due to the compatiblity files. I'm not sure if this be possible, but we'll see. This feature could be available in 3.4. And then a descent renaming of this plugin wouldn't be required.
I repeatedly ask for Mac OS X testers! Some people reported this version doesn't work on Mac, but did not post the error message. I'm pretty sure I had all the libraries compatible with Mac, but I'm certain that there's an error somewhere. You know, I'm a human. There is no way I can write a plugin without bugs in one try. If anyone is willing to test, then please do so. I'll be graceful for yaur help.
Thanks
Hi everyone! For those that don't remember me, I did the original port of SketchyPhysics to the Mac years ago. I've been talking with Chris on and off for a few months now to see if SP was going to get re-energized. I haven't spoken with him recently but I'm sure he would find these developments exciting! I know that I do!
Anyway, I'm reaching out to offer any and all support I can to this effort to get SP 3.3 into shape and working for everyone on SU 2014. Anton, you've done an amazing job.
This release doesn't work on Mac at the moment since FFI is not directly support by the Ruby in Sketchup and an FFI bundle is not included in SP 3.3 . The Ruby that ships with SU (at least on the Mac) does support FIDDLE, which is a variant of FFI. If that is also supported on the windows version then we should consider moving to FIDDLE for SP3.3 so that it is directly supported by SU.
There are a lot of other Mac issues that Anton has documented in his findings. I'll be working on clearing those up and getting a working Mac version out as soon as I can.
Lets get this done!
-
RE: SketchyPhysics working in SU 2013
I'm not really the owner of the source code. Chris Phillips is.
But I can share the news that we plan on making the source code fully available to the community through GitHub soon. We just have to get it cleaned up and "compilable" so others can use it.
More soon...
-
RE: SketchyPhysics working in SU 2013
@xgamerx said:
Is there any way for you to change or improve the plug-in? I'm new to sketchup and has no idea about ruby or any other scripts, hope you'll find the best way to continue the unfinished program?...
I did the Macintosh port of Chris's SketchyPhysics plug-in. I have all of the source code for the entire project. My goal for now is to make the plugin function with SU 2013 and with OSX 10.9.
While I'm in the code, I'm looking for opportunities to clean up the C code that is used for the bridge between the Newton Physics engine and SU's ruby. Maybe this will help stability.
I'm also interested to see if I can get a clean build using the Newton2 engine which has been out for some time.
I'll post more as it comes.
As it is, I have a build of SP3.2 that works under SU 2013 on Newton 1. I'm packaging it up as a ruby plug-in that can be installed with the SU2013 plug-in manager. I can probably use some Beta Testers for this real soon.
-
SketchyPhysics working in SU 2013
I've been banging on the code recently and I have a partial fix for getting SP to work with SU 2013 (at least on the mac). Up until now running any simulation caused a hard bugsplat.
I've notified Chris of my findings and hopefully he can take a look.
I have a single edit to the Ruby code that I believe allows at least some models to run.
Edit the SketchyPhysicsTool.rb file and comment out this line in the initialize section.
comment out "NewtonServer.newtonCommand("set",key+" "+value.to_s)"This code allows for overrides to the scene globals - defaultobjectdensity, gravity, and worldsize
Try it if you feel like it and let me know what you find.
I'm also working on a fully compliant SU2013 installable version that uses the extension manager.
More to come...Kevin
-
Update on a couple of Mac issues
I was messing with the code today and wanted to pass on some things that need to be edited to keep SP working on the Mac
- the Sound problem
newer versions of OS X changed the sound APIs so you have to do an edit on the dls_synth.rb file in order for SP to keep working
To to the Midiator/Lib/Drivers directory and edit dls_synth.rb
find module AudioToolbox and make it look like this:
module AudioToolbox
extend DL::Importable
dlload '/System/Library/Frameworks/AudioToolbox.framework/Versions/Current/AudioToolbox'
dlload '/System/Library/Frameworks/AudioUnit.framework/Versions/Current/AudioUnit'ComponentDescription = struct [
- Joint Settings contextual menu doesn't work
If you select a joint and right click you will get a contextual menu with " Joint Settings" at the bottom.
This should open an inputbox where you can set Joint Parameters
It doesn't work and throws an error in the console about a missing method.Edit the JointTool.rb file and change the definition of the setJointSettings method
find:
def setJointSettings()
to
def self.setJointSettings()- Issues with colors in the dialogs obscuring text
Edit the controlpanel.html file in the SketchyUI directory and comment out the .css links to simplify the UI
To comment out HTML you use the HTML comment tags: <!-- -->
Alternatively, you can simply delete the 2 lines
Here's what you're looking for:
<link href="sketchy.css" rel="stylesheet" type="text/css"> <link href="default.css" rel="stylesheet" type="text/css">
- the Sound problem
-
MIDI/Sound bug in SP3 for the Mac
At some point in time, Apple changed a bunch of the sound/midi handling APIs. I hadn't run the code in awhile but somebody pointed out that SP3 for the Mac wasn't working at all because it failed at launch with an error concerning MusicDeviceMIDIEvent. Turns out that the APIs used to map that function into the AudioToolbox.framework but now it is resident in AudioUnit.framework.
The fix to SP3 for the Mac is pretty straightforward. You need to add a line to the dls_synth.rb file (it is in the Midiator/lib directory within the SP3 installation directory structure inside of the Application Support directory)
Change dls_synth.rb by adding a second dlload command directly after the dlload command for AudioToolbox. Create a copy of the line and substitute AudioUnit for AudioToolbox. You need both dlload commands since the audio support code is scattered across both frameworks.
-
RE: Install SP3.2 on Mac for SU8
the path you're showing is incorrect.
The SketchyPhysics files need to go inside the plugins directory.
You show: /Library/Application Support/Google SketchUp 8/SketchUp
but you need: /Library/Application Support/Google SketchUp 8/SketchUp/plugins -
RE: SketchyPhysics3.2 (Dec 2)
@driven said:
%(#0040BF)[Error Loading File sketchyphysics.rb
dlopen(/Library/Application Support/Google SketchUp 8/SketchUp/plugins/SketchyPhysics3/sdl/SDL_Special.dylib, 9): no suitable image found. Did find:
/Library/Application Support/Google SketchUp 8/SketchUp/plugins/SketchyPhysics3/sdl/SDL_Special.dylib: unknown required load command 0x80000022]do you know what this means
john
also get this if I attempt to proceed%(#BF0000)[Error starting the simulation: : uninitialized constant MSketchyPhysics3::SP3xSimulationContext::SPSounds
/Library/Application Support/Google SketchUp 8/SketchUp/Plugins/SketchyPhysics3/ControllerCommands.rb:777:in `initialize']Typically this means that the OS attempting to load (dlopen) the dynamic library is not compatible with the library (either architecture or 32-64 bit mismatch).
I need to know what version of OX X you're running. The best bet is 10.6 on a newer intel box but it should work on any intel mac after 10.4 I would think.Please drop me a note with the specifics of your mac or post something here and I'll take a look.
Kevin
-
RE: SketchyPhysics3.1
@willeykj said:
@reddoor said:
Hi,
Just having a little trouble loading this new version on Sketchup 8 Macintosh 10.5.8
I get this error on startup:
Error Loading File sketchyphysics.rb
dlopen(/Library/Application Support/Google SketchUp 8/SketchUp/plugins/SketchyPhysics3/sdl/SDL.dylib, 9): no suitable image found. Did find:
/Library/Application Support/Google SketchUp 8/SketchUp/plugins/SketchyPhysics3/sdl/SDL.dylib: unknown required load command 0x80000022Any suggestions?
Thanks
I'm the developer of the Mac Port of SP3. Are you running on a Mac or a Hackintosh? Which CPU (has to be INTEL).
This may be a case of the build being unique to 10.6 but I'm trying to dig in.
Kevin
Just got done working with Chris.
The Mac port requires shared libraries for SDL to work just like the PC version.
The libraries I generated for Chris last week had unintended linkages to a version of SDL I had installed on my machine.
Therefore, if you didn't have SDL installed the libraries in the SketchyPhysics directory didn't work which was the cause of Reddoor's error.SP 3.1 uses the standard SDL library as well as the SDL_mixer extension for audio. On the PC these are 2 separate shared libraries. On the Mac, it didn't seem to make sense to have SDL_mixer statically linked to the complete SDL library if the SDL shared library was going to be needed anyway. All complicated by the fact that the SP3.1 plugin folder isn't a library load directory. SOOOO.....
I've compiled a new "SDL_Special.dylib" which has the necessary object code from SDL and SDL_mixer merged. This file is undergoing testing as I type and everything looks good so far. I hope to deliver to Chris later tonight and we'll get past this hiccup with the Mac version
Thanks for your patience.
Kevin
-
RE: SketchyPhysics3.1
@reddoor said:
Hi,
Just having a little trouble loading this new version on Sketchup 8 Macintosh 10.5.8
I get this error on startup:
Error Loading File sketchyphysics.rb
dlopen(/Library/Application Support/Google SketchUp 8/SketchUp/plugins/SketchyPhysics3/sdl/SDL.dylib, 9): no suitable image found. Did find:
/Library/Application Support/Google SketchUp 8/SketchUp/plugins/SketchyPhysics3/sdl/SDL.dylib: unknown required load command 0x80000022Any suggestions?
Thanks
I'm the developer of the Mac Port of SP3. Are you running on a Mac or a Hackintosh? Which CPU (has to be INTEL).
This may be a case of the build being unique to 10.6 but I'm trying to dig in.
Kevin
-
RE: Sketchyphysics not working on PowerPC!!
I did the port of SP for the Mac and I have not attempted to do a build for PowerPC. The libraries can not be built as universal binaries since RUBY doesn't know how to deal with those so I would have to build a single architecture file. I'm starting to get back in to SP with Chris's return and Sketchy Behaviors on the horizon. I'll see if PowerPC is practical.
-
RE: Sketchup use of WebKit
When Sketchup is run there is no instance of Safari that shows up in the process list. Actually, nothing shows up in the process list other than Sketchup. This indicates that all of the processing is managed within Sketchup itself. Therefore, the sketchup application is linking to frameworks to get its services - rather than launching separate applications. The web framework that Sketchup uses is WebKit.
Within the Sketchup bundle there is a WebDialog.framework
The WebDialog.framework has the WebKit.h file so I'm assuming it links to the WebKit.framework within the OS
I have loaded the nightly build for WebKit and redirected the load path to use the new build.
If Sketchup is calling WebKit.framework it should be the one I'm referencing.
Its possible that Sketchup is using some kind of "statically linked" instance of webkit but that isn't likely (I hope)
The nightly build has a built in Javascript Debugger within the WebInspector but now I need to figure out how to activate it since the Sketchup WebDialogs don't respond to a context click (a right click) like normal Safari windows.I hope I'm on the right track since a JavaScript debugger would be a great help to WebDialog development!
-
Sketchup use of WebKit
I've been hacking away trying to get Sketchup to use the nightly build of WebKit so that I can use the WebInspector.
Maybe I was wrong but I thought under the covers Sketchup on the Mac used WebKit. However, it seems that the WebDialog.framework that is built into Sketchup is independent from the WebKit instance pointed to by the DYLD_FRAMEWORK_PATH.
Any thoughts?
-
RE: Does any SketchyPhysics Mac user exist ???
Does dl.bundle exist in the directory?
I know there was a release of Sketchy Physics that Chris put out awhile back that had a problem with dl.bundle. Try downloading the latest release and trying again. I know thet SP works on mac and I'm sure we can get it working for you.
-
RE: Does any SketchyPhysics Mac user exist ???
It works on Intel Macs.
I did the port of SketchyPhysics to the Mac.
What particular problem are you having? -
UI.play_sound on mac
I'm unable to get UI.play_sound to work with SU7 and OS X 10.5.6
Anyone have any pointers?