[Plugin] Hole Punching Tool

[Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 2:33 pm

(c) TIG 2017
Permission to use, copy, modify, and distribute this software for
any purpose and without fee is hereby granted, provided the above
copyright notice appear in all copies.

THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.



Script:

#HolePunchTool.rb

it belongs in the ../Plugins/ folder...

From v1.6 it also requires 'deBabelizer.rb' in the ../Plugins/ folder and
any required locale lingvo files in the ../Plugins/TIGtools sub-folder...
e.g. #HolePunchToolEN-US.lingvo, #HolePunchToolFR.lingvo etc...



Overview:

This script adds a new tool for glued/cutting component-instances.
It allows them to punch linked 3D holes through the faces of double-skinned walls/roofs etc.
It is accessed through the right-click context-menu 'Hole Punching...' sub-menu, which offers various items depending on the current Selection.

For the tool's Usage instructions etc and Download/AutoInstall the latest version from the SCF PluginStore...

Download

7
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby Krisidious » Tue Sep 14, 2010 2:41 pm

when I download the ruby it names it... "%23HolePunchTool.rb" should I change this to "#HolePunchTool.rb" or does it not matter?
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 2:45 pm

Works fine for me - it simply downloads with its original name. :?
What browser are you using?
How did you 'save' it ?
It's not so important... it has the # at the start of its name so that it loads very early and therefore it puts its sub-menu near the top of the context-menu items.
I suggest you rename it with the #. :roll:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby Krisidious » Tue Sep 14, 2010 3:07 pm

I'm using Chrome... I just clicked the link to download.

I believe %23 is the symbol code for the # symbol. I think when some browsers follow a link they convert symbols to their native code.

anyway thanks for the plugin Tig..,. I coulda used this like 5 years ago... I'll bill you for all the lost hours of work. you just shaved like 1 minute off every window I've ever made.
0
By: Kristoff Rand
Home Designer
Unique House Plans
User avatar
Krisidious 
 

Re: [Plugin] Hole Punching Tool

Postby pilou » Tue Sep 14, 2010 3:08 pm

Maybe there is Punch hole in the center of the Milky way ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool

Postby pilou » Tue Sep 14, 2010 3:22 pm

Does it possible to have an Set Angle in context menu?
angle.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 3:39 pm

Pilou... explain a little more...
I guess you want to have a punched hole that isn't square to the wall's face !
It wouldn't be easy...

However, you can easily mimic it...
First make a HolePunch and then draw over an Edge of the inner punched-hole so it forms a Face, now select just that Face and Move that Face to where you want and it [or you can Scale it to change one or more of its Edges] - the reveals' geometry will adjust to suit the inner-hole's new location or shape, then you can Erase just the Face and you have your distorted punched hole/reveals. This geometry will still auto-Select with the punching component-instance and it will move/delete with it etc etc...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby rv1974 » Tue Sep 14, 2010 3:47 pm

Hi Tig!
Coud you take a look at attachment. The script actually unglues the windows
0

rv1974 
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 3:55 pm

@rv1974

The problem is that the instance is exactly the same 'depth' as the wall - see the Ruby Console for its errors - I can probably trap for that easily... watch for updates...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby pilou » Tue Sep 14, 2010 3:56 pm

I guess you want to have a punched hole that isn't square to the wall's face !

no no, a square (rectangle) at the start and end ;)
At least any form ! In fact that is a push pull inclined (multiple, if you have some components ;)

angle2.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 4:30 pm

Pilou...

Do what I said...

Form a Face over the inner-hole by over-drawing an Edge.
Select just the Face.
Move the Face.
Select the Face and Delete it.
The hole/reveals are now 'sloping' in 3D.


To make 'splayed' reveals you can Scale the Face before Deleting it...
Capture.PNG
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 4:47 pm

Following some feedback...
Here's v1.1 viewtopic.php?p=271170#p271170
Components exactly matching wall-depth glitch fixed.
Zero depth in dialog trapped.
:geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby pilou » Tue Sep 14, 2010 5:06 pm

Ah yes, seems thas was also a video about this tricky tips :thumb:
But all that is very "manual" :)
Automatic is more pleasant ;)

It's was this one :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool

Postby pilou » Tue Sep 14, 2010 6:13 pm

Why don't put by default infinite depth, and just set depth if wanted? ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool

Postby david_h » Tue Sep 14, 2010 6:22 pm

So far. . .so good.

Thanks TIG.

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

Re: [Plugin] Hole Punching Tool

Postby TIG » Tue Sep 14, 2010 6:40 pm

Pilou wrote:Why don't put by default infinite depth, and just set depth if wanted? ;)

Because if there were no 'inner-face' to the wall how would it know when to stop extruding the reveals ?
You could add say 1000m as the maximum punch depth and this would be remembered in the model... BUT then if there were ever a wall with no inner-face you'll get v_e_r_y deep reveals ! The 20"/500mm default seems a reasonable depth to start off with ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby pilou » Tue Sep 14, 2010 8:56 pm

Because if there were no 'inner-face' to the wall how would it know when to stop extruding the reveals ?


Cousin Component Punch punches all the volume without to know the size? ;)
then if there were ever a wall with no inner-face

don't launch the script :?:
0
Last edited by pilou on Wed Sep 15, 2010 1:00 am, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] Hole Punching Tool

Postby EarthMover » Wed Sep 15, 2010 12:52 am

Is it only supposed to punch a hole if the punch depth matches the wall thickness exactly? If I put in a depth greater than the wall thickness, I get no punch....is this correct?

BTW - Thanks TIG for finishing this up and publishing!
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] Hole Punching Tool

Postby TIG » Wed Sep 15, 2010 1:34 am

The way it works is you set the maximum punched depth [the default is 20"/500mm, but you can permanently change it for that model at any time] - just decide on a value knowing that all your various wall thicknesses are probably always less than that.
The holes are them punched to match the actual wall thickness, IF it's =20" or less [the hole's reveals also match the inner-face material/layer] - BUT if you have a one-face wall [or a very thick wall] then the reveal depth is made as the maximum =20" [and the reveals then match the outer-face material/layer].

The code that checks for the inner-face is still not perfect - but I am sleeping on it...
Currently a 'ray' is cast internally from the front-face, centered on the cutting-component instance, until it finds a suitable face that's parallel and facing the right way. If there isn't one it then uses the default reveal size... It's currently possible to trip it up if your component also has a face/edge exactly on the center and at the same distance from the front-face as the real candidate for the inner-face - the ray can mistakenly find that instead of the required face and so it misses it and 'defaults the reveal depth... I suspect this is your case ???
It is possible to test in other ways - for let's say faces' planes and points being 'on' them at the correct 'thickness'... so I just need to think up some better coding solutions - maybe tomorrow - I'm tired now........... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby EarthMover » Wed Sep 15, 2010 2:56 am

For me, the raytest seems to miss the parallel wall in every case where my depth is greater than the wall thickness. I'm just using generic SU windows to test, but also tried with simple shape components I made myself to be sure there was no line in the direct center. Every time it seems to be punching through to the bounds of the punch depth. No worries though, I typically offset my walls to the same thickness, so I can just math the punch depth with that and all is well. Overall, it's a great solution for an age old ruby puzzler. :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] Hole Punching Tool

Postby TIG » Wed Sep 15, 2010 9:15 am

Adam

I'm making a more robust version now and will post it later today....... ;)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby rv1974 » Wed Sep 15, 2010 9:29 am

Hi! I have hard times trying to copy or simply select the punched components. Could you improve it?
P.S. A science fiction request: Could it punch on multiple feces or at least corner windows (2 faces)?
0

rv1974 
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Wed Sep 15, 2010 11:00 am

rv1974

You are making life more difficult for yourself than it needs to be...
You components are made exactly the depth of the wall ! This means that the reveals are obscured by the component itself...
Why not make them a simple 2D rectangle cutting-component that you place on the outer-face, and you then let the 'Hole Punching...' make the hole's reveals and the hole in the inner-face etc - that way the wall thickness could vary and the reveals will adjust to suit for the one 2D component - and is then more easily selected too.

You CAN select the component-instances using the Outliner as needed...

Please read the tool's notes... you should NOT 'copy' component-instances that are 'punched' [unless you are going to 'unlink the punches' or 'undo the punching' immediately afterwards], because the observers and linking attributes etc will get 'tangled up'. So usually you should only copy un-punched component-instances - but remember that if they are punched you can always use: select them > 'undo punch' > do the copying > re-select them > 'punch' again... :idea:


I've only just got this single wall hole-punching working and now you want punched corner windows - aaaargh! :roll: ;)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Wed Sep 15, 2010 11:17 am

Here's v1.2 viewtopic.php?p=271170#p271170

The finding the inner-face methods have been made more robust - now an inner-face will only be used if it is the correct orientation / side of the wall, AND it is within the specified maximum depth from the outer-face, AND its geometry overlaps at least the center of the component-instance, AND if there are several suitable 'candidate' faces then it is taken as the one 'nearest' to the outer-face.

Also an 'Unlink Punch' option has been added - this will 'unlink' a selected component-instance and its punched-hole geometry.

Please read the Notes... :geek:
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby EarthMover » Wed Sep 15, 2010 12:53 pm

Thanks TIG for the update! :thumb: It works in every case I've tried now. Flawless thus far. :berserk:
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] Hole Punching Tool

Postby EarthMover » Wed Sep 15, 2010 1:45 pm

One foreseeable issue. I have a lot of modified components where a glue/cut component is nested inside a larger component.....i.e. a window with shutters and mantle. Is there a way to either search the component for a nested cutting component and make the cut with that, or allow me to perform the cut from within the components edit mode?

Thanks!

(Attached is a component I made for testing.)
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] Hole Punching Tool

Postby Bertier » Wed Sep 15, 2010 9:22 pm

great thank you

same thing with the name changing in chrome...

will use #
0

Bertier 
 

Re: [Plugin] Hole Punching Tool

Postby Bertier » Wed Sep 15, 2010 9:29 pm

not working in SU 7
0

Bertier 
 

Re: [Plugin] Hole Punching Tool

Postby TIG » Wed Sep 15, 2010 10:11 pm

Bertier wrote:not working in SU 7

It works in v7 or v8...
A little more detail please :roll:
I'm not psychic...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Hole Punching Tool

Postby Bertier » Wed Sep 15, 2010 11:53 pm

sorry

I put it in my pluggin folder

it doesn't show up in my pluggin list...

using SU7 on XP pro
0

Bertier 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: Carto, Google Bot and 12 guests

Visit our sponsors: