Sunteți pe pagina 1din 9

COMPUTATIONAL MECHANICS New Trends and Applications S.Idelsohn, E. Oate and E. Dvorkin (Eds.

) CIMNE, Barcelona, Spain 1998

A SYSTEMATIC APPROACH TO CAD SYSTEMS CUSTOMIZATION


Srgio Scheer* and Wilson H. Bogado
*

Centro de Estudos de Engenharia Civil (CESEC) Universidade Federal do Paran Centro Politcnico, 81530-990 Curitiba, Brazil e-mail: scheer@cce.ufpr.br

Departamento Acadmico de Informtica (DAINF) Centro Federal de Educao Tecnolgica do Paran Av. Sete de Setembro 3165 80230-901 Curitiba, Brazil e-mail: bogado@dainf.cefetpr.br

Key words: CAD, Customization, Software Engineering. Abstract. One of the most powerful features of CAD systems is customization. With customization is possible to create new commands and ways of human-machine interaction that ease repetitive or complex tasks. In this paper, we diskuss the main issues involved in creating customized systems for the final user and the requirements for the programmer and systems analyst. Based on the models of Software Engineering, a simplified development method is proposed.

Srgio Scheer and Wilson H. Bogado

INTRODUCTION

In the last few decades we have seen the emergence of many Computer Aided Design programs. Some of them claim to be designed to address the needs of specific diskiplines like AEC, Mechanical Engineering, Electronics and others. While offering the more general tools, there is no way to know what each individual user may find useful to accomplish very specific tasks. One can suppose that those limitations have stroke the minds of the developers of the CAD systems very early so they build the capability of customization into their programs. With customization, it is possible to modify or create new tools that are better suited to our needs. One of the great improvements we can get with customization is to replace a series of otherwise boring, to say the least, commands with a single tool that does the job. Nowadays, almost anything is possible. Lets take a very simple example: You are working with your preferred CAD system and you need to draw a special type of note, one that has a number surrounded by a circle (figure 1). Since you do not have that tool available you are using the Place Text and Place Circle tools in turn. Every time you place such a note you have to draw a circle with a suitable radius and center point and place the number centered into it. After drawing dozens of such notes you may decide to write a small customization.

8
Figure 1: Special Note

To customize even that simple task a little planning is needed. First of all we have to decide how we want our new tool Place Special Note, lets say to work. Based on our experience in drawing special notes we decide that we want to type in the text and the circles radius and let the system choose the appropriate size and position for the text when we point to the circles center with the pointing device. Now that we have got a specification the final step is to implement the new feature using one of the available customization interfaces. The process depicted in the preceding paragraph clearly includes the main steps of a computer program development. After realizing that, we conclude that the methods and techniques of Software Engineering should be applied for a systematic approach to customization. The more complex the task to be accomplished the more this is true.

CUSTOMIZATION LEVELS

The major CAD systems have a wide range of customization interfaces that go from as simple as assigning commands to function keys to complete development environments including high level programming languages and resource compilers. CAD systems usually offer the following choices6:

Srgio Scheer and Wilson H. Bogado

Function keys assignment: This is a fairly simple way to issue a written command. The keys, frequently named F1, F2, etc., are assigned a command that is typed whenever the corresponding key is pressed. Configurable menus: New items are added to the standard menu tree of the program. The new item, represented by a word or icon, is assigned a command to be executed when it is selected. Sometimes, creating menu items can be a fairly complex task. Scripts: These are simple sequences of instructions stored on disk files that are run through a specific command of the CAD system. By assigning scripts to function keys or menu items is possible to speed up many tasks. Symbols library: Different CAD systems call them blocks, parts or cells. A symbol is a small drawing of a frequently used part. Symbols are assigned names and are placed in the design with arbitrary rotations and/or scale factors. Interpreted programming languages: These are proprietary programming languages whose interpreter is built into the CAD program. AutoLisp (for AutoCAD), UCM (for MicroStation) and CADL (for CADKEY) are a few examples. Some of them, like AutoLisp, resemble high level programming languages. Compiled programming languages: Similar to interpreted languages but the source code needs to be compile before it can be used. Compiled customizations run faster and are better suited for large applications that can easily have many thousands of source code lines. ADS (for AutoCAD), MDL (for MicroStation) and DCAL (for DataCAD) are some examples.

