![]() |
| CAD, CAM, CAE, design, technical drawing, drafting, delineation, visualization, manufacturing | ISSN 1442-2255 : 11/7/2009 - 2:54:52 PM |
|
Publishing TurboCAD Drawings on a Website(This article applies to TurboCAD Professional v7 and v8. It may or may not be applicable to earlier or standard versions, but this is not verified.)
On the Internet there are only two graphic file types that can be displayed without each user needing to have special plug-ins installed on their computer – GIF and JPG – and they are both raster image formats. That is, they are composed of a matrix of dots. The web browser can scale them down if need be to fit in the display window, but there is no way the person viewing them can zoom in to see the details larger. In order to be able to do that, some form of vector graphics data is needed, and generally, a lot more complication is involved. (Actually there is a third format, PNG, but it is really an enhanced form of GIF, and is rarely used.) View a sample CAD drawing done in TurboCAD and output as JPG. If a raster image, of a size that will fit in a web browser window, is made from a large and complex drawing, the finer details and probably all the text notes and dimensions will be unreadable. Even if you could somehow magnify the image, all you would do is magnify the dots – the fine details and small text would not become any more readable. Hence, it will often be necessary to make image files from restricted areas of a large drawing. Vector Graphics There are also vector graphic file formats intended for use on the Internet that are designed to overcome those problems, and they are particularly relevant to CAD data. To be able to view these formats on a web browser, each user has to download and install a browser plug-in module designed specifically for that format. Those modules incorporate user interaction controls to zoom into various regions and to pan the view-port. They also often have facilities for turning layers on and off and manipulating any Model/Paper mode that may be present.
Autodesk created their own web vector data format called ‘DWF’ for AutoCAD data, and it has also been adopted by some other CAD companies. TurboCAD has built-in support for generating DWF data. Therefore, DWF is the most appropriate format for TurboCAD users who need the versatility and viewing control that it offers, when the penalty of requiring users to obtain the browser plug-in is justified. The DWF browser plug-in (called Autodesk Express Viewer) is available for free download from the Autodesk web site. 3D VRML The above is relevant to 2D CAD. If working with 3D models, different techniques are needed for web display. The official standard and most common data format for this is ‘VRML’ – ‘Virtual Reality Modelling Language’. VRML plug-ins are available at no cost from various sources, most notably from the format’s originator, SGI (www.sgi.com). TurboCAD has built-in support for creating VRML files (file-name suffix ‘WRL’). The browser plug-in provides interactive controls for flying around inside and outside the model and looking in any direction. The model data is simplified and ‘coarsened’ to provide a reasonable fidelity of view while allowing smooth interactive movement on typical PCs and keeping the model data file size down enough to load in a reasonable time. For many purposes however, it is sufficient to publish simple 2D raster images of CAD data on the web. This can even be done from 3D models, by capturing a preset viewpoint. The two formats built into web browsers have particular characteristics. GIF (‘Graphic Image Format’) is a very compact and efficient file format, but is limited to a palette of 256 colours, greyscale, or bi-tonal black-&-white. The JPG format, or more correctly, JPEG (‘Joint Photographic Experts Group’) was developed as an ultra-compressed format for photographs and scans of graduated tone artwork – a field where the GIF format is quite poor. GIF is excellent for line-work, fine detail, small text, and cartoon-like flat colour artwork. JPEG has variable data compression, where you can trade-off file-size against image quality. For photos, very heavy compression works well on the web (where resolution is quite low), but for finely detailed line-work, it can produce fuzzy effects and spurious ghost images if data compression is set high. GIF is ideal for typical CAD line-work on a plain background, while JPEG is ideal for shaded 3D views. SaveAs JPG TurboCAD has built-in facilities for generating raster image files. The two options are BMP (Windows bitmap) or JPG (JPEG). BMP files are uncompressed raster data, giving high quality but enormous file sizes. It would be a good option if making image files for use in print publishing, but is not suited to web usage, and browsers do not support it. TurboCAD does not have a GIF option, so the best available choice is JPG with low compression. TurboCAD automatically sets a suitable compression level, and generates satisfactory quality even with fine line-work.
There are two ways of producing a JPG image for the web in TurboCAD. One is to use ‘SaveAs’ and select the ‘JPG’ file-type option in the drop-down list. (See the illustration.) The other is the 'Publish to HTML' item on the 'File' menu. That is a super-easy way to create a web page of a drawing in one click. However, it doesn't give you much control and may not be satisfactory. It generates both a JPG image file and an ultra-simplistic HTML web page file that does nothing other than display that image file (See the sample page code). After creating a JPG file, whoever does the actual creation of web pages, can place image insertion controls in the HTML page files and organise the page layout as desired around them. This will usually be the best way, and most offices that want to put drawings on the web will have someone who creates web pages for them, using one of the web authoring software systems. The default SaveAs process, used from ModelSpace, often saves a lot of blank space around the drawing. To avoid that, select all the drawing data first. Then the SaveAs dialog shows options to save 'Drawing' or 'Selection', and 'Drawing' is the default option. Pick 'Selection'. That will produce an image file that is completely filled with the drawing. The best way to save a rectangular region of the drawing is to make use of PaperSpace. Create a named view in ModelSpace, enclosing just the part wanted. Then in a blank new PaperSpace tab, set up a view-port and define it to use the View just created. Adjust size and viewport scale to suit, and SaveAs from that PaperSpace tab. Since you can have many Paper tabs in v7 & 8, it is simple to set up a temporary one. This method crops any lines as they go past the view-port outline. If you simply selected an area in ModelSpace, objects that crossed the boundary would not be cropped or may not be selected at all. The SaveAs JPG system by default produces a raster image of 800x600 pixels. That is larger than will fit on some people’s web browser screen, but the browser will scale it down provided the image display code in the HTML page does not specify an image size. <HTML> <HEAD> <META NAME="GENERATOR" Content="TurboCad"> <TITLE>demo399</TITLE> </HEAD> <BODY> <IMG SRC="demo399.JPG" ALIGN=TOP BORDER=0> </BODY> </HTML> You can set the output image size as desired, but the default will usually be the best choice. SaveAs DWF Clearly, if you have a drawing intended for an A0 plot, saving all of it to 800x600 dots will reduce much of its detail to a dotty blur. But saving it to a much higher resolution won’t help greatly, because of the limitations of the web display environment, and the fact that it will be reduced to 800x600 or less in the browser anyway. For large complex drawings, you either need to select one or more small areas of the drawing to save and display on the web, or else go to the DWF vector data format method, and require anyone wanting to view your web page to install the Autodesk Express Viewer plug-in. The illustration shows a DWF file from TurboCAD being displayed in Internet Explorer and the right-click pop-up menu that the Autodesk Express Viewer plug-in provides for controlling zoom, pan, layers etc. The Java option It is also possible to install a Java based vector image display system on the web-server, to use the DWF format. Then people don't need to install any plug-in. The system will download a very small Java client program to their PC, which remains only as long as they are viewing that site. This process needs the web site manager to set up the main Java program on the web server. Some Javascript code has to be placed in the HTML files to display the drawing files and download the Java support module. I have used the ‘CADviewer’ DWF Java display system from ‘Tailor Made Software’, and it does work very well. Web authoring & Print Publishing If you are looking at buying a web authoring package, ‘Macromedia Dreamweaver’ is probably the best, most powerful, and most versatile, but is expensive. A very good one of reasonable cost is ‘Namo Web Editor’. There is an excellent free one that requires a bit more know-how called ‘1st-Page 2000’. Finally, on the separate but related topic of using TurboCAD drawings in the printing of a brochure or book, the best format to use is ‘SaveAs WMF' which is a vector format that all publishing software supports.
|
|
|||||||||||||||||||||||||||||||||||||||||
| All rights reserved © 1996-2007 Digital Business Media Pty Ltd | home : editorial archive : contact : legal |