Class: Layout::SketchUpModel
- Defined in:
- SketchUp/Layout/SketchUpModel.rb
Overview
A SketchUp Model entity. This is an instance of a SketchUp Model that is inserted into a .layout file. You can change the render mode, line weight, and set the current scene for the SketchUp Model with this interface.
Constant Summary collapse
- BACK_VIEW =
Constants
nil
- BOTTOM_RELATIVE_VIEW =
Stub value.
nil
- BOTTOM_VIEW =
Stub value.
nil
- CUSTOM_VIEW =
Stub value.
nil
- FRONT_VIEW =
Stub value.
nil
- HYBRID_RENDER =
Stub value.
nil
- ISO_VIEW =
Stub value.
nil
- LEFT_VIEW =
Stub value.
nil
- RASTER_RENDER =
Stub value.
nil
- RIGHT_VIEW =
Stub value.
nil
- TOP_RELATIVE_VIEW =
Stub value.
nil
- TOP_VIEW =
Stub value.
nil
- VECTOR_RENDER =
Stub value.
nil
Instance Method Summary collapse
-
#clip_mask ⇒ Layout::Entity
The #clip_mask method returns the clip mask entity for the SketchUpModel, or
nil
if it does not have one. -
#clip_mask=(clip_mask) ⇒ Object
The #clip_mask= method sets a clip mask for the SketchUpModel.
-
#current_scene ⇒ Integer
The #current_scene method returns the index of the most recently selected scene of the SketchUpModel.
-
#current_scene=(index) ⇒ Object
The #current_scene= method sets the scene of the SketchUpModel.
-
#current_scene_modified? ⇒ Boolean
The #current_scene_modified? method returns whether the most recently selected scene of the SketchUpModel has been modified.
-
#dash_scale ⇒ Float
The #dash_scale method returns the dash scale for the SketchUpModel.
-
#dash_scale=(dash_scale) ⇒ Object
The #dash_scale= method sets the dash scale for the SketchUpModel.
-
#display_background=(display) ⇒ Object
The #display_background= method sets whether the background is displayed for the SketchUpModel.
-
#display_background? ⇒ Boolean
The #display_background? method returns whether the background is displayed for the SketchUpModel.
-
#entities ⇒ Layout::Entity
The #entities method returns the Group that represents the SketchUpModel in its exploded form.
-
#initialize(path, bounds) ⇒ Layout::SketchUpModel
constructor
The #initialize method creates a new SketchUpModel.
-
#line_weight ⇒ Float
The #line_weight method returns the line weight for the SketchUpModel.
-
#line_weight=(line_weight) ⇒ Object
The #line_weight= method sets the line weight for the SketchUpModel.
-
#model_to_paper_point(model_point) ⇒ Geom::Point2d
The #model_to_paper_point method converts the Geom::Point3d in the SketchUpModel to a Geom::Point2d in paper space.
-
#perspective=(perspective) ⇒ Object
The #perspective= method sets whether the SketchUpModel‘s view is perspective or orthographic.
-
#perspective? ⇒ Boolean
The #perspective? method returns whether the SketchUpModel‘s view is perspective or orthographic.
-
#preserve_scale_on_resize=(preserve_scale) ⇒ Object
The #preserve_scale_on_resize= method sets whether the scale is preserved when the SketchUpModel is resized.
-
#preserve_scale_on_resize? ⇒ Boolean
The #preserve_scale_on_resize? method returns whether the scale is preserved when the SketchUpModel is resized.
-
#render ⇒ Object
The #render method renders the SketchUpModel.
-
#render_mode ⇒ Integer
The #render_mode method returns the render mode of the SketchUpModel.
-
#render_mode=(render_mode) ⇒ Object
The #render_mode= method sets the render mode of the SketchUpModel.
-
#render_needed? ⇒ Boolean
The #render_needed? method returns whether the SketchUpModel needs to be rendered.
-
#scale ⇒ Float
The #scale method returns the scale of the SketchUpModel.
-
#scale=(scale) ⇒ Object
The #scale= method sets the scale of the SketchUpModel.
-
#scenes ⇒ Array<String>
The #scenes method returns an array of scene names that are available for the SketchUpModel.
-
#view ⇒ Integer
The #view method returns the standard view of the SketchUpModel.
-
#view=(view) ⇒ Object
The #view= method sets the standard view of the SketchUpModel.
Methods inherited from Entity
#==, #bounds, #document, #drawing_bounds, #group, #layer_instance, #locked=, #locked?, #move_to_group, #move_to_layer, #on_shared_layer?, #page, #style, #style=, #transform!, #transformation, #untransformed_bounds, #untransformed_bounds=
Constructor Details
#initialize(path, bounds) ⇒ Layout::SketchUpModel
The #initialize method creates a new Layout::SketchUpModel.
248 249 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 248 def initialize(path, bounds) end |
Instance Method Details
#clip_mask ⇒ Layout::Entity
The #clip_mask method returns the clip mask entity for the Layout::SketchUpModel, or nil
if it does not have one. clip_mask can be a Rectangle, Ellipse, or Path.
59 60 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 59 def clip_mask end |
#clip_mask=(clip_mask) ⇒ Object
The #clip_mask= method sets a clip mask for the Layout::SketchUpModel. clip_mask can be a Rectangle, Ellipse, or Path, and it must not currently exist in a Document.
85 86 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 85 def clip_mask=(clip_mask) end |
#current_scene ⇒ Integer
The #current_scene method returns the index of the most recently selected scene of the Layout::SketchUpModel.
101 102 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 101 def current_scene end |
#current_scene=(index) ⇒ Object
The #current_scene= method sets the scene of the Layout::SketchUpModel.
122 123 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 122 def current_scene=(index) end |
#current_scene_modified? ⇒ Boolean
The #current_scene_modified? method returns whether the most recently selected scene of the Layout::SketchUpModel has been modified.
140 141 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 140 def current_scene_modified? end |
#dash_scale ⇒ Float
The #dash_scale method returns the dash scale for the Layout::SketchUpModel. A scale value of 0.0 means the dashes are scaled based on the line weight.
155 156 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 155 def dash_scale end |
#dash_scale=(dash_scale) ⇒ Object
The #dash_scale= method sets the dash scale for the Layout::SketchUpModel. A scale value of 0.0 or lower will “auto” scale the dashes based on the line weight.
175 176 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 175 def dash_scale=(dash_scale) end |
#display_background=(display) ⇒ Object
The #display_background= method sets whether the background is displayed for the Layout::SketchUpModel.
194 195 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 194 def display_background=(display) end |
#display_background? ⇒ Boolean
The #display_background? method returns whether the background is displayed for the Layout::SketchUpModel.
210 211 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 210 def display_background? end |
#entities ⇒ Layout::Entity
227 228 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 227 def entities end |
#line_weight ⇒ Float
The #line_weight method returns the line weight for the Layout::SketchUpModel.
262 263 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 262 def line_weight end |
#line_weight=(line_weight) ⇒ Object
The #line_weight= method sets the line weight for the Layout::SketchUpModel. Line weight must be at least 0.01.
283 284 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 283 def line_weight=(line_weight) end |
#model_to_paper_point(model_point) ⇒ Geom::Point2d
The #model_to_paper_point method converts the Geom::Point3d in the Layout::SketchUpModel to a Geom::Point2d in paper space.
300 301 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 300 def model_to_paper_point(model_point) end |
#perspective=(perspective) ⇒ Object
The #perspective= method sets whether the Layout::SketchUpModel‘s view is perspective or orthographic.
319 320 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 319 def perspective=(perspective) end |
#perspective? ⇒ Boolean
The #perspective? method returns whether the Layout::SketchUpModel‘s view is perspective or orthographic.
335 336 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 335 def perspective? end |
#preserve_scale_on_resize=(preserve_scale) ⇒ Object
The #preserve_scale_on_resize= method sets whether the scale is preserved when the Layout::SketchUpModel is resized.
354 355 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 354 def preserve_scale_on_resize=(preserve_scale) end |
#preserve_scale_on_resize? ⇒ Boolean
The #preserve_scale_on_resize? method returns whether the scale is preserved when the Layout::SketchUpModel is resized.
370 371 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 370 def preserve_scale_on_resize? end |
#render ⇒ Object
The #render method renders the Layout::SketchUpModel.
386 387 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 386 def render end |
#render_mode ⇒ Integer
The #render_mode method returns the render mode of the Layout::SketchUpModel.
The render mode can be one of the following:
Layout::SketchUpModel::RASTER_RENDER
Layout::SketchUpModel::HYBRID_RENDER
Layout::SketchUpModel::VECTOR_RENDER
405 406 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 405 def render_mode end |
#render_mode=(render_mode) ⇒ Object
The #render_mode= method sets the render mode of the Layout::SketchUpModel.
The render mode can be one of the following:
Layout::SketchUpModel::RASTER_RENDER
Layout::SketchUpModel::HYBRID_RENDER
Layout::SketchUpModel::VECTOR_RENDER
431 432 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 431 def render_mode=(render_mode) end |
#render_needed? ⇒ Boolean
The #render_needed? method returns whether the Layout::SketchUpModel needs to be rendered.
447 448 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 447 def render_needed? end |
#scale ⇒ Float
The #scale method returns the scale of the Layout::SketchUpModel.
460 461 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 460 def scale end |
#scale=(scale) ⇒ Object
The #scale= method sets the scale of the Layout::SketchUpModel. Scale must be at least 0.0000001, and the view must be orthographic.
483 484 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 483 def scale=(scale) end |
#scenes ⇒ Array<String>
The #scenes method returns an array of scene names that are available for the Layout::SketchUpModel. The first scene will always be the default scene, called “Last saved SketchUp View”.
498 499 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 498 def scenes end |
#view ⇒ Integer
The #view method returns the standard view of the Layout::SketchUpModel.
The standard view can be one of the following values:
Layout::SketchUpModel::CUSTOM_VIEW
Layout::SketchUpModel::TOP_VIEW
Layout::SketchUpModel::TOP_RELATIVE_VIEW
Layout::SketchUpModel::BOTTOM_VIEW
Layout::SketchUpModel::BOTTOM_RELATIVE_VIEW
Layout::SketchUpModel::FRONT_VIEW
Layout::SketchUpModel::BACK_VIEW
Layout::SketchUpModel::LEFT_VIEW
Layout::SketchUpModel::RIGHT_VIEW
Layout::SketchUpModel::ISO_VIEW
523 524 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 523 def view end |
#view=(view) ⇒ Object
The #view= method sets the standard view of the Layout::SketchUpModel.
The standard view can be one of the following values:
Layout::SketchUpModel::TOP_VIEW
Layout::SketchUpModel::TOP_RELATIVE_VIEW
Layout::SketchUpModel::BOTTOM_VIEW
Layout::SketchUpModel::BOTTOM_RELATIVE_VIEW
Layout::SketchUpModel::FRONT_VIEW
Layout::SketchUpModel::BACK_VIEW
Layout::SketchUpModel::LEFT_VIEW
Layout::SketchUpModel::RIGHT_VIEW
Layout::SketchUpModel::ISO_VIEW
554 555 |
# File 'SketchUp/Layout/SketchUpModel.rb', line 554 def view=(view) end |