[Plugin] Hole Punching Tool

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Wed Mar 09, 2011 7:11 pm

Here's v2.0 viewtopic.php?p=271170#p271170
The Punched hole algorithm has been improved to cope with cutting-components that contain nested groups/components.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby dbalex » Thu Jun 09, 2011 1:28 am

Just the plugin I needed, great work once more TIG!
0

dbalex 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby dbalex » Thu Jun 09, 2011 10:29 am

It certainly something I'm doing wrong but I can't seem to make it work on this model again, first it worked with that component but after some time I have a grey menu for hole punching, I don't know what I'm doing wrong...
0

dbalex 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby dbalex » Thu Jun 09, 2011 10:39 am

I have found the solution; just closed and opened sketchup and it worked like before, sorry for my stupid question :lol:

TIG you really save me a lot of time with this plugin! thanks again!
0

dbalex 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Thu Jun 09, 2011 10:50 am

dbalex

This isn't a problem specific to this tool.
Sketchup has a limit on the number of 'commands' that can be added to the context-menu.
If you have lots of such tools you can get to a point where it 'overflows' and some items get grayed-out...
Some tools [like HolePunch] add their submenu items and that's it... but others can make a new command every time the menu is activated. This will cause issues. When this limit was discovered most scripters recast their tools to minimize command making - in particular some of Fredo's tools were causing issues - these were all remade to fix this - if you have any of his tools please ensure you have the latest versions.
I see that you have several 'gray' items visible in the list - are all of these required ? For example you have two versions of 'fur'...
I suggest that you do some 'spring-cleaning' and disable any scripts that you don't use very often [perhaps move them into a Plugins_Disabled folder - you can always move one back and restart Sketchup if it is needed...]
There is a tool to optimize 'command' use [AlexM's 'ContextMenuOptimizer'] but it's only partially effective.
The only effective way to re-enable wrongly grayed-out items is to restart Sketchup... however, as a stopgap measure you can often [but not always] access context-menu items off the Edit menu's last item submenu, even when they are 'grayed-out' on the context-menu version...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby dbalex » Thu Jun 09, 2011 10:58 am

thanks Tig, You're right I need to clean all those unneeded plugins away but.. I can't choose, sometimes I forget about a plug and I'm happy to find it back in my toolbar. it's a difficult choice and I can't delete them or put them away. even if I should, I know, but it's just impossible for me to keep some plugins and move others, you never know when you will need it (that's how I think). Thanks for your help!
0

dbalex 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby raysilva2000 » Sun Jun 19, 2011 11:39 am

Where do I get the latest version of Hole Punching Tool?
0

raysilva2000 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Sun Jun 19, 2011 11:51 am

raysilva2000 wrote:Where do I get the latest version of Hole Punching Tool?

From the download link at the end of the very first post in this thread :?
viewtopic.php?p=271170#p271170
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby stevendaniels » Mon Jun 20, 2011 4:02 pm

Hey thanks a bunch for posting this. It looks like exactly what I need

Unfortunately I cannot get it working on Snow Leopard with Sketchup 8 (Free version)

This is exactly what I did

1. Download and extract latest zipfile (v2.0 20110309)
2. Right-click on sketchup app in Finder and "Show Package Contents"
3. Drag the unzipped files into the Plugins folder so it now looks like this:

Plugins
--#HolePunchTool.rb
--deBabelizer.rb
--TIGtools
----#HolePunchToolDE.lingvo
----#HolePunchToolEN-US.lingvo
----#HolePunchToolES.lingvo
----#HolePunchToolFR.lingvo

4. Launch Sketchup and create a 3D wall (w:10m,d:0.2m,h:8m)
5. Create a simple rectangular frame with hole cut into it and make it into a component
6. Place frame on surface of wall
7. Right-click frame and...

The HolePunch option just is not there :(

Am I totally doing this wrong or have I uncovered a bug of some sort? Curious.
0

stevendaniels 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Tue Jun 21, 2011 10:29 am

Looks like it's setup OK...
There are no to it working limits on most versions or OS...
I'm assuming you've used the right Plugins folder and other scripts in there are loading OK?
There has been some issue with MAC users putting scripts into the wrong Plugins folder...
To find your correct path copy+paste this line into the Ruby Console +<enter>...
Sketchup.find_support_file('Plugins')
on a PC typically it should be=
C:/Program Files/Google/Google SketchUp 8/Plugins
BUT on a MAC typically it should be=
Macintosh HD/Library/Application Support/Google SketchUp 8/SketchUp/Plugins
[i.e. not one of your 'personal folders']

I also assume there are no error messages on startup etc?

This is what it should look like - some of the submenu options are disabled depending on what you have selected - e.g. you can't re-punch an already punched instance...
HPsnap.png
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby Gridbeam Solutions » Tue Aug 23, 2011 3:46 am

Cool tool -- thanks for creating and posting it, TIG! The more I experiment with it, the more impressed I become.

As a SketchUp newbie and a Mac user, I request that TIG please add the description of the correct Mac plugin folder location to the install instructions in the main post. I initially put my install in the wrong place. The menu items still showed, though I couldn't get them to work. (That may be because of my inexperience, rather than a limitation of the plugin.)

It took a bit of experimentation before I achieved components that punched through. I'm sure TIG's instructions are clear to people who know SketchUp better than I do. For the benefit of other newbies, here's how creating a punchable component seems to work in its simplest form:

  1. Use any drawing tool(s) to create a surface (circle, rectangle, doodle...). You can do this on the object you wish to punch, or elsewhere.
  2. Select the surface and delete it. This will leave you with a set of bounding lines.
  3. Select the bounding lines. (On a Mac, use the Select tool and double-click one of the lines. Unless you deleted a line and created a gap, this will select them all.)
  4. Select Make Component.
  5. In the dialog box, change the "Glue to:" selection from None to another option.
  6. Check the "Cut opening" checkbox.
  7. Make sure "Replace selection with component" is checked.
  8. Optional: give your component a descriptive name.
  9. Click "Create."
  10. If necessary, position your component using the Move tool.
  11. Select the component and right-click (Windows) or Option-click (Mac) to pop up a contextual menu.
  12. In the contextual menu, select Hole Punching... > Punch

If the bounding lines of your surface would be hard to select separately from the object you are punching (for instance, if you created a rectangle that shares an edge with the object you want to punch), make a component from your surface and its bounding lines by skipping Step 2 above. After creating your component, edit it by double-clicking it with the Select tool. Click the surface to select it, delete it, then close your component. You are now ready to punch a hole.

If you don't remove the surface from your component, the plugin WILL punch the hole... but you won't see it because the surface will hide it. Orbit to the other side of the object to see your hole.

Did I get that right, TIG?
0

Gridbeam Solutions 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Tue Aug 23, 2011 9:52 am

Yes, but of course remember that you don't need to 'create' your cutting-components at all if you don't have to... there are many such components already available from Google and the 3dwarehouse [doors, windows, rooflights etc]. But sometimes making your own is necessary - especially for very simple or very complex things, as you are unlikely to get one of those 'off the shelf'...
Provided that a component has 'gluing/cutting' properties you can 'HolePunch' it... The component itself is not changed - any 'punched' instance is given special attributes and linked reveal geometry so they select and move together etc. Non-punched instances are exactly the same as they are is 'native' Sketchup. After punching you have choices to unlink - so the hole is no longer 'joined' to the component, unpunch - so the component no longer punches a hole, re-punch - necessary if you have swapped the instance for another component of a different size or shape and the punched reveals no longer match it, re-glue - useful if you have remade a face and its cutting components no longer cut it - select them, run re-glue and they cut the face again - then punch as desired; you can also change the punch depth - by default it's set at 500mm/20", which means it punches the hole in any walls/roofs thinner than this or in walls/roofs thicker it stops at the limit - this is really a safety-net, so that if you try to punch a single-skin wall the reveals don't extend over to the wall on the other side of the room as that'd be the first logical face it encountered! If you find you have walls thicker than the default then adjust the setting as desired, but be aware that large sizes run the risk if not all of your walls/roofs are 'twin-skinned'...

On a PC or MAC if you can type/copy&paste this line of code into the Menu > Window > Ruby Console command line:
Sketchup.find_support_file("Plugins")
it will return the path to your own Plugins folder, where you should put your .rb scripts.
Note: for some scripts there are more complex files that come inside a zip-file, as well as .rb file[s] there are usually some more files inside a subfolder - extract them keeping their relative relationships and put the .rb file[s] etc and the intact subfolder into Plugins - never move files out of these subfolders, they must remain in there, you will break things otherwise!

I note that you say the items were on the context menu but 'grayed'. The option to 'Set Depth' should always be active, but most of them are deactivated [grayed] and only become available if you have an appropriate selection - so Punch is activated if you have one or more cutting components selected [that have not already been punched!], Unlink/Unpunch/Repunch require the selection to be already components that are already punched, Reglue require cutting-component[s] to be selected...
There is also another cause for 'grayed' items in the context-menu. As more and more plugins were developed over the last few years it was realized that there is a finite limit to the number of 'commands' that can be added before some of them 'fail' and show gray when they should be active [you can often still run them from the equivalent list at the end of the Edit menu]. Some scripts were making multiple commands which exacerbated the issue. Authors have now fixed their scripts as far as I know, but there is still a limit, so if you have dozens of scripts loading at some point the context-menu will breakdown. If you find that you have items that are 'gray' when you are sure they ought to be 'active', and you have loads of scripts loading, then it's probably this issue... so you need to make a list of tools that appear in the menu, but are rarely used and disable them: if it's an Extension try and deactivating it; or rename its file in Plugins - so a script named xxx.rb >>> xxx.rb.TXT [only .rb/.rbs files will auto-load from Plugins] - so then when you restart Sketchup that item should have gone from the menu. If you find you do need that tool regularly then rename it back so it auto-loads once more; if you find you need it occasionally you can type this in the Ruby Console to load it just for that session - load "xxx.rb.TXT" where of course you use the scripts name in place of 'xxx'... Remember that you need to restart Sketchup to see the affects of these changes...
See viewtopic.php?p=252413#p252413 for a context-menu-optimizer that might help too, but it won't solve the issue completely...
:ugeek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby Gridbeam Solutions » Tue Aug 23, 2011 3:28 pm

VERY helpful, TIG -- thank you!

Two more questions:

  1. How does file size of a punched hole differ, if at all, from file size of a manually pushed hole? (As you know from Best practice for drilling multiple holes?, so you know I'm making components with zillions of holes in them, where small size differences add up.)
  2. The default punched hole shows segments. How do I get it to show a smooth hole like SketchUp creates when I Push/Pull a circle?

Thanks so much -- Hole Punching Tool is a wonderful plugin, and the more I use it, the better I like it!

Joy
0

Gridbeam Solutions 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Tue Aug 23, 2011 4:14 pm

I think there should be no substantial difference in size.
The instance and reveal's geometry will have some attributes making that slightly bigger but the use of components as the instance will be smaller once you have more than a few of them...
At the moment the HolePunch alwats makes faceted holes - even if the cutting component has 'curves' as it's edge - BUT you can smooth the unwanted reveal edges by using the Erase+Ctrl and simply wipe over those edges so they disappear [unless you have View > Hidden-Geometry ON! when they will look 'dotted'].
It might not be too difficult to get the 'smoothness' to be replicated in the reveals - something I'd not thought of or had been asked about before :? watch this space...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby broomstick » Wed Aug 24, 2011 8:02 am

Hi TIG, I have never tried this plugin before, because I use other tools for windows in my models (that don't require sketchup). Having said that I am going to give this a spin, and if you could show me which file to change for an Italian localization i will be happy to make it for you :)

Nice job!!
0
User avatar
broomstick 
 

Re: [Plugin] Hole Punching Tool v2.0 20110309

Postby TIG » Wed Aug 24, 2011 9:25 am

To make [or edit] a locale file look in the ../Plugins/TIGtools/ subfolder.
There are several #HolePunchTool...lingvo files.
Copy the base file #HolePunchToolEN-US.lingvo as #HolePunchToolIT.lingvo
for ITalian.
To find your exact locale 'code' type/copy&paste this in the Ruby Console
Sketchup.get_locale.upcase
This 'code' then goes on the end of the file's name, before .lingvo in place of 'EN-US'.
Edit the new file and you'll see lines of code like this:
Exiting.<==>Exiting.
The text to the left of the <==> is the hard-coded English version and to the right the translation - obviously in the English lingvo file it's the same words!
Change the right-hand side to your locale translation, keeping punctuation and spaces etc if any, so for an IT version you might have.
Exiting.<==>Verrà chiuso.
Complete your translations and then save the file.
When you restart Sketchup the tool should display in the locale language as it'll automatically find the new file.
If you find some text that's wrongly translated, then check the lingvo file and edit it.
If you find that some text has not translated, then check the lingvo file and fix it - if the text is not actually in the file then let me know as sometimes bits of hard-coded text and the lingvo text mismatch - although I think that this one is pretty solid.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby TIG » Wed Aug 24, 2011 10:13 am

Here's v2.1 viewtopic.php?p=271170#p271170
The input box code improved.
If cutting the defn has curved edges then the extruded reveals are now 'smoothed' to match.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby esteromx » Fri Aug 26, 2011 12:26 am

The file is empty.
0
User avatar
esteromx 
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby Rich O Brien » Fri Aug 26, 2011 12:28 am

No, it's not?
0
There's a frontroom and a backroom....reverse faces
User avatar
Rich O Brien 
Administrator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby esteromx » Fri Aug 26, 2011 12:49 am

Excuseme is an error in my browser.
0
User avatar
esteromx 
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby jorge2011 » Fri Aug 26, 2011 1:14 am

excellent plugin, thank you very much.
A consultation is possible that the contextual menu only is activated, when you right click the mouse on a component.?
0

jorge2011 
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby TIG » Fri Aug 26, 2011 10:42 am

jorge2011 wrote:excellent plugin, thank you very much.
A consultation is possible that the contextual menu only is activated, when you right click the mouse on a component.?

Most submenu items are only active [i.e. not gray] when there is an appropriate selection [e.g. cutting-component[s] that are not punched or ones that are punched activate different options - because you can't punch with one that's already punched and you can't unpunch one that's not been punched!].
See this post viewtopic.php?p=350006#p350006 - as well as the notes on the main download page...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby david_h » Tue Oct 25, 2011 6:23 pm

So Tig. . .I keep getting this. . .what constitutes a "suitable" component?

Not properly attired? No shoes? no shirt? no service? :mrgreen:
0
If I make it look easy. . .then it probably is.
User avatar
david_h 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby TIG » Tue Oct 25, 2011 7:51 pm

A 'suitable' component has to be made to glue to a face and cut a hole in that face [z/blue axis out of the face] - that's a standard Sketchup thing. Of course it also has to have been glued onto a face! You can easily make a component with those behaviors, or by editing one later etc - imported hole-cutting window and door components are premade to have this gluing/cutting behavior.

The Hole-PUNCHING tool can then extend the component instance's hole-cutting behavior so that it continues its hole in the wall's outer face through to the inner face of the wall, with reveals etc...

Select one or more glued/cutting component-instances and run the tool and they will punch right through the wall.
If a wall is thicker than the maximum default of 20"/500mm you can reset it in a dialog, however all walls thinner that the limit will punch correctly, so adjusting this is rarely needed...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby david_h » Tue Oct 25, 2011 7:55 pm

Great. . .As a duly authorized green-badged Sketchucator deputy-- it shames me to say I have always sucked at hole-cutting components. I gotta get batter at that sort of thing. :oops:

Thks for the reply. :mrgreen:
0
If I make it look easy. . .then it probably is.
User avatar
david_h 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby david_h » Tue Oct 25, 2011 8:36 pm

Got if fixed.

Thx,

D
0
If I make it look easy. . .then it probably is.
User avatar
david_h 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby irwanwr » Mon Dec 26, 2011 1:16 pm

thank you for the tool, sir.
0
User avatar
irwanwr 
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby irwanwr » Wed Dec 28, 2011 9:00 am

hi,

i have a problem with this model with a component i made.
planned to use Hole Punching Tool on the component.
but i couldn't make it work well.
is there something that i missed here?

HPT case.png


HPT case.skp
0
User avatar
irwanwr 
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby TIG » Wed Dec 28, 2011 10:26 am

Irwan

For any component to be able to 'cut' a hole it needs a looped outline that is on the plane of the face onto to which it is 'glued'.
Examining your component#1 I see that it is an assembly of subcomponents - which in itself is not a bad thing... BUT as a result of that there is no continuous loop of edges on the face-plane; so although it 'glues' to a face, it doesn't 'cut' it, and because it doesn't cut it then it doesn't 'punch' through to any inner face either.
Capture.PNG

BUT don't despair - it's easy to fix this.

You can edit the component whilst it is on the wall, select-all and move everything back a few mm so that the front-face of the window-frame are on the wall-face with the axes.
Now it will cut its hole in the face it is glued onto, and then it can also punch through to the inner leaf...

Alternatively, IF you really want your window-frame to project slightly in front of the wall-face like you have made it currently, then you must add an extra set of lines around the outside of the frame so that there is then a rectangle on the wall's face that will be recognized as the 'cutting-loop' [and also form any 'punching-loop' too]. If you draw such a rectangle inside the component as raw geometry you will find it will make a face, which you don't want - select that face only and delete it, but leave the four edges in place to define the 'cutting-loop'...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool v2.1 20110824

Postby irwanwr » Wed Dec 28, 2011 10:44 am

TIG wrote:Irwan
You can edit the component whilst it is on the wall, select-all and move everything back a few mm so that the front-face of the window-frame are on the wall-face with the axes.
Now it will cut its hole in the face it is glued onto, and then it can also punch through to the inner leaf...

does that mean i don't have to explode the window so the window frame become able to provide looped outline?
actually, i've changed that to be a bit further off surface. after reading other post about HPT. if i'm not mistaken there are posts with "1 mm shift above surface"?
so, i don't have to shift the window above the surface about 1 mm?
here is the actual component i made. without that shift above the surface.
Jendela 6 Kaca Vent.skp

i'll see if i could understand the instruction, sir. i'll play with the model again.
0
User avatar
irwanwr 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: Damian2177, huy tran do quang, Nicoalberich and 14 guests

Visit our sponsors: