CA2055545A1 - Enhanced computer aided design system - Google Patents

Enhanced computer aided design system

Info

Publication number
CA2055545A1
CA2055545A1 CA002055545A CA2055545A CA2055545A1 CA 2055545 A1 CA2055545 A1 CA 2055545A1 CA 002055545 A CA002055545 A CA 002055545A CA 2055545 A CA2055545 A CA 2055545A CA 2055545 A1 CA2055545 A1 CA 2055545A1
Authority
CA
Canada
Prior art keywords
color
short
face
struct
nov
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
CA002055545A
Other languages
French (fr)
Inventor
Liangpin Chen
Xingzhang Frank Niu
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dassault Systemes of America Corp
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Publication of CA2055545A1 publication Critical patent/CA2055545A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Abstract

ABSTRACT

Disclosed herein is a design system for designing, dynamically changing and displaying design drawings. The invention allows a user to select a solid object from a display as the current, active object. The user then selects a first, parent face by selecting any point on a face of the solid object. Next, the user is prompted to select another point on a line of another face parallel to the first face. This operation defines the first offset face which is a variable distance from the first parent face.
Subsequently, the user selects a point on a line to define a second parent face of the solid object. Then, the user selects a point on a line parallel to the second parent face. This defines the offset face and a corresponding distance between the two faces which is a fixed value.
Finally, the user is prompted to enter a new distance between the first parent face and the first offset face. This new value is used to generate a new solid based on a change to the variable distance between the first two faces and a corresponding shift in the location of the fixed distance between the second pair of faces and a resulting modification of the surface.

Nov. 26, 1990 SA9-90-085

Description

2 ~

ENHANCED COMPUTER AIDED DESIGN SYSTEM

Field of the Invention This invention generally relates to improvements in computer aided design (CAD) systems and more particularly to a technique that correlates relationships between different parametric entities to enhance a CAD system.

Background of the Invention In CAD applications, it is important to be able to transform two-dimensional representations of objects into solid representations. The automobile and aircraft industries were two of the first to exploit this function for mechanical assemblies. Examples of general CAD systems are lS disclosed in us Ratents 4,962,472; 4,849,913; and `4,912,664. ' US patent 4,849,913 discloses a method for the design and construction of composite parts by logically determining the geometric definitions ~0 for each ply contained in the composite part.
This information can be used by subsequent analysis routines to determine the optimal method for manufacturing the part. Thus, the physical relationship of each of the parts and their correlating features are available-for use by the system. However, the CAD system does not have any ability to dynamically alter the dimensions Nov. 26, 1990 Page 1 of 7G SA9-90-085 of a solid based on a change in distance between ; a plurality of faces.

A face is used to refer to an unbounded plane. Unbounded refers to the fact that no limits are placed on the plane dimensions. A
loop is a bounded area of a face. Boundary elements comprise the loop. For example, the four lines forming the edge of the plane are boundary elements. A Vertex is an endpoint of an edge. Vertices are calculated by finding the intersection of three (3) intersecting plane equations. A loop table contains information defining all the loops contained in the solid object.

The subject invention overcomes the need to pre-program relationships between CAD geometries and allows a user to dynamically aLter a solid geometry on the basis of changes made in a face.

Summary o~ the Invention ;.
It is thus an object of this invention to -~
provide an improved apparatus and method for designing, dynamically changing and displaying three dimensional solid representations.

The invention allows a user to select a solid object from a display as the current, active object. The user then selects a first, parent face by selecting any point on a face of the solid object. Next, the user is prompted to Nov. 26, 1990 Page 2 of 76 S~9-90-Og5 2~ 3 select another point on another face parallel to the first face. This operation defines the first offset face which is a variable distance from the first parent face.

Subsequently, the user selects a point on the first offset face to redefine it as a second parent face of the solid object. Then, the user selects a point on a face parallel to the second parent face. This defines a nested relation between two parent/offset paixs which are parallel to each other.

Finally, the user is prornpted to enter a new distance between the first parent Eace and the first offset face. This new value is used to generate a new solid based on a change to the varia~le distance between the first two faces and a corresponding shift in the location of the fixed distance between the second pair of faces `
and a resulting modification of the solid.
.
Brief Description of the Drawings Figure l is a block diagram of a computer in accordance with the present invention;
., ~
Figure 2 is a flow chart of the solid logic in accordance with the present invention;

Figure 3 is a flow chart of the solid logic for a tapered solid in accordance with the present invention;

Nov. 26, 1990 Page 3 of 76 ~A9-90-085 . . . . ~ . . . . ..

2 ~

Figure 4 is an illustration of the steps used to generate an extruded solid in accordance with the present invention;

Figure 5 is an illustration of the steps : 5 used to generate an extruded solid in accordance with the present invention;
;
F`igure 6 is an illustration of the steps used to generate a tapered solid in accordance with the present invention;

Figure 7 is an illustration of a step used : to generate a tapered solid in accordance with the present invention;

Figure 8 is an illustration of a set of steps used to generate a tapered solid in : 15 accordance with the present invention;

Figure 9 is an illustration of a pair of two dimensional drawings in accordance with the present invention;

Figure 10 is an illustration of a solid model in accordance with the present invention;

Figure 11 is an illustration of the parameter function menu options in accordance with the present invention;

.

Nov. 26, 1990 Page 4 of 76 SA9-90-085 Figure 12 is an illustration of correlating parametric entities in accordance with the present invention;

Figure 13 is a flowchart describing the logic of defining relationships between the faces of a solid object in accordance with the subject invention;

Figure 1~ is a flowchart describing the logic of the No Show function in accordance with the subject invention;

Figure 15 is a flowchart of the loglc implementing the defining a parent face in accordance with the subject invention;

Figure 16 is a flowchart of the logic implementing the defining an offset- face in accordance with the subject invention;

Figure 17 is a flowchart of the logic implementing the Change Parameter function in accordance with the subject invention;

Figure 18 is a flowchart depicting the logic of the shading surface normal in accordance with the subject invention;

Figure 19 is a flowchart depicting the logic of the rearranging surface data in accordance with the subject invention;

Nov. 26, 1990 Page 5 or 76 SA9-90-0~5 ~ ^3 Figure 20 is an illustration of a reverse normal of a top surface in accordance with the subject invention;

Figure 21 is an illustration of a select side surface display in accordance ~ith the subject invention;

Figure 22 is an illustration of a reverse normal of a side surface display in accordance with the subject invention;

Figure 23 is an illustration of a reverse normal o~ a front surace in accordance with the subject invention; and Figure 24 is an illustration of defracted light from a display in accordance with the subject invention.

DETAILED DESCRIPTION OF T~E INVENTION

With reference to Figure 1, the apparatus of the subJect invention is a standard microprocessor such as that marketed by IB~ under the product name of PS/2*. The CPU 10 can be an 80386 or 80486 processor for example. The CPU 10 has Direct Memory Access (DMA) to the RAM 20, Disk 30 and Diskette 40. The CPU 10 can also transmit information via the Communication Link 50.
* Registered trademark Nov. 26, 1990 Page 6 of 76 SA9-90-085 ~ r The CPU 10 also communicates to an attached graphic display to display information in EGA, VGA or other higher resolution modes. A mouse 70 is an optional cursor pointing device that is used to supplement the arrow keys of the keyboard 80 for specifying precise pointings on the graphic display 60. The keyboard is controlled by a keyboard adapter 82, including buffer means, in the CPU 10. Finally, a printer or plotter 89 can be attached to the CPU 10 to generate hardcopy of drawings.

The software used to awalce the unique hardware features of this invention resides on the Disk 30 as do the drawingc; generated by a designer employing the invention. The software is also responsible for translating signals from the mouse/keyboard into appropriate system actions.

Figure 3 is a flowchart representing the logic in accordance with the invention. To generate a solid from a two dimensional drawing, the drawing is first loaded into the computer memory as shown in function block 200. The drawing should contain multiple two dimensional views of an object. The user then selects the appropriate menu selection item as depicted in input block 210. Then, the user selects elements to form a profile for the extrusion operation as ` depicted in input block 2Z0. The elements are lines and circles on the two dimensional views from which to generate the solid model. The Nov. 26, 1990 Page 7 of 76 SA9-90-0 pointers to the selected elements are stored in the data structure set forth below.

/~
. PART V - The tempornry records for keeping 2D elements ............... ,.. ,.,.. ,.. ,.. ,,.. ,....................................... ~
: option: 1- extru3ion 2- taper : 3- pyrlmid ~1- rotntion ~ oper3tion:
: l- 3dd -1- subtr;lce ~ tipl21 : n tempornry cnùnm pointer to 3 point of n pyrnmicl (not used) : tront, bnck: record front fnce nnd bnck fnce pointar tpointer to line) 2 0 : mlmbclry : numbor of boundnry segmonts in ~ho bcll y nrrny : bdry : pointer to line nnd circlo : bdryl bdry2: only c3se 2 will use both indox ( for tnper only ) rest of the c~ses use bdryl :.......... ...
..................................................... ~,'.' IDENTIFICATION:
: AUTHOR .. ALLEN CHEN
3 0 DATE ...... 10/lfi/89 :....................................................................

struct bdrytype short numbdry;
short bdry[maxbdry]~21;
};
struct fr;~metype Nov. 26, 1990 Pa~e 8 of 76 SA9-90-0~5 ~ , . ,~... .

short option;
~hort operntor;
short frontl21, b~ckl21;
short tipl21;
struct bdry~ype ~ bdryl;
struct bdrytype ~ bdry2;
};
struct fi1m short numSr: m~;
~truct frnmetyp~ ~ tr:~m~¦mi~xfrnme¦;
};
The geometric elements are selected in a clockwise or counter-clockwise sequence. When all of the necessary elements have been selected, then menu item END is selectecl to indicate completion. The data structure is used to store this information in a manageable fashion for further processing in accordance with the subject invention.
. :~
The user selects front and back cutting faces by selecting lines in the views other than `~
the profile view as depicted in input block 230.
Next, the selected two dimensional elements are converted into three dimensional geometries as set forth in input block 240. So, for example, a `~ line becomes an unbounded plane, a circle becomes ~` an unbounded cylinder, and a spline becomes a ruled face. The faces are stored in the PFace data structure set forth below. -A Face Table is a list of faces that form ` the boundary of a solid. The Face Table contains , ~ Nov. 26, 1990 Page 9 of 76 SA9-90-085 ~r~r~

plane, cylinders and free form surface information. The Face Table serves a,s an interface between parametric design and the solid modeler. A PFace Table is a particular face table used for parametric design. It contains parameterized faces, a parameter table and a construction list for building a solid from the faces. A construction list contains a description of how each part of the solid is created and what faces are used to form the component.

= ============================
; PART I - CONST~tNT DEFINITIONS FOR FACE T.~.llLE
~
#define FSIZE 200 #def ne MXSIZE 20 #denne mnxbdry 100 #defne m~xfr~me 100 #defne VARSIZE I00 /~=====================================================
~ .
2 5 PART II - THE FACE TABLE l: PARA~tETRlC TABLE
~...................................................................
: PF;lce F;~ceType:
1- Pl;~neF;~ce subtype funcition : --_ -- - ___ _ _ __ _ _ ___ O ori~in~l pl:~ne f;lce define orfset pl:~ne, define: pointer to v;lri:~ble tnble ;~ : which defines the Nov. 26, 1990 Page 10 of 76 SA9-90-OS5 offset Yaiue or formuia 2 rngled face 11 derne chamfer plane 2- Circular Cylinder subtype funcition -- ---- -- __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ O original Cylinder, define3 xy and R
0 : 1 define offset cylinder, define dR
2 define locntion 11 clefine round 12 dofine fillet :3- ConicFace
4- RuledFrce
5- FreeFormFace x- Arc dermo cylinder mlmber, Al, A2 ...........................................................
Fcode - m:lrk the u9;)ge of the fnce bit 1: solid faces :2: construction frces 3: syDmetric faces (shnll be defined by its children) 4: datum f~ce (??? unknown yet) note: bit map 15,14,13.. 3,2,1 :
: ModVar - count how many Yar were changed, indicrte the necessity of updating Var 3 5 : table by bringing SmallTalk parser not implennented in current Yersion.

............................................................
4 0 struct PlaneSym pair: stores the other symmetric face to the base base: the base face ;.. ~

Nov. 26, 1990 Pa~e 11 of 76 ~A9-90-085 , ~ ,, .

3 ~ ;~

