My “Mirror
” plugin does the mirroring about any plane determined by three picked points.
My “Cut_to_plane
” takes three picked points and from that defined plane it deletes the unwanted half of the object.
If you want to draw a temporary rectangular face use the view.draw*
tools within your Tool.draw
commands…
In more recent SketchUp versions you can define a color with transparency to apply to that face.
I suspect you want the temporary-rectangle to extend across the object’s bounds rather than the three picked points.
To get that, first get the plane from the three-points, then get the object.bounds.
From the bounds you can get the .max and .min points of its enclosing ‘box’.
You can also use the max.z on a clone of the min and min.z on a clone of the max.
You now have four points defining the ‘box’.
You already have the ‘normal’ [obtainable from the plane], so you can define a ‘line’ [point, vector]
passing through these points.
You can then use the Geom methods to get an intersection of the defined plane and each of those lines.
You now have those four points projected onto the plane.
From those you can determine the extents of the enclosing rectangle on that plane and then use those points to ‘draw
’ the Tool’s temporary graphics for that rectangle…
http://www.sketchup.com/intl/en/developer/docs/ourdoc/view
By combining the ideas in those, then constructing “your” tool would be easy enough…