How to get HPGL from trueSpace, convert images to DXF.

Technical questions, etc..
Galane
Chief Petty Officer
Posts: 111
Joined: 30 Aug 2009, 10:45

How to get HPGL from trueSpace, convert images to DXF.

Post by Galane »

I have found a roundabout method to get HPGL files from shapes created with trueSpace and how to convert from image files to non-triangulated DXF.

1. Prepare the scene by creating the shapes to be converted.
2. Switch to top view and arrange the shapes to fit into an area matching the width:height ratio of the paper you'll be plotting to.
3. Set the background to black and render mode to wireframe.
4. Render to bitmap, at least 2048x1536.
5. Download and install the Raster to Vector converter from http://www.raster-vector.com" The demo converts up to three files per session, no other limits, no buggering up the output with watermarks etc.
6. Set the output format to HPGL (or DXF). Also set the output location and under Options, set the scale.
7. For output to US Letter, 10 works well if the original bitmap is 1024x768. Doubling the original to 2048x1536 and halving the scale to 5 produces a plot exactly the same size, but with smoother and more accurate lines.
8. Create this batch file and name it plot.bat

Code: Select all

MODE COM1: 9600,N, 8,1,P
pause
copy /b %1 COM1
The first line sets COM1 to 9600 baud, no parity bits, 8 data bits, on stop bit, hardware handshaking. If your plotter has different/faster/slower capabilities, adjust the command as needed.
The pause is so the user can verify the port is ready then hit any key to send the file.
For a parallel port output device it only needs the last line, with COM1 changed to LPT1. Of course if the plotter is on a different port number, change it in the batch file. The batch file will work in DOS and Windows up through XP.

10. Put plot.bat in a folder with your .hgl files from the converter and use it like this

Code: Select all

c:\files\plot file.hgl
The filename extension can be anything because the COPY command with the /b switch sends the file as a binary file instead of as an ASCII text file.

The DXF output from the converter makes each separate object it detects into a single, one-sided face that isn't triangulated. This should make it easier to model from drawings and other images, as long as they have sharp edges and good contrast along those edges. For photos it would help to posterize them to 8 or fewer colors and edit as needed before running them through the converter. For hand drawn artwork, sharp ink lines would work best.

The HPGL conversion works good enough for what I have planned. :) 'Course it would be even better to have a plugin that directly exports to HPGL from trueSpace! With the ability to create non-triangulated DXF, I have some old drawings of mine I can more easily bring into tS and create 3D models.

Return to “TechForum”