RLISP Model Conversion

Previous versions of c_shape_edit (called shape_edit) were implemented in a dialect of LISP called RLISP. In the RLISP version of shape_edit, the user command language and the RLISP programming language were the same. In c_shape_edit a new command language (SCL) has been defined and it is different from RLISP in a number of ways. In addition, some changes to particular commands in RLISP have been made. This document describes these differences and tools for converting old RLISP files into SCL files.

Basic Syntax

SCL has a number of syntactic differences from its predecessor RLISP. Some of these are easily automated and a script rlisp-to-scl has been provided with the Alpha_1 Distribution to handle the most basic changes. The following changes are handled by rlisp-to-scl: Some other changes that are not covered by rlisp-to-scl are:

Specific SCL Function Differences

A number of functions have changed name or interface from RLISP to SCL.

Name Changes

RLISP                           SCL


circleRadTanCircleAndLine       circleRadTanCircleLine arcRadTanToCircleAndLine        arcRadTanCircleLine raiseCurve                      raiseCrvOrder raiseSurface                    raiseSrfOrder bclSimFile                      bclSim

Interface Changes

The following are functional changes from RLISP to SCL.
curve and
surface
The low-level curve and surface constructors in RLisp grouped their parametric information (order, end conditions, and knot vector type or values) into a parmInfo object. The similar constructors in SCL just have separate arguments. The numerical order constants such as Cubic are still defined in SCL. Remove the parmInfo function, leaving separate arguments. rlisp-to-scl converts the EC_... and KV_... references into lower-case strings for you.
ROW and COL
A number of surface constructors and extractors such as sRefine and crvInSrf take a Dir argument to specify the direction in which they will access the surface. The RLisp ROW and COL constants are represented by "row" and "col" strings in SCL. The rlisp-to-scl script does the replacement for you.
EndCapsFlg arguments
Many surface constructors can optionally return a shell instead. ( srfOfRevolution, extrude, extrudeDir, srfOfRevolution, ruledSrf, sweepConstantWidth, and sweepWithProfile.) In RLisp, these constructors all used to have two boolean arguments at the end, ShlFlg and EndCapsFlg, indicating whether a surface or shell should be returned, and if a shell whether end caps should be put on. In SCL, these two arguments have been combined into one optional argument. So if the third argument in RLisp was FALSE, remove both the third and fourth arguments to get a surface return value. If the third argument was TRUE indicating a shell return value, remove it, leaving the boolean fourth argument to indicate whether end caps are to be constructed.
addSrfToShell
The RLisp addSrfToShell function no longer exists. Instead, give the shell constructor all of the surfaces to be put in the shell, or make multiple shells and merge them with mergeShell.
autoMkAdjacentShell
autoMkAdjacentShell has not been translated into C++. You must individually declare adjacencies for now.
combineShells
The argument order of combineShells has changed to be: Shl1, Shl2, Operation, TriApxFlag, Res, where the last two are optional. In the RLisp version there were only three arguments and the the operation was the second argument. In SCL it is the third argument, so exchange the order of the second and third arguments.
machine
The argument order has changed to be: array of features, previous stage, and the fixturing. The last two are optional, so the array of features was moved from the end of the argument list to the beginning.
outlineCrv
There is no (third) CCW (counter-clockwise) argument now.
ptIntersect2circles
The SCL function has a required third argument making it equivalent to the RLISP ptIntersect2CircleFlag function. To convert, add true as the third argument.
ptIntersectCircleLine
The SCL function has a required third argument making it equivalent to the RLISP ptIntersectCircleLineFlag function. To convert, add true as the third argument.
rectangularPocket
The SCL function first argument is now the lower left corner. This is changed from the upper left corner.
reflect
The second argument is a line object (for now) instead of a symbol. For example, reflect planar geometry through YAxis rather than 'YZ.
arcRadTanToCircleAndLine
This is the old form of the function. When the name was changed to arcRadTanCircleLine, the arguments were changed to resemble circleRadTanCircleLine.

The sense of the fourth argument was changed from Oppose to CSW (Curved Same Way), so just convert false to true and vice versa.

A new fifth argument(FrontOfLine) was added, telling which intersection between the circle and the line to use. To convert, add false as the fifth argument.

The old fifth argument (SameSide) is now the sixth argument (RightOfLine). To convert, you have to know whether the center of the circle is on the right or left of the line.

Many of the constructors for mechanical feature objects were changed to have more consistent argument ordering, and to add chamfers and wall angles.
    ptListPattern( Obj, PtArray );                        ptListPattern( Ptlist, Obj, UseObjectPosition );
  
    linearPattern( Obj, Loc, X, X, Loc );                 linearPattern( Loc, Obj, X, X, UseObjectPosition );
  
    rectangularPattern( Obj, Loc, X, X, X, X, Loc );      rectangularPattern( Loc, Obj, X, X, X, X, UseObjectPosition );
  
    radialPattern( Obj, Loc, X, X, X, ObjAnchor );        radialPattern( Loc, Obj, X, X, X, UseObjectPosition );

    rectangularPocket( X, X, X, X, X, BotRad, WallAng );  rectangularPocket( X, X, X, X, X, Cham, WallAng, BotRad );

    profilePocket( X, X, BotRad, WallAng, Loc );          profilePocket( X, X, Cham, WallAng, BotRad, Loc );

    profileFace( Prof, Thickness, Loc );                  profileFace( CrvArray, OptLoc );

    profileGroove( X, X, X, WallAng, BotRad, Cham, Loc ); profileGroove( X, X, X, Cham, WallAng, BotRad, Thru, Loc );

    profileSide( X, X, X, Loc );                          profileSide( X, X, X, Cham, WallAng, BotRad, Loc )
  
    profileBoss( X, X, X, Rad, WallAng, Loc );            profileBoss( X, X, X, Cham, WallAng, Rad, Loc );
  
    slot( X, X, X, X, Thru );                             slot( X, X, X, X, Cham, WallAng, BotRad, Thru );

C_Shape_Edit User's Manual Home Page 
Alpha_1 User's Manual.
Copyright © 1998, University of Utah
a1-web@gr.cs.utah.edu