sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin][Code]SKMtools,Material/ImageTools

    Scheduled Pinned Locked Moved Plugins
    176 Posts 36 Posters 264.3k Views 36 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dave RD Offline
      Dave R
      last edited by

      What version of SketchUp are you using? SketchUp 7 as indicated in your profile?

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Run it with the Ruby Console open and see if there are any error messages.
        Also you PNG image has not been 'optimized' there are large areas of 'blank-space' around the tree...
        Ensure that only the background pixels have transparency and that the image is cropped to minimize those, to speed up processing...
        What files in in the temp folder after processing ?

        TIG

        1 Reply Last reply Reply Quote 0
        • J Offline
          joshtays
          last edited by

          Dave R, no sorry been a while since I've updated my profile, LOL. I'll update shortly

          SU V20.0.391 Win 64

          Machine is a gen 10 I7 desktop with RTX 3070 64GB RAM

          TIG - I'll try cropping the image harder, but this is happening with images that I have had success with in the past as well. In the temp folder that comes up in model location, the only file inside is a copy of the PNG.Edit not the temp folder you were asking about... Going to run with console on then check the temp folder and get back.

          1 Reply Last reply Reply Quote 0
          • J Offline
            joshtays
            last edited by

            -Ruby console-

            Error: #<Errno::ENOENT: No such file or directory @ rb_sysopen - C:\Users\2atay\Desktop\TrimmedImages\Etsy_Oaxacan_rug_zapotec[Edges].dat>
            C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:277:in readlines' C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:277:in make_edges'
            C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:201:in process_image' C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:170:in initialize'
            C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:834:in new' C:/Users/2atay/AppData/Roaming/SketchUp/SketchUp 2021/SketchUp/Plugins/SKMtools/ImageTrimmer.rb:834:in block in <top (required)>'

            -Temp Folder-
            EdgeDetector.jar
            from.ini
            to.ini
            the ini files are pointing to the trimmed images folder, which for this test happens to be on my desktop

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              The error relating to the creation of the ..\TrimmedImages\Etsy_Oaxacan_rug_zapotec[Edges].dat file suggest several possible issues...

              A possibility...

              1. Could you post the PNG you are using...
                If that image has all of its pixels with even some transparency, then they will get ignore because they'll be regarded as 'background', so you might end up with nothing to form 'edges' - and no .dat file...

              A known cause...
              2. Are your .JAR file-types set to be executed [opened] in Java ?
              Some compression applications can hijack that file-type, and so they try to open the file instead of letting it run as a the small Java applet [aka JAR] - vital to parse the image's pixel-data.
              Check any compression app's setting for file-types and do NOT include .JAR...

              TIG

              1 Reply Last reply Reply Quote 0
              • MikeG73M Offline
                MikeG73
                last edited by

                Hello TIG,

                Your extension offers a lot of promise, and I would like to know your recommendations for trimming and using this image as stampers for an F-14D Tomcat. Thank you!

                F-14D:
                https://3dwarehouse.sketchup.com/model/72e1cdcb882b6993c1006ed55bc1a3fc/Grumman-F-14D-Super-Tomcat

                Stampers:
                https://3dwarehouse.sketchup.com/model/691a25cbb1e7c3b420ca70e6f850f66e/Stampers-Tutoral
                https://3dwarehouse.sketchup.com/model/eaa7f7401f84d2ef67939c61bbcfb315/LOGO-Star-of-Life

                Decals:
                https://3dwarehouse.sketchup.com/model/0804427b-632e-436b-a445-768fd47e8ab2/German-Decals

                Cheers Mate! 😎


                Test_c.jpg

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rustar123
                  last edited by

                  I cannot install this. Why?
                  Please help me!


                  12.jpg

                  1 Reply Last reply Reply Quote 0
                  • Dave RD Offline
                    Dave R
                    last edited by

                    @rustar123 said:

                    I cannot install this. Why?
                    Please help me!

                    According to your screen shot it is installed. Unsigned doesn't mean it's not installed. As long as you have the loading policy set to allow unsigned extensions to load, they will load. This extension works just fine.

                    Etaoin Shrdlu

                    %

                    (THERE'S NO PLACE LIKE)

                    G28 X0.0 Y0.0 Z0.0

                    M30

                    %

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rustar123
                      last edited by

                      @dave r said:

                      @rustar123 said:

                      I cannot install this. Why?
                      Please help me!

                      According to your screen shot it is installed. Unsigned doesn't mean it's not installed. As long as you have the loading policy set to allow unsigned extensions to load, they will load. This extension works just fine.

                      So how to make it work? pls help!!

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        If you have your Extension Manager's Loading Policy set to 'Unrestricted' then you need to restart SketchUp...
                        Then the SKM toolset loads...

                        There are several code method additions defined.
                        However, I suspect you want to use one of its specialize tools - e.g. ImageTrimmer...
                        you haven't explained what your exact problem is...
                        ImageTrimmer has its own thread in which its usage is explained and discussed in great detail...
                        It runs from an entry in the Tools menu...

                        Please explain what you want to do...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • Dave RD Offline
                          Dave R
                          last edited by

                          What do you want to use the extension for? There are some different tools included in the set.

                          Etaoin Shrdlu

                          %

                          (THERE'S NO PLACE LIKE)

                          G28 X0.0 Y0.0 Z0.0

                          M30

                          %

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rustar123
                            last edited by

                            I want to import this jpg to sketchup for push/pull. Then print 3d.
                            So what is the easiest way to do this? thank's


                            1.png

                            1 Reply Last reply Reply Quote 0
                            • Dave RD Offline
                              Dave R
                              last edited by

                              The Image Trimmer feature of SKM Tools would be a good way to go but you need to follow the directions. It requires a PNG not a JPG and the white area needs to be transparent, not white. Use an image editor to make a suitable image and go to town.

                              Frankly, it's not a very complex thing. I'd probably just import the image as an image and use it as a reference for drawing it with the native drawing tools. The image you uploaded isn't very high resolution either so running Image Trimmer will likely result in pixelated edges.

                              Here's an example. This was with simplification set to 0.25. Any higher and the curves get straightend out quite a bit.
                              Screenshot - 10_9_2021 , 12_03_44 PM.png

                              Etaoin Shrdlu

                              %

                              (THERE'S NO PLACE LIKE)

                              G28 X0.0 Y0.0 Z0.0

                              M30

                              %

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                rustar123
                                last edited by

                                I have edited transparent for my pic already. But my problem is i can not use ImageTrimmer


                                1a.png


                                2a.png

                                1 Reply Last reply Reply Quote 0
                                • Dave RD Offline
                                  Dave R
                                  last edited by

                                  The message is very clear. You need to save the SketchUp file before you run Image Trimmer.

                                  Etaoin Shrdlu

                                  %

                                  (THERE'S NO PLACE LIKE)

                                  G28 X0.0 Y0.0 Z0.0

                                  M30

                                  %

                                  1 Reply Last reply Reply Quote 0
                                  • TIGT Offline
                                    TIG Moderator
                                    last edited by

                                    @rustar123

                                    You have two problems...

                                    1:
                                    You cannot ImageTrim a PNG in a model that has never been saved - there are temporary files to be saved with the model, so it needs a destination folder....
                                    Save the model then trim it [assuming the PNG is correctly configured]
                                    Looking at it, you could speed up processing time by cropping the PNG to exclude the transparent parts around the edges - every pixel is inspected, so having as few transparent pixels as is possible [e.g. by cropping] will give a quicker result...

                                    2:
                                    More importantly - You have NOT resolved the incorrect file associations for JAR files.
                                    It is explained in various usage tips in the tool's posts.
                                    JAR files MUST be set to open with Java.
                                    Some decompression apps can hijack this JAR file-type - hence the message from your decompression app !
                                    Reset the JAR file-type to open with Java [as it should be...]
                                    Then retry...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      rustar123
                                      last edited by

                                      @tig said:

                                      2:
                                      More importantly - You have NOT resolved the incorrect file associations for JAR files.
                                      It is explained in various usage tips in the tool's posts.
                                      JAR files MUST be set to open with Java.
                                      Some decompression apps can hijack this JAR file-type - hence the message from your decompression app !
                                      Reset the JAR file-type to open with Java [as it should be...]
                                      Then retry...

                                      So how to reset the JAR file-type to open with Java? thank's

                                      1 Reply Last reply Reply Quote 0
                                      • TIGT Offline
                                        TIG Moderator
                                        last edited by

                                        Find a .JAR file - there are 10 such files in the SKM subfolder...
                                        C:\Users\YOURUSERNAME\AppData\Roaming\SketchUp\SketchUp 2021\SketchUp\Plugins\SKMtools
                                        Select a JAR file's icon > right-click > Open with...
                                        I your case the entry won't show 'Java*' but some compression tool, so click Choose Another App...
                                        Find Java in your available apps, then set the .JAR file-type to always open with that... OK to save changes.
                                        Now JAR files will open properly in Java...

                                        If you don't have Java installed, then download and install it...
                                        https://www.java.com/download/ie_manual.jsp
                                        https://www.tomsguide.com/how-to/how-to-download-java-for-windows

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          blueman2
                                          last edited by

                                          Seem to be having trouble again getting image trimmer to work.

                                          I've tried this with multiple png files and have also flattened a few of them and removed the background saving them as transparent pngs.

                                          The files were saved prior to importing the image.

                                          Java has been installed and is set to open Jar files

                                          When the image is imported and selected, Image Trimmer runs, but when it stops, nothing appears to have happened. If I explode the image, it completely disappears. There is an image saved in the Image Trimmer folder but it is the same image.

                                          I've tried this many times with different versions of the file. Want to eventually push/pull to get an engraved effect. Any help would be appreciated. I may be missing something but I don't know what it is. Thanks

                                          I've attached some of the image files I attempted to use

                                          Image 003.jpg
                                          Image 002.jpg


                                          martincleanTrans.png


                                          MartinGuitarrsLOGO.png

                                          1 Reply Last reply Reply Quote 0
                                          • TIGT Offline
                                            TIG Moderator
                                            last edited by

                                            Your [simplified] PNG works for me...
                                            I did 'crop' it slightly in Gimp to optimize its processing time, because any excess transparent pixels around it will be ignored, but are still looked at during the processing.
                                            The two images show the un-smoothed and smoothed outline results...

                                            You seem to have JAR files set right - are there the files show in the TrimmedImages Folder ?


                                            CaptureFolder.PNG


                                            Capture.PNG


                                            CaptureSmoothed.PNG

                                            TIG

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 5
                                            • 6
                                            • 7
                                            • 8
                                            • 9
                                            • 7 / 9
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement