SchemeExt:Edge:shortest
From DocR21
Contents |
Action
Finds the shortest edge from given list of entities.
Filename
scm/scmext/covr/wire_heal_scm.cpp
APIs
Syntax
(edge:shortest entity-list)
Argument Types
| Argument | Scheme Data Type |
|---|---|
| entity-list | entity | (entity ...) |
Returns
edge | (edge ...)
Description
This extension creates a list of edges that is a union of the edges belonging to the input entities and then finds the shortest edge. The shortest edge is returned and its length is printed out.
Arguments
- entity-list specifies a single entity or list of entities whose edges are to be considered.
Example
(part:clear) (define body1 (solid:block (position 0 0 0) (position 10 15 20))) (define c1 (solid:cylinder (position 0 0 -1) (position 5 7 21) 2)) (bool:subtract body1 c1) (define shortest (edge:shortest body1)) ;shortest edge: 3.879122 (entity:set-color shortest RED)

