Class: Sketchup::Group
- Inherits:
-
Drawingelement
- Object
- Entity
- Drawingelement
- Sketchup::Group
- Defined in:
- lib/sketchup-api-stubs/stubs/Sketchup/Group.rb
Overview
A Group class contains methods for manipulating groups of entities.
Groups in SketchUp are very similar to components, but can from a user point of view be thought of as unique objects. Groups can be instanced when copied but are silently made unique when edited through the GUI. To honor this behavior, make sure to call #make_unique before modifying a group through the API.
Instance Method Summary collapse
-
#add_observer(observer) ⇒ Boolean
The add_observer method is used to add a ComponentInstance observer to the group.
-
#copy ⇒ Sketchup::Group
The copy method is used to create a new Group object that is a copy of the group.
-
#definition ⇒ Sketchup::ComponentDefinition
The definition method is used to retrieve the component definition for this group.
-
#description ⇒ String
The description method is used to retrieve the description for the group.
-
#description=(description) ⇒ String
The description= method is used to set the description for the group.
-
#entities ⇒ Sketchup::Entities
The entities method is used to retrieve a collection of entities in the group.
-
#equals?(group) ⇒ Boolean
The equals? method is used to determine if a group is geometrically equivalent to another group.
-
#explode ⇒ Array<Sketchup::Drawingelement>
The explode method is used to explode the group into individual entities.
-
#glued_to ⇒ Sketchup::Face, ...
The #glued_to method is used to retrieve the entity that this group is glued to.
-
#glued_to=(drawing_element) ⇒ Sketchup::Face, ...
The #glued_to= method glues this group to a drawing element.
-
#guid ⇒ String
The guid method is used to get the base 64 encoded unique id for this SketchUp object.
-
#intersect(group) ⇒ Sketchup::Group?
The intersect method is used to compute the boolean intersection of two groups representing manifold solid volumes (this & arg).
-
#local_bounds ⇒ Geom::BoundingBox
deprecated
Deprecated.
In favor of ‘group.definition.bounds`.
-
#locked=(lock) ⇒ Boolean
The locked= method is used to lock a group.
-
#locked? ⇒ Boolean
The locked? method is used to determine if a group is locked.
-
#make_unique ⇒ Sketchup::Group
The #make_unique method is used to force a group to have a unique definition.
-
#manifold? ⇒ Boolean
The manifold? method is used to determine if a group is manifold.
-
#move!(transformation) ⇒ Sketchup::Group
The #move! method is used to set the transformation of this group instance, similarly to #transformation= but without recording to the undo stack.
-
#name ⇒ String
The name method is used to retrieve the name of the group.
-
#name=(name) ⇒ String
The name= method is used to set the description for the group.
-
#outer_shell(group) ⇒ Sketchup::Group?
The outer_shell method is used to compute the outer shell of the two groups representing manifold solid volumes (this || arg).
-
#remove_observer(observer) ⇒ Boolean
The remove_observer method is used to remove a ComponentInstance observer from the group.
-
#show_differences(group, verbose) ⇒ Boolean
The show_differences method is used to determine if a group is geometrically equivalent to another group and in addition move the non- matching and matching geometry to new layers.
-
#split(group) ⇒ Array(Sketchup::Group, Sketchup::Group, Sketchup::Group)?
The split method is used to compute the boolean split (map overlay) of the two groups representing manifold solid volumes (this ^ arg).
-
#subtract(group) ⇒ Sketchup::Group?
The subtract method is used to compute the boolean difference of the two groups representing manifold solid volumes (this - arg).
-
#to_component ⇒ Sketchup::ComponentInstance
The to_component method is used to convert the group to a component instance.
-
#transform!(transform) ⇒ Sketchup::Group
The transform! method is used to apply a transformation to a group.
-
#transformation ⇒ Geom::Transformation
The transformation method is used to retrieve the transformation for the group.
-
#transformation=(transformation) ⇒ Object
The #transformation= method is used to set the transformation of this group.
-
#trim(group) ⇒ Sketchup::Group?
The trim method is used to compute the (non-destructive) boolean difference of the two groups representing manifold solid volumes (this - arg).
-
#union(group) ⇒ Sketchup::Group?
The union method is used to compute the boolean union of the two groups representing manifold solid volumes (this | arg).
-
#volume ⇒ Float
The volume method is used to compute the volume of this group if and only if this group is manifold.
Methods inherited from Drawingelement
#bounds, #casts_shadows=, #casts_shadows?, #erase!, #hidden=, #hidden?, #layer, #layer=, #material, #material=, #receives_shadows=, #receives_shadows?, #visible=, #visible?
Methods inherited from Entity
#attribute_dictionaries, #attribute_dictionary, #delete_attribute, #deleted?, #entityID, #get_attribute, #inspect, #model, #parent, #persistent_id, #set_attribute, #to_s, #typename, #valid?
Instance Method Details
#add_observer(observer) ⇒ Boolean
The add_observer method is used to add a ComponentInstance observer to the group.
32 33 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 32 def add_observer(observer) end |
#copy ⇒ Sketchup::Group
The copy method is used to create a new Group object that is a copy of the group.
47 48 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 47 def copy end |
#definition ⇒ Sketchup::ComponentDefinition
The definition method is used to retrieve the component definition for this group.
61 62 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 61 def definition end |
#description ⇒ String
The description method is used to retrieve the description for the group.
90 91 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 90 def description end |
#description=(description) ⇒ String
The description= method is used to set the description for the group.
128 129 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 128 def description=(description) end |
#entities ⇒ Sketchup::Entities
The entities method is used to retrieve a collection of entities in the group.
162 163 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 162 def entities end |
#equals?(group) ⇒ Boolean
The equals? method is used to determine if a group is geometrically equivalent to another group.
180 181 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 180 def equals?(group) end |
#explode ⇒ Array<Sketchup::Drawingelement>
The explode method is used to explode the group into individual entities.
201 202 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 201 def explode end |
#glued_to ⇒ Sketchup::Face, ...
The #glued_to method is used to retrieve the entity that this group is glued to.
219 220 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 219 def glued_to end |
#glued_to=(drawing_element) ⇒ Sketchup::Face, ...
The #glued_to= method glues this group to a drawing element. When moving this other drawing elment with the Move tool, the glued group moves with it.
252 253 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 252 def glued_to=(drawing_element) end |
#guid ⇒ String
The guid method is used to get the base 64 encoded unique id for this SketchUp object.
267 268 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 267 def guid end |
#intersect(group) ⇒ Sketchup::Group?
This method is not available in SketchUp Make.
The intersect method is used to compute the boolean intersection of two groups representing manifold solid volumes (this & arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
290 291 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 290 def intersect(group) end |
#local_bounds ⇒ Geom::BoundingBox
In favor of ‘group.definition.bounds`.
The #local_bounds method is used to retrieve the Geom::BoundingBox bounding the contents of a Sketchup::Group, in the group’s own internal coordinate system.
314 315 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 314 def local_bounds end |
#locked=(lock) ⇒ Boolean
The locked= method is used to lock a group.
330 331 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 330 def locked=(lock) end |
#locked? ⇒ Boolean
The locked? method is used to determine if a group is locked.
354 355 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 354 def locked? end |
#make_unique ⇒ Sketchup::Group
The #make_unique method is used to force a group to have a unique definition. If the group is already unique in the model, nothing happens.
Copying a group in SketchUp will create a group that shares the same definition. SketchUp implicitly makes group unique when edited from the GUI, and from a user point of view groups could be thought of as always being unique. To honor this behavior, call this method before editing a group through the API.
377 378 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 377 def make_unique end |
#manifold? ⇒ Boolean
The manifold? method is used to determine if a group is manifold.
392 393 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 392 def manifold? end |
#move!(transformation) ⇒ Sketchup::Group
Despite the name being similar to #transform!, this method closer corresponds to #transformation=.
The #move! method is used to set the transformation of this group instance, similarly to #transformation= but without recording to the undo stack.
This method is useful for moving entities inside of an animation or page transition.
434 435 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 434 def move!(transformation) end |
#name ⇒ String
The name method is used to retrieve the name of the group.
449 450 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 449 def name end |
#name=(name) ⇒ String
The name= method is used to set the description for the group.
467 468 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 467 def name=(name) end |
#outer_shell(group) ⇒ Sketchup::Group?
The outer_shell method is used to compute the outer shell of the two groups representing manifold solid volumes (this || arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
488 489 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 488 def outer_shell(group) end |
#remove_observer(observer) ⇒ Boolean
The remove_observer method is used to remove a ComponentInstance observer from the group.
508 509 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 508 def remove_observer(observer) end |
#show_differences(group, verbose) ⇒ Boolean
The show_differences method is used to determine if a group is geometrically equivalent to another group and in addition move the non- matching and matching geometry to new layers.
This method will move both groups to Layer0. Geometry that is the same in both groups will be moved to a new layer named group_name + “_same”. Geometry that is not the same will be moved to a layer named group_name + “_diff”.
If verbose is true, a list of all the geometry that is different from one group to the other is displayed texturally in the Ruby Console.
540 541 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 540 def show_differences(group, verbose) end |
#split(group) ⇒ Array(Sketchup::Group, Sketchup::Group, Sketchup::Group)?
This method is not available in SketchUp Make.
The split method is used to compute the boolean split (map overlay) of the two groups representing manifold solid volumes (this ^ arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
568 569 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 568 def split(group) end |
#subtract(group) ⇒ Sketchup::Group?
This method is not available in SketchUp Make.
The subtract method is used to compute the boolean difference of the two groups representing manifold solid volumes (this - arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
591 592 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 591 def subtract(group) end |
#to_component ⇒ Sketchup::ComponentInstance
The to_component method is used to convert the group to a component instance.
608 609 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 608 def to_component end |
#transform!(transform) ⇒ Sketchup::Group
The transform! method is used to apply a transformation to a group.
649 650 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 649 def transform!(transform) end |
#transformation ⇒ Geom::Transformation
The transformation method is used to retrieve the transformation for the group.
665 666 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 665 def transformation end |
#transformation=(transformation) ⇒ Object
The #transformation= method is used to set the transformation of this group
682 683 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 682 def transformation=(transformation) end |
#trim(group) ⇒ Sketchup::Group?
This method is not available in SketchUp Make.
The trim method is used to compute the (non-destructive) boolean difference of the two groups representing manifold solid volumes (this - arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
706 707 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 706 def trim(group) end |
#union(group) ⇒ Sketchup::Group?
This method is not available in SketchUp Make.
The union method is used to compute the boolean union of the two groups representing manifold solid volumes (this | arg). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
729 730 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 729 def union(group) end |
#volume ⇒ Float
The volume method is used to compute the volume of this group if and only if this group is manifold.
747 748 |
# File 'lib/sketchup-api-stubs/stubs/Sketchup/Group.rb', line 747 def volume end |