phl:postscript-cv
List of: Scheme Extensions
Subjects: Image Output, Precise Hidden Line
Contents: Precise Hidden Line

Action: Prints a precise hidden line image to a PostScript file.

Filename: phl/phl_scm/phl_scm.cxx

Syntax: (phl:postscript-cv phl-data [filename=plotfile.ps]


[color=#f] [x-size=195.9mm y-size=259.4mm]


[view=active])

Arg Types: phl-data phl-data

filename string

color boolean

x-size real

y-size real

view view

Returns: string

Description: Prior to the image being written out to the file, the eye, target, and projection mode of the specified (or, active, if none is specified) view are (internally) changed by the system to agree with those of the view in the context of which phl-data was generated. This extension returns the filename.


phl-data specifies PHL data from phl:compute or phl:retrieve.


The optional filename specifies the filename where images are sent; the default filename is plotfile.ps.


The optional color is a logical flag (#t or #f) that indicates whether the color is to be sent to the file.


The optional x-size and y-size specify the dimensions, in millimeters, of a rectangle into which the printed image of the viewport is to fit as tightly as possible without distortion.


The optional view specifies the view to print.


filename plotfile.ps

color #f (black on white)

x-size 195.9mm (7.75 in)

y-size 259.4mm (10.25 in)

view active view

Example: ; phl:postscript-cv

; Compute an entity from it's original position.

; Create a block.

(define b (solid:block (position -10 -10 -10)


(position 10 10 10)))

;; b

; create a sphere.

(define s (solid:sphere (position 10 0 0) 7))

;; s

; unite block and sphere.

(define u (bool:unite b s))

;; u

; open dl window

(view:dl)

;; #[view 4194884]

; Change position of eye

(iso)

;; #[view 13042176]

; compute entity

(define p (phl:compute))

;; p

; change the view a bit

(view:set-eye (position 1000 -1500 1000))

;; #[position 204.124145231932 -408.248290463863 204.124145231932]

(phl:postscript-cv p)

;; "plotfile.ps"
PDF/PHL/02SC.PDF
HTM/DATA/PHL/PHL/02SC/0009.HTM