|
SketchUp Ruby API Reference |
A construction point represents a point in the model that can be used to aid in other modeling operations. For example, you may put a construction point at the center of a circle to make it easier to locate that point for performing other operations.
The ConstructionPoint class contains one method to retrieve the position of a construction point.
Parent:Drawingelement
Methods: position
Example Code: constructionpointtests.rb
The position method is used to retrieve the Point3d object position of the construction point.
point = constructionpoint.position
point - a Point3d object containing the position in 3 dimensional space
point = Geom::Point3d.new 100,200,300
model = Sketchup.active_model
entities = model.active_entities
entities.add_cpoint point
cpoint = entities[0]
position = cpoint.position
if (position)
UI.messagebox position
else
UI.messagebox "Failure"
end
|
SketchUp Ruby API Reference: ConstructionPoint |
© Google Inc. 2007 sketchup.google.com |