entity:copy
List of: Scheme Extensions
Subjects: Entity
Contents: Kernel

Action: Copies any entity (solid, face, edge, etc.) and all entities attached to it.

Filename: kern/kern_scm/ent_scm.cxx

APIs: api_pm_add_entity

Syntax: (entity:copy entity-list [part])

Arg Types: entity-list entity | (entity ... )

part part

Returns: entity | (entity ... )


entity-list comprises any entity or list of entities to be copied. If an entity is removed, use the view:refresh extension to display any remaining entities. If a single entity is specified, this extension returns a single entity, which is the copy. If an entity list is specified, this extension returns a list of entities.


part is an optional argument. If part is specified, then the copies are added to the part; otherwise, the copies are added to the same part that the original entity was in.

Example: ; entity:copy

; Create a block, making it entity 1.

(define block1


(solid:block (position 0 0 0)


(position 20 20 20)))

;; block1

; Copy the block, making it entity 2.

(define copy (entity:copy block1))

;; copy

; Copy both blocks, making them entities 4 and 5.

(entity:copy (list block1 copy))

;; (#[entity 4 1] #[entity 5 1])
PDF/KERN/12SCA.PDF
HTM/DATA/KERN/KERN/12SCA/0079.HTM