entity:copy-contents
List of: Scheme Extensions
Subjects: Physical Properties
Contents: Kernel

Action: Copies lower topology entities from a given entity.

Filename: kern/kern_scm/ent_scm.cxx

APIs: api_copy_entity_contents

Syntax: (entity:copy-contents entity [transform])

Arg Types: entity entity

transform transform

Returns: entity


entity specifies the entity that has to be copied.


transform is an optional argument that specifies the transformation to be applied to the copied entities.

Example: ; entity:copy-contents

; Create a block

(define block (solid:block (position 0 0 0)


(position 10 10 5)))

;; block

(define fa (car (entity:faces block)))

;; fa

; copy the face only

(define copy (entity:copy-contents fa))

;; copy

(entity:delete block)

;; ()

; there should be only a face left

(entity:check copy)

; checked:

;
0 lumps

;
0 shells

;
0 wires

;
1 faces

;
1 loops

;
4 coedges

;
4 edges

;
4 vertices

;; (#[entity 9 1])
PDF/KERN/12SCA.PDF
HTM/DATA/KERN/KERN/12SCA/0080.HTM