SVDescribeImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on March 12, 1987 9:15:31 pm PST
Contents: Routines for producing human-readable textual descriptions of Solidviews objects.
DIRECTORY
Rope, SVAssembly, SVDescribe, SVInterfaceTypes, SVSceneTypes;
SVDescribeImpl: CEDAR PROGRAM
IMPORTS SVAssembly
EXPORTS SVDescribe
=
BEGIN
Slice: TYPE = SVSceneTypes.Slice;
FeatureData: TYPE = SVInterfaceTypes.FeatureData;
SliceDescriptor: TYPE = SVSceneTypes.SliceDescriptor;
SVData: TYPE = SVInterfaceTypes.SVData;
DescribeFeature: PUBLIC PROC [feature: FeatureData, hitData: REF ANY, svData: SVData] RETURNS [description: Rope.ROPE] = {
IF feature = NIL THEN RETURN["nothing"]
ELSE {
SELECT feature.type FROM
slice => {
slice: Slice ← NARROW[feature.shape, SliceDescriptor].slice;
description ← SVAssembly.DescribeHit[slice, hitData];
};
distanceLine => description ← "distance line";
slopeLine => description ← "slope line";
angleLine => description ← "angle line";
symmetryLine => description ← "symmetry line";
radiiCircle => description ← "compass circle";
ENDCASE => ERROR;
};
};
END.