Another newbies ruby question...
I quite simply want to pushpull a 2d shape/face through a 3d object just as you would when normally modelling in sketchup to, say just cut a hole through a cube...
my code is for pushpull-ing a radius on a cubes corner
code atm is...
height=6.cm
depth=2.cm
length=100.cm
edge_round=0.5.cm
corner_round=2.5.cm
model = Sketchup.active_model
entities = model.active_entities
objgroup=entities.add_group()
usents=objgroup.entities
face=usents.add_face([0,0,0],[length,0,0],[length,depth,0],[0,depth,0])
face.pushpull(-height)
e1 = usents.add_edges [0,0,0],[0,0,height-corner_round]
e2 = usents.add_arc [corner_round,0,height-corner_round], [-1,0,0], [0,1,0], corner_round, 0.degrees, 90.degrees
e3 = usents.add_edges [corner_round,0,height],[length-corner_round,0,height]
e4 = usents.add_arc [length-corner_round,0,height-corner_round], [-1,0,0], [0,1,0], corner_round, 90.degrees, 180.degrees
e5 = usents.add_edges [length,0,0],[length,0,height-corner_round]
e6 = usents.add_edges [0,0,height-corner_round],[0,0,height]
e7 = usents.add_edges [0,0,height],[corner_round,0,height]
e8 = usents.add_edges [length,0,height],[length-corner_round,0,height]
e9 = usents.add_edges [length,0,height],[length,0,height-corner_round]
cface1=usents.add_face(e2+e6+e7)
cface1.pushpull(-depth)
the code is fine right up the the final pushpull line where it says...
Error: #<NoMethodError: undefined method pushpull' for nil:NilClass> <main>:in
<main>'
SketchUp:1:in `eval'
so i presume that this means it can't find the face i'm talking about?
can anyone see why this isn't working?
thanks again in advance
Matt