by TIG » Wed Feb 08, 2012 4:30 pm
No worries... You'll appreciate that the algorithms in the files that have to find the edges around the 'solid' parts are quite complex, and occasionally you can contrive a set of pixels that it processes in a gapped result - in your case it was just one pixel ! A simple image-edit fixed it in a trice... Try to keep PNG files for trimming quite simple, with no single pixel 'inlets' or 'peninsulas' as these are ignored anyway as they cannot form a face because their two edges would be coincident and [rare] occasional combos can cause edges to get missed and face to fail to form...  With Gimp I find the best way is to flatten the PNG, add a transparent alpha-layer back in and then use the 'magic-wand' to pick the background color pixels en mass, with a limited color-variation range + delete-key to remove them - you can then see the 'chequered-background' rather than the typical 'white'; then zoom in and pick any 'edge pixels' that have been 'anti-aliased' where the object's color and the background's color are 'merged'... and delete those too - always ensuring that small transparent holes or solid 'peninsulas' or 'islands' are at least 2 pixels wide... Finally auto-crop the PNG image to minimize the amount of 'blank' background, this is because every pixel needs to be considered, so because the transparent ones are not important to us in the final form you are best of to minimize how many of them there are in the image, before trimming it... 
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by pbacot » Thu Feb 09, 2012 2:27 am
then zoom in and pick any 'edge pixels' that have been 'anti-aliased' where the object's color and the background's color are 'merged'. Or this might be possible in most images using "grow" selection. Finally auto-crop the PNG image to minimize the amount of 'blank' background, this is because every pixel needs to be considered,
Thanks, that would not have occurred to me--somehow I thought it would just ignore those. Peter
MacOSX Mojave High Sierra SketchUp Pro v19 Twilight v2 Thea v2 PowerCADD
-

pbacot
- Top SketchUcator
-
- Posts: 6701
- Joined: Sun Jul 20, 2008 7:26 pm
- Location: Sonoma
- Name: pbacot
- Operating system: Mac
- SketchUp version: 2016
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by TIG » Thu Feb 09, 2012 10:37 am
It does ignore them BUT it has to look at them to find out they are to be ignored, so an image with masses of blank outer space will take longer to process simply because all of those [eventually] unused pixels must be examined; so if they are not going to be used in the image-trimming don't include them in the Image... That also goes for all tiny areas in an Image; any that are < 2 pixels across will [usually] not become either faces or 'holes' because their edges will be coincident when considered for trimming !
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by ggggito » Wed May 15, 2013 4:26 am
-
ggggito
-
- Posts: 1
- Joined: Wed May 15, 2013 4:21 am
- Name: ggggito
- Operating system: Windows
- SketchUp version: 7
- License type: Pro
- SketchUp use: education
- Level of SketchUp: Intermediate
by TIG » Wed Aug 28, 2013 10:49 am
Here's an update: viewtopic.php?p=293677#p293677The SKMtools Temp folder that is needed to process files etc, is now made in the User's Temp folder [OS specific] rather that the ../Plugins/SKMtools folder, avoiding potential permission issues...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Ben Ritter » Wed Aug 28, 2013 4:05 pm
TIG,
Thank you for your generosity.
What am I doing wrong? I imported a .png and implement image trimmer, but I don't see anything different about it once the process is completed.
-
Ben Ritter
-
- Posts: 468
- Joined: Wed Nov 14, 2007 4:55 pm
- Name: Ben Ritter
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by TIG » Wed Aug 28, 2013 4:21 pm
Number of possible issues...
Any messages in the Ruby Console ?
Do you have Java installed/enabled - it's need to run the JARDs that manipulate the files etc... Do you have .JAR files set to open/execute in Java [their default] - some compression apps can hikack that filetype and so open it instead - change it back to the default.
ImageTrimmer needs a PNG image with an alpha-layer - that is a transparent background, but with other pixels 100% solid. In Gimp or a similar image-editor... Flatten the PNG image, then add the alpha-layer back, select the background's color [usually white or black] with a magic-wand and delete, so its now transparent. Make sure the image is cropped tight to minimize the amount of trimming needed by the tool. Export back as the PNG. Re-Import and retry...
If you are still having problems post the PNG image so we can look at it directly.
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Wed Aug 28, 2013 4:28 pm
I think I might have found a glitch... watch for updates...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Wed Aug 28, 2013 5:22 pm
@Ben You were right ! There was a silly typo in the revised ImageTrimmer code I hadn't trapped... Here's a link to the update viewtopic.php?p=293677#p293677It's updated in the PluginStore too...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Ben Ritter » Thu Aug 29, 2013 6:37 pm
TIG,
Still no results. PNG image attached.
Ruby Console: Error: #<Errno::ENOENT: No such file or directory -
Thanks.
-
Ben Ritter
-
- Posts: 468
- Joined: Wed Nov 14, 2007 4:55 pm
- Name: Ben Ritter
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by TIG » Thu Aug 29, 2013 10:37 pm
Works for me. Although you haven't flattened the PNG and re-added an alpha channel, it works after a fashion... As has been explained several times regarding different issues... You cannot have' non-ASCII characters' in the file name or paths that need to be processed by SketchUp's Ruby version [on PC]... It's a known PITA. So if your SKP is saved in a folder path containing even one tiny accented character - then it will fail to complete. What is your folder path ? The Image's name is OK, but if there's a rogue "ö" [or similar] in there, then it'll fall over ! What is your OS / version - your User Profile is incomplete...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Fri Aug 30, 2013 6:07 pm
There was a minor typo in the loader .rb's name... Making it non EW compliant. Here's a link to the update viewtopic.php?p=293677#p293677It's updated in the PluginStore too...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by TIG » Sat Sep 07, 2013 5:42 pm
There has been some reworking of syntax to future-proof the code. Here's the update. viewtopic.php?p=293677#p293677Get the latest version from the SCF PluginStore http://sketchucation.com/resources/plug ... n=SKMtools
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by nasos.slab » Tue Feb 04, 2014 12:38 am
hey there, i did download the plugin and it comes up as skmtools_v20131214.rbz i did put in my plugins folder but is nowhere to be seen in Sketchup
any ideas ?
Thank you in advance nasos
-
nasos.slab
-
- Posts: 7
- Joined: Thu Sep 15, 2011 8:47 am
- Name: nasos.slab
- Operating system: Mac
- SketchUp version: 7
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by Dave R » Tue Feb 04, 2014 2:02 am
You didn't install the plugin. Take the .rbz file out of the Plugins folder and put it back in your Downloads folder or something. Open SketchUp and go to Preferences>Extensions. Click on Install Extension. Navigate to where you saved the .rbz file and select it. Click Open...
Before you do any of that, make sure you have properly set the permissions for the Plugins folder. See TIG's thread at the top of the Plugins forum.
Please complete your profile with SketchUp version and OS. Thanks.
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18145
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by nasos.slab » Tue Feb 04, 2014 11:43 am
Dave R wrote:You didn't install the plugin. Take the .rbz file out of the Plugins folder and put it back in your Downloads folder or something. Open SketchUp and go to Preferences>Extensions. Click on Install Extension. Navigate to where you saved the .rbz file and select it. Click Open...
Before you do any of that, make sure you have properly set the permissions for the Plugins folder. See TIG's thread at the top of the Plugins forum.
Please complete your profile with SketchUp version and OS. Thanks.
Hello Dave and thank you for your prompt reply ! I have opened Sketchup and went to Preferences>Extensions but there is no such thing as Install extension. Any ideas ? Am on MAC os 10.7.5 and Sketchup pro 7 Thank you !
-
nasos.slab
-
- Posts: 7
- Joined: Thu Sep 15, 2011 8:47 am
- Name: nasos.slab
- Operating system: Mac
- SketchUp version: 7
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by Dave R » Tue Feb 04, 2014 11:51 am
See? There's a perfect reason to have your profile filled in before asking questions. Maybe we could use you as a "poster child" for filling in profiles.  So with version 7 you wouldn't have the Install Extension option. In that case you get to do it the hard way. Change the .rbz extension to .zip, then double click on the file name. You should get a folder of the same name. Open that folder and select the contents. Hit Command-C to copy them. Navigate to the Plugins folder and press Command-V to paste the files. The files must be in exactly the same structure as when you copied them. I don't think the Sketchucation Plugin Store will do you any good either because SU7 can't do anything with .rbz files. That came with SU8M2. Maybe you ought to look at upgrading to SU2013 Pro.
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18145
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by nasos.slab » Tue Feb 04, 2014 12:02 pm
I think you should use me as a "poster child" !  thanks a million It worked ! And sure i have to look in upgrading to SU2013 Pro ... but me being blonde and all, with regards to all my plugins, after the upgrade, do i have to manually transfer them or do they transfer themselves ?
-
nasos.slab
-
- Posts: 7
- Joined: Thu Sep 15, 2011 8:47 am
- Name: nasos.slab
- Operating system: Mac
- SketchUp version: 7
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by Dave R » Tue Feb 04, 2014 12:17 pm
I'm glad that worked for you.
When you upgrade, don't copy the plugins over. Just download fresh to make sure you've got the most recent versions of them. Get the SCF Plugin Store and install it first. That'll make installing others you've gotten here painless.
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18145
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by nasos.slab » Tue Feb 04, 2014 12:25 pm
Thank you again for your time Dave !
And one last question, am trying to find a plugin that could either convert a scanned pdf plan to a dxf format, alternatively a plugin that I could use to automatically trace over a scanned pdf or jpeg, without having to go around redrawing on top of the imported image.
Any suggestions ?
-
nasos.slab
-
- Posts: 7
- Joined: Thu Sep 15, 2011 8:47 am
- Name: nasos.slab
- Operating system: Mac
- SketchUp version: 7
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by Dave R » Tue Feb 04, 2014 1:05 pm
Happy to help.
I don't know of any SketchUp plugins to do that but there are a number of raster to vector programs that could take an image from your PDF and create a DXF or DWG file. Do a Google search for 'raster to vector'. It might be that Photoshop or Illustrator could do that directly from a PDF file but I'm not that familiar with them.
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18145
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by ssw » Sat Sep 13, 2014 5:29 am
Just tried to autoinstall this plugin using the sketchucation store plugin and it doesn't install. Nothing in my toolbars and no skmtools.rb in the plugins folder.
Any help appreciated, thanks
-
ssw
-
- Posts: 5
- Joined: Sat Dec 10, 2011 6:14 am
- Name: ssw
- Operating system: Windows
- SketchUp version: 8
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by Dave R » Sat Sep 13, 2014 11:29 am
So you aren't finding Image Trimmer in the Tools menu nor Image Animator in the Toolbars list? Screenshot - 9_13_2014 , 5_33_34 AM.png What version of SketchUp? What operating system? Please complete your profile and give some useful information to help diagnose the problem.
Etaoin Shrdlu
%
(THERE'S NO PLACE LIKE)
G28 X0.0 Y0.0 Z0.0
M30
%
-

Dave R
- Global Moderator
-
- Posts: 18145
- Joined: Tue Nov 13, 2007 11:52 pm
- Location: SE Minnesota
- Name: Dave R
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: woodworking
- Level of SketchUp: Advanced
by ssw » Sat Sep 13, 2014 5:29 pm
No Image Trimmer in the Tools menu nor Image Animator in the Toolbars list nor skmtools.rb in the plugins folder.
When I attempt to autoinstall with the sketchucation plugin, SU askes if I want to install plugin and I click "yes". Then the User Account Control asks if I want to allow Extended Copy Utility to make changes. I click "yes", then get the rotating blue circle for a few seconds. But the plugin isn't installed.
Operating system is windows 7, SU is free version 8.0.16846
Will update user profile
Thanks for your help
-
ssw
-
- Posts: 5
- Joined: Sat Dec 10, 2011 6:14 am
- Name: ssw
- Operating system: Windows
- SketchUp version: 8
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by TIG » Sat Sep 13, 2014 6:53 pm
If you download the RBZ from the PluginStore and try to install it using Preferences > Extensions > Install... button what happens ? http://sketchucation.com/pluginstore?pln=SKMtoolsWhat is this 'User Account Control asks if I want to allow Extended Copy Utility to make changes...' Do you have admin powers ? Do you have SketchUp set up under Properties > Compatibility set to 'run as administrator' ? Do you and all others listed under Properties > Security have FULL permissions to read/write files in the Plugins folder ? There's a Tutorial on setting these up properly... Are there any 'SKM' files or subfolder in your Plugins folder ? To find the folder use the SketchUcation submenu item...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by ssw » Sat Sep 13, 2014 7:26 pm
I was able to use Preferences > Extensions > Install to successfully install the plugin
For my own information, can you direct me to the tutorial on setting up admin powers?
Before the successful install there were no skm files in the plugins folder
Thanks for your help and quick responses
-
ssw
-
- Posts: 5
- Joined: Sat Dec 10, 2011 6:14 am
- Name: ssw
- Operating system: Windows
- SketchUp version: 8
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by TIG » Sat Sep 13, 2014 8:58 pm
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by jenujacob » Tue Jun 09, 2015 12:36 pm
- Code: Select all
Error: #<Errno::ENOENT: No such file or directory - C:\Users\user\Desktop\TrimmedImages\BIMBA_6[Edges].dat> C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:264:in `readlines' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:264:in `make_edges' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:196:in `process_image' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:165:in `initialize' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:818:in `new' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:818:in `block in <top (required)>' SketchUp:1:in `call'
Hi TIG.... I am trying to use this image trimmer, but I get nothing... I opened the ruby console and I got some error...
-

jenujacob
-
- Posts: 555
- Joined: Mon Nov 12, 2007 2:47 pm
- Name: jenujacob
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
-
by TIG » Tue Jun 09, 2015 12:41 pm
jenujacob wrote:- Code: Select all
Error: #<Errno::ENOENT: No such file or directory - C:\Users\user\Desktop\TrimmedImages\BIMBA_6[Edges].dat> C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:264:in `readlines' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:264:in `make_edges' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:196:in `process_image' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:165:in `initialize' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:818:in `new' C:/Users/user/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:818:in `block in <top (required)>' SketchUp:1:in `call'
Hi TIG.... I am trying to use this image trimmer, but I get nothing... I opened the ruby console and I got some error...
It's failing to make the 'Edges' dat file... Do you have Java installed and enabled on you PC ? Do you have .jar files set to open with Java - some compression tools hijack that file-type and stop it working. These tools rely on tiny .jar files to do some of the complex image processing etc. If they don't run the file's aren't make and it breaks... Report back...
TIG
-

TIG
- Global Moderator
-
- Posts: 20273
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- SketchUp version: 2021
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by jenujacob » Tue Jun 09, 2015 7:25 pm
hi TIG! Thanks for the reply! I did have issues with the .jar file being opened with winrar. I associated the .jar file type to be opened with java.exe. But, i have no idea if it is working. Is there a way i can test it??? I cant test right now. Its in my work PC. I will try to test tomorrow at work. >>> Edit : I have tested it at office now. I downloaded and installed the latest java from their website. Associated .jar files to java.exe, but still nada. I am still getting the error. I am attaching a screen shot. ImageTrimmer_Error.jpg
-

jenujacob
-
- Posts: 555
- Joined: Mon Nov 12, 2007 2:47 pm
- Name: jenujacob
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
-
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|