In this study we identify two major levels of customization: basic and advanced. Basic customization employs function keys assignment, configurable menus, scripts, symbol libraries and interpreted languages. Advanced customization is regarded as one that interacts with the kernel of the CAD system (the geometry engine). Due to its complexity, advanced customization demands knowledge of programming languages, data structures, databases and user interfaces. Indeed, basic and advanced techniques are used in conjunction to create a working application. 3 STEPS FOR CREATING A CUSTOMIZATION Before starting to develop a customized application some preparation may be useful: Do it the hard way: Take some time to try a few simple drawings, follow a tutorial, learn the basic skills, see what more experienced people are doing. Interview the user: Get an insight of his work, identify the major problems he is facing, ask for the features he would like to have. Read the users guide: Compare what is written with what is being done, try to figure out what can be improved. Many CAD operators use the simpler rather than the most efficient tools. Read the customization manual: Examine the available customization tools and find the most effective way to get the job done.

Srgio Scheer and Wilson H. Bogado

Study the internal data structure: To fully understand the internal workings of a CAD system a knowledge of the data structure used to save, retrieve and modify geometric entities is vital. Study the function library: The manipulation of the entities database is carried out through distinct sets of functions. An early overview of the function library and a late deep understanding is an absolutely necessary condition for customization. Plan the development: Use Software Engineering techniques to plan the development of the customized system.

4 USING SOFTWARE ENGINEERING TECHNIQUES FOR CAD SYSTEMS CUSTOMIZATION Considering the procedure just outlined, it should be clear that given the similarities with standard software development Software Engineering can and has to be applied to customization. The spiral model of Software Engineering5 is the one that best describes the life cycle of a customized application. This model includes the classic approach with prototyping and introduces a new element risk analysis. The main tasks presented by the spiral model are (figure 2): Planning: objectives, alternatives and restrictions determination. Risk analysis: analysis of alternatives and identification/resolution of risks. Engineering: development of the next level product. User evaluation: evaluation of the engineering results.
Planning
Initial requirements gathering and project planning

Risk Analysis
Risk analysis based on initial requirements Risk analysis based on user reaction

Planning based on user comments

Decision of continuing or not Towards a completed system User evaluation Initial prototype Next level prototype Final system

User Evaluation

Engineering

Figure 2: Software Engineering spiral model

During the first cycle around the spiral, objectives, alternatives and restrictions are defined and risks are identified and analyzed. If risk analysis indicates uncertainty in the requirements, prototyping

Srgio Scheer and Wilson H. Bogado

can be used in the engineering quadrant to help the analyst and the user. Simulations and other models can also be used to refine the requirements. Initial requirements gathering is not always easy because many users do not have an clear idea of their needs. With customized systems the analyst can expect the user to have a better understanding of the overall procedure since he already uses the standard tools and can point the repetitive, inefficient and complex task of his everyday work. On an initial approach, the analyst should try to prototype will supply elements for risk analysis and give the user a taste of what he can expect. We state that prototyping applied to customization is the most effective paradigm to get an working system in a short period of time (typically one or two weeks). Indeed, with customized systems the initial prototype is used as the first version of the system and its continued improvement along the spiral cycle leads to the final system6. 5 SOME CASE STUDIES

The proposed customization methodology was successfully applied to a variety of engineering and non-engineering related problems, namely: finite element meshes generation, walls building with concrete blocks, furniture design, bathroom and kitchen layouts and steel structures. Several customization environments where used, for example: AutoCAD version 12 (AutoLisp1 and ADS2), MicroStation version 5 (MDL4), and DataCAD version 6 (DCAL3). Two applications are presented here6. 5.1 Finite Element Meshes Generation Finite element analysis programs include a graphic editor so the user can enter de data points that define the region of interest. This editor than generates the element mesh that is transferred to the analysis module. This is an acceptable approach but in most cases the regions are the result of an existing drawing already in CAD format. Some analysis programs can import that geometry data and use it to generate the regions and meshes. What we want (our initial requirements) is to customize a CAD program so that it can export the geometric and material (physical properties) data directly to the analysis module of one, or even various, analysis programs. This customization was written in MicroStation version 5. The user interacts with the system through a pop-down menu (figure 3) that was added to the standard main menu of the program. A command table was created and each command was assigned to a menu item. Commands can also be typed but most users prefer to use the menu.

