|
Action:
|
Creates a wire body from a list of edges.
|
|
|
Filename:
|
cstr/cstr_scm/wire_scm.cxx
|
|
|
APIs:
|
api_pm_add_entity
|
|
|
Syntax:
|
(wire-body entity-list)
|
|
|
Arg Types:
|
entity-list
|
entity | (entity ... )
|
|
|
Returns:
|
wire-body
|
|
|
Description:
|
entity-list consists of a single
EDGE entity or list of
EDGE entities. Each entity in the
entity-list must be a curve. The curves must connect end to end and cannot self-intersect. A wire may be open or closed.
|
|
|
Example:
|
; wire-body
|
|
; Create a wire-body from a list of edges.
|
|
; Create edge 1.
|
|
(define edge1
|
|
|
(edge:circular (position 0 0 0) 25 0 180))
|
|
;; edge1
|
|
; Set the color for edge 1
|
|
(entity:set-color edge1 2)
|
|
;; ()
|
|
; Create edge 2.
|
|
(define edge2 (edge:circular
|
|
|
(position 0 0 0) 25 180 270))
|
|
;; edge2
|
|
; Set the color for edge 2
|
|
(entity:set-color edge2 3)
|
|
;; ()
|
|
; Create edge 3.
|
|
(define edge3 (edge:linear (position 0 0 0)
|
|
|
(position 25 0 0)))
|
|
;; edge3
|
|
; Set the color for edge 3
|
|
(entity:set-color edge3 4)
|
|
;; ()
|
|
; OUTPUT Original
|
|
|
(define wirebody (wire-body (list edge3
|
|
|
edge1 edge2)))
|
|
;; wirebody
|
|
; OUTPUT Result
|
|
|
|
|
|
Figure 3-12. wire-body
|