yonatanCohenShevetTzhala / sketchyphysics

Automatically exported from code.google.com/p/sketchyphysics
0 stars 0 forks source link

sketchy physics 3.1 breaks group.copy method #121

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. install sketchyphysics 3.1 into sketchup plugins folder
2. run following script
ents = Sketchup.active_model.entities
grp_a = ents.add_group       
grp_a.entities.add_circle [1,1,0],[0,0,1],1
grp_b = grp_a.copy
puts grp_b.typename

What is the expected output? What do you see instead?
expected : 
"Group"
see instead :
"Error: #<NoMethodError: undefined method `typename' for nil:NilClass>" (and in 
fact the group has not been copied in the model)

Now delete the file "sketchyphyics.rb" from plugins folder and restart Sketchup

run the code again, this time you get "Group"

What version of the product are you using? On what operating system?
sketchup 8.0.11752 free
sketchyphysics 3.1
Windows 7 Home Premium
Internet Explorer 8.0

Please provide any additional information below.

All Hail TIG!

I have key-shaped bruises on my forehead after spending a morning trying to 
work out why group.copy was returning nil when applied to a perfectly normal 
group.

TIG writes : "Perhaps he has a third party script that ill-advisedly refines 
the group.copy method and makes it return nil ???"

So I take out all scripts from my plugins directory and Hey Presto! suddenly 
group.copy works as advertised.

Gingerly replacing them and testing, I found the culprit to be Sketchy Physics 
3.1

I take the file sketchyphysics.rb out of my plugins, group copy method works 
fine

I put it back in, group copy method returns nil

I take it out, copy works

I put it in, copy returns nil

I feel better.

So some keywords to help other poor souls :

group copy method failing returning nil not working stuffed buggered broken 

I have sketchup 8.0.11752 free by the way

Original issue reported on code.google.com by scottbat...@gmail.com on 9 Nov 2012 at 3:40