[Plugin] Solids Trim and Keep (Pro Only)

[Plugin] Solids Trim and Keep (Pro Only)

Postby Jim » Sun Sep 25, 2011 3:13 pm

If you have ever used SketchUp's Solid Tools you may have noticed their annoying behavior which converts your Components into Groups.

This plugin allows you to trim a Component and have all instances update as well. It uses SketchUp's built-in Trim tool (thus Pro only,) but then does some post-operation clean-up. It renames the original Component and leaves it in the Component Browser, so you may want to Purge Unused Components after using it.

Requirements

  • SketchUp Pro version >= 8

Use:

  1. Select Trim and Keep from the Tools menu.
  2. Select the "cutter" solid.
  3. Select the solid to "keep"
  4. Optionally repeat from step 2
  5. Optionally Purge Unused Components

Download

jf_trim_and_keep.rb


Install

Move or copy the downloaded file to your Plugins folder. Restart SketchUp.
1
Hi

Jim 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Sun Sep 25, 2011 3:22 pm

Excellent! This is a huge improvement over the Solid Tools Trim tool. This works the way I think they should have made it work from the beginning.

Thank you Jim.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby TIG » Sun Sep 25, 2011 3:26 pm

Thanks Jim, to remove the now unused original definition from the model you need to add this line just before the model.commit_operation line...
def_to_keep.entities.erase_entities(def_to_keep.entities.to_a)
:D
[OR give the user a choice to keep/remove the now unused definition...]
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby EarthMover » Sun Sep 25, 2011 9:46 pm

Thanks Jim. Much needed improvement. It's always bugged me about Trim. :thumb:
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Sun Dec 18, 2011 3:28 pm

is there any way to make this plugin also available for free version too?
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Sun Dec 18, 2011 4:23 pm

As I understand it, the plugin utilizes the Solid Tools stuff that is only active in the pro version.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Sun Dec 18, 2011 10:39 pm

yes, i see the info on the first post about the pro feature. thank you, Dave.
so there's no other similar plugin or something with independent program or code somewhere?
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Sun Dec 18, 2011 10:52 pm

Well, you might check out Bool Tools. Not exactly the same but maybe it'll do what you need.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Sun Dec 18, 2011 11:02 pm

thank you Dave. i think that's a pro plugin though. if only i have the cash and a job list to use the plugin perhaps. :)
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Sun Dec 18, 2011 11:12 pm

I believe Bool Tools will work on the free version of SketchUp but I understand if you need to have some paying clients to afford to buy it.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby utiler » Sun Dec 18, 2011 11:38 pm

Well done, Jim! I would hope this is sorted in future versions of SU...
:thumb:
0
purpose/expression/purpose/....
User avatar
utiler 
Top SketchUcator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby bmike » Mon Dec 19, 2011 12:48 am

Nice... will give it a go!
0
User avatar
bmike 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Mon Dec 19, 2011 7:17 am

is this OSCoolean plugin have any similarity with this Solids Trim and Keep plugin?
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Mon Dec 19, 2011 11:56 am

I think it is similar to the Solid Tools. You should give it a try.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby bmike » Wed Dec 21, 2011 9:31 pm

Very nice!
Been looking for this for a long long time!
This is the way Solid components should act with the native solid tools.

SketchUp Team:
If I wanted to trim a group, I would have done so!



Thanks much for this.
0
User avatar
bmike 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Thu Dec 22, 2011 11:38 am

Dave R wrote:I think it is similar to the Solid Tools. You should give it a try.

it seems that OSCoolean is a good tool. though it doesn't really work well when i tried to use it. perhaps it needs some updates or something. i don't know for sure.
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby ktkoh » Thu Dec 22, 2011 4:08 pm

The BooTools works very well I think it was 10 bucks but well worth the money. It edits the selected component however it deletes the component used to do the editing so if you want both after the operation make a copy of the cutting component. I use it with the free version and have been very plesed

Keith
0

ktkoh 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Fri Dec 23, 2011 3:27 am

ktkoh wrote:The BooTools works very well I think it was 10 bucks but well worth the money. It edits the selected component however it deletes the component used to do the editing so if you want both after the operation make a copy of the cutting component. I use it with the free version and have been very plesed