Srgio Scheer and Wilson H. Bogado

Figure 3: Customized pop-down menu

Each menu item opens a customized dialog box for non-graphical data input. One of such dialog boxes (for physical properties input) is shown on figure 4.

Figure 4: Physical properties dialog box

After defining the geometric and physical parameters, the user selects the line segments that make up a region. When the system detects that a region was successfully closed, it starts to generate the element mesh. The mesh is created based on type of element and number of boundary divisions. Supports are placed using a symbol library. Figure 5 shows a mesh with two regions generated by this customization.

Figure 5: Generated mesh

It is interesting to note that while creating the geometric entities, attribute data is attached to them to achieve a functional integration. Without this, further processing and data exporting would be

Srgio Scheer and Wilson H. Bogado

impossible. For example, it is necessary to distinguish nodes from circles, boundaries from line segments, element boundaries from region boundaries and supports from regular symbols. There is no practical and consistent way to do this without advanced customization. 5.2 Bathroom and Kitchen Layouts This customization is very atypical since most of the user interface is non-graphical. The coordinates of the vertices of the polygon that describes the room, position of doors, windows, sinks, lavatories and other elements are input from a separate program (figure 6) that was also written as part of the customization project. In this way, the operator defines all of the geometry of the room that is saved on disk for the final processing by the customized CAD system. The explanation for this approach is that there was a previous (much simpler) system that had to be improved as part of the initial requirements. To minimize user training we decided to keep the same style of input interface.

Figure 6: Input module

Srgio Scheer and Wilson H. Bogado

To generate and graphically edit the layout a customization for DataCAD was implemented using the DCAL programming language (similar to Pascal). After saving some layout descriptions to disk the operator starts DataCAD and runs the customization from which he can select a layout and generate all the geometry. Almost no manual intervention from the operator is needed and in a few minutes he has a complete drawing including top view, front views of each wall, annotations and dimensions (figure 7). Minor corrections can be made using DataCADs standard tools. The user interacts with the system primarily through a custom menu that presents options to generate the drawing, create a perspective view, select layers for display and save the layout as a DataCAD file. The layout is created as a three dimensional model, the viewpoint is changed (with the right layers turned on) and hidden line removal is performed (using DataCADs internal algorithm) to get a realistic view. The symbols are taken from a 3D symbol library create for this purpose. It should be noted that only the implementation of the hidden line removal algorithm would be a fabulous task in traditional programming.

Figure 7: Layout generated with DataCAD

Srgio Scheer and Wilson H. Bogado

CONCLUSIONS

Many complex programming and training tasks are simplified with customization. The main advantages are6: The entities database is ready for use. This database is fairly complex and of difficult maintenance since standard models do not apply; Database search, exclusion and insertion operations are simplified by a specific set of functions. It should be noted that the search criteria is often not a key but the distance from a given point; Customized applications are highly portable among different hardware platforms and operating systems. Of course, there must be a version of the CAD system for each platform but this is not uncommon nowadays; There is no need to create the basic user interface so the programmer has more time to focus on the problem he is trying to solve; While using the customized tools, the user still has the standard tools to perform everyday tasks; The user need not to be trained in a completely new environment.

One problem with customization is that it can be difficult to restrict direct user access to tools that could corrupt the control flow established for entity creation. If this happens, unpredictable results may appear. This type of errors are extremely difficult to track down. In fact, we only can expect User comments on the systems described in the case studies and others have shown an important gain of productivity and a desire for further enhancements. On the analyst/programmer side the use of Software Engineering techniques applied to customization has proved to be an effective way to create powerful application in a short period of time. CAD companies have devoted big budgets and time to enhance customization capabilities of their programs so this feature should be seriously considered as a productivity tool for designers and engineers. REFERENCES [1] [2] [3] [4] [5] Autodesk, Inc., AutoCAD release 12: customization manual, (1992). Autodesk, Inc., AutoCAD development system: programmers reference manual, (1992). Cadkey, Inc., DCAL 6.0 manual, (1993). Intergraph Corporation, MicroStation MDL manual: version 4, (1991). R. S. Pressman, Software engineering: a practitioners approach, 3rd ed., McGraw-Hill, (1992). [6] W. H. Bogado, Customizao de sistemas comercias de CAD, MSc. Thesis, Universidade Federal do Paran, (1997).

S-ar putea să vă placă și