Action:
|
Creates a pattern entity data type composed of one pattern.
|
|
Filename:
|
kern/kern_scm/pattern_scm.cxx
|
|
APIs:
|
api_pattern_to_entity
|
|
Syntax:
|
(pattern:make-entity pat)
|
|
Arg Types:
|
pat
|
pattern
|
|
Returns:
|
pattern
|
|
Description:
|
Creates a pattern entity which can be saved and restored from a SAT file. The pattern does not have to be attached to model geometry.
|
|
|
pat specifies a pattern.
|
|
Example:
|
; pattern:make-entity
|
|
; make a pattern
|
|
(define normal (gvector 0 0 1))
|
|
;; normal
|
|
(define x-vec (gvector 2 0 0))
|
|
;; x-vec
|
|
(define num_x 6)
|
|
;; num_x
|
|
(define num_y 6)
|
|
;; num_y
|
|
(define pat (pattern:hex normal x-vec num_x num_y))
|
|
;; pat
|
|
; Make the associated APATTERN entity.
|
|
(define apat (pattern:make-entity pat))
|
|
;; apat
|
|
; Save myfile to a SAT file.
|
|
(part:save-selection apat "myfile.sat")
|
|
;; #t
|