Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
REPLICATOR SYSTEM AND METHOD FOR DIGITIZING THE GEOMETRY OF A PHYSICAL OBJECT
Document Type and Number:
WIPO Patent Application WO/1995/021417
Kind Code:
A1
Abstract:
A system (100) for generating a three-dimensional surface model of a physical object (122) includes a computer (102) and a coordinate measuring machine (CMM) (120). The CMM provides three-dimensional coordinates of user-specified points to the computer (102). A replicator program permits the user to define a cut plane (428) that passes through the physical object, and to capture three dimensional coordinates of points that fall at the intersection of the cut plane (428) and the surface of the object. Special viewing features of the program permit the user to view the distance between incoming points from the CMM and the cut plane, and to view the captured data in three dimensions (602-608) and from any viewing perspective. Other program features are included that enable the user to capture points falling at the intersection of the two planes (325), project capture points into a user-defined plane, and detect maximum and minimum points along an object's surface with respect to a user-defined plane.

Inventors:
GUBELMANN STEPHEN L (US)
Application Number:
PCT/US1995/001289
Publication Date:
August 10, 1995
Filing Date:
February 02, 1995
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
RADICAL ADVANCED TECHNOLOGIES (CA)
GUBELMANN STEPHEN L (US)
International Classes:
G05B19/42; (IPC1-7): G06F17/50; G06K11/06
Foreign References:
US4881177A1989-11-14
US5016199A1991-05-14
US5019993A1991-05-28
US5027281A1991-06-25
US5129054A1992-07-07
US5257204A1993-10-26
Download PDF:
Claims:
WHAT IS CLAIMED IS:
1. A system for generating a threedimensional representation of the surface of a multidimensional object, comprising: a computer; an input device capable of providing to said computermultidimensional coordinates comprising selected points which define the multidimensional object; a memory interfaced with said computer capable of storing the threedimensional coordinates of points received by said computer; a visual display connected to said computer capable of displaying the points stored in said memory; means responsive to the input device for defining a representation of a plane extending across at least a portion of space in which said object resides; and means for displaying said plane on said visual display in three dimensions.
2. The system of Claim 1, further comprising: means for assigning a tolerance region adjacent at least a portion of said plane; means for determining whether a point provided by said input device is within said tolerance of said plane; means for notifying a user when said point is within said tolerance; and means for capturing said point when said point is within said tolerance.
3. The system of Claim 1, wherein the input device comprises a coordinate measuring machine (CMM) .
4. The system of Claim 1, wherein the object is threedimensional.
5. The system of Claim 1, further comprising means connected to said memory for modifying at least a portion of the data representative of the surface of the multidimensional object so as to produce data representative of a modified multidimensional object.
6. The system of Claim 1, further comprising: means for displaying said plane as a straight line on said visual display; and means for continuously displaying said selected points on said visual display, to thereby permit a user to continuously view the relative distance between said selected points and said plane.
7. The system of Claim 1, further comprising: means for designating said plane as a target plane in which to project a point provided by said input device; and means for projecting said point onto said plane by calculating a set of threedimensional coordinates of a target point that is positioned on said plane, said target point located on a normal vector that passes through said point provided by said input device.
8. The system of Claim 1, further comprising: means for locating a point on the surface of the object that is a maximum distance from said plane, said means for locating comprising: means for determining a distance between said • plane and a selected point provided by said input device; means for comparing said distance to a distance between a current maximum point and said plane; means for replacing said current maximum point with said selected point when said selected point is farther from said plane than said current maximum point; and means for identifying the current maximum point.
9. The system of Claim 8, wherein the distance between the current maximum point and said plane is initialized to a selected value.
10. The system of Claim 1, further comprising: means for locating a point on the surface of the object that is a minimum distance from said plane, said means for locating comprising: means for determining a distance between said plane and a selected point provided by said input device; means for comparing said distance to a distance between a current minimum point and said plane; means for replacing said current minimum point with said selected point when said selected point is closer to said plane than said current minimum point; and means for identifying the current minimum point.
11. The system of Claim 10, wherein the means for locating a point that is a minimum distance from said plane comprises an initialization means, said initialization means comprising: means for receiving a starting point from the input device, said starting point being the multidimensional coordinates of a selected location along the surface of the object; and means for storing said starting point in the memory of the computer as the current minimum point.
12. A method of capturing points along the surface of a multidimensional object using a computer that receives incoming points from a coordinate measuring machine (CMM) , said incoming points being provided as threedimensional coordinates of locations specified by a user, said method comprising the steps of: (a) defining a cut plane with the computer, said cut plane passing through the object; (b) displaying said cut plane on a visual display of said computer; (c) determining whether an incoming point from the CMM is within a tolerance distance of said cut plane; and (d) when said incoming point is within said tolerance distance of said cut plane, performing the steps of: storing said incoming point in a memory of said computer; displaying said incoming point on said visual display; and generating a signal to inform the user that a point has been captured.
13. The method as defined in Claim 12 wherein said step (b) further comprises the step of positioning said cut plane so that it appears perpendicular to the surface of said visual display.
14. The method as defined in Claim 12 further comprising the step of displaying locations of incoming points from the CMM relative to said cut plane, to thereby permit the user to view the relative distance between said incoming points and said cut plane.
15. The method as defined in Claim 12 wherein said step (d) further comprises the step of projecting said incoming point onto said cut plane by determining the threedimensional coordinates of a target point that is positioned on said cut plane, said target point located on a normal vector that passes through said incoming point.
16. The method as defined in Claim 12 wherein said step (a) further comprises the steps of: selecting three noncolinear points on the outer surface of said object; and generating an equation for a plane that passes through each of said three noncolinear points, said equation representing said cut plane.
17. The method as defined in Claim 12 wherein said step (a) further comprises the step of laterally displacing a previouslydefined cut plane by a specified offset.
18. The method as defined in Claim 12 wherein said step (a) further comprises the step of rotating a previouslydefined cut plane by a specified angle about a specified axis.
19. The method as defined in Claim 12 wherein said step (a) further comprises the steps of: laterally displacing a previouslydefined cut plane by a specified offset; and rotating said previouslydefined cut plane by a specified angle about a specified axis.
20. The method as defined in Claim 12, wherein said step (a) comprises the step of selecting an orientation for said cut plane such that said cut plane is substantially perpendicular to the surface of the object where said cut plane intersects with the surface of the object.
21. The method defined in Claim 12, further comprising the steps of: defining a second cut plane with the computer, wherein said second cut plane passes through the object and intersects with said first cut plane; determining whether said incoming point from the CMM is within a second tolerance distance of said second cut plane; and when said incoming point is within both said first tolerance distance of said first cut plane and said second tolerance distance of said second cut plane, performing the steps of: storing said incoming point in the memory to capture said incoming point; displaying said incoming point on the visual display of the computer; and generating a signal to inform the user that a point has been captured.
22. The method defined in Claim 12, further comprising the steps of: defining a plane with the computer; selecting a point with the CMM, said point lying outside of said plane; and determining the coordinates of a projected point that is positioned on said plane, wherein said projected point is located on a vector that is normal to said plane and which passes through said point selected with the CMM, thereby projecting said point onto said plane.
23. The method as defined in Claim 22, wherein said step of selecting a point with the CMM comprises the steps of: placing a probe tip of said CMM at a desired location on the surface of the object; and depressing a button of said CMM to capture a set of multidimensional coordinates that represent said desired location.
24. The method defined in Claim 12, further comprising the steps of: defining a plane with the computer; receiving a first point from the CMM, said first point being the threedimensional coordinates of a selected location along the surface of the object; storing said first point in the memory as a current maximum point; receiving a second point from the CMM, said second point being the threedimensional coordinates of a second selected location along the surface of the object; calculating the distance between said plane and said first point to obtain a first distance value; calculating the distance between said plane and said second point to obtain a second distance value; comparing said first distance value to said second distance value; and when said second distance value is greater than said first distance value, replacing said first point in said memory with said second point as a new maximum point, thereby locating the maximum point on the surface of the object.
25. The method as defined in Claim 24, wherein said step of defining a plane comprises the steps of: selecting three noncolinear points with the CMM; and calculating an equation for the plane that substantially passes through each of said three noncolinear points.
26. The method defined in Claim 12, further comprising the steps of: defining a plane with the computer; receiving a first point from the CMM, said first point being the threedimensional coordinates of a selected location along the surface of the object; storing said first point in the memory as a current minimum point; receiving a second point from the CMM, said second point being the threedimensional coordinates of a second selected location along the surface of the object; calculating the distance between said plane and said first point to obtain a first distance value; calculating the distance between said plane and said second point to obtain a second distance value; comparing said first distance value to said second distance value; and when said second distance value is less than said first distance value, replacing said first point in said memory with said second point as a new minimum point, thereby locating the minimum point on the surface of the object.
27. The method as defined in Claim 26, wherein said step of defining a plane comprises the steps of: selecting three noncolinear points with the CMM; and calculating an equation for the plane that substantially passes through each of said three noncolinear points.
28. The method as defined in Claim 12, wherein, when the object includes a corner formed by intersection of three substantially planar surfaces, the method further comprises the step of capturing the corner formed by the intersection of the three substantially planar surfaces, and wherein said capturing step further comprises the steps of: (a) selecting a first set of three noncolinear points from the first substantially planar surface; (b) generating a first plane frcm said first set of three noncolinear points, said first plane passing substantially through each of said points of said first set; (c) selecting a second set of three noncolinear points from the second substantially planar surface; (d) generating a second plane from said second set of three noncolinear points, said second plane passing substantially through each of said points of said second set; (e) selecting a third set of three noncolinear points from the third substantially planar surface; (f) generating a third plane from said third set of three noncolinear points, said third plane passing substantially through each of said points of said third set; (h) determining an intersection of said first plane with said second plane to generate a first edge of the corner; (i) determining an intersection of said first plane with said third plane to generate a second edge of the corner; and (j) determining an intersection of said second plane with said third plane to generate a third edge of the corner.
29. The method as defined in Claim 28, further comprising the step of determining the intersection point of said first, second and third planes to determine a location of the corner.
30. The method as defined in Claim 28, further comprising the step of displaying said first edge, said second edge, and said third edge on the visual display, to thereby permit the user to view a geometry of the corner and a relative location of the corner.
31. The method as defined in Claim 12, wherein, when the object includes an edge formed by intersection of two substantially planar surfaces, the method further comprises the step of capturing the edge formed by the intersection of the two substantially planar surfaces, and wherein said capturing step further comprises the steps of: (a) selecting a first set of three noncolinear points from the first substantially planar surface; (b) generating a first plane from said first set of three noncolinear points, said first plane passing substantially through each of said points of said first set; (c) selecting a second set of three noncolinear points from the second substantially planar surface; (d) generating a second plane from said second set of three noncolinear points, said second plane passing substantially through each of said points of said second set; and (h) determining an intersection of said first plane with said second plane to generate a representation of the edge.
32. The method as defined in Claim 31, further comprising the step of displaying the edge on the visual display to thereby permit the user to view a geometry of the edge and a relative location of the edge.
33. The method as defined in Claim 12, wherein, when the object includes a rounded edge formed by intersection of a substantially planar surface with a rounded surface, the method further comprises the step of capturing the rounded edge formed by the intersection of the substantially planar surface and the rounded surface, and wherein said capturing step further comprises the steps of: (a) selecting three noncolinear points from the substantially planar surface with the CMM; (b) generating a plane from said three noncolinear points, said plane passing substantially through each of said three noncolinear points; (c) selecting a plurality of points from the rounded surface with the CMM; (d) projecting each point of said plurality of points onto said plane, to thereby obtain a plurality of points that fall on the rounded edge; and (e) fitting a curve to said plurality of points on the rounded edge, to thereby obtain a representation of the rounded edge.
34. The method as defined in Claim 33, wherein said step (d) is performed by effectively moving each point of said plurality of selected points in a direction perpendicular to said plane until each point intersects with said plane.
Description:
REPLICATOR SYSTEM AND METHOD FOR DIGITIZING THE GEOMETRY OF A PHYSICAL OBJECT

BACKGROUND OF THE INVENTION 1. Field of the Invention

The present invention relates to a computer modeling and graphics system, and more particularly to a system for generating a model of the surface of a physical object.

2. Description of the Related Technology After a physical model is created, it may be useful to create a computer file describing the model. This file can be used, among other things, to develop animations and create tooling. Companies perform this process in a variety of ways. For simple shapes, the object can be measured and the data entered manually, i.e., by hand, via a standard computer aided design (CAD) program. This works for simple objects but becomes very difficult with curves or other complex shapes. The operator must be well trained and very accurate in the measurement and entry steps in order to achieve good results by this method.

In the last several years a number of three-dimensional digitizing devices have been introduced on the market that allow the object to be "traced" in space and a file created from this data. These devices include both scanning laser based systems, that rotate the object on a pedestal and automatically gather the data, and manual digitizers, that are moved into position by the operator. Both system types have their disadvantages.

The scanning laser systems gather large amounts of data, usually at predetermined spacings. As a result, data files can become quite large, and the resulting models are often more complex then required. Models obtained in this manner are poorly suited for animation. These systems also have difficulty with some shapes. For example, when digitizing a human model, the system may not be able to distinguish the body from the arms. As a result, the arms of the model can

blend into the body. The resulting file must then be modified manually to correct many of such problems. This tends to be a time consuming and error prone task.

A major problem with manual digitizers (also referred to as "coordinate measuring machines") is that inputting the data is tedious and error prone. The physical model normally has a grid placed on it, either using thin tape or a drawing utensil. The operator, using the grid as a reference, goes to the points of interest and inputs them into a system. Since the digitizer is much more accurate than the operator, the resulting data is rarely smooth. Many times the model seams do not meet, or other problems are created that require the resulting data files to be hand modified. The operator thus must .be highly trained to obtain good results with this type of device.

Therefore, a system is needed to accelerate the process of digitizing a physical model for the purpose of creating a CAD file, and which does this by minimizing the human intervention required. Such a system needs to provide support for a digitizer in order to speed data gathering, eliminate errors, and simplify the process so less training is necessary.

Throughout the description that follows, the term "capture" will refer generally to the storage of data that represents the three-dimensional configuration of an object or a surface. The term "replicate" or "replication" will refer to the overall process of capturing and processing data to obtain a model for the object or surface.

APPENDIX The attached appendix, consisting of 171 pages of source code in the CADL language, is fully incorporated herein. The attached appendix contains a source code listing for a

Replicator program described herein. This source code is subject to copyright protection. The copyright owner has no

objection to the reproduction of the source code listing as it appears in the files of the Patent and Trademark Office, but otherwise reserves all rights.

SUMMARY OF THE INVENTION The present invention relates to a Replicator system for obtaining a three-dimensional representation of the surface of an object. The system includes a coordinate measuring machine (CMM) and a computer. The CMM provides user-referenced points to the computer by transmitting the three-dimensional coordinates of the points (with respect to a user-defined reference) to the computer. In the preferred embodiment the CMM comprises a three-dimensional measurement arm, and the user references points by positioning a probe tip of the measurement arm at a desired location. A CMM cursor displayed on the monitor of the computer permits the user to view the three-dimensional location currently referenced by the CMM, thereby assisting the user in locating and selecting desired points for capture by the system. Strings of captured points can by converted into entities such as open and closed splines, polylines and arcs, and the like. Point data and entity data is displayed in three dimensions on the monitor by using multiple display windows to display such data from various viewing perspectives. A system of user-definable grid planes permits the user to achieve any desired viewing perspective for viewing the data. Point and entity data can be passed to a surface modeling program to generate an industry-standard surface definition for the object.

A Replicator program (also referred to herein as "the program") supports a variety of user-assisted methods for capturing point data, and for capturing data that represents certain commonly-occurring geometric features such as corners, linear edges, and rounded edges. In accordance with one such method, the user defines a cut plane (by any of a variety of supported methods) that passes through an object to be replicated. The cut plane is displayed on the monitor as

being perpendicular to the screen of the monitor (i.e., the plane is shown as a straight line) . This permits the user to continuously view the distance between the point currently referenced by the CMM (as indicated by the CMM cursor) and the cut plane.

To capture points that fall along the intersection of the cut plane and the surface of the object, the user initially assigns a tolerance to the cut plane (by either entering a numerical distance, or by using a default tolerance provided by the program) . The user then references various points along the surface of the object (by dragging the CMM probe tip along the object's surface in the preferred embodiment) , until a point is found that is within the tolerance of the cut plane. To determine whether "incoming" referenced points are within the tolerance of the cut plane, the program continuously calculates the distance between each incoming point and the cut plane, and compares this distance to the tolerance. When a point is found to be within the tolerance, the computer captures the point. The computer also generates a tone, and displays the captured point on the monitor. Strings of points captured in this manner are particularly useful for generating open and closed splines. The program also has a mode for "projecting" the captured points into the cut plane (along a vector normal to the plane) , to thereby obtain points that actually fall within the plane.

The program supports various methods for defining a cut plane that corresponds to selected surface or portion of an object to be replicated. For example, the user can select three noncolinear points along the outer surface of the object. The program then calculates the equation for a plane that passes through each of the three points, and displays the plane on the monitor. The program will also generate two planes that are mutually perpendicular to this plane. Any of these three planes can be designated as the cut plane. The Replicator program also supports various modes for offsetting and rotating the currently-defined cut plane to thereby obtain a new cut plane. An auto-increment feature further allows the

user to space consecutively-defined cut planes apart by a fixed amount. These methods of defining cut planes can also be used for defining planes for performing non-cut-plane program functions (described below) . To further assist users in capturing point data, the Replicator program has a data capture mode that permits the user to use multiple intersecting cut planes simultaneously. When in this mode, the program captures only those referenced points that fall within tolerance of all of the currently- defined cut planes. Thus, for example, the use of two simultaneous cut planes permits the user to capture points that fall along (i.e., within tolerance of) the linear intersection of the two cut planes. This form of data capture is especially useful for generating topographical representations of surfaces, as will be described below. The Replicator program also permits three cut planes to be used simultaneously (all of which must intersect at a single point) . This form of data capture is especially useful for verifying that a manufactured object is built within certain specifications.

A related mode of data capture permits the user to define a plane (by any of a variety of methods, including those described above) , and then project user-selected points (captured with the CMM) into the plane. This form of data capture is especially useful for capturing points that are difficult or impossible to accurately reference with the CMM. For example, the feature can be used to capture a string of points that fall along a rounded edge formed by the perpendicular intersection of a planar surface with a curved or rounded surface. To do this, the user initially selects three noncolinear points along the planar surface, and instructs the Replicator program to generate a plane that passes through each of the three points. The user then enters a point-to-plane projection mode of the program, and select points along the rounded surface. Each selected point is automatically projected into the plane, and thus falls along the rounded edge. An arc or spline can then be fitted to the

string of points to obtain a mathematical representation for the edge. This method has been found to produce an extremely accurate representation of well-defined rounded edges.

The Replicator program also supports certain user- assisted methods for capturing corners and edges of objects. For example, using a "corners" program option, the user can capture a corner formed by the convergence of three substantially planar surfaces. To generate a planar representation for each such surface, the user selects a set of three noncolinear points from each of the three surfaces (a total of nine points) . The program then converts each set of three points into a corresponding plane that passes through all three points. Equations for the planes representing each of the three surfaces are thus generated. The program then locates the edges that converge at the corner by finding the respective intersections of the planes. Assuming, for example, that the planes are labeled as plane A, plane B and plane C, one edge is derived as the intersection between planes A and B, a second edge is derived as the intersection of planes A and C, and a third edge is derived as the intersection of planes B and C. The program then calculates the coordinates of the intersection of all three planes to locate the actual corner. The "edges" feature of the program is based on similar principles, but requires the user to select a total of six points.

Finally, the Replicator program includes a mechanism that permits the user to easily locate and capture certain maximum and minimum points along a surface of an object. To capture a maximum point, for example, the user initially defines a plane (using any of a variety of methods) , and then enters the program's "point far" mode. Upon entering this mode, the system automatically captures the first incoming point from the CMM, and then replaces the captured point each time a new incoming point is found to be farther from the plane than the currently-captured point. By referencing various points along the surface of an object, the user can thereby use this feature to locate and capture a point that is a maximum

distance away from the user-defined plane. A "point near" mode operates in a similar fashion, and permits the user to locate a point that is closest to the user-defined plane.

BRIEF DESCRIPTION OF THE DRAWINGS 5 Fig. 1 is a block diagram illustrating the components of a presently preferred embodiment of a Replicator system. » Fig. 2 is a screen dump from the Replicator program of the present invention. The screen dump illustrates the four windows provided by the program for viewing captured data from 10 different viewing perspectives. Shown in each window (as dashed lines) are three user-defined grid planes, which can be used by the user to adjust the views shown in each window.

Figs. 3A, 3B and 3C further illustrate the grid plane feature of the present invention, including one of the four 15 ways that the system of grid planes can be defined by the user.

Fig. 4A is a screen dump image that illustrates a block that has been captured by the system. The grid planes have been defined to produce a top view, side view, end view and 20 perspective view of the block in the respective windows.

Fig. 4B is a screen dump image of the block of Fig. 4A, illustrating a feature of the Replicator program that permits the user to move the system of grid planes without modifying the views of the captured data. 25 Fig. 5 is a high-level flow chart, illustrating a method of capturing data with the aid of a user-defined cut plane.

Fig. 6A illustrates point data that has been captured by the system using the cut plane feature of the present invention. 30 Fig. 6B illustrates a set of six closed splines that were generated from the point data of Fig. 6A.

Fig. 6C illustrates the display following the application of FastSURF to the spline data of Fig. 6B.

Fig. 6D illustrates a program feature that permits the f** 35 user to simultaneously view the surface model generated by FastSURF and the captured points from which the surface model

was derived.

Fig. 7 illustrates a method of the present invention for capturing a corner of an object.

Fig. 8 illustrates the method of Fig. 7, as applied to a corner formed by the convergence of three non-perpendicular surfaces.

Fig. 9 illustrates a method of the present invention for capturing a linear edge of an object.

Fig. 10 illustrates the method of Fig. 9, as applied to a linear edge formed by the convergence of two non- perpendicular surfaces.

Fig. 11 illustrates a method of the present invention for capturing a rounded edge of an object.

In the drawings, the left-most digit (or two digits) of a reference number identifies the drawing in which the reference number first appears. For example, the reference number "708" may be found in Fig. 7, and the reference number

1008 may be found in Fig. 10.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT The following description is organized into the following thirteen sections: 1. Components of the System; 2. General Operation of the System; 3. System In'tialization; 4. Grid Planes; 5. Views; 6. Data Capture using Cut Planes; 7. Simultaneous Use of Multiple Cut Planes; 8. Use of Non- Parallel Cut Planes; 9. Capture of Corners; 10. Capture of Linear Edges; 11. Capture of Rounded Edges; 12. Point-to-Plane Projections; 13. Capture of Maximum and Minimum Points, and 14. Epilogue.

1. Components of the System

Fig. 1 illustrates the hardware components of one presently preferred embodiment of a Replicator system 100. The system 100 comprises a computer 102, such as an 80486- based personal computer (PC) or laptop computer. The computer 102 is connected to a plurality of components internal and external to an enclosure 104. A graphics interface 106 interconnects the computer 102 to a video monitor 114. The video monitor 114 may also be included within enclosure 104. A speaker 105, a storage device 108, (e.g., a hard disk drive of a minimum 80 megabytes) , a keyboard 110, a pointing device 112, (e.g., a mouse), an optional printer 116, are also connected to the computer 102.

A coordinate measuring machine 120 (CMM) is also connected to the computer. In the presently preferred embodiment, the CMM 120 is a Metrecom Industrial-1 ("IND-1") available from Faro Technologies, Inc. The IND-1 comprises a measurement arm 120a that is connected to controller 120b. The measurement arm 120a has a probe tip 121 for probing an object 122. The arm 120a also has a handle 125 for guiding the probe tip 121. Two buttons Bl and B2 are located on the handle 125, and allow the user to control the capture of point data (i.e., the three-dimensional coordinates of individual points) while probing the object 122. Because the IND-1 is presently the preferred CMM 120, a brief description of the IND-1 will now be provided. The IND-

1 is a three-dimensional (3-D) measurement arm/controller which sends the location of the arm's probe tip 121 to the computer 102. Coordinates are in X, Y and Z terms (i.e., based on a rectangular or Cartesian coordinate system) with respect to a user-defined reference and origin. The IND-l has six degrees of freedom (X, Y, Z, pitch, roll, yaw) , and is constructed of anodized aircraft aluminum with precision bearings. High precision rotary transducers at each of six joints combine to provide complete point position and body orientation information. A point probe and a 0.25" ball probe are included with the system. Custom probes can be used with convenient probe calibration software. The Sigma of the IND-l 120 is 0.008 inches for both single point positional accuracy and linear displacement accuracy. Therefore, the 2-Sigma accuracy of the IND-01 is +/- 0.016 inches. This means that 95.5% of all measurements will have an accuracy of +/- 0.016 inches.

Throughout the description that follows, it should be recognized that the CMM 120 of the system 100 need not comprise a measurement arm 120a. For example, non-contact CMM devices such as lasers, sonic devices and the like can be used. Thus, reference to the "measurement arm" and "probe tip" throughout this description should be understood to refer only to one presently preferred embodiment of the system 100, but should not be understood to limit the application of the present invention to such measurement devices. It should also be recognized that a CMM which provides 3-D coordinates in spherical terms (i.e., coordinates of p, θ and φ) can be used.

The Replicator system 100 includes two primary software components. The first software component is a Replicator program. The Replicator program is written in CADL, which is an advanced design language developed by CADKEY, INC. The source code for the Replicator program is provided in the attached appendix. The Replicator program links together the prior art components of the system 100 in a manner that creates an extremely powerful tool for rapidly and efficiently

replicating an object. A variety of unique data entry and processing methods in accordance with the present invention are supported by the Replicator program. These methods significantly simplify the task of generating a 3-D representation of an object over prior art systems, and will be the primary focus of this application.

The second primary software component of the system is a commercially available software package called FastSURF, available from FastSURF, Inc., of Sonora, California. FastSURF is an interactive program that allows the user to build and manipulate complex free-form surfaces from within CADKEY.

2. General Operation Of the System

This section will provide a basic description of some of the functions that can be performed using the Replicator system 100. More detailed descriptions of these and other functions will be provided in the sections that follow, with emphasis being placed on the data capture and processing methods supported by the Replicator program. The Replicator system 100 allows an operator to rapidly and efficiently obtain a three-dimensional representation of the surface of an object 122. The CMM 120 provides the 3-D rectangular coordinates of selected locations or "points" along the surface of a physical object 122 (with respect to a user-defined origin and orientation) to the computer 102. Selected points are "captured" (i.e., the X, Y and Z coordinates are stored) by the computer 102 at the control of the user. Note that the term "point," as used herein, refers collectively to both a physical location in 3-D space, and the 3-D coordinates of the physical location. Strings or groups of points captured by the computer 102 can be converted into certain entities such as lines, splines, polylines, circles, edges and corners.

The Replicator system 100 supports a variety of modes for capturing points. In one mode of operation, the user captures a single point by holding the probe tip 121 at a desired

location, depressing the button Bl, and then releasing th button Bl. Upon the release of the button Bl, the X, Y and coordinates of the probe tip 121 are stored by the compute 102. This method of capturing a single point with the prob tip 121 will be referred to as "probe-selecting" the point, and is used for a variety of applications.

The Replicator program has four general modes fo capturing strings of points (or "point strings") that may b used to generate splines and other entities. The use initially specifies a type of entity to be generated. Fo example, the user may specify that he or she wants to build a open spline. The user then specifies the mode for capturin the string of points that will be used to generate the entity. The entity type and data capture mode are selected using sequence of menus of the Replicator program and/or using th keyboard 110.

The first of the four modes for capturing strings o points is referred to as "cut plane mode." When in cut plan mode, the Replicator program makes use of a user-defined cu plane to capture points. The cut plane is a three-dimensiona plane that slices through the space occupied by the objec 122. The cut plane is defined by the user (by any one o several methods, as discussed below) prior to entering cu plane mode. Once cut plane mode has been entered, the use places the probe tip 121 of the measurement arm 120a on th object 122, depresses the button Bl on the probe tip handl 125, and drags the probe tip 121 along the surface of th object 122. When the probe tip 121 passes through the cu plane, the probe tip position is captured by the computer 102, and a beep is sounded (on the speaker 105) to notify the user. The user then releases the button Bl, moves the probe tip 12 to a new starting position, and repeats the process. Sequences of points that fall along the intersection of th cut plane and the surface of the object 122 are thereb captured.

Once the desired number of points have been capture using the currently-defined cut plane, the user presses th

button B2, and the Replicator program automatically converts the captured string of points into an entity (of the type previously selected) . A new cut plane can then be defined, and the next string of points can be captured. Points captured in this manner are particularly suitable for the generation of splines that represent cross sections of the object 122. A variation of cut plane mode, referred to as "cut planes mode," permits the user to simultaneously use multiple intersecting cut planes to capture points. For example, the user can define two cut planes that intersect, to thereby capture points that fall along the linear intersection of the cut planes.

The second mode for capturing a string of points is referred to as the "manual mode." When in manual mode, the user probe-selects individual points of the point string by clicking and releasing the button Bl as described above. Once the desired number of points have been captured, the user depresses the button B2, and the Replicator program automatically converts the point string into an entity. The third mode for capturing point strings is referred to as the "automatic mode." This mode permits the user to capture a point string by depressing the button Bl and dragging the probe tip 121 across the surface of the object 122. Points that are a user-specified distance apart are captured as the position of the probe tip 121 changes with the button Bl depressed. Once the user releases the button Bl to end the point string, the user depresses the button B2 to convert the string of points into an entity.

The fourth mode, referred to as "semiautomatic mode," permits the user to capture points by either the click-and- release method described above for manual mode, or the click- drag-and-release method described for automatic mode.

Points that are captured (by any of the above methods) are displayed on the video monitor 114, using multiple views to permit the user to view the points in all three dimensions. Entities generated from strings of points are also displayed on the monitor 114. For example, a spline is shown as a curve

that has been fitted to the points of a point string (see Figs. 6A and 6B) . The user can achieve any desired viewing perspective of the data by modifying a system of reference grid planes, as described below. Through a series of menus, the Replicator program allows the user to perform various operations on groups of points that have been captured. For example, the user can also utilize the measure option to determine the distance between two points, and can use the "Point Near" and "Point Far" functions of the program to locate certain maximum and minimum points on the physical object 122 with respect to a user- defined plane.

The Replicator program also has special modes for allowing the user to efficiently generate an entity for certain commonly-occurring shapes and features. For example, the Replicator program includes special routines that allow the user to capture an edge or a corner of an object without having to generate one or more point streams. To capture a corner, for example the program prompts the user to probe- select three noncolinear points (i.e., three points that do not fall on the same line) from each of the substantially planar surfaces that form the corner. Each point is probe- selected by depressing the button Bl, and then releasing the button Bl with the probe tip 121 at the desired location. Once all of the points have been captured for each surface, the Replicator program generates a mathematical representation for the location and geometry of the corner, and displays a corner symbol on the screen. The Replicator program provides a simple mechanism for capturing linear edges and rounded edges. These modes will be discussed in the sections that follow.

Finally, the Replicator program has a point-to-plane projection feature that is useful for a variety of applications. This feature permits incoming points from the CMM 120 to be "projected" into a user-defined plane in a direction that is normal to the plane. The various applications of this feature will be described in the

following sections.

Since users of the Replicator program will typically re¬ use the same capture features repetitively throughout the replication process, the Replicator program per. ts the user to store sequences of commands (i.e., menu options and keyboard commands) for re-use. This feature allows the user to place the program in a desired capture mode and/or perform a desired function without having to re-enter the commands each time. For example, the user can store a sequence of commands that offsets the current position of a cut plane by a fixed amount and then places the Replicator program in a mode which permits the user to generate a closed spline using a single cut plane. This would allow the user to rapidly progress from one cut plane to the next without having to specify the cut plane position, entity type, and data capture mode each time. In addition to speeding up the replication process, this feature allows unskilled workers to capture data

(by a pre-specified data capture methodology) without knowing how to use the various commands and menu options of the Replicator program.

Entities generated using the Replicator program can optionally be passed to FastSURF. FastSURF allows the user to generate a surface definition (or "surface model") for the object 122. FastSURF generates the surface definition by fitting an array of smoothly joined parametric bi-cubic patches (formed by cubic splines) to the geometric entities obtained using the Replicator program. The surface definition generated by FastSURF can be translated (by FastSURF) into an industry standard IGES (Interim Graphics Exchange Standard) format, permitting the surface definition to be passed between various applications.

The data (i.e., points, entities, surface definitions, etc.) obtained using the Replicator system 100 can be modified using industry standard CAD/CAM or modelling software, and can ultimately be used for any of a variety of applications. For example, the data can be used to create toolings, molds, etc. for the manufacture of copies of the object 122. The data can

also be used for various graphics, animation and computer simulation purposes.

3. System Initialization

Before the measurement arm 12Oa can generate meaningful coordinate data, the CMM 120 must be initialized with an origin and an orientation. The origin is a reference point from which the CMM 120 measures the X, Y and Z coordinates of the probe tip 121. The orientation is the direction of the X, Y and Z axes that extend from the origin. In the preferred embodiment, the Replicator program uses a utility program that is provided with the Faro Metrecom IND- 1 to allow the user to enter the origin and orientation data using the measurement arm 120a. The user initially probe- selects two reference points (typically from a table or platform surface on which the measurement arm 120a is mounted) that define an X vector, with the first point serving as the origin. The user then probe-selects a third reference point

(that does not fall on the X vector) to define an XY plane.

The utility program uses these three reference points to generate the equation for the XY plane, and to generate equations for the XZ and YZ planes that are perpendicular to the XY plane.

The reference origin and orientation established during the initialization process are referred to as the "real world" origin and orientation. All coordinate data returned by the CMM 120 following initialization is with reference to this real world origin and orientation (in units of centimeters or inches, as specified by the user) . The real world reference and origin are stored in hard memory (e.g., on a hard drive, or in battery backed-up memory) , allowing the user to start a new session without re-initializing the system. Thus, the user does not have to repeat the initialization process at the beginning of a new session (unless the measurement arm 120a has been moved to a new mounting location) . Following initialization, the Replicator program displays four windows for viewing point data. The four windows are

shown in Fig. 2, which was generated as a screen dump from the Replicator program. Each window 202, 204, 206, 208 corresponds to a different vantage point or viewing perspective from which to view point and entity data to be captured. The relationship of each view to the real world orientation is indicated by the sets of X, Y, and Z axes 210a- 210d (or "real world axes") displayed in the lower left-hand corner of each window. Assuming that the Y axis points in the upward direction and the Z axis extends from the front of the object, the window 202 will provide a top view of the object, the window 204 will provide a front view of the object, the window 206 will provide a side view of the object, and the window 208 will provide an isometric view of the data. The centers of the respective windows 202, 204, 206, 208 initially correspond to the real world origin established during the initialization process.

To permit the user to view the 3-D location of the probe tip 121, probe tip cursors (not shown) are displayed in each of the four windows 202, 204, 206, 208. Points that are captured are shown as an "+" in each window (See Fig. 6A) . Entities are shown using various symbols that correspond to the respective entities.

4• Grid Planes

Referring to Fig. 2, the concentric squares formed by dashed lines in the respective windows represent an XY grid plane 212, an XZ grid plane 214, and a YZ grid plane 216. The three grid planes are mutually perpendicular. The three grid planes 212, 214, 216 initially correspond to the real world axis and orientation (i.e., the grid planes intersect at the real world origin and are aligned with the real world X, Y and Z axes) . However, the origin and orientation of the grid planes may be redefined by the user (as described below) , in which case the grid plane origin and orientation may differ from the real world origin and orientation. Note that the user can readily ascertain the relative orientation of the grid planes 212, 214, and 216 with respect to the real world

axes by comparing the orientation of the grid plane squares 212, 214, 216 with the real world axes 210a-d in the lower left hand corner of each window 202, 204, 206, 208. Fig. 4A, for example illustrates a situation wherein the grid planes have a different orientation from the real world axes.

Associated with the set of three grid planes 212, 214, 216 is a set of grid plane axes (not shown in Fig. 2) that are used as a reference for defining the location and orientation of the grid planes. The center of each window 202, 204, 206, 208 corresponds to the origin of the grid plane axes (or the "grid plane origin"). Any of the grid planes 212, 214, 216 may be offset from the grid plane origin, in which case the offset grid plane (or grid planes) will be shown in the windows 202-208 as being offset from the center. The offset feature is further described below.

The sides of the respective squares that represent the grid planes 212, 214, 216 correspond to user-defined physical distances, and thus serve as distance references for viewing data. For example, the sides of the outer squares in the windows 202, 204, 206, 208 can be defined to correspond to a distance of six inches (in which case the inner squares will correspond to two inches) . The user can thus "zoom in" and "zoom out" by re-assigning a scale value to the grid plane squares. The grid planes are used for various purposes by the

Replicator program. For example, the user can designate one of the grid planes as a cut plane for capturing data, or as a target plane for performing point-to-plane projections. The user can also define the grid planes in a manner that allows the user to obtain desired viewing angles in the windows 202, 204, 206 and 208. Furthermore, the origin and orientation of the grid planes axes (and the offsets from the grid plane axes) can be changed as the user progresses to various portions of the object 122 being replicated. These and other uses and advantages of the grid plane feature of the Replicator program will be described throughout this specification.

The concept of grid planes is further described with reference to Figs. 3A, 3B and 3C. Fig. 3A illustrates the system of grid planes. The system of grid planes consists of a set of mutually perpendicular grid plane axes (i.e., an X axis, a Y axis and a Z axis) , and a corresponding set of mutually perpendicular grid planes (i.e., an XY grid plane, an XZ grid plane, and a YZ grid plane) that are aligned with the grid plane axes. If the origin and orientation of the grid plane axes have not been set by the user, the grid plane axes will have the same origin and orientation as the real world axes. The methods supported by the Replicator program for setting the grid plane axes to a new location or orientation are described below.

Any of the grid planes can be displaced or "offset" from the grid plane origin by the user. As illustrated by Fig. 3B, for example, the user can specify a +Y or -Y offset for offsetting the XZ plane in the positive or the negative direction. This method of defining a grid plane is useful, for example, for allowing the user to generate a new cut plane that is offset by a desired distance from the existing cut plane. The user can, for example, establish a set of equidistant, parallel cut planes by merely incrementing the offset of a grid plane by a fixed amount between captures of point strings (manually or by using an auto-increment feature of the program) .

The Replicator program also allows the user to offset multiple grid planes. In Fig. 3C, for example, the YZ grid plane is displaced in the positive X direction by an offset 320, and the XZ grid plane is displaced in the positive Y direction by an offset 322. This may be desirable, for example, when using the cut planes mode of the Replicator program, wherein multiple grid planes are used simultaneously as cut planes.

The grid planes always remain aligned with the grid plane axes. Thus, the XY, XZ and YZ grid planes always have the same orientation as the grid plane axes, regardless of whether one or more of the grid planes are offset from the grid plane

origin .

The Replicator program currently supports four methods for defining the origin and orientation of the grid plane axes. These methods can be used separately or in combination. Under the first method, the operator uses the pointing device 112, the probe tip 121, or the keyboard 110 to select a grid plane origin, and specifies the orientation of the grid plane axes by selecting either the real world orientation, or the existing orientation of the grid plane axes. The Replicator program then places the grid plane axes at the point selected, with an orientation as specified by the user. When this method is used, the Replicator program automatically resets each of the grid planes to the new grid plane origin (i.e., all grid plane offsets are reset to zero, resulting in three grid planes that intersect at the grid plane origin) .

Under the second method, the user selects three noncolinear points (typically on the surface of the object to be replicated) , and designates either the XY, XZ or YZ grid plane as being the plane in which the three points fall. The three points may be selected using the probe tip 121, the keyboard 110, or the pointing device 112. The Replicator program uses the first of the three selected points as the grid plane origin, and generates the designated grid plane by calculating the equation for the plane that passes through the three points. The Replicator program then derives the other two grid planes from the designated plane and the grid plane origin. All grid planes are reset to the newly-defined grid plane origin when this method is used. This method is useful, for example, for allowing the user to generate a cut plane that passes through three user-selected points on the surface of the object. The user would merely click and release the button Bl with the probe tip 121 at the three desired locations through which the cut plane is to pass. This method is also useful when the user wants to align the system of grid planes with a certain surface or portion of an object, and then use the offset feature to generate a set of parallel cut planes.

The fourth method for defining grid planes involves the use of the XYZ rotate feature of the Replicator program, which allows the user to rotate the grid plane axes by a specified angle about one of the three axes. The user can, for example, rotate the existing grid plane axes about the X axis by 20 degrees, and about the Y axis by 10 degrees. This permits the user to achieve any desired grid plane orientation, and is especially useful for allowing the user to define a cut plane that is rotated with respect to a previously-used cut plane. The desirability of using such non-parallel cut planes is discussed below in the sections that follow.

The grid plane axes can be rotated using either the keyboard 110 or the pointing device 112. The Replicator program also has an auto-increment rotate feature which permits the user to rotate the grid plane axes by fixed increments. When the grid plane axes are rotated, the grid planes rotate with the grid plane axes, but maintain their respective offsets. In Fig. 3C, for example, rotation of the grid plane axes about the Z axis would cause the XZ and YZ grid planes to follow a circular path as shown by the dashed line 330. This rotation scheme is useful, for example, for generating a series of concentric splines that represent the topography of a surface, as described in the "Cut Planes" section below. The Replicator program also allows the user to assign a tolerance to the grid planes. The tolerance serves as a sensitivity level for capturing data when using a cut plane. If the user assigns a tolerance of 0.03 inches, for example, a point would be captured whenever the CMM 120 outputs a point that is within ±0.03 inches of the cut plane. Since the accuracy of the CMM 120 is not perfect, a tolerance level of zero would result in cut plane crosses by the probe tip 121 that would go undetected by the computer 102. The use of tolerance levels is thus necessary to account for the inaccuracies of the CMM 120. Since the use of tolerance levels results in captured points that fall outside the cut plane, the Replicator program has an "align" mode, which

causes all captured points to be "projected" into the cut plane. A point is projected by moving it in a direction normal to the cut plane until it falls in the cut plane.

As described above, the grid planes are illustrated on the monitor 114 as dashed lines (as shown in Fig. 2) . One of the three grid planes can be designated by the user (using the pointing device 112 or the keyboard 110) as the "primary" grid plane, which will then be shown in red on the monitor 114. The primary grid plane is used as the cut plane when the cut plane mode of the Replicator program is entered. The primary plane is also used as the reference plane when the Replicator program's Point Near and Point Far features (described below) are used. The primary grid plane is also used as a target plane for projecting captured points when the programs Point- To-Plane Projections feature is used (also described below) .

The user can also designate either one or two of the three grid planes as a "secondary" grid plane. Secondary grid planes are shown in green on the monitor 114. Grid planes that have been designated as secondary are used as cut planes (in addition to the primary grid plane) when the cut planes mode of the Replicator program is entered.

A ' "GP Stats" (grid plane statistics) menu option of the Replicator program allows the user obtain various information about the currently-defined system of grid planes. Specifically, the GP Stats option displays the X, Y, and Z coordinates of the grid plane origin, the rotation of the grid plane axes with respect to the real world axes, the displacement of each grid plane from the grid plane origin, and the coefficients of the equation for the primary grid plane.

5. Views

Referring to Fig. 2, the Replicator program normally displays point data in each of the windows 202, 204, 206, 208 such that two of the grid planes are perpendicular to the screen, and the third grid plane is parallel to the screen.

In the window 202, for example, the vertical line 220

represents the YZ grid plane, which is perpendicular to the screen. This method of displaying the grid planes facilitates the capture of data using cut planes, as will be described in the following section. Since the Replicator program normally aligns the views to correspond to the grid planes as in Fig. 2, the respective views of the point data are automatically adjusted whenever the grid plane orientation is changed. This advantageously allows the user to view captured point data from any desired angle. If the user wishes to view the captured data from a different vantage point, the user merely redefines the grid plane orientation accordingly (using one of the methods described above) .

The user can easily align the grid plane system to a surface of an object (using one of the methods described above) for the purpose of establishing a set of views. The user can then use a special display feature of the program to maintain these views throughout the replication process. These display methods are illustrated by Figs 4A and 4B. Fig. 4A is a screen dump image that shows the corners and edges of a rectangular block 400. By defining the XY grid plane 402 to correspond to the top surface 404 of the block 400, the user establishes a set of views wherein the window 412 provides a top view of the block 400, the window 414 provides a side view of the block 400 and the window 416 provides an end view of the block 400. This can be done, for example, by selecting the menu option that permits the grid plane system to be defined by selecting three points to define a grid plane. The user can then probe-select a point from each of any three of the four corners on the top surface 404 of the block 400. Thus, the user can easily adjust the views to correspond to the object, regardless of the placement of the object with reference to the measurement arm 120a. To obtain a more accurate correspondence between the grid planes and the top surface 404, the user can capture the three corners (using the "corners" feature of the program, described below) , and then select the three corners (using the pointing device 112) as

the defining points for the XY grid plane.

To permit the user to maintain a current set of views, the Replicator program has a mode which permits the user to re-define the grid plane orientation without changing the previously-established set of views. This is illustrated in Fig. 4B. Fig. 4B shows the same views of the block 400 of Fig. 4A, but with the grid planes rotated by 45 degrees about the vertical axis. This is accomplished by "locking" the current set of views and then rotating the grid planes. This feature is useful when the user wishes to rotate the grid planes to define a new cut plane, but does not wish to alter the existing views of the data. For example, the user may wish to use a cut plane that is diagonal with respect to the object 400, such as the plane 428 shown in the windows 412 and 418 of Fig. 4B. As shown, the Replicator program permits the user to do this without modifying the previously established views.

Since the user may wish to switch back and forth between various sets of views during the replication process, the Replicator program allows the user to save one or more sets of grid planes that have been defined. This permits the user switch back to a previously established set of views without having to redefine the grid planes. This feature is especially useful when working with complex objects which must be viewed from numerous angles throughout the replication process.

Finally, the Replicator program permits the user to switch to a set of real world views at any time.

As should be apparent from the foregoing, the grid plane feature of the Replicator program gives the user a high degree of control and flexibility in viewing point and entity data captured with the system. As those skilled in the art will recognize, such control and flexibility in virtually essential when generating models for complex shapes and surfaces. 6. Data Capture usinσ Cut Planes

As described above, cut planes can be used as a means for

gathering point data. The point data obtained using a given cut plane represents the outer contour of the object being replicated where the cut plane passes through the object.

Fig. 5 illustrates a high level process used by the computer 102 to gather point data (i.e., X, Y and Z coordinates of points) in accordance with this technique. This process is entered when the user selects the Replicator program's cut plane mode. Prior to entering cut plane mode, the user must designate one of the three grid planes as the primary grid plane. The user may also specify an entity type prior to entering cut plane mode. If no entity type is specified, no entity will be automatically generated following the capture of the point stream. The user may also assign a tolerance to the grid planes. If no tolerance is specified, a default tolerance is used.

Beginning at a start state 552, the computer 102 advances to state 554 to get a point (i.e., the X, Y and Z coordinates of a point) from the CMM 120 as the probe tip 121 is guided by the user along the surface of object 122 with the button Bl depressed. Moving to a decision state 556, the computer 102 determines whether the point is within the tolerance of the cut plane. Assuming that the cut plane is defined by the equation ax + by + cz + d = 0, and the point has coordinates

( χ ι* y_» z _) » fc k e s gned distance of the point from the cut plane is given by the equation:

Distance = (1)

SQRT(a 2 + b 2 + c 2 )

The absolute value of this distance is compared with the tolerance for each point received by the CMM 120. If a given point is not within the tolerance, the program moves back to state 554 to get th,i next point from the CMM 120 as the user continues to move t e probe tip 121 along the surface of the object 122.

When an incoming point is found to be within the tolerance of the cut plane, the computer 102 saves the

coordinates of the point in an X, Y, Z point array, as indicated by the block 558. If the "align" feature of the Replicator program is enabled, the coordinates are first modified to project the captured point into the cut plane. The process used to so project the point into the cut plane is described below in the section "Point-to-Plane Projections."

To signal to the user that a point has been captured, the computer 102 generates a tone on the speaker 105, and displays a " + " symbol in each window 202, 204, 206, 208 at the location at which the point was captured. This signals the user to release the button Bl and repeat the process from a new starting point. During this process, the user can control the spacing between captured points by viewing the probe tip cursor on the monitor 114 with respect to the cut plane and the previously captured point.

Once the user has captured the desired number of points, the user presses the button B2. Referring to the decision state 560, if the button B2 is depressed, the computer 102 advances to the decision state 564. If not, the computer 102 moves back to state 554 to get the next point from the CMM 120. After the user presses the button B2, the Replicator program,generates the specified entity from the captured point stream. Referring to the decision states 564, 568, 572 and 576, the user may convert the point string into a point stream, a line steam, a polyline or an (open or closed) spline respectively. The process blocks 566, 570, 574 and 578 for performing these respective conversions represent CADL routines that are provided with the CADL language. If no entity was specified, the process of Fig. 5 terminates without generating an entity.

The data capture method described above is significantly facilitated by the Replicator program's standard method of viewing the grid planes. As discussed above, and shown in Fig. 2, two of the grid planes in each of the windows 202, 204, and 206 appear as vertical lines, representing planes that are normal to the screen. Since the grid plane that has been designated as the cut plane is shown in red, the cut

plane will thus appear as a straight red line (in two of the three windows 202, 204, 206) . This advantageously allows the user to continuously view the distance between probe tip 121 (as indicated by the probe tip cursor) and th cut plane, thereby giving the user a high degree of control over the data-entry process. Experimentation has shown that it is difficult to capture useful point data with a cut plane if the cut plane is not displayed in this manner.

As noted in the previous section, when the special viewing options of the program are not being used, the Replicator program automatically adjusts the views in the respective windows 202, 204, 206, 208 whenever the grid planes are redefined, to maintain the grid plane display of Fig. 2. Thus, if a cut plane is rotated by the user, the program automatically adjusts the respective views so that the newly- defined cut plane appears as a straight line.

7. Simultaneous Use of Multiple Cut Planes

As noted above, the Replicator program also has a "cut planes" mode which permits the user to designate multiple grid planes to be used as simultaneous cut planes. When in this mode, the Replicator program only captures points that are within the tolerance of all cut planes. This mode of capturing data can be illustrated with reference to Fig. 3C. Referring to Fig. 3C, the user can designate both the XZ and the YZ grid planes as cut planes. The Replicator program will then check each incoming point to determine whether it is within tolerance of both the XZ and the YZ planes, and capture only those points that meet both conditions. As illustrated by Fig. 3C, captured points would thus fall along a line 325 that is parallel to the Z axis.

This feature has many powerful applications. For example, if the YZ grid plane is fixed and the XZ grid plane is displaced in the Y direction by a fixed increment between each point capture, a two-dimensional (2-D) open spline can be generated with variance in the Z direction. The YZ plane can then be moved, and the process repeated. This would produce

a series of 2-D splines that are separated by a fixed amount in the X direction, and which vary in the Z direction.

Alternatively, the system of grid planes can be rotated about the Z axis by a specified amount (using the XYZ Rotate feature) . A circular path illustrated partially by the dashed line 330 could thus be followed. Points captured in this manner would fall along a circle, and would vary in the Z direction. The set of points could then be converted into a closed spline. By repeating this process while varying the radius of the circular path 330, a topographical representation of a surface can be obtained in the form of concentric circles that vary in the Z direction. A surface representation similar to that of a topographical map can thereby be obtained. The system of grid planes could also be rotated around the X axis or Z axis. This might be desirable for certain complex modeling problems.

8. Use of Non-parallel Cut Planes

In previous versions of the Replicator program, all cut planes used to gather point data for an object had to be mutually parallel. It now been discovered that the data gathering process can be simplified for certain types of objects by using non-parallel cut planes. The program has therefore been modified to permit the use of non-parallel cut planes.

To illustrate the desirability of using non-parallel cut planes, and to further illustrate the general operation of the Replicator program, an example data capture sequence will now be described with reference to Figs. 6A-6D. These figures are screen dump images from the Replicator program taken at various stages of the Replication process.

Fig. 6A illustrates a plurality of points that were captured with the Replicator system. Each individual point is indicated by a "+" symbol. The grid planes in the respective windows 602, 604, 606, 608 have been turned off (i.e., made invisible) to facilitate the viewing of the individual points.

The points were captured from the tail section of a model of a porpoise (approximately one foot in length) , using six consecutively-defined cut planes that cut through various portions of the tail section. Each of the reference numbers 610, 612, 614, 616, 618, 620 refers to a string of points that was captured using one of the six cut planes. Each cut plane was generated by probe-selecting three points on the outer surface of the model, as described above in the section "Grid Planes." However, the other methods for defining grid planes could be used in combination to accomplish a similar result.

Fig. 6B illustrates a set of six closed splines 630, 632,

634, 636, 638, 640 that were generated from the six strings of points 610, 612, 614, 616, 618, 620 shown in Fig. 6A. Each spine is a piecewise polynomial approximation of a curve that passes through the points from which the spline was derived. The splines were generated using a spline generation routine that is part of the CADL design language. F i g . 6 C illustrates the respective windows 602-608 following the application of FastSURF. As illustrated, FastSURF generates a series of open splines that connect the closed splines 630- 640 of Fig. 6B. The result is an approximation of the surface of the porpoise model in the form of an array of parametric bi-cubic patches, each patch being formed by four adjacent splines. Additional information on the surface modeling process used by FastSURF can be obtained from the 1992 FastSURF.CDE User Reference Guide. Fig. 6D shows the surface model of Fig. 6C with the original points of Fig. 6A superimposed on the surface model. This feature of the Replicator program allows the user to analyze the effects of individual points on the resulting surface model.

As best seen in the window 604 of Fig. 6C, the closed splines 630-640 were generated from cut planes that were substantially perpendicular to the surface of the model where the cut planes intersect with the surf ce of the model. This is generally equivalent to saying that each cut plane was selected to minimize the cross sectional area of the model occupied by the cut plane. Since the tail portion of the

porpoise model is curved (as best seen in Fig. 6C) , the splines 630-640 are not mutually parallel.

This method of defining the cut planes, wherein each cut plane is substantially perpendicular to the surface of the object (to the extent possible) , has been found to reduce the number of cut planes required to produce a sufficiently accurate surface definition of curved object. The reason for this is best illustrated by Fig. 6C. Referring to the window 604, note that the lower surface 650 has a greater curvature than the top surface 660. Note also that the closed splines 630-640 are closer together at the surface 650 than at the surface 660. This closer spacing of the closed splines where the curvature is the greatest results in a more accurate representation of the bottom surface 650 than would be obtained with an equal number of mutually parallel splines. The number of cut planes can therefore be reduced by using non-parallel cut planes in this manner.

9. Capture of Corners

The methods described above are suitable for capturing coordinate data to accurately represent an edge or a corner of an object. However, the Replicator program supports a much simpler • method for capturing these commonly-occurring geometric features. Specifically, the Replicator program includes special procedures that permit the user to select certain points in the vicinity of an edge or corner. The Replicator program then uses these points to generate a model for the edge or corner.

The Replicator program includes separate routines for capturing a corner or a linear edge. The point-to-plane projection feature also permits the capture of a rounded edge. This section will describe the method (i.e., the software routine plus the steps taken by the user) used for capturing a corner, using two example objects to aid the description. The following two sections will then describe the methods used for capturing a linear edge and a rounded edge, respectively. The method for capturing a corner is illustrated

pictorially and in flow chart form in Fig. 7. Referring to the example object 700 in Fig. 7, assume that the user wishes to capture the corner formed by the convergence of the three substantially planar surfaces A, B and C. The Replicator program allows the user to do this by selecting nine points. Referring to the process block 704, the user is prompted to select three noncolinear points from each of the three surfaces A, B and C. The points may be selected using the probe tip 121. For example, to select three points from the surface A, the user can touch the probe tip 121 to three different locations on the surface A, depressing and releasing the button Bl at each location. The user can then proceed to the next surface to capture the next three points. The Replicator program also allows the user to select points with a pointing device (i.e., selecting points that have already been captured and appear on the screen) , or using the keyboard (i.e., typing in the X, Y and Z coordinates of the points) .

The points selected from the surface A have the coordinates (Axl, Ayl, Azl) , (Ax2, Ay2, Az2) , and (Ax3, Ay3, Az3) . The points selected from the surface B have the coordinates (Bxl, Byl, Bzl) , (Bx2, By2, Bz2) , and (Bx3, By3, Bz3) . . The points selected from the surface C have the coordinates (Cxi, Cyl, Czl) , (Cx2, Cy2, Cz2) , and (Cx3, Cy3, Cz3) . Referring to the process block 706, the Replicator program then calculates equations for the planes that correspond to the planar surfaces A, B and C. This is done for surface A, for example, by solving the equation:

x y z 1

Axl Ayl Azl 1

Ax2 Ay2 Az2 1 = 0, (2]

Ax3 Ay3 Az3 1

to generate an equation for a plane that passes through the points (Axl, Ayl, Azl), (Ax2, Ay2, Az2) , and (Ax3, Ay3, Az3). The result is an equation of the form ax + by + cz + d = 0,

where a, b, c and d are real and at least one of a, b and c is non-zero.

Once the equations for planes A, B and C (i.e., planes corresponding to the surfaces A, B and C respectively) have been derived, the Replicator program calculates equations for the edges of the corner, as indicated by the process block 706. Referring to the process block 708, equations for the edges are derived by finding the intersection of the two planes that form the edge. For example, the edge formed by the convergence of surfaces A and B can derived by finding the intersection of planes A and B. The result is an equation for a line that corresponds to the edge.

Referring to the process block 710, the point corresponding to the actual corner is then derived by calculating the point of intersection of planes A, B and C. This point can alternatively be derived by determining the point of intersection of the lines calculated in the process block 708. Referring to the process block 712, the Replicator program then displays a symbol 720 for the corner entity on the monitor 114, and stores the equations for the lines and the intersection point that define the corner. The corner symbol is generated by displaying three lines (one unit in length each) that correspond in orientation to the respective edges of the object 700. The lines extend from the corner, and are joined at their respective ends by dashed lines. The reference letters A, B and C are shown with the symbol 720 to indicate correspondence with the surfaces A, B and C of the object 700, and are not part of the displayed symbol.

Once the corner has been captured and the entity is displayed on the screen (in each of the windows) , the user can link the corner entity to other entities using the pointing device 112. The user can thereby define the boundaries of the object 700. For example, for the rectangular object 700 shown in Fig. 7, the user can capture the eight corners by the method described, and then link the corners with straight lines to fully define the boundaries of the object. The data can then be passed to FastSURF for surface modeling.

The block 400 shown in Fig. 4A is an example of an object that was captured using the corners feature of the Replicator program. Referring to the window 418, the user probe-selected points from the planar surfaces of the block 400 (as described above) to capture the corners 440, 442, 446, 448, 450, 452, 456 and 458. The user then used the pointing device 112 to link the corners together as shown (links represented by straight lines between the corners) . The user also used three of the four corners 440, 446, 450, 456 to define the system of grid planes.

The method of capturing a corner illustrated by Fig. 7 has the advantage of producing an accurately defined corner. Although a corner could be captured by probe-selecting a point at the corner and then probe-selecting one point on each of the three edges that form the corner, this later method has been found to produce an inaccurate result. This is primarily attributable to the fact that the actual edges and corners of objects are typically worn, making it difficult to place the probe tip 121 exactly on the edge or corner. A more precise model of a corner can thus be produced by deriving the corner from points along the three planar surfaces A, B and C as described. This advantage applies equally to the capture of edges, described in the following sections.

It should be noted that the Replicator program can easily be modified to "remember" the plane equations obtained during the capture a corner. This would allow the user to capture subsequent corners (formed from one or more of the same planar surfaces as the first corner) without having to re-probe previously captured surfaces. Thus, for example, once the user has captured the corner formed by surfaces A, B and C in Fig. 7, the user would only have to probe-select three more points to capture the corner 730. This would allow the user to capture the entire object 700 by probe-selecting a total of 6 (surfaces) X 3 (points/surface) = 18 points, rather than the 8 (corners) X 9 (points/corner) = 72 points as is currently required.

It should be recognized from the foregoing that the

above-described method for capturing a corner is not limited to corners formed by the convergence of three mutually perpendicular surfaces. Rather, the method is applicable whenever three substantially planar surfaces converge at a single point. Fig. 8 illustrates the corner capture process for a corner formed by three non-perpendicular surfaces D, E and F of an example object 800. The steps 804-812 and the corresponding software for capturing the corner are identical to those described above for Fig. 7, and will not be repeated herein. The reference characters D, E and F shown with the resulting symbol 820 illustrate the correspondence with the surfaces D, E and F of the object 800, and are not part of the symbol 820.

Finally, it should be recognized that the method is equally applicable to the capture of a "concave corner" formed as an indentation in an object. 10. Capture of Linear Edσes

A linear edge routine of the Replicator program allows the user to capture the location and geometry of a linear edge formed by the convergence of two substantially planar surfaces. The method used for capturing the linear edge is similar to the method used to capture a corner, but requires the user to probe-select only six points.

Fig. 9 illustrates this method for an edge 902 formed by the convergence of surfaces-A and B. Referring to the process block 904, the user selects three noncolinear points (Axl, Ayl, Azl), (Ax2, Ay2, Az2) , and (Ax3, Ay3, Az3) on the surface A, and three noncolinear points (Bxl, Byl, Bzl) , (Bx2, By2, Bz2) , and (Bx3, By3, Bz3) on the surface B. The points may be selected using the probe tip 121, or may be selected using the pointing device 112 or keyboard 110.

Referring to the process block 906, the Replicator program converts the points (Axl, Ayl, Azl), (Ax2, Ay2, Az2) , and (Ax3, Ay3, Az3) into an equation for plane A (as described in the previous section) . The program similarly converts the points (Bxl, Byl, Bzl), (Bx2, By2, Bz2) , and (Bx3, By3, Bz3) into an equation for plane B.

Referring to the process block 908, the Replicator program then calculates the edge 902 by finding the intersection of planes A and B. The result is an equation for a line that corresponds to the edge 902. Referring to the process block 912, the Replicator program then generates and displays a symbol 920 for the linear edge. The reference characters A and B shown with the symbol 920 are intended to indicate the correspondence with the surfaces A and B of the object 900, and are not part of the displayed symbol. The above-described method of capturing a linear edge is equally applicable to linear edges formed by the convergence of two non-parallel surfaces. Fig. 10 illustrates the capture of such an edge 1002 of an object 1000. The steps 1004-1012 and the software used for capturing the edge 1002 are identical to the steps described above for Fig. 9, and thus will not be described herein. The reference characters D and E shown with the symbol 1020 indicate the correspondence of the symbol 1020 with the surfaces D and E of the object 1000.

11. Capture of Rounded Edges A method for capturing a rounded edge is illustrated in Fig. 11 for a cylindrical object 1100 having a planar surface A and a ' curved or rounded surface B. Although no dedicated software routine has been written for this purpose, the method can be practiced using the existing features of the Replicator program.

Referring to the process block 1104, the user initially selects three noncolinear points on the planar surface. For the example shown, the user thus selects three points on the surface A, having coordinates (Axl, Ayl, Azl), (Ax2, Ay2, Az2) , and (Ax3, Ay3, Az3) . Referring to the process block 1106, the Replicator program converts this set of three points into an equation for plane A. Note that this process can be accomplished using the program feature that permits the user to define the system of grid planes by probe-selecting three points.

Referring to the process block 1108, the user then probe-

selects three points from the rounded surface. The user thus selects three points on the surface B, having coordinates (Bxl, Byl, Bzl), (Bx2, By2, Bz2) , and (Bx3, By3, Bz3) . These points must be appropriately spaced apart to permit the program to generate an arc that approximates the curvature of the surface B. Thus, for the example object 1100 shown, the three points must be spaced apart horizontally.

Referring to the process block 1110, the Replicator program projects the points (Bxl, Byl, Bzl), (Bx2, By2, Bz2) , and (Bx3, By3, Bz3) into the plane A (using the point-to-plane projection feature) . This is done by effectively moving each point along a normal vector to plane A until the point intersects with plane A. The resulting three points (Bxl', Byl', Bzl'), (Bx2', By2', Bz2'), and (Bx3', By3', Bz3') fall on the edge 1102. The math used for projecting the points into plane A is explained in the following section. To generate a representation of the rounded edge 1102, the Replicator program then generates an arc that passes through the three points (Bxl', Byl', Bzl'), (Bx2' , By2', Bz2'), and (Bx3' , By3' , Bz3') .

If a dedicated software routine is used to generate the rounded- edge, a process block 1112 can also be included to generate a symbol 1120 for the rounded edge 1102.

It should be noted that the rounded edge 1102 must have a curvature that remains approximately constant over the region of points (Bxl', Byl', Bzl'), (Bx2', By2', Bz2'), and (Bx3', By3', Bz3'). If the curvature varies in this region, the arc will not match the edge 1102.

For rounded edges that vary in curvature, a slightly more complex method can be used that is currently possible using the Replicator program. Assuming for purposes of example that the edge 1102 varies in curvature, the method is as follows. The user initially selects three points on the surface A to define the system of grid planes. The user then selects the point-to-plane mode of the Replicator program, designating the grid plane that corresponds to the surface A. The user then selects individual points along the curved surface B

(preferably using the probe tip 121) , with the number of points and the spacing between points being sufficient to obtain an accurate representation of the curvature of the surface B. Each point selected is projected into the plane representing the surface A as described above, and is stored in an X, Y Z point array. Once the desired number of points have been captured in this manner, the user selects a menu option that converts the string of captured points into a 2-D spline that represents the rounded edge. 12. Point-to-Plane Projections

The Replicator program includes routines for projecting captured points into a grid plane (or other plane) that has been defined by the user. Two applications for this feature are described in the preceding sections. Specifically, the section "Data Capture Using Cut Planes" describes the use of this feature to account for the inaccuracies of the CMM 120, and the previous section describes a use of the feature for capturing a rounded corner.

Numerous additional applications for the point-to-plane projection feature exist. For example, to capture an engraving in a surface, the user defines a plane that is approximately parallel to the surface, and then projects points taken from the engraving into the plane. Once the plane has been defined, the user merely probe-selects points while moving the probe tip 121 along the edges of the engraving.

The point-to-plane projection feature is also useful for projecting points to locations that are difficult or impossible to access with the probe tip 121. Finally, the feature can be used to create a two-dimensional image or outline of a three-dimensional object or surface.

Regardless of the application, the method for projecting the captured point into a plane can be performed as follows. Assume that the user has defined a plane that is given by the equation ax + by + cz + d = 0. For this definition of a plane, a normal vector to the plane is given by ai + bj +ck,

where i, j and k are unit vectors that point in the directions of the X, Y and Z axes respectively. Assume also that the system 100 has captured a point P x = (x_, y 1# z x ) , and that it is desired to project the point P x into the plane. Thus, the coordinates of a projected point P 2 = (x 2 /y_,z_) must be calculated, where P 2 falls in the plane, and falls on a line that is normal to the plane and which passes through P-.

Recall that the signed distance of the point P 1 from the plane is given by equation (1) , repeated below:

ax , + by_ + cz x + d Distance = SQRT(a 2 + b 2 + c 2 )

The coordinates of the projected point P 2 = (x y ∑* 2 . ) are thus given by:

x 2 = x_ - (Distance) (a) , (3)

Yi = Yi ~ (Distance) (b) , and (4) z 2 = z_ - (Distance) (c) . (5)

13. Capture of Maximum and Minimum Points

Finally, the Replicator program has special modes that permit the user to detect and capture points that are a maximum or a minimum distance from a user-defined plane. This feature allows the user to capture points along an object's surface that represent certain outermost or innermost boundaries of the object. The user must initially designate a primary grid plane as the reference plane for performing this function. To locate and capture a point on an object's surface that is closest to the designated plane, the user selects a POINT NEAR menu option. The user then depresses the button Bl (Fig. 1), and moves the probe tip 121 along the object's surface. While the button Bl remains depressed, the Replicator program

computes the distance between each incoming point and the designated plane using the distance formula (equation 1 above) . Each time an incoming point is found to be closer to the plane than the current minimum point, the program replaces the current minimum point with the incoming point, and generates a tone to inform the user that a new minimum point has been captured. The program displays the current minimum point on the monitor 114 during this process. Once the user is satisfied that the closest point to the plane has been located, the user releases the button Bl. A single point is thereby captured that corresponds to the closest detected position that the probe tip 121 came to the plane while the button Bl was depressed.

To locate and capture a single point on an object's surface that is farthest from the designated plane, the user selects a POINT FAR menu option. The POINT FAR process is the same as described above, except that the program captures an incoming point only if it is farther from the plane than current maximum point. 14. Epilogue

The apparatus associated methods described have been presented by way of example only, and not limitation. Thus, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.

REPLICATOR SYSTEM AND METHOD

FOR DIGITIZING THE

GEOMETRY OF THE PHYSICAL OBJECT

by

STEPHEN GUBELMANN

COPYRIGHT ® 1994 RADICAL ADVANCED TECHNOLOGIES CORP,

ATTORNEY DOCKET NO. RADICAL.00IQPC

STUDI02.CDP Monday, Kerch 28, 1994 9 21 am Pag

1 rent STUDIO CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF

5 rem 3D Build £ rem 2D Draw 7 rem Tools

6 rem Locate

9 rem Views World, Magnetic, Optimized

10 rem Mode Manual, SemiAuto, Auto, Sticky, CutPln, CutPlns, Pnt2PlnP

11 rem Control

12 rem About3DR

13 rem 3DR Help 14

15 /* Type Declarations */

16 SLIST $$ModeX[0] [0] ,S$Algnstr [0] [0] ,$$Vιewstr [0] [0]

17 SLIST SSRaxistO) [0] ,SSVnote[0) [0]

18 FLOAT Delay, Pdisp, Sdisp, OldPdisp, OldSdisp, PSdisp

19 FLOAT GridTol, GridSize, Tsphere, ECscale

20 FLOAT AutoIncDtO] , AutoRotW[3] , AutoRotM[3]

21 STRING Sf name [0] , $f nameO [0] , Sstrl [91 , $str2 [9] , $GetPm [40]

22 STRING $GOT_HA[0] ,$Bndge[80] ,$dummy[0] , SMenuStr [60]

23 INT Bl , B2 , one , On, Of , Beep, Open, Closed, True , False , Bhit , astBhit , NodeErr

24 INT MaxNodes,ManGOff ,ManGOn, Auto, hite, Dashed, ear, Far, CutCasetO] .ColCode

25 INT XYplane,XZplane,YZplane,Pplane,Splane,Stype,Ptype,Ponly,Pand S, MagFlag

26 INT Align. Finder, FileErr, Views, RViewstO] ,MVιews [0] ,Vιewl,Vιew2,VιewS,G2Pmode

27 INT Rvιew,Svιew,ModeRC,01dStky,G3Pmode,G3PosIDs[3] ,RotAxιs,01dVιews,G2Pcount

28 INT Vn, Rotate , RAxis , Rrel , Circle , Arc , Center , G3Pcoun , GIPcoun , GridPlns , PntsLev

29 INT DιspMask[16] ,Bm[17] ,MagPntID[8] ,MagCompL,Done,LastPιck[22] ,VιewErr,ToolMode

30 INT EdgSgrp , CrnrSgrp , AsegSgrp , PntsSgrp , meSgrp , PolySgrp , SplnSgrp , GPmkSgrp

31 DOUBLE PntNodes[0] [0] , Fcntl, Fx,Fy,Fz, Fa, Fb.Fc.PplnEnt [0] , SplnEnt [0] ,Orιgιn[0]

32 DOUBLE XYmgp[13] ,XZmgp[13] ,YZmgp[13] ,XYwgp[13] ,XZwgp[13] ,YZwgp[l 3 ] ,XYZrot[3]

33 DOUBLE XYpntl[4] [3] ,XYpnt2[4] [3] , FinderX, FmderY, FmderZ

34 DOUBLE XZpntl[4) [3] ,XZpnt2 [4] [3] ,GPent [6] .OrgEnt

35 DOUBLE YZpntl[4] [3] ,YZpnt2[4] [3] ,XYZmagO[3] , G2Pos[2] [3] , ABCD[4]

36 DOUBLE XYZ[3], XYZtemp[3], Pnt2PlnD, Sx, Sy, Sz, Dx, Dy, Dz, Da, Db, Dc

37 DOUBLE XYZmag[3] ,MagOrgn[3] ,Vmatrιx[0] , Vxl.Vyl, Vzl, Vx2, Vy2, Vz2, Vx3, y3,Vz3

38 DOUBLE StickyX, StickyY, StickyZ, G3Pos[3] [3] , MagX, MagY, MagZ, VM[10] [11] 39

40 rem Group Declarations

41 GROUP "Edges", 125, 50

42 GROUP "Corners", 124, SO

43 GROUP "AutoSegs",123,50

44 GROUP "Points", 122, 250

45 GROUP "Lines".121,250

46 GROUP "Polyline", 120, 250

47 GROUP "Splines".119, 250

48 GROUP » GPmarker",118,50 49

50 /• String Lists */

51 S$ModeX[0] -"Manual"

52 SSModeX [1]- "SemiAuto"

53 SSModeX [2] •"Auto"

54 SSModeX [3] -"Sticky"

55 SSModeX [4] -"CutPln"

56 SSModeX [5] -"CutPlns"

57 SSMode [6]- "Pnt2PlnP"

58 SSAlgnstr[0]-"AlιgnOff"

59 SSAlgnstr[l]-"AlιgnOn"

60 SSViewstr[0]-"View-Wld"

61 SSViewstrll] -"View-Mag"

62 SSViewstr [2] -"View-Opt"

63 SSRaxis[0]-"GPaxis-Z"

64 SSRaxιs[l]-"GPaxιs-Y"

65 SSRaxιs[2]-"GPaxιs-X"

66 SSVnote[0]-"Wld Top"

67 SSVnote[l]-"Wld Front"

68 SSVnote[2]-"Wld Side"

69 S$Vnote[3]-"Mag Top"

70 SSVnote[4]-"Mag Front"

71 S$Vnote[5] -"Mag Side"

72 SSVnote[6]-"Opt Top"

73 S$Vnote[7)-"0pt Front"

STDDI02. CDP Monday, March 28, 1994 9 21 am Pag

74 SSVnote [8] -"Opt :Sιde"

75 SSVnote[9]-"User Defined"

76

77 /* ARRAY Initalization */

78 ARRAY PplnEnt[2)-{0,0)

79 ARRAY SplnEnt[2]-{0,0}

80 ARRAY GPen [6] -{0,0, 0,0, 0,0}

81 ARRAY Ongιn[3]-{0,0,0}

82 ARRAY CutCase[2]-{0,0}

83 ARRAY AutoIncD[3]-{0,0,0}

84 ARRAY AutoRotW[3]-{0,0,0)

65 ARRAY AutoRotM[3] -{0,0,0}

86 ARRAY RVιews[4]-{l,2,5,7}

87 ARRAY MVιews[4]-{l,2.5,7}

88 ARRAY Vmatnx[9]

89 ARRAY ISO [13]

90 ARRAY MagPntID[8]-{0, 0,0, 0,0, 0,0,0}

91 ARRAY Bin [17] -{0,1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768}

92 /* Master GπdPlane

93 /* PI Equation of a Plane

94 /* X Y Z A B D

95 ARRAY XYtngp[13]-{0, 0, 0, 0, 0, 0}

96 ARRAY XZmgp[13]-{0, 0, 0, 0, -1, 0}

97 ARRAY YZmgp[13]-{0, 0, 0, 1, 0, 0)

98 /* Initialize View Arrays */

99 /• Set System Views to default of Top/Front/Side */

100 ARRAY VMtlO] [11]

101 VM[0] [9]-l

102 VM[1] [9]-2

103 VM[2] [9]-5

104 VM[9] [9]-7

105 VM[3] [9]-9

106 VM[4] [9]-10

107 VM[5] [9]-ll

108 VM[6] [9]-12

109 VM[7] [91-13

110 VM[8] [9J-14

111 /• Set View Port Windows to default of 1/3/5 */

112 VM[0] [10]-VM[3] [10]-VM[6] [10)-1

113 VM[9] [10]-2

114 VM[1] [10]-VM[4] [10]-VM[7] [10]-3

115 VM[2] [10]-VM[5] [10]-VM[8] [10J-4

116 /* Set System Top View */

117 VM[0] [0]-VM[0] [4)-VM[0] [β]-l

11B VM[0] [1]-VM[0] [2]-VM[0] [3]-VM[0] [S]-VM[0] [6]-VM[0] [7]-0

119 /* Set System Front View */

120 VM[1] [0]-VM[l] [7]-l

121 VM[1] [51--1

122 VM[1] [1]-VM[1] [2]-VM[l] [3]-VM[l] [4]-VM[l] [6]-VM[l] [8]-0

123 /* Set System Side View */

124 VM[2] [2]-VM[2] [3]-VM[2] [7]-l

125 VM[2] [0J-VMI2] [1]-VM[2] [4)-VM[2] [5]-VM[2] [6]-VM[2] [8]-0

126 /* Set System ISO View */

127 VM[9] [0]- 0.707106781187

128 VM[9) [l]--0.40824829046

129 VM[9] [2]- 0.577350269190

130 VM[9] [31- 0.707106781187

131 VM[9] [4]- 0 40824829046

132 VM[9] [5]--0.577350269190

133 VM[9] [6]- 0 000000000000

134 VM[9] [7]- 0.81649658093

135 VM[9] [8]- 0.577350269190

136

137 /* INT Globals Initalization */

136 Bl-2

139 B2-1

140 On-1

141 Off-0

142 Open-1

143 Closed-2

144 None-0

145 True-1

146 False-0

Monday, March 28, 1994 9 21 am Page

STUDI02.CDP Monday, March 28, 1994 9.21 am Pa

220 RStudιo-0 221 /* LastPick-ed Registers */ 222 ARRAY LastPιck[22]-{9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9} 223 rem LastPic [ Mam Menu 224 rem LastPic [ 3D Build 225 rem LastPick[ 2D Draw 226 rem LastPic [ Tools 227 rem LastPic [ Locate 228 rem LastPic [ Control 1 229 rem LastPick! Control 2 230 rem LastPick[ PlnMenu 1 231 rem LastPic [ PlnMenu 2 232 rem LastPick[ PplnDisp 233 rem LastPick[10] SplnDisp 234 rem LastPic [11] Origin 235 rem LastPic [12] XYZrot 236 rem LastPic [13] XYZalign 237 rem LastPic [14] Open/Closed 238 rem LastPic [15] Plane XY/XZ/YZ 239 rem LastPic [16] Probe/Mouse 240 rem LastPick[17] ISO/User View 241 rem LastPic [18] Probe/Mouse/Keyln 242 rem LastPic [19] Save/Load 243 rem LastPic [20] 2 Pos/3 Pos 244 rem LastPick[21] Locate2 245 /* INT Global Switches Initialization */ 246 FrameEnt-0 247 Del-83 248 Delete-Off 249 NodeErr-False 250 251 /* INT Keyboard/Mouse Definitions 252 KBesc--3 253 KBback-KBfl0--2 254 KBenter-KBreturn--1 255 MenuLev-l 256 Menu-0 257 ColCode-White 258 259 /* FLOAT Globals Initialization */ 260 PSdιsp-0 261 262 /* Global Declarations and Initialization Complete */ 263 /* Ready To Begin */ 264 :preamble 265 dosub 3dr_lock.cdp 266 TogLev-βlevel 267 dosub tlevon.cdp 268 Menu-0 269 dosub 3drhelp.cdp 270 if (BadKey) 271 goto exit 272 SET coord,1 273 SET const,1 274 SET curtrack,2 275 CALL strcpy, Sfname, acwd 276 CALL strcat, Sfname, "WSTUDI02.ENV" 277 dosub 3drcnfgr.cdp 278 if (CNFGerr) 279 { 280 CNFGerr-False 281 /* Configeration Defaults */ 282 dosub dfltcnfg.cdp 283 /• Build World, Magnetic and Optimized Views */ 284 prompt "Computing Magnetic View ..." 285 Views-Magnetic 286 dosub bldview.cdp 287 Views-World 288 dosub rbldoptv.cdp 289 dosub 3 rcnfgw.cdp 290 } 291 else 292 dosub rbldview.cdp

Pag

, LastPick [n]

STUDI02. CDP Monday, March 28 , 1994 9 : 21 am Pag

366 LastPick[ii]-9 367 Menu-1 368 dosub 3drhelp.cdp 369 break 370 } 371 goto top 372 :exit 373 prompt "Exiting Studio, 374 if (PplnEn [0]) 375 { 376 DELENT PplnEnt [0] 377 DELENT PplnEnt [l] 378 PplnEn [0] -PplnEn [1] ■ 379 } 380 if (SplnEnt [0] ) 381 ( 382 DELENT SplnEnt [0] 383 DELENT SplnEnt [1] 384 SplnEn [0] -SplnEn [1] ■ 385 } 386 if (GPen [0] ) 387 { 388 for (i-0 ; i<6 ; i-ifll 389 { 390 if (GPent [i] ) 391 DELENT GPent [i] 392 GPent [i] -0 393 ' } 394 DELENT OrgEnt 395 } 396 auto -1 397 redraw -1 398 if (BadKey — 0) 399 { 400 CALL strcpy, Sfname, βcwd 401 CALL strcat, Sfname, "WSTUDI02.ENV" 402 dosub 3drcnfgw.cdp 403 } 404 EXEC 1, "CDLW3DRL0CK 3DR 0" 405 prompt "Thank you for selecting the Replicator 406 wait 1 407 CLEAR 408 EXIT

DDRAW CDP Monday, March 28, 1994 9 21 am Page rem 2DDRAW CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FastSURF

OldGP-GπdPlns if (GridPlns)

9 GridPlns-Hide 10 dosub bldplane cdp 11 } 12 refno-0 13 sys_autovp 0,0 14 set view,2,0 15 auto -1 16 redraw -1 17 if (ModeNum >- Sticky) 18 ModeNum-Manua1 19 :top 20 ιι-2 21 MenuLev-MenuLev+1 22 βprint SMenuStr, "Select Geometry Type ( d) ".LastPick[n] 23 getmenu SMenuStr,\ 24 "Point",\ 25 "Line",\ 26 "Polyline",\ 27 Spline",\ 28 " - "Λ 29 SSModeX[ModeNum] ,\ 30 "SetFrame",\ 31 "Control",\ 32 3DR Help",MenuLev,LastPick[n] 33 switch (βkey) 34 { 35 case -3 -2 37 break 38 case 1 39 LastPick[ιι]-l 40 GeoType-CKpoint ' 41 dosub drawget cdp 42 break 43 case 2 44 LastPick[n]-2 45 GeoType-CKline 46 dosub drawget cdp 47 break 48 case 3 49 LastPickIn] -3 50 OCplme 51 nι-14 52 MenuLev-MenuLev*1 53 sprint SMenuStr, "Select 3-D Polyline type (%d) ".LastPic [m] 54 getmenu SMenuStr,\ 55 "Open",\ 56 "Closed",\ 57 - . . Λ 58 " - ",\ 59 " - -,\ 60 " - ",\ 61 " - ",\ 62 " - ",\ 63 "3DR HELP",MenuLev, astPιck[ιιι] 64 switch (βkey) 65 { 66 case -3 -2 67 MenuLev-MenuLev-2 68 goto top 69 case 1 70 LastPick[in]-1 71 Ptype - Open 72 break 73 case 2

Pag

Monday, March 28, 1994 9:21 am Page

DBUILD.CDP Monday, March 28, 1994 9:21 am Page rem 3DBUILD.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with: Faro Metrecom/CADKEY/FastSURF rem Allows picks for various manual input sequences rem Points - Point by point rem Lines - Line string by line string rem Polylines - (Open/Closed) Polyline string by polyline string

9 rem Splines - (Open/Closed) Spline 10 11 12 :top 13 iι-1 14 MenuLev-MenuLev+1 15 sprint SMenuStr, "Select Geometry Type (%d) ' ,LastPick[ii] 16 getmenu SMenuStr,\ 17 "Point",\ 18 "Lιne",\ 19 "Polyline",\ 20 "Spline", \ 21 SSViewstr [Views] , \ 22 SSModeX [ModeNum] , \ 23 "SetGnd" , \ 24 "Control" , \ 25 "3DR Help",MenuLev,LastPick[ii] 26 switch (βkey) 27 { 28 case -3:-2 29 goto exit 30 break 31 case 1 32 LastPick[ii] -1 33 GeoType-CKpoint 34 dosub buildget.cdp 35 break 36 case 2 37 LastPick[ii]-2 38 GeoType-CKline 39 dosub buildget.cdp 40 break 41 case 3 42 LastPick[ii]-3 43 :OCplιne 44 111-14 45 MenuLev-MenuLev*1 46 sprint SMenuStr, "Select 3-D Polyline type (%d) ",LastPιck[m] 47 getmenu SMenuStr,\ 48 "Open",\ 49 "Closed",\ 50 " - ",\ 51 " - ",\ 52 " - ",\ 53 - _ . Λ 54 " - ",\ 55 " - ",\ 56 "3DR HELP" , MenuLev, LastPick [ni] 57 switch (βkey) 5B { 59 case -3:-2 60 MenuLev-MenuLev-2 61 goto top 62 case 1 63 LastPick[m]-1 64 Ptype - Open 65 break 66 case 2 67 LastPick[m] -2 68 Ptype - Closed 69 break 70 case 3:8 71 break 72 case 9 73 LastPick[m]-9

DBUILD.CDP Monday, March 28, 1994 9:21 am Page

74 Menu-13

75 dosub 3drhelp.cdp

76 break

77 default

78 break

79 }

80 if (LastPιck [m] «9)

81 {

82 MenuLev-MenuLev-1

83 goto OCpline

84 }

85 GeoType-CKpline

86 dosub buildget.cdp

87 MenuLev-MenuLev-1

88 break

89 case 4

90 LastPick[ii]-4

91 :OCspline

92 ιn-14

93 MenuLev-MenuLev*1

94 sprint SMenuStr, "Select 3-D Spline type (*d) ".LastPick[in]

95 getmenu SMenuStr,\

96 "Open",\

97 "Closed",\

98 " - ",\

99

100 " - "Λ

101 - ",\

102 " - ",\

103 * _ « \

104 "3DR HELP",MenuLev,LastPick[in]

105 switch (βkey)

106 {

107 case -3:-2

108 MenuLev-MenuLev-2

109 goto top

110 case 1

111 LastPick[m]-1

112 Stype - Open

113 break

114 case 2

115 LastPick[m]-2

116 Stype - Closed

117 break llβ case 3:8

119 break

120 case 9

121 LastPick[m]-9

122 Menu-13

123 dosub 3drhelp.cdp

124 break

125 default

126 break

127 }

128 if (LastPick [in] — 9)

129 {

130 MenuLev-MenuLev-1

131 goto OCspline

132 }

133 GeoType-CKspline

134 dosub buildget.cdp

135 MenuLev-MenuLev-1

136 break

137 case 5

138 LastPic [ii] -5

139 dosub vstdopt.cdp

140 break

141 case 6

142 LastPick In] -6

143 ModeNum-ModeNum* 1

144 If (ModeNum > 6 )

145 ModeNum-Manual

146 break

Monday, March 28, 1994 9:21 am Pag

DR2CK.CDP Monday, March 28, 1994 9.21 am Page

1 rem 3DR2CK.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 ViewErr-False

7 /* Make CADKEY View Matrix from 3 coordinates */

8 dist-sqrt ( (Vx2-Vxl) * 2+ (Vy2-Vyl) * 2. (Vz2-Vzl) * 2)

1

11 PAUSE "All points must be unique. Can't make View!"

12 ViewErr-True

(Vx2-Vxl)/dιst

16 Vmatnx[3]-(Vy2-Vyl)/dιst

17 Vmatrix[6]-(Vz2-Vzl)/dιst

18 a-Vx2-Vxl

19 b-Vxl-Vx3

20 C-Vy2-Vyl

21 d-Vyl-Vy3

22 e-Vz2-Vzl

23 f-Vzl-Vz3

24 u-- (a*b+c*d+e*f ) / (a~2+c 2+e~2)

25 Vmatrιx[l]-Vx3-a*u-Vxl

26 Vmatnx[4)-Vy3-c*u-Vyl

27 Vmatnx[7]-Vz3-e*u-Vzl

28 dist-sqrt (Vmatrix [l] * 2*Vmatπx [4] * 2. Vmatrix [7] * 2)

29 if (abs (d st) < .000001)

30 {

31 PAUSE "Points are Collinear or not Unique. Can't make View!"

32 ViewErr-True

35 Vmatrix[1]-Vmatπx[1]/dist

36 Vmatrix[4]-Vmatrix[4] /dist

37 Vmatrix[7]-Vmatrix[7] /dist

38 Vmatrix[2]-Vmatrix[3] *Vmatπx[7] -Vmatrix[6]*Vmatrιx[4]

39 Vmatrix[5]-Vmatrix[6]*Vmatrιx[1] -Vmatrix[0]*Vmatrιx[7]

40 Vmatrιxtβ]-Vmatrιx[0] ' "Vmatrιx[4]-Vmatrιx[3]*Vmatrιx[l] 41

42 :exιt

43 EXIT

DRQJFGR.CDP Monday, March 28, 1994 9.21 am Pag

rem 3DRCNFGR.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FastSURF

FileErr-0

CNFGerr-False

9 prompt "Loading Grid Plane Environment File: Vs", Sfname 10 SET devin, Sfname 11 INPUT "%s Vd", Sdummy, GridPlns 12 if (βERROR) 13 { 14 CNFGerr-True 15 CLOSE devin 18 INPUT "Vs %d", Sdummy, ModeNum 19 INPUT "%s %d", Sdummy, Beep 20 INPUT "%s %d", Sdummy, Align 21 Sdummy, Views 22 Sdummy, Points 23 Sdummy, PointsHS 24 Sdummy, PntsLev 25 Sdummy, Finder 26 Sdummy, FndrPntr 27 Sdummy, ECscale 28 Sdummy, Delay 29 Sdummy, MaxNodes 30 Sdummy, Pplane 31 Sdummy, Pdisp 32 INPUT "%s %d", Sdummy, Splane 33 INPUT *%s %f", Sdummy, Sdisp 34 INPUT "%s %f". Sdummy, GπdTol 35 INPUT Vs Vf", Sdummy, GridSize 36 INPUT %s %f". Sdummy, Tsphere 37 INPUT "%s Vf Vf Vf", Sdummy, Orιgιn[0], Origintl], Origιn[2] 38 INPUT "Vs Vf %f %f", Sdummy, AutoIncD[0], AutoIncDIl], AutoIncD[2] 39 INPUT "Vs %f %f %f", Sdummy, AutoRotW[0], AutoRotW[l], AutoRotW[2] 40 INPUT Sdummy, AutoRotM[0], AutoRotMtl], AutoRotM[2] 41 INPUT Sdummy, XYZrotIO], XYZrot[l], XYZrot[2] 42 INPUT Sdummy, XYZmagtO], XYZmagtl] , XYZmag[2] 43 INPUT Sdummy, XYZmagO[0] , XYZmagOtl], XYZmagO[2] 44 INPUT Sdummy, MagOrgn[0], MagOrgn[1] , MagOrgn[21 45 /* XY Working Grid Plane: PI: X,Y,Z P2: X,Y,Z P3 : X,Y,Z Eq/Plane: A B C D •/ 46 INPUT "%s %f %f %f Vf %f Vf %f %f f %f %f %f Vf",\ 47 Sdummy,XYwg tO] ,XYwgp[l] ,XYwgp[2] ,XYwgp[3] ,XYwgp[4] ,XYwgp[5] ,XYwgp[6] ,XYwgp[7] ,XYwgp [8] ,XYwgp [9] ,XYwgp[10] , gp[ll] ,XYwgp[12]

4B /* XZ Working Grid Plane. PI: X,Y,Z P2: X,Y,Z P3 : X,Y,Z Eq/Plane- A B C D */ 49 INPUT "Vs %f Vf Vf Vf Vf %f %f %f %f Vf %f %f Vf » .\ 50 Sdummy,XZwgptO] ,XZwgp[l] ,XZwgp[2] ,XZwgp[3] ,XZwgp[4] ,XZwgp[5] ,XZwgp[6] ,XZwgp[7] ,XZwgp[8] ,XZwgp[9] ,XZwgp[10] , gptll] ,XZwgp[12]

51 /* YZ Working Grid Plane: PI: X.Y.Z P2 : X,Y,Z P3 X.Y.Z Eq/Plane: A B C D */ 52 INPUT "Vs Vf %f Vf Vf %f Vf Vf %f %f Vf %f Vf %f",\ 53 Sdummy,YZwgp[0] ,YZwgp[l] ,YZwgp[2] ,YZwgp[3] ,YZwgp[4] ,YZwgp[5] ,YZwgp[6] ,YZwgp[7] ,YZwgp[8] ,YZwgp[9] ,YZwgp[10] , gp[ll],YZwgp[12]

54 /* XY Outer Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */ 55 INPUT « %s %f Vf Vf %f Vf %f %f %f *f %f %f %f",\ 56 Sdummy.XYpntltO] [0] .XYpntl[0] [1] .XYpntl[0] [2] ,XYpntl [1] [0] .XYpntl [1] [1] ,XYpntl [1] [2] ,XYpntl [2] [0] .XYpntl [2] ,XYpntl[2] [2],XYpntl [3] [0] .XYpntl [3] [1] .XYpntl [3] [2]

57 /* XY Inner Grid Plane Boundry Points: P1,P2,P3,P4- X.Y.Z */ 58 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\ 59 Sdummy,XYpnt2 [0] [0] ,XYpnt2 [0] [1] ,XYpnt2 [0] [2] ,XYpnt2 [1] [0] ,XYpnt2 [1] [1] ,XYpnt2 [1] [2] ,XYpnt2 [2] [0] ,XYpnt2 [2] ,XYpnt2 [2] [2] ,XYpnt2 [3] [0] ,XYpnt2 [3] [1] ,XYpnt2 [3] [2]

60 / XZ Outer Grid Plane Boundry Points: P1,P2,P3.P4: X,Y,Z */ 61 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\ 62 Sdummy,XZpntl[0] [0] .XZpntl [0] [1] .XZpntl [0] [2] .XZpntl [1] [0] ,XZpntl [1] [1] ,XZpntl [1] [2] .XZpntl [2] [0] .XZpntl [2] ,XZpntl[2] [2],XZpntl [3] [0] ,XZpntl [3] [1] .XZpntl [3] [2]

63 /* XZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z •/ 64 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf".\

65 Sdummy,XZpnt2[0] [0] ,XZpnt2[0] [1] ,XZpnt2[0] [2] ,XZpnt2[l] [0] ,XZpnt2[l] [1] ,XZpnt2[l] [2] ,XZpnt2[2] [0] ,XZpnt2[2] ,XZpnt2[2] [2] ,XZpnt2[3] [0] ,XZpnt2[3] [1] ,XZpnt2 [3] [2]

66 /* YZ Outer Grid Plane Boundry Points: P1,P2,P3,P4. X.Y.Z */

DRCNFGR.CDP Monday, March 28, 1994 9:21 am Page

67 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf", \

68 Sdummy, YZpntl [0] [.0] .YZpntl [0] [1] ,YZpntl[0] [2] ,YZpntl[l] [0] .YZpntl [1] [1] .YZpntl [1] [2] .YZpntl [2] [0] , YZpntl [2] [ ,YZpntl[2] [2] .YZpntl [3] [0] .YZpntl [3] [1] .YZpntl [3] [2]

69 /* YZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */

70 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf", \

71 Sdummy, YZpnt2[0] [O] , YZpnt2 [0] [1] ,YZpnt2 [0] [2] , YZpnt2 [1] [0] , YZpnt2 [1] [1] , YZpnt2 [1] [2] , YZpnt2 [2] [0] , YZpnt2 [2] [ ,YZpnt2[2] [2],YZpnt2[3] [0] ,YZpnt2 [3] [1] , YZpnt2 [3] [2]

72 /* World Views: PI: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */

73 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

74 Sdummy, VM[0] [0] ,VM[0] [1] ,VM[0] [2] ,VM[0] [3] ,VM[0] [4] ,VM[0] [5] ,VM[0] [6] ,VM[0] [7] ,VM[0] [8] ,VM[0] [9] ,VM[0] [10]

75 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

76 Sdummy, VM[1] [0] ,VM[1] [1] ,VM[1] [2] ,VM[1] [3] ,VM[1] [4] ,VM[1] [5] ,VM[1] [6] ,VM[1] [7] ,VM[1] [8] ,VM[1] [9] ,VM[1] [10]

77 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

78 Sdummy, VM[2] [0] ,VM[2) [1] ,VM[2] [2] ,VM[2] [3] ,VM[2] [4] ,VM[2] [5] ,VM[2] [6] ,VM[2] [7] ,VM[2] [8] ,VM[2] [9] ,VM[2] [10]

79 /* Magnetic Views: PI: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */

80 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

81 Sdummy, VM[3] [0] ,VM[3] [1] ,VM[3] [2] ,VM[3) [3] ,VM[3] [4] ,VM[3] [5] ,VM[3] [6] ,VM[3] [7] ,VM[3] [8] ,VM[3] [9] ,VM[3] [10]

82 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

83 Sdummy, VM[4] [0] ,VM[4] [1] ,VM[4] [2] ,VM[4] [3] ,VM[4] [4] ,VM[4] [5] ,VM[4] [6] ,VM[4] [7] ,VM[4] [8] ,VM[4] [9] ,VM[4] [10]

84 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

85 Sdummy, VM[5] [0] ,VM[5] [1] ,VM[5] [2] ,VM[5] [3] ,VM[5] [4] ,VM[5] [5] ,VM[5] [6] ,VM[5] [7] ,VM[5] [8] ,VM[5] [9] ,VM[5] [10]

86 /* Optimized Views: PI: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */

87 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

88 Sdummy, VM[6] [0] ,VM[6] [1] ,VM[6] [2] ,VM[6] [3] ,VM[6] [4] ,VM[6] [5] ,VM[6] [6] ,VM[6] [7] ,VM[6] [8] ,VM[6] [9] ,VM[6] [10]

89 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf", \

90 Sdummy, VM[7] [0] ,VM[7] [1] ,VM[7] [2] ,VM[7] [3] ,VM[7] [4] ,VM[7] [5] ,VM[7] [6] ,VM[7] [7] ,VM[7] [8] ,VM[7] [9] ,VM[7] [10]

91 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf Vf",\

92 Sdummy, VM[8] [0] ,VM[8] [1] ,VM[8] [2] ,VM[ β ] [3] ,VM[8] [4] ,VM[8] [5] ,VM[8] [6] ,VM[8] [7] ,VM[β] [8] ,VM[8] [9] ,VM[8] [10]

93 /* ISO Views: PI: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port •/

94 INPUT "Vs Vf Vf Vf Vf Vf Vf Vf Vf Vf Vd Vd",\

95 Sdummy, VM(9] [0] ,VM[9] [1] ,VM[9] [2] ,VM[9] [3] ,VM[9] [4] ,VM[9] [5] ,VM[9] [6] ,VM[9] [7] ,VM[9] [8] ,VM[9] [9] ,VM[9] [10] 96

97 CLOSE devin

98 goto exit

100 :exit

102 EXIT

DRCNFGW.CDP Monday, March 28, 1994 9:21 am Page

1 rem 3DRCNFGW.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5

6 FileErr-0

7 CNFGerr-False

8

9 prompt "Saving Grid Plane Environment File: Vs",Sfname

10 SET devout, Sfname

11 GridPlns

12

13

14

15

16

17

18 ModeNum

19 Beep

20 Align

21 Views

22 Points

23 PointsHS

24 PntsLev

25 , Finder

26 . FndrPntr

27 \n", ECscale

28 \n", Delay

29 , MaxNodes

30 , Pplane

31 \n", Pdisp

32 , Splane

33 \n", Sdisp

34 \n", GridTol

35 \n", GndSize

36 \n", Tsphere

37 f V+17.12f V+17.12f\n" OriginIO], Origin [1], Oπgιn[2]

38 f V+17.12f V+17.12f\n" AutoIncD [0], AutoIncD [1], AutoIncD [2]

39 f V+17.12f V+17.12f\n" AutoRot [0], AutoRotW [1], AutoRotW [2]

40 PRINT "AutoRotM: V+17.12f V+17.12f V+17.12f\n" AutoRotM[0] , AutoRotMIl], AutθRotM[2]

41 /* X,Y,Z User Defined Rotation Angles */

42 PRINT "XYZrot: V+17.12f V+17.12f V+17.12f\n" XYZro [0] , XYZrot [1], XYZrot [2]

43 PRINT "XYZmag: V+17.12f V+17.12f V+17.12f\n" XYZmagtO], XYZmag [ 1 ] , XYZmag [ 2 ]

44 PRINT "XYZmagO: V+17.12f V+17.12f V+17.12f\n" XYZmagOlO] XYZmagOtl), XYZmagO[2]

45 PRINT "MagOrgn- V+17.12f V+17.12f V+17.12f\n" MagOrgn [0] MagOrgn [ 1 ] , MagOrgn [ 2 ]

46 /* XY Working Grid Plane: PI: X,Y,Z P2: X,Y,Z P3 : X,Y,Z Eq/Plane: A B C D */

47 PRINT "XYwgp: V+17.12f V+17.12f V+17.12f \n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f

+17.12f\n V+17.12f V+17.12f V+17.12f V+17.12f \n" , \

48 XYwgptO] .XYwgptl] , XYwgp [2] ,XYwgp[3] ,XYwgp[4] , XYwgp [5] ,XYwgp[6] , XYwgp [7] ,XYwgp[8] , XYwgp [9] .XYwgp [10] .XYwgp [11] XYwgp [12]

49 /* XZ Working Grid Plane: PI: X.Y.Z P2: X.Y.Z P3: X.Y.Z Eq/Plane: A B C D •/

50 PRINT "XZwgp: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f

+17.12f\n V+17.12f V+17.12f V+17.12f V+17.12f \n" , \

51 XZwgpIO] ,XZwgp[l] .XZwgp [2] ,XZwgp[3] ,XZwgp[4] , XZwgp [5] ,XZwgp[6] .XZwgp [7] ,XZwgp[β] .XZwgp [9), XZwgp [10] .XZwgp [11] XZwgp [12]

52 /• YZ Working Grid Plane: PI: X.Y.Z P2: X,Y,Z P3 : X,Y,Z Eq/Plane: A B C D */ 53 PRINT "YZwgp: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f

♦17.12f\n V+17.12f V+17.12f V+17.12f V+17.12f \n" . \

54 YZwgp[0] ,YZwgp[l] ,YZwgp[2] ,YZwgp[3] ,YZwgp[4] ,YZwgp[S] ,YZwgp[6] , YZwgp [7] ,YZwgp[8] , YZwgp [9] .YZwgp [10] , YZwgp [11] YZwg [12]

55 /• XY Outer Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */ 56 PRINT "XYpntl: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f

+17.12f\n V+17.12f V+17.12f V+17.12f \n" , \

57 XYpntl [0] [0] .XYpntl [0] [1] .XYpntl [0] [2] .XYpntl [1] [0] .XYpntl [1] [1] .XYpntl [1] [2], Ypntl [2 ] [0] , XYpntl [2] [1] .XYpn [2] [2], XYpntl [3] [0] .XYpntl [3] [1] .XYpntl [3] [21

58 /* XY Inner Grid Plane Boundry Points: P1,P2,P3,P4: X.Y.Z */ 59 PRINT "XYpnt2: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f

+17.12f\n V+17.12f V+17.12f V+17.12f \n" , \

60 XYpnt2 [0] [0] ,XYpnt2 [0] [1] ,XYpnt2 [0] [2] ,XYpnt2 [1] [0] ,XYpnt2 [1] [1] ,XYpnt2 [1] [2] ,XYpnt2 [2 ] [0] ,XYpnt2 [2] [1] ,XYpn [2] [21 ,XYpnt2 [3] [0] ,XYpnt2 [3] [1] ,XYpnt2 [3] [2]

61 /* XZ Outer Grid Plane Boundry Points: PI, P2,P3,P4 : X,Y,Z */ 62 PRINT "XZpntl: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17 12f

+17.12f\n V+17.12f V+17.12f V+17.12f\n" , \

DRCNFGW.CDP Monday, March 28, 1994 9:21 am Page

63 XZpntl [0] [0] .XZpntl [0] [1] .XZpntl [0] [2] .XZpntl [1] [01.XZpntl [1] [1] .XZpntl [1] [2] .XZpntl [2] [0] , XZpntl [2] [11.XZpn [2] [2] .XZpntl [3] [0] .XZpntl [3] [1] .XZpntl [3] [2]

64 /* XZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */

65 PRINT "XZpnt2: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f +17.12f\n V+17.12f V+17.12f V+17.12f \n", \

66 XZpnt2[0] [0] ,XZpnt2 [0] [1] ,XZpnt2 [0] [21 ,XZpnt2 [1] [0] ,XZpnt2 [1] [1] ,XZpnt2 [1] [2] ,XZpnt2 [2] [0] ,XZpnt2 [2] [1] ,XZpn [2] [2] ,XZpnt2 [3] [0] ,XZpnt2 [3] [1] ,XZpnt2 [3] [2]

67 /• YZ Outer Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */

68 PRINT "YZpntl: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f ♦17.12f\n V+17.12f V+17.12f V+17.12f \n" , \

69 YZpntl [0] [0] , YZpntl [0] [1] , YZpntl [0] [2] , YZpntl [1] [0] , YZpntl [1] [1] .YZpntl [1] [2] .YZpntl [2] [0] .YZpntl [2] [1] .YZpn [21 [2], YZpntl [3] [0] .YZpntl [3] [1] .YZpntl [3] [2]

70 /* YZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X.Y.Z */

71 PRINT "YZpnt2: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V + 17.12f V + 17.12f ♦17.12f\n V+17.12f V+17.12f V+17.12f \n" , \

72 YZpnt2[0] [0] , YZpnt2 [0] [1] ,YZpnt2 [0] [2] ,YZpnt2 [1] [0] , YZpnt2 [1] [1] ,YZpnt2 [1] [2] , YZpnt2 [2] [0] , YZpnt2 [2] [l],YZpnt [2] [2],YZpnt2[3] [0] ,YZpnt2 [3] [1] , YZpnt2 [31 [2]

73 /* World Views: PI: X.Y.Z P2 : X.Y.Z P3 : X.Y.Z System View, View Port */

74 PRINT "Wld_Vl: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f +17.12f V4d V4d\n",\

75 VMI01 [0],VM[01 [1],VM[0] [21,VM[0] [3],VM[0] [4],VM[0] [S],VM[0] [6],VM[0] [7] ,VM[0] [8],VM[0] [9],VM[0] [10]

76 PRINT « Wld_V2: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f +17.12f V4d V4d\n".\

77 VM[1] [0] ,VM[1] [1] ,VM[1] [21 ,VM[1] [3] ,VM[1] [4] ,VM[1] [5] ,VM[1] [6] ,VM[1] [7] ,VM[1] [8] ,VM[1] [9] ,VM[1] [10]

78 PRINT "Wld_V5: V+-17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V + 17.12f V + 17.12f ♦17.12f V4d V4d\n",\

79 VM[2] [0] ,VM[2] [1] ,VM[2] [2] ,VM[2] [3] ,VM[2] [4] ,VM[2] [5] ,VM[2] [6] ,VM[2] [7] ,VM[2] [8] ,VM[2] [9] ,VM[2] [10]

80 /* Magnetic Views: PI: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */

81 PRINT "Mag_Vl: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f ♦17.12f V4d V4d\n",\

82 VM[3] [0] ,VM[3] [1] ,VM[3] [2] ,VM[3] [3] ,VM[31 [4] ,VM[3] [5] ,VM[3] [6] ,VM[3] [7] ,VM[3] [8] ,VM[3) [9] ,VM[3] [10]

B3 PRINT "Mag_V2: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f

♦17.12f V4d V4d\n",\

84 VM[4] [0] ,VM[4] [1] ,VM[4) [2] ,VM[4] [3] ,VM[4] [4] ,VM[4] [5] . VM[4] [6] ,VM[4] [7] ,VM[4] [8] ,VM[4) [9] ,VM[4] [10]

85 PRINT "Mag_V5: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f ♦17.12f V4d V4d\n",\

86 VM[5] [0] ,VM[5] [1] .VM[S] [2] ,VM[5] [3] ,VM[5] [4] ,VM[S] [5] ,VM[5] [6] ,VM[5] [7] ,VM[S] [8] ,VM[5] [9] ,VM[5] [10]

87 /• Optimized Views: PI: X.Y.Z P2: X.Y.Z P3 : X.Y.Z System View, View Port */

88 PRINT "Opt_Vl: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V + 17.12f V + 17.12f +17.12f V4d V4d\n",\

89 VM[6] [0],VM[6] [1] ,VM[6] [2] , VM[6] ' [3] , VM[6] [4] ,VM[6] [5],VM[6] [61,VM[6] [7] ,VM[6) [8] , VM[6] [9] . VM[6] [10]

90 PRINT "Opt_V2: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f +17.l2f V4d V4d\n",\

91 VM[7] [0] ,VM[7] [1] ,VM[7] [2] ,VM[7] [3] ,VM[7] [4] ,VM[7] [5] ,VM[7] [6] ,VM[7] [7] ,VM[7] [8] ,VM[7] [9] ,VM[7] [10]

92 PRINT « Opt_VS: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f ♦17.12f V4d V4d\n",\

93 VM[8] [0] ,VM[8] [1] ,VM[8] [2],vM[B] [3] ,VM[8] [4] ,VM[8] [5],VM[8] [6],VM[8] [7] ,VM[8] [8],VM[8] [9],VM[8] [10]

94 /* ISO Views: PI: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */

95 PRINT "ISO_V7: V+17.12f V+17.12f V+17.12f\n V+17.12f V+17.12f V+17.12f\n V+17.12f V + 17.12f ♦17.12f V4d V4d\n",\

96 VM[9] [0] ,VM[9] [1] ,VM[9] [2] ,VM[9] [31 ,VM[9] [4] ,VM[9] [5] ,VM[9] [6] ,VM[9] [7] ,VM[9] [8] ,VM[9] [9] ,VM[9] [10] 97

98 CLOSE devout

99 goto exit 100

101 :exit

102 SET devout, CON

103 wait 1

104 EXIT

DRHE P.CDP Monday, March 28, 1994 12.10 pm Page

1 rem 3DRHelp.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5 6 MenuCol-White 7 DspLev-255 8 TogLev-DspLev 9 dosub tlevon.cdp 10 sys_autovp 0,0 11 mode draw 12 els 13 on Menu goto Abou 3DR,\ 14 3DR,\ 15 3D_Buιld,\ 16 2D_Draw,\ 17 Tools,\ 18 Locate,\ 19 Control,\ 20 SetGridΛ 21 PlnDispΛ 22 Control2,\ 23 SetGrιd2,\ 24 RotGet,\ 25 Origin,\ 26 OpnCls,\ 27 PLNs 28 PorM,\ 29 View,\ 30 PMK,\ 31 LoadSave,\ 32 Center23,\ 33 Locate2,\ 34 About3DR 35 36 :About3DR 37 note (βxmιn+(βxmax-βxmin)/ID ,\ 38 (βymax- (βymax-βymm) /ID ,\ 39 " The Replicator 40 Advanced Studio.V 0, January 1994 . . . 41 (Patent Version) 42 Designed for Use with 43 Faro's METRECOM IND Product Line 44 CADKEY 6 and above 45 FastSURF 6 and above 46 47 Author: Stephen Gubelmann 48 49 Copyright (C) 1993, 1994 by Stephen Gubelmann 50 All rights reserved 51 52 53 For Support Call Stephen Gubelmann at 54 619 792-7900 (Voice) 55 619 792-7900 (Fax)",\ 56 0, (βxπiax-βxmin)/48,0.8, .LGreen, ,DspLev 57 mode normal 58 goto exιt2 59 60 :3DR 61 note (βxmιn+(βxmax-βxmin)/ID ,\ 62 (βymax- (βymax-βymin) /ID ,\ 63 "The Replicator Main Menu Help File 64 €5 3D Build • Build Points, Lines, Polylines 66 And Splines In 3-D 67 2D Draw - Build Points, Lines, Polylines 68 And Splines In 2-D 69 Tools - Build Arcs, Circles, Polygons and Views 70 Locate - Locate Key Points, And Measure Distances 71 Views - Cycle- World, Magnetic,& Optimized Views 72 Modes - Cycle: Manual:SemιAuto:Auto:Stιcky 73 CutPln:CutPlns:Pnt2PlnP

DRHELP.CDP Monday, March 28, 1994 12.10 pm Page

74 Control - GP Hide/Show-Modes-Beep On/Off:Fndr On/Off

75 AutoPace:MaxNodes:SetGrid

76 Pnts On/Off:Pnts Hide/Show:PntLevel

77 About3DR - About The Replicator Information File

78 3DR Help - Display This Help Screen", \

79 0, (βxmax-βxmin) /48, 0.8, ,MenuCol, .DspLev

BO goto exit

82 :3D_Build

83 note (βxmιn+ (βxmax-βxmin) /ID ,\

84 (βymax- (βymax-βymin) /ID , \

85 "The Replicator 3D Build Help File . . .

86

87 Point 3-D Point String Generation

88 Line 3-D Line String Generation

89 Polyline 3-D Polyline String Generation

90 Spline 3-D Spline Generation

91 Views Cycle: World, Magnetic, _ Optimized Views

92 Modes Cycle: Manual:SemιAutθ:Auto:Stιcky

93 CutPln:CutPlns:Pnt2PlnP

94 SetGrid Define Primary and Secondary planes

95 Control GP Hide/Show:Modes:Beep On/Off:Fndr On/Off

96 AutoPace:MaxNodes:SetGrid

97 Pnts On/Of :Pnts Hide/Show:PntLevel

98 3DR Help Display This Help Screen",\

99 0, (βxmax-βxmin) /4β 0.8,,MenuCol, ,DspLev

102 :2D_Draw

103 note (βxmιn+ (βxmax-βxmin) /ID ,\

104 (βymax- (βymax-βymin) /ID ,\

105 "The Replicator 2D Draw Help File

106

107 Point 2-D Point String Generation

108 Line 2-D Line String Generation

109 Polyline 2-D Polyline String Generation

110 Spline 2-D Spline Generation

111 Mode Cycle Manual:SemiAuto:Auto

112 SetFrame Set The Drawing Frame

113 Control GP Hide/Show:Modes.Beep On/Off:Fndr On/Off

114 AutoPace:MaxNodes:SetGrid

115 Pnts On/Off:Pnts Hide/Show:PntLevel

116 3DR Help Display This Help Screen",\

117 0, (βxmax-βxmin) /48, 0.8 MenuCol, ,DspLev

120 : ools

121 note (βxmιn+ (βxmax-βxmin) /ID ,\

122 (βymax- (βymax-βymin) /ID , \

123 "The Replicator Tools Help File

124 Arc - Define An Arc In 3D Using 3 Points

125 Circle - Define A Circle In 3D Using 3 Points

126 Polygon - Define A 3 To 8 Sided 3D Polygon

127 View . Define A New CADKEY View With 3 points

128 Views » Cycle: World, Magnetic, & Optimized Views

129 Mode - Supports Manual Only

130 Control - GP Hide/Show:Modes:Beep On/Of :Fndr On/Off

131 AutoPace: axNodes:SetGrid

132 Pnts On/Off:Pnts Hide/Sho -PntLevel

133 3DR Help - Display This Help Screen",\

134 0, (βxmax-βxmin)/48, 0 8, .MenuCol, ,DspLev

137 -.Locate

138 note (βxmιn+ (βxmax-βxmin) /ID ,\

139 (βymax- (βymax-βymm) /ID , \

140 "The Replicator Locate Help File . . .

141

142 Track - Real-Time Display Of Probe Tip Location

143 Pnt2Pnt - Measure Distance Between Two Points

144 Pnt Near - Locate Point Closest To Primary Plane

145 Pnt Far - Locate Point Farthest From Primary Plane

146 PntPln X - Locate Point On Surface At Intersection

DRHELP.CDP Monday, March 28, 1994 12.10 pm Page

147 Of The Primary And Secondary Planes

148 -more- - Displays Additional Locate Options

149 Views - Cycle World, Magnetic, & Optimized Views

150 SetGrid - Must Be Set For Pnt Near,Pnt Far.PntPln X

151 3DR Help - Display This Help Screen",\

152 0, (βxmax-βxmin)/48,0 8,,MenuCol,,DspLev

155 :Control

156 note (βxmιn+ (βxmax-βxmin)/ID ,\

157 (βymax- (βymax-βymin) /ID ,\

158 "The Replicator Control Help File .

159

160 GP - Hide Or Show Grid Plane

161 Modes - Cycle: Manual-.SemiAuto:Auto:Sticky

162 CutPln•CutPlns:Pnt2PlnP

163 Beep - Cycles Confirmation Beep On/Off

164 Fndr - Cycle Tracking Finder On/Off

165 AutoPace - Set The Time Delay Between Nodes

166 Default .00 Seconds

167 MaxNodes - Specify Manximum Nodes To Collect In String

168 Default 100 Nodes

169 SetGrid - Define Primary And Secondary Planes

170 -more- - Displays Additional Control Options

171 3DR Help - Display Th s Help Screen",\

172 0, (βxmax-βxmin)/48 0.8,,MenuCol, ,DspLev

175 :Control2

176 note (βxmm+ (βxmax-βxmin)/ID ,\

177 (βymax- (βymax-βymin)/ID ,\

178 "The Replicator Control Help File . . .

179

180 Pnts - Cycle Points On/Off

181 Pnts - Hide Or Show Points

182 PntLevel - Sets Displacement Of Points

183 Default Current Level +50

184 3DR Help - Display This Help Screen",\

185 0, (βxmax-βxmin) /48,0.8, .MenuCol, .DspLev

188 SetGrid

189 note (βxm n* (βxmax-βxmin)/ID ,\

190 (βymax- (βymax-βymin) /ID ,\

191 "The Replicator SetGrid Help File .

192

193 Ppln - Cycles Primary Plane Through XY/XZ/YZ

194 PplnDisp - Set Primary Plane Displacement

195 Spin - Cycles Secondary Plane Through XY/XZ/YZ

196 SplnDisp - Set Secondary Plane Displacement

197 Origin - Set Grid Plane Origin

198 XYZrot - Rotate Grid Plane On 90 Degree Boundaries

199 XYZalign - Rotate Grid Plane To X.Y Or Z Axis Origin

200 -more- - Displays Additional SetGrid Options

201 3DR Help - Display This Help Screen",\

202 0, (βxmax-βxmin)/48 0.8, , enuCol, ,DspLev

205 :SetGrιd2

206 note (βxmin*(βxmax-βxmin)/ID ,\

207 (βymax- (βymax-βymin) /ID ,\

208 "The Replicator SetGrid Help File

209

210 Grid Tol Set Grid Tolerance For CutPlane

211 Default Within +/- .025\" of Primary Plane

212 GndSize Set Grid Size,

213 Default 6 Units

214 Origin Set New Grid Origin

215 GridRset Reset Grid - Sets Ppln & Spin To Null.

216 Sets PplnDisp, SplnDisp, _ Autolnc To 0.

217 Sets Origin To 0, 0, 0. Sets Grid Tol _

218 GndSize To Default Settings

219 Align Force Nodes Into Plane Alignment If On

DRHELP.CDP Monday, March 28, 1994 12.10 pm Page

220 Views - Cycle. World, Magnetic, & Optimized Views

221 GP Stats - Display Grid Plane Stats

222 Test - Test Input Device

223 File - Save Or Load Grid Plane Enviornment Files

224 3DR Help - Display This Help Screen" , \

225 0, (βxmax-βxmin) /48, 0.8, .MenuCol, ,DspLev

228 :PlnDisp

229 note (βxmιn+ (βxmax-βxmin) /111 , \

230 (βymax- (βymax-βymin) /ID , \

231 "The Replicator Grid Plane Displacement Help File

232

233 Probe - Use Probe To Set Plane Displacement

234 Mouse « Use Mouse To Set Plane Displacement

235 Key In - Key In Plane Displacement

236 Autolnc - Set Plane Displacement Autolnc

237 XYZrot » Rotate Grid Plane On 90 Degree Boundaries

238 XYZalign - Rotate Grid Plane To X,Y Or Z Axis Origin

239 3DR Help - Display This Help Screen", \

240 0, (βxmax-βxmm) /48, 0 8, ,MenuCol, ,DspLev

243 :RotGet

244 note (βxmιn+ (βxmax-βxmin) /ID , \

245 (βymax- (βymax-βymin) /ID ,\

246 "The Replicator Grid Plane Rotation Help F le .

247

248 Probe - Use Probe To Set Plane Displacement

249 Mouse - Use Mouse To Set Plane Displacement

250 Key In > Key In Plane Displacement

251 Autolnc - Set Axis Rotation Autolnc

252 Views - Cycle. World, Magnetic, & Optimized Views

253 RotAxis > Set Rotation Axis To X, Y, Or Z

254 Rset Mag - Reset Magnetic Compass

255 GP Stats « Display Grid Plane Stats

256 3DR Help - Display This Help Screen", \

257 0, (βxmax-βxmin) /48, 0.8, .MenuCol, ,DspLev

260 -.Origin

261 note (βxmin* (βxmax-βxmin) /ID , \

262 (βymax- (βymax-βymin) /ID ,\

263 "The Replicator Control Help File . . .

264

265 Set lpos - Set Grid Plane With One Position

266 Movelpos • Move Grid Plane To New Location

267 Set 3pos - Set Grid Plane W th Three Positions

268 Rset Mag - Reset Magnetic Compass

269 3DR Help - Display This Help Screen", \

270 0, (βxmax-βxmin) /48, 0.8,, enuCol, ,DspLev

273 -.OpnCls

274 note (βxmιn+ (βxmax-βxmin) /ID ,\

275 (βymax- (βymax-βymin) /ID , \

276 "The Replicator Control Help File . . .

277

278 Open - Build Entity With Open End Condition

279 Closed - Build Entity With Closed End Condition

2B0 3DR Help - Display This Help Screen",\

281 0, (βxmax-βxmin) /48, 0 8,, enuCol,,DspLev

284 :PLNs

285 note (βxmιn+ (βxmax-βxmin) /ID , \

286 (βymax- (βymax-βymin) /ID , \

287 "The Replicator Planes Help File . .

286

289 Plane XY - Create Grid Plane With XY Orientation

290 Plane XZ - Create Grid Plane With XZ Orientation

291 Plane YZ - Create Grid Plane With YZ Orientation

292 3DR Help - Display This Help Screen",\

DRHELP.CDP Monday, March 28, 1994 12.10 pm Pag

293 0, (βxmax-βxmin) / 8,0.8, MenuCol, .DspLev

296 :PorM

297 note (βxmιn+ (βxmax-βxmin) /ID , \

298 (βymax- (βymax-βymin) /ID ,\

299 "The Replicator Probe/Mouse Help File

300

301 Probe - Use Probe

302 Mouse - Use Mouse

303 3DR Help » Display This Help Screen",\

304 0, (βxmax-βxmin) /48,0.8, ,MenuCol, ,DspLev

307 :Vιew

308 note (βxmιn+(βxmax-βxmin) /ID ,\

309 (βymax- (βymax-βymin) /ID ,\

310 "The Replicator ISO/User View Help File . . .

311

312 Rset ISO - Reset Window 2 To Standard ISO

313 SetWιnd2 - Set Wmtow 2 To User Defined View

314 3DR Help - Display This Help Screen",\

315 0, (βxmax-βxmin) /48, 0.8, .MenuCol, ,DspLev

318 :PMK

319 note (βxmιn+ (βxmax-βxmin)/ID ,\

320 (βymax- (βymax-βymin)/ID ,\

321 "The Replicator Probe/Mouse/Key_In Help File

322

323 Probe - Use Probe To Set Plane Displacement

324 Mouse - Use Mouse To Set Plane Displacement

325 Key In - Key In Plane Displacement

326 3DR Help - Display This Help Screen",\

327 0, (βxmax-βxmin)/48,0.8, ,MenuCol, ,DspLev

330 :LoadSave

331 note (βxmιn+ (βxmax-βxmin)/ll) ,\

332 (βymax- (βymax-βymin) /ID ,\

333 "The Replicator Environment File Help File

334

335 Save » Save Grid Plane Environment File

336 Load - Load Grid Plane Environment File

337 3DR Help - Display This Help Screen", \

338 0, (βxmax-βxmin)/ 8, 0.8, ,MenuCol, ,DspLev

341 :Center2

342 note (βxmm+ (βxmax-βxmin) /ID , \

343 (βymax- (βymax-βymin) /ID , \

344 "The Replicator Locate Center Help File .

345

346 2 Pos - Locate Center Using 2 Positions

347 3 Pos - Locate Center Using 3 Positions

348 3DR Help - Display This Help Screen",\

349 0, (βxmax-βxmin)/48, 0.8, .MenuCol, .DspLev

352 :Locate2

353 note (βxmm+ (βxmax-βxmin) /ID ,\

354 (βymax- (βymax-βymin) /ID ,\

355 "The Replicator Locate Help File . .

356

357 Center Locate Center Of Object Using 3 Points

358 Edge Locate Edge Of Object Using 6 Points

359 Corner Locate Corner Of Object Using 9 Points

360 Views Cycle World, Magnetic, & Optimized Views

361 SetGrid Must Be Set For Pnt Near,Pnt Far.PntPln X

362 3DR Help Display This Help Screen",\

363 0. (βx ax-βxmin) /48 0 8, ,MenuCol, ,DspLev

365

Page

DRTEST.CDP Monday, March 28, 1994 9 21 am Page rem 3DRTEST.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FastSURF

OldOx-Oπgin [ 0 ] OldOy-Origin [1] 01dOz-Or gιn [2]

9 OldGP-GridPlns 10 if (GridPlns) 11 { 12 GridPlns-Hide 13 dosub bldplane.cdp 14 } 15 FιnderX-FιnderY-FιnderZ-0 16 17 MenuLev-MenuLev+1 18 :top 19 getflt "Enter New Test Sphere Radius (V.4f) ",Tsphere,Tsphere 20 Gr dSιze-Tsphere*3 21 prompt "Probe Select Test Point Location. . 22 DO 23 { 24 readdev Fcntl,Fx,Fy,Fz,Fa,Fb.Fc 25 ♦INCLUDE fmderl.inc 26 Bh t - Fcntl _ 3 27 getkey

- Bl) mc 32 if (Beep -- On) 33 print "\007" 34 Origin[0] -Fx 35 Origin[1]-Fy 36 Origin[2]-Fz 37 rem dosub bldplane.cdp 38 POINT Fx.Fy,Fz,LRed 39 VIEW Viewl,1,0,0,0,1,0,0,0,1 40 CIRCLE Fx,Fy,Fz,Tsphe_e,Vιewl,LRed 41 VIEW Vιew2, 1,0,0,0,0,-1,0,1,0 42 CIRCLE Fx,Fz, -Fy,Tsphere,Vιew2,LRed 43 VIEW ViewS, 0,0, 1,1,0,0,0,1,0 44 CIRCLE Fy.Fz.Fx.Tsphere,ViewS,LRed 45 auto -1 46 redraw -l 47 dosub 3drtest2 cdp 49 50 :exιt 51 MenuLev-MenuLev-1 52 Origin[0] -OldOx 53 Origin[1] -OldOy 54 Origin[2]-OldOz 55 GridPlns-OldGP 56 if (GridPlns) 57 dosub bldplane.cdp 58 EXIT

DRTEST2.CDP Monday, March 28, 1994 9.21 am Page

1 rem 3DRTEST2.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5 6 7 float PntDist 8 GoodPnts-BadPnts-Tpnts-0 9 clear Fcntl, Fx, Fy, Fz, Fa , Fb, Fc 10 FinderZ-FmderY-FinderZ-O 11 12 : start 13 Bhιt-Delete-0 14 :top 15 DO 16 { 17 readdev Fcntl,Fx,Fy,Fz,Fa,Fb.Fc 18 ♦INCLUDE finderl.mc 19 prompt "X-V06.2f Y-V06.2f Z-V06.2f: G-V03d B-V03d T-V03d P- V5.4f A-V5.2f\V",\ 20 Fx,Fy,Fz,GoodPnts,BadPnts.GoodPnts+BadPnts,\ 21 Tsphere, (GoodPnts/(GoodPnts+BadPnts+.0001) ) *100 22 Bhit - Fcntl & 3 23 getkey

27 exitloop 2B } WHILE (Bhit — None) 29 if ((βkey -- Del) __ (Delete — On)) 30 goto deleteit 31 on Bhit goto top, exit, B101, top 32 33 :B101 34 ♦INCLUDE finderO.inc 35 : easure 36 Tpnts-Tpnts+1 37 PntDist-sqr ( ( (Origin[0J -Fx) ' 2) + ( (0rιgm[l]-Fy) * 2)+ ( (Origin[2] -Fz)"2) ) 38 If (PntDist > Tsphere) 39 { 40 point Fx,Fy,Fz,Red ' 41 BadPnts=BadPnts+l 42 } 43 else 44 { 45 point Fx,Fy,Fz,LGreen 46 GoodPnts-GoodPnts+1 47 } 48 if (Beep -- On) 49 print "\007" 50 LstPoint-βlastid 51 Delete-On 52 ♦INCLUDE waitrell. nc S3 goto top 54 :deleteιt 55 Delete-Off 56 DELENT LstPoint 57 goto start 58 59 :exit 60 clear Fcntl,Fx.Fy.Fz,Fa,Fb.Fc 61 ♦INCLUDE fιnder2.ιnc 62 auto -1 63 redraw -l 64 pause "Good-Vd Bad-Vd Total-Vd: Precιs on-V.4f Accuracy-V.2f\V",\ 65 GoodPnts, BadPnts, GoodPnts+BadPnts, Tsphere, (GoodPnts/Tpnts) >100 66 EXIT

AUTOSEG.CDP Monday, March 28, 1994 9:21 am Page

1 rem AUTOSEG.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5 6 :start 7 iι-16 8 G2Pmode-0 9 MenuLev-MenuLev*1 10 sprint SmenuStr,"Select 3 Position Selection Method (Vd) ",LastPick[ii] 11 getmenu SmenuStr,\ 12 "Probe",\ 13 "Mouse",\ 14 " - ",\ 15 " - ",\ 16 17 " _ " \ 18 " _ « \ 19 " - ",\ 20 "3DR HELP", enuLev,LastPickUi] 21 switch (βkey) 22 { 23 case -3:-2

28 LastPic [ ll-1 29 G2Pmode-l 30 dosub get2pos.cdp 31 if (G2Pcount!-2) 32 { 33 pause "2 Unique Locations Required. You entered Vd",G2Pcount 34 MenuLev-MenuLev-1 35 auto -1 36 redraw -l 37 goto start 38 ) 39 break 40 case 2 41 LastPic [ii] -2 42 G2Pmode-2 43 dosub get2pos.cdp 44 if (G2Pcount!-2) 45 { 46 pause "2 Unique Locations Required. You entered Vd",G2Pcount 47 MenuLev-MenuLev-1 48 auto -1 49 redraw -1 50 goto start 51 } 52 break 53 case 3 :8 54 LastPick[ii]-9 55 Menu-15 56 dosub 3drhelp.cdp 57 MenuLev-MenuLev-1 58 goto start 59 break 60 case 9 61 LastPic [ii]-9 62 Menu-15 63 dosub 3drhelp.cdp 64 MenuLev-MenuLev-1 65 goto start 66 break 67 default 68 LastPick [ill-9 69 Menu-15 70 dosub 3drhelp.cdp 71 MenuLev-MenuLev-1 72 goto start 73 break

AUTOSEG.CDP Monday, March 28, 1994 9.21 am Page

74 }

75 Segments-2

76 AsegSgrp»AsegSgrp+l

77 getint "Enter Number of Segments (Vd) : ",Segments,Segments

78 distAB-sqrt ( (G2Pos [1] [0] -G2Pos [0] [0] ) * 2+\

79 (G2Pos[ll [l]-G2Pos[0] [1] ) * 2 + \

80 (G2Pos[l] [2]-G2Pos[0] [2]) * 2)

81 SegLen-distAB/Segments

82 point G2Pos[0] [0] ,G2Pos[0] [1] ,G2Pos[0] [2] ,βcolor, ,123,AsegSgrp

83 point G2Pos[l] [0] ,G2Pos[l] [1] ,G2Pos[l] [2] , β color,,123,AsegSgrp

84 line G2Pos[0] [0],G2Pos[0] [l],G2Pos[0] [2], \

85 G2Pos[l] [0] ,G2Pos[l] [1] ,G2Pos[l] [2] ,βcolor, ,2,123,AsegSgrp

86 for (i-l, KSegments,- l-i+l)

87 {

88 xl-G2Pos [0] [0] + ( ( (G2Pos [1] [0] -G2Pos [0] [0] ) /distAB) * (SegLen*ι) )

89 yl-G2Pos [0] [1] + ( ( (G2Pos [1] [1] -G2Pos [0] [1] ) /distAB) * (SegLen*ι) )

90 zl-G2Pos [0) [2] + ( ( (G2Pos [1] [2] -G2Pos [0] [2] ) /distAB) * (SegLen*ι) )

91 point xl,yl,zl,βcolor, ,123,AsegSgrp

92 } 93

94 auto -1

95 redraw -1

98 :eκιt

99 MenuLev-MenuLev-1 100 EXIT

BLDPLANE.CDP Monday, March 28, 1994 9 21 am Pag

1 rem BLDPLANE.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5 6 if (PplnEnt[0] ) 7 { 8 DELENT PplnEnt [0] 9 DELENT PplnEnt [1] 10 PplnEnt [0]-PplnEnt [1]-0 11 } 12 if (GridPlns — Hide) 13 goto SPLN 14 on Pplane goto SPLN, XYp, XZp, YZp 15 :XYp 16 POLYLINE 4,XYpntl,2,2,2,1,Red, ,2 17 PplnEnt [0]-βlastid 18 POLYLINE 4,XYpnt2,2,2,2,l,Red, ,2 19 PplnEnt[1]-βlastid 20 goto SPLN 21 .XZp 22 POLYLINE 4,XZpntl,2,2,2.1,Red, ,2 23 PplnEnt [0] -βlastid 24 POLYLINE 4,XZpnt2,2,2,2,1,Red, ,2 25 PplnEnt [1]-βlastid 26 goto SPLN 27 :YZp 28 POLYLINE 4.YZpntl,2,2,2,1,Red,,2 29 PplnEn [01-βlastid 30 POLYLINE 4,YZpnt2,2, ,2.2,1,Red, ,2 31 PplnEnt [1] -βlastid 32 goto SPLN 33 34 :SPLN 35 if (SplnEnt [0]) 36 { 37 DELENT SplnEnt [0] 38 DELENT SplnEnt [1] 39 SplnEnt[0]-SplnEnt[1] -0 40 } 41 if (GridPlns — Hide) 42 goto GPplane 43 if (Splane -- Pplane) 44 goto GPplane 45 on Splane goto GPplane, XYs, XZs, YZs 46 :XYs 47 POLYLINE 4, Ypntl,2,2,2,1,Green, ,2 48 SplnEnt [0] -βlastid 49 POLYLINE 4,XYpnt2,2,2,2,1,Green, ,2 50 SplnEnt [1]-βlastid 51 goto GPplane 52 :XZs 53 POLYLINE 4,XZpntl.2.2.2,1,Green.,2 54 SplnEnt[01-βlastid 55 POLYLINE 4,XZpnt2,2,2,2,l,Green, ,2 56 SplnEnt [1]-βlastid 57 goto GPplane 58 :YZS 59 POLYLINE 4,YZpntl,2,2,2,1,Green, ,2 60 SplnEnt [0]-βlastid 61 POLYLINE ,YZpnt2.2,2,2,1,Green, ,2 62 SplnEnt [1] -βlastid 63 goto GPplane 64 goto GPplane 65 66 :GPplane 67 if (GPent [0]) SB { 69 for (i-O, 1-6; l-i+D 70 { 71 if (GPent [ι]) 72 DELENT GPent[i] 73 GPent [ι]-0

BLDPLANE.CDP Monday, March 28, 1994 9 21 am Page

74 75 DELENT OrgEnt 76 } 77 f (GridPlns — Hide) 80 rem Pplane & Splane Paths 81 if (( (Pplane—XYplane) it (Splane—XZplane) ) || ( (Pplane—XZplane) __ (Splane— Yplane) ) ) 82 { 83 rem YZ 84 POLYLINE 4,YZpntl,2 ,,2,2,1,Gray, ,2 85 GPent [0]-βlastid 86 POLYLINE 4,YZpnt2,2,,2,2,1,Gray, ,2 87 GPent [1] -βlastid B8 POINT Origin [0] . Origin [1] . Origin [2] . Gray 89 OrgEnt-βlastid 92 if (( (Pplane—XYplane) &- (Splane—YZplane) ) || ( (Pplane—YZplane) __ (Splane— Yplane) ) ) 93 { 94 rem XZ 95 POLYLINE 4,XZpntl,2,2.2,1,Gray, ,2 96 GPent [0]-βlastid 97 POLYLINE 4,XZpnt2,2,2,2,l,Gray, ,2 98 GPent [1] -βlastid 99 POINT Origin tO] , 0πgιn [l] , 0rιgιn [2] , Gray 100 OrgEnt-βlastid 101 goto exit 102 } 103 if (( (Pplane—XZplane) __ (Splane—YZplane) ) || ( (Pplane—YZplane) __ (Splane—XZplane) ) )

{

1C5 rem XY 106 POLYLINE 4,XYpntl,2,2,2,1,Gray, ,2 107 GPent [01-βlastid 108 POLYLINE 4,XYpnt2,2,2,2,l,Gray, ,2 109 GPent [1] -βlastid 110 POINT Origin[0] ,Origin[1] .Origin[2] .Gray 111 OrgEnt-βlastid 114 115 rem No Splane Paths 116 if ( (Pplane -- XYplane) __ (Splane—NOplane) ) 117 { 118 rem XZ 119 POLYLINE 4,XZpntl,2,2,2,1 .,Gray, ,2 120 GPent [01-βlastid 121 POLYLINE 4,XZpnt2, ,2,2,1.Gray, ,2 122 GPent [1] -βlastid 123 rem YZ 124 POLYLINE 4,YZpntl ,,2,2,2,1,Gray, ,2 125 GPent [2] -βlastid 126 POLYLINE 4,YZpnt2,2,2,2,l,Gray, ,2 127 GPent [3] -βlastid 128 POINT Origin[0] ,Origin[1] .Origin[2] .Gray 129 OrgEnt-βlastid 132 if ((Pplane — XZplane) __ (Splane—NOplane) ) 133 { 134 rem XY 135 POLYLINE 4,XYpntl,2,2,2,1,Gray, ,2 136 GPent[0]-βlastid 137 POLYLINE ,XYpnt2,2,2,2,1,Gray, ,2 138 GPent [1] -βlastid 139 rem YZ 140 POLYLINE 4,YZpntl,2,2,2,1,Gray, ,2 141 GPent [2] -βlastid 142 POLYLINE 4 YZpnt2.2,2,2,l.Gray, ,2 143 GPent [3] -βlastid 144 POINT Orig nIO] ,0πgιn[l] ,Orιgιn[2) .Gray 145 OrgEnt-βlastid 146 goto exit

BLDPLANE.CDP Monday, March 28, 1994 9 21 am Pag

147 }

148 if ( (Pplane •■ YZplane) __ (Splane— Oplane) )

149 {

150 rem XY

151 POLYLINE 4.XYpntl,2,2,2,1,Gray, ,2

152 GPent[0]-βlastid

153 POLYLINE ,XYpnt2,2,2,2,1,Gray, ,2

154 GPent[1]-βlastid

155 rem XZ

156 POLYLINE 4,XZpntl,2,2,2,1 Gray, ,2

157 GPent [2]-βlastid

158 POLYLINE 4,XZpnt2,2,2,2,1 Gray, ,2

159 GPent [3]-βlastid

160 POINT Origin[0] .Origin[1] Origin[2] .Gray

161 OrgEnt-βlastid

165 rem No Pplane Paths

166 if ( (Splane -- XYplane) __ (Pplane—NOplane) )

167 {

168 rem XZ

169 POLYLINE 4,XZpntl,2,2,2,1,Gray,,2

170 GPent [0]-βlastid

171 POLYLINE 4,XZpnt2,2,2,2,l,Gray, ,2

172 GPent [1]-βlastid

173 rem YZ

174 POLYLINE 4,YZpntl,2,2,2,1,Gray, ,2

175 GPent[2]-βlastid

176 POLYLINE 4,YZpnt2,2,2,2,1,Gray, ,2

177 GPent [3]-βlastid

178 POINT Origin[0] .Origin[1] ,Origin[2] ,Gray

179 OrgEnt-βlastid

182 if ((Splane — XZplane) &_ (Pplane—NOplane))

183 {

184 rem XY

185 POLYLINE 4,XYpntl,2,2,2,1,Gray, ,2

186 GPent [0]-βlastid

187 POLYLINE ,XYpnt2,2.2,2,1,Gray, ,2

188 GPent [1] -βlastid

189 rem YZ

190 POLYLINE 4,YZpntl,2,2,2,1,Gray, ,2

191 GPent [21-βlastid

192 POLYLINE 4,YZpnt2,2,2,2,1,Gray, ,2

193 GPent [3]-βlastid

194 POINT Origin[0] ,Origin[1] .Origin[2] .Gray

195 OrgEnt-βlastid

198 if ((Splane -- YZplane) _& (Pplane — NOplane))

199 {

200 rem XY

201 POLYLINE 4,XYpntl,2,2,2,1,Gray,,2

202 GPent [0]-βlastid

203 POLYLINE 4,XYpnt2,2.2.2.1,Gray, ,2

204 GPen [1] -βlastid

205 rem XZ

206 POLYLINE 4.XZpntl,2, ,2,1,Gray,

207 GPent [2]-βlastid

208 POLYLINE 4,XZpnt2,2, .2,1,Gray,

209 GPent [3] -βlastid

210 POINT Origin[0] ,Origin[1] .Origin[2] .Gray

211 OrgEnt-βlastid

212 goto exit

213 }

214

215 rem Plane - Splane Paths

216 if ( (Pplane — Splane) __ (Pplane- ■XYplane) )

217

218 rem XZ

219 POLYLINE 4,XZpntl,2,2,2, l.Gray, ,2

ay, March 28, 1994 9 21 am Pag

BLDVTEW.CDP Monday, March 28, 1994 9 21 am Page rem BLDVIEW.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FastSURF

DOUBLE OldX, OldY, OldZ, OldMagX, OldMagY, OldMagZ on Views goto WldVιew,MagVιew,OptVιew,exιt

9 10 :WldView 11 dosub gprset.cdp 12 dosub gpmove.cdp 13 dosub calplane.cdp 14 Vn-0 15 goto Top 16 17 :MagVιew 18 OldX-XYZrot[0] 15 XYZrot [0] -MagOrgn [0] 20 OldY-XYZrot [1] 21 XYZrot [1] -MagOrgn [1] 22 01dZ-XYZrot[2] 23 XYZrot [21 -MagOrgn [2 ) 24 OldMagX-XYZmagtO] 25 OldMagY-XYZma [1] 26 01dMagZ-XYZmag[2] 27 XYZmag [0] -XYZmag [1) -XYZmag [2] -0 28 dosub rmagwld.cdp 29 Vn-3 30 goto Top 31 32 :0ptVιew 33 Vn-6 34 goto Top 35 36 /* Get Gr d Plane XY s 3 Point Optimized View Definition */ 37 :Top 38 NextVιew-1 39 Vxl-XYwgp[0] 40 Vyl-XYwgpIl) 41 Vzl-XYwgp[2] 42 Vx2-XYwgp[3] 43 Vy2-XYwgp[4) 44 Vz2-XYwgp[5] 45 Vx3-XYwgp[6] 46 Vy3-XYwgp[7] 47 Vz3-XYwgp[8] 48 goto MakeView 49 50 /* Get Grid Plane XZ' 3 Point Optimized View Definition */ 51 : Front 52 Vn-Vn+1 53 NextVιew-2 54 Vxl-XZwgp[0] 55 Vyl-XZwgpIl] 56 Vzl-XZwgp[2] 57 Vx2-XZwgp[3] 58 Vy2-XZwgp[4] 59 Vz2-XZwgp[5] 60 Vx3-XZwgp[6] 61 Vy3-XZwgp[7] 62 Vz3-XZwgp[8] 63 goto MakeView 64 65 /• Get Grid Plane YZ' s 3 Point Optimized View Definition */ 66 :Sιde 67 Vn-Vn+1 68 NextVιew-3 69 Vxl - YZwgp [0] 70 Vyl-YZwgp[l] 71 Vzl-YZwgp[2] 72 Vx2-YZwgp[3] 73 Vy2-YZwgp[4]

BLDVIEW.CDP Monday, March 28, 1994 9 21 am Page

74 Vz2-YZwgp[5]

75 Vx3-YZwgp[6]

76 Vy 3- YZwgp [7]

77 Vz3-YZwgp[8]

78 goto MakeView

79

80 : MakeView

81 dosub 3DR2CK CDP

B2 if (ViewErr)

83 goto exit

84 VM[Vn] [0] -Vmatrix [0]

85 VM[Vn] [1] -Vmatrix [1]

86 VM[Vn] [2] -Vmatrix [2]

87 VM[Vn] [3] -Vmatrix [3]

B8 VM[Vn] [4] -Vmatrix [4]

89 VM[Vn] [5] -Vmatrix [5]

90 VM[Vn] [6] -Vmatrix [6]

91 VM[Vn] [7] -Vmatrix [7]

92 VM[Vn] [8] -Vmatrix [8]

93

94 REM Define the view

95 View Vn+6,VM[Vn] [0] ,VM[Vn] [1] ,VM[Vn] [2] ,VM[Vn] [3] ,VM[Vn] [4] ,VM[Vnl [5] ,VM[Vn] [6] ,VM[Vn] [7) ,VM[Vn] [81

96 CALL cdlv2sysv,Vn+6,VM[Vn] [9]

97 View VM[Vn] [9] ,VM[Vn] [0] ,VM[Vn) [1] ,VM[Vn] [2] ,VM[Vn] [3] ,VM[Vn] [4] ,VM[Vn] [5] ,VM[Vn] [6] ,VM[Vn] [7] ,VM[Vn] [8]

98 rem Set VIEW,VM[Vnl [9],VM[Vn] [10]

99 sys_put_name 2,VM[Vn] [9] ,SSVnote[Vn]

100 on NextView goto exit, Front, Side, exit

101

102 :exιt

103 if (Views— World)

104 dosub rmagwld cdp

105 if (Views—Magnetic)

106 {

107 XYZro [0]-01dX

108 XYZrot [1] -OldY

109 XYZrot [2]-OldZ

110 XYZmag[01-OldMagX

111 XYZmag[U-01dMagY

112 XYZma [2] -OldMagZ

113 dosub gprset.cdp

114 dosub gprotate cdp

115 dosub gp ove cdp

116 dosub calplane cdp

117 rem dosub bldplane cdp

118 }

119 clear OldX,OldY,OldZ

120 EXIT

BUILDGET.CDP Monday, March 28, 1994 9 21 am Page

1 rem BUILDGET.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 rem This program will allow 3-D points to be input in a stream 6 7 clear Fcntl,Fx,Fy,Fz,Fa,Fb.Fc β StkyCol-White 9 10 FmderX-FinderY-FinderZ-0 11 if (PomtsHS) 12 dosub disppnts.cdp 13 :restart 14 LstNodes-0 15 ARRAY PntNodes[MaxNodes] [3] 16 ARRAY PntlDs [MaxNodes] 17 ARRAY LmelDs[MaxNodes] 18 on ModeNum goto Manual,SimiAuto,Auto,Sticky,CutPlnO,CutPlnsO,Pro_P2PO,exit 19 20 :Manual 21 LastBhit-Bhit-Nodes-NodeErr-O 22 :tθp0 23 prompt "Bl Press-Start | B2-End | B2/ESC-exιt | Nodes - Vd",Nodes 24 :topl 25 DO 26 { 27 readdev Fcntl,Fx,Fy,Fz,Fa,Fb,Fc 28 ♦INCLUDE fmderl.inc 29 Bhit - Fcntl & 3 30 getkey

34 exitloop 35 } WHILE (Bh t — None) 36 if ((βkey -- Del) __ (Delete — On)) 37 goto delete t 38 if ((βkey -- Del) _& (Delete -- Off)) 39 { 40 ♦INCLUDE delnode.inc 41 goto topO 42 } 43 on Bhit goto topi, B201, B101, topi 44 45 :B101 46 ♦INCLUDE finderO.inc 47 ♦INCLUDE pnttrace.inc 48 if (Beep — On) 49 print "\007" 50 if (Nodes -- MaxNodes) 51 { 52 pause "MaxNodes - Vd reached Increase MaxNodes using \"Control:MaxNodes\" ".MaxNodes 53 redraw -1 54 goto restart 55 ) 56 ♦INCLUDE waitrell inc 57 goto topO 58 59 :B201 60 if (Nodes — None) 62 dosub buildit 63 if (NodeErr — True) 64 { 65 NodeErr-False 66 goto Manual 67 } 68 Delete-On 69 LstNodes-Nodeε 70 ♦INCLUDE waitrel∑.inc 71 goto Manual 72 73

BUILDGET.CDP Monday, March 28, 1994 9.21 am Page

74 :CutPlnO 75 if (Pplane NOplane) 76 77 pause "Primary Plane not set. Use \"SetGrid." to enable CutPlane" 78 goto exit 79 } 80 :CutPln 81 LastBhit-Bhit-Nodes«NodeErr-0 62 :top2 83 prompt "Bl Press-Start | B2-End I B2/EΞC-exιt | Nodes - Vd",Nodes 84 :top3 85 DO 86 { 87 readdev Fcntl,Fx,Fy,Fz,Fa,Fb.Fc

♦INCLUDE finderl.inc

89 Bhit - Fcntl & 3 90 getkey

94 exitloop 95 } WHILE (Bhit — None) 96 if ((βkey -- Del) && (Delete — On)) 97 goto deleteit 98 f ((βkey — Del) __ (Delete — Off)) 99 < 100 ♦INCLUDE delnode.inc 101 goto top2 102 } 103 on Bhit goto top3, B202, B102, top3 104 105 :B102 106 Delete-Off 107 on Pplane goto exit. XYpath, XZpath, YZpath, exit 108 109 :XYpath 110 Pnt2PlnD- ( ( (XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp[12] ) Λ 111 sqrtl (XYwgp [9] * 2)+ (XYwg [10] * 2)+ (XYwgp [11] * 2) ) ) 112 if (abs(Pnt2PlnD) > GridTol! 113 goto top3 114 rem Fz-Orιgιn[2] +Pdιsp 115 if (Align—On) 116 { 117 Fx-Fx+ (-Pnt2PlnD*XYwgp [9] ) 118 Fy-Fy+(-Pnt2PlnD*XYwgp[10] ) 119 Fz-Fz+ ( -Pnt2PlnD*XYwgp [11] ) 120 rem pause "Dιst-V.4f X-V.4f Y-V.4f Z-V.4f", Pnt2PlnD, Fx,Fy,Fz 121 } 122 goto jump 123 124 : XZpath 125 Pnt2PlnD- ( ( (XZwgp [9] *Fx) ♦ (XZwgp [10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) / \ 126 sqrtl (XZwgp[9] * 2) + (XZwgp[10] * 2) + (XZwgp[ll] * 2) ) ) 127 if (abs(Pnt2PlnD) > GridTol) 128 goto top3 129 rem Fy-Orιgιn[l] +Pdιsp 130 if (Align— On) 131 { 132 Fx-Fx+ (-Pnt2PlnD*XZwgp[9] ) 133 Fy-Fy+ (-Pnt2PlnD*XZwgp [10] ) 134 Fz-Fz+ (-Pnt2PlnD*XZwgp [11] ) 135 rem pause "Dιst-V.4f X-V.4f Y-V.4f Z-V.4f", Pnt2PlnD, Fx.Fy.Fz 136 ) 137 goto jump 138 139 : YZpath 140 Pnt2PlnD-( ( (YZwgp [9] *Fx) + (YZwgp [10] *Fy) + (YZwg [11] *Fz) +YZwgp [12] ) /\ 141 sqrtl (YZwgp [9] * 2)+ (YZwgp [10] * 2)+ (YZwgp [11] * 2) ) ) 142 if (abs(Pnt2PlnD) > GridTol) 143 goto top3 144 rem Fx-0rιgιn[0] +Pdιsp 145 if (Align—On) 146 {

BUILDGET. CDP Monday, March 28 , 1994 9 .21 am Pag

147 Fx-Fx+ ( -Pnt2PlnD*YZwgp [9] )

148 Fy-Fy+ ( - Pnt2PlnD*YZwgp [ 10] )

149 Fz-Fz+ ( - Pnt2PlnD*YZwgp [ll] )

150 rem pause "Dιst-V.4f X-%.4f Y-V.4f Z-V.4f", Pnt2PlnD, Fx,Fy,Fz

151 } 153

154 : ump

155 ♦INCLUDE finderO.inc

156 ♦INCLUDE pnttrace . mc

157 if (Beep — On)

158 print "\007"

159 if (Nodes — MaxNodes)

160 {

161 pause "MaxNodes - Vd reached. Increase MaxNodes using \"Control:MaxNodes\".", axNodes

162 redraw -1

163 goto restart

164 }

165 ♦INCLUDE waitrell.inc

166 goto top2 167

168 :B202

169 if (Nodes — None)

171 dosub buildit.cdp

172 if (NodeErr — True)

173 {

174 NodeErr-False

175 goto CutPln

176 }

177 ♦INCLUDE fιnder2.inc

178 dosub plnmenu.cdp

179 dosub rmagwld2.cdp

180 Delete-On

181 LstNodes-Nodes

182 #INCLUDE waιtrel2.mc

183 goto CutPln 184

185 :Auto

186 LastBhit«Bhit-Nodes-«odeErr-0

187 :top4

188 prompt "Bl Press/Release-Start/Stop | B2/ESC-exιt | Nodes - Vd", odes

189 :top5

190 getkey

193 if ((βkey -- Del) ii (Delete « On))

194 goto delete t

195 readdev Fcntl,Fx,Fy,Fz,Fa,Fb.Fc

196 ♦INCLUDE finderl.mc

197 LastBhit - Bhit

198 Bhit - Fcntl _ 3

199 if ( (Bhit -- None) ii (LastBhit — None) )

200 goto topS

201 on Bhit goto Blrel, exit, B103, topS 202

203 :Blrel

204 if (Nodes — None)

206 dosub buildit.cdp

207 if (NodeErr -- True)

208 {

209 NodeErr-False

210 goto Auto

211 )

212 Delete-On

213 LstNodes-Nodes

214 goto Auto 215

216 :B103

217 ♦INCLUDE fmderO . inc

218 ♦INCLUDE pnttrace . mc

219 if (Beep — On)

BUILDGET CDP Monday, March 28, 1994 9 21 am Page

220 print "\007" 221 if (Nodes -- MaxNodes) 222 { 223 pause "MaxNodes - Vd reached Increase MaxNodes using ."Control MaxNodes\" ".MaxNodes 224 redraw -1 225 goto restart 226 } 227 Wait Delay 228 goto top4 229 goto Auto 230 231 SimiAuto 232 LastBh t-Bhit-Nodes-NodeErr-0 233 .SAtopO 234 prompt "Bl Press-Start | B2-End | B2/ESC-exιt | Nodes Vd",Nodes 235 SAtopl 236 DO 237 { 238 readdev Fcntl,Fx,Fy,Fz,Fa,Fb,Fc 239 ♦INCLUDE finderl inc 240 Bhit - Fcntl i 3 241 getkey

245 exitloop 246 ) WHILE (Bhit — None) 247 f ((βkey — Del) ii (Delete -- On)) 248 goto deleteit 249 if ((βkey — Del) ii (Delete — Off)) 250 { 251 ♦INCLUDE delnode inc 252 goto SAtopO 253 } 254 on Bhit goto SAtopl, B2SA, B1SA, SAtopl 255 256 B1SA 257 ♦INCLUDE finderO inc 258 ♦INCLUDE pnttrace inc 259 if (Beep — On) 260 print "\007" 261 f (Nodes -- MaxNodes) 262 { 263 pause "MaxNodes » Vd reached Increase MaxNodes using \"Control MaxNodes ." ",MaxNodes 264 redraw -1 265 goto restart 266 } 267 Wait Delay 268 goto SAtopO 269 270 :B2SA 271 if (Nodes -- None) 272 goto exit 273 dosub buildit 274 f (NodeErr «- True) 275 { 276 NodeErr-False 277 goto SimiAuto 278 } 279 Delete-On 280 LstNodes-Nodes 281 ♦INCLUDE waιtrel2 282 goto SimiAuto 283 2B4 ProjP2P0 285 if (Pplane NOplane) 286 287 pause "Primary Plane not set Use \"SetGrιd\" to enable CutPlane" 290 ProjP2P 291 LastBhi -Bhit-Nodes-NodeErr-0 292 ProjP2P2

BUILDGET.CDP Monday, March 28, 1994 9 21 am Page

Press-Start | B2-End | B2/ESC-exιt | Nodes - Vd",Nodes

295 DO

296 {

297 readdev Fcntl,Fx, Fy.Fz,Fa,Fb, Fc

298 ♦INCLUDE fmderl inc

299 Bhit - Fcntl i 3

300 getkey

304 exitloop

305 } WHILE (Bhit — None)

306 if ((βkey — Del) ii (Delete -- On))

307 goto deleteit

308 f ((βkey — Del) ii (Delete — Off))

309 {

310 ♦INCLUDE delnode.mc

313 on Bhit goto Pro P2P3, B2p2p, Blp2p, ProjP2P3 314

315 :Blp2p

316 Delete-Off

317 on Pplane goto exit, XYp2p, XZp2p, YZp2p, exit 318

319 :XYp2p

320 Pnt2PlnD- ( ( (XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] «Fz) +XYwgp [12] ) / \

321 sqrt ( (XYwgp [9] * 2> + (XYwg [10] * 2 ) + (XYwgp [11] * 2> ) )

322 Fx-Fx+(-Pnt2PlnD*XYwgp[9] )

323 Fy-Fy+(-Pnt2PlnD*XYwgp[101)

324 Fz«Fz+(-Pnt2PlnD*XYwgp[ll] )

327 :XZp2p

328 Pnt2PlnD= ( ( (XZwgp [9] *Fx) + (XZwgp[10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) /\

329 sqrt( (XZwg [9] ~2> + (XZwgp[10] * 2) + (XZwgp [11] * 2) ) )

330 Fx-Fx+(-Pnt2PlnD*XZwgp[9] )

331 Fy-Fy+(-Pnt2PlnD*XZwgp[10])

332 Fz-Fz+(-Pnt2PlnD*XZwgp[ll])

333 goto jump_p2p 334

335 :YZp2p

336 Pnt2PlnD-( ( (YZwgp [9] *Fx) + (YZwgp[10] *Fy) + (YZwgp[11] *Fz) +YZwgp [12] ) /\

337 sqrt ( (YZwgp [9] * 2) + (YZwgp[10] * 2) + (YZwgp[11] * 2) ) )

338 Fx-Fx+(-Pnt2PlnD*YZwgp[91)

339 Fy-Fy+(-Pnt2PlnD*YZwgp[10] )

340 Fz-Fz+(-Pnt2PlnD*YZwgp[ll] )

341 goto jump_p2p 342

344 ♦INCLUDE finderO.mc

345 ♦INCLUDE pnttrace inc

346 if (Beep -- On)

347 print "\007"

348 if (Nodes -- MaxNodes)

349 {

350 pause "MaxNodes - Vd reached Increase MaxNodes using \"Control MaxNodes\" ".MaxNodes

351 redraw -1

352 goto restart

353 }

354 ♦INCLUDE waitrell inc

355 goto ProjP2P2 356

357 :B2p2p

358 if (Nodes — None)

360 dosub buildit cdp

361 if (NodeErr — True)

362 {

363 NodeErr-False

364 goto ProjP2P

365 }

BUILDGET.CDP Monday, March 28, 1994 9 21 am Page

366 ♦INCLUDE fιnder2.ιnc

367 dosub plnmenu.cdp

368 dosub rmagwld2.cdp

369 Delete-On

370 LstNodes-Nodes

371 ♦INCLUDE waιtrel2.inc

372 goto ProjP2P 373

374 :Sticky

375 LastBhιt-Bhιt-Nodes-NodeErr-OldStky-0

376 :Stιckyl

377 prompt "Bl Press/Release-Start/Stop | B2/ESC-exιt | Nodes - Vd",Nodes

378 :Stιcky2

379 if (Nodes)

380 {

381 Mode draw

382 LINE PntNodes [(Nodes-Dl [0] , PntNodes [ (Nodes-1) ] [1] , PntNodes [ (Nodes-1) ] [2], \

383 Fx.Fy.Fz,Black,,1,,, ,βlwιdth+4

384 Mode normal

385 }

386 getkey

389 if ((βkey — Del) ii (Delete — On))

390 goto deleteit

391 if ((βkey — Del) ii (Delete — Off))

392 {

393 ♦INCLUDE delnode.inc

394 goto Stickyl

395 }

396 readdev Fcntl,Fx,Fy,Fz,Fa,Fb.Fc

397 if (Finder)

398 {

399 mode draw

400 point FinderX.FinderY.FinderZ,Black 401 FinderX-Fx

402 FinderY-Fy

403 FinderZ-Fz

404 point FιnderX,FιnderY,FιnderZ,StkyCol 405 mode normal

406 }

407 if (Nodes)

408 {

409 Mode draw

410 LINE PntNodes ( (Nodes-1) ] [0] .PntNodes [ (Nodes-D ] [1] .PntNodes [ (Nodes-1) ] [2], \

411 Fx.Fy.Fz,LRed, ,2, , , .βlwidth

412 Mode normal

413 }

414 LastBhit - Bhit

415 Bhit - Fcntl i 3

416 if ((Bhit -- None) ii (LastBhit — None))

417 goto Stιcky2

418 on Bhit goto SBlrel, SB2, SB1, Stιcky2 419

420 :SBlrel

421 StkyCol-White

422 if (Nodes)

423 {

424 Mode draw

425 LINE PntNodes! (Nodes-1) ] [0] .PntNodes [ (Nodes-1) ] [1] , PntNodes [ (Nodes-1) 1 [2] ,\

426 Fx.Fy.Fz,Black, , 1 βlwιdth+4

427 Mode normal

428 }

429 ♦INCLUDE finderO.inc

430 Mode draw

431 Delete-Off

432 point StιckyX,StιckyY,StιckyZ,White

433 PntNodes [Nodes] [0] - StickyX

434 PntNodes [Nodes! [1] - StickyY

435 PntNodes [Nodes] [2] - StickyZ

436 Nodes-Nodes+1

437 if (Nodes>l)

438 LINE PntNodes [ (Nodes-2) ] [0] , PntNodes [ (Nodes-2) ] [1] , PntNodes [ (Nodes-2) ] [2] , \

Paσe

, MaxNodes

BUILDGET.CDP Monday, March 28, 1994 9:21 am Pag

512 if ((βkey — Del) ii (Delete — Off))

513 {

514 ♦INCLUDE delnode.inc

515 goto tops2

516 )

517 on Bhit goto tops3, B202s, B102s, tops3

518

519 :B102s

520 Delete-Off

521 on Pplane goto NoPplane, XYpaths, XZpaths, YZpaths, NoX

522

523 :XYpaths

524 Pnt2Plnl- ( ( (XYwg [9] *Fx) + (XYwgp[10] *Fy) + (XYwgp[11] *Fz) +XYwgp[12] ) /\

525 sqrt ( (XYwgp [9] ~2> + (XYwgp [10] * 2) + (XYwgp [11] * 2) ) )

526 if (abs(Pnt2Plnl) > GridTol)

527 goto tops3

528 if (Splane—XZplane)

529 {

530 Pnt2Pln2- ( ( (XZwgp [9]*Fx) + (XZwgp [10] *Fy) + (XZwgp[11] *Fz) +XZwgp[12] ) Λ

531 sqrt ( (XZwgp[9] * 2> + (XZwgp [10] * 2) + (XZwgp [11] * 2) ) )

532 if (abs(Pnt2Pln2) > GridTol)

533 goto tops3

534 }

535 if (Splane—YZplane)

536 {

537 Pnt2Pln2- ( ( (YZwgp [9] *Fx) + (YZwg [10] *Fy) + (YZwgp[11] *Fz) +YZwgp [12] ) /\

538 sqrt ( (YZwgp[9] * 2) + (YZwgp[10] ~2> + (YZwgp [11] * 2) ) )

539 if (abs(Pnt2Pln2) > GridTol)

540 goto tops3

541 }

542 if (Align—On)

543 {

544 Fx-Fx+(-Pnt2Plnl*XYwgp[9] )

545 Fy-Fy+(-Pnt2Plnl*XYwgp[lO] )

546 Fz-Fz+(-Pnt2Plnl*XYwgp[ll])

547 if (Splane— XZplane)

548 {

549 Fx-Fx+(-Pnt2Pln2*XZwgp[9] )

550 Fy»Fy+(-Pnt2Pln2"XZwgp[lO] )

551 Fz-Fz+(-Pnt2Pln2*XZwgp[ll] )

552 )

553 if (Splane—YZplane)

554 {

555 Fx-Fx+(-Pnt2Pln2*YZwgp(9] )

556 Fy-Fy* (-Pnt2Pln2*YZwgp[10] )

557 Fz-Fz+(-Pnt2Pln2"YZwgp[ll])

558 )

559 }

560 goto jumps

561

562 : XZpaths

563 Pnt2Plnl- ( ( (XZwgp [9] *Fx) + (XZwgp [10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) /\

564 sqrt ( (XZwgp [9] * 2) * (XZwgp [10] * 2) + (XZwgp [11] * 2) ) )

565 if (abs(Pnt2Plnl) > GridTol)

566 goto tops3

567 if (Splane— XYplane)

568 {

569 Pnt2Pln2- ( ( (XYwgp [9] *Fx) + (XYwgp [10] "Fy) + (XYwgp [11] *Fz) *XYwgp [12] ) Λ

570 sqrtf (XYwgp [9] ~2) + (XYwgp [10] ~2) + (XYwgp [11] ~2) ) )

571 if (abs(Pnt2Pln2) > GridTol)

572 goto tops 3

573 }

574 if (Splane—YZplane)

575 {

576 Pnt2Pln2- ( ( (YZwgp [9] *Fx) * (YZwgp [10] *Fy) ♦ (YZwgp [11] *Fz) *YZwgp [12] ) Λ

577 sqrt ( (YZwgp [9] * 2) * (YZwgp [10] ~2) * (YZwgp [11] * 2) ) )

578 if (abs(Pnt2Pln2) > GridTol)

579 goto tops3

560 }

581 if (Align- -On)

582 {

583 Fx-Fx+ (-Pnt2Plnl*XZwg [9] )

584 Fy-Fy+(-Pnt2Plnl*XZwgp[10] )

BUILDGET.CDP Monday, March 28, 1994 9:21 am Pa

585 Fz-Fz+(-Pnt2Plnl"XZwgp[ll] )

586 if (Splane. -XYplane)

587 {

588 Fx-Fx+(-Pnt2Pln2"XYwgp[9] )

589 Fy-Fy+(-Pnt2Pln2*XYwgp[10])

590 Fz-Fz+(-Pnt2Pln2*XYwgp[ll])

591 }

592 if (Splane—YZplane)

593 {

594 Fx-Fx+ (-Pnt2Pln2*YZw p[9] )

595 Fy-Fy+(-Pnt2Pln2*YZwgp[10])

596 Fz-Fz+ (-Pnt2Pln2*YZwgp [11] )

597 }

598 }

599 goto jumps 600

601 :YZpaths

602 Pnt2Plnl- ( ( (YZwgp [9] *Fx) ♦ (YZwg [10] *Fy) + (YZwgp[11] *Fz) +YZwgp[12] ) /\

603 sqrtl (YZwgp [9] * 2) + (YZwgp[10] * 2) + (YZwgp [11] * 2) ) ) 604 if (abs(Pnt2Plnl) > GridTol)

605 goto tops3

606 if (Splane—XYplane)

607 {

608 Pnt2Pln2- ( ( (XYwg [9] *Fx) + (XYwg [101 *Fy> + (XYwgp [11] *Fz) +XYwg [12] ) /\

609 sqrtl (XYwgp [9] * 2) + (XYwgp[10] * 2) + (XYwg [11] * 2) ) )

610 if (abs(Pnt2Pln2) > GridTol)

611 goto tops3

612 }

613 if (Splane—XZplane)

614 {

615 Pnt2Pln2- ( ( (XZwgp [9] *Fx) + (XZwg [10] *Fy) + (XZwgp[11] « Fz) +XZwgp [12] ) /\

616 sqrt ((XZwgp[9] * 2) + (XZwgp [10 2) + (XZwgp[11] * 2) ) )

617 if (abs(Pnt2Pln2) > GridTol)

618 goto tops3

619 }

620 if (Align—On)

621 {

622 Fx-Fx+(-Pnt2Plnl « YZwgp[9])

623 Fy«Fy+(-Pnt2Plnl*YZwgp[lO])

624 Fz-Fz+(-Pnt2Plnl*ΫZwgp[ll] )

625 if (Splane—XYplane)

626 {

627 Fx»Fx+(-Pnt2Pln2*XYwgp[9] )

628 Fy-Fy+(-Pnt2Pln2*XYwgp[10) )

629 Fz-Fz+(-Pnt2Pln2*XYwgp[ll] )

630 }

631 if (Splane— Zplane!

632 {

633 Fx-Fx+(-Pnt2Pln2*XZwgp[9])

634 Fy-Fy+(-Pnt2Pln2*XZwgp[10] )

635 Fz-Fz+(-Pnt2Pln2*XZwgp[ll] )

636 }

637 }

638 goto jumps 639

640 :jumps

641 ♦INCLUDE finderO.inc

642 ♦INCLUDE pnttrace.inc

643 if (Beep — On)

644 print "\007"

645 if (Nodes — MaxNodes)

646 {

647 pause "MaxNodes - Vd reached. Increase MaxNodes using \"Control:MaxNodes\" .* .MaxNodes 648 redraw -1

649 goto restart

650 }

651 dosub plnmenu.cdp

652 dosub rmagwld2.cdp

653 Mode draw

65', POINT PntNodestO] [0] ,PntNodes[0] [1] ,PntNodes[0] [2] .White, ,2

655 Mode normal

656 if (Nodes-1)

657 {

BUILDGET.CDP Monday, March 28, 1994 9.21 am Page

658 Mode draw 659 for li-l, KNodes; i-i+l) 660 { 661 POINT PntNodes[(ι) ] [0] ,PntNodes [ (ill [1] ,PntNodes [ d) ] [2] .White, ,2 662 LINE PntNodes [(i-D] [0] ,PntNodes [(i-1) 1 [11 ,PntNodes [ (i-D 1 [2] ,\ 663 PntNodes [(!)] [0] ,PntNodes[ ( ) 1 [1] ,PntNodes [(I) ] [2] ,White, ,2 664 } 665 Mode normal 666 } 667 ♦INCLUDE waitrell.inc 668 goto tops2 669 670 :B202s 671 if (Nodes — None) 673 dosub buildit.cdp 674 if (NodeErr -- True) 675 { 676 NodeErr-False 677 goto CutPlns 678 } 679 ♦INCLUDE fιnder2.mc 680 dosub plnmenu cdp 681 dosub rmagwld2.cdp 682 Delete-On 683 LstNodes-Nodes 684 ♦INCLUDE waitrel∑. nc 6B5 goto CutPlns 686 687 :deleteιt 688 Delete-Off 689 if (Points) 690 for (n-0. n<LstNodes,- n-n+1) 691 DELENT PntIDs[n] 692 if (GeoType — CKpoint) 693 for (n»0; n<LstNodes, n-n+D 694 DELENT PntlDstn] 695 if (GeoType — CKlme) 696 for (n-0; n< (LstNodes-1) ; n-n+D 697 DELENT LmelDstn] 698 if ( (GeoType -- CKplme) (GeoType -- CKsplme) ) 699 DELENT LastEnt 700 LstNodes-0 701 ♦INCLUDE fιnder3.ιnc 702 goto restart 703 704 :exιt 705 MODE normal 706 clear PntNodes,PntIDs,LinelDs,Fcntl,Fx,Fy,Fz 707 ♦INCLUDE fιnder2.ιnc 708 EXIT

BUILDIT.CDP Monday, March 28, 1994 9:21 am Page

1 rem BUILDIT.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 dosub 3dr_lock.cdp

7 if (BadKey)

8 {

9 Menu-0

10 dosub 3drhelp.cdp

11 ABORT

12 }

13 :start

14 MODE normal

15 if (GeoType—CKpomt)

16 {

17 PntsSgrp-PntsSgrp+1 lβ for (n-0 ; n<Nodes ; n-n+D

19 {

20 if (n—0)

21 ColCode-Red

22 if (n—1)

23 ColCode-Blue

24 if (n>l)

25 ColCode-Gray

26 if (n— (Nodes-D)

27 ColCode-Green

28 point PntNodes [n] [0] ,PntNodes [n] [1] ,PntNodes [nl [2] ,ColCode, , 122,PntsSgrp

29 PntlDs [nl-βlastid

30 }

31 }

32 if (GeoType—CKline)

33 {

34 if (Nodes < 2)

35 {

36 pause "Lines require 2 Nodes minimum. You entered Vd Nodes",Nodes

37 redraw -l

38 NodeErr-True

41 LιneSgrp-LιneSgrp+1

42 for (n«0 ; n< (Nodes-D ; n-n+D

43 {

44 LINE PntNodes [n] [ 0] , PntNodes [n] [1] , PntNodes [n] [2] , \

45 PntNodes [n+ 1] [ 0] . PntNodes [n+1] [1] , PntNodes [n+1] [2] . βcolor , , 1 , 121 , LιneSgrp

46 LmelDs [n] -βlastid

47 }

48 if (Points )

49 {

50 PntsSgrp-PntsSgrp+1

51 for (n»0 ; n -Nodes ,- n-n+D

52 {

53 if (n—0 )

54 ColCode-Red

55 if (n— 1 )

56 ColCode-Blue

57 if (n>l)

58 ColCode-Gray

59 if (n— (Nodes-D )

60 ColCode-Green

61 point PntNodes [n] [0] ,PntNodes [n] [1] ,PntNodes [n] [2] .ColCode, (βlevel+PntsLev) ,122,PntsSgrp

62 PntlDs [n]-βlastid

63 }

64 }

65 }

66 if (GeoType—CKpline)

67 {

68 if ((Nodes < 3) ii (Ptype — Closed))

69 {

70 pause "Closed Polylines require 3 Nodes minimum. You entered Vd Nodes", odes

71 redraw -1

72 NodeErr-True

73 goto exit

BUILDIT.CDP Monday, March 28, 1994 9 21 am Page

74 }

75 if ((Nodes - 2) ii (Ptype — Open))

76 {

77 pause "Open Polylines require 2 Nodes minimum You entered Vd Nodes",Nodes

78 redraw -l

79 NodeErr-True

80 goto exit

81 }

82 PolySgrp-PolySgrp+1

83 POLYLINE Nodes, PntNodes, 3,Ptype,1,1,βcolor, , ,120, PolySgrp

84 LastEnt-βlastid

85 if (Points)

86 {

87 PntsSgrp-PntsSgrp+1

88 for (n-0 , n<Nodes , n-n+D

69 {

90 if (n— 0)

91 ColCode-Red

92 if (n—1)

93 ColCode-Blue

94 if (n>l)

95 ColCode-Gray

96 if (n— (Nodes-D )

97 ColCode-Green

98 point PntNodes [n] [0] , PntNodes [n] [1] , PntNodes [n] [2] . ColCode, (βlevel+PntsLev) , 122 , PntsSgrp

99 PntlDs [n] -βlastid

100 )

101 }

102 }

103 if (GeoType—CKsplme)

104 {

105 if (Nodes < 4)

106 {

107 pause "Splines require 4 Nodes minimum You entered Vd Nodes".Nodes

108 redraw -1

109 NodeErr-True

112 SplnSgrp-SplnSgrp+1

113 If (Stype -- Open)

114 I

115 SPLINE P3NN, PntNodes, Nodes, βcolor, , 119, SplnSgrp

116 LastEnt-βlastid

117 }

118 If (Stype — Closed)

119 {

120 SPLINE P3C, PntNodes, Nodes, βcolor, 119, SplnSgrp

121 LastEnt-βlastid

122 }

123 if (Points)

124 {

125 PntsSgrp-PntsSgrp+1

126 for (n-0, n<Nodes, n-n+D

127 {

128 if (n—0)

129 ColCode-Red

130 if (n—1)

131 ColCode-Blue

132 if (n>l)

133 ColCode-Gray

134 f (n— (Nodes-D )

135 ColCode-Green

136 point PntNodes [n] [0] , PntNodes [n] [1] , PntNodes [n] [2] .ColCode, (βlevel+PntsLev) , 122,PntsSgrp

137 PntlDs [n] -βlastid

138 }

139 }

140 }

141 ♦INCLUDE finder2 nc

142 auto -l

143 redraw -l

145 EXIT

CALPLANE.CDP Monday, March 28, 1994 9 21 am Page

1 rem CALPLANE.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 6 DOUBLE a,b,c,d,e,f 7 8 /* Calculate The Equation of the XY Plane 9 /* Find the direction ratios of line AB 10 a-XYwgp[3]-XYwgp[0] 11 b-XYwg [4] -XYwgp [1] 12 c-XYwgp[S]-XYwgp[2] 13 /* Find the direction ratios of line AC */ 14 d-XYwgp [6] -XYwgp [0] 15 e«XYwgp[7]-XYwgp[l] 16 f-XYwgp[8]-XYwgp[2] 17 /* Find the direction ratios of the Normal to AB _ AC */ 18 CALL CROSS, XYwg (9] ,XYwgp[10] ,XYwgp[ll] ,a,b,c,d,e,f 19 CALL D0TPR0D,XYwgp[6] ,XYwgp[7] , XYwg [8] , XYwgp [9] , XYwgp [10] .XYwg [11] ,XYwgp(12] 20 XYwgp [12] -0-XYwgp [12] 21 22 /* Calculate The Equation of the XZ Plane */ 23 /* Find the direction ratios of line AB */ 24 a-XZwgp [3] -XZwgp [0J 25 b-XZwgp [4] -XZwgp [1] 26 c-XZwgp [5] -XZwgp [2] 27 /* Find the direction ratios of line AC */ 28 d-XZwgp[6]-XZwgp[0] 29 e-XZwg [7] -XZwgp [1] 30 f-XZwgp[8]-XZwgp[2] 31 /* Find the direction ratios of the Normal to AB i AC */ 32 CALL CROSS, XZwgp [9] ,XZwgp[10] ,XZwgp[ll] .a.b.c.d.e.f 33 CALL D0TPR0D,XZwgp[6] .XZwgp [7] .XZwgp [8] .XZwgp [9] .XZwgp [10] .XZwgp [11] ,XZwgp[12] 34 XZwgp[12]-0-XZwgp[12] 35 36 /* Calculate The Equation of the YZ Plane */ 37 /* Find the direction ratios of line AB •/ 38 a-YZwgp [31 -YZwgp [0] 39 b-YZwgp[4]-YZwgp[l] . 40 c-YZwgp[5]-YZwgp[2] 41 /* Find the direction ratios of line AC */ 42 d-YZwgp[6) -YZwgp [0] 43 e-YZwgp[7)-YZwgp[l] 44 f-YZwgp[8]-YZwgp(2] 45 /* Find the direction ratios of the Normal to AB _ AC */ 46 CALL CROSS, YZwg [9] ,YZwgp[10] .YZwgp [11] ,a,b,c,d,e,f 47 CALL D0TPR0D,YZwgp[6] , YZwgp [7] ,YZwgp[β] ,YZwgp[9] ,YZwgp[10] ,YZwgp(ll] ,YZwgp[12] 48 YZwgp [12] -0-YZwgp [12] 49 SO :exιt 51 EXIT

CENTER.CDP Monday, March 28, 1994 9 21 am P

1 rem CENTER.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5

6 :top

7 n-20

8 MenuLev-MenuLev+1

9 sprint SMenuStr, "Select Center Option (Vd) " .LastPick [ii]

10 getmenu SMenuStr, \

11 "2 Pos",\

12 "3 Pos", \

13 " - ",\

14 " - ",\

15 " - ",\

16 " - ",\

17 " - ",\ IB " - ",\

19 "3DR Help",MenuLev,LastPic [n]

20 switch (βkey)

21 {

22 case -3 --2

23 goto exit

24 case 1

25 LastPick [ii] -1

26 :G2P0S

27 iii-16

2β MenuLev-MenuLev+l

29 sprint SmenuStr, "Select 2 Position Selection Method (Vd) ".LastPick [m]

30 getmenu SmenuStr,\

31 "Probe", \

32 "Mouse", \

33 " - ",\

34 " - ". \

35 " - ". \

36 " - ",\

37 •' - ",\

38 " - ",\

39 "3DR HELP" .MenuLev,LastPick[in] 40 switch (βkey)

41 {

42 caεe -3: -2

45 MenuLev-MenuLev-1

50 MenuLev-MenuLev-2

51 goto top

52 }

53 case 1

54 LastPick[m] -1

55 G2Pmode-l

56 dosub get2pos cdp

57 if (G2Pcount!-2)

58 {

59 pause "2 Unique Locations Required You entered Vd",G2Pcount

60 MenuLev-MenuLev-1

61 auto -1

62 redraw -1

63 goto G2POS

64 }

65 break

66 case 2

67 LastPick [ill] -2 66 G2Pmode-2

69 dosub get∑pos.cdp

70 if (G2Pcount!-2)

71 {

72 pause "2 Unique Locations Required You entered Vd",G2Pcount

73 MenuLev-MenuLev-1

CENTER.CDP Monday, March 28, 1994 9.21 am Page

CIRCLE CDP Monday, March 28, 1994 9 21 am p age

1 rem CIRCLE CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF

5 rem Creates Circle, Arc, Or Finds Center Using 3 Points From Probe or Mouse 6

7 ♦define pi 3 1415926536

8 DOUBLE ang, rad, PBK3], PB2[3], center[3], relxl, relx3, relyl, rely3

9 DOUBLE angl, ang2, ml, m2, m4, m5, bl, b2, b , b5, VMt[ll] 10

11 ang-360

12 rad-1

13 ARRAY PB1 [31

14 ARRAY PB2 [3 ]

15 ARRAY center [3 ]

16 ARRAY VMt lll] 17

18 : start

19 n-16

20 G3Pmode-0

21 MenuLev-MenuLev* 1

22 sprint SmenuStr, "Select 3 Position Selection Method (Vd) ",LastPick[ii]

23 getmenu SmenuStr,\

24 "Probe",\

25 "Mouse",\

26 " - ",\

27 » - ",\

28 " - ",\

29 " - ",\

30 " - ",\

31 " - ",\

32 "3DR HELP",MenuLev,LastPick[n]

33 switch (βkey)

34 {

35 case -3 -2 3B goto exit

39 case 1

40 LastPic [ιι)-l

41 G3Pmode-l

42 dosub get3pos cdp

43 if (G3Pcount'«3)

44 {

45 if (Nodes — -1)

46 pause "Points are Collinear'"

47 else

48 pause "3 Unique Locations Required You entered Vd",G3Pcount

49 MenuLev-MenuLev-1

50 auto -1

51 redraw -l

52 goto start

5 }

54 break

55 case 2

56 LastPick[nl-2

57 G3Pmode-2

SB dosub get3pos cdp

59 if (G3Pcount'-3)

60 {

61 if (Nodes -- -1)

62 pause "Points are Collinear 1 "

63 else

64 pause "3 Unique Locations Required You entered Vd",G3Pcount

65 MenuLev-MenuLev-1

66 auto -1

67 redraw -l

68 goto start

69 }

70 break

71 case 3 8

72 LastPick[n]-9

73 Menu-15

CIRCLE.CDP Monday, March 28, 1994 9 21 am Page

74 dosub 3drhelp.cdp

75 MenuLev-MenuLev-1

76 goto start

77 break

78 case 9

79 LastPic [ii]-9

80 Menu-lS

81 dosub 3drhelp cdp

82 MenuLev-MenuLev-1

83 goto start

84 break

85 default

86 LastPick[n]-9

87 Menu-15

86 dosub 3drhelp.cdp

89 MenuLev-MenuLev-1

90 goto start

91 break

92 } 93

94 if (ToolMode—6)

95 {

96 for (ι-0; ι<3 l-i+l)

97 {

98 on Pplane goto jump_p2p, XYp2p, XZp2p, YZp2p, jurπp_p2p 99

100 :XYp2p

101 Pnt2PlnD- ( ( (XYwgp [9] + G3POS [i] [0] ) + (XYwgp [10] *G3Pos [l] [1] ) + (XYwgp [11] "G3Pos [i] [2] ) + XYwgp [121 ) Λ

102 sqrtl (XYwgp [ 9] * 2) + (XYwgp [10] * 2) + (XYwgp [11] * 2) ))

103 G3Pos[ι] [0]-G3Pos[ι] [0] + (-Pnt2PlnD*XYwgp [9] )

104 G3Pos[ι] [l]-G3Pos[ι] [1] + (-Pnt2PlnD*XYwgp [10] )

105 G3Pos[ι] [2]-G3Pos[ι] [2] + ( - Pnt2 PlnD*XYwgp [11] )

106 goto ump_p2p 107

108 :XZp2p

109 Pnt2PlnD-(( (XZwgp [9] *G3Pos [i] [0] ) + (XZwgp [10] « G3Pos [l] [1] ) + (XZwgp [11] *G3Pos [l] [2] )+XZwgp[12] ) /\

110 sqrtl (XZwgp [9] * 2) + (XZwgp [10] * 2) + (XZwgp [11] * 2) ) )

111 G3Pos[ι] [0]-G3Pos[l] [0] + (-Pnt2PlnD»XZwgp [9] )

112 G3Pos [ιl [1] -G3Pos [l] [1] + (-Pnt2PlnD*XZwgp [101 )

113 G3Pos[ι] [2]-G3Pos[ι] [2] + (-Pnt2PlnD*XZwgp [11] )

114 goto jump_p2p 115

116 :YZp2p

117 Pnt2PlnD- ( ( (YZwgp [9] + G3POS [l] [0) ) + (YZwgp [10] *G3Pos [i] [1] ) + (YZwgp [11] *G3Pos [l] [2] ) +YZwgp [12] ) / \

118 sqrt ( (YZwgp [9] * 2) + (YZwgp [10] 2) + (YZwgp [11] * 2) ) )

119 G3Pos[ι] [0]-G3Pos[ι] [0] + (-Pnt2PlnD"YZwgp[9] )

120 G3Pos[ι] [l]-G3Pos[ι] [1] + (-Pnt2PlnD*YZwgp [10] )

121 G3Pos[ι] [2]-G3Pos[ι] [21 + (-Pnt2PlnD*YZwgp [11] )

127 Vxl-G3Pos[0] [0]

128 Vyl-G3Pos[0] [1]

129 Vzl-G3Pos[0] [2]

130 Vx2-G3Pos[l] [0]

131 Vy2-G3Pos[l] [1]

132 Vz2-G3Pos[l] [2]

133 Vx3-G3Pos[2] [0]

134 Vy3-G3Pos[2] [1]

135 Vz3-G3Pos[2] [2] 135 goto MakeView 137

138 .-MakeView

139 dosub 3DR2CK.CDP

140 if (ViewErr)

141 {

142 MenuLev-MenuLev-1

143 goto start

144 }

145 VMt[0] -Vmatrix[0]

146 VMt[l]-Vmatrix[1]

CIRCLE. CDP Monday, March 28, 1994 9 21 am Page

147 VMt [2] -Vmatrix [2]

14B VM [3] -Vmatrix [3]

149 VMt [4] -Vmatrix [4]

150 VMt [5] -Vmatrix [5]

151 VMt [6] -Vmatrix [6]

152 VMt [7] -Vmatrix [7]

153 VMt [8] -Vmatri [8] 154

155 REM Define the view

156 View 99, VMt [0] ,VMt[l] ,VMt[2] ,VMt[3] ,VMt[4] ,VMt[5] ,VMt[6] ,VMt[7] ,VMt[8]

157 CALL cdlv2sysv,99,VMt[9]

158 View VMt [9], VMt [0] ,VMt[l] ,VMt[2] ,VMt[3] ,VMt[4] ,VMt[5] ,VMt[6] ,VMt[7] ,VMt[8]

159 rem Set VIEW, VM [9] ,0 160

161 /* transform 3 points to new view coordinates */

162 call xfmwv, VMt, G3Pos[0] [0], G3Pos[0] [l], G3Pos[0) [2], G3Pos[0] [0], G3Pos[0] [l], G3Pos[0] [2]

163 call xfmwv, VMt, G3Pos[l] [0] , G3Pos[l] [l], G3Pos[l] [2] , G3Pos[l] [0], G3Pos[l] [l] , G3Pos[l] [2]

164 call xfmwv, VMt, G3Pos[2] [0], G3Pos[2] [l], G3Pos[2] [2], G3Pos[2] [0] , G3Pos[2] [l], G3Pos[2] [2] 165

166 /* define slopes of lines G3Pos [0] ->G3Pos [1] , G3Pos [11 ->G3Pos [2] , check for divide by zero'' */

167 /• add a later check for coincident positions must be 3 unique pts •/

168 ml - (G3Pos[l] [l]-G3Pos[0] [1] ) / (G3POS [1] [0] -G3POS [0] [0] )

169 m2 - (G3Pos[2] [1] -G3POS [1] [1] ) / (G3Pos [2] [0] -G3Pos [1] [0] ) 170

171 /* construct perpendicular bisectors of the two lines with slopes ml, m2 •/

172 PB1 [0] - (G3Pos [0] [0] +G3POS [1] [0] ) /2

173 PBl[l]-G3Pos[0] [1]

174 PB2 [0] - (G3POS [1] [0] +G3POS [2] [0] ) /2

175 PB2 [1] - (G3POS [1] [1] +G3POS [2] [11 ) /2

176 /* PBl[l]-(G3Pos[0] [1] +G3POS [1] [1] ) /2 */

177 /* By definition of view Y constant G3Pos [0] ->G3Pos [1] */

178 /* m4--l/ml is a divide by zero, since ml shows the directio of XV */

179 m5--l/m2

180 /* b4 - PB1 [1] -m4*PBl[0] can't be used since slope will be infinite •/

181 b5 - PB2[l]-m5*PB2[0] 182

183 /* intersection of the two perpendicular bisectors is the arc center •/

184 /* first bisector must be vertical line in new view */

185 /• center[0] - (b5-b4-) / (m4-m5) remove due to divide by zero problems */

186 center[0] - PB1 [0]

187 center[1] - m5*center[0] + b5

188 /• Z is unchanged for all pts */

189 center[2] - G3Pos[0] [2] 190

191 /* now have center position, can calculate radius and relative positions */

192 rad - sqrt (( (G3Pos [0] [0] -center[0] ) ~2>+ ( (G3Pos[0] [1] -center[1] ) * 2) )

193 relxl - G3Pos [0] [0] -center[01

194 relyl - G3Pos [0] [1] -center[1]

195 relx3 - G3Pos [2] [0] -center[0]

196 rely3 - G3Pos [2] [1] -center[1] 197

198 /* calculate angles for arc in arc view coordinates */

199 if (relyl--0)

200 {

201 if (relxl>0)

202 angl-0

203 else

204 angl-180

205 goto angle2

206 }

207 if (relyl > 0)

20B angl - acos (relxl/rad)

209 else

210 angl - 360 - acos(relxl/rad) 211

212 :angle2

213 if lrely3—0)

214 {

215 if (relx3>0)

216 ang2-0

217 else

218 ang2-lB0

219 goto doit

CIRCLE.CDP Monday, March 28, 1994 9.21 am Page

220 } 221 if (rely3 > 0) 222 ang2 - acos (relx3/rad) 223 else 224 ang2 - 360 - acos (relx3/rad) 225 226 :doit 227 if (Center) 22β vpoint centerto], centerfl], center[2], VMt[9], βcolor 229 if (Circle) 230 circle center[0], center[1], center[2], rad, VMt [9], βcolor 231 if (Arc) 232 arc center[0], centerll], center[2], rad, angl, ang2, VMt[9], βcolor 233 auto -1 234 redraw -l 237 :exιt 238 MenuLev-MenuLev-1 239 clear ang, rad, PBl, PB2, center, relxl, relx3, relyl, rely3

240 clear angl, ang2, ml, m2, m4, m5, bl, b2, b4, b5, VMt

241 EXIT

CONTROL.CDP Monday, March 28, 1994 9:21 am Page

1 rem CONTROL.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with- Faro Metrecom/CADKEY/FastSURF 5

6 SLIST SSGPstr [0] [0] , SSBeep [0] [0] , SSFndrstr [0] [0]

7 LastLev-βlevel

8 SSGPεtr [0] -"GP-Hide"

9 SSGPstr [11 -"GP-Show"

10 SSBeep [0] -"Beep-Off "

11 SSBeep [1 ] -"Beep-On"

12 SSFndrstr [0] -"Fndr-Off "

13 SSFndrεtr [1] -"Fndr-On" 14

15 : top

16 ιι-5

17 MenuLev-MenuLev* 1

18 sprint SMenuStr, "Select Control Function (Vd) " , LaεtPιck [ιι]

19 getmenu SMenuStr, \

20 SSGPstr [GridPlns ] , \

21 SSModeX [ModeNum] , \

22 SSBeep [Beep] , \

23 SSFndrstr [Finder] , \

24 "AutoPace" , \

25 "MaxNodes" , \

26 "SetGrid" , \

27 " -more- " , .

28 "3DR Help",MenuLev,LastPick [ii]

29 switch (βkey)

30 {

31 case -3 --2

34 LastPick [n]-l

35 GridPlns - (1 ♦ GridPlns)

36 dosub bldplane.cdp

37 break

38 case 2

39 LastPick [ii] -2

40 ModeNum-ModeNum+1

41 if (ModeNum > 6)

42 ModeNum-0

43 break

44 case 3

45 LastPick [n] -3

46 Beep - (1 ♦ Beep)

47 if (Beep — On)

48 print "\007" 49 break

50 case 4

51 LastPick[n] -4

52 Finder - (1 ♦ Finder)

53 break

54 case 5

55 LastPick [ii] -5

56 getflt "Enter new time delay in seconds (V.2 ) : ".Delay,Delay

57 break

58 case 6

59 LastPick [ii] -6

60 getmt "Enter new MaxNodes (Vd) : ".MaxNodes,MaxNodes

61 break

62 case 7

63 LastPick [n] -7

64 dosub plnmenu.cdp

65 break

66 case 8

67 LastPickIn) -8

68 dosub control2.cdp 69 break

70 case 9

71 LastPick[ii] -9

72 Menu-6

73 dosub 3drhelp.cdp

Monday, March 28, 1994 9.21 am Page

CONTROL2.CDP Monday, March 28, 1994 9 21 am Page rem CONTROL2 CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FastSURF

SLIST SSPntstrtO] [0] , SSPntHS [0] [0]

LastLev-βlevel

SSPntstr [0] -"Pnts-Of "

9 SSPntstr[l]-"Pnts-On" 10 SSPntHS [0] -"PntsHide" 11 SSPntHS [l]-"PntsShow" 12 SSFndPntr [0] -"Pntr-Of f " 13 SSFndPntr [1] -"Pntr-On" 14 15 :top 16 ιι-6 17 MenuLev-MenuLev*1 18 εprint SMenuStr, "Select Control Function (Vd) ",LastPick [ii] 19 getmenu SMenuStr, \ 20 SSPntstr[Points] , \ 21 SSPntHS [PointsHS] , \ 22 "PntLevel", \ 23 "EiCscale", \ 24 SSFndPntr[FndrPntr] ,\ 25 "GPmarker", \ 26 " - ",\ 27 " - ",\ 28 "3DR Help",MenuLev, astPick [n] 29 switch (βkey) 30 31 -3 -2 34 LastPick[ii]-1 35 Points - (1 ♦ Points! 36 if (Points) 37 { 38 PointsHS-Show 39 dosub disppnts cdp 40 } 41 else 42 { 43 PointsHS-Hide 44 dosub disppnts cdp 45 } 46 break 47 case 2 48 LastPick [ii] -2 49 PointsHS = (1 ♦ PointsHS) 50 dosub disppnts cdp 51 break 52 case 3 53 LastPick [ii] -3 54 getint "Enter Point Displacement Level (Current Level Vd! ', PntsLev,PntsLev 55 break 56 case 4 57 LastPick [ii] -4 58 getflt "Enter Edge i Corner Scale (V.2f) ",ECscale,ECscale 59 break 60 case 5 61 LastPick [n] -5 62 FndrPntr - (1 # FndrPntr) 63 break 64 case 6 65 LastPick [ii] -6 66 rem Display GPmarker Entity 67 GPmkSgrp-GPmkSgrp+1 68 point XYwgp [0] , XYwgp [1] , XYwg [2] .Green, , llβ.GPmkSgrp 69 line XYwgp [0] .XYwgp [1] .XYwgp [2] , XYwgp [3] .XYwgp [4] , XYwgp [5] .Red, , 1, 118.GPmkSgrp 70 line XYwgp[0] ,XYwgp[l] , XYwgp [2] ,XYwgp[6] ,XYwgp[7] ,XYwgp[8] ,Blue, , 1, 116.GPmkSgrp 71 line XYwgp[0] ,XYwgp[l] , Ywgp [2] ,XZwgp[6] , XZwgp [7] ,XZwgp[8] .Green, , 1, 118.GPmkSgrp 72 line XYwgp[3] ,XYwgp[4] ,XYwgp[5] ,XYwgp[6] ,XYwgp[7] ,XYwgp[8] .Gray, , 2, 118.GPmkSgrp 73 line XYwgp[3] ,XYwgp[4) .XYwgp [5] ,XZwgp[6] , XZwgp [7] ,XZwgp[8] .Gray, , 2 , 118 , GPmkSgrp

am Page

,2, 118, GPmkSgrp

CORNER.CDP Monday, March 28, 1994 9.21 am Page

1 rem CORNER.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5 6 DOUBLE a,b,c,d,e,f,xl,yl,zl,x2,y2,z2,x3,y3,z3 7 DOUBLE Plnl[13] ,Pln2[13] ,Pln3[13] ,Plιne[2] [3] , Edge [15] .Corner [15] 8 ARRAY Plnl [13] -{0,0, 0,0, 0,0, 0,0, 0,0, 0,0,0} 9 ARRAY Pln2[13]-{0,0,0,0,0,0,0, ,0,0,0,0,0,0} 10 ARRAY Pln3[131-{0,0,0,0,0,0,0, 0, 0,0,0,0,0} 11 ARRAY Edge[15]-{0,0,0,0,0,0,0,,0,0,0,0,0,0,0,0} 12 ARRAY Corner[15)-{0,0,0, 0,0,0, 0,0,0,0,0,0,0,0,0} 13 14 prompt "Define Surface 1" 15 wait 1 16 G3Pmode-l 17 dosub get3pos.cdp 18 if (G3Pcount!-3) 19 { 20 if (Nodes -- -1) 21 pause "Points are Collinear!" 22 else 23 pause "3 Unique Locations Required, You entered Vd",G3Pcount 24 auto -1 25 redraw -l

31 G3Pos[0] [0]-G3Pos[l] [0] 32 G3Pos[0] [l]-G3Pos[l] [1] 33 G3Pos[0] [2]-G3Pos[l] [2] 34 G3Pos[l] [0]-xl 35 G3Pos[l] [l]-yl 36 G3Pos[l] [2]-zl 37 dosub smthg3p.cdp 38 Plnl[0]-G3Pos[0] [0] 39 Plnl[l]-G3Pos[0] [1] 40 Plnl[2]-G3Pos[0] [2] 41 Plnl[3]-G3Pos[l] [0] 42 Plnl[4]-G3Pos[l) [1] 43 Plnl[5]-G3Pos[ll [2] 44 Plnl[6]-G3Pos[2] [0] 45 Plnl[7]-G3Pos[2] [1] 46 Plnl[81-G3Pos[2] [2] 47 /• Calculate The Equation of the First Plane */ 4B /* Find the direction ratios of line AB */ 49 a-Plnl[3]-Plnl[0] 50 b-Plnl[4]-Plnl[l] 51 c-Plnl[5]-Plnl[2] 52 /* F nd the direction ratios of line AC */ 53 d-Plnl[6]-Plnl[0] 54 e-Plnl[7]-Plnltl] 55 f-Plnl[8)-Plnl[2] 56 /* Find the direction ratios of the Normal to AB i AC •/ 57 CALL CROSS, Plnl[9] ,Plnl[10] ,Plnl[ll] ,a,b,c,d,e,f 58 CALL DOTPROD,Plnl[6] , Plnl [7] , Plnl [8] , Plnl [9] , Plnl [101 , Plnl [11] , Plnl [12] 59 Plnl[12]-0-Plnl[12) 60 61 rem line Plnl [0] , Plnl [11 , Plnl [2] , Plnl [3] , Plnl [4] , Plnl [5] ,Red, ,2 62 rem line Plnl [0] , Plnl [1] , Plnl [2] , Plnl [6] , Plnl [7] , Plnl [8] ,Red, ,2 63 rem line Plnl [3] , Plnl [4] , Plnl [5] , Plnl [6] , Plnl [7] , Plnl [8] ,Red, ,2 64 65 prompt "Define Surface 2" 66 wait 1 67 G3Pmode-l 68 dosub get3pos.cdp 69 if (G3Pcount !-3) 70 { 71 f (Nodes -- -1) 72 pause "Points are Collinear!" 73 else

CORNER.CDP Monday, March 28, 1994 9:21 am Page

74 pause "3 Unique Locations Required. You entered Vd",G3Pcount

75 auto -1 76 redraw -1

82 x2-G3Pos[l] [0]

83 y2-G3Pos [1] [1]

84 z2-G3Pos[ll [2]

85 x3-G3Poε[21 [0]

86 y3-G3Pos[2] [1]

87 z3-G3Pos[2] [2]

88 G3Pos[0] [0]-x2

89 G3Pos[0] [l]-y2

90 G3Pos[0] [2]-z2

91 G3Pos[l] [0]-x3

92 G3Postl] [l]-y3

93 G3Pos[l] [2]-z3

94 G3Pos[2] [OJ-xl

95 G3Pos[2] [l]-yl

96 G3Poε[2] [21-21

97 doεub εmthg3p.cdp

98 Pln2[0]-G3Pos[0] [0]

99 Pln2[l]-G3Pos[0] [1]

100 Pln2[2]-G3Pos[0] [2]

101 Pln2[3]-G3Pos[l] [0]

102 Pln2[4]-G3Pos[l] [1]

103 P_n2[S]-G3Postl] [2]

104 Pln2[6]-G3Pos[2] [0]

105 Pln2f7]-G3Pos[2] [1]

106 Pln2[8]-G3Poε[2] [2]

107 /* Calculate The Equation of the Second Plane */

108 /* Find the direction ratios of line AB */

109 a-Pln2[3]-Pln2[0]

110 b-Pln2[4]-Pln2[l]

111 c-Pln2[S]-Pln2[2]

112 /* Find the direction ratios of line AC */

113 d-Pln2[6] -Pln2[0]

114 e-Pln2[7)-Pln2[l]

US f-Pln2[8] -Pln2[2]

116 /* Find the direction ratios of the Normal to AB i AC */

117 CALL CROSS, Pln2[9] ,Pln2[10] ,Pln2tll] ,a,b,c,d,e,f

118 CALL DOTPROD.Pln2[6] ,Pln2[7] ,Pln2[β] ,Pln2[9] ,Pln2[10] ,Pln2[ll] ,Pln2[121

119 Pln2[12]-0-Pln2[12]

120

121 rem line Pln2 to] , Pln2 tl] , Pln2 [2] Pln2[3] ,Pln2[4] ,Pln2[51.Green, ,2

122 rem line Pln2 [0] . Pln2 [1] , Pln2 [2] Pln2[6] ,Pln2[7] ,Pln2[8] .Green, ,2

123 rem line Pln2 [3] ,Pln2 [4] , Pln2 [5] Pln2[6] ,Pln2[7] ,Pln2[β) .Green, ,2

124

125 prompt "Define Surface 3"

126 wait 1

127 G3Pmode-l

128 dosub get pos.cdp

129 if (G3Pcount!-3)

130 {

131 if (Nodes -- -1)

132 pause "Points are Collinear!"

133 else

134 pause "3 Unique Locations Required. You entered Vd",G3Pcount

135 auto -1

136 redraw -1

139 dosub smthg3p.cdp

140 Pln3[0]-G3Pos[0] [0]

141 Pln3[l]-G3Pos[0) [1]

142 Pln3[2]-G3Pos[0] [2]

143 Pln3[3]-G3Pos[l] [0]

144 Pln3[4]-G3Pos[l] [1]

145 Pln3[5]-G3Pos[l) [2]

146 Pln3[6]-G3Pos[2] [0]

CORNER.CDP Monday, March 28, 1994 9 21 am Page

147 Pln3t7]-G3Pos[2] [1]

148 Pln3[8]-G3Pos[2] [2]

149 /* Calculate The Equation of the Third Plane */

150 /* Find the direction ratios of line AB */

151 a-Pln3[3]-Pln3[0)

152 _-Pln3[4]-Pln3[l]

153 c-Pln3[5)-Pln3[2]

154 /* Find the direction ratios of line AC •/

155 d-Pln3[6]-Pln3[0]

158 /* Find the direction ratios of the Normal to AB i AC •/

159 CALL CROSS,Pln3[9] ,Pln3[10] ,Pln3[ll] ,a,b,c,d,e,f

160 CALL DOTPROD,Pln3[6] ,Pln3[7] ,Pln3[8] ,Pln3[9] ,Pln3[10] ,Pln3[ll] ,Pln3[12]

161 Pln3[12]-0-Pln3[12] 162

163 rem line Pln3 [0] , Pln3 [1] ,Pln3 [2] ,Pln3 [3] , Pln3 [4] ,Pln3 [5] .Green, ,2

164 rem line Pln3 [0] , Pln3 [1] ,Pln3 [2] ,Pln3 [6] ,Pln3 [7] , Pln3 [β] , Green, ,2

165 rem line Pln3 [3] ,Pln3 [4] ,Pln3 [5] ,Pln3 [6] ,Pln3 [7] ,Pln3 [8] .Green, .2 166

167 rem Calculate Point Intersection of Line CA to 2nd Plane

168 rem Project Points 3 i 1 of Plane 1 to 2nd Plane to form projection Line

169 Pnt2PlnD- ( ( (Pln2 [9] "Plnl [0] ) ♦ (Pln2 [10] "Plnl [1] ) + (Pln2 [11] -Plnl [2] ) +Pln2 [12] ) / \

170 sqrt ( (Pln2 [9] * 2) + (Pln2 [10] * 2) + (Pln2 [11] * 2) ) )

171 Pline [0] [0] -Plnl [0] ♦ (-Pnt2PlnD*Pln2 [9] )

172 Plιne[0] [1] -Plnl [1] + (-Pnt2PlnD*Pln2 [10] )

173 PlmelO] [2] -Plnl [2] + (-Pnt2PlnD*Pln2 [11] )

174 Pnt2PlnD- ( ( (Pln2 [9] "Plnl [6] ) + (Pln2 [10] *Plnl [7] ) ♦ (Pln2 [11] *Plnl [8] ) +Pln2 [12] ) / \

175 sqrt ( (Pln2 [9] * 2) + (Pln2 [10] * 2) ♦ (Pln2 [11] * 2) ) )

176 Plmelll [01-Plnl [6] + (-Pnt2PlnD*Pln2 [9] )

177 Plιne[l] [1] -Plnl [7] + (-Pnt2PlnD*Pln2 [10] ) 17B Pline [1] [2] -Plnl [8] + (-Pnt2P_nD«Pln2 [11] )

179 rem Calculate Angle Between the two lines

180 distCAl-sqrt ( (Plnl [0] -Plnl [6] ) * 2+\

181 (Plnl[l]-Plnl[7]) * 2+\

182 (Plnl [2] -Plnl [8) 1 * 2)

183 PlineAB-sqrt ( (Pline [0] [0] -Pline [1] [0] ) * 2+\

184 (Pline [0] [1] -Pline [1] [1] ) * 2+\

185 (Pline [0] [2] -Pline [1] [2] ) ~2>

186 a- ( (Plnl [0] -Plnl [6] ) /distCAD

187 b- ( (Plnl [1] -Plnl [7] ) /distCAD

188 c- ((Plnl [2] -Plnl [8] ) /distCAD

189 d- ( (Pline [0] [0] -Pline [1] [0] ) /PlineAB)

190 e- ( (Pline [0] [1] -Pline [1] [1] ) /PlineAB)

191 f- ( (Pline [0] [2] -Pline [1] [2] ) /PlineAB)

192 LxLangle-acos ( (a*d) + (b*e) ♦ (c*f ) )

193 rem Calculate Length of Plane Is intercept to Plane 2 from Plane Is A

194 a- (Pline [0] [0] -Plnl [0] )

195 b- (Pline [0] [1) -Plnl [1] )

196 c- (Pline [0] [2] -Plnl [2] )

197 L2PXdιst- (sqrt (a * 2+b"2+c~2) /sin (LxLangle) )

198 xl-Plnl [0] + ( ( (Plnl [0] -Plnl [6] ) /distCAD *L2PXdιst)

199 yl-Plnl [1] * ( ( (Plnl [1] -Plnl [7] ) /distCAD *L2PXdιst)

200 zl-Plnl [2] * ( ( (Plnl [2] -Plnl [8] ) /distCAD *L2PXdιst)

201 rem pause "LxLangle - Vf L2PXdιst -Vf", xLangle, L2PXdιst 202

203 rem Calculate Point Intersection of Line CB to 1st Plane

204 rem Project Points 3 i 2 of Plane 1 to 1st Plane to form projection Line

205 Pnt2PlnD-( ( (Plnl [9] *Pln2 [3] ) * (Plnl [10] *Pln2 [4] ) * (Plnl [11] *Pln2 [5] )+Plnl[12] ) Λ

206 sqrtf (Plnl [9] ~2) + (Plnl [10] * 2) + (Plnl [11] * 2) ) )

207 Pline [0] [0] -Pln2 [3] * (-Pnt2PlnD*Plnl [9] )

208 Pline [0] [1] -Pln2 [4] * (-Pnt2PlnD"Plnl [10] )

209 Pline [0] [2] -Pln2 [5] + (-Pnt2PlnD*Plnl [11] )

210 Pnt2PlnD- ( ( (Plnl [9] *Pln2 [6] ) ♦ (Plnl [10] *Pln2 [7] ) + (Plnl [11] "Pln2 [8] ) +Plnl [12] ) / \

211 sqrtf (Plnl [9] * 2) ♦ (Plnl [10] * 2) ♦ (Plnl [llj * 2) ) )

212 Pline [1] [0] -Pln2 [6] + ( -Pnt2PlnD*Plnl [9] )

213 Pline [1] [1] -Pln2 [7] + (-Pnt2PlnD*Plnl [10] )

214 Pline [1112] -Pln2 [8] + I -Pnt2PlnD*Plnl [111 )

215 rem Calculate Angle Between the two lines

216 distCBl-sqrt ( (Pln2 [3] -Pln2 [6] ) * 2+\

217 (Pln2t4]-Pln2[7]) * 2 + \

218 (Pln2[51-Pln2tθ]) * 2)

219 PlineAB-sqrt ( (Pline [0] [0] -Pline [1] [0] ) * 2+ \

CORNER. CDP Monday, March 28, 1994 9 21 am Pag

220 (Pline [0] [1] -Pline [1] [1] ) * 2+\

221 (Plme[0) [21 -Pline [1] [211 * 2)

222 a-((Pln2[3]-Pln2[6] ) /distCBD

223 b-((Pln2[4]-Pln2[7])/dιstCBD

224 c-((Pln2[5]-Pln2[8])/dιstCBD

225 d- ( (Pline [0] [0] -Pline [1] [0] ) /PlineAB)

226 e- ( (Pline [0] [1] -Pline [1] tl] ) /PlineAB)

227 f- ( (Pline [0] [2] -Pline [1] [2] ) /PlineAB)

228 LxLangle-acos ( (a*d) + (b*e) + (c*f ) )

229 rem Calculate Length of Plane 2s intercept to Plane 1 from Plane Is B

230 a- (Pline [0] [0]-Pln2[3] )

231 b- (Pline [0] [1]-Pln2[4])

232 c- (Pline [0] [2]-Pln2[5] )

233 L2PXdιst- (sqr (a~2+b * 2+c * 2) /sin (LxLangle) )

234 x2-Pln2[3] + (( (Pln2 [3] -Pln2 [6] ) /distCBD *L2PXdιst)

235 y2-Pln2 [4] + ( ( (Pln2 [4] -Pln2 [7] ) /distCBD *L2PXdιst)

236 z2-Pln2 [5] + ( ( (Pln2 [5] -Pln2 [8] ) /distCBD *L2PXdιst)

237 rem pause "LxLangle - Vf L2PXdιst -Vf" .LxLangle, L2PXdιst 238

239 rem point xl.yl.zl, White

240 rem point x2,y2, z2, White

241 rem line xl.yl, Zl,x2,y2,z2, White, ,2

242 rem line Plnl [0] , Plnl [1] , Plnl [2] , xl.yl.zl, White, ,2

243 rem line Pln2 [3] , Pln2 [4] , Pln2 t5] ,x2,y2, z2, White, ,2 244

245 rem Build First Half of Edge

246 G3Pos[0] [01-xl

250 G3PostD [11 -y2

251 G3Pos[l) [2]-z2

252 G3Pos[2] [0] -Plnl [6]

253 G3Pos[2] [1] -Plnl [7]

254 G3POS [2] [2] -Plnl [8]

255 dosub smthg3p.cdp

256 Edge[0]-G3Poε[0] [0]

257 Edge(l]-G3Pos[0] [1]

258 Edge[2J-G3Pos[0] [2]

259 Edge [3] -G3Pos [0] [0] + (G3Pos [1] [0] -G3Poε [0] [0] )

260 Edge[4)-G3Poε[0] [1] + 1G3POS [1] [l]-G3Pos[0] [1] )

261 Edge [5] -G3Pos [0) [2] * (G3Pos [1] [2] -G3Pos [0] [2] )

262 Edge [6J -G3Pos [0] [0] + (G3Pos [2] [0] -G3Pos [0] [0] )

263 Edge [7] -G3Pos [0] [1] + (G3Pos [2] [1] -G3Pos [0] [1] )

264 Edge [8] -G3Pos [0] [2] + (G3Pos [2] [2] -G3Pos [0] [2] ) 265

266 rem Build Second Half of Edge

267 G3Pos[2] [0]-Pln2[6]

268 G3Pos[2] [1]-Pln2[7]

269 G3Pos[2] [2]-Pln2[β]

270 dosub smthg3p.cdp

271 Edge [9]- Edge [0] + (G3Pos [2] [0] -G3Pos [0] [0] )

272 Edge [10] -Edge [1] ♦ (G3Pos [2] [1] -G3Pos to] [1] )

273 Edge[ll]-Edge[2] + (G3Pos[2] [2]-G3Pos[0] [21)

274 Edge [12] -G3Pos [0] [0] ♦ (G3Pos [0] [0] -G3Pos [1] [0] )

275 Edge [13] -G3Pos [0] [1] ♦ (G3Pos [0] [1] -G3Pos [1] [1] )

276 Edge [14] -G3P08 [0] [2] + (G3POS [0] [2] -G3Pos [1] [2] ) 277

278 rem Build Corner from Edge and the Third Plane

279 rem Calculate Point Intersection of Edge Line to 3rd Plane

280 rem Project Points 2 i 1 of Edge to 3rd Plane to form projection Line

281 Pnt2PlnD- ( ( (Pln3 [9] "Edge [0] ) + (Pln3 [10] "Edge [1] ) + (Pln3 [11] "Edge [2] ) +Pln3 [12] ) / \

282 sqrt ( (Pln3 [9] * 2> + (Pln3 [10] "2) + (Pln3 [11] "2) ) )

283 Pline [0] [0] -Edge [0] ♦ <-Pnt2PlnD*Pln3 [9] ) 264 Pline [0] [1] -Edge [1] + (-Pnt2PlnD*Pln3 [10] ) 285 Pline [0] [2] -Edge [2] + (-Pnt2PlnD*Pln3 til) )

2B6 Pnt2PlnD- ( ( (Pln3 [9] "Edge [3] ) + (Pln3 [10] "Edge [4] ) + (Pln3 [11] "Edge [5] ) +Pln3 [12] ) / \

287 sqrt ( (Pln3 [9] "2) + (Pln3 [10] "2) + (Pln3 [11] * 2) ) )

288 Pline [1] [0] -Edge [3] + (-Pnt2PlnD*Pln3 [9] )

289 Pline [1] [1] -Edge [4] + (-Pnt2PlnD*Pln3 [10] )

290 Pline [1] [2] -Edge [5] + (-Pnt2PlnD*Pln3 [11] )

291 rem Calculate Angle Between the two lines

292 Vectllen-sqrt ( (Edge [0] -Edge [3] ) * 2+\

CORNER.CDP Monday, March 28, 1994 9 21 am p age

293 (Edge [l] -Edge [4] ) * 2+\

294 (Edge [2] -Edge [5] ) "2 )

295 Vect21en-sqrt ( (Pline [0] [0] -Pline [1] [0] ) * 2+\

296 (Pline [0] [1] -Pline [1] [1] ) * 2 + \

297 (Plιne [0] [2] -Plme [l] [2] ) * 2)

298 a- ( (Edge [0] -Edge [3] ) /Vectllen)

299 b- ( (Edge [1] -Edge [4] ) /Vectllen)

300 c- ( (Edge [2] -Edge [5] ) /Vectllen)

301 d- ( (Pline [0] [0] -Pline [1] [0] ) /Vect21en)

302 e- ( (Plme [0] [1] -Pline [1] [1] ) /Vect21en)

303 f- ( (Pline [0] [2] -Pline [1] [2] ) /Vect21en)

304 LxLangle-acos ( (a*d) + (b"e) + (c*f ) )

305 rem Calculate Length of Plane Is intercept to Plane 2 from Plane Is A

306 a- (Pline [0] [0] -Edge [0] )

307 b- (Pline [0] [1] -Edge [1] )

308 c- (Plme [0] [2] -Edge [2] )

309 L2PXdιst- (sqrt (a * 2+b * 2+c * 2) /εm (LxLangle) )

310 xl-Edge [0] + ( ( (Edge [0] -Edge [3] ) /Vectllen) *L2PXdιst)

311 yl-Edge [1] + ( ( (Edge [1] -Edge [4] ) /Vectllen) *L2PXdιst)

312 zl-Edge [2] + ( ( (Edge [2] -Edge [5] ) /Vectllen) *L2PXdιst )

313 rem pause "LxLangle - Vf L2PXdιst -Vf " , LxLangle, L2PXdιεt 314

315 rem Calculate Point Interεection of Hypotenuεe S de of Edge Surface 1

316 rem Project Points 2 i 1 of Edge to 3rd Plane to form projection Line

317 Pnt2PlnD- ( ( (Pln3 [9] "Edge [9] ) + (Pln3 [10] "Edge [10] ) + (Pln3 [11] "Edge [11] ) +Pln3 [12] ) / \

318 sqrt ( (Pln3 [9] "2) + (Pln3 [10] * 2) + (Pln3 [11] "2) ) )

319 Plιne [0] [0] -Edge [9] + < -Pnt2PlnD*Pln3 [91 )

320 Pline [0] [1] -Edge [10] ♦ ( -Pnt2PlnD*Pln3 [10] )

321 Pline [0] [2] -Edge [11] ♦ ( -Pnt2PlnD*Pln3 [11] )

322 Pnt2PlnD- ( ( (Pln3 [9] "Edge [3] ) + (Pln3 [10] "Edge [4 ] ) + (Pln3 [11] "Edge [5] ) +Pln3 [12] ) / \

323 sqrt ( (Pln3 [9] * 2 ) + (Pln3 [10] * 2) + (Pln3 [11] * 2) ) )

324 Pline ll] [0] -Edge [3] + ( -Pnt2PlnD*Pln3 [9] )

325 Pline tl] [1] -Edge [4] + < -Pnt2PlnD*Pln3 [10] )

326 Pline [1] [2] -Edge [5] ♦ (-Pnt2PlnD*Pln3 [11] )

327 rem Calculate Angle Between the two lines

328 Vectllen-sqrt I (Edge [9] -Edge [3] ) * 2+\

329 (Edge [10] -Edge [4] ) * 2+\

330 (Edge [11] -Edge [5] ) * 2)

331 Vect21en-sqrt ( (Pline [b] [0] -Plme [1] [0] ) * 2+\

332 (Pline [0] [1] -Pline [1] [1] ) "2+\

333 (Pl e [0] [2] -Pline tl] [21 ) "2 !

334 a- ( (Edge [9] -Edge [3] ) /Vectllen)

335 b- ( (Edge [10] -Edge [4] ) /Vectllen)

336 c- ( (Edge [11] -Edge [5] ) /Vectllen)

337 d- ( (Pline [0] [0] -Plme [1] [0] ) /Vect21en)

338 e- ( (Pline [0] [1) -Plme [1] [1] ) /Vect21en)

339 f- ( (Pline [0] [2] -Pline [1] [2] ) /Vect21en)

340 LxLangle-acos ( (a"d) + (b*e) + (c*f ) )

341 rem Calculate Length of Plane Is intercept to Plane 2 from Plane Is A

342 a- (Pline [0] [0] -Edge [9] )

343 b- (Pline [0] [1] -Edge [10] )

344 c- (Pl e [0) [2] -Edge [11] )

345 L2PXdιst- (sqrt (a * 2+b * 2+c * 2 ) /sin (LxLangle) )

346 x2-Edge [9] ♦ ( ( (Edge [9] -Edge [3] ) /Vectllen) *L2PXdιst)

347 y2-Edge [10] + ( ( (Edge [10] -Edge [4] ) /Vectllen) "L2PXdιst)

348 z2-Edge [111 + ( ( (Edge [11] -Edge [5] ) /Vectllen) *L2PXdιst )

349 rem pause "LxLangle - Vf L2PXdιst -Vf " , LxLangle, L2PXdιst 350

351 rem Calculate Point Intersection of Hypotenuse Side of Edge Surface 2

352 rem Project Points 2 i 1 of Edge to 3rd Plane to form projection Line

353 Pnt2PlnD- ( ( (Pln3 [91 "Edge [6] ) + (Pln3 [10] "Edge [7] ) + (Pln3 [11] "Edge [81 ) +Pln3 [12] ) / \

354 sqr f (Pln3 [9] * 2 ) + ( Pln3 [10] * 2 ) + (Pln3 [11] * 2 ) ) )

355 Pline [0] [0] -Edge [61 + ( -Pnt2PlnD*Pln3 [9] )

356 Pline [0] [1] -Edge [7] + ( -Pnt2PlnD*Pln3 [10] )

357 Pl e lO] [2] -Edge [8] + l -Pnt2PlnD*Pln3 [11] )

358 Pnt2PlnD- ( I (Pln3 (9] "Edge [3] ) + (Pln3 [10] "Edge [4 ] ) + (Pln3 [11] "Edge [5] ) +Pln3 [12] ) /\

359 sqr f (Pln3 [9] * 2 ) + (Pln3 [101 * 21 ♦ (Pln3 [11] * 2 ) ) )

360 Pline tl] [0] -Edge [3] + ( -Pnt2PlnD*Pln3 [9] 1

361 Pline tl] [1] -Edge [4] * ( -Pnt2PlnD*Pln3 [10] 1

362 Pline tl] [2] -Edge [5] + ( -Pnt2PlnD « Pln3 [11] 1

363 rem Calculate Angle Between the two lines

364 Vectllen-sqrt ( (Edge [6] -Edge [3] 1 * 2+\

365 (Edge [7] -Edge [4] ) * 2+\

CORNER. CDP Monday, March 28, 1994 9 21 am Page

366 (Edge [8] -Edge [5] 1 * 2)

367 Vect21en-sqrt ( (Pl e [0] [0] -Pline [1] [0] ) * 2+\

368 (Pline [0] [1] -Plme [1] [1] ) * 2+\

369 (Plme[0] [2] -Plinetl] [2]) * 2)

370 a- ( (Edge [6] -Edge [3] ) /Vectllen)

371 b-( (Edge [7] -Edge [4] (/Vectllen)

372 c- ( (Edge [8] -Edge [5] ) /Vectllen)

373 d- ( (Pline [0] [0] -Pl e [1] [0] ) /Vect21en)

374 e- ( (Pline [0] [1] -Pline [1] [1] ) /Vect21en)

375 f- ( (Plme [0] [2] -Pline [1] [2] ) /Vect21en)

376 LxLangle-acos ( (a*d) + (b"e) + (c*f ) )

377 rem Calculate Length of Plane Is intercept to Plane 2 from Plane Is A

378 a- (Plme [0] [0] -Edge [6])

379 b- (Pline [0] tl) -Edge [7])

380 c- (Pline [0] [2] -Edge [8])

381 L2PXd st-(sqrt(a * 2+b * 2+c * 2)/sιn(Lxlangle))

382 x3-Edge [6] + ( ( (Edge [6] -Edge [3] ) /Vectllen) *L2PXdιst)

383 y3-Edge [7] ♦ ( ( (Edge [7] -Edge [4] ) /Vectllen) *L2PXdιst)

384 _3-Edge [8] + ( ( (Edge [8] -Edge [5] ) /Vectllen) *L2PXdιεt)

385 rem pause "LxLangle - Vf L2PXdιεt -Vf", LxLangle, L2PXdιst

386

387 rem Build Corner Matrix

388 Corner [01-xl

389 Corner [1] -yl

390 Corner [2] -zl

391 Vectllen-sqrt ( (Edge [3] -Corner [0] ) * 2+\

392 (Edge [4] -Corner [1] ) * 2+\

393 (Edge [5] -Co er [2] ) * 2)

394 Corner [3] -Corner [0] + ( ( (Edge [31 -Corner [0J ) /Vectllen) "ECscale)

395 Corner [4] -Corner [l]+( ( (Edge [4] -Corner [1] ) /Vectllen) "ECscale)

396 Corner [51 -Corner [2] + ( ( (Edge [5] -Corner [2] ) /Vectllen) "ECscale)

397 Vectllen-sqrt ( (x2-Corner [0] ) * 2+\

398 (y2-Corner[ll) * 2+\

399 (z2-Corner[2])~2)

400 Corner [6] -Corner [0]+( ( (x2-Corner [0] ) /Vectllen) "ECscale)

401 Corner [7] -Corner [l]+( ( (y2-Corner [1] ) /Vectllen) "ECεcale)

402 Corner [81 -Comer [2] + ( ( <z2-Corner [2] ) /Vectllen) "ECscale)

403 Vectllen-sqrt ( (x3-Corner [0] ) * 2+\

404 (y3-Corner[l]) * 2+ \

405 (z3-Corner[2l ) * 2)

406 Corner [9]- Corner [0]+ ( ( (x3-Corner [0] ) /Vectllen) "ECscale)

407 Corner [10] -Corner [1] + ( ( (y3-Corner [1] ) /Vectllen) "ECscale)

408 Co er [11] -Corner [2] + ( ( (z3-Corner [2] (/Vectllen) "ECscale)

409

410 rem Display Corner Entity

411 CrnrSgrp-CrnrSgrp ♦ 1

412 point Coraer[0] .Corner [1] ,Corner[2] .Green, , 124 , CrnrSgrp

413 line Corner [0] .Corner [1] .Corner [2] .Corner [3] .Corner [4] .Corner [5] ,LRed, , 1 , 124 , CrnrSgrp

414 line Corner [0] , Corner [1] .Corner [2] .Corner [6] .Corner [7] .Corner [8] ,LRed, , 1 , 124 , CrnrSgrp

415 l ne Corner [0] .Corner [1] .Corner [2] .Corner [9] .Corner [10) .Corner [11] ,LRed, , 1 , 12 , CrnrSgrp

416 line Corner [3] .Corner [4] .Corner [5] .Corner [6] .Corner [7] .Corner [8] , LGreen, , 2 , 12 , CrnrSgrp

417 line Corner [3] .Corner [4] .Corner [5] .Corner [9] .Corner [10] .Corner [11] .LGreen, ,2, 124, CrnrSgrp

418 line Comer [6] .Corner [7] .Corner [8] .Corner [9] .Corner [10] .Corner [11] .LGreen, , 2 , 12 , CrnrSgrp

419

420 auto -1

421 redraw -l

422

423 :exιt

424 EXIT

DFLTCNFG.CDP Monday, March 28, 1994 9 21 am Page

1 rem DFLTCNFG CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 /* Configeration Defaults */

7 GπdPlns-Show

8 ModeNum-Manual

9 Align-On

10 Views-World

11 Beep-On

12 Points-Off

13 PointsHS-Hide

14 PntsLev-50

15 Finder-On

16 FndrPntr-Off

17 ECscale-1

18 Delay-0.00

19 MaxNodes-100

20 Pplane-XZplane

21 Pdιsp-0

22 Splane-XYplane

23 Sdιsp-0

24 GridTol- 030

25 GrιdSιze-6.00

26 Tsphere-.015

27 ARRAY Ongιn[3]-{0,0,0)

28 ARRAY AutoIncD[3]-{0,0,0)

29 ARRAY AutoRotW[3]-{0,0,0)

30 ARRAY AutoRotM[3]-{0,0,0)

31 ARRAY XYZrot [3] -{0,0,0}

32 ARRAY XYZmag [3] -{0,0,0}

33 ARRAY XYZmagO[3]-{0,0,0}

34 ARRAY MagOrgn[3)-{0,0,0)

35 ARRAY XYwgp[13]-{0, 0, 0, 1, 0, 1. 0, 0, 0. 1, 0}

36 ARRAY XZwgp[13]-{0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0}

37 ARRAY YZwgp[13]-{0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0}

38 /* XY Grid Plane Boundry Points

39 XYpntl [0] [0] -XYpntl [01 [1] -XYpntl ■XYpntl [3 [0] -GndSize

40 XYpntl [1] [0] -XYpntl [2] [0] -XYpntl ■XYpntl [3 [11 'GndSize

41 XYpntl [0] [2] -XYpntl [1] [2] -XYpntl ■XYpntl [3 [2] -0

42 XYpnt2[0] [0)-XYpnt2[0] [l]-XYpnt2 ■XYpnt2 [3 [0] - (GrιdSιze/3)

43 XYpnt2[l] [0] -XYpnt2 [2] [0]-XYpnt2 •XYpnt2 [3 [1] (GπdSιze/3)

44 XYpnt2 [0] [2] -XYpnt2 [1] [2] -XYpnt2 ■XYpnt2 [3 [2]

45 /* XZ Grid Plane Boundry Points

46 XZpntl [0] [0] -XZpntl [0] [2] -XZpntl ■XZpntl [3 [0] ■ -GndSize

47 XZpntl [1] [0] -XZpntl [2] [0] -XZpntl ■XZpntl [3 [2] ■GndSize

48 XZpntl [0] [1] -XZpntl [1] [1] -XZpntl ■XZpntl [3 [1] ■ 0

49 XZpnt2 [0] [0] -XZpnt2 [0] [2] -XZpnt2 ■XZpnt2 [3 [0] ■ -(GrιdSιze/3) 50 XZpnt2 [ 1 ] [0) -XZpnt2 [21 [ 0 ] -XZpnt2 •XZpnt2[3 [2] ■ (GπdSιze/3)

51 XZpnt2[0] [l]-XZpnt2[l] [l]-XZpnt2 ■XZpnt2 [3 tl] ■ 0

52 /* YZ Grid Plane Boundry Points

53 YZpntl t0] tl] -YZpntl [0] [2] -YZpntl ■YZpntl [3 [1] ■ -GndSize

54 YZpntl [1] [1] -YZpntl [2] [1] -YZpntl ■YZpntl [3 [2] ■GndSize

55 YZpntl [0] [0] -YZpntl [1] [0] -YZpntl ■YZpntl [3 [0] ■ 0

56 YZpnt2 [0] [11 -YZpnt2 [0] [2] -YZpnt2 ■YZpnt2 [3 [1] ■ -(GrιdSιze/3)

57 YZpnt2 [1] [1] -YZpnt2 [2] [11 -YZpnt2 ■YZpnt2 [3 [2] ■ (GrιdSιze/3)

58 YZpnt2 [0] [0] -YZpnt2 [1] [0] -YZpnt2 ■YZpnt2 [3 [0]

59 :exιt

60 EXIT

DISPGET.CDP Monday, March 28, 1994 9.21 am Page

1 rem DISPGET.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 local RotFlag, OrgFlag

7 clear Fcntl,Fx,Fy, Fz,Fa,Fb, Fc 8

9 if (PSplane — 1)

10 ιι-9

11 else

12 11-10

13 FιnderX-FιnderY-FιnderZ-0 14

15 :top

16 MenuLev-MenuLev*1

17 sprint SMenuStr, "Select Displacement Selection Method (Vd) ".LastPick [n]

18 getmenu SMenuStr, \

19 "Probe",\

20 "Mouse", \

21 "Key In",\

22 "Autolnc",\

23 "XYZrot",\

24 "XYZalιgn",\

25 " - ",\

26 " - ",\

27 "3DR Help",MenuLev,LastPic [n]

28 switch (βkey)

29 {

30 case -3:-2

34 break

35 case 1

36 LastPick [ii] -1

37 if (PSplane — 1)

38 prompt "Probe Select Primary Plane. . ."

39 if (PSplane — 2)_

40 prompt "Probe Select Secondary Plane. . ."

41 ♦INCLUDE waitnotl inc

42 if (Beep — On)

43 print "\007"

44 if (PSplane — 1)

45 {

46 if [Pplane -- XYplane)

47 Pdisp-Pdisp* f (XYwgp[9]*Fx)+ (XYwgp[10]*Fy)*(XYwgp[11] "Fz)+XYwgp[12] )/\

48 sqrtf (XYwgp[9] * 2) + (XYwgp[10] "2 )+ (XYwgp[11]*2) )

49 if (Pplane — XZplane)

50 Pdisp-Pdisp- ( (XZwg [9]*Fx) +(XZwgp[10]*Fy)* (XZwgp[11] "Fz) *XZwgp[12] )/\

51 sqrt ( (XZwgp[9] * 2)* (XZwgp[10] ~2)+ (XZwgp[11] ~2) )

52 if (Pplane -- YZplane)

53 Pdisp-Pdisp* ( (YZwgp [9] *Fx) + (YZwg [10] *Fy) + (YZwgp [11] *Fz) +YZwgp [12] ) Λ

54 sqrtl (YZwgp [9] * 2) ♦ (YZwgp [10] "2 ) + (YZwgp[11] * 2) )

55 dosub rmagwld2.cdp

56 }

57 if (PSplane -- 2)

58 {

59 if (Splane — XYplane)

60 Sd sp-Sdisp* ( (XYwgp[9]*Fx) + (XYwgp[10] *Fy)♦ (XYwgp[11] "Fz) +XYwgp[12] ) /\

61 sqrt( iXYwgp 19] * 2) + (XYwgp [10] * 2) + (XYwgp [11] "2 ) )

62 if (Splane -- XZplane)

63 Sdisp-Sdisp- 1 [XZwgp[9]*Fx)+ (XZwg [10] *Fy)+ (XZwgp[11] *Fz) +XZwgp[12] ) /\

64 sqrtl (XZwgp[9] * 2) +(XZwgp[10] * 2) + (XZwgp[11] "2) )

65 if (Splane — YZplane)

66 Sdisp-Sdisp * ( (YZwgp[9] *Fx)+ (YZwgp[10] "Fy! + (YZwgp[11]"Fz! +YZwgp[12] ) /\

67 sqrtl (YZwgp[9] "2! + (YZwgptlOJ * 2) + (YZwgptll] * 2! ) 68 dosub rmagwld2.cdp

69 }

70 break

71 case 2

72 LastPick[ill-2

73 getpos "Indicate Position. . .",2

DISPGET.CDP Monday, March 28, 1994 9 21 am Page

+XYZ[1] +XYZ[2] )

79 if (PSplane — 1)

80 {

81 OrgFlag- (Origin[0] +0πgm[1] +Orιgιn[2] +Pdιsp)

82 if (Pplane — XYplane)

83 {

B4 if (( (βXWORLD— 0) | | (βYWORLD— 0) ) ii (RotFlag— Of f) ii (OrgFlag—Off ) )

85 {

86 Pdιsp-βZWORLD-Oπgιn[2]

87 dosub rmagwld2.cdp

88 }

89 Pdιsp-Pdιsp+ ( (XYwg [9] " β XWORLD) + (XYwgp [101 "βYWORLD) + (XYwgp [11] "βZWORLD) +XYwgp [12] ) / \

90 sqrt( (XYwgp [9] "2) + (XYwgp [10] * 2) + (XYwgp [11] "2) )

91 dosub rmagwld2. cdp

92 } 93

94 if (Pplane — XZplane)

95 {

96 if (((βXWORLD—0) || (βZWORLD—0) ) ii (RotFlag—Off) ii (OrgFlag—Off))

97 {

98 Pdιsp-βYWORLD-Orιgm[l]

99 dosub rmagwld2.cdp

100 }

101 Pdisp-Pdisp- ( (XZwgp [9] " β XWORLD) + (XZwgp [10] "βYWORLD) + (XZwgp [11] "βZWORLD) + XZwgp [12] ) Λ

102 sqrtl (XZwgp [9] * 2) + (XZwgp [10] * 2) + (XZwgp [11] * 2) )

103 dosub rmagwld2.cdp

104 } 105

106 if (Pplane — YZplane)

107 {

108 if (( ( β YWORLD— 0) | | ( β ZWORLD— 0) ) ii (RotFlag—Of f ) ii (OrgFlag—Off))

109 {

110 Pdιsp-βXWORLD-Orιgιn[0]

111 dosub rmagwld2.cdp

112 }

113 Pdisp-Pdisp* ( <YZwgp [9] " β XWORLD) + (YZwgp [10] "βYWORLD) + (YZwgp [11] "βZWORLD) +YZwgp [12] ) / \

114 sqrt I (YZwgp [9] '2) + (YZwgp [10] ~2) + (YZwgp [11] "2) )

115 dosub rmagwld2.cdp

116 }

117 break

118 } 119

120 if (PSplane — 2)

121 {

122 OrgFlag- (OriginIO] +Orιgιntl] +Orιg t2] +Sdιsp)

123 if (Splane — XYplane)

124 {

125 if (( (βXWORLD—0) || (βYWORLD—0) ) ii (RotFlag—Off) ii (OrgFlag—Off)!

126 {

127 Sdιsp-βZWORLD-Oπgιn[2]

128 dosub rmagwld2.cdp

129 }

130 Sdisp-Sdisp* ( (XYwgp [9] "βXWORLD! + (XYwgp [10] "βYWORLD) + (XYwgp [11] "βZWORLD) + XYwgp [12] ) / \

131 sqrtl (XYwgp [9] * 2) + (XYwgp [10] * 2) + (XYwgp UlP2) )

132 dosub rmagwld2. cdp

133 } 134

135 if (Splane -- XZplane)

136 {

137 if (( (βXWORLD— 0) | | (βZWORLD— 0) ) ii (RotFlag— Of f) ii (OrgFlag—Off!) 13B {

139 Sdιsp-βYWORLD-Orιgιn[l]

140 dosub rmagwld2.cdp

141 }

142 Sdisp-Sdisp- ( (XZwgp [9] "βXWORLD) + (XZwgp [10] "βYWORLD) ♦ (XZwgp [11] "βZWORLD) +XZwgp [12] )/\

143 sqrtl (XZwgp [9] "2 )+ (XZwgp [10] ~2) + (XZwgp [11] * 2) )

144 dosub rmagwld2.cdp

145 } 146

DISPGET.CDP Monday, March 28, 1994 9-21 am page

147 if (Splane — YZplane)

148 {

149 if (( (βYWORLD—0) || (βZWORLD--0) ) ii (RotFlag—Off) ii (OrgFlag—Off))

150 {

151 Sdιsp-βXWORLD-Orιgιn[0]

152 dosub rmagwld2 cdp

153 }

154 Sdisp-Sdisp* I (YZwgp [9] "βXWORLD) + (YZwgp [10] "βYWORLD) + (YZwgp [11 ] "βZWORLD) +YZwgp [12 ] ) Λ

155 sqrt ( (YZwgp [9] "2 ) * (YZwg [10] "2 ) + (YZwgp [111 * 2 ) )

156 dosub rmagwld2 . cdp

157 }

158 break

159 } 160

161 case 3

162 LastPick [n] -3

163 if (PSplane « 1 )

164 {

165 getflt "Enter Primary Plane Diεplacement (V.4f):",Pdisp,Pdisp

166 dosub rmagwld2.cdp

167 }

168 if (PSplane — 2)

169 {

170 getflt "Enter Secondary Plane Displacement (V.4f).",Sdisp,Sdisp

171 dosub rmagwld2.cdp

172 }

173 break

174 case 4

175 LastPick[ii] -4

176 if (PSplane — 1)

177 {

178 getflt "Enter +/- Primary Plane Displacement Increment (V.4f): ",\

179 AutoIncD[PSplane] .AutoIncD[PSplane]

180 Pdιsp-Pdιsp*AutoIncD[PSplane!

181 dosub rmagwld2.cdp

182 }

183 if (PSplane — 2)

184 {

185 getflt "Enter ♦'/- Secondary Plane Displacement Increment (V.4f) - ",\

186 AutoIncD[PSplane] .AutoIncD[PSplane]

187 Sdisp-Sdisp+AutoIncD[PSplane] 186 dosub rmagwld2.cdp

189 }

190 break

191 case 5

192 LastPick[n]-5

193 Rotate-Rrel

194 dosub rotget.cdp

195 if (Done)

196 goto exit

197 break

198 case 6

199 LastPick[ii]-6

200 Rotate-RAxis

201 dosub rotget.cdp

202 if (Done)

204 break

205 case 7:8

206 break

207 case 9

208 LastPick[n] -9

209 Menu-8

210 dosub 3drhelp.cdp

211 break

212 default

213 Menu-8

214 dosub 3drhelp.cdp

215 break

216 }

217 MenuLev-MenuLev-1

218 goto top 219

DISPGET.CDP Monday, March 28, 1994 9:21 am Page

220 :exit

221 MenuLev-MenuLev-1

222 ♦INCLUDE finder2.inc

223 EXIT

DISPPNTS.CDP Monday, March 28, 1994 9:21 am Page

1 rem DISPPNTS.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5

6 Local Slevel, Ilevel

7

8 :top

9 D spMas [0]-βlevels[0]

10 DispMask[1]-βlevels[1]

11 DispMask[2]-βlevels [2]

12 DispMask[3]-βlevels[3]

13 DispMask[4]-βlevels[4]

14 DispMask[51-βlevels [5]

15 DιεpMask[6]-βlevels[6]

16 DispMask[7] -βlevels[7]

17 DispMas [8]-βlevels [8]

18 DispMask[91-βlevels[9]

19 DispMas [10]-βlevels[10]

20 DispMask[111-βlevels [11]

21 DispMask[12] -βlevels[12]

22 DispMas [13]-βlevels [131

23 DispMask[14]-βlevels[14]

24 DispMask[15]-βlevels [15]

25

26 Slevel-floor( (βlevel+PntsLev) /16)

27 Ilevel- ( ( ( (βlevel+PntsLev)/16) -Slevel) •16)

28 if (PointsHS)

29 DispMask[Slevel]-(DispMask[Slevel] | Bin[Ilevel])

30 else

31 DispMask[Slevel]- (DispMask[Slevel] ♦ Bin[Ilevel])

32 SET levelmaεk,DispMask

33 redraw -1

34 :exιt

35 EXIT

DRAWGET.CDP Monday, March 28, 1994 9.21 am Page

1 rem DRAWGET.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rightε reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5

6 clear Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

7 FιnderX-FιnderY-FιnderZ-0

8 if (PointsHS)

9 dosub disppnts.cdp 10

11 :reεtart

12 LεtNodes-0

13 ARRAY PntNodes [MaxNodes] [3]

14 ARRAY PntlDs [MaxNodes]

15 ARRAY L elDs [MaxNodes]

16 on ModeNum goto Manual, SimiAuto, Auto, exit 17

18 :Manual

19 LastBhit-Bhit-Nodes-NodeErr-0

20 :top0

21 prompt "Bl Press-Start | B2-End | B2/ESC-exιt | Nodes - Vd",Nodes

22 :topl

23 DO

24 {

25 readdev Fcntl,Fx,Fy,Fz, Fa,Fb.Fc

26 ♦INCLUDE finderld.inc

27 Bhit - Fcntl i 3

28 getkey

32 exitloop

33 } WHILE (Bhit -- None)

34 if ((βkey — Del) ii (Delete — On!)

35 goto deleteit

36 if ((βkey — Del) ii (Delete — Off))

37 {

38 ♦INCLUDE delnode. nc

39 goto topO

40 }

41 on Bhit goto topi, B201, B101, topi 42

43 :B101

44 ♦INCLUDE finderO.inc

45 ♦INCLUDE pntraced.inc

46 if (Beep — On)

47 print "\007"

48 if (Nodes -- MaxNodes)

49 {

50 pause "MaxNodes - Vd reached. Increase MaxNodes using \"Control:MaxNodes\" . ".MaxNodes

51 redraw -l

52 goto restart

53 }

54 ♦INCLUDE waitrell.mc

55 goto topO 56

57 :B201

58 if (Nodes — None)

60 dosub buildit

61 if (NodeErr — True)

62 {

63 NodeErr-False

64 goto Manual

65 }

66 Delete-On

67 LstNodes-Nodes

68 ♦INCLUDE waιtrel2.ιnc

69 goto Manual 70

71 :Auto

72 LastBhit-Bhit-Nodes-NodeErr-0

73 :top4

DRAWGET.CDP Monday, March 28, 1994 9 21 am Page

74 prompt "Bl Press/Release-Start/Stop | B2/ESC-exιt | Nodes - Vd",Nodes

75 :top5

76 getkey Del) ii (Delete — On))

80 goto deleteit

81 readdev Fcntl,Fx,Fy,Fz,Fa,Fb.Fc

82 ♦INCLUDE fmderld.inc

83 LastBhit - Bhit

84 Bhit - Fcntl i 3

85 if ((Bhit -- None) ii (LastBhit — None))

86 goto topS

87 on Bhit goto Blrel, exit, B103, topS ββ

89 :Blrel

90 if (Nodes — None)

92 dosub buildit.cdp

93 if (NodeErr — True)

94 {

95 NodeErr-False

96 goto Auto

97 }

98 Delete-On

99 LstNodes-Nodes 100 goto Auto

101

102 :B103

103 ♦INCLUDE finderO.inc

104 ♦INCLUDE pntraced.inc

105 if (Beep — On)

106 print "\007"

107 if (Nodes — MaxNodes)

108 {

109 pause "MaxNodes - Vd reached. Increase MaxNodes using \"Control.MaxNodesV. ".MaxNodes

110 redraw -1

111 goto restart

112 }

113 Wait Delay

114 goto top4

115 goto Auto 116

117 :SimιAuto

118 LastBhit-Bhit-Nodes-NodeErr-0

119 -.SAtopO

120 prompt "Bl Press-Start | B2-End | B2/ESC-exιt | Nodes - Vd".Nodes

121 :SAtopl

122 DO

123 {

124 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

125 ♦INCLUDE fmderld.inc

126 Bhit - Fcntl i 3

127 getkey

131 exitloop

132 } WHILE (Bhit — None)

133 if ( (βkey — Del) ii (Delete — On) )

134 goto deleteit

135 if ( (βkey — Del) ii (Delete — Off) )

136 {

137 ♦INCLUDE delnode.inc

138 goto SAtopO

139 }

140 on Bhit goto SAtopl, B2SA, B1SA, SAtopl 141

142 :B1SA

143 ♦INCLUDE finderO inc

144 ♦INCLUDE pntraced.inc

145 if (Beep — On)

146 print "\007"

DRAWGET.CDP Monday, March 28, 1994 9:21 am Page

147 if (Nodes -- MaxNodes)

148 {

149 pause "MaxNodes - Vd reached. Increase MaxNodes using ."Control :MaxNodes\" ." .MaxNodes

150 redraw -1

151 goto restart

152 }

153 Wait Delay

154 goto SAtopO 155

15. :B2SA

157 if (Nodes -- None)

158 goto exit

159 dosub buildit

160 if (NodeErr — True)

161 {

162 NodeErr-False

163 goto SimiAuto

164 }

165 Delete-On

166 LstNodes-Nodes

167 ♦INCLUDE waιtrel2.mc

168 goto SimiAuto 169

170 : eleteit

171 Delete-Off

172 if (.Points)

173 for (n-0; n<LstNodes n-n+D

174 DELENT PntlDs [n]

175 if (GeoType — CKpoint)

176 for (n-0; n<LstNodes,- n-n+D

177 DELENT PntlDs [n]

178 if (GeoType — CKline)

179 for (n-0; n< (LstNodes-1) ,- n-n+D

180 DELENT LinelDs [n]

181 if ((GeoType — CKplme) | | (GeoType — CKspline) )

182 DELENT LastEnt

183 LstNodes-0

184 ♦INCLUDE fιnder3.ιnc.

185 goto restart 186

187 :exιt

188 MODE normal

189 clear PntNodes,PntlDs,LinelDs,Fcntl,Fx.Fy.Fz

190 ♦INCLUDE fmder2.mc

191 EXIT

EDGE.CDP Monday, March 28, 1994 9.21 am Page rem EDGE.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with- Faro Metrecom/CADKEY/FastSURF

DOUBLE a,b,c,d,e,f , Plnl [13] ,Pln2[13] , Plme [2] [3] ,xl,yl, zl,x2,y2, z2,Edge [15] ARRAY Plnl [13] -{0,0, 0,0, 0,0, 0,0, 0,0, 0,0,0}

ARRAY Pln2[13]-{0,0,0,0,0,0,0, 0,0,0,0,0,0}

9 ARRAY Edge[15]-{0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0} 10 11 prompt "Define Surface 1" 12 wait 1 13 G3Pmode-l 14 dosub get3pos.cdp 15 distAB-sqrt ( (G3Pos [1] [0] -G3Pos [0] [0] ) * 2+\ 16 (G3Postl) [l]-G3Pos[0] [l]) * 2+\ 17 (G3POS [1] [2] -G3POS [0] [2] ) * 2) 18 G3Pos[0] [0]-G3Pos[0] [0] + (( (G3Pos [1] [0]-G3Pos[0] [0] ) /distAB) * (dιstAB/2) ) 19 G3Pos[0] [l]-G3Pos[0] [1] + ( ((G3Pos[l] [l]-G3Pos[0] [1] ) /distAB) * (dιstAB/2) ) 20 G3Pos[0] [2]-G3Pos[0] [2] + I ( (G3Pos [1] [2] -G3Pos [0] [2] ) /distAB) * (dιstAB/2) ) 21 if (G3Pcount!-3) 22 { 23 if (Nodes — -1) 24 pause "Points are Collinear!" 25 else 26 pause "3 Unique Locations Required. You entered Vd",G3Pcount 27 auto -1 26 redraw -1 31 dosub smthg3p.cdp 32 Plnl[0]-G3Pos[0] [0] 33 Plnl[l]-G3Pos[0] [1] 34 Plnl[2]-G3Pos[0] [2] 35 Plnl[31-G3Pos[l) [0] 36 Plnl[4]-G3Pos[l] [1] 37 Plnl[5]-G3Pos[l] [2] 38 Plnl[6]-G3Pos[2] [0] 39 Plnl[7]-G3Pos[2] [1] 40 Plnl[8]-G3Pos[2] [2] 41 /* Calculate The Equation of the First Plane */ 12 /* Find the direction ratioε of line AB */ 43 a-Plnl[3]-Plnl[0] 44 b-Plnl[4]-Plnl[l] 46 /* Find the direction ratios of line AC */ 47 d-Plnl[6]-Plnl[0] 48 e-Plnl[7]-Plnl[l) 49 f-Plnl[8] -Plnl [2] 50 /* Find the direction ratios of the Normal to AB i AC */ 51 CALL CROSS, Plnl[9] , Plnl [10] ,Plnl[ll] ,a,b,c,d,e,f 52 CALL DOTPR0D,Plnl[6] , Plnl [7] , Plnl [8] , Plnl [9] , Plnl [10] , Plnl [11] , Plnl [12] 53 Plnl[12]-0-Plnl[12] 54 55 rem line Plnl [0] , Plnl [1] , Plnl [2] , Plnl [3] Plnl [4] , Plnl [5] ,Red, ,2 56 rem line Plnl [0] , Plnl [1] , Plnl [2] , Plnl [6] Plnl [7] , Plnl [8] .Red, ,2 57 rem line Plnl [3] , Plnl [4] , Plnl [5] , Plnl [61 Plnl [7] , Plnl [8] .Red. ,2 58 59 -.sur ace2 60 prompt "Define Surface 2" 61 wait 1 62 G3Pmode-l 63 dosub get3pos.cdp 64 distAB-sqrt I (G3Pos [1] [0] -G3Pos [0] [0] ) * 2+\ 65 <G3Pos[l] [l]-G3Pos[0] [l]) * 2 + \ 66 (G3Pos[l) [2]-G3Pos[0] [21) * 2) 67 G3Pos[0] [0]-G3Pos[0] [0] + ( I (G3Pos [1] [0] -G3Pos [0] [0] ) /distAB) * (dιstAB/2) ) 68 G3Pos[0] [l]-G3Pos[0] [1] + I I (G3Pos [1] [1] -G3Pos [0] [1] ) /distAB) * (dιstAB/2) ) 69 G3Pos [0] [2] -G3Pos [0] [21 ♦ ( ( (G3Pos [1] [2] -G3Pos [0] [2] ) /distAB) • (dιstAB/2) ) 70 if (G3Pcount!-3) 71 { 72 if (Nodes — -1) 73 pause "Points are Collinear!"

EDGE.CDP Monday, March 28, 1994 9 21 am Page

74 else

75 pause "3 Unique Locations Required You entered Vd",G3Pcount

76 auto -1

77 redraw -1

78 goto exit

79 }

80 dosub smthg3p cdp

81 Pln2[0]-G3Pos[0] [0]

82 Pln2[l]-G3Pos[0] [1]

83 Pln2[2]-G3Pos[0] [2]

84 Pln2[3]-G3Pos[l] [0]

85 Pln2[4]-G3Pos[l] [1]

86 Pln2[5]-G3Pos[l] [2]

87 Pln2[6]-G3Pos[2] [0] SB Pln2[7]-G3Pos[2] [1]

89 Pln2[8]-G3Pθ8[2] [2]

90 /* Calculate The Equation of the Second Plane */

91 /• Find the direction ratios of line AB */

92 a-Pln2[3]-Pln2[0]

95 /* Find the direction ratioε of line AC */

96 d-Pln2[6]-Pln2[0] .

97 e-Pln2[7]-Pln2[l] 9β f-Pln2[8]-Pln2[2]

99 /* Find the direction ratios of the Normal to AB i AC */

100 CALL CROSS, Pln2[93 ,Pln2[10] ,Pln2[ll] ,a,b,c,d,e,f

101 CALL DOTPROD,Pln2[6] ,Pln2[7] ,Pln2[8] , Pln2 [9] .Pln2[10] ,Pln2[ll] ,Pln2[121

102 Pln2[12]-0-Pln2[12] 103

104 rem line Pln2 [0] , Pln2 [1] , Pln2 [2] ,Pln2 [3] ,Pln2 [4] , Pln2 [5] .Green, ,2

105 rem line Pln2 [0] , Pln2 [1] , Pln2 [2] , Pln2 [6] ,Pln2 [7] ,Pln2 [8] , Green, ,2

106 rem line Pln2 [3] , Pln2 [4] ,Pln2 [5] ,Pln2 [6] ,Pln2 [7] ,Pln2 [8] .Green, ,2 107

10B rem Calculate Point Intersection of Line CA to 2nd Plane

109 rem Project Points 3 t 1 of Plane 1 to 2nd Plane to form projection Line

110 Pnt2PlnD- ( ( (Pln2 [9] "Plnl [0] ) + (Pln2 [10] "Plnl [1] ) + (Pln2 [11] "Plnl [2] ) +Pln2 [12] ) / \

111 sqrt ( (Pln2 [9] * 2).+ (Pln2 [10] * 2) * (Pln2 [11] *2) ) )

112 Pline [0] [0] -Plnl [0] ♦ (-Pnt2PlnD*Pln2 [9] )

113 Pl ne [0] [1] -Plnl [1] * (-Pnt2PlnD*Pln2 [10] )

114 Pline [0] [2]-Plnl[2]*(-Pnt2PlnD"Pln2[lll)

115 Pnt2PlnD- ( ( (Pln2 [9] "Plnl [6] ) + (Pln2 [10] "Plnl [7] ) * (Pln2 [11] "Plnl [8] ) +Pln2 [12] ) / \

116 sqrt ( (Pln2 [9] * 2) + (Pln2 [10] ~2) + (Pln2 [11] * 2) ) )

117 PlineU) [0]-Plnl[6] + (-Pnt2PlnD*Pln2[9] )

118 Plinetl] [l]-Plnl[7] + (-Pnt2PlnD*Pln2[10])

119 Pl e [1] [2] -Plnl [8] ♦ (-Pnt2PlnD*Pln2 [11] )

120 rem Calculate Angle Between the two lines

121 distCAl-sqrt ( (Plnl [0] -Plnl [61 ) * 2+\

122 (Plnl[l]-Plnl[7]) * 2+\

123 (Plnl [2] -Plnl [8] ) * 2)

124 PlineAB-sqrt ( (Plme [0] [0] -Plme [1) [0] ) * 2+\

125 (Pline [0] [1] -Pline [1] [1] ) * 2+\

126 (Pline [0] [2] -Pline [1] [2] ) * 2)

127 a- ( (Plnl [0] -Plnl [6] ) /distCAD

128 b- ( (Plnl [1] -Plnl [7] ) /distCAD

129 c-( (Plnl [2] -Plnl [8] ) /distCAD

130 d- ( (Plme [0] [0] -Plme tl] [0] ) /PlineAB)

131 e- ( (Pline [0] [1] -Plme [1] [1] ) /PlineAB)

132 f- ( (Pline (0] [2] -Pline [1] [2] ) /PlineAB)

133 LxLangle-acos I (a*d) + (b*e) ♦ (c*f ) )

134 rem Calculate Length of Plane Is intercept to Plane 2 from Plane Is A

135 a- (Pline [0] [0] -Plnl [0] )

136 b- (Pline [0] [1] -Plnl [1] )

137 c- (Pline [0] [2] -Plnl [2])

138 L2PXdιst- (sqrt (a~2+b * 2+c * 2) /sin (LxLangle) )

139 xl-Plnl [0] + ( ( (Plnl [0] -Plnl [6] ) /distCAD *L2PXdιst)

140 yl-Plnl [1] ♦ ( ( (Plnl [1] -Plnl [7] ) /distCAD *L2PXdιst)

141 zl-Plnl [2] * ( ( (Plnl [2] -Plnl [81 ) /distCAD *L2PXdιst)

142 rem pause "LxLangle - Vf L2PXdιst -Vf" .LxLangle, L2PXdιst 143

144 rem Calculate Point Intersection of Line CB to 1st Plane

145 rem Project Points 3 i 2 of Plane 1 to 1st Plane to form projection L ne

146 Pnt2PlnD- ( ( (Plnl [9] "Pln2 [3] ) ♦ (Plnl [10] "Pln2 [4] ) + (Plnl [11] « Pln2 [5] ) +Plnl [12) ) / \

EDGE. CDP Monday, March 28, 1994 9 21 am Pag

147 sqrt ( (Plnl [9] * 2) + (Plnl [10] "2) + (Plnl [11] "2) ) )

148 Pline [0] [0] -Pln2 [3] + (-Pnt2P_nD*Plnl [9] )

149 PlinefO) [1]-Pln2 [41 ♦ (-Pnt2PlnD*Plnl [10] )

150 Pline [0] [2] -Pln2 [5] + (-Pnt2PlnD*Plnl [11] )

151 Pnt2PlnD- ( ( (Plnl [9] *Pln2 [6] ) + (Plnl [10] *Pln2 [7] ) + (Plnl [11] *Pln2 [8] ) +Plnl [12] ) Λ

152 sqrt ( (Plnl [9] * 2) + (Plnl [10] * 2) + (Plnl [11] * 2) ) )

153 Pline [1] [0]-Pln2 [6] ♦ (-Pnt2PlnD « Plnl [9] )

154 Plinetl] [1] -Pln2 [7] + (-Pnt2PlnD*Plnl [10] )

155 Pline [1] [2] -Pln2 [8] + (-Pnt2PlnD*Plnl [11] )

156 rem Calculate Angle Between the two lines

157 dlstCBl-sqrt((Pln2t3j-Pln2[6])~2+ \

158 (Pln2[4]-Pln2[7]) * 2+\

159 (Pln2[5]-Pln2[8]) * 2)

160 PlineAB-sqrt ( (Pline [0] [0] -Pl e [1] [0] ) * 2+\

161 (Pline [0] [1] -Plme [1] [1] ) * 2+\

162 (PlinetO] [2] -Plme [1] [2] ) * 2)

163 a- ((Pln2[3]-Pln2[6])/dιstCBD

164 _-((Pln2[4)-Pl„2[7])/dιstCBl)

165 c-((Pln2[5]-Pln2[8])/dιstCBl)

166 d- ( (Plme [0] [0] -Pline [1] [0] ) /PlineAB)

167 e- ( (Plme [0] [1] -Pline [1] [1] ) /PlineAB)

168 f - ( (Plme [0] [2] -Pline [1] [2] ) /PlineAB)

169 LxLangle-acos ( (a"d) + (b*e) + (c"f ) )

170 rem Calculate Length of Plane Is intercept to Plane 2 from Plane Is B

171 a- (Pline [0] [0]-Pln2[3])

172 b-(Plιne[0] [1]-Pln'2t4] )

173 c(Plιne[0] [2]-Pln2[5])

174 L2PXdιst- (sqrt (a * 2+b 2+c * 2) /s (LxLangle) )

175 x2-Pln2 [3] + ( ( (Pln2 [3] -Pln2 [6] ) /distCBD *L2PXdιεt)

176 y2-Pln2 [4] + ( ( (Pln2 [4] -Pln2 [7] ) /diεtCBD *L2PXdιst)

177 z2-Pln2 [5] + ( ( (Pln2 [5] -Pln2 [8] ) /distCBD *L2PXdιst)

178 rem pause "LxLangle - Vf L2PXdιst -Vf" .LxLangle, L2PXdιst 179

180 rem point xl.yl, zl, White

181 rem point x2 , y2 , z2 , White

182 rem line xl.yl, zl,x2,y2, z2, White, ,2

183 rem line Plnl [0] , Plnl [1] , Plnl [2j ,xl,yl,zl, White, ,2

184 rem line Pln2 [3] ,Pln2 [4] ,Pln2 [5] ,x2,y2,z2, White, ,2 185

186 rem Build First Half of Edge

187 G3Pos[0] [01-xl

188 G3Pos[0] [l]-yl

189 G3Pos[0] [21-zl

190 G3Pos[l] [0]-x2

191 G3Pos[l] [l)-y2

192 G3Pos[l] [2]-z2

193 G3Pos[2] [0] -Plnl [6]

194 G3Pos[2] [1] -Plnl [7]

195 G3Pos[2] [2] -Plnl [8]

196 dosub smthg3p.cdp

197 Edge[0]-G3Pos[0] [0]

198 Edge[l]-G3Pos[0) [1]

199 Edge[2]-G3Pos[0] [2]

200 Edge [3] -G3Pos [0] [0] ♦ ( (G3Pos [1] [0] -G3Pos [0] [0] ) "ECεcale)

201 Edge [4] «G3Pos [0] [1] + ( (G3Pos [1] [1] -G3Pos [0] [1] ) "ECεcale)

202 Edge [5] -G3Pos [0] [2] + ( (G3Pos [1] [2] -G3Pos [0] [2) ) "ECscale)

203 Edge [6] -G3Pos [0] [0] + ( (G3Pos [2] [0] -G3Pos [0] [0] ) "ECscale)

204 Edge [7] -G3Pos [0] [1] + ( (G3Pos [2] [1] -G3Pos [0] [1] ) "ECscale)

205 Edge[8]-G3Pos[0] [2] + ( (G3Pos[21 [2]-G3Pos[0] [2] ) "ECεcale) 206

207 rem Build Second Half of Edge

208 G3Pos[2] [0]-Pln2[61

209 G3Pos[2] [1]-Pln2[7]

210 G3Pos[2] [2]-Pln2[8]

211 dosub smthg3p.cdp

212 Edge [9] - Edge [0] + ( (G3Pos [2] [0] -G3Pos [0] [0] ) "ECscale)

213 Edge [10] -Edge [1] + ( (G3Pos [2] [1] -G3Pos [0] [1] ) "ECscale)

214 Edge[ll]-Edge[2] + ((G3Pos[2] [2]-G3Pos[0] [2] ) "ECscale!

215 Edge [12). G3Pos [0] [0] + ( (G3Pos[0] [0]-G3Pos[l] [0] ) "ECscale)

216 Edge[13]-G3Pos[0] [l] + ( (G3Pos[0l [l]-G3Pos[l] [1] ) "ECscale)

217 Edge [14] -G3Pos [0] [2] + ( (G3Pos [0] [2] -G3Pos [1] [2] ) "ECscale) 218

219 rem Display Edge Entity

EDGE.CDP Monday, March 28, 1994 9:21 am Page

220 EdgSgrp-EdgSgrp+1

221 point EdgetO] .Edge [1] , Edge [2] .Green, ,125, EdgSgrp

222 line EdgetO] .Edged) ,Edge[2) ,Edge[3] ,Edge[4] ,Edge[5] ,LRed, , 1, 125, EdgSgrp

223 line EdgetO] , Edged] ,Edge[2] ,Edge[12] ,Edge[13] ,Edge[14] ,LRed, , 1, 125, EdgSgrp

224 line EdgetO] , Edged] ,Edget2] ,Edge[6] .Edge [71 ,Edge[8] .LGreen, ,2, 125, EdgSgrp

225 line EdgetO] , Edged] ,Edget2] .Edge [9] .Edge [10] .Edge [11] .LGreen, ,2, 125, EdgSgrp

226 line Edge [3] , Edge [4] .Edge [5] .Edge [6] .Edge [7] .Edge [8] .LGreen, ,2, 125, EdgSgrp

227 line Edge[3] ,Edge[4] ,Edge[5] ,Edge[9] .Edge [10] .Edge [11] .LGreen, ,2, 125, EdgSgrp

228 line Edge[12] ,Edge[13] ,Edgetl4] ,Edge[6] ,Edge[7] ,Edge[β] .LGreen, ,2, 125, EdgSgrp

229 line Edgetl2] ,Edge[13] ,Edge[14] ,Edge[9) .EdgetlO] .Edgetll] .LGreen, ,2, 125, EdgSgrp 230

231 auto -1

232 redraw -1 233

234 :exit

235 EXIT

ENVLOAD.CDP Monday, March 28, 1994 9-21 am Pag

1 rem ENVLOAD CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 dosub 3dr_lock.cdp

7 if (BadKey)

8 {

9 Menu-0

10 dosub 3drhelp.cdp

11 ABORT

12 } 13

14 if (PplnEnt [0])

15 {

16 DELENT PplnEnt [0]

17 DELENT PplnEnt [1]

18 PplnEnt [0] -PplnEnt [11-0

19 }

20 if (SplnEnt [0])

21 {

22 DELENT SplnEnt [0]

23 DELENT SplnEnt [1]

24 SplnEnt [0] -SplnEnt [l]-0

25 }

26 if .GPent [0])

27 {

28 for (i-0; ι<6 l-i+l)

29 {

30 if (GPent tl] )

31 DELENT GPent [l]

32 GPent [ι]-0

33 }

34 DELENT OrgEnt

35 }

36 auto -1

37 redraw -1 38

39 /* File Setup */

40 CALL strcpy, Sfname, βcwd

41 CALL εtrcat, Sfname, "\\"

42 MenuLev-MenuLev+1

43 getεtr "Enter Environment file name (Vε) : ", "GRIDPLN.ENV", SfnameO, ,,,,,,,,, .MenuLev

44 MenuLev-MenuLev-1

45 CALL εtrcat, Sfname, SfnameO

46 SET devin, Sfname 47

48 dosub 3drcnfgr.cdp

49 if (CNFGerr)

50 {

51 CNFGerr-False

52 prompt "Env File Load Error, Setting Default Config . . ."

53 wait 3

54 /* Configeration Defaults */

55 dosub dfltcnfg.cdp

56 } 57

58 SET coord, 1

59 SET const,1 60

61 /* Build Magnetic and Optimized Views */

62 dosub rbldview.cdp

63 if (PointsHS)

64 dosub disppnts .cdp

65 dosub vstdopt2.cdp

66 dosub bldplane.cdp

67 auto -1

68 redraw -1 69

70 :exιt

71 EXIT

ENVSAVE.CDP Monday, March 28, 1994 9:21 am Pag

1 rem ENVSAVE.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rightε reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 dosub 3dr_lock.cdp

7 if (BadKey)

8 {

9 Menu-0

10 dosub 3drhelp.cdp

11 ABORT

12 } 13

14 /• File Setup */

15 CALL strcpy, Sfname, βcwd

16 CALL strcat, Sfname, "\\"

17 MenuLev-MenuLev*1

18 getstr "Enter Environment file name (Vs) : ", "GRIDPLN.ENV", SfnameO, ,,,,,,,,, .MenuLev

19 MenuLev-MenuLev-1

20 CALL strcat, Sfname, SfnameO

21 SET devout, Sfname

22 dosub 3drcnfgw.cdp 23

24 :exit

25 EXIT

GET2POS.CDP Monday, March 28, 1994 9.21 am Page

1 rem GET2POS CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5 rem Gets 2 Points Using The Probe Or Mouse 6 7 Nodes-LastBhit-0 8 on G2Pmode goto exit. Probe, Mouse, exit 9 10 :Probe 11 Nodes -LastBhit -G2 Pcount - 0 12 F nderX-FmderY-Finder Z- 0 13 for (ι-l ,- ι<3 , - l-i+D 14 { 15 prompt "Select Point Vld",ι 16 :readpos 17 DO 16 { 19 readdev Fcntl,Fx,Fy.Fz,Fa,Fb.Fc 20 ♦INCLUDE finderl. c 21 Bhit - Fcntl i 3 22 getkey

26 exitloop 27 } WHILE (Bhit — None) 28 on Bhit goto readpos, exit, Blhit, exit 29 30 :Blhιt 31 ♦INCLUDE finderO. c 32 Mode draw 33 point Fx.Fy.Fz,White 34 G2Pos [Nodes] [0] - Fx 35 G2Pos [Nodes] [lj - Fy 36 G2Pos [Nodes] [2] » Fz 37 Nodes-Nodes+1 38 if (Nodes>l) 39 LINE G2Pos[(Nodes-2)l [0] ,G2Pos [ (Nodes-2) ] [1] ,G2Pos [ (Nodes-2) ] [2] ,\ 40 Fx,Fy,Fz, hite, ,2 41 Mode normal 42 Delete-Off 43 if (Beep -- On) 44 print "\007" 45 ♦INCLUDE waitrell inc 46 ) 47 goto PntCheck 48 49 : ouse 50 Nodes-G2Pcount-0 51 MenuOpt-2 52 for (i-l,-ι<3l-i+l) 53 { 54 if (l—l) 55 getpos "Get First Location . .".MenuOpt 56 if (1—2) 57 getpos "Get Second Location. . .".MenuOpt 60 MenuOpt-βKey 61 Mode draw 62 point βXworId,βYworId,βZworId,White 63 G2Pos [Nodes] [0] - βXworld 64 G2Pos [Nodes] [1] - βYworld 65 G2Pos [Nodes] [2] - βZworld 66 Nodes-Nodes+1 67 if (Nodes>l) 68 LINE G2Poε[(Nodeε-2)l [0] ,G2Pos[ (Nodes-2)] [1] ,G2Pos[(Nodes-2)] [2],\ 69 βXworld, YworId,βZworld,White, ,2 70 Mode normal 71 if (Beep — On) 72 print "\007" 73 }

GET2P0S.CDP Monday, March 28, 1994 9:21 am Page

74 goto PntCheck 75

76 :PntCheck

77 rem Check For Unique Points

78 distAB-sqrt ( (G2Pos [11 [0] -G2Pos [0] [0] ) * 2 + \

79 (G2Pos[l] [l]-G2Pos[0] [1] ) * 2 + \

80 (G2Pos[l] [2]-G2Pos[0] [2] 1 * 2)

81 if (abs (distAB) < .000001)

82 Nodes-Nodes-2

83 goto exit 84

85 :exit

86 G2Pcount-Nodes

87 Mode normal

88 ♦INCLUDE fιnder2.mc

89 EXIT

GET3P0S.CDP Monday, March 28, 1994 9.21 am Pag

1 rem GET3POS CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF

5 rem Gets 3 Points Using The Probe Or Mouse

6

7 Nodes-LastBhιt-0

8 on G3Pmode goto exit, Probe, Mouse, exit

9

10 :Probe

11 Nodeε-LaεtBhιt-G3Pcount-0

12 FmderX-FιnderY-FιnderZ-0

13 /* lεt point defines Origin of Grid Plane

14 /* 2nd point defines direction X Direction of Primary Plane */

15 /* 3rd point defines direction Y Direction of Primary Plane */

16 for (ι-l;i<4ι-ι+l)

17 {

18 prompt "Select Point Vld",ι

19 :readpos

20 DO

21 {

22 readdev Fcntl,Fx,Fy,Fz,Fa,Fb,Fc

23 ♦INCLUDE finderl.inc

24 Bhit - Fcntl t 3

25 getkey

29 exitloop

30 } WHILE (Bhit « None)

31 on Bhit goto readpos, exit, Blhit, exit

32

33 :Blhιt

34 ♦ INCLUDE f derO . inc

35 Mode draw

36 point Fx, Fy, Fz, White

37 G3Pos [Nodes] [0] - Fx

38 G3 Pos [Nodes] [1] - Fy

39 G3Pos [Nodes] [2] - z

40 Nodes-Nodes+1

41 if (Nodes>l)

42 LINE G3Pos [ (Nodes-2) ] [0] , G3Pos [ (Nodes-2) ] [1] , G3Pos [ (Nodes-2) ] [2] , \

43 Fx, Fy, Fz , White, , 2

44 if (Nodes— 3 )

45 LINE G3Pos [0] [0] , G3Pos [0] [1] , G3Poε [0] [2] , Fx, Fy, Fz, White, , 2

46 Mode normal

47 Delete-Off

48 if (Beep — On)

49 print "\007"

50 ♦INCLUDE waitrell . inc

51 }

52 goto PntCheck

53

54 : Mouse

55 Nodes-G3Pcount-0

56 MenuOpt-2

57 for (l-l;l<4l-i+l)

58 {

59 If (1—1)

60 getpos "Get First Location. . .".MenuOpt

61 if (ι—2)

62 getpos "Get Second Location .".MenuOpt

63 if (ι—3)

64 getpos "Get Third Location. ".MenuOpt

67 MenuOp -βKey

68 Mode draw

69 point βXworld,βYworId,βZworld,White

70 G3POS[Nodes] [0] - βXworld

71 G3Pos[Nodes] [1] - βYworld

72 G3Pos [Nodes] [2] - βZworld

73 Nodes«Nodeε+l

GET3P0S.CDP Monday, March 28, 1994 9.21 am p age

74 if (Nodes>D

75 LINE G3Pos[ (Nodes-2)1 [0] ,G3Pos [ (Nodes-2) ] [1] ,G3Pos [ (Nodes-2) ] [2] ,\

76 βXworld, Yworld,βZworld,White, ,2

77 if (Nodes—3)

78 LINE G3Pos[0] [0],G3Pos[0] [l] ,G3Pos[0] [2] , β Xworld, βYworld, βZworld, White, , 2

79 Mode normal

80 if (Beep — On)

81 print "\007"

82 }

83 goto PntCheck 84

85 :PntCheck

86 rem Check For Unique Points

87 distAB-sqrt ( (G3Pos [1] [0] -G3Pos [0] [0] ) ~2+ \

88 (G3POS [1] [1] -G3POS [0] [1] ) * 2 + \

89 (G3Pos[l] [2]-G3Pos[0] [2] 1 * 2)

90 if (abs (distAB) < .000001)

91 Nodes-Nodes-1

92 distBC-sqrt ( (G3Poε [2] [0] -G3Pos [1] [0] ) * 2+\

93 (G3Pos[2] [l]-G3Pos[l] [1] )"2 + \

94 (G3Pos[2] [2]-G3Pos[l] [2])"2)

95 if (abs(dιstBC) < .000001)

96 Nodes-Nodes-1

97 distAC-sqrt ( (G3Pos [2] [0] -G3Pos [0] [0] ) * 2+\

98 (G3Post21 [1] -G3POS [0] [1] ) "2+\

99 (G3Pos[2] [2]-G3Pos[0] [2] ) * 2)

100 if (abs (distAC) < .000001)

101 Nodes-Nodes-1

102 If (Nodes <- 3)

103 goto exit

104 rem Check For Collinear Points

105 if ( abs(distAC- (distAB+distBC) ) < .000001)

106 Nodes--1

107 goto exit 108

109 :exιt

110 G3Pcount-Nodes

111 Mode normal

112 ♦INCLUDE fιnder2.mc

113 EXIT

GPDISP CDP Monday, March 28, 1994 9 21 am Page rem GPDISP CDP rreemnt T_h„e_ rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FastSURF

5 6 local i 7 8 /• Move Working Grid Plane Boundry Points */ 9 10 /♦ Move XY Working Grid Plane Boundry Points */ 11 if (Pplane—XYplane) 12 { 13 XYwgp[2] -XYwgp[2] +Pdιsp 14 XYwgp [5]-XYwgp[5] +Pdιsp 15 XYwgp[8] -XYwgp[8) +Pdιsp 16 for (i-0, ι<4, l-i+l) 17 { 18 XYpntl [ ] [2] -XYpntl [l] [2] +Pdιsp 19 XYpnt2 [ι] [2] -XYpnt2 [ι] [21 +Pdιεp 20 } 21 } 22 /* Move XZ Working Grid Plane Boundry Points */ 23 if (Pplane—XZplane) 24 { 25 XZwgp[1] -XZwgp[1] +Pdιsp 26 XZwgp[4] -XZwgp[4) +Pd sp 27 XZwgp[7]-XZwgp[7] *Pdιεp 28 for (1-0, ι<4, i-i+l) 29 { 30 XZpntl [l] [1] -XZpntl [i] [1] +Pdιsp 31 XZpnt2 [ι] [l) «XZpnt2 [ι] [1] +Pdιsp 32 ) 33 ) 34 /* Move YZ Working Grid Plane Boundry Points */ 35 if (Pplane— YZplane) 36 { 37 YZwgp [0] -YZwgp[0] +Pdιsp 38 YZwgp [3] -YZwgp [3] +Pdιεp 39 YZwg [6] -YZwgp [6] +Pdιsp 40 for (1-0, ι<4, i-i+l) 41 { 42 YZpntl [l] [0] -YZpntl [l] [0] +Pdιsp 43 YZpnt2 [ι] [0] -YZpnt2 [ι] [0] +Pdιsp 44 } 45 } 46 47 /* Move XY Working Grid Plane Boundry Points */ 4B if (Splane— XYplane' 49 { 50 XYwgp[2] -XYwgp[2] +Sd sp 51 XYwgp [5] -XYwgp [5] +Sdιsp 52 XYwgp [8] -XYwgp [8] +Sdιsp 53 for (i-O, ι<4, i-i+l) 54 { 55 XYpntl [i] [2] -XYpntl [l] [21+Sdιsp 56 XYpnt2 [l] [2] -XYpnt2 [l] [2] +Sdιsp 57 } 58 } 59 /* Move XZ Working Grid Plane Boundry Points */ 60 if(Splane—XZplane) 61 { 62 XZwgp[1) -XZwgp[1] +Sdιsp 63 XZwgp [4] -XZwgp [4] +Ξdιsp 64 XZwg [7]-XZwgp[7] +Sdιsp 65 for (1-0, ι< , i-i+l) 66 { 67 XZpntl [l] [1] -XZpntl [ ] [1] +Sd sp 68 XZpnt2 [l] [1] -XZpnt2 [l] [1] +Sdιsp 69 } 70 } 71 /* Move YZ Working Grid Plane Boundry Points */ 72 if (Splane—YZplane) 73 {

Monday, March 28, 1994 9 21 am Pag

GPMOVE CDP Monday March 28 1994 9 21 am Page

1 rem GPMOVE CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Deεigned to work with Faro Metrecom/CADKEY/FastSURF 5 6 local ι,ιι 7 8 /* Move Working Grid Planes */ 9 for (ι«0, ι<9, 1-1+3) 10 { 11 XYwgp [l] -XYwg [I] +0rιgιn [0] 12 XZwgp [ l 1 -XZwgp [ l ] +0r igin [ 0 ] 13 YZwgp [l] -YZwgp [i] +0πgιn [0] 14 XYwgp [l+l] -XYwgp [i+l] +Oπgιn [1] 15 XZwgp [i+l] -XZwgp [i+l] +Orιgιn [1] 16 YZwgp [ι+l] -YZwgp [l+l] +Orιgιn[l] 17 XYwgp [ι+2] -XYwgp [ι+2] +0πgιn [2] IB XZwgp fι+2) -XZwgp [ι+2] +Orιgιn[2] 19 YZwgp [ι+2] -YZwgp [ι+2] +0πgιn[2] 20 } 21 22 /* Move Working Grid Plane Boundry Points */ 23 for (1-0, ι<4, ι-ι * l) 24 { 25 /* Move XY Working Grid Plane Boundry Points 26 XYpntl[l ■XYpntl [l] 0] +0rιgιn[0] 27 XYpntl[l 'XYpntl [l] 1] +Orιgm[l] 26 XYpntl[i XYpntl [l) 2] +Orιgm[2] 29 XYpnt2[i XYpnt2 [i] 0] +Orιgm[0] 30 XYpnt2 [i l]-XYpnt2[ι] 1] +Orιgιn[l] 31 XYpnt2 [l 2]-XYpnt2[ι] 2] +Or gιn[2] 32 /* Move XZ Working Grid Plane Boundry Points */ 33 XZpntl [i 0] -XZpntl [l] 0] +Orιgιn[0] 34 XZpntl [i 1] -XZpntl [l] 1) +Orιgιn[l] 35 XZpntl [i 2] -XZpntl [l] 2] +0πgιn[2] 36 XZpnt2 [l 0]-XZpnt2[ι] 0] +Orιgιn[0] 37 XZpnt2 [l l]-XZpnt2[ι] l]+0rιgιn[l] 38 XZpnt2[ι 2]-XZpnt2[ι] 2]+0πgιn[2] 39 /* Move YZ Working Grid Plane Boundry Points */ 40 YZpntl[l 0] -YZpntl [ιl 0] +Orιgιn[0] 41 YZpntl [l 1) -YZpntl [l] 1] +0rιgm[l] 42 YZpntl [ι 2] -YZpntl [l] 2] +0rιgιn[2] 43 YZpnt2[ι 0]-YZpnt2[ι] 0] +0rιgιn[0] 44 YZpnt2[ι l]-YZpnt2[ι] 1] +0rιgιn[l] 45 YZpnt2 [l 2]-YZpnt2[ι] 2] +0rιgm[2] 46 } 47 49 EXIT

GPROTATE.CDP Monday, March 28, 1994 9.21 am Page

1 rem GPROTATE.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 6 local l 7 8 /* Rotate XY Grid Plane P2.P3. X,Y,Z */ 9 for (ι-0; ι<9 ι-ι+3) 10 { 11 XYZ[0] -XYwgp tl] 12 XYZ[1] -XYwgp [l+l] 13 XYZ [2] -XYwgp [ι+2] 14 if (MagFlag) 15 dosub magrot . cdp 16 else 17 dosub xyzrot.cdp 18 XYwgp [l] -XYZ [0] 19 XYwgp [l+l] -XYZ [1] 20 XYwgp [1+2] -XYZ [2] 21 } 22 23 /* Rotate XY Outer Grid Plane Boundary Points P1,P2,P3,P4 X,Y,Z */ 24 for (ι-0; ι<4, i-i+l) 25 { 26 XYZ [0] -XYpntl [l] [0] 27 XYZ [1] -XYpntl [l] [1] 28 XYZ [2] -XYpntl [l] [2] 29 if (MagFlag) 30 dosub magrot . cdp 31 else 32 dosub xyzrot . cdp 33 XYpntl [l] [0]-XYZ[0] 34 XYpntl [l] [1]-XYZ[1] 35 XYpntl [l] [2] -XYZ [2] 36 } 37 38 /* Rotate XY Inner Grid Plane Boundary Points - P1.P2.P3.P4- X.Y.Z */ 39 for (1-0, ι<4 ,- l-i+D" 40 { 41 XYZ[0]-XYpnt2[ι] [0] 42 XYZ[l]-XYpnt2[ι] [1] 43 XYZ[2]-XYpnt2[ι] [2] 44 if (MagFlag) 45 dosub magrot . cdp 46 else 47 dosub xyzrot . cdp 48 XYpnt2[ι] [0]-XYZ[0] 49 XYpnt2[ι) [1]-XYZ[1] 50 XYpnt2[ι] [2] -XYZ [2] 51 } 52 S3 /* Rotate XZ Grid Plane - P2.P3 X.Y.Z */ 54 for (1-0, 1<:9; 1-1 + 3) 55 { 56 XYZ [0] -XZwgp [i] 57 XYZ [1] -XZwgp [l+l] 58 XYZ [2] -XZwgp [ι+2] 59 if (MagFlag) 60 dosub magrot . cdp 61 else 62 dosub xyzrot . cdp 63 XZwgp [l] -XYZ [0] 64 XZwgp [i + l] -XYZ [1] 65 XZwgp [ι+2] -XYZ [2] 66 } 67 66 /* Rotate XZ Outer Grid Plane Boundary Points P1,P2,P3,P4 X.Y.Z */ 69 for (i-O; ι<4, i-i+l) 70 { 71 XYZ [0] -XZpntl ti] [0] 72 XYZ tl] -XZpntl [l] [1] 73 XYZ [2] -XZpntl [l] [2)

GPROTATE.CDP Monday, March 28, 1994 9.21 am Page

74 if (MagFlag) 75 dosub magrot.cdp 76 elae 77 doεub xyzrot . cdp 78 XZpntl [ι] [0]-XYZ[0] 79 XZpntl [l] [1]-XYZ[1] 80 XZpntl [l] [2] -XYZ [2] 81 } 82 83 /* Rotate XZ Inner Grid Plane Boundary Points - P1,P2,P3,P4. X.Y.Z */ 84 for (1-0; ι<4 l-i + D 85 { 86 XYZ[0]-XZpnt2[ι] [0] 87 XYZ[l]-XZpnt2[ι] [1] βe XYZ[2J-XZpnt2[ι] [2]

89 if (MagFlag) 90 dosub magrot.cdp 91 else 92 dosub xyzrot. cdp 93 XZpnt2[ι] [0)-XYZ[0] 94 XZpnt2[ι] [1)-XYZ[1] 95 XZpnt2[ι] [2] -XYZ [2] 96 } 97 98 /* Rotate YZ Grid Plane - P2.P3. X.Y.Z */ 99 for.(ι»0; 1<9 1-1 + 3) 100 { 101 XYZ [0] -YZwgp [i] 102 XYZ [1] -YZwgp [i+l] 103 XYZ [2] -YZwgp [1+2] 104 if (MagFlag) 105 dosub magrot . cdp 106 else 107 doεub xyzrot . cdp 108 YZwgp [I] -XYZ [0] 109 YZwgp [i+l] -XYZ [1] 110 YZwgp [ι+2] -XYZ [2] 111 } 112 113 /* Rotate YZ Outer Grid Plane Boundary Points - P1.P2.P3.P4- X.Y.Z */ 114 for (1-0; ι<4 , 1-1+1) 115 { 116 XYZ [0]- YZpntl [l] [0] 117 XYZ [1] -YZpntl [l] [1] 118 XYZ [2] -YZpntl [i] [2] 119 if (MagFlag) 120 dosub magrot cdp 121 else 122 dosub xyzrot . cdp 123 YZpntl [ ] [0]-XYZ[0] 124 YZpntl [l] [1]-XYZ[1] 125 YZpntl [l] [2] -XYZ [2] 126 ) 127 128 /* Rotate YZ Inner Grid Plane Boundary Points P1,P2,P3,P4. X,Y,Z */ 129 for (i-O, ι<4 , i-i+l) 130 { 131 XYZ[0]-YZpnt2[ι] [0] 132 XYZ[l]-YZpnt2[ιl [1] 133 XYZ[2]-YZpnt2[ι] [2] 134 if (MagFlag) 135 dosub magrot . cdp 136 else 137 dosub xyzrot . cdp 138 YZpnt2[ι] tO] -XYZ tO] 139 YZpnt2[ι] [1]-XYZ[1] 140 YZpnt∑ti] [2] -XYZ [2] 141 ) 142 143 :exιt 144 EXIT

GPRSET.CDP Monday, March 28, 1994 9.21 am Pa

1 rem GPRSET.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF

5

6 /* Master GπdPlane */

7 /* PI P2 P3 Equation of a Plane •/

8 /♦ X Y Z X Y z X z A B C D */

9 ARRAY XYwgp[13]-{0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0}

10 ARRAY XZwgp[13]-{0, 0, 0, 1, 0, 0, 0, 1, 0.-1, 0, 0}

11 ARRAY YZwgp[13]-{0, 0, 0, 0, 1, 0, 0, 1. 1, 0, 0, 0}

12 /* XY Grid Plane Boundry Points */

13 XYpntl [0] [0] -XYpntl [0] [1] -XYpntl [1] [1] -XYpntl [3 [0] --GndSize

14 XYpntl [1] [0] -XYpntl [2] [0] -XYpntl [2] [1] -XYpntl [3 [l]-GπdSιze

15 XYpntl [0] [2] -XYpntl [1] [2] -XYpntl [2] [2] -XYpntl [3 [21-0

16 XYpnt2 [0] [0] -XYpnt2 [0] [1] -XYpnt2 [1] [l]-XYpnt2[3 [0)--(Grιd≤ιze/3)

17 XYpnt2[l] [0] -XYpnt2 [2] [0]-XYpnt2 [2] [l)-XYpnt2[3 (l]-(GrιdSιze/3)

18 XYpnt2[0] [2]-XYpnt2[l] [2]-XYpnt2 [2] [2]-XYpnt2[3 [21-0

19 /* XZ Grid Plane Boundry Points "/

20 XZpntl [0] [0] -XZpntl [0] [2] -XZpntl [1] [2] -XZpntl [3 [0] --GndSize

21 XZpntl [1] [0] -XZpntl [2] [0] -XZpntl [2] [2] -XZpntl [3 [2]-GrιdSιze

22 XZpntl [0] [1] -XZpntl [11 [1] -XZpntl [2] [1] -XZpntl [3 [11-0

23 XZpnt2[0] [0]-XZpnt2[0] [2]-XZpnt2 [1] [2]-XZpnt2[3 [0]--(GrιdSιze/3)

24 XZpnt2[l] [0]-XZpnt2[2] [0]-XZpnt2 [2] [2]-XZpnt2[3 [2]-(GrιdSιze/3)

25 XZpnt2[0] [l]-XZpnt2[l] [U-XZpnt2 [2] [l]-XZpnt2[3 [11-0

26 /• YZ Grid Plane Boundry Points */

27 YZpntl [0] [1] -YZpntl [0] [2] -YZpntl tl) [2] -YZpntl [3 [l]--GrιdSιze

28 YZpntl [1] [1] -YZpntl [2] [1] -YZpntl [2] [2] -YZpntl [3 [2]-GrιdSιze

29 YZpntl [0] [0] -YZpntl [1] [0] -YZpntl [2] [01- YZpntl [3 [0].0

30 YZpnt2[0] [l]-YZpnt2[0] [2]-YZpnt2 [1] [2]-YZpnt2[3 (l]--(GrιdSιze/3)

31 YZpnt2[l] [l]-YZpnt2[2] [l]-YZpnt2 [2] [2]-YZpnt2[3 [21-(GrιdSιze/3)

32 YZpnt2[0] [0]-YZpnt2[l] [0]-YZpnt2 [2] [0]-YZpnt2[3 [01-0

33

34 dosub gpdisp.cdp

35

36 :exιt

37 EXIT

GPSTATS.CDP Monday, March 28, 1994 9:21 am Pag

1 rem GPSTATS.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 SLIST SSPlnStr[0] [0] , SSAxisStr[0] [0]

7 INT PerpAxisIO]

8 ARRAY PerpAxιs[4]-{0,3,2,l)

9 SSPlnStr [0] -" "

10 SSPlnStr [l] -"XY"

11 SSPlnStr [2] -"XZ"

12 SSPlnStr [3] -"YZ"

13 SSAxisStr[0]-"_"

14 SSAxisStr[l]-"ϊ"

15 SSAxisStr[2]-"Y"

16 SSAxisStr[3] -"X" 17

18 :StatTopO

19 sprint SStatStr, "Pplane: Vs ".SSPlnStr[Pplane]

20 call εtrcat,SStatStr, "Disp in Vs: "

21 sprint SStatStr,SStatStr,SSAxisStr[Pplane]

22 call strcat,SStatStr, "V8.4f "

23 sprint SStatStr,SStatStr,Pdisp

24 call strcat,SStatStr, "Rot XYZ: /V6.2f/V6.2f/V6.2f/"

25 sprint SStatStr,SStatStr,XYZrot [0] , XYZrot [1], XYZrot [2]

26 getmenu SStatStr

28 goto StatTop9

31 :StatTopl

32 sprint SStatStr, "Splane: Vε ",SSPlnStr[Splane]

33 call strcat,SStatStr, "Diεp m Vε: "

34 sprint SStatStr,SStatStr,SSAxiεStr[Splane]

35 call εtrcat,SStatStr, "V8.4f "

36 sprint SStatStr,SStatStr,Sdiεp

37 call strcat,SStatStr, "Rot XYZ- /V6.2f/V6.2f/V6.2f/"

38 sprint SStatStr,SStatStr,XYZrot [0] , XYZrotd], XYZrot[2)

39 getmenu SStatStr

41 goto StatTopO

44 :StatTop2

45 sprint SStatStr, "Equation of Plane XY: A-V5.2f B-VS.2f: C-V5.2f D-V5.2f",\

46 XYwgp[9] ,XYwgp[10] ,XYwgp[ll] ,XYwgp[12]

47 getmenu SStatStr

49 goto StatTopl

52 :StatTop3

53 sprint SStatStr, "Equation of Plane XZ: A-V5.2f B-V5.2f: C-V5.2f D-V5.2f",\

54 XZwgp[9] ,XZwgp[10] .XZwgpdl] ,XZwgp[12]

55 getmenu SStatStr

57 goto StatTop2

60 :StatTop4

61 sprint SStatStr, "Equation of Plane YZ: A-V5.2f B-V5.2f. C-V5.2f D-V5.2f".\

62 YZwgp[9] .YZwgp[10] ,YZwgp[11] ,YZwgp[12]

63 getmenu SStatStr

65 goto StatTop3

68 :StatTopS

69 sprint SStatStr, "Grid Plane Rotation (World)- /V6.2f/V6.2f/V6.2 /",\

70 XYZrot[0], XYZrot[1], XYZrot[2]

71 getmenu SStatStr

73 goto StatTop4

GPSTATS.CDP Monday, March 28, 1994 9:21 am Pag

76 :StatTop6

77 sprint SStatStr, "Grid Plane Offset (Magnetic) . /V6.2f/V6.2f/V6.2f/" , \

78 XYZmagO[0] ,XYZmagO[1] ,XYZmagO[2]

79 getmenu SStatStr

81 goto StatTopS

84 :StatTop7

85 sprint SStatStr, "Grid Plane Rotation (Magnetic) : /V6.2f/V6.2f/V6.2f/", \

86 XYZmag[0] .XYZmag[1] .XYZmag[2]

87 getmenu SStatStr

89 goto StatTopβ

91 goto exit

92 :StatTop8

93 sprint SStatStr. "Grid Plane Magnetic Origin: /V6.2f/V6.2f/V6.2£/",\

94 MagOrgn10] ,MagOrgn[1] ,MagOrgn[2]

95 getmenu SStatStr

97 goto StatTop6

100 :StatTop9

101 sprint SStatStr, "Grid Plane Origin: X - V8.4f Y - Vβ.4f Z - V8.4f",\

102 Origin [0], Origin [1], Origin[2]

103 getmenu SStatStr

104 if (βkey — -2)

105 goto StatTopδ

108 goto StatTopO

109

110 -.exit

111 clear SSPlnStr, SSAxisStr

112 EXIT

LOCATE CDP Monday, March 28, 1994 9 21 am Page

1 rem LOCATE CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FaεtSURF 5

6 top

7 PntNF-None

8 ii-4

9 Done-False

10 MenuLev-MenuLev+1

11 sprint SMenuStr, "Select Locate Option (Vd) ".LastPick[ii]

12 getmenu SMenuStr, \

13 "Track", \

14 "Mpnt2pnt",\

15 "Pnt Near",\

16 "Pnt Far", \

17 "PntPln X",\

18 "-more-",\

19 SSViewstrtViewε] ,\

20 "Control",\

21 "3DR Help",MenuLev,LastPick [n]

22 switch (βkey)

23 {

24 caεe -3

25 goto exit

26 case -2

29 LaεtPιck[ιι]-l

30 dosub track cdp

31 break

32 case 2

33 LastPick [ i]-2

34 dosub mpnt2pnt cdp

35 break

36 caεe 3

37 LastPick [n]-3

38 PntNF-Near

39 dosub pntnf cdp 40 break

41 case 4

42 LastPick[ii] -4

43 PntNF-Far

44 dosub pntnf cdp

45 break

46 case 5

47 LastPick[n]-5

48 dosub pntplnx cdp

49 break

50 case 6

51 LastPick[n] -6

52 dosub locate2 cdp

53 break

54 case 7

55 LastPick [n] -7

56 dosub vstdopt cdp

57 break

58 case 8

59 LastPick [ii] -8

60 dosub control cdp

61 break

62 case 9

63 LastPick [n] -9

64 Menu-5

65 dosub 3drhelp cdp

66 break

67 default

68 Menu-5

69 dosub 3drhelp cdp

70 break

71 }

72 MenuLev-MenuLev-1

73 goto top

LOCATE.CDP Monday, March 28, 1994 9 21 am Page

74 :exιt

75 MenuLev-MenuLev-1

76 EXIT

L0CATE2.CDP Monday, March 28, 1994 9 21 am Page

1 rem L0CATE2 CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Deεigned to work with Faro Metrecom/CADKEY/FastSURF 5 6 :top 7 PntNF-None 8 ii-21 9 Done-False 10 MenuLev-MenuLev*1 11 sprmt SMenuStr, "Select Locate Option (Vd) ".LastPic [ii] 12 getmenu SMenuStr,\ 13 "Center",\ 14 "Edge",\ 15 "Corner",\ 16 " - ",\ 17 " - ",\ IB " _ - \ 19 SSViewstr [Views] , \ 20 "Control" , \ 21 "3DR Help" , MenuLev, LastPic [ii] 22 switch (βkey) 23 { 24 case -3 25 goto exit 26 case -2 29 LastPick [n] -l 30 dosub center.cdp 31 break 32 case 2 33 LastPick[ii] -2 34 dosub edge cdp 35 break 36 case 3 37 LaεtPιck [ιι] -3 38 dosub corner cdp 39 break 40 case 4 6 41 LastPic til)-9 42 Menu-20 43 dosub 3drhelp cdp 44 break 45 caεe 7 46 LaεtPιck[ιι]-7 47 doεub vεtdopt cdp 48 break 49 caεe 8 50 LaεtPιck[ιι]»8 51 doεub control cdp 52 break 53 case 9 54 LastPicktil)-9 55 Menu-20 56 dosub 3drhelp cdp 57 break 58 default 59 Menu-20 60 doεub 3drhelp cdp 61 break 62 } 63 MenuLev-MenuLev-1 64 goto top 66 MenuLev-MenuLev-1 67 EXIT

MAGROT.CDP Monday, March 28, 1994 9:21 am Page

1 rem MAGROT.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5

6 XYZtemp [0] -XYZ [0]

7 XYZtemp [1] -XYZ [1]

8 XYZtemp [2] -XYZ [2]

9

10 / Rotate X Axis */

11 IF ( (XYZmagO[0] ) | | (XYZmag [0] ! -0 ) )

12 {

13 XYZ[1]- (XYZtemp[1] ' 'cos (XYZmagO [0] +XYZmag [0] ) ) - (XYZtemp [2] "sin (XYZmagO [0 ] +XYZmag [0] ) )

14 XYZ[2]- (XYZtemp[1]' 'εin (XYZmagO [0] ÷XYZmag [0] ) ) + (XYZtemp [2] "coε (XYZmagO [0] +XYZmag [0] ) )

15 XYZtemp [I] - XYZ [1]

16 XYZtemp [2) -XYZ [2]

17 }

18

19 /* Rotate Y Axis */

20 IF ( (XYZmagO [1] ) (XYZmag d] ! -0 ) )

21 {

22 XYZ [0] - (XYZtemp [0] "cos (XYZmagO [1] ÷XYZmag [1] ) ) - (XYZtemp [2] "sin (XYZmagO [1] +XYZmag [1] ) )

23 XYZ [2] - (XYZtemp [0] "sin (XYZmagO [1] +XYZmag [1] ) ) + (XYZtemp [2] "cos (XYZmagO [1] +XYZmag [1] ) )

24 XYZtemp [0] -XYZ [0]

25 XYZtemp [2 ] -XYZ [2]

26 }

27

28 /" Rotate Z Axis */

29 IF ( (XYZmagO [2] ) | | (XYZmag [2] ! -0) )

30 {

31 XYZ [0] - (XYZtemp [0] 'cos (XYZmagO [2] +XYZmag [2] ) ) - (XYZtemp [1] "sin (XYZmagO [2 ] +XYZmag [2] ) )

32 XYZ [1] - (XYZtemp [0] •εin (XYZmagO [2 ) +XYZmag [2] ) ) + (XYZtemp [1] "cos (XYZmagO [2 ] +XYZmag [21 ) )

33 XYZtemp [0] -XYZ [0]

34 XYZtemp [1] -XYZ [1]

35 }

36

37 : exit

38 EXIT

MPNT2PNT.CDP Monday, March 28, 1994 9.21 am Page

1 rem MPNT2PNT.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work w th. Faro Metrecom/CADKEY/FastSURF

5 rem This program measures the distance between two points. 6

7 float PntDist

8 ARRAY PointsAB [2] [3] -{0,0, 0,0, 0,0}

9 ARRAY PntID[2]-{0,0}

10 FιnderX-FιnderY-FιnderZ-0 11

12 clear Fcntl,Fx,Fy,Fz,Fa,Fb,Fc

13 :start

14 Fcntl-Fx-Fy-Fz-LastBhit-Bhit-PntDist-LineID-Delete-Count-0

15 ARRAY PomtsAB[2] [3]-{0, 0,0, 0,0,0)

16 ARRAY PntID[2]-{0,0}

17 :top0

18 redraw -1

19 prompt "Probe Select First Point"

20 :top

21 DO

22 {

23 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

24 ♦INCLUDE fmderl.inc

25 if (Count)

26 •{

27 PntDist-sqrt ( ( (PointsAB[0] [0] -Fx) * 2)+\

28 ( (PointsAB[0] [l]-Fy) * 2)+\

29 ( (PointsAB[0] [2] -Fz) "2))

30 prompt "Dynamic Point to Point Distance - VS.2f".PntDist

31 Mode draw

32 LINE PointsAB[ (Count-D ] [0] ,PointsAB[ (Count-D ] [1] ,PointsAB[ (Count-D] [2],\

33 Fx.Fy.Fz,LRed, ,2, , , .βlwidth

34 LINE PomtsAB! (Count-D ] [0] ,PointsAB[ (Count-D ] [1] ,PointsAB[ (Count-D] [2],\

35 Fx.Fy.Fz,Black, ,1, , , ,βlwιdth+4

36 Mode normal

37 }

38 Bhit - Fcntl i 3

39 getkey

None)

43 on Bhit goto top, B201, B101, exit 44

45

46 :B201

47 ♦INCLUDE f derO inc

48 if (Beep -- On)

49 print "\007"

50 If (PntID[0] !- 0)

51 DELENT PntID[0]

52 If (PntlDID !- 0)

53 DELENT PntID[1]

54 If (LιneID!-0)

55 DELENT LineID

56 if ( (Delete — On) | | (Count — 1) )

57 goto start

60 :B101

61 ♦INCLUDE finderO.mc

62 if (Delete — On)

63 {

64 Delete-Off

65 If (PntID[0) !- 0)

66 DELENT PntID[0]

67 If (PntlDIl] !- 0)

68 DELENT PntlDtl)

69 If (LιneID!-0)

70 DELENT LineID

71 Count-0

72 Count-0

73 }

MPNT2PNT.CDP Monday, March 26, 1994 9:21 am Page

74 if (Count — 0)

75 point Fx,Fy,Fz,Red

76 if (Count — 1)

77 point Fx,Fy,Fz,Blue

78 PntID[Count] -βlaεtid

79 PointsAB [Count] [0)-Fx

80 PointsAB[Count] [1)-Fy

81 PomtsAB[Count] [2]-Fz

82 if (Beep — On)

83 print "\007"

84 Count-Count+1

85 ♦INCLUDE waitrell.inc

86 if (Count — 2)

87 goto Measure

88 goto topO 89

90 :Measure

91 PntDiεt-εqrt ( ( (PoιntεAB [0] [0] -PointsAB [1] [0] ) * 2 ) +\

92 ( (PoιntεAB [0] [1] -PointsAB d] [l] ) * 2 ) +\

93 ( (PointsAB [0] [2] -PointsAB [1] [2] ) "2) )

94 Line PointsAB [0] [0] . PointsAB [0] [1] . PointsAB [0] [2 ] , \

95 PointsAB d] [0] . PomtsAB [1] [1] , PointsAB [1] [2] . White, ,Dashed

96 L elD-βlaεtid

97 auto -1

98 redraw -1

99 on βunits goto Inch, Mill, Feet, Cent, Yards, Meterε

100 :Inch

101 prompt "Diεtance Between Point A and B V.4f Inches", PntDist

102 goto Done

103 :Mιlι

104 prompt "Diεtance Between Point A and B - V.4f Milimeters", PntDist

105 goto Done

106 :Feet

107 prompt "Distance Between Point A and B - V.4f Feet", PntDist

108 goto Done

109 :Cent

110 prompt "Distance Between Point A and B - V.4f Centimeters", PntDist

111 goto Done

112 :Yards

113 prompt "Distance Between Point A and B - V.4f Yards",PntDist

114 goto Done

115 :Meters

116 prompt "Distance Between Point A and B - V 4f Meters" ,PntDist

117 :Done

118 Delete-On

119 Count-0

120 goto top 121

122 :exιt

123 If (PntlDIO] !- 0)

124 DELENT PntID[0]

125 If (PntlDID !- 0)

126 DELENT PntID[1]

127 If (LmeID!-0)

128 DELENT LineID

129 clear PomtεAB, PntID

130 ♦INCLUDE fmder2.ιnc

131 auto -1

132 redraw -1

133 EXIT

ORIGIN.CDP Monday, March 28, 1994 9.21 am Page

1 rem ORIGIN.CDP 2 rem The Replicator 3 rem Copyright (C! 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 rem Sets the XYZ Origin of the Grid Planes 6 7 clear Fcntl,Fx.Fy.Fz,Fa,Fb.Fc 8 9 :start 10 ii-ll 11 MenuLev-MenuLev*1 12 sprint SMenuStr, "Select Grid Plane Origin Option (Vd) ".LastPickdi] 13 getmenu SMenuStr,\ 14 "Set lpos",\ 15 "Movelpos",\ 16 "Set 3pos",\ 17 "Rεet Mag",\ 18 •» . " \ 19 " - " 20 21 " - ".\ 22 "3DR Help" , MenuLev, aεtPick i] 23 switch (βkey) 24 { 25 caεe -3 : -2 28 goto exit 29 break 30 caεe 1 31 LastPick [n] -l 32 dosub origml . cdp 33 if (GIPcount — 0) 34 { 35 MenuLev-MenuLev-1 36 goto εtart 37 } 38 Pplane-XZplane 39 Pdιsp-0 40 Splane-XYplane 41 Sdisp-0 42 ARRAY AutoIncD[3]-{0,0,0} 43 ARRAY AutoRotW[3)-{0,0,0) 44 ARRAY AutoRotM[3)-{0,0,0} 45 ARRAY XYZrot [3]-{0,0,0} 46 ARRAY XYZmag [3] -{0,0,0} 47 ARRAY XYZmagO[3]-{0,0,0} 48 ARRAY MagOrgn[3)-{0,0,0} 49 /* Build World, Magnetic and Optimized Views 50 dosub rmagwld.cdp 51 Views-World 52 dosub RBldOptV.CDP 53 auto -1 54 redraw -l 55 break 56 case 2 57 LastPickdi]-2 58 dosub oπginl.cdp 59 if (GIPcount -- 0) 60 { 61 MenuLev-MenuLev-1 62 goto start 63 ) 64 dosub rmagwld cdp 65 dosub RBldOptV.CDP 66 break 67 case 3 68 LastPick[ii] -3 69 Views-World 70 doεub vεtdopt2.cdp 71 :GrιdPlns 72 ιn-15 73 MenuLev-MenuLev*1

Page

Page

ORIGIN CDP Monday, March 28, 1994 9 21 am p a

220 case -3 -2

221 MenuLev-MenuLev-2

228 goto GridPlns

229 break

230 case 1

231 LastPick[mi]-1

232 G3Pmode-l

233 doεub get3poε cdp

234 if (G3Pcount — 3)

235 {

236 prompt "Computing Grid Plane and Views From XZ Coordinates "

237 dosub smthg3p cdp

238 G3Pos [2] [0] -G3Pos [0] [0] -ABCD [0]

239 G3POS [2] [1] «G3Pos [0] [1] -ABCD [1]

240 G3Pos [2] [2] -G3Pos [0] [2] -ABCD [2]

241 Pplane-XZplane

242 Splane-XYplane

243 dosub XYplnrot cdp

244 }

245 else

246 {

247 if (Nodes « -1)

248 pauεe "Points are Collinear 1 "

249 else

250 pause "3 Unique Locationε Required You entered Vd",G3Pcount

251 MenuLev-MenuLev-1

252 auto -1

253 redraw -1

254 goto XZpath

255 )

256 break

257 caεe 2

258 LastPick[mi]-2

259 G3Pmode-2

260 doεub get3pqε cdp

261 if (G3Pcount « 3)

262 {

263 prompt "Computing Grid Plane and Views From XZ Coordinates "

264 dosub smthg3p cdp

265 G3Pos [2) [0] -G3Pos [0] [0] -ABCD [0]

266 G3Pos [2] [1] -G3POS [0] [1] -ABCD tl]

267 G3POS [2] [2] -G3Pos [0] [2] -ABCD [2]

268 Pplane-XZplane

269 Splane-XYplane

270 dosub XYplnrot cdp

271 )

272 else

273 {

274 if (Nodes -- -1 )

275 pause "Points are Collinear ' "

276 else

277 pause "3 Unique Locations Required You entered Vd",G3Pcount

278 MenuLev-MenuLev-1

279 auto -1

280 redraw -1

281 goto XZpath

282 }

283 break

284 case 3 8

285 LaεtPιck[mι]-9

286 Menu.15

287 doεub 3drhelp cdp 2BB break

269 case 9

290 LastPickdm] -9

291 Menu-15

292 dosub 3drhelp cdp

Pa

ORIGIN.CDP Monday, March 28, 1994 9 21 am Page

366 LastPick m)-2

367 G3Pmode-2

368 doεub get3pos.cdp

369 if (G3Pcount -- 3)

370 {

371 prompt "Computing Grid Plane and Views From YZ Coordinates "

372 dosub smthg3p.cdp

373 G3Pos [2] [0] -G3Pos [l] [0]

374 G3Pos [2] [l] -G3Pos [l] [1]

375 G3Pos [2] [2] -G3Pos [l] [2]

376 G3Pos [l) [0] -G3Pos [0] [0] +ABCD [0]

377 G3Pos [l] [l] -G3Poε [0] [1] *ABCD [1]

378 G3Pos [l] [2] -G3Pos [0] [2] +ABCD [2]

379 Pplane-YZplane

380 Splane-XYplane

381 dosub XYplnrot.cdp

382 }

363 else

384 {

365 if (Nodes -- -1)

386 pause "Points are Collinear!"

387 else

388 pause "3 Unique Locations Required You entered Vd",G3Pcount

389 MenuLev-MenuLev-1

390 auto -1

391 redraw -l

392 goto YZpath

393 }

394 break

395 case 3.8

396 LaεtPιck [ιm] -9

397 Menu-15

398 dosub 3drhelp cdp

399 break

400 case 9

401 LastPick[mi] -9

402 Menu-15

403 dosub 3drhelp cdp

404 break

405 default

406 LastPick[mi)-9

407 Menu-lS

408 dosub 3drhelp.cdp

409 break

410 }

411 MenuLev-MenuLev-1

412 if (LastPick[im]—9)

413 goto PM3

414 break

415 caεe 4-8

416 LastPick[m]-9

417 Menu-14

418 dosub 3drhelp cdp

419 break

420 case 9

421 LastPick[m] -9

422 Menu»14

423 dosub 3drhelp cdp

424 break

425 default

426 LastPick[in]-9

427 Menu-14

428 dosub 3drhelp.cdp

429 break

430 }

431 MenuLev-MenuLev-1

432 if (LastPick[m]—9)

433 goto GridPlns

434 break

435 case 4

436 LastPick[n]-4

437 prompt "Computing Magnetic View . "

438 MagOrgn[0]-XYZrot [0]

Monday, March 28, 1994 9:21 am Page

RIGIN1.CDP Monday, March 28, 1994 9.21 am Pa

1 rem ORIGIN1.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Deεigned to work with Faro Metrecom/CADKEY/FastSURF 5 rem Sets the XYZ Origin of the Grid Planes 6 7 clear Fcntl , Fx. Fy. Fz , Fa, Fb, Fc 8 FinderX-FinderY-FmderZ- 0 9 10 : top 11 n-18 12 MenuLev»MenuLev+1 13 sprint SMenuStr, "Select Displacement Selection Method (Vd) ", astPick i] 14 getmenu SMenuStrA 15 "Probe"A 16 "Mouεe"A 17 "Key In"A 18 " - "A 19 " - "A 20 21 " - "A 22 " - "A 23 "3DR Help", enuLev,LastPickdi] 24 switch (βkey) 25 f 26 case 3:-2 28 break 29 case 1 30 LastPick [n] -l 31 Gl Pcount -0 32 prompt "Probe Select Grid Plane Origin 33 ♦INCLUDE waitnotl. c 34 if (Beep — On) 35 print "\007" 36 GlPcount-1 37 Origin[01-Fx 38 Origin[1]-Fy 39 Origin[2] -Fz 40 Pdιsp-Sdιsp-0 43 LastPickdi] -2 44 GlPcount-0 45 getpos "Indicate Grid Plane Origin. .

49 print "\007" 50 GlPcount-1 51 Origin[0] -βXWORLD 52 Origin[1]-βYWORLD 53 Origin[2] -βZWORLD 54 Pdιsp-Sdιsp-0 57 LastPick[ii] -3 58 getflt "Enter New X Grid Origin (V.4f) " , Orιgιn (0] . Origin [0] 59 getflt "Enter New Y Grid Origin (V.4f) " , Origin [1] , Origin [1] 60 getflt "Enter New Z Grid Origin (V.4f) " . Origin [2] . Origin [2] 61 GlPcount-1 62 Pdιsp-Sdιsp-0 63 goto exit 64 case 4 :8 65 LastPic di] -9 66 Menu-17 67 dosub 3drhelp cdp 68 break 69 case 9 70 LastPic di] -9 71 Menu-17 72 dosub 3drhelp.cdp 73 break

Monday, March 28, 1994 9:21 am Pag

PIJJMENU. CDP Monday, March 28, 1994 9:21 am Page

1 rem PLNMENU.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with- Faro Metrecom/CADKEY/FastSURF

5

6 SLIST SSPplnIO] [0] ,SSSplnIO] [0]

7 PSplane-0

8

9 SSPpln IO] -"Ppln "

10 SSPpln [l] -"Ppln XY"

11 SSPpln [2] -"Ppln XZ"

12 SSPpln [3] -"Ppln YZ"

13

14 SSSpln IO] -"Spin "

15 SSSpln ID -"Spln XY"

16 SSSpln [2] -"Spln XZ"

17 SSSpln [3] -"Spln YZ" ιe

19 :top 20 il-7 21 Done-False 22 MenuLev-MenuLev*1 23 sprint SMenuStr, "Select Plane Settings (Vd) ".LastPick[n] 24 getmenu SMenuStrA 25 SSPpln[Pplane] A 26 "PplnDisp",\ 27 SSSpln [Splane] A 26 "SplnDisp" A 29 "Origin" 30 "XYZrot" A 31 "XYZalιgn" , \ 32 "-more- " , \ 33 "3DR Help",MenuLev, astPickdi] 34 switch (βkey) 35 { 36 case -3:-2 39 LastPick[ill -1 40 Pplane-Pplane+1 41 if (Pplane > 3) 42 Pplane-NOplane 43 Pdisp-0 44 dosub rmagwld2 cdp 45 break 46 case 2 47 LastPick [n] -2 48 PSplane-1 49 dosub dispget.cdp 50 break 51 case 3 52 LastPick di] -3 53 Splane«Splane+l 54 if (Splane > 3) 55 Splane-NOplane 56 Sdιsp-0 57 doεub rmagwld2.cdp 58 break 59 case 4 60 LastPick [n] -4 61 PSplane-2 62 dosub diεpget.cdp 63 break 64 case 5 65 LastPickdi]-5 66 dosub origin.cdp 67 break 68 case 6 69 LastPic di] -6 70 Rotate-Rrel 71 dosub rotget . cdp 72 break 73 case 7

Monday, March 28, 1994 9:21 am Page

PLNMENU2.CDP Monday, March 28, 1994 9 21 am Page rem PLNMENU2.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with Faro Metrecom/CADKEY/FaεtSURF

PSplane-0

:top

9 ιι-8 10 MenuLev»MenuLev+l 11 εpr nt SMenuStr, "Select Plane Settings (Vd) ".LastPickdi] 12 getmenu SMenuStrA 13 "Grid Tol"A 14 "GndSize",\ IS "GrιdRset",\ 16 SSAlgnstr [Align] , \ 17 SSViewstr [Views] , \ 18 "GP Stats" A 19 "Test", "File" A 20 "3DR Help", MenuLev, LastPick [n] 21 switch (βkey) 22 { 23 case -3:-2

28 LastPick[n]-l 29 getflt "Enter new grid tollerance (V.4f) .",GridTol,GridTol 30 break 31 case 2 32 LastPickdi)-2 33 getflt "Enter new Grid Size (V.2f) " , GndSize , GndSize 34 dosub rmagwld2.cdp 35 break 36 case 3 37 LastPickdi] -3 38 GπdPlns-On 39 Align-On 40 Views-World 41 Pplane-XZplane 42 Pdιsp-0 43 Splane-XYplane 44 Sdιsp-0 45 GridTol- 030 46 GπdSιze-6 00 47 ARRAY Origin [3] -{0,0,0} 48 ARRAY AutoIncD [3] -{0,0,0} 49 ARRAY AutoRotW [3] -{0,0,0} 50 ARRAY AutoRotM[3]-{0,0,0} 51 ARRAY XYZrot [3] -{0,0,0} 52 ARRAY XYZmag[3]-{0,0,0} 53 ARRAY XYZmagO[3]-{0,0,0} 54 ARRAY MagOrgn[3]-{0,0,0) 55 dosub rmagwld cdp 56 /* Build Magnetic and Optimized Views 57 prompt "Computing Magnetic View .. " 58 Views-Magnetic 59 dosub bldview cdp 60 Views-World 61 dosub RBldOptV cdp 62 auto -1 63 redraw -1 64 break 65 case 4 66 LastPick[n]-4 67 Align - (1 ♦ Align) 68 break 69 case 5 70 LastPickIn) -5 71 dosub vstdopt cdp 72 break 73 case 6

PLNMENU2 . CDP Monday, March 28, 1994 9 21 am Page

(Vd)",LastPιck[m)

PNTNF.CDP Monday, March 28, 1994 9.21 am Pag

1 rem PNTNF.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF

5 rem This program locates Points Near/Far in relation to the Primary Plane. 6

7 DOUBLE LastDist.ThisDist

8

9 Delete-Off

10 OldPoιnt-0

11 clear Fcntl, Fx,Fy,Fz,Fa,Fb,Fc

12 if (Pplane—NOplane)

13 {

14 Pause "Error: Primary Plane not set. Use \"SetGrιd\" first "

17 :start

IB Fcntl-Fx-Fy-Fz-Bhit-LastBhit-Count-LastPnt-0

19 if (PntNF — Far)

20 LaεtDιεt-0

21 if (PntNF — Near)

22 LaεtDιst-1200 23

24 :top

25 prompt "Bl-Sample Point Vd | B2/ESC-exιt",Count

26 :topl

27 getkey

30 if ((βkey — Del) ii (Delete — On))

31 goto deleteit

32 readdev Fcntl,Fx, Fy.Fz,Fa,Fb.Fc

33 LastBhit - Bhit

34 Bhit - Fcntl i 3

35 if ((Bhit — None) ii (LaεtBhit -- None))

36 goto topi

37 on Bhit goto Blrel, exit, B101, exit 38

39 :Blrel

40 Delete-On

41 01dPoιnt=LastPnt

42 goto εtart 43

44 :B101

45 on PntNF goto exit, near, far 46

47 -.near

48 Delete-Off

49 if (Pplane-XYplane)

50 {

51 ThiεDiεt- (abs ( ( (XYwgp [9] *Fx) * (XYwgp [10] *Fy) * (XYwgp[11] "Fz) +XYwgp [12] ) /\

52 sqrtl (XYwgp [9] "21 * (XYwgp[10] * 2) * (XYwgp[11] ~2) ) ) )

53 if (ThisDist < LastDist)

54 {

55 If (LastPnt)

56 DELENT LastPnt

57 point Fx.Fy.Fz,βcolor

58 if (Beep « On)

59 print "\007"

60 LastPnt - βlastid

61 LaεtDiεt - ThisDist

62 Count-Count+1

63 goto top

64 }

65 }

66 if (Pplane-XZplane)

67 {

68 ThisDist- (abs ( ( (XZwgp [9] *Fx) * (XZwgp[10] *Fy) * (XZwg [11] "Fz) *XZwg [12] ) Λ

69 sqrtl (XZwgp[9] * 2) * (XZwg [10] "2) * (XZwgp [11] * 2) ) ) )

70 if (ThisDiεt < LastDist)

71 {

72 If (LastPnt)

73 DELENT LastPnt

PNTNF.CDP Monday, March 28, 1994 9 21 am Pag

74 point Fx, Fy.Fz,βcolor

75 if (Beep — On)

76 print "\007"

77 LastPnt - βlastid

78 LastDist - ThisDist

79 Count-Count+1

80 goto top

81 }

82 }

83 if (Pplane—YZplane)

84 {

85 ThisDist- (abs ( ( (YZwgp[9] *Fx) + (YZwgp[10] *Fy) + (YZwgp [11] *Fz) +YZwgp[12) ) /\

86 εqrt ( (YZwgp [9] * 2> + (YZwgp[10] "2 ) + (YZwgp [11] ~2) ) ) )

87 if (ThiεDiεt < LaεtDist)

88 {

89 If (LastPnt)

90 DELENT LastPnt

91 point Fx,Fy, Fz,βcolor

92 if (Beep — On)

93 print "\007"

94 LastPnt - βlastid

95 LastDist - ThisDist

96 Count-Count+1

97 goto top

98 }

99 }

100 goto top 101

102 :far

103 Delete-Off

104 if (Pplane-XYplane)

105 {

106 ThisDiεt- (abε ( ( (XYwgp[9] *Fx) + (XYwgp [10] *Fy) ♦ (XYwgp[111 « Fz) +XYwgp [12] ) /\

107 εqrt( (XYwgp [9] * 2) + (XYwgp [10] ~2> + (XYwgp [11] * 2) ) ) )

108 if (ThiεDiεt > LaεtDist)

109 {

110 If (LastPnt)

111 DELENT LastPnt

112 point Fx, Fy.Fz,βcolor

113 if (Beep — On)

114 print "\007"

115 LastPnt - βlaεtid

116 LastDist - ThisDist

117 Count-Count+1

118 goto top

119 }

120 }

121 if (Pplane-XZplane)

122 {

123 ThisDist- (abs ( ( (XZwgp [9] *Fx) + (XZwgp[10] *Fy) + (XZwgp[11] *Fz) +XZwgp [12] ) /\

124 sqrtl (XZwgp [9] "2) * (XZwgp [10] ~2) + (XZwgpIlll * 2) ) ) )

125 if (ThisDist > LastDist)

126 {

127 If (LastPnt)

126 DELENT LastPnt

129 point Fx.Fy.Fz,βcolor

130 if (Beep -- On)

131 print "\007"

132 LastPnt - βlastid

133 LastDist - ThisDist

134 Count»Count+l

135 goto top

136 )

137 }

138 if (Pplane—YZplane)

139 {

140 ThisDist- (abs I ( (YZwgp [9] *Fx) * (YZwgp[10] *Fy) * (YZwgp[11] "Fz) *YZwgp [12] ) /\

141 sqrt ( (YZwgp[9] * 2) * (YZwgp[10] * 2) ♦ (YZwgp[11] * 2) ) ) )

142 if (ThisDist > LastDist)

143 {

144 If (LastPnt)

145 DELENT LaεtPnt

146 point Fx.Fy.Fz,βcolor

Monday, March 28, 1994 9:21 am Page

PNTPLNX.CDP Monday, March 28, 1994 9:21 am Page

1 rem PNTPLNX.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5 6 DOUBLE Pnt2Plnl, Pnt2Pln2 7 clear Fcntl,Fx.Fy.Fz,Fa,Fb.Fc 8 FιnderX-FιnderY-FmderZ-0 9 10 :Cut_Plns0 11 if (Pplane — NOplane) 12 goto NoPplane 13 if (Splane — NOplane) 14 goto NoSplane 15 if (Pplane — Splane) 16 goto NoX 17 goto Cut_Plnε 18 19 : oPplane 20 pause "Primary Plane not specified. Use \"Set Gπd\" to enable. 21 goto exit 23 .-NoSplane 24 pauεe "Secondary Plane not specified. Use \"Set Grid." to enable. 25 goto exit 27 :NoX 28 pause "Primary Plane and Secondary Plane do not intersect. 29 goto exit 31 :Cut_Plnε 32 LaεtBhιt-Bhιt-Nodes-Delete-0 33 : ops2 34 prompt "Bl Press-Start | B2-End | B2/ESC-exιt" 35 : ops3 36 DO 37 { 38 readdev Fcntl, Fx.Fy.Fz,Fa,Fb.Fc 39 ♦INCLUDE finderl. c 40 Bhit - Fcntl i 3 41 getkey

45 exi loop 46 } WHILE (Bhit — None) 47 if ((βkey — Del) ii (Delete — On)) 4B goto deleteit 49 on Bhit goto tops3, B202ε, B102s, tops 50 51 :B102s 52 on Pplane goto NoPplane, XYpaths, XZpaths, YZpaths, NoX S3 54 :XYpaths 55 Pnt2Plnl- ( ( (XYwgp[9] *Fx) ♦ (XYwgp[10] "Fy) + (XYwgp[11] *Fz) +XYwg [12] ) /\ 56 sqrt ( (XYwgp [9] * 2) + (XYwgp[10] * 2) + (XYwgp[11] ~2) ) ) 57 if (abs(Pnt2Plnl) > GridTol) 58 goto tops3 59 if (Splane—XZplane) 60 { 61 Pnt2Pln2- ( ( (XZwgp [9] *Fx) + (XZwgp [10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) / \ 62 sqrt ( (XZwgp [9] * 2 ) + (XZwgp [10] "2) + (XZwgp [11] * 2) ) ) 63 if (abs (Pnt2Pln2 ) > GridTol) 64 goto tops3 65 } 66 if (Splane—YZplane) 67 { 68 Pnt2Pln2- ( ( (YZwgp[9] *Fx) + (YZwgp [10] "Fy) + (YZwgp[11] "Fz) +YZwgp [12] ) Λ 69 sqrt ( (YZwgp[9] * 2) + (YZwgp [10] * 2) + (YZwgp [11] * 2) ) ) 70 if (abs(Pnt2Pln2) > GridTol) 71 goto tops3 72 } 73 if (Align—On)

PNTPLNX.CDP Monday, March 28, 1994 9:21 am Pag

74 {

75 Fx-Fx+ (-Pnt2Plnl*XYwgp [9] )

76 Fy-Fy+(-Pnt2Plnl*XYwgp[10] )

77 Fz-Fz+(-Pnt2Plnl*XYwgp[ll])

78 if (Splane— XZplane)

79 {

80 Fx-Fx+(-Pnt2Pln2*XZwgp[9] )

81 Fy-Fy+(-Pnt2Pln2*XZwgp[l0] )

82 Fz-Fz+(-Pnt2Pln2*XZwgp[ll])

83 }

84 if (Splane—YZplane)

85 {

86 Fx-Fx+(-Pnt2Pln2*YZwgp[9])

87 Fy-Fy+(-Pnt2Pln2*YZwgp[10])

88 Fz-Fz+(-Pnt2Pln2*YZwgp[ll])

89 }

90 }

91 goto jumps 92

93 : Zpaths

94 Pnt2Plnl- ( ( (XZwgp [9] *Fx) + (XZwgp [10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) / \

95 sqrt ( (XZwgp [9] * 2> + (XZwgp [10] "2) + (XZwgp [11] * 2) ) )

96 if (abs(Pnt2Plnl) > GridTol)

97 goto tops 3

98 if (Splane-XYplane)

99 {

100 Pnt2Pln2- ( ( (XYwgp [9] *Fx) + (XYwgp [10] »Fy) + (XYwgp [11] *Fz) +XYwgp [12) ) /\

101 sqrt ( (XYwgp [9] * 2) ♦ (XYwgp [10] * 2) + (XYwgp [11] ~2> ) )

102 if (abs(Pnt2Pln2) > GridTol) •103 goto tops3

104 )

105 if (Splane—YZplane)

106 {

107 Pnt2Pln2- ( ( (YZwgp [9] *Fx) + (YZwgp [10] *Fy) + (YZwgp [11] *Fz) *YZwgp [12] ) Λ

108 sqrt ( (YZwgp [9] * 2) * (YZwgp [10] * 2) + (YZwgp [11] * 2> ) )

109 if (abs(Pnt2Pln2) > GridTol)

110 goto tops 3

111 }

112 if (Align— On) I" {

114 Fx-Fx+(-Pnt2Plnl*XZwgp[9] )

115 Fy-Fy+(-Pnt2Plnl*XZwgp[10])

116 Fz-Fz+(-Pnt2Plnl"XZwgp[lll)

117 if (Splane-XYplane)

118 {

119 Fx-Fx+(-Pnt2Pln2*XYwgp[9])

120 Fy-Fy+(-Pnt2Pln2*XYwgp[10] )

121 Fz-Fz+(-Pnt2Pln2*XYwgp[ll] )

122 }

123 if (Splane—YZplane)

124 {

125 Fx-Fx+ (-Pnt2Pln2 « YZwgp[91 )

126 Fy-Fy+(-Pnt2Pln2*YZwgp[10])

127 Fz-Fz+(-Pnt2Pln2*YZwgp[ll] )

128 }

129 }

130. goto jumps 131

132 :YZpaths

133 Pnt2Plnl- ( ( (YZwgp[9] *Fx) + (YZwgp[10] *Fy) + (YZwgp[11] *Fz) +YZwgp [12] ) /\

134 sqrtl (YZwgp[9] * 2) + (YZwgp[10] * 2) + (YZwgp[11] * 2) ) )

135 if (abs(Pnt2Plnl) > GridTol)

136 goto tops3

137 if (Splane-XYplane)

138 {

139 Pnt2Pln2- ( ( (XYwg [9] *Fx) + (XYwgp[10] "Fy) + (XYwgp[11] *Fz) +XYwgp[12] ) Λ

140 sqrtl (XYwg [9] "2)* (XYwgp [10] * 2)+ (XYwgp[11] * 2)) )

141 if (abs(Pnt2Pln2) > GridTol)

142 goto tops3

143 }

144 if (Splane—XZplane)

145 {

146 Pnt2Pln2- ( ( (XZwgp[9] *Fx) + (XZwgp[10] "Fy) + (XZwg [11] *Fz) +XZwgp[12] ) Λ

PNTPLNX.CDP Monday, March 28, 1994 9:21 am Page

147 sqrt ( (XZwgp[9] "2) + (XZwgp[10] * 2) + (XZwgp [11] * 2) ) )

148 if (abs(Pnt2Pln2) > GridTol)

149 goto tops3

150 }

151 if (Align—On)

152 {

153 Fx-Fx+ (-Pnt2Plnl*YZwgp [9] )

154 Fy-Fy+ (-Pnt2 Plnl "YZwgp [10] )

155 Fz-Fz+ (-Pnt2Plnl*YZwgp [ll] )

156 if (Splane-XYplane)

157 {

158 Fx-Fx+ ( -Pnt2Pln2*XYwgp [9] )

159 Fy-Fy+ (-Pnt2Pln2*XYwgp [10] )

160 Fz-Fz+ (-Pnt2Pln2"XYwgp [ll] )

161 }

162 if (Splane— XZplane)

163 {

164 Fx-Fx+ (-Pnt2Pln2*XZwg [9] )

165 Fy-Fy+ (-Pnt2Pln2 "XZwgp [10] )

166 Fz-Fz+ (-Pnt2Pln2 "XZwgp [11] )

167 }

168 )

169 goto jumps

170

171 :jumps

172 if (Beep — On)

173 print "\007"

174 ♦INCLUDE finderO.inc

175 Delete-On

176 point Fx.Fy.Fz, color

177 LastEnt-βlas id

178 Nodes-1

179 redraw -1

ISO ♦INCLUDE waitrell.inc

181 goto tops2

182

183 :B202s

184 goto exit

185

186 :deleteit

187 DELENT LastEnt lββ redraw -l

189 goto Cut_Plns

190

191 :exit

192 clear Fcntl,Fx.Fy.Fz

193 ♦INCLUDE fιnder2.inc

194 redraw -1

195 EXIT

POLYGON.CDP Monday, March 28, 1994 9:21 am Pag

1 rem POLYGON.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rightε reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5 rem program will allow closed polygons to be input in 3-D 6

7 Fx-Fy-Fz-stype-LastBhit-LstNodes-0

8 ARRAY polygoondO] [3]

9 ARRAY PntNodes[10) [3]

10 ARRAY PntlDs[10]

11 FinderX-FinderY-FinderZ-0

12 if (PointsHS)

13 dosub disppnts.cdp 14

15 :start

16 n-0

17 Nodes-0

18 :readpos

19 prompt "Bl-Start | B2-End Polygon | Nodeε - Vd",Nodes

20 DO

21 {

22 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

23 ♦INCLUDE finderl.inc

24 Bhit - Fcntl i 3

25 getkey

29 exitloop

30 } WHILE (Bhit — None)

31 if ((βkey — Del) ii (Delete — On))

32 goto deleteit

33 on Bhit goto readpos, done, Blhit, exit 34

35 :Blhit

36 ♦INCLUDE finderO.inc

37 Mode draw

38 point Fx.Fy.Fz, hite

39 PntNodes[Nodes] [0] - Fx

40 PntNodeε [Nodes] [1] --Fy

41 PntNodeε [Nodes] [2] - Fz

42 Nodes-Nodes*1

43 if (Nodes>l)

44 LINE PntNodes[(Nodes-2)] [0] .PntNodeε[ (Nodes-2) ] [1] .PntNodes [(Nodes-2) ] [2] A

45 Fx.Fy.Fz,White,.2

46 Mode normal

47 Delete-Off

48 polygoon[n] [0] - Fx

49 polygoonln] [1] - Fy

50 polygoonln] [2] - Fz

51 if (Beep — On)

52 print "\007 «

53 n-n+1

54 if (n — 8)

55 goto done

56 ♦INCLUDE waitrell.inc

57 goto readpos 58

59 :done

60 if (Nodes -- None)

61 goto exit

62 if (Nodes < 3)

63 {

64 pause "Polygons require 3 Nodes minimum. You entered Vd Nodes".Nodes

65 CLS -1

66 redraw -1

67 Mode normal

68 goto start

69 }

70 CLS -1

71 redraw -1

72 Mode normal

73 POLYGON 1,0,n, polygoon, βcolor

POLYGON.CDP Monday, March 28, 1994 9:21 am Pag

74 LaεtEnt-βlastid

75 if (Points)

76 {

77 PntsSgrp-PntsSgrp+1

78 for (n-0 ; n<Nodeε ; n-n+D

79 {

80 if (n— 0)

81 ColCode-Red

82 if (n—1)

83 ColCode-Blue

84 if (n>D

85 ColCode-Gray

86 if In— (Nodes-D)

87 ColCode-Green

88 point PntNodes [n] [0] ,PntNodes [n] [1] ,PntNodes[n] [2] .ColCode, (βlevel+PntsLev) ,122,PntsSgrp 89 PntIDs[n]-βlastid

90 }

91 }

92 Delete-On

93 LstNodes-Nodes

94 ♦INCLUDE finder3. mc

95 goto start 96

97 :deleteit

98 Delete-Off

99 DELENT LastEnt

100 if (Points)

101 for (n-0 ; n<LstNodes ; n-n+D

102 DELENT PntlDs [n]

103 LstNodes-0

104 ♦INCLUDE f nder3.inc

105 goto start 106

107 :exit

108 Mode normal

109 clear PntNodes, PntlDs,polygoon,Fx,Fy,Fz,Fcntl

110 ♦INCLUDE fιnder2.mc

111 EXIT

QUAD-ANG.CDP Monday, March 28, 1994 9:21 am Pag

1 rem QUADiANG.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rightε reεerved

4 rem Deεigned to work with: Faro Metrecom/CADKEY/FastSURF 5

6 local Rotlndex, Quad

7 DOUBLE Rangle, RotAngle 8

9 /* Calculate Quad of X Point */

10 Pnt2PlnD- ( ( (YZwgp[9] *Dx) + (YZwg [10] *Dy) + (YZwg [11] *Dz) +YZwgp[12] ) /\

11 sqrt ( (YZwgp[9] Λ 2) + (YZwgp[10] * 2) + (YZwgp[11] * 2) ) )

12 if (Pnt2PlnD>-0)

13 Qx-1

14 else

15 Qx—1 J.6

17 /* Calculate Quad of Y Point */

18 Pnt2PlnD- ( ( (XZwgp[9] *Dx) + (XZwgp[10] "Dy) + (XZwgp[11] *Dz) +XZwgp[12] ) /\

19 sqrt ( (XZwgp[9] * 2) + (XZwgp[10] "2 ) + (XZwgp[11] '2) ) )

20 if (Pnt2PlnD<-0)

21 Qy-1

22 else

23 Qy—1 24

25 /* Calculate Quad of Z Point */

26 Pnt2PlnD- ( ( (XYwgp[9] *Dx)+ (XYwgp[10] *Dy) * (XYwgp[11] *Dz) +XYwgp[12] ) /\

27 sqrt ( (XYwgp[9] * 2) + (XYwgp [10] '2) + (XYwg [11] * 2) ) )

28 if (Pnt2PlnD>-0)

29 Qz-1

30 else

31 Qz—1 32

33 if ( (Qx—1) ii (Qy--D ϋ (Qz—1) )

34 Quad-1

35 if ((Qx—1) ii (Qy—1) ii (Qz—D)

36 Quad-2

37 if ((Qx—-1) ii (Qy—-1) ii (Qz—1) )

38 Quad-3

39 if ((Qx—D ii (Qy—-1) ii (Qz—D)

40 Quad-4

41 if ((Qx—D ii (Qy—1) ii (Qz—-D)

42 Quad-5

43 if ((Qx—-1) ii (Qy—1) ii (Qz—1) )

44 Quad-6

45 if ((Qx—-1) ii (Qy—1) ii (Qz—-1) )

46 Quad-7

47 if ((Qx—D ii (Qy—-1) ii (Qz—1) )

48 Quad-8 49

50 on RotAxis goto Zaxis, Yaxis, Xaxis 51

52 : axiε

53 Rotlndex-O

54 Pnt2PlnD- ( ( (YZwgp [9] *Dx) + (YZwgp [10] *Dy) + (YZwgp [11] *Dz) +YZwgp [12] ) Λ

55 sqrt ( (YZwgp [9] "2 ) + (YZwgp [10] * 2 > + (YZwgp [11] * 2 ) ) )

56 Dx-Dx+ (-Pnt2PlnD*YZwgp [9] )

57 Dy-Dy+ ( -Pnt2PlnD*YZwgp [10] )

58 Dz-Dz+ ( -Pnt2PlnD* YZwgp [11] )

59 Da-Origin [0] -Dx

60 Db-Origin [l] -Dy

61 Dc-0rigin [2] -Dz

62 Rangle- (acoε ( ( (XYwgp[9] *Da) ♦ (XYwgp[10] *Db) + (XYwgp [11] "Dc) ) /\

63 (sqrt ( (XYwgp[9] "21+ (XYwgp[10] * 2) + (XYwgp[11] * 2) ) "sqrt ( (Da"2) + (Db * 2) ♦ (Dc * 2) ) ) ) )

64 rem pause "Quad- Vd, X Rotation - V.2f", Quad, Rangle €5 if ((Quad—1) | | (Quad—2))

66 Rangle-Rangle-90

67 if ((Quad—4) | | (Quad—31)

68 Rangle--Rangle+270

69 if ((Quad—8) || (Quad—7))

70 Rangle--Rangle+270

71 if ((Quad«5) || (Quad—61)

72 Rangle-Rangle+270

73 if (Views— orld)

158

QDADiANG.CDP Monday, March 28, 1994 9:21 am Page

74 XYZrot [Rotlndex] -XYZro [Rotlndex] +Rangle

75 else

76 XYZmag [Rotlndex] -XYZmag [Rotlndex] +Rangle

77 goto exit 78

79 :Yaxiε

80 Rot Index- 1

Bl Pnt2PlnD- ( ( (XZwgp [9] "Dx) + (XZwgp [10] *Dy) + (XZwgp [11] *Dz) +XZwgp [12] ) Λ

82 sqrt ( (XZwgp [9] * 2) + (XZwgp [10] "2) + (XZwgp [11] * 2> ) )

83 Dx-Dx+(-Pnt2PlnD*XZwgp[9] )

84 Dy-Dy+(-Pnt2PlnD*XZwgp[10])

85 Dz-Dz+(-Pn_2PlnD*XZwgp[ll])

86 Da-Origin [0] -Dx

87 Db«Origin[l]-Dy 88 De-Origin [2 ] -Dz

89 Rangle- (acos ( ( (YZwgp [9] *Da) + (YZwgp [10] *Db) + (YZwgp [11] *Dc) ) Λ

90 (sqrt ( (YZwgp [9] * 2) + (YZwgp [10] * 2) + (YZwgp [11] A 2) ) "sqrt ( (Da * 2) + (Db * 2) + (Dc * 2) ) ) ) )

91 rem pause "Quad- Vd, Y Rotation - V.2f", Quad, Rangle

92 if ((Quad— 4) || (Quad— 1) )

93 Rangle--Rangle+450

94 if ((Quad—3) | | (Quad—2) )

95 Rangle--Rangle+90

96 if ((Quad—7) | | (Quad—6))

97 Rangle-Rangle+90

98 if ((Quad—8) | | (Quad—5) )

99 Rangle-Rangle+90

100 if (Views—World)

101 XYZrot [Rotlndex]-XYZrot [Rotlndex] *Rangle

102 else

103 XYZma [Rotlndex] -XYZma [Rotlndex] *Rangle

104 goto exit 105

106 :Zaxis

107 RotIndex-2

108 Pnt2PlnD- ( ( (XYwgp[9] *Dx) + (XYwgp[10] *Dy) + (XYwgp[11] "Dz) +XYwgp [12] ) Λ

109 sqrt ( (XYwgp[9] * 2) + (XYwgp[10] * 2) + (XYwgp [11] * 2) ) )

110 Dx-Dx+(-Pnt2PlnD"XYwgp[91)

111 Dy-Dy* (-Pnt2PlnD*XYwgp [10] )

112 Dz-Dz*(-Pnt2PlnD*XYwgp[ll] )

113 Da-Origin [0] -Dx

114 Db-Origin [1] -Dy

115 Dc-Origin[2] -Dz

116 Rangle- (acos ( ( (XZwgp[9] *Da) + (XZwgp[10] "Dbl ♦ (XZwgp[11] "Dc) ) /\

117 (sqrt ( (XZwgp[9] '2) + (XZwgp[10] '2) ♦ (XZwgp[11] * 2) ) "sqrt ( (Da * 2)+ (Db"2) + (Dc * 2) ) ) ) )

118 rem pause "Quad- Vd, Z Rotation - V.2f", Quad, Rangle

119 if ((Quad—1) | | (Quad—5))

120 Rangle--Rangle+90

121 if ((Quad—2) | | (Quad—6))

122 Rangle-Rangle*90

123 if ((Quad—3) | | (Quad—7) )

124 Rangle-Rangle+90

125 if ((Quad—4) | | (Quad—81)

126 Rangle--Rangle*450

127 if (Views— orld)

128 XYZrot [Rotlndex] -XYZrot [Rotlndex] +Rangle

129 else

130 XYZmag[Rotlndex] -XYZmag[Rotlndex] +Rangle

131 goto exit 132

133 :exit

134 EXIT

QUADANGR.CDP Monday, March 2B, 1994 9:21 am Pa

1 rem QUADANGR.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Deεigned to work with: Faro Metrecom/CADKEY/FaεtSURF 5

6 local Rotlndex, Quad

7 DOUBLE Rangle, RotAngle 8

9 /* Calculate Quad of X Point */

10 Pnt2PlnD- ( ( (YZwgp[9] *Dx) + (YZwgp[10] *Dy) + (YZwgp[11] « Dz) +YZwgp [12] ) /\

11 sqrt ( (YZwgp[9] '2) +(YZwgp [101 * 2) + (YZwgp[11] "2) ) )

12 if (Pnt2PlnD>-0)

13 Qx-1

14 else

15 Qx--1 16

17 /* Calculate Quad of Y Point */

18 Pnt2PlnD-( ( (XZwgp[9]*Dx)+ (XZwgp[10] *Dy)+ (XZwgp[11] "Dz)+XZwgp[12] )/\

19 sqrt ( (XZwgp[9] * 2) + (XZwgp[10] * 2) + (XZwgp[11] * 2) ) )

20 if (Pnt2PlnD<-0)

21 Qy-1

22 else

23 Qy--1 24

25 /* Calculate Quad of Z Point */

26 Pnt2PlnD- ( ( (XYwg [9]*Dx) + (XYwgp[10] *Dy) + (XYwgp[11] *Dz) +XYwgp[12] ) Λ

27 sqrt ( [XYwgp[9] ~2> + (XYwgp[10] '2)+ (XYwgp[11] * 2) ) )

28 if (Pnt2PlnD>-0)

29 Qz-1

30 else

31 Qz—1 32

33 if ((Qx—D ii (Qy—1) ii (Qz—1) )

34 Quad-1

35 if ((Qx—-1) ii (Qy—1) ii (Qz—D)

36 Quad-2

37 if ((Qx—-1) ii (Qy—-1) ii (Qz—1) )

38 Quad-3

39 if ((Qx—D ii (Qy—1) ii (Qz—D )

40 Quad-4

41 if ((Qx—D ii (Qy—1) ii (Qz—-1)1

42 Quad-5

43 if ((Qx—-1) ii (Qy—D ii (Qz—1) )

44 Quad-6

45 if ((Qx—D ii (Qy—-1) ii (Qz—-1) )

46 Quad«7

47 if ((Qx—1) ii (Qy—-1) ii (Qz—-1) )

48 Quad-8 49

50 on RotAxis goto Zaxis, Yaxis, Xaxis 51

52 :Xaxis

53 RotIndex-0

54 Pnt2PlnD- ( ( (YZwgp[9] *Dx) + (YZwgp [10] *Dy) + (YZwgp[11] *Dz) *YZwgp [12] ) Λ

55 sqrt( (YZwgp[9] ~2> +(YZwgp[10] * 2) ♦(YZwgp[11] '2) ) )

56 Dx-Dx* ( -Pnt2PlnD*YZwgp [91 )

57 Dy-Dy* ( -Pnt2PlnD*YZwgp [10] )

58 Dz-Dz+ ( -Pn_2PlnD*YZwgp [ll] )

59 Da-Origin [0] -Dx

60 Db-Origin dl -Dy

61 Dc-Origin [2] -Dz

62 Rangle- (acos ( ( (XYwgp[9] *Da) + (XYwgp[10] *Db) * (XYwg [11] "Del ) Λ

63 (εqrt ( (XYwgp [9] * 2) + (XYwgp [10] * 2) + (XYwgp[11] * 2) ) "sqrt I <Da * 2) * (Db * 2) + <Dc 2) ) ) ) )

64 rem pause "Quad- Vd, X Rotation - V.2f", Quad, Rangle

65 if ((Quad—1) | | (Quad—2))

66 {

67 if (Raπgle<-13S)

68 Rangle-Rangle-90

69 else

70 Rangle-Rangle+180

71 }

72 if ((Quad—4) || (Quad—3))

73 {

QUADANGR.CDP Monday, March 28, 1994 9:21 am Page

74 if (Rangle<-135)

75 Rangle--Rangle+450

76 else

77 Rangle--Rangle+180

78 }

79 if ((Quad—8) | | (Quad—7))

80 {

81 if (Rangle<-45)

82 Rangle--Rangle+360

83 else

84 Rangle--Rangle+90

85 }

86 if ((Quad—5) | | (Quad—6))

87 {

88 if (Ranglec-45)

89 Rangle-Rangle

90 else

91 Rangle-Rangle+270

92 }

93 if (Views—World)

94 XYZrot [Rotlndex]-XYZrot [Rotlndex] +Rangle

95 else

96 XYZmag[Rotlndex] -XYZmag[Rotlndex] +Rangle

97 goto exit 98

99 :Yaxis

100 RotIndex-1

101 Pnt2PlnD- ( ( (XZwgp [9] *Dx) ♦ (XZwgp[10) *Dy) + (XZwgp[11] *Dz) +XZwgp[12] ) Λ

102 sqrt ((XZwgp[9] "2) + (XZwgp [10] ~2)+ (XZwgp[11] ~2) ))

103 Dx-Dx+ ( -Pnt2PlnD*XZwgp [9] )

104 Dy-Dy+ (-Pnt2PlnD*XZwgp [10] )

105 Dz-Dz+ (-Pnt2PlnD"XZwgp [ll] )

106 Da-Origin [0] -Dx

107 Db-Origin [l] -Dy

108 Dc-Origin [2] -Dz

109 Rangle- (acos ( ( (YZwgp[9] *Da) + (YZwgp(10) *Db) + (YZwgp[11] "Dc) ) Λ

110 (εqrt ( (YZwgp [9] * 2) + (YZwgp[10] * 2) ♦ (YZwgp[11] * 2) )"εqrt ( (Da * 2)+ (Db * 2) + (Dc*2) ) ) ) )

111 rem pauεe "Quad- Vd, Y Rotation - V.2f", Quad, Rangle

112 if ((Quad—4) | | (Quad—1) )

113 {

114 if (Rangle<-135)

115 Rangle--Rangle+4S0

116 else

117 Rangle--Rangle+180 llβ }

119 if ((Quad—3) | | (Quad—2) )

120 {

121 if (Rangle<-45)

122 Rangle--Rangle+360

123 else

124 Rangle--Rangle*90

125 )

126 if ((Quad—7) | | (Quad—6))

127 {

128 if (Rangle<-45)

129 Rangle-Rangle

130 ' else

131 Rangle-Rangle*270

132 }

133 if ((Quad—8) | | (Quad—5) )

134 {

135 if (Rangle<-135)

136 Rangle-Rangle-90

137 else

138 Rangle«Rangle*180

139 }

140 if (Views—World)

141 XYZrot [Rotlndex] -XYZrot [Rotlndex) ÷Rangle

142 else

143 XYZmag[Rotlndex] -XYZmag[Rotlndex) +Rangle

146 :Zaxis

QUADANGR. CDP Monday, March 28 , 1994 9 : 21 am Pa

147 RotIndex-2

14β Pnt2PlnD- ( ( (XYwgp [9] *Dx) + (XYwg [10] *Dy) + (XYwgp [11] *Dz) +XYwgp [12] ) / \

149 sqrt ( (XYwgp [9] * 2 > + (XYwgp [10] * 2 ) + (XYwgp [11] * 2 ) ) )

150 Dx-Dx+ ( -Pnt2PlnD*XYwgp [9] )

151 Dy-Dy+ ( -Pnt2PlnD*XYwgp [10] )

152 Dz-Dz+ (-Pnt2PlnD*XYwgp [ll] )

153 Da-Origin [0] -Dx

154 Db-Origin [l] -Dy

155 Dc-Origin [2] -Dz

156 Rangle- (acos ( ( (XZwgp[9] *Da) + (XZwg [10] *Db) + (XZwgp[11] *Dc) ) /\

157 (sqrt( (XZwgp [9]~2>+ (XZwgp [10] ~2)+ (XZwgp[11]*2) )"sqrt ( (Da~2) + (Db A 2) + (Dc * 2) ) ) ) )

158 rem pause "Quad- Vd, Z Rotation « V.2f", Quad, Rangle

159 if ((Quad—1) | | (Quad—5))

160 {

161 if (Rangle<-45)

162 Rangle--Rangle+360

163 else

164 Rangle--Rangle+90

165 }

166 if ((Quad—2) | | (Quad—6))

167 {

168 if (Rangle<»45)

169 Rangle-Rangle

170 else

171 Rangle-Rangle+270

172 }

173 if ((Quad—3) | | (Quad—7))

174 {

175 if (Rangle<-135)

176 Rangle-Rangle-90

177 else

178 Rangle-Rangle+180

179 }

180 if ((Quad—4) | | (Quad—8))

181 {

182 if (Ranglec-135)

183 Rangle--Rangle*450

184 else

185 Rangle--Rangle+180 1B6 }

187 if (Views—World)

18β XYZrot [Rotlndex] -XYZrot [Rotlndex] +Rangle

189 else

190 XYZmag[Rotlndex] -XYZmag[Rotlndex] +Rangle

191 goto exit 192

193 :exit

194 EXIT

RBLDOPTV.CDP Monday, March 28, 1994 9:21 am Page rem RBldOptV.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

/* Build World and Optimized Views */

OldViews-Views prompt "Computing World View ..."

9 Views-World 10 dosub bldview.cdp 11 prompt "Computing Optimized View ..." 12 Views-Optimized 13 dosub bldview.cdp 14 Views-OldViews 15 16 if (Views—World) 17 { 18 /* Re-Calulate System Top/Front/Side Viewε */ 19 Set VIEW,VM[0] [9],VM[0] [10] 20 Set VIEW,VM[1] [9] ,VM[1] [10] 21 Set VIEW,VM[2] [9] ,VM[2] [10] 22 Set VIEW,7,2 23 } 24 if (Views— agnetic) 25 { 26 Set VIEW,VM[3] [9] ,VM[3] [10] 27 Set VIEW,VM[4) [9),VM[4] [10] 28 Set VIEW,VM[5] [9] ,VM[5] [10] 29 Set VIEW,VM[9] [9] ,VM[9] [10] 30 } 31 if (Views— Optimized) 32 { 33 Set VIEW,VM[6] [9] ,VM[6] [10] 34 Set VIEW,VM[7] [9] ,VM[7] [10] 35 Set VIEW,VM[8] [9] ,VM[8] [10] 36 Set VIEW,VM[9] [9] ,VM[9] [10] 37 ) 38 dosub bldplane.cdp 39 40 :exιt 41 EXIT

RBLOVIEW.CDP Monday, March 28, 1994 9:21 am Pag

1 rem RBLDVIEW.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 :Tθp

7 for (Vn-0; Vn<10, Vn-Vn+D

8 {

9 if (Vn— 0)

10 prompt "Refreshing World Views. . ."

11 if (Vn—3)

12 prompt "Refreshing Magnetic Viewε. . ."

13 if (Vn—6)

14 prompt "Refreshing Optimized Views. . ."

15 if (Vn«9)

16 prompt "Refreεhing ISO View. . ."

17 ViewNum-VMtVn] [9]

18 rem pause "Making CADL View Vd to System View Vd! ",Vn,VM[Vn] [9]

19 View ViewNu .V tVn] [0] ,VM[Vn] [1] ,VM[Vn] [2] ,VM[Vn] [3] ,VM[Vn] [4] ,VM[Vn] [5] ,VM[Vn] [6] ,VM[Vn] [7] ,VM[Vn] [8]

20 CALL cdlv2sysv,VιewNum,VM[Vn] [9]

21 View VM[Vn] [9] ,VM[Vn) [0] ,VM[Vn] [1] ,VM[Vn] [2] ,VM[Vn] [3] ,VM[Vn] [4] ,VM[Vn] [5] ,VM[Vn] [6] ,VM[Vn] [7] ,VM[Vn] [8]

22 rem pause "CADL View Vd to System View Vd Successfuly Built ! ",Vn,VM[Vn] [9]

23 syε_put name 2,VM[Vn] [9] , SSVnote [Vn]

24 } 25

26 :exιt

27 EXIT

RMAGWLD.CDP Monday, March 28, 1994 9:21 am Page

1 rem RMAGWLD.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FaεtSURF 5

6 local i 7

8 /* Re-Calulate Magnetic and Optimized Grid Planeε */

9 doεub gprεet.cdp

10 /* Re-Calulate Magnetic Views If Any Magnetic Rotation Angleε Are Set ♦/

11 if (XYZmagO [0] +XYZmag [0] +XYZmagO [l] +XYZmag [l] +XYZmagO [2) +XYZmag [2] )

12 {

13 MagFlag-True

14 dosub gprotate.cdp

15 MagFlag-False

16 }

17 /• Re-Calulate Optimized Viewε */

18 dosub gprotate.cdp

19 dosub gpmove.cdp

20 dosub calplane.cdp 21

22 :exit

23 EXIT

RMAGWLD2.CDP Monday, March 28, 1994 9.21 am p a

1 rem RMAGWLD2 CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rightε reserved

4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5

6 local i 7

8 /* Re-Calulate Magnetic and Optimized Grid Planes */

9 dosub gprset.cdp

10 /* Re-Calulate Magnetic Viewε If Any Magnetic Rotation Angleε Are Set */

11 if (XYZmagO [0] +XYZmag [0) +XYZmagO [l) +XYZmag [l] +XYZmagO [2] +XYZmag [2] )

12 {

13 MagFlag-True

14 dosub gprotate.cdp

15 MagFlag-False

16 }

17 /* Re-Calulate Optimized Views */

18 dosub gprotate.cdp

19 dosub gpmove.cdp

20 dosub calplane.cdp

21 dosub bldplane.cdp

22 auto -1

23 redraw -1 24

25 :exιt

26 EXIT

ROTGET. CDP Monday, March 28, 1994 9.21 am Pag

rem ROTGET.CDP rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reεerved rem Designed to work with. Faro Metrecom/CADKEY/FastSURF local RotFlag, OrgFlag, Rotlndex, DirP, DirS, PplnAxis DOUBLE Rangle, RotAngle

9 clear Fcntl,Fx.Fy.Fz,Fa,Fb.Fc 10

11 FιnderX-FιnderY-FmderZ-0

12 Rotλxis-RotAxiε+l

13 dosub rotsym. cdp

14 if (Rotate— Rrel)

15 11-12

16 else

17 ii-13

18 :top

19 MenuLev-MenuLev* 1

20 sprint SMenuStr, "Select Displacement Selection Method (Vd)* ,LastPick[ii]

21 getmenu SMenuStr,\

22 "Probe"A

23 "Mouse"A

24 "Key In"A

25 "Autolnc"A

26 SSViewstr [Views] , \

27 SSRaxis [Rot Axis] , \

28 "Rset Mag" , \

29 "GP Stats" , \

30 "3DR Help",MenuLev,LastPick i]

31 switch (βkey)

32 {

33 case -3:-2

37 break

38 case 1

39 LastPick[ii]-1

40 if (Pplane — NOplane)

41 {

42 pause "Primary Plane not set Use \"SetGrιd\" to enable Function"

43 break

44 )

45 if ((Pdιsp!-0) || (Sdisp!-0)1

46 {

47 OldPdisp-Pdisp

48 OldSdiεp-Sdiεp

49 Pdιsp-Sdιsp-0

50 dosub rmagwld cdp

51 RotAxιs«RotAxιs*l

52 dosub rotsym.cdp

53 }

54 prompt "Probe Select Rotation Angle"

55 DO

56 {

57 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

58 ♦INCLUDE f derl.inc

59 Bhit - Fcntl i 3

60 getkey

62 break

63 } WHILE (Bhit !- Bl)

64 if (Beep — On)

65 print "\007"

66 Rotlndex-Rotλxis

67 if (RotAxis — 0)

68 {

69 Dx-Fx

70 Dy-Fy

71 Dz-Fz

72 if (Rotate—Rrel)

73 dosub quadangr.cdp

ROTGET.CDP Monday, March 2B, 1994 9.21 am Page

74 else

75 dosub quadiang.cdp

76 }

77 if (RotAxis 1)

7B {

79 Dx-Fx

80 Dy-Fy

81 Dz-Fz

82 if (Rotate—Rrel)

83 doεub quadangr.cdp

84 elεe

85 doεub quadiang.cdp

86 }

87 if (RotAxiε — 2)

88 {

89 Dx-Fx

90 Dy-Fy

91 Dz-Fz

92 if (Rotate—Rrel)

93 doεub quadangr.cdp

94 else

95 dosub quadiang.cdp

96 }

97 if ((OldPdιsp'-0) | | (OldSdisp'-0)1

98 {

99 Pdisp-OldPdisp

100 Sdisp-OldSdisp

101 OldPdsιp-OldSdιsp-0

102 }

103 dosub rmagwld. cdp

104 dosub RBldOptV. CDP

105 Rotλxιs«RotAxιs*l

106 dosub rotsym. cdp

107 break

108 case 2

109 LastPick [nl -2

110 if ( (Pdιsp ' -0) | | (Sdιsp ' -0) )

111 {

112 OldPdiεp-Pdiεp

113 OldSdisp-Sdisp

114 Pdιsp-Sdιsp-0

115 dosub rmagwld.cdp

116 Rotλxιs-RotAxιs*l

117 dosub rotsym.cdp

119 getpos "Indicate Rotation Angle . . .",2 122 RotAxιε-RotAxιε+1 123 dosub rotsym cdp 124 break 12S } 126 f (βCURVP—2) 127 { 128 pause "Invalid Selection Window' Try Again .." 129 break 130 } 131 if (Beep -- On) 132 print "\007" 133 Rotlndex-RotAxis 134 if (RotAxis — 0) 135 { 136 if (βCURVP'-D 137 { 138 pause "Invalid Selection Window! Try Again . 139 break 140 } 141 Dx-βXWORLD 142 Dy-βYWORLD 143 Dz-βZWORLD 144 if (Rotate—Rrel) 145 dosub quadangr cdp 146 else

Page

ROTGET.CDP Monday, March 28, 1994 9 21 am Page

220 (

221 getflt "Enter World X Axis Auto Rotation (V.4f) ",AutoRotW[0] ,AutoRotW[0]

222 XYZrot [0] -XYZrot [0] *AutoRotW[0]

223 }

224 if (RotAxis—1)

225 {

226 getflt "Enter World Y Axis Auto Rotation (V 4f)•".AutoRot [1] .AutoRot [1]

227 XYZrot [1]-XYZrot [1] *AutoRotW[1]

228 }

229 if (RotAxis—0)

230 {

231 getflt "Enter World Z Axis Auto Rotation (V 4f) :",AutoRotW[2] ,AutoRotW[2]

232 XYZrot[2]-XYZrot [2] +AutoRotW[2]

233 }

234 }

235 else

236 {

237 if (RotAxis—2)

238 {

239 getflt "Enter Mag X Ax s Auto Increment (V 4f> ",AutoRotM[0] ,AutoP.tM[0]

240 XYZmag[0]-XYZmag[0] +AutoRotM[01

241 }

242 if (RotAxis—1)

243 {

244 getflt "Enter Mag Y Axis Auto Increment (V.4f) ",AutoRotM[l] ,AutoRotM[l]

245 XYZmag[1]-XYZmag[1] +AutoRotM[l]

246 }

247 if (RotAxιs—0)

248 {

249 getflt "Enter Mag Z Axis Auto Increment (V.4f) :",AutoRotM[2] ,AutoRotM[2]

250 XYZmag [2] -XYZmag [2] +AutoRotM [2]

251 }

252 }

253 dosub rmagwld.cdp

254 dosub RBldOptV.CDP

255 RotAxιs-RotAxιs*l

256 dosub rotsym.cdp

257 break 256 case 5

259 LastPick i]-5

260 dosub vstdopt.cdp

261 RotAx s-RotAxιs+1

262 dosub rotεym cdp

263 break

264 case 6

265 LastPick[ii]-6

266 dosub rotsym.cdp

267 break

268 case 7

269 LastPic di]-7

270 prompt "Computing Magnetic View ..."

271 MagOrgn[0]-XYZrot[0]

272 MagOrgn[1]-XYZrot[1]

273 MagOrgn[2]-XYZrot[2]

274 XYZmagO[0]-XYZmagO[0] +XYZmag[0]

275 XYZmagO[1] -XYZmagO[1] *XYZmag[l]

276 XYZmagO [2] -XYZmagO [2] +XYZmag [2]

277 XYZmag [0] -XYZmag [1] -XYZmag [2] -0

278 Views-Magnetic

279 dosub bldview cdp

280 dosub RBldOptV.CDP

281 RotAxιs-RotAxιε+1

282 dosub rotsym.cdp 263 break

284 case 8

285 LastPic [ii] -B

286 dosub gpstats cdp

287 break 28B case 9

2B9 LastPic [ii] -9

290 Menu-11

291 dosub 3drhelp.cdp

292 RotAxis-RotAxiε*!

Monday, March 28, 1994 9 21 am Page

ROTSYM.CDP Monday, March 28, 1994 9:21 am Pag

1 rem ROTSYM.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 INT AViews

7 DOUBLE VOrigin[3] , VMX[9]

8 ARRAY V0rιgιn[3]-{0,0,0}

9 ARRAY VMX[9]-{0,0,0,0.0,0,0,0,0}

10 if (MagPntlDtO))

11 {

12 for (ι»0 ι<8 i-i+l)

13 DELENT MagPntIDd]

14 ARRAY MagPntID[8]-(0,0,0,0,0,0,0,0}

15 } 16

17 AVιews-1

18 RotAx s-RotAxιs-1

19 if (RotAxιs<0)

20 RotAxιs-2 21

22 if (Views—World)

23 Vn-0+RotAxis

24 if (Views— Magnetic)

25 Vn-3+RθtAxιs

26 if (Views— Optimized)

27 Vn-6+RotAxιs 28

29 auto -1

30 redraw -1

31 mode draw

32 View AViews, VMtVn) [0] ,VM[Vn] [1] , VMtVn] [2] ,VM[Vn] [3] ,VM[Vn] [4] ,VM[Vn] [5] ,VM[Vn] [6] , VMtVn] [7] ,VM[Vn] [8]

33 CALL cdlv2sysv, AViews, MtVn] [9]

34 View VMtVn] [9] ,VM[Vn] [0] ,VM(Vn] tl] ,VM[Vn] [2] , VMtVn] [3] .VMtVn] [4] , VMtVn] tS) ,VM[Vn] [6] ,VM[Vn] [7] .VMtVn] [8]

35 VMXIO] -VMtVn] [0]

36 VMXtl] -VMtVn] [1]

37 VMX[2]-VM[Vn] [2]

38 VMX[3]-VM[Vn] [3]

39 VMX [4 ] -VM [Vn] [4]

40 VMXtS]-VM[Vn] 15]

41 VMX [6] -VMtVn] [6]

42 VMX[7] -VMtVn] [7]

43 VMX [8] -VMtVn] [8]

44 CALL xfmwv, VMX, Origin [0] ,Or gιn[l] ,Orιgιn[2] ,VOrιgm[0] .VOrigindl ,VOrιgιn[2]

45 circle VOrιgm[0] , VOrigmd], VOrιgιn[2], GndSize, AViews, LRed

46 circle VOπgintO] , VOrigmd] , VOrιgιn[2], (GrιdSιze/3) , AViewε, LRed

47 vpoint VOπgintO], VOrigmd), VOrιgιn[2], AViews, LRed

48 mode normal 49

50 /* Gr d Plane Compass */

51 rem X i Z Axis Compass

52 if ( (RotAxis — 2) | | (RotAxis — 0))

53 {

54 vpoint VOriginIO] +GrιdSιze, VOrigindl, V0rιgm[2] , AViews, Red, MagCompL

55 MagPntID[0]-βlaεtιd

56 vpoint VOrigmtO] + (GrιdSιze".7071) , VOrigmd] ♦ (GndSize* .7071) , V0πgιn[2], AViews, LRed, MagCompL

57 MagPntlDtl] -βlastid

5B vpoint VOrigmtO], VOrigindl +GrιdSιze, V0rιgιn[2], AViews, Blue, MagCompL

59 MagPntID [2] -βlastid

60 vpoint VOrig tO] - (GndSize* 7071) , VOrigmd] + (GndSize* .7071) , VOrιgιn[2], AViews, LRed, MagCompL

61 MagPntID [3] -βlastid

62 vpoint VOrigmtO] -GndSize, VOrigindl , VOr gm[2], AViews, Gray, MagCompL

63 MagPntID [4] -βlastid

64 vpoint VOrigmtO] - (GndSize* .7071) , VOrigindl - (GndSize* .7071) , VOrιgιnt2], AViews, LRed, MagCompL

65 MagPntID [5] -βlastid

66 vpoint VOriginIO] , VOrig [1] -GndSize, V0πgιn[2], AViews, Green, MagCompL

67 MagPntID[6] -βlastid

68 vpoint VOrigmtO] + (GndSize* .7071) , VOrigintl] - (GndSize* 7071), VOrιgm[2], AViews, LRed, MagCompL

69 MagPntID[7]-βlastid

70 }

71 rem Y Axis Compasε

72 if (RotAxis — 1)

73 {

ROTSYM.CDP Monday, March 28, 1994 9 21 am Page

74 vpoint VOrig tO], VOrigm[1] +GrιdSιze, VOrιgιn[2], AViews, Red, MagCompL

75 MagPntID[0] -βlastid

76 vpoint VOrigmtO] + (GrιdSιze* 7071), VOrigindl + (GndSize* 7071), VOπgm[2], AViews, LRed, MagCompL

77 MagPntID[1] -βlastid

78 vpoint VOriginIO] -GndSize, VOnginll], VOrιgιn[2], AViews, Blue, MagCompL

79 MagPntID[2]-βlastid

80 vpoint VOrιgιn[0]+ (GndSize*.7071) , VOrigm[1] - (GndSize* 7071), VOrιgιn[2], AViews, LRed, MagCompL

81 MagPntID[3]-βlastid

82 vpoint VOrig tO], VOrigindl -GndSize, VOrιgιn[2], AViews, Gray, MagCompL

83 MagPntID [4] -βlastid

84 vpoint VOrigin IO] - (GndSize* 7071) , VOrigm d] + (GndSize* .7071) , VOrιgιn [2] , AViews, LRed, MagCompL

85 MagPntID [5] -βlastid

86 vpoint VOrig tO] +GrιdSιze, VOrigm tl] , VOrιgm [2] , AViews , Green, MagCompL

87 MagPntID [6] -βlastid

8β vpoint VOrigin IO] - (GndSize* .7071) , VOrigm [1] - (GndSize* 7071) , VOπgιn [2] , AViews , LRed, MagCompL

69 MagPntID [7] -βlastid

90 } 91

92 :exιt

93 clear AViews, VOrigin, VMX

94 EXIT

SETFRAME.CDP Monday, March 28, 1994 9:21 am Page

1 rem SETFRAME.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work w th: Faro Metrecom/CADKEY/FastSURF 5 6 clear Fcntl, Fx, Fy, Fz, Fa, Fb. Fc 7 FmderX-FιnderY-FιnderZ-0 8 ARRAY Frame [4] [3] 9 10 if (FrameEnt) 11 { 12 DELENT FrameEnt 13 FrameEnt-0 14 } 15 16 :Start 17 ARRAY PntNodes [4] [3] 18 Bhιt-0 19 prompt "Select lower left hand of page with Probe." 20 DO 21 { 22 readdev Fcntl,Fx.Fy.Fz,Fa.Fb.Fc 23 ♦INCLUDE fmderld.inc 24 Bhit - Fcntl i 3 25 getkey

- Bl) 30 Frame [0] [l]-0 31 Frame [0] [2]-Fy 32 ♦INCLUDE finderO.inc 33 ♦INCLUDE waitrell.inc 34 mode draw 35 point Frame tO] [0],Frame [0] [1],Frame [0] [2],White 36 mode normal 37 f (Beep — On) 38 print "\007" 39 prompt "Select upper right hand of page with Probe." 40 DO 41 { 42 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc 43 ♦INCLUDE fmderld.inc 44 Bhit - Fcntl i 3 45 getkey

- Bl) inc 50 Frame [2] [0]-Fx 51 Frame [2] tl]-0 52 Frame [2] [2]-Fy 53 ♦INCLUDE waitrell.inc 54 mode draw 55 point Frame [2] [0] .Frame [2] til .Frame 12] [2] .White 56 mode normal 57 if (Beep — On) 5B print "\007" 59 60 Frame d] [0] -Frame [2] [0] 61 Frame d) ll] -0 62 Frame d! [2] -Frame [0] [2] 63 64 Frame [3] [0] -Frame [0] [0] 65 Frame 13] [l] -0 66 Frame [3] [2] -Frame [2] [2] 67 68 POLYLINE 4 , Frame , 2 , 2 2 , 1 , hite , , 2 69 FrameEn -βlaεt id 70 71 :exιt 72 auto -1 73 redraw -1

SETFRAME.CDP Monday, March 28, 1994 9:21 am Page

74 clear Frame,Fcntl,Fx,Fy,Fz

75 EXIT

SMTHG3P.CDP Monday, March 28, 1994 9.21 am Pag

1 rem SMTHG3P.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 DOUBLE TempXYZ[3] ,a,b,c,d,e,f.distAB,distBC, tdistAB 7

8 rem Re-calculate 3rd Point as 90 degree vector off Line AB

9 rem Determine Length of Line Segment AB i BC

10 distAB-sqrt( (G3Pos[1] [0] -G3Pos [0] [0] ) "2+\

11 (G3POS [1] [1] -G3POS [0] [1] ) "2+\

12 (G3Pos[l) [2]-G3Pos[0] [2]) 2)

13 distBC-sqrt ( (G3Pos [2] [0] -G3Pos [1] [0] ) * 2+\

14 (G3Poε [2] [1] -G3P08 [1] [1] ) * 2 + \

15 (G3Pos [2] [2] -G3Pos [l] [2] ) * 2 >

16 rem Calculate the direction cosines of AB

17 a- ( (G3Pos [1] [0] -G3Pos [0] [0] ) /distAB)

18 b- ( (G3Pos [1] [1] -G3Pos [0] [1] )/distAB)

19 c- ( (G3Pos [1] [2] -G3Pos [0] [2] ) /diεtAB)

20 rem Calculate the direction cosines of BC

21 d- ( (G3Pos [2] [0] -G3Poε [1] [0] ) /distBC)

22 e- ( (G3Pos [2] [1] -G3Pos [1] [1] ) /distBC)

23 f- ( (G3Pos [2] [2] -G3Pos [1] [2] ) /distBC)

24 rem Calculate the length of the 90 intercept AC uεing d-BC*εqrt (1- (coε * 2) )

25 dιstAC-dιstBC*sqrt(l-( ( ( (a*d) ♦ (b*e) + (c*f) ) "2 ) ))

26 rem Calculate length from Point 2 to the 90 degree intercept of AB

27 tdistAB-sqrt ( (d stBC * 2) - (dιstAC * 2) )

28 rem Calculate the point location of the 90 degree intercept of AB

29 TempXYZ[0] -G3POS[1] [0] +( ( (G3POS[0] [0] -G3POS tl] [0] )/distAB) "tdistAB)

30 TempXYZ[1] -G3Pos [1] [1] + ( ( (G3Pos [0] [1] -G3Pos [1] [1] ) /distAB) *tdιstAB)

31 TempXYZ [2] -G3Pos [1] [2] + ( ( (G3Pos [0] [2] -G3Pos [1] [2] ) /diεtAB) "tdiεtAB)

32 rem pause "AB V.2f BC V.2f AC V.2f tAB V.2f" ,diεtAB,distBC,distAC,tdistAB

33 rem Calculate 3rd Point as a directed length vector of 1 off 1st Point

34 G3Pos [2] [0] -G3Pos [0] [0] + ( (G3Pos [2] [0] -TempXYZ [0] ) /distAC)

35 G3Pos [2] [1] -G3Poε [0] [1] ♦ ( (G3Pos [2] [1] -TempXYZ [1] ) /distAC)

36 G3POS [2] [2] -G3Pos [0] [21 + ( (G3Pos [2] [2] -TempXYZ [2] ) /distAC)

37 rem Unitize 2nd and 3rd Points

38 rem First calculate 2nd Point as a directed length vector of 1 off lεt Point

39 G3Pos [1] [0] -G3Pθ8 [0] [0] + ( (G3Poε [1] [0] -G3Poε [0] [0] ) /diεtAB)

40 G3Poε [1] [1] -G3POS [0] [1] + ( (G3POS [1] [1] -G3POS [0] [1] ) /distAB)

41 G3Pos [1] [2] -G3Pos [0] !2] + ( (G3Pos [1] [2] -G3Pos [0] [2] ) /distAB) 42

43 /* Calculate The Equation of the Plane */

44 /* F nd the direction ratios of line AB */

45 a-G3Pos [1] [0] -G3Pos [0] [0]

46 D-G3POS [1] [1] -G3P08 [0] [1]

47 c-G3Pos[l] [2]-G3Pos[0] [2]

48 /* Find the direction ratios of line AC */

49 d-G3Pos [2] [0] -G3Pos [0] [0]

50 e-G3Pos [2] [1] -G3Pos [0] [1]

51 f-G3Pos [2] [2] -G3POS [0] [2]

52 /* Find the direction ratios of the Normal to AB i AC */

53 CALL CROSS , ABCD IO] , ABCD [1] , ABCD [2] , a , b, c , d, e , f

54 CALL DOTPROD. G3Pos [2] [0] , G3Pos [2] [1] , G3Pos [2] [2] , ABCD IO] , ABCD [1] , ABCD [2] , ABCD [3]

55 ABCD [3 ] -0-ABCD [3] 56

57 : exιt

58 EXIT

TLEVOFF.CDP Monday, March 28, 1994 9:21 am Page

1 rem TLEVOFF.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FaεtSURF

5

6 Local Slevel, Ilevel

7

8 :top

9 DispMas [0] -βlevels [0]

10 DispMask[1] -βlevels [1]

11 DispMas [2] -βlevels [2]

12 DispMask[3] -βlevels [3]

13 DispMask[4]-βlevelε [4]

14 DispMask[5] -βlevels [5]

15 DispMas [6] -βlevels [6]

16 DispMas [7]-βlevels [7]

17 DispMas [81 -βleveIs [8] lβ DispMas [9] -βlevels [9]

19 DispMas [10] -βlevels [10]

20 DispMaεk[11]-βlevels [11]

21 DispMask[12] -βlevels [12]

22 DispMask [13] -βlevels [13]

23 DispMas [14] -βlevels [14]

24 DispMaεk[15] -βlevelε [15]

25

26 Slevel- loor(TogLev/16)

27 Ilevel- ( ( (TogLev/16) -Slevel) "16)

28 rem Toggle Display Level Off

29 DispMask[Slevel]- (DispMask[Slevel] ♦ Binlllevel])

30 SET levelmask,DispMask

31 redraw -l

32 :exit

33 Clear Slevel, Ilevel

34 EXIT

TLEVON. CDP Monday, March 28, 1994 9.21 am Page

1 rem TLEVON.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with- Faro Metrecom/CADKEY/FastSURF

5

6 Local Slevel, Ilevel

7

8 :top

9 DispMask[0] -βlevels [0]

10 DispMask[1]-βlevels [1]

11 DispMask[21-βlevels[2]

12 DispMask[3]-βlevels[3]

13 DispMas [4]-βlevels[4]

14 DispMask[5] -βlevels[5]

15 DispMas [6]-βlevels[6]

16 DispMas [7] -βlevels [7]

17 DispMas [8]-βlevels[8]

18 DispMask[9]-βlevelε[9]

19 DiεpMask[10]-βlevels [10]

20 DispMask[11]-βlevels [11]

21 DispMask[12]-βlevels [12]

22 DispMask[13] -βlevels [13]

23 DispMask[14] -βlevels[14]

24 DispMask[15]-βlevels[15]

25

26 Slevel-floor(TogLev/16)

27 Ilevel- ( ( (TogLev/16) -Slevel) "16)

28 rem Toggle Display Level On

29 DispMas [Slevel]- (DispMask[Slevel] Bin[Ilevel] )

30 SET levelmask,DiεpMask

31 redraw -l

32 :exιt

33 Clear Slevel, Ilevel

34 EXIT

TOOLS.CDP Monday, March 28, 1994 9 21 am Pag

1 rem TOOLS.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5 6 if ( (ToolMode!-0) | | (ToolMode!-6) ) 7 ToolMode-0 8 :top 9 11-3 10 MenuLev-MenuLev*1 11 sprint SMenuStr, "Select Tool (Vd) ".LastPickdi] 12 getmenu SMenuStrA 13 "Arc"A 14 "Circle"A 15 "Polygon", \ 18 SSViewstr [Viewε] , \ 19 SSModeX [ToolMode] , \ 20 "Control " , \ 21 "3DR Help",MenuLev, astPic [ii] 22 switch (βkey) 23 { 24 case -3

29 LastPick [n] -l 30 Arc-True 31 dosub circle.cdp 32 Arc-False 33 break 34 case 2 35 LastPick di] -2 36 Circle-True 37 dosub circle.cdp 38 Circle-False 39 break 40 case 3 41 LastPick [ii] -3 42 dosub polygon.cdp 43 break 44 case 4 45 LastPic [41-1 46 Views-World 47 dosub vstdopt2.cdp 48 dosub view cdp 49 break 50 case 5 51 LastPickdi] -5 52 dosub autoseg.cdp 53 break 54 case 6 55 LastPick [ii] -6 56 dosub vstdopt.cdp 57 break 58 case 7 59 LastPick [ii] -7 60 if (ToolMode—0) 61 ToolMode-6 62 else 63 ToolMode-0 64 break 65 case 8 66 LastPick[ i] -8 67 dosub control.cdp 68 break 69 case 9 70 LastPic [ill -9 71 Menu-4 72 dosub 3drhelp.cdp 73 break

Monday, March 28, 1994 9.21 am Pag

TRACK.CDP Monday, March 28, 1994 9 21 am Page

1 rem TRACK.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 6 clear Fcntl, Fx. Fy. Fz, Fa, Fb. Fc 7 FιnderX-FιnderY-FmderZ-0 8 9 : start 10 Bhιt-Delete-0 11 :top 12 DO 13 { 14 readdev Fcnt1,Fx.Fy.Fz,Fa,Fb,Fc 15 if (FndrPntr) 16 { 17 mode draw 18 Pnt2PntD-sqrt ( (FmderX-Orιgιn [0] ) * 2+\ 19 (FinderY-Origin d) ) * 2+\ 20 (FmderZ-Orιgιn [21 ) "2) 21 if (Pnt2PntD) 22 { 23 xl-FinderX* ( ( (FmderX-Origin [0] ) /Pnt2PntD) * (Gr dSιze/3 ) ) 24 yl-FinderY* ( ( (FinderY-Ongin [1] ) /Pnt2PntD) * (GrιdSιze/3 ) ) 25 zl-FinderZ* ( ( (FmderZ-Origin [2] ) /Pnt2PntD) * (Gπd≤ιze/3 ) ) 26 line xl , yl, zl , FιnderX, FιnderY, FιnderZ, Black, , 1, , , ,βlwιdth+4 27 ) 28 mode normal 29 } 30 ♦ INCLUDE finderl . mc 31 if (FndrPntr) 32 { 33 Pnt2PntD-sqrt ( (FinderX-Ongm lOl ) ~2+\ 34 (FinderY-Origm [1] ) * 2+\ 35 (FιnderZ-Orιgιn [2] ) * 2) 36 if (Pnt2PntD) 37 { 38 mode draw 39 xl-FinderX* ( ( (FmderX-Origin[01 )/Pnt2PntD)* (GrιdSιze/3) ) 40 yl-FinderY* ( ( (FinderY-Ongin[1] )/Pnt2PntD)* (GrιdSιze/3) ) 41 zl»FιnderZ * ( ( (FmderZ-Orιgιn[2) )/Pnt2PntD) *(GrιdSιze/3) ) 42 line xl,yl,zl,FιnderX,FinderY,F derZ,LGreen, ,1 43 mode normal 44 } 45 } 46 ♦INCLUDE track2 inc 47 Bhit - Fcntl i 3 48 getkey

52 exitloop 53 } WHILE (Bhit — None) 54 if ((βkey -- Del) ii (Delete — On)) 55 goto deleteit 56 on Bhit goto top, ex t, B101, top 57 58 :B101 59 ♦INCLUDE finderO mc 60 if (FndrPntr) 61 { 62 mode draw 63 Pnt2PntD-sqrt ( (FιnderX-Orιgιn [0] ) * 2*\ 64 (FinderY-Origin d] ) ~2+\ 65 (FιnderZ-Orιgιn [2) ) "2 ) 66 if (Pnt2PntD) 67 { 68 xl-FιnderX+ ( I (FinderX-Oπgin[0] ) /Pnt2PntD) * (GπdSιze/3) ) 69 yl-FιnderY+( ( (FinderY-Orig tll ) /Pnt2PntD)* (GrιdSιze/3) ) 70 zl-FιnderZ+( ( (FιnderZ-Oπgιn[2] ) /Pnt2PntD)* (GrιdSιze/3) ) 71 line xl.yl.zl,FmderX,FinderY,FinderZ,Black, ,1, , , ,βlwιdth+4 72 } 73 mode normal

TRACK.CDP Monday, March 28, 1994 9.21 am Pag

74 }

75 point Fx,Fy,Fz, β color

76 if (Beep — On)

77 print "\007"

78 LstPoint-βlastid

79 Delete-On

80 ♦INCLUDE waitrell inc

81 goto top 82

83 :deleteιt

84 Delete-Off

85 DELENT LstPoint

86 goto start 87

88 :exιt

89 clear Fcntl , Fx, Fy, Fz, Fa, Fb. Fc

90 ♦INCLUDE fιnder2. mc

91 if (FndrPntr)

92 {

93 mode draw

94 Pnt2PntD-sqrt ( (FmderX-Orιg n [0) ) "2+\

95 (FιnderY-Oπgιn [l] ) * 2+\

96 (FιnderZ-0rιgιn [2) ) * 2)

97 if (Pnt2PntD)

98 {

99 xl-FmderX+ ( ( (FinderX-Origin[0] ) /Pnt2PntD) (GrιdSιze/3) )

100 yl-FιnderY+ ( ( (FinderY-Origind] ) /Pnt2PntD) * (Gr dSιze/3) )

101 zl-FιnderZ+( ( (FιnderZ-Orιgιn[2] ) /Pnt2PntD) * (GrιdSιze/3) )

102 line xl.yl, zl.FinderX,FinderY,FinderZ,Black, ,1, ,, ,βlwιdth+4

103 }

104 mode normal

105 }

106 auto -1

107 redraw -l

108 EXIT

TRACK2.CDP Monday, March 28, 1994 9:21 am Page

1 rem TRACK2.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5 6 DOUBLE Pnt2PntD,01dMagX,01dMagY,01dMagZ 7 8 Pnt2PntD-sqrt ( (FιnderX-Orιgιn [01 ) "2*\ 9 (FmderY-Ongin [1] ) * 2 + \ 10 (FιnderZ-Oπgιn [2] ) A 2 ) 11 if (Pnt2PntD<0 . 000001 ) 12 goto exit 13 14 if (Views!-World) 15 { 16 XYZrot [0]-XYZrot [0] *-l 17 XYZrot [11 -XYZrot [1] *-l IB XYZrot [2] -XYZrot [2]*-l 19 XYZmagO[01 -XYZmagO[01 *-1 20 XYZmagO[1]-XYZmagO[11 *-1 21 XYZmagO[2] -XYZmagO[2] *-1 22 if (Views—Magnetic) 23 { 24 OldMagX-XYZmag [0] 25 OldMagY-XYZmag tl] 26 OldMagZ-XYZmag [2] 27 XYZma [0] -XYZmag [1] -XYZmag [2] -0 26 } 29 else 30 { 31 XYZmag [0] -XYZmag[0] *-l 32 XYZmag[1] -XYZmag[11 *-1 33 XYZmag [2] -XYZmag [2] *-l 34 } 35 XYZ tOl -FinderX-Ongm tO] 36 XYZ tl] -FinderY-Ongin [1] 37 XYZ [2] -FinderZ-Oπgm [2 ] 38 if (XYZmagO [0] +XYZmag [0] *XYZmagO [1] +XYZmag [1] *XYZmagO [2] +XYZmag [2] ) 39 { 40 MagFlag-True 41 dosub magrot.cdp 42 MagFlag-False 43 ) 44 dosub xyzrot . cdp 45 xl-XYZ [ 0] 46 yl-XYZ [l] 47 zl-XYZ [2 ] 48 XYZrot [0] -XYZrot [0] * - l 49 XYZrot [1] -XYZrot [1] * -l 50 XYZrot [2] -XYZro [2] * - l 51 XYZmagO [ 01 -XYZmagO [ 0 ] * - 1 52 XYZmagO [ 1 ] -XYZmagO [ 11 * - 1 53 XYZmagO [2] -XYZmagO [2] *-l 54 if (Views— agnetic) 55 { 56 XYZmag[0] -OldMagX 57 XYZmag[1]-OldMagY 58 XYZmag[2] -OldMagZ 59 } 60 else 61 { 62 XYZmag [0] -XYZmag[0] *-l 63 XYZmag [1] -XYZmag 11] *-1 64 XYZmag [2] -XYZmag[2] *-l 65 } 66 } 67 68 if (Views—World) 69 { 70 xl-FinderX-Origm [0] 71 yl-FmderY-Origin [1] 72 zl-FmderZ-Ongm [2] 73 }

Monday, March 28, 1994 9:21 am Pag

Z-V8.4f: XY-V6.2f XZ-V6.2f YZ-V6.2f" ,xl,yl, Zl,x2,y2,z2

VIEW.CDP Monday, March 28, 1994 9.21 am Page

1 rem VIEW.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF

5 rem Create A User Defined View Or ISO View (CADKEY View 7) for Viewport #2 6

7 sys_autovp 0 , 0

8 Set~VIEW,VM [9] [9] , 0

9 FmderX-FιnderY-FιnderZ-0 10

11 : start

12 n-17

13 G3Pcount-0

14 MenuLev-MenuLev*1

15 sprint SMenuStr, "Select View Option (Vd) ".LastPickdi]

16 getmenu SMenuStr,\

17 "Rset ISO"A

18 "SetWιnd2",\

19 " - "A

20 " - "A

21 " - "A

22 " - "A

23 " - "A

24 " - "A

25 "3DR Help",MenuLev,LastPickdi]

26 switch (βkey)

27 .

28 case -3:-2

29 goto exit

30 break

31 case 1

32 LastPick[ii]-1 0.707106781187

-0.40824829046

0.577350269190

0.707106781187

0.40824829046 -0.577350269190

0.000000000000

0.81.49656093

0.577350269190 7

(Vd)",LastPick[m]

VIEW CDP Monday, March 28, 1994 9 21 am Page

You entered Vd",G3Pcount

You entered Vd",G3Pcount

VIEW. CDP Monday, March 28, 1994 9:21 am Page

147 Vyl-G3Pos[0] [1]

148 Vzl-G3Pos[0] [2]

149 Vx2-G3Pos[l] [0]

150 Vy2-G3Pos[l] [1]

151 Vz2-G3Pos[l] [2]

152 Vx3-G3Pos[2] [0]

1S3 Vy3-G3Pos[2] [1]

154 Vz3-G3Pos[2] [2]

155 goto MakeView

156

157 : akeView

158 dosub 3DR2CK.CDP

159 if (ViewErr)

160 goto start

161 VM[9] [0] -Vmatrix [0]

162 VM[9] [1] -Vmatrix [1]

163 VM[9] [2] -Vmatrix [2]

164 VM[9] [3]-Vmatrix[3]

165 VM[9] [4] -Vmatrix [4]

166 VM[9] [5] -Vmatrix [5]

167 VM[9] [6)-Vmatrix[6]

168 VM[9] [7] -Vmatrix [7]

169 VM[9] [8] -Vmatrix [8]

170

171 REM Define the view

172 View 15,VM[9] [0] ,VM[9] [1] ,VM[9] [2] ,VM[9] [3] ,VM[9] [4] ,VM[9] [5] ,VM[9] [6] ,VM[9] [7] ,VM[9] [8]

173 CALL cdlv2sysv,15,VM[9] [9]

174 View VM[9] [9] ,VM[9] [0] ,VM[9] [1] ,VM[9] [2] ,VM[9] [3] ,VM[9] [4] ,VM[9] [5] ,VM[9] [6] ,VM[9] [7] ,VM[9] [8]

175 Set VIEW,VM[9] [9] ,0

176 syε_put_name 2,VM[9] [9] .SSVnote [9]

177 auto -1

178 redraw -1

179 goto start

180

181 :exit

182 MenuLev-MenuLev-1

183 sys_autovp 7, 0

184 Set VIEW,VM[9] [9] ,VM[9] [10]

185 auto -1

186 redraw -1

187 EXIT

VSTDOPT.CDP Monday, March 28, 1994 9 21 am Page

1 rem VSTDOPT CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 6 7 Vιews»Vιews+l 8 if (Vιews>2) 9 Vιews-0 10 if (Views—World) 11 ( 12 /* Re-Calulate System Top/Front/Side Views 13 prompt "Fetching World Views " 14 Set VIEW,VM[0] [9] ,VM[0] [10] 15 Set VIEW,VM[1] [9] VMtl] [10] 16 Set VIEW,VM[2) [9] VM[2] [10] 17 Set VIEW, 7, 2 18 auto -1 19 redraw -1 20 } 21 if (Views— Magnetic) 22 { 23 prompt "Fetching Magnetic Views 24 Set VIEW,VM[3] [9] ,VM[3] [10] 25 Set VIEW,VM[4] [9) ,VM[4] [10] 26 Set VIEW,VM[5] [9],VM[5] [10] 27 Set VIEW,VM[9) [9] ,VM[9] [10] 28 auto -1 29 redraw -l 30 } 31 if (Views—Optimized) 32 { 33 prompt "Fetching Optimized Views 34 Set VIEW,VM[6] [9] ,VM[6] [10] 35 Set VIEW,VM[7] [9] ,VM[7] [10] 36 Set VIEW,VM[8] [9] ,VM[8] [10] 37 Set VIEW,VM[9] [9] ,VM[9] [10] 38 auto -1 39 redraw -1 40 } 41 42 exit 43 EXIT

VSTD0PT2. CDP Monday, March 28, 1994 9 21 am Page

1 rem VSTD0PT2.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work w th. Faro Metrecom/CADKEY/FastSURF

5

6

7 if (Views—World)

8 {

9 /* Re-Calulate System Top/Front/Side Views

10 prompt "Fetching World Views . . "

11 Set VIEW.VMfO) [9] ,VM[0] [10]

12 Set VIEW,VM[1] [9],VM[1] [10]

13 Set VIEW,VM[2] [9] ,VM[2] [10]

14 Set VIEW, 7, 2

15 auto -1

16 redraw -l

17 }

18 if (Views— Magnetic)

19 {

20 prompt "Fetching Magnetic Views. . "

21 Set VIEW,VM[3] [9],VM[3] [10]

22 Set VIEW,VM[4] [9] ,VM[4] [10]

23 Set VIEW,VM[5] [9] ,VM[5] [10]

24 Set VIEW,VM[9] [9] ,VM[9] [10]

25 auto - 1

26 redraw -l

27 )

28 if (Views— Optimized)

29 {

30 prompt "Fetching Optimized Views . . "

31 Set VIEW,VM[6] [9] ,VM[6] [10]

32 Set VIEW,VM[7] [9] ,VM[7] [10]

33 Set VIEW,VM[8] [9] ,VM[β] [10]

34 Set VIEW,VM[9] [9] ,VM[9] [10]

35 auto -1

36 redraw -l

37 }

38

39 :exιt

40 EXIT

XYPLNROT.CDP Monday, March 28, 1994 9.21 am Pa

1 rem XYPLNROT.CDP 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with Faro Metrecom/CADKEY/FastSURF 5 rem Sets the XYZ Origin of the Grid Planes 6 7 DOUBLE xl.yl,Zl,x2,y2,z2 8 9 /* Set Grid Plane Origin */ 10 Origin [0]-G3Pos[0] [0] 11 Origin [l]-G3Pos[0] [1] 12 Origin [2] -G3Pos[0] [2] 13 Pdisp- 0 14 Sdisp- 0 15 ARRAY AutoIncD[3] -{0,0,0} 16 ARRAY AutoRotW[3]-{0,0,0} 17 ARRAY AutoRθtM[3]-{0,0,0} 18 ARRAY XYZrot[3]-{0,0,0} 19 ARRAY XYZmag[3]-{0,0,0} 20 ARRAY XYZmagO[3]-{0,0,0) 21 ARRAY MagOrgn[3)«{0,0,0} 22 23 G3Pos[0] [0]-G3Pos[0] [0] -Origin [0) 24 G3Pos[0] [l]-G3Pos[0] [1] -Oπgιn[l] 25 G3Pos[0] [2]-G3Pos[0] [2] -Origin [2] 26 G3Pos[l] [0]-G3Poε[l] [0] -OriginIO] 27 G3Pos[l] [l]-G3Poε[l] [1] -Origin [1] 28 G3Pos[l] [2]-G3Poεtl] [2] -Origin [2] 29 G3Pos[2] [0]-G3Poε[2] [0] -Origin [0] 30 G3Pos[2] [l]-G3Pos[2] [1] -Origin [1] 31 G3Pos[2] [2]-G3Pos[2] [2] -Origin [2] 32 33 /* Rotate Grid Plane Along Z Axis */ 34 prompt "Computing Z Axis Rotation ..." 35 xl-G3Pos[l] [0] 36 yl-G3Pos[l] [1] 37 zl-G3Pos[l] [2] 38 if (abs(xl)<0.000001) 39 xl-0.000001 40 z2-atan(yl/xl) 41 if ((xl>0) ii (yl>0)) 42 XYZrot [2]-z2 43 if (<X1«:0) ii (yl>0)) 44 XYZrot [2] -180*z2 45 if ((xl<0) ii (yl<0)) 46 XYZrot [21- 180*z2 47 if ((xl>0) ii (yl<0)) 48 XYZrot [2] -360*z2 49 rem pause "ATAN (yl/xl) Vf Z Rotation V.2f" ,Z2, XYZrot [2] 50 XYZrot [2] -XYZrot [2] *-l 51 XYZ[0]-G3Pos[l] [0] 52 XYZ[l]-G3Pos[l] [1] S3 XYZ[2]-G3Pos[ll [2] 54 dosub xyzrot . cdp 55 G3Pos[l] [0]-XYZ[0] 56 G3Pos[l] [1].XYZ[1] 57 G3Poε[l] [2] -XYZ [2] 5B XYZ[0]-G3Pos[2] [0] 59 XYZ[l)-G3Pos[2] [1] 60 XYZ[2]-G3Pos[2] [2] 61 dosub xyzrot . cdp 62 G3Pos[2] [0]-XYZt0] 63 G3Pos[2] [l]-XYZtl] 64 G3Pos[2] [2] -XYZ [2] 65 XYZrot [2] -XYZrot [2] *-l 66 67 /* Rotate Grid Plane Along X Axis 68 prompt "Computing X Axis Rotation 69 xl-G3Pos[2] [0] 70 yl-G3Pos[2] [1] 71 zl-G3Pos[2] [2] 72 if (abs (yl)<0.000001) 73 yl-0.000001

XYPLNROT.CDP Monday, March 28, 1994 9 21 am Page

74 x2-atan(zl/yl)

75 if ((yl>0) ii (zl>0))

76 XYZrot [0]-x2

77 if ((yl<0) ii (zl>0))

78 XYZrot [01-180+X2

79 if ((yl<0) ii (zl-0))

80 XYZrot [01-180+X2 βl if ((yl>0) ii (zl-0))

82 XYZrot [0]-360+x2

83 rem pause "ATAN (zl/yl) Vf X Rotation V.2f",x2,XYZrot[0]

84

85 /* Rotate Grid Plane Along Y Axis */

66 prompt "Computing Y Axis Rotation ..."

87 xl-G3Pos[l] [0]

88 yl-G3Pos[l] [1]

69 zl-G3Pos[l] [2]

90 if (abs(xl) 0.000001)

91 xl-0.000001

92 y2-atan(zl/xl)

93 if <(xl>0) ii (zl>0))

94 XYZrot [l]-y2

95 if ((xl<0) ii (zl>0))

96 XYZrot [1]-I80*y2

97 if ((xl<0) ii (zl<0))

9B XYZrot [l]-180+y2

99 if ((xl>0) ii (zlcO))

100 XYZrot [l]-360+y2

101 rem pause "ATAN (zl/xl) Vf Z Rotation V.2f ",y2. XYZrot [1]

102

103 prompt "Computing Grid Plane ..."

104 dosub rmagwld. cdp

105

106 prompt "Computing Magnetic View .. "

107 MagOrgn [0] -XYZrot [0]

10B MagOrgn [1] -XYZrot [1]

109 MagOrgn [2] -XYZrot [2]

110 XYZmag [0] -XYZmag [1] -XYZmag [2] -0

111 Views-Magnetic

112 dosub bldview cdp

113 doεub RBldOptV.CDP

114 auto -1

115 redraw -1

118 :exιt

119 EXIT

XYZROT . CDP Monday, March 28, 1994 9:21 am Pag

1 rem XYZROT.CDP

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5

6 XYZtemp[0]-XYZ[0]

7 XYZtemp[I]-XYZ[1] β XYZtemp[2]-XYZ[2]

9

10 /* Rotate X Axis */

11 IF (XYZrot[0] !-0)

12 {

13 XYZ [1] - (XYZtemp [l] *cos (XYZrot [0] ) ) - (XYZtemp [2] *sin (XYZrot [0] ) )

14 XYZ [2] - (XYZtemp [1 ] *sin (XYZrot [0] ) ) + (XYZtemp [2] *cos (XYZrot [0] ) )

15 XYZtemp [1] -XYZ [1]

16 XYZtemp [2] -XYZ [2]

17 }

18

19 /» Rotate Y Axis */

20 IF (XYZrot [1] !-0)

21 {

22 XYZ[0]-(XYZtemp[0] "cos (XYZrot [1] ) ) ■ (XYZtemp[2] "sin(XYZrot [1] ) )

23 XYZ[2]-(XYZtemp[0]"sin(XYZro [1] ) ) ■ (XYZtemp[2]*cos (XYZrot [1] ) )

24 XYZtemp[0] -XYZ[0]

25 XYZtemp[2]-XYZ[2]

26 )

27

28 /* Rotate Z Axiε */

29 IF (XYZrot[2] !-0)

30 {

31 XYZ [0] - (XYZtemp [0] *cos (XYZrot [2] ) ) - (XYZtemp [1] *sin (XYZrot [2] ) )

32 XYZ [1] - (XYZtemp [0] *sin (XYZro [2] ) ) + (XYZtemp [1] *cos (XYZrot [2] ) )

33 XYZtemp [0] -XYZ [0]

34 XYZtemp [1] -XYZ [1]

35 }

36

37 :ex t

38 EXIT

DELNODE.INC Monday, March 28, 1994 9.37 am Page

1 rem DELNODE.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5

6 if (Nodes > 1)

7 {

8 redraw -1

9 Mode draw

10 Nodes-Nodes -1

11 POINT PntNodes [0] [0] , PntNodes [0] [1] .PntNodes [0] [2] .White,, 2

12 for d-1; KNodes; i-i+l)

13 {

14 POINT PntNodeε [ l] [0] , PntNodes [ d) ] [1] , PntNodes [( i ) ] [2] .White, ,2

15 LINE PntNodes [d-D] [0] , PntNodes [( i - 1) ] [1] , PntNodes [( l - 1) ] [2] ,\

16 PntNodes [(ill [0] , PntNodes [( l ) ] [1] , PntNodes [( i ) ] [2] .White, ,2

17 }

18 Mode normal

19 }

FINDERO.INC Monday, March 28, 1994 9:37 am Pa

1 rem FINDERO.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 if (Finder)

7 {

8 mode draw

9 point FinderX,FinderY,FinderZ,Black

10 FinderX-FιnderY-FinderZ-0

11 point FinderX,FinderY,FinderZ,Black

12 mode normal

13 }

FINDERl.INC Monday, March 28, 1994 9.37 am Page

1 rem FINDERl.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5

6 if (Finder)

7 {

8 mode draw

9 point FinderX , FinderY , FinderZ , Black

10 FinderX-Fx

11 FmderY-Fy

12 FmderZ-Fz

13 point FinderX,FinderY,FinderZ,White

14 mode normal

15 )

FINDER1D.INC Monday, March 28, 1994 9.37 am Pa

1 rem FINDER1D INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Deεigned to work with: Faro Metrecom/CADKEY/FastSURF 5

6 if (Finder)

7 {

8 mode draw

9 point FinderX,FinderY,FinderZ,Black

10 FinderX-Fx

11 FιnderY-0

12 FinderZ-Fy

13 point FinderX,FinderY,FinderZ,White

14 mode normal

15 }

FINDER2.INC Monday, March 28, 1994 9.37 am Pa

1 rem FINDER2.INC 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved 4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF 5 6 if (Finder) 7 { 8 mode draw 9 point FinderX,FinderY,FinderZ,Black 10 mode normal 11 }

FINDER3.INC Monday, March 28, 1994 9:37 am Page

1 rem FINDER3.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 if (Finder) {

8 mode draw

9 point FinderX,FinderY,FinderZ,Black

10 mode normal

11 auto -1

12 }

13 else

14 auto -1

15 redraw -1

PNTRACED.INC Monday, March 26, 1994 9:37 am p age

1 rem PNTRACED.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 Mode draw

7 Delete-Off

8 point Fx,0,Fy,White

9 PntNodes[Nodes] [0] - Fx

10 PntNodes[Nodes] [1] - 0

11 PntNodes[Nodes] [2] - Fy

12 Nodes-Nodes+1

13 if (Nodes>l)

14 LINE PntNodes[(Nodes-2)] [0] ,PntNodes [ (Nodes-2) ] [1] .PntNodes [ (Nodes-2) ] [2] A

15 Fx.O.Fy,White, ,2

16 Mode normal

PNTTRACE.INC Monday, March 28, 1994 9:37 am p ag

1 rem PNTTRACE.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF 5

6 Mode draw

7 Delete-Off

8 point Fx.Fy.Fz,White

9 PntNodes [Nodes] [0] - Fx

10 PntNodes [Nodes] [1] - Fy

11 PntNodes [Nodes] [2] - Fz

12 Nodes-Nodes+1

13 if (Nodes>D

14 LINE PntNodes [ (Nodes -2) 1 [0] . PntNodes [ (Nodes -2) ] [1] . PntNodes [ (Nodes-2) ] [2] A

15 Fx.Fy.Fz, hite, ,2

16 Mode normal

POINTER.INC Monday, March 28, 1994 9 37 am Page

1 rem POINTER.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF

5

6 Pnt2PntD-sqrt ( (FinderX-Ongin tO] ) " _+\

7 (FinderY-Origin d! ) "2Λ

8 (FιnderZ-Orιgιn [2] ) *2)

9 if (Pnt2PntD)

10 {

11 xl-FιnderX+ ( ( (F derX-Origin [0] ) /Pnt2PntD) * (GrιdSιze/3) )

12 yl-FιnderY+ ( ( (FinderY-Ongin [1] ) /Pnt2PntD) * (GrιdSιze/3) )

13 zl-FιnderZ+ ( ( (FmderZ-Ongin [2] ) /Pnt2PntD) * (GπdSιze/3) )

14 line xl.yl.zl,FinderX,FinderY,FinderZ,Black, ,1, , , ,βlwιdth+4

IS }

TRACK2.INC Monday, March 28, 1994 9.37 am Page

1 rem TRACK2.INC 2 rem The Replicator 3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rightε reεerved 4 rem Deεigned to work with Faro Metrecom/CADKEY/FastSURF 5 6 Pnt2PntD-sqrt ( (FιnderX-Oπgm[0] ) * 2+\ 7 (FinderY-Origintll )~2+\ 8 (FιnderZ-Orιgιn[2] ) "2) 9 if (Pnt2PntD<0.000001) 10 goto t2exιt 11 12 if (Views!-World) 13 { 14 XYZrot [0]-XYZrot[0]*-l 15 XYZrot [1]-XYZrot[1] *-l 16 XYZro [2]-XYZrot[2]*-l 17 XYZmagO[0]-XYZmagO[0] « -l 18 XYZmagO[11-XYZmagO[1]*-1 19 XYZmagO[2]-XYZmagO[2]*-l 20 if (Views—Magnetic) 21 { 22 OldMagX-XYZmag lO] 23 OldMagY-XYZmag [1] 24 OldMagZ-XYZmag [2] 25 XYZmag [0] -XYZmag [1] -XYZmag [2] -0 26 } 27 else 28 { 29 XYZmag [0] -XYZmag [0] *-l 30 XYZmag [ 1 ) -XYZmag [ 1 ] *- 1 31 XYZmag [2] -XYZmag [2] *-l 32 } 33 XYZ [0] -FιnderX-Orιgιn [0] 34 XYZ [1] -FinderY-Ongin [1] 35 XYZ [2] -FιnderZ-Orιgm [2] 36 if (XYZmagO [0] +XYZmag [0] +XYZmagO [1] +XYZmag [1] +XYZmagO [2] +XYZmag [2] ) 37 { 38 MagFlag-True 39 dosub magrot.cdp 40 MagFlag-False 41 } 42 dosub xyzrot . cdp 43 xl-XY2 [0] 44 yl-XYZ [l] 45 Zl-XYZ [2] 46 XYZrot [0] -XYZrot [0] * -l 47 XYZro [1] -XYZrot [1] * -l 48 XYZrot [2] -XYZrot [2] * -l 49 XYZmagO [ 01 -XYZmagO [ 0 ] * - 1 50 XYZmagO [ 1 ) -XYZmagO [ 1 ] *- 1 51 XYZmagO [2] -XYZmagO [2] "-1 52 if (Views— Magnetic) 53 { 54 XYZmag[0]-OldMagX 55 XYZmag[1]-OldMagY 56 XYZmag[2]-OldMagZ 57 } 58 else 59 { 60 XYZmag[0]-XYZmag[0]*-1 61 XYZmag[1]-XYZmag[1]*-1 62 XYZmag[2]-XYZmag[2]*-l 63 64 65 66 if (Views— World) 67 { 68 xl-FιnderX-Orιgm [0] 69 yl-FmderY-Oπgin [1] 70 zl-FinderZ-Ongin [2] 71 } 72 73 if (abs (xl) cθ .000001)

TRACK2.INC Monday, March 28, 1994 9:37 am Page 2

74 {

75 if (yl>0)

76 X2-90

77 else

78 X2-270

79 }

80 else

81 x2-atan(yl/xl)

82 if <(xl«0) ii (yl>0))

83 X2-180+X2

84 if (<xl<0) ii (yl<0))

85 X2-180+X2

B6 if (<xl>0) ii (yl<0))

87 X2-360+X2

8B

89 if (abs (xl)<0.000001)

90 {

91 if (zl>0)

92 y2-90

93 else

94 y2-270

95 }

96 else

97 y2-atan(zl/xl)

98 if <(xl<0) ii (zl>0))

99 y2-180*y2

100 if ((xlcO) ii (zl<0))

101 y2-180+y2

102 if (1x1,0) ii (zl<0))

103 y2-360*y2 104

105 if (abs (yl)<0.000001)

106 {

107 if (zl>0)

108 Z2-90

109 else

110 Z2-270

HI }

112 else

113 z2-atan(zl/yl)

114 if ((yl<0) ii (zl>0))

115 z2-180*z2

116 if (<yl<0) ii (zl<0))

117 Z2-1B0+Z2

118 if ((yl>0) ii IzKOI)

119 Z2-360+Z2

120 prompt "X-V8.4f Y-V8.4f Z-V8.4f: XY-V6.2f XZ-V6.2f YZ-V6.2f", l.yl,Zl,x2,y2,z2

121 :t2exit

WAITNOTl.INC Monday, March 28, 1994 9:37 am Pa

1 rem WAITNOTl.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

5

6 DO

7 {

8 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

9 ♦INCLUDE finderl.inc

10 Bhit - Fcntl i 3

11 getkey

- Bl)

WAITRELl.INC Monday, March 28, 1994 9:37 am Pag

1 rem WAITRELl.INC

2 rem The Replicator

3 rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved

4 rem Designed to work with. Faro Metrecom/CADKEY/FastSURF

5

6 DO

7 {

8 readdev Fcntl,Fx.Fy.Fz,Fa,Fb.Fc

9 Bhit - Fcntl i 3

10 getkey

Bl)

WAITREL2.INC Monday, March 28, 1994 9:37 am P rem WAITREL2.INC rem The Replicator rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved rem Designed to work with: Faro Metrecom/CADKEY/FastSURF

DO

{ readdev Fcnt1,Fx,Fy,Fz,Fa,Fb,Fc

9 Bhit - Fcntl i 3

10 ) WHILE (Bhit — B2)

Monday, March 28, 1994 10:14 am Page

-1.266985932377 ♦1.025685205691 +0.000000000000 +0.000000000000 +0.000000000000 +0.000000000000 +0.000000000000 ♦0.000000000000 +0.0127760388B1 +315.976478633992 ♦0.000000000000 ♦0.000000000000 ♦0.000000000000 ♦0.000000000000 ♦0.012776038881 +315.976478633992 -1.266985932377 ♦1.025885205691 -1.961939534189 ♦1.026108189633 -0.547943131367 ♦1.031824926680 -0.004116022834 ♦0.999982334840 -0.983248574440 -1.266985932377 +1.025885205691 -1.961939534189 +1.026108189633 -1.271101955211 +2.025867540531 -0.719042801010 -0.005939720989 +6.846968997414 -1.266985932377 +1.025885205691 -0.547943131367 +1.031824926680 -1.271101955211 +2.025867540531 -0.694953601812 +0.000222983942 -8.901605242419 -1.315164330774 +1.013559795828 -4.094978736021 +1.014451731596 -1.218807533980 ♦1.038210615554 +1.561006873267 +1.037318679766 -1.283045398509 +1.021776735737 -2.209650200925 ♦1.022074047659 -1.250926466245 ♦1.029993675645 -0.324321663829 ♦1.029696363723 ♦0.131153316914 -0.974525431874 -2.648661090333 -0.973633496106 -2.665125181668 +3.026295843256 ♦0.114689225579 +3.025403907488 -0.800939515947 ♦0.359061659836 -1.727544318362 +0.359378971759 -1.733032348807 +1.692688751546 -0.806427546392 +1.692391439623 -2.696839486730 -0.985956905968 +0.179331715312 -0.962200022011 +0.162867623976 +3.037729317350 -2.713303580066 +3.013970433393 -1.743603784495 +0.355270501805 -0.784880049814 +0.363190129790 -0.790368060259 ♦1.696499909577 -1.749091814940 +1.688580281592 +0.000000000000 +0.000000000000 +1.000000000000 ♦0.000000000000 +0.000000000000 +1.000000000000 1 1 +0.000000000000 +0.000000000000 +0.000000000000 -1.000000000000 +1.000000000000 +0.000000000000 2 3 +0.000000000000 +1.000000000000 ♦0.000000000000 ♦0.000000000000 ♦1.000000000000 ♦0.000000000000 5 4

Monday, March 28, 1994 10:14 am Page

+0.694940407538 -0.004288165494 +0.719042801010 -0.004116022634 ♦0.0059397209B9 +0.999982334840 12 -0.004288165494 -0.694940407538 -0.004116022834 -0.719042801010 +0.999982334840 -0.005939720989 13 -0.004288165494 +0.719054547032 -0.004116022834 -0.694953601812 +0.999982334840 +0.000222983942 14 +0.694940407538 -0.004286165494 +0.719042801010 -0.004116022834 ♦0.005939720989 +0.999982334840 12 -0.004288165494 -0.694940407538 -0.004116022834 -0.719042801010 ♦0.999982334840 -0.005939720989 13 -0.004288165494 +0.719054547032 -0.004116022834 -0.694953601812 ♦0.999982334840 +0.000222983942 14 -0.091497273188 -0.871030003428 -0.165959246561 -0.464550102681 +0.981878697946 -0.159686991415 24

Monday, March 28, 1994 10:16 am Page

000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 +0.000000000000 000000000000 000000000000

000000000000

000000000000 +0.000000000000 000000000000 000000000000 000000000000 000000000000 +0.000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000 000000000000

Page

12