This command establishes a userunit coordinate system by mapping userdefined coordinate values onto the scaling points P1 and P2.
SC X_{MIN},X_{MAX},Y_{MIN},Y_{MAX} [,type[,left,bottom;]] or
SC X_{MIN},X_{FACTOR},Y_{MIN},Y_{FACTOR},type[;] or
SC [;]
Parameter  Format  Functional Range  Default 

XMIN,XMAX,  real  2^{30} to 2^{30}  1  no default 
YMIN,YMAX  real  2^{30} to 2^{30}  1  no default 
type  clamped integer  0, 1, or 2  0 
left  clamped real  0 to 100%  50% 
bottom  clamped real  0 to 100%  50% 
XFACTOR, YFACTOR  real  2^{30} to 2^{30}  1  no default 
There are three forms of scaling: anisotropic, isotropic, and pointfactor. The Type parameter tells the printer which form you are using. Refer to the following table.
Scaling Form  Type  Description 

Anisotropic  0  Establishes standard userunit scaling allowing different unit size on Xaxis and Yaxis. 
Isotropic  1  Establishes standard userunit scaling with same unit size on Xaxis and Yaxis. 
Point Factor  2  Establishes P1 userunit location and a specific ratio of plotter units to userunits. 
No Parameters  Turns off scaling; subsequent coordinates are in plotter units.
The following forms of scaling establish a userunit coordinate system by mapping userdefined coordinate values onto the scaling points P1 and P2. The type parameter selects between anisotropic (Type 0) and isotropic scaling (Type 1).
Scaling Form  Type  Syntax 

Anisotropic  0  SC X_{MIN} ,X_{MAX} ,Y_{MIN} ,Y_{MAX} [,type;] 
Isotropic  1  SC X_{MIN} ,X_{MAX} ,Y_{MIN} ,Y_{MAX} [,type[,left,bottom];] 
X_{MIN}, X_{MAX}, Y_{MIN}, Y_{MAX}  These parameters represent the userunit X and Yaxis ranges, respectively. For example, SC0,15,0,10 indicates 15 userunits along the Xaxis and 10 userunits along the Yaxis. As a result, the first and third parameters (X_{MIN} and Y_{MIN}) are the coordinate pair that is mapped onto P1; the second and fourth parameters (X_{MAX} and Y_{MAX}) are the coordinate pair mapped onto P2. Using the same example, the coordinate location of P1 is (0,0) and P2 is (15,10). This is dierent from the IP command, where the parameters are expressed as X,Y coordinate pairs rather than as ranges.
Note X_{MIN} cannot be set equal to X_{MAX}, and Y_{MIN} cannot be set equal to Y_{MAX}.
As their names suggest, you will normally want to specify X_{MIN} smaller than X_{MAX}, and Y_{MIN} smaller than Y_{MAX}. If you specify X_{MIN} larger than X_{MAX} and Y_{MIN} larger than Y_{MAX}, your illustration is drawn as a mirrorimage, reversed and/or upside down, depending on the relative positions of P1 and P2.
The parameters of the SC command are always mapped onto the current P1 and P2 locations. P1 and P2 retain these new values until scaling is turned off or another SC command redefines the userunit values. Thus, the size of a user unit could change if any change is made in the relative position and distance between P1 and P2 after an SC command is executed.
Type  Specifies anisotropic or isotropic scaling.
0  Anisotropic scaling. Allows a userunit along the Xaxis to be a different size than userunits along the Yaxis. Printed shapes are distorted when you use anisotropic scaling. For example, a circle might be drawn as an ellipse ovalshaped instead of round. (Left and bottom parameters are ignored for anisotropic scaling.) 
1  Isotropic scaling. Produces userunits that are the same size on both the X and Yaxes. The following illustrations show how the printer adjusts the location of (X_{MIN},Y_{MIN}) and (X_{MAX},Y_{MAX}) to create the largest possible isotropic area within the P1/P2 limits. (Remember, the userunits are always square regardless of the shape of the isotropic area.) 
Left, Bottom  Positions the isotropic area in the P1/P2 limits. (These parameters are always specified together and are valid for isotropic scaling only.) The left parameter indicates the percentage of the unused space on the left of the isotropic area; the bottom parameter indicates the percentage of unused space below.
The defaults for the left and bottom parameters are each 50%. This centers the isotropic area on the page with the unused space equally divided between left and right or top and bottom, as shown in the previous illustrations.
Although you must specify both parameters, the printer applies only one: the left parameter applies when there is extra horizontal space; the bottom parameter applies when there is extra vertical space. The following examples illustrate left and bottom parameters of 0% and 100%.
The third form of scaling, pointfactor scaling, sets a specific ratio of plotter units to userunits, and establishes the userunits coordinate of P1.
Scaling Form  Type  Syntax 

Point Factor  2  SC X_{MIN} ,X_{FACTOR} ,Y_{MIN} ,Y_{FACTOR} ,type[;] 
X_{MIN},X_{FACTOR},Y_{MIN},Y_{FACTOR} Establish the userunit coordinates of P1 and the ratio of plotter to userunits. X_{MIN} and Y_{MIN} are the userunit coordinates of P1. X_{FACTOR} sets the number of plotter units per userunit on the Xaxis; Y_{FACTOR} sets the number of plotter units per userunit on the Yaxis.
Type  Must be 2 for this type of scaling.
An SC command remains in effect until another SC command is executed, or the printer is initialized or set to default conditions.
Examples: The following examples explain the effect of several parameter selections.
(SC0,40,0,40,2) allows scaling in millimeters since 1 millimeter = 40 plotter units. Each userunit is 1 millimeter.
(SC0,1.016,0,1.016,2) allows scaling in thousandths of an inch since 1 inch = 1016 plotter units.
While scaling is on (after any form of the SC command has been executed), only those HPGL/2 commands that can be issued in `current units' are interpreted as userunits; the commands that can be issued only in plotter units are still interpreted as plotter units. (The command syntax discussion pertaining to each command tells you which kind of units each parameter requires.)
The SC parameters are mapped onto the current locations of P1 and P2. P1 and P2 do not represent a graphic limit; therefore, the new userunit coordinate system extends across the entire range of the plotterunit coordinate system. Thus, you can print to a point beyond P1 or P2, as long as you are within the effective window. For example, you can print from the point (1,3.5) to the point (5.5,1.5) as shown in the following illustration.
Related Commands  Group 

IP, Input P1 and P2 IR, Input Relative P1 and P2 IW, Input Window 
The Configuration/Status Group 
Condition  Printer Response 

no parameters  turns scaling off 
more than 7 parameters  executes first 7 parameters 
for types 0 or 1: 6 parameters or less than 4 parameters  ignores command 
for type 2: any more or less than 5 parameters  ignores command 
X_{MIN}=X_{MAX} or Y_{MIN}=Y_{MAX} or number out of range  ignores command 
X_{FACTOR}=0 or Y_{FACTOR}=0  ignores command 
See also:
file: /Techref/language/hpgl/sc.htm, 11KB, , updated: 2017/4/10 14:19, local time: 2020/6/2 10:50,

©2020 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/language/hpgl/sc.htm"> HPGL SC Command</A> 
Did you find what you needed? 
PICList 2020 contributors:
o List host: MIT, Site host massmind.org, Top posters @20200602 RussellMc, Bob Blick, Jason White, Neil, David C Brown, Sean Breheny, James Cameron, madscientistatlarge, Allen Mulvey, Harold Hallikainen, * Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. ongoing support is MOST appreciated! * Contributors: Richard Seriani, Sr. 
Welcome to www.piclist.com! 
.