struct PlaneChm : pl,p2,pw - pointer to pl3ne f3ce9 vi,v2 - pointer to v3ri3ble table ...........................................................
; struct Parameter mode - 1: v~luc :~
2: text , ~1 #de0na ORGPLANE 0 #define OFFPLANE 1 #de0ne SYI-IPLANE 2 #deOno CHMPLANE 11 struct Pl3neOr~
{
doublo A, B, C, D;
'` );
struct Pl3neOff {
short base; ' `
, short v;~rid;
.~ };
3 0 struct Pl3neSym : {
short b3se, p3ir;
: short v3rid;
.' }i ` 35 .` struct Pl3neChm {
short pl, p2, pw;
short vl, v2;
'~ 40 };
union pl3ne_ptr {

strllct Pl3neOrg Porg;
4 5 strllct Pl3neSym Psym;

Nov. 26, 1990 Page 12 of 76 S~9-90-0~i5 struct PlaneOff Poff;
struct PlaneChm Pchm;
};
struct PPI~ne short subtype;
union plane_ptr pclsss;
};

struct PCylindcr {

double R, ~Y, Y, Al, A2, Zl, Z2;
short M~trixlndex;
short Udisp;
struct POINT ~Verticsl211131;
};
struct PCone doublo R1~ R2, .Y, Y, Al, ~'', Z1, Z";
short hlatrixJndex;
short Udisp;
struct POINT ~Vertics~2¦(13¦;
};
., .
`, struct PRuled {
short ~atrixlndex;
3 0 short Udisp;
3truct BSPLINE Bspl;
};
struct PFreeForm { int NU, NW; double ~ControlPoints[501!50~; };
struct Parameter {

ch~r L~bel¦8~;
double v;~lue;
4 0 char text¦72~;
short mode;
};
union face_ptr {

Nov. 26, 1990 Page 13 of 76 S2~9-90-085 i ~ 3 struct PPlane ' PlaneFace;
struct PCylinder ~ Circul;lrCylinder;
struct PCone ' ConicFace;
struct PRuled ' RuledFrce;
struct PFreeForm ' FreeFormFace;
};
struct PFace {
short FaceType;
short Fcode;
union face_ptr fclr,ss;
};
struct Mr trix double pl¦3¦, P2(31~ P3131. Pl(31i };
2 0 9truct PFnccs {

short NumberFaces;
short NumberMatri:c short NumborVar;
2 5 short ModVar;
struct PFace ~Face ¦FSIZE];
struct Matri~ fatri~c IMXSIZEI;
struct Par3meter 'Var IVARSIZE];
};
.~
The next step converts the PFace data structure to a Face data structure for input into the solid modeler. The Face data structure is set forth below.
/=====================================
===========
:
. PART 111 - THE FACE TABE FOR INTERFACING ~YITII SOLID MODULE

~0 : define f~ce table interface to solid Nov. 261 1990 Page 14 of 76 S~9-90-085 2 ~ 1 3 . define fnce tabl~s : Mntrixlndex stores the index eO m~trix liit : SnmeFace stores the index to the first equivnlent fnce : shnll be maintnined every time a object wns crented Matrix the arrny will st:-rt from 13 to 39.
FnceTable . FaceType: 1- PlnneFace 2- Circular Cylinder , ~ : 3- ConeFr,ce ,' : ~1- RuledFnce 5- FreeFormFace ....................................................................
: IDENTIFICATION:
.: :
2 0 : AUTIIOR .. .FRANIC NIU
: DATE .,... --/--/89 ., :
,~ ................................... ~

struct PlnneFnce {
double A, B, C, D;
` }i struct CircularCylinder {
double R, X, Y, AI, A2, Zl, Z2;
short Mntrixlndex;
3 5 short Udisp;
struct POlNT ~Vertics¦2¦[I3¦;
~;
struct ConeFnce {
double RI, R2, X, Y, AI, A2, Zl, Z2;
short Mntrixlndex;
short Udisp;
strllct POINT ~Vertics¦2¦¦I3¦;
};

.:
Nov. 26, 1990 Page 15 of 76 S~9-90-085 ~

2 ~^3~

struct RuledFace {
short MatrixIndex;
short Udisp;
struct BSPLINE Bspl;
};
struct FreeFormFrce { int NU, NW; double tControlPoints¦50¦¦50 struct FaceTable short F;~coTypo;
struct Pl~neFnco 'PlnnoFi~co;
struct CirculnrCylinder ~CirculnrCylindor;
struct ConoFr~ce tConeFnco;
struct RuledFace RulodFnco;
struct FreeFormFaco ~FreeFormFnco;

struct Fncos short NumberFncos;
short NumberMatrix;
2 5 struct FacoTable tFnceTable ¦FSIZE¦;
struct M~trix ~Matrix (MXSIZE:I;

Then, the Face data structure is input into the solid modeler to perform the extrusion taper operation as illustrated in function block ~60.
The attached data structure is used in the performance of this task.

1~=================== :

3 5 : PART IV - The construction treo : componont list Nov. 26, 1990 Page 16 of 76 SA9-90-085 2l~ 3 : . oper~tc,r: 0 disabled component I add component -1 substract component ~'~ 5 : . component type: 1 extrusion 2 taper 3 pyr~mid 4 rotataion ....................................................................
ID~ENTIFICATION:
: AUTHOR ....... ALLEN CIIEN
DATE ........... 10/15/89 .................................................................

struct OnoComponent 3hort option;
3hort operator;
2 5 short numbdry short boundarylmaxbdry~
short front, back;
, }i :
3 0 struct Comphd short NumberGomponent;
3trl~ct OneGomponent `! component¦m3xframel; :
)i : ~
Finally, the solid object is displayed on the graphics display as shown in output block 270.
- The attached listing is the source code used to implement the various transformations and dlsplay of graphic information.

Nov. 26~ 1390 Page 17 of 76 S~9-90-085 . . . . ~ . ~, , .

2 ~

' Common }lender fi1es /
#include <mnth.ll>
#include ~malloc.h>
#include "3deml.f' #include ~3dutl.r #include ~3dmil.f' ~incluùe~units.h"
#include ~bspline.h"
~incluùe ~pnr~m.h"
*incluùc~stb.h~

Herder Gles for C_gm_telslcl() /
#incluAe~fkgp3d.h"

~lcndr~r rlles for C_gm_tr8ld3xt) '/
#include~gt3d.h~

DeGnitions for C_gm_telsld() 1 .
#define C)rgplnne fclass.PlnneFare->pclnss.Porg ~define Cylinder fclnss.CircularCylinder #derme ConFace fcl~ss.CollicFnce i' DeGnitions for C_gm_trsld3x() /
#deGne Or6Plnne fcl~ss.PlimeFnce-~pclnss.Por6 ' Functioll decle;-rntion9 for C_gm_tclsld() /
stntic void C_gm_I_rcmnke_ABCD ( sllort, double¦¦, 4 0 dollble, dollble, double, double, N o v . 2 6 , 19 9 0 P a ~ e 1 8 o f 7 6 S A 9 - 9 0 - 0 8 5 2 ~

double-, double~, d~uble', dollbler );
static ~oid C_gm_1_rcmake_matrix ( short, doublPII, double¦¦[3¦, double¦¦¦3¦ );
DtatiC void C_gm_2_point_on_plane( double, double, dollble, dollble, double, double, dollble, double~, double`', double- );
static void C_gm_2_rot~te_point ( doublell, doublell, doublell );
static void C_~m 2_mirror_point ( doublel], doublell, double~

Function dcclcarations for C_gm_trslcl3x() /
short C_trplnorm( short, double 1] doublell, double, doublo 11 doublo ~);
short C_trmxab ( doublell,doublel!,doublell,dollblel~,dollble¦l) short C_trmxlc ( doublol~,dollblall,dollblell~dollblell,dollblell);

¦Function Nslmel iret = C_gm_telsld ( iopt, tdata, solid_ptr ) 2 0 ~ ¦Category]
Geometric Calculation ( Tr~nsl~tion of element ) , IDescription Transform SOLID

# ¦Pnrameters~
(i) short iopt -- Processing Option ~`
1: Transl3tion (Move) 2 Mirroring 3 3: Rotrtion 4: Scaling (i) double tdata~ -- D3ta for Translation iopt=l => tdata¦3¦ DX,DY,DZ
3 5 " iopt=2 => tdata¦l2~ Dat ~ of Mirror Plane iopt=3 => tdata¦7~ X,Y,Z (Point on Axis) A,B,C (Vextor of Axis) ANG (Rotation Angle) iopt=~ => tdatal~l X,Y,Z (Center of Scale) 4 0 SCL (Sc ~ling E`;lctor) , Nov. 26, 1990 Pag~ 19 of 75 S1~9-90-0~35 2 ~

