# Class: Sketchup::Loop

Inherits:
Entity
• Object
show all

## Overview

Loop is a low level topology class that will not need to be used often. A Loop is a chain of Edges that bound a Face.

Version:

• SketchUp 6.0

## Instance Method Summary #collapse

• Determine if the loop is convex.

• Get an array of the edges that define the loop in an ordered sequence.

• Get an array of the EdgeUse objects that define this loop in an ordered sequence.

• Get the Face object that is bounded by this loop.

• Determine if this is an outer loop.

• Get an array of the vertices that define the loop in an ordered sequence.

## Instance Method Details

### ↑ #convex? ⇒ Object

Determine if the loop is convex.

Examples:

``````entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
loop = face.outer_loop
if loop.convex?
puts "Loop is convex."
else
puts "Loop is not convex."
end``````

Returns:

• status - true if convex, false if not convex.

• (Boolean)

Version:

• SketchUp 6.0

### ↑ #edges ⇒ Object

Get an array of the edges that define the loop in an ordered sequence.

Examples:

``````entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
loop = face.outer_loop
edges = loop.edges``````

Returns:

• edges - an array of Edge objects if successful.

Version:

• SketchUp 6.0

### ↑ #edgeuses ⇒ Object

Get an array of the EdgeUse objects that define this loop in an ordered sequence.

Examples:

``````entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
loop = face.outer_loop
edgeuses = loop.edgeuses``````

Returns:

• edgeuses - an array of EdgeUse objects if successful.

Version:

• SketchUp 6.0

### ↑ #face ⇒ Object

Get the Face object that is bounded by this loop.

Examples:

``````entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
loop = face.outer_loop
loop_face = loop.face``````

Returns:

• face - a Face object if successful

Version:

• SketchUp 6.0

### ↑ #outer? ⇒ Object

Determine if this is an outer loop. Each face has one outer loop, and will have one loop for each hole.

Examples:

``````entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)
loop = face.outer_loop
if loop.outer?
puts "Loop is an outer loop."
else
puts "Loop is not an outer loop."
end``````

Returns:

• status - true if the loop is an outer loop, false if it is not an outer loop.

• (Boolean)

Version:

• SketchUp 6.0

### ↑ #vertices ⇒ Object

Get an array of the vertices that define the loop in an ordered sequence.

Examples:

``````entities = Sketchup.active_model.active_entities
points = []
points << Geom::Point3d.new(0, 0, 0)
points << Geom::Point3d.new(100, 0, 0)
points << Geom::Point3d.new(100, 200, 0)
points << Geom::Point3d.new(0, 200, 0)