2 Cadsoftware Programming
2 Cadsoftware Programming
CAD Software
Typical Learning Curve yp g Graphics Standards Basic Definitions Modes f G hi Operations M d of Graphics O i User Interface Software Modules Modeling and Viewing So t a e ocu e tat o Software Documentation Software Development Efficient use of CAD Software
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 2
Further training and mastering Confusion zone: slow learning, not that steep
Time
3
Data Structure
Formal Definition: A data structure is a set of data items or elements that are related to each other by a set of relations. In CAD/CAM, a data structure is a scheme, logic, or sequence of steps to achieve graphics, non-graphics or programming goal Three different types of data structures for CAD:
Based on Edges Based on Vertices Based on Blocks
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 4
B
2
A B1 C
8 3
E B2 G
F
7
THE OBJECT
A
1, 1 A& B
B
2, 2 B& C
C
3, 3 C& D
D E F Set of edges
4, 4 A&D 5, 5 E 6, 6 E& F
G
7, 7 F& G 8, 8 G
Data Structure based on edges (read as this vertex shared by these edges )
1
A, 1&4
2
B, 1&2
4 5 6 Set of vertices
D, 3&4 E, 5&6 F, 6&7
7
G, 7&8
C, 2&3
Data t D t structure b t based on vertices (read as this edge has these vertices) d ti
Database
It may be defined as an organized collection of graphics y g g and non-graphics data stored on secondary storage in the computer. The objective is to collect and maintain data in a central storage s that it will be available for operations and decision making. A properly developed database satisfies the following requirements:
Eliminate redundancy: both design and manufacturing departments share the same database Enforce standards: data interchange and migration becomes easy Apply security restrictions: using login/password for each user Maintain integrity: for accuracy and consistency Balance conflicting requirements: aim at overall best performance, for example, both design and manufacturing, not either alone
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 6
Database Models
Relational Database Model
Background
E. F. Codd developed the relational model in 1970.
Conceptually simple but versatile Major breakthrough for both users and designers
Database Models
Relational Database Model
Basic Structure
Relational DataBase Management System (RDBMS)
Relational database is percei ed b the user as a perceived by ser collection of tables in which data are stored. Each table consists of series of row/column intersections. Tables (or relations) are related to each other by sharing a common entity characteristic. The relationship type is often shown in a relational schema. A table yields complete data and structural independence because it is a purely logical structure.
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 9
Database Models
R l ti Relational D t b l Database M d l Model
10
Point 1 2
Y
Line Start End Point point
Surfa ce
X1 Y1 X2 Y2 X3 Y3 X4 Y4 X5 X6 X7 X8 Y5 Y6 Y7 Y8
A B C D E F G D
3 4 5 6 7 8
A B C D E F G
1 1 2 3 5 6 7
4 2 3 4 6 7 8
Relation POINT
Relation LINE/CURVE
Relation SURFACE
11
Database Models
Relational Database Model
Advantages
Data independence and structural independence Easy to design the database and to manage its contents t t Less programming effort required Powerful and flexible query capability:
Structured Query Language (SQL) Fourth Generation Language (4GL) Specify what to do not how to do Introduced by IBM in 1974
12
Database Models
Relational Database Model
Disadvantages
RDBMS requires substantial hardware and operating system overhead. It tends to be slower than other database systems.
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 13
Database Models
Database Models
15
Object (root)
S1
S2
Surface level
Edge level
X1
Y1
X4
Y4
X5
Y5 X4 Y4
16
Database Models
With preorder traversal frequently accessed segments are placed close to the left side of the tree to minimize access time. time
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 17
Database Models
18
Database Models
Hierarchical Database Model
Disadvantages
Requirement of knowledge of physical level of data storage Inability to represent relationships that do not conform to the hierarchical 1:M standard Applications programming is complex - programmer must know the database structure and how to traverse it Lack of ad hoc query capability for end users ac o oc que y capab ty o e d use s Lack of standard concepts and implementation (No standard was developed)-- limited portability Requires extensive programming activities to use the database - Most serious problem
19
Database Models
Network Database Model
Background
CODASYL (Conference on Data Systems Language) group created DataBase Task Group (DBTG) in 1971 to develop standards for a database environment. DBTG specified three crucial database components:
Network schema defines the conceptual organization of the entire database as viewed by the database administrator. Subschema defines the portion of the database as seen by the p y applications programs. Data Management Language defines the data characteristics and the data structure and to manipulate the data.
20
Database Models
Network Database Model
Background
Th Three DBTG d t management language components: data tl t
Schema Data Definition Language (DDL) - used by DBA to define schema components S b h Subschema D t D fi iti L Data Definition Language - used b application d by li ti programs to define part of the schema to be used by the program Data Manipulation Language - allows manipulation of the database contents
ANSI SPARC (Standards Planning And Requirements Committee) augmented the database standards in 1975. ) g A popular network DBMS is Computer Associates IDMS/R
21
Database Models
N t Network D t b k Database M d l Model
Basic Structure
S -- A relationship i called a set. E h set i Set l i hi is ll d Each is composed of at least two record types: an owner (p (parent) record and a member (child) record. ) ( )
22
Database Models
Network Database Model
Relationships among the records are decomposed into a series of sets sets.
23
S1
S2 Surface level
Edge level
Vertex level
24
Database Models
Network Database Model
Advantages
Easier implementation of M:N relationships More flexible data access compared to Hierarchical model - An application can access an owner and all the members within the set, one can also access owner from a member. Enforced data integrity - owner record must be defined before defining member records Data independence through the DBMS
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 25
Database Models
Network Database Model
Disadvantages
Very complex structure from the application programmers point of view Difficult to design and use properly - because of the navigational nature of the data structure Difficult to make changes in a database - no structural independence
26
Database Models
OO Database Model
Objects are abstractions of real-world entities
Example: Student, Invoice, Employee
Objects capture both attribute and behavior (methods) Objects with similar characteristics are grouped together as a class Classes are organized in a class hierarchy A subclass inherits the attributes and methods from its superclass
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 27
Database Models
OO Database Model
Advantages
Provides a richer modeling language - captures attributes, methods, and class hierarchies Useful in niche application areas such as CAD/CAM
Disadvantage
Data access method resembles the navigational style Lack of standardization
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 28
OBJECT
SUB-OBJECT B1
SUB-OBJECT B2
29
Multiple engineering applications from p g g conceptual design to manufacturing operations Dynamic modification and extension of the database and its associativity
30
The iterative nature of design This nature design. is not common in business data processing. processing CAD d t b database management systems t t must support the tentative, iterative and evolutionary nature of th d i process. l ti t f the design
31
Design versions and levels of detail detail. CAD databases must provide a capability for storage and management of multiple design solutions that may exist for a particular design. There is seldom a unique solution to a design problem there may exist several optimal solutions.
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 32
Concurrent and multiple users must be supported from the database. Large design projects usually multiple designers working simultaneously on d i ki i lt l multiple aspects of a project
33
Temporary database support support. D Due t th it ti to the iterative nature of d i t f design, earlier generated data may not be committed t th d t b itt d to the database until th d i til the design process is completed.
34
Free design sequence sequence. Th d t b The database system should not i t h ld t impose constraints on the designer to follow because diff b different d i t designs require diff i different t sequences.
35
Easy access access. Application program requiring data from a CAD database should not require extensive knowledge of the database structure to extract the data needed needed. This is important in customizing CAD systems t for f specific ifi design d i and d manufacturing procedure.
I/C: Dr. Regalla Srinivasa Prakash, Mechanical Engg., B. I. T. S., Pilani 36
37
Thank you!
Any questions?
39