[Plugin] Cutting Windows script

[Plugin] Cutting Windows script

Postby Didier Bur » Sun Dec 30, 2007 6:13 pm

Hope you find it useful... :D
Bug(s) ? Comment(s) ? idea (s) ? Feel free to report.


Edit: PATCHED ON 12.31.07 (bug fix) :oops:
0
Last edited by Didier Bur on Wed Apr 23, 2008 10:22 pm, edited 2 times in total.
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: Cutting Windows script

Postby CadFather » Mon Dec 31, 2007 12:09 am

Thanks Didier - i get this:

Error Loading File Cutting_Windows.rb
C:/Program Files/Google/Google SketchUp 6/Plugins/Cutting_Windows.rb:1: Invalid char `\003' in expression

i downloaded with dialup so i cannot rule out the fault being somewhere in the process..
1
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: Cutting Windows script

Postby jenujacob » Mon Dec 31, 2007 6:47 am

didier,
i loaded the .rb into the plugins folder... but however i do not get the right click option 'Window And Wall'...
any thoughts?
untitled.JPG
0
User avatar
jenujacob 
 

Re: Cutting Windows script

Postby ilay7k » Mon Dec 31, 2007 8:08 am

Thank you!
jenujacob wrote:didier,
i loaded the .rb into the plugins folder... but however i do not get the right click option 'Window And Wall'...
any thoughts?

I have too...
open component...define face and nothing in right-click action
0

ilay7k 
 

Re: Cutting Windows script

Postby Didier Bur » Mon Dec 31, 2007 10:33 am

Hi,

Below is the code of the controling function to wether display menu or not.
So, if you're not satisfying all the uppercase comments, it is normal that you don't have the item in the context menu.
Please let me know :oops:

Code: Select all
def check_selection_floating_component
sel = Sketchup.active_model.selection
return false if sel.length != 1 #ONE ITEM SELECTED AT A TIME
return false if sel[0].typename != "ComponentInstance" #MUST BE A COMPONENT INSTANCE
f = sel[0].glued_to
behavior = sel[0].definition.behavior.snapto
if not f and behavior != 0 # IF COMPO IS NOT GLUED TO A FACE (FLOATING) AND IF COMPONENT CANNOT BE GLUED TO "NONE"
  return true #LET'S GO FOR THE MENU
  else
  return false #DON'T DISPLAY ITEM IN CONTEXT MENU
end
end
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: Cutting Windows script

Postby jenujacob » Mon Dec 31, 2007 10:54 am

SO BASICALLY..
1) only one component has to be selected.... yes.
2) must be a component instance... which means ????
3) the component is not glued to a face... yes this is also satisfied..

still nothin in the context menu.... or am i missing something from the code???? :oops:
ive never in my life even tried to read a code.. please forgive my ignorance!!! :D ;)
0
User avatar
jenujacob 
 

Re: Cutting Windows script

Postby Didier Bur » Mon Dec 31, 2007 11:03 am

Hi Jenujacob,
Please post the SKP so I can test what's happening. Maybe this has something to do with the model settings, 'cause you're doing everything right.
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: Cutting Windows script

Postby jenujacob » Mon Dec 31, 2007 11:15 am

well theres nothing special in this skp though... its just has a standard "window" component from the architecture library placed in empty space as told in the PDF tutorial u provided..
Untitled.skp


i am also attaching a jpg showing the plugin placement.. just in case...
untitled22.JPG
0
User avatar
jenujacob 
 

Re: Cutting Windows script

Postby ilay7k » Mon Dec 31, 2007 12:00 pm

Didier, thanks a'lot!
It works! I just use componets from my collection and sketchup libraries(with glue allways)...so i play with glue function in comp-t's options(turn on any, sloped and ect...then back to none) and wall-cutting options appear in context-menu...slow response that component was unglued

Ohhh....we can put comp-ts at wall and ect. then manupulate with detail cutting

Thanks! Happy New Year!
0

ilay7k 
 

Re: Cutting Windows script

Postby Didier Bur » Mon Dec 31, 2007 1:41 pm

Thanks ilay7k for tracking bugs...

Patched on 12.31.07 13:40 PM (GMT+2) :!:
Didn't work with components that had a behavior not to glue to anything.
Now works with every kind of component.
Happy new year !
:lol:
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: Cutting Windows script

Postby ilay7k » Mon Dec 31, 2007 2:28 pm

Didier Bur wrote:Thanks ilay7k for tracking bugs...

Patched on 12.31.07 13:40 PM (GMT+2) :!:
Didn't work with components that had a behavior not to glue to anything.
Now works with every kind of component.
Happy new year !
:lol:

It lives...works! :shock: :D
Thanks!
future of 2008
+dynammic any!!
0

ilay7k 
 

Re: Cutting Windows script

Postby jenujacob » Mon Dec 31, 2007 6:26 pm

this is awesome!!! thanks didier!!! :D
happy new year!!!
0
User avatar
jenujacob 
 

Re: Cutting Windows script

Postby kmead » Mon Dec 31, 2007 11:43 pm

Didier:
Many thanks for what I hope becomes another great tool. I ran into the attached problem at startup of SU after installing your new ruby.

I am on a Mac, OSX 10.4.11 with a PPC chip. I will check on my Intel Mac tomorrow after I get back to work.

All the best.

Karl
0
I created Dilbertville, sorry about that...
User avatar
kmead 
 

Re: Cutting Windows script

Postby Didier Bur » Wed Jan 02, 2008 11:26 am

Hi,

Kmead: I've PM'ed you an updated script. Tell me if it works.
Cheers,
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: Cutting Windows script

Postby Ben Ritter » Thu Jan 03, 2008 7:20 pm

Thank you for your generosity.
0

Ben Ritter 
 

Re: Cutting Windows script

Postby amadex » Wed Apr 23, 2008 4:45 pm

kmead wrote:Didier:
Many thanks for what I hope becomes another great tool. I ran into the attached problem at startup of SU after installing your new ruby.

I am on a Mac, OSX 10.4.11 with a PPC chip. I will check on my Intel Mac tomorrow after I get back to work.

All the best.

Karl


Hi Didier, it happens the same with me... How can I solve this?

tkx
0

amadex 
 

Re: [Plugin] Cutting Windows script

Postby Didier Bur » Wed Apr 23, 2008 10:23 pm

@ Amadex: look at the top of this topic, I've released a Mac version.
Tell me if it's OK.
0
Didier Bur (Bytes Farmer)
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Cutting Windows script

Postby gerdwillemen » Fri May 23, 2008 6:08 pm

Didier

I also tried your "mac version. I also get an "error" report.
Could you help ?

See error report in attachment

Thanks

Gerd
0

gerdwillemen 
 

Re: [Plugin] Cutting Windows script

Postby mariocha » Sat Feb 06, 2010 6:06 pm

Just to let you know that the Mac version works fine here.

The whole thing is a 3 step process;
1) define as cutting window
2) put it on a wall
3) right-click window and select "Cut wall from window" then parameters.
Also works on several windows at a time.
Many well deserved thanks to the author !
0
Mario C.
Certified SketchUp Trainer, QC CA.
Every rule has exceptions, but some.
User avatar
mariocha 
Premium Member
Premium Member
 

Re: [Plugin] Cutting Windows script

Postby paddyclown » Fri Aug 26, 2011 10:18 am

Hi

I tried to add this plugin to SUv8 Pro & got this message:
Error Loading File cutting_windows.rb
(eval):719: compile error
(eval):610: syntax error, unexpected ',', expecting kEND
faces_and_heights[0].pushpull (faces_and_heights[1]), false
^Error Loading File yaml.rb
no such file to load -- date

Does anyone have an idea what is going on ?
Thanks in advance folks,
0

paddyclown 
 

Re: [Plugin] Cutting Windows script

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

Perhaps it's time to look up my 'HolePunchTool' [ viewtopic.php?p=271170#p271170 ] which does a similar job BUT has far more bells and whistles - and works relatively seamlessly and has had few error reports...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Cutting Windows script

Postby paddyclown » Fri Aug 26, 2011 11:09 am

TIG, yes, thanks, actually I have been trying to use your tool, but sadly it doesn't work for some unknown reason... I followed the instructions which seem pretty clear & can't get it to work :-(

I have made a component that glues to "any" & has cut opening checked but when i try & use it (ie it is in place on a face of a 'wall' & i r-click & choose punch ) I get this message 'no suitable punching component selected, exiting'... maybe i have just not understood the procedure
0

paddyclown 
 

Re: [Plugin] Cutting Windows script

Postby paddyclown » Fri Aug 26, 2011 11:14 am

... sorry i pressed the submit button too fast...
Thanks for any guidance..

best
0

paddyclown 
 

Re: [Plugin] Cutting Windows script

Postby TIG » Fri Aug 26, 2011 11:28 am

Your cutting component is not made properly its axes are the wrong way round.
It's clear from the Component's thumbnail in the Component Browser which is looking at the 'top' of it and not the 'front', as it should for any 'cutting' door/window/etc
When you make any 'cutting component' it must either be made 'flat' on the ground or already on a face.
If it's made on a face Sketchup assumes you want it to be 'cutting' and it sorts out the axes for you. Otherwise make it so that its z/blue axis will be facing square out of any face you might subsequently place it on.
A cutting component's axes look different from a standard component as there's a blue 'X' added to it
Then when you place your properly made cutting component on a face it should cut a hole in that face - so any transparent or open areas will be 'see-through' - if the wall has two faces you'll see the back-face of the other side.
If you then use my HolePunchTool on the component it punches through the inner face too, adding linked reveals etc...
Here's your component fixed and a version punched...
Compare it with the original...
Capture.PNG
hole punch test [fixed].skp
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Cutting Windows script

Postby paddyclown » Fri Aug 26, 2011 11:36 am

:oops: ok, sorry, just tried for myself & got it finally sorted...
thanks for your help TIG
0

paddyclown 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: adnawri, medeek, Pio Pinzón and 5 guests

Visit our sponsors: