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
-
#camera_modified? ⇒ Boolean
The #camera_modified? method returns whether the camera of the SketchUpModel has been modified.
-
#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.
-
#effects_modified? ⇒ Boolean
The #effects_modified? method returns whether the shadow or fog settings of the SketchUpModel have been modified.
-
#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.
-
#layers_modified? ⇒ Boolean
The #layers_modified? method returns whether the layers of the SketchUpModel has been modified.
-
#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.
-
#reset_camera ⇒ Object
The #reset_camera method resets the SketchUpModel‘s camera to the scene’s setting.
-
#reset_effects ⇒ Object
The #reset_effects method resets the SketchUpModel‘s shadow and fog settings to the scene’s settings.
-
#reset_layers ⇒ Object
The #reset_layers method resets the SketchUpModel‘s layers to the scene’s setting.
-
#reset_style ⇒ Object
The #reset_style method resets the SketchUpModel‘s style to the scene’s setting.
-
#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.
-
#style_modified? ⇒ Boolean
The #style_modified? method returns whether the style of the SketchUpModel has been modified.
-
#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.
282 283 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 282 def initialize(path, bounds) end |
Instance Method Details
#camera_modified? ⇒ Boolean
The #camera_modified? method returns whether the camera of the Layout::SketchUpModel has been modified.
58 59 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 58 def camera_modified? end |
#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.
73 74 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 73 def clip_mask end |
#clip_mask=(clip_mask) ⇒ Object
clip_mask
may be nil
as of LayOut 2020.1.
The #clip_mask= method sets a clip mask for the Layout::SketchUpModel. clip_mask can be a Rectangle, Ellipse, or Path, or nil
, and it must not currently exist in a Document, or Group.
105 106 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 105 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.
121 122 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 121 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.
146 147 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 146 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.
162 163 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 162 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.
177 178 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 177 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.
197 198 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 197 def dash_scale=(dash_scale) end |
#display_background=(display) ⇒ Object
The #display_background= method sets whether the background is displayed for the Layout::SketchUpModel.
216 217 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 216 def display_background=(display) end |
#display_background? ⇒ Boolean
The #display_background? method returns whether the background is displayed for the Layout::SketchUpModel.
230 231 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 230 def display_background? end |
#effects_modified? ⇒ Boolean
The #effects_modified? method returns whether the shadow or fog settings of the Layout::SketchUpModel have been modified.
244 245 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 244 def effects_modified? end |
#entities ⇒ Layout::Entity
261 262 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 261 def entities end |
#layers_modified? ⇒ Boolean
The #layers_modified? method returns whether the layers of the Layout::SketchUpModel has been modified.
@note: In SketchUp 2020, SketchUp “layers” were renamed to “tags”. For
consistency with the SketchUp API, this will continue to refer to
"tags" as "layers".
301 302 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 301 def layers_modified? end |
#line_weight ⇒ Float
The #line_weight method returns the line weight for the Layout::SketchUpModel.
315 316 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 315 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.
336 337 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 336 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.
353 354 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 353 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.
372 373 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 372 def perspective=(perspective) end |
#perspective? ⇒ Boolean
The #perspective? method returns whether the Layout::SketchUpModel‘s view is perspective or orthographic.
386 387 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 386 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.
405 406 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 405 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.
419 420 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 419 def preserve_scale_on_resize? end |
#render ⇒ Object
The #render method renders the Layout::SketchUpModel. If the model belongs to a Document, then the render will be performed at the quality set in document.page_info (see Document and PageInfo). Otherwise, the render will be performed at Low quality.
438 439 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 438 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
457 458 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 457 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
483 484 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 483 def render_mode=(render_mode) end |
#render_needed? ⇒ Boolean
The #render_needed? method returns whether the Layout::SketchUpModel needs to be rendered.
497 498 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 497 def render_needed? end |
#reset_camera ⇒ Object
The #reset_camera method resets the Layout::SketchUpModel‘s camera to the scene’s setting.
514 515 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 514 def reset_camera end |
#reset_effects ⇒ Object
The #reset_effects method resets the Layout::SketchUpModel‘s shadow and fog settings to the scene’s settings.
531 532 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 531 def reset_effects end |
#reset_layers ⇒ Object
The #reset_layers method resets the Layout::SketchUpModel‘s layers to the scene’s setting.
@note: In SketchUp 2020, SketchUp “layers” were renamed to “tags”. For
consistency with the SketchUp API, this will continue to refer to
"tags" as "layers".
553 554 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 553 def reset_layers end |
#reset_style ⇒ Object
The #reset_style method resets the Layout::SketchUpModel‘s style to the scene’s setting.
570 571 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 570 def reset_style end |
#scale ⇒ Float
The #scale method returns the scale of the Layout::SketchUpModel.
583 584 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 583 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.
606 607 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 606 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”.
621 622 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 621 def scenes end |
#style_modified? ⇒ Boolean
The #style_modified? method returns whether the style of the Layout::SketchUpModel has been modified.
635 636 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 635 def style_modified? 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
660 661 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 660 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
691 692 |
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 691 def view=(view) end |