Rochester Institute of Technology
RIT Scholar Works
Theses
Thesis/Dissertation Collections
8-30-1988
Solid modeling interactive interface for design
drafting
Edward Maruggi
Follow this and additional works at:
http://scholarworks.rit.edu/theses
This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion
in Theses by an authorized administrator of RIT Scholar Works. For more information, please contact
.
Recommended Citation
Rochester Institute
ofTechnology
School
ofComputer Science
andTechnology
SOLID MODELING
INTERACTIVE INTERFACE
FOR DESIGN DRAFTING
ly
Edward P. Maruggi
A
thesis
submittedto:
The
Faculty
ofthe
School
ofComputer
Science
andTechnology,
in
partialfulfillment
ofthe
requirementsfor
the
degree
ofMaster
ofScience in Computer
Science.
This thesis entitled:
SOLID MODELING INTERACTIVE INTERFACE FOR DESIGN
DRAFTING,
by Edward P. Maruggi,
has been approved by the members of the thesis committee and the
Computer Science and Technology Graduate Studies Committee as duly
noted by the signatures below.
Guy Johnson
Professor Guy Johnson
ThesIs Committee Chair
Donald L. Kreher
I
9/6/<6'6
Professor Donald L. Kreher
Thesis Committee Member
Peter G. Anderson
Professor Peter G. Anderson
Rochester Institute of Technology
Graduate Computer Science Department
Thesis:
SOLID MODELING
INTERACTIVE INTERFACE
FOR DESIGN
DRAFTING
by Edward P. Maruggi
August 30,1988
I, Edward P
.
Maruggi, hereby grant permission to the Wallace Memorial
Library of Rochester Institute of Technology to reproduce my thesis in whole
or in part with the stipulation that it will not be for commercial use or profit.
Please contact me each time a request for reproduction is made. I can be
reached at the Rochester Institute of Technology, National Technical
Institute for the Deaf, Building 60
Edward P. Maruggi
l-~-BB
Preliminary
Information
3
1.3.
Abstract.
Providing
certainSolid
Modeling
software systems withComputer-Aided
Design
Drafting
facilities
allowsthese
systemsto
produceindustry
acceptableengineering
drawing
displays.
A
methodis
putforth
to
providethese
facilities
through
the
design
andimplemention
of atwo-dimensional
interactive
graphics packagethat
interfaces
withthese
systems.This
allows other graphical and
textual
elementsto
be
addedto
displays
producedby
the
Solid
Modeling
systems.1.4.
Key
Words
andPhrases.
Computer Graphics
Solid
Modeling
orSolid
Modelling
PADL-2
Interactive Computer Graphics
Two
Dimension
or2
Dimension
Computer-Aided
Design
Core System
Computer Graphics Standard
L5.
Computing
Review
Subject Codes.
Categories
andSubject Descriptors: J.6 [Computer-Aided
Engineering]
-computer-aideddesign
(CAD);
D.2.2 [Software
Engineering]:
Tools
andTechniques
- modules andinterfaces;
I.3.M [Computer
Graphics]:
Miscellaneous;
Preliminary
Information
4
TABLE
OF CONTENTS
Preliminary
Information
Title
Page
1
Acceptance
Page
2
Abstract
3
Key
Words
andPhrases
3
Computing
Review Subject Codes
3
Table
ofContents
4
Section 1
-Introduction
1.1.
Background
7
1.2.
Problem
Statement
9
1.3.
Theoretical
andConceptual
Development
9
1.3.1.
Architectural
Design
Goals
10
1.3.2.
Graphic
Processing
Goals
11
1.3.3.
User Interface
Goals
11
1.3.4.
Device Interface
Goals
12
1.3.5.
Solid
Modeling
Interface Goal
12
1.3.6.
Functional
Goals
12
1.4.
Equipment Configuration
andImplementation Tools
13
1.5.
Previous Work
14
Section
2
-Functional Specification
2.1.
Functions
Performed
16
2.1.1.
The
Function
ofthe
Solid
Modeler
16
2.1.2.
The Function
ofIGP
17
2.2.
Limitations
andRestrictions
19
2.3.
User
Inputs
andOutputs
20
Preliminary
Information
5
Section 3
-Architectural Design
3.1.
Overview
21
3.2.
Design
ofIGP
21
3.3.
System Organization Chart
23
3.4.
Data
Flow Diagram
24
3.5.
User
Interface
Structure
Chart
25
Section 4
-Interface
Design
4.1.
User
Interface
26
4.1.1.
Level
1
26
4.1.2.
Level
2
26
4.1.3.
Level
3
28
4.1.4.
Level
4
28
4.2.
Device
Interface
29
Section 5
-Graphic
Processor Design
5.1.
Graphic
Primitives
30
5.1.1.
Locating
the
Cursor
30
5.1.2.
Drawing
Points
30
5.1.3.
Drawing
Lines
31
5.1.4.
Writing
Text Strings
31
5.2.
Windowing
31
5.2.1.
Windows
andViewports
32
5.2.2.
Clipping
33
5.3.
Segmenting
35
5.4.
Transformations
36
5.4.1.
Viewing
Transformations
37
5.4.2.
Instance
Transformations
37
5.5.
Control
39
Preliminary
Information
6
Section 6
-Verification
andValidation
6.1.
Test Plan
41
6.2.
PADL-2
Test Procedures
41
6.2.1.
Defining
the
Object
41
6.2.2.
Producing
Displays
44
6.3.
IGP
Test Procedures
47
6.3.1.
Using
IGP
47
6.4.
Test
Results
50
Section
7
-Conclusions
7.1.
Problem
Solution
57
7.1.1.
Architecture
57
7.1.2.
Graphic
Processing
58
7.1.3.
User
Interface
58
7.1.4.
Device Interface
58
7.1.5.
Solid
Modeling
Interface
59
7.1.6.
Functional
Specification
59
7.2.
Discrepancies
andShortcomings
ofthe
System
59
7.3.
Lessons
Learned
60
7.3.1.
Alternative
Approaches
for
anImproved System
60
7.3.2.
Suggestions for
Future Extensions
61
7.3.3.
Related
Thesis Topics
for
the
Future
63
Section
8
-Bibliography
Section
9
-Program
Listings
1
INTRODUCTION
Ll.
Background.
The
advent ofthe
computerhas
spurredmany
changesin
society
asmankind
has
struggledto
putto
usethis
powerful,
yet sometimes enigmaticinvention.
This
has
been
particularly
evidentin
industry,
wherethe
computerhas
been
employedto
improve
the quality
andincrease
the quantity
of goods and services.The
application ofComputer-Aided
Design
andManufacturing
(CAD/CAM)
has
been
instrumental
in
bringing
aboutthese
changes.The
ultimate goal ofCAD/CAM is
to
produce goodsefficiently
by
automating the
production process.Fully
automating the
productionprocess requires a means
for
the
computerto
understandthe geometry
of production parts."The
needfor
powerful computational meansfor
dealing
with
geometry
is
widely
recognized,
and avariety
ofgeometry
programsand systems
have
been
or arebeing
developed
by
researchlaboratories,
industrial
users,
and commercialvendors."
[REQU80].
These
have
included
Solid
Modeling
(SM)
software systems which utilizethree-dimensional
solidgeometry
as abasis
for
describing
objectsto
the
computer and
displaying
them
on various outputdevices.
SM
systemshave been developed
primarily
as researchtools
for
mechanical
CAD/CAM
applications.By
creating
computer models of objectsthrough
the
use of solidgeometry,
complex studies can moreeasily
be
performed on mechanical objects."Models
may
be
manipulatedin
many
waysfor
componentassembly,
movementinterference
and analysisfor
mass and surface properties and resistanceto
stress."
Introduction
8
While SM
systemshave
proven useful as researchtools,
they
have
the
potential
to
be
usefulfor
industrial
applications as well.In
orderto
realizethis potential,
SM
systems must movebeyond
merely
describing
anddisplaying
geometry."One
must abandonthe
concept ofthe
solid orgeometrical modeler and move
forward
to
develop
the
true
productmodeler."
[PRAT85].
This
would allowthe
process ofdeveloping
anddesigning
a productto
existentirely
withinthe
modeleritself.
"It is
possiblethat
in
the very
nearfuture
the
complete process ofdesigning
adetailed
part will not needany
sketch ordrawing
produced,
neither on a manual nor on an electronicdrawing
board."[JURI87].
This
willonly
happen
if
solidmodeling
continuesto
advancetoward
product modeling.To
advancetoward
becoming
true
productmodelers,
SM
systems mustbecome
more usefulin
other areas ofCAD/CAM.
One
such areais
Computer-Aided
Design
Drafting
(CADD).
CADD is
usedin
industrial
settings where part specifications must
be
communicatedfrom
the
designer
to
manufacturing
through
the
use ofengineering
design
graphics.
"Drafting
andCAD
existto convey
shapes, sizes,
and physicaldescriptions
graphically,
sothat
physicalideas
are conveyedunambiguously
from
one personto
another."
[OAKE88].
CADD
wasoriginally
developed
to
replacetraditional
drafting
tools
such asthe
drafting
board,
scale,
and pencil.For
this
reason,
CADD
systems were
developed
as wireframesystems,
because
this
wasthe
cheapest
way to
produceindustry
acceptabledocuments
through the
use ofthe
computer."A
wireframe modelis
constructed oflines,
arcs andcircles,
andis
fairly
commonin
CAD
software."
[OAKE88].
This
requiresless
mathematical computationsthan constructing
a solid representationof an object.
SM,
because
ofits
use ofhigher level
mathematicalcomputations,
uses morememory
andprocessing,
andthus
is
moreexpensive
than
wireframe systems.Because
the
cost ofintegrated
circuittechnology
usedin
computershas
declined
steadily
in
recentyears,
wireframeCADD
systemshave begun
to
incorporate
more aspects ofSM,
althoughthese
systems are not yetfully
automated."Basic 3D CADD
systems with solidmodeling
capabilitiesalready
exist,
but it
willtake
several more yearsto
produceindustry
acceptable systemsthat
willautomatically
producehardcopy
outputsin
the
form
ofengineering
drawings."
Introduction
9
aspects of
SM,
these
wireframe systemshave become
morethan
simpledrafting
tools;
they
have
advancedtoward
becoming
product modelers.L2. Problem
Statement
The
advance of wireframeCADD
toward
productmodeling
by
incorporating
aspects ofSM
pointsto the
fact
that
certainSM
systems could advancetoward
productmodeling
by incorporating
aspects of wireframeCADD.
The kind
ofSM
systemsthat
couldbenefit
the
mostfrom
wireframeCADD
technology
arethose that
are unableto
produceindustry
acceptableengineering
drawings.
This includes
SM
systemsthat
weredeveloped
primarily
for
researchin
mechanicalCAD/CAM.
These
systemsgenerally
have
the ability to
producehighly
sophisticated2D
or3D
shaded or wireframedisplays
ofobjects,
but
are not ableto
add all ofthe
necessary
information
to
produceengineering
drawing
displays.
This
thesis
solvesthis
problemby
providing
aninteractive
graphics package(IGP)
that
interfaces
withthese
systemsto
providefacilities
similarto
those
providedby
wireframeCADD
systems.This
allowsfor
creating
complete mechanical
drawings
of objects.SM
systems created as researchtools
run on standard computersystems
consisting
of a centralprocessing
unit(CPU),
mainmemory,
secondary
storage,
and anoperating
systemin
additionto the the
SM
software and adisplay
device
withvectoring
capabilities.In
orderto
support aninteractive
graphicspackage,
the
system must also provideprogramming
language
facilities
andinteraction
devices.
IGP interfaces
with systemsthat
have
these
characteristics.L3.
Theoretical
andConceptual
Development
Introduction
10
unambiguous
engineering
drawing
type
ofdisplays.
This
provides anefficient means
through
which a user can enhancedisplays
producedby
SM
systemsfor design
drafting
purposes.The
first
step
usedin
designing
this
system wasto
identify
andcategorize
the
requirements ofthe
system.The
following
requirementswere
identified:
From
an architecturaldesign
standpoint,
allthe necessary
capabilitiesmust
be
provided withoutthe
systembeing
unduly
large.
In
the
area ofgraphicsprocessing,
allthe
graphics capabilitiesthat
areessential
to
produceengineering
drawing
displays from SM
systemdisplays
mustbe included.
The
userinterface
to these
graphics capabilities mustbe
user-friendly.To
satisfy
device
interfacing
requirements,
provisions mustbe
madefor
the
control of a wide range of graphicdevices
in
a uniform way.The SM interface
must allowthe
systemto
be
portable sothat
it
canbe
used with more
than
oneSM
system.Capabilities
that
use a minimum amount of run-time andmemory
mustbe
provided whilesatisfying the
requirements ofthe
system.From
each ofthese
requirements a number ofdesign
goalsthat
affectedthe
usefulness ofthe
system wereformulated
to
guidethe
decisions
madeduring
the
design
process.It
wasdiscovered
that
a certain amount oftrade-off
existedbetween
some ofthese
goals.1.3.1.
Architectural Design
Goals.
The
architecturaldesign
goals wereformulated
to
provide allthe
necessary
capabilitiesin
a structured and well-defined manner withoutthe
systembeing
unduly
large.
These
goals weredefined
in
three
areas:Introduction
11
A
systemthat
satisfiesthe
orthogonality
goalis
onein
whichthe
subroutines are
independent
of each other orthe
dependency
is
structured and well-defined.A
systemthat
satisfiesthe
minimality
goalis
onein
whichonly those
subroutines needed at a givenlevel
should
be
provided at
that
level. A
systemthat
satisfiesthe
compactness goalis
onein
whichthe
desired
resultis
achievedby
using the
smallest possiblenumber ofsubroutines and parameters.
1.3.2.
Graphic
Processing
Goals.
The
graphicprocessing
goals wereformulated
to
provide allthe
graphics capabilities
that
are essentialto
produceengineering
drawing
displays from SM
systemdisplays.
These
goals weredefined
in
two
areas:
completeness,
and compatibility.A
systemthat
satisfiesthe
completeness goalis
onein
which allsubroutines needed
for
a givenlevel
ofgraphic application areincluded
at
that
level.
A
systemthat
satisfiesthe
compatibility
goalis
onein
which other graphic standards orcommonly
accepted rules of practice arefollowed.
1.3.3.
User
Interface Goals.
The
userinterface
goals wereformulated
to
allowthe
systemto
be
user-friendly.
These
goals wereidentified
in the
areas ofsimplicity,
consistency,
clarity,
and robustness.A
systemthat
satisfiesthe simplicity
goalis
onein
whichthe typical
user
is
ableto
understand and utilize allthe
capabilities ofthe
system.This
meansthat
features
that
areunnecessary
ortoo
complex areomitted.
A
systemthat
satisfiesthe consistency
goalis
onein
whichthe
general concepts related
to the
functionality
ofthe
systemis
easy to
follow
for
the
typical
user."Function
names,
calling
sequences,
errorhandling,
and coordinate systems all shouldfollow
simple and consistentpatterns without exceptions "
Introduction
12
A
systemthat
satisfiesthe
clarity
goalis
onein
whichthe
conceptsand
functional
specifications ofthe
system areeasily
understandablefrom
the
standpoint ofboth
systemdesign
and systemdescription.
A
system
that
satisfiesthe
robustness goalis
onein
which error reactionis
clearly
understandable andinformative,
andimpacts
the
system aslittle
as possible.1.3.4. Device
Interface Goals.
The
device interface
goals wereformulated
to
providefor
the
controlof a wide range ofgraphic
devices
in
a uniform way.Two
areas ofdevice
interface
goals wereidentified:
device
independence,
anddevice
richness.
A
systemthat
satisfiesthe
device
independence
goalis
one whichis
able
to
addressfacilities
ofdiffering
graphics output andinput
devices
without modification of
the
application program structure.A
systemthat
satisfiesthe
device
richness goalis
onein
whichthe
full
capabilitiesof a wide range of
different
graphicsinput
and outputdevices
areaccessible
from
the
subroutines ofthe
system.L3.5.
Solid
Modeling
Interface
GoaL
The
SM
interface
goal wasformulated in
the
area ofportability.A
portable system was
found
to
be
onethat
couldbe
used with morethan
one
SM
system.L3.6.
Functional
Goals.
The functional
goals wereformulated
sothat
capabilitiesthat
use aminimum amount of run-time and
memory
wouldbe
provided whilesatisfying the
other system requirements as well.The
functional
goalswere
formulated in
the
areas ofperformance and efficiency.Introduction
13
operating-system response and
display
characteristics,
factors beyond
the
systemdesigner's
control"
[NEWM79].
Satisfying
this
goal meansthat the
affect ofthis
onthe
systemis
minimized sothat
a consistentspeed of response
is
providedfor
allfunctions.
A
systemthat
satisfiesthe efficiency
goalis
onein
which afunction
ofthe
systemis
ableto
achievethe
desired
result with a minimum usage ofrun-time and memory.
"Graphics
systems shouldbe
small andeconomical..."
[NEWM79].
1.4.
Equipment
Configuration
andImplementation
Tools.
In
orderto
demonstrate
the
functioning
and usefulness ofIGP,
it
wasimplemented for
use with a specificSM
system.This
wasthe
PADL-2
system
running
onthe
Rochester Institute
ofTechnology
Information
Systems
andComputing
Infotron IS4000.
This
system was comprised ofthe
PADL-2 PP2/1.1
solidmodeling software, the
VAX/VMS
operating
system,
a cluster ofVAX-1
1/785
super minicomputers withRA-81
andRA-60
hard disk
storage,
andVT-240 interactive
display
devices.
In
addition,
the
VAX-1
1
Pascal
programming
language
was usedto
programthe
IGP
software.PADL-2
wasdeveloped
atthe
University
ofRochester
Production
Automation Project (see [TIL078]). The
project was establishedin 1972
to
do
researchin
mechanically
orientedCAD/CAM.
The PADL-2
systemis
a
direct
result ofthis
research.It
is
a software systemthat
allowsprogramming
of solid objectsthrough the
use ofthe
PADL-2
language
for
the
purpose ofmodeling
parts andassemblies,
computing
line
drawings,
shaded
displays
and massproperties,
andverifying
Numerical Control
programs.
"PADL-2
is
a robust and powerful programthat
forms
the
basis
of severalleading
mainframe and minicomputer-based solidmodeling
systems."
[FINA88].
This
makesit
anideal
candidateto
usewith
IGP.
In
addition, the
system requirements and goalsto
be followed
during
the
design
process were moreeasily
satisfiedby
choosing
an appropriateframework from
within whichto
work.The framework
was appropriateIntroduction
14
IGP.
For
example,
in
orderto
meetthe
design
goal ofcompatibility,
commonly
accepted rules of practice werefollowed,
thus
acommonly
acceptedframework,
or aframework
that
usescommonly
acceptedpractices was selected.
This
also madeit
easierfor
the
userto
understand and utilizethe
graphics capabilities ofthe system,
whichhelped
satisfy the
simplicity
goal.Choosing
an appropriateframework
alsoinsured
that
IGP
was notunduly
influenced
by
the
features
ofthe
specifichardware
system or
by highly
specialized application requirements.This
helped
satisfy consistency,
anddevice independence
goals as well.The
two
mostcommonly
accepted graphics standardsin
usetoday
arethe
Graphic
Kernel
System
(GKS)
andthe
Core System.
The Core System
was
followed for
this
particular applicationbecause
ofthe
author'sfamiliarity
withCore due
to
his
previous work withthis
standard.The
Core System
wasfirst developed
in 1977
by
the
ACM/SIGGRAPH
Graphics Standard
Planning
Committee.
"It's functional
capabilitiesinclude
the
areas of outputprimitives,
viewing
transformations,
segmentation,
input,
andcontrol."
[MICV78].
Output
primitives are usedto
describe
objectsto
be
displayed,
viewing transformations
determine
how
the
objects areactually
displayed,
segmentation allowsdisplays
to
be
modified,
input
devices
allowthe
userto
interact
withthe
system,
and control ofthe
generalfunctioning
ofthe
systemby
the
useris
allowed."The
Core System is
a packagedesigned
to
be
rich enoughto
supportdevices
ranging
from
plotters,
through
storagetubes,
to
high
speed refreshdisplays."
[NEWM78].
A
more complete explanation ofthe
Core
System
can
be
found
in
[NEWM78],
[MICF78],
[MICV78],
and[BERG78].
1.5. Previous Work.
Much
workhas
been done in
the
past relatedto
implementing
the
Core
System
for
particularapplications,
however,
an extensive searchhas
failed
to
turn
up any
work relatedto
implementing
Core
or a subset ofCore
as part of an
interactive interface
for
a solidmodeling
software system.A
library
search was performed atthe
Rochester Institute
ofTechnology
Introduction
15
the
first
passthe
key
phrases computer graphics and structuredprogramming,
PADL-2,
interactive
computer graphics and2
dimension
ortwo
dimension,
and solidmodeling
or solidmodelling
andinterface
were usedto
uncover relevant workin
the
areas of computer graphics and solid modeling.On
the
second passthe
key
phraseCore
andComputer
Graphics
andStandard
was usedto
discover
relevantinformation
andexamples
regarding
implementations
ofthe
Core System.
The
search uncoveredtwo particularly
interesting
implementations
ofCore
relatedto the topic
ofthis thesis.
[FRIE81]
is
interesting
because both
it
andthis thesis
deal
with atwo-dimensional
Core
implementation.
[NIC081]
is helpful
because,
like
this
thesis,
it
usesthe
Pascal language
to
implement
Core.
The
search alsofound
the 4
works referencedin
section2
FUNCTIONAL
SPECIFICATION
2.1.
Functions Performed.
IGP
interfaces
with a solidmodeling
software systemto
producecomplete
engineering
drawing
displays.
Initially
the
solid modeleris
used
to
geometrically
describe
a solid object and generate atwo-dimensional
orthree-dimensional
display
ofthe
object onthe
screen.IGP
is
then
usedto
add additional graphical andtextual
information
neededto
create a complete
engineering
drawing
document.
The
solid modeler andIGP
have
the ability to
store and retrievefiles
for
later
use sothat the
entire
document
canbe
redisplayed asmany times
asdesired
and sothat
changes and updates
to
anexisting
drawing
caneasily
be
made.2.LL The
Function
ofthe Solid Modeler.
The
solid modeleris
usedto
generate appropriate partdisplays
onvarious output
devices.
This involves
using
whatever methodthe
solidmodeler allows
to
define
the geometry
ofthe
solid object andhow
the
object
is
displayed.
The
modelerdisplays
the
image
ofthe
object onthe
screen
appropriately
andthen
IGP is
usedto effectively
completethe
drawing.
This
involves
using the
modelerto
draw
a2D
or3D
image
ofthe
objectthat
best describes
the
object'sgeometry for
mechanicaldrafting
purposes.Most
oftenthis
requires a2D
multiview orthographicprojection of
the
object."Pictoral
(three-dimensional)
drawings
ofobjectsare sometimes
used,
but
the majority
ofdrawings
usedin
mechanicaldrafting
for
completely
describing
an object are multiviewdrawings
asshown
in
Fig.
[2-1]."
[JENS85].
Functional Specification
17
ORTHOGRAPHIC PROJECTION
f3
O
SOMETRIC OBLIQUE
PICTORIAL DRAWINGS
PERSPECTIVE
Figure 2-1.
Types
ofprojection usedin
drafting.
The
modeleris
also usedto appropriately
setthe
device
display
characteristics
for
the
part projection.This includes
characteristicssuch as
line
color andstyle,
andbackground
color.Certain kinds
ofengineering
drawings
may
also requirethat the
modeler removehidden
lines from
the
display.
2.L2.
The
Function
ofIGP.
IGP interacts
withthe
userthrough
aninput
and an outputdevice,
processes graphic
information,
outputs graphic elementsto
adisplay
device,
andintegrates
this
display
information
withdisplay
information
produced
by
the
SM
system.IGP
satisfiesthe
design
goals outlinedin
section
1.3
whileperforming these
functions.
2.1.2.1.
Interaction.
IGP
provides aninterface to
allowthe
userto
interactively
creategraphic elements
for
screendisplay.
To
satisfy
design
goals,
graphicinteraction
givesthe
usereasy
accessto the
functions
ofIGP
by
using
simple
polling
loops.
The
useris
repeatedly
promptedto
make aselection until a proper selection
has
been
made.If
animproper
selection
is
made,
aninformative
error messageis
displayed
onthe
Functional Specification
18
termination
ofthe
program.The
design
ofthe
userinterface
allowsfor
two
kinds
ofinteractive
input.
Input is
madesolely through
the
use ofthe
alphanumerickeyboard,
orby
using the
keyboard
together
withthe
graphic cursor.Graphic
cursorinput
allowsfor faster
and easierpositioning
of newitems
than
withthe
keyboard.
IGP
provides appropriatefeedback
to
the
userthrough the
use of alphanumeric output such as menus andmessages,
and graphicdisplay
of elements createdby
the
user.2.1.2.2.
Graphic Processing.
The
graphicprocessing design
goal ofcompatibility
is
satisfiedby
following
the
basic features
outlinedin
the
Core
standard.Core
providesfor five functional
areas.They
are: graphicprimitives,
windowing
functions,
segmenting
functions,
transformation
functions,
and controlfunctions.
All
ofthe
subroutines neededin
eachof
these
areas are provided.Graphic
primitives providethe ability to
movethe
cursor andto
create simple graphic elements.
The
graphic elementsthat
canbe
created are
points,
lines,
andtext
strings.The
windowis
the
screen area wherethe
display
is
produced.Windowing
functions
providethe
ability to
define
the
coordinatesystem,
andthe
boundary
ofthe
visible portion ofthe
display.
Segmentation functions
allow selective modification ofthe
IGP
produced graphic elements
by
allowing the
elementsto
be
partitionedinto
groupsthat
each comprise anengineering
drawing
element.Segmentation
is
necessary to
allowdeleting
of elements.Transformation
functions
allowrotation,
translation,
andscaling
of
IGP
produced graphic elements.This
allowseasy
creation of elementsto the
correct specifications.Functional Specification
19
characteristics of
line
style,
line
color,
andtext
size.These
areimportant
considerationsfor
creating
engineering
drawing
displays.
To
satisfy
device interface design
goals,
IGP
is
capable ofworking
on a number of
different devices because
graphic output goesthrough
adevice
driving
routinethat
canbe
rewrittenfor different devices.
Presently
this
routineis
writtenspecifically
for
aVT-240 device.
2.1.2.3.
Integration
To best
satisfy
SM interface design
goals,
integration between
IGP
and
the
SM
systemis
through the
screen.This
methoddoes
notrequire modification of
the
SM
software, thus satisfying portability
goals.
2.2.
Limitations
andRestrictions.
IGP
does
not provide allCore
graphicfunctions.
The
device
driving
procedure must
be
rewritten eachtime
IGP
runs on adifferent
device.
IGP
is
a2D
systemonly; the
solidmodeling
systemis
responsiblefor
any
3D
display
geometry.IGP
is
usedonly
after adisplay
of an objectis
produced onthe
screenby
the
SM
system.Therefore
screenerasing
andresetting is handled
solely
by
the
SM
systembecause
this
is done
priorto
animage
being
producedby
the
modeler.
The
performance ofthe
overall systemis limited
by
the
capabilities ofthe
SM
system andthe type
ofinput
and outputdevices
availablefor
usewith
the
system.Although
satisfying
performancedesign
goals meansthat
the
affect ofthis
onIGP
is
minimized, the
affectis
notentirely
eliminated.IGP
is limited
by
the
SM
system'sability
to
produce appropriate partdisplays,
by
whattype
ofoutputdevices
these
displays
are producedon,
andby
whattype
ofinput devices
canbe
usedinteractively
withthe
system.At
RIT,
IGP
is limited
by
the
abilities ofthe
PADL-2
PP2/1.1
softwareFunctional Specification
20
software are able
to
produce more appropriatedisplays.
Also
atRIT,
the
VT-240'
s
in
the
Ross
User
Computer
Center
arethe
standarddevices
used withPADL-2.
Therefore,
IGP
is
limited
by
the
capabilities ofthe
VT-240
for both
output and
interactive
input.
Hardcopy
is
another area whereIGP
is
limited
by
the
lack
of equipment available atRIT.
The
graphics printerfor
the
VT-240'sis
aline
printerthat
has been
convertedto
produce graphic outputthrough
adump
ofthe
VT-240
screen.This
produceslow-quality,
low-resolution
outputthat
leaves
much
to
be desired
whenthe
aimis
to
produceengineering
drawings.
2.3.
User
Inputs
andOutputs.
IGP is
interactive,
that
is,
the
useris
ableto
interactively
create andmanipulate graphics with
IGP
through the
use ofthe
keyboard
and otherinteractive
devices.
The
user mustbe
familiar
withengineering
drawing
practices
in
orderto
best
utilizeIGP
asit
wasintended.
The
userproduces
engineering
drawing
document displays
and screendumps
to
hardcopy
graphicdevices
if
they
are available.2.4.
System Files.
Separate files
are producedby
the
PADL-2
portion ofthe
system andthe
IGP
portion.Files
producedby
PADL-2
areinverse
translations
ofdefinitions
createdduring
aPADL-2
programming
session and areautomatically
named withthe
.PFI extension.Files
producedby
IGP
aredisplay
list data files
produced and savedduring
anIGP interactive
3
ARCHITECTURAL
DESIGN
3.1.
Overview.
An
overview ofthe
design
ofthe
complete systemthat
producesengineering
drawing
displays
is
shownby
the
System Organization Chart
(Figure
3-1
on page23).
The
existing
SM
systemhas
its
own userinterface,
file
storage,
anddevice interface.
IGP
exists alongsidethe
SM
and alsohas its
own userinterface,
file
storage,
anddevice interface.
3.2. Design
ofIGP.
IGP's
userinterface
is
a collection ofPascal
proceduresthat
allowthe
userto
interactively
create graphic elements.The
graphic processoris
agroup
ofPascal
proceduresthat
are called onby
the
interactive
routinesto
convertthe
interactive input
to
display
processing
unit(dpu)
commandsthat
canbe
savedto
permanent storage.The device interface
is
aPascal
procedurethat translates
dpu
commandsinto
appropriate opcodesthat
are sentto the
device for
display
purposes.The flow
ofdata
through the
IGP
routinesis
shownin
the
Data
Flow
Diagram (Figure
3-2
on page24).
The
data
starts out as userinput
in the
userinterface.
The
routinesin the
userinterface
determine
whatkind
ofdata
the
userhas
input
and convertsit
to the
appropriatedata
type.
These
routinesthen
callthe
appropriate routinesin
the
graphic processor.If
required,
the
graphic processor routines perform a series of manipulations onthe
data for
display
purposes.Otherwise,
the
data
goesdirectly
to the
device
driver
for
conversioninto
device
specific opcodes and coordinatesto
be
sentto the
device.
Architechural
Design
22
Data
manipulatedin the
graphic processorthat
describe
coordinatesin
anx-y
coordinate system are multipliedby
a currentinstance
transformation
for
rotation,
translation,
andscaling
ofgraphic elements.Then
the
data
is
multipliedby
aviewing
transformation
that
convertscoordinates
from
the
user's coordinate systemto
a conceptualdevice
coordinate system.
Coordinate
systems usedin IGP
arediscussed further
in
section5.2.
The data
may
be
alteredby
the clipping
routine whichkeeps
elementsfrom
being
displayed
outsidethe
area ofthe
screendesignated for
viewing.
The data
is
then
sent as adpu
instruction
to
adisplay
list for
storage or
directly
to the
device
driving
routine.The device
driver
converts
the
data into device
specific opcodes and coordinatesthat
are sentto the
physicaldevice for display.
Figure
3-3
on page25
showsthe
Structure Chart
for
the
userinterface
routines.
Structure Charts
ofthe
graphic processor andthe
device
interface
are not shownbecause
they
are notparticularly
helpful
toward
understanding the
design
ofthese.
The
graphic processor routines allexist at
the
samelevel
exceptfor
OUTCODES, REJECTCHECK,
ACCEPTCHECK,
andSWAP
which exist underthe
CLIPPER
routine.The
device
interface,
onthe
otherhand,
is
comprised ofonly
one routine.Interface design
and graphic processordesign is discussed
in
depth
in
Architechural
Design
23
USER
PART
FILES
AND
COMMAND
FILES
SOLID
MODELING
SOFTWARE
SYSTEM
(PADL-2)
IGP
vUSER
INTERFACE
GRAPHIC
PROCESSOR
ll
DEVICE
INTERFACE
[,
DISPLAY
DEVICE
DISPLAY
LIST
DATA
FILES
Architechural Design
24
USER
User In
putData
Transformed
Data.
Clipped Data
-a o
o
t > C
o
O
DISPLAY LIST
DEVICE
-*Opcodes&Coords
Architechural
Design
25
o ra
t:
(D
<D w
r> o.
<2
o
tr
03
-C
O
CD
h_
rj o
55
CO
v 3
4
INTERFACE DESIGN
4.1. User
Interface.
The
IGP
userinterface
allowsinteractive
accessto
the
graphicprimitives provided
by
the
graphic processor.It
has
4
levels
offunctionality
as shownby
the
structure chartin
section3.5.
4.1.1.
Level 1.
Level
1
is
the
main program which promptsthe
userfor input
that
defines
the
world coordinate system ofthe
window.The
main programcan call
any
ofthe
level 2
procedures.With PADL-2
it
is
necessary
to
erase command
lines
from
screen whenentering
IGP.
This is
done
by
the
main program.
This
section of codemay
needto
be
rewrittenif IGP
is
used with otherSM
systems.4.1.2. Level 2.
Level 2
has
ten
procedures.MAIN_MENU
is found in
the
main program code while all otherIGP
procedures existin
the
Pascal
moduleknown
as coremod.MAIN_MENU
erasesany
previous messagesfrom
the
screenby
calling the ERASE_MENU
level 2
procedure,
and poststhe
main menu atthe
location
specifiedby
the
ALPHANUMPOS level
2
procedure.The
main programthen
waitsfor
the
userto
make an appropriate,selectionfrom
the
menu.The
program willterminate
if
the
user choosesthe
exit option.Interface
Design
27
IGP
writes messagesin
an areathat
is just
underneath anengineering
drawing's
border.
In
this
way
the
messages areleast
likely
to
interfere
withthe
drawing
itself.
If
it is
desirable
to
changethe
area where messages arewritten, the
valuesfor
the
constants alpha andbeta
may
be
changed.If
the
user makes aninappropriate
selectionin
any
ofthe polling
loops,
the
ERROR_MESSAGE
proceduredisplays
an error message and redisplaysthe
main menu until an appropriate selectionis
made.The
WAIT
procedure causes adelay
to
occur whenever a messageis
displayed
to
allowtime
for
the
userto
readit.
Any
time the
useris
askedto
input
a realnumber, the
GET_REAL
procedure readsthe
input
value as a characterstring,
and checksto
seeif
it is
validbefore
converting
it
to
a real number.This
mustbe
done
because
if
the
value were read as a real number andthe
userinput
acharacter
string, the
IGP
program wouldabnormally
end.Instead,
if
the
userinput
is
notvalid,
the
proceduremerely
displays
an errormessage and asks
for
the
userto
input
the
correct value.The
DELETE_ELEMENTS
procedure allowsthe
userto
delete
graphic elements
that already
exist.The
useris
promptedfor
the
number of
the
elementto
be deleted.
After
an appropriate valueis
input,
the corresponding
elementis
highlighted,
andthe
useris
askedif
that
elementis
the
onethat
shouldbe deleted.
If
the
answeris
"yes",
the
elementis
deleted,
andthe
next sequential elementis
highlighted
for
deleting.
If
the
user answers"no",
the
highlighted
element will notbe
deleted,
andthe
delete
loop
will continueto
the
next sequential element.The
user can escapethe
delete
loop by
choosing the
exit optionfrom
the
menu.Two
proceduresin
the
userinterface
act as aninterface
to
permanent storage.
They
areSAVE.DRWG
andUSE_OLD_DRWG.
The
procedureSAVE_DRWG
saves adrawing's
display
list
to
the
hard
disk,
andUSE_OLD_DRWG
copies anexisting
drawing's
display
list
to
the
program'slinked
display
list.
The
CREATEJELEMENTS
procedureis
the gateway to the
level 3
procedures.
First
the
create menuis displayed
and,
afterthe
userInterface Design
28
create menu offers
the
user7
choices:creating
points,
creating
lines,
creating dimension
lines,
creating
circles,
creating
text,
creating
aborder,
andexiting
back
to
the
main menu4.1.3.
Level
3.
Level 3
procedures are called whenthe
user makes an appropriateselection
from
the
main menu.PLACE_POINT
places a point atthe
specified
location
onthe
screen.DRAW_LINE draws
aline
between
the
specified end points.
DRAW_DIM_LINE draws
adimension line
between
the
specified end points.PLACE_TEXT
places specifiedtext
ata specified
location.
These
four
procedures call onlevel 4
proceduresto
carry
outtheir tasks.
A
facility
for
drawing
circlesis
also providedby
IGP.
The
DRAW_CIRCLE
routine usesthe
line
drawing
facilities
providedby
the
graphic processor
to
approximate a circleaccording to the
algorithmfound
on pages51-2 in [BERG86].
The
CIRCLE_DRAW
routine acceptsa radius and a center point
location
from
the
user anddraws
a circle.It
also calls onlevel
4
procedures.Other
level
3
proceduresdo
not call onlevel
4
procedures.REPORT_COORDS
gets coordinatesthat
areinput
by
the
userthrough
the
screen cursor.KBD_INPUT
accepts absolute coordinatesfrom
the
keyboard.
DELTA_INPUT
acceptsdelta
coordinatesfrom
the
keyboard.
DRAW
FORMAT
draws
aborder
andtitle
block
onthe
screen.4.1.4. Level 4.
PLACE_POINT
callstwo
level 4
procedures.KYBD_PT
places apoint at a
location
specifiedby
keyboard input
andSCREEN_PT
places apoint at a
location
specifiedby
screeninput.
DRAW_LINE
also callstwo
level
4
procedures.LINE_BY_POINTS
accepts
only
end points asinput
to
drawing
lines,
andInterface Design
29
lines.
DRAW_DIM_LINE
calls each ofthese
sameline
drawing
procedures plus an additional procedure called
DRAW_ARROW.
This
procedure
takes
the
first
end point ofthe
line
andthe
delta
coordsto the
second end
point,
calculatesthe
angle usedin
the
transformation,
anddraws
the
arrowheads
atthe
first
end point.DRAW.CIRCLE
callstwo
level
4
procedures.KYBD_CIRCLE
places a circle at a
location
specifiedby
keyboard
input
andSCREEN_CIRCLE
places a point at alocation
specifiedby
screeninput.
PLACE_TEXT
callsfour level
4
procedures.EAP.TEXT
lets
the
userenter
the
correcttextual
information
and placethe
text using the
KYBD.TEXT
andSCREEN_TEXT
procedures.KYBD_TEXT
acceptsthe
location for
the text
from keyboard
input
whileSCREEN_TEXT
accepts
the
location for
the text
from
screeninput.
TEXT_SIZE
allowsfor
specifying the
size ofthe text that
willbe
entered and placed.4.2. Device Interface,
The
device
interface
is
the
UPDATESCREEN
procedure whichinterprets
adpu
instruction
and sendsthe
appropriate opcodes andcoordinates
to the
device.
Presently
this
procedureis
writtenspecifically
for
aVT-240
device
whichinterprets ReGIS
codeto
produce graphicoutput.
To
utilize adifferent
device,
this
procedure mustbe
rewritten aswell as parts of
two
other procedures:RESETVARS,
andALPHANUMPOS.
This
satisfiesdevice
interface design
goals ofdevice
5
GRAPHIC PROCESSOR
DESIGN
5.L
Graphic Primitives.
The
graphic primitivesbased
onthe
Core
standard arethe
basic
drawing
facilities
that
IGP
provides.These include
four
areas:locating
the cursor,
drawing
points,
drawing
lines,
andwriting text.
5X1.
Locating
the
Cursor.
Core
allowsfor
a current positionto
be
maintained at alltimes.
"It
takes
on valuescorresponding to the
currentlocation
of animaginary
stylus
in
world coordinatespace"
[FOLE82].
The
world coordinatespace contains
the
conceptual user coordinate system.For
afurther
discussion
of coordinate space and coordinate systems see section5.2.
Current
positionis important
for
the
initial
placement of graphicoutput primitives.
It is
necessary to
have
afacility
to
allowthe
currentposition
to
be
movedto
a specificlocation before
displaying
a graphicelement.
In
IGP,
this
is
accomplishedthrough
the
use ofthe
MOVEABS2,
andMOVEREL2
routines.MOVEABS2
allowsthe
currentposition
to
be located
in
absolute world coordinates whileMOVEREL2
allows a new current position
to
be
located
relativeto the
old currentposition.
5.L2.
Drawing
Points.
When
creating
precisiondrawings it
is
sometimesnecessary to
placeGraphic Processor
Design
31
a point
in
world coordinate spacefor future
reference.IGP
providesthe
POINTABS2
andPOINTREL2
routinesfor
this
purpose.The former
accepts absolutepositioning
coordinates andthe
latter
relative coordinates.These
routines alsohandle
clipping
ofpoints,
whichis
arelatively
simple process.
The
coordinates of a point mustbe
checked againstthe
boundaries
ofthe
viewport.If
the
x coordinatefalls
in
the
rangedelineated
by
the
minimum and maximum x viewportvalues,
andthe y
coordinatefalls
in
the
range givenby
the
minimum and maximumy
viewport
values,
noclipping is
done.
However,
if
either ofthese
conditions
does
nothold,
then the
pointis
notdisplayed.
Clipping
is
described
in
greaterdetail
in
section5.2.2.
5.1.3.
Drawing
Lines.
Line
drawing
is
the
most usefulfacility
providedby
IGP.
The
LINEABS2
andLINEREL2
routines accept absolute and relativecoordinates
respectively,
anddraw
aline
from
the
current positionto the
location described
by
the
coordinates.The
current positionis
then
updated
to
the
new coordinates.5.L4.
Writing
Text Strings.
The TEXT2
routine causestext to
be
written onthe
screenin
graphicsmode.
A
subroutineincluded in
this
routineis
TEXTCLIP,
which clipstext
that
starts at a cursor position outside ofthe
boundary
ofthe
visibleportion of
the
display.
Clipping
is described in
greaterdetail in
section5.2.2.
5.2.
Windowing.
A
discussion
ofwindowing
mustfirst
start with adefinition
ofthe
coordinate space associated with
the
Core
graphic standard.The
userGraphic
Processor Design
32
normalized
device
coordinate systemby
the
graphic application routines.Normalized device
coordinates arenecessary
in
orderfor
IGP
to
be device
independent.
This
allows a conceptualIGP
to map to
a conceptualdevice
which
is
then
mappedto
the
specificdevice
being
usedby
the
device driver
(see Figure
5-1).
USER
IGP
DEVICE
VIEWING
CLIPPING
WINDOW
VIEWPORT
SCREEN
TRANSFORM
WORLD COORD.
NORMALIZED
SYSTEM
DEVICE
COORDS
DEVICE
COORDS
Figure 5-1
.Mapping
ofIGP
coordinatesystems.5.2.L
Windows
andViewports.
The WINDOW
routineis
responsiblefor
defining
the
coordinatesystem while
the
VIEWPORT2
routineis
responsiblefor
defining
the
boundary
ofthe
visibledisplay.
Elements
are clipped atthe
boundary
specified with
VIEWPORT2.
The
windowis
setinteractively
by
the
user whenIGP is
first
entered.The
viewportis
setby
the
application programmerin the
RESETVARS
routine.
This
willbe different
for different
devices
andSM
systems,
depending
onhow
much ofthe
screenis
usedfor
graphics.If
not all ofthe
screenis
used,
the
other part canbe
usedfor
menus and messages.With
PADL-2,
the
entire screenis
neededfor
graphics soVIEWPORT2 is
set
to
min. x =0,
max. x =1,
min.y
=0,
max.y
=1.
Also,
the
menuis
placed on
the
line just below
wherethe
border is
drawn
using the
format
Graphic
Processor Design
33
5.2.2. Clipping.
Before
an element canbe
displayed
onthe
screenit
mustbe first be
checked and clipped
if
necessary.This is
animportant
facility
to
include
because
if
the
viewportis
defined
asbeing
less
than the
actual screenitself,
then
it
is
possiblefor
elementsto
appear outside ofthe
viewportif
they
are not clipped.The
three
kinds
of graphic elementsthat may
require
clipping
arepoints,
lines,
andtext.
Clipping
of points andtext
were
discussed
earlier.5.2.2.1.
Clipping
Lines.
Line
clipping
is
done
by
the
CLIPPER
routine whichis based
onthe
Cohen-Sutherland
clipping
algorithmfound
on pages148-9
of[FOLE82].
While
Foley
andVan Dam
advocatethat the
algorithmbe
used
to clip
lines
atthe
window,
IGP
variesfrom
this
in
that clipping
is done
atthe
viewport.This is
necessitatedfor
large
softwarepackages such as
IGP
because
with viewportclipping the
mechanismof object
building
is
easierto
manage.Therefore
the
algorithm usedin
IGP
follows
aslightly
different format.
After initialization
ofvariables,
CLIPPER
uses a subroutine calledOUTCODES
to
assign afour-bit
outcodeto the
first
endpoint ofthe
line
in
question.The
outcodes arebased
onthe
nine regions shownin
figure
5-2.
Each
bit
in
the
outcodeis
setto 1
(TRUE)
if
a given relationbetween
the
endpoint and viewportis
true:
Bit
1
pointis
aboveviewport,
Bit
2
pointis
below
viewport,
Bit
3
pointis
to
right ofviewport,Bit
4
pointis
to
left
ofviewport;Graphic
Processor Design
34
1001
1000
1010
0001
0000
0010
0101
y
/
/
0100
01 10
Viewport
Figure 5-2.
End
pointoutcodes.After
an outcodeis
assignedto the
first
endpoint,
OUTCODES
is
called upon again and
the
processesis
repeatedfor
the
second endpoint of
the
line.
The
nextstep
is
to
determine
if
the
line
canbe
trivially
rejectedbased
onits
outcodes.Trivially
rejection occursif
the
line
is
completely
outsidethe
viewport.In
this
case,
nothing
moreneeds
to
be done.
The function REJECTCHECK
providesthis
facility.
If
the
line
cannotbe
trivially
rejected, then
its
outcodes are checkedby
the
ACCEPTCHECK
function
to
determine if it
canbe
trivially
accepted.Trivial
acceptancehappens if
the
line is
completely
inside
the
viewport.If
this
is
the
casethen the
line
canbe
drawn in its
true
form
asdescribed
by
its
endpoints.If
the
line
canbe
neithertrivially
rejected or acceptedthen
atmost,
one endpoint
is
inside
the
viewport.If
the
first
endpointis found
to
be
inside
the
window,
then
the
subroutineSWAP is
usedto
exchangethe
Graphic
Processor Design
35
viewport.
This
simplifiesthe
remainder ofthe clipping
routine whichperforms a subdivision a