For this discussion, the term should not be “model” but component instance.
One way is to place the instance in the
model.active_entities (usually at the local
ORIGIN,) and then transform the instance to follow the mouse as SketchUp calls your custom tool
onMouseMove() callback method.
Take care to remove the instance (or fire a
Sketchup::undo) if the user cancels and/or deactivates the tool.
This is not a new idea. There may even be some example plugins lying around over at SketchUcation.
I remember it being discussed over there in the past.
You can also draw to the screen within a tool. So you could actually be drawing a facsimile of the component (that is still only just a definition, but not an actual placed instance,) on the end of the cursor as your tool moves it.
This can be done because it is the definition that “owns” the entities collection, not instances. So you can read and explore the definition’s entities before a real instance is actually placed into the model’s entities collection.
The API tool class is abstract. This means that there is not a defined superclass for it.
The methods described in the API are optional callback methods, but since it’s your custom class, you may also define other internal methods to help organize the code (as long as they have names other than the API callback methods.)
There are several examples of tools by the SketchUp Team in the Extension Warehouse.
This one is a must read:
There are also others … Window Maker, Bezier Curve Tool, Rotate Rectangle Tool, etc.
Check out there extensions listing: http://extensions.sketchup.com/en/user/48/store
ADD: The Rotate Rectangle Tool is one that draws facsimile geometry to the screen before any real geometry is added to the model.