Class: Layout::SketchUpModel
| Relationships | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Entity
|
|
|
Instance Chain:
self,
Entity
|
|
| Inherits: |
Layout::Entity
|
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
-
BACK_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 24
Stub value.
nil -
BOTTOM_RELATIVE_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 21
Constants
nil -
BOTTOM_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 22
Stub value.
nil -
CUSTOM_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 26
Stub value.
nil -
FRONT_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 28
Stub value.
nil -
HYBRID_RENDER =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 30
Stub value.
nil -
ISO_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 32
Stub value.
nil -
LEFT_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 34
Stub value.
nil -
NO_OVERRIDE =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 36
Stub value.
nil -
RASTER_RENDER =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 38
Stub value.
nil -
RIGHT_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 40
Stub value.
nil -
TOP_RELATIVE_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 42
Stub value.
nil -
TOP_VIEW =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 43
Stub value.
nil -
VECTOR_RENDER =
# File 'lib/sketchup-api-stubs/stubs/Layout/SketchUpModel.rb', line 45
Stub value.
nil
Class Method Summary
-
.new(path, bounds) ⇒ Layout::SketchUpModel
constructor
The
#initializemethod creates a newSketchUpModel.
Instance Attribute Summary
-
#camera_modified? ⇒ Boolean
readonly
The #camera_modified? method returns whether the camera of the
SketchUpModelhas been modified. -
#clip_mask ⇒ Layout::Entity
rw
The #clip_mask method returns the clip mask entity for the
SketchUpModel, ornilif it does not have one. -
#clip_mask=(clip_mask)
rw
The #clip_mask= method sets a clip mask for the
SketchUpModel. -
#current_scene ⇒ Integer
rw
The #current_scene method returns the index of the most recently selected scene of the
SketchUpModel. -
#current_scene=(index)
rw
The #current_scene= method sets the scene of the
SketchUpModel. -
#current_scene_modified? ⇒ Boolean
readonly
The #current_scene_modified? method returns whether the most recently selected scene of the
SketchUpModelhas been modified. -
#dash_scale ⇒ Float
rw
The #dash_scale method returns the dash scale for the
SketchUpModel. -
#dash_scale=(dash_scale)
rw
The #dash_scale= method sets the dash scale for the
SketchUpModel. -
#display_background=(display)
rw
The #display_background= method sets whether the background is displayed for the
SketchUpModel. -
#display_background? ⇒ Boolean
rw
The #display_background? method returns whether the background is displayed for the
SketchUpModel. -
#effects_modified? ⇒ Boolean
readonly
The #effects_modified? method returns whether the shadow or fog settings of the
SketchUpModelhave been modified. -
#layers_modified? ⇒ Boolean
readonly
The #layers_modified? method returns whether the layers of the
SketchUpModelhas been modified. -
#line_weight ⇒ Float
rw
The #line_weight method returns the line weight for the
SketchUpModel. -
#line_weight=(line_weight)
rw
The #line_weight= method sets the line weight for the
SketchUpModel. -
#perspective=(perspective)
rw
The #perspective= method sets whether the
SketchUpModel‘s view is perspective or orthographic. -
#perspective? ⇒ Boolean
rw
The #perspective? method returns whether the
SketchUpModel‘s view is perspective or orthographic. -
#preserve_scale_on_resize=(preserve_scale)
rw
The #preserve_scale_on_resize= method sets whether the scale is preserved when the
SketchUpModelis resized. -
#preserve_scale_on_resize? ⇒ Boolean
rw
The #preserve_scale_on_resize? method returns whether the scale is preserved when the
SketchUpModelis resized. -
#render_mode ⇒ Integer
rw
The #render_mode method returns the render mode of the
SketchUpModel. -
#render_mode=(render_mode)
rw
The #render_mode= method sets the render mode of the
SketchUpModel. -
#render_needed? ⇒ Boolean
readonly
The #render_needed? method returns whether the
SketchUpModelneeds to be rendered. -
#scale ⇒ Float
rw
The #scale method returns the scale of the
SketchUpModel. -
#scale=(scale)
rw
The #scale= method sets the scale of the
SketchUpModel. -
#style_modified? ⇒ Boolean
readonly
The #style_modified? method returns whether the style of the
SketchUpModelhas been modified. -
#view ⇒ Integer
rw
The #view method returns the standard view of the
SketchUpModel. -
#view=(view)
rw
The #view= method sets the standard view of the
SketchUpModel.
Entity - Inherited
| #locked= | The |
| #locked? | The |
| #on_shared_layer? | |
| #style | |
| #style= | |
| #untransformed_bounds | The |
| #untransformed_bounds= | The |
Instance Method Summary
- #entities ⇒ Layout::Entity
-
#model_to_paper_point(model_point) ⇒ Geom::Point2d
The #model_to_paper_point method converts the
::Geom::Point3din theSketchUpModelto a::Geom::Point2din paper space. -
#output_entities ⇒ Layout::Entity
The #output_entities method returns the
Groupthat represents theSketchUpModelin its exported form. -
#render
The #render method renders the
SketchUpModel. -
#reset_camera
The #reset_camera method resets the
SketchUpModel‘s camera to the scene’s setting. -
#reset_effects
The #reset_effects method resets the
SketchUpModel‘s shadow and fog settings to the scene’s settings. -
#reset_layers
The #reset_layers method resets the
SketchUpModel‘s layers to the scene’s setting. -
#reset_style
The #reset_style method resets the
SketchUpModel‘s style to the scene’s setting. -
#scenes ⇒ Array<String>
The #scenes method returns an array of scene names that are available for the
SketchUpModel.
Entity - Inherited
| #== | The |
| #bounds | The |
| #document | |
| #drawing_bounds | The |
| #group | |
| #layer_instance | The |
| #move_to_group | |
| #move_to_layer | |
| #page | |
| #transform! | The |
| #transformation | The |
Constructor Details
.new(path, bounds) ⇒ SketchUpModel
The #initialize method creates a new SketchUpModel.
Instance Attribute Details
#camera_modified? ⇒ Boolean (readonly)
The #camera_modified? method returns whether the camera of the SketchUpModel has been modified.
#clip_mask ⇒ Layout::Entity (rw)
#clip_mask=(clip_mask) (rw)
#current_scene ⇒ Integer (rw)
The #current_scene method returns the index of the most recently selected scene of the SketchUpModel.
#current_scene=(index) (rw)
LayOut automatically adds the scene “Last Saved SketchUp View” to each SketchUpModel. This means that the ::Sketchup::Model‘s scenes start with index 1.
The #current_scene= method sets the scene of the SketchUpModel.
#current_scene_modified? ⇒ Boolean (readonly)
The #current_scene_modified? method returns whether the most recently selected scene of the SketchUpModel has been modified.
#dash_scale ⇒ Float (rw)
The #dash_scale method returns the dash scale for the SketchUpModel. A scale value of 0.0 means the dashes are scaled based on the line weight.
#dash_scale=(dash_scale) (rw)
The #dash_scale= method sets the dash scale for the SketchUpModel. A scale value of 0.0 or lower will “auto” scale the dashes based on the line weight.
#display_background=(display) (rw)
The #display_background= method sets whether the background is displayed for the SketchUpModel.
#display_background? ⇒ Boolean (rw)
The #display_background? method returns whether the background is displayed for the SketchUpModel.
#effects_modified? ⇒ Boolean (readonly)
The #effects_modified? method returns whether the shadow or fog settings of the SketchUpModel have been modified.
#layers_modified? ⇒ Boolean (readonly)
In SketchUp 2020, SketchUp “layers” were renamed to “tags”. For consistency with the SketchUp API, this will continue to refer to “tags” as “layers”.
The #layers_modified? method returns whether the layers of the SketchUpModel has been modified.
#line_weight ⇒ Float (rw)
The #line_weight method returns the line weight for the SketchUpModel.
#line_weight=(line_weight) (rw)
The #line_weight= method sets the line weight for the SketchUpModel. Line weight must be at least 0.01.
#perspective=(perspective) (rw)
The #perspective= method sets whether the SketchUpModel‘s view is perspective or orthographic.
#perspective? ⇒ Boolean (rw)
The #perspective? method returns whether the SketchUpModel‘s view is perspective or orthographic.
#preserve_scale_on_resize=(preserve_scale) (rw)
The #preserve_scale_on_resize= method sets whether the scale is preserved when the SketchUpModel is resized.
#preserve_scale_on_resize? ⇒ Boolean (rw)
The #preserve_scale_on_resize? method returns whether the scale is preserved when the SketchUpModel is resized.
#render_mode ⇒ Integer (rw)
The #render_mode method returns the render mode of the SketchUpModel.
The render mode can be one of the following:
Layout::SketchUpModel::RASTER_RENDERLayout::SketchUpModel::HYBRID_RENDERLayout::SketchUpModel::VECTOR_RENDER
#render_mode=(render_mode) (rw)
The #render_mode= method sets the render mode of the SketchUpModel.
The render mode can be one of the following:
Layout::SketchUpModel::RASTER_RENDERLayout::SketchUpModel::HYBRID_RENDERLayout::SketchUpModel::VECTOR_RENDER
#render_needed? ⇒ Boolean (readonly)
The #render_needed? method returns whether the SketchUpModel needs to be rendered.
#scale ⇒ Float (rw)
The #scale method returns the scale of the SketchUpModel.
#scale=(scale) (rw)
The #scale= method sets the scale of the SketchUpModel. Scale must be at least 0.0000001, and the view must be orthographic.
#style_modified? ⇒ Boolean (readonly)
The #style_modified? method returns whether the style of the SketchUpModel has been modified.
#view ⇒ Integer (rw)
The #view method returns the standard view of the SketchUpModel.
The standard view can be one of the following values:
Layout::SketchUpModel::CUSTOM_VIEWLayout::SketchUpModel::TOP_VIEWLayout::SketchUpModel::TOP_RELATIVE_VIEWLayout::SketchUpModel::BOTTOM_VIEWLayout::SketchUpModel::BOTTOM_RELATIVE_VIEWLayout::SketchUpModel::FRONT_VIEWLayout::SketchUpModel::BACK_VIEWLayout::SketchUpModel::LEFT_VIEWLayout::SketchUpModel::RIGHT_VIEWLayout::SketchUpModel::ISO_VIEW
#view=(view) (rw)
The #view= method sets the standard view of the SketchUpModel.
The standard view can be one of the following values:
Layout::SketchUpModel::TOP_VIEWLayout::SketchUpModel::TOP_RELATIVE_VIEWLayout::SketchUpModel::BOTTOM_VIEWLayout::SketchUpModel::BOTTOM_RELATIVE_VIEWLayout::SketchUpModel::FRONT_VIEWLayout::SketchUpModel::BACK_VIEWLayout::SketchUpModel::LEFT_VIEWLayout::SketchUpModel::RIGHT_VIEWLayout::SketchUpModel::ISO_VIEW
Instance Method Details
#entities ⇒ Layout::Entity
#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.
#output_entities ⇒ Layout::Entity
The #output_entities method returns the Group that represents the SketchUpModel in its exported form. The Group will contain a Image for raster and hybrid-rendered models, and will contain a Group of LayOut entities for vector and hybrid-rendered models. This takes into account the output resolution set in the document’s PageInfo, and the render mode override set on the document.
#render
#reset_camera
The #reset_camera method resets the SketchUpModel‘s camera to the scene’s setting.
#reset_effects
The #reset_effects method resets the SketchUpModel‘s shadow and fog settings to the scene’s settings.
#reset_layers
In SketchUp 2020, SketchUp “layers” were renamed to “tags”. For consistency with the SketchUp API, this will continue to refer to “tags” as “layers”.
The #reset_layers method resets the SketchUpModel‘s layers to the scene’s setting.
#reset_style
The #reset_style method resets the SketchUpModel‘s style to the scene’s setting.
#scenes ⇒ Array<String>
The #scenes method returns an array of scene names that are available for the SketchUpModel. The first scene will always be the default scene, called “Last saved SketchUp View”.