DIRECTORY CD, CoreGeometry, Rope; OnionCoreArc: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Side: TYPE = CoreGeometry.Side; Arc: TYPE = REF ArcRec; ArcRec: TYPE = RECORD [ rect: CD.Rect, -- this is the bounding rect of all components. The arc, whatever its thickness, is included inside this bbox. segs: LIST OF Seg -- the ring segments, non sorted ]; Seg: TYPE = REF SegRec; SegRec: TYPE = RECORD [point1, point2: INT, side1, side2: Side]; -- always rotating in the direct direction (counterClockWise). By convention, point1 is included but point2 is not. EmptyArc: PROC [rect: CD.Rect] RETURNS [arc: Arc]; Length: PROC [arc: Arc] RETURNS [length: INT _ 0]; ConnectSegBitToArc: PROC [min, max: INT, side: Side, arc: Arc] RETURNS [connection: Arc]; NotOverlapping: PROC [arc1, arc2: Arc, minDist: INT] RETURNS [notOverlapping: BOOL _ TRUE]; Union: PROC [arc1, arc2: Arc] RETURNS [union: Arc]; EachSegBitProc: TYPE = PROC [min, max: INT, side: Side]; EnumerateSegBits: PROC [arc: Arc, eachSegBit: EachSegBitProc]; END. XOnionCoreArc.mesa Copyright c 1985, 1986 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet, August 17, 1986 10:36:30 pm PDT Last Edited by: Serlet, July 3, 1985 1:20:20 pm PDT The 2 arcs can be of different sizes The union is positionned to fit on the largest rect It is assumed that arc1 and arc2 do not overlap. ΚΖ˜– "Cedar" stylešœ™Jšœ Οmœ7™BJ™;J™3—J˜šΟk œ˜ Jšžœ˜—J˜šΟb œžœž œ˜"J˜Jšž˜J˜Jšžœžœžœ˜JšŸœžœ˜J˜JšŸœžœžœ˜šœžœžœ˜Jšœžœ Οcn˜Jšœžœžœ  ˜2J˜—J˜JšŸœžœžœ˜Jšœžœžœžœ s˜΄J˜JšΟnœžœžœžœ ˜2Jš‘œžœ žœ žœ˜2Jš‘œžœ žœžœ˜YJ™J™$Jš ‘œžœžœžœžœžœ˜[Irect™Jšœ3™3J™0Jš‘œžœžœ˜3J˜Jš‘œžœžœ žœ˜8Jš‘œžœ(˜>J˜Jšžœ˜——…—.