Class: Layout::SketchUpModel
- Defined in:
- lib/sketchup-api-stubs/stubs/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
- BOTTOM_RELATIVE_VIEW =
Constants
nil
- BOTTOM_VIEW =
Stub value.
nil
- BACK_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 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 101 def current_scene end |
#current_scene=(index) ⇒ Object
LayOut automatically adds the scene “Last Saved SketchUp View” to each Layout::SketchUpModel. This means that the Sketchup::Model‘s scenes start with index 1.
The #current_scene= method sets the scene of the Layout::SketchUpModel.
126 127 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 126 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.
142 143 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 142 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.
157 158 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 157 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.
177 178 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 177 def dash_scale=(dash_scale) end |
#display_background=(display) ⇒ Object
The #display_background= method sets whether the background is displayed for the Layout::SketchUpModel.
196 197 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 196 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 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 210 def display_background? end |
#entities ⇒ Layout::Entity
227 228 |
# File 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/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 'lib/sketchup-api-stubs/stubs/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.
333 334 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 333 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.
352 353 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 352 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.
366 367 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 366 def preserve_scale_on_resize? end |
#render ⇒ Object
The #render method renders the Layout::SketchUpModel.
382 383 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 382 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
401 402 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 401 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
427 428 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 427 def render_mode=(render_mode) end |
#render_needed? ⇒ Boolean
The #render_needed? method returns whether the Layout::SketchUpModel needs to be rendered.
441 442 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 441 def render_needed? end |
#scale ⇒ Float
The #scale method returns the scale of the Layout::SketchUpModel.
454 455 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 454 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.
477 478 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 477 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”.
492 493 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 492 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
517 518 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 517 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
548 549 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 548 def view=(view) end |