Chapter 5
Manipulation of the Model:
Problem for Traditional/Manual Method:
Limited facility
Unwanted parts of drawing have to be laboriously erased
o Usually by hand with eraser and erasing shield
Moving or copying geometry would involve repetition of the construction
o Time consuming
Small change easy but large change difficult
Advantage for CAD:
Construction sometimes may take same time as traditional method
Advantage in changing
o Accuracy
o Time
No transcription error in copying geometry
Effort required for large change is slight more than small changes
Facilities for manipulation of the model in CAD:
Transformation of translation, rotation and scaling to elements of the model
o May involve moving the geometry or
o Copying it to create one or more duplicate sets of entities in the data structure
Allowance of user to make change to individual geometric elements
o Trimming or extending them to their intersection with other elements
Temporary or permanent deletion of entities from model
o Temporary deletion done to-
Simplify display
Improve performance
Make viewing and selection easier
Miscellaneous
o Allows entities to be grouped together
Object Transformation:
The manipulation in which the coordinate system is stationary and the object moves, is known as
object transformation
Similar to coordinate transformation
Variations or Extension offered to Entity Transformation:
Allow properties like color or construction level variation as they are transformed
Allow image of entities being transformed replace the cursor
o Lets user view the effect of transformation before placing in position
Updating connecting entities reflecting the result of translation
o Known as stretching
o Lifting of faces entails the updating of adjacent loops of edges
Incorporating transformation into a construction scheme for solid geometry
o Linear and rotational sweep operations
Introduction to Model Storage:
Important Topics of CAD Data Structure:
Data structure for interactive modeling using 2 and 3 dimensional wire-frame and surface
geometry
o Relationship between geometric entities less crucial than in solid geometry
Storage of image vectors in a display file
Associativity between entities
o Association of geometric entities with those used in their construction
Association of non-geometric data with geometric model
o Through use of attributes
Collection of design models into a database
o Particularly use of engineering data management systems (EDMS)
Requirement for Data Structure for Interactive Modelling:
Allow interactive manipulation
o Addition, Modification and deletion of data
Support multiple types of data element
o Geometric, textual, dimensions etc
Allow properties to be associated with geometric elements
o Pen number, Line style, color etc
Allow association between data elements at places important to model
Provide facilities to retrieve parts of data structure released by deletion or other
modification
o Also known as garbage collection
Provide facility to store commonly used geometry once
o Repeated references to the geometry are stored as instances
Be compact
o Minimize disk storage
o Minimize main memory requirement
Allow models of different sizes and various entity combinations to be defined
Make access to data as efficient as possible
Simple Data Structure:
Allows arbitrary quantities of data for each entity
Allows arbitrary combination of entities
Comprises a list or table of entities with cross-reference from this list
o Separates arrays of floating points, integers and other data
Tables-
o Entity Table
o Integer Table
o Floating-point table
o Other Table
Entity Table:
Consists a series of slots
Each slot contains a number of elements of the array allocated
o One per entity
Contains general data
Contains additional pointers in each slot
o These point from the entity slot to the entities following and preceding it in the
list
Linked List:
Data may be arbitrarily added, deleted and moved in the list without hampering the sequence
Doubly Linked List:
There are pointers in two directions from each entry in the list
Deletion straightforward
If deleted entity is not replaced by any other entity, undo option may bring that back
Reuse of space left by deleted entity easy
Reuse of space released in other tables more difficult
Compressing of data structure required to free the model space used by deleted entities
General Entity Data:
Entity type
o Point-1
o Line-2
o Arc-3
Entity Sequence Number
o Allocated according to definition
Entity Number
o Position in table
Pointer to Integer Data
Pointer to Real Data
View/Co-ordinate system of Definition
Pen Number
Curve Font or Style
o Represents style for drawing lines or curves
Entity Color
Is entity blanked
Is entity grouped
Layer/Layer No
Group/Block:
Entity that represents a collection of other entities, grouped together, so that they may be treated
as one item for selection and manipulation purpose is known as group or block
Level/Layer:
Number allocated to entities to assist in partitioning the drawing or model is known as level or
layer.
Display Files:
Linked list good candidate as data structure
In 3-d manipulation, high performance hardware required for-
o Dynamic image rotation
o Hidden surface removal
o Shading
Display Manipulation Operations in CAD:
Redrawing display to clean up unwanted clutter on the screen or restore parts of the
corrupted image
o Done in background color for entity deletion and modification of many systems
Selection of entities from the screen
Rotation of viewing point for 3-d model
Advantage:
Fast image manipulation or zoom facilities
o Display file vectors are used
Faster display control
Little loss in display resolution
Associative Geometry:
Expanding the entity type description to include data storage associations between one part of the
model and other parts used is known as associative geometry
Modification of one entity reflects in the dependent entities
o Automatically or manually
Useful for updating dimensions to reflecting changes in a drawing
Entity data pointers are to be stored to entities used in construction
o Location of screen positions are to be added
Difficult to construct geometry sometimes to take advantage of associativity
Allows design changes to be propagated through processes depending on design model
for input
Attribute:
Non-geometric data can be associated with geometric model through it
Name-value pair
o Name- Alphanumeric character string
o Value- String or Number
Linked with design model elements through pointers
o From elements to attributes
Each element associated with many attributes
Each attribute associated with number of model elements
Classic use is to create Bill of Materials
o Hierarchical decomposition of parts, subassemblies and assemblies
o Info about required quantities, part number , drawing or supplier data
Object-oriented Programming:
Problems of CAD:
Large programs
o More than 100MB
o Difficult to maintain
o Time-consuming
Difficulty in reusing softwares written for particular purpose
o Software development effort spent on rewriting elements of existing program
o Reason is program procedure is dependent on data structure
Difficulty may be overcome with object-oriented programming
Four Defining Concepts of Object-oriented Programming:
Procedural and Data Abstraction
Encapsulation
Inheritance
Polymorphism
Procedural and Data Abstraction:
Object-oriented model consists of a set of autonomous objects
o Each contains their own data
o Communicate through tightly defined interface
When an object receives a message, it acts upon its own data using its own procedures
Encapsulation:
Hiding of private data and methods within an object
Leaves only the public properties visible
Makes modification of data and methods of objects existing in program safer
Programmer is free to modify private data and methods
Combination of abstraction and encapsulation localize effect of changes to data and
methods
o Allow larger and complicated models to be built, modified and maintained
Inheritance:
Used to create class hierarchies
A set of objects differing in data values only belong to the same class
Classes are arranged in an inheritance hierarchy
o Child class may inherit both data and methods from its parent class
o Child class will also have its own specialized data and methods
Inheritance relationship between two classes “is a relationship”
Example: Alloy wheel is child of Wheel Class
Benefit-
o Opportunities for reuse of existing classes in new contexts
o Containment
Has a relationship
Car has four wheels
Polymorphism:
Property of an object responding appropriately
o According to its class
o To a standard message
Useful in object-oriented programming when combined with late binding
Example: Calculation of area of a set of different shapes altogether
High level code sends standard message to each shape for returning its area
Adds the results
Reduced number of code required
Aids legibility
o High-level code is not concerned with calculation of area of squares
Late Binding:
Exact class of an object is not known until run-time
Same piece of code can be invoked on different classes of object
Each will respond appropriately
Database Consideration:
CAD system requires to store individual models in a sort of automated “drawing store”
from which straightforward retrieval is required
o The store should be able to hold other data
o Certain systems store models or parts as files
Snapshots of interactive data structure
o Define other file types as well
Together with parts, stored as standard operating system binary files
Additional class of files widely used-
o Pattern
o Template
o Shape
o Symbol
Way entity collections are inserted into part data-
o Copies of entities added to part data
Copies may subsequently be manipulated
o Insert instance of entities in the part at an appropriate scale and orientation
Not to copy the data
Simply to cross-reference to the master
Disadvantages with part file style of storage:
Information is stored in a format analogous to drawing
o As an independent collection of geometric elements
o If assembly model uses data from models of individual components, modification
made to a component model will not be automatically reflected in the assembly
model
Any associativity between geometric elements is within part files only
Little information in the filling system
o Unless embedded in the filename associating other product information
Integrated Database:
System needs to be highly structured to avoid duplication of data within database
Assembly model becomes collection of references to component models elsewhere in the
database
Drawing might consist of requisite views of the model with dimension and other
annotation
Part lists generated directly by interrogation of the 3d assembly
o Rather than attached attributes
Constraint:
Careful management of system required
o Specially in organizing cross-references required to different parts of the database
o Assisted or automated by software
EDMS (Engineering Data Management System)
A system that assists a design team in the indexing, browsing and searching of their design data
Companies need to index and manage large quantities of data in a sort of electronic
drawing vault
Lets designer enquire-
o What data is available on a particular project
o Where it is stored
o When and by whom were models constructed
30% time of designers spent in searching data in existing drawings
Extra provisions of EDMS:
Mechanisms for data security that ensure the data is available and easily accessible to
all when needed
o Only those with appropriate authority has access to data
Checks that particular data items are unique
o For a given reference, only one data item may exist in the system
Version control mechanisms
o Log changes and issues of drawings
Relational Databases:
Data repository aspects of EDMS constructed on top of commercial database
management systems (DBMS)
DBMS:
Provide data storage
Provide indexing mechanism
Handle system security
Handle computing problems associated with shared and simultaneous access to data
Common concepts of Database Organization:
Database contains records
o comprises data elements in fields
Elements may be of different data types
o Numbers, dates and text
Database contents catalogued in data dictionaries
Operations on databases are called transactions
o Addition, Modification, Deletion
DBMS provides databases with-
o Multi-user access
o Concurrency control
o Query Capability
o Security of database
Hierarchical Approach:
Data organized into hierarchical tree structures
Dominant database approach in 1960s
Network Approach:
Defined by Conference on Data System Language (CODASYL)
Allows less restrictive relationship between data elements than simple hierarchical
approach
Relational Approach:
Replaced older approaches
Based on formal methodology and relational algebra
Developed by Codd at IBM
Data is represented in relations resembling two-dimensional table of values
Rows contain database records known as tuples
Column are fields called attributes
Data types and field descriptions for a particular relation comprise the schema for that
relation