solid:block
List of: Scheme Extensions
Subjects: Model Object
Contents: Constructors

Action: Creates a solid block.

Filename: cstr/cstr_scm/sld_scm.cxx

APIs: api_solid_block

Syntax: (solid:block {{diagonal1 diagonal2 | (diagonal-x1


diagonal-y1 diagonal-z1 diagonal-x2 diagonal-y2


diagonal-z2)}})

Arg Types: diagonal1 position

diagonal2 position

diagonal-x1 real

diagonal-y1 real

diagonal-z1 real

diagonal-x2 real

diagonal-y2 real

diagonal-z2 real

Returns: entity

Description: The argument diagonal1 specifies the first diagonal corner. The argument diagonal2 specifies the second diagonal corner. As you can see, there are two syntax formats available for defining the positional arguments. The first (original) syntax format defines the diagonal positions by placing the positions in 'position' statements enclosed in parenthesis (as shown in the example below with creating block1). However, the second syntax format defines the diagonal positions without using the 'position' statement or the additional set of parenthesis (as shown in the example below with defining block2 and block3). The two formats are otherwise identical and accomplish the same. The format you choose must be used for both of the positional arguments.


The block is oriented with respect to the current WCS.


diagonal1 specifies the first diagonal corner.


diagonal2 specifies the second diagonal corner.


diagonal-x1, diagonal-y1, diagonal-z1 specifies the first positional arguments.


diagonal-x2, diagonal-y2, diagonal-z2 specifies the second positional arguments.

Example: ; solid:block

; Create first solid block.Use 'position' syntax

; format for defining the diagonals.

(define block1


(solid:block (position 0 0 0)


(position 20 20 20)))

;; block1

; Set the color of block1

(entity:set-color block1 2)

;; ()

; Create 2nd solid block. Use alternate position

; argument format.

(define block2


(solid:block 10 10 0 20 20 40))

;; block2

; Set the color of block2

(entity:set-color block2 3)

;; ()

; Create 3rd solid block. Use alternate position

; argument format.

(define block3


(solid:block 0 0 0 -30 -20 -5))

;; block3

; Set the color of block3

(entity:set-color block3 4)

;; ()

; OUTPUT Examples


Figure 3-1. solid:block
PDF/CSTR/03SCN.PDF
HTM/DATA/CSTR/CSTR/03SCN/0007.HTM