SchemeExt:Sheet:planar-edges
From DocR21
Contents |
Action
Creates a planar sheet body from a set of co-planar free edges.
Filename
scm/scmext/covr/covr_scm.cpp
APIs
api_cover_planar_edges, api_get_edges
Syntax
(sheet:planar-edges edge-list option)
Argument Types
| Argument | Scheme Data Type |
|---|---|
| edge-list | (edge ...) |
| option | string |
Returns
(body ...)
Description
This Scheme extension expects as input a list of co-planar edges. Edges that define the boundary of a sheet-body will be covered. As demonstrated in the example below, such a sheet-body can have multiple lumps. Any edges not becoming part of the sheet-body will be grouped into disjoint wire-bodies. The returned list contains all the bodies created, with the sheet-body (if there was one at all) being the first body in the list.
Arguments
- edge-list is a list of input edges.
- option string can be "N" or "n" which indicates nested (circuits). Set to #t for nested circuits (that is, multiple circuits).
Example
; sheet:planar-edges ; create topology to illustrate command. (define ellipse (edge:ellipse (position 5 5 0) (gvector 0 0 1) 4)) ;; ellipse (define points1 (wire-body:points (list (position 0 0 0) (position 18 0 0) (position 18 10 0) (position 0 10 0) (position 0 0 0)))) ;; points1 (define points2 (wire-body:points (list (position 4 2 0) (position 12 2 0) (position 12 8 0) (position 4 8 0) (position 4 2 0)))) ;; points2 (define ellipse2 (edge:ellipse (position 15 5 0) (gvector 0 0 1) 2)) ;; ellipse2 (define points3 (wire-body:points (list (position 24 2 0) (position 32 2 0) (position 32 8 0) (position 24 8 0) (position 24 2 0)))) ;; points3 (define ellipse3 (edge:ellipse (position 28 5 0) (gvector 0 0 1) 3.5)) ;; ellipse3 (define eds (edge:set-free (part:entities))) ;; eds (define sheet (sheet:planar-edges eds)) ;; sheet sheet ;; (#body 159 1) (length (entity:lumps sheet)) ;; 2

