Structured Picture File Commands
Structured Picture File Commands
The command descriptions document the data items associated with each command. The order of the data items in the command description is the same as the order in the command record.
Some of the picture file commands are variable length. The first record of a command gives a length for each of the other records. The picture file command classes are:
Control Commands- Class 0
The control class commands describe the environment for the primitive and attribute commands. They do not generate any output.
Display Information (0,1)
The DISPLAY INFORMATION command indicates the type of display stored in the picture file.
Display Type**integer variable
=1 - Normal Display
=2 -Animated Display
Device Animation Type**integer variable
=1 -Image Plane Animation (Pan and Zoom)
=2 - Display List Animation (Segment)
Source Device Information (0,2)
The SOURCE DEVICE INFORMATION command describes the device for which the image was generated. (See the I-DEAS TCF file to match device class and code with an actual terminal name.)
Device Class**integer variable
Device Code**integer variable
An I-DEAS internal device class and code is used to determine if the playback device and the generating device match.
XDRC value** integer variable
Y DRC value**integer variable
DRC (Directed Raster Coordinates) are used to specify raster data.
X NDC value**real variable
Y NDC value**real variable
NDC (Normalized Device Coordinates) are used to specify vector, text, marker and arc data.
X,Y NDC corner**real array (2)
X,Y NDC corner**real array (2)
The graphics region is a subset of the total NDC area used to display graphics data. The rest of the screen area is used for menus, prompts and the header.
Drawing size X value **real variable
Drawing X size in meters. Value is 0 if no size is specified.
Drawing size Y value **real variable
Drawing Y size in meters. Value is 0 if no size is specified.
The drawing size is not always specified. The value may be 0 or it may be given. This instruction has 8 real values if the drawing size is given. It has only 6 real values if the drawing size is not given.
Application Information (0,3)
Any application program can store data in these records. Only the application which generates the data knows the contents of the data items. This record is used as a comment record and can appear anywhere in the file.
Variable
Viewport Definition (0,4)
The VIEWPORT DEFINITION command defines the viewports.
Viewport Number**integer variable
0 = header
1:4= graphic viewport 1 through 4
Background color number**integer variable
Background color RGB**real array (3)
Viewport minimum NDC corner**real array (2)
Viewport maximum NDC corner**real array (2)
The corner definitions indicate the screen area covered by the viewport.
Viewport radius in 2D world units**real variable
Viewport radius in 3D world units**real variable
The 3D viewport radius gives the model space distance from the viewport center to the nearest viewport edge in meters (the I-DEAS internal length unit). This factor is used to generate scale drawings for picture files created with parallel projection (perspective off).
The 2D viewport radius is provided by I-DEAS, but is not used by any existing I-DEAS application.
Set Graphics Context (0,5)
The SET_GRAPHICS_CONTEXT command sets the viewport context to use for all graphics until the next SET CONTEXT command. The graphics context is used to associate primitives with viewports.
Viewport Number**integer variable
-1 = Scratch Context; Graphics not associated with any
viewport.
0= Header Graphics
1:4= Viewport Graphics for viewport 1 through 4
The scratch context allows data to overlay all viewports and covers the entire screen.
Set Clip Port (0,6)
The SET_CLIP_PORT command sets the NDC clip boundaries for character box clipping. The picture file reader is responsible for clipping text and marker primitives to this boundary.
Minimum NDC clip port corner**real array (2)
Maximum NDC clip port corner**real array (2)
Defines the screen clip area for text primitives.
End of Picture File (0,7)
END_OF_PICTURE_FILE is the logical end of file marker. The physical end of file also terminates a picture file.
None
Graphic Primitive Commands - Class 1
The graphic primitive commands, modified by the attribute values, specify the image.
Polyline (1,1)
The POLYLINE command draws lines to connect the string of points. The number of points is implied by the number of real values in the command.
NDC (X, Y) coordinates for line endpoints** real array
Line Style
Line Color
Polymarker (1,2)
The POLYMARKER command draws the current marker symbol at each of the point locations.
NDC (X,Y) coordinates for markers**real array
Marker Symbol
Marker Size
Marker Color
Polygon (1,3)
The POLYGON command draws a polygon. The polygon may or may not be filled. The outline of the polygon can use the line or fill color.
Convex Flag**integer variable
= 0-Polygon may not be convex.
= 1 - Polygon is convex.
NDC (X,Y) coordinates for the polygon vertices**real array
Polygon Interior Style - Controls fill action
Polygon Exterior Style - Controls outline color and line type
Line Style
Fill Color
Line Color
Text Output (1,4)
The TEXT OUTPUT command allows you to output a text string. The picture file reader must do character clipping against the clip port.
NDC (X,Y) location for start of string**real array (2)
Specifies the NDC location for the lower left corner of the first character in the string.
(X,Y) Character offset**real array (2)
Amount to offset start of string from the NDC base location as a fraction of the character size.
Text string**character
Text Size
Text Precision
Character Gap
Character Path
Text Color
2-D Arc (1,5)
An arc is defined by a counter-clockwise swing from Theta1 to Theta2. Theta1 and Theta2 are defined in the conventional trigonometric system ( 0.0 = X axis, Pi/2 = Y axis, Pi = -X axis, 3Pi/2 = -Y axis )
The specified arc segment is clipped to the display area, but the center of the arc may be outside the display area.
NDC (X,Y) location of arc center**real array (2)
Radius of arc in NDC units**real variable
Theta1, arc start position in radians**real variable
Theta2, arc end position in radians**real variable
Line Style
Line Color
Drafting Text Primitive(1,6)
The DRAFTING TEXT PRIMITIVE command allows you to display a text string in Drafting. The picture file reader must do character clipping against the clip port.
Font Index (1-8)**integer variable
= 1-Simplex
=2 - Din
= 3 - Military
= 4 - Iso
= 5 - Lightline
= 6 - Iges 1001
= 7 - Century
= 8 - Iges 1002
Proportional Flag**integer variable
= 0 -no proportional spacing used
= 1 - use proportional spacing
Character Slant**real variable
Angle in degrees to which the individual character is slanted.
Text Angle**real variable
Angle in degrees to which the character string is slanted.
NDC (X,Y) location for start of string**real array(2)
Specifies the NDC location for the lower left corner of the first
character in the string.
Text string**character
Text Size
Text Color
Character Gap
Special characters are preceded by an '@' symbol and get mapped to ASCII locations 129-256 by adding 128 to the ASCII value.
See Also
- Using Special Symbols in the Drafting User's Guide
For example, @A (ASCII of A is 65) + 128 = 173 173 corresponds to A (with an accent)
This does not apply to the two IGES fonts. Using IGES fonts, an @A maps into an @A.
Graphical Attribute Commands - Class 2
The attributes control the display of the graphic primitives. These commands do not generate any output.
Set Attributes to Default (2,1)
This sets all graphic attributes to their default value. The default values are listed below.
None
Text Size (2,2)
The requested character size is what the application asked for. The actual character size is what was displayed on the screen.
Requested character width in NDC units**real variable
Requested character height in NDC units**real variable
Actual character width in NDC units**real variable
Actual character height in NDC units**real variable
Text Precision (2,3)
The TEXT PRECISION command controls rendering of text primitives. The character gap and path attributes are only used if the text precision is set to character or stroke precision.
Text rendering precision**integer variable
= 1 - String
= 2 - Character
= 3 - Stroke (not supported)
Character Gap (2,4)
Amount of extra space to be added between characters of a string expressed as a fraction of character size. A value of 0.0 implies standard spacing. Controls rendering of text primitives.
Gap factor as fraction of character size**real variable
Character Path (2,5)
Characters are always displayed in an upright position. This attribute controls the direction in which strings are expanded.
Character path**integer variable
= 1 - Right
= 2 - Down
= 3 - Left
= 4 - Up
Linestyle (2,6)
The LINESTYLE command controls the rendering of polyline, polygon, and arc primitives.
Linestyle**integer variable
= 1 - Solid lines
= 2 - Dashed lines
=3-Dotted lines
=4-Dash-Dotted lines
=5-Center lines
=6-Phantom lines
Lineweight (2,15)
The LINEWEIGHT command controls the rendering of polyline, polygon, and arc primitives.
Linestyle**real variable
= 1.0 - nominal line weight
Marker Symbol (2,7)
The MARKER SYMBOL command sets the marker symbol used by the polymarker primitive.
Marker symbol**integer variable
1 = point
2 = plus
3=asterisk*
4=circle
5=cross
6=triangle
7=inverted triangle
8=square
9=diamond
10-31=point
32-127=centered ASCII character
Marker Size (2,8)
The MARKER SIZE command multiplies the size for markers generated by the polymarker primitive. A marker size of 1 gives the nominal marker size. A good average for the nominal marker size is 0.015 NDC units.
Marker Size**integer variable
Multiplier of the nominal marker size.
Interior Style (2,9)
The INTERIOR STYLE command controls rendering of the polygon primitive.
Interior Style**integer variable
= 0 - Hollow, draw only polygon boundary
= 1 - Solid, fill the interior with the fill color
Exterior Style (2,10)
The EXTERIOR STYLE command controls rendering of the polygon primitive.
Exterior Style**integer variable
= 0 - Solid outline with the fill color
= 1 - Outline with the line color, use Linestyle
Attribute to control Solid/Dashed
Line Color (2,11)
The LINE COLOR command controls rendering of polylines, arcs, and polygons.
Line color application index**integer variable
Line color RGB value**real array (3)
Fill Color (2,12)
The FILL COLOR command controls rendering of polygons.
Fill color application index.**integer variable
Fill color RGB value**real array (3)
Marker Color (2,13)
The MARKER COLOR command controls rendering of the polymarker primitive.
Marker color application index**integer variable
Marker color RGB value**real array (3)
Text Color (2,14)
The TEXT COLOR command controls rendering of text primitives.
Text color application index.**integer variable
Text color RGB value**real array (3)
Raster Data - Class 3
The commands in this class are used to define raster data. Raster data is generated for shaded image displays. Raster data for a viewport must be specified in descending Y DRC order.
I-DEAS always follows this rule, generating data from top to bottom of each viewport.
Set Patterning Level (3,1)
This is an I-DEAS internal value that specifies the amount of patterning (dithering) used for shaded images.
Patterning order**integer variable
= 0 - No patterning
= 1 - Order 3
= 2 - Order 5
= 3- Order 9
= 4 - Order 64
Dithering is a method of simulating a wide range of colors by mixing a small set of colors into patterns.
Picture file raster data is not dithered. This command specifies the amount of dithering to use when the image is displayed on the graphics screen. The routine in the following list shows a dithering algorithm that can be used.
C SUBROUTINE DITHER (IXDEV,IYDEV,NDRC,IRGB) C DITHER-DEVICE DRIVER UTILITY - MAP RGB TO DEVICE C COLORS C DITHER-23-MAY-1992 SDRC/userC C ****************************************************** C ***** COPYRIGHT (C) 1992 ***** C ***** BY STRUCTURAL DYNAMICS RESEARCH CORP. ***** C ***** ALL RIGHTS RESERVED ***** C ****************************************************** C C DESCRIPTION C C CONVERT THE INPUT NORMALIZED RED, GREEN, BLUE C INTENSITIES TO DEVICE R,G,B INTENSITIES. PATTERN BASED C ON THE CURRENT PATTERNING ORDER AND COLOR MODE (COLOR OR C GRAYSCALE). C C ACCESS C C CALL DITHER ( IXDEV, IYDEV, NDRC, IRGB ) C C INPUT VARIABLES C C IXDEV INTEGER VARIABLE C X DIRECTED RASTER (DRC) POSITION OF FIRST PIXEL. C OBTAINED FROM PICTURE FILE COMMAND: C RASTER DATA (3, 3) -- X DRC FOR START OF C LINE. C C IYDEV INTEGER VARIABLE C Y DIRECTED RASTER (DRC) POSITION OF FIRST PIXEL. C OBTAINED FROM PICTURE FILE COMMAND: C BEGIN RASTER LINE (3, 2) -- Y DRC OF RASTER C LINE. C C NDRC INTEGER VARIABLE C NUMBER OF DRC PIXELS TO PROCESS C OBTAINED FROM PICTURE FILE COMMAND: C RASTER DATA (3, 3) -- NUMBER OF PIXELS IN C LINE. C C IRGB INTEGER ARRAY [3,*] C INPUT PIXEL ARRAY OF RGB VALUES. C EACH RED, GREEN, BLUE PERCENTAGE IS NORMALIZED C TO AN INTEGER BETWEEN 0 AND 255. C OBTAINED FROM PICTURE FILE RECORD FOLLOWING C COMMAND: RASTER DATA (3, 3) C C OUTPUT VARIABLES C C IRGB INTEGER ARRAY [3,*] C OUTPUT ARRAY OF DEVICE COLOR VALUES. C C FOR COLOR MODE, EACH RED, GREEN, BLUE C VALUE IS BETWEEN 0 AND MR, MG, AND MB C RESPECTIVELY.FOR GRAY SCALE MODE, THE GRAYSCALE C INTENSITY IS RETURNED IN THE RED ENTRY, AND IS C BETWEEN 0 AND MI. C C HISTORY C C NONE C C EXTERNAL REFERENCES C C NONE C C VARIABLE DESCRIPTIONS C C LOCAL VARIABLES C C IDOFF DITHERING OFFSET FOR THE CURRENT Y SCANLINE. C INDEX INDEX INTO PATTERNING TABLE FOR THE CURRENT C PIXEL. C IXSTRT X OFFSET IN TO DITHER TABLE FOR CURRENT RASTER C RUN. C RMAST PATTERNING THRESHOLD VALUE TABLE. C RTEST PATTERN THRESHOLD VALUE FOR THE CURRENT PIXEL. C C GLOBALS ACCESSED C C IDCMOD CURRENT DEVICE COLOR MODE. C 0 = COLOR DEVICE ; 1 = GRAY SCALE DEVICE C IPORD PATTERNING ORDER. C OBTAINED FROM PICTURE FILE COMMAND: C SET PATTERNING LEVEL (3,1). C MB * MAXIMUM BLUE INTENSITY FOR DEVICE. C MG * MAXIMUM GREEN INTENSITY FOR DEVICE. C MI * MAXIMUM GRAY INTENSITY WHEN GRAY SCALE COLOR C TABLE IS LOADED IN THE DEVICE. C MR * MAXIMUM RED INTENSITY FOR DEVICE. C C **** MB, MG, MI AND MR ARE DEPENDENT ON THE C NUMBER OF COLOR PLANES IN THE DEVICE: C C PLANES COLORS MR MG MG MI C ------ ------ -- -- -- -- C 3 8 1 1 1 7 C 4 16 1 3 1 15 C 6 64 3 3 3 63 C 7 128 3 7 3 127 C 8 256 7 7 3 255 C C----------------------------------------------------------------- C IMPLICIT NONE VAX C C CALL ARGUMENTS INTEGER IXDEV,IYDEV,NDRC INTEGER IRGB(3,*) C C LOCAL VARIABLES INTEGER I,IDOFF,IXSTRT,INDEX,RTEST INTEGER RMAST(320),GRYINT C C DATA C C DITHER TABLES: C C IN ORDER TO ROUND TO NEAREST PATTERN QUICKLY, THE C TEST VALUES FOR EACH PATTERN HAVE BEEN NORMALIZED. C NEW = 1.0 - ((2 * ORIGINAL - 1) / (2 * ORDER)) C -------------------------------------------------------- C ORDER=1 (NO PATTERNING) C DATA ( RMAST(I), I = 1 , 64 ) / 64 * 128 / C C REGULAR PATTERN FOR ORDER = 3 (I.E. 27 COLORS) C IMPERCEPTIBLE PATTERNING (RECOMMENDED) C DATA ( RMAST(I), I = 65, 128 ) / $ 212, 43, 212, 43, 212, 43, 212, 43, $ 43, 128, 43, 128, 43, 128, 43, 128, $ 212, 43, 212, 43, 212, 43, 212, 43, $ 43, 128, 43, 128, 43, 128, 43, 128, $ 212, 43, 212, 43, 212, 43, 212, 43, $ 43, 128, 43, 128, 43, 128, 43, 128, $ 212, 43, 212, 43, 212, 43, 212, 43, $ 43, 128, 43, 128, 43, 128, 43, 128 / C C -------------------------------------------------------- C REGULAR PATTERN FOR ORDER = 5 (125 COLORS) C SLIGHT PATTERNING (RECOMMENDED; USED BY TEKTRONIX) C DATA ( RMAST(I), I = 129, 192 ) / $ 230, 77, 179, 77, 230, 77, 179, 77, $ 26, 128, 26, 128, 26, 128, 26, 128, $ 77, 179, 77, 230, 77, 179, 77, 230, $ 128, 26, 128, 26, 128, 26, 128, 26, $ 230, 77, 179, 77, 230, 77, 179, 77, $ 26, 128, 26, 128, 26, 128, 26, 128, $ 77, 179, 77, 230, 77, 179, 77, 230, $ 128, 26, 128, 26, 128, 26, 128, 26 / C C -------------------------------------------------------- C REGULAR PATTERN FOR ORDER = 9 (I.E. 729 COLORS) C ACCEPTABLE PATTERNING (RECOMMENDED) C DATA ( RMAST(I), I = 193, 256 ) / $ 143, 16, 207, 80, 239, 48, 175, 112, $ 80, 239, 48, 175, 112, 143, 16, 207, $ 175, 112, 143, 16, 207, 80, 239, 48, $ 16, 207, 80, 239, 48, 175, 112, 143, $ 239, 48, 175, 112, 143, 16, 207, 80, $ 112, 143, 16, 207, 80, 239, 48, 175, $ 207, 80, 239, 48, 175, 112, 143, 16, $ 48, 175, 112, 143, 16, 207, 80, 239 / C C -------------------------------------------------------- C REGULAR PATTERN FOR ORDER = 64 (BAYER) C DATA ( RMAST(I), I = 257, 320 ) / $ 253, 126, 221, 94, 245, 118, 213, 86, $ 62, 189, 30, 157, 54, 181, 22, 149, $ 205, 78, 237, 110, 197, 70, 229, 102, $ 14, 141, 46, 173, 6, 133, 38, 165, $ 241, 114, 209, 82, 249, 122, 217, 90, $ 50, 177, 18, 145, 58, 185, 26, 153, $ 193, 66, 225, 98, 201, 74, 233, 106, $ 2, 129, 34, 161, 10, 137, 42, 169 / C C PROGRAM START C --------------------------------------------------------------- C C COMPUTE OFFSET TO THE START OF THIS ROW IN THE C DITHERING MATRIX. C IDOFF = ISHFT(IPORD,6) + ISHFT(IAND(IYDEV,7),3) + 1 IXSTRT = IXDEV - 1 C C LOOP PIXELS IN THIS RUN. C DO 23000 I = 1,NDRC C COMPUTE INDEX AND TEST VALUE FOR THIS X C INDEX = IDOFF + IAND(IXSTRT+I, 7) RTEST = RMAST(INDEX) C IF (IDCMOD .EQ. 0) THEN C COMPUTE DEVICE COLOR INTENSITY FROM NORMALIZED C RGB INTENSITY. C IRGB(1,I) = (IRGB(1,I) * MR + RTEST) / 255 IRGB(2,I) = (IRGB(2,I) * MG + RTEST) / 255 IRGB(3,I) = (IRGB(3,I) * MB + RTEST) / 255 ELSE C COMPUTE GRAYSCALE INTENSITY. USE B/W INTENSITY C CONVERSION. C GRYINT=NINT(0.30*IRGB(1,I)+0.59*IRGB(2,I)+0.11 *IRGB(3,I)) C C NOW DITHER THE COMPUTED GRAY SCALE INTENSITY. C IRGB(1,I) = (GRYINT * MI + RTEST) / 255 END IF C 23000 CONTINUE RETURN END
Begin Raster Line (3,2)
The BEGIN RASTER LINE command signals the start of information for a raster line.
Y DRC of the raster line**integer variable
Raster Data (3,3)
The RASTER DATA command specifies raster data for a scan line. There can be multiple raster data commands for a scan line. The data for a given scan line must be defined from left (low x) to right (high x).
This record is an exception to the normal picture file command format rules. The actual raster data is in the next file record. The number of pixels defines the length of the record.
X DRC for start of line**integer variable
Number of pixels in line**integer variable
End Raster Line (3,4)
The END RASTER LINE command signals the end of the current raster line. When displaying raster data, I-DEAS buffers raster data for each line until the end of line command.
None
Animation Commands- Class 4
The animation commands control animation.
Begin Animation (4,1)
The BEGIN ANIMATION command signals the start of animation data in the picture file.
Number of Frames**integer variable
Begin Frame (4,2)
The BEGIN FRAME command signals the start of an animation frame. The graphic region corners are included because they are needed when the source device does raster (pan and zoom) animation.
Frame Number**integer variable
Graphic Region Minimum NDC corner**real array (2)
Graphic Region Maximum NDC corner**real array (2)
Specifies the screen area within which the animation image for the current frame is drawn.
Fill Background (4,3)
The FILL BACKGROUND command defines viewport background colors during animation. Only used on devices which do "pan and zoom" animation.
Background color application index**integer variable
Background color RGB value**real array (3)
Fill area minimum NDC corner**real array (2)
Fill area maximum NDC corner**real array (2)
Specifies screen area to fill with the background color.
End Frame (4,4)
The END FRAME command signals the end of the currently open frame.
None
End Animation (4,5)
The END ANIMATION command signals the end of the animation and provides information to allow the animation to be displayed. Specifies the order in which frames are displayed to generate the animation.
Display Sequence Array**integer Array
Array of frame numbers which defines the animation. The length of the array is implied by the number of integer data items in the command.
Abort Animation (4,6)
The ABORT ANIMATION command signals irregular termination of the animation. It gives the picture file reader a chance to clean up and get out. This command is put in the picture file when the user aborts while building an animation.
None