Class: Sketchup::Group
- Inherits:
-
Drawingelement
- Object
- Entity
- Drawingelement
- Sketchup::Group
Overview
A Group class contains methods for manipulating groups of entities.
Groups in SketchUp are very similar to Components, except that there is no instancing of groups. That means that you always will have one and only one of each of your groups. (In the actual implementation, SketchUp keeps track of groups as a special kind of Component that combines properties of definitions and instances, which is why you will see deprecated methods like Group.make_unique, and the class of observer you attach to Groups are ComponentInstance observers.)
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.
-
#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
The local_bounds method returns the BoundingBox object that defines the size of the group in an untransformed state.
-
#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!(transform) ⇒ Sketchup::Group
The move! method is used to apply a transformation to the group.
-
#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=(transform) ⇒ Geom::Transformation
The transformation= method is used to set the transformation for the 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.
↑ #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=(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.
↑ #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). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
↑ #local_bounds ⇒ Geom::BoundingBox
The local_bounds method returns the BoundingBox object that defines the size of the group in an untransformed state. Useful for determining the original width, height, and depth of a group regardless of its current position or scale. For components, you can get a similar result by checking my_instance.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.
Copying a group using the copy tool in SketchUp will create copies of the group that share a common definition until an instance is edited manually or this method is used. If multiple copies are made, all copies share a definition until all copies are edited manually, or all copies have this method used on them. This method ensures that the group uses a unique definition entry in the drawing database.
↑ #manifold? ⇒ Boolean
The manifold? method is used to determine if a group is manifold.
↑ #move!(transform) ⇒ Sketchup::Group
The move! method is used to apply a transformation to the group.
This method is the same as the transform! method except that it does not record the move in an undo operation. This method is useful for transparently moving things during an animation.
↑ #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.
↑ #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.
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.
↑ #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). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
↑ #subtract(group) ⇒ Sketchup::Group?
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.
↑ #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=(transform) ⇒ Geom::Transformation
The transformation= method is used to set the transformation for the 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). If the specified objects (this and arg) do not represent manifold volumes, this method fails.
↑ #union(group) ⇒ Sketchup::Group?
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.
↑ #volume ⇒ Float
The volume method is used to compute the volume of this group if and only if this group is manifold.