INOCAD PLOTTER OPTIMIZER DOCUMENTATION Table of Contents Introduction . . . . . . . . . . . . . . . . Section 1 Functionality . . . . . . . . . . . . . . . . Section 2 Optimization . . . . . . . . . . . . . . . . Section 3 System Requirements . . . . . . . . . . . . . Section 4 POP for DOS Installation . . . . . . . . . . Section 5 POP for Windows Installation . . . . . . . . Section 6 Configurator . . . . . . . . . . . . . . . . Section 7 Parameters . . . . . . . . . . . . . . . . . Section 8 New Features and History of Fixes . . . . . . Section 9 Warranty . . . . . . . . . . . . . . . . . . Section 10 License . . . . . . . . . . . . . . . . . . . Section 11 How to Contact INOCAD . . . . . . . . . . . . Section 12 Ordering Information . . . . . . . . . . . . Section 13 Order Form . . . . . . . . . . . . . . . . . Section 14 1- Introduction ------------ The Plotter Optimizer, called "POP", has been created for people that have HPGL (Hewlett Packard Graphics Language) compatible pen plotters and are upset by the time it takes to draw a plot. Most CAD systems do not optimize pen motion. They typically send HPGL to your plotter or file in the order that the operator created the plot. For most CAD systems, optimizing pen motion would require a significant amount of processing time and RAM memory. This is why optimization is rarely implemented on CAD systems. POP takes an HPGL plot file and generates another set of HPGL commands that reproduce your original plot exactly, but make the pen-up displacement as short as possible. Optimizing pen-up displacement means that after a line is drawn, the next line to be drawn is the next closest line on the entire plot. The resulting optimized HPGL commands can be either saved in a file or sent directly to your plotter. The time required to draw an optimized HPGL plot is an average of 30% less than the time required for the original plot. It is up to you to decide if POP is a valuable tool for your CAD environment. Factors to consider are the size of your plot files, the speed of your plotter and the speed of your computer. 2- Functionality ------------- This version of POP works either in a DOS or Windows environment. The POP for DOS executable file is named POP.EXE and the POP for Windows executable file is named POPW.EXE. You can run POP for DOS either in the standard DOS environment, a Windows DOS box or from an OS/2 DOS box. POP for Windows runs as a standard Windows application. POP for DOS uses standard DOS memory and up to 4 Mb of EMS memory. POP for Windows uses up to 4 Mb of standard Windows memory. Since POP supports most HPGL commands, it works with HPGL plot files generated by almost any CAD system. We have yet to find a CAD system that generates an HPGL plot file incompatible with POP. On startup, POP looks for its configuration file, called POP.INI. If this file cannot be located in the current directory or through the PATH or POPPATH environment variable, POP will use its internal default parameters. These parameters define such things as the default extension for Input and Output files, the action POP will take if an error occurs, the communication port parameters and so on. For a full description of all POP parameters and their corresponding default values, refer to Section 8, "Parameters". To start POP for DOS use the POP command, which has the syntax: POP InputFile [OutputFile] To start POP for Windows use the POPW command, which has the syntax: POPW [-LA] [-LN] [InputFile] [OutputFile] The parameter 'InputFile' is mandatory only under DOS and indicates the name of the original HPGL file to be optimized. Under Windows this parameter is optional. If you do not specify the InputFile, a Windows dialog box will let you select the HPGL file to be optimized. The parameter 'OutputFIle' is optional. It indicates where the resulting optimized HPGL commands should be sent. They can be sent to a disk file or directly to a communication port connected to your plotter. If OutputFile is either COM1:, COM2:, COM3: or COM4:, the optimized HPGL commands will be sent directly to the specified communication port attached to your plotter. POP uses the communication port parameters defined in POP.INI (or its internal defaults) to communicate with your plotter. Refer to Section 8, "Parameters", for a full description of communication port parameters. If OutputFile specifies a full file name with an extension, the optimized HPGL commands will be sent to the specified file. If OutputFile specifies a file name without an extension, POP uses the POP.INI "OutputFileExtension" parameter to assign an extension to the file. The optimized HPGL commands will be sent to this file and extension name. If you do not specify OutputFile, POP uses the InputFile parameter and the POP.INI "OutputFileExtension" parameter to create the output file name. In this case, the "OutputFileExtension" parameter must not be blank, or the resulting output file name will be the same as the input file name. If this occurs, POP will stop, and display a message that the input file name cannot be the same as the output file name. Wildcard characters "*" and "?" are accepted for the InputFile and OutputFile specification. POP always checks that the input and output file names are different. It never destroys the original file. The optional -LA and -LN parameters of the POPW command instruct POP for Windows to keep looping while waiting for HPGL files. When the -LA option is specified, POP for Windows will wait for HPGL files that have their ARCHIVE bit set. If the -LN option is specified, it will wait for new HPGL files (created after POP was started) that have their ARCHIVE bit set. When either -LA or -LN is specified and one or more HPGL files match the looping criterion, optimization begins with the file having the earliest time/date stamp. The ARCHIVE bit of the HPGL file is reset if optimization terminates normally. If a problem occurs POP for Windows will terminate, leaving the ARCHIVE bit set to its original value. Note that the ARCHIVE bit of a file is always set by DOS or Windows every time a new file is created or updated. When POP starts, it puts as many lines as possible in its internal tables. POP starts generating HPGL commands as soon as the entire HPGL plot file has been entirely read, or as much has been read as can fit into the available memory. You can interrupt POP execution at any time by pressing the [CTRL] and [BREAK] keys simultaneously. When POP for DOS terminates, it displays a message indicating either a normal or abnormal termination. It also returns an error code: 0 for normal termination, or 1 for abnormal termination. This return code can be tested from a BATCH file or any application program used to start POP. You can then take special action in case of either normal or abnormal termination. When POP for Windows terminates, it displays a message indicating either a normal or abnormal termination. To let the user check if the optimization ran normally it asks the user to hit a key to terminate POP. It also returns an error code: 0 for normal termination, or 1 for abnormal termination. Because of the required user action it may be inconvenient to start POP for Windows from a Windows application. 3- Optimization ------------ POP uses the following techniques to obtain the best possible pen-up optimization of your plot. 1- After drawing any line, it looks for the next closest line in the entire plot. 2- Most lines can be drawn in their original direction or in reverse direction. 3- It tries to group all plot lines having the same pen color, in order to send them together. This reduces the number of time-consuming pen changes. 4- When creating the optimized plot file, POP reduces the size of most plot files by about 50%. It does this by using relative addressing instead of absolute addressing instructions. POP also removes unnecessary characters and redundant plotter parameter instructions, when possible. As a result, the HPGL commands sent to your plotter are "denser". This improves feeding on fast plotters or over a slow communication line. 5- It can optionally remove pen-up/down motion when the pen motion is so short that it is imperceptible. See the "DontRaisePenIfCloserThan" parameter in Section 8, "Parameters". 4- System Requirements ------------------- This version of POP works in either a DOS or Windows environment. You can run POP for DOS either in the standard DOS environment, from a Windows DOS box or from an OS/2 DOS box. POP for Windows runs as a standard Windows application. POP requires, at minimum, a 286 CPU based IBM PC or compatible, running DOS or Windows 3.1 or higher. For large plot files, we recommend a 486 CPU based IBM PC or compatible and some available EMS memory for POP for DOS. To get the best possible optimization, POP uses up to 4 Mb of memory. 5- POP for DOS Installation ------------------------ POP for DOS is distributed with the following files: - README POP quick introduction - POPDOC.TXT POP documentation - POPORDER.TXT POP registration form - POP.INI POP default configuration file - POP.EXE POP for DOS plotter optimizer - POPCFG.EXE POP for DOS configurator Any missing files constitutes an incomplete copy. Copy all POP files into your CAD system directory or into a separate directory. If you want to start POP for DOS from anywhere on your hard disk, you have to add the path where POP is installed to the PATH statement of your AUTOEXEC.BAT file. For example, assuming that you have installed POP into C:\POP, you should add "C:\POP" to the PATH statement. So if your PATH statement is SET PATH=C:\;C:\DOS you should modify it to read: SET PATH=C:\;C:\DOS;C:\POP For maximum optimization, POP for DOS uses up to 4 Mb of EMS memory. Make sure that your system EMS driver is installed. Your CONFIG.SYS file should include these statements: DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE 4096 If you modified either the AUTOEXEC.BAT or CONFIG.SYS file in the previous installation steps, you should reboot your PC at this point. Run POPCFG to set the POP configuration options to suit your needs. Refer to Section 8, "Parameters", for a description of the POP.INI parameters. It is possible to have multiple POP.INI configuration files for use with different CAD systems. Just copy the POP.INI configuration file into the directory of each CAD system required. Then go into each CAD system directory and run POPCFG to set the POP.INI parameters to suit your specific CAD system needs. You can then use POP from these different CAD system directories. POP can also be installed on a LAN drive. In this case, each user may need a different POP.INI file. To tell POP where to find the POP.INI file, the user must set an environment variable called POPPATH to the directory where the user POP.INI file is located. For example, if the user POP.INI file is located in C:\POP, the following line should be added to the AUTOEXEC.BAT file: SET POPPATH=C:\POP 6- POP for Windows Installation ---------------------------- POP for Windows is distributed with the following files: - README POP quick introduction - POPDOC.TXT POP documentation - POPORDER.TXT POP registration form - POP.INI POP default configuration file - POPW.EXE POP for Windows plotter optimizer - POPCFGW.EXE POP for Windows configurator Any missing files constitutes an incomplete copy. Copy all POP files into your CAD system directory or into a separate directory. To use POP for Windows, you will have to create a new Windows group called "Plotter Optimizer" using the Program Manager menus: File, New, Program Group. Once created, add the "POPW.EXE" and "POPCFGW.EXE" program files to the group using the File Manager menus : File, New, Program Item. Specify the working directory as the directory where POP will find your HPGL files. Once installed, you should see two icons in the newly created Windows group called "Plotter Optimizer". Refer to Section 2, "Functionality", for the POPW command line syntax. POP also needs to be able to locate its configuration file, called POP.INI. Set the PATH= or POPPATH= environment variable to point to the directory where POP has been installed. For example, assuming that you have installed POP into C:\POP, you should add "C:\POP" to the PATH or POPPATH statement of your AUTOEXEC.BAT file. So if your PATH statement is SET PATH=C:\;C:\DOS you should modify it to read: SET PATH=C:\;C:\DOS;C:\POP or you should add the statement: SET POPPATH=C:\POP If you modified the AUTOEXEC.BAT file in the previous installation steps, you should stop Windows and reboot your PC at this point. Run POPCFGW to set the POP configuration options to suit your needs. Refer to Section 8, "Parameters", for a description of the POP.INI parameters. POP can also be installed on a LAN drive. In this case, each user may need a different POP.INI file. To tell POP where to find the POP.INI file, the user must set an environment variable called POPPATH to the directory where the user POP.INI file is located. For example, if the user POP.INI file is located in C:\POP, the following line should be added to the AUTOEXEC.BAT file: SET POPPATH=C:\POP If your PC has 8 Mb of RAM memory or less and you configure POP for Windows to use 4 Mb of memory, POP for Windows may spend some time initializing this memory. If you experience this problem, configure POP for Windows to use less memory (2 MB, for example) using the POP for Windows configurator POPCFGW. 7-Configurator ------------ When POP starts, it looks for its configuration file, POP.INI. If it doesn't find it, POP will use its internal default parameters. See Section 8, "Parameters", for the internal default values. POPCFG is the POP for DOS configuration utility and POPCFGW is the POP for Windows configuration utility. When started the POP configuration utility displays the current values of the POP.INI parameters along with their meanings, and lets you modify them if you wish. Just run POPCFG or POPCFGW to set the POP.INI parameters. The POP configuration utility stores your choices in the POP.INI file. The configuration file, POP.INI, can be anywhere on your system as long as it is either in the current directory or in a directory listed in the PATH or POPPATH statement of your AUTOEXEC.BAT file. When looking for the POP.INI file, the POP configuration utility starts looking in the current directory. If it does not find it there, it will use the POPPATH environment variable, if one has been defined. If it still does not find the POP.INI file, it will try using the PATH environment variable. You can also edit the POP.INI file directly, using your favorite text editor. However, this is not recommended, since human error is possible. 8- Parameters ---------- Following is the description and syntax of the POP.INI file parameters. These parameters can be easily modified using the POP configuration utility (POPCFG or POPCFGW) or your favorite text editor. The POP.INI file is not case sensitive. You can use upper or lowercase letters, as you wish. Lines starting with a semicolon ';' are considered comments, and are not interpreted by POP. The configuration parameters are grouped under three sections: [GENERAL], [OPTIMIZATION] and [PLOTTERCOMMUNICATION]. If any parameters are missing or left blank, POP will use the specified default value. The [GENERAL] section includes the following parameters: Version = {POP version number} This parameter is only used to ensure compatibility of the POP.INI configuration file with future POP versions. DO NOT MODIFY THIS PARAMETER. OnErrorDo = [Prompt Abort CopyOriginal Continue] This parameter indicates what to do if a syntax error, unsupported HPGL command or any recoverable error occurs during the optimization process. The following actions can be specified: Prompt : (Default) POP will display the HPGL command that is in error and will ask if you want to continue or abort optimization. If you chose to abort processing, POP will terminate abnormally. Abort : POP will abort optimization, destroy the partially created Output File (if present) and will terminate abnormally. CopyOriginal : POP will copy the original Input File into the Output File, and will terminate normally. If you are sending the optimized file directly to your plotter, POP will automatically prompt you. Continue : POP will display the HPGL command that is in error and then continue optimization, skipping the HPGL command that caused the error. POP will continue processing the file and will terminate normally. InputFileExtension = {any file extension, up to 3 characters} This parameter specifies a default file extension for the Input File. You can leave this parameter blank (the default) if no default extension is to be assigned. When POP starts, it will check if the specified Input File name has an extension. If it does not, POP will append the default extension to the original Input File name. For example, if you specify InputFileExtension = HP, and you execute: POP MYFILE OUTFILE.OPT POP will interpret this as equivalent to: POP MYFILE.HP OUTFILE.OPT OutputFileExtension = {any file extension, up to 3 characters} This parameter specifies a default file extension for the optimized Output File. You can leave this parameter blank if no default extension is desired. When POP starts, it will check if the specified Output File name has an extension. If it does not, POP will append the default extension to the original Output File name. If you do not specify the Output File when you start POP, the Output File name will be the Input File name with the default Output File extension. For example, if you specify OutputFileExtension = OPT, and you execute: POP MYFILE.HP POP will interpret this as equivalent to: POP MYFILE.HP MYFILE.OPT The default value is POP. The [OPTIMIZATION] section includes the following parameters: MaximumMemoryUsageInKb = [0 ... 99999] Under DOS this parameter limits the extended memory (EMS) usage to the specified number of kilobytes. Under Windows this parameter limits the standard memory usage to the specified number of kilobytes. To select the default value, set it to 99999 (the default). In this case the current maximum capacity of POP will be used (4096 for the present release). DontRaisePenIfCloserThan = {positive decimal number, in millimeters} This parameter directs POP to not raise the pen if the next vector to draw is closer than the specified number of millimeters. This can eliminate a lot of unnecessary pen-up and pen-down motions on certain plots. Use this feature when you want a quick draft of your plot, or on a plot that does not require extreme precision. When this parameter is set to a non-zero number, the resulting optimized plot may not look exactly the same as the original. Note that on most HP plotters, the smallest possible pen movement is 0.025 millimeters and that standard pen size is about 0.3 millimeters. The default value is 0. The [PLOTTERCOMMUNICATION] section contains the information required by POP to send the optimized file directly to your plotter via a communication port. Set these parameters with special care if you intend to send the optimized data directly to your plotter. The [PLOTTERCOMMUNICATION] section includes the following parameters: Baud = [38400 19200 9600 4800 2400 1200 600 300] This parameter indicates the baud rate of your plotter. The specified baud rate must be the same as that of your plotter. The default value is 9600. Parity = [None Odd Even] This parameter indicates the type of parity bit sent to your plotter after the data bits. The specified parity must be the same as that of your plotter. The default value is Even. DataBits = [7 or 8] This parameter indicates the number of data bits sent to your plotter. The specified number of data bits must be the same as that of your plotter. The default value is 7. StopBits = [1 or 2] This parameter indicates the number of stop bits sent to your plotter after the data bits. The specified number of stop bits must be the same as that of your plotter. The default value is 1. FlowControl = [Xon/Xoff CTS DSR DCD] This parameter indicates the type of flow control that will be used while communicating with your plotter. When Xon/Xoff is used, POP will send the optimized data to your plotter until it receives an XOFF character. After receiving an XOFF, it will not recommence until it receives an XON character. When CTS, DSR or DCD is specified, hardware flow control is used. POP will wait for the specified hardware signal to go up before sending optimized data to your plotter. When the specified signal goes down, POP will stop sending data until the signal goes up again. The specified flow control type must be the same as that of your plotter. The default value is DSR. Xon/XoffWaitForDCD = [Yes No] This parameter indicates if POP must wait for the DCD (Data Carrier Detect) modem control signal to be raised before sending data to the plotter. Normally, the plotter raises its DCD signal as soon as it is powered on. When used with Xon/Xoff flow control, waiting for DCD ensures that POP will not send the optimized plot file to a plotter that is powered off. The default value is Yes. PS2Model = [Yes No] This parameter is used only if you are using POP for Windows with a PS2 Computer Model and intend to send the resulting optimized plot directly to either COM3: or COM4:. In this case, set this parameter to Yes to force POP to use the PS2 default port address when sending data to either COM3: or COM4:. The default value is No. 9- New Features and History of Fixes --------------------------------- This section briefly describes the fixes and new features included in different POP versions. ----------------------------------------------------------------------------- | | | | Version | Fixes and/or New Features | | | | |---------+-----------------------------------------------------------------| | 1.0.0a | POP first release | |---------+-----------------------------------------------------------------| | 1.0.0b | Minor modifications | |---------+-----------------------------------------------------------------| | 1.0.0c | Minor modifications | |---------+-----------------------------------------------------------------| | 1.0.0d | The HPGL 'AP' command does not freeze the PC anymore. | | | | | | The HPGL 'VS' command generated by POP is now sent | | | using the 'VS Velocity' format. This is because the HP7475 | | | plotter (and possibly other plotters) does not support the | | | 'VS Velocity,PenNumber' format, which caused the error | | | light to go on. | | | | | | POPCFG minor modifications. | | | | |---------+-----------------------------------------------------------------| | 1.0.1a | Full wildcard (*,?) support for both the POP InputFile | | | and OutputFile specifications. | | | | | | POP no longer creates a temporary file when it starts, so | | | no write access is required on the drive where POP is | | | started from. | | | | | | The FOOTPRINT shareware trial option no longer exists. | | | Only its EXPIRATION DATE is used. | | | | |---------+-----------------------------------------------------------------| | 1.0.1b | Information for Registration in Europe added. | ----------------------------------------------------------------------------- | 1.0.1c | Includes the first POP for Windows version. | ----------------------------------------------------------------------------- 10- Warranty -------- INOCAD makes no warranty of any kind, express or implied, concerning the merchantability or fitness of the Plotter Optimizer (POP) for a particular purpose. INOCAD shall not be liable for any damages to data or property arising directly or indirectly as a result of using this program or as a result of a failure of this program to operate in the manner desired by the user, whether such damages be direct, indirect, special or consequential. 11- License ------- POP is distributed as shareware. Non-registered users of POP are granted a limited, 30-day license to determine whether or not this program meets their needs. Continued use beyond the 30-day evaluation period requires registration. Use of non-registered copies of POP beyond the original evaluation period is strictly prohibited. Copying and distributing POP to others is also subject to the following restrictions: - POP must be copied in its original form, including the file containing this license information. - No copying fee may be charged, other than the cost of the copy medium. - Distribution of POP with any other software or hardware product(s) is prohibited without the express written permission of INOCAD. - Sysops (bulletin board System Operators) may make POP available for downloading by their users, as long as all other license conditions are met. - Commercial Distributors of Public Domain, Shareware, or User-Supported software may distribute POP only upon written permission from INOCAD. Distribution is also subject to all other license conditions. 12- How to Contact INOCAD --------------------- For additional information, or to send us comments or your plot file for analysis, please write to: INOCAD P.O. Box 25025, La Citiere La Prairie, Qc CANADA J5R 5H4 You can reach us from Compuserve at the following Compuserve E-Mail address: 71743,1771 If you are using Internet you can reach us at the following E-Mail address: 71743.1771@compuserve.com Please specify the POP version you are currently using. 13- Ordering Information -------------------- When you register your copy of POP, you are granted a license to use the program as you desire. There are several advantages to registering your copy of POP: - You will receive the latest version of POP, - You will have access to our E-Mail Support, - Registered users are always treated with high priority. To register POP, please complete the following registration form (or the file POPORDER.TXT) and send it to the following address: INOCAD P.O. Box 25025, La Citiere La Prairie, Qc CANADA J5R 5H4 or contact our authorized distributor for all countries of the European Union: Companion Data & Electronics Watercirkel 79 NL-1186 LP Amstelveen Tel: +31 (0)20 - 6438106 Fax: +31 (0)20 - 6438106 Internet: cde@xs4all.nl Order Form Name _________________________________________________________ Company_________________________________________________________ Address_________________________________________________________ _________________________________________________________ _________________________________________________________ _________________________________________________________ Phone ____________________________ First POP for DOS copy 1 x $65 = _____ Additional POP for DOS copies ___ x $35 = _____ First POP for Windows copy 1 x $65 = _____ Additional POP for Windows copies ___ x $35 = _____ Total Enclosed _____ All orders must be pre-paid. Payment may be made by check or money order preferably payable in US Dollars, drawn on a bank in the US, Canada, England, France, or Switzerland. For faster delivery, pay by certified check or money order. The above prices include postage and handling. Each licensed copy may be used by one person on multiple computers or installed at one physical computer location and used by a group of people at that location. Optional System Information --------------------------- Computer type __286 __386 __486 __Pentium other____________ CAD system name and ___________________________________________ operating system ___________________________________________ ___________________________________________ Plotter model ___________________________________________ Currently using POP version ________________ Comments ___________________________________________________________ ____________________________________________________________________ ____________________________________________________________________