WO1995021417A1 - Replicator system and method for digitizing the geometry of a physical object - Google Patents

Replicator system and method for digitizing the geometry of a physical object Download PDF

Info

Publication number
WO1995021417A1
WO1995021417A1 PCT/US1995/001289 US9501289W WO9521417A1 WO 1995021417 A1 WO1995021417 A1 WO 1995021417A1 US 9501289 W US9501289 W US 9501289W WO 9521417 A1 WO9521417 A1 WO 9521417A1
Authority
WO
WIPO (PCT)
Prior art keywords
plane
point
points
edge
g3pos
Prior art date
Application number
PCT/US1995/001289
Other languages
French (fr)
Other versions
WO1995021417A9 (en
Inventor
Stephen L. Gubelmann
Original Assignee
Radical Advanced Technologies Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from PCT/US1994/001233 external-priority patent/WO1995021410A1/en
Application filed by Radical Advanced Technologies Corporation filed Critical Radical Advanced Technologies Corporation
Priority to AU18362/95A priority Critical patent/AU1836295A/en
Publication of WO1995021417A1 publication Critical patent/WO1995021417A1/en
Publication of WO1995021417A9 publication Critical patent/WO1995021417A9/en

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/42Recording and playback systems, i.e. in which the programme is recorded from a cycle of operations, e.g. the cycle of operations being manually controlled, after which this record is played back on the same machine
    • G05B19/4202Recording and playback systems, i.e. in which the programme is recorded from a cycle of operations, e.g. the cycle of operations being manually controlled, after which this record is played back on the same machine preparation of the programme medium using a drawing, a model
    • G05B19/4207Recording and playback systems, i.e. in which the programme is recorded from a cycle of operations, e.g. the cycle of operations being manually controlled, after which this record is played back on the same machine preparation of the programme medium using a drawing, a model in which a model is traced or scanned and corresponding data recorded
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/35Nc in input of data, input till input file format
    • G05B2219/35217Cagd computer aided geometric design, sbgd scanning based geometric design
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/36Nc in input of data, input key till input tape
    • G05B2219/36438Manually selection of points on surface to select area to scan automatically
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/37Measurements
    • G05B2219/37193Multicoordinate measuring system, machine, cmm
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • 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.
  • a computer file describing the model 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.
  • CAD computer aided design
  • 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 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.
  • 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.
  • capture will refer generally to the storage of data that represents the three-dimensional configuration of an object or a surface.
  • replica or “replication” will refer to the overall process of capturing and processing data to obtain a model for the object or surface.
  • 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
  • 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.
  • CMM coordinate measuring machine
  • 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.
  • 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.
  • 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.
  • the user 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).
  • 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.
  • 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.
  • 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
  • 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.
  • 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.
  • the user 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.
  • 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.
  • 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 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 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 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.
  • 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.
  • 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 user to simultaneously view the surface model generated by
  • 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.
  • 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
  • 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 80486based 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 is also connected to the computer.
  • 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 B1 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.
  • 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-1 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-1 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 .
  • the CMM 120 of the system 100 need not comprise a measurement arm 120a.
  • non-contact CMM devices such as lasers, sonic devices and the like can be used.
  • 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.
  • a CMM which provides 3-D coordinates in spherical terms i.e., coordinates of ⁇ , ⁇ and ⁇
  • 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.
  • 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.
  • the user captures a single point by holding the probe tip 121 at a desired location, depressing the button B1, and then releasing the button B1.
  • the X, Y and Z coordinates of the probe tip 121 are stored by the computer 102. This method of capturing a single point with the probe 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 for capturing strings of points (or "point strings") that may be used to generate splines and other entities.
  • the user initially specifies a type of entity to be generated. For example, the user may specify that he or she wants to build an open spline. The user then specifies the mode for capturing the string of points that will be used to generate the entity.
  • the entity type and data capture mode are selected using a sequence of menus of the Replicator program and/or using the keyboard 110.
  • cut plane mode The first of the four modes for capturing strings of points is referred to as "cut plane mode.”
  • cut plane mode the Replicator program makes use of a user-defined cut plane to capture points.
  • the cut plane is a three-dimensional plane that slices through the space occupied by the object 122.
  • the cut plane is defined by the user (by any one of several methods, as discussed below) prior to entering cut plane mode.
  • the user places the probe tip 121 of the measurement arm 120a on the object 122, depresses the button B1 on the probe tip handle 125, and drags the probe tip 121 along the surface of the object 122.
  • 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 B1, moves the probe tip 121 to a new starting position, and repeats the process. Sequences of points that fall along the intersection of the cut plane and the surface of the object 122 are thereby captured.
  • 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."
  • manual mode the user probe-selects individual points of the point string by clicking and releasing the button B1 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 B1 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 B1 depressed. Once the user releases the button B1 to end the point string, the user depresses the button B2 to convert the string of points into an entity.
  • the fourth 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 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.
  • 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.
  • 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.
  • 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 B1, and then releasing the button B1 with the probe tip 121 at the desired location.
  • the Replicator program 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.
  • 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.
  • the Replicator program permits 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.
  • 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.
  • this feature allows unskilled workers to capture data
  • 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.
  • IGES Interim Graphics Exchange Standard
  • 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.
  • 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.
  • the CMM 120 Before the measurement arm 120a 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.
  • 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).
  • 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.
  • 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
  • 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.
  • probe tip cursors 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.
  • 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).
  • 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.
  • Fig. 4A illustrates a situation wherein the grid planes have a different orientation from the real world axes.
  • 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.
  • 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 user.
  • 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.
  • the origin and orientation of the grid planes axes can be changed as the user progresses to various portions of the object 122 being replicated.
  • 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.
  • 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.
  • the YZ grid plane is displaced in the positive X direction by an offset 320
  • 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.
  • 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).
  • 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 B1 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.
  • the grid planes rotate with the grid plane axes, but maintain their respective offsets.
  • 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.
  • the Replicator program 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.
  • 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.
  • 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.
  • 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.
  • 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).
  • Fig. 4A is a screen dump image that shows the corners and edges of a rectangular 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the Replicator program permits the user to switch to a set of real world views at any time.
  • 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.
  • cut planes can be used as a means fotr 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.
  • 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 B1 depressed.
  • a point i.e., the X, Y and Z coordinates of a point
  • 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 the next point from the CMM 120 as the user continues to move the probe tip 121 along the surface of the object 122.
  • the computer 102 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.”
  • the computer 102 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 B1 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.
  • the user presses the button B2.
  • 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.
  • the Replicator program generates the specified entity from the captured point stream.
  • 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.
  • 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.
  • 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.
  • the program automatically adjusts the respective views so that the newly-defined cut plane appears as a straight line.
  • 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.
  • 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.
  • 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.
  • FIGS. 6A-6D 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,
  • FIG. 6A 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.
  • 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.
  • 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 surface 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.
  • the methods described above are suitable for capturing coordinate data to accurately represent an edge or a corner of an object.
  • the Replicator program supports a much simpler method for capturing these commonly-occurring geometric features.
  • 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.
  • the Replicator program allows the user to do this by selecting nine points.
  • 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.
  • the user can touch the probe tip 121 to three different locations on the surface A, depressing and releasing the button B1 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 (Ax1, Ay1, Az1), (Ax2, Ay2, Az2), and (Ax3, Ay3, Az3).
  • the points selected from the surface B have the coordinates (Bx1, By1, Bz1), (Bx2, By2, Bz2), and (Bx3, By3, Bz3).
  • the points selected from the surface C have the coordinates (Cx1, Cy1, Cz1), (Cx2, Cy2, Cz2), and (Cx3, Cy3, Cz3).
  • 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:
  • the Replicator program calculates equations for the edges of the corner, as indicated by the process block 706.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the user selects three noncolinear points (Ax1, Ay1, Az1), (Ax2, Ay2, Az2), and (Ax3, Ay3, Az3) on the surface A, and three noncolinear points (Bx1, By1, Bz1), (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.
  • the Replicator program converts the points (Ax1, Ay1, Az1), (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 (Bx1, By1, Bz1), (Bx2, By2, Bz2), and (Bx3, By3, Bz3) into an equation for plane B.
  • the Replicator program 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.
  • 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.
  • 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.
  • FIG. 11 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.
  • the user initially selects three noncolinear points on the planar surface.
  • the user thus selects three points on the surface A, having coordinates (Ax1, Ay1, Az1), (Ax2, Ay2, Az2), and (Ax3, Ay3, Az3).
  • 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.
  • the user then probe- selects three points from the rounded surface.
  • the user thus selects three points on the surface B, having coordinates (Bx1, By1, Bz1), (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.
  • the three points must be spaced apart horizontally.
  • the Replicator program projects the points (Bx1, By1, Bz1), (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 (Bx1', By1', Bz1'), (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.
  • the Replicator program then generates an arc that passes through the three points (Bx1', By1', Bz1'), (Bx2', By2', Bz2'), and (Bx3', By3', Bz3').
  • a process block 1112 can also be included to generate a symbol 1120 for the rounded edge 1102.
  • the rounded edge 1102 must have a curvature that remains approximately constant over the region of points (Bx1', By1', Bz1'), (Bx2', By2', Bz2'), and (Bx3', By3', Bz3'). If the curvature varies in this region, the arc will not match the edge 1102.
  • 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.
  • 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.
  • the user 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.
  • the feature can be used to create a two-dimensional image or outline of a three-dimensional object or surface.
  • 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.
  • the user selects a POINT NEAR menu option.
  • the user then depresses the button B1 (Fig. 1), and moves the probe tip 121 along the object's surface. While the button B1 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 B1. 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 B1 was depressed.
  • 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.
  • LastPick [12] XYZrot
  • LastPick [13] XYZalign
  • LastPick [15] Plane XY/XZ/YZ
  • LastPick [18] Probe/Mouse/Keyln
  • Vmatrix[3] (Vy2-Vy1)/dist
  • Vmatrix[2] Vmatrix[3] *Vmatrix[7] -Vmatrix[6] *Vmatrix[4]
  • Vmatrix[5] Vmatrix[6] *Vmatrix[1] -Vmatrix[0] *Vmatrix[7]
  • Vmatrix[8] Vmatrixt[0] *Vmatr ⁇ x[4] -Vmatrix[3] *Vmatrix[1]

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.

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
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 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 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 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.
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.
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 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 Initialization; 4. Grid Planes; 5. Views; 6. Data Capture using Cut Planes; 7. Simultaneous Use of Multiple Cut Planes; 8. Use of NonParallel 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 80486based 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 B1 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-1 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-1 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 ρ , θ 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 B1, and then releasing the button B1. Upon the release of the button B1, the X, Y and Z coordinates of the probe tip 121 are stored by the computer 102. This method of capturing a single point with the probe 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 for capturing strings of points (or "point strings") that may be used to generate splines and other entities. The user initially specifies a type of entity to be generated. For example, the user may specify that he or she wants to build an open spline. The user then specifies the mode for capturing the string of points that will be used to generate the entity. The entity type and data capture mode are selected using a sequence of menus of the Replicator program and/or using the keyboard 110.
The first of the four modes for capturing strings of points is referred to as "cut plane mode." When in cut plane mode, the Replicator program makes use of a user-defined cut plane to capture points. The cut plane is a three-dimensional plane that slices through the space occupied by the object 122. The cut plane is defined by the user (by any one of several methods, as discussed below) prior to entering cut plane mode. Once cut plane mode has been entered, the user places the probe tip 121 of the measurement arm 120a on the object 122, depresses the button B1 on the probe tip handle 125, and drags the probe tip 121 along the surface of the object 122. When the probe tip 121 passes through the cut 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 B1, moves the probe tip 121 to a new starting position, and repeats the process. Sequences of points that fall along the intersection of the cut plane and the surface of the object 122 are thereby captured.
Once the desired number of points have been captured using the currently-defined cut plane, the user presses the 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 B1 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 B1 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 B1 depressed. Once the user releases the button B1 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 B1, and then releasing the button B1 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 permits 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 120a 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 B1 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 using Cut Planes
As described above, cut planes can be used as a means fotr 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 B1 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
(x1, y1 , z1), the signed distance of the point from the cut plane is given by the equation:
Figure imgf000027_0001
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 the next point from the CMM 120 as the user continues to move the 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 B1 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 surface 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 B1 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 (Ax1, Ay1, Az1), (Ax2, Ay2, Az2), and (Ax3, Ay3, Az3). The points selected from the surface B have the coordinates (Bx1, By1, Bz1), (Bx2, By2, Bz2), and (Bx3, By3, Bz3). The points selected from the surface C have the coordinates (Cx1, Cy1, Cz1), (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:
Figure imgf000033_0001
to generate an equation for a plane that passes through the points (Ax1, Ay1, Az1), (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 Edges
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 (Ax1, Ay1, Az1), (Ax2, Ay2, Az2), and (Ax3, Ay3, Az3) on the surface A, and three noncolinear points (Bx1, By1, Bz1), (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 (Ax1, Ay1, Az1), (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 (Bx1, By1, Bz1), (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 (Ax1, Ay1, Az1), (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 (Bx1, By1, Bz1), (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 (Bx1, By1, Bz1), (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 (Bx1', By1', Bz1'), (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 (Bx1', By1', Bz1'), (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 (Bx1', By1', Bz1'), (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 P1 = (x1, y1, z1), and that it is desired to project the point P1 into the plane. Thus, the coordinates of a projected point P2 = (x2,y2,z2) must be calculated, where P2 falls in the plane, and falls on a line that is normal to the plane and which passes through P1.
Recall that the signed distance of the point P1 from the plane is given by equation (1), repeated below:
Figure imgf000040_0001
The coordinates of the projected point P2 = (x2,y2,z2) are thus given by: x2 = x1 - (Distance) (a), (3) y2 = y1 - (Distance) (b), and (4) z2 = z1 - (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 B1 (Fig. 1), and moves the probe tip 121 along the object's surface. While the button B1 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 B1. 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 B1 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.001QPC
STUDIO2.CDP Monday, March 28, 1994 9:21 am Page 1
1 rem 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
6 rem 2D Draw
7 rem Tools
8 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] , $$Algnstr [0] [0] ,,$$Viewstr[0] [0]
17 SLIST $$Raxis[0] [0] ,$$Vnote[0] [0]
18 FLOAT Delay, Pdisp, Sdisp, OldPdisp, OldSdisp, PSdisp
19 FLOAT GridTol, GridSize, Tsphere, ECscale
20 FLOAT AutoIncD[0), AutoRotW[3], AutoRotM[3]
21 STRING $fname[0], Sfname0[[], $strl [9], $str2 [9], $GetPmt[40]
22 STRING $GOTCHA[0] ,$Bndge[80] ,$dummy[0], $MenuStr [60]
23 INT B1 , B2, None, On, Off, Beep, Open, Closed, True.False, Bhit , LastBhit, NodeErr
24 INT MaxNodes , ManGOff, ManGOn,Auto, White,Dashed, Near, Far, CutCase[0], ColCode
25 INT XYplane, XZplane, YZplane, Pplane, Splane, Stype, Ptype, Ponly, PandS, MagFlag
26 INT Align, Finder, FileErr, Views, RViews [0] ,MViews[0] ,Viewl,View2, Views, G2Pmode
27 INT Rview,Sview,ModeRC,OldStky,G3Pmode,G3PosIDs [3],RotAxis,OldViews,G2Pcount
28 INT Vn, Rotate, RAxis, Rrel, Circle,Arc, Center,G3Pcount,G1Pcount,GridPlns, PntsLev
29 INT DispMask[16] ,Bm[17],MagPntID[B],MagCompL,Done,LastPick [22], ViewErr,ToolMode
30 INT EdgSgrp, CrnrSgrp,AsegSgrp, PntsSgrp, LineSgrp, PolySgrp, SplnSgrp, GPmkSgrp
31 DOUBLE PntNodes[0] [0], Fcntl, Fx,Fy,Fz, Fa, Fb,Fc, PplnEnt [0], SplnEnt [0], Origin [0]
32 DOUBLE XYmgp[13],XZmgp[13],YZmgp[13] ,XYwgp[13] ,XZwgp[13] ,YZwgp[13] ,XYZrot[3]
33 DOUBLE XYpnt1[4] [3],XYpnt2[4] [3], FinderX, FinderY, FinderZ
34 DOUBLE XZpnt1[4] [3],XZpnt2[4] [3],GPent [6] ,OrgEnt
35 DOUBLE YZpnt1[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] ,Vmatrix[0], Vx1, Vy1, Vz1, Vx2, Vy2, Vz2,Vx3, Vy3, 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, 50
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 $$ModeX[0] ="Manual"
52 $$ModeX [1]="SemiAuto"
53 $SModeX [2] ="Auto"
54 $$ModeX[3]="Sticky"
55 $$ModeX [4]="CutPln"
56 $$ModeX [5]="CutPins"
57 $$ModeX [6] ="Pnt2PlnP"
58 $$Algnstr[0]="AlignOff"
59 $$Algnstr[1]="AlignOn"
60 $$Viewstr[0]="View-Wld"
61 $$Viewstr [1] ="View-Mag"
62 S$Viewstr[2]="View-Opt"
63 $$Raxis [0]="GPaxis-Z"
64 $$Raxis [1]="GPaxis-Y"
65 $$Raxis [2] ="GPaxis-X"
66 $$Vnote[0]="Wld Top"
67 $$Vnote [1]="Wld Front"
68 $$Vnote [2]="Wld Side"
69 S$Vnote[3]="Mag Top"
70 $$Vnote [4] ="Mag Front"
71 $$Vnote[5] ="Mag Side"
72 $$Vnote [6]="Opt Top"
73 $$Vnote [7]-="Opt Front" STDDIO2. CDP Monday, March 28, 1994 9:21 am Page 2
74 $$Vnote[8]="Opt:Side"
75 $$Vnote[9]="User Defined"
76
77 /* ARRAY Initalization */
78 ARRAY PplnEnt [2] ={0,0}
79 ARRAY SplnEnt [2] ={0,0}
80 ARRAY GPent [6] ={0,0,0,0 0,0}
81 ARRAY Origin [3] ={0,0,0}
82 ARRAY CutCase[2]={0,0}
83 ARRAY AutoIncD[3]={0,0,0}
84 ARRAY AutoRotW[3]={0,0,0}
85 ARRAY AutoRotM[3] ={0,0,0}
86 ARRAY RViews[4]={1,2,5,7}
87 ARRAY MViews [4] ={1,2,5,7}
88 ARRAY Vmatrix[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 GridPlane */
93 /* P1 P2 P3 Equation of a Plane */
94 /* X Y Z X Y Z X Y Z A B C D */
95 ARRAY XYmgp[13] = {0, 0, 0 1, 0, 0, 0, 1, 0, 0, 0, 1, 0}
96 ARRAY XZmgp[13]={0, 0. 0, 1, 0, 0, 0, 0, 1, 0, -1, 0, 0}
97 ARRAY YZmgp[13] = {0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0}
98 /* Initialize View Arrays */
99 /* Set System Views to default of Top/Front/Side */
100 ARRAY VM[10] [11]
101 VM[0] [9]=1
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]=11
108 VM[6] [9] -12
109 VM[7] [9]=13
110 VM[8] [9]=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] [10]=4
116 /* Set System Top View */
117 VM[0] [0]=VM[0] [4]=VM[0] [8]=1
118 VM[0] [1]=VM[0] [2]=VM[0] [3]=VM[0] [5] =VM[0] [6] -VM[0] [7]=0
119 /* Set System Front View */
120 VM[1] [0]=VM[1] [7]=1
121 VM[1] [5]=-1
122 VM[1] [1]=VM[1] [2]=VM[1] [3]=VM[1] [4] -VM[1] [6] -VM[1] [8]=0
123 /* Set System Side View */
124 VM[2] [2]=VM[2] [3]=VM[2] [7] =1
125 VM[2] [0]=VM[2] [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] [1]=-0.40824829046
129 VM[9] [2]= 0.577350269190
130 VM[9] [3]= 0.707106781187
131 VM[9] [4]= 0.40824829046
132 VM[9] [5]=-0.577350269190
133 VM[9] [6]= 0.000000000000
134 VMt9] [7]= 0.81649658093
135 VM[9] [8]= 0.577350269190
136
137 /* INT Globals Initalization */
138 B1=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 STUDIO2.CDP Monday, March 28, 1994 9:21 am Pag
147 White=15
148 Gray=14
149 Black=0
150 Red=2
151 LRed=13
152 Blue=8
153 Green=l
154 LGreen=10
155 Dashed=2
156 NOplane-0
157 XYplane=1
158 XZplane=2
159 YZplane=3
160 Stype=0
161 Ptype=0
162 CKpoint=1
163 CKline=2
164 CKpline-3
165 CKspline=4
166 GeoType=0
167 Near=1
168 Far=2
169 FinderID=0
170 Hide=0
171 Show=1
172 CNFGerr=False
173 Viewl=1
174 View2=2
175 View5=5
176 World=0
177 Magnetic=1
178 Optimized=2
179 RotAxis=0
180 MagFlag=False
181 Rrel=1
182 RAxis=2
183 Circle=False
184 Arc=False
185 Center=False
186 Manual=0
187 SemiAuto=1
188 Auto=2
189 Sticky=3
190 CutPln=4
191 CutPlns=5
192 Pnt2PlnP=6
193 G3Pcount=0
194 G2Pcount=0
195 OrgEnt=0
196 GridPlns=Show
197 RotAxis=0
198 MagCompL=0
199 Done=False
200 ECscale=1
201 FndrPntr=Off
202 EdgSgrp=0
203 CrnrSgrp=0
204 AsegSgrp=0
205 PntsSgrp=0
206 LineSgrp=0
207 PolySgrp=0
208 SplnSgrp=0
209 GPmkSgrp=0
210 ToolMode=0
211
212 /* GOTCHA TRAP */
213 SGOTCHA="ahctog"
214 BadKey=1
215 KeyError=-1
216 Emonth=0
217 Eday=0
218 Eyear=0
219 RShop=0 STUDIO2.CDP Monday, March 28, 1994 9 21 am Page 4
220 RStudio=0
221 /* LastPick-ed Registers */
222 ARRAY LastPick [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 LastPick [ 0] = Main Menu
224 rem LastPick [ 1] = 3D Build
225 rem LastPick [ 2] = 2D Draw
226 rem LastPick [ 3] = Tools
227 rem LastPick [ 4] = Locate
228 rem LastPick [ 5] = Control 1
229 rem LastPick [ 6] = Control 2
230 rem LastPick [ 7] = PlnMenu 1
231 rem LastPick [ 8] = PlnMenu 2
232 rem LastPick [ 9] = PplnDisp
233 rem LastPick [10] = SplnDisp
234 rem LastPick [11] = Origin
235 rem LastPick [12] = XYZrot
236 rem LastPick [13] = XYZalign
237 rem LastPick [14] = Open/Closed
238 rem LastPick [15] = Plane XY/XZ/YZ
239 rem LastPick [16] = Probe/Mouse
240 rem LastPick [17] = ISO/User View
241 rem LastPick [18] = Probe/Mouse/Keyln
242 rem LastPick [19] = Save/Load
243 rem LastPick [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=KBf10=-2
254 KBenter=KBreturn=-1
255 MenuLev=1
256 Menu=0
257 ColCode=White
258
259 /* FLOAT Globals Initialization */
260 PSdisp=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, $fname, @cwd
276 CALL strcat, $fname, "WSTUDIO2.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 ..."
265 Views=Magnetic
286 dosub bldview.cdp
287 Views-World
288 dosub rbldoptv.cdp
289 dosub 3drcnfgw.cdp
290 }
291 else
292 dosub rbldview.cdp STUDIO2 CDP Monday, March 28, Page 5
293
294 if (PointsHS)
295 dosub disppnts cdp
296 dosub vstdopt2 cdp
297 dosub bldplane cdp
298 auto -1
299 redraw -1
300
301 top
302 if (BadKey)
303 goto exit
304 ii=0
305 MenuLev=1
306 sprint $MenuStr, "Select Replicator Options from menu (%d) , LastPick [i i]
307 getmenu $MenuStr,\
308 "3D Build", \
309 "2D Draw",\
310 "Tools", \
311 "Locate" , \
312 $$Viewstr [Views] ,\
313 $$ModeX [ModeNum] , \
314 "Control", \
315 "About3DR" , \
316 "3DR Help", MenuLev, LastPick[ii]
317 switch (@key)
318 {
319 case -3 -2
320 goto exit
321 break
322 case 1
323 LastPick[ii] =1
324 dosub 3dbuild cdp
325 break
326 case 2
327 LastPick[ii] =2
328 dosub 2ddraw cdp
329 break
330 case 3
331 LastPick [ii] =3
332 dosub tools cdp
333 break
334 case 4
335 LastPick[ii] =4
336 dosub locate cdp
337 break
338 case 5
339 LastPick[ii] =5
340 dosub vstdopt cdp
341 break
342 case 6
343 LastPick [ii] =6
344 ModeNum=ModeNum+1
345 if (ModeNum > 6)
346 ModeNum=0
347 goto top
348 case 7
349 LastPick [ii] =7
350 dosub control cdp
351 break
352 case 8
353 LastPick [ii] =8
354 dosub 3dr_lock.cdp
355 Menu=0
356 dosub 3drhelp.cdp
357 if (BadKey)
358 goto exit
359 break
360 case 9
361 LastPick [ii] =9
362 Menu=1
363 dosub 3drhelp.pdp
364 break
365 default STUDIO2. CDP Monday, March 28 , 1994 9 :21 am Page 6
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 (PplnEnt[0])
375 {
376 DELENT PplnEnt [0]
377 DELENT PplnEnt [1]
378 PplnEnt [0] =PplnEnt [1] =0
379 }
380 if (SplnEnt [0])
381 {
382 DELENT SplnEnt [0]
383 DELENT SplnEnt [1]
384 SplnEnt [0] =SplnEnt [1] =0
385 )
386 if (GPent [0] )
387 {
388 for (i=0 ; ie6 ; i=i+1)
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, $fname, @cwd
401 CALL strcat, $fname, "WSTUDIO2.ENV"
402 dosub 3drcnfgw.cdp
403 }
404 EXEC 1, "CDL\\3DRLOCK 3DR 0"
405 prompt "Thank you for selecting the Replicator
406 wait 1
407 CLEAR
408 EXIT
2DDRAW CDP Monday, March 28, 1994 9 21 am Page 1
1 rem 2DDRAW 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 OldGP=GridPlns
7 if (GridPlns)
8 {
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-Manual
19 top
20 ii=2
21 MenuLev=MenuLev+1
22 sprint $MenuStr, "Select Geometry Type (.d) ",LastPick [ii]
23 getmenu $MenuStr, \
24 "Point", \
25 "Lme",\
26 "Polyline" ,\
27 "Spline", \
28 " - ",\
29 $$ModeX [ModeNum], \
30 "SetFrame",\
31 "Control", \
32 "3DR Help",MenuLev, LastPick [ii]
33 switch (@key)
34 {
35 case -3 -2
36 goto exit
37 break
38 case 1
39 LastPick [ii]=1
40 GeoType=CKpoint
41 dosub drawget.cdp
42 break
43 case 2
44 LastPick [ii] =2
45 GeoType=CKline
46 dosub drawget cdp
47 break
48 case 3
49 LastPick [ii] =3
50 :OCpline
51 iii=14
52 MenuLev=MenuLev+1
53 sprint $MenuStr, "Select 3-D Polyline type (%d)", LastPick [iii]
54 getmenu $MenuStr, \
55 "Open",\
56 "Closed", \
57 " - ",\
58 " - ",\
59 " - ",\
60 " - ",\
61 " - ",\
62 " - ",\
63 "3DR HELP", MenuLev, LastPick [iii]
64 switch (@key)
65 {
66 case -3: -2
67 MenuLev=MenuLev-2
68 goto top
69 case 1
70 LastPick [iii] =1
71 Ptype = Open
72 break
73 case 2 2DDRAW. CDP Monday, March 28, 1994 9:21am Page 2
74 LastPick [iii] =2
75 Ptype = Closed
76 break
77 case 3 : 8
78 break
79 case 9
80 LastPick [iii] =9
81 Menu=13
82 dosub 3drhelp.cdp
83 break
84 default
85 break
86 }
87 if (LastPick [iii]==9)
88 {
89 MenuLev=MenuLev-1
90 goto OCpline
91 }
92 GeoType=CKpline
93 dosub drawget.cdp
94 MenuLev=MenuLev-1
95 break
96 case 4
97 LastPick [ii] =4
98 :OCspline
99 iii=14
100 MenuLev=MenuLev+1
101 sprint $MenuStr, "Select 3-D Spline type (%d) ",LastPick[iii]
102 getmenu $MenuStr, \
103 "Open",\
104 "Closed", \
105 " - ",\
106 "- ",\
107 " - ",\
108 "- ",\
109 "-",\
110 " - ",\
111 "3DR HELP",MenuLev, LastPick[iii]
112 switch (@key)
113 {
114 case -3:-2
115 MenuLev=MenuLev-2
116 goto top
117 case 1
118 LastPick [iii] =1
119 Stype = Open
120 break
121 case 2
122 LastPick [iii] =2
123 Stype = Closed
124 break
125 case 3:8
126 break
127 case 9
128 LastPick [iii] =9
129 Menu=13
130 dosub 3drhelp.cdp
131 break
132 default
133 break
134 }
135 if (LastPick [iii]==9)
136 {
137 MenuLev=MenuLev-1
138 goto OCspline
139 }
140 GeoType=CKspline
141 dosub drawget.cdp
142 MenuLev=MenuLev-1
143 break
144 case 5
145 break
146 case 6 DDRAW. CDP Monday, March 28, 1994 9:21 am Page 3
147 LastPick [ii] =6
148 ModeNum-ModeNum+1
149 if (ModeNum > 2)
150 ModeNum=Manual
151 break
152 case 7
153 LastPick [ii] =7
154 dosub setframe.cdp
155 break
156 case 8
157 LastPick [ii] =8
158 dosub control.cdp
159 break
160 case 9
161 LastPick[ii] =9
162 Menu=3
163 dosub 3drhelp.cdp
164 sys_autovp 0,0
165 set view, 2,0
166 break
167 default
168 Menu=3
169 dosub 3drhelp.cdp
170 sys_autovp 0,0
171 set view, 2,0
172 break
173 }
174 MenuLev=MenuLev-1
175 goto top
176 :exit
177 MenuLev-MenuLev-1
178 sys_autovp 7,0
179 GridPlns=OldGP
180 if (GridPlns)
181 dosub bldplane.cdp
182 Views=World
183 dosub vstdopt2.cdp
184 EXIT
3DBUILD.CDP Monday, March 28, 1994 9 21 am Page 1
1 rem 3DBUILD.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 Allows picks for various manual input sequences
6 rem Points - Point by point
7 rem Lines - Line string by line string
8 rem Polylines - (Open/Closed) Polyline string by polyline string
9 rem Splines - (Open/Closed) Spline
10
11
12 :top
13 ii=1
14 MenuLev=MenuLev+1
15 sprint SMenuStr, "Select Geometry Type (%d) " ,LastPick [ii]
16 getmenu SMenuStr,\
17 "Point", \
18 "Line",\
19 "Polyline", \
20 "Spline", \
21 $$Viewstr [Views] , \
22 $$ModeX [ModeNum] , \
23 "SetGnd'W
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 OCpline
44 iii=14
45 MenuLev=MenuLev+1
46 sprint $MenuStr, "Select 3-D Polyline type (%d)",LastPick[iii]
47 getmenu $MenuStr, \
48 "Open" , \
49 "Closed", \
50 " - ",\
51 " - ",\
52 " - ",\
53 " - ",\
54 " - ",\
55 " - ",\
56 "3DR HELP",MenuLev, LastPick [iii]
57 switch (@key)
58 {
59 case -3:-2
60 MenuLev=MenuLev-2
61 goto top
62 case 1
63 LastPick [iii] =1
64 Ptype = Open
65 break
66 case 2
67 LastPick [iii] =2
68 Ptype = Closed
69 break
70 case 3:8
71 break
72 case 9
73 LastPick [iii] =9 DBUILD.CDP Monday, March 28, 1994 9-21 am Pag
74 Menu=13
75 dosub 3drhelp.cdp
76 break
77 default
78 break
79 }
80 if (LastPick[iii] ==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 iii=14
93 MenuLev=MenuLev+1
94 sprint $MenuStr, "Select 3-D Spline type (%d)",LastPick [iii]
95 getmenu $MenuStr, \
96 "Open" , \
97 "Closed", \
98 " - ",\
99 " - ",\
100 " - ",\
101 " - ",\
102 " - ",\
103 " - ",\
104 "3DR HELP" , MenuLev, LastPick [m]
105 switch (@key)
106 {
107 case -3: -2
108 MenuLev=MenuLev-2
109 goto top
110 case 1
111 LastPick [iii] =1
112 Stype = Open
113 break
114 case 2
115 LastPick [iii] =2
116 Stype = Closed
117 break
118 case 3:8
119 break
120 case 9
121 LastPick [iii] =9
122 Menu=13
123 dosub 3drhelp.cdp
124 break
125 default
126 break
127 }
128 if (LastPick [iii] ==9)
129 {
130 MenuLev=MenuLev-1
131 goto OCsplme
132 }
133 GeoType=CKspline
134 dosub buildget.cdp
135 MenuLev=MenuLev-1
136 break
137 case 5
138 LastPick [ii] =5
139 dosub vstdopt.cdp
140 break
141 case 6
142 LastPick[ii]=6
143 ModeNum=ModeNum+1
144 if (ModeNum > 6)
145 ModeNum-Manual
146 break 3DBUILD.CDP Monday, March 28, 1994 9:21 am Pag
147 case 7
148 LastPick [ii] =7
149 dosub plnmenu.cdp
150 break
151 case 8
152 LastPick [ii] =8
153 dosub control. cdp
154 break
155 case 9
156 LastPick [ii] =9
157 Menu=2
158 dosub 3drhelp.cdp
159 break
160 default
161 Menu=2
162 dosub 3drhelp.cdp
163 break
164 }
165 MenuLev-MenuLev-1
166 goto top
167 :exit
168 MenuLev-MenuLev-1
169 EXIT
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)
9 if (dist==0)
10 {
11 PAUSE "All points must be unique. Can't make View!"
12 ViewErr=True
13 goto exit
14 }
15 Vmatrix[0]=(Vx2-Vx1)/dist
16 Vmatrix[3] = (Vy2-Vy1)/dist
17 Vmatrix[6]=(Vz2-Vz1)/dist
18 a=Vx2-Vx1
19 b-Vx1-Vx3
20 c=Vy2-Vy1
21 d=Vy1-Vy3
22 e-Vz2-Vz1
23 f=Vz1-Vz3
24 u=- (a*b+c*d+e*f ) / (a^2+c^2+e^2)
25 Vmatrix[1]-Vx3-a*u-Vx1
26 Vmatrix[4]-Vy3-c*u-Vy1
27 Vmatrιx[7]-Vz3-e*u-Vz1
28 dist-sqrt (Vmatrιx[1] ^2+Vmatrιx[4] ^2+Vmatrιx[7] ^2)
29 if (abs (dist) < .000001)
30 {
31 PAUSE "Points are Collmear or not Unique. Can't make View!"
32 ViewErr-True
33 goto exit
34 }
35 Vmatrix[1]=Vmatrix[1]/dιst
36 Vmatrix[4]=Vmatrix[4] /dist
37 Vmatrix[7] -Vmatrix[7]/dist
38 Vmatrix[2] =Vmatrix[3] *Vmatrix[7] -Vmatrix[6] *Vmatrix[4]
39 Vmatrix[5] =Vmatrix[6] *Vmatrix[1] -Vmatrix[0] *Vmatrix[7]
40 Vmatrix[8] =Vmatrixt[0] *Vmatrιx[4] -Vmatrix[3] *Vmatrix[1]
41
42 :exιt
43 EXIT
3DRCNFGR.CDP Monday, March 28, 1994 9.21 am Page 1
1 rem 3DRCNFGR. 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 "Loading Grid Plane Environment File: %s", $fname
10 SET devin, $fname
11 INPUT "%s td", $dummy, GridPlns
12 if (@ERROR)
13 {
14 CNFGerr-True
15 CLOSE devin
16 goto exit
17 }
18 INPUT "%s %d", $dummy, ModeNum
19 INPUT "%s %d". $dummy, Beep
20 INPUT "%s %d", $dummy, Align
21 INPUT "%s %d", $dummy, Views
22 INPUT '%s %d", $dummy, Points
23 INPUT "%s %d", $dummy, PointsHS
24 INPUT "%s %d", $dummy, PntsLev
25 INPUT "%s %d", $dummy, Finder
26 INPUT "%s %d", $dummy, FndrPntr
27 INPUT "%s %f", $dummy, ECscale
28 INPUT "%s %f", $dummy, Delay
29 INPUT "%s %d", $dummy, MaxNodes
30 INPUT "%s %d", $dummy, Pplane
31 INPUT "%s %f", $dummy, Pdisp
32 INPUT "%s %d", $dummy, Splane
33 INPUT "%s %f", $dummy, Sdisp
34 INPUT "%s %f", $dummy, GridTol
35 INPUT "%s %f", $dummy, GridSize
36 INPUT "%s %f", $dummy, Tsphere
37 INPUT "%s %f %f %f" $dummy, Origin [0], Origin [1] , Origin [2]
38 INPUT "%s %f %f %f" $dummy, AutoIncD[0], AutoIncD[1], AutoIncD[2]
39 INPUT "%s %f %f %f" $dummy, AutoRotW[0], AutoRotW[1], AutoRotW[2]
40 INPUT "%s %f %f %f" $dummy, AutoRotM[0], AutoRotM[1], AutoRotM[2]
41 INPUT "%s %f %f %f" $dummy, XYZrot [0], XYZrot[1], XYZrot[2]
42 INPUT "%s %f %f %f" $dummy, XYZmag[0], XYZmag[1], XYZmag[2]
43 INPUT "%s %f %f %f" $dummy, XYZmagO[0], XYZmagO[1] , XYZmagO[2]
44 INPUT "%s %f %f %f" $dummy, MagOrgn[0], MagOrgn[1], MagOrgn[2]
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 %f %f %f %f %f %f %f %f %f %f",\
47 $dummy, XYwgp[0] ,XYwgp[l] ,XYwgp[2] ,XYwgp[3] ,XYwgp[4] ,XYwgp[5] ,XYwgp[6] ,XYwgp[7] ,XYwgp[8] ,XYwgp[9] ,XYwgp[10], gp[11] ,XYwgp[12]
48 /* XZ Working Grid Plane- P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z Eq/Plane: A B C D */
49 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f %f",\
50 $dummy, XZwgp[0] ,XZwgp[1] ,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: P1: X.Y.Z P2 : X,Y,Z P3 X,Y,Z Eq/Plane. A B C D */
52 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f %f",\
53 $dummy, YZwgp[0],YZwgp[1] ,YZwgp[2] ,YZwgp[3] ,YZwgp[4],YZwgp[5] ,YZwgp[6] ,YZwgp[7] ,YZwgp[8] ,YZwgp[9] ,YZwgp[10], gp[11],YZwgp[12]
54 /* XY Outer Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
55 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f",\
56 $dummy, XYpnt1[0] [0],XYpnt1 [0] [1],XYpnt1 [0] [2] ,XYpnt1 [1] [0] .XYpnt1 [1] [1] ,XYpnt1[1] [2],XYpnt1[2] [0] ,XYpnt1 [2] ,XYpnt1[2] [2], XYpnt1 [3] [0],XYpnt1 [3] [1], XYpnt1 [3] [2]
57 /* XY Inner Grid Plane Boundry Points. P1,P2,P3,P4: X,Y,Z */
58 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f",\
59 $dummy, XYpnt2 [0] [0],XYpnt2 [0] [1],XYpnt2 [0] [2] ,XYpnt2 [1] [0] ,XYpnt2 [1] [1] ,XYpnt2 [1] [2] ,XYpnt2 [2] to] ,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 "%s %f %f %f %f %f %f %f %f %f %f %f %f",\
62 $dummy, XZpnt1 [0] [0] .XZpnt1 [0] [1] .XZpnt1 [0] [2] ,XZpnt1 [1] [0] ,XZpnt1 [1] [1] ,XZpnt1 [1] [2] ,XZpnt1 [2] [0],XZpnt1[2] ,XZpnt1[2] [2] , XZpnt1 [3] [0] ,XZpnt1 [3] [1] , XZpnt1 [3] [2]
63 /* XZ Inner Grid Plane Boundry Points. P1,P2,P3,P4: X,Y,Z */
64 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f",\
65 $dummy, XZpnt2[0][0] ,XZpnt2[0][1] ,XZpnt2[0] [2] ,XZpnt2 [1] [0] ,XZpnt2 [1] [1] ,XZpnt2 [1] [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 */ 3DRCNFGR.CDP Monday, March 28, 1994 9:21 am Page 2
67 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f",\
68 $dummy, YZpnt1[0] [0],YZpnt1[0] [1],YZpnt1[0] [2],YZpnt1[1] [0],YZpnt1[1] [1],YZpnt1[1] [2],YZpnt1[2] [0],YZpnt1[2] [1] ,YZpnt1[2] [2],YZpnt1[3] [0], YZpnt1[3] [1], YZpnt1[3] [2]
69 /* YZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
70 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f %f",\
71 $dummy, YZpnt2[0] [0], YZpnt2[0] [1], YZpnt2[0] [2], YZpnt2[1] [0], YZpnt2[1] [1], YZpnt2[1] [2], YZpnt2[2] [0], YZpnt2[2] [1] ,YZpnt2[2] [2],YZpnt2[3] [0], YZpnt2[3] [1], YZpnt2[3] [2]
72 /* World Views: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */
73 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f",\
74 $dummy, 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 "%s %f %f %f %f %f %f %f %f %f %f %f",\
76 $dummy, 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 "%s %f %f %f %f %f %f %f %f %f %f %f",\
78 $dummy, 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: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */
80 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f",\
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 "%s %f %f %f %f %f %f %f %f %f %f %f",\
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 "%s %f %f %f %f %f %f %f %f %f %f %f",\
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: P1: X,Y,Z P2: X,Y,Z P3 : X,Y,Z System View, View Port */
87 INPUT "%s %f %f %f %f %f %f %f %f %f %f %f",\
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 "%s %f %f %f %f %f %f %f %f %f %f %f",\
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 "%s %f %f %f %f %f %f %f %f %f %f %f",\
92 Sdummy, VM[8] [0],VM[8] [1],VM[8] [2],VM[8] [3],VM[8] [4],VM[8] [5],VM[8] [6],VM[8] [7],VM[8] [8],VM[8] [9],VM[8] [10]
93 /* ISO Views: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */
94 INPUT "%s %f %f %f %f %f %f %f %f %f 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
99
100 :exit
101 wait 1
102 EXIT
3DRCNFGW.CDP Monday, March 28, 1994 9:21 am Page 1
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: %s", $fname
10 SET devout, $fname
11 PRINT "GridPlns: %4d\n", GridPlns
12 if (@ERROR)
13 {
14 CNFGerr=True
15 CLOSE devout
16 goto exit
17 }
18 PRINT "ModeNum: %4d\n", ModeNum
19 PRINT "Beep : %4d\n", Beep
20 PRINT "Align: %4d\n", Align
21 PRINT "Views : %4d\n", Views
22 PRINT "Points: %4d\n" , Points
23 PRINT "PomtsHS: %4d\n", PointsHS
24 PRINT "PntsLev: %4d\n", PntsLev
25 PRINT "Finder: %4d\n" , Finder
26 PRINT "FndrPntr: %4d\n", FndrPntr
27 PRINT "ECscale: %+11.6f\n", ECscale
28 PRINT "Delay: %+11.6f\n" , Delay
29 PRINT "MaxNodes: %4d\n" , MaxNodes
30 PRINT "Pplane: %4d\n", Pplane
31 PRINT "Pdisp: %+11.6f\n", Pdisp
32 PRINT "Splane: %4d\n", Splane
33 PRINT "Sdisp: %+11.6f\n", Sdisp
34 PRINT "GridTol: %+11.6f\n", GridTol
35 PRINT "GridSize: %+11.6f\n", GridSize
36 PRINT "Tsphere: %+11.6f\n", Tsphere
37 PRINT "Origin: %+17.12f %+17.12f %+17.12f\n" Ongin[0], Origin[1], Or igin[2]
38 PRINT "AutoIncD: %+17.12f %+17.12f %+17.12f\n" AutoIncD [0], AutoIncD [1], AutoIncD [2]
39 PRINT "AutoRotW: %+17.12f %+17.12f %+17.12f\n" AutoRotW [0], AutoRotW [1], AutoRotW [2]
40 PRINT "AutoRotM: %+17.12f %+17.12f %+17.12f\n" AutoRotM[0], AutoRotM [1], AutoRotM[2]
41 /* X,Y,Z User Defined Rotation Angles */
42 PRINT "XYZrot. %+17.12f %+17.12f %+17.12f\n" XYZrot [0], XYZrot [1], XYZrot [2]
43 PRINT "XYZmag: %+17.12f %+17.12f %+17.12f\n" XYZmag [0], XYZmag [1], XYZmag [2]
44 PRINT "XYZmagO: %+17.12f %+17.12f %+17.12f\n", XYZmagO [0] XYZmagO [ 1 ], XYZmagO [2]
45 PRINT "MagOrgn- %+17.12f %+17.12f %+17.12f \n" , MagOrgn [0] MagOrgn [ 1 ], MagOrgn[2]
46 /* XY Working Grid Plane: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z Eq/Plane: A B C D */
47 PRINT "XYwgp: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17 12f
+17.12f\n %+17.12f %+17.12f %+17.12f %+17.12f\n",\
48 XYwgpIO],XYwgp[1], 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: P1: X,Y,Z P2 : X,Y,Z P3 : X.Y.Z Eq/Plane: A B C D */
50 PRINT "XZwgp: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f
+17.12f\n %+17.12f %+17.12f %+17.12f %+17.12f \n" , \
51 XZwgp[0],XZwgp[1],XZwgp [2],XZwgp[3],XZwgp[4],XZwgp[S],XZwgp[6], XZwgp [7],XZwgp[8] ,XZwgp[ 9] , XZwgp [10] , . XZwgp [11] XZwgp [12]
52 /* YZ Working Grid Plane: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z Eq/Plane: A B C D */
53 PRINT "YZwgp: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f
+17.12f\n %+17.12f %+17.12f %+17.12f %+17.12f \n" , \
54 YZwgp[0],YZwgp[1],YZwgp[2],YZwgp[3],YZwgp[4],YZwgp[5],YZwgp[6], YZwgp [7],YZwgp[8] ,YZwgp[ 9] , YZwgp [10] , YZwgp [11] YZwgp [12]
55 /* XY Outer Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
56 PRINT "XYpnt1: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f
+17.12f\n %+17.12f %+17.12f %+17.12f \n" , \
57 XYpnt1 [0] [0],XYpnt1 [0] [1], XYpnt1 [0] [2],XYpnt1 [1] [0], XYpnt1 [1] [1],XYpnt1 [1] [2],XYpnt1 [2] [0],XYpnt1 [2] [1],XYpn
[2] [2],XYpnt1 [3] [0],XYpnt1 [3] [1],XYpnt1 [3] [2]
58 /* XY Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
59 PRINT "XYpnt2: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f
+17.12f\n %+17.12f ϊ+17.12f %+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] [2],XYpnt2 [3] [0],XYpnt2 [3] [1],XYpnt2 [3] [2]
61 /* XZ Outer Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
62 PRINT "XZpnt1: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f \n V+17.12f V+17.12f
+17.12f\n %+17.12f %+17.12f %+17.12f \n" , \ 3DRCNFGW.CDP Monday, March 28, 1994 9:21 am Page 2
63 XZpnt1 [0] [0] ,XZpnt1 [0] [1] ,XZpnt1 [0] [2] ,XZpnt1 [1] [0],XZpnt1 [1] [1],XZpnt1 [1] [2],XZpnt1 [2] [0],XZpnt1 [2] [1],XZpnt1
[2] [2],XZpnt1 [3] [0],XZpnt1 [3] [1],XZpnt1 [3] [2]
64 /* XZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
65 PRINT "XZpnt2: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f\n %+17.12f %+17.12f %+17.12f \n",\
66 XZpnt2 [0] [0],XZpnt2 [0] [1],XZpnt2 [0] [2],XZpnt2 [1] [0],XZpnt2 [1] [1],XZpnt2 [1] [2],XZpnt2 [2] [0] ,XZpnt2 [2] [1] ,XZpnt2
[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 "YZpnt1: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f\n %+17.12f %+17.12f %+17.12f \n" , \
69 YZpnt1 [0] [0], YZpnt1 [0] [1], YZpnt1 [0] [2],YZpnt1 [1] [0],YZpnt1 [1] [1],YZpnt1 [1] [2], YZpnt1 [2] [0],YZpnt1 [2] [1] , YZpnt1
[2] [2],YZpnt1 [3] [0],YZpnt1 [3] [1], YZpnt1 [3] [2]
70 /* YZ Inner Grid Plane Boundry Points: P1,P2,P3,P4: X,Y,Z */
71 PRINT "YZpnt2: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f\n %+17.12f ϊ+17.12f %+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] [1] ,YZpnt2
[2] [2],YZpnt2[3] [0],YZpnt2[3] [1],YZpnt2[3] [2]
73 /* World Views: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */
74 PRINT "Wld_Vl: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
75 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]
76 PRINT "Wld_V2: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
77 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]
78 PRINT "Wld_V5: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\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: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */
81 PRINT "Mag_Vl: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
82 VM[3] [0],VM[3] [1],VM[3] [2],VM[3] [3],VM[3] [4],VM[3] [5],VM[3] [6],VM[3] [7],VMt3] [8] ,VM[3] [9] ,VM[3] [10]
83 PRINT "Mag_V2: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\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: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
86 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]
87 /* Optimized Views: P1: X.Y.Z P2 : X.Y.Z P3 : X,Y,Z System View, View Port */
88 PRINT "Opt_Vl: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
89 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]
90 PRINT "Opt_V2: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\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_V5: %+17.12f %+17.12f ϊ+17.12f \n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
93 VM[8] [0],VM[8] [1],VM[8] [2],VM[8] [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: P1: X,Y,Z P2 : X,Y,Z P3 : X,Y,Z System View, View Port */
95 PRINT "ISO_V7: %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f %+17.12f\n %+17.12f %+17.12f % +17.12f %4d %4d\n",\
96 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]
97
98 CLOSE devout
99 goto exit
100
101 :exit
102 SET devout, CON
103 wait 1
104 EXIT DRHELP.CDP Monday, March 28, 1994 12:10 pm Page 1
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 About3DR, \
14 3DR,\
15 3D_Build, \
16 2D_Draw,\
17 Tools, \
18 Locate, \
19 Control , \
20 SetGrid, \
21 PlnDisp, \
22 Control2,
23 SetGrid2,
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 (@xmin+ (@xmax-@xmin)/11),\
38 (@ytnax- (@ymax-@ymin)/11),\
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, (@xmax-@xmin) /48, 0.8, .LGreen, ,DspLev
57 mode normal
58 goto exit2
59
60 :3DR
61 note (@xmin+ (@xmax-@xmin) /11) , \
62 (@ymax- (@ymax-@ymin) /11) , \
63 "The Replicator Main Menu Help File . . .
64
65 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. SemiAuto:Auto:Sticky
73 CutPln:CutPlns : Pnt2PlnP DRHELP.CDP Monday, March 28, 1994 12:10 pm Page2
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
80 goto exit
81
82 : 3D_Build
83 note (@xmin+ (@xmax-@xmin) /11) \
84 (βymax- (@ymax-@ymin) /11) , \
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 :SemiAuto :Auto:Sticky
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/Off.Pnts Hide/Show:PntLevel
98 3DR Help Display This Help Screen", \
99 0 , (@xmax-@xmin) /48 , 0.8 MenuCol, ,DspLev
100 goto exit
101
102 :2D_Draw
103 note (@xmin+ (@xmax-@xmin) /11) , \
104 (@ymax- (@ymax-@ymin) /11) , \
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
118 goto exit
119
120 :Tools
121 note (@xmin+ (@xmax-@xmin) /11) , \
122 (@ymax- (@ymax-@ymin) /11) , \
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
126 Views = Cycle: World, Magnetic, & Optimized Views
129 Mode = Supports Manual Only
130 Control = GP Hide/Show:Modes:Beep On/Off :Fndr On/Off
131 AutoPace :MaxNodes :SetGrid
132 Pnts On/Off: Pnts Hide/Show: PntLevel
133 3DR Help = Display This Help Screen", \
134 0, (@xmax-@xmin) /48, 0 8 ,, MenuCol ,, DspLev
135 goto exit
136
137 :Locate
138 note (@xmin+ (@xmax-@xmin) /11) , \
139 (@ymax- (@ymax-@ymin) /11),\
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 3
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
153 goto exit
154
155 Control
156 note (@xmin+ (@xmax-@xmin) /11) , \
157 (@ymax- (@ymax-@ymin) /11) , \
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 This Help Screen", \
172 0, (@xmax-@xmin) /48, 0 , MenuCol,, DspLev
173 goto exit
174
175 Control2
176 note (@xmin+ (@xmax-@xmin) /11), \
177 (@ymax- (@ymax-@ymin)/11), \
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
186 goto exit
187
188 SetGrid
189 note (@xmin+ (@xmax-@xmin) /11) , \
190 (@ymax- (@ymax-@ymin) /11) , \
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,, MenuCol ,, DspLev
203 goto exit
204
205 :SetGrid2
206 note (@xmin + (@xmax-@xmin) /11) , \
207 (@ymax- (@ymax-@ymin) /11) , \
208 "The Replicator SetGrid Help File
209
210 Grid Tol = Set Grid Tolerance For CutPlane
211 Default Within +/- 025\" of Primary Plane
212 GridSize = 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
217 Sets Origin To 0, 0, 0 Sets Grid Tol &
218 GridSize To Default Settings
219 Align Force Nodes Into Plane Alignment If On DRHELP CDP Monday, March 28, 1994 12 10 pm Page 4
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
226 goto exit
227
228 :PlnDisp
229 note (@xmin+ (@xmax-@xmin) /11), \
230 (@ymax- (@ymax-@ymin) /11), \
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-@xmin) /48, 0 8 ,, MenuCol ,, DspLev
241 goto exit
242
243 RotGet
244 note (@xmin+ (@xmax-@xmin) /11), \
245 (@ymax- (@ymax-@ymin) /11), \
246 "The Replicator Grid Plane Rotation Help File
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, , MenuCol , , DspLev
258 goto exit
259
260 Origin
261 note (@xm in+ (@xmax-@xmin) /11 ) , \
262 (Symax- (@ymax-@ymin) /11) , \
263 "The Replicator Control Help File
264
265 Set 1pos = Set Grid Plane With One Position
266 Move1pos = Move Grid Plane To New Location
267 Set 3pos = Set Grid Plane With Three Positions
268 Rset Mag = Reset Magnetic Compass
269 3DR Help = Display This Help Screen" , \
270 0, (@xmax-@xmm) /48, 0 8 , .MenuCol, .DspLev
271 goto exit
272
273 :OpnCls
274 note (@xmin+ (@xmax-@xmin) / ),\
275 (@ymax- (@ymax-@ymin) /11) , \
276 "The Replicator Control Help File
277
278 Open = Build Entity With Open End Condition
279 Closed = Build Entity With Closed End Condition
280 3DR Help = Display This Help Screen",\
281 0, (@xmax-@xmin) /48, 0 8,, MenuCol, , DspLev
282 goto exit
283
284 :PLNs
285 note (@xmin+ (@xmax-@xmin) /11) , \
286 (@ymax- (@ymax-@ymin) /11) , \
287 "The Replicator Planes Help File .
288
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",\ 3DRHELP.CDP Monday, March 28, 1994 12 10 pm Page 5
293 0, (@xmax-@xmin) /48, 0.8, .MenuCol, , DspLev
294 goto exit
295
296 :PorM
297 note (@xmin+ (@xmax-@xmin) /11) , \
298 (@ymax- (@ymax-@ymm) /11) , \
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
305 goto exit
306
307 :View
308 note (@xmin+ (@xmax-@xmin)/11),\
309 (@ymax- (@ymax-@ymin) /11),\
310 "The Replicator ISO/User View Help File .
311
312 Rset ISO = Reset Window 2 To Standard ISO
313 SetWind2 = Set Wmtow 2 To User Defined View
314 3DR Help = Display This Help Screen",\
315 0, (@xmax-@xmin) /48, 0 8, .MenuCol, , DspLev
316 goto exit
317
318 :PMK
319 note (@xmin+ (@xmax-@xmin) /11) , \
320 (@ymax- (@ymax-@ymin) /11) , \
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
328 goto exit
329
330 :LoadSave
331 note (@xm in+ (@xmax-@xmin) /11), \
332 (@ymax- (@ymax=@ymin) /11) , \
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) /48, 0.8, , MenuCol,,DspLev
339 goto exit
340
341 :Center23
342 note (@xmint (@xmax-@xmin) /11) , \
343 (@ymax- (@ymax-@ymin) /11) , \
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-@xmm) /48, 0.8, .MenuCol, , DspLev
350 goto exit
351
352 :Locate2
353 note (@xmin+ (@xmax-@xmin) /11) , \
354 (@ymax- (@ymax-@ymin) /11),\
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, (@xmax-@xmin) /48, 0.8, .MenuCol, , DspLev
364 goto exit
365 3DRHELP.CDP Monday, March 28, 1994 12.10 pm Page 6
366 :exit
367 mode normal
368 pause "3-D Replicator Help press <Enter> to continue"
369 :exit2
370 dosub tlevoff cdp
371 sys_autovp 7,0
372 dosub vstdopt2. cdp
373 auto -1
374 redraw -1
375 Menu=0
376 EXIT
DRTEST.CDP Monday, March 28, 1994 9 21 am Page 1 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=Origin [0]
OldOy=Origin [1]
OldOz=Origin [2]
9 OldGP=Gr i dPlns
10 if (GridPlns)
11 {
12 Gr idPlns=Hide
13 dosub bldplane.cdp
14 }
15 FinderX=FinderY=FmderZ=0
16
17 MenuLev=MenuLev+1
18 :top
19 getflt "Enter New Test Sphere Radius (%.4f) , Tsphere, Tsphere
20 GridSize=Tsphere*3
21 prompt "Probe Select Test Point Location. .
22 DO
23 {
24 readdev Fcntl, Fx,Fy, Fz, Fa, Fb, Fc
25 #INCLUDE finderl.inc
26 Bhit = Fcntl & 3
27 getkey
28 if (@key == 27)
29 goto exit
30 } WHILE (Bhit != B1)
31 ((INCLUDE finder2. inc
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, Tsphere, Viewl.LRed
41 VIEW View2,1,0,0,0,0,-1,0,1,0
42 CIRCLE Fx.Fz, -Fy, Tsphere , View2 , LRed
43 VIEW ViewS ,0,0,1,1,0,0,0,1,0
44 CIRCLE Fy, Fz, Fx, Tsphere , View5, LRed
45 auto -1
46 redraw -1
47 dosub 3drtest2.cdp
48 goto exit
49
50 :exit
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
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 FmderZ-FιnderY=FιnderZ=0
11
12 : start
13 Bhit=Delete=0
14 : top
15 DO
16 {
17 readdev Fcntl, Fx, Fy, Fz, Fa, Fb,Fc
18 ((INCLUDE finderl.mc
19 prompt "X=%06.2f Y=%06 2f Z=%06.2f: G=%03d B=%03d T=%03d P=%5 4f A=%5.2f\%",\
20 Fx, Fy, Fz , GoodPnts, BadPnts, GoodPnts+BadPnts,\
21 Tsphere, (GoodPnts/(GoodPnts+BadPnts+.0001))*100
22 Bhit = Fcntl & 3
23 getkey
24 if (@key == 27)
25 goto exit
26 if (@key == Del)
27 exitloop
28 } 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 f inder0 . inc
35 : Measure
36 Tpnts=Tpnts+1
37 PntDist=sqrt ( ( (Origin [0] -Fx)^2) + ( (Origin [1] -Fy)^2) + ( (Origin [2] -Fz)^2))
38 If (PntDist > Tsphere)
39 {
40 point Fx,Fy,Fz,Red
41 BadPnts=BadPnts+1
42 }
43 else
44 {
45 point Fx , Fy, Fz , LGreen
46 GoodPnts=GoodPnts+1
47 }
48 if (Beep = = On)
49 print "\007 "
50 LstPo i nt-@lastid
51 Delete-On
52 ((INCLUDE waitrell.inc
53 goto top
54 :deleteit
55 Delete-Off
56 DELENT LstPoint
57 goto start
58
59 :exit
60 clear Fcntl , Fx, Fy, Fz , Fa , Fb, Fc
61 ((INCLUDE f inder2 . inc
62 auto -1
63 redraw - 1
64 pause "Good=%d Bad=%d Total=%d: Precision=%.4f Accuracy=%.2f\%",\
65 GoodPnts, BadPnts, GoodPnts+BadPnts, Tsphere, (GoodPnts/Tpnts) *100
66 EXIT AUTOSEG.CDP Monday, March 28, 1994 9:21 am Page 1 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 ii=16
8 G2Pmode=0
9 MenuLev=MenuLev+1
10 sprint $menuStr, "Select 3 Position Selection Method (%d)', LastPick[ii]
11 getmenu $menuStr, \
12 "Probe", \
13 "Mouse", \
14 " - ",\
14 " - ",\
14 " - ",\
14 " - ",\
14 " - ",\
14 " - ",\
20 "3DR HELP",MenuLev, LastPick [ii]
21 switch (@key)
22
23 case -3: -2
24 if (@key==-3)
25 Done-True
26 goto exit
27 case 1
28 LastPick [ii] =1
29 G2Pmode=1
30 dosub get2pos.cdp
31 if (G2Pcount!=2)
32 {
33 pause "2 Unique Locations Required. You entered %d",G2Pcount
34 MenuLev-MenuLev-1
35 auto -1
36 redraw -1
37 goto start
38 }
39 break
40 case 2
41 LastPick [ii] =2
42 G2Pmode=2
43 dosub get2pos.cdp
44 if (G2Pcount!=2)
45 {
46 pause "2 Unique Locations Required You entered %d",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 LastPick[ii] =9
62 Menu=15
63 dosub 3drhelp.cdp
64 MenuLev=MenuLev- 1
65 goto start
66 break
67 default
68 LastPick [ii] =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 2
74 }
75 Segments=2
76 AsegSgrp=AsegSgrp+1
77 getint "Enter Number of Segments (%d) : ".Segments, Segments
78 distAB=sqrt ( (G2Pos [1] [0] -G2Pos [0] [0] ) ^2+\
79 (G2Pos [1] [1] -G2Pos [0] [1] ) ^2 + \
80 (G2Pos [1] [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[1] [0],G2Pos[1] [1],G2Pos[1] [2], @color,,123, AsegSgrp
84 line G2Pos [0] [0],G2Pos [0] [1],G2Pos [0] [2], \
85 G2Pos[1] [0],G2Pos[1] [1],G2Pos[1] [2],@color, ,2, 123, AsegSgrp
86 for (i=1,- i<Segments; ι=i+1)
87 {
88 x1=G2Pos [0] [0] + (((G2Pos [1] [0]-G2Pos [0] [0] ) /distAB) * (SegLen*i))
89 y1=G2Pos[0]'[1] + (( (G2Pos[1] [1] -G2Pos [0] [1] ) /distAB) * (SegLen*i))
90 z1=G2Pos [0] [2] + ( ( (G2Pos [1] [2] -G2Pos [0] [2] ) /distAB) * (SegLen*i))
91 point x1,y1, z1, @color, , 123, AsegSgrp
92 }
93
94 auto -1
95 redraw -1
96 goto exit
97
98 :exit
99 MenuLev-MenuLev-1
100 EXIT
BLDPLANE.CDP Monday, March 28, 1994 9 21 am Page 1 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 , XYpnt1,2,2,2,1, Red, , 2
17 PplnEnt [0] -@lastid
18 POLYLINE 4 , XYpnt2 ,2,2,2,1, Red, , 2
19 PplnEnt [1] -@lastid
20 goto SPLN
21 :XZp
22 POLYLINE 4, XZpnt1, 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, YZpnt1, 2, 2, 2,1, Red, ,2
29 PplnEnt [0] =@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, XYpnt1, 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, XZpnt1, 2, 2, 2,1, Green, ,2
54 SplnEnt [0] -@lastid
55 POLYLINE 4 , XZpnt2 ,2,2,2,1, Green, , 2
56 SplnEnt [1] =@lastid
57 goto GPplane
58 :YZs
59 POLYLINE 4, YZpnt1, 2, 2, 2,1, Green, ,2
60 SplnEnt [0] =@lastid
61 POLYLINE 4, YZpnt2 ,2,2,2,1, Green, , 2
62 SplnEnt [1] =@lastid
63 goto GPplane
64 goto GPplane
65
66 :GPplane
67 if (GPent [0])
68 {
69 for (i=0, i<6, i-i+l)
70 {
71 if (GPent [i])
72 DELENT GPent [i]
73 GPent [i]=0 BLDPLANE . CDP Monday, March 28, 1994 9 21 am Page 2
74 }
75 DELENT OrgEnt
76 }
77 if (GridPlns == Hide)
78 goto exit
79
80 rem Pplane & Splane Paths
81 if ( ( (Pplane==XYplane) && (Splane==XZplane) ) || ( (Pplane==XZplane) && (Splane==XYplane)))
82 {
83 rem YZ
84 POLYLINE 4, YZpnt1,2,2,2,1, Gray,,2
85 GPent [0] -@lastid
86 POLYLINE 4, YZpnt2,2,2,2,1, Gray,,2
87 GPent [1] =@lastid
@@ POINT Origin [0],Origin [1] ,Origin [2],Gray
89 OrgEnt-@lastid
90 goto exit
91 }
92 if (((Pplane==XYplane) &.& (Splane==YZplane) ) ((Pplane==YZplane) && (Splane==XYplane)))
93 {
94 rem XZ
95 POLYLINE 4,XZpnt1,2,2,2,1,Gray,,2
96 GPent [0]=@lastid
97 POLYLINE 4,XZpnt2,2,2,2,1,Gray, ,2
98 GPent [1] =@lastid
99 POINT Origin [0] , Origin [1] , Origin [2] ,Gray
100 OrgEnt=@lastid
101 goto exit
102 }
103 if (((Pplane==XZplane) && (Splane==YZplane) ) ((Pplane==YZplane) && (Splane==XZplane) )
104 {
105 rem XY
106 POLYLINE 4, XYpnt1, 2, 2, 2,1, Gray, ,2
107 GPent [0] =@lastid
108 POLYLINE 4,XYpnt2,2,2,2,1,Gray, ,2
109 GPent [1] =@lastid
110 POINT Origin [0], Origin [1],Origin [2] ,Gray
111 OrgEnt=@lastid
112 goto exit
113 )
114
115 rem No Splane Paths
116 if ((Pplane == XYplane) &&. (Splane==NOplane))
117 {
118 rem XZ
119 POLYLINE 4, XZpnt1, 2, 2, 2,1, Gray, ,2
120 GPent [0] =@lastid
121 POLYLINE 4,XZpnt2,2,2,2,l,Gray, ,2
122 GPent [1] =@lastid
123 rem YZ
124 POLYLINE 4, YZpnt1, 2,2, 2,1,Gray, ,2
125 GPent [2] =@lastid
126 POLYLINE 4 , YZpnt2 ,2,2,2,1, Gray, , 2
127 GPent [3] =@lastid
128 POINT Origin [0], Origin [1],Origin [2],Gray
129 OrgEnt=@lastid
130 goto exit
131 }
132 if ((Pplane == XZplane) & & (Splane==NOplane))
133 {
134 rem XY
135 POLYLINE 4.XYpnt1, 2 , 2 , 2, 1,Gray, , 2
136 GPent [0] =@lastid
137 POLYLINE 4 , XYpnt2 , 2 , 2 , 2 , 1 , Gray, , 2
138 GPent [1] =@lastid
139 rem YZ
140 POLYLINE 4 , YZpnt1, 2 , 2, 2 , 1, Gray, , 2
141 GPent [2] =@lastid
142 POLYLINE 4 ,YZpnt2 , 2, 2, 2, 1,Gray, , 2
143 GPent [3] -@lastid
144 POINT Origin [0], Origin [1], Origin [2], Gray
145 OrgEnt=@lastid
146 goto exit BLDPLANE.CDP Monday, March 28, 1994 9 21 am Page 3
147 }
148 if ((Pplane == YZplane) &.&. (Splane==NOplane) )
149 {
150 rem XY
151 POLYLINE 4, XYpnt1, 2, 2, 2,1, Gray, ,2
152 GPent [0] -@lastid
153 POLYLINE 4,XYpnt2,2,2,2,1,Gray, ,2
154 GPent [1] -@lastid
155 rem XZ
156 POLYLINE 4,XZpnt1, 2, 2, 2,1, Gray, ,2
157 GPent [2] =@lastιd
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
162 goto exit
163 }
164
165 rem No Pplane Paths
166 if ((Splane == XYplane) &.&. (Pplane==NOplane))
167 {
168 rem XZ
169 POLYLINE 4 , XZpnt1 , 2,2,2,1, Gray, , 2
170 GPent [0] =@lastid
171 POLYLINE 4,XZpnt2,2,2,2,1,Gray, ,2
172 GPent [1] =@lastid
173 rem YZ
174 POLYLINE 4, YZpnt1, 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
180 goto exit
181 }
182 if ((Splane == XZplane) && (Pplane==NOplane))
183 {
184 rem XY
185 POLYLINE 4 , XYpnt1 ,2,2,2,1, Gray, , 2
186 GPent [0]=@lastid
187 POLYLINE 4 , XYpnt2 ,2,2,2,1, Gray, , 2
188 GPent [1] -@lastid
189 rem YZ
190 POLYLINE 4, YZpnt1 ,2,2,2,1, Gray, , 2
191 GPent [2] -@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
196 goto exit
197 }
198 if ((Splane == YZplane) && (Pplane == NOplane))
199 {
200 rem XY
201 POLYLINE 4,, XYpnt1 ,2,2,2,1, Gray, , 2
202 GPent [0] = lastid
203 POLYLINE 4,, XYpnt2 ,2,2,2,1, Gray, , 2
204 GPent [1] =@lastid
205 rem XZ
206 POLYLINE 4 , XZpnt1 ,2,2,2,1, Gray, , 2
207 GPent [2] -@lastid
208 POLYLINE 4 , XZpnt2 ,2,2,2,1, Gray, , 2
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, XZpnt1, 2, 2, 2,1, Gray, ,2 BLDPLANE CDP Monday, March 28, 1994 9 21 am Page 4
220 GPent [0] =@lastid
221 POLYLINE 4,XZpnt2,2,2,2,l,Gray, ,2
222 GPent [1]=@lastid
223 rem YZ
224 POLYLINE 4, YZpnt1,2,2,2,1,Gray,, 2
225 GPent [2] -@lastid
226 POLYLINE 4 ,YZpnt2 ,2,2,2,1,Gray, , 2
227 GPent [3] =@lastid
228 POINT Origin[0], Origin [1],Origin [2],Gray
229 OrgEnt=@lastid
230 goto exit
231 }
232 if ((Pplane == Splane) && (Pplane==XZplane))
233 {
234 rem XY
235 POLYLINE 4, XYpnt1,2,2,2,1, Gray, , 2
236 GPent [0] =@lastid
237 POLYLINE 4 , XYpnt2 ,2,2,2,1, Gray, , 2
238 GPent [1] =@lastid
239 rem YZ
240 POLYLINE 4, YZpnt1,2,2,2,1, Gray, ,
241 GPent [2] =@lastid
242 POLYLINE 4 , YZpnt2 ,2,2,2,1, Gray, ,
243 GPent [3] =@lastid
244 POINT Origin [0], Origin [1],Origin [2],Gray
245 OrgEnt=@lastid
246 goto exit
247 }
248 if ( (Pplane == Splane) && (Pplane==YZplane) )
249 {
250 rem XY
251 POLYLINE 4, XYpnt1 ,2,2,2,1, Gray, , 2
252 GPent [0] =@lastid
253 POLYLINE 4 , XYpnt2 ,2,2,2,1, Gray, , 2
254 GPent [1] =@lastid
255 rem XZ
256 POLYLINE 4, XZpnt1, 2, 2, 2,1, Gray, ,2
257 GPent [2]=@lastid
258 POLYLINE 4 , XZpnt2 ,2,2,2,1, Gray, , 2
259 GPent [3] =@lastid
260 POINT Origin[0] ,Origin[1] ,Origin[2],Gray
261 OrgEnt=@lastid
262 goto exit
263 }
264
265 rem No Pplane or Splane Path
266 if ( (Pplane==NOplane) && (Splane==NOplane))
267 {
268 rem XY
269 POLYLINE 4 , XYpnt1 , 2,2,2,1, Gray, , 2
270 GPent [0] =@lastid
271 POLYLINE 4 , XYpnt2 ,2,2,2,1, Gray, ,2
272 GPent [1) =@lastid
273 rem XZ
274 POLYLINE 4,XZpnt1 ,2,2,2,1, Gray, , 2
275 GPent [2] =@lastid
276 POLYLINE 4,XZpnt2,2,2,2,l,Gray, ,2
277 GPent [3]=@lastid
278 rem YZ
279 POLYLINE 4 , YZpnt1 ,2,2,2,1,Gray, , 2
280 GPent [4] =@lastid
281 POLYLINE 4 , YZpnt2 ,2,2,2,1, Gray, , 2
282 GPent [5] -@lastid
283 POINT Origin[0],Origin[1] ,Origin[2],Gray
284 OrgEnt=@lastid
285 goto exit
286 }
287
288 :exit
289 auto -1
290 redraw -l
291 EXIT BLDVIEW. CDP Monday, March 28, 1994 9 21 am Page 1
1 rem BLDVIEW. 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 OldX, OldY, OldZ, OldMagX, OldMagY, OldMagZ
7
8 on Views goto WldView,MagView,OptView,exit
9
10 :WldView
11 dosub gprset . cdp
12 dosub gpmove . cdp
13 dosub calplane . cdp
14 Vn=0
15 goto Top
16
17 :MagView
16 OldX=XYZrot [0]
19 XYZrot [0] -MagOrgn [0]
20 OldY-XYZrot [1]
21 XYZrot [1] =MagOrgn [1]
22 OldZ=XYZrot[2]
23 XYZrot [2 ] =MagOrgn[2]
24 OldsagX=XYZmag[0)
25 OldMagY=XYZmag [1]
26 OldMagZ=XYZmag[2]
27 XYZmag [0] =XYZmag [1] =XYZmag [2] =0
28 dosub rmagwld.cdp
29 Vn=3
30 goto Top
31
32 :OptVιew
33 Vn=6
34 goto Top
35
36 /* Get Grid Plane XY's 3 Point Optimized View Definition */
37 :Top
38 NextVιew=1
39 Vx1-XYwgp[0]
40 Vy1-XYwgp[1]
41 Vz1=XYwgp[2]
42 Vx2=XYwgp[3]
43 Vy2=XYwgp[4]
44 Vz2=XYwgp[S]
45 Vx3=XYwgp(6]
46 Vy3=XYwgp[7]
47 Vz3=XYwgp[8]
48 goto MakeView
49
50 /* Get Grid Plane XZ's 3 Point Optimized View Definition */
51 :Front
52 Vn=Vn+l
53 NextVιew-2
54 Vx1=XZwgp[0]
55 Vy1=XZwgp[1]
56 Vz1-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 Vx1 = YZwgp [0]
70 Vy1=YZwgp [1]
71 Vz1-YZwgp[2]
72 Vx2=YZwgp[3]
73 Vy2=YZwgp[4] BLDVIEW . CDP Monday, March 28, 1994 9:21 am Page2
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
82 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]
88 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[Vn] [5],VM[Vn] [6] , VM [Vn] [7] , VM [Vn] [8]
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[Vn] [9],VM[Vn] [10]
99 sys_put_name 2,VM[Vn] [9], SSVnote [Vn]
100 on NextView goto exit, Front, Side, exit
101
102 :exit
103 if (Views==World)
104 dosub rmagwld.cdp
105 if (Views==Magnetic)
106 {
107 XYZrot [0]=OldX
108 XYZrot [1]=OldY
109 XYZrot [2] =OldZ
110 XYZmag [0] =OldMagX
111 XYZmag [1]=OldMagY
112 XYZmag [2] =OldMagZ
113 dosub gprset.cdp
114 dosub gprotate.cdp
115 dosub gpmove . 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
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
8 StkyCol-White
9
10 FinderX=FinderY=FinderZ=0
11 if (PointsHS)
12 dosub disppnts . cdp
13 : restart
14 LstNodes=0
15 ARRAY PntNodes [MaxNodes] [3]
16 ARRAY PntlDs [MaxNodes]
17 ARRAY LinelDs [MaxNodes]
18 on ModeNum goto Manual, SimiAuto,Auto, Sticky, CutPln0, CutPlns0, ProjP2P0, exit
19
20 :Manual
21 LastBhit-Bhit=Nodes=NodeErr=0
22 :top0
23 prompt "B1 Press=Start | B2=End B2/ESC=exit | Nodes = %d",Nodes
24 :topl
25 DO
26 {
27 readdev Fcntl, Fx,Fy,Fz, Fa, Fb.Fc
28 ((INCLUDE finderl.inc
29 Bhit = Fcntl & 3
30 getkey
31 if (@key == 27)
32 goto exit
33 if (@key == Del)
34 exitloop
35 } WHILE (Bhit == None)
36 if ((@key == Del) && (Delete == On))
37 goto deleteit
38 if ((@key == Del) && (Delete == Off))
39 {
40 #INCLUDE delnode.inc
41 goto top0
42 }
43 on Bhit goto topi, B201, B101, topi
44
45 :B101
46 #INCLUDE finder0.inc
47 ((INCLUDE pnttrace.inc
48 if (Beep == On)
49 print "\007"
50 if (Nodes == MaxNodes)
51 {
52 pause "MaxNodes %d reached. Increase MaxNodes using \"Control :MaxNodes\". ".MaxNodes
53 redraw -1
54 goto restart
55 }
56 ((INCLUDE waitrell.
57 goto top0
58
59 :B201
60 if (Nodes None)
61 goto exit
62 dosub buildit
63 if (NodeErr = True)
64
65 NodeErr-False
66 goto Manual
67 }
68 Delete-On
69 LstNodes-Nodes
70 ((INCLUDE waitre12.inc
71 goto Manual
72
73 BUILDGET. CDP Monday, March 28, 1994 9 21 am Page 2
74 :CutPln0
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
82 :top2
83 prompt "B1 Press=Start | B2=End I B2/ESC=exit | Nodes = %d", Nodes
84 :top3
85 DO
86 {
87 readdev Fcntl, Fx,Fy,Fz, Fa, Fb,Fc
88 ((INCLUDE finderl.inc
89 Bhit = Fcntl & 3
90 getkey
91 if (@key == 27)
92 goto exit
93 if (@key == Del)
94 exitloop
95 } WHILE (Bhit == None)
96 if ((@key == Del) && (Delete == On))
97 goto deleteit
98 if ((@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 sqrt ( (XYwgp [9] "2) + (XYwgp [10]^2) + (XYwgp [11]^2) ) )
112 if (abs(Pnt2PlnD) > GridTol)
113 goto top3
114 rem Fz=Origιn [2] +Pdisp
115 if (Align== On)
116 {
117 Fx- Fx+ ( - Pnt2 PlnD*XYwgp [9])
118 Fy=Fy+(-Pnt2PlnD*XYwgp[10])
119 Fz=Fz+(-Pnt2PlnD*XYwgp[11] )
120 rem pause "Dist=% 4f X=V 4f Y-% 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 sqrtt (XZwgp [ 9] ^2) + (XZwgp [10] ^2) + (XZwgp [11] ^2) ) )
127 if (abs(Pnt2PlnD) > GridTol)
128 goto top3
129 em Fy=Orιgιn[1]+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) + (YZwgp [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=Origin[0] +Pdisp
145 if (Align==On)
146 { BUILDGET.CDP Monday, March 28, 1994 9:21 am Page 3
147 Fx=Fx+ ( - Pnt2PlnD*YZwgp [ 9] )
148 Fy-Fy+ ( -Pnt2PlnD*YZwgp [10) )
149 Fz=Fz+ ( -Pnt2PlnD*YZwgp [ 11] )
150 rem pause "Dist=%.4f X=%.4f Y=%.4f Z=%.4f", Pnt2PlnD, Fx,Fy,Fz
151 }
152 goto jump
153
154 :jump
155 ((INCLUDE finder0. inc
156 ((INCLUDE pnttrace.inc
157 if (Beep == On)
158 print "\007"
159 if (Nodes == MaxNodes)
160 {
161 pause "MaxNodes = %d reached. Increase MaxNodes using \'Control :MaxNodes\".".MaxNodes
162 redraw -1
163 goto restart
164 }
165 ((INCLUDE waitrell.inc
166 goto top2
167
168 :B202
169 if (Nodes == None)
170 goto exit
171 dosub buildit.cdp
172 if (NodeErr == True)
173 {
174 NodeErr=False
175 goto CutPln
176 }
177 ((INCLUDE finder2. inc
178 dosub plnmenu.cdp
179 dosub rmagwld2.cdp
180 Delete=0n
181 LstNodes=Nodes
182 ((INCLUDE waitrel2. inc
183 goto CutPln
184
185 :Auto
186 LastBhit=Bhit=Nodes=NodeErr=0
187 :top4
188 prompt "B1 Press/Release-Start/Stop | B2/ESC=exit | Nodes = %d", Nodes
189 :top5
190 getkey
191 if (@key == 27)
192 goto exit
193 if ((@key == Del) && (Delete == On))
194 goto deleteit
195 readdev Fcntl, Fx, Fy, Fz, Fa, Fb,Fc
196 ((INCLUDE finderl.inc
197 LastBhit = Bhit
198 Bhit = Fcntl - 3
199 if ( (Bhit == None) && (LastBhit == None) )
200 goto top5
201 on Bhit goto Blrel, exit, B103, top5
202
203 :Blrel
204 if (Nodes == None)
205 goto exit
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 finderO.inc
218 ((INCLUDE pnttrace.inc
219 if (Beep == On) BUILDGET.CDP Monday, March 28, 1994 9 21 am Page 4
220 print "\007"
221 if (Nodes == MaxNodes)
222 (
223 pause "MaxNodes = %d 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 LastBhit=Bhit=Nodes=NodeErr=0
233 :SAtop0
234 prompt "B1 Press=Start | B2=End B2/ESC=exit I Nodes = %d",Nodes
235 :SAtopl
236 DO
237 {
238 readdev Fcntl , Fx, Fy, Fz, Fa, Fb, Fc
239 ((INCLUDE f inder1. inc
240 Bhit = Fcntl & 3
241 getkey
242 if (@key == 27)
243 goto exit
244 if (@key == Del)
245 exitloop
246 } WHILE (Bhit == None)
247 if ((@key == Del) && (Delete == On))
248 goto deleteit
249 if ((@key == Del) t& (Delete == Off))
250 {
251 #INCLUDE delnode.inc
252 goto SAtop0
253 )
254 on Bhit goto SAtop1, B2SA, B1SA, SAtopl
255
256 :B1SA
257 ((INCLUDE f inder0. inc
258 ((INCLUDE pnttrace . inc
259 if (Beep == On)
260 print "\007"
261 if (Nodes == MaxNodes)
262 {
263 pause "MaxNodes = %d reached Increase MaxNodes using \"Control :MaxNodes\" ", MaxNodes
264 redraw -1
265 goto restart
266 }
267 Wait Delay
268 goto SAtop0
269
270 :B2SA
271 if (Nodes == None)
272 goto exit
273 dosub buildit
274 if (NodeErr == True)
275 {
276 NodeErr=False
277 goto SimiAuto
278 }
279 Delete=On
280 LstNodes=Nodes
281 ((INCLUDE waitrel2.inc
282 goto SimiAuto
283
284 :ProjP2P0
285 if (Pplane == NOplane)
286 {
287 pause "Primary Plane not set Use \"SetGrid\" to enable CutPlane"
288 goto exit
289 }
290 :ProjP2P
291 LastBhit=Bhit=Nodes=NodeErr=0
292 :ProjP2P2 BUILDGET. CDP Monday, March 28, 1994 9 21 am Page 5
293 prompt "B1 Press=Start | B2=End | B2/ESC=exit | Nodes = %d", Nodes
294 :ProjP2P3
295 DO
296 {
297 readdev Fcntl, Fx,Fy,Fz, Fa, Fb, Fc
298 ((INCLUDE fmder1.inc
299 Bhit = Fcntl & 3
300 getkey
301 if (@key == 27)
302 goto exit
303 if (@key == Del)
304 exitloop
305 } WHILE (Bhit == None)
306 if ((@key == Del) &.&. (Delete == On))
307 goto deleteit
308 if ((@key == Del) && (Delete == Off))
309 {
310 #INCLUDE delnode.inc
311 goto ProjP2P2
312 )
313 on Bhit goto ProjP2P3, B2p2p, B1p2p, ProjP2P3
314
315 :B1p2p
316 Delete-Off
317 on Pplane goto exit, XYp2p, XZp2p, YZp2p, exit
318
319 :XYp2p
320 Pnt2PlnD= ( ( (XYwgp [91 *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] )/\
321 sqrt((XYwgp [9] "2) + (XYwgp [10] ^2) + (XYwgp [11] ^2)))
322 Fx=Fx+ (-Pnt2PlnD*XYwgp [9] )
323 Fy=Fy+(-Pnt2PlnD*XYwgp[10] )
324 Fz=Fz+ (-Pnt2PlnD*XYwgp[11] )
325 goto jump_p2p
326
327 :XZp2p
328 Pnt2PlnD= ( ( (XZwgp [9] *Fx) + (XZwgp [10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) /\
329 sqrt ((XZwgp [91^2) + (XZwgp [10] ^2) + (XZwgp [11] ^2)))
330 Fx=Fx+(-Pnt2PlnD*XZwgp[9] )
331 Fy-Fy+ ( -Pnt2PlnD*XZwgp [10] )
332 Fz-Fz+(-Pnt2PlnD*XZwgp[11] )
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[9] )
339 Fy=Fy+(-Pnt2PlnD*YZwgp[10] )
340 Fz=Fz+(-Pnt2PlnD*YZwgp[11])
341 goto jump_p2p
342
343 :jump_p2p
344 ((INCLUDE fmder0. inc
345 ((INCLUDE pnttrace inc
346 if (Beep == On)
347 print "\007"
348 if (Nodes == MaxNodes)
349 {
350 pause "MaxNodes = %d 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)
359 goto exit
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 6
366 ((INCLUDE finder2.inc
367 dosub plnmenu cdp
368 dosub rmagwld2.cdp
369 Delete-On
370 LstNodes-Nodes
371 ((INCLUDE waitrel2.mc
372 goto ProjP2P
373
374 :Sticky
375 LastBhit=Bhlt=Nodes=NodeErr=OldStky=0
376 :Sticky1
377 prompt "B1 Press/Release-Start/Stop | B2/ESC=exit | Nodes = %d",Nodes
378 :Sticky2
379 if (Nodes)
380 {
381 Mode draw
382 LINE PntNodes [(Nodes-1)] [0], PntNodes [ (Nodes-1) 1 [1] , PntNodes [ (Nodes-1) ] [2],\
383 Fx,Fy,Fz, Black, ,1, , , ,@1width+4
384 Mode normal
385 }
386 getkey
387 if (@key == 27)
388 goto exit
389 if ((@key == Del) && (Delete == On))
390 goto deleteit
391 if ((@key == Del) && (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 FιnderX, FmderY, FιnderZ, Black
401 FιnderX=Fx
402 FinderY=Fy
403 FinderZ=Fz
404 point FinderX,FinderY,FmderZ,StkyCol
405 mode normal
406 }
407 if (Nodes)
408 {
409 Mode draw
410 LINE PntNodes [ (Nodes-1) 1 [0] , PntNodes [ (Nodes-1) ] [1] , PntNodes [ (Nodes-1) ] [2] , \
411 Fx,Fy,Fz, LRed,, 2, , , ,@lwidth
412 Mode normal
413 }
414 LastBhit = Bhit
415 Bhit = Fcntl & 3
416 if ((Bhit == None) && (LastBhit == None))
417 goto Sticky2
418 on Bhit goto SBlre1, SB2, SB1, Sticky2
419
420 :SBlre1
421 StkyCol-White
422 if (Nodes)
423 {
424 Mode draw
425 LINE PntNodes! (Nodes-1) ] [0] , PntNodes [ (Nodes-1) 1 [1] , PntNodes [ (Nodes-1) ] [2],\
426 Fx,Fy,Fz, Black, , 1, , , , @lwidth+4
427 Mode normal
428 }
429 ((INCLUDE finder0. inc
430 Mode draw
431 Delete=Off
432 point StickyX,StickyY,StickyZ, White
433 PntNodes [Nodes] [0] = StickyX
434 PntNodes [Nodes] [1] = StickyY
435 PntNodes [Nodes] [2] = StickyZ
436 Nodes=Nodes+1
437 if (Nodes>1)
43B LINE PntNodes [ (Nodes-2) ] [0] , PntNodes [ (Nodes-2) ] [1] , PntNodes [ (Nodes-2 ) ] [2] , \ BUILDGET.CDP Monday, March 28, 1994 9 21 am Page 7
439 StickyX,StickyY,StickyZ, White, ,2
440 Mode normal
441 if (Beep == On)
442 print "\007"
443 if (Nodes == MaxNodes)
444 {
445 pause "MaxNodes = %d reached Increase MaxNodes using \"Control :MaxNodes\" ", MaxNodes
446 redraw -1
447 goto restart
448 }
449 goto Stickyl
450
451 :SB1
452 StkyCol=Red
453 StickyX=Fx
454 StickyY=Fy
455 StickyZ=Fz
456 goto Stickyl
457
458 :SB2
459 StkyCol=White
460 if (Nodes == None)
461 goto exit
462 dosub buildit.cdp
463 if (NodeErr == True)
464 {
465 NodeErr=False
466 goto Sticky
467 }
468 Delete=On
469 LstNodes-Nodes
470 ((INCLUDE waitrel2.inc
471 goto Sticky
472
473 :CutPlns0
474 if (Pplane == NOplane)
475 goto NoPplane
476 if (Splane == NOplane)
477 goto NoSplane
478 if (Pplane == Splane)
479 goto NoX
480 goto CutPlns
481
482 :NoPplane
483 pause "Primary Plane not specified. Use \"Set G ri d\" to enable .
484 goto exit
485
486 :NoSplane
487 pause "Secondary Plane not specified. Use V'Set Grιd\" to enable . "
488 goto exit
489
490 :NoX
491 pause "Primary Plane and Secondary Plane do not intersect."
492 goto exit
493
494 :CutPlns
495 LastBhit=Bhit=Nodes-0
496 :tops2
497 prompt "B1 Press-Start | B2=End I B2/ESC=exit | Nodes = %d" ,Nodes
498 :tops3
499 DO
500 {
501 readdev Fcntl, Fx,Fy,Fz, Fa, Fb,Fc
502 ((INCLUDE finder1.inc
503 Bhit = Fcntl & 3
504 getkey
505 if (@key == 27)
506 goto exit
507 if (@key == Del)
508 exitloop
509 } WHILE (Bhit == None)
510 if ((@key == Del) && (Delete == On))
511 goto deleteit BUILDGET.CDP Monday, March 28, 1994 9.21 am Page 8
512 if ((@key == Del) && (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 Pnt2Pln1= ( ( (XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) /\
525 sqrt ( (XYwgp [9] ^2) + (XYwgp [10] ^2) + (XYwgp [11]^2) ) )
526 if (abs (Pnt2Pln1) > GridTol)
527 goto tops3
528 if (Splane==XZplane)
529 {
530 Pnt2P1n2= ( ( (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) + (YZwgp [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+ (-Pnt2Pln1*XYwgp [9] )
545 Fy=Fy+ ( -Pnt2Pln1*XYwgp [10] )
546 Fz=Fz+ ( -Pnt2Pln1*XYwgp [11] )
547 if (Splane==XZplane)
548 {
549 Fx=Fx+ (-Pnt2Pln2*XZwgp[9])
550 Fy=Fy+ (-Pnt2Pln2*XZwgp[10])
551 Fz=Fz+ (-Pnt2Pln2*XZwgp[11])
552 }
553 if (Splane==YZplane)
554 {
555 Fx=Fx+ ( -Pnt2Pln2*YZwgp [9] )
556 Fy=Fy+ ( -Pnt2Pln2*YZwgp [10] )
557 Fz=Fz+ ( -Pnt2Pln2*YZwgp [11) )
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(Pnt2Pln1) > GridTol)
566 goto tops3
567 if (Splane==XYplane)
568 {
569 Pnt2Pln2= ( ( (XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) /\
570 sqrt ( (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
580 }
581 if (Align== On)
582 {
583 Fx=Fx+ (-Pnt2Pln1*XZwgp [9] )
584 Fy-Fy+ ( -Pnt2Pln1*XZwgp [10] ) BUILDGET. CDP Monday, March 28, 1994 9 21 am page 9
585 Fz=Fz+(-Pnt2Pln1*XZwgp[11])
586 if (Splane==XYplane)
587 {
588 Fx-Fx+ (-Pnt2Pln2*XYwgp[9] )
589 Fy=Fy+ ( -Pnt2Pln2*XYwgp[10])
590 Fz=Fz+(-Pnt2Pln2*XYwgp[11])
591 }
592 if (Splane==YZplane)
593 {
594 Fx=Fx+(-Pnt2Pln2*YZwgp[9])
595 Fy=Fy+(-Pnt2Pln2*YZwgp[10] )
596 Fz=Fz+(-Pnt2Pln2*YZwgp[11])
597 }
598 }
599 goto jumps
600
601 :YZpaths
602 Pnt2Pln1= (((YZwgp[9] *Fx) + (YZwgp [10] *Fy) + (YZwgp [11] *Fz) +YZwgp [12] ) /\
603 sqrt( (YZwgp [9] "2) + (YZwgp [10] ^2) + (YZwgp [11] ^2)))
604 if (abs(Pnt2Pln1) > GridTol)
605 goto tops3
606 if (Splane==XYplane)
607 {
608 Pnt2Pln2= ( ( (XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) /\
609 sqrt ( (XYwgp [9] "2) + (XYwgp [101 ^2) + (XYwgp [11]^2)))
610 if (abs(Pnt2Pln2) > GridTol)
611 goto tops3
612 }
613 if (Splane==XZplane)
614 {
615 Pnt2Pln2= ( ( (XZwgp [9] *Fx) + (XZwgp [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+(-Pnt2Pln1*YZwgp[9] )
623 Fy=Fy+(-Pnt2Pln1*YZwgp[10] )
624 Fz=Fz+(-Pnt2Pln1*YZwgp[11] )
625 if (Splane==XYplane)
626 {
627 Fx=Fx+(-Pnt2Pln2'XYwgp[9] )
628 Fy=Fy+(-Pnt2Pln2*XYwgp[10] )
629 Fz=Fz+(-Pnt2Pln2*XYwgp[11] )
630 }
631 if (Splane==XZplane)
632 {
633 Fx=Fx+(-Pnt2Pln2*XZwgp[9] )
634 Fy=Fy+(-Pnt2Pln2*XZwgp[10] )
635 Fz=Fz+(-Pnt2Pln2*XZwgp[11])
636 }
637 }
638 goto jumps
639
640 : jumps
641 ((INCLUDE fmder0.inc
642 ((INCLUDE pnttrace.inc
643 if (Beep == On)
644 print "\007"
645 if (Nodes == MaxNodes)
646 {
647 pause "MaxNodes = %d 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
654 POINT PntNodes [0] [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 10
658 Mode draw
659 for (i-1, i<Nodes, i-i+1)
660 {
661 POINT PntNodes [ (i) ] [0], PntNodes [ (i) ] [l],PntNodes [ (i)] [2],White,,
662 LINE PntNodes [d-D] [0], PntNodes [ (i-l) ] [1], PntNodes [ (i-1) ] [2],\
663 PntNodes [(i)] [0], PntNodes [ (i)] [1],PntNodes[ (i)l [2],White, ,2
664 }
665 Mode normal
666 }
667 ((INCLUDE waitrell inc
668 goto tops2
669
670 B202s
671 if (Nodes == None)
672 goto exit
673 dosub buildit cdp
674 if (NodeErr == True)
675 {
676 NodeErr-False
677 goto CutPlns
678 }
679 ((INCLUDE fmder2 inc
680 dosub plnmenu cdp
681 dosub rmagwld2 cdp
682 Delete-On
683 LstNodes-Nodes
684 ((INCLUDE waitrel2 inc
685 goto CutPlns
686
687 deleteit
688 Delete-Off
689 if (Points)
690 for (n=0, n<LstNodes, n=n+1)
691 DELENT PntlDs [n]
692 if (GeoType == CKpoint)
693 for (n=0, ncLstNodes, n=n+1)
694 DELENT PntIDs[n]
695 if (GeoType -= CKline)
696 for (n=0, n< (LstNodes-1) , n=n+1)
697 DELENT LineIDs[n]
698 if ((GeoType == CKpline) || (GeoType == CKsplme))
699 DELENT LastEnt
700 LstNodes=0
701 #INCLUDE finder3 inc
702 goto restart
703
704 exit
705 MODE normal
706 clear PntNodes, PntIDs, LineIDs, Fcnt1, Fx, Fy,Fz
707 ((INCLUDE fmder2 inc
708 EXIT
BUILDIT CDP Monday, March 28, 1994 9 21 am Page 1
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
18 for (n=0, n<Nodes, n=n+1)
19 {
20 if (n== 0)
21 ColCode=Red
22 if (n== 1)
23 ColCode-Blue
24 if (n>1)
25 ColCode=Gray
26 if (n== (Nodes-1) )
27 ColCode-Green
28 point PntNodes [n] [0], PntNodes [n] [1], PntNodes [n] [2],ColCode, , 122, PntsSgrp
29 PntIDs [n] =@lastιd
30 }
31 }
32 if (GeoType== CKline)
33 {
34 if (Nodes < 2)
35 {
36 pause "Lines require 2 Nodes minimum You entered %d Nodes", Nodes
37 redraw -1
38 NodeErr=True
39 goto exit
40 }
41 LineSgrp=LmeSgrp + l
42 for (n=0, n< (Nodes-1) , n=n+1)
43 {
44 LINE PntNodes [n] [0], PntNodes [n] [1], PntNodes [n] [2], \
45 PntNodes [n+1] [0], PntNodes [n+1] [1], PntNodes tn+1] [2],@color, , 1, 121,LιneSgrp
46 LineIDs [n] =@lastid
47 }
48 if (Points)
49 {
50 PntsSgrp=PntsSgrp+1
51 for (n=0, n<Nodes , n-n+1)
52 {
53 if (n==0)
54 ColCode=Red
55 if (n==1)
56 ColCode=Blue
57 if (n>1)
58 ColCode-Gray
59 if (n== (Nodes-1))
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==CKplme)
67 {
68 if ((Nodes < 3) && (Ptype == Closed))
69 {
70 pause "Closed Polylines require 3 Nodes minimum You entered %d Nodes",Nodes
71 redraw -1
72 NodeErr-True
73 goto exit BUILDIT.CDP Monday, March 28, 1994 9 21 am Page 2
74
75 if ((Nodes < 2 ) &.&. (Ptype == Open))
76 {
77 pause "Open Polylines require 2 Nodes minimum You entered %d Nodes", Nodes
78 redraw -1
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+1)
89 {
90 if (n==0)
91 ColCode=Red
92 if (n==1)
93 ColCode=Blue
94 if (n>1)
95 ColCode-Gray
96 if (n==(Nodes-1) )
97 ColCode=Green
98 point PntNodes [n] [0], PntNodes [n] [1], PntNodes [n] [2], ColCode, (@level+PntsLev), 122, PntsSgrp
99 PntIDs[n]-@lastid
100 }
101 }
102 }
103 if (GeoType==CKsplme)
104 (
105 if (Nodes < 4)
106 {
107 pause "Splines require 4 Nodes minimum You entered %d Nodes".Nodes
108 redraw -1
109 NodeErr-True
110 goto exit
111 }
112 SplnSgrp=SplnSgrp+1
113 If (Stype == Open)
114
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+1)
127 {
128 if (n==0)
129 ColCode=Red
130 if (n==1)
131 ColCode=Blue
132 if (n>1)
133 ColCode-Gray
134 if (n== (Nodes-1))
135 ColCode=Green
136 point PntNodes [n] [0], PntNodes [n] [1] , PntNodes [n] [2] ,ColCode, (@level+PntsLev), 122 , PntsSgrp
137 PntIDs [n] =@lastid
136 }
139 }
140
141 #INCLUDE finder2. inc
142 auto -1
143 redraw -1
144 :exit
145 EXIT CALPLANE.CDP Monday, March 28, 1994 9:21 am Page 1
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=XYwgp[4]-XYwgp[1]
12 c=XYwgp[5] -XYwgp [2]
13 /* Find the direction ratios of line AC */
14 d=XYwgp[6]-XYwgp[0]
15 e=XYwgp[7]-XYwgp[1]
16 f=XYwgp[8]-XYwgp[2]
17 /* Find the direction ratios of the Normal to AB 4 AC */
18 CALL CROSS, XYwgp [9],XYwgp[10],XYwgp [11],a,b,c,d,e,f
19 CALL DOTPROD, XYwgp [6], XYwgp [7], XYwgp [8], XYwgp [9], XYwgp [10], XYwgp [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[0]
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=XZwgp[7]-XZwgp[1]
30 f=XZwgp[8]-XZwgp[2]
31 /* Find the direction ratios of the Normal to AB & AC */
32 CALL CROSS, XZwgp [9],XZwgp[10],XZwgp[11],a,b,c,d,e,f
33 CALL DOTPROD, 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[3]-YZwgp[0]
39 b=YZwgp[4] -YZwgp [1]
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 [1]
44 f=YZwgp[8]-YZwgp[2]
45 /* Find the direction ratios of the Normal to AB 4 AC */
46 CALL CROSS, YZwgp [9], YZwgp [10], YZwgp [11],a,b,c,d,e,f
47 CALL DOTPROD, YZwgp [6],YZwgp[7],YZwgp[8],YZwgp[9] ,YZwgp[10],YZwgp[11],YZwgp[12]
48 YZwgp [12] =0-YZwgp [12]
49
50 :exit
51 EXIT
CENTER.CDP Monday, March 28, 1994 9.21 am Page1 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 ii=20
8 MenuLev=MenuLev+1
9 sprint $MenuStr, "Select Center Option (%d) ", LastPick [ii]
10 getmenu $MenuStr, \
11 "2 Pos " , \
12 " 3 Pos" , \
13 " - ",\
14 " - ",\
15 " - ",\
16 " - ",\
17 " - ",\
18 " - ",\
19 "3DR Help" ,MenuLev, LastPick[ii]
20 switch (@key)
21 {
22 case 3:-2
23 goto exit
24 case 1
25 LastPick[ii] =1
26 :G2POS
27 iii-16
28 MenuLev-MenuLev+1
29 sprint SmenuStr, "Select 2 Position Selection Method (%d) ", LastPick[ iii]
30 getmenu SmenuStr, \
31 "Probe" , \
32 "Mouse", \
33 " - ",\
34 " - ",\
35 " - ",\
36 " - ",\
37 " - ",\
38 " - ",\
39 "3DR HELP", MenuLev, LastPick[ iii]
40 switch (@key)
41 {
42 case -3:-2
43 if (@key==- 3)
44
45 MenuLev=MenuLev-1
46 goto exit
47 }
48 if (@key==-2)
49 {
50 MenuLev=MenuLev-2
51 goto top
52 }
53 case 1
54 LastPick [ii i] =1
55 G2Pmode=1
56 dosub get2pos . cdp
57 if (G2Pcount ! =2 )
58 {
59 pause "2 Unique Locations Required. You entered %d" ,G2Pcount
60 MenuLev-MenuLev-1
61 auto -1
62 redraw -1
63 goto G2POS
64 }
65 break
66 case 2
67 LastPick [iii] =2
66 G2Pmode=2
69 dosub get2pos.cdp
70 if (G2Pcount!=2)
71 {
72 pause "2 Unique Locations Required. You entered %d",G2Pcount
73 MenuLev=MenuLev-1 CENTER. CDP Monday, March 28, 1994 9:21 am Page 2
74 auto -1
75 redraw -1
76 goto G2POS
77 }
78 break
79 case 3:8
80 LastPick [iii] =9
81 Menu=15
82 dosub 3drhelp.cdp
83 MenuLev-MenuLev-1
84 goto G2P0S
85 break
86 case 9
87 LastPick [iii] =9
88 Menu=15
89 dosub 3drhelp.cdp
90 MenuLev-MenuLev-1
91 goto G2POS
92 break
93 default
94 LastPick (iii) =9
95 Menu=15
96 dosub 3drhelp.cdp
97 MenuLev=MenuLev-1
98 goto G2POS
99 break
100 }
101 MenuLev=MenuLev-1
102 distAB-sqrt ( (G2Pos [1] [0] -G2POS [0] [0] ) ^2+\
103 (G2Pos [1] [1] -G2Pos [0] [1] ) ^2+\
104 (G2Pos [1] [2] -G2POS [0] [2] ) ^2)
105 CenterX=G2Pos [0] [0] + ( ( (G2Pos [1] [0] -G2Pos [0] [0] ) /distAB) * (distAB/2) )
106 CenterY=G2Pos [0] [1] + ( ( (G2Pos [1] [1] -G2Pos [0] [1] ) /distAB) * (distAB/2) )
107 CenterZ=G2Pos [0] [2] + ( ( (G2Pos [1] [2] -G2Pos [0] [2] ) /distAB) * (distAB/2) )
108 point CenterX, CenterY, CenterZ,@color
109 redraw -1
110 break
111 case 2
112 LastPick [ii] =2
113 Center=True
114 dosub circle. cdp
115 Center-False
116 if (Done==True)
117 goto exit
118 break
119 case 3:8
120 LastPick [ii] =9
121 Menu=19
122 dosub 3drhelp.cdp
123 break
124 case 9
125 LastPick [ii] =9
126 Menu=19
127 dosub 3drhelp.cdp
128 break
129 default
130 Menu=19
131 dosub 3drhelp . cdp
132 break
133 }
134 MenuLev-MenuLev-1
135 goto top
136
137 :exit
138 MenuLev-MenuLev-1
139 EXIT CIRCLE. CDP Monday, March 28, 1994 9.21 am Page 1
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, PB1[3], PB2 [3] , center[3], relxl, relx3, relyl, rely3
9 DOUBLE ang1, ang2, ml, m2, m4 , m5 , bl, b2 , b4 , b5 , VMt [11]
10
11 ang=360
12 rad=1
13 ARRAY PB1 [3]
14 ARRAY PB2[3]
15 ARRAY center [3]
16 ARRAY VMt [11]
17
18 :start
19 ii-16
20 G3Pmode-0
21 MenuLev=MenuLev+1
22 sprint SmenuStr, "Select 3 Position Selection Method (%d) ", LastPick [ii]
23 getmenu SmenuStr, \
24 Probe" , \
25 Mouse" , \
26 - ",\
27 - ",\
28 - ",\
29 - "A
30 - ",\
31 - ",\
32 3DR HELP", MenuLev, LastPick[ii]
33 switch (@key)
34 {
35 case -3 -2
36 if (@key==-3)
37 Done-True
38 goto exit
39 case 1
40 LastPick[ii]=1
41 G3Pmode=1
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 %d",G3Pcount
49 MenuLev-MenuLev-1
50 auto -1
51 redraw -1
52 goto start
53
54 break
55 case 2
56 LastPick [ii] =2
57 G3Pmode=2
58 dosub get3pos.cdp
59 if (G3Pcount!-3)
60 {
61 if (Nodes == -1)
62 pause "Points are Collmear!"
63 else
64 pause "3 Unique Locations Required. You entered %d",G3Pcount
65 MenuLev-MenuLev-1
66 auto -1
67 redraw -1
68 goto start
69
70 break
71 case 3:8
72 LastPick [ii]=9
73 Menu-15 CIRCLE. CDP Monday, March 28, 1994 9:21 am Page 2
74 dosub 3drhelp.cdp
75 MenuLev-MenuLev-1
76 goto start
77 break
78 case 9
79 LastPick [ii] =9
80 Menu=15
81 dosub 3drhelp.cdp
82 MenuLev=MenuLev-1
83 goto start
84 break
85 default
86 LastPick [ii] =9
87 Menu=15
88 dosub 3drhelp.cdp
89 MenuLev-MenuLev-1
90 goto start
91 break
92 }
93
94 if (ToolMode==6)
95 {
96 for (i=0; i<3; i=i+1)
97 {
98 on Pplane goto jump_p2p, XYp2p, XZp2p, YZp2p, jump_p2p
99
100 :XYp2p
101 Pnt2PlnD= ( ( (XYwgp [9] *G3Pos [i] [0] ) + (XYwgp [10] *G3Pos [il [1] ) + (XYwgp [11] *G3Pos [i] [2] ) +XYwgp [12] ) Λ
102 sqrt( (XYwgp [9] ^2) + (XYwgp [10] ^2) + (XYwgp [11] ^2) ) )
103 G3Pos(i] [0]-G3Pos[i] [0] + (-Pnt2PlnD*XYwgp [9] )
104 G3Pos[i] [1]=G3Pos[i] [1] + (-Pnt2PlnD*XYwgp [10] )
105 G3Pos[i] [2]=G3Pos[i] [2] + (-Pnt2PlnD*XYwgp [11] )
106 goto jump_p2p
107
108 :XZp2p
109 Pnt2PlnD= ( ( (XZwgp [9] *G3Pos [i] [0] ) + (XZwgp [10] "G3Pos [i] [1] ) + (XZwgp [11] *G3Pos [i] [2] ) +XZwgp [12] ) Λ
110 sqrt ( (XZwgp [9] ^2) + (XZwgp [10] ^2) + (XZwgp [11] ^2) ) )
111 G3Pos[i] [0]=G3Pos[i] [0] + ( -Pnt2PlnD*XZwgp [9] )
112 G3Pos[i] [1]=G3Pos[i] [1] + (-Pnt2PlnD*XZwgp [10] )
113 G3Pos[i] (2]=G3Pos(i) [2] + (-Pnt2PlnD*XZwgp [11])
114 goto jump_p2p
115
116 :YZp2p
117 Pnt2PlnD= ( ( (YZwgp [9] *G3Pos [i] [0] ) + (YZwgp [10] *G3Pos[i] [1]) + (YZwgp [11] *G3Pos [i] [2] ) +YZwgp [12] ) Λ
118 sqrt ( (YZwgp [9] ^2)+ (YZwgp [10] ^2)+ (YZwgp [11] ~2) ) )
119 G3Pos[i] [0]=G3Pos[i] [0] + (-Pnt2PlnD* YZwgp [9] )
120 G3Pos[i] [1]=G3Pos[i] [1] + (-Pnt2PlnD*YZwgp [10] )
121 G3Pos[i] [2]=G3Pos[i] [2] + (-Pnt2PlnD*YZwgp [11])
122 goto jump_p2p
123 :jump_p2p
124 }
125 }
126
127 Vx1=G3Pos[0] [0]
128 Vy1-G3Pos[0] [1]
129 Vz1=G3Pos[0] [2]
130 Vx2=G3Pos[1] [0]
131 Vy2=G3Pos[1] [1]
132 Vz2=G3Pos[1] [2]
133 Vx3=G3Pos[2] [0]
134 Vy3=G3Pos[2] [1]
135 Vz3-G3Pos[2] [2]
136 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[1]=Vmatrix[1] CIRCLE. CDP Monday, March 28, 1994 9:21 am Page 3
147 VMt[2]=Vmatrix[2]
148 VMt[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]=Vmatrix[8]
154
155 REM Define the view
156 View 99, VMt [0],VMt[1],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[1],VMt[2],VMt[3],VMt[4],VMt[5],VMt[6],VMt[7],VMt [8]
159 rem Set VIEW, VMt [9], 0
160
161 /* transform 3 points to new view coordinates */
162 call xfmwv, VMt, G3Pos [0] [0], G3Pos [0] [1], G3Pos [0] [2], G3Pos [0] [0], G3Pos [0] [1] , G3Pos[0] [2]
163 call xfmwv, VMt, G3Pos[1] [0], G3Pos[1] [1], G3Pos [1] [2], G3Pos [1] [0], G3Pos [1] [1], G3Pos [1] [2]
164 call xfmwv, VMt, G3Pos[2] [01, G3Pos[2] [1], G3Pos [2] [2], G3Pos [2] [0], G3Pos[2] [1], G3Pos [2] [2]
165
166 /* define slopes of lines G3Pos [0] ->G3Pos [1], G3Pos [1] ->G3Pos [2], check for divide by zero? */
167 /* add a later check for coincident positions ... must be 3 unique pts */
168 m1 = (G3Pos[1] [1] -G3Pos [0] [1] ) / (G3Pos [1] [0] -G3Pos[0] [0] )
169 m2 = (G3Pos[21 [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 PB1[1]-G3Pos[0] [1]
174 PB2 [0] = (G3Pos [1] [0] +G3Pos [2] [0] ) /2
175 PB2 [1] = (G3Pos [1] [1] +G3Pos [2] [1] ) /2
176 /* PB1[1] = (G3Pos[0] [1]+G3Pos[1] [1] )/2 */
177 /* By definition of view Y constant G3Pos [0] ->G3Pos [1] */
178 /* m4=-1/ml is a divide by zero, since ml shows the directio of XV */
179 m5 = -1/m2
180 /* b4 = PB1 [1] -m4*PB1 [0] can't be used since slope will be infinite */
181 b5 = PB2[1] -m5*PB2[0]
182
183 /* intersection of the two perpendicular bisectors is the arc center */
1B4 /* 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 [0]
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 (rely1==0)
200 {
201 if (relx1>0)
202 ang1-0
203 else
204 ang1=180
205 goto angle2
206 }
207 if (rely1 > 0)
208 ang1 = acos (relx1/rad)
209 else
210 ang1 = 360 - acos (relx1/rad)
211
212 :angle2
213 if (rely3==0)
214 {
215 if (relx3>0)
216 ang2=0
217 else
218 ang2=180
219 goto doit CIRCLE . CDP Monday, March 28, 1994 9:21 am Page 4
220 }
221 if (rely3 > 0)
222 ang2 = acos (relx3/rad)
223 else
224 ang2 = 360 - acos (relx3/rad)
225
226 :doit
227 if (Center)
228 vpoint center[0], center[1], 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], center[1], center[2], rad, ang1, ang2, VMt [9] , @color
233 auto -1
234 redraw -1
235 goto exit
236
237 :exit
238 MenuLev-MenuLev-1
239 clear ang, rad, PB1, PB2, center, relx1, relx3 , rely1, rely3
240 clear ang1, ang2, m1, m2, m4 , m5 , b1, b2, b4, b5, VMt
241 EXIT
CONTROL. CDP Monday, March 28, 1994 9 21 am Page 1
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 $$GPstr[0] [0] , $$Beep [0] [0] , $$Fndrstr [0] [0]
7 LastLev-@level
8 SSGPstr [0] -"GP-Hide"
9 SSGPstr [1] -"GP-Show"
10 SSBeep [0] -"Beep-Of f "
11 SSBeep [1] ="Beep-On"
12 SSFndrstr [0] ="Fndr-Off "
13 SSFndrstr [1] ="Fndr-On"
14
15 .top
16 11-5
17 MenuLev=MenuLev+1
18 sprint SMenuStr, "Select Control Function (%d) ", LastPick [ii]
19 getmenu SMenuStr, \
20 $$GPstr [GridPlns] ,\
21 $$ModeX [ModeNum] , \
22 $$Beep [Beep] ,\
23 $$Fndrstr [Finder] ,\
24 "AutoPace", \
25 "MaxNodes",\
26 "SetGrid", \
27 "-more-",\
28 "3DR Help",MenuLev, LastPick [ii]
29 switch (@key)
30 {
31 case -3 -2
32 goto exit
33 case 1
34 LastPick [ii] =1
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 [ii] =3
46 Beep = (1 # Beep)
47 if (Beep == On)
48 print "\007"
49 break
50 case 4
51 LastPick [ii] =4
52 Finder = (1 # Finder)
53 break
54 case 5
55 LastPick[ii] =5
56 getflt "Enter new time delay in seconds (%.2f): ".Delay, Delay
57 break
58 case 6
59 LastPick [ii] =6
60 getint "Enter new MaxNodes (%d) : ", MaxNodes , MaxNodes
61 break
62 case 7
63 LastPick [ii] =7
64 dosub plnmenu.cdp
65 break
66 case 8
67 LastPick [ii] =8
68 dosub control2 cdp
69 break
70 case 9
71 LastPick [ii] =9
72 Menu=6
73 dosub 3drhelp.cdp CONTROL.CDP Monday, March 28, 1994 9:21 an Page 2
74 break
75 default
76 Menu=6
77 dosub 3drhelp. cdp
78 break
79 }
80 MenuLev-MenuLev-1
81 goto top
82 :exit
83 MenuLev-MenuLev-1
84 EXIT
CONTROL2.CDP Monday, March 28, 1994 9:21 am Page1 1 rem CONTROL2.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 $$Pntstr[0] [0] , $$PntHS [0] [0]
7 LastLev-@level
8 $$Pntstr [0] ="Pnts-Off "
9 $$Pntstr [1] ="Pnts-On"
10 $$PntHS [0] -"PntsHide"
11 $$PntHS [1] -"PntsShow"
12 $$FndPntr [0] ="Pntr-Off "
13 $$FndPntr [1] ="Pntr-On"
14
15 :top
16 ii-6
17 MenuLev=MenuLev+1
18 sprint $MenuStr, "Select Control Function (%d)", LastPick[ii]
19 getmenu $MenuStr, \
20 $$Pntstr [Points] ,\
21 $$PntHS [PointsHS] ,\
22 "PntLevel", \
23 "E&Cscale", \
24 $$FndPntr [FndrPntr] , \
25 "GPmarker", \
26 "- ",\
27 " - ", \
28 "3DR Help" , MenuLev, LastPick [ii]
29 switch (@key)
30 {
31 3: -2
32 goto exit
33 case 1
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 + %d): ", PntsLev, PntsLev
55 break
56 case 4
57 LastPick [ii] =4
58 getflt "Enter Edge & Corner Scale (%.2f) : ".ECscale, ECscale
59 break
60 case 5
61 LastPick [ii] =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] ,XYwgp [2] ,Green,, 118.GPmkSgrp ,
69 line XYwgp[0] ,XYwgp[1] ,XYwgp[2],XYwgp[3] ,XYwgp[4] ,XYwgp[5] ,Red, , 1, 118 , GPmkSgrp
70 line XYwgp[0] ,XYwgp[1] ,XYwgp[2] ,XYwgp[6] ,XYwgp[7] ,XYwgp[8] ,Blue, , 1, 118.GPmkSgrp
71 line XYwgp[0] ,XYwgp[1] ,XYwgp[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 CONTROL2.CDP Monday, March 28, 1994 9:21 am Page 2
74 line XYwgp[6) ,XYwgp[7],XYwgp[8],XZwgp[6],XZwgp[7],XZwgp[8],Gray, , 2, 118 , GPmkSgrp
75 break
76 case 7:8
77 break
78 case 9
79 LastPick [ii] =9
80 Menu=9
81 dosub 3drhelp.cdp
82 break
83 default
84 Menu- 9
85 dosub 3drhelp.cdp
86 break
87 }
88 MenuLev-MenuLev-1
89 goto top
90 :exιt
91 MenuLev-MenuLev-1
92 EXIT
CORNER. CDP Monday, March 28, 1994 9.21 am Page 1
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, z1,x2,y2,z2,x3,y3, z3
7 DOUBLE Pln1 [13],Pln2[13], Pln3 [131 ,Pline[2] [3], Edge [15], Corner [15]
8 ARRAY Pln1 [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 [13]={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-1
17 dosub get3pos.cdp
18 if (G3Pcount!=3)
19 {
20 if (Nodes == -1)
21 pause "Points are Collmear!"
22 else
23 pause "3 Unique Locations Required. You entered %d",G3Pcount
24 auto -1
25 redraw -1
26 goto exit
27 }
28 x1-G3Pos[0] [0]
29 y1=G3Pos[0] [1]
30 z1=G3Pos[0] [2]
31 G3Pos[0] [0]=G3Pos[1] [0]
32 G3Pos[0] [1]=G3Pos[1] [1]
33 G3Pos[0] [2]=G3Pos[1] [2]
34 G3Pos[1] [0]=x1
35 G3Pos[1] [1]=y1
36 G3Pos[1] [2]=z1
37 dosub smthg3p.cdp
38 Pln1[0]=G3Pos[0] [0]
39 Pln1[1]=G3Pos[0] [1]
40 Pln1[2]=G3Pos[0] [2]
41 Pln1[3]=G3Pos[1] [0]
42 Pln1[4]=G3Pos[1] [1]
43 Pln1[5]=G3Pos[1] [2]
44 Pln1[6]=G3Pos[2] [0]
45 Pln1[7J=G3Pos[2] [1]
46 Pln1[8)=G3Pos[2] [2]
47 /* Calculate The Equation of the First Plane */
48 /* Find the direction ratios of line AB */
49 a=Pln1[3] -Pln1[0]
50 b=Pln1[4] -Pln1tl]
51 c=Pln1[5]-Pln1[2]
52 /* Find the direction ratios of line AC */
53 d=Pln1[6]-Pln1[0]
54 e-Pln1[7]-Pln1[1]
55 f=Pln1[8]-Pln1[2]
56 /* Find the direction ratios of the Normal to AB & AC */
57 CALL CROSS, Pln1 [9], Pln1 [10], Pln1 [11],a,b,c,d,e,f
58 CALL DOTPROD, Pln1 [6], Pln1 [7], Pln1 [8], Pln1 [9], Pln1 [10], Pln1 [11], Pln1 [12]
59 Pln1[12]=0-Pln1[12]
60
61 rem line Pln1 [0], Pln1 [1], Pln1 [2], Pln1 [3], Pln1 [4], Pln1 [5],Red, ,2
62 rem line Pln1 [0], Pln1 [1], Pln1 [2], Pln1 [6], Pln1 [7], Pln1 [8],Red, ,2
63 rem line Pln1 [3], Pln1 [4], Pln1 [5], Pln1[6],Pln1[7],Pln1 [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 if (Nodes == -1)
72 pause "Points are Collmear!"
73 else CORNER. CDP Monday, March 28, 1994 9:21 am Page 2
74 pause "3 Unique Locations Required. You entered %d",G3Pcount
75 auto -1
76 redraw -1
77 goto exit
78 }
79 x1=G3Pos[0] [0]
80 y1=G3Pos[0] [1]
81 z1=G3Pos[0] [2]
82 x2=G3Pos[1] [0]
83 y2=G3Pos[1] [1]
84 z2=G3Pos[1] [2]
85 x3-G3Pos[2] [0]
86 y3=G3Pos[2] [1]
87 z3=G3Pos[2] [2]
88 G3Pos[0] [0]=x2
89 G3Pos[0] [1]=y2
90 G3Pos[0] [2]=z2
91 G3Pos[1] [0]=x3
92 G3Pos[1] [1]=y3
93 G3Pos[1] [2]=z3
94 G3Pos[2] [0]=x1
95 G3Pos[2] [1]=y1
96 G3Pos[2] [2]=z1
97 dosub smthg3p.cdp
98 Pln2[0]=G3Pos[0] [0]
99 Pln2[1]=G3Pos[0] [1]
100 Pln2[2]=G3Pos[0] [2]
101 Pln2[3]-G3Pos[1] [0]
102 Pln2[4)=G3Pos[1] [1]
103 Pln2[5)=G3Pos[1] [2]
104 Pln2(6)=G3Pos[2] [0]
105 Pln2[7]=G3Pos[2] [1]
106 Pln2 [8]=G3Pos[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[1]
111 c=Pln2[5]-Pln2[2]
112 /* Find the direction ratios of line AC */
113 d=Pln2[6] -Pln2[0]
114 e=Pln2[7]-Pln2[1]
115 f=Pln2[8] -Pln2[2]
116 /* Find the direction ratios of the Normal to AB & AC */
117 CALL CROSS. Pln2 [9], Pln2[10],Pln2[11],a,b,c,d,e,f
118 CALL DOTPROD, Pln2 [6], Pln2 [7], Pln2 [8], Pln2 [9], Pln2 [10], Pln2 [11], Pln2 [12]
119 Pln2[12]=0-Pln2[12]
120
121 rem line Pln2 [0],Pln2[1], Pln2 [2], Pln2 [3], Pln2 [4], Pln2 [5], 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 [8],Green, ,2
124
125 prompt "Define Surface 3"
126 wait 1
127 G3Pmode=1
128 dosub get3pos.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 %d",G3Pcount
135 auto -1
136 redraw - 1
137 goto exit
138 }
139 dosub smthg3p.cdp
140 Pln3[0]=G3Pos[0] [0]
141 Pln3[1]=G3Pos[0] [1]
142 Pln3[2]=G3Pos[0] [2]
143 Pln3[3]=G3Pos[1] [0]
144 Pln3[4]=G3Pos[1] [1]
145 Pln3[5]=G3Pos[1] [2]
146 Pln3 [6]=G3Pos[2] [0] CORNER.CDP Monday, March 28, 1994 9 21 am Page 3
147 Pln3[7]=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 b=Pln3[4)-Pln3[1]
153 c=Pln3[5]-Pln3[2]
154 /* Find the direction ratios of line AC */
155 d=Pln3[6]-Pln3[0]
156 e=Pln3[7]-Pln3[1]
157 f=Pln3[8]-Pln3[2]
158 /* Find the direction ratios of the Normal to AB & AC */
159 CALL CROSS, Pln3 [9] ,Pln3[10] ,Pln3[11] ,a,b,c,d,e,f
160 CALL DOTPROD, Pln3 [6] , Pln3 [7] ,Pln3[8] ,Pln3[9] ,Pln3[10] ,Pln3[11], 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 [8] , 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 & 1 of Plane 1 to 2nd Plane to form projection Line
169 Pnt2PlnD= ( ( (Pln2 [9] *Pln1 [0] ) + (Pln2 [10] *Pln1 [1] ) + (Pln2 [11] *Pln1 [2] ) +Pln2 [12] ) /\
170 sqrt ( (Pln2 [9] ^2) + (Pln2 [10] ^2) + (Pln2 [11] ^2) ) )
171 Pline[0] [0] =Pln1 [0] + (-Pnt2PlnD*Pln2 [9] )
172 Pline[0] [1] =Pln1 [1] + (-Pnt2PlnD*Pln2 [10] )
173 Pline[0] [2] =Pln1 [2] + (-Pnt2PlnD*Pln2 [11] )
174 Pnt2PlnD= ( ( (Pln2 [9] *Pln1 [6] ) + (Pln2 [10] *Pln1 [7] ) + (Pln2 [11] *Pln1 [8] ) +Pln2 [12] ) /\
175 sqrt ( (Pln2 [9] ^2) + (Pln2 [10] ^2) + (Pln2 [11] ^2) ) )
176 Pline[1] [0] =Pln1 [6] + (-Pnt2PlnD*Pln2 [9] )
177 Pline [1] [1] =Pln1 [7] + (-Pnt2PlnD*Pln2 [10] )
178 Pline[1] [2] =Pln1 [8] + (-Pnt2PlnD*Pln2 [111 )
179 rem Calculate Angle Between the two lines
180 distCA1=sqrt ( (Pln1 [0] -Pln1 [6] ) ^2+\
181 (Pln1 [1] -Pln1 [7] ) ^2+\
182 (Pln1 [2] -Pln1 [8] )^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= ( (Pln1 [0] -Pln1 [6] ) /distCA1)
187 b=( (Pln1[1] -Pln1 [7] ) /distCA1)
188 c=( (Pln1 [2] -Pln1 [8] ) /distCA1)
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] -Pln1 [0] )
195 b= (Pline [0] [1] -Pln1 [1] )
196 c=(Pline[0] [2] -Pln1 [2] )
197 L2PXdist=(sqrt (a^2+b^2+c^2) /sm (LxLangle) )
198 x1=Pln1 [0] + ( ( (Pln1 [0] -Pln1 [6] ) /distCA1) *L2PXdist)
199 y1-Pln1 [1] + ( ( (Pln1 [1] -Pln1 [7] ) /distCA1) *L2PXdist)
200 z1=Pln1 [2] + ( ( (Pln1 [2] -Pln1 [8] ) /distCA1 *L2PXdist)
201 rem pause "LxLangle = %f L2PXdist =%f ",LxLangle,L2PXdist
202
203 rem Calculate Point Intersection of Line CB to 1st Plane
204 rem Project Points 3 & 2 of Plane 1 to 1st Plane to form projection Line
205 Pnt2PlnD= ( ( (Pln1 [9] *Pln2 [3] ) + (Pln1 [10] *Pln2 [4] ) + (Pln1 [11] *Pln2 [5] ) +Pln1 [12] ) /\
206 sqrt ( (Pln1 [9] ^2) + (Pln1 [10] ^2) + (Pln1 [11] ^2) ) )
207 Pline[0] [0] =Pln2 [3] + (-Pnt2PlnD*Pln1 [9] )
208 Pline[0] [1] =Pln2 [4] + ( -Pnt2PlnD*Pln1 [10] )
209 Pline[0] [2] =Pln2 [5] + (-Pnt2PlnD*Pln1 [11] )
210 Pnt2PlnD= ( ( (Pln1 [9] *Pln2 [6] ) + (Pln1 [10] *Pln2 [7] ) + (Pln1 [11] *Pln2 [8] ) +Pln1 [12] ) /\
211 sqrt ( (Pln1 [9] ^2) + (Pln1 [10] ^2) + (Pln1 [11] ^2) ) )
212 Pline [1] [0] =Pln2 [6] + ( -Pnt2PlnD*Pln1 [9] )
213 Pline [1] [1] =Pln2 [7] + (-Pnt2PlnD*Pln1 [10] )
214 Pline [1] [2] =Pln2 [8] + ( -Pnt2PlnD*Pln1 [11] )
215 rem Calculate Angle Between the two lines
216 distCBl-sqrt ( (Pln2 [3] -Pln2 [6] ) ^2+\
217 (Pln2[4]-Pln2[7] )^2 + \
218 (Pln2[5] -Pln2[8] )^2)
219 PlineAB=sqrt ( (Pline [0] [0] -Pline [1] [0] ) ^2+\ CORNER. CDP Monday, March 28, 1994 9 21 am page 4
220 (PlinetO] [1]-Pline[1] [1] ) ^2 + \
221 (Pline [0] [2] -Pline [1] [2] ) ^2)
222 a=((Pln2[3]-Pln2[6] )/distCB1)
223 b= ( (Pln2 [4] -Pln2 [7] ) /distCB1)
224 c= ( (Pln2 [5] -Pln2 [8] ) /distCB1)
225 d= ( (Pline [0] [0] -Pline [1] [0] ) /PlineAB)
226 e= ( (Pline [0] [1] -Pline [1] [1] ) /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 ls B
230 a=(Pline[0] [0]-Pln2[3] )
231 b= (Pline [0] [1]-Pln2[4] )
232 c= (Pline [0] [2]-Pln2[5] )
233 L2PXdist- (sqrt (a^2+b^2+c^2) /sin (LxLangle) )
234 x2-Pln2 [3] + ( ( (Pln2 [3] -Pln2 [6] ) /distCB1)*L2PXdist)
235 y2-Pln2 [4] + ( ( (Pln2 [4] -Pln2 [7] ) /distCB1) *L2PXdist)
236 z2=Pln2 [5] + ( ( (Pln2 [5] -Pln2 [8] ) /distCB1) *L2PXdist)
237 rem pause "LxLangle = %f L2PXdist =%f " ,LxLangle,L2PXdist
238
239 rem point x1,y1,z1, White
240 rem point x2,y2, z2, White
241 rem line x1,y1, z1,x2,y2, z2, White, ,2
242 rem line Pln1 [0] , Pln1 [1] , Pln1 [2] ,x1,y1, z1, White, ,2
243 rem line Pln2 [3] , Pln2 [4] , Pln2 [5] ,x2,y2, z2, White, ,2
244
245 rem Build First Half of Edge
246 G3Pos[0] [0]=x1
247 G3Pos[0] [1]-y1
248 G3Pos[0] [2]=z1
249 G3Pos[1] [0]=x2
250 G3Pos[1] [l1=y2
251 G3Pos[1] [2)=z2
252 G3Pos[2] [0] =Pln1 [6]
253 G3Pos[2] [1] =Pln1 [7]
254 G3Pos[2] [2] =Pln1 [8]
255 dosub smthg3p.cdp
256 Edge[0]=G3Pos[0] [0]
257 Edge[1]=G3Pos[0] [1]
258 Edge[2]=G3Pos[0] [2]
259 Edge [3] =G3Pos [0] [0] + (G3Pos [1] [0] -G3Pos [0] [0] )
260 Edge [4] =G3Pos [0] [1] + (G3Pos [1] [1] -G3Pos [0] [1] )
261 Edge [5] =G3Pos [0] [2] + (G3Pos [1] [2] -G3Pos [0] [2] )
262 Edge [6] =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[8]
270 dosub smthg3p.cdp
271 Edge [9]= Edge [0] + (G3Pos [2] [0] -G3Pos [0] [0] )
272 Edge [10] =Edge [1] + (G3Pos [2] [1] -G3Pos [0] [1] )
273 Edge [11] -Edge [2] + (G3Pos [2] [2] -G3Pos [0] [2] )
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] =G3Pos [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 & 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] )
284 Pline [0] [1] =Edge [1] + (-Pnt2PlnD*Pln3 [10] )
285 Pline [0] [2] =Edge [2] + (-Pnt2PlnD*Pln3 [11] )
286 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 Vect1len=sqrt ( (Edge [0] -Edge [3] ) ^2+\ CORNER. CDP Monday, March 28, 1994 9: 21 am page 5
293 (Edge [1] -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 (Pline [0] [2] -Pline [1] [2]) 1^2)
298 a= ( (Edge [0] -Edge [3] ) /Vect1len)
299 b=( (Edge[1] -Edge [4] ) /Vect1len)
300 c= ( (Edge [2] -Edge [5] ) /Vect1len)
301 d= ( (Pline [0] [0] -Pline [1] [01 ) /Vect21en)
302 e= ( (Pline [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= (Pline [0] [2] -Edge [2] )
309 L2PXdist= (sqrt (a^2+b^2+c^2)/sin (LxLangle) )
310 x1=Edge [0] + ( ( (Edge [0] -Edge [3] ) /Vect1len) *L2PXdist)
311 y1-Edge [1] + ( ( (Edge [1] -Edge [4] ) /Vect1len) *L2PXdist)
312 z1=Edge [2] + ( ( (Edge [2] -Edge [5] ) /Vect1len) *L2PXdist)
313 rem pause "LxLangle = %f L2PXdist -%f " ,LxLangle,L2PXdist
314
315 rem Calculate Point Intersection of Hypotenuse Side of Edge Surface 1
316 rem Project Points 2 & 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 Pline [0] [0] =Edge [9] + (-Pnt2PlnD*Pln3 [9] )
320 Pline [01 [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[1] [0] =Edge [3] + (-Pnt2PlnD*Pln3 [9) )
325 Pline[1] [1] =Edge [4] + (-Pnt2PlnD*Pln3 [10] )
326 Pline[1] [2] =Edge [5] + ( -Pnt2PlnD*Pln3 [11] )
327 rem Calculate Angle Between the two lines
328 Vect1len=sqrt ( (Edge [9] -Edge [3] ) ^2+\
329 (Edge [10] -Edge [4] ) ^2+\
330 (Edge [11] -Edge [5] )^2)
331 Vect2len=sqrt ( (Pline [0] [0] -Pline [1] [0] ) ^2+\
332 (Pline[0] [1]-Pline[1] [1])^2 + \
333 (Pline [0] [2] -Pline [1] [2] ) ^2)
334 a= ( (Edge [9] -Edge [3] ) /Vect1len)
335 b= ( (Edge [10] -Edge [4] ) /Vect1len)
336 c= ( (Edge [11] -Edge [5] ) /Vect1len)
337 d= ( (Pline [0] [0] -Pline [1] [0] ) /Vect2len)
338 e= ( (Pline [0] [1] -Pline [1] [1] ) /Vect2len)
339 f = ( (Pline [0] [2] -Pline [1] [2] ) /Vect2len)
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 [01 [1] -Edge [10] )
344 c= (Pline [0] [2] -Edge [11] )
345 L2PXdist= (sqrt (a^2+b^2+c^2) /sin (LxLangle) )
346 x2=Edge [9] + ( ( (Edge [9] -Edge [3] ) /Vect1len) *L2PXdist)
347 y2=Edge[10]+( ( (Edge [10] -Edge [4] ) /Vectllen) *L2PXdist)
348 z2=Edge[11]+( ( (Edge [11] -Edge [5] ) /Vect1len) *L2PXdist)
349 rem pause "LxLangle = %f L2PXdist =%f", LxLangle, L2PXdist
350
351 rem Calculate Point Intersection of Hypotenuse Side of Edge Surface 2
352 rem Project Points 2 & 1 of Edge to 3rd Plane to form projection Line
353 Pnt2PlnD= ( ( (Pln3 [9] *Edge [6] ) + (Pln3 [10] *Edge [7] ) + (Pln3 [11] *Edge [8] ) +Pln3 [12] ) /\
354 sqrt( (Pln3 [9] ^2 ) + (Pln3 [10] ^2) + (Pln3 [11] ^2) ) )
355 Pline[0] [0] =Edge [6] + (-Pnt2PlnD*Pln3 [9] )
356 Pline[0] [1] -Edge [7] + (-Pnt2PlnD*Pln3 [10] )
357 Pline [0] [2] -Edge [8] + (-Pnt2PlnD*Pln3 [11] )
358 Pnt2PlnD= ( ( (Pln3 [9] *Edge [3] ) + (Pln3 [10] *Edge [4] ) + (Pln3 [11] *Edge [5] ) +Pln3 [12] ) /\
359 sqrt ( (Pln3 [9] ^2) + (Pln3 [10] ^2) + (Pln3 [11] ^2) ) )
360 Pline [1] [0] -Edge [3] + (-Pnt2PlnD*Pln3 [9] )
361 Pline[1] [1] =Edge [4] + (-Pnt2PlnD*Pln3 [10] )
362 Pline [1] [2] =Edge [5] + (-Pnt2PlnD*Pln3 [11] )
363 rem Calculate Angle Between the two lines
364 Vect1len-sqrt ( (Edge [6] -Edge [3] ) ^2+\
365 (Edge [7] -Edge [4] ) ^2+\ CORNER. CDP Monday, March 28, 1994 9:21 am Page 6
366 (Edge [8] -Edge [5] )^2)
367 Vect2len=sqrt ( (Pline [0] [0] -Pline [1] [0] ) ^2 + \
368 (Pline [0] [1] -Pline [1] [1] ) ^2+\
369 (Pline [0] [2] -Pline [1] [2] ) ^2)
370 a= ( (Edge [6] -Edge [3] ) /Vect1len)
371 b=( (Edge [7] -Edge [4] ) /Vect1len)
372 c= ( (Edge [8] -Edge [5] ) /Vect1len)
373 d= ( (Pline [0] [0] -Pline [1] [0] ) /Vect2len)
374 e= ( (Pline [0] [1] -Pline [1] [1] ) /Vect2len)
375 f = ( (Pline [0] [2] -Pline [1] [2] ) /Vect2len)
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= (Pline [0] [0] -Edge [6] )
379 b= (Pline [0] [1] -Edge [7] )
380 c= (Pline [0] [2] -Edge [8] )
381 L2PXdist= (sqrt (a^2+b^2+c^2) /sin (LxLangle) )
382 x3=Edge [6] + ( ( (Edge [6] -Edge [3] ) /Vect1len) *L2PXdist)
383 y3=Edge [7] + ( ( (Edge [7] -Edge [4] ) /Vect1len) *L2PXdist)
384 z3=Edge [8] + ( ( (Edge [8] -Edge [5] ) /Vectllen) *L2PXdist)
385 rem pause "LxLangle = %f L2PXdist -%f" ,LxLangle, L2PXdist
386
387 rem Build Corner Matrix
388 Corner [0] =x1
389 Corner [1] =y1
390 Corner [2] =z1
391 Vect1len-sqrt ( (Edge [3] -Corner [0] ) ^2+\
392 (Edge [4] -Corner [1] )^2+\
393 (Edge [5] -Corner [2] ) ^2)
394 Corner [3] =Corner [0] + ( ( (Edge [3] -Corner [0] ) /Vect1len) *ECscale)
395 Corner [4 ] =Corner [1] + ( ( ( Edge [4 ] - Corner [1] ) /Vect1len) *ECscale)
396 Corner [5] =Corner [2] + ( ( (Edge [5] -Corner [2] ) /Vect1len) *ECscale)
397 Vectllen-sqrt ( (x2-Corner [0] ) ^2+\
398 (y2-Corner[1] ) ^2+\
399 (z2-Corner [2] ) ^2)
400 Corner [6] =Corner [0] + ( ( (x2-Corner [0] ) /Vect 1len) *ECscale)
401 Corner [7] =Corner [1] + ( ( (y2-Corner [1] ) /Vect1len) *ECscale)
402 Corner [8] =Corner [2] + ( ( (z2-Corner [2] ) /Vect1len)*ECscale)
403 Vect1len-sqrt ( (x3-Corner [0] ) ^2+\
404 (y3-Corner [1] )^2+\
405 (z3-Corner [2] ) ^2)
406 Corner [9] = Corner [0] + ( ( (x3-Corner [0] ) /Vect1len) *ECscale)
407 Corner [10] =Corner [1] + ( ( (y3-Corner [1] ) /Vect1len)*ECscale)
408 Corner [11] =Corner [2] + ( ( (z3-Corner [2] ) /Vect1len) *ECscale)
409
410 rem Display Corner Entity
411 CrnrSgrp=CrnrSgrp+1
412 point Corner [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 line Corner [0], Corner [1], Corner [2], Corner [9], Corner [10],Corner [11] ,LRed, , 1, 124, CrnrSgrp
416 line Corner [3], Corner[4],Corner[5] ,Corner[6], Corner [7],Corner [8],LGreen, ,2, 124, CrnrSgrp
417 line Corner [3], Corner [4],Corner [5],Corner [9], Corner [10],Corner [11], LGreen, ,2, 124, CrnrSgrp
418 line Corner [6], Corner [7],Corner [8],Corner [9], Corner [10],Corner [11],LGreen, , 2 , 124 , CrnrSgrp
419
420 auto -1
421 redraw -1
422
423 :exit
424 EXIT DFLTCNFG. CDP Monday, March 28, 1994 9:21 am Page 1 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 GridPlns=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 Pdisp=0
22 Splane=XYplane
23 Sdisp=0
24 GridTol= 030
25 GridSize=6.00
26 Tsphere= 015
27 ARRAY Origin[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, 0, 0, 1, 0, 0, 0, 1, 0}
36 ARRAY XZwgp[13]={0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -1, 0, 0}
37 ARRAY YZwgp [13] ={0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0}
38 /* XY Grid Plane Boundry Points */
39 XYpnt1 [0] [0] =XYpnt1 [0] [1] =XYpnt1 [1] [1] =XYpnt1 [3] [0] =-GridSize
40 XYpnt1 [1] [0] -XYpnt1 [2] [0] =XYpnt1 [2] [1] =XYpnt1 [3] [1] =GridSize
41 XYpnt1 [0] [2] =XYpnt1 [1] [2] =XYpnt1 [2] [2] -X=pnt1 [3] [2]=0
42 XYpnt2[0] [0] =XYpnt2[0] [1] =XYpnt2[1] [1]=XYpnt2[3] [0] =- (GridSize/3)
43 XYpnt2 [1] [0] =XYpnt2[2] [0] =XYpnt2[2] [1]=XYpnt2[3] [1] = (GridSize/3)
44 XYpnt2[0] [2] =XYpnt2 [1] [2] =XYpnt2[2] [2]=XYpnt2[3] [2]=0
45 /* XZ Grid Plane Boundry Points */
46 XZpnt1 [0] [0] =XZpnt1 [0] [2] =XZpnt1 [1] [2] =XZpnt1 [3] [0] =-GridSize
47 XZpnt1 [1] [0] =XZpnt1 [2] [0] =XZpnt1 [2] [2] =XZpnt1 [3] [2] =GridSize
48 XZpnt1 [0] [1] =XZpnt1 [1] [1] =XZpnt1 [2] [1] -XZpnt1 [3] [1]=0
49 XZpnt2[0] [0] =XZpnt2 [0] [2] =XZpnt2[1] [2]=XZpnt2[3] [0] =- (GridSize/3)
50 XZpnt2 [1] [0] =XZpnt2 [2] [0] =XZpnt2[2] [2]=XZpnt2[3] [2] = (GridSize/3)
51 XZpnt2[0] [1] =XZpnt2 [1] [1] =XZpnt2[2] [1]-XZpnt2[3] [1]=0
52 /* YZ Grid Plane Boundry Points */
53 YZpnt1 [0] [1] =YZpnt1 [0] [2] =YZpnt1[1] [2]=YZpnt1[3] [1] =-GridSize
54 YZpnt1 [1] [1] =YZpnt1 [2] [1] =YZpnt1[2] [2] =YZpntl [3] [2] -GridSize
55 YZpnt1 [0] [0] =YZpnt1 [1] [0] =YZpnt1 [2] [0] =YZpntl [3] [0]=0
56 YZpnt2[0] [1] =YZpnt2[0] [2] =YZpnt2[1] [2]=YZpnt2[3] [1] =- (GridSize/3)
57 YZpnt2[1] [1] =YZpnt2 [2] [1] =YZpnt2 [2] [2] =YZpnt2 [3] [2] = (GπdSize/3)
58 YZpnt2[0] [0] =YZpnt2 [1] [0] =YZpnt2[2] [0]=YZpnt2[3] [0]=0
59 :exιt
60 EXIT DISPGET.CDP Monday, March 28, 1994 9.21 am Page 1 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 Fcnt1, Fx, Fy, Fz, Fa, Fb,Fc
8
9 if (PSplane == 1)
10 ii=9
11 else
12 ii=10
13 FinderX=FinderY=FinderZ=0
14
15 :top
16 MenuLev=MenuLev+1
17 sprint $MenuStr, "Select Displacement Selection Method (%d)", LastPick [ii]
18 getmenu SMenuStr, \
19 'Probe" , \
20 "Mouse" , \
21 "Key In", \
22 "Autolnc" , \
23 "XYZrot", \
24 XYZalign",\
25 " - ",\
26 " - " ,\
27 "3DR Help" MenuLev, LastPick [ii]
28 switch (@key)
29 {
30 case -3:-2
31 if (@key==-3)
32 Done=True
33 goto exit
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+ ( (XYwgp [ 9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz ) +XYwgp [12 ] ) /\
48 sqrt ( (XYwgp [ 9] ^2 ) + (XYwgp [10] ^2 ) + (XYwgp [11] ^2 ) )
49 if ( Pplane == XZplane )
50 Pdisp-Pdisp- ( (XZwgp [ 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) + (YZwgp [10] *Fy) + (YZwgp [11] *Fz ) +YZwgp [12 ] ) /\
54 sqrt ( (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-Sdιsp+ ( (XYwgp [ 9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) /\ 61 sqrt ( (XYwgp [ 9] ^2 ) + (XYwgp [10] ^2 ) + (XYwgp [11] ^2 ) )
62 if (Splane == XZplane )
63 Sdisp-Sdisp- ( (XZwgp [ 9] *Fx) + (XZwgp [10] *Fy) + (XZwgp [11] *Fz ) +XZwgp [12] ) /\
64 sqrt ( (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 sqrt ( (YZwgp [9] ^2 ) + (YZwgp [ 10] ^2 ) + (YZwgp [11] ^2 ) )
68 dosub rmagwld2 . cdp
69 }
70 break
71 case 2
72 LastPick [ii] =2
73 getpos "Indicate Position. . .",2 DISPGET.CDP Monday, March 28, 1994 9:21 am page 2
74 if (@key <= -1)
75 goto exit
76 if (Beep == On)
77 print "\007"
78 RotFlag= (XYZ [0] +XYZ [1] +XYZ [2] )
79 if (PSplane == 1)
80 {
81 OrgFlag= (Origin [0] +Origin[1] +Origin [2] +Pdisp)
82 if (Pplane == XYplane)
83 {
84 if (((@XWORLD==0) || (@YWORLD==0) ) && (RotFlag==Off) && (OrgFlag==Off) )
85 {
86 Pdisp=@ZWORLD-Origin[2]
87 dosub rmagwld2.cdp
88 }
89 Pdisp=Pdisp+ ( (XYwgp [9] *@XWORLD) + (XYwgp [10] *@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) ) && (RotFlag==Off) && (OrgFlag==Off))
97 {
98 Pdisp=@YWORLD-Origin[1]
99 dosub rmagwld2.cdp
100 }
101 Pdisp-Pdisp- ((XZwgp [9] *@XWORLD) + (XZwgp [10] *@YWORLD) + (XZwgp [11] *@ZWORLD) +XZwgp [12] ) /\
102 sqrt ( (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)) && (RotFlag==Off) && (OrgFlag==Off) )
109 {
110 Pdisp=@XWORLD-Origin[0]
111 dosub rmagwld2.cdp
112 }
113 Pdisp=Pdisp+ ((YZwgp [9] *@XWORLD) + (YZwgp [10] *@YWORLD) + (YZwgp [11] *@ZWORLD) +YZwgp [12]) /\
114 sqrt((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= (Origin [0] +Origin[1] +Origin[2] +Sdisp)
123 if (Splane = = XYplane)
124 {
125 if ( ( (@XWORLD = =0) || (@YWORLD = =0)) && (RotFlag==Off) && (OrgFlag==Off) )
126 {
127 Sdisp=@ZWORLD-Origin[2]
128 dosub rmagwld2.cdp
129 }
130 Sdisp=Sdisp+ ( (XYwgp [9] -βXWORLD) + (XYwgp [10] *βYWORLD) + (XYwgp [11] *@ZWORLD) +XYwgp [12]) /\
131 sqrt((XYwgp [9] ^2) + (XYwgp[10] ^2) + (XYwgp [11] ^2))
132 dosub rmagwld2. cdp
133 }
134
135 if (Splane == XZplane)
136 {
137 if (((@XWORLD = =0) || (@ZWORLD = =0)) && (RotFlag = =Off) && (OrgFlag = =Off) )
138 {
139 Sdisp=@YWORLD-Origin[1]
140 dosub rmagwld2.cdp
141 }
142 Sdisp=Sdisp- ((XZwgp [9] *@XWORLD) + (XZwgp [10] *@YWORLD) + (XZwgp [11] *@ZWORLD) +XZwgp [12]) /\
143 sqrt((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) ) && (RotFlag = =Off) && (OrgFlag = =Off) )
150 {
151 Sdisp=@XWORLD-Origin[0]
152 dosub rmagwld2.cdp
153 }
154 Sdisp=Sdisp+ ( (YZwgp [9] *@XWORLD) + (YZwgp [10] *@YWORLD) + (YZwgp [11] *@ZWORLD) +YZwgp [12 ] ) /\
155 sqrt ( (YZwgp [9 ] ^2 ) + (YZwgp [10] ^2 ) + (YZwgp [11] ^2 ) )
156 dosub rmagwld2 . cdp
157 }
158 break
159 }
160
161 case 3
162 LastPick [ii] =3
163 if ( PSplane = = 1 )
164 {
165 getflt "Enter Primary Plane Displacement (%.4f):", Pdisp, Pdisp
166 dosub rmagwld2.cdp
167 }
168 if (PSplane == 2)
169 {
170 getflt "Enter Secondary Plane Displacement (%.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 (%.4f): ",\
179 AutoIncD [PSplane],AutoIncD [PSplane]
180 Pdisp=Pdisp+AutoIncD [PSplane]
181 dosub rmagwld2.cdp
182 }
183 if (PSplane = = 2)
184 {
185 getflt "Enter +/- Secondary Plane Displacement Increment (%.4f): ",\
186 AutoIncD [PSplane] .AutoIncD [PSplane]
187 Sdisp=Sdisp+AutoIncD [PSplane]
188 dosub rmagwld2.cdp
189 }
190 break
191 case 5
192 LastPick [ii] =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)
203 goto exit
204 break
205 case 7:8
206 break
207 case 9
208 LastPick [ii] =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
rem The Replicator
rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved
rem Designed to work with: Faro Metrecom/CADKEY/FastSURF
Local Slevel, Ilevel
:top
9 DispMask [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 [5] =@levels [5]
15 DispMask [6] =@levels [6]
16 DispMask [7] =@levels [7]
17 DispMask [8] =@levels [8]
18 DispMask [9] =@levels [9]
19 DispMask [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 ( (@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 levelmask, DispMask
33 redraw -1
34 :exit
35 EXIT
DRAWGET. CDP Monday, March 28, 1994 9:21 am page 1
1 rem DRAWGET. 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 FinderX=FinderY=FinderZ=0
8 if (PointsHS)
9 dosub disppnts . cdp
10
11 :restart
12 LstNodes=0
13 ARRAY PntNodes [MaxNodes] [3]
14 ARRAY PntIDs [MaxNodes]
15 ARRAY LinelDs [MaxNodes]
16 on ModeNum goto Manual, SimiAuto, Auto, exit
17
18 :Manual
19 LastBhit=Bhit=Nodes=NodeErr=0
20 :top0
21 prompt "B1 Press-Start | B2=End | B2/ESC=exit | Nodes = %d", Nodes
22 :top1
23 DO
24 {
25 readdev Fcntl, Fx, Fy, Fz, Fa, Fb, Fc
26 ((INCLUDE finderld.inc
27 Bhit = Fcntl & 3
28 getkey
29 if (@key -= 27)
30 goto exit
31 if (@key = = Del)
32 exitloop
33 } WHILE (Bhit == None)
34 if ((@key == Del) && (Delete == On))
35 goto deleteit
36 if ((@key == Del) && (Delete == Off))
37 {
38 #INCLUDE delnode.inc
39 goto top0
40 }
41 on Bhit goto top1, B201, B101, top1
42
43 :B101
44 ((INCLUDE f inder0 . i nc
45 ((INCLUDE pntraced . inc
46 if (Beep == On)
47 print "\007"
48 if (Nodes == MaxNodes)
49 {
50 pause "MaxNodes - %d reached. Increase MaxNodes using \"Control :MaxNodes\" . ",MaxNodes
51 redraw -1
52 goto restart
53 }
54 ((INCLUDE waitrel1.inc
55 goto top0
56
57 :B201
58 if (Nodes = = None)
59 goto exit
60 dosub buildit
61 if (NodeErr = = True)
62 {
63 NodeErr=False
64 goto Manual
65 }
66 Delete=On
67 LstNodes=Nodes
68 ((INCLUDE waitrel2. inc
69 goto Manual
70
71 :Auto
72 LastBhit=Bhit=Nodes=NodeErr=0
73 :top4 DRAWGET. CDP Monday, March 28, 1994 9:21 am Page 2
74 prompt "B1 Press/Release=Start/Stop | B2/ESC=exit | Nodes = %d", Nodes
75 :top5
76 getkey
77 if (@key -= 27)
78 goto exit
79 if ( (@key == Del) && (Delete == On) )
80 goto deleteit
61 readdev Fcntl, Fx,Fy,Fz, Fa, Fb.Fc
82 ((INCLUDE finderld.inc
83 LastBhit = Bhit
84 Bhit = Fcntl & 3
85 if ((Bhit == None) && (LastBhit == None))
86 goto top5
87 on Bhit goto Blrel, exit, B103, top5
88
89 :B1rel
90 if (Nodes == None)
91 goto exit
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 finder0.inc
104 ((INCLUDE pntraced.inc
105 if (Beep == On)
106 print "\007"
107 if (Nodes == MaxNodes)
108 {
109 pause "MaxNodes = %d reached. Increase MaxNodes using \"Control :MaxNodes\" · ",MaxNodes
110 redraw -1
111 goto restart
112 }
113 Wait Delay
114 goto top4
115 goto Auto
116
117 :SimiAuto
118 LastBhit=Bhit=Nodes=NodeErr=0
119 : SAtop0
120 prompt "B1 Press-Start | B2=End | B2/ESC=exit | Nodes = %d", Nodes
121 :SAtop1
122 DO
123 {
124 readdev Fcntl, Fx, Fy, Fz, Fa, Fb,Fc
125 ((INCLUDE finderld.inc
126 Bhit = Fcntl & 3
127 getkey
128 if (@key == 27)
129 goto exit
130 if (@key == Del)
131 exitloop
132 } WHILE (Bhit == None)
133 if ((@key -= Del) && (Delete == On))
134 goto deleteit
135 if ((@key == Del) && (Delete == Off))
136 {
137 ((INCLUDE delnode.inc
13B goto SAtop0
139 )
140 on Bhit goto SAtop1, B2SA, B1SA, SAtop1
141
142 :B1SA
143 ((INCLUDE finder0.inc
144 ((INCLUDE pntraced.inc
145 if (Beep = = On)
146 print "\007" DRAWGET.CDP Monday, March 28, 1994 9:21 am page 3
147 if (Nodes == MaxNodes)
148 {
149 pause "MaxNodes = %d reached Increase MaxNodes using \"Control :MaxNodes\" ·" ,MaxNodes
150 redraw -1
151 goto restart
152 }
153 Wait Delay
154 goto SAtop0
155
156 :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. i nc
168 goto SimiAuto
169
170 :deleteιt
171 Delete=Off
172 if (Points)
173 for (n=0; n<LstNodes; n=n+1)
174 DELENT PntIDs [n]
175 if (GeoType = = CKpoint)
176 for (n=0, n<LstNodes, n=n+1)
177 DELENT PntIDs [n]
178 if (GeoType == CKline)
179 for (n=0, n< (LstNodes-1), n=n+1)
180 DELENT LineIDs [n]
181 if ( (GeoType == CKpline) | | (GeoType == CKspline))
182 DELENT LastEnt
183 LstNodes=0
184 ((INCLUDE finder3.inc
185 goto restart
186
187 :exit
188 MODE normal
189 clear PntNodes, PntIDs, LineIDs, Fcntl, Fx,Fy,Fz
190 ((INCLUDE finder2.inc
191 EXIT
EDGE. CDP Monday, March 28, 1994 9:21 am Page 1
1 rem EDGE 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 , Pln1 [13], Pln2 [13], Pline [2] [3], x1,y1, z1,x2,y2, z2 , Edge [15]
7 ARRAY Pln1[13]={0, 0,0, 0,0, 0,0,0,0,0,0,0,0}
8 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 (G3Pos [1] [1] -G3Pos [0] [1]) ^2 + \
17 (G3Pos[1] [2]-G3Pos[0] [2])^2)
18 G3Pos [0] [0] -G3Pos [0] [0] + (((G3Pos [1] [0] -G3Pos [0] [0]) /distAB) * (distAB/2))
19 G3Pos [0] [1] =G3Pos [0] [1] + (((G3Pos [1] [1] -G3Pos [0] [1]) /distAB) * (distAB/2))
20 G3Pos[0] [2]=G3Pos[0] [2] + (((G3Pos [1] [2] -G3Pos [0] [2]) /distAB) * (distAB/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 %d",G3Pcount
27 auto -1
28 redraw -1
29 goto exit
30 }
31 dosub smthg3p.cdp
32 Pln1[0]=G3Pos[0] [0]
33 Pln1[1]=G3Pos[0] [1]
34 Pln1[2]=G3Pos[0] [2]
35 Pln1[3]-G3Pos[1] [0]
36 Pln1[4]=G3Pos[1] [1]
37 Pln1[5]=G3Pos[1] [2]
38 Pln1[6]=G3Pos[2] [0]
39 Pln1[7]=G3Pos[2] [1]
40 Pln1[B]=G3Pos[2] [2]
41 /* Calculate The Equation of the First Plane */
42 /* Find the direction ratios of line AB */
43 a=Pln1[3]-Pln1[0]
44 b=Pln1[4]-Pln1[1]
45 c-Pln1[5]-Pln1[2]
46 /* Find the direction ratios of line AC */
47 d=Pln1[6]-Pln1[0]
48 e=Pln1[7]-Pln1[1]
49 f=Pln1[8]-Pln1[2]
50 /* Find the direction ratios of the Normal to AB & AC */
51 CALL CROSS, Pln1[9],Pln1[10],Pln1[11],a,b,c,d,e,f
52 CALL DOTPROD, Pln1[6], Pln1[7], Pln1[8], Pln1[9], Pln1[10], Pln1[11], Pln1[12]
53 Pln1[12]=0-Pln1[12]
54
55 rem line Pln1 [0], Pln1 [1], Pln1 [2], Pln1 [3], Pln1 [4], Pln1 [5], Red, ,2
56 rem line Pln1 [0], Pln1 [1], Pln1 [2], Pln1 [6], Pln1 [7], Pln1 [8], Red, ,2
57 rem line Pln1 [3], Pln1 [4], Pln1 [5], Pln1 [6], Pln1 [7], Pln1 [8], Red, ,2
58
59 :surface2
60 prompt "Define Surface 2"
61 wait 1
62 G3Pmode=1
63 dosub get3pos.cdp
64 distAB=sqrt ((G3Pos [1] [0] -G3Pos [0] [0]) ^2 + \
65 (G3Pos[1] [1]-G3Pos[0] [1])^2 + \
66 (G3Pos[1] [2] -G3Pos [0] [2])^2)
67 G3Pos[0] [0]=G3Pos[0] [0] + (((G3Pos [1] [0] -G3Pos [0] [0]) /distAB) * (distAB/2))
68 G3Pos[0] [1]=G3Pos[0] [1] + (((G3Pos [1] [1]-G3Pos[0] [1]) /distAB) * (distAB/2))
69 G3Pos [0] [2] =G3Pos [0] [2] + (((G3Pos [1] [2] -G3Pos [0] [2]) /distAB) * (distAB/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 2
74 else
75 pause "3 Unique Locations Required. You entered %d",G3Pcount
76 auto -1
77 redraw -1
78 goto exit
79 }
80 dosub smthg3p.cdp
81 Pln2[0]=G3Pos[0] [0]
82 Pln2[1]=G3Pos[0] [1]
83 Pln2[2]=G3Pos[0] [2]
84 Pln2[3]=G3Pos[1] [0]
85 Pln2[4]=G3Pos[1] [1]
86 Pln2[5]=G3Pos[1] [2]
87 Pln2[6]-G3Pos[2] [0]
88 Pln2[7]=G3Pos[2] [1]
89 Pln2[8]=G3Pos[2] [2]
90 /* Calculate The Equation of the Second Plane */
91 /* Find the direction ratios of line AB */
92 a=Pln2[3]-Pln2[0)
93 b=Pln2[4]-Pln2[1]
94 c=Pln2[5]-Pln2[2]
95 /* Find the direction ratios of line AC */
96 d=Pln2[6]-Pln2[0]
97 e=Pln2[7]-Pln2[1]
98 f=Pln2[8]-Pln2[2]
99 /* Find the direction ratios of the Normal to AB & AC */
100 CALL CROSS,Pln2[9],Pln2[10],Pln2[11],a,b,c,d,e,f
101 CALL DOTPROD, Pln2 [6], Pln2 [7], Pln2 [8], Pln2 [9], Pln2 [10], Pln2[11], Pln2 [12]
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
108 rem Calculate Point Intersection of Line CA to 2nd Plane
109 rem Project Points 3 & 1 of Plane 1 to 2nd Plane to form projection Line
110 Pnt2PlnD= (((Pln2 [9] *Pln1 [0]) + (Pln2 [10] *Pln1 [1]) + (Pln2[11] -Pln1[2]) +Pln2 [12]) /\
111 sqrt ((Pln2 [9] ^2) + (Pln2 [10] ^2) + (Pln2 [11] ^2)))
112 Pline [0] [0] =Pln1 [0] + (-Pnt2PlnD*Pln2 [9])
113 Plιne[01 [1] =Pln1 [1] + (-Pnt2PlnD*Pln2 [10])
114 Pline[0] [2] =Pln1 [2] + (-Pnt2PlnD*Pln2 [11])
115 Pnt2PlnD= (((Pln2 [9] *Pln1 [6]) + (Pln2[10] *Pln1 [7]) + (Pln2[11] *Pln1[8]) +Pln2[12]) / \
116 sqrt ((Pln2 [9] ^2) + (Pln2 [10] ^2) + (Pln2 [11] ^2)))
117 Pline [1] [0] -Pln1 [6] + (-Pnt2PlnD*Pln2 [9])
118 Pline [1] [1]=Pln1[7] + (-Pnt2PlnD*Pln2[10])
119 Pline [1] [2] =Pln1 [8] + (-Pnt2PlnD*Pln2 [11])
120 rem Calculate Angle Between the two lines
121 distCA1=sqrt ((Pln1 [0] -Pln1 [6])^2+\
122 (Pln1[l] -Pln1 [7])^2+\
123 (Pln1 [2] -Pln1 [8])^2)
124 PlineAB=sqrt ((Pline [0] [0] -Pline [1] [0]) ^2+\
125 (Pline [0] [1] -Pline [1] [1])^2+\
126 (Pline [0] [2] -Pline [1] [2]) ^2)
127 a=((Pln1 [0] -Pln1 [6]) /distCA1)
128 b=((Pln1 [1] -Pln1 [7]) /distCA1)
129 c-((Pln1 [2] -Pln1 [8]) /distCA1)
130 d= ((Pline [0] [0] -Pline [1] [0]) /PlineAB)
131 e= ((Pline [0] [1] -Pline [1] [1]) /PlineAB)
132 f = ((Pline [0] [2] -Pline [1] [2]) /PlineAB)
133 LxLangle=acos ((a*d) + (b*e) + (c*f))
134 rem Calculate Length of Plane Is intercept to Plane 2 from Plane 1s A
135 a= (Pline [0] [0] -Pln1 [0])
136 b= (Pline [0] [1] -Pln1 [1])
137 c= (Pline [0] [2] -Pln1 [2])
138 L2PXdist= (sqrt (a^2+b^2+c^2) /sm (LxLangle) )
139 x1=Pln1 [0] + (((Pln1 [0] -Pln1 [6]) /distCA1) *L2PXdist)
140 y1=Pln1 [1] + (((Pln1 [1] -Pln1 [7]) /distCA1) *L2PXdist)
141 z1=Pln1[2] + (((Pln1 [2] -Pln1 [8]) /distCA1) *L2PXdist)
142 rem pause "LxLangle = %f L2PXdist -%f" , LxLangle, L2PXdist
143
144 rem Calculate Point Intersection of Line CB to 1st Plane
145 rem Project Points 3 & 2 of Plane 1 to 1st Plane to form projection Line
146 Pnt2PlnD= (((Pln1 [9] *Pln2 [3]) + (Pln1 [10] *Pln2 [4]) + (Pln1 [11] *Pln2 [5]) +Pln1 [12]) / \ EDGE.CDP Monday, March 28, 1994 9:21 am Page 3
147 sqrt((Pln1 [9] ^2) + (Pln1 [10] ^2) + (Pln1 [11] ^2)))
148 Pline [0] [0] =Pln2 [3] + (-Pnt2PlnD*Pln1 [9])
149 Pline [0] [1] =Pln2 [4] + (-Pnt2PlnD*Pln1 [10])
150 Pline [0] [2] =Pln2 [5] + (-Pnt2PlnD*Pln1 [11])
151 Pnt2PlnD= (((Pln1 [9] *Pln2 [6]) + (Pln1 [10] *Pln2 [7]) + (Pln1 [11] *Pln2 [8]) +Pln1 [12])/ \
152 sqrt ((Pln1 [9] ^2) + (Pln1 [10] ^2) + (Pln1 [11] ^2)))
153 Pline [1] [0] =Pln2 [6] + (-Pnt2PlnD*Pln1 [9])
154 Pline [1] [1] =Pln2 [7] + (-Pnt2PlnD*Pln1 [10])
155 Pline [1] [2] =Pln2 [8] + (-Pnt2PlnD*Pln1 [11])
156 rem Calculate Angle Between the two lines
157 distCB1=sqrt ((Pln2 [3] -Pln2 [6]) ^2+\
158 (Pln2[4]-Pln2[7])^2 + \
159 (Pln2[5]-Pln2[8])^2)
160 PlineAB-sqrt ((Pline [0] [0] -Pline [1] [0]) ^2+\
161 (Pline [0] [1] -Pline [1] [1]) ^2 + \
162 (Pline[0] [2] -Pline[1] [2])^2)
163 a= ((Pln2 [3] -Pln2 [6]) /distCB1)
164 b= ((Pln2 [4] -Pln2 [7]) /distCB1)
165 c=((Pln2[5]-Pln2[8]) /distCB1)
166 d= ((Pline [0] [0] -Pline [1] [0]) /PlineAB)
167 e= ((Pline [0] [1] -Pline [1] [1]) /PlineAB)
168 f = ((Pline [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 1s B
171 a= (Pline [0] [0] -Pln2 [3])
172 b= (Pline [0] [1]-Pln2[4])
173 c= (Pline [0] [2]-Pln2[5])
174 L2PXdist= (sqrt (a^2+b^2+c^2) /sin (LxLangle))
175 X2=Pln2 [3] + (((Pln2 [3] -Pln2 [6]) /distCB1) *L2PXdist)
176 y2=Pln2 [4] + (((Pln2 [4] -Pln2 [7]) /distCB1) *L2PXdist)
177 z2=Pln2 [5] + (((Pln2 [5] -Pln2 [8]) /distCB1) *L2PXdist)
178 rem pause "LxLangle = %f L2PXdist -%f", LxLangle, L2PXdist
179
180 rem point x1,y1, z1, White
181 rem point x2,y2, z2, White
182 rem line x1, y1, z1,x2,y2, z2, White, ,2
183 rem line Pln1 [0], Pln1 [1], Pln1 [2] , x1,y1, z1, 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] [0]=x1
188 G3Pos[0) [1]=y1
189 G3Pos[0] [2]=z1
190 G3Pos[1] [0]=x2
191 G3Pos[1] [1]=y2
192 G3Pos[1] [2]=z2
193 G3Pos[2] [0]=Pln1[6]
194 G3Pos[2] [1]=Pln1[7]
195 G3Pos[2] [2]=Pln1[8]
196 dosub smthg3p.cdp
197 Edge[0]=G3Pos[0] [0]
198 Edge[1]=G3Pos[0] [1]
199 Edge[2]=G3Pos[0] [2]
200 Edge [3] =G3Pos [0] [0] + ((G3Pos [1] [0] -G3Pos [0] [0]) *ECscale)
201 Edge [4] =G3Pos [0] [1] + ((G3Pos [1] [1] -G3Pos [0] [1]) *ECscale)
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 [2] [2]-G3Pos[0] [2]) *ECscale)
206
207 rem Build Second Half of Edge
208 G3Pos[2] [0]=Pln2[6]
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 [11] =Edge [2] + ((G3Pos [2] [2] -G3Pos [0] [2]) *ECscale)
215 Edge [12] =G3Pos [0] [0] + ((G3Pos [0] [0] -G3Pos [1] [0]) *ECscale)
216 Edge [13] =G3Pos [0] [1] + ((G3Pos [0] [1] -G3Pos [1] [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 4
220 EdgSgrp=EdgSgrp+1
221 point Edge [0], Edge [1], Edge [2], Green, , 125, EdgSgrp
222 line Edge [0], Edge[1], Edge[2], Edge[3], Edge[4], Edge[5], LRed, , 1, 125, EdgSgrp
223 line Edge [0], Edge[1], Edge[2] , Edge [12], Edge [13], Edge [14], LRed, , 1, 125, EdgSgrp
224 line Edge [0],Edge [1],Edge [2], Edge [6], Edge [7], Edge [8], LGreen, ,2, 125, EdgSgrp
225 line Edge [0], Edged], Edge [2], 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], Edge [14], Edge[6], Edge[7], Edge[8], LGreen, ,2, 125, EdgSgrp
229 line Edge [12], Edge [13], Edge [14], Edge [9], Edge [10], Edge [11], 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 Page 1
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 [1]=0
19 }
20 if (SplnEnt [0])
21 {
22 DELENT SplnEnt [0]
23 DELENT SplnEnt [1]
24 SplnEnt [0] =SplnEnt [1] =0
25 }
26 if (GPent [0])
27 {
28 for (i=0; i<6; i=i+1)
29 {
30 if (GPent [i] )
31 DELENT GPent [i]
32 GPent [i]=0
33 }
34 DELENT OrgEnt
35 }
36 auto -1
37 redraw -1
38
39 /* File Setup */
40 CALL strcpy, Sfname, @cwd
41 CALL strcat, Sfname, "\\"
42 MenuLev=MenuLev+1
43 getstr "Enter Environment file name (%s) : ", "GRIDPLN.ENV" , Sfname0, ,,,,,,,,,,MenuLev
44 MenuLev=MenuLev-1
45 CALL strcat, Sfname, Sfname0
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 :exit
71 EXIT ENVSAVE.CDP Monday, March 28, 1994 9:21 am Page 1
1 rem ENVSAVE.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 /* File Setup */
15 CALL strcpy, Sfname, @cwd
16 CALL strcat, Sfname, "\\"
17 MenuLev=MenuLev+1
18 getstr "Enter Environment file name (%s); ", "GRIDPLN.ENV", Sfname0, ,,,,,,,,, , MenuLev
19 MenuLev=MenuLev-1
20 CALL strcat, Sfname, Sfname0
21 SET devout, Sfname
22 dosub 3drcnfgw.cdp
23
24 :exit
25 EXIT
GET2POS.CDP Monday, March 28, 1994 9:21 am Page 1
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=LastBhιt=G2Pcount=0
12 FinderX=FinderY=Finder Z= 0
13 for (i=1; i<3 ; i=i+1)
14 {
15 prompt "Select Point %1d",i
16 : readpos
17 DO
18 {
19 readdev Fcntl, Fx, Fy, Fz, Fa, Fb, Fc
20 ((INCLUDE finder1.inc
21 Bhit = Fcntl & 3
22 getkey
23 if (@key == 27)
24 goto exit
25 if (@key == Del)
26 exitloop
27 ) WHILE (Bhit == None)
28 on Bhit goto readpos, exit, B1hit, exit
29
30 :Blhit
31 ((INCLUDE finder0.inc
32 Mode draw
33 point Fx,Fy, Fz, White
34 G2Pos [Nodes] [0] = Fx
35 G2Pos [Nodes] [1] = Fy
36 G2Pos [Nodes] [2] = Fz
37 Nodes=Nodes+1
38 if (Nodes>1)
39 LINE G2Pos[(Nodes-2)] [0],G2Pos [(Nodes-2)] [1],G2Pos [(Nodes-2)] [2],\
40 Fx,Fy,Fz, White, ,2
41 Mode normal
42 Delete=Off
43 if (Beep == On)
44 print "\007"
45 ((INCLUDE waitrel1.inc
46 }
47 goto PntCheck
48
49 :Mouse
50 Nodes=G2Pcount=0
51 MenuOpt=2
52 for (i=1;i<3, i=i+1)
53 {
54 if ( i = =1)
55 getpos "Get First Location ",MenuOpt
56 if (i= =2)
57 getpos "Get Second Location . .".MenuOpt
58 if (@key <= -1)
59 goto exit
60 MenuOpt=@Key
61 Mode draw
62 point @XworId, @Yworld, @Zworld, White
63 G2Pos [Nodes] [0] = @Xworld
64 G2Pos [Nodes] [1] = @Yworld
65 G2Pos [Nodes] [2] = @Zworld
66 Nodes=Nodes+1
67 if (Nodes>1)
68 LINE G2Pos [(Nodes-2)] [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 } GET2POS.CDP Monday, March 28, 1994 9:21 am Page 2
74 goto PntCheck
75
76 : PntCheck
77 rem Check For Unique Points
78 distAB-sqrt ((G2Pos [1] [0] -G2Pos [0] [0] ) ^2+\
79 (G2Pos[1] [1] -G2Pos[0] [1]) ^2 + \
80 (G2Pos[1] [2]-G2Pos[0] [2]) ^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.inc
89 EXIT
GET3POS.CDP Monday, March 28, 1994 9:21 am Page 1
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
7 Nodes=LastBhit=0
8 on G3Pmode goto exit, Probe, Mouse, exit
9
10 : Probe
11 Nodes=LastBhit=G3Pcount=0
12 FinderX=FinderY=FinderZ= 0
13 /* 1st 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 (i=1, i<4, i=i+1)
17 {
18 prompt "Select Point %ld",i
19 :readpos
20 DO
21 {
22 readdev Fcntl, Fx, Fy, Fz, Fa, Fb, Fc
23 ((INCLUDE finderl.inc
24 Bhit = Fcntl & 3
25 getkey
26 if (@key == 27)
27 goto exit
28 if (@key == Del)
29 exitloop
30 } WHILE (Bhit == None)
31 on Bhit goto readpos, exit, B1hit, exit
32
33 :B1hit
34 ((INCLUDE finder 0. inc
35 Mode draw
36 point Fx, Fy, Fz, White
37 G3 Pos [Nodes] [0] - Fx
38 G3 Pos [Nodes] [1] = Fy
39 G3Pos [Nodes] [2] = Fz
40 Nodes =Nodes +1
41 if (Nodes>1 )
42 LINE G3Pos [ (Nodes-2 ) ] [0] , G3Pos [ (Nodes-2 ) 1 [1] , G3Pos [ (Nodes-2 ) ] [2] , \
43 Fx, Fy, Fz m White , , 2
44 if (Nodes= = 3 )
45 LINE G3Pos [0] [0] , G3Pos [0] [1] , G3Pos [0] [2] , Fx, Fy, Fz, White , , 2
46 Mode normal
47 Delete=Off
48 if (Beep == On)
49 print "\007"
50 ((INCLUDE waitrel1. inc
51 }
52 goto PntCheck
53
54 :Mouse
55 Nodes=G3Pcount=0
56 MenuOpt=2
57 for (i=1,i<4,-i=i+1)
58 {
59 if (i= =1)
60 getpos "Get First Location. . . ",MenuOpt
61 if (i= =2)
62 getpos "Get Second Location. . . ", MenuOpt
63 if (i= =3)
64 getpos "Get Third Location. . .", MenuOpt
65 if (@key <= -1)
66 goto exit
67 MenuOpt=@Key
68 Mode draw
69 point @XworId, @Yworld, @Zworld,White
70 G3Pos [Nodes] [0] = @Xworld
71 G3Pos [Nodes] [1] = @Yworld
72 G3Pos [Nodes] [2] = βZworld
73 Nodes=Nodes+1 GET3POS.CDP Monday, March 28, 1994 9:21 am Page 2
74 if (Nodes>1)
75 LINE G3Pos[(Nodes-2)] [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] [1] ,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[1] [2] -G3Pos[0] [2])^2)
90 if (abs (distAB) < .000001)
91 Nodes=Nodes-1
92 distBC=sqrt ((G3Pos [2] [0] -G3Pos [1] [0]) ^2+\
93 (G3Pos [2] [1] -G3Pos [1] [1] ) ^2 + \
94 (G3Pos [2] [2] -G3Pos [1] [2]) ^2)
95 if (abs(distBC) < .000001)
96 Nodes=Nodes-1
97 distAC=sqrt ( (G3Pos [2] [0] -G3Pos [0] [0]) ^2+\
98 (G3Pos [2] [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 :exit
110 G3Pcount=Nodes
111 Mode normal
112 ((INCLUDE finder2.inc
113 EXIT
GPDISP. CDP Monday, March 28, 1994 9:21 am Page 1
1 rem GPDISP.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 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] +Pdisp
14 XYwgp [5] =XYwgp [5] +Pdisp
15 XYwgp [8] =XYwgp [8] +Pdisp
16 for (i=0, i<4, i=i+1)
17 {
18 XYpnt1 [i] [2] =XYpnt1 [i] [2] +Pdιsp
19 XYpnt2 [i] [2] =XYpnt2 [i] [2) +Pdιsp
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] +Pdlsp
27 XZwgp [7] =XZwgp [7] +Pdιsp
28 for (i=0 , i<4 ; i=i+1)
29 {
30 XZpnt1 [i] [1] =XZpnt1 [i] [1] +Pdisp
31 XZpnt2 [i] [1] =XZpnt2 [i] [1] +Pdisp
32 }
33 }
34 /* Move YZ Working Grid Plane Boundry Points */
35 if (Pplane= =YZplane)
36 {
37 YZwgp [0] =YZwgp [0] +Pdisp
38 YZwgp [3] =YZwgp [3] +Pdisp
39 YZwgp [6] =YZwgp [6] +Pdisp
40 for (i=0, i<4, i=i+1)
41 {
42 YZpnt1 [i] [0] =YZpnt1 [i] [0] +Pdisp
43 YZpnt2 [i] [0] =YZpnt2 [i] [0] +Pdisp
44 }
45 }
46
47 /* Move XY Working Grid Plane Boundry Points
48 if (Splane= =XYplane)
49 {
50 XYwgp [2] =XYwgp [2] +Sdisp
51 XYwgp [5] =XYwgp [5] +Sdisp
52 XYwgp [8] =XYwgp [8] +Sdisp
53 for (i=0, i<4, i=i+1)
54 {
55 XYpnt1 [i] [2] =XYpnt1 [i] [2] +Sdιsp
56 XYpnt2 [i] [2] =XYpnt2 [i] [2] +Sdιsp
57 }
58 }
59 /* Move XZ Working Grid Plane Boundry Points */
60 if (Splane= =XZplane)
61 {
62 XZwgp [1] =XZwgp [1] +Sdisp
63 XZwgp [4] =XZwgp [4] +Sdisp
64 XZwgp [7] =XZwgp [7] +Sdisp
65 for (i=0, i<4 ; i=i+1)
66 {
67 XZpnt1 [i] [1] =XZpnt1 [i] [1] ÷Sdisp
68 XZpnt2 [i] [1] =XZpnt2 [i] [1] +Sdisp
69 }
70 }
71 /* Move YZ Working Grid Plane Boundry Points */
72 if (Splane= =YZplane)
73 { GPDISP. CDP Monday, March 28, 1994 9:21 am Page 2
74 YZwgp [0] =YZwgp [0] +Sdisp
75 YZwgp [3] -YZwgp [3] +Sdisp
76 YZwgp [6] -YZwgp [6] +Sdisp
77 for (i=0; i<4; i=i+1)
78 {
79 YZpnt1 [i] [0] =YZpntl [i] [0] +Sdisp
80 YZpnt2 [i] [0] =YZpnt2 [i] [0] +Sdιsp
81 }
82 }
83
84 :exit
85 EXIT
GPMOVE CDP Monday, March 28, 1994 9:21 am Page 1 rem GPMOVE CDP
rem The Replicator
rem Copyright (C) 1993, 1994 by Stephen Gubelmann - All rights reserved
rem Designed to work with Faro Metrecom/CADKEY/FastSURF
local i,ii
/* Move Working Grid Planes */
for (i=0, i<9, i=i+3)
10 {
11 XYwgp [i] -XYwgp [i] +Origin [0]
12 XZwgp [i] -XZwgp [i] +Origin[0]
13 YZwgp [i] -YZwgp [i] +Origin[0]
14 XYwgp [i + 1] -XYwgp [i + 1] +Origin [1]
15 XZwgp [i+1] -XZwgp [i+1] +Origin [1]
16 YZwgp [i+1] =YZwgp [i+1] +Origin [1]
17 XYwgp [i+2] -XYwgp [i+2] +Origin [2]
18 XZwgp [i+2] -XZwgp [i + 2] +Origin[2]
19 YZwgp [i + 2] -YZwgp [i + 2] +Origin [2]
20 }
21
22 /* Move Working Grid Plane Boundry Points */
23 for (i=0, i<4 , i=i+1)
24 {
25 /* Move XY Working Grid Plane Boundry Points
26 XYpnt1[i][ 0]=XYpnt1[i][0] +Origin[0]
27 XYpnt1 [i][1] =XYpnt1 [i][1] +Origin[1]
28 XYpnt1 [i][ 2]=XYpnt1 [i][2] +Origin[2]
29 XYpnt2[i][ 0]=XYpnt2[i][0] +Origin[0]
30 XYpnt2 [i][1]-XYpnt2[i][1] +Origin[1]
31 XYpnt2 [i][ 2]=XYpnt2[i] [ 2) +Origin[2]
32 /* Move XZ Working Grid Plane Boundry Points */
33 XZpnt1 [i][ 0]=XZpnt1[i] [0] +Origin [0]
34 XZpnt1 [i][1]=XZpnt1 [i][1] +Origin[1]
35 XZpnt1 [i][2]=XZpnt1 [i][2] +Origin[2]
36 XZpnt2 [i][0]=XZpnt2[i][ 0] +Origin[0]
37 XZpnt2 [i][1]=XZpnt2 [i][1] +Origin[1]
38 XZpnt2[i][ 2]=XZpnt2 [i][2] +Origin[2]
39 /* Move YZ Working Grid Plane Boundry Points */
40 YZpnt1 [i][0] -YZpnt1 [i][ 0] +Origin[0]
41 YZpnt1 [i] [1] -YZpnt1 [i][ 1] +Origin[1]
42 YZpnt1 [i][2] -YZpnt1 [i] [2] +Origin[2]
43 YZpnt2 [i][0]-YZpnt2 [i] [0] +Origin[0]
44 YZpnt2 [i][1]=YZpnt2 [i][1] +Origin[1]
45 YZpnt2 [i][2]=YZpnt2[i][2] +Origin[2]
46 }
47
48 :exit
49 EXIT
GPROTATE . CDP Monday, March 28, 1994 9:21 am Page1
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 i
7
8 /* Rotate XY Grid Plane P2.P3. X,Y,Z */
9 for (1=0; i<9; i=i+3)
10 {
11 XYZ[0]=XYwgp[i]
12 XYZ[1] =XYwgp [i + 1]
13 XYZ [2] =XYwgp [i+2]
14 if (MagFlag)
15 dosub magrot . cdp
16 else
17 dosub xyzrot . cdp
18 XYwgp [1] =XYZ [0]
19 XYwgp [i+1] =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 (i=0; i<4; i=i+1)
25 {
26 XYZ[0]=XYpnt1[i] [0]
27 XYZ[1]=XYpnt1[1] [1]
28 XYZ [2] -XYpnt1 [1] [2]
29 if (MagFlag)
30 dosub magrot . cdp
31 else
32 dosub xyzrot . cdp
33 XYpnt1 [i] [0]=XYZ[0]
34 XYpnt1 [i] [1]=XYZ[1]
35 XYpnt1 [i] [2]=XYZ[2]
36 }
37
38 /* Rotate XY Inner Grid Plane Boundary Points - P1,P2,P3,P4: X,Y,Z */
39 for (i=0; i<4; i=i+1)
40 {
41 XYZ[0]=XYpnt2[i] [0]
42 XYZ[1]=XYpnt2[i] [1]
43 XYZ[2]=XYpnt2[ι] [2]
44 if (MagFlag)
45 dosub magrot . cdp
46 else
47 dosub xyzrot . cdp
48 XYpnt2[i] [0]=XYZ[0]
49 XYpnt2[i] [1]=XYZ[1]
50 XYpnt2[i] [2] -XYZ [2]
51 }
52
S3 /* Rotate XZ Grid Plane P2,P3: X,Y,Z */
54 for (i=0, i<9, i=i+3)
55 {
56 XYZ [0] =XZwgp [i]
57 XYZ [1] =XZwgp [i+1]
58 XYZ[2]=XZwgp[i+2]
59 if (MagFlag)
60 dosub magrot . cdp
61 else
62 dosub xyzrot . cdp
63 XZwgp [i] =XYZ [0]
64 XZwgp [i+1] =XYZ [1]
65 XZwgp [i+2] =XYZ [2]
66 }
67
68 /* Rotate XZ Outer Grid Plane Boundary Points P1,P2,P3,P4: X.Y.Z */
69 for (i=0; i<4; i=i+1)
70 {
71 XYZ [0] =XZpnt1 [i] [0]
72 XYZ [1] =XZpnt1 [i] [1]
73 XYZ [2] =XZpnt1 [i] [2] GPROTATE . CDP Monday, March 28, 1994 9.21 am Page 2
74 if (MagFlag)
75 dosub magrot.cdp
76 else
77 dosub xyzrot. cdp
78 XZpnt1 [i] [0]=XYZ[0]
79 XZpnt1 [i] [1]=XYZ[1]
80 XZpnt1 [i] [2] -XYZ [2]
81 }
82
83 /* Rotate XZ Inner Grid Plane Boundary Points P1,P2,P3,P4: X,Y,Z */
84 for (i=0; i<4; i=i+1)
85 {
86 XYZ[0]=XZpnt2[i] [0]
87 XYZ[1]=XZpnt2 [i] [1]
88 XYZ[2]=XZpnt2 [i] [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. (i=0; i<9; i=i+3)
100 {
101 XYZ[0]=YZwgp[i]
102 XYZ[1]=YZwgp[i + 1]
103 XYZ[2] -YZwgp [i+2]
104 if (MagFlag)
105 dosub magrot . cdp
106 else
107 dosub xyzrot . cdp
108 YZwgp [i] =XYZ [0]
109 YZwgp [i+1] =XYZ [1]
110 YZwgp [i+2] =XYZ [2]
111 }
112
113 /* Rotate YZ Outer Grid Plane Boundary Points P1,P2,P3,P4: X,Y,Z */
114 for (i=0; i<4; i=i+1)
115 {
116 XYZ [0] =YZpnt1 [1] [0]
117 XYZ [1] =YZpnt1 [1] [1)
118 XYZ [2] =YZpnt1 [1] [2]
119 if (MagFlag)
120 dosub magrot . cdp
121 else
122 dosub xyzrot . cdp
123 YZpnt1 [i] [0]=XYZ[0]
124 YZpnt1 [i] [1]=XYZ[1]
125 YZpnt1 [i] [2] -XYZ [2]
126 }
127
128 /* Rotate YZ Inner Grid Plane Boundary Points P1,P2,P3,P4: X,Y,Z */
129 for (1=0; 1<4; 1=1+1)
130 {
131 XYZ[0]=YZpnt2[ι] [0]
132 XYZ[1]=YZpnt2[ι] [1]
133 XYZ[2]=YZpnt2 [1] [2]
134 if (MagFlag)
135 dosub magrot . cdp
136 else
137 dosub xyzrot . cdp
138 YZpnt2 [i] [0] =XYZ[0]
139 YZpnt2[ι] [1]=XYZ[1]
140 YZpnt2[ι] [2] -XYZ [2]
141 }
142
143 :exit
144 EXIT GPRSET.CDP Monday, March 28, 1994 9.21 am Page1
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 GridPlane */
7 /* P1 P2 P3 Equation of a Plane */
8 /* X Y Z X Y X Y Z A B C D */
9 ARRAY XYwgp [13] = {0, 0, 0, 1, 0, 0, 1, 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 XYpnt1 [0] [0] =XYpnt1 [0] [1] =XYpnt1 [1] =XYpnt1 [3] [0] --GridSize
14 XYpnt1 [1] [0] =XYpnt1 [2] [0] =XYpnt1 [1] =XYpnt1 [3] [1]=GridSize
15 XYpnt1 [0] [2] =XYpnt1 [1] [2] =XYpnt1 [2] =XYpnt1 [3] I2)=0
16 XYpnt2[0] [0]=XYpnt2[0] [1]=XYpnt2 [1]-XYpnt2[3 [0]=-(GridSize/3)
17 XYpnt2[1] [0]=XYpnt2[2] [0]=XYpnt2 [1]=XYpnt2[3 [1]=(GridSize/3)
18 XYpnt2[0] [2]=XYpnt2[1] [2]=XYpnt2 [2]=XYpnt2[3 [2]=0
19 /* XZ Grid Plane Boundry Points
20 XZpnt1 [0] [0]=XZpnt1[0] [2] =XZpnt1 [2]=XZpnt1[3 [0] =-GridSize
21 XZpnt1 [1] [0] =XZpnt1 [2] [0] =XZpnt1 [2] =XZpnt1 [3] [2] -GridSize
22 XZpnt1 [0] [1] =XZpnt1 [1] [1] =XZpnt1 [1] =XZpnt1 [3] [1]=0
23 XZpnt2[0] [0]=XZpnt2[0] [2]=XZpnt2 [2]=XZpnt2[3] [0]=- (GridSize/3)
24 XZpnt2[1] [0]=XZpnt2[2] [0]=XZpnt2 [2]=XZpnt2[3] [2] = (GridSize/3)
25 XZpnt2[0] [1]=XZpnt2[1] [1]=XZpnt2 [1]=XZpnt2 [3 [1]=0
26 /* YZ Grid Plane Boundry Points
27 YZpnt1 [0] [1] =YZpnt1 [0] [2] =YZpnt1 [2]=YZpnt1[3] [1] =-GridSize
28 YZpnt1 [1] [1] =YZpnt1 [2] [1] =YZpnt1 [2]=YZpnt1[3] [2]=GridSize
29 YZpnt1 [0] [0] =YZpnt1 [1] [0] =YZpnt1 [0] =YZpnt1 [3] [0]=0
30 YZpnt2[0] [1]=YZpnt2[0] [2] =YZpnt2 [2]=YZpnt2[3] [1]=-(GridSize/3)
31 YZpnt2[1] [1]=YZpnt2[2] [1] =YZpnt2 [2]=YZpnt2[3] [2] = (GridSize/3)
32 YZpnt2[0] [0]=YZpnt2[1] [0] =YZpnt2 [0]=YZpnt2[3 [0]=0
33
34 dosub gpdisp.cdp
35
36 :exit
37 EXIT
GPSTATS.CDP Monday, March 28, 1994 9:21 am Page 1
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 $$PlnStr[0] [0] , $$AxisStr [0] [0]
7 INT PerpAxistO]
8 ARRAY PerpAxis [4] ={0,3,2,1}
9 $$PlnStr[0] ="_"
10 $$PlnStr [1] ="XY"
11 $$PlnStr [2]="XZ"
12 $$PlnStr [3] ="YZ"
13 $$AxisStr [0]="_"
14 $$AxisStr [1]="Z"
15 $$AxisStr [2] ="Y"
16 $4AxisStr [3] ="X"
17
18 :StatTop0
19 sprint $$tatStr, "Pplane: %s ", $$PlnStr [Pplane]
20 call strcat, $$tatStr, "Disp in %s : "
21 sprint $$tatStr, $$tatStr, $$AxisStr [Pplane]
22 call strcat, $$tatStr, "%8.4f "
23 sprint $$tatStr, $$tatStr, Pdisp
24 call strcat, $$tatStr, "Rot XYZ: /%6.2f/%6.2f/%6.2f/"
25 sprint $$tatStr, $$tatStr, XYZrot [0] , XYZrot[1], XYZrot[2]
26 getmenu $$tatStr
27 if (@key ==- 2)
28 goto StatTop9
29 if (@key ==- 3)
30 goto exit
31 :StatTopl
32 sprmt $$tatStr, "Splane: %s ", $$PlnStr [Splane]
33 call strcat, $$tatStr, "Disp in %s. "
34 sprmt $$tatStr, $$tatStr, $$AxisStr [Splane]
35 call strcat, $$tatStr, "%8.4f "
36 sprmt $$tatStr, $$tatStr, Sdisp
37 call strcat, $$tatStr, "Rot XYZ /%6.2f/%6.2f/%6.2f/"
38 sprmt $$tatStr, $$tatStr, XYZrot [0] , XYZrot [1] , XYZrot [2]
39 getmenu $$tatStr
40 if (@key == -2)
41 goto StatTop0
42 if (@key -= -3)
43 goto exit
44 :StatTop2
45 sprint $$tatStr, "Equation of Plane XY. A=%5.2f B=%5.2f. C=%5.2f D=%5.2f",\
46 XYwgp [9] ,XYwgp [10] , XYwgp [11] , XYwgp [12]
47 getmenu $$tatStr
48 if (@key == -2)
49 goto StatTopl
50 if (@key == -3)
51 goto exit
52 :StatTop3
53 sprint $$tatStr, "Equation of Plane XZ: A=%5.2f B=%5.2f: C=%5.2f D=%5.2f",\
54 XZwgp [9] , XZwgp [10] , XZwgp [11] ,XZwgp [12]
55 getmenu $$tatStr
56 if (@key == -2)
57 goto StatTop2
58 if (@key == -3)
59 goto exit
60 :StatTop4
61 sprint $$tatStr, "Equation of Plane YZ: A=%5.2f B=%5.2f: C=%5.2f D=%5.2f",\
62 YZwgp[9] ,YZwgp[10] ,YZwgp[11] ,YZwgp[12]
63 getmenu $$tatStr
64 if (@key == -2)
65 goto StatTop3
66 if (@key == -3)
67 goto exit
68 .StatTop5
69 sprmt $$tatStr, "Grid Plane Rotation (World): /%6.2f/%6 2f/%6 2f/",\
70 XYZrot [0], XYZrot [1], XYZrot [2]
71 getmenu $$tatStr
72 if (@key == -2)
73 goto StatTop4 GPSTATS.CDP Monday, March 28, 1994 9:21 am Page 2
74 if (@key == -3)
75 goto exit
76 :StatTop6
77 sprint $$tatStr, "Grid Plane Offset (Magnetic): /%6.2f/%6.2f/%6.2f/", \
78 XYZmagO [0] , XYZmagO[1] , XYZmagO[2]
79 getmenu $$tatStr
80 if (@key == -2)
81 goto StatTop5
82 if (@key == -3)
83 goto exit
84 :StatTop7
85 sprint $$tatStr, "Grid Plane Rotation (Magnetic): /%6.2f/%6.2f/%6.2f/" ,\
86 XYZmag [0], XYZmag [1] , XYZmag [2]
87 getmenu $$tatStr
88 if (@key ==-2)
89 goto StatTop6
90 if (@key == -3)
91 goto exit
92 :StatTop8
93 sprint $$tatStr, "Grid Plane Magnetic Origin: /%6.2f/%6.2f/%6.2f/",\
94 MagOrgn [0] , MagOrgn [1] , MagOrgn [2 ]
95 getmenu $$tatStr
96 if (@key == -2)
97 goto StatTop6
98 if (@key == -3)
99 goto exit
100 :StatTop9
101 sprint $$tatStr, "Grid Plane Origin: X = %8 .4f Y %8.4f Z = %8.4f",\
102 Origin [0], Origin [1], Origin [2]
103 getmenu $$tatStr
104 if (@key == -2)
105 goto StatTop6
106 if (@key == -3)
107 goto exit
108 goto StatTop0
109
110 :exit
111 clear $$PlnStr, $$AxisStr
112 EXIT
LOCATE . CDP Monday, March 28, 1994 9:21 am Page 1
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/FastSURF
5
6 :top
7 PntNF-None
8 ii-4
9 Done-False
10 MenuLev-MenuLev+1
11 sprint $MenuStr, "Select Locate Option (%d) " .LastPick [ii]
12 getmenu SMenuStr, \
13 "Track", \
14 "Mpnt2pnt",\
15 "Pnt Near", \
16 "Pnt Far" A
17 "PntPln X",\
18 "-more- ", \
19 SSViewstr [Views] , \
20 "Control", \
21 "3DR Help", MenuLev, LastPick [ii]
22 switch (@key)
23 {
24 case -3
25 goto exit
26 case -2
27 goto exit
28 case 1
29 LastPick[ii] =1
30 dosub track.cdp
31 break
32 case 2
33 LastPick [ii] =2
34 dosub mpnt2pnt.cdp
35 break
36 case 3
37 LastPick [ii] =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 [ii] =5
48 dosub pntplnx.cdp
49 break
50 case 6
51 LastPick [ii] =6
52 dosub locate2.cdp
53 break
54 case 7
55 LastPick [ii] =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 [ii] =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 2
74 :exit
75 MenuLev-MenuLev-1
76 EXIT
LOCATE2.CDP Monday, March 28, 1994 9: 21 am Page 1
1 rem LOCATE2.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 PntNF=None
8 ii=21
9 Done=False
10 MenuLev=MenuLev+1
11 sprmt $MenuStr, "Select Locate Option (%d) ".LastPick [ii]
12 getmenu $MenuStr, \
13 "Center" , \
14 "Edge" ,\
15 "Corner" A
16 " - ",\
17 " - ",\
18 " - ",\
19 $$Viewstr [Views] ,\
20 "Control ", \
21 "3DR Help", MenuLev, LastPick [ii]
22 switch (@key)
23 {
24 case -3
25 goto exit
26 case -2
27 goto exit
28 case 1
29 LastPick [ii]=1
30 dosub center.cdp
31 break
32 case 2
33 LastPick [ii] =2
34 dosub edge.cdp
35 break
36 case 3
37 LastPick [ii] =3
38 dosub corner. cdp
39 break
40 case 4 6
41 LastPick [ii] =9
42 Menu-20
43 dosub 3drhelp cdp
44 break
45 case 7
46 LastPick [ii] =7
47 dosub vstdopt cdp
48 break
49 case 8
50 LastPick [ii] =8
51 dosub control. cdp
52 break
53 case 9
54 LastPick [ii] =9
55 Menu=20
56 dosub 3drhelp cdp
57 break
58 default
59 Menu=20
60 dosub 3drhelp cdp
61 break
62 }
63 MenuLev=MenuLev-1
64 goto top
65 exit
66 MenuLev=MenuLev-1
67 EXIT MAGROT.CDP Monday, March 28, 1994 9:21 am Page 1
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]*sin (XYZmagO [0] +XYZmag [0]))+ (XYZtemp [2] *cos (XYZmagO [0] +XYZmag [0] ) )
15 XYZtemp [1] -XYZ [1]
16 XYZtemp [2] -XYZ [2]
17 }
18
19 /* Rotate Y Axis */
20 IF ( (XYZmagO [1]) || (XYZmag [1] !=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] -sin (XYZmagO [2] +XYZmag [2] ) ) + (XYZtemp [1] -cos (XYZmagO [2] +XYZmag [2]))
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
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 with Faro Metrecom/CADKEY/FastSURF
5 rem This program measures the distance between two points
6
7 float PntDist
8 ARRAY PomtsAB[2] [3]={0, 0,0, 0,0,0}
9 ARRAY PntID[2] = {0,0}
10 FinderX-FinderY=FinderZ=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 finderl.inc
25 if (Count)
26 {
27 PntDist=sqrt ( ( (PomtsAB [0] [0] -Fx) ^2) +\
28 ( (PomtsAB [0] [1] -Fy) ^2) +\
29 ( (PomtsAB [0] [2] -Fz)^2))
30 prompt "Dynamic Point to Point Distance = %5.2f", PntDist
31 Mode draw
32 LINE PomtsAB [(Count-1)] [0] , PomtsAB [(Count-1)] [1] , PomtsAB [ (Count-1)] [2] ,\
33 Fx,Fy,Fz,LRed, ,2, , , ,@lwidth
34 LINE PomtsAB[ (Count-1) ] [0] , PomtsAB [ (Count-1) ] [1] , PomtsAB [ (Count-1) ] [2] ,\
35 Fx,Fy,Fz, Black, ,1, , , ,@lwidth+4
36 Mode normal
37 }
38 Bhit = Fcntl &. 3
39 getkey
40 if (@key == 27)
41 goto exit
42 } WHILE (Bhit == None)
43 on Bhit goto top, B201, B101, exit
44
45
46 :B201
47 ((INCLUDE finder0.inc
48 if (Beep == On)
49 print "\007"
50 If (PntID[0] != 0)
51 DELENT PntID [0]
52 If (PntIDd] != 0)
53 DELENT PntID [1]
54 If (LinelD!=0)
55 DELENT LineID
56 if ((Delete == On) || (Count == D)
57 goto start
58 goto exit
59
60 :B101
61 #INCLUDE finder0.inc
62 if (Delete == On)
63 {
64 Delete=Off
65 If (PntID[0] != 0)
66 DELENT PntID[0]
67 If (PntID[1] != 0)
68 DELENT PntID[1]
69 If (LmeID! = 0)
70 DELENT LineID
71 Count=0
72 Count=0
73 } MPNT2PNT.CDP Monday, March 28, 1994 9:21 am Page2
74 if (Count == 0)
75 point Fx,Fy,Fz,Red
76 if (Count == 1)
77 point Fx, Fy, Fz, Blue
78 PntID [Count] =@lastid
79 PomtsAB [Count] [0] =Fx
80 PomtsAB [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 top0
89
90 : Measure
91 PntDist=sqrt ( ( (PointsAB [0] [0] -PointsAB [1] [0] ) ^2 ) +\
92 ( (PomtsAB [0] [1] -PointsAB [1] [1] ) ^2) +\
93 ( (PoιntsAB [0] [2] -PointsAB [1] [2] ) ^2 ) )
94 Line PoιntsAB [0] [0] , PomtsAB [0] [1] , PoιntsAB [0] [2] A
95 PomtsAB [1] [0] , PomtsAB [1] [1] , PomtsAB [1] [2] . White , Dashed
96 LineID=@lastid
97 auto -1
98 redraw -1
99 on @units goto Inch, Mili, Feet, Cent, Yards, Meters
100 :Inch
101 prompt "Distance Between Point A and B %.4f Inches", PntDist
102 goto Done
103 :Mili
104 prompt "Distance Between Point A and B = %.4f Milimeters",PntDist
105 goto Done
106 :Feet
107 prompt "Distance Between Point A and B = %.4f Feet" , PntDist
108 goto Done
109 :Cent
110 prompt "Distance Between Point A and B = %.4f Centimeters" , PntDist
111 goto Done
112 : Yards
113 prompt "Distance Between Point A and B = %.4f Yards" , PntDist
114 goto Done
115 :Meters
116 prompt "Distance Between Point A and B = %.4f Meters" , PntDist
117 :Done
118 Delete=On
119 Count=0
120 goto top
121
122 :exit
123 If (PntID[0] != 0)
124 DELENT PntID [0]
125 If (PntIDd) != 0)
126 DELENT PntID[1]
127 If (LmeID!=0)
128 DELENT LineID
129 clear PomtsAB, PntID
130 ((INCLUDE fmder2.inc
131 auto -1
132 redraw -1
133 EXIT ORIGIN. CDP Monday, March 28, 1994 9:21 am Page 1 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=11
11 MenuLev=MenuLev+1
12 sprint $MenuStr, "Select Grid Plane Origin Option (%d)", LastPick [ii]
13 getmenu $MenuStrA
14 "Set 1pos",\
15 "Move1pos", \
16 'Set 3pos",\
17 Rset Mag" , \
18 " - ",\
19 " - ",\
20 " - ",\
21 " - ",\
22 "3DR Help", MenuLev, LastPick [ii]
23 switch (@key)
24 {
25 case -3:-2
26 if (@key==-3)
27 Done-True
28 goto exit
29 break
30 case 1
31 LastPick [ii]=l
32 dosub originl.cdp
33 if (GlPcount == 0)
34 {
35 MenuLev-MenuLev-1
36 goto start
37 }
38 Pplane=XZplane
39 Pdisp=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 -1
55 break
56 case 2
57 LastPick [ii] =2
58 dosub originl . cdp
59 if (GlPcount == 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 dosub vstdopt2.cdp
71 :GridPlns
72 iii=15
73 MenuLev=MenuLev+1 ORIGIN. CDP Monday, March 28, 1994 9:21 am Page 2
74 sprmt $MenuStr, "Select Orientation Plane (%d) ",LastPick[iii]
75 getmenu $MenuStr, \
76 "Plane XY", \
77 "Plane XZ",\
78 "Plane YZ",\
79 " - ",\
80 " - ",\
81 " - ",\
82 " - ",\
83 " - ",\
84 "3DR Help", MenuLev, LastPick [iii]
85 switch (@key)
86 {
87 case -3: -2
88 MenuLev-MenuLev- 1
89 if (@key==-3)
90 {
91 Done=True
92 goto exit
93 }
94 if (@key==-2)
95 {
96 MenuLev=MenuLev-1
97 goto start
98 }
99 break
100 case 1
101 LastPick [iii] =1
102 :XYpath
103 :PM1
104 iiii=16
105 Pplane=XYplane
106 G3Pmode=0
107 MenuLev=MenuLev+1
108 sprmt $MenuStr, "Select 3 Position Selection Method (%d)", LastPick [iiii]
109 getmenu $MenuStrA
110 "Probe" , \
111 "Mouse" , \
112 " - ",\
113 " - ",\
114 " - ",\
115 " - ",\
116 " - ",\
117 " - ",\
118 "3DR Help" , MenuLev, LastPick [iiii]
119 switch (@key)
120 {
121 case -3: -2
122 MenuLev=MenuLev-2
123 if (@key==-3)
124 {
125 Done=True
126 goto exit
127 }
128 if (@key==-2)
129 goto GridPlns
130 break
131 case 1
132 LastPick [iiii] =1
133 G3Pmode=l
134 dosub get3pos.cdp
135 if (G3Pcount == 3)
136 {
137 prompt "Computing Grid Plane and Views From XY Coordinates ..."
138 dosub smthg3p.cdp
139 Pplane=XYplane
140 Splane=XZplane
141 dosub XYplnrot.cdp
142 }
143 else
144 {
145 if (Nodes == -1)
146 pause "Points are Collinear!" ORXGIN. CDP Monday, March 28, 1994 9:21 am Page 3
147 else
148 pause "3 Unique Locations Required. You entered %d",G3Pcount
149 MenuLev=MenuLev-1
150 auto -1
151 redraw -1
152 goto XYpath
153 }
154 break
155 case 2
156 LastPick [iiii] =1
157 G3Pmode=2
158 dosub get3pos.cdp
159 if (G3Pcount == 3)
160 {
161 prompt "Computing Grid Plane and Views From XY Coordinates ..."
162 dosub smthg3p.cdp
163 Pplane=XYplane
164 Splane=XZplane
165 dosub XYplnrot . cdp
166 }
167 else
168 {
169 if (Nodes == -1)
170 pause "Points are Collinear!"
171 else
172 pause "3 Unique Locations Required. You entered %d",G3Pcount
173 MenuLev-MenuLev-1
174 auto -1
175 redraw -1
176 goto XYpath
177 }
178 break
179 case 3:8
180 LastPick [iiii] =9
181 Menu-15
182 dosub 3drhelp.cdp
183 break
184 case 9
185 LastPick [iiii] =9
186 Menu-15
187 dosub 3drhelp.cdp
188 break
189 default
190 LastPick [iiii] =9
191 Menu-15
192 dosub 3drhelp . cdp
193 break
194 }
195 MenuLev=MenuLev-1
196 if (LastPick[iiii]==9)
197 goto PM1
198 break
199 case 2
200 LastPick [iii] =2
201 :XZpath
202 :PM2
203 iiii=16
204 Pplane=XZplane
205 G3Pmode=0
206 MenuLev=MenuLev+1
207 sprint $MenuStr, "Select 3 Position Selection Method (Vd) ", LastPick [iiii]
208 getmenu $MenuStrA
209 Probe" , \
210 Mouse" , \
211 " - ",\
212 " - ",\
213 " - ",\
214 " - ",\
215 " - ",\
216 " - ",\
217 "3DR Help" .MenuLev, LastPick [iiii]
218 switch (@key)
219 { ORIGIN.CDP Monday, March 28, 1994 9:21 am Pa ge 4
220 case -3:-2
221 MenuLev-MenuLev-2
222 if (@key==-3)
223 {
224 Done=True
225 goto exit
226 }
227 if (@key==-2)
228 goto GridPlns
229 break
230 case 1
231 LastPick [iiii] =1
232 G3Pmode=1
233 dosub get3pos.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 pause "Points are Collinear!"
249 else
250 pause "3 Unique Locations Required. You entered %d",G3Pcount
251 MenuLev=MenuLev-1
252 auto -1
253 redraw -1
254 goto XZpath
255 )
256 break
257 case 2
258 LastPick [iiii] =2
259 G3Pmode=2
260 dosub get3pos.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[1]
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 LastPick [iiii] -9
286 Menu=15
287 dosub 3drhelp cdp
288 break
289 case 9
290 LastPick [iiii] =9
291 Menu=15
292 dosub 3drhelp.cdp ORIGIN CDP Monday March 28, 1994 9: 21 am Page 5
293 break
294 default
295 LastPick [iiii] =9
296 Menu-15
297 dosub 3drhelp cdp
298 break
299 }
300 MenuLev-MenuLev-1
301 if (LastPick[iiii]==9)
302 goto PM2
303 break
304 case 3
305 LastPick [iii] =3
306 : YZpath
307 : PM3
308 iiii=16
309 Pplane=YZplane
310 G3Pmode-0
311 MenuLev=MenuLev+1
312 sprmt SMenuStr, "Select 3 Position Selection Method (%d) ", LastPick
313 getmenu SMenuStr, \
314 Probe", \
315 Mouse" , \
316 " - ", \
317 " - ",\
318 " - ", \
319 " - ", \
320 " - ", \
321 " - ", \
322 " 3DR Help", MenuLev, LastPick [iiii]
323 switch (@key)
324 {
325 case -3:-2
326 MenuLev=MenuLev-2
327 if (@key==-3)
328 {
329 Done=True
330 goto exit
331 }
332 if (@key==-2)
333 goto GridPlns
334 break
335 case 1
336 LastPick [iiii] =1
337 G3Pmode=1
338 dosub get3pos.cdp
339 if (G3Pcount == 3)
340 {
341 prompt "Computing Grid Plane and Views From YZ Coordinates
342 dosub smthg3p cdp
343 G3Pos[2] [0]=G3Pos[1] [0]
344 G3Pos[2] [1]=G3Pos[1] [1]
345 G3Pos[2] [2]=G3Pos[1] [2]
346 G3Pos[1] [0]=G3Pos[0] [0]+ABCD[0]
347 G3Pos[1] [1]=G3Pos[0] [1]+ABCD[1]
348 G3Pos[1] [2]=G3Pos[0] [2]+ABCD[2]
349 Pplane-YZplane
350 Splane=XYplane
351 dosub XYplnrot cdp
352 }
353 else
354 {
355 if (Nodes == -1)
356 pause "Points are Collinear!"
357 else
358 pause "3 Unique Locations Required You entered %d",G3Pcount
359 MenuLev-MenuLev-1
360 auto -1
361 redraw -1
362 goto YZpath
363 }
364 break
365 case 2 ORIGIN. CDP Monday, March 28, 1994 9:21 am Page 6
366 LastPick [iiii] =2
367 G3Pmode=2
368 dosub 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 [1] [0]
374 G3Pos [2] [1] =G3Pos [1] [1]
375 G3Pos [2] [2] =G3Pos [1] [2]
376 G3Pos [1] [0] =G3Pos [0] [0] +ABCD [0]
377 G3Pos [1] [1] =G3Pos [0] [1] +ABCD [1]
378 G3Pos [1] [2] =G3Pos [0] [2] +ABCD [2]
379 Pplane=YZplane
380 Splane=XYplane
381 dosub XYplnrot . cdp
382 }
383 else
384 {
385 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 -1
392 goto YZpath
393 }
394 break
395 case 3 : 8
396 LastPick [iiii] =9
397 Menu=15
398 dosub 3drhelp. cdp
399 break
400 case 9
401 LastPick [iiii] =9
402 Menu=15
403 dosub 3drhelp cdp
404 break
405 default
406 LastPickdm] =9
407 Menu=15
408 dosub 3drhelp cdp
409 break
410 }
411 MenuLev-MenuLev-1
412 if (LastPick[iiii]= =9)
413 goto PM3
414 break
415 case 4:8
416 LastPick [iii] =9
417 Menu=14
418 dosub 3drhelp.cdp
419 break
420 case 9
421 LastPick [iii] =9
422 Menu=14
423 dosub 3drhelp.cdp
424 break
425 default
426 LastPick[ iii]=9
427 Menu=14
428 dosub 3drhelp.cdp
429 break
430 }
431 MenuLev=MenuLev-1
432 if (LastPick [iii] ==9)
433 goto GridPlns
434 break
435 case 4
436 LastPick [ii] =4
437 prompt "Computing Magnetic View . "
438 MagOrgn [0] =XYZrot [0] IGIN. CDP Monday, March 28, 1994 9.21 am Page 7
439 MagOrgn [1] =XYZrot [1]
440 MagOrgn [2] -XYZrot [2]
441 XYZmagO [0] -XYZmagO [0] +XYZmag [0]
442 XYZmagO [1] -XYZmagO [1] +XYZmag [1]
443 XYZmagO [2] -XYZmagO [2] ÷XYZmag [2]
444 XYZmag [0] -XYZmag [1] -XYZmag [2] =0
445 Views=Magnetic
446 dosub bldview.cdp
447 dosub RBldOptV.CDP
448 break
449 case 5:8
450 Menu=12
451 dosub 3drhelp.cdp
452 break
453 case 9
454 LastPick [ii] =9
455 Menu=12
456 dosub 3drhelp.cdp
457 break
458 default
459 Menu=12
460 dosub 3drhelp. cdp
461 break
462 }
463 MenuLev-MenuLev-1
464 goto start
465
466 :exit
467 MenuLev=MenuLev-1
468 EXIT
ORIGINl.CDP Monday, March 28, 1994 9:21 am Page1
1 rem ORIGIN1.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 FinderX=FmderY=FinderZ=0
9
10 :top
11 ii=18
12 MenuLev=MenuLev+1
13 sprint SMenuStr, "Select Displacement Selection Method (%d) ", LastPick [ii]
14 getmenu SMenuStr, \
15 "Probe", \
16 "Mouse", \
17 "Key In", \
18 " - ", \
19 " - ", \
20 " - ", \
21 " - ", \
22 " - ", \
23 "3DR Help", MenuLev, LastPick[ii]
24 switch (@key)
25 {
26 case -3: -2
27 goto exit
28 break
29 case 1
30 LastPick [ii]=1
31 GlPcount=0
32 prompt "Probe Select Grid Plane Origin . "
33 #INCLUDE waitnotl.inc
34 if (Beep == On)
35 print "\007"
36 GlPcount=1
37 Origin [0]-Fx
38 Origin [1]=Fy
39 Origin [2] =Fz
40 Pdisp=Sdisp=0
41 goto exit
42 case 2
43 LastPick [ii] =2
44 GlPcount=0
45 getpos "Indicate Grid Plane Origin. . .",2
46 if (@key <= -1)
47 goto exit
48 if (Beep == On)
49 print "\007"
50 GlPcount=1
51 Origin [0] =@XWORLD
52 Origin [1]=@YWORLD
53 Origin [2] =@ZWORLD
54 Pdisp=Sdisp=0
55 goto exit
56 case 3
57 LastPick [ii] =3
58 getflt "Enter New X Grid Origin (V 4f) :",Origin [0] , Origin [0]
59 getflt "Enter New Y Grid Origin (V.4f) :" ,Origm[1] ,Origin[1]
60 getflt "Enter New Z Grid Origin (V.4f) : ",Origin [2] ,0πgin[2]
61 GlPcount=1
62 Pdisp=Sdisp=0
63 goto exit
64 case 4 :8
65 LastPick [ii] =9
66 Menu=17
67 dosub 3drhelp.cdp
68 break
69 case 9
70 LastPick [ii] =9
71 Menu=17
72 dosub 3drhelp.cdp
73 break ORIGIN1.CDP Monday, March 28, 1994 9:21 am Page 2
74 default
75 LastPick [ii] =9
76 Menu=17
77 dosub 3drhelp.cdp
78 break
79 }
80 MenuLev=MenuLev-1
81 goto top
82 :exit
83 MenuLev=MenuLev-1
84 #INCLUDE finder2.inc
85 EXIT
PLNMENU. CDP Monday, March 28 1994 9 21 am Page 1
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 $$Ppm[0] [0] , $$Spln [0] [0]
7 PSplane=0
8
9 $$Ppln[0]="Ppln "
10 $$Ppln[l]="Ppln XY"
11 $$Ppln[2]="Ppln XZ"
12 $$Ppln[3]="Ppln YZ"
13
14 $$Spln [0] ="Spln _ "
15 $$Spln [1] ="Spln XY"
16 $$Spln [2] ="Spln XZ"
17 $$Spln [3] ="Spln YZ"
18
19 :top
20 11=7
21 Done=False
22 MenuLev=MenuLev+1
23 sprint SMenuStr, "Select Plane Settings (Vd) ",LastPick [ii]
24 getmenu SMenuStrA
25 $$Ppln [Pplane] A
26 "PplnDisp" A
27 $$Spln [Splane] A
28 "SplnDisp" A
29 "Origin" A
30 "XYZrot" A
31 "XYZalign'Α
32 "-more-", \
33 "3DR Help", MenuLev, LastPick [ii]
34 switch (@key)
35 {
36 case -3:-2
37 goto exit
38 case 1
39 LastPick [ii]=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 [ii] =2
48 PSplane=1
49 dosub dispget cdp
50 break
51 case 3
52 LastPick [ii] =3
53 Splane=Splane+1
54 if (Splane > 3)
55 Splane-NOplane
56 Sdisp=0
57 dosub rmagwld2.cdp
58 break
59 case 4
60 LastPick [ii] =4
61 PSplane=2
62 dosub dispget.cdp
63 break
64 case 5
65 LastPick [ii] =5
66 dosub origin.cdp
67 break
68 case 6
69 LastPick [ii] =6
70 Rotate=Rrel
71 dosub rotget.cdp
72 break
73 case 7 PLNMENU .CDP Monday, March 28, 1994 9:21 am Page 2
74 LastPick [ii] =7
75 Rotate-RAxis
76 dosub rotget . cdp
77 break
78 case 8
79 LastPick [ii] =8
80 dosub plnmenu2. cdp
81 break
82 case 9
83 LastPick [ii] =9
84 Menu=7
85 dosub 3drhelp.cdp
86 break
87 default
88 Menu=7
89 dosub 3drhelp.cdp
90 break
91 }
92 if (Done)
93 goto exit
94 MenuLev=MenuLev-1
95 goto top
96 :exit
97 MenuLev=MenuLev-1
98 clear $$Ppln, $$Spln
99 EXIT
PLNMENU2. CDP Monday, March 28, 1994 9 21 am Page 1
1 rem PLNMENU2.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 PSplane=0
7
8 :top
9 ii=8
10 MenuLev=MenuLev+1
11 sprmt $MenuStr, "Select Plane Settings (%d) " ,LastPick[ii]
12 getmenu $MenuStr,\
13 "Grid Tol",\
14 "GridSize", \
15 "GridRset", \
16 SSAlgnstr [Align] , \
17 SSViewstr [Views] , \
18 "GP Stats", \
19 "Test", "File", \
20 "3DR Help".MenuLev, LastPick(ii)
21 switch (@key)
22 {
23 case -3:-2
24 if (@key==-3)
25 Done=True
26 goto exit
27 case 1
28 LastPick [ii] =1
29 getflt "Enter new grid tollerance (%.4f) ",GridTol, GridTol
30 break
31 case 2
32 LastPick [ii] =2
33 getflt "Enter new Grid Size (% ,f) , GridSize, GridSize
34 dosub rmagwld2.cdp
35 break
36 case 3
37 LastPick [ ii ] =3
38 GridPlns=On
39 Align-On
40 Views=World
41 Pplane=XZplane
42 Pdisp=0
43 Splane-XYplane
44 Sdisp=0
45 GridTol= 030
46 GridSize=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 [ii] =4
67 Align = (1 # Align)
68 break
69 case 5
70 LastPick[ii] =5
71 dosub vstdopt.cdp
72 break
73 case 6 PLNMENU2. CDP Monday, March 28, 1994 9 21 am Page 2
74 LastPick [ii] =6
75 dosub gpstats .cdp
76 break
77 case 7
78 LastPick [ii] =7
79 dosub 3drtest.cdp
80 break
81 case 8
82 LastPick [ii] =8
83 SaveLoad
84 iii=19
85 MenuLev=MenuLev+1
86 sprint SMenuStr, "Select Environment File Option (%d) ", LastPick [iii]
87 getmenu SMenuStrA
88 Save",\
89 Load", \
90 " - ",\
91 " - ",\
92 " - ",\
93 " - ",\
94 " - ",\
95 " - ",\
96 "3DR HELP", MenuLev, LastPick [iii]
97 switch (@key)
98 {
99 case -3:-2
100 MenuLev=MenuLev-2
101 goto top
102 case 1
103 LastPick [m] =1
104 dosub envsave cdp
105 break
106 case 2
107 LastPick [iii] =2
108 dosub envload cdp
109 break
110 case 3 8
111 LastPick [iii] =9
112 Menu=18
113 dosub 3drhelp cdp
114 break
115 case 9
116 LastPick [iii] =9
117 Menu=18
118 dosub 3drhelp cdp
119 break
120 default
121 LastPick [iii]-9
122 Menu-18
123 dosub 3drhelp cdp
124 break
125 }
126 MenuLev-MenuLev-1
127 if (LastPick [iii]—9)
128 goto SaveLoad
129 break
130 case 9
131 LastPick [ii] =9
132 Menu=10
133 dosub 3drhelp cdp
134 break
135 default
136 LastPick [ii] =9
137 Menu=10
138 dosub 3drhelp.cdp
139 break
140 }
141 MenuLev=MenuLev-1
142 goto top
143 : exit
144 MenuLev=MenuLev-1
145 EXIT PNTNF. CDP Monday, March 28, 1994 9: 21 am Page 1
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 OldPoint-0
11 clear Fcntl, Fx, Fy,Fz, Fa, Fb, Fc
12 if (Pplane==NOplane)
13 {
14 Pause "Error Primary Plane not set Use \"SetGrid\" first "
15 goto exit
16 }
17 :start
18 Fcntl=Fx=Fy=Fz=Bhit-LastBhit=Count=LastPnt=0
19 if (PntNF == Far)
20 LastDist=0
21 if (PntNF == Near)
22 LastDist=1200
23
24 .top
25 prompt "B1=Sample Point %d | B2/ESC=exit", Count
26 :top1
27 getkey
28 if (@key == 27)
29 goto exit
30 if ((@key == Del) && (Delete == On))
31 goto deleteit
32 readdev Fcntl, Fx,Fy, Fz, Fa, Fb, Fc
33 LastBhit = Bhit
34 Bhit = Fcntl & 3
35 if ((Bhit == None) && (LastBhit == None) )
36 goto top1
37 on Bhit goto Blrel, exit, B101, exit
38
39 Blrel
40 Delete=On
41 OldPoint=LastPnt
42 goto start
43
44 B101
45 on PntNF goto exit, near, far
46
47 near
48 Delete-Off
49 if (Pplane==XYplane)
50 {
51 ThisDist= (abs(((XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) / \
52 sqrtl (XYwgp [9] *2) + (XYwgp [10] *2) + (XYwgp [11] *2))))
53 if (ThisDist < LastDist)
54 {
55 If (LastPnt)
56 DELENT LastPnt
57 point Fx, Fy, Fz , @color
5B if (Beep == On)
59 print "\007"
60 LastPnt = @lastid
61 LastDist = ThisDist
62 Count=Count+1
63 goto top
64 }
65 }
66 if (Pplane==XZplane)
67 {
68 ThisDist= (abs (((XZwgp[9]*Fx) + (XZwgp [10] -Fy) + (XZwgp [11] -Fz) +XZwgp [12] ) / \
69 sqrt ( (XZwgp [9] ^2) + (XZwgp [10] ^2) + (XZwgp [11] ^2))))
70 if (ThisDist < LastDist)
71 {
72 If (LastPnt)
73 DELENT LastPnt PNTNF CDP Monday, March 28, 1994 9 21 am Page 2
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 sqrtl (YZwgp [9] ^2 )+ (YZwgp [10] ^2 )+ (YZwgp [11] ^2))))
87 if (ThisDist < LastDist)
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 ThisDist= (abs(((XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) / \
107 sqrtl (XYwgp [9] ^2) + (XYwgp [10] ^2) + (XYwgp [11] ^2))))
108 if (ThisDist > LastDist)
109 {
110 If (LastPnt)
111 DELENT LastPnt
112 point Fx, Fy,Fz,θcolor
113 if (Beep == On)
114 print "\007"
115 LastPnt = βlastid
116 LastDist = ThisDist
117 Count=Count+l
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 sqrt( (XZwgp [9] *2) + (XZwgp [10] "2 )+ (XZwgp [11] ~2) ) ) )
125 if (ThisDist > LastDist)
126 {
127 If (LastPnt)
128 DELENT LastPnt
129 point Fx,Fy,Fz,θcolor
130 if (Beep == On)
131 print "\007"
132 LastPnt = @lastid
133 LastDist = ThisDist
134 Count=Count+1
135 goto top
136 }
137 }
138 if (Pplane==YZplane)
139 {
140 ThisDist= (abs(((YZwgp [9] *Fx) + (YZwgp [10] *Fy) + (YZwgp [11] -Fz) +YZwgp [12]) / \
141 sqrtl (YZwgp[9]*2)+ (YZwgp [10] *2) + (YZwgp [11] ^2))))
142 if (ThisDist > LastDist)
143 {
144 If (LastPnt)
145 DELENT LastPnt
146 point Fx,Fy,Fz,@color PNTNF.CDP Monday, March 28, 1994 9:21 am Page3
147 if (Beep == On)
148 print "\007"
149 LastPnt = @lastid
150 LastDist = ThisDist
151 Count=Count+1
152 goto top
153 }
154 }
155 goto top
156
157 :deleteit
158 Delete-Off
159 DELENT OldPoint
160 auto -1
161 redraw -1
162 goto start
163
164 :exit
165 EXIT
PNTPLNX.CDP Monday, March 28, 1994 9:21 am Page 1
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 Pnt2Pln1, Pnt2Pln2
7 clear Fcntl, Fx, Fy,Fz, Fa, Fb,Fc
8 FinderX=FinderY=FinderZ=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_Plns
18
19 :NoPplane
20 pause "Primary Plane not specified Use \ "Set Grid\ " to enable
21 goto exit
22
23 :NoSplane
24 pause "Secondary Plane not specified Use \"Set GridV to enable
25 goto exit
26
27 :NoX
28 pause "Primary Plane and Secondary Plane do not intersect
29 goto exit
30
31 : Cut_Plns
32 LastBhit=Bhit=Nodes=Delete=0
33 . tops2
34 prompt "B1 Press-Start | B2=End | B2/ESC=exit"
35 : tops3
36 DO
37 {
38 readdev Fcntl , Fx, Fy, Fz , Fa, Fb, Fc
39 ((INCLUDE fmderl . mc
40 Bhit = Fcntl & 3
41 getkey
42 if (@key == 27)
43 goto exit
44 if (@key == Del)
45 exitloop
46 } WHILE (Bhit == None)
47 if ((@key == Del) && (Delete == On))
48 goto deleteit
49 on Bhit goto tops3, B202s, B102s, tops3
50
51 :B102s
52 on Pplane goto NoPplane, XYpaths, XZpaths, YZpaths, NoX
53
54 :XYpaths
55 Pnt2Pln1= ( ( (XYwgp [9] *Fx) + (XYwgp [10] *Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) / \
56 sqrt ( (XYwgp [9] ^2 ) + (XYwgp [10] ^2) + (XYwgp [11] ^2) ) )
57 if (abs (Pnt2Pln1) > 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 tops 3
72 }
73 if (Align==On) PNTPLNX.CDP Monday, March 28, 1994 9:21 am Page 2
74 {
75 Fx=Fx+(-Pnt2Pln1*XYwgp[9])
76 Fy=Fy+(-Pnt2Pln1*XYwgp[10))
77 Fz=Fz+(-Pnt2Pln1*XYwgp[11])
78 if (Splane==XZplane)
79 {
80 Fx=Fx+(-Pnt2Pln2-XZwgp[9])
81 Fy=Fy+(-Pnt2Pln2*XZwgp[10])
82 Fz-Fz+(-Pnt2Pln2*XZwgp[11])
83 }
84 if (Splane==YZplane)
B5 {
86 Fx=Fx+(-Pnt2Pln2*YZwgp[9] )
87 Fy=Fy+(-Pnt2Pln2*YZwgp[10])
88 Fz=Fz+(-Pnt2Pln2*YZwgp[11])
89 }
90 }
91 goto jumps
92
93 :XZpaths
94 Pnt2Pln1= (((XZwgp [9] *Fx) + (XZwgp [10] *Fy) + (XZwgp [11] *Fz) +XZwgp [12] ) / \
95 sqrtl (XZwgp [9] ^2) + (XZwgp [10] ^2) + (XZwgp [11] ^2)))
96 if (abs(Pnt2Pln1) > GridTol)
97 goto tops3
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 tops3
111 }
112 if (Align==On)
113 {
114 Fx=Fx+(-Pnt2Pln1*XZwgp[9])
115 Fy=Fy+(-Pnt2Pln1*XZwgp[10] )
116 Fz-Fz+(-Pnt2Pln1*XZwgp[111 )
117 if (Splane==XYplane)
118 {
119 Fx=Fx+(-Pnt2Pln2*XYwgp[9] )
120 Fy=Fy+(-Pnt2Pln2*XYwgp[10] )
121 Fz=Fz+(-Pnt2Pln2*XYwgp[11])
122 }
123 if (Splane==YZplane)
124 {
125 Fx=Fx+(-Pnt2Pln2*YZwgp[9])
126 Fy=Fy+(-Pnt2Pln2*YZwgp[10])
127 Fz=Fz+(-Pnt2Pln2*YZwgp[11])
128 }
129 }
130 goto jumps
131
132 :YZpaths
133 Pnt2Pln1= (((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(Pnt2Pln1) > GridTol)
136 goto tops3
137 if (Splane==XYplane)
138 {
139 Pnt2Pln2= ( ( (XYwgp [9] -Fx) + (XYwgp [10] -Fy) + (XYwgp [11] *Fz) +XYwgp [12] ) / \
140 sqrt ( (XYwgp [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) + (XZwgp [11] -Fz) +XZwgp [12] ) / \ PNTPLNX.CDP Monday, March 28, 1994 9:21 am Page 3
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+ (-Pnt2Pln1*YZwgp[9] )
154 Fy=Fy+ (-Pnt2Pln1*YZwgp[10])
155 Fz-Fz+(-Pnt2Pln1*YZwgp[11])
156 if (Splane==XYplane)
157 {
158 Fx=Fx+(-Pnt2Pln2*XYwgp[9] )
159 Fy=Fy+(-Pnt2Pln2*XYwgp[10] )
160 Fz=Fz+(-Pnt2Pln2*XYwgp[11] )
161 }
162 if (Splane==XZplane)
163 {
164 Fx-Fx+(-Pnt2Pln2*XZwgp[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 finder0.inc
175 Delete=On
176 point Fx,Fy,Fz,@color
177 LastEnt=@lastid
178 Nodes=1
179 redraw -1
180 #INCLUDE waitrell.inc
181 goto tops2
182
183 :B202s
184 goto exit
185
186 :deleteit
187 DELENT LastEnt
188 redraw -1
189 goto Cut_Plns
190
191 :exit
192 clear Fcntl, Fx, Fy,Fz
193 #INCLUDE finder2.inc
194 redraw -1
195 EXIT
POLYGON. CDP Monday, March 28, 1994 9:21 am Page 1
1 rem POLYGON. 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 program will allow closed polygons to be input in 3-D
6
7 Fx=Fy=Fz=stype=LastBhit=LstNodes=0
8 ARRAY polygoon[10] [3]
9 ARRAY PntNodes [10] [3]
10 ARRAY PntIDs [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 "B1=Start | B2=End Polygon | Nodes = %d", Nodes
20 DO
21 {
22 readdev Fcntl, Fx,Fy,Fz, Fa, Fb,Fc
23 #INCLUDE finder1.inc
24 Bhit = Fcntl &. 3
25 getkey
26 if (@key == 27)
27 goto exit
28 if (@key == Del)
29 exitloop
30 } WHILE (Bhit == None)
31 if ((@key == Del) && (Delete == On))
32 goto deleteit
33 on Bhit goto readpos, done, Blhit, exit
34
35 :Blhit
36 #INCLUDE finder0.inc
37 Mode draw
38 point Fx,Fy,Fz,White
39 PntNodes [Nodes] [0] = Fx
40 PntNodes [Nodes] [1] = Fy
41 PntNodes [Nodes] [2] = Fz
42 Nodes=Nodes+l
43 if (Nodes>l)
44 LINE PntNodes[(Nodes-2)][0] , PntNodes [(Nodes-2)][1], PntNodes [ (Nodes-2)][2], \
45 Fx,Fy,Fz, White,, 2
46 Mode normal
47 Delete-Off
48 polygoon [n] [0] = Fx
49 polygoon [n] [1] = Fy
50 polygoon ln] [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 %d 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 Page 2
74 LastEnt=@lastid
75 if (Points)
76 {
77 PntsSgrp=PntsSgrp+1
78 for (n=0; n<Nodes ; n=n+1)
79 {
80 if (n==0)
81 ColCode=Red
82 if (n==1)
83 ColCode=Blue
84 if (n>1)
85 ColCode-Gray
86 if (n==(Nodes-1))
87 ColCode=Green
88 point PntNodes [n] [0] , PntNodes [n] [1], PntNodes [n] [2] ,ColCode, (@level+PntsLev), 122 , PntsSgrp
89 PntlDs [n] =@lastid
90 }
91 }
92 Delete=On
93 LstNodes=Nodes
94 #INCLUDE finder3.inc
95 goto start
96
97 :deleteit
98 Delete=Off
99 DELENT LastEnt
100 if (Points)
101 for (n=0; n<LstNodes; n=n+1)
102 DELENT PntIDs [n]
103 LstNodes=0
104 #INCLUDE finder3. inc
105 goto start
106
107 .exit
108 Mode normal
109 clear PntNodes, PntlDs, polygoon. Fx, Fy, Fz , Fcntl
110 #INCLUDE finder2.inc
111 EXIT
QUAD&ANG. CDP Monday, March 28, 1994 9:21 am Page 1
1 rem QUAD&ANG.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 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 [10] ^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= ( ( (XYwgp [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==1) && (Qy==1) && (Qz==1))
34 Quad=1
35 if ((Qx==-1) && (Qy==1) && (Qz==D)
36 Quad=2
37 if ((Qx==-1) && (Qy==-1) && (Qz==1) )
38 Quad=3
39 if ( (Qx==1) && (Qy==-1) && (Qz==1) )
40 Quad=4
41 if ( (Qx==1) && (Qy==1) && (Qz==-1))
42 Quad=5
43 if ( (Qx==-1) && (Qy==1) && (Qz==-1) )
44 Quad=6
45 if ((Qx==-1) && (Qy==-1) && (Qz==-1) )
46 Quad=7
47 if ((Qx==1) && (Qy==-1) && (QZ==-1) )
48 Quad=8
49
50 on RotAxis goto Zaxis, Yaxis, Xaxis
51
52 : Xaxis
53 Rot Index= 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+ ( - Pnt2 PlnD* YZwgp [9])
57 Dy=Dy+ ( - Pnt2 PlnD* YZwgp [10])
58 Dz=Dz+(-Pnt2PlnD*YZwgp[11])
59 Da=Origin [0] -Dx
60 Db=Origin[1] -Dy
61 Dc=Origin[2] -Dz
62 Rangle= (acos (((XYwgp [9] *Da) + (XYwgp [10] *Db) + IXYwgp [11] *De) ) / \
63 (sqrt ( (XYwgp [9] "2) + (XYwgp [10] ^2) + (XYwgp [11] ^2) ) *sqrt ( (Da^2) + (Db^2) + (Dc^2)))))
64 rem pause "Quad= %d, X Rotation = %.2f", Quad, Rangle
65 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==6))
72 Rangle=Rangle+270
73 if (Views==World) QUAD&ANG.CDP Monday, March 28, 1994 9:21 am Page 2
74 XYZrot [Rotlndex] =XYZrot [Rotlndex] +Rangle
75 else
76 XYZmag [Rotlndex] =XYZmag [Rotlndex] +Rangle
77 goto exit
78
79 :Yaxis
80 RotIndex=1
81 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+(-Pnt2PlnD*XZwgp[11])
86 Da=Origin[0] -Dx
87 Db=Origin[1] -Dy
88 Dc=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] ^2) ) -sqrt ( (Da^2) + (Db^2)+ (Dc^2)))))
91 rem pause "Quad= %d, Y Rotation = %.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 XYZmag [Rotlndex] =XYZmag [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 [9] )
111 Dy=Dy+ (-Pnt2PlnD*XYwgp [10] )
112 Dz-Dz+(-Pnt2PlnD*XYwgp[11])
113 Da=Origin[0] -Dx
114 Db=Origm[1]-Dy
115 Dc=Origm[2] -Dz
116 Rangle- (acos ( ( (XZwgp [9] *Da) + (XZwgp [10] *Db) + (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= %d, Z Rotation = %.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==8))
126 Rangle=-Rangle+450
127 if (Views==World)
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 28, 1994 9:21 am Page1 1 rem QUADANGR.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 RotIndex, 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 [10] ^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= (((XYwgp [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==1) && (Qy==1) && (Qz==1))
34 Quad=1
35 if ((Qx==1) SCSL (Qy==1) && (Qz==1))
36 Quad=2
37 if ((Qx==-1) && (Qy==-1) & & (Qz==1) )
38 Quad=3
39 if ( (Qx==1) && (Qy—-1) && (Qz==1))
40 Quad=4
41 if ((Qx==1) && (Qy==1) && (Qz==-1))
42 Quad=5
43 if ( (Qx==-1) && (Qy==1) && (Qz==-1))
44 Quad=6
45 if ((Qx==-1) && (Qy==-1) && (Qz==-1))
46 Quad-7
47 if ((Qx==1) & & (Qy==-1) && (Qz==-1) )
48 Quad=8
49
50 on RotAxis goto Zaxis, Yaxis, Xaxis
51
52 :Xaxis
53 Rotlndex=0
54 Pnt2PlnD= ( ( (YZwgp [9] *Dx) + (YZwgp [10] *Dy) + (YZwgp [11] *Dz) +YZwgp [12] ) / \
55 sqrt l (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 [1] -Dy
61 Dc=Origin [2] -Dz
62 Rangle = (acos ( ( (XYwgp [9] -Da) + (XYwgp [10] -Db) + (XYwgp [11] -De) ) / \
63 (sqrt ( (XYwgp [9] ^2 > + (XYwgp [10] ^2 ) + (XYwgp [11] ^2 ) ) *sqrt ( (Da^2 ) + (Db^2 ) + (Dc^2 ) ) ) ) )
64 rem pause "Quad= %d, X Rotation = %.2f " , Quad, Rangle
65 if ( (Quad== 1 ) | | (Quad==2 ) )
66 {
67 if (Rangle<=135)
68 Rangle=Rangle-90
69 else
70 Rangle=Rangle+180
71 }
72 if ((Quad==4) || (Quad==31)
73 { QUADANGR.CDP Monday, March 28, 1994 9:21 am Page 2
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 (Rangle<-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[11])
106 Da=Origin[0] -Dx
107 Db=Origin[1]-Dy
108 Dc=Origin[2] -Dz
109 Rangle=(acos(((YZwgp[9]-Da) + (YZwgp [10] -Db) + (YZwgp [11] -De)) / \
110 (sqrt ((YZwgp [9] ^2)+ (YZwgp [10] ^2)+ (YZwgp [11] ^2) ) -sqrt ( (Da^2) + (Db^2) + (Dc^2)))))
111 rem pause "Quad= %d, Y Rotation = %.2f", Quad, Rangle
112 if ((Quad==4) || (Quad==1))
113 {
114 if (Rangle<=135)
115 Rangle=-Rangle+450
116 else
117 Rangle=-Rangle+180
118 }
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
144 goto exit
145
146 :Zaxis QUADANGR.CDP Monday, March 28, 1994 9:21 am Page 3
147 RotIndex=2
148 Pnt2PlnD= ( ( (XYwgp [9] -Dx) + (XYwgp [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 [11] )
153 Da=Origin [0] -Dx
154 Db=Origin [1] -Dy
155 Dc=Origin[2] -Dz
156 Rangle= (acos (((XZwgp[9]-Da)+(XZwgp [10] -Db) + (XZwgp [11] -De) ) / \
157 (sqrt ( (XZwgp [9] ^2) + (XZwgp [10] ^2) + (XZwgp [11] ^2) ) *sqrt ( (Da^2) + (Db^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 (Rangle<=135)
183 Rangle=-Rangle+450
184 else
185 Rangle=-Rangle+180
186 }
187 if (Views==World)
188 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 Page1 1 rem RBldOptV.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 /* Build World and Optimized Views */
7 OldViews-Views
8 prompt "Computing World View ..."
9 Views-World
10 dosub bldview.cdp
11 prompt "Computing Optimized View ..."
12 Views-Optlmized
13 dosub bldview.cdp
14 Views-OldViews
15
16 if (Views==World)
17 {
18 /* Re-Calulate System Top/Front/Side Views */
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==Magnetic)
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 :exit
41 EXIT
RBLDVIEW.CDP Monday, March 28, 1994 9:21 am Page 1
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 :Top
7 for (Vn=0; Vn<10; Vn=Vn+1)
8 {
9 if (Vn== 0)
10 prompt "Refreshing World Views. . ."
11 if (Vn==3)
12 prompt "Refreshing Magnetic Views. . ."
13 if (Vn==6)
14 prompt "Refreshing Optimized Views. . ."
15 if (Vn==9)
16 prompt "Refreshing ISO View. . ."
17 ViewNum=VM [Vn] [9]
18 rem pause "Making CADL View Vd to System View %d! " , Vn,VM[Vn] [9]
19 View ViewNum,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]
20 CALL cdlv2sysv,VιewNum,VM[Vn] [9]
21 View VMtVn] [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 %d to System View %d Successfuly Built ! ",Vn,VM[Vn] [9]
23 sys_put_name 2, VM[Vn] [9] ,$$Vnote [Vn]
24 }
25
26 :exit
27 EXIT
RMAGWLD.CDP Monday, March 28, 1994 9:21 am Page 1
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/FastSURF
5
6 local i
7
8 /* Re-Calulate Magnetic and Optimized Grid Planes */
9 dosub gprset .cdp
10 /* Re-Calulate Magnetic Views If Any Magnetic Rotation Angles Are Set */
11 if (XYZmagO [0] +XYZmag [0] +XYZmagO [1] +XYZmag [1] +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
22 :exit
23 EXIT
RMAGWLD2.CDP Monday, March 28, 1994 9:21 am Page 1
1 rem RMAGWLD2.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 i
7
8 /* Re-Calulate Magnetic and Optimized Grid Planes */
9 dosub gprset cdp
10 /* Re-Calulate Magnetic Views If Any Magnetic Rotation Angles Are Set */
11 if (XYZmagO [0] +XYZmag [0] +XYZmagO [1] +XYZmag [1] +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 :exit
26 EXIT
ROTGET . CDP Monday, March 28 , 1994 9 : 21 am Page 1
1 rem ROTGET.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, Rotlndex, DirP, DirS, PplnAxis
7 DOUBLE Rangle, RotAngle
8
9 clear Fcntl, Fx,Fy,Fz, Fa, Fb, Fc
10
11 FinderX=FinderY=FmderZ=0
12 RotAxis=RotAxis+1
13 dosub rotsym cdp
14 if (Rotate==Rre1)
15 ii=12
16 else
17 ii=13
18 :top
19 MenuLev-MenuLev+1
20 sprint $MenuStr, "Select Displacement Selection Method (%d)", LastPick [ii]
21 getmenu $MenuStr,\
22 "Probe",\
23 "Mouse", \
24 "Key In" A
25 "AutoInc" , \
26 $$Viewstr [Views] , \
27 $$Raxis [RotAxis] , \
28 "Rset Mag" , \
29 "GP Stats" , \
30 "3DR Help", MenuLev, LastPick [n]
31 switch (@key)
32 {
33 case -3: -2
34 if (@key==3)
35 Done=True
36 goto exit
37 break
38 case 1
39 LastPick [ii] =1
40 if (Pplane -= NOplane)
41 {
42 pause "Primary Plane not set Use \"SetGrid\" to enable Function"
43 break
44 }
45 if ((Pdisp!=0) || (Sdisp'-O))
46 {
47 OldPdisp-Pdisp
48 OldSdisp-Sdisp
49 Pdisp=Sdisp=0
50 dosub rmagwld cdp
51 RotAxis-RotAxis+1
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 finderl.inc
59 Bhit = Fcnt1 & 3
60 getkey
61 if (@key == 27)
62 break
63 } WHILE (Bhit != B1)
64 if (Beep == On)
65 print "\007"
66 RotIndex-RotAxis
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 28, 1994 9 21 am Page 2
74 else
75 dosub quad&ang . cdp
76 }
77 if (RotAxis == 1)
78 {
79 Dx=Fx
80 Dy=Fy
81 Dz=Fz
82 if (Rotate==Rrel)
83 dosub quadangr.cdp
84 else
85 dosub quadiang . cdp
86 }
87 if (RotAxis == 2)
88 {
89 Dx=Fx
90 Dy-Fy
91 Dz=Fz
92 if (Rotate==Rrel)
93 dosub quadangr.cdp
94 else
95 dosub quad&ang . cdp
96 }
97 if ((OldPdisp!=0) || (OldSdisp!=0))
98 {
99 Pdisp=OldPdisp
100 Sdisp=OldSdisp
101 OldPdsip=OldSdisp=0
102 }
103 dosub rmagwld . cdp
104 dosub RBldOptV.CDP
105 RotAxis=RotAxis+1
106 dosub rotsym. cdp
107 break
108 case 2
109 LastPick [ii] =2
110 If ((Pdisp!=0) || (Sdisp!=0))
in {
112 01dPdisp=Pdisp
113 01dSdisp=Sdisp
114 Pdisp=Sdisp=0
115 dosub rmagwld.cdp
116 RotAxis=RotAxis+1
117 dosub rotsym. cdp
118 }
119 getpos " Indicate Rotation Angle . .",2
120 if (@key<0)
121 {
122 RotAxis=RotAxis+1
123 dosub rotsym.cdp
124 break
125 }
126 If (@CURVP==2)
127 {
128 pause "Invalid Selection Window! Try Again..."
129 break
130 }
131 if (Beep == On)
132 print "\007"
133 RotIndex=RotAxis
134 if (RotAxis == 0)
135 {
136 if (@CURVP!=1)
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 ROTGET. CDP Monday, March :28, 1994 9.21 am Page 3
147 dosub quadiang.cdp
148 }
149 if (RotAxis == 1)
150 {
151 if (@CURVP! =3)
152 {
153 pause "Invalid Selection Window! Try Again..."
154 break
155 }
156 Dx=@XWORLD
157 Dy=@YWORLD
158 Dz=@ZWORLD
159 if (Rotate==Rrel)
160 dosub quadangr.cdp
161 else
162 dosub quad&ang.cdp
163 }
164 if (RotAxis == 2)
165 {
166 if (@CURVP! =4)
167 {
168 pause "Invalid Selection Window! Try Again..."
169 break
170 }
171 Dx=@XWORLD
172 Dy=@YWORLD
173 Dz=@ZWORLD
174 if (Rotate==Rrel)
175 dosub quadangr. cdp
176 else
177 dosub quad&ang . cdp
178 }
179 if ( (OldPdisp!=0) || (OldSdisp! =0) )
180 {
181 Pdisp=OldPdisp
182 Sdisp=OldSdisp
183 OldPdsip=OldSdisp=0
184 }
185 dosub rmagwld.cdp
186 dosub RBldOptV.CDP
187 RotAxis=RotAxis+1
188 dosub rotsym cdp
189 break
190 case 3
191 LastPick [n] =3
192 if (Views==World)
193 {
194 if (RotAxis==2)
195 getflt "Enter Absolute X Axis Rotation (V.4f); ".XYZrot [0] .XYZrot [0]
196 if (RotAxis==1)
197 getflt "Enter Absolute Y Axis Rotation (V.4f) : ".XYZrot [1] , XYZrot [1]
198 if (RotAxis==0)
199 getflt "Enter Absolute Z Axis Rotation (V.4f) : ".XYZrot [2] .XYZrot [2]
200 }
201 else
202 {
203 if (RotAxis==2)
204 getflt "Enter Magnetic X Axis Rotation (V.4f) :", XYZmag [0] .XYZmag [0]
205 if (RotAxis==1)
206 getflt "Enter Magnetic Y Axis Rotation (V.4f) :", XYZmag [1] .XYZmag [1]
207 if (RotAxis==0)
206 getflt "Enter Magnetic Z Axis Rotation (V.4f) :", XYZmag [2] .XYZmag [2]
209 }
210 dosub rmagwld.cdp
211 dosub RBldOptV.CDP
212 RotAxis=RotAxis+1
213 dosub rotsym. cdp
214 break
215 case 4
216 LastPick [ii] =4
217 if (Views==World)
218 {
219 if (RotAxis==2) ROTGET.CDP Monday, March 28, 1994 9:21 am Page 4
220 {
221 getflt "Enter World X Axis Auto Rotation (%.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) : ", AutoRotW[1] , AutoRotW[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 Axis Auto Increment (V.4f) : ", AutoRotM[0] , AutoRotM[0]
240 XYZmag [0] -XYZmag [0] +AutoRotM [0]
241 }
242 if (RotAxis==1)
243 {
244 getflt "Enter Mag Y Axis Auto Increment (V.4f) : " ,AutoRotM[1] , AutoRotM[1]
245 XYZmag [1] -XYZmag [1] +AutoRotM [1]
246 }
247 if (RotAxis==0)
248 {
249 getflt "Enter Mag Z Axis Auto Increment (% .4f ) : " , AutoRotM [2] , AutoRotM [2]
250 XYZmag [2] =XYZmag [2 ] +AutoRotM [2]
251 }
252 }
253 dosub rmagwld.cdp
254 dosub RBldOptV.CDP
255 RotAxis=RotAxis+1
256 dosub rotsym. cdp
257 break
258 case 5
259 LastPick [ii] =5
260 dosub vstdopt.cdp
261 RotAxis=RotAxis+1
262 dosub rotsym. cdp
263 break
264 case 6
265 LastPick [ii] =6
266 dosub rotsym. cdp
267 break
268 case 7
269 LastPick [ii] =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 [1]
276 XYZmagO [2] =XYZmagO [2]+XYZmag[2]
277 XYZmag [0] =XYZmag [1] =XYZmag [2] =0
27B Views=Magnetic
279 dosub bldview.cdp
280 dosub RBldOptV.CDP
281 RotAxis=RotAxis+1
282 dosub rotsym. cdp
283 break
284 case 8
285 LastPick [ii] =8
286 dosub gpstats.cdp
287 break
288 case 9
289 LastPick [ii] =9
290 Menu=11
291 dosub 3drhelp.cdp
292 RotAxis=RotAxis+1 ROTGET. CDP Monday, March 28, 1994 9:21 am Page 5
293 dosub rotsym. cdp
294 break
295 default
296 Menu=11
297 dosub 3drhelp.cdp
298 RotAxis=RotAxis+1
299 dosub rotsym. cdp
300 break
301 }
302 MenuLev-MenuLev-1
303 for (i=0; i<3; i=i+1)
304 {
305 if (XYZrot [i]>=360)
306 XYZrot [i] =XYZrot [i] -360
307 if (XYZrot [i] e=-360)
308 XYZrot [i] =XYZrot [i] +360
309 if (XYZmag [i] >=360)
310 XYZmag [i] =XYZmag[i] -360
311 if (XYZmag [i]<=-360)
312 XYZmag [i] -XYZmag [i] +360
313 }
314 goto top
315
316 :exit
317 MenuLev-MenuLev-1
318 ((INCLUDE finder2.inc
319 if (MagPntlD[0])
320 {
321 for (i=0; i<8; i=i+1)
322 DELENT MagPntID[i]
323 ARRAY MagPntID[8] = {0, 0,0,0,0,0,0,0}
324 }
325 auto -1
326 redraw -1
327 EXIT
ROTSYM CDP Monday, March 28, 1994 9 21 am Page 1
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 VOrigin[3]={0,0,0}
9 ARRAY VMX[9]={0, 0,0, 0,0, 0,0, 0,0}
10 if (MagPntID[0])
11 {
12 for (1=0, i<8, i=i+1)
13 DELENT MagPntID[i]
14 ARRAY MagPntID[8]={0, 0,0, 0,0, 0,0,0}
15 }
16
17 AViews=1
18 RotAxis=RotAxis-1
19 if (RotAxis<0)
20 RotAxis=2
21
22 if (Views==World)
23 Vn=0+RotAxis
24 if (Views== Magnetic)
25 Vn=3+RotAxis
26 if (Views==Optimized)
27 Vn-6+RotAxis
28
29 auto -1
30 redraw -1
31 mode draw
32 View AViews, VM[Vn] [0] ,VM[Vn] [1] ,VM[Vn] [2] ,VM[Vn] [3] , VMIVn] [4] , VM [Vn] [5] ,VM[Vn] [6] ,VM[Vn] [7] , VM[Vn] [8]
33 CALL cdlv2sysv, AViews, VM[Vn] [9]
34 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]
35 VMX[0]=VM[Vn] [0]
36 VMX[1]=VM[Vn] [1]
37 VMX[2]=VM[Vn] [2]
38 VMX[3]=VM[Vn] [3]
39 VMX[4]=VM[Vn] [4]
40 VMX[5]=VM[Vn] [5]
41 VMX[6]=VM[Vn] [6]
42 VMX[7]=VM[Vn] [7]
43 VMX[8]=VM[Vn] [8]
44 CALL xfmwv, VMX, Origin [0] ,Origin[1] ,Origin[2] ,VOrigin[0] ,VOrigin[1] ,VOrigin[2]
45 circle VOrigin[0] , VOrigin[1] , VOrigin[2] , GridSize, AViews, LRed
46 circle VOrigin[0] , VOrigin[1] , VOrigin[2] , (GridSize/3), AViews, LRed
47 vpoint VOrigin[0], VOrigin[1] , VOrigin[2] , AViews, LRed
48 mode normal
49
50 /* Grid Plane Compass */
51 rem X & Z Axis Compass
52 if ((RotAxis == 2) | | (RotAxis == 0))
53 {
54 vpoint VOrigin[0] +GridSize, VOrigin[1], VOrigin[2], AViews, Red, MagCompL
55 MagPntlD[0] =@lastid
56 vpoint VOrigin[0] + (GridSize* 7071) , VOrigin [11 + (GridSize* 7071) , VOrigin[2] , AViews, LRed, MagCompL
57 MagPntID[ 1] =@lastid
58 vpoint VOrigin[0] , VOrigind] +GridSize, VOrigin[2] , AViews, Blue, MagCompL
59 MagPntID [2] =@lastid
60 vpoint VOrigin[0] - (GridSize* 7071) , VOrigin [1] + (GridSize* 7071) , VOrigin[2] , AViews, LRed, MagCompL
61 MagPntID [3] =@lastid
62 vpoint VOrigin[0] -GridSize, VOrigind] , VOrigin[2] , AViews, Gray, MagCompL
63 MagPntID [4] =@lastid
64 vpoint VOrigin[0] - (GridSize* 7071), VOrigin [1] - (GridSize* 7071), VOrigin[2] , AViews, LRed, MagCompL
65 MagPntID [5] =@lastid
66 vpoint VOrigin[0], VOrigin[1] -GridSize, VOrigin[2], AViews, Green, MagCompL
67 MagPntID [6] =θlastid
68 vpoint VOrigin[0] + (GridSize* 7071), VOrigin[1] - (GridSize* 7071), VOrigin[2] , AViews, LRed MagCompL
69 MagPntID [7] =@lastid
70 }
71 rem Y Axis Compass
72 if (RotAxis == 1)
73 { ROTSYM.CDP Monday, March 28, 1994 9:21 am Page 2
74 vpoint VOrigin[0], VOrigin[1] +GridSize, VOrigin[2], AViews, Red, MagCompL
75 MagPntID [0] =@lastid
76 vpoint VOrigin[0] + (GridSize* 7071), VOrigin [1] + (GridSize* 7071), VOrigin[2], AViews, LRed, MagCompL
77 MagPntID [1] =@lastid
78 vpoint VOrigin [0] -GridSize, VOrigin[1], VOrigin [2], AViews, Blue, MagCompL
79 MagPntID [2] =@lastid
80 vpoint VOrigin[0] + (GridSize* 7071), VOrigin[1] - (GridSize* 7071), VOrigin [2], AViews, LRed, MagCompL
81 MagPntID [3] =@lastid
82 vpoint VOrigin [0], VOrigin [1] -GridSize, VOrigin [2], AViews, Gray, MagCompL
83 MagPntID [4] =@lastid
84 vpoint VOrigin [0] - (GridSize* 7071), VOrigin [1] + (GridSize* 7071), VOrigin [2], AViews, LRed, MagCompL
85 MagPntID [5] =@lastid
86 vpoint VOrigin [0] +GridSize, VOrigintl], VOrigin [2] , AViews, Green, MagCompL
87 MagPntID [6] =@lastid
88 vpoint VOrigin [0] - (GridSize* 7071), VOrigin [1] - (GridSize* 7071), VOrigin [2], AViews, LRed MagCompL
89 MagPntID [7] =@lastid
90 }
91
92 :exit
93 clear AViews, VOrigin, VMX
94 EXIT
SETFRAME.CDP Monday, March 28, 1994 9.21 am Page1
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 with- Faro Metrecom/CADKEY/FastSURF
5
6 clear Fcntl, Fx, Fy,Fz, Fa, Fb,Fc
7 FinderX=FinderY=FinderZ=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 finderld.inc
24 Bhit = Fcntl & 3
25 getkey
26 if (@key == 27)
27 goto exit
28 } WHILE (Bhit != B1)
29 Frame [0] [0]=Fx
30 Frame [0] [1]=0
31 Frame [0] [2]=Fy
32 ((INCLUDE finder0.inc
33 ((INCLUDE waitre11.mc
34 mode draw
35 point Frame[0] [0], Frame[0] [1],Frame[0) [2] , White
36 mode normal
37 if (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 finderld.inc
44 Bhit = Fcntl & 3
45 getkey
46 if (@key == 27)
47 goto exit
48 } WHILE (Bhit != Bl)
49 ((INCLUDE finderO.inc
50 Frame [2] [0] -Fx
51 Frame [2] [11=0
52 Frame [2] [2]=Fy
53 ((INCLUDE waitrell.mc
54 mode draw
55 point Frame [2] [0], Frame [2] [1], Frame [2] [2], White
56 mode normal
57 if (Beep == On)
58 print "\007"
59
60 Framed] [0]= Frame [2] [0]
61 Framed] [1] = :0
62 Framed] [2] = Frame 10] [2]
63
64 Frame [3] [0] = Frame [0] [0]
65 Frame [3] [1]=0
66 Frame [3] [2]=Frame[2] [2]
67
68 POLYLINE 4, Frame, 2, 2, 2,1, White, ,2
69 FrameEnt=@lastid
70
71 :exit
72 auto - 1
73 redraw - 1 SETFRAME.CDP Monday, March 28, 1994 9:21 am Page2
74 clear Frame, Fcntl, Fx,Fy,Fz
75 EXIT
SMTHG3P.CDP Monday, March 28, 1994 9:21 am Page 1
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 & BC
10 distAB-sqrt ( (G3Pos [1] [0] -G3Pos [0] [0]) ^2+\
11 (G3Pos[1] [1] -G3Pos[0] [1] )^2 + \
12 (G3Pos[1] [2]-G3Pos[0] [2] )^2)
13 distBC=sqrt ( (G3Pos [2] [0] -G3Pos [1] [0] ) ^2+\
14 (G3Pos[2) [1] -G3Pos[1] [1] )^2 + \
15 (G3Pos[2] [2] -G3POS [1] [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] ) /distAB)
20 rem Calculate the direction cosines of BC
21 d= ( (G3Pos [2] [0] -G3Pos [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 using d=BC*sqrt (1- (cos^2) )
25 dιstAC=distBC*sqrt(1-( (((a*d)+(b*e)+(c-f))^2) ))
26 rem Calculate length from Point 2 to the 90 degree intercept of AB
27 tdistAB=sqrt ( (distBC^2) - (distAC^2) )
28 rem Calculate the point location of the 90 degree intercept of AB
29 TempXYZ [0] =G3Pos [1] [0] + (((G3Pos [0] [0] -G3Pos [1] [0) ) /distAB) *tdistAB)
30 TempXYZ [1] =G3Pos [1] [1] + (((G3Pos [0] [1] -G3Pos [1] [1] ) /distAB) *tdistAB)
31 TempXYZ [2] =G3POS [1] [2] + (((G3POS [0] [2] -G3Pos [1] [2] ) /distAB) *tdistAB)
32 rem pause "AB %.2f BC %.2f AC %.2f tAB % .2f", distAB, 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] =G3Pos [0] [1] + ((G3Pos [2] [1] -TempXYZ [1] ) /distAC)
36 G3Pos [2] [2] =G3Pos [0] [2] + ((G3Pos [2] t2] -TempXYZ [2]) /distAC)
37 rem Unitize 2nd and 3rd Points
38 rem First calculate 2nd Point as a directed length vector of 1 off 1st Point
39 G3Pos [1] [0] =G3Pos [0] [0] + ((G3Pos [1] [0] -G3Pos [0] [0] ) /distAB)
40 G3Pos [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 /* Find the direction ratios of line AB */
45 a=G3Pos[1] [0]-G3Pos[0] t0]
46 b=G3Pos[1] [1] -G3Pos [0] [1]
47 c=G3Pos [1] [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 & AC */
53 CALL CROSS, ABCD[0] ,ABCD[1] ,ABCD[2] ,a,b,c,d,e,f
54 CALL DOTPROD, G3Pos [2] [0] ,G3Pos[2] [1] ,G3Pos[2] [2] , ABCD[0] ,ABCD[1] ,ABCD[2] ,ABCD[3]
55 ABCD[3]=0-ABCD[3]
56
57 :exit
58 EXIT TLEVOFF. CDP Monday, March 28, 1994 9:21 am Page 1
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/FastSURF
5
6 Local Slevel, Ilevel
7
8 :top
9 DispMask [0] =@levels [0]
10 DispMask [1] =@levels [1]
11 DispMask [2] =@levels [2]
12 DispMask 13] =@levels [3]
13 DispMask [4] =@levels [4]
14 DispMask [5] =@levels [5]
15 DispMask [6] =@levels [6]
16 DispMask [7] =@levels [7]
17 DispMask [8] =@levels [8]
18 DispMask [9] =@levels [9]
19 DispMask [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 Off
29 DispMask [Slevel] - (DispMask [Slevel] # Bin[Ilevel])
30 SET levelmask, DispMask
31 redraw -1
32 :exit
33 Clear Slevel, Ilevel
34 EXIT
TLEVON. CDP Monday, March 28, 1994 9:21 am Page 1
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 [2] =@levels [2]
12 DispMask [3] =@levels [3]
13 DispMask [4] =@levels [4]
14 DispMask [5] =@levels [5]
15 DispMask [6] =@levels [6]
16 DispMask [7] =@levels [7]
17 DispMask [8] =@levels [8]
18 DispMask [9] =@levels [9]
19 DispMask [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 DispMask [Slevel] = (DispMask [Slevel] Bin [Ilevel] )
30 SET levelmask, DispMask
31 redraw -1
32 :exit
33 Clear Slevel, Ilevel
34 EXIT
TOOLS. CDP Monday, March 28, 1994 9:21 am Page1
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 ii=3
10 MenuLev=MenuLev+1
11 sprint $MenuStr, "Select Tool (%d) ",LastPick [ii]
12 getmenu $MenuStr, \
13 "Arc" A
14 "Circle" A
15 "Polygon" A
16 "View" A
17 "Auto Seg",\
18 SSViewstr [Views] A
19 SSModeX [ToolMode] A
20 "Control " A
21 "3DR Help", MenuLev, LastPick [ii]
22 switch (@key)
23 {
24 case -3
25 goto exit
26 case -2
27 goto exit
28 case 1
29 LastPick [ii]=1
30 Arc=True
31 dosub circle. cdp
32 Arc=False
33 break
34 case 2
35 LastPick [ii] =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 LastPick [4] =1
46 Views=World
47 dosub vstdopt2.cdp
48 dosub view. cdp
49 break
50 case 5
51 LastPick [ii] =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 [ii] =8
67 dosub control. cdp
68 break
69 case 9
70 LastPick [ii] =9
71 Menu=4
72 dosub 3drhelp.cdp
73 break TOOLS . CDP Monday, March 28, 1994 9:21 am Page 2
74 default
75 Menu=4
76 dosub 3drhelp.cdp
77 break
78 }
79 MenuLev=MenuLev-1
80 goto top
81 :exit
82 MenuLev=MenuLev-1
83 EXIT
TRACK. CDP Monday, March 28, 1994 9 21 am Page 1
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 FinderX=FinderY=FinderZ=0
8
9 :start
10 Bhit=Delete=0
11 :top
12 DO
13 {
14 readdev Fcntl, Fx,Fy,Fz, Fa, Fb, Fc
15 if (FndrPntr)
16 {
17 mode draw
18 Pnt2PntD=sqrt ((FinderX-Origin [0] )^2+\
19 (FinderY-Origin [1] ) ^2+\
20 (FinderZ-Origin[2] )^2)
21 if (Pnt2PntD)
22 {
23 x1=FinderX+ (((FinderX-Origin[0] ) /Pnt2PntD) * (GridSize/3))
24 y1=FinderY+(((FinderY-Origind[1] ) /Pnt2PntD) * (GridSize/3))
25 z1=FinderZ+(((FinderZ-Orιgin[2) )/Pnt2PntD)* (GridSize/3))
26 line x1,y1,z1,FinderX,FinderY,FinderZ, Black, ,1, , , ,@1width+4
27 }
28 mode normal
29 }
30 ((INCLUDE fmderl.inc
31 if (FndrPntr)
32 {
33 Pnt2PntD=sqrt ( (FinderX-Origin[0] )^2+\
34 (FinderY-Origin [1] ) ^2+\
35 (FinderZ-Orιgιn[2] ) ^2)
36 if (Pnt2PntD)
37 {
38 mode draw
39 x1=FinderX+ (((FinderX-Origin[0])/Pnt2PntD) * (GridSize/3))
40 y1=FinderY+(((FinderY-Origin[1])/Pnt2PntD)* (GridSize/3) )
41 z1-FinderZ+(((FinderZ-Origin[2])/Pnt2PntD)* (GridSize/3))
42 line x1,y1, z1, FinderX, FinderY, FinderZ, LGreen, , 1
43 mode normal
44 }
45 }
46 ((INCLUDE track2 inc
47 Bhit = Fcntl & 3
48 getkey
49 if (@key == 27)
50 goto exit
51 if (@key == Del)
52 exitloop
53 } WHILE (Bhit == None)
54 if ((@key = Del) && (Delete == On))
55 goto deleteit
56 on Bhit goto top, exit, B101, top
57
58 :B101
59 ((INCLUDE finder0.inc
60 if (FndrPntr)
61 {
62 mode draw
63 Pnt2PntD=sqrt ( (FinderX-Origin [0] ) ^2+\
64 (FinderY-Origin [1] ) ^2 + \
65 (FinderZ-Orιgιn[2] )^2)
66 if (Pnt2PntD)
67 {
68 x1=FinderX+ (((FinderX-Origin[0] ) /Pnt2PntD) * (GridSize/3))
69 y1=FinderY+ (((FinderY-Origin [1] ) /Pnt2PntD) * (GridSize/3))
70 z1=FinderZ+(((FinderZ-Origin[2] )/Pnt2PntD)* (GridSize/3))
71 line x1, y1,z1,FinderX, FinderY, FinderZ, Black, ,1, , , ,@lwidth+4
72 }
73 mode normal TRACK. CDP Monday, March 28, 1994 9:21 am Page
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 : deleteit
84 Delete=Off
85 DELENT LstPoint
86 goto start
87
88 :exit
89 clear Fcntl, Fx,Fy,Fz, Fa, Fb,Fc
90 ((INCLUDE finder2. inc
91 if (FndrPntr)
92 {
93 mode draw
94 Pnt2PntD=sqrt ( (FinderX-Origin [0] ) ^2+\
95 (FinderY-Origin [1] ) ^2+\
96 (FinderZ-Origin [2] ) ^2 )
97 if (Pnt2PntD)
98 {
99 x1=FinderX+(((FinderX-Origin [0]) /Pnt2PntD) * (GridSize/3))
100 y1=FinderY+(((FinderY-Origin[1]) /Pnt2PntD) * (GridSize/3))
101 z1=FinderZ+(((FinderZ-Origin[2] ) /Pnt2PntD) * (GridSize/3))
102 line x1,y1, z1,FinderX, FinderY, FinderZ, Black, , 1, ,, ,@lwidth+4
103 }
104 mode normal
105 }
106 auto -1
107 redraw -1
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, OldMagX, OldMagY, OldMagZ
7
8 Pnt2PntD=sqrt I (FinderX-Origin [0] ) ^2+\
9 (FinderY-Origin [1] ) ^2+\
10 (FinderZ-Origin[2] )^2)
11 if (Pnt2PntD<0.000001)
12 goto exit
13
14 if (Views! =World)
15 {
16 XYZrot [0] =XYZrot [0] *-1
17 XYZrot [1] =XYZrot [11 *-1
18 XYZrot [2] =XYZrot [2] *-1
19 XYZmagO[0] =XYZmagO [0] *-1
20 XYZmagO[1] =XYZmagO [1] *-1
21 XYZmagO[2] =XYZmagO [2] * -1
22 if (Views==Magnetic)
23 {
24 OldMagX=XYZmag [0]
25 OldMagY=XYZmag [1]
26 OldMagZ=XYZmag [2)
27 XYZmag [0] =XYZmag [1] =XYZmag [2] =0
28 }
29 else
30 {
31 XYZmag [0] =XYZmag [0] * - 1
32 XYZmag [1] =XYZmag [1] * - 1
33 XYZmag [2 ] =XYZmag [2] *- l
34 }
35 XYZ [0] =FinderX-Origin [0]
36 XYZ [1] =FinderY-Origin [1]
37 XYZ [2] =FinderZ-Origin [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 x1-XYZ [0]
46 y1=XYZ [1]
47 z1=XYZ [2]
46 XYZrot [0 ] =XYZrot [0] * - 1
49 XYZrot [1 ] =XYZrot [1] * - 1
50 XYZrot [2] =XYZrot [2] * - 1
51 XYZmagO [ 0 ] =XYZmagO [ 0 ] * - 1
52 XYZmagO [ 1 ] =XYZmagO [ 1 ] * - 1
S3 XYZmagO [ 21 =XYZmagO [ 2 ] * - 1
54 if (Views== Magnetic)
55 {
56 XYZmag [0] =OldMagX
57 XYZmag [1] =OldMagY
58 XYZmag [2] =01dMagZ
59 }
60 else
61 {
62 XYZmag [0] -XYZmag [0] *- 1
63 XYZmag [1] -XYZmag [1] *-1
64 XYZmag [2] -XYZmag [2] *-l
65 }
66 }
67
68 if (Views—World)
69 {
70 x1=FinderX-Origin [0]
71 y1=FinderY-Origin [1]
72 z1=FinderZ-Origin [2]
73 } TRACK2. CDP Monday, March 28, 1994 9:21 am Page 2
74
75 if (abs(x1) <0 .000001)
76 goto exit
77 x2-atan(y1/x1)
78 if ((x1<0) && (y1>0))
79 x2=180+x2
80 if ((xl<0) && (y1<0))
81 x2=180+x2
82 if ((x1>0) && (y1<0))
83 x2=360+x2
84
85 if (abs(y1)<0.000001)
86 goto exit
87 y2=atan(zl/xl)
88 if ( (x1<0) &.&. (z1>0) )
89 y2=180+y2
90 if <(x1<0) &.&. (z1<0))
91 y2=180+y2
92 if ( (x1>0 ) && ( z1<0 ) )
93 y2=360+y2
94
95 if (abs(zl)<0.000001)
96 goto exit
97 z2=atan(z1/y1)
98 if ((y1<0) &&. (z1>0))
99 z2=180+z2
100 if ((y1<0) && (z1<0))
101 Z2=180+z2
102 if ((y1>0) && (z1<0))
103 z2=360+z2
104 prompt "X=%8.4f Y=%8. 4f Z=%8.4f: XY=%6.2f XZ=%6.2f YZ=%6.2f" , x1, y1, z1, x2, y2, z2
105
106 :exit
107 EXIT
VIEW.CDP Monday, March 28, 1994 9:21 am Page 1
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 FinderX=FinderY=FinderZ=0
10
11 :start
12 ii=17
13 G3Pcount=0
14 MenuLev=MenuLev+1
15 sprint $MenuStr, "Select View Option (Vd)", LastPick [ii]
16 getmenu $MenuStrA
17 "Rset ISO" A
18 "SetWind2" A
19 " - ",\
20 " - ",\
21 " - ",\
22 " - ",\
23 " - ",\
24 " - ",\
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 VM [9] [0] = 0. 70710 6781187
34 VM [9) [1] = -0.40824 829046
35 VM [9] [2] = 0.57735 0269190
36 VM [9] [3] = 0.70710 6781187
37 VM [9] [4 ] = 0.40824 829046
38 VM [9] [5] = - 0.57735 0269190
39 VM [9] [6] = 0.00000 0000000
40 VM [9] [7] = 0.81649 658093
41 VM [9] [8] = 0.57735 0269190
42 VM [9] [9] = 7
43 VM [9] [10] = 2
44 Set VIEW, VM [9] [9] , 0
45 auto -1
46 redraw -1
47 MenuLev-MenuLev- 1
48 goto start
49 case 2
50 LastPick [ii] =2
51 :SetWind
52 iii=16
53 G3Pmode=0
54 MenuLev=MenuLev+1
55 sprint $MenuStr, "Select 3 Position Selection Method (Vd)",LastPick [iii]
56 getmenu $MenuStr, \
57 "Probe" ,\
58 "Mouse" , \
59 " - ",\
60 " - ",\
61 " - ",\
62 " - ",\
63 " - ",\
64 " - ",\
65 "3DR Help' .MenuLev, LastPick [iii]
66 switch (@key)
67 {
68 case -3: -2
69 MenuLev=MenuLev- 1
70 if (@key==-3 )
71 goto exit
72 MenuLev=MenuLev-1
73 goto start VIEW.CDP Monday, March 28, 1994 9:21 am Page 2
74 case 1
75 LastPick [iii] =1
76 G3Pmode=1
77 dosub get3pos.cdp
78 if (G3Pcount!=3)
79 {
80 if (Nodes == -1)
81 pause "Points are Collinear!"
82 else
83 pause "3 Unique Locations Required You entered Vd",G3Pcount
84 MenuLev-MenuLev-1
85 auto -1
86 redraw -1
87 goto SetWind
88 }
89 break
90 case 2
91 LastPick [iii] =2
92 G3Pmode=2
93 dosub get3pos.cdp
94 if (G3Pcount!=3)
95 {
96 if (Nodes == -1)
97 pause "Points are Collinear'"
98 else
99 pause "3 Unique Locations Required You entered Vd",G3Pcount
100 MenuLev-MenuLev-1
101 auto -1
102 redraw -1
103 goto SetWind
104 }
105 break
106 case 3 8
107 LastPick [iii] =9
108 Menu-15
109 dosub 3drhelp.cdp
110 break
111 case 9
112 LastPick [m] =9
113 Menu=15
114 dosub 3drhelp cdp
115 break
116 default
117 LastPick [iii] =9
118 Menu=15
119 dosub 3drhelp.cdp
120 break
121 }
122 MenuLev-MenuLev-1
123 break
124 case 3 8
125 LastPick [ii] -9
126 Menu-16
127 dosub 3drhelp cdp
128 break
129 case 9
130 LastPick [ii] =9
131 Menu=16
132 dosub 3drhelp cdp
133 break
134 default
135 LastPick [ii] =9
136 Menu=16
137 dosub 3drhelp cdp
138 break
139 }
140 MenuLev=MenuLev-1
141 if (G3Pcount !=3)
142 goto start
143 if (LastPick [ii]==9)
144 goto start
145
146 Vxl=G3Pos [0] [0] VIEW.CDP Monday, March 28, 1994 9:21 am Page 3
147 Vy1=G3Pos[0] [1]
148 Vz1=G3Pos[0] [2]
149 Vx2=G3Pos[1] [0]
150 Vy2=G3Pos [1] [1]
151 Vz2=G3Pos[1] [2]
152 Vx3=G3Pos[2] [0]
153 Vy3=G3Pos[2] [1]
154 Vz3=G3Pos[2] [2]
155 goto MakeView
156
157 : MakeView
158 dosub 3DR2CK.CDP
159 if (ViewErr)
160 goto start
161 VM[9] [0]=Vmatrix[0]
162 VM[9] [l)=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 sys_put_name 2, VM[9] [9], $$Vnote [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
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 Views=Views+1
8 if (Views>2)
9 Views=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] I9],VM[1) [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 -1
30 }
31 if (Views==Optimized)
32 {
33 prompt "Fetching Optimized Views. . . "
34 Set VIEW,VM[6] [9] ,VM[6] [101
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
VSTDOPT2. CDP Monday, March 28, 1994 9:21 am Page 1
1 rem VSTDOPT2.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 if (Views==World)
8
9 /* Re-Calulate System Top/Front/Side Views
10 prompt "Fetching World Views. . ."
11 Set VIEW,VM[0] [9] ,VM[0] [10]
12 Set VIEW.VMI1] [9],VM[1] [10]
13 Set VIEW,VM[2] [91,VM[2] [10]
14 Set VIEW, 7, 2
15 auto -1
16 redraw - 1
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 -1
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[8] [10]
34 Set VIEW,VM[9] [9] ,VM[9] [10]
35 auto -1
36 redraw - 1
37 }
38
39 :exit
40 EXIT
XYPLNROT. CDP Monday, March 28, 1994 9:21 am Page 1
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 x1,y1,z1,x2,y2,z2
8
9 /* Set Grid Plane Origin */
10 Origin [0]=G3Pos[0] [0]
11 Origin [1]=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 AutoRotM [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] [1]=G3Pos[0] [1] -Origin [1]
25 G3Pos[0] [2]=G3Pos[0] [2] -Origin [2]
26 G3Pos[1] [0]=G3Pos[1] [0] -Origin [0]
27 G3Pos[1] [1]=G3Pos[1] [1] -Origin [1]
28 G3Pos[1] [2]=G3Pos[1] [2] -Origin [2]
29 G3Pos[2] [0]-G3Pos[2] [0] -Origin[0]
30 G3Pos[2) [1]-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 x1=G3Pos[1] [0]
36 y1=G3Pos[1] [1]
37 z1=G3Pos[1] [2]
38 if (abs(x1)<0.000001)
39 x1=0.000001
40 z2=atan (y1/x1)
41 if ((x1>0) && (y1>0))
42 XYZrot [2] =z2
43 if ((x1<0) && (y1>0))
44 XYZrot [2] =180+z2
45 if ((x1<0) &.&. (y1<0))
46 XYZrot [2] =180+z2
47 if ((x1>0) && (y1<0))
48 XYZrot [2] =360 + z2
49 rem pause "ATAN (y1/x1) %f Z Rotation %.2f", z2, XYZrot [2]
50 XYZrot [2] =XYZrot [2] *-1
51 XYZ[0]=G3Pos[1] [0]
52 XYZ[1]=G3Pos[1] [1]
53 XYZ[2)=G3Pos[1] [2]
54 dosub xyzrot . cdp
55 G3Pos[1] [0]=XYZ[0]
56 G3Pos[1] [1]=XYZ[1]
57 G3Pos[1] [2] =XYZ [2]
58 XYZ[0]=G3Pos[2] [0]
59 XYZ[1]=G3Pos[2] [1]
60 XYZ[2]=G3Pos[2] [2]
61 dosub xyzrot . cdp
62 G3Pos[2] [0]=XYZ[0]
63 G3POS[2] [1]=XYZ[1]
64 G3Pos[2] [2] -XYZ [2]
65 XYZrot [2] -XYZrot [2] *-1
66
67 /* Rotate Grid Plane Along X Axis
68 prompt "Computing X Axis Rotation
69 x1=G3Pos[2] [0]
70 y1-G3Pos[2] [1]
71 z1=G3Pos[2] [2]
72 if (abs (y1) <0.000001)
73 y1=0.000001 XYPLNROT. CDP Monday, March 28, 1994 9:21 am Page 2
74 x2=atan (z1/y1)
75 if ((y1>0) && (z1>0))
76 XYZrot [0]=x2
77 if ((y1<0) &&. (z1>0))
78 XYZrot [0]=180+x2
79 if ((y1<0) && (z1<0))
80 XYZrot [0]=180+x2
81 if ((y1>0) && (z1<0))
82 XYZrot [0]=360+x2
83 rem pause "ATAN (z1/y1) Vf X Rotation %.2f",x2, XYZrot [0]
84
85 /* Rotate Grid Plane Along Y Axis */
86 prompt "Computing Y Axis Rotation ..."
87 x1=G3Pos [1] [0]
86 y1=G3Pos [1] [1]
89 z1=G3Pos [1] [2]
90 if (abs (x1) <0. 000001)
91 x1=0.000001
92 y2=atan (z1/x1)
93 if ((x1>0) && (z1>0))
94 XYZrot [1]=y2
95 if ((x1<0) &.&. (z1>0))
96 XYZrot [1]=180+y2
97 if ((x1<0) 44 (z1<0))
98 XYZrot [1]=180+y2
99 if ((x1>0) & & (z1<0))
100 XYZrot [1] =360+y2
101 rem pause "ATAN (z1/x1) Vf Z Rotation %.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]
108 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 dosub RBldOptV.CDP
114 auto -1
115 redraw - 1
116 goto exit
117
118 :exit
119 EXIT
XYZROT. CDP Monday, March 28, 1994 9:21 am Page 1 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 [1]=XYZ[1]
8 XYZtemp[2]=XYZ[2]
9
10 /* Rotate X Axis */
11 IF (XYZrot [0] !=0)
12 {
13 XYZ [1] = (XYZtemp [1]*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 {
P2 XYZ [0) = (XYZtemp [0]*cos (XYZrot [1] ))- (XYZtemp [2] *sin (XYZrot [1]))
23 XYZ [2] = (XYZtemp [0] *sm (XYZrot [1] ) ) + (XYZtemp [2] *cos (XYZrot [1]))
24 XYZtemp [0]=XYZ 10]
25 XYZtemp[2]=XYZ[2]
26 }
27
28 /* Rotate Z Axis */
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 (XYZrot [2] ) ) + (XYZtemp [1] *cos (XYZrot [2]))
33 XYZtemp [0] =XYZ [0]
34 XYZtemp [11 =XYZ [1]
35 }
36
37 :exit
38 EXIT
DELNODE . INC Monday, March 28 , 1994 9 : 37 am Page 1
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 (i=1; i<Nodes; i=i+1)
13 {
14 POINT PntNodes! (i)] [0] , PntNodes [ (i)] [1], PntNodes [(i)][2] , White, ,2
15 LINE PntNodes [(i-1)] [0] , PntNodes [ (i-1) ] [1] , PntNodes [ (i-1)][2],\
16 PntNodes! (i) 1[0], PntNodes [ (i)][1] , PntNodes [(i)][2],White,,2
17 }
18 Mode normal
19 }
FINDER0 . INC Monday, March 28 , 1994 9 : 37 am Page 1
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=FinderY=FinderZ=0
11 point FinderX, FinderY, FinderZ, Black
12 mode normal
13 }
FINDER1. INC Monday, March 28, 1994 9:37 am Page 1
1 rem FINDER1. 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 FinderY=Fy
12 FinderZ=Fz
13 point FinderX, FinderY, FinderZ, White
14 mode normal
15 }
FINDER1D. INC Monday, March 28, 1994 9:37 am Page 1
1 rem FINDER1D.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 FinderY=0
12 FinderZ-Fy
13 point FinderX, FinderY, FinderZ, White
14 mode normal
15 }
FINDER2. INC Monday, March 28, 1994 9:37 am Page 1
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
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)
7 {
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 28, 1994 9.37 am Page 1
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>1)
14 LINE PntNodes [(Nodes-2 [0] , PntNodes [ (Nodes-2 ) ] [1] , PntNodes [ (Nodes-2 ) ] [2] ,\
15 Fx, 0,Fy, White, ,2
16 Mode normal
PNTTRACE.INC Monday, March 28, 1994 9:37 am Page1
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>1)
14 LINE PntNodes [ (Nodes-2) ] [0] , PntNodes [ (Nodes-2) ] [1] , PntNodes [ (Nodes-2) ] [2] ,\
15 Fx,Fy,Fz, White, ,2
16 Mode normal
POINTER. INC Monday, March 28, 1994 9:37 am Page 1
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-Origin[0])^2+\
7 (FinderY-Origin [1])^2+\
8 (FinderZ-Origin[2))^2)
9 if (Pnt2PntD)
10 {
11 x1=FinderX+(((FinderX-Origin [0])/Pnt2PntD) * (GridSize/3))
12 y1=FinderY+(((FinderY-Origin [1]) /Pnt2PntD) * (GridSize/3))
13 z1=FinderZ+(((FinderZ-Origin[2]) /Pnt2PntD) * (GridSize/3))
14 line x1,y1,z1, FinderX, FinderY, FinderZ, Black, ,1, , , ,@1width+4
15 }
TRACK2. INC Monday, March 28, 1994 9:37 am Page 1
1 rem TRACK2.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-Origin [0] ) ^2+\
7 (FinderY-Origin [1] ) ^2+\
8 (FinderZ-Origin[2] ) ^2)
9 if (Pnt2PntD<0.000001)
10 goto t2exit
11
12 if (Views ! =World)
13 {
14 XYZrot [0] =XYZrot [0] *-1
15 XYZrot [1] =XYZrot [1] *-1
16 XYZrot [2] =XYZrot [2] *-1
17 XYZmagO [0] =XYZmagO [ 0 ] * - 1
18 XYZmagO [1] =XYZmagO [1] * -1
19 XYZmagO [2] =XYZmagO [2] * -1
20 if (Views= = Magnetic )
21 {
22 OldMagX=XYZmag [0]
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] *-1
30 XYZmag [1] =XYZmag [1] * -1
31 XYZmag [2 ] =XYZmag [2 ] * -1
32 }
33 XYZ [0] =FinderX-Origin [0]
34 XYZ [1] =FinderY-Origin [1]
35 XYZ [2] =FinderZ-Origin [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 x1=XYZ [0]
44 y1=XYZ [1]
45 z1=XYZ [2]
46 XYZrot [0] =XYZrot [0] * -1
47 XYZrot [ 1] =XYZrot [1] * -1
48 XYZrot [2] =XYZrot [2] * -1
49 XYZmagO [ 0] =XYZmagO [0] * -1
50 XYZmagO [1] =XYZmagO [1] * -1
51 XYZmagO [2] =XYZmagO [2] * -l
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] *-1
63 }
64 }
65
66 if (Views == World)
67 {
68 x1=FinderX-Origin [0]
69 y1=FinderY-Origin [1]
70 z1=FinderZ-Origin [2]
71 }
72
73 if (abs (x1)<0.000001) TRACK2. INC Monday, March 28, 1994 9:37 am Page 2
74 {
75 if (y1>0)
76 x2=90
77 else
78 X2=270
79 }
80 else
81 x2=atan (y1/x1)
82 if ((x1<0) && (y1>0))
83 x2=180+X2
84 if ((x1<0) && (y1<0))
85 x2=180+X2
86 if ((x1>0) && (y1<0))
87 x2=360+x2
88
89 if (abs (x1)<0.000001)
90 {
91 if (z1>0)
92 y2=90
93 else
94 y2=270
95 }
96 else
97 y2=atan (z1/x1)
98 if ((x1<0) && (z1>0))
99 y2=180+y2
100 if ((x1<0) && (z1<0))
101 y2=180+y2
102 if ((x1>0) && (z1<0))
103 y2=360+y2
104
105 if (abs (y1)<0.000001)
106 {
107 if (z1>0)
108 z2=90
109 else
110 z2=270
111 }
112 else
113 z2=atan (z1/y1)
114 if ((y1<0) && (z1>0 ) )
115 z2=180 + z2
116 if ((y1<0) && (z1<0))
117 z2=180+z2
118 if ((y1>0) && (z1<0))
119 z2=360+Z2
120 prompt "X=%8.4f Y=%8.4f Z=%8.4f: XY=%6.2f XZ=%6.2f YZ=%6.2f", x1,y1, z1,x2,y2, z2
121 :t2exit
WAITNOT1. INC Monday, March 28, 1994 9:37 am Page 1
1 rem WAITNOT1.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 Fcnt1, Fx,Fy,Fz, Fa, Fb,Fc
9 #INCLUDE finderl.inc
10 Bhit = Fcntl & 3
11 getkey
12 if (@key == 27)
13 goto exit
14 } WHILE (Bhit != B1)
WAITREL1.INC Monday, March 28, 1994 9:37 am Page 1
1 rem WAITREL1. 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 & 3
10 getkey
11 if (@key == 27)
12 goto exit
13 } WHILE (Bhit == B1)
WAITREL2. INC Monday, March 28, 1994 9:37 am Page 1
1 rem WAITREL2.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 & 3
10 } WHILE (Bhit == B2)
STUDIO2.ENV Monday, March 28, 1994 10:14 am Page 1
1 GridPlns : 1
2 ModeNum: 4
3 Beep: 1
4 Align: 1
5 Views : 0
6 Points : 0
7 PointsHS : 0
8 PntsLev: 50
9 Finder: 1
10 FndrPntr: 1
11 ECscale : +0 .500000
12 Delay: +0 .000000
13 MaxNodes : 100
14 Pplane : 1
15 Pdisp : +0 .000000
16 Splane: 2
17 Sdisp: +0. 000000
18 GridTol : +0. 030000
19 GridSize: +2.000000
20 Tsphere: +0. 015000
21 Origin: + 11 . 154758818301 -1.266985932377 +1.025885205691
22 AutoIncD: +0. 000000000000 +0.000000000000 +0.000000000000
23 AutoRotW : +0. 000000000000 +0.000000000000 +0.000000000000
24 AutoRotM: +0. 000000000000 +0.000000000000 +0.000000000000
25 XYZrot : +0. 340322953770 +0.012776038881 +315.976478633992
26 XYZmag: +0. 000000000000 +0.000000000000 +0.000000000000
27 XYZmagO: +0. 000000000000 +0.000000000000 +0.000000000000
28 MagOrgn: +0. 340322953770 +0.012776038881 +315.976478633992
29 XYwgp: +11. 154758818301 -1.266985932377 +1.025885205691
30 +11. 873813365333 -1.961939534189 +1.026108189633
31 +11. 849699225839 -0.547943131367 +1.031824926680
32 -0. 004288165494 -0.004116022834 +0.999982334840 -0.983248574440
33 XZwgp: +11. 154758818301 -1.266985932377 +1.025885205691
34 +11. 873813365333 -1.961939534189 +1.026108189633
35 +11. 150470652807 -1.271101955211 +2.025867540531
36 -0. 694940407538 -0.719042801010 -0.005939720989 +6.846968997414
37 YZwgp: +11. 154758818301 -1.266985932377 +1.025885205691
38 +11. 849699225839 -0.547943131367 +1.031824926680
39 +11. 150470652807 -1.271101955211 +2.025867540531
40 +0. 719054547032 -0.694953601812 +0.000222983942 -8.901605242419
41 XYpnt1 : +8. 326768909161 -1.315164330774 +1.013559795828
42 +11. 202987097288 -4.094978738021 +1.014451731596
43 +13. 982748727441 -1.218807533980 +1.038210615554
44 +11. 106530539314 +1.561006873267 +1.037318679786
45 XYpnt2 : +10. 212095515254 -1.283045398509 +1.021776735737
46 +11. 170834911297 -2.209650200925 +1.022074047659
47 +12. 097422121348 -1.250926466245 +1.029993675645
48 +11. 138682725305 -0.324321663829 +1.029696363723
49 XZpnt1: +9. 725226055225 +0.131153316914 -0.974525431874
50 +12. 601444243352 -2.648661090333 -0.973633496106
51 +12. 584291581377 -2.665125181668 +3.026295843256
52 +9. 708073393250 +0.114689225579 +3.025403907488
53 XZpnt2 : +10. 678247897276 -0.800939515947 +0.359081659836
54 +11. 636987293318 -1.727544318362 +0.359378971759
55 +11. 631269739326 -1.733032348807 +1.692688751546
56 +10. 672530343284 -0.806427546392 +1.692391439623
57 YZpnt1: +9. 773454334211 -2.696839488730 -0.985958905968
58 +12. 553215964365 +0.179331715312 -0.962200022011
59 +12. 536063302391 +0.162867623976 +3.037729317350
60 +9. 756301672237 -2.713303580066 +3.013970433393
61 YZpnt2 : +10. 694323990271 -1.743603784495 +0.355270501805
62 +11. 620911200322 -0.784880049814 +0.363190129790
63 +11. 615193646331 -0.790368080259 +1.696499909577
64 +10. 688606436280 -1.749091814940 +1.688580281592
65 Wld_V1 : +1. 000000000000 +0.000000000000 +0.000000000000
66 +0. 000000000000 +1.000000000000 +0.000000000000
67 +0. 000000000000 +0.000000000000 +1.000000000000 1 1
68 Wld_V2 : +1. 000000000000 +0.000000000000 +0.000000000000
69 +0. 000000000000 +0.000000000000 -1.000000000000
70 +0. 000000000000 +1.000000000000 +0.000000000000 2 3
71 Wld_V5 : +0. 000000000000 +0.000000000000 +1.000000000000
72 +1 000000000000 +0.000000000000 +0.000000000000
73 +0. 000000000000 +1.000000000000 +0.000000000000 5 4 STUDIO2. ENV Monday, March 28, 1994 10:14 am Page 2
74 Mag_V1 : +0.719054547032 +0. 694940407538 -0. 004288165494
75 -0.694953601812 +0.719042801010 -0 .004116022834
76 +0.000222983942 +0.005939720989 + 0.999982334840 12 1
77 Mag_V2 : +0.719054547032 -0.004288165494 -0.694940407538
78 -0.694953601812 -0.004116022834 -0.719042801010
79 +0.000222983942 +0.999982334840 -0.005939720989 13 3
80 Mag_V5 : +0.694940407538 -0.004288165494 +0.719054547032
81 +0.719042801010 -0.004116022834 -0.694953601812
82 +0.005939720989 +0.999982334840 +0.000222983942 14 4
83 Opt_V1 : +0.719054547032 +0.694940407538 - 0.004288165494
84 -0.694953601812 +0.719042801010 -0.004116022834
85 +0.000222983942 +0.005939720989 +0.999982334840 12 1
86 Opt_V2 : +0.719054547032 -0.004288165494 -0.694940407538
87 -0.694953601812 - 0.004116022834 -0.719042801010
88 +0.000222983942 + 0.999982334840 -0.005939720989 13 3
89 Opt_V5 : +0.694940407538 -0.004288165494 +0.719054547032
90 + 0.719042801010 -0.004116022834 - 0.694953601812
91 +0.005939720989 +0.999982334840 + 0.000222983942 14 4
92 ISO_V7: +0.482633382732 -0.091497273188 - 0.871030003428
93 -0.869856729916 -0.165959246561 -0.464550102681
94 -0.102050415447 +0.981878697946 -0.159686991415 24 2
STUDIO2.ENV Monday, Mart:h 28, 1994 10:16 am Page 1
1 GridPlns: 1
2 ModeNum : 4
3 Beep: 1
4 Align: 1
5 Views : 0
6 Points : 0
7 PointsHS : 0
8 PntsLev: 50
9 Finder : 1
10 FndrPntr: 1
11 ECscale: +0. 500000
12 Delay: +0. 000000
13 MaxNodes : 100
14 Pplane: 2
15 Pdisp : +0. 000000
16 Splane : 1
17 Sdisp : +0. 000000
18 GridTol : +0. 030000
19 GridSize: +6. 000000
20 Tsphere : +0. 015000
21 Origin: +0. 000000000000 +0. 000000000000 +0. 000000000000
22 AutoIncD: +0. 000000000000 +0. 000000000000 +0. 000000000000
23 AutoRotW: +0. 000000000000 +0. 000000000000 +0. 000000000000
24 AutoRotM : +0. 000000000000 +0. 000000000000 +0. 000000000000
25 XYZrot : +0. 000000000000 +0. 000000000000 +0. 000000000000
26 XYZmag: +0. 000000000000 +0. 000000000000 +0. 000000000000
27 XYZmagO: +0. 000000000000 +0. 000000000000 +0. 000000000000
28 MagOrgn: +0. 000000000000 +0. 000000000000 +0. 000000000000
29 XYwgp: +0. 000000000000 +0. 000000000000 +0. 000000000000
30 +1. 000000000000 +0. 000000000000 +0. 000000000000
31 +0. 000000000000 +1. 000000000000 +0. 000000000000
32 +0. 000000000000 +0. 000000000000 +1.000000000000 +0.000000000000
33 XZwgp: +0. 000000000000 +0. 000000000000 +0. 000000000000
34 +1. 000000000000 +0. 000000000000 +0. 000000000000
35 +0. 000000000000 +0. 000000000000 +1.000000000000
36 +0. 000000000000 -1. 000000000000 +0. 000000000000 +0.000000000000
37 YZwgp: +0. 000000000000 +0. 000000000000 +0. 000000000000
38 +0. 000000000000 +1. 000000000000 +0. 000000000000
39 +0. 000000000000 +0. 000000000000 +1.000000000000
40 +1. 000000000000 +0. 000000000000 +0. 000000000000 +0.000000000000
41 XYpnt1: -6. 000000000000 -6. 000000000000 +0. 000000000000
42 +6. 000000000000 -6. 000000000000 +0. 000000000000
43 +6. 000000000000 +6. 000000000000 +0. 000000000000
44 -6. 000000000000 +6. 000000000000 +0. 000000000000
45 XYpnt2 : -2.000000000000 -2 000000000000 +0. 000000000000
46 +2.000000000000 -2 000000000000 +0. 000000000000
47 +2.000000000000 +2.000000000000 +0. 000000000000
48 -2.000000000000 +2.000000000000 +0. 000000000000
49 XZpnt1: -6. 000000000000 +0. 000000000000 -6. 000000000000
50 +6. 000000000000 +0. 000000000000 -6. 000000000000
51 +6. 000000000000 +0. 000000000000 +6. 000000000000
52 -6. 000000000000 +0. 000000000000 +6. 000000000000
53 XZpnt2 : -2.000000000000 +0. 000000000000 -2.000000000000
54 +2.000000000000 +0. 000000000000 -2.000000000000
55 +2.000000000000 +0. 000000000000 +2.000000000000
56 -2.000000000000 +0. 000000000000 +2.000000000000
57 YZpnt1 : +0. 000000000000 -6. 000000000000 -6. 000000000000
58 +0. 000000000000 +6. 000000000000 -6. 000000000000
59 +0. 000000000000 +6. 000000000000 +6. 000000000000
60 +0. 000000000000 -6. 000000000000 +6. 000000000000
61 YZpnt2 : +0. 000000000000 -2 000000000000 -2 .000000000000
62 +0. 000000000000 +2.000000000000 -2.000000000000
63 +0. 000000000000 +2.000000000000 +2.000000000000
64 +0. 000000000000 -2 000000000000 +2 000000000000
65 Wld_V1 : +1. 000000000000 +0. 000000000000 +0 .000000000000
66 +0. 000000000000 +1. 000000000000 +0 .000000000000
67 +0. 000000000000 +0. 000000000000 +1 .000000000000 1 1
68 Wld_V2 : +1. 000000000000 +0. 000000000000 +0 .000000000000
69 +0. 000000000000 +0. 000000000000 -1 .000000000000
70 +0. 000000000000 +1 .000000000000 +0 .000000000000 2 3
71 Wld_V5 : +0 .000000000000 +0 .000000000000 +1 .000000000000
72 +1 .000000000000 +0 .000000000000 +0 .000000000000
73 +0 .000000000000 +1 .000000000000 +0 .000000000000 5 4 STUDIO2.ENV Monday, March 28, 1994 10:16 am Page 2
74 Mag_V1 +1.000000000000 +0.000000000000 +0.000000000000
75 +0.000000000000 +1.000000000000 +0..000000000000
76 +0.000000000000 +0.000000000000 +1..000000000000 1 1
77 Mag_V2 +1.000000000000 +0.000000000000 +0..000000000000
78 +0.000000000000 +0.000000000000 -1..000000000000
79 +0.000000000000 +1.000000000000 +0.000000000000 2 3
80 Mag_V5 +0.000000000000 +0.000000000000 +1.000000000000
81 +1.000000000000 +0.000000000000 +0.000000000000
82 +0.000000000000 +1.000000000000 +0.000000000000 5 4
83 Opt_V1 +1.000000000000 +0.000000000000 +0.000000000000
84 +0.000000000000 +1.000000000000 +0.000000000000
85 +0.000000000000 +0.000000000000 +1.000000000000 1 1
86 Opt_V2 +1.000000000000 +0.000000000000 +0.000000000000
87 +0.000000000000 +0.000000000000 -1.000000000000
88 +0.000000000000 +1.000000000000 +0.000000000000 2 3
89 Opt_V5 +0.000000000000 +0.000000000000 +1.000000000000
90 +1.000000000000 +0.000000000000 +0.000000000000
91 +0.000000000000 +1.000000000000 +0.000000000000 5 4
92 ISO_V7 +0.482633382732 -0.091497273188 -0.871030003428
93 - 0 . 869856729916 - 0 . 165959246561 -0 .464550102681
94 -0.102050415447 +0.981878697946 -0.159686991415 12 2

Claims

WHAT IS CLAIMED IS:
1. A system for generating a three-dimensional representation of the surface of a multidimensional object, comprising:
a computer;
an input device capable of providing to said computer multidimensional coordinates comprising selected points which define the multidimensional object;
a memory interfaced with said computer capable of storing the three-dimensional 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 three-dimensional.
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 three-dimensional 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 three-dimensional 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 three-dimensional 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 previously-defined 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 previously-defined 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 previously-defined cut plane by a specified offset; and
rotating said previously-defined 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 three-dimensional 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 three-dimensional 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 three-dimensional 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 three-dimensional 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 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;
(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.
PCT/US1995/001289 1994-02-02 1995-02-02 Replicator system and method for digitizing the geometry of a physical object WO1995021417A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU18362/95A AU1836295A (en) 1994-02-02 1995-02-02 Replicator system and method for digitizing the geometry of a physical object

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
ATPCT/US94/01233 1994-02-02
PCT/US1994/001233 WO1995021410A1 (en) 1994-02-02 1994-02-02 Replicator system and method for digitizing the geometry of a physical object
US22273294A 1994-04-04 1994-04-04
US08/222,732 1994-04-04
US34015994A 1994-11-15 1994-11-15
US08/340,159 1994-11-15

Publications (2)

Publication Number Publication Date
WO1995021417A1 true WO1995021417A1 (en) 1995-08-10
WO1995021417A9 WO1995021417A9 (en) 1995-09-08

Family

ID=27377613

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1995/001289 WO1995021417A1 (en) 1994-02-02 1995-02-02 Replicator system and method for digitizing the geometry of a physical object

Country Status (2)

Country Link
AU (1) AU1836295A (en)
WO (1) WO1995021417A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0884664A2 (en) * 1997-06-10 1998-12-16 Mitutoyo Corporation Remote control measuring system
EP1359484A2 (en) 2002-04-26 2003-11-05 Delphi Technologies, Inc. Method for virtual inspection of virtually machined parts
WO2004032001A1 (en) * 2002-10-01 2004-04-15 Agency For Science, Technology And Research An object representation method
US8417370B2 (en) 2003-10-17 2013-04-09 Hexagon Metrology Ab Apparatus and method for dimensional metrology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4881177A (en) * 1984-09-12 1989-11-14 Short Brothers Plc Ultrasonic scanning system
US5016199A (en) * 1986-07-25 1991-05-14 Renishaw Plc Co-ordinate measuring
US5019993A (en) * 1987-10-26 1991-05-28 Advanced Data Processing Adp S.R.L. Machine for measuring and mathematically defining the surface of three-dimensional models, particularly for the manufacture of molds with numeric-control machine tools
US5027281A (en) * 1989-06-09 1991-06-25 Regents Of The University Of Minnesota Method and apparatus for scanning and recording of coordinates describing three dimensional objects of complex and unique geometry
US5129054A (en) * 1990-03-12 1992-07-07 International Business Machines Corporation Specifying 3d reference points in 2d graphic displays
US5257204A (en) * 1990-04-05 1993-10-26 Matsushita Electric Industrial Co., Ltd. Automatic measuring apparatus for measuring a three-dimensional contour

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4881177A (en) * 1984-09-12 1989-11-14 Short Brothers Plc Ultrasonic scanning system
US5016199A (en) * 1986-07-25 1991-05-14 Renishaw Plc Co-ordinate measuring
US5019993A (en) * 1987-10-26 1991-05-28 Advanced Data Processing Adp S.R.L. Machine for measuring and mathematically defining the surface of three-dimensional models, particularly for the manufacture of molds with numeric-control machine tools
US5027281A (en) * 1989-06-09 1991-06-25 Regents Of The University Of Minnesota Method and apparatus for scanning and recording of coordinates describing three dimensional objects of complex and unique geometry
US5129054A (en) * 1990-03-12 1992-07-07 International Business Machines Corporation Specifying 3d reference points in 2d graphic displays
US5257204A (en) * 1990-04-05 1993-10-26 Matsushita Electric Industrial Co., Ltd. Automatic measuring apparatus for measuring a three-dimensional contour

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0884664A2 (en) * 1997-06-10 1998-12-16 Mitutoyo Corporation Remote control measuring system
EP0884664A3 (en) * 1997-06-10 1999-12-22 Mitutoyo Corporation Remote control measuring system
EP1359484A2 (en) 2002-04-26 2003-11-05 Delphi Technologies, Inc. Method for virtual inspection of virtually machined parts
EP1359484A3 (en) * 2002-04-26 2008-11-26 Delphi Technologies, Inc. Method for virtual inspection of virtually machined parts
WO2004032001A1 (en) * 2002-10-01 2004-04-15 Agency For Science, Technology And Research An object representation method
US8417370B2 (en) 2003-10-17 2013-04-09 Hexagon Metrology Ab Apparatus and method for dimensional metrology
US8825192B2 (en) 2003-10-17 2014-09-02 Hexagon Metrology Ab Apparatus and method for dimensional metrology

Also Published As

Publication number Publication date
AU1836295A (en) 1995-08-21

Similar Documents

Publication Publication Date Title
US5747822A (en) Method and apparatus for optically digitizing a three-dimensional object
US5003498A (en) Graphic display method
US5341183A (en) Method for controlling projection of optical layup template
US5303337A (en) Method and device for determining a viewing perspective for image production
US5521843A (en) System for and method of recognizing and tracking target mark
CN103678754B (en) Information processor and information processing method
US20100231690A1 (en) Model display method for three-dimensional optical sensor and three-dimensional optical sensor
Balasubramaniam et al. Generation of collision-free 5-axis tool paths using a haptic surface
JP2003196327A (en) Three-dimensional computer modeling
Milroy et al. Automated laser scanning based on orthogonal cross sections
JPH05266146A (en) Representing device for body shape
Liu et al. Isoplanar-based adaptive sampling for model-unknown sculptured surface coordinate metrology using non-contact probe
US5712965A (en) Three-dimensional solid arranging/editing method in a computer graphic system and system
Bradley et al. A complementary sensor approach to reverse engineering
Spitz et al. Accessibility analysis using computer graphics hardware
WO1995021417A1 (en) Replicator system and method for digitizing the geometry of a physical object
WO1995021417A9 (en) Replicator system and method for digitizing the geometry of a physical object
JPH11272892A (en) Device and method for moving and arranging object in three-dimensional space display system
Fuchs et al. Assistance for telepresence by stereovision-based augmented reality and interactivity in 3D space
Andrews et al. Haptic texturing based on real-world samples
Singh Fast and robust approach to find the gouge-free tool position of the Toroidal cutter for the bézier surface in five axis machining
Lechner et al. Augmented Reality for Forming Technology–Visualisation of Simulation Results and Component Measurement
WO1995021410A1 (en) Replicator system and method for digitizing the geometry of a physical object
JPH03175588A (en) Viewpoint rotating system
Batista et al. Pose view stability analysis for camera look angles computation

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AM AT AU BB BG BR BY CA CH CN CZ DE DK EE ES FI GB GE HU JP KE KG KP KR KZ LK LR LT LU LV MD MG MN MW MX NL NO NZ PL PT RO RU SD SE SI SK TJ TT UA US UZ VN

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): KE MW SD SZ AT BE CH DE DK ES FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN ML MR NE SN TD TG

COP Corrected version of pamphlet

Free format text: PAGES 1/15-15/15,DRAWINGS,REPLACED BY NEW PAGES BEARING THE SAME NUMBER;DUE TO LATE TRANSMITTAL BY THE RECEIVING OFFICE

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
REG Reference to national code

Ref country code: DE

Ref legal event code: 8642

NENP Non-entry into the national phase

Ref country code: CA

122 Ep: pct application non-entry in european phase