• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Elevation Photo

The first step of this project will be to create a front page with a photo of our building. The photo, office.jpg, is stored in the .\images subdirectory. We want to identify hotspots on our photo for linking to other parts of the FMS. Using AutoCAD, we insert our photo into a new drawing and then outline the various building segments using LWPOLYLINE entities. Remember, the DXFtoSVG translator developed in Chapter 24 can translate AutoCAD DXF files to SVG. We can use our DXFtoSVG translator to translate these hotspot link areas to SVG. As you recall, the easiest method of attaching information to DXF ENTITIES is by layer assignment. For this page, we will draw our LWPOLYLINEs on layers that identify the floor. For example, the polyline identifying floor 2 north will be placed on layer “Floor2-N.” The AutoCAD drawing file, office.dwg, has been created with these additional polylines assigned to the correct layers. After exporting the office.dwg file to AutoCAD 2000 DXF format, we move to our DXFtoSVG translator.

Before translating our file, we first make some enhancements to our translator. It would be nice to have the translator add a viewbox to the top svg element. We can accomplish this by checking for DXF extent values, $EXTMIN and $EXTMAX, in the DXF header, as shown in Listing 26.1.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint