![]() OpenFileDialog1.InitialDirectory = " c:\\ " // sets the initial directory of the // openfile dialog Private void menuItem2_Click( object sender, System.EventArgs e) // Opens openfile // dialog to select a DXF file When you click File/Open, the following method will be called: Separating these methods from the drawing methods would be much better but for now this is all I can present. In the near future, I'm planning to add B-Spline too.ĭXF Interpretation methods are included in the canvas class. Currently Line, Polyline, Circle and Arc shapes of the AutoCAD can be recognized. There is a Canvas class for drawing and a Shape class for defining objects. You can open multiple DXF files for viewing. The data is extracted from the DXF file and interpreted and then necessary methods of the viewer are called and the result is shown on the screen.Īlthough the intended structure is as above, the code itself is not separated this much. Well, as you can see, the structure is as above. (I'll try to provide details later on.) General Structure DXF File However, the only interaction that the editor presents to the user is to highlight the shapes (to highlight keep shift button pressed while moving the cursor). And the project become partially a DXF reader and mainly a viewer program, and I also made a drawing editor. ![]() But then I found out that a reader by itself will have no value, there should also be a viewer. After various scans through the net, I came across the DXF specification of the AutoCAD and I decided to make my own reader. There are a couple of DXF writer projects here in CodeProject (one is from Omid Shahabi, the other is from Claude Gagnon), but I couldn't find a DXF reader which reads DXF files. In fact, at the beginning my sole purpose was to extract data from a DXF file but later on interpretation and drawing of the data on the screen started to take much more time and shaded the priority of the data extraction. This project mainly deals with reading a DXF file, but in order to demonstrate the reader is working I also included a viewer, which interprets the data and draw it on the screen. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |