JCP 2012 Vol.7(3): 666-671 ISSN: 1796-203X
doi: 10.4304/jcp.7.3.666-671
doi: 10.4304/jcp.7.3.666-671
Design and Implementation of a General Purpose 2D CAD System
Tunhua Wu1, Qinqin Shen1, Changle Zhou2, Ping Wang3
1School of Information & Engineering, Wenzhou Medical College, Wenzhou, China
2School of Information Sci. & Tech., Xiamen University, Xiamen, China
3Dept. of Environmental Science, Wenzhou Medical College, Wenzhou, China
Abstract—A general purpose 2D CAD system was established by Object-Oriented technology. Key technologies for realizing the system were introduced. The methods for forming shape container, manipulating shape container and constructing graph template library were described in detail. Basic shapes, such as line, rectangle, ellipse, polygon, B-Spline curve and textbox, can be grouped to be a shape container, and the shape containers can also be grouped to form a more complex one. The hierarchy of shape container is a Tree. Hence, to manipulate shape container is to access the container recursively. The Redo and Undo functions were realized by serializing canvas status to temporary files. And all of the canvas statuses were managed by undo-stack and redo-stack. The purposefully formed shape container can be reformed to a graph template, and the graph templates of the same type can be stored as a library. Different graph template library corresponds to different application. Various types of graph template library ensure the generality and flexibility of this system. Experimental results showed that the proposed methods are effective. This system can be applied to a lot of fields, such as construction, machinery and electronics.
Index Terms—CAD, graph element, Object-Oriented technology, tree structure, B-Spline curve.
2School of Information Sci. & Tech., Xiamen University, Xiamen, China
3Dept. of Environmental Science, Wenzhou Medical College, Wenzhou, China
Abstract—A general purpose 2D CAD system was established by Object-Oriented technology. Key technologies for realizing the system were introduced. The methods for forming shape container, manipulating shape container and constructing graph template library were described in detail. Basic shapes, such as line, rectangle, ellipse, polygon, B-Spline curve and textbox, can be grouped to be a shape container, and the shape containers can also be grouped to form a more complex one. The hierarchy of shape container is a Tree. Hence, to manipulate shape container is to access the container recursively. The Redo and Undo functions were realized by serializing canvas status to temporary files. And all of the canvas statuses were managed by undo-stack and redo-stack. The purposefully formed shape container can be reformed to a graph template, and the graph templates of the same type can be stored as a library. Different graph template library corresponds to different application. Various types of graph template library ensure the generality and flexibility of this system. Experimental results showed that the proposed methods are effective. This system can be applied to a lot of fields, such as construction, machinery and electronics.
Index Terms—CAD, graph element, Object-Oriented technology, tree structure, B-Spline curve.
Cite: Tunhua Wu, Qinqin Shen, Changle Zhou, Ping Wang, "Design and Implementation of a General Purpose 2D CAD System," Journal of Computers vol. 7, no. 3, pp. 666-671, 2012.
General Information
ISSN: 1796-203X
Abbreviated Title: J.Comput.
Frequency: Bimonthly
Abbreviated Title: J.Comput.
Frequency: Bimonthly
Editor-in-Chief: Prof. Liansheng Tan
Executive Editor: Ms. Nina Lee
Abstracting/ Indexing: DBLP, EBSCO, ProQuest, INSPEC, ULRICH's Periodicals Directory, WorldCat,etc
E-mail: jcp@iap.org
-
Nov 14, 2019 News!
Vol 14, No 11 has been published with online version [Click]
-
Mar 20, 2020 News!
Vol 15, No 2 has been published with online version [Click]
-
Dec 16, 2019 News!
Vol 14, No 12 has been published with online version [Click]
-
Sep 16, 2019 News!
Vol 14, No 9 has been published with online version [Click]
-
Aug 16, 2019 News!
Vol 14, No 8 has been published with online version [Click]
- Read more>>