loop:find
List of: Scheme Extensions
Subjects: Model Topology
Contents: Kernel

Action: Gets loops shared by two entities.

Filename: kern/kern_scm/loop_scm.cxx

Syntax: (loop:find entity1 entity2)

Arg Types: entity1 entity

entity2 entity

Returns: loop

Description: This extension returns #f if no loop is found that is shared by both entities.


entity1 specifies the first entity.


entity2 specifies the second entity.

Example: ; loop:find

; Create a solid block.

(define block1 (solid:block (position 20 30 0)


(position 0 0 40)))

;; block1

; Create a solid cylinder.

(define cyl1 (solid:cylinder (position 0 0 0)


(position -20 -20 -20) 15 3 (position -5 -5 0)))

;; cyl1

; Determine if any loops are shared.

(loop:find block1 cyl1)

;; #f

; Create an edge list.

(define list1 (entity:edges block1))

;; list1

(define one-edge (car list1))

;; one-edge

(define two-edge (car (cdr list1)))

;; two-edge

; Determine if any loops are shared.

(loop:find one-edge two-edge)

;; #[entity 16 1]
PDF/KERN/14SCI.PDF
HTM/DATA/KERN/KERN/14SCI/0031.HTM