Keith

which free version and where, Keith?
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Fri Dec 23, 2011 3:35 am

irwanwr wrote:
ktkoh wrote:The BooTools works very well I think it was 10 bucks but well worth the money. It edits the selected component however it deletes the component used to do the editing so if you want both after the operation make a copy of the cutting component. I use it with the free version and have been very plesed

Keith

which free version and where, Keith?


I think he was referring to the free version of sketchUp.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby irwanwr » Fri Dec 23, 2011 3:56 am

i see. thank you Dave.
well, 10 bucks in a 3rd world country wont be easy to get. :P
meanwhile, i guess i'll just stick to Curviloft. it needs some wireframing to do and it does do it's job very well for skinning :)
0
User avatar
irwanwr 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Gaieus » Tue Aug 21, 2012 4:22 am

How could I overlook this plugin??? :o

Thanks Jim!!! :thumb:
0
User avatar
Gaieus 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby RODRIGOLEE » Fri Jul 04, 2014 4:40 pm

Hi,
its works to SketchUp 2014????
0

RODRIGOLEE 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby TIG » Fri Jul 04, 2014 9:43 pm

RODRIGOLEE wrote:Hi,
its works to SketchUp 2014????
Install it in v2014 Pro and try it... report back...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby RODRIGOLEE » Wed Jul 09, 2014 10:37 pm

TIG wrote:
RODRIGOLEE wrote:Hi,
its works to SketchUp 2014????
Install it in v2014 Pro and try it... report back...


Someone tried to install the v2014 before? Isnt working with me.
0

RODRIGOLEE 
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Thu Jul 10, 2014 10:40 am

This was done just a moment ago with Trim and Keep in SU2014. I would have to conclude the plugin works. Are you using SU2014 Pro? Your profile still shows you are using SU8.

Screenshot - 7_10_2014 , 4_34_01 AM.png
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby TIG » Thu Jul 10, 2014 11:08 am

The Plugin does works fine with all SketchUp versions [>=8].

Note that it runs from a 'Tools' menu item - 'Trim & Keep'...

However, it does have one glitch...
It always works fine with Solid Component-Instances, BUT it fails if the second picked object is a Solid Group.

See the Ruby Console errors...

This fail/error is sidestepped if you have other some other script loading which itself adds a group.definition method.

A simple fix is to either also have one of those other scripts loading, OR to edit the jf_trim_and_keep.rb file using a plain-text editor like Notepad/Notepad++/TextWrangler [NEVER a wordprocessor!]...

Add this extra code on the very end of the file's text and save it, restart Sketchup and try using the tool on Solid Groups again - it will then work fine with Solid Component-Instances AND Groups:
Code: Select all
class Sketchup::Group
    unless Sketchup::Group.method_defined?(:definition)
        def definition()
          if self.entities.parent.instances.include?(self)
            return self.entities.parent
          else
            Sketchup.active_model.definitions.each{|definition|
                return definition if definition.instances.include?(self)
            }
          end
          return nil # This should never happen !
        end
    end#if
end#class
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Thu Jul 10, 2014 11:26 am

Maybe that's it. The poster might be using groups instead of components. I didn't ask that because this plugin was written to work on components and keep them components after modifying them.

This plugin allows you to trim a Component and have all instances update as well.


If the object getting trimmed is a group, there's no reason not to use the Trim tool from the Solid Tools set.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby TIG » Thu Jul 10, 2014 11:51 am

Unfortunately it does allow you to click on a Group, which causes the issue without a group.definition method available...
This tool does still have a use with Solid Groups, because then its result maintains the same name etc, the native tool messes up... it's renamed 'Difference'... and of course it loses its other properties like layer ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby Dave R » Thu Jul 10, 2014 12:00 pm

True, although I'm hoping for a change in that behavior along with the conversion from components to groups in the near future.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Solids Trim and Keep (Pro Only)

Postby ebelg2000 » Sun Nov 23, 2014 10:47 pm

I was wondering if there is a way to add this plugin to the main toolbar. Thanks.
0

ebelg2000 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: DuvadilanArchitect, Google Bot and 14 guests

Visit our sponsors: