Module: AMS::Group

Defined in:
Documentation/ams/group.rb

Overview

Since:

  • 3.3.0

Class Method Summary collapse

Class Method Details

.calc_centre_of_mass(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Geom::Point3d

Note:

This method only works with convex groups.

Note:

This function was revised in version 3.6.0.

Calculate group/component-instance centre of mass from faces.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


252
253
# File 'Documentation/ams/group.rb', line 252

def calc_centre_of_mass(object, recurse = true, transformation = nil, &entity_validation)
end

.copy(object, context, transformation = nil, recurse = true) {|sub_entity| ... } ⇒ Sketchup::Group, ...

Note:

This function was revised in version 3.6.0.

Note:

Make sure to wrap this function with a start/commit operation to avoid polluting the undo stack.

Note:

The original object is not modified in any way.

Note:

If a block is passed, copied object is made unique.

Note:

The main, copied group is assigned its original name, layer, material, visibility state, casts/receives shadows state; attributes are not copied.

Copy group/component-instance without including the undesired entities.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


279
280
# File 'Documentation/ams/group.rb', line 279

def copy(object, context, transformation = nil, recurse = true, &entity_validation)
end

.get_bounding_box_from_edges(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Geom::BoundingBox

Note:

This function was revised in version 3.6.0.

Compute group/component-instance axes-aligned bounding-box from edges.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.5.0


36
37
# File 'Documentation/ams/group.rb', line 36

def get_bounding_box_from_edges(object, recurse = true, transformation = nil, &entity_validation)
end

.get_bounding_box_from_faces(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Geom::BoundingBox

Note:

This function was revised in version 3.6.0.

Compute group/component-instance axes-aligned bounding-box from faces.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


55
56
# File 'Documentation/ams/group.rb', line 55

def get_bounding_box_from_faces(object, recurse = true, transformation = nil, &entity_validation)
end

.get_construction(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Geom::Point3d>

Note:

This function was revised in version 3.6.0.

Get group/component-instance construction point and line positions.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


173
174
# File 'Documentation/ams/group.rb', line 173

def get_construction(object, recurse = true, transformation = nil, &entity_validation)
end

.get_definition(object) ⇒ Sketchup::ComponentDefinition

Get group/component instance definition.

Since:

  • 3.3.0


9
10
# File 'Documentation/ams/group.rb', line 9

def get_definition(object)
end

.get_edges(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Array<Geom::Point3d>>

Note:

This function was revised in version 3.6.0.

Get group/component-instance edges.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


75
76
# File 'Documentation/ams/group.rb', line 75

def get_edges(object, recurse = true, transformation = nil, &entity_validation)
end

.get_entities(object) ⇒ Sketchup::Entities

Get group/component instance entities.

Since:

  • 3.3.0


16
17
# File 'Documentation/ams/group.rb', line 16

def get_entities(object)
end

.get_faces(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Array<Geom::Point3d>>

Note:

This function was revised in version 3.6.0.

Get group/component-instance faces.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


114
115
# File 'Documentation/ams/group.rb', line 114

def get_faces(object, recurse = true, transformation = nil, &entity_validation)
end

.get_polygons_from_faces(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Array<Geom::Point3d>>

Note:

This function was revised in version 3.6.0.

Get group/component-instance face triplets.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


193
194
# File 'Documentation/ams/group.rb', line 193

def get_polygons_from_faces(object, recurse = true, transformation = nil, &entity_validation)
end

.get_triangular_mesh(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Geom::PolygonMesh

Note:

This function was revised in version 3.6.0.

Get group/component-instance triangular mesh.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


212
213
# File 'Documentation/ams/group.rb', line 212

def get_triangular_mesh(object, recurse = true, transformation = nil, &entity_validation)
end

.get_triangular_meshes(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Geom::PolygonMesh>

Note:

This function was revised in version 3.6.0.

Get group/component-instance triangular mesh collections. Each sub-group, sub-component, a collection of connected faces is reserved its own mesh.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


232
233
# File 'Documentation/ams/group.rb', line 232

def get_triangular_meshes(object, recurse = true, transformation = nil, &entity_validation)
end

.get_vertices_from_edges(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Geom::Point3d>

Note:

This function was revised in version 3.6.0.

Get group/component-instance edge vertices.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


94
95
# File 'Documentation/ams/group.rb', line 94

def get_vertices_from_edges(object, recurse = true, transformation = nil, &entity_validation)
end

.get_vertices_from_faces(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Geom::Point3d>

Note:

This function was revised in version 3.6.0.

Get group/component-instance face vertices.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


133
134
# File 'Documentation/ams/group.rb', line 133

def get_vertices_from_faces(object, recurse = true, transformation = nil, &entity_validation)
end

.get_vertices_from_faces2(object, recurse = true, transformation = nil) {|sub_entity| ... } ⇒ Array<Array<Geom::Point3d>>

Note:

This function was revised in version 3.6.0.

Get group/component-instance face vertices collections.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.3.0


154
155
# File 'Documentation/ams/group.rb', line 154

def get_vertices_from_faces2(object, recurse = true, transformation = nil, &entity_validation)
end

.split(object, point, normal, context, transformation = nil, recurse = true) {|sub_entity| ... } ⇒ Array<Sketchup::Group, Sketchup::ComponentInstance, nil>

Note:

Make sure to wrap this function with a start/commit operation to avoid polluting the undo stack.

Note:

The original object is not modified in any way.

Note:

Copied groups are assigned their original name, layer, material, visibility state, casts/receives shadows state; attributes are not copied.

Split group/component-instance at plane.

Yields:

  • A procedure for determining whether a particular sub-group or a sub-component-instance is to be considered a part of the operation.

Yield Parameters:

  • sub_entity (Sketchup::Group, Sketchup::ComponentInstance)

Yield Returns:

  • (Boolean)

    Pass true to have sub_entity included in the operation; pass false to have sub_entity ignored.

Since:

  • 3.6.0


308
309
# File 'Documentation/ams/group.rb', line 308

def split(object, point, normal, context, transformation = nil, recurse = true, &entity_validation)
end