(i) short aolid_ptr¦2] -- Pointer of Solid ,In) ; ; (o) short iret -- Retl~rn Code (O:OK, I:Error) S ~ ¦Extern~l Vrrinbles¦
struct PFaeeD PFnees struct Comphd CompList ¦Crlllsl 0 ~ Retv_Solid ( defpnrrm.e ) Q_subtype '' Q_Pl~no_ABCD ( "
SAve_Prrnmeters Snva_Solitl ( "
~ del_ 901icl_ polygons ( enterstl.e ) ,~ IRestrictionj ¦Algorithm 1. Got fneo tnble from elmptr 2. Trnnsform f:~eo tnblo 3. Tr3n9form working plnne 4. VrJiùnte the trr~nsformed solid 2 5 `' 5. Ss~e the transfomed solid . ~
Crented by ... .Eiji Naknno 3 0 ~ Dnte ........ 2/23/90 . ~ hlodifled by ........... .Allen Chen 3 5 ~ V3te ........ 13/25/90 Nnture(#1) .. .Chnnge stb.h and pr,rnm.h '' Modifed by ... .Allen Chen D~te ........ 10/3/90 4 0 Nnture(#2) .. .Ilse locnl v~rinbles (PFnces, Solid, Complist) copy solid is n special cnse, done by cpysld() in solidmi.c .
Fix error in sc~lling fnce tnble nnd workin~ plr~ne.

Nov. 26, 1990 Page 20 of 76 S~9-90-0~5 . ~ ~

~5~

short C_Bm_telsld( iopt, tdilt~, solid_ptr ) short iopt;
short solid_ptr¦~;
dollble td:-ta~l;
{

char snamell281;
ch;~r Ibl(8¦,str¦72¦;
short fid,stype;
short Itypo;
short iret;
short i;
8hort ihdst:~¦10¦;
short pid,tnodo;
double v~lue;
double A,B,C,D;
douùle AA,BB,CC,DD;
doublo no~v_m;~trix~ 31, old_mntrixl11131;
struet PFneeD ~PF~c09;
struet Comphd ~CompList;
struet SolidT;ble ~Solid;
PFaee3 = (struct PFaces ~) mslloc (sizeof (struct PF~ces));
if tPF~ees == 0) return 200;
CompList = tstruet Comphd ~) m~lloe (sizeof(struct Comphd));
if (CompList == 0) {

free(PF~ces);
r;turn 200;
3 0 Solid = (struct SolidT~ble ~) ml~lloc (sizeof(struct SolidT3ble));
if (Solid == O) {
free(PF~ce8);
free(CompList);
return 200;
}

ihd:lta¦O¦ = O; ~
Ret~_Solid( solid_ptr, PF;~ces, CompList, sn;lme );
for( fid=l; fid~=PF/ce9->NumberF~ccs; fid~

Nov. 26, 1990 Page 21 of 76 SA9-90-085 s l~ ~

ftype = PF~ces->Face¦fid¦->F:IceTypo;
/~ plnne '/
if( ftype == I ) {

- - - - -- - --: Allen Chen 10/9/90 0 : offset f;~ces sh311 be sc~led with sc:~ling vnlue :..........................................................
/
Q_subtype( PFDce9, Gd, ~t:stype );
if ( stype l= 0 ) if (iopt == ~) ( iret = Q_OffFace(PF3ces,fid,~:pid,1bl,b:v;~1llo,3tr,~modo);
if (iro~ == 0) v31lle ~= td:lta¦31;
iret = I`,lod_OffF;Ice((short)l,PFllces,pid,Gd,value,str);
}
}
else -~
{
Q_Plane_ABCD( PFnces, fld, &A, ~I:B"~:C, &D );
3 0 C_gm_1_rem:?,ke_ABCD( iopt, td;ltil, A, B, C, D, ~:AA, l:BB, &CC, &DD );
PFaces->F3celrld]->OrsPlane.A = AA;
PFnces->Face[fidl->Or6Plane.B = BB;
PFaces->Face¦fld~->OrgPlrne.C = CC;
PFace9->Face¦ad¦->OrgPlane.D = DD;
}
/~ cylinder or conic rnd sc~ling ~/

else if( (ftype == 2 ¦¦ ftype == 3) ,C~,~ iopt ==
{

/~ cylinder '/

Nov. 26, 1990 Page 22 of 76 SA9-90-085 2 ~

if( ftype == 2 ) ~
{

PFnces->Face¦nd¦->Cylinder->R '= tdnta[3¦;
PFnces->F~ce[fldl->Cylinder->X ~= td~t3[3l;
PF3ces->Fnce(fidl->Cylinder->Y `'= td:~t;-[3¦;
: ' t ~
/~ conic '/
/~
else if( ftype == 3 ) { PFaces->F;~celndl->ConF3ce->RI = td;~tnl31;
PF;Ices->Fncolrldl->ConFnco->R2 = tdnt3l3l;
PFnces->Fncelrldl->ConFacc->X = tdnt3[3l;
PFnces->Face~adl->ConF3ce->Y ~= tdnta[31;
'~ }
} :
for( i=l; i~=PF3ce-->Numbor~3trix; i-l + ) C_ut dpato( 3, PFnces->M:~trixlil->pl, old_m3trix¦0¦ );
C_llt_dpsto( 3, PFrces->Matrixli~->p2, old_m~trix¦l¦ );
C_ut_dpsto( 3, PF~ces->Matrix[i]->p3, old_matrix¦2] ); ~`~
C_ut_dpsto( 3, PFaces->Matrix¦i]->p4, old_mntrix¦3] );
C_gm_1_rem3ke matrix( iopt, tdata, old_matrix, new_matrix );
C_ut_dpsto( 3, new_matrix¦0], PFaces->MDtrix¦i~->pl );
C_ut_dpsto( 3, new_m;~trixlll, PFaces->M~trix~il->p2 );
C_ut_dpsto( 3, new_mntrix[21, PF~ce~-~Mntrix(i¦->p3 );
C_ut_dpsto( 3, new_m3trix¦3~, PFnces->Mntrix[i¦->p4 );
3 0 }
,~ / .... ~.. ,.. ,.. ", : Allen Chen 10/2/90 : option I is replacing the model block with the new d3ta.
: See ~solidmi.c" for details.
:.
~
iret = mksolid (PFaces, CompList, Solid);
` if (iret == 0) iret = C_mi_sdstore ((short)l, PF3ces, CompList, sn~me, ihd3t:~, solid_ptr );
4 0 C_sd_cpft3ble(PF3ces);
C_sd_ccompl(Con~pList);
FreeSolid (Solid);
free (Solid);
.
Nov. 26~ 1990 Page 23 of 76 s~9-90-0$5 2 ~

free (CompList);
free (PFnces);
if (irct l= 0) ir&t = 1;
return( iret );
}

====================================================
=====================
st~tic void C_gm_1_remnke_ABCD( iopt, tdatn, A, B, C, D, AA, BB, CC, DD ) : mnkc ncw plnno clnt:~ from olcl plnno clntn : input short iopt --- 1 movc 2 rnirror 3 rot;~tc : 1 scnlQ
double tclntn~ Dntn for Trnnslntion iopt=l => tdntn¦3¦: DX,DY,DZ
iopt=2 =~ tclntnl121:Dntn of ~lirror Pl~mo iopt=3 =~ tclntn[7¦: X,Y,Z (Point on Axis) 2 0 A,~,C (Vextor of Axis) ANG (Rot:ltion Angle) iopt=4 => td~t~4j: X,Y,Z (Center of Sc~le) SCL (Scnling Factor) double A,B,C,D - old plane data : output double ~AA,~B8,'CC,~DD - new plnnc d~tn :.........................................................................
: Allen Chen lO/8/90 : make the vecto~ ¦AA,BB,CC~ ns unit vector :
/
stntic vr~id C_gm_1_remnke_ABCD( iopt, tdnta, A, B, C, D, AA, BB, CC, DD ) short iopt;
double td~t;~
3 5 double A,B,C,D;
double ~AA,~BB,~CC,`'DD;
double ptl~3~,pt2131,distl31;
double d;

/~ move ~/
if( iopt == 1 ) No~. 2~, 1990 ~a~e 2~ o~ 76 SA9-90-085 AA = A;
BB = B;
CC = C;
iDD = A~tdat~¦0¦ -~ B~tdata¦l¦ + C~tdat~¦2J + D;
5 }

mirror ~/
else if( iopt == 2 ) O { C_gm_2_point_on_pl;lne( A, B, C, D, 0~0, 0.0, o~0, ~:ptl101, R:ptl~ ptll21 );
pt2l0¦ = ptl¦0¦ + A;
pt2¦1¦ = ptl[l¦ + B;
pt2121 = ptll21 + C;
C_gm_2_mirror_point( ptl, tdats, ptl );
C_Bm_2_mirror point( pt2, td;~t~, pt2 );
'.U~ = pt21ol - ptl101;
i8B = pt3¦1J - ptl¦l¦;
~CC = pt21~1 ` ptll21;
d = sqrtt(~,tA)~ tA) 1- ('D~ ('BW) 1- (~CC)'('~CC));
'~ /= (I;
~ ~BB /= d;
,~ iCC /= d;
DD = ~AA~ptllO~ + ~BB~ptl~l] + ~CCiptl[2¦;
}
` / /
/~ rot;~t~ ~/
else if( iopt == 3 ) 3 0 { C_gm_2_point_on_plane( A, B, C, D, 0.0, 0.0, 0.0, `~ ~ptl101, ~ptlll], B:ptll2~ );
pt2~0J = ptlloJ + A;
pt2l1] = ptl[lJ + B;
pt212] = ptll21 + C;
C_gm_2_rotate_point( ptl, tdata, ptl );
C_gm_2_rotate_point( pt2, tdata, pt2 );
~AA = pt2¦0J - ptl¦0¦;
~BB = pt2¦1¦ - ptl¦l¦;
~CC = pt2121 - ptll2J;
4 0 d = sqrt((~AA)~("AA) + ('BB)~(~8B) + (~CC)i~CC));
'AA /= d;
~BB /= d;
~CC /= d;

Nov. 26, 1990 Page 25 of 76 SAg-90-085 `DD = i'AA'pt1~0] + ~BB~ptl¦ll + ~CC~ptl¦2¦;
/~7~ V~/
/~ sc;lle ~/
else if t iopt == 4 ) { C_gm_2_point_on_p1ane( A, B, C, D, tdata10], tdnta[l¦, tdata¦ql, &ptl~OI, ~:ptl[ll, ~:ptl~ql );
C_ut_dpsub( 3, ptl, tdrta, dist );
0 C ut_dpmult( 3, tdr~tn¦31, dist, dist );
C_ut_dpadd( 3, tdata, dist, ptl );
YAA = A / tdntnl31;
'BB = B / tdatr j31;
~CC = C / tdata~31;
~) d = sqrt~('AA)~('AA) + (~BB)-('BB) + (~CC)'('CC));
''AA /= d;
'BB /= d;
~CC /= tl;
'DD = 'AAYptl~01 1 ~BB~ptl¦ll -~' ~CC'ptl¦2¦;
}
}

Iy ====================================================
=====================
: static ~oid C_gm_1_remake_matrix( iopt, td~ta, old_matrix, new_m~trix ) ;~ 5 : make new matrix d:~ta from old matrix : input short iopt -- 1 move 2 mirror 3 0 : 3 rot~te 4 scale double tdata¦¦ -- Data for Translation iopt=l => tdata~31: DX,DY,DZ
iopt=2 => tdata[l21:Data of Mirror Plane 3 5 : iopt=3 => tdata~7¦: X,Y,2: (Point on Axis) A,B,C (Vextor of Axis) ANG (Rot3tion Angle) iopt=-l => tdatall~: X,Y,Z (Centcr of Scale) SCL (Scrding Factor) 4 0 : double old_matrix¦~ 3] -- present matrix : OlltpUt double new_matrix~ 3~ -- regenerrted mntrix static ~oid C_~m_1_renl:~ke_mr~trix( iopt, tdata, old_mrtrix, new_m;~trix ) short iopt;

Nov. 26, 1990 Page 26 of 76 SA9-90-085 double td~ta¦¦;
double old_m3trix¦¦13]i double new_matrixj¦¦3¦;
{

short i;
double ptll31,pt213~;
double dist¦3¦;
/'''~''''/ .
0 /' mo~e '/
if( iopt == 1 ) C_ut_dp3d(1t 3, old_m3trixl3l, tùntn, new_mntrixl31 );
C_llt_dpsto( 3, o1d_m3trixl0!, new_mntrix10¦ );
C_ut_dp3to( 3, old_mntrix~lJ, new_mntrix¦l¦ );
C_ut_dpsto( 3, old_mntrix~2¦1 new_m3trix¦2¦ );
}

t 2 0 / ~ mi rror ' /
el3a if( iopt == 2 ) { ptllOl = ptllll = ptll21 = o.o;
C_gm_2_mirror_point( ptll td3tnl ptl );
2 5 . for( i=O; i~3; i++ ) { C_gm 2_mirror_point( old_mntrix¦i], tdatn, pt2 ) C_ut_dpsub( 3, pt2, ptl, new_matrix¦iJ );

C_gm_2_mirror_point( old_matrix~3~, tdntn, new_m3trix¦3¦ );
3 0 }
/'' rotate '/
else if( iopt == 3 ) { pt1101 = ptlll~ = ptll2~ = 0.0;
C_gm_2_rot3te_point( ptl, tdatn, ptl ): -for( i=O; j<3; j++ ) { C_gm_2_rotate_point( old_mntrix¦i¦, td::lta, pt2 );
C_~It_dpsub( 3, pt2, ptl, new_m:~trix¦i¦ );
}
C_gn-_2_rot3te_point( old_m3trix¦3¦, td3t3, new_mr trix¦3J );

Nov. 26~ 1990 Page 27 of 76 SA9-90-085 ,. . , ~. ,, . ... : :.

2 ~

/~ scale /
elsè if( iopt == ~1 ) {
C_ut_dpsub ( 3, old_matrix¦3~, tdlta, dist );
C_ut_dpmult( 3, td3tal31, dist, dist );
C_ut_dpadd ( 3, tdr~ta, dist, new_matrix[31 );
C_ut_dpsto( 3, o1d_matrix10¦, new_matrix¦0¦ );
C_llt_clpsto( 3, old_mntrix¦l¦, new_matrix¦l¦ );
C_llt_clpsto( 3, old_matrixl21, new_matrixl21 );
}
}

=====================
static voicl C_gm_"_pOillt_on_plnne(~t,l3,C,D, px,py,pz, x,y,z) ,,,,~,....................................................
by ~tllen Ch~n (''/"8/ûO) rlncl intorsocting point of tha plane(Ax~By-~Cz=D) and the 3D line ~vector( t,B,C) k point(px,py,p~) ) ': ::
Note the vector of the 3D line h~s to be the same a8 2 5 the normal vector of the plan~
. : :
input double A,B,C,D planc datn double pX,py,p3 3D point output doublc ~x,1'y,-z intersecting point /
strtic void C_gm_2_point_on_planetA,B,C,D, pX,py,pZ, x,y,2) double A,B,C,D;
3 5 double px,py,pzi double ~x,~y,-z;
double tvalue;
tvallle = ( D - ( A~px ~ B-py ~ C-pz ) ) / ( A~A + B~B -1 C-C );
4 0 ix = px + tvnllle ' A;
~y = py ~ tvr~hle ~ B;
~z = pz + tvallle ~ C;
.

Nov. 26, 19~0 Page 28 of 76 SA9-90-0~5 2 ~

l=====================================================
=====================
: st3tic void C_gm_2_rotate_point( ptl, tdrt3, pt_ ) : find the point nfter rot3tion : input double ptl¦3¦ -- 3D point double tdat~l7~ -- rotating data: X,Y,Z (Point on Axis) 0 A,B,C (VextorofAxis) ANG (Rotation Angle) : output doublr pt2131 -- rot3ted point ~/
st3tic ~oid C_gm_2 rot3te_point( ptl, td:~t3, pt2 ) double ptl¦¦;
double td3t3¦¦;
double pt21j;
`:
double ptw¦31,ptw2¦3¦;
2 0 doublc matrixl-11131;
C_gm_ptxln9( ptl, tdnt:l, ptw );
i~( C_ut_dpùlst( 3, ptl, ptw ) ~ Ul~lTS.toler ) C_llt_dpstot 3, ptl, pt2 );
return;
~ .
C_ut_dp3dd( 3, td~t3, ~:tdatal3~, ptw );
C_gm_crtpln( tdat3, ptw, ptl, m3trix[0¦ ); `
C_gm_tran3d( 2, matrix¦0¦, ptw~ ptl ~;
ptw2(0~ = ptw101;
3 0 ptw211~ = ptw[ll ~ cos( tdrt~l6~
ptw212~ = ptwlll ~ sin( tdatal6~ );
C_gm_tri~n3d~ l, matrixlOI, ptw2, pt2 );
}

=============================.
3 5 ===================== `:
st;ltic C_gm_2_mirror_pointt ptl, tdata, pt2 ) find the mirroring point 4 0 : input dollble ptl¦3¦ -- 3D point Nov. 261 1990Page 29 of 76 SA9-90-085 , .

double tdat3ll2l -- plane dnta : output double pt2131 -- mirroring point /
static void C_sm_2_mirror_point( ptl, tdntn, pt2 ) double ptl¦¦;
double td~tr.¦¦;
double pt2¦1;
dc uble ptw¦3¦,dist¦3];
0 C_sm_ptxpl3( ptl, tdnta, ptw );
C_ut_dpsub( 3, ptw, ptl, dist );
C_llt_clpndd( 3, ptw, dist, pt2 );
!

' ¦Function Nnme¦
iret = C_sm_trsld3x( iopt, mtrx, ptr ) ¦Cnte~ory¦
Geomntry Calculntion Description) t Convert 3D Ruled Surface ~ ¦P3rameters]
~ (i) short iopt -- Processin~ Option 1: Locnl(mtrx) ==::- Absolute 2: Absolute ==~ Local(mtrx) t (;) double mtrx[~]¦3] - mntrix of coordinate convention (i/o) short ptrl2] --- pointer to Solid model block (o) short iret -- Return code (O:OIC,I:NG) J IExternal Variables]
t ICa~

4 0 t ¦~1e9triction¦
15orithm¦

Nov. 26, 1990 Page 30 of 76 S~9-9O-O~ ~

2~SSS 1 ~

Crented by .... Allen Chen Date ..... 10/23/90 ~fodified by ....
D~te Naturct#l) ' ~

short C_gm_trsld3x( iopt, mtrx, ptr ) short iopt,ptrl~;
double mtrx¦¦;
{
ch:~r sn3mo[l28l;
2 0 short fid,stype;
short ftypc;
short iret;
short i;
short ihd;~ta[10¦;
double D; :
double DD;
double pn(31, pnn[3~;
struct PF3ces ~PFac~s;
struct Comphd 'CompList;
3 0 struct SolidTnble 'Solid;
;

PFrces = (struct PFaces ') malloc (sizeof (str~lct PFaces));
if (PFaces == 0) return 200;
CompList = (struct Comphd ~) malloc (sizeof(struct Comphd));
if (CompList == 0) {
free(PFnces);
return 200;
} ,.
Solid = (struct SolidT3ble ~) mz~lloc (sizeof(stn~ct SolidT3ble));
4 0 if (Solid == 0) {
free(PFnces);

Nov. 26, 1990 Page 31 of 76 SA9-90-085 2 ~

free(CompList);
return 200;
}

Retv_Solid( ptr, PF~ces, CompList, snnme );
for( fid=l; fidc=PFnces-~NumberFlces; fid++ ) itype = PFnces->Fncejfid¦->F~ceType;
if( ftype--= 1 ) /~
: Allen Chen 10/9/90 : orrsat faces 3hall bc sc:~led with scnling v31ue ...........................................................
Q_subtype( PFnccs, nd, .5~stypc );
i~ ( stypc == 0 ) Q_Plnne_ABCD( PFaces, fid, ~:pn101, l:pn[ll, ~:pn~ D );
irct = C_trplnorm( iopt, mtrx, pn, D, pnn, b!DI) );
2 0 PF~ccs-~F~ce¦fid¦-~OrgPlnnc.A = pnn~0¦;
PF~ces->Fnce[fid¦->Or~Plane.B = pnn¦l];
PFaces->Face(fidl->OrgPlane.C = pnnj"];
PFnces->Facejf~dl->OrgPl~ne D = DD;
}

if (iopt == 1 ) for( i=l; i~=PF~ces->NumberMatrix; i++ ) iret = C_trmxab ( mtrx, PFaces->M~trixli]-~pl, PFlces->Mntrix¦i]->p2, PFlces->Mltrix¦i~->p3, PF~ces->Matrix[i¦->p4);
else if (iopt == 2) 3 5 for( i=l; i<=PFnces->Nunnber~S:Itrix; i++ ) iret = C_trmxlc ( mtrx, PFlces->Mntrixli¦->pl, PFnce9-~Mntrix¦i¦->p2, PF3ces-~Mntrix(i¦-~p3, PFaces->Mltrix¦i¦-~p4);
}
iret = mksolid (PF:Ices, Con~pList, Solid);

Nov. 261 1990 Page 32 of 76 SA9-90-085 2 ~

if (iret == 0) iret = C_mi_sdstore ((short)1, PFnces, CompList, snnme, ihdntn, ptr );
C_sd_cpft~ble(PFnces);
C_3d_ccompl(CompList); -FreeSolid (Solid);
free (Solid);
free (PFnces);
free (CompList);
if (iret l= 0) iret = 1;
'~ 10 return( iret );
.~ }
short C_trplnorm( iopt, mtrx, n, D, nn, DD) short iopt;
double mtrx~
double n¦¦, D;
double nn¦l, DD;
{ -,:
double t;
doublo Pl3l~ q(31;
P¦0l = D ~ n¦0¦;
plll = D nlll;
pl2] = D ~ nl21;
if (iopt == 1) `
{
2 5 C_gm_trnn3d( 11, mtrx, n, nn);
C_gm_trnn3d( 1, mtrx, p, q);
}
else it (iopt == 2) [
3 0 C_gm_trsn3d( 12, mtrx, nn, n);
C_gm_tran3d( 2, mtrx, q, p);
} - "
t = sqrt(nn¦O¦~nn~0¦ + nn~ nnlll ~ nn(2l~nnl2 it (t < I.e-6) return 1;
else it (fnbs(t 1.0) > I.e-6) {
nnt01 /= t;
nn¦ll /= t;
nn¦21 /= t;
} , Nov. 26, 1990 Page 33 of 76 S~9-90-085 ':

.: . . - ~ ~.
.: , ~DD = nn[O¦~q[O¦ + nn¦l]~q[1¦ + nn[2¦~q¦2];
return O;
}
short C_trmxnb ( mtrx, pl, p2, p3, p-1) double mtrx¦¦;
double pll],p2¦¦,p3¦j,p4¦J;
{
double v13], ol31, tvj3¦,1en;
C_gm_tr~n3d( 1, mtrx, p4, o);
vlol = Pl101 + P4101i vlll = Plll~ + P4~
v(21 = pl(21 + p4(21;
C_gm tr~n3d( I, mtrx, v, tv);
tv(OI -= o(OI;
tv(ll -= o(ll;
tv(21 -= o(21;
len = sqrt(tv(O~tv10¦ + tv(l¦~tv(ll + tv(2¦~tv¦2¦);
pl¦O¦ = tv(O¦/len;
pl(l¦ = tv(l¦/len;
pl¦2] = tv~2l/len;
, vlOI = p210J + P410~; '' '' v(1l = p2~11 + p4(11;
v(21 = p2(21 + p4121;
C_gm_tran3d( 1, mtrx, v, tv); 2 tv(Ol -= o(Ol;
tv(ll -= olll;
tvl21 -= o[21;
len = ~qrt(tv¦O¦~tvtO¦ + tv~ tv¦l¦ + tv(2j~tv(21);
p21ol = tv[OI/len;
3 0 p2¦l¦ = tv(l¦/len;
p2(21 = tv(21/len; .
v(Ol = P3(01 + P410~
Y(l~ = p3(11 + P4111;
v(21 = p3121 + p4(2~;
3 5 C_gm_tr;ln3d( l, mtrx, v, tv);
tv101 -= olOI;
tVIIl -= o(ll;
tv(21 -= o(21; ` ~-len = sqrt(tv(OI~tY(O] + tv(ll'tvll¦ + tv[2¦~tv¦21~;

Nov. 26, 1990 Page 3~ of 76 S~9-90-085 2~3~

p310] = tv[0¦/len;
P3¦1~ = tv[l¦/len;
p3¦2¦ = tvl2lllen;
C_ut_dpsto ( 3, o, pl);
return 0;
}

short C_trmxlc ( mtrx, pl, p2, p3, p4) double mtrx~
double pl¦¦,p211,p31],p41¦;
{
double ~131. tv¦3¦, o¦31,1en;
C_gm_trnn3d( 2, mtrx, o, pl);
vlo] = pl101 + p410~;
vll] = plll] -1 p41l];
vl2] = pll2] + p4121;
C_gm_trnn3cl( 2, mtrx, tv, v);
tv[OI -= olOI;
tv(ll -= olll;
t~,l2] -= ol21;
2 0 len = ~qrt(tv(O¦'tv¦0¦ + tvll¦~tvll¦ + tv¦2]~tv~21);
pllol = tv(O¦/len;
pl[l¦ = tv[1¦/len; ~-pl[21 = tv[2¦/len;
.
v[ol = p2101 + P4101; ~''' v[11 = p2[1] + p4[1]; :.~
~[21 = p2[21 + p4[2]; `~:
C_gm_trnn3d( 2, mtrx, tv, v); ~:
tY[0] -= o[]; `;
tv[11 -= o[l];
tv[2] -= o[2];
len = sqrt(Lv[O]~tv[0] + tv[l¦~tv[l¦ + tv[2¦~tv¦2¦);
p2[0~ = tv[0]/len;
p2[1] = tv[l¦/len;
p2[2] = tv~2]/len;
3 5 v[o] = p3[0] + P4[01;
v[1] = p3[1] + p4111;
v[21 = p3121 + p4[21;
C_gm_trnn3d( 2, mtrx, tv, v);

Nov. 26, 1990 Page 35 of 76 SA9-90-085 , .,, ~ :

t~(ol -= o tVIll -= o~
tvl~l -= ol21;
Ien = 9~rt(tvl0l~tvl0¦ -~- tvlll'tvlll + ~vl~l~tv P3¦0¦ = tY¦O¦/len;
P3111 = tv(ll/lcn;
p3121 = tv~2~/len;
C_llt_dpsto ( 3, o, p4);
return O;
}
An alternative embodiment of the invention allows a tapered dlsplay o a solid object to be created. The logic implementing this function is set forth in Figure 3. The initial steps set forth in function block 300 are identical to the solid generation discussed above. A two dimensional drawing is loaded. The user selects the solid taper menu function in input block 310 Then, the user is prompted to select a plane representing the front cut face as shown in input block 320. This is done by positionin~ the cursor on lines other than the profile view.
; Next, the user is prompted to select elements forming a profile of the front face as shown in input block 330. The user selects the necessary two dimensional geometries in the profile view to form a profile for taper. Then the end menu is selected to indicate completion of profile processing.

Input block 340 depicts the user selection of the back face as the next step. The user selects lines in views other than the profile view to form a profile for the taper operation as .
..
Nov. 26, 1990 Page 36 of 76 SA9-90-085 2 ~

shown in input block 350. When the selection process is complete, the end menu item is selected. Then, in function block 360, the two dimensional geometries are converted to three dimensional faces as depicted in function block 370 and a solid representation is generated.
This processing includes conversion of the two dimensional geometries to three dimensional geometries and the corresponding conversion of data structures as discussed above. Finally, the solid is displayed as depicted in output bloc~
380. The data structure attached below is used to store the solid object for subsequent display.

HEADER Fll.E FOR hllCRO CAI~AM ~VRITTEN C LANaUAaE

2 0 HEADER FILE NAMIE: PARAM.H

' IDENTIFICATION:

AUTHOR .... .Fr:~nk Niu DATE ...... l0/I5/89 MODIFIED .. .Allen Chen ~ DATE ...... 4tI6t90 '! NATURE .... .Add Splin~
MODIFIE;D
DATE
3 5 ~ NATURE

Nov. 26, 1990 Page 37 of 76 SA9-90-085 '' NOTE ON USE: ~
,. ..

#defino SSIZE 20 #define LSIZE 400 #deGne ESIZE 600 #deGne VSIZE 600 #define BSIZE 50 #define CHLDSZ 100 . #define SD_LINE 1 #define SD_CIRCLE 2 #dcGne SD_SPLINE~I
~deGne F0 0.~ 2136 *deGne Fl 0.585786~ ~
struct LOOP_LIST `;
short Ed;alndox;
stmct LOOP LIST ~bnck, 'next;
2 0 atruct LOOP_LIST ~link;
ahort usod;
~, };
struct VertexT~ble short fl, ~2, i3; ~
. double x, y, z;
:; )i ' `
struct LINE
{
3 0 short St~rtVertex;
short EndVertex;

struct CIRCLE
3 5 short fid;
short StnrtVertex;
short EndVertex;
dollble A1, A2; . .

Nov. 26, 1990 Page 38 of 76 S~9~90-085 `:
,, , 2 ~ L~

struct POINT i'Vertics¦13~;
}i struct SPLINE
{
short fid; /~ f:lce number ~/
ahort StartVertex;
short EndVertex;
struct BSPLINE Bspl;
}i struct EdgeTable {
short LeftLoop;
ahort RightLoop;
short EdgeTypo;
struet LINE ~Line;
struet CIRCLE ~Cirele;
struct SPLINE ~Spline;
};
struet LoopT~ble {
3hort Freo~nclox;
short NumborEclgos;
struct LOOP_ LIST ~ListHerd;
struct LOOP_LIST ~ListPtr;
2 5 short Dividin~LoopEd~e;
struet LoopT~ble `'Ploop;
struct LoopTable ~CIoop;
};
struct SolidT~ble ehl~r n~mel~O];
short NumberLoops;
short NumberEdges;
ahort NumberVerties-3 5 struct LoopTable ~LoopTable ¦LSIZE¦;
struct EdgeTable ~EdgeTable IESIZEI;
struet VertexT~ble ~VertexTable¦VSIZEI;
}i /i ~/

Nov. 26, 1990 Page 39 of 76 S1~9-90-085 -~

2 B ~

/~ hoie.h ~/

struct POLYNODE
nO~t x,y,z;
short Show_ Edg~;
~truct POLYNODE ~ncxt, ~b~ck;

~truct POLYGON_AND_BOX
'', { :
struct POLYNODE ~he~der, ~ptr;
; Mo;~t Xmin, Xm:ut, Ymin, Ym;~x, Zmin, Zm3x;
};
struct POLYGONS
struct POLYGON_AND_BOX ~P~rent;
short NumberChildrcn;
~, struct POLYGON_AND_BOX ~Children¦CHLDSZl;
};
struct INTERSECTION
.,~ stru~t POLYNODE ~Nod~Ptr;
short Polylndex;
}i ~` In Figures ~, 5, 6, 7 and 8, examples of solid generations employing the subject invention are illustrated. In Figure 4, a front view and a side view of a two dimensional object are presented at label 400 and 410. To generate a solid rendition of the two, two dimensional views, the user initially selects the four lines as the profile for extrusion on the front face at .
label 420. Next, the back face is selected from the side view as indicated at label 430, and finally, four lines of the back face are selected :
~.

Nov. 26, 1990 Page 40 of 76 SA9-90-085 2 0 ~

to form the profile as shown at label 440. This information is used to generate a three dimensional solid object as illustrated at label 450.

Figure 5 is another example of an extrusion.
First, three lines and an arc are selected as a profile for extrusion as depicted at label 500.
Then, two two lines from a side view are selected to complete the operation as shown at label 510.
The solid object is then generated as shown at label 520.

Figure 6 is another illustration of a solid generation. Again, two, two dimensional drawings are in.itially loaded and displayed as illustrated at label 600. Then, the front face of one of the two dimensional drawings is selected as shown at label 610. The profile for the front face is selected ne~t as depicted at label 620. Next, a back face is selected as shown at label 630.
Finally, the profile for the back face is selected as illustrated at label 640, and the three dimensional solid is generated as illustrated at label 650 in Figure 7.

Figure 8 illustrates a circular extrusion.
Two views of the object are initially drawn as illustrated at label 800. Then, a front face is selected as noted at label 810. Next, the front face profile is selected as illustrated at label 820. Finally, the back face is selected at label 830, and the profile of the back face is also Nov. 26, 1990 Page ~1 of 76 SA9-90-085 2~5~

selected as illustrated at label 840. The resultant solid is displayed as shown at label 850.

A further example involving a more complex geometry is presented in Figure 9 and 10. In ~ `
Figure 9, a pair of two dimensional views of an object are presented at 900 and 910 respectively.
A solid representation of the object is generated by selecting the front face and the back face.
The generated solid is shown in Figure 10.

Parametric Entit:ies In ~igure 11, the solid function parametric modification menu options are listed and their functions are elaborated upon. ~t label 1000, the menu options are displayed as they appear on a CAD display. lf a user selects Def Parent at label 1100, then the user is prompted to point to a plane of a solid that will function as the parent plane. The plane must be paired with a parallel offset plane whose distance is a variable that the user would like to change.

Label 1120 lists the Define Offset menu option. This option allows a user to define a plane of the solid parallel to the parent plane as an offset plane. Label 1130 depicts the Change Parameter menu option. This item is selected to display the distance value between pairs of parent and of~set planes. Label 11~0 depicts the Show All menu option. This option is Nov. 26, 1990 Page ~2 of 76 SA9-90-085 - ; -.. . . .. .

2~5~

selected to display all planes that are not currently displayed for the solid object. Label 1150 is the No Show option which temporarily suppresses the display of a selected plane of the current solid so that a hidden plane can be selected.

To commence a parametric design a user selects a solid object from the display as described in function block 1300 of Figure 13, and shown at label 1200 of Figure 12.
Optionally, the user can remove some faces from the solid object using the No Show function as shown in function block 1310 oE Figure 13. Then, the user defines a parent face by selecting a polygon of the solid as shown :in function block 1320 and depicted at 1290 of Figure 12. Offset faces parallel to the first face are selected next as shown in function block 1330 and depicted at 1270 and 1250 of Figure 12. The distances between the offset faces 1252 and the distance between the parent face and the first offset face 1254 are calculated. The distance D1 1254 is a variable distance that will be adjusted.
Whereas, the distance D2 1252 is a fixed distance that remains constant during this operation.

If the user selects the NoShow function then the logic set forth in Figure 14 is employed to make the face invisible on the display. The user initially selects a polygon (face) of a solid and converts the pointer to a loop id as shown in function block 1410. Then, the face is validated Nov. 26, 1990 Page 43 of 76 SA9-90-035 ~ ~ 1 '' '.:

2~5~

by searching the PFace table for the Face that contains the loop. If the face is found, then the selected polygon is a valid face as depicted in decision block 1420. If not, then control S flows to 1~10. If the face is valid, then the system sets the attribute of the selected polygon to visibility off as shown in 1430.

.
The logic for defining a parent face is set forth in Figure 15. As above, the user begins by ; 10 selecting a polygon of the solid object as shown in functi.on block 1510. Then, the system searches the PFace table to identify the Face that contains the loop as depicted in function block 1520. If the Face is identified in decision block 1530, then the :Face ID as the Parent Face ID as shown in function bloc~ 15~0.
However, if the Face ID is not found, then the Parent Face ID is set to a nul:L value as shown in function block 1550.

The logic for defining an offset face is set forth in Figure 16. The user initially must : select a polygon of the solid object as depicted in function block 1610. Then, the PFace table is ~ ;~
searched for the Face ID of the selected polygon as depicted in function block 1620. A search is ; next made to determine the type of the Face and based on the type, control is passed to one of two function blocks 1650 or 1660. If the Face type is ordinary, then control is passed to function block 1660 where the distance between the Parent Face and the offset face is calculated Nov. 26, 1990 Page ~ of 76 SA9-90-0~5 ", ,, . 1 ..

2~'r,;~

and an entry to the parameter table is made to reflect the change. Finally, the Face Type is also changed to Offset Face. If the Face Type is already an Offset Face, then an invalid polygon has been selected as shown in function block 1640, and control is passed to an error routine.
An Offset Face can be redefined as a parent face for another offset face to form a nested relation.

Figure 17 presents the logic implementing the Change Parameter function Function block 1700 indicates the first step is to select a polygon from the solid displayed on the graphic display. Then, the system searches through the PFace table for the face ID which the selected polygon is associated with as shown in function block 1710. Subsequently, the face ID is used to determine the face type as depicted in decision block 1720. If the face type is an ordinary face, then the polygon is highlighted on the display as depicted in function block 1730, the ; distance from the origin tot he face is displayed, and control passes to function block 1760. However, if the face type is an offset face, then the PFace table is searched for the identifier of the parent face and the associated polygon as shown in function block 1740. Then, the distance between the two offset faces is calculated, displayed and the polygons are highlighted as shown in function block 1750.

Nov. 26, 1990 Page 45 of 76 SA9-90-085 2~3~

Function block 1760 depicts the next step, prompting the user to enter a new value for the distance via the keyboard. The new value is used to update the parameter table. If the polygon is a parent offset type, then modify the parameter of the selected face. If it is an ordinary face, then the parameter of the ordinary face is ~-modified. Then, as illustrated in function block 1770, the PFace table is converted into a Face table. Finally, the solid is regenerated by sending the Face table and the construction list to the solid modeler to generat:e the modified solid as shown in function block 1780.

Figure 12 shows a first solid 1200 and a second solid ~.210 that are modiPied using the parametric entity function in accordance with the `
invention to create a finished assembly 1220. ;;
The distance D1 1254 in solid 1200 must be correlated with distance D3 1256 to complete the assembly correctly. Thus, the user initially selects D1 ~254 as the variable distance from P1 1290 to 01 1270. The distance D2 is defined as a fixed distance, and the variable distance is equated to D3 1256. Thereafter, the system expands Dl 1221 to comply with D3 1256 and completes the assembly.
~ ~' Surface ~ormal Display In a normal C~D system, a surface can be created regardless of the facing. However, a surface has two faces, one is facin~ in, and the Nov. 26, 1990 Page 46 of 76 S~9-90-0~5 ~5~

other is facing out. Depending on the position or orientation of teh surface in a composite object. Surface normal is a reference for indicating the facing of a surface. It is also a vector for calculating the shading value. Since the surface normal is not specified during the creation of the surface, the image of the shaded surface may not appear correct to the viewer.

Examples of surfaces displayed which employ the subject invention are presented in Figures Z0, 21, 22 and 23. The logic for the processing is set forth in the flowcharts illustrated in Figures 18 and l9. Figure 2~ illustrates the variables behind the mathmatics used to implement some of the invention's logic. Finally, the detailed source code and data structures used to implement the logic is presented and described below.
. ~
Referring to Figure 18, function block 1800 shows the first step which displays the shaded surfaces without user specified shading. To shade the surface, the system generates polygons to approximate the surface. By shading each polygon according to the normals to the surface on each vertex of the polygon the shaded surface is indicated appropriately.

To shade a polygon, the system prepares a color table fo shading and calculates the intensity of each vertex of the polygon. The`
algorithm for preparing the color table is shown Nov. 26, 1990 Page ~7 of 76 SA9-90-085 , 2~555~5 in the "C" listing set forth below. The logic has two steps. Step one: linearly interpolate the color values of red, green and blue (RGB) separately. To generate the three tables, (RGB~
with constant incrementation from the specified ambient light value to the full color of the object. For the current display device, the shading color is generated into two-hundred levels.

Step two: the algorithm uses a cosine function on top of the result of step one to extend the range of the shading colors. The final color table will range from the specified ambient light value to shiny, bright color that will give the shaded object a shining spot when the reflection of the light source on the surface is toward the viewer's eye.

2 0 Function namc : Build_x~ Color_M~ap () `' i' C~tegory : COLOR MAP
.~ 2 5 MANAGEMENT `~

. ~ .
Description : Three major routines set ~Ip the color map #
`' for three sh;lding modes.

.j , Input Nov. 26, 1990 Page 48 of 76 SA9-90-085 2 ~

Output : -Input/Output : - _ Function returns:

,_ _ ,"

Identificntion:
AUTIIOR ............. .Chri~l Chen DATE ..... ,.......... , 04/12/90 ~ MODIFIED BY .. ..Allen Chen ~' DATE ......... 04/27/gO
NATURE (#1)... ..m~dify cal_indices ~ ;

'' Calls Called by O -- -~ ,, Algorithnn : Color mnp h3s been devided into three '' ùifferent sections, CADAM MAP, USERS MAP, and SHADE hlAP. Their sizes 3re defined in file "sh3de.h".
4 5 " CADAM MAP cont3ins the RGB ~nlues of IG
-Nov. 26, 1990 Page 4~ of 76 SA9-90-085 ~ .

.. . ..

2 ~ 5 CADAM colors. 11 ~.
USERS MAP stores the RGB values of those i' colors used by blltton, window, icon, ~nd text. Currently, lô entries are ~lloc3ted for USERS MAP.
SHADE MAP includea 216 entries which nre the shading colors for surface displ~y.
`~ ~, '' In Dither shading mode, 216 "fixed colors" '' .t are reserved for HOOPS standard shading~
In Con~tant shrding modo, 216 colors are sep~rated into 12 section3 for the default '' eolor nnd 1I CADAM objeet eolors. E:lch section contnins 18 sh:~de levels of tho `' strndrrd colors.
2 0 ~ In Snnooth 9h; dingj mode, ~11 colors ~re the different shrdo level of the Yelected ~
sh;~ding color (r~r~e ontry of USERS ~ P). -i, .

Glossary : -.

,, '! Notes on use : Normally, two colors nre reserved for the display of mouse eur~or, ~o the total 3 5 ~ number of the avail~ble eolor is 254.
`' The~e colors can be classified into three '' cat~gories:
~.
The "regular color" i9 genererated by the "
4 0 i use of Set_Color_By_Vahle routines. Each . '' color of different RGB value occupy one entry on the hardw~re color lookup table, and their vnll~e cnn not be ch~nged or delete by any HOOPS rolltine.
~ `

Nov. 26, 1990 Page 50 0~ 76 SA9-90-085 . .

h The ~fixed color" is used by the ~OOPS to i generate the dither shading.
The ~m~p color" i9 stored in the ~irtual 5 ' color map of each 3egment. Its RGB value cnn be changed by tho progr; mmor.
Due to the arrangement of the color map, there is only one shading mode c;~n exist 0 ~ at any time. 1' #include cstdio.h~
#include <mrth.h>
#include "con~td.h~
#include ~color.h"
#include ~shado.h'' #include "mltwdw.h~

2 0 /~ '/
/~ RGB color vnluo for 64 EG.~ omul~tion colors '/
/
short color_table¦64~¦3~ =
t { 0, 0, 0},{ 0, 0,66},{ 0,66, 0},{ 0,66,66},{66, 0, 0},{66, 0,66},{66,66, 0},~66,66,66}, { 0, 0,33},{ 0, 0,99},{ 0,66,33},{ 0,66,99~,{66, 0,33},{66, 0,99},{66,66,33},{66,66,99}, { 0,33, 0},{ 0,33,66},{ 0,99, 0},{ 0,99,66},{66,33, 0),{66,33,66},~66,99, 0},{66,99,66}, 0,33,33},{ 0,33,99},~ 0,99,33},~ 0,99,99},~66,33,33},~66,33,99},~66,99,33},{66,99,99}, ~33, 0, 0},~33, 0,66},~33,66, 0},{33,66,66},~99, 0, 0},~99, 0,66},~99,66, 0},{99,66,66}, {33, 0,33},{33, 0,99},~33,66,33},{33,66,99},~99, 0,33},{99, 0,99},{99,66,33},{~)9,66,99}, 35 {33,33, 0},{33,33,66},{33,99, 0},{33,99,66},{99,33, 0},{99,33,66},{99,99, 0},{99,99,66}, {33,33,33},{33,33,99},{33,99,33},{33,99,99},{99,33,33},{99,33,99},{99,99,33},{99,99,99}

RGB Color_hl;~p¦COLOR_MAP_SIZE~;

~OV. 26 ~ 1990 Page 51 of 76 SA9-90-085 :, , . : . . .

2 ~ ~i t~ 3 void MC_Build_Color_Mnp ();
: void Show_Color By_RGB (short index, short ~R, short ~G, short ~B);
void Show_Color_By_Value (short index, short ~nlue);
void Set_Color_By_RGB (short index, short R, short G, short B);
void Set_Color_By_Vnlue (short index, short vnlue);
static void Build_Normnl_Color_Map ();
stntie void Build_Dither_Color_Map ();
static void Build_Constant_Color_Map (); ,:
static void Build Gouraud_Color_~fap ();
static void Set_Cadam_Color_~fnp ();
static void Set_Users_Color_Map ();

/ i _ ~ _ _ _ _ _ _ _ _ _ _ _ _ _ _-------------- -- /
Initinli~e_Color_~fnp: Initinlizo color mnp. ~/
5 ~_ ''/

void Initinlize_Color_~fnp (short lovel) {
switc~ vol) {
cnsQ 0: COLOR.elmod = o; /i Modnl color number ~/
COLOR.clcur = 1; /~ Current color number on side bnr ~/
cnse 1: COLOR.clmctI0~ = 63;
COLOR.clmct~1¦ = 26;
COLOR.clmctI2l = 63; :
COLOR.clmct¦3¦ = 0;
COLOR.clmctl41 = 0;
COLOR.clmctI5~ = 18;
COLOR.clmct¦61 = 27;
3 0 COLOR.clmct~7¦ = 36;
COLOR.clrnct(81 = 54;
COLOR.clmctI9l = 37;
COLOR.clmct¦10~= 26;
COLOR.clmct(11~= 60;
COLOR.clmct¦12~= 52;
COLOR.clmct(13~= "5;
COLOR.clmctl14~= 9;
COLOR.clrnct(15~= 40;

Nov. 26~ 1990 Page 52 o~ 76 SA~-gO-0~5 :
2 ~ 3 :.

case 2: COLOR.cldef¦O] = COLOR.clmct~O¦; /- DEFAULT COLOR `'/
COLOR.cldeflll = O;
COLOR.clbrt¦O¦ = COLOR.clmct¦l]; /~' BRIGHT COLOR ~/
COLOR.clbrt(l¦ = l;
COLOR.clcsr¦O¦ = COLOR.clmctl2¦; /~ CURSOR COLOR ~'/
COLOR.clcsr¦l] = 2;
COLOR.clblk¦OI = COLOR.clmct¦31; /- MESS-tGE BACI~GROUND ~/
COLOR.clblk¦I] = 3i COLOR.clbgr¦O¦ = COLOR.clmct¦4~ MODEL BACICGROUN~
COLOR.clbgr¦I¦ = 4;
., COLOR.clshd = 57; /~ SHADING COLOR ~/
, Sat_C:-dnm_Color_M:p ();
Set_User9_Color_Mnp ();
MC_Build_Color_Mr~p ();

-- --_ -- / .:
/~ Show_Color_By_RGB: Inquirc color RGB vnluo of ~ color index~
2 0 /- ~/
/
oid Show_Color_By_RGB (short index, short 'Il, short G, s~iort B) ~R = color _table¦COLOR.clmct¦index~]~O~;
~G = color table¦COLOR.clmctlindex]~
''B = color_t~blc¦COLOR.clmct~index¦l[21;
~.,. ' ----_----_ _____ _____ ___ ___ _ ___ ___ __ ~ / :
3 0 /~ Show_Color_By_Value: Inquire color ~alue of a color index. /
;
oid Show_Color_By_Value (short index, short ~vnlue) 3 5 if (index == 16) v31ue = COLOR.clshd;
else ~ lue = COLOR.clmctlindexl;
}~ ~

, .
Nov. 26, 1990 Page 53 of 76 S~9-90-085 2 ~

/' Set_Color_By_RGB: Modify color RGB vahle of a color index. ~/

_ _ _ _ _ _ _ _ _ _ _-- -- _ --void Set_Color_By_RGB (3hort index, short R, short G~ short B) {

color_t3blelCOLOR.clmctlindexjll0l = R;
color_tablelCOLOR.clmct~index~ = G;
color_table~COLOR.clmct¦index¦¦¦2] = B;
}

__ __ ___ ___ __ _______ _____ ___ _____ _ _ _ ___ __ ____ __ ___ ___ ___ _ ~ /
i /
/~ Set_Color_By_Vnluc: Modify color VlhlO of n color index. ~/
~/

void Set_Color_By_Vnluo (short index, short Ynlue) { ::
it (indox == IG) COLOR.clshd = vnllla;
0180 COLOR.clmct¦indox¦ = vnluo;
Color_hlnptCADAM_MAP0+indoxl.R = color_tnblo~Ynluol¦0~ / 99.0;
Color_Map(CADAM_MAP0+indexj.G = color_tnblolvnluo]¦I] / 99.0;
Color_M:~p¦CADAM_MAP0+index].B = color_tablelYIlue]l2J~/ 99.0;

HC~ Modify_Color_Mnp_By_Vllue t~?picture~, (int)index, "RGB", (int)I, ~:Color Mnp¦indox].R);
awitch (SHADE.mode) ':
cnse -I: brenk;
Cl80 0: b:Olk;
casq I: break;
ClS0 2: if (index > 4) Build_Constant_Color_Mnp ();
break;
case 3: if (index == 16) Build_Gouraud_Color_Mnp ();
brenk;
defnult: /~ do nothing --_ _ _ _ _ _ _ _ _ _ _ _ ~ / , Nov. 26, 1990 Page 54 of 76 S~9-90-0~35 :, :

/- MC_Build_Color_Map () Build color map for any shadin~ condition-/
/
-- -- --Yoid MC_Build_Color_Map () switch (SHADE moclc) {
case-l:
- case 0: Build_Normal_Color_Map ();
1 0 break;
case 1: Build_Dither_Color_Map ();
break;
case 2 Build_Constant_Co10r_Map t);
breah;
c3so 3 Build_Collraud_Color_M:lp ();
break;
default: /~ do nothin~
,: }
,. ) ~ ~ ~~ ~ ~--~ ~ ~ ~ ~~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~ ~ ~~ ~ ~ ~ ~ ~
/`' Build_Norm31_Color_~53p: Sot up normnl \virafrnrnu color mnp. /
/~ /
/
2 5 3tatic void Build_Normal_Color_M~p () if (COLOR.cldpf <:= 16) . {
HC_Open_Segment ("?pictllre");
3 0 HC_UnSet_Color_Map ();
HC_Set_DriYer_Options ("fixed colors = O");
HC_Set_Color_Map_By_Value (nRGB~, CADA~hl_MAP_SIZE, Color_Map);
HC_Close_Se6ment();
3 5 else HC_Open_Se~ment ("?picture");
HC_UnSet_Color_Map ();
HC_Set_Color_Map_By_Value ("RGB", BASIC_MAP_ SIZE, Color_M;lp);
4 0 9~6 ;fdef NTH

IIC_Set_Driver_Options ("fixed colors = 125");
~else IIC_Set_DriYer_Options ("fixed colors = 2Iô");
~:

Nov. 26, 1990 Pa~e 55 of 76 SA9-90-085 2 ~

#endif ~C_Close_Se~ment();
}

:
/~ Build_Dither Color_hfap: Set up dither shading mode color map. ~/ ~

/~______________ _____---------------------------------------------- I
static void Build_Dither_Color_hSap () {
if tCOLoR~cldpf C= 16) ~IC_Open_Segmont (~?picturo");
lS HC_UnSet_Color_hf~p ();
HC_Set_Color_Map_By_Vnluo ("RGB", COI,OR.clclpf-8, Color_hf~p);
HC_Set_DriYer_Options ("fixod colors = 8");
}fC_Close_Segment();
2 0ol~o {
HC_Opon_Sogmcnt ('`?picturc");
HC_UnSot_Color_hf3p (); '-HC_Sot_Color_hf~p_By_Yaluo ("RGB~, BASIC_hfAP_SIZE, Color_Mgp);
25#ifdef NT~

HC_Set_Driver_Options ("rlxed colors = l25");
#else HC_Set_Drivor_Options ("~Ixod colors = 2l6");
-7yendif 3 0HC_Closo_Sogmont(); -`
}
}

, i /

3 5 /~ Build_Const; nt_Color_hf~p: Sot up const;mt shnding color map. ~/ ;

__ _____ __ _ _ _ _---------------------------- -- / ~ ~
st~ltic void Build_Const;lnt_Color_M;-p () `

Nov. 26, 1990 Page 56 of 76 SA9-90-085 ., ~. . :~.

'. ~ ~` ', ' ' ` " ' '.~

5 ~ ~

short i, j, k, Ist3rt, index;
fioat x;
if tCOLoR cldpf ~= 16) return;

- - - - - . - .. - - .... - .............................................
: by A. Chen : MAXLEV: The maximum number of gr3y level.
Thi3 ~ralue i9 defined in file "shade.h"
: LEVEL: number of gray levels to be used for fine shading :

/~ Cr~lculrtc gr;~y lovcl for defnult .t: 11 CADAM colors ~/
13tart = MAXLEV - LEVEL;
for (i = O; i <= II; i++) if (i == O) index = COLOR.cldef101;
else index = COLOR.clmce¦it 4¦;
lor (j = SII~DE_MAPO ~ i~LEVEL, k = O; k ~ LEVEL j+-l-, k-l--l ) :c = 0~01 '' (lst~rt t k) / MA7~LEV;
Color_M3p¦jJ.R = color table¦indexj~O] ~ x;
Color_Map¦jl.G = color_table¦index~ '' x;
Color_Map¦j].B = color_tablelindex][2~ ~ x;
2 ~i } :

HC_Open_Segment ("?picture~);
HC_UnSet_Color_Map ();
HC_Set_DriYer_Options ("fixed colors = O");
HC_Set_Color_Map_By_Vallle ("RGB~, COLOR_MAP_SIZE, Col~r Mnp);
HC_Close_Segment();
;' ~.

/~ Bllild_Gour3ud_Color_Mnp: Set up Gournud shnding mode color mnp. ~/

Nov. 26, 1990 Page 57 of 76 Si~9-90-085 .-2 ~

~ static void Build_Gouraud_Color_Map () short i;
RGB Cnmb, M;
tloat pni, Rstep, Cstep, Bstep;
no4t cosn¦GOURAUD_COLOR_SIZE¦;
flont Pl = 3.1~15926;
no;~t range;
tloat ~mb;
if (COLOR.cldpf <= 16) return;
.................................................
: Allen Chen, 1/25/90 : nmb: nmbient fnetor will bo referenced ns n : globnl vnri~blo whieh cDn bo dofined by users.
: The fnetor mnkes tho r;:~nRe of gournud eolor mnp : run between nmb nnd 1Ø It disenrcls the eolors : under ~mb nnd gives more grry levos to visiblo : rango.
: if nmb is dermod as glob~l vnrinblo thon tho 2 0 : eolor mnp will rnngo trom nmb to somowhora eloso : to 1Ø Thus, tho routino enleulnto_indieos() : shnll bo rowritton to prodlleo eorroet indieos.
: For now, the valuo of nmb is sot to 0Ø
:
i~/ : :
amb = 0.0;range = (float)((GOURAUD_COLOR_SIZE ~ (short)100);
p3i = (nO~t)(Pl--D / (double) ((short)GOURAUD_COLOR_SIZE ~ (short)2));
for (i= 0; i < GOURAUD_COLOR_SIZE; i++) eosa[GOURAUD_COLOR_SlZE-1-i] = pow (cos (i~p~i), 5);
- - - - - -: Allon Chen, 1/25/90 : ~ `
: find ;-mbient color of RGB.
: RGB step is adjusted by nmbient eolor ..................................................
Cnmb.R = color_tnblo[COLOR.clshdllOi ~ nmb;
Camb.G = color_tnble[COLOR clshdl[l¦ ~ nmb;
Cnmb.B = color_tnble¦COLOR.clshdi¦2¦ ~ nmb;
4 0 Rstep = (color_tnble[COLOR.cl3hd¦[0¦ - Cnmb.R) / rnngo;
, . .

Nov. 26, 1990 Pa~e 58 of 76 S~9-90-0$5 2 ~

Gstep = (color_tablejCOLOR.clshdllI] - Camb.G) / r~nge;
Bstep = (color_tablejCOLOR.clshdll2l - Carnb.B) / range;
for (i = O; i < GOURAUD_COLOR_Sl2E; i++) M.R = i ~ Rstep + C~mb.R
hl.G = i ~ Gstep + C~mb.G; ;:
M.B = i ~ Bstep + Camb.B; :
Color_M~p~SHADE_UAPO + i].R = M.R + (l-hf.R) ~ cosa~i] ~ 0 5;
Coior_h5ap¦SHADE_h5APO + il.G = M.G + (I-M.G) ~ cosa~ 0.5;
Color_Map[SHADE_MAPO + i¦.B = M.B + (I~ f.B) ~ cos~ 0.5;
#ifdef DEBUa printf("colormnpl%dl=(7~1f,%1f,%1f)\nn, COLOR_hlAP_SlZE-l-i, Color_M;~p¦SHADE_MAPO + i¦.R, Color_Mrp¦SHADE_MAPO + i¦.G, Color_hlaplSHADE_MAPO + il.B);
#endif HC_Open_Segment ("?pictnre");
HC_UnSet_Color_hlnp ();
2 0 ~lC_Sat_Drivcr_Options ("fixs(l color9 = 0");
RrC_Set_Color_hlrp_By_V~ le ("RGB", COLOR_MAP_SIZE, Color_hSnp);
HC_Closo_Segment();
}
:`
-- ---- --_ --_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / ;~. .
25 /~
/" Sct_Cadam_Color_hSap: Set sixteen CADAhf basic color map. `'/
~ / :

3 0 static void Set_Cadam_Color_hfap () {
short i;
for (i = O; i < CADAM_MAP_SIZE; i++) 3 5 Color_Mnp~CADAM_l~,SAPO+i¦.R = color_table¦COLOR.clmct¦i¦¦~O~ / 99.0;
Color_MaplCADAM_MAPO+il.G = color_table¦COLOR.clmctli]]¦l] / 99 0;
Color_M; p¦CADAM_MAPO+i¦.B = color_table¦COLOR.clmct¦i]]¦2¦ / 99 0;
} `:

Nov. 26, 1990 Page 59 of 76 SA9-90-085 ;

-- -- ---- -- ---- -- -- ---- -- ------ -- ---- -- -- ---- -- ---- -- -- -- -- ---- -- ---- -- -- -- -- -- -- -- -- -- l :
/~ Set_Users_Color_M3p: Set nser shading color map. ~/

static void Set_Users_Color_hfap () ~' {
,, short i;
float gray;
RGB whito, brite;
, Color_M:plUSERS_MAPO¦.R = color_t3ble¦COLOR.clshdj¦0l / 99.0;
Color_hk.p¦USERS_M-~POI.G = color_table[COLOR.clshd¦jll / 99.0;
Color_Mr~pjUSERS_hlAPOI.B = color_tnblalCOLOR.clshdll21 / 99.0;
/~ 9~t 5 gr3y sh3des ~/
whito.R = 0.75;
white.G = 1.0;
white.B = 1.0;
brito.R = color_t;~blo¦COLOR.clbrt¦01¦10¦ / 99.0;
2 0 brito.G = color tnble[COLOR.clbrt¦0¦¦¦1¦ / 99.0;
brite,B = color_table¦COLOR.clbrt(0¦¦[2¦ / 99.0;
for ~i = I; i ~= 5; i++) {
~witch (i) {
`, caso 1: gr3y = 0.125; bronk;
caso 2: gray = 0.195; break;
c~se 3: gray = 0.306; break;
;. case 4: gray = 0.479; break;
3 0 c~so 5: 6ray = 0 75i Color_MaplUSERS_hfAPO+i].R = whito.R i' grny;
Color _ Map¦USERS _ MAPO+i].G = whito.G ~ gr;ly;
Color_hfapjUSERS_hfAPO+il.B = white.B ~ gray;
Color_hfl~plUSERS hfAP0+5+i].R = brite.R ~ grrly;
Color_Map¦USERS_MAPO+S+il.G = brite.G ~ gray;

;~ Color_M:~p¦USERS_MAP0+5+i~.B = brite.B " gray;
:~ }
; for (i = USERS_hfAP0+11; i < USERS_MAP_ SIZE;i++) ` 40 {
Color_ M~p(USERS_ hfAPO+i~.R = 1.0;
Color_hll-p¦USERS_hlAP0~ .G = 1.0;

Nov. 26, 1990 Page 60 of 76 SA9-90-085 . ., :::, ; , . .

2~55~ ~

Color_~sp¦USERS_MAPO+i¦.B = 1.0;

`: :
To shade a polygon, the illumination value of each vertex must be calculated. Illumination (I) is calculated with the following equation.

I = Amb * Ka + Lv * Kd * (L x N) + Ks * (R x V)~

Referring to Figure 24, Amb is the ambient light ~ 10 value. Ka indicates how much of the ambient ! light is reflected from the object's surface. Lv is the intensity of the light source. L 2400 is the light vector. N 2410 is normal to the ; surface at the vertex. (L x N) 2~0 is the cosine value of the angle betwaen L vector and N
vector. Kd indicates how much of the diffused light reflected from the surface. R 2420 is the reflection vector. V 2430 is the vector from the vertex to the eye. (R x V) 2460 is the cosine of the angle between vector R and vector V.

Since the illumination value is a sum of the ambiant factor, diffuse factor and specular factor, the result may not fall within the acceptable range. Especially, when there are ; 25 multiple light sources and the graphic hardware has a limited resolution. Thus, the following modification to the original equation is made to enhance shading.

Nov. 26, 1990 Page 61 of 76 S~9-90-085 ;

2 ~ 3 I = Max(I[l], I[2], I[3],--- I[n]) I[i] = A + (l-A) * D[i] + (l-A-(1-A)*D[i] * S[i];
where i = 1,2..n for n light sources. I[i] is the illumination value for the ith light source.
A = amb * Ka; D[i] = Lv[i] * (L[i] x N);
S~i] = (Rx V)m When the intensity of each vertex of a polygon is resolved, the intensity is converted to an index to the color table. (See data structure listing below) t Crlc~ t~ In(lic~9 -- -- - - - - . .
,, '' The routine returns the index to the color map for the ~iven Normal ~ ;~nd my_light9¦4¦.
eye vector: conne form window matrix (r~ ector) light xector: wns transformed form world system to window system (actiYe)~

~ Author : Allen Chen ~ :

i, ~ -. ~

/
void calcul;lte_indices( Norm:~l, my_lights, index ) double Norm~
VECTOI~ my_light9~41;

Nov. 26, 1990 Page 62 of ~6 S~9-90-085 ~ ,., ' - 2t~5~

short 'index;

{
. ~/ECTOR eye, refraction, norm;
float amb, difus;
float tl, t2, coso, cosa, cosr,ta;
float max_color;
short light_num;
oat r~nge;
` 1 0 ....................................................................
rnngo --(lloat) tC'OUR~UD_COLOR_SIZE- I);
amb = 0.1;
difus = 0.5;
eye.x = WDW3D.wzvec¦O¦;
. eye.y = WDW3D.wzvec¦l¦;
oye.z = WDW3D.wzvocl2l;
norm.x = (flont) Normrl¦O¦;
norm.y = ~nO ~t) Normallll;
2 0 norm.z = (noat) Normall2¦;
. dot_vectors ( kco3r, eye, norm );
if tco3r <= I.e-3) co3r = 0.0;
mr,x color = 0.0;
2 5 for ( light_num=O; light_num< ~; light_num++) if( SH~DE.light¦light_numl == ON ) C030 = my_light3¦1ight_num~.x~norm.x 3 0 + my_light3¦iight_num¦.y ~norm.y + my_light3¦1ight_nunn¦.z~norm.z;
if ((c030 <= 0.0 ) 11 (coso ~ 1.0)) C030 = 0 0;
refraction.x = -my_lights¦light_mlm~.x + 2~coso ~ norm.x;
refraction.y = -nny _lightsllight_num~.y + 2~co30 ~ norm.y;
3 5 refraction.z = -my_1ight3¦1ight_nllm~.z + 2~co30 ~ norm.z;
tl = 3qrt ( refraction.x ~ refraction.x -~
refraction.y ~ refraction.y +
. refraction.z ~ refraction.z);

Nov. 26, 1990 Page 63 of 76 S~9-90-085 ~ 9 ~

refraction.x /= tl;
refraction.y /= tl;
refr~ction.z /= tl;
dot_vectors ( &c09;~, refr:~ction, eye );
if ((coso > 0.0 ) && (cosa ~ 0.0) && (cosr > 0.0)) {
ta = cosa ~ cosa;
eosa = ts~ta~cosa;
1 0 else C09;~ = 0,0;
}

tl = ;~mb ~ eoso i ( l.0 - nmb ) ~ difus; /-;mbient + diffllse-/
t2 = tl + ( 1.0 - tl ) ~ co9a; /~eomplement ~etor ~/

else t2 = ~mb;
if( t2 ~ max_eolor ) mnx_eolor = t2;
}
~index = (9hort)SHADE_MAP0 + (short)(m~x_eolor ~ ran~e + (llo~t)0.5) Then, the user is prompted to select a particular `:
surface to display as shown in function block 1810. The surface is selected by pointing with the cursor and using the pointer's coordinates to select the appropriate surface from the CADAM
data base. Next, the selected surface is erased as shown in function block 1820. Then, the surface data is rearranged as set forth in function block 1830.

Nov. 26, 1990 Page 6~ of 76 SAg-90-085 :~ Four kinds of surface data can be rearranged, ruled surfaces, revolved surfaces, boundary surfaces, boundary surfaces and skin surfaces. The data structure of these surfaces is set forth below. ~
., ,~, :

......................................................
. Allen Chen 8/23/90 : The filu3 includo this hoador 1 0 : ~
' #ifndef BSPLlNE_H_FILE
#defno BSPLINE_H_FILE
~dcfine M~YSplinol~not~ 50 #defne MA,YI~not3 56 #definc MAXControlPoints 52 #defne GLOBAL_TO_LOCAL 1 #define LOCAL _ TO _ GLOBAL 2 :. :
. , ~
struct BSPLINE
{
I .........................................................
: A. Chen ~ Attributes 2 5 : Bclosed 0/open 1/closed : Bperiodic 0/nonperiodic l/periodic : Bration~l 0/nonrationni l/r~tion~l Bplanar 0/nonpl:~nar 1/plan;-r 3 0 : Drta Order: order of the B spline Nknots: the mlmber of knots in the ;~rr~y KnotSequence Ncp : the number of control points in ControlPointsll Strrt: starting knot seqllece of the curve (relimit drta) Nov. 26, 1990 Page 65 of 76 SA9~90-085 .

205!~S~3 . :
` ~`
,:

End : ending knot sequence of the curve (relimit data) ,~ .~..................................................... `
short Bclosed;
short Bperiodic;
short BratioDal;
short Bplanar;
short Order; ~ ~
short Nknots; .`
short Ncp; ~-~
double Start, End;
double KnotSequence ¦MAXKnots];
struct POINT ~ControlPoints IMA'CControlPointsl; .-struct SURFACE
shore Vdisp, Wdisp;
short BUcloscd, BWclosed;
short BUporiodic, BWpcriodic;
2 0 short BUrntional, BWrationnl;
short Uorder, Wordor;
`~ short NknotsU, Nknot~W;
doublo ICnotSequencoU¦MA~YlCnotsl, ICnotSoquoncoWI:41A`Cl~notsl;
struct POINT ~ControlPointslMA,CControlPointsllMAlCControlPoirltsl; :
};
. ' ' !~ struct RULEDSURFACE ~`
{
short Udisp, Wdisp;
`~ struct BSPLINE B_Splinel, B_Spline2;
~30 }i struct ROTATIONAL_SURFACE
double A¦3], B¦31, C131, Origin[31;
double Al, A2;
short Udisp, Wdisp;
struct BSPLINE ~B_Spline;
};
struct EDGE_SURFACE
short Udisp, Wdisp;
struct BSPLINE B_Spline¦-l¦;

Nov. 26, 1990 Page 66 of 76 SA9-90-085 2 0 ~

f~endif For ruled surfaces or revolved surfaces, the sequences of the control points are inverted and the knot sequences of its splines are calculated.
For boundary surfaces, the sequences of the control points of spline one and two are inverted, and their knot sequences are recalculated. Splines three and four are swapped. For skin surfaces, each profile spline has i~5 corresponding control points inverted and the knot sequences are recalcu:Lated. Figure 19 sets forth the detailed logic presented in function blocks 1830 and 1~0.

Finally, as shown in funct:ion block 18~0, the selected surface is shaded based on the rearranged information. -Boundar~ Surfaces As introduced, a boundary surface stores four splines which form a closed boundary of the surface. The surface normal processing logic is set forth below.

short C_sf_rnormbsf(ptr) short ptrj~;
short ret;

Nov. 26, 1990 Page 67 of 76 S~9-90-085 . . ., : .:

,: - . -.

short i,j;short w2,w,j2;
double tx,ty,tz;
struct SURFACE ~SkinSurface;
, . ~
SkinSurfaco = (struct SURFACE~) mnlloc (sizeof (struct SVRFACE));
if (SkinSurface == 0) return 200;
ret = ssr_GetSurfaceData( ptr, SkinSurface );
if( ret == 0 ) {
0 w = SkinSurface->NknotsW-4;
w2 = w/2;
for( i=0; kSkinSurface->NknotsU-~ +) for( j=0; j~w2; j++ ) {
j2 = w-j-l;
tx = SkinSurfaco->ControlPointslilljl->x;
ty = Skinsurfaco->controlpoints~ jJ->yi tz = SkinSurfnce->ControlPoints¦i¦tj¦->s; ':
SkinSurface->ControlPoints(i~ ->x = SkinSurfacc->ControlPoints¦i¦¦j2¦->x; ~:
2 0 SkinSurtnco->Controlpointslij(jl->y = SkinSurtnee->ControlPointslillj2l->y;
SkinSurfnce->ControlPointslj]ljl->~ = SkinSurrnco-~ControlPoints¦i¦¦j21->z;
SkinSIlrtreo->ControlPointslillj2l-~x = tx;
SkinSurtreo-~ControlPointslillj2l-~y = ty;
SkinSurfaco-~ControlPointslil(j2]->z = tz;
} ~
w = SkinSurf~ce-~NknotsW; ~ ;
w2 = w/2; '.
tz = SkinSurfaee->KnotSoquenceW(w-l~
for( j=0; j~w2; j++ ) {
j2 = w-j-l;
tx = SkinSurface->KnotSequenceW(j]; -SkinSurface->KnotSequenceW(j] = tz - SkinSurface->KnotSequenceW(j2l; : , .
SkinSurface->KnotSequenceW(j2l = tz - tx;
}
if ((w%2) =--1) SkinSurfilce->KnotSequenceW(w2l = tz - SkinSurfilce->KnotSequenceW(w2 C_mi_sfstol~sf((short)SF_REPLC,SkinSurface,ptr);
free_skincntl(SkinSurface);
4 0 }
free(SkinSurface);

Nov. 26, 1990 Page 68 of 76 S~9-90-085 ;.

., . .. : . , 2 ~ C~

return 0;
#undef SF_STORE
#undef SF_REPLC

short C_sf_rnormbnd(ptr) short ptrl~;
short ret;
struct EDGE_SURFACE ~EdgeSI~rface;
EdgeSurf;~ce = (struct EDCE_SURFACE ~) mnlloc (siseof(struct EDCE_SURFACE));
it (EdgeSIlrfrco == 0) roturn 200;
ret = 6etbdrysf(ptr, EdgeSurf~ce);
if (ret == 0) 1 5 bsflip(~EdgeSurfnco-~B_Spline¦0¦);
bsflip(~t:EdgeSurrnco-al3_Splille~
rot = Dwrp bspl(~t:Ed6oSurfnco-aB_Splino¦21,~t~Ed~eSIlrfnce-an_Splinol31);
if (ret l= 0) return ret;
ret = C_mi_ststobnd ((short)SF_REPLC, EdgeSurf~ce, ptr );
2 0 freeEdKeSurf(EdgeSurface);
free(EdgeSurf;lce);
return ret;

#undef SF_STORE
#undef SF_REPLC

short C_st_rnormrul(ptr) short ptr[l;
3 0 strllct RULEDSVRFACE ` RuledSurface short ret;
RuledSIlrtnce = (struct RULEDSURFACE ~) malloc (sizoof(strllct RULEDSURFACF));
if (RuledSIlrfnce == 0) return ''00;

Nov. 26, 1990 Page 69 of 76 SA9-90-085 2 ~

ret = getrulsf(ptr, RuledSurface);
if (ret == 0) bsflip(&RuledSurface->B_SplineI);
bsnip(~:RuledSurface->B_Spline2);
ret = C_mi sfstorul((short)l, RuledSurf.tce, ptr);
(void) free_CntlPnts(5cRuledSurf3ce->B_SplineI);
(void) free_CntlPnts(~RuledSurface->B_Spline2);
1 0 free(RuledSurf~ce);
return ret;
}
short C_sf_rnormrot(ptr) short ptrll;
{
struct ROTATIONAL_SURFACE ~rotsrf;
short ret;
rotsrf = (struct ROTATIONAL_SURFACE ~) m;llloc (sizcof(struct ROTATION.~L_SURFACE));
2 0 if (rotsrf == 0) raturn 200;
ret = ssr GetRotation:l( ptr, rotsrf );
if( ret == 0 ) bsflip(rotsrf->B_Spline);
ret.= C_mi_sfstorev((short)SF_REPLC,rotsrf,ptr); '-' free_CntlPnts(rotsrf->B_Spline);
free(rotsrf);
return ret;
't Four examples of shaded surfaces are ~.
presented in Figures 20, 21, 22 and 23. Figure 20 shows a reverse surface normal of a top surface. Figure 21 shows a surface normal of a side surface. Figure 22 shows a reverse normal Nov. 26, 1990 Page 70 of 7~ SA9-90-085 - , ~
:: :,:, ~ ~S3~ ~

of a side surface, and Figure 23 shows a reverse normal of a front surface While the invention has been descr.ibed in terms of a preferred embodiment in a specific system environment, those skilled in the art recognize that the invention can be practiced, with modification, in other and different hardware and software environments within the spirit and scope of the sppended claims.

.`~ ' '~ ` `'~
, ~''~

.

Nov. 26, 1990 Page 71 of 76 SA9-90-085 ,

Claims (16)

The embodiments of the invention in which an exclusive property or privilege is claimed are defined as follows:
1. Apparatus for performing a set of display operations to modify a three dimensional drawing on a graphic display, comprising:
(a) means for storing a plurality of entities for defining a three dimensional drawing on a graphic display;
(b) means for defining another variable entity based on an aspect of the three dimensional drawing;
(c) means for modifying the variable entity; and (d) means for modifying the three dimensional drawing to reflect the changed variable entity.
2. Apparatus as recited in claim l, further comprising data structure means for storing three dimensional drawing information.

Nov. 26, 1990 SA9-90-085
3. Apparatus as recited in claim 1, further comprising data structure means for storing entity information.
4. Apparatus as recited in claim 1, further comprising means for substituting an entity form another drawing as the variable entity.
5. Apparatus as recited in claim 1, further comprising means for specifying the location where the drawing should appear on the graphic display.
6. Apparatus as recited in claim 1, further comprising means for joining two, three dimensional drawings.
7. Apparatus as recited in claim 1, further comprising means for making faces of a solid transparent.
8. Apparatus as recited in claim 1, further comprising means for defining a pair of parent/offsets parallel planes to form a nested relationship.

Nov. 26, 1990 SA9-90-085
9. A method for performing a set of display operations to modify a three dimensional drawing on a graphic display, comprising the steps of:
(a) storing a plurality of entities for defining a three dimensional drawing on a graphic display;
(b) defining another variable entity based on an aspect of the three dimensional drawing;
(c) modifying the variable entity; and (d) modifying the three dimensional drawing to reflect the changed variable entity.
10. A method as recited in claim 9, further comprising the step of creating a data structure to save three dimensional drawing information.

Nov. 26, 1990 SA9-90-085
11. A method as recited in claim 9, further comprising data structure means for storing entity information.
12. A method as recited in claim 9, further comprising the step of substituting a first entity from a first drawing for a second variable entity from another drawing.
13. A method as recited in claim 9, further comprising the step of specifying the location where the drawing should appear on the graphic display.
14. A method as recited in claim 9, further comprising the step of joining two, three dimensional drawings.
15. A method as recited in claim 9, further comprising the step of making faces of a solid transparent.
16. A method as recited in claim 9, further comprising the step of defining a pair of parent/offsets parallel planes to form a nested relationship.

Nov. 26, 1990 SA9-90-085
CA002055545A 1990-11-26 1991-11-14 Enhanced computer aided design system Abandoned CA2055545A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US61818790A 1990-11-26 1990-11-26
US07/618,187 1990-11-26

Publications (1)

Publication Number Publication Date
CA2055545A1 true CA2055545A1 (en) 1992-05-27

Family

ID=24476676

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002055545A Abandoned CA2055545A1 (en) 1990-11-26 1991-11-14 Enhanced computer aided design system

Country Status (4)

Country Link
US (1) US6115046A (en)
EP (1) EP0488569A3 (en)
JP (1) JPH05324775A (en)
CA (1) CA2055545A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6084587A (en) * 1996-08-02 2000-07-04 Sensable Technologies, Inc. Method and apparatus for generating and interfacing with a haptic virtual reality environment
US6552722B1 (en) * 1998-07-17 2003-04-22 Sensable Technologies, Inc. Systems and methods for sculpting virtual objects in a haptic virtual reality environment
US6421048B1 (en) 1998-07-17 2002-07-16 Sensable Technologies, Inc. Systems and methods for interacting with virtual objects in a haptic virtual reality environment
WO2006004894A2 (en) 2004-06-29 2006-01-12 Sensable Technologies, Inc. Apparatus and methods for haptic rendering using data in a graphics pipeline
US7880737B2 (en) * 2005-03-22 2011-02-01 Vijayvardhan Elchuri Graphical method and system for making drawings directly in three-dimensions on a computer monitor or other display device
US7639249B2 (en) * 2006-05-05 2009-12-29 Microsoft Corporation Direct inset beveling of geometric figures
USD655460S1 (en) * 2010-06-17 2012-03-06 Reef One Limited Aquarium

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4684990A (en) * 1985-04-12 1987-08-04 Ampex Corporation Method and apparatus for combining multiple video images in three dimensions
US5124693A (en) * 1985-10-29 1992-06-23 International Business Machines Three dimensional graphic display with user defined vanishing point
JPH0756678B2 (en) * 1985-11-01 1995-06-14 株式会社日立製作所 Interactive shape modeling system
US5003498A (en) * 1986-01-13 1991-03-26 Hitachi, Ltd. Graphic display method
JPH0614337B2 (en) * 1986-07-16 1994-02-23 本田技研工業株式会社 How to change the shape model
US4809065A (en) * 1986-12-01 1989-02-28 Kabushiki Kaisha Toshiba Interactive system and related method for displaying data to produce a three-dimensional image of an object
JPH0685128B2 (en) * 1987-03-12 1994-10-26 フアナツク株式会社 Automatic programming system
US4849913A (en) * 1987-04-10 1989-07-18 The Boeing Company Method for the design and construction of composite parts
GB8728836D0 (en) * 1987-12-10 1988-01-27 Quantel Ltd Electronic image processing
US4912664A (en) * 1988-02-01 1990-03-27 Mentor Graphics Corporation Method and apparatus for generating a mesh for finite element analysis
US5265197A (en) * 1988-12-23 1993-11-23 Kabushiki Kaisha Toshiba Geometric modeling apparatus

Also Published As

Publication number Publication date
JPH05324775A (en) 1993-12-07
EP0488569A3 (en) 1993-03-10
US6115046A (en) 2000-09-05
EP0488569A2 (en) 1992-06-03

Similar Documents

Publication Publication Date Title
Hummel et al. PEANUT: Computer graphics program to represent atomic displacement parameters
CA2055532A1 (en) Enhanced solid model generation
WO2010150768A1 (en) Data processing device, data processing method and programme
JPH09190541A (en) Interaction method with image map data structure
JPH04312177A (en) Cad/cam device
JPH0620012A (en) Scientific method of graphic display
CA2055545A1 (en) Enhanced computer aided design system
US7000197B1 (en) Method and apparatus for inferred selection of objects
Yamaguchi et al. Computer-integrated manufacturing of surfaces using octree encoding
Reiss A framework for abstract 3d visualization
Ropinski et al. Real-time rendering of 3D magic lenses having arbitrary convex shapes
Koike et al. VRCS: Integrating version control and module management using interactive three-dimensional graphics
Reiss 3-D visualization of program information (extended abstract and system demonstration)
Nooshin et al. Basics of Formian-K
Bidasaria Defining and rendering of textured objects through the use of exponential functions
Comba Interactive Graphics in Data Processing: A language for three-dimensional geometry
Geiben et al. Visualization of finite elements and tools for numerical analysis
CA2055587A1 (en) Enhanced computer aided design shading
Kameyama et al. A direct 3-D shape modeling system
van Wijk et al. Some issues in designing user interfaces to 3D raster graphics
İşler et al. Fast ray tracing 3D models
Panczak et al. RadCAD: Next generation thermal radiation analyzer
Hui et al. 3D cursors for volume rendering applications
Driskill Towards the design, analysis, and illustration of assemblies
JPH0729032A (en) Three-dimensional picture generation device

Legal Events

Date Code Title Description
EEER Examination request
FZDE Discontinued
FZDE Discontinued

Effective date: